Changeset 710 for libcaca/trunk/src


Ignore:
Timestamp:
Apr 1, 2006, 4:44:09 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Merged caca_wait_event() into caca_get_event() and added a timeout parameter to do what both functions did before, and even more.
Location:
libcaca/trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/src/aafire.c

    r704 r710  
    267267#ifdef LIBCACA
    268268      struct caca_event ev;
    269       if(caca_get_event(kk, CACA_EVENT_KEY_PRESS, &ev))
     269      if(caca_get_event(kk, CACA_EVENT_KEY_PRESS, &ev, 0))
    270270        {
    271271          switch(ev.data.key.c)
  • libcaca/trunk/src/cacaball.c

    r704 r710  
    9494    {
    9595        struct caca_event ev;
    96         if(caca_get_event(kk, CACA_EVENT_KEY_PRESS, &ev))
     96        if(caca_get_event(kk, CACA_EVENT_KEY_PRESS, &ev, 0))
    9797        {
    9898            switch(ev.data.key.c)
  • libcaca/trunk/src/cacamoir.c

    r704 r710  
    7070    {
    7171        struct caca_event ev;
    72         if(caca_get_event(kk, CACA_EVENT_KEY_PRESS, &ev))
     72        if(caca_get_event(kk, CACA_EVENT_KEY_PRESS, &ev, 0))
    7373        {
    7474            switch(ev.data.key.c)
  • libcaca/trunk/src/cacaplas.c

    r703 r710  
    8686    {
    8787        struct caca_event ev;
    88         if(caca_get_event(kk, CACA_EVENT_KEY_PRESS, &ev))
     88        if(caca_get_event(kk, CACA_EVENT_KEY_PRESS, &ev, 0))
    8989        {
    9090            switch(ev.data.key.c)
  • libcaca/trunk/src/cacaplay.c

    r702 r710  
    6767    caca_display(kk);
    6868
    69     while(caca_wait_event(kk, CACA_EVENT_KEY_PRESS, &ev))
     69    while(caca_get_event(kk, CACA_EVENT_KEY_PRESS, &ev, -1))
    7070    {
    7171        if(ev.data.key.c == CACA_KEY_ESCAPE)
  • libcaca/trunk/src/cacaview.c

    r681 r710  
    152152
    153153        if(update)
    154             event = caca_get_event(kk, event_mask, &ev);
     154            event = caca_get_event(kk, event_mask, &ev, 0);
    155155        else
    156             event = caca_wait_event(kk, event_mask, &ev);
     156            event = caca_get_event(kk, event_mask, &ev, -1);
    157157
    158158        while(event)
     
    305305                help = new_help;
    306306
    307             event = caca_get_event(kk, CACA_EVENT_KEY_PRESS, &ev);
     307            event = caca_get_event(kk, CACA_EVENT_KEY_PRESS, &ev, 0);
    308308        }
    309309
Note: See TracChangeset for help on using the changeset viewer.