Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include "cinder/gl/gl.h"
00025
00026 #import <Cocoa/Cocoa.h>
00027 #import <ScreenSaver/ScreenSaver.h>
00028
00029 #include "cinder/app/AppScreenSaver.h"
00030 #import "cinder/app/CinderView.h"
00031 #import "cinder/app/Window.h"
00032
00033 #include <string>
00034
00035 @class WindowImplCocoaScreenSaver;
00036
00037 @interface AppImplCocoaScreenSaver : NSObject {
00038 @public
00039 cinder::app::AppScreenSaver *mApp;
00040 std::list<WindowImplCocoaScreenSaver*> mWindows;
00041 WindowImplCocoaScreenSaver *mActiveWindow;
00042 float mFrameRate;
00043
00044 BOOL mSetupCalled;
00045 }
00046
00047 - (AppImplCocoaScreenSaver*)init;
00048 - (void)addWindow:(WindowImplCocoaScreenSaver*)windowImpl;
00049 - (BOOL)isPreview;
00050
00051 - (size_t)getNumWindows;
00052 - (cinder::app::WindowRef)getWindowIndex:(size_t)index;
00053 - (cinder::app::WindowRef)getWindow;
00054 - (void)setActiveWindow:(WindowImplCocoaScreenSaver*)activeWindow;
00055
00056 - (void)animateOneFrame:(WindowImplCocoaScreenSaver*)callee;
00057
00058 - (float)getFrameRate;
00059 - (void)setFrameRate:(float)frameRate;
00060 - (cinder::fs::path)getAppPath;
00061 - (void)removeCinderView:(WindowImplCocoaScreenSaver*)win;
00062 - (void)finalCleanup;
00063
00064 @end
00065
00066 @interface WindowImplCocoaScreenSaver : ScreenSaverView<WindowImplCocoa,CinderViewDelegate> {
00067 @public
00068 CinderView *mCinderView;
00069 cinder::app::WindowRef mWindowRef;
00070 cinder::DisplayRef mDisplay;
00071
00072 BOOL mPreview;
00073 BOOL mResizeCalled;
00074 BOOL mIsMainView;
00075 BOOL mHasDrawnSinceLastUpdate;
00076 }
00077
00078
00079 - (void)drawRect:(NSRect)rect;
00080 - (void)instantiateView:(NSRect)rect;
00081
00082
00083 - (BOOL)isFullScreen;
00084 - (void)setFullScreen:(BOOL)fullScreen options:(const cinder::app::FullScreenOptions *)options;
00085 - (cinder::Vec2i)getSize;
00086 - (void)setSize:(cinder::Vec2i)size;
00087 - (cinder::Vec2i)getPos;
00088 - (void)setPos:(cinder::Vec2i)pos;
00089 - (float)getContentScale;
00090 - (void)close;
00091 - (std::string)getTitle;
00092 - (void)setTitle:(std::string)title;
00093 - (BOOL)isBorderless;
00094 - (void)setBorderless:(BOOL)borderless;
00095 - (BOOL)isAlwaysOnTop;
00096 - (void)setAlwaysOnTop:(BOOL)alwaysOnTop;
00097 - (cinder::DisplayRef)getDisplay;
00098 - (cinder::app::RendererRef)getRenderer;
00099 - (const std::vector<cinder::app::TouchEvent::Touch>&)getActiveTouches;
00100 - (void*)getNative;
00101 - (void)hide;
00102 - (void)show;
00103
00104
00105 - (void)draw;
00106 - (cinder::app::WindowRef)getWindowRef;
00107
00108 @end