SDL_dropevents.c File Reference
`#include "../SDL_internal.h"`
`#include "SDL_events.h"`
`#include "SDL_events_c.h"`
`#include "SDL_dropevents_c.h"`
Include dependency graph for SDL_dropevents.c:

Go to the source code of this file.

## Functions

int | SDL_SendDropFile (const char *file)

## Function Documentation

int SDL_SendDropFile | ( | const char * | file | ) |

Definition at line 31 of file SDL_dropevents.c.

References SDL_DROPFILE, SDL_ENABLE, SDL_GetEventState, SDL_PushEvent, and SDL_strdup.

{
int posted;
/* Post the event, if desired */
posted = 0;
if (SDL_GetEventState(SDL_DROPFILE) == SDL_ENABLE) {
SDL_Event event;
event.type = SDL_DROPFILE;
event.drop.file = SDL_strdup(file);
posted = (SDL_PushEvent(&event) > 0);
}
return (posted);
}
SDL_ENABLE
#define SDL_ENABLE
Definition: SDL_events.h:718
SDL_GetEventState
#define SDL_GetEventState(type)
Definition: SDL_events.h:731
event
struct _cl_event * event
Definition: SDL_opengl_glext.h:2649
SDL_PushEvent
#define SDL_PushEvent
Definition: SDL_dynapi_overrides.h:131
SDL_DROPFILE
Definition: SDL_events.h:138
SDL_strdup
#define SDL_strdup
Definition: SDL_dynapi_overrides.h:403
SDL_Event
General event structure.
Definition: SDL_events.h:521