include/SDL_events.h
changeset 6091 61fa4f3238c5
parent 6053 4d7b69e575f9
child 6114 d166819bf2b3
     1.1 --- a/include/SDL_events.h	Sat Nov 19 19:23:33 2011 -0500
     1.2 +++ b/include/SDL_events.h	Sun Nov 20 19:38:18 2011 -0500
     1.3 @@ -104,8 +104,10 @@
     1.4      SDL_MULTIGESTURE,
     1.5  
     1.6      /* Clipboard events */
     1.7 +    SDL_CLIPBOARDUPDATE = 0x900, /**< The clipboard changed */
     1.8  
     1.9 -    SDL_CLIPBOARDUPDATE = 0x900, /**< The clipboard changed */
    1.10 +    /* Drag and drop events */
    1.11 +    SDL_DROPFILE        = 0x1000, /**< The system requests a file open */
    1.12  
    1.13      /* Obsolete events */
    1.14      SDL_EVENT_COMPAT1 = 0x7000, /**< SDL 1.2 events for compatibility */
    1.15 @@ -350,6 +352,18 @@
    1.16  
    1.17  
    1.18  /**
    1.19 + *  \brief An event used to request a file open by the system (event.drop.*)
    1.20 + *         This event is disabled by default, you can enable it with SDL_EventState()
    1.21 + *  \note If you enable this event, you must free the filename in the event.
    1.22 + */
    1.23 +typedef struct SDL_DropEvent
    1.24 +{
    1.25 +    Uint32 type;        /**< ::SDL_DROPFILE */
    1.26 +    char *file;         /**< The file name, which should be freed with SDL_free() */
    1.27 +} SDL_DropEvent;
    1.28 +
    1.29 +
    1.30 +/**
    1.31   *  \brief The "quit requested" event
    1.32   */
    1.33  typedef struct SDL_QuitEvent
    1.34 @@ -376,7 +390,8 @@
    1.35  
    1.36  /**
    1.37   *  \brief A video driver dependent system event (event.syswm.*)
    1.38 - *  
    1.39 + *         This event is disabled by default, you can enable it with SDL_EventState()
    1.40 + *
    1.41   *  \note If you want to use this event, you should include SDL_syswm.h.
    1.42   */
    1.43  typedef struct SDL_SysWMEvent
    1.44 @@ -437,6 +452,7 @@
    1.45      SDL_TouchButtonEvent tbutton;   /**< Touch button event data */
    1.46      SDL_MultiGestureEvent mgesture; /**< Multi Finger Gesture data */
    1.47      SDL_DollarGestureEvent dgesture; /**< Multi Finger Gesture data */
    1.48 +    SDL_DropEvent drop;             /**< Drag and drop event data */
    1.49  
    1.50      /** Temporarily here for backwards compatibility */
    1.51      /*@{*/