00001 #ifndef __RE_EGLWindow_h__
00002 #define __RE_EGLWindow_h__
00003
00004 #include "RE_API.h"
00005 #include "RE_Types.h"
00006 #include "RE_Window.h"
00007 #include "RE_EGLServer.h"
00008
00009 class RE_EGLVisual;
00010 class RE_EGLServer;
00011
00012 class RE_API RE_EGLWindow : public RE_Window
00013 {
00014 public:
00015 RE_EGLWindow(RE_Server *newserver,
00016 RE_WindowType wintype = RE_WINDOW_NORMAL,
00017 RE_VisualType visType = RE_NORMAL_VIS,
00018 RE_WindowVisibility doOffScreen = RE_WINDOW_VISIBLE);
00019
00020 virtual ~RE_EGLWindow();
00021
00022
00023 virtual OGLDrawable getGraphicsDrawable()
00024 { return static_cast<OGLDrawable>(myWindowID); }
00025 virtual OGLDrawable getAlternateDrawable()
00026 { return static_cast<OGLDrawable>(myWindowID); }
00027
00028 virtual RE_IDType getBufferID() const { return (RE_IDType)myWindowID; }
00029
00030 virtual void initMaxSize( short w, short h );
00031 virtual void initMinSize( short w, short h );
00032 virtual void initClass( char *name, char *rclass );
00033 virtual void setName(const char *name);
00034 virtual void setIconName(const char *name);
00035
00036 virtual void reparentWindow( RE_Window *newParent );
00037
00038 virtual void resizeWindow( short w, short h );
00039 virtual void moveWindow( short x, short y, int force = 1 );
00040 virtual void sizeWindow( short w, short h, int force = 1 );
00041 virtual void moveAndSizeWindow(short x, short y, short w, short h,
00042 int force = 1);
00043
00044
00045
00046 virtual void maximizeWindow();
00047 virtual void fullscreenWindow(bool state);
00048
00049 virtual short getX() const;
00050 virtual short getY() const;
00051 virtual short getW() const;
00052 virtual short getH() const;
00053
00054 virtual void lowerWindow();
00055 virtual void raiseWindow();
00056
00057 virtual void findLocation(short *x, short *y, short *w, short *h,
00058 char topMostParent = 0);
00059
00060 virtual RE_IDType openWindow( int isMain = 0, int show = 1);
00061 virtual void showWindow();
00062 virtual void closeWindow();
00063
00064 RE_IDType openRealWindow(int show);
00065 RE_IDType openPixmapWindow();
00066
00067 void closeRealWindow();
00068 void closePixmapWindow();
00069
00070 virtual bool makeCurrent(bool &needs_initialization);
00071 virtual void unmakeCurrent();
00072
00073 int isChild() const
00074 { return myWindowType == RE_WINDOW_CHILD; }
00075
00076 const RE_EGLServer *eglServer() const
00077 { return static_cast<const RE_EGLServer *>(myServer); }
00078 RE_EGLServer *eglServer()
00079 { return static_cast<RE_EGLServer *>(myServer); }
00080
00081 RE_EGLVisual *getVisual() { return myVisual; }
00082
00083 virtual void setWindowAlwaysOnTop(bool newstate);
00084
00085 static RE_IDType getWindowWithFocusLock();
00086 virtual void grabWindowFocusLock(bool pointer_too);
00087 virtual void releaseWindowFocusLock();
00088
00089 virtual RE_IDType getParentOfTransient();
00090 virtual void setParentOfTransient(RE_IDType transient);
00091
00092 RE_OGLContext getContext() { return myContext; }
00093
00094 protected:
00095 RE_EGLVisual *myVisual;
00096 EGLContext myContext;
00097 EGLSurface myWindowID;
00098 int myWidth;
00099 int myHeight;
00100 };
00101
00102 #endif