Definition at line 29 of file testdropfile.c.
30{
33
34
36
37
40 return 1;
41 }
42
43 for (
i = 1;
i < argc;) {
44 int consumed;
45
47
49 consumed = 1;
50 }
51 if (consumed == 0) {
52 consumed = -1;
53 }
54 if (consumed < 0) {
57 }
59 }
62 }
63
69 }
70
72
73
76
79 SDL_Log(
"Drop beginning on window %u", (
unsigned int)
event.drop.windowID);
81 SDL_Log(
"Drop complete on window %u", (
unsigned int)
event.drop.windowID);
83 const char *typestr = (
event.type ==
SDL_DROPFILE) ?
"File" :
"Text";
84 char *dropped_filedir = event.drop.file;
85 SDL_Log(
"%s dropped on window %u: %s", typestr, (
unsigned int)
event.drop.windowID, dropped_filedir);
86
87
88 }
89
91 }
92 }
93
95
96 return(0);
97}
#define SDL_RenderPresent
#define SDL_SetRenderDrawColor
#define SDL_LogSetPriority
@ SDL_LOG_CATEGORY_APPLICATION
SDLTest_CommonState * SDLTest_CommonCreateState(char **argv, Uint32 flags)
Parse command line parameters and create common state.
void SDLTest_CommonEvent(SDLTest_CommonState *state, SDL_Event *event, int *done)
Common event handler for test windows.
int SDLTest_CommonArg(SDLTest_CommonState *state, int index)
Process one common argument.
SDL_bool SDLTest_CommonInit(SDLTest_CommonState *state)
Open test window.
void SDLTest_CommonLogUsage(SDLTest_CommonState *state, const char *argv0, const char **options)
Logs command line usage info.
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
SDL_Renderer ** renderers
static SDL_Renderer * renderer
static SDLTest_CommonState * state
References done, i, NULL, SDLTest_CommonState::num_windows, quit(), renderer, SDLTest_CommonState::renderers, SDL_DROPBEGIN, SDL_DROPCOMPLETE, SDL_DROPFILE, SDL_DROPTEXT, SDL_ENABLE, SDL_EventState, SDL_INIT_VIDEO, SDL_Log, SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, SDL_LogSetPriority, SDL_PollEvent, SDL_RenderClear, SDL_RenderPresent, SDL_SetRenderDrawColor, SDL_strncmp, SDLTest_CommonArg(), SDLTest_CommonCreateState(), SDLTest_CommonEvent(), SDLTest_CommonInit(), SDLTest_CommonLogUsage(), and state.