00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Mike Taylor 00008 * Side Effects 00009 * 123 Front Street West, Suite 1401 00010 * Toronto, Ontario 00011 * Canada M5J 2M2 00012 * 416-504-9876 00013 * 00014 * NAME: RE_OSXServer.h (C++) 00015 * 00016 * COMMENTS: 00017 * Window server abstraction interface for basic session interaction. 00018 */ 00019 #ifndef __RE_OSXServer__ 00020 #define __RE_OSXServer__ 00021 00022 #include "RE_API.h" 00023 #include "RE_Types.h" 00024 #include "RE_Server.h" 00025 00026 #include <UT/UT_RefArray.h> 00027 00028 class RE_API RE_OSXServer : public RE_Server 00029 { 00030 public: 00031 RE_OSXServer(); 00032 virtual ~RE_OSXServer(); 00033 00034 virtual char initServer(char *data); 00035 virtual void flush() const; 00036 00037 virtual bool windowUnderCursor(RE_IDType, int x, int y); 00038 virtual bool getColorUnderCursor(float color[3]); 00039 00040 #ifdef PLATFORM_OPEN_GL 00041 virtual short getWidth() const; 00042 virtual short getHeight() const; 00043 virtual short getWidthMM() const; 00044 virtual short getHeightMM() const; 00045 virtual bool GLMakeCurrent( OGLDrawable draw, 00046 RE_OGLContext context ); 00047 virtual int GLMakeCopyCurrent( OGLDrawable draw, 00048 RE_OGLContext sourceContext, 00049 RE_OGLContext targetContext ); 00050 virtual void GLSwapBuffers(RE_Window *currentWindow); 00051 virtual OGLDrawable GLGetCurrentDrawable(); 00052 virtual void GLWaitGL(); 00053 #endif 00054 00055 virtual UT_DimRect getWorkArea(); 00056 00057 /// Pack the dimensions of the screens visible to the user into array 00058 bool getDimensionsOfScreensAndWorkAreas( 00059 UT_RefArray<UT_DimRect> &screen_array, 00060 UT_RefArray<UT_DimRect> &work_area_array, 00061 short & virtual_width, short & virtual_height ); 00062 00063 // Access to OS X OpenGL functionality that 00064 // is not exported as a gl function 00065 static void setSwapInterrupt(int swap); 00066 }; 00067 00068 #endif
1.5.9