1 // -*- mode: C++; indent-tabs-mode: nil; -*-
12 #include "otk/screeninfo.hh"
13 #include "otk/timer.hh"
20 static Openbox
*instance
; // there can only be ONE instance of this class in
21 // the program, and it is held in here
23 typedef std::vector
<otk::ScreenInfo
> ScreenInfoList
;
32 // stuff that can be passed on the command line
33 std::string _rcfilepath
; // path to the config file to use/in use
34 std::string _menufilepath
; // path to the menu file to use/in use
35 char *_displayreq
; // display requested by the user
36 char *_argv0
; // argv[0], how the program was called
38 otk::OBTimerQueueManager _timermanager
; // manages timers, so that they fire
39 // when their time elapses
41 RunState _state
; // the state of the window manager
43 ScreenInfoList _screenInfoList
; // info for all screens on the display
45 void parseCommandLine(int argv
, char **argv
);
49 static int xerrorHandler(Display
*d
, XErrorEvent
*e
);
50 static void signalHandler(int signal
);
53 //! Openbox constructor.
55 \param argc Number of command line arguments, as received in main()
56 \param argv The command line arguments, as received in main()
58 Openbox(int argc
, char **argv
);
59 //! Openbox destructor.
62 //! Returns the state of the window manager (starting, exiting, etc).
63 inline RunState
state() const { return _state
; }
65 inline otk::OBTimerQueueManager
*timerManager() { return &_timermanager
; }
69 // XXX: TEMPORARY!#!@%*!^#*!#!#!
70 virtual void process_event(XEvent
*) = 0;
72 //! Requests that the window manager exit.
73 inline void shutdown() { _state
= State_Exiting
; }
78 #endif // __openbox_hh