00001 /*************************************************************************** 00002 LibUFO - UI For OpenGL 00003 copyright : (C) 2001-2005 by Johannes Schmidt 00004 email : schmidtjf at users.sourceforge.net 00005 ------------------- 00006 00007 file : include/ufo/usysteminfo.hpp 00008 begin : Mon Mar 31 2003 00009 $Id: usysteminfo.hpp,v 1.4 2005/02/13 17:49:31 schmidtjf Exp $ 00010 ***************************************************************************/ 00011 00012 /*************************************************************************** 00013 * This library is free software; you can redistribute it and/or * 00014 * modify it under the terms of the GNU Lesser General Public * 00015 * License as published by the Free Software Foundation; either * 00016 * version 2.1 of the License, or (at your option) any later version. * 00017 * * 00018 * This library is distributed in the hope that it will be useful, * 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00021 * Lesser General Public License for more details. * 00022 * * 00023 * You should have received a copy of the GNU Lesser General Public * 00024 * License along with this library; if not, write to the Free Software * 00025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 00026 ***************************************************************************/ 00027 00028 #ifndef UFO_SYSTEMINFO_HPP 00029 #define UFO_SYSTEMINFO_HPP 00030 00031 // This file describes system specific information which can be retained 00032 // by a UFO context via UContext::getSystemInfo() const; 00033 00034 // Backends may overwrite this system info by using their own system info 00035 // header 00036 // They should however do this in a "binary compatible way", i.e. keep 00037 // the order of the struct 00038 00039 // the version info attribute should be filled by the user so that the ufo 00040 // implementation can decide which attributes should be filled 00041 00042 // e.g.: 00043 // USystemInfo info 00044 // UFO_VERSION(&info.version) 00045 // context->getSystemInfo(&info) 00046 00047 00048 #if defined(UFO_GFX_X11) 00049 00050 #include <X11/Xlib.h> 00051 #include <GL/gl.h> 00052 #include <GL/glu.h> 00053 #include <GL/glx.h> 00054 00055 namespace ufo { 00056 struct USystemInfo { 00057 Window window; 00058 GLXContext glContext; 00059 Display * display; 00060 }; 00061 } // namespace ufo 00062 00063 #elif defined(UFO_GFX_WIN32) 00064 00065 #define WIN32_LEAN_AND_MEAN 00066 #include <windows.h> 00067 00068 namespace ufo { 00069 struct USystemInfo { 00070 HWND window; 00071 HGLRC glContext; 00072 }; 00073 } // namespace ufo 00074 00075 #else // unknown system 00076 00077 namespace ufo { 00078 struct USystemInfo { 00079 void * data; 00080 }; 00081 } // namespace ufo 00082 00083 #endif 00084 00085 00086 #endif // UFO_SYSTEMINFO_HPP