examples: Added misc/02-clipboard

This commit is contained in:
Ryan C. Gordon
2025-09-24 14:41:29 -04:00
parent 0b9a197eda
commit 17d77f5fbd
5 changed files with 242 additions and 0 deletions
+1
View File
@@ -155,6 +155,7 @@ add_sdl_example_executable(camera-read-and-draw SOURCES camera/01-read-and-draw/
add_sdl_example_executable(pen-drawing-lines SOURCES pen/01-drawing-lines/drawing-lines.c)
add_sdl_example_executable(asyncio-load-bitmaps SOURCES asyncio/01-load-bitmaps/load-bitmaps.c DATAFILES ${CMAKE_CURRENT_SOURCE_DIR}/../test/sample.bmp ${CMAKE_CURRENT_SOURCE_DIR}/../test/gamepad_front.bmp ${CMAKE_CURRENT_SOURCE_DIR}/../test/speaker.bmp ${CMAKE_CURRENT_SOURCE_DIR}/../test/icon2x.bmp)
add_sdl_example_executable(misc-power SOURCES misc/01-power/power.c)
add_sdl_example_executable(misc-clipboard SOURCES misc/02-clipboard/clipboard.c)
add_sdl_example_executable(demo-snake SOURCES demo/01-snake/snake.c)
add_sdl_example_executable(demo-woodeneye-008 SOURCES demo/02-woodeneye-008/woodeneye-008.c)
add_sdl_example_executable(demo-infinite-monkeys SOURCES demo/03-infinite-monkeys/infinite-monkeys.c)
+6
View File
@@ -0,0 +1,6 @@
This example code lets the user copy and paste with the system clipboard.
This only handles text, but SDL supports other data types, too.
Note that only Chrome-based browsers support this API currently. This uses a
new Javascript API, so hopefully this will be available everywhere soon!
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB