Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

better support for multiple displays on os x

  • Loading branch information...
commit 286ebbd825ecfcd89919295a2453296a5d49b451 1 parent 30bd2ae
Philip Whitfield authored
54 example/ofxFensterExample.xcodeproj/project.pbxproj
View
@@ -7,8 +7,6 @@
objects = {
/* Begin PBXBuildFile section */
- 48D0339813AE3F4600FFC1C5 /* ofxFenster.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 48D0332B13AE3F4600FFC1C5 /* ofxFenster.cpp */; };
- 48D0339913AE3F4600FFC1C5 /* ofxFensterManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 48D0332D13AE3F4600FFC1C5 /* ofxFensterManager.cpp */; };
E4328149138ABC9F0047C5CB /* openFrameworksDebug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4328148138ABC890047C5CB /* openFrameworksDebug.a */; };
E45BE97C0E8CC7DD009D7055 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */; };
E45BE97D0E8CC7DD009D7055 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */; };
@@ -23,8 +21,11 @@
E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424610CC5A17004149E2 /* IOKit.framework */; };
FA2780BF13D8526600AD75E1 /* libGhost32.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FA2780BE13D8526600AD75E1 /* libGhost32.a */; };
FA37630913D862BC00E7EBDE /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA37630813D862BC00E7EBDE /* OpenGL.framework */; };
- FAB311C81434CCF60063589B /* ofxDisplayManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAB311C71434CCF60063589B /* ofxDisplayManager.cpp */; };
- FAB311CD1434CDA70063589B /* ofxDisplay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAB311CC1434CDA70063589B /* ofxDisplay.cpp */; };
+ FAEF86BB146D8B890019AD26 /* ofxDisplay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAEF86B1146D8B890019AD26 /* ofxDisplay.cpp */; };
+ FAEF86BC146D8B890019AD26 /* ofxDisplayManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAEF86B4146D8B890019AD26 /* ofxDisplayManager.cpp */; };
+ FAEF86BD146D8B890019AD26 /* ofxDisplayManagerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = FAEF86B6146D8B890019AD26 /* ofxDisplayManagerMac.mm */; };
+ FAEF86BE146D8B890019AD26 /* ofxFenster.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAEF86B7146D8B890019AD26 /* ofxFenster.cpp */; };
+ FAEF86BF146D8B890019AD26 /* ofxFensterManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAEF86B9146D8B890019AD26 /* ofxFensterManager.cpp */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -67,10 +68,6 @@
48D032E913AE3F4600FFC1C5 /* GHOST_Path-api.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GHOST_Path-api.h"; sourceTree = "<group>"; };
48D032EA13AE3F4600FFC1C5 /* GHOST_Rect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GHOST_Rect.h; sourceTree = "<group>"; };
48D032EB13AE3F4600FFC1C5 /* GHOST_Types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GHOST_Types.h; sourceTree = "<group>"; };
- 48D0332B13AE3F4600FFC1C5 /* ofxFenster.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxFenster.cpp; sourceTree = "<group>"; };
- 48D0332C13AE3F4600FFC1C5 /* ofxFenster.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxFenster.h; sourceTree = "<group>"; };
- 48D0332D13AE3F4600FFC1C5 /* ofxFensterManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxFensterManager.cpp; sourceTree = "<group>"; };
- 48D0332E13AE3F4600FFC1C5 /* ofxFensterManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxFensterManager.h; sourceTree = "<group>"; };
E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = openFrameworksLib.xcodeproj; path = ../../../libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj; sourceTree = SOURCE_ROOT; };
E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<absolute>"; };
@@ -91,10 +88,16 @@
FA2780BD13D8524F00AD75E1 /* STR_String.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STR_String.h; sourceTree = "<group>"; };
FA2780BE13D8526600AD75E1 /* libGhost32.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libGhost32.a; path = ../../../addons/ofxFenster/libs/ghost/lib/osx32/libGhost32.a; sourceTree = SOURCE_ROOT; };
FA37630813D862BC00E7EBDE /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
- FAB311C61434CCF60063589B /* ofxDisplayManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxDisplayManager.h; sourceTree = "<group>"; };
- FAB311C71434CCF60063589B /* ofxDisplayManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxDisplayManager.cpp; sourceTree = "<group>"; };
- FAB311CB1434CDA70063589B /* ofxDisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxDisplay.h; sourceTree = "<group>"; };
- FAB311CC1434CDA70063589B /* ofxDisplay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxDisplay.cpp; sourceTree = "<group>"; };
+ FAEF86B1146D8B890019AD26 /* ofxDisplay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ofxDisplay.cpp; path = ../src/ofxDisplay.cpp; sourceTree = SOURCE_ROOT; };
+ FAEF86B2146D8B890019AD26 /* ofxDisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ofxDisplay.h; path = ../src/ofxDisplay.h; sourceTree = SOURCE_ROOT; };
+ FAEF86B3146D8B890019AD26 /* ofxDisplayMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ofxDisplayMac.h; path = ../src/ofxDisplayMac.h; sourceTree = SOURCE_ROOT; };
+ FAEF86B4146D8B890019AD26 /* ofxDisplayManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ofxDisplayManager.cpp; path = ../src/ofxDisplayManager.cpp; sourceTree = SOURCE_ROOT; };
+ FAEF86B5146D8B890019AD26 /* ofxDisplayManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ofxDisplayManager.h; path = ../src/ofxDisplayManager.h; sourceTree = SOURCE_ROOT; };
+ FAEF86B6146D8B890019AD26 /* ofxDisplayManagerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ofxDisplayManagerMac.mm; path = ../src/ofxDisplayManagerMac.mm; sourceTree = SOURCE_ROOT; };
+ FAEF86B7146D8B890019AD26 /* ofxFenster.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ofxFenster.cpp; path = ../src/ofxFenster.cpp; sourceTree = SOURCE_ROOT; };
+ FAEF86B8146D8B890019AD26 /* ofxFenster.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ofxFenster.h; path = ../src/ofxFenster.h; sourceTree = SOURCE_ROOT; };
+ FAEF86B9146D8B890019AD26 /* ofxFensterManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ofxFensterManager.cpp; path = ../src/ofxFensterManager.cpp; sourceTree = SOURCE_ROOT; };
+ FAEF86BA146D8B890019AD26 /* ofxFensterManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ofxFensterManager.h; path = ../src/ofxFensterManager.h; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -168,14 +171,16 @@
48D0332A13AE3F4600FFC1C5 /* src */ = {
isa = PBXGroup;
children = (
- 48D0332B13AE3F4600FFC1C5 /* ofxFenster.cpp */,
- 48D0332C13AE3F4600FFC1C5 /* ofxFenster.h */,
- 48D0332D13AE3F4600FFC1C5 /* ofxFensterManager.cpp */,
- 48D0332E13AE3F4600FFC1C5 /* ofxFensterManager.h */,
- FAB311C61434CCF60063589B /* ofxDisplayManager.h */,
- FAB311C71434CCF60063589B /* ofxDisplayManager.cpp */,
- FAB311CB1434CDA70063589B /* ofxDisplay.h */,
- FAB311CC1434CDA70063589B /* ofxDisplay.cpp */,
+ FAEF86B1146D8B890019AD26 /* ofxDisplay.cpp */,
+ FAEF86B2146D8B890019AD26 /* ofxDisplay.h */,
+ FAEF86B3146D8B890019AD26 /* ofxDisplayMac.h */,
+ FAEF86B4146D8B890019AD26 /* ofxDisplayManager.cpp */,
+ FAEF86B5146D8B890019AD26 /* ofxDisplayManager.h */,
+ FAEF86B6146D8B890019AD26 /* ofxDisplayManagerMac.mm */,
+ FAEF86B7146D8B890019AD26 /* ofxFenster.cpp */,
+ FAEF86B8146D8B890019AD26 /* ofxFenster.h */,
+ FAEF86B9146D8B890019AD26 /* ofxFensterManager.cpp */,
+ FAEF86BA146D8B890019AD26 /* ofxFensterManager.h */,
);
path = src;
sourceTree = "<group>";
@@ -363,10 +368,11 @@
files = (
E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */,
E4B69E210A3A1BDC003C02F2 /* testApp.cpp in Sources */,
- 48D0339813AE3F4600FFC1C5 /* ofxFenster.cpp in Sources */,
- 48D0339913AE3F4600FFC1C5 /* ofxFensterManager.cpp in Sources */,
- FAB311C81434CCF60063589B /* ofxDisplayManager.cpp in Sources */,
- FAB311CD1434CDA70063589B /* ofxDisplay.cpp in Sources */,
+ FAEF86BB146D8B890019AD26 /* ofxDisplay.cpp in Sources */,
+ FAEF86BC146D8B890019AD26 /* ofxDisplayManager.cpp in Sources */,
+ FAEF86BD146D8B890019AD26 /* ofxDisplayManagerMac.mm in Sources */,
+ FAEF86BE146D8B890019AD26 /* ofxFenster.cpp in Sources */,
+ FAEF86BF146D8B890019AD26 /* ofxFensterManager.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
113 exampleMultipleGraphicCards/ofxFensterExample.xcodeproj/project.pbxproj
View
@@ -23,6 +23,7 @@
E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424610CC5A17004149E2 /* IOKit.framework */; };
FA2780BF13D8526600AD75E1 /* libGhost32.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FA2780BE13D8526600AD75E1 /* libGhost32.a */; };
FA37630913D862BC00E7EBDE /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA37630813D862BC00E7EBDE /* OpenGL.framework */; };
+ FA6584D9146D60BC00D8A9AE /* ofxDisplayManagerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA6584D8146D60BC00D8A9AE /* ofxDisplayManagerMac.mm */; };
FAB311C81434CCF60063589B /* ofxDisplayManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAB311C71434CCF60063589B /* ofxDisplayManager.cpp */; };
FAB311CD1434CDA70063589B /* ofxDisplay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAB311CC1434CDA70063589B /* ofxDisplay.cpp */; };
/* End PBXBuildFile section */
@@ -57,16 +58,6 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
- 48D032E213AE3F4600FFC1C5 /* GHOST_C-api.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GHOST_C-api.h"; sourceTree = "<group>"; };
- 48D032E313AE3F4600FFC1C5 /* GHOST_IEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GHOST_IEvent.h; sourceTree = "<group>"; };
- 48D032E413AE3F4600FFC1C5 /* GHOST_IEventConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GHOST_IEventConsumer.h; sourceTree = "<group>"; };
- 48D032E513AE3F4600FFC1C5 /* GHOST_ISystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GHOST_ISystem.h; sourceTree = "<group>"; };
- 48D032E613AE3F4600FFC1C5 /* GHOST_ISystemPaths.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GHOST_ISystemPaths.h; sourceTree = "<group>"; };
- 48D032E713AE3F4600FFC1C5 /* GHOST_ITimerTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GHOST_ITimerTask.h; sourceTree = "<group>"; };
- 48D032E813AE3F4600FFC1C5 /* GHOST_IWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GHOST_IWindow.h; sourceTree = "<group>"; };
- 48D032E913AE3F4600FFC1C5 /* GHOST_Path-api.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GHOST_Path-api.h"; sourceTree = "<group>"; };
- 48D032EA13AE3F4600FFC1C5 /* GHOST_Rect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GHOST_Rect.h; sourceTree = "<group>"; };
- 48D032EB13AE3F4600FFC1C5 /* GHOST_Types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GHOST_Types.h; sourceTree = "<group>"; };
48D0332B13AE3F4600FFC1C5 /* ofxFenster.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxFenster.cpp; sourceTree = "<group>"; };
48D0332C13AE3F4600FFC1C5 /* ofxFenster.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxFenster.h; sourceTree = "<group>"; };
48D0332D13AE3F4600FFC1C5 /* ofxFensterManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxFensterManager.cpp; sourceTree = "<group>"; };
@@ -91,10 +82,51 @@
FA2780BD13D8524F00AD75E1 /* STR_String.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STR_String.h; sourceTree = "<group>"; };
FA2780BE13D8526600AD75E1 /* libGhost32.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libGhost32.a; path = ../../../addons/ofxFenster/libs/ghost/lib/osx32/libGhost32.a; sourceTree = SOURCE_ROOT; };
FA37630813D862BC00E7EBDE /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
+ FA6584D8146D60BC00D8A9AE /* ofxDisplayManagerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxDisplayManagerMac.mm; sourceTree = "<group>"; };
+ FA658510146D641800D8A9AE /* ofxDisplayMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxDisplayMac.h; sourceTree = "<group>"; };
FAB311C61434CCF60063589B /* ofxDisplayManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxDisplayManager.h; sourceTree = "<group>"; };
FAB311C71434CCF60063589B /* ofxDisplayManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxDisplayManager.cpp; sourceTree = "<group>"; };
FAB311CB1434CDA70063589B /* ofxDisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxDisplay.h; sourceTree = "<group>"; };
FAB311CC1434CDA70063589B /* ofxDisplay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxDisplay.cpp; sourceTree = "<group>"; };
+ FAEF85F6146D7DDC0019AD26 /* GHOST_DisplayManagerCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GHOST_DisplayManagerCocoa.h; sourceTree = "<group>"; };
+ FAEF85F7146D7DDC0019AD26 /* GHOST_SystemCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GHOST_SystemCocoa.h; sourceTree = "<group>"; };
+ FAEF85F8146D7DDC0019AD26 /* GHOST_SystemPathsCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GHOST_SystemPathsCocoa.h; sourceTree = "<group>"; };
+ FAEF85F9146D7DDC0019AD26 /* GHOST_WindowCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GHOST_WindowCocoa.h; sourceTree = "<group>"; };
+ FAEF85FC146D7DFC0019AD26 /* GHOST_IWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_IWindow.h; path = ../libs/ghost/include/GHOST_IWindow.h; sourceTree = SOURCE_ROOT; };
+ FAEF85FD146D7DFC0019AD26 /* GHOST_Window.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_Window.h; path = ../libs/ghost/include/GHOST_Window.h; sourceTree = SOURCE_ROOT; };
+ FAEF85FE146D7DFC0019AD26 /* GHOST_WindowNULL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_WindowNULL.h; path = ../libs/ghost/include/GHOST_WindowNULL.h; sourceTree = SOURCE_ROOT; };
+ FAEF85FF146D7DFC0019AD26 /* GHOST_WindowManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_WindowManager.h; path = ../libs/ghost/include/GHOST_WindowManager.h; sourceTree = SOURCE_ROOT; };
+ FAEF8600146D7DFC0019AD26 /* GHOST_Types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_Types.h; path = ../libs/ghost/include/GHOST_Types.h; sourceTree = SOURCE_ROOT; };
+ FAEF8601146D7DFC0019AD26 /* GHOST_TimerTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_TimerTask.h; path = ../libs/ghost/include/GHOST_TimerTask.h; sourceTree = SOURCE_ROOT; };
+ FAEF8602146D7DFC0019AD26 /* GHOST_TimerManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_TimerManager.h; path = ../libs/ghost/include/GHOST_TimerManager.h; sourceTree = SOURCE_ROOT; };
+ FAEF8603146D7DFC0019AD26 /* GHOST_SystemPaths.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_SystemPaths.h; path = ../libs/ghost/include/GHOST_SystemPaths.h; sourceTree = SOURCE_ROOT; };
+ FAEF8604146D7DFC0019AD26 /* GHOST_SystemNULL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_SystemNULL.h; path = ../libs/ghost/include/GHOST_SystemNULL.h; sourceTree = SOURCE_ROOT; };
+ FAEF8605146D7DFC0019AD26 /* GHOST_System.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_System.h; path = ../libs/ghost/include/GHOST_System.h; sourceTree = SOURCE_ROOT; };
+ FAEF8606146D7DFC0019AD26 /* GHOST_Rect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_Rect.h; path = ../libs/ghost/include/GHOST_Rect.h; sourceTree = SOURCE_ROOT; };
+ FAEF8607146D7DFC0019AD26 /* GHOST_Path-api.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "GHOST_Path-api.h"; path = "../libs/ghost/include/GHOST_Path-api.h"; sourceTree = SOURCE_ROOT; };
+ FAEF8608146D7DFC0019AD26 /* GHOST_ModifierKeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_ModifierKeys.h; path = ../libs/ghost/include/GHOST_ModifierKeys.h; sourceTree = SOURCE_ROOT; };
+ FAEF8609146D7DFC0019AD26 /* GHOST_ITimerTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_ITimerTask.h; path = ../libs/ghost/include/GHOST_ITimerTask.h; sourceTree = SOURCE_ROOT; };
+ FAEF860A146D7DFC0019AD26 /* GHOST_ISystemPaths.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_ISystemPaths.h; path = ../libs/ghost/include/GHOST_ISystemPaths.h; sourceTree = SOURCE_ROOT; };
+ FAEF860B146D7DFC0019AD26 /* GHOST_ISystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_ISystem.h; path = ../libs/ghost/include/GHOST_ISystem.h; sourceTree = SOURCE_ROOT; };
+ FAEF860C146D7DFC0019AD26 /* GHOST_IEventConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_IEventConsumer.h; path = ../libs/ghost/include/GHOST_IEventConsumer.h; sourceTree = SOURCE_ROOT; };
+ FAEF860D146D7DFC0019AD26 /* GHOST_IEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_IEvent.h; path = ../libs/ghost/include/GHOST_IEvent.h; sourceTree = SOURCE_ROOT; };
+ FAEF860E146D7DFC0019AD26 /* GHOST_EventWheel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_EventWheel.h; path = ../libs/ghost/include/GHOST_EventWheel.h; sourceTree = SOURCE_ROOT; };
+ FAEF860F146D7DFC0019AD26 /* GHOST_EventTrackpad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_EventTrackpad.h; path = ../libs/ghost/include/GHOST_EventTrackpad.h; sourceTree = SOURCE_ROOT; };
+ FAEF8610146D7DFC0019AD26 /* GHOST_EventString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_EventString.h; path = ../libs/ghost/include/GHOST_EventString.h; sourceTree = SOURCE_ROOT; };
+ FAEF8611146D7DFC0019AD26 /* GHOST_EventPrinter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_EventPrinter.h; path = ../libs/ghost/include/GHOST_EventPrinter.h; sourceTree = SOURCE_ROOT; };
+ FAEF8612146D7DFC0019AD26 /* GHOST_EventNDOF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_EventNDOF.h; path = ../libs/ghost/include/GHOST_EventNDOF.h; sourceTree = SOURCE_ROOT; };
+ FAEF8613146D7DFC0019AD26 /* GHOST_EventManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_EventManager.h; path = ../libs/ghost/include/GHOST_EventManager.h; sourceTree = SOURCE_ROOT; };
+ FAEF8614146D7DFC0019AD26 /* GHOST_EventKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_EventKey.h; path = ../libs/ghost/include/GHOST_EventKey.h; sourceTree = SOURCE_ROOT; };
+ FAEF8615146D7DFC0019AD26 /* GHOST_EventDragnDrop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_EventDragnDrop.h; path = ../libs/ghost/include/GHOST_EventDragnDrop.h; sourceTree = SOURCE_ROOT; };
+ FAEF8616146D7DFC0019AD26 /* GHOST_EventCursor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_EventCursor.h; path = ../libs/ghost/include/GHOST_EventCursor.h; sourceTree = SOURCE_ROOT; };
+ FAEF8617146D7DFC0019AD26 /* GHOST_EventButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_EventButton.h; path = ../libs/ghost/include/GHOST_EventButton.h; sourceTree = SOURCE_ROOT; };
+ FAEF8618146D7DFC0019AD26 /* GHOST_Event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_Event.h; path = ../libs/ghost/include/GHOST_Event.h; sourceTree = SOURCE_ROOT; };
+ FAEF8619146D7DFC0019AD26 /* GHOST_DisplayManagerNULL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_DisplayManagerNULL.h; path = ../libs/ghost/include/GHOST_DisplayManagerNULL.h; sourceTree = SOURCE_ROOT; };
+ FAEF861A146D7DFC0019AD26 /* GHOST_DisplayManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_DisplayManager.h; path = ../libs/ghost/include/GHOST_DisplayManager.h; sourceTree = SOURCE_ROOT; };
+ FAEF861B146D7DFC0019AD26 /* GHOST_Debug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_Debug.h; path = ../libs/ghost/include/GHOST_Debug.h; sourceTree = SOURCE_ROOT; };
+ FAEF861C146D7DFC0019AD26 /* GHOST_CallbackEventConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_CallbackEventConsumer.h; path = ../libs/ghost/include/GHOST_CallbackEventConsumer.h; sourceTree = SOURCE_ROOT; };
+ FAEF861D146D7DFC0019AD26 /* GHOST_C-api.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "GHOST_C-api.h"; path = "../libs/ghost/include/GHOST_C-api.h"; sourceTree = SOURCE_ROOT; };
+ FAEF861E146D7DFC0019AD26 /* GHOST_Buttons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHOST_Buttons.h; path = ../libs/ghost/include/GHOST_Buttons.h; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -151,16 +183,42 @@
48D032E113AE3F4600FFC1C5 /* include */ = {
isa = PBXGroup;
children = (
- 48D032E213AE3F4600FFC1C5 /* GHOST_C-api.h */,
- 48D032E313AE3F4600FFC1C5 /* GHOST_IEvent.h */,
- 48D032E413AE3F4600FFC1C5 /* GHOST_IEventConsumer.h */,
- 48D032E513AE3F4600FFC1C5 /* GHOST_ISystem.h */,
- 48D032E613AE3F4600FFC1C5 /* GHOST_ISystemPaths.h */,
- 48D032E713AE3F4600FFC1C5 /* GHOST_ITimerTask.h */,
- 48D032E813AE3F4600FFC1C5 /* GHOST_IWindow.h */,
- 48D032E913AE3F4600FFC1C5 /* GHOST_Path-api.h */,
- 48D032EA13AE3F4600FFC1C5 /* GHOST_Rect.h */,
- 48D032EB13AE3F4600FFC1C5 /* GHOST_Types.h */,
+ FAEF85FC146D7DFC0019AD26 /* GHOST_IWindow.h */,
+ FAEF85FD146D7DFC0019AD26 /* GHOST_Window.h */,
+ FAEF85FE146D7DFC0019AD26 /* GHOST_WindowNULL.h */,
+ FAEF85FF146D7DFC0019AD26 /* GHOST_WindowManager.h */,
+ FAEF8600146D7DFC0019AD26 /* GHOST_Types.h */,
+ FAEF8601146D7DFC0019AD26 /* GHOST_TimerTask.h */,
+ FAEF8602146D7DFC0019AD26 /* GHOST_TimerManager.h */,
+ FAEF8603146D7DFC0019AD26 /* GHOST_SystemPaths.h */,
+ FAEF8604146D7DFC0019AD26 /* GHOST_SystemNULL.h */,
+ FAEF8605146D7DFC0019AD26 /* GHOST_System.h */,
+ FAEF8606146D7DFC0019AD26 /* GHOST_Rect.h */,
+ FAEF8607146D7DFC0019AD26 /* GHOST_Path-api.h */,
+ FAEF8608146D7DFC0019AD26 /* GHOST_ModifierKeys.h */,
+ FAEF8609146D7DFC0019AD26 /* GHOST_ITimerTask.h */,
+ FAEF860A146D7DFC0019AD26 /* GHOST_ISystemPaths.h */,
+ FAEF860B146D7DFC0019AD26 /* GHOST_ISystem.h */,
+ FAEF860C146D7DFC0019AD26 /* GHOST_IEventConsumer.h */,
+ FAEF860D146D7DFC0019AD26 /* GHOST_IEvent.h */,
+ FAEF860E146D7DFC0019AD26 /* GHOST_EventWheel.h */,
+ FAEF860F146D7DFC0019AD26 /* GHOST_EventTrackpad.h */,
+ FAEF8610146D7DFC0019AD26 /* GHOST_EventString.h */,
+ FAEF8611146D7DFC0019AD26 /* GHOST_EventPrinter.h */,
+ FAEF8612146D7DFC0019AD26 /* GHOST_EventNDOF.h */,
+ FAEF8613146D7DFC0019AD26 /* GHOST_EventManager.h */,
+ FAEF8614146D7DFC0019AD26 /* GHOST_EventKey.h */,
+ FAEF8615146D7DFC0019AD26 /* GHOST_EventDragnDrop.h */,
+ FAEF8616146D7DFC0019AD26 /* GHOST_EventCursor.h */,
+ FAEF8617146D7DFC0019AD26 /* GHOST_EventButton.h */,
+ FAEF8618146D7DFC0019AD26 /* GHOST_Event.h */,
+ FAEF8619146D7DFC0019AD26 /* GHOST_DisplayManagerNULL.h */,
+ FAEF861A146D7DFC0019AD26 /* GHOST_DisplayManager.h */,
+ FAEF861B146D7DFC0019AD26 /* GHOST_Debug.h */,
+ FAEF861C146D7DFC0019AD26 /* GHOST_CallbackEventConsumer.h */,
+ FAEF861D146D7DFC0019AD26 /* GHOST_C-api.h */,
+ FAEF861E146D7DFC0019AD26 /* GHOST_Buttons.h */,
+ FAEF85F5146D7DDC0019AD26 /* Cocoa */,
);
path = include;
sourceTree = "<group>";
@@ -176,6 +234,8 @@
FAB311C71434CCF60063589B /* ofxDisplayManager.cpp */,
FAB311CB1434CDA70063589B /* ofxDisplay.h */,
FAB311CC1434CDA70063589B /* ofxDisplay.cpp */,
+ FA6584D8146D60BC00D8A9AE /* ofxDisplayManagerMac.mm */,
+ FA658510146D641800D8A9AE /* ofxDisplayMac.h */,
);
path = src;
sourceTree = "<group>";
@@ -278,6 +338,18 @@
path = include;
sourceTree = "<group>";
};
+ FAEF85F5146D7DDC0019AD26 /* Cocoa */ = {
+ isa = PBXGroup;
+ children = (
+ FAEF85F6146D7DDC0019AD26 /* GHOST_DisplayManagerCocoa.h */,
+ FAEF85F7146D7DDC0019AD26 /* GHOST_SystemCocoa.h */,
+ FAEF85F8146D7DDC0019AD26 /* GHOST_SystemPathsCocoa.h */,
+ FAEF85F9146D7DDC0019AD26 /* GHOST_WindowCocoa.h */,
+ );
+ name = Cocoa;
+ path = ../libs/ghost/include/Cocoa;
+ sourceTree = SOURCE_ROOT;
+ };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -367,6 +439,7 @@
48D0339913AE3F4600FFC1C5 /* ofxFensterManager.cpp in Sources */,
FAB311C81434CCF60063589B /* ofxDisplayManager.cpp in Sources */,
FAB311CD1434CDA70063589B /* ofxDisplay.cpp in Sources */,
+ FA6584D9146D60BC00D8A9AE /* ofxDisplayManagerMac.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
2  exampleMultipleGraphicCards/src/main.cpp
View
@@ -10,6 +10,6 @@ int main( ){
// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
- ofRunApp(new testApp());
+ ofRunFensterApp(new testApp());
}
5 exampleMultipleGraphicCards/src/testApp.cpp
View
@@ -2,8 +2,6 @@
//--------------------------------------------------------------
void testApp::setup() {
- //the pirmary listener can't yet be set by default, so even if you only have one window, you need to call this line
- ofxFensterManager::get()->getPrimaryWindow()->addListener(this);
ofSetFrameRate(60);
ofBackground(0,0,0);
@@ -22,7 +20,7 @@ void testApp::setup() {
ofxFenster* win=ofxFensterManager::get()->createFenster(0, 0, display->width, display->height, OF_WINDOW);
win->addListener(this);
win->setBackgroundColor(ofRandom(255), ofRandom(255), ofRandom(255));
- mousePos[win->id]=ofVec2f(0,0);
+ mousePos[win->id]=ofVec2f(0,0);
if(displays.size()>2)
display = displays[2];
@@ -49,7 +47,6 @@ void testApp::update() {
//this only works partially in ubuntu 11.04
ofxFensterManager::get()->setIcon(icon.getPixelsRef());
}
-
}
//--------------------------------------------------------------
2  exampleMultipleGraphicCards/src/testApp.h
View
@@ -13,7 +13,7 @@ class imageWindow: public ofxFensterListener{
img.loadImage("someImage.JPG");
}
void draw(){
- cout << ofGetWidth() << endl;
+ //cout << ofGetWidth() << endl;
img.draw(0,0);
}
2  exampleSpanningImage/src/testApp.cpp
View
@@ -5,7 +5,7 @@ void testApp::setup()
{
ofSetWindowShape(100, 100);
bgImage.loadImage("someLargeImage.jpg");
- for(int i=0;i<60;i++){
+ for(int i=0;i<200;i++){
ofxFenster* win=ofxFensterManager::get()->createFenster(ofRandom(ofGetScreenWidth()), ofRandom(ofGetScreenHeight()), ofRandom(50, 250), ofRandom(50, 250), OF_WINDOW);
win->addListener(this); //this line works because testApp does not extend ofBaseApp, but ofxFensterListener
win->setWindowTitle(ofToString(i));
9 libs/ghost/include/Cocoa/GHOST_SystemCocoa.h
View
@@ -49,7 +49,6 @@ class GHOST_EventKey;
class GHOST_EventWindow;
class GHOST_WindowCocoa;
-
class GHOST_SystemCocoa : public GHOST_System {
public:
/**
@@ -219,6 +218,11 @@ class GHOST_SystemCocoa : public GHOST_System {
* @return Indication whether the event was handled.
*/
GHOST_TSuccess handleApplicationBecomeActiveEvent();
+
+ /**
+ * Give the possibility to change the default NSScreen
+ **/
+ GHOST_TSuccess setScreen(GHOST_TInt32 id);
/**
* External objects should call this when they send an event outside processEvents.
@@ -297,6 +301,9 @@ class GHOST_SystemCocoa : public GHOST_System {
/** Multitouch gesture in progress, useful to distinguish trackpad from mouse scroll events */
bool m_isGestureInProgress;
+
+ /** id of current screen to use **/
+ GHOST_TUns32 m_screen_id;
};
#endif // _GHOST_SYSTEM_COCOA_H_
2  libs/ghost/include/Cocoa/GHOST_WindowCocoa.h
View
@@ -129,7 +129,7 @@ class GHOST_WindowCocoa : public GHOST_Window {
* @param x The new X position of the window.
* @param y The new Y position of the window.
*/
- virtual GHOST_TSuccess setWindowPosition(GHOST_TUns32 x, GHOST_TUns32 y);
+ virtual GHOST_TSuccess setWindowPosition(GHOST_TInt32 x, GHOST_TInt32 y);
/**
* sets window border.
4 libs/ghost/include/GHOST_IWindow.h
View
@@ -116,7 +116,7 @@ class GHOST_IWindow
* @param x The new X position of the window.
* @param y The new Y position of the window.
*/
- virtual GHOST_TSuccess setWindowPosition(GHOST_TUns32 x, GHOST_TUns32 y) = 0;
+ virtual GHOST_TSuccess setWindowPosition(GHOST_TInt32 x, GHOST_TInt32 y) = 0;
/**
* sets window border.
@@ -128,7 +128,7 @@ class GHOST_IWindow
* sets window to top
* @param alwaysOnTop true to have the window always on top
*/
- virtual GHOST_TSuccess setWindowOnTop(bool alwaysOnTop) {};
+ virtual GHOST_TSuccess setWindowOnTop(bool alwaysOnTop) {return GHOST_kSuccess;};
/**
* Returns the client rectangle dimensions.
4 libs/ghost/include/WIN32/GHOST_WindowWin32.h
View
@@ -141,6 +141,10 @@ class GHOST_WindowWin32 : public GHOST_Window {
*/
virtual void getWindowBounds(GHOST_Rect& bounds) const;
+ virtual GHOST_TSuccess setWindowPosition(GHOST_TInt32 x, GHOST_TInt32 y);
+ virtual GHOST_TSuccess setWindowBorder(bool hasBorder);
+
+
/**
* Returns the client rectangle dimensions.
* The left and top members of the rectangle are always zero.
2  libs/ghost/include/X11/GHOST_WindowX11.h
View
@@ -105,7 +105,7 @@ class GHOST_WindowX11 : public GHOST_Window
) const;
GHOST_TSuccess
- setWindowPosition(GHOST_TUns32 x, GHOST_TUns32 y);
+ setWindowPosition(GHOST_TInt32 x, GHOST_TInt32 y);
GHOST_TSuccess
setWindowBorder(bool hasBorder);
BIN  libs/ghost/lib/osx32/libGhost32.a
View
Binary file not shown
BIN  libs/ghost/lib/osx64/libGhost64.a
View
Binary file not shown
7 src/ofxDisplay.h
View
@@ -19,6 +19,8 @@ class ofxDisplay{
int id;
int width;
int height;
+ int x;
+ int y;
protected:
private:
};
@@ -36,10 +38,9 @@ class ofxDisplayLinux: public ofxDisplay{
/***MAC***/
+
#ifdef TARGET_OSX
-class ofxDisplayMac: public ofxDisplay{
-public:
-};
+//class ofxDisplayMac;
#endif
/***WINDOWS***/
16 src/ofxDisplayMac.h
View
@@ -0,0 +1,16 @@
+/*
+ * ofxDisplayMac.h
+ * ofxFensterExample
+ *
+ * Created by Philip Whitfield on 11/11/11.
+ * Copyright 2011 undef.ch. All rights reserved.
+ *
+ */
+
+#ifdef TARGET_OSX
+#include <Cocoa/Cocoa.h>
+class ofxDisplayMac: public ofxDisplay{
+public:
+ NSScreen* screen;
+};
+#endif
17 src/ofxDisplayManager.cpp
View
@@ -7,6 +7,9 @@
*
*/
+#include "ofMain.h"
+
+
#include "ofxDisplayManager.h"
bool ofxDisplayManager::hasSingleton = false;
@@ -27,16 +30,15 @@ ofxDisplayList ofxDisplayManager::getDisplays()
ofxDisplay* d = new ofxDisplay();
d->width = ofGetWidth();
d->height = ofGetHeight();
+ d->x = 0;
+ d->y = 0;
list.push_back(d);
return list;
}
+#ifndef TARGET_OSX //This function is defined in ofxDisplayManagerMac for Mac
ofxDisplayManager* ofxDisplayManager::get(){
if(!hasSingleton){
-#ifdef TARGET_OSX
- singleton = new ofxDisplayManagerMac();
-#endif
-
#ifdef TARGET_LINUX
singleton = new ofxDisplayManagerLinux();
#endif
@@ -48,6 +50,7 @@ ofxDisplayManager* ofxDisplayManager::get(){
}
return singleton;
}
+#endif //END DON'T COMPILE ON MAC
#ifdef TARGET_LINUX
ofxDisplayList ofxDisplayManagerLinux::getDisplays()
@@ -68,6 +71,8 @@ ofxDisplayList ofxDisplayManagerLinux::getDisplays()
display->display = disp;
display->width = XDisplayWidth(disp, curDesktop);
display->height = XDisplayHeight(disp, curDesktop);
+ display->x = 0;
+ display->y = 0;
display->id = displayID;
displays.push_back(display);
curDesktop++;
@@ -79,10 +84,8 @@ ofxDisplayList ofxDisplayManagerLinux::getDisplays()
};
#endif
-#ifdef TARGET_OSX
-#endif
#ifdef TARGET_WIN32
//TODO
-#endif
+#endif
2  src/ofxDisplayManager.h
View
@@ -45,7 +45,7 @@ class ofxDisplayManagerLinux: public ofxDisplayManager{
#ifdef TARGET_OSX
class ofxDisplayManagerMac: public ofxDisplayManager{
public:
- //ofxDisplayList getDisplays();
+ ofxDisplayList getDisplays();
};
#endif
32 src/ofxDisplayManagerMac.mm
View
@@ -0,0 +1,32 @@
+#include "ofxDisplayManager.h"
+#include "ofxDisplayMac.h"
+
+#import <Cocoa/Cocoa.h>
+
+ofxDisplayManager* ofxDisplayManager::get(){
+ return new ofxDisplayManagerMac();
+}
+
+ofxDisplayList ofxDisplayManagerMac::getDisplays(){
+ ofxDisplayList displays;
+ NSArray *screens = [NSScreen screens];
+
+ NSScreen *iterScreen;
+ int i=0;
+ for (iterScreen in screens)
+ {
+ ofxDisplayMac* disp = new ofxDisplayMac();
+ disp->screen = iterScreen;
+ NSRect frame = [iterScreen frame];
+ disp->width = frame.size.width;
+ disp->height = frame.size.height;
+ disp->x = frame.origin.x;
+ disp->y = frame.origin.y;
+ disp->id = i;
+ displays.push_back(disp);
+ i++;
+ //cout << "FOUND A DISPPLAY " << disp->x << " " << disp->y << " " << disp->width << "x" << disp->height << endl;
+ }
+
+ return displays;
+}
18 src/ofxFensterManager.cpp
View
@@ -29,7 +29,7 @@ ofxFensterManagerPtr ofxFensterManager::singleton;
static ofEventArgs voidEventArgs;
ofxFensterManager::ofxFensterManager():
-exitOnEscape(true),endOnNextUpdate(false),running(false),antialiasing(0)
+exitOnEscape(true),endOnNextUpdate(false),running(false),antialiasing(0),hasActiveDisplay(false)
{
timeNow = 0;
timeThen = 0;
@@ -122,8 +122,14 @@ void ofxFensterManager::initializeWindow()
ofxFenster* ofxFensterManager::createFenster(int t, int l, int w, int h, int screenMode)
{
ofxFensterPtr f=ofxFensterPtr(new ofxFenster());
- if(f->setupOpenGL(t, l, w, h, screenMode))
+ if(f->setupOpenGL(t, l, w, h, screenMode)){
fensters.push_back(f);
+#ifdef TARGET_OSX
+ if(hasActiveDisplay){
+ f->setWindowPosition(l + activeDisplay->x, t + activeDisplay->y);
+ }
+#endif
+ }
return f.get();
}
@@ -528,11 +534,9 @@ void ofxFensterManager::setClipboard(char* data){
}
void ofxFensterManager::setActiveDisplay(ofxDisplay* display){
- activeDisplay = ofxDisplayPtr(display);
-#ifdef TARGET_LINUX //a lot of casting, but this should only get called on startup and has to be safe
+ activeDisplay = display;
+ hasActiveDisplay = true;
+#ifdef TARGET_LINUX //a lot of casting, but this should be type safe
((GHOST_SystemX11*)GHOST_ISystem::getSystem())->setDisplay(((ofxDisplayLinux*)display)->display);
- //((GHOST_SystemX11*)GHOST_ISystem::getSystem())->setDisplay(XOpenDisplay(":0.2"));
#endif
}
-
-
3  src/ofxFensterManager.h
View
@@ -190,7 +190,8 @@ class ofxFensterManager: public ofAppBaseWindow, public GHOST_IEventConsumer {
int antialiasing;
- ofxDisplayPtr activeDisplay;
+ ofxDisplay* activeDisplay;
+ bool hasActiveDisplay;
};
#endif // OFXFENSTERMANAGER_H
Please sign in to comment.
Something went wrong with that request. Please try again.