Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

PhxWindowInformation.h

Go to the documentation of this file.
00001 #ifndef PHX_WINDOW_INFORMATION_H
00002 #define PHX_WINDOW_INFORMATION_H
00003 
00004 #include <Phx/PhxConfig.h>
00005 #include <Phx/PhxTypes.h>
00006 
00007 #if HAVE_X11
00008 #include <X11/Xlib.h>
00009 #endif
00010 
00011 #if PHX_PLATFORM_WIN32
00012 #define WIN32_LEAN_AND_MEAN
00013 #include <windows.h>
00014 #endif
00015 
00023 namespace Phx {
00024 
00031   class WindowInformation : public LockedPtrInterface<WindowInformation> {
00032   protected:
00033     // Cannot construct/assign this class directly.
00034     WindowInformation() {}
00035     WindowInformation(WindowInformation& w) {}
00036     WindowInformation& operator=(WindowInformation& w) { return *this; }
00037   };
00038 
00039 #if HAVE_X11
00040 
00044   class X11WindowInformation : public WindowInformation {
00045   public:
00046     X11WindowInformation(Display* display, Window window);
00047     // default copy/assignment okay
00048 
00052     ::Window window(void) const { return mWindow; }
00053 
00057     ::Display* display(void) const { return mDisplay; }
00058 
00059   private:
00060     ::Display* mDisplay;
00061     ::Window   mWindow;
00062   };
00063 #endif
00064 
00065 #if PHX_PLATFORM_WIN32
00066 
00071   class Win32WindowInformation : public WindowInformation {
00072   public:
00073     Win32WindowInformation(HWND window);
00074       // default copy/assignment okay
00075 
00076     HWND window(void);
00077         operator HWND( void );
00078 
00079         int width( void );
00080         int height( void );
00081 
00082   private:
00083           HWND m_hWindow;
00084           int m_nWindowWidth;
00085           int m_nWindowHeight;
00086   };
00087 #endif
00088 
00089 };
00090 
00091 #endif /* PHX_WINDOW_INFORMATION_H */

Generated on Mon Jul 10 19:45:29 2006 for Phoenix OSFS by  doxygen 1.4.2