1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2006 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 /*****************************************************************************\
40 *****************************************************************************
42 ** This file is automatically generated. **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
47 ** Do not change this file, changes should be done in the derived **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGEGLWINDOWBASE_H_
55 #define _OSGEGLWINDOWBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGWindowEGLDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGWindow.h" // Parent
68 #include "OSGEGLWindowDataFields.h" // Display type
70 #include "OSGEGLWindowFields.h"
76 //! \brief EGLWindow Base Class.
78 class OSG_WINDOWEGL_DLLMAPPING EGLWindowBase
: public Window
82 typedef Window Inherited
;
83 typedef Window ParentContainer
;
85 typedef Inherited::TypeObject TypeObject
;
86 typedef TypeObject::InitPhase InitPhase
;
88 OSG_GEN_INTERNALPTR(EGLWindow
);
90 /*========================== PUBLIC =================================*/
96 DisplayFieldId
= Inherited::NextFieldId
,
97 WindowFieldId
= DisplayFieldId
+ 1,
98 ContextFieldId
= WindowFieldId
+ 1,
99 NextFieldId
= ContextFieldId
+ 1
102 static const OSG::BitVector DisplayFieldMask
=
103 (TypeTraits
<BitVector
>::One
<< DisplayFieldId
);
104 static const OSG::BitVector WindowFieldMask
=
105 (TypeTraits
<BitVector
>::One
<< WindowFieldId
);
106 static const OSG::BitVector ContextFieldMask
=
107 (TypeTraits
<BitVector
>::One
<< ContextFieldId
);
108 static const OSG::BitVector NextFieldMask
=
109 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
111 typedef SFEGLDisplay SFDisplayType
;
112 typedef SFEGLSurface SFWindowType
;
113 typedef SFEGLContext SFContextType
;
115 /*---------------------------------------------------------------------*/
116 /*! \name Class Get */
119 static FieldContainerType
&getClassType (void);
120 static UInt32
getClassTypeId (void);
121 static UInt16
getClassGroupId(void);
124 /*---------------------------------------------------------------------*/
125 /*! \name FieldContainer Get */
128 virtual FieldContainerType
&getType (void);
129 virtual const FieldContainerType
&getType (void) const;
131 virtual UInt32
getContainerSize(void) const;
134 /*---------------------------------------------------------------------*/
135 /*! \name Field Get */
139 SFEGLDisplay
*editSFDisplay (void);
140 const SFEGLDisplay
*getSFDisplay (void) const;
142 SFEGLSurface
*editSFWindow (void);
143 const SFEGLSurface
*getSFWindow (void) const;
145 SFEGLContext
*editSFContext (void);
146 const SFEGLContext
*getSFContext (void) const;
149 EGLDisplay
&editDisplay (void);
150 const EGLDisplay
&getDisplay (void) const;
152 EGLSurface
&editWindow (void);
153 const EGLSurface
&getWindow (void) const;
155 EGLContext
&editContext (void);
156 const EGLContext
&getContext (void) const;
159 /*---------------------------------------------------------------------*/
160 /*! \name Field Set */
163 void setDisplay (const EGLDisplay
&value
);
164 void setWindow (const EGLSurface
&value
);
165 void setContext (const EGLContext
&value
);
168 /*---------------------------------------------------------------------*/
169 /*! \name Ptr MField Set */
173 /*---------------------------------------------------------------------*/
174 /*! \name Binary Access */
177 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
178 virtual void copyToBin (BinaryDataHandler
&pMem
,
179 ConstFieldMaskArg whichField
);
180 virtual void copyFromBin(BinaryDataHandler
&pMem
,
181 ConstFieldMaskArg whichField
);
185 /*---------------------------------------------------------------------*/
186 /*! \name Construction */
189 static EGLWindowTransitPtr
create (void);
190 static EGLWindow
*createEmpty (void);
192 static EGLWindowTransitPtr
createLocal (
193 BitVector bFlags
= FCLocal::All
);
195 static EGLWindow
*createEmptyLocal(
196 BitVector bFlags
= FCLocal::All
);
198 static EGLWindowTransitPtr
createDependent (BitVector bFlags
);
201 /*---------------------------------------------------------------------*/
205 virtual FieldContainerTransitPtr
shallowCopy (void) const;
206 virtual FieldContainerTransitPtr
shallowCopyLocal(
207 BitVector bFlags
= FCLocal::All
) const;
208 virtual FieldContainerTransitPtr
shallowCopyDependent(
209 BitVector bFlags
) const;
212 /*========================= PROTECTED ===============================*/
216 static TypeObject _type
;
218 static void classDescInserter(TypeObject
&oType
);
219 static const Char8
*getClassname (void );
221 /*---------------------------------------------------------------------*/
225 SFEGLDisplay _sfDisplay
;
226 SFEGLSurface _sfWindow
;
227 SFEGLContext _sfContext
;
230 /*---------------------------------------------------------------------*/
231 /*! \name Constructors */
235 EGLWindowBase(const EGLWindowBase
&source
);
238 /*---------------------------------------------------------------------*/
239 /*! \name Destructors */
242 virtual ~EGLWindowBase(void);
245 /*---------------------------------------------------------------------*/
246 /*! \name onCreate */
251 /*---------------------------------------------------------------------*/
252 /*! \name Generic Field Access */
255 GetFieldHandlePtr
getHandleDisplay (void) const;
256 EditFieldHandlePtr
editHandleDisplay (void);
257 GetFieldHandlePtr
getHandleWindow (void) const;
258 EditFieldHandlePtr
editHandleWindow (void);
259 GetFieldHandlePtr
getHandleContext (void) const;
260 EditFieldHandlePtr
editHandleContext (void);
263 /*---------------------------------------------------------------------*/
267 #ifdef OSG_MT_CPTR_ASPECT
268 virtual void execSyncV( FieldContainer
&oFrom
,
269 ConstFieldMaskArg whichField
,
270 AspectOffsetStore
&oOffsets
,
271 ConstFieldMaskArg syncMode
,
272 const UInt32 uiSyncInfo
);
274 void execSync ( EGLWindowBase
*pFrom
,
275 ConstFieldMaskArg whichField
,
276 AspectOffsetStore
&oOffsets
,
277 ConstFieldMaskArg syncMode
,
278 const UInt32 uiSyncInfo
);
282 /*---------------------------------------------------------------------*/
287 /*---------------------------------------------------------------------*/
288 /*! \name Aspect Create */
291 #ifdef OSG_MT_CPTR_ASPECT
292 virtual FieldContainer
*createAspectCopy(
293 const FieldContainer
*pRefAspect
) const;
297 /*---------------------------------------------------------------------*/
301 /*---------------------------------------------------------------------*/
305 virtual void resolveLinks(void);
308 /*========================== PRIVATE ================================*/
311 /*---------------------------------------------------------------------*/
313 // prohibit default functions (move to 'public' if you need one)
314 void operator =(const EGLWindowBase
&source
);
317 typedef EGLWindowBase
*EGLWindowBaseP
;
321 #endif /* _OSGEGLWINDOWBASE_H_ */