Ignore:
Timestamp:
Mar 15, 2008, 12:55:44 AM (11 years ago)
Author:
Sam Hocevar
Message:
  • Rename the "eh" variable to "wm" because it's a window manager, not an event handler.
  • No longer pass the window manager to functions, there's only one.

Inspired by Win32 Abuse changelog for January 28, 2001:

  • Starting work on singleton code; will get rid of all

references to an arbitrary window_manager* because
there's only going to be one, and it's not ever
going to change.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/devsel.cpp

    r56 r106  
    1919int cur_bg=0,cur_fg=0,cur_char=0;
    2020
    21 void tile_picker::recenter(image *screen, window_manager *wm)
     21void tile_picker::recenter(image *screen)
    2222{
    23   set_x(get_current(),screen,wm);
     23  set_x(get_current(), screen);
    2424}
    2525
     
    7272}
    7373
    74 tile_picker::tile_picker(int X, int Y, int ID, int spec_type, window_manager *wm,
     74tile_picker::tile_picker(int X, int Y, int ID, int spec_type,
    7575                         int Scale, int scroll_h, int Wid, ifield *Next)
    7676     : scroller(X,Y,ID,2,2,1,0,Next)
     
    8686
    8787
    88 void tile_picker::scroll_event(int newx, image *screen, window_manager *wm)
     88void tile_picker::scroll_event(int newx, image *screen)
    8989{
    9090  int yo=y,ya=pich(),xw=picw(),c=get_current(),xo;
     
    9292  last_sel=newx;
    9393
    94   screen->bar(x,y,x+l-1,y+h-1,eh->black());
     94  screen->bar(x,y,x+l-1,y+h-1,wm->black());
    9595  for (int i=newx;i<newx+th*wid;i++)
    9696  {
     
    142142
    143143
    144 void tile_picker::handle_inside_event(event &ev, image *screen, window_manager *wm, input_manager *inm)
     144void tile_picker::handle_inside_event(event &ev, image *screen, input_manager *inm)
    145145{
    146146  if (ev.type==EV_MOUSE_BUTTON)
     
    150150    {
    151151      set_current(sel);
    152       scroll_event(last_sel,screen,wm);
     152      scroll_event(last_sel, screen);
    153153    }
    154154  }
Note: See TracChangeset for help on using the changeset viewer.