• Main Page
  • Namespaces
  • Classes
  • Files
  • File List

application.h

Go to the documentation of this file.
00001 #ifndef WIT_APPLICATION_H
00002 #define WIT_APPLICATION_H
00003 
00004 #include "wit.h"
00005 
00006 namespace wit {
00007 
00008 class ApplicationPrivate;
00009 class Console;
00010 class Event;
00011 class EventHandler;
00012 
00013 class Application {
00014 friend class ApplicationPrivate;
00015 public:
00016     Application(int features = AllFeatures);
00017     virtual ~Application();
00018 
00019     static Application* instance();
00020     Console* console() const;
00021     int features() const;
00022 
00023     void* framebuffer() const;
00024     int screenWidth() const;
00025     int screenHeight() const;
00026 
00027     void setAutoHomeMenu(bool on);
00028     bool autoHomeMenu() const;
00029     bool isHomeMenuVisible() const;
00030     virtual void showHomeMenu();
00031     virtual void hideHomeMenu();
00032 
00033     void reboot();
00034     void shutdown(ShutdownMode mode = Shutdown_Auto);
00035     void returnToMenu();
00036     void quit();
00037 
00038     void run();
00039 
00040     virtual void postEvent(Event* event);
00041 
00042     void pushFocus(EventHandler* handler, int controllerID = -1);
00043     EventHandler* currentFocus(int controllerID = -1) const;
00044     EventHandler* popFocus(int controllerID = -1);
00045     void removeFromFocusStack(EventHandler* handler, int controllerID = -1);
00046 
00047     void installEventFilter(EventHandler* handler);
00048     void removeEventFilter(EventHandler* handler);
00049     void scheduleTimer(int frames, EventHandler* handler, void* data);
00050 
00051     bool abortGxOnReset() const;
00052     void setAbortGxOnReset(bool on);
00053 
00054 protected:
00055     virtual void resetButtonPressed();
00056     virtual void powerButtonPressed(int controllerID);
00057     virtual void homeMenuEvent(Event* event);
00058     void setHomeMenuVisible(bool on);
00059 
00060 private:
00061     ApplicationPrivate* d;
00062 };
00063 
00073 inline Application* witApp() { return Application::instance(); }
00074 
00075 }
00076 
00077 using wit::witApp;
00078 
00079 #endif

Generated on Sat Sep 3 2011 10:25:00 for wit by  doxygen 1.7.2