changed: auto add updateData callback to stages so that stagedata can be updated...
[opensg.git] / Source / WindowSystem / EGL / OSGEGLWindowBase.h
blob53756d87b767d9e09afb8bba078662d2c59725df
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2006 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
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. *
18 * *
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. *
23 * *
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. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 /*****************************************************************************\
40 *****************************************************************************
41 ** **
42 ** This file is automatically generated. **
43 ** **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
46 ** **
47 ** Do not change this file, changes should be done in the derived **
48 ** class EGLWindow
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGEGLWINDOWBASE_H_
55 #define _OSGEGLWINDOWBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
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"
72 OSG_BEGIN_NAMESPACE
74 class EGLWindow;
76 //! \brief EGLWindow Base Class.
78 class OSG_WINDOWEGL_DLLMAPPING EGLWindowBase : public Window
80 public:
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 =================================*/
92 public:
94 enum
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 */
117 /*! \{ */
119 static FieldContainerType &getClassType (void);
120 static UInt32 getClassTypeId (void);
121 static UInt16 getClassGroupId(void);
123 /*! \} */
124 /*---------------------------------------------------------------------*/
125 /*! \name FieldContainer Get */
126 /*! \{ */
128 virtual FieldContainerType &getType (void);
129 virtual const FieldContainerType &getType (void) const;
131 virtual UInt32 getContainerSize(void) const;
133 /*! \} */
134 /*---------------------------------------------------------------------*/
135 /*! \name Field Get */
136 /*! \{ */
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;
158 /*! \} */
159 /*---------------------------------------------------------------------*/
160 /*! \name Field Set */
161 /*! \{ */
163 void setDisplay (const EGLDisplay &value);
164 void setWindow (const EGLSurface &value);
165 void setContext (const EGLContext &value);
167 /*! \} */
168 /*---------------------------------------------------------------------*/
169 /*! \name Ptr MField Set */
170 /*! \{ */
172 /*! \} */
173 /*---------------------------------------------------------------------*/
174 /*! \name Binary Access */
175 /*! \{ */
177 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
178 virtual void copyToBin (BinaryDataHandler &pMem,
179 ConstFieldMaskArg whichField);
180 virtual void copyFromBin(BinaryDataHandler &pMem,
181 ConstFieldMaskArg whichField);
184 /*! \} */
185 /*---------------------------------------------------------------------*/
186 /*! \name Construction */
187 /*! \{ */
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);
200 /*! \} */
201 /*---------------------------------------------------------------------*/
202 /*! \name Copy */
203 /*! \{ */
205 virtual FieldContainerTransitPtr shallowCopy (void) const;
206 virtual FieldContainerTransitPtr shallowCopyLocal(
207 BitVector bFlags = FCLocal::All) const;
208 virtual FieldContainerTransitPtr shallowCopyDependent(
209 BitVector bFlags) const;
211 /*! \} */
212 /*========================= PROTECTED ===============================*/
214 protected:
216 static TypeObject _type;
218 static void classDescInserter(TypeObject &oType);
219 static const Char8 *getClassname (void );
221 /*---------------------------------------------------------------------*/
222 /*! \name Fields */
223 /*! \{ */
225 SFEGLDisplay _sfDisplay;
226 SFEGLSurface _sfWindow;
227 SFEGLContext _sfContext;
229 /*! \} */
230 /*---------------------------------------------------------------------*/
231 /*! \name Constructors */
232 /*! \{ */
234 EGLWindowBase(void);
235 EGLWindowBase(const EGLWindowBase &source);
237 /*! \} */
238 /*---------------------------------------------------------------------*/
239 /*! \name Destructors */
240 /*! \{ */
242 virtual ~EGLWindowBase(void);
244 /*! \} */
245 /*---------------------------------------------------------------------*/
246 /*! \name onCreate */
247 /*! \{ */
250 /*! \} */
251 /*---------------------------------------------------------------------*/
252 /*! \name Generic Field Access */
253 /*! \{ */
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);
262 /*! \} */
263 /*---------------------------------------------------------------------*/
264 /*! \name Sync */
265 /*! \{ */
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);
279 #endif
281 /*! \} */
282 /*---------------------------------------------------------------------*/
283 /*! \name Edit */
284 /*! \{ */
286 /*! \} */
287 /*---------------------------------------------------------------------*/
288 /*! \name Aspect Create */
289 /*! \{ */
291 #ifdef OSG_MT_CPTR_ASPECT
292 virtual FieldContainer *createAspectCopy(
293 const FieldContainer *pRefAspect) const;
294 #endif
296 /*! \} */
297 /*---------------------------------------------------------------------*/
298 /*! \name Edit */
299 /*! \{ */
300 /*! \} */
301 /*---------------------------------------------------------------------*/
302 /*! \name Sync */
303 /*! \{ */
305 virtual void resolveLinks(void);
307 /*! \} */
308 /*========================== PRIVATE ================================*/
310 private:
311 /*---------------------------------------------------------------------*/
313 // prohibit default functions (move to 'public' if you need one)
314 void operator =(const EGLWindowBase &source);
317 typedef EGLWindowBase *EGLWindowBaseP;
319 OSG_END_NAMESPACE
321 #endif /* _OSGEGLWINDOWBASE_H_ */