Changeset 2188


Ignore:
Timestamp:
Jan 11, 2008, 12:42:29 AM (15 years ago)
Author:
Sam Hocevar
Message:
  • Put back all the shit in struct caca_event to avoid breaking existing applications. I'll think of a migration path later.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/caca.h

    r2139 r2188  
    4646/** \e libcaca event structure */
    4747typedef struct caca_event caca_event_t;
    48 
    49 /** \brief Handling of user events.
    50  *
    51  *  This structure is filled by caca_get_event() when an event is received.
    52  *  It is an opaque structure that should only be accessed through
    53  *  caca_event_get_type() and similar functions.
    54  */
    55 struct caca_event
    56 {
    57     unsigned char opaque_structure[32];
    58 };
    5948
    6049/** \brief User event type enumeration.
     
    7766
    7867    CACA_EVENT_ANY =           0xffff  /**< Bitmask for any event. */
     68};
     69
     70/** \brief Handling of user events.
     71 *
     72 *  This structure is filled by caca_get_event() when an event is received.
     73 *  It is an opaque structure that should only be accessed through
     74 *  caca_event_get_type() and similar functions. The struct members may no
     75 *  longer be directly accessible in future versions.
     76 */
     77struct caca_event
     78{
     79    enum caca_event_type type;
     80    union
     81    {
     82        struct { unsigned int x, y, button; } mouse;
     83        struct { unsigned int w, h; } resize;
     84        struct { unsigned int ch; unsigned long int utf32; char utf8[8]; } key;
     85    } data;
     86    unsigned char padding[16];
    7987};
    8088
Note: See TracChangeset for help on using the changeset viewer.