1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGXWINDOWDATAFIELDS_H_
40 #define _OSGXWINDOWDATAFIELDS_H_
45 typedef struct __GLXcontextRec
*GLXContext
;
46 typedef struct _XDisplay Display
;
48 #include "OSGConfig.h"
50 #include "OSGWindowXDef.h"
52 #include "OSGBaseTypes.h"
53 #include "OSGFieldTraits.h"
57 /*! \ingroup GrpWindowXFieldTraits
60 typedef ::Display
*DisplayP
;
62 /*! \ingroup GrpWindowXFieldTraits
64 typedef unsigned long X11Window
;
66 /*! \ingroup GrpWindowXFieldTraits
67 \ingroup GrpLibOSGWindowX
71 struct FieldTraits
<DisplayP
, 2> :
72 public FieldTraitsPtrToStringTemplateBase
<DisplayP
, 2>
74 static DataType _type
;
75 typedef FieldTraits
<DisplayP
, 2> Self
;
77 enum { Convertible
= (Self::ToStringConvertible
|
78 Self::FromStringConvertible
)};
80 static DataType
&getType (void) { return _type
; }
82 static const Char8
*getSName(void) { return "SFDisplayP"; }
83 static const Char8
*getMName(void) { return "MFDisplayP"; }
85 static bool getFromCString( DisplayP
&display
,
93 static void putToString (const DisplayP
&,
96 outStr
.assign("DisplayP");
101 #if ( !defined(__GNUC__) || !defined(__linux) || ( !defined(__ia64) && !defined(__x86_64) && !defined(_ARCH_PPC64)) ) && (!defined(_MIPS_SZPTR) || _MIPS_SZPTR != 64)
103 /*! \ingroup GrpWindowXFieldTraits
104 \ingroup GrpLibOSGWindowX
108 struct FieldTraits
<X11Window
, 2> :
109 public FieldTraitsPtrToStringTemplateBase
<X11Window
, 2>
111 static DataType _type
;
112 typedef FieldTraits
<X11Window
, 2> Self
;
114 enum { Convertible
= (Self::ToStringConvertible
|
115 Self::FromStringConvertible
)};
117 static DataType
&getType (void) { return _type
; }
119 static const Char8
*getSName(void) { return "SFX11Window"; }
120 static const Char8
*getMName(void) { return "MFX11Window"; }
122 static bool getFromCString( X11Window
&window
,
130 static void putToString (const X11Window
&,
133 outStr
.assign("X11Window");
138 /*! \ingroup GrpWindowXFieldTraits
139 \ingroup GrpLibOSGWindowX
143 struct FieldTraits
<GLXContext
, 2> :
144 public FieldTraitsPtrToStringTemplateBase
<GLXContext
, 2>
146 static DataType _type
;
147 typedef FieldTraits
<GLXContext
, 2> Self
;
149 enum { Convertible
= (Self::ToStringConvertible
|
150 Self::FromStringConvertible
)};
152 static DataType
&getType (void) { return _type
; }
154 static const Char8
*getSName(void) { return "SFGLXContext"; }
155 static const Char8
*getMName(void) { return "MFGLXContext"; }
157 static bool getFromCString( GLXContext
&context
,
165 static void putToString (const GLXContext
&,
168 outStr
.assign("GLXContext");
172 #ifndef DOXYGEN_SHOULD_SKIP_THIS
173 /*! \ingroup GrpWindowXFieldSFields */
174 typedef SField
<DisplayP
, 2> SFDisplayP
;
176 /*! \ingroup GrpWindowXFieldMFields */
177 typedef MField
<DisplayP
, 2> MFDisplayP
;
179 #if ( !defined(__GNUC__) || !defined(__linux) || ( !defined(__ia64) && !defined(__x86_64) && !defined(_ARCH_PPC64)) ) && (!defined(_MIPS_SZPTR) || _MIPS_SZPTR != 64)
181 /*! \ingroup GrpWindowXFieldSFields */
182 typedef SField
<X11Window
, 2> SFX11Window
;
184 /*! \ingroup GrpWindowXFieldMFields */
185 typedef MField
<X11Window
, 2> MFX11Window
;
189 /*! \ingroup GrpWindowXFieldSFields */
190 typedef SField
<UInt64
> SFX11Window
;
192 /*! \ingroup GrpWindowXFieldMFields */
193 typedef MField
<UInt64
> MFX11Window
;
197 /*! \ingroup GrpWindowXFieldSFields */
198 typedef SField
<GLXContext
, 2> SFGLXContext
;
200 /*! \ingroup GrpWindowXFieldMFields */
201 typedef MField
<GLXContext
, 2> MFGLXContext
;
202 #else // doxygen hacks
203 /*! \ingroup GrpWindowXFieldSFields */
204 struct SFDisplayP
: public SField
<DisplayP
, 2> {};
206 /*! \ingroup GrpWindowXFieldMFields */
207 struct MFDisplayP
: public MField
<DisplayP
, 2> {};
209 #if ( !defined(__GNUC__) || !defined(__linux) || ( !defined(__ia64) && !defined(__x86_64) && !defined(_ARCH_PPC64)) ) && (!defined(_MIPS_SZPTR) || _MIPS_SZPTR != 64)
211 /*! \ingroup GrpWindowXFieldSFields */
212 struct SFX11Window
: public SField
<X11Window
, 2> {};
214 /*! \ingroup GrpWindowXFieldMFields */
215 struct MFX11Window
: public MField
<X11Window
, 2> {};
219 /*! \ingroup GrpWindowXFieldSFields */
220 struct SFX11Window
: public SField
<UInt64
> {};
222 /*! \ingroup GrpWindowXFieldMFields */
223 struct MFX11Window
: public MField
<UInt64
> {};
227 /*! \ingroup GrpWindowXFieldSFields */
228 struct SFGLXContext
: public SField
<GLXContext
, 2> {};
230 /*! \ingroup GrpWindowXFieldMFields */
231 struct MFGLXContext
: public MField
<GLXContext
, 2> {};
238 #endif /* _OSGXWINDOWDATAFIELDS_H_ */