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

src/window/header/def.h

Go to the documentation of this file.
00001 
00002 enum STATE {
00003         stateUnknown,
00004         stateWindowed,
00005         stateMaximized,
00006         stateMinimized,
00007         stateFullscreen,
00008         stateCentered
00009 };
00010 
00011 enum STYLE {
00012         styleUnknown,
00013         styleNormal,
00014         styleDialog,
00015         styleTool,
00016         styleNoBorder,
00017         styleLoadScreen,
00018         styleFullscreen,
00019         styleInfo
00020 };
00021 
00022 enum WNDEVENT {
00023         eventUnknown,
00024         eventResize,
00025         eventRender,
00026         eventPaint,
00027         eventMinimize,
00028         eventUnminimize,
00029         eventMaximize,
00030         eventClose,
00031         eventFocus,
00032         eventLostFocus,
00033         eventMoveWindow
00034 };
00035 
00036 enum DIALOGFLAGS {
00037         dialogOpen,
00038         dialogSave,
00039 };
00040 
00042 typedef struct WindowSize {
00043         union {
00044                 struct { int x, y, width, height; };
00045                 int size[4];
00046         };
00047         inline WindowSize& operator = (const WindowSize& other){
00048                 return x = other.x, y = other.y, width = other.width, height = other.height, *this;
00049         }
00050         inline bool operator == (const WindowSize& other){
00051                 return x == other.x && y == other.y && width == other.width && height == other.height;
00052         }
00053         inline bool operator != (const WindowSize& other){
00054                 return x != other.x || y != other.y || width != other.width || height != other.height;
00055         }
00056 } *pWindowSize;
00057 
00059 typedef struct CursorPosition {
00060         union {
00061                 struct { int x, y; };
00062                 int position[2];
00063         };
00064         inline CursorPosition& operator = (const CursorPosition& other){
00065                 return x = other.x, y = other.y, *this;
00066         }
00067         inline bool operator == (const CursorPosition& other){
00068                 return x == other.x && y == other.y;
00069         }
00070         inline bool operator != (const CursorPosition& other){
00071                 return x != other.x || y != other.y;
00072         }
00073 } *pCursorPosition;
00074 
00076 typedef class EventRenderListener {
00077 public:
00078         virtual void eventRender(void) = 0;
00079         virtual void eventPaint(void) = 0;
00080 } *pEventRenderListener;
00081 
00083 typedef class EventWindowListener {
00084 public:
00085         virtual void eventWindowMove(int x, int y, int width, int height) = 0;
00086         virtual void eventWindowResize(int x, int y, int width, int height) = 0;
00087         virtual void eventWindowMinimize(void) = 0;
00088         virtual void eventWindowUnminimize(void) = 0;
00089         virtual void eventWindowMaximize(void) = 0;
00090         virtual void eventWindowClose(void) = 0;
00091         virtual void eventWindowFocus(void) = 0;
00092         virtual void eventWindowLostFocus(void) = 0;
00093 } *pEventWindowListener;
00094 
00096 typedef class EventDeviceListener {
00097 public:
00098         virtual void eventMouse(int x, int y, int z, int dx, int dy, MOUSEBTN, bool up, int deviceID) = 0;
00099         virtual void eventKey(KEYBTN, bool* keys, bool up, int deviceID) = 0;
00100 } *pEventDeviceListener;

Generated on Fri Jun 18 2010 17:48:40 for Cannonball by  doxygen 1.7.0