Ignore:
Timestamp:
Nov 25, 2007, 12:11:54 PM (13 years ago)
Author:
Sam Hocevar
Message:
  • Made the caca_event_t structure opaque and created a whole bunch of functions to access its real data. This is a big API change that will break your software, sorry :(
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/caca0.c

    r1882 r2049  
    8585        return 0x00000000;
    8686
    87     switch(ev.type)
     87    switch(caca_get_event_type(&ev))
    8888    {
    8989        case CACA_EVENT_KEY_PRESS:
    90             return 0x01000000 | ev.data.key.ch;
     90            return 0x01000000 | caca_get_event_key_ch(&ev);
    9191        case CACA_EVENT_KEY_RELEASE:
    92             return 0x02000000 | ev.data.key.ch;
     92            return 0x02000000 | caca_get_event_key_ch(&ev);
    9393        case CACA_EVENT_MOUSE_PRESS:
    94             return 0x04000000 | ev.data.mouse.button;
     94            return 0x04000000 | caca_get_event_mouse_button(&ev);
    9595        case CACA_EVENT_MOUSE_RELEASE:
    96             return 0x08000000 | ev.data.mouse.button;
     96            return 0x08000000 | caca_get_event_mouse_button(&ev);
    9797        case CACA_EVENT_MOUSE_MOTION:
    98             return 0x10000000 | ((ev.data.mouse.x & 0xfff) << 12)
    99                               | (ev.data.mouse.y & 0xfff);
     98            return 0x10000000 | ((caca_get_event_mouse_x(&ev) & 0xfff) << 12)
     99                              | (caca_get_event_mouse_y(&ev) & 0xfff);
    100100        case CACA_EVENT_RESIZE:
    101101            return 0x20000000;
Note: See TracChangeset for help on using the changeset viewer.