Beginners_-_SetClipboardText.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #include "raylib.h"
  2. int main(void)
  3. {
  4. // Initialization
  5. //--------------------------------------------------------------------------------------
  6. const int screenWidth = 800;
  7. const int screenHeight = 450;
  8. InitWindow(screenWidth, screenHeight, "raylib example.");
  9. SetTargetFPS(60); // Set our game to run at 60 frames-per-second
  10. //--------------------------------------------------------------------------------------
  11. const char* output = "Test";
  12. SetClipboardText(output);
  13. // Main game loop
  14. while (!WindowShouldClose()) // Detect window close button or ESC key
  15. {
  16. // Update
  17. //----------------------------------------------------------------------------------
  18. //----------------------------------------------------------------------------------
  19. // Draw
  20. //----------------------------------------------------------------------------------
  21. BeginDrawing();
  22. ClearBackground(RAYWHITE);
  23. DrawText("Check your clipboard buffer CTRL+V",50,100,20,DARKGRAY);
  24. EndDrawing();
  25. //----------------------------------------------------------------------------------
  26. }
  27. // De-Initialization
  28. //--------------------------------------------------------------------------------------
  29. CloseWindow(); // Close window and OpenGL context
  30. //--------------------------------------------------------------------------------------
  31. return 0;
  32. }