Ignore:
Timestamp:
Mar 23, 2006, 7:36:59 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Massive rework of the event handling code, as per the TODO list.
File:
1 edited

Legend:

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

    r672 r681  
    116116        void (* display) (caca_t *);
    117117        void (* handle_resize) (caca_t *);
    118         unsigned int (* get_event) (caca_t *);
     118        int (* get_event) (caca_t *, struct caca_event *);
    119119    } drv;
    120120
     
    140140    struct events
    141141    {
    142 #if defined(USE_SLANG) || defined(USE_NCURSES) || defined(USE_CONIO)
    143         unsigned int buf[EVENTBUF_LEN];
     142#if defined(USE_SLANG) || defined(USE_NCURSES) || defined(USE_CONIO) || defined(USE_GL)
     143        struct caca_event buf[EVENTBUF_LEN];
    144144        int queue;
    145145#endif
     
    148148        unsigned int last_key_ticks;
    149149        unsigned int autorepeat_ticks;
    150         unsigned int last_key;
     150        struct caca_event last_key_event;
    151151#endif
    152152    } events;
     
    159159/* Internal event functions */
    160160extern void _caca_handle_resize(caca_t *);
    161 #if defined(USE_SLANG) || defined(USE_NCURSES) || defined(USE_CONIO)
    162 extern void _push_event(caca_t *, unsigned int);
    163 extern unsigned int _pop_event(caca_t *);
     161#if defined(USE_SLANG) || defined(USE_NCURSES) || defined(USE_CONIO) || defined(USE_GL)
     162extern void _push_event(caca_t *, struct caca_event *);
     163extern int _pop_event(caca_t *, struct caca_event *);
    164164#endif
    165165
Note: See TracChangeset for help on using the changeset viewer.