Ignore:
Timestamp:
May 13, 2011, 9:13:53 AM (11 years ago)
Author:
Sam Hocevar
Message:

imlib: refactor Event and EventHandler?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/imlib/input.cpp

    r579 r643  
    113113}
    114114
    115 void button_box::handle_event(event &ev, image *screen, InputManager *im)
     115void button_box::handle_event(Event &ev, image *screen, InputManager *im)
    116116{
    117117  switch (ev.type)
     
    268268}
    269269
    270 void text_field::handle_event(event &ev, image *screen, InputManager *im)
     270void text_field::handle_event(Event &ev, image *screen, InputManager *im)
    271271{
    272272  int xx;
     
    293293           draw_text(screen);
    294294           draw_cur(wm->bright_color(),screen);
    295            wm->push_event(new event(id,(char *)this));
     295           wm->Push(new Event(id,(char *)this));
    296296         } break;
    297297      default : if (ev.key>=' ' && ev.key<='~')
     
    306306           draw_text(screen);
    307307           draw_cur(wm->bright_color(),screen);
    308            wm->push_event(new event(id,(char *)this));
     308           wm->Push(new Event(id,(char *)this));
    309309         } break;
    310310    }
     
    366366{ up=!up; }
    367367
    368 void button::handle_event(event &ev, image *screen, InputManager *im)
     368void button::handle_event(Event &ev, image *screen, InputManager *im)
    369369{
    370370  if ((ev.type==EV_KEY && ev.key==13) || (ev.type==EV_MOUSE_BUTTON &&
     
    376376    draw_first(screen);
    377377    draw(act,screen);
    378     wm->push_event(new event(id,(char *)this));
     378    wm->Push(new Event(id,(char *)this));
    379379  }
    380380}
     
    385385  area(x1,y1,x2,y2);
    386386  if (active!=act  && act_id!=-1 && active)
    387     wm->push_event(new event(act_id,NULL));
     387    wm->Push(new Event(act_id,NULL));
    388388
    389389  if (pressed)
Note: See TracChangeset for help on using the changeset viewer.