Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

x11_resolution.h

Go to the documentation of this file.
00001 /*
00002         $Id: x11_resolution.h,v 1.1 2001/03/06 15:09:19 mbn Exp $
00003 
00004         ------------------------------------------------------------------------
00005         ClanLib, the platform independent game SDK.
00006 
00007         This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
00008         version 2. See COPYING for details.
00009 
00010         For a total list of contributers see CREDITS.
00011 
00012         ------------------------------------------------------------------------
00013 */
00014 
00015 #ifndef header_x11resolution
00016 #define header_x11resolution
00017 
00018 #ifdef USE_X11
00019 
00020 #include <X11/Xlib.h>
00021 #include <X11/Xutil.h>
00022 #ifdef USE_VIDMODE
00023 #include <X11/extensions/xf86vmode.h>
00024 #endif
00025 
00026 class CL_X11Resolution
00027 {
00028 public:
00029         CL_X11Resolution(Display *dpy, int scr);
00030         ~CL_X11Resolution();
00031         
00032         void set_mode(int width, int height);
00033         void restore_mode();
00034 
00035         int get_width() const;
00036         int get_height() const;
00037 
00038 private:
00039 #ifdef USE_VIDMODE
00040         XF86VidModeModeInfo get_best_mode(int width, int height);
00041 
00042         XF86VidModeModeInfo orig_mode;
00043 #endif
00044         Display *dpy;
00045         int scr;
00046         
00047         bool mode_set;
00048         struct
00049         {
00050                 int x,y;
00051         } orig_view;
00052         
00053         int cur_width, cur_height;
00054         bool has_vidmode_extension;
00055 };
00056 
00057 #endif
00058 #endif

Generated at Wed Apr 4 19:54:04 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001