41 #if defined( CINDER_COCOA )
42 #if defined( CINDER_COCOA_TOUCH )
43 #if defined( __OBJC__ )
44 #import <UIKit/UIKit.h>
45 #import <CoreFoundation/CoreFoundation.h>
48 #include <ApplicationServices/ApplicationServices.h>
57 #elif defined( CINDER_MSW )
58 #include "cinder/msw/OutputDebugStringStream.h"
59 #elif defined( CINDER_WINRT)
60 #include "cinder/msw/OutputDebugStringStream.h"
70 #if !defined( CINDER_WINRT )
71 namespace boost {
namespace asio {
76 namespace cinder {
namespace app {
83 template<
typename InputIterator>
86 bool handled = ( first == last ) ?
true :
false;
87 while( first != last )
88 handled = *first++ || handled;
98 template<
typename InputIterator>
102 while( first != last )
103 result = *first++ && result;
114 template<
typename InputIterator>
120 while( first != last )
278 virtual void quit() = 0;
287 #if ! defined( CINDER_WINRT )
374 #if defined( CINDER_COCOA )
378 static fs::path getResourcePath(
const fs::path &rsrcRelativePath );
380 static fs::path getResourcePath();
381 #elif defined( CINDER_WINRT )
385 #elif defined( CINDER_MSW )
399 #if defined( CINDER_COCOA )
400 virtual NSBundle* getBundle()
const;
404 #if defined( CINDER_WINRT )
410 void getOpenFilePath(
const fs::path &initialPath =
"", std::vector<std::string> extensions = std::vector<std::string>(), std::function<
void (fs::path)>
f =
nullptr );
417 fs::path
getOpenFilePath(
const fs::path &initialPath =
"", std::vector<std::string> extensions = std::vector<std::string>() );
420 #if defined( CINDER_WINRT )
426 void getFolderPath(
const fs::path &initialPath =
"", std::vector<std::string> extensions = std::vector<std::string>(), std::function<
void (fs::path)>
f =
nullptr );
432 #if defined( CINDER_WINRT )
438 void getSaveFilePath(
const fs::path &initialPath =
"", std::vector<std::string> extensions = std::vector<std::string>(), std::function<
void (fs::path)>
f =
nullptr );
444 fs::path
getSaveFilePath(
const fs::path &initialPath =
"", std::vector<std::string> extensions = std::vector<std::string>() );
455 #if !defined( CINDER_WINRT )
456 boost::asio::io_service&
io_service() {
return *mIo; }
472 #if defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) // slightly different signature with Boost.Thread
473 std::packaged_task<result_type> task( std::move(fn) );
475 std::packaged_task<result_type()> task( std::move(fn) );
477 auto fute = task.get_future();
498 virtual void privateSetup__();
499 virtual void privateUpdate__();
502 #if defined( CINDER_MSW )
504 virtual bool getsWindowsPaintEvents() = 0;
515 static void prepareLaunch();
516 static void executeLaunch(
App *app,
RendererRef defaultRenderer,
const char *title,
int argc,
char *
const argv[] );
517 static void cleanupLaunch();
519 virtual void launch(
const char *title,
int argc,
char *
const argv[] ) = 0;
523 #if defined( CINDER_MSW )
525 std::shared_ptr<std::ostream> mOutputStream;
526 #elif defined( CINDER_WINRT )
528 std::shared_ptr<std::ostream> mOutputStream;
532 void prepareAssetLoading();
533 fs::path findAssetPath(
const fs::path &relativePath );
535 #if defined( CINDER_COCOA )
536 static void *sAutoReleasePool;
540 uint32_t mFrameCount;
542 uint32_t mFpsLastSampleFrame;
543 double mFpsLastSampleTime;
544 double mFpsSampleInterval;
546 std::shared_ptr<Timeline> mTimeline;
548 signals::signal<void()> mSignalUpdate, mSignalShutdown, mSignalWillResignActive, mSignalDidBecomeActive;
550 #if !defined( CINDER_WINRT )
551 std::shared_ptr<boost::asio::io_service> mIo;
552 std::shared_ptr<void> mIoWork;
553 #endif // !defined( CINDER_WINRT )
556 bool mAssetDirectoriesInitialized;
558 std::vector<fs::path> mAssetDirectories;
637 #if defined( CINDER_COCOA )
640 #elif defined( CINDER_WINRT )
643 #elif defined( CINDER_MSW )
662 #if defined( CINDER_WINRT )
663 inline void getOpenFilePath(
const fs::path &initialPath =
"", std::vector<std::string> extensions = std::vector<std::string>(), std::function<
void (fs::path)>
f =
nullptr ) {
return App::get()->
getOpenFilePath( initialPath, extensions,
f ); }
672 #if defined( CINDER_WINRT )
673 inline fs::path
getSaveFilePath(
const fs::path &initialPath =
"", std::vector<std::string> extensions = std::vector<std::string>(), std::function<
void (fs::path)>
f =
nullptr) {
App::get()->
getSaveFilePath( initialPath, extensions,
f ); }
694 #if defined( CINDER_COCOA )
695 inline ::CGContextRef createWindowCgContext() {
return (std::dynamic_pointer_cast<Renderer2d>(
App::get()->
getRenderer()))->getCgContext(); }
704 #if defined( CINDER_COCOA )
706 #elif defined( CINDER_MSW )
static bool isPrimaryThread()
Return true if the calling thread is the Application's primary thread.
Definition: App.cpp:491
void emitWillResignActive()
Definition: App.cpp:169
fs::path getOpenFilePath(const fs::path &initialPath="", std::vector< std::string > extensions=std::vector< std::string >())
Presents the user with a folder-open dialog and returns the selected folder path in the spcified call...
Definition: App.cpp:338
void setWindowPos(int x, int y)
Sets the coordinates of the top-left corner of the current window measured in points.
Definition: App.h:343
void enableMultiTouch(bool enable=true)
Registers the app to receive multiTouch events from the operating system. Disabled by default on desk...
Definition: App.h:190
void prepareWindow(const Window::Format &format)
Definition: App.cpp:96
float getFrameRate() const
maximum frameRate of the application specified in frames per second
Definition: App.h:211
GLenum GLint GLint y
Definition: GLee.h:987
virtual void mouseMove(MouseEvent event)
Override to receive mouse-move events.
Definition: App.h:257
signals::signal< void()> & getSignalShutdown()
Emitted prior to the application shutting down.
Definition: App.h:284
void enableHighDensityDisplay(bool enable=true)
Sets whether Windows created on a high-density (Retina) display will have their resolution doubled...
Definition: App.h:180
std::vector< Window::Format > mWindowFormats
Definition: App.h:220
fs::path getFolderPath(const fs::path &initialPath="")
Presents the user with a folder-open dialog and returns the selected folder.
Definition: App.cpp:386
virtual void update()
Override to perform any once-per-loop computation.
Definition: App.h:246
virtual const Settings & getSettings() const =0
void setWindowSize(const Vec2i &size)
Sets the size of the App's window measured in points. Ignored in full-screen mode.
Definition: App.h:322
void enable(GLenum state)
Enables the OpenGL State state. Equivalent to calling to glEnable( state );.
Definition: dx.h:198
fs::path getSaveFilePath(const fs::path &initialPath="", std::vector< std::string > extensions=std::vector< std::string >())
Presents the user with a file-save dialog and returns the selected file path.
Definition: App.h:675
Represents a mouse event.
Definition: MouseEvent.h:34
void setDefaultWindowFormat(const Window::Format &format)
Sets the Window::Format which will be used if no calls are made to Settings::prepareWindow() ...
Definition: App.h:187
Exception for failed asset loading.
Definition: App.h:717
float getWindowAspectRatio() const
Returns the aspect ratio of the App's current window.
Definition: App.h:329
Vec2< float > Vec2f
Definition: Vector.h:1314
virtual ~App()
Definition: App.cpp:122
static App * sInstance
Definition: App.h:561
bool isFullScreen()
Returns whether the active App is in full-screen mode or not.
Definition: App.h:605
Returns true if all slots return true, else false. Does not short-circuit. Returns true if there are ...
Definition: App.h:95
bool mFrameRateEnabled
Definition: App.h:224
uint32_t getElapsedFrames() const
Returns the number of animation frames which have elapsed since application launch.
Definition: App.h:366
GLsizei const GLchar ** string
Definition: GLee.h:2427
virtual void keyUp(KeyEvent event)
Override to receive key-up events.
Definition: App.h:271
virtual fs::path getAppPath() const =0
Returns the path to the application on disk.
void dispatchAsync(const std::function< void()> &fn)
defined( CINDER_WINRT )
Definition: App.cpp:497
Options passed when entering fullscreen.
Definition: Window.h:110
Window::Format getDefaultWindowFormat() const
Returns the Window::Format which will be used if no calls are made to Settings::prepareWindow() ...
Definition: App.h:185
void enablePowerManagement(bool aPowerManagement=true)
a value of true allows screensavers or the system's power management to hide the app. Default value is false on desktop, and true on mobile
Definition: App.cpp:91
static DataSourceRef loadResource(const std::string &macPath, int mswID, const std::string &mswType)
Returns a DataSourceRef to an application resource. On Mac OS X, macPath is a path relative to the bu...
Definition: App.cpp:180
virtual void resize()
Override to receive window resize events.
Definition: App.h:273
int getWindowWidth()
Returns the width of the active App's window measured in points, or of the screen when in full-screen...
Definition: App.h:577
std::ostream & console()
Returns a reference to an output console, which is an alias to std::cout on the mac, and a wrapper around OutputDebugString on MSW.
Definition: App.cpp:480
virtual void draw()
Override to perform any rendering once-per-loop or in response to OS-prompted requests for refreshes...
Definition: App.h:248
Surface copyWindowSurface()
Returns a copy of the current window's contents as a Surface8u.
Definition: App.h:688
T operator()(InputIterator first, InputIterator last) const
Definition: App.h:115
virtual void setWindowPos(const Vec2i &windowPos)
Sets the coordinates of the top-left corner of the current window measured points.
Definition: App.h:345
void setFrameRate(float frameRate)
Sets maximum frameRate the update/draw loop will execute at, specified in frames per second...
Definition: App.cpp:86
GLuint index
Definition: GLee.h:2259
fs::path getAssetPath(const fs::path &relativePath)
Returns a fs::path to the active App's asset. Returns an empty path on failure.
Definition: App.h:651
bool isBorderless() const
Returns whether the default window will be created without a border (chrome/frame) ...
Definition: App.h:162
Timeline & timeline()
Returns a reference to the App's Timeline.
Definition: App.h:450
bool isPrepared() const
Definition: App.h:132
virtual void keyDown(KeyEvent event)
Override to receive key-down events.
Definition: App.h:269
float toPixels(float s)
Returns a scalar mapped from points to pixels for the current Window.
Definition: App.h:610
void disableFrameRate()
Disables the frameRate limiting, which is on by default. Restore using setFrameRate(). See also enableVerticalSync().
Definition: App.cpp:81
float mFrameRate
Definition: App.h:225
bool isMultiTouchEnabled() const
Returns whether the app is registered to receive multiTouch events from the operating system...
Definition: App.h:192
char mMessage[4096]
Definition: App.h:713
int getWindowPosX() const
Returns the X coordinate of the top-left corner of the current window measured in points...
Definition: App.h:339
virtual float getFrameRate() const =0
Returns the maximum frame-rate the App will attempt to maintain.
void setFullScreen(bool fullScreen=true, const FullScreenOptions &options=FullScreenOptions())
Sets whether the default window is fullscreen at startup with FullScreenOptions options. Kiosk Mode is enabled by default.
Definition: App.h:155
virtual WindowRef getWindow() const =0
Returns the the currently active Window. Throws ExcInvalidWindow if called with no active window...
virtual void mouseDrag(MouseEvent event)
Override to receive mouse-drag events.
Definition: App.h:259
Exception for failed resource loading.
Definition: App.h:702
Area getWindowBounds() const
Returns the bounding area of the App's current window measured in points.
Definition: App.h:332
boost::asio::io_service & io_service()
Returns a reference to the App's boost::asio::io_service()
Definition: App.h:457
virtual void mouseDown(MouseEvent event)
Override to receive mouse-down events.
Definition: App.h:251
void addAssetDirectory(const fs::path &dirPath)
Adds an absolute path 'dirPath' to the list of directories which are searched for assets...
Definition: App.cpp:291
void setWindowSize(int windowWidth, int windowHeight)
Sets the size of the active App's window in points. Ignored in full-screen mode.
Definition: App.h:585
float getWindowAspectRatio()
Returns the aspect ratio of the active App's window or the screen in full-screen mode.
Definition: App.h:594
Surface copyWindowSurface()
Definition: App.cpp:510
void emitDidBecomeActive()
Definition: App.cpp:174
virtual void enablePowerManagement(bool powerManagement=true)
a value of true allows screensavers or the system's power management to hide the app. Default value is false on desktop, and true on mobile
Definition: App.h:311
double getSeconds() const
Returns the elapsed seconds if the timer is running, or the total time between calls to start() and s...
Definition: Timer.cpp:75
std::shared_ptr< Window > WindowRef
Definition: Event.h:49
virtual void quit()=0
Quits the application gracefully.
int getWindowWidth() const
Returns the width of the App's current window measured in points.
Definition: App.h:316
float getWindowContentScale() const
Returns the contentScale of the App's window, which is the multiplier that maps points to pixels...
Definition: App.h:334
AssetLoadExc(const fs::path &relativePath)
Definition: App.cpp:597
float toPoints(float s)
Returns a scalar mapped from pixels to points for the current Window.
Definition: App.h:620
char mMessage[4096]
Definition: App.h:723
void setWindowPos(const Vec2i &windowPos)
Sets the position of the active App's window measured in points. Ignored in full-screen mode...
Definition: App.h:579
float getWindowContentScale()
Returns the contentScale of the active App's window, which is the multiplier that maps points to pixe...
Definition: App.h:599
virtual void touchesMoved(TouchEvent event)
Override to respond to movement (drags) during a multitouch sequence.
Definition: App.h:264
void setBorderless(bool borderless=true)
Sets the default window to be created without a border (chrome/frame)
Definition: App.h:164
bool mPowerManagement
Definition: App.h:226
Vec2f getWindowCenter()
Returns the center of the active App's window in pixels or of the screen in full-screen mode...
Definition: App.h:588
RendererRef getRenderer() const
Returns the Renderer of the active Window.
Definition: App.h:299
const std::vector< Window::Format > & getWindowFormats() const
Definition: App.h:177
GLint * first
Definition: GLee.h:1725
virtual void mouseUp(MouseEvent event)
Override to receive mouse-up events.
Definition: App.h:253
std::vector< Window::Format > & getWindowFormats()
Definition: App.h:176
DataSourceRef loadAsset(const fs::path &relativePath)
Returns a DataSourceRef to the active App's's asset. Throws a AssetLoadExc on failure.
Definition: App.h:649
fs::path getAppPath()
Returns the path to the active App on disk.
Definition: App.h:656
void setWindowSize(const Vec2i &size)
Sets the size of the default window measured in pixels.
Definition: App.h:137
App()
Definition: App.cpp:103
float getAverageFps() const
Returns the average frame-rate attained by the App as measured in frames-per-second.
Definition: App.h:352
void unspecifyWindowPos()
Marks the window position setting as unspecified, effectively requesting the default.
Definition: App.h:150
int getWindowHeight()
Returns the height of the active App's window measured in points, or the screen when in full-screen m...
Definition: App.h:583
bool result_type
Definition: App.h:81
bool operator()(InputIterator first, InputIterator last) const
Definition: App.h:84
virtual size_t getNumWindows() const =0
Returns the number of Windows the app has open.
signals::signal< void()> & getSignalWillResignActive()
Definition: App.h:288
Vec2i getWindowSize()
Returns the size of the active App's window or the screen in full-screen mode measured in points...
Definition: App.h:590
DisplayRef getDisplay() const
Returns the Display of the active Window.
Definition: App.h:301
bool isFullScreen() const
Returns whether the App is in full-screen mode or not.
Definition: App.h:359
virtual WindowRef getWindowIndex(size_t index) const =0
Gets a Window by index, in the range [0, getNumWindows()). Throw ExcInvalidWindow if index is out of ...
bool isFullScreen()
Returns whether the default window is fullscreen.
Definition: App.h:153
bool isResizable() const
Returns whether the default window is resizable.
Definition: App.h:158
std::string mTitle
Definition: App.h:229
int getWindowHeight() const
Returns the height of the App's current window measured in points.
Definition: App.h:318
static App * get()
Returns a pointer to the active App.
Definition: App.h:510
GLenum GLint x
Definition: GLee.h:987
bool result_type
Definition: App.h:96
virtual ~Settings()
Definition: App.h:214
virtual bool isPowerManagementEnabled() const
is power management enabled, allowing screensavers and the system's power management to hide the appl...
Definition: App.h:313
std::shared_ptr< class Renderer > RendererRef
Definition: Renderer.h:85
Returns true if any slots return true, else false. Does not short-circuit. Returns true if there are ...
Definition: App.h:80
WindowRef getWindow()
Returns the number of Windows the app has open.
Definition: App.h:570
void setFrameRate(float frameRate)
Sets the maximum frame-rate the active App will attempt to maintain.
Definition: App.h:603
void emitShutdown()
Definition: App.cpp:162
virtual void mouseWheel(MouseEvent event)
Override to receive mouse-wheel events.
Definition: App.h:255
virtual void shutdown()
Override to perform any application cleanup before exiting.
Definition: App.h:243
void setTitle(const std::string &title)
the title of the app reflected in ways particular to the app type and platform (such as its Window or...
Definition: App.h:202
virtual void setFrameRate(float frameRate)=0
Sets the maximum frame-rate the App will attempt to maintain.
bool isPowerManagementEnabled() const
is power management enabled, allowing screensavers and the system's power management to hide the appl...
Definition: App.h:197
Vec2f getWindowCenter() const
Returns the center of the App's window measured in points.
Definition: App.h:325
void setAlwaysOnTop(bool alwaysOnTop=true)
Sets whether the default window always remains above all other windows.
Definition: App.h:168
bool isWindowPosSpecified() const
Returns whether a non-default window position has been requested.
Definition: App.h:148
bool isAlwaysOnTop() const
Returns whether the default window always remains above all other windows.
Definition: App.h:166
void setFullScreen(bool aFullScreen, const FullScreenOptions &options=FullScreenOptions())
Sets whether the active App is in full-screen mode based on fullScreen.
Definition: App.h:361
Returns a bitmask where in order for the bit in type T to be be 1, it has to be 1 from all slot...
Definition: App.h:111
Area getWindowBounds()
Returns the bounding area of the active App's window or the screen in full-screen mode measured in po...
Definition: App.h:597
RendererRef findSharedRenderer(RendererRef searchRenderer) const
Finds any Renderer of the same type as searchRenderer among existing windows. This is generally not n...
Definition: App.cpp:528
std::shared_ptr< class Display > DisplayRef
Definition: Display.h:53
T result_type
Definition: App.h:112
virtual const char * what() const
Definition: App.h:721
double getElapsedSeconds()
Returns the number seconds which have elapsed since the active App launched.
Definition: App.h:631
virtual bool receivesEvents() const
Definition: App.h:507
virtual const char * what() const
Definition: App.h:711
virtual void touchesEnded(TouchEvent event)
Override to respond to the end of a multitouch sequence.
Definition: App.h:266
GLuint GLuint GLsizei GLenum type
Definition: GLee.h:963
Definition: AppImplWinRT.h:49
bool isFrameRateEnabled() const
Returns whether frameRate limiting is enabled. On by default, at 60 FPS.
Definition: App.h:209
Vec2i getWindowSize() const
Returns the size of the App's current window measured in points.
Definition: App.h:327
size_t getNumWindows()
Returns the number of Windows the app has open.
Definition: App.h:572
virtual void touchesBegan(TouchEvent event)
Override to respond to the beginning of a multitouch sequence.
Definition: App.h:262
Timeline & timeline()
Returns a reference to the active App's Timeline.
Definition: App.h:685
Window::Format mDefaultWindowFormat
Definition: App.h:222
fs::path getOpenFilePath(const fs::path &initialPath="", std::vector< std::string > extensions=std::vector< std::string >())
Presents the user with a file-open dialog and returns the selected file path.
Definition: App.h:665
Represents a file-drop event, typically received from Windows Explorer or Mac OS X Finder...
Definition: FileDropEvent.h:36
bool operator()(InputIterator first, InputIterator last) const
Definition: App.h:99
GLboolean GLboolean GLboolean GLboolean a
Definition: GLee.h:2964
uint32_t getElapsedFrames()
Returns the number of animation frames which have elapsed since the active App launched.
Definition: App.h:633
RendererRef mDefaultRenderer
Definition: App.h:562
void setWindowPos(int windowPosX, int windowPosY)
Sets the position of the default window in screen coordinates measured in pixels. ...
Definition: App.h:144
int getWindowPosY() const
Returns the Y coordinate of the top-left corner of the current window contents measured in points...
Definition: App.h:341
bool mEnableMultiTouch
Definition: App.h:228
GLenum GLsizei GLenum format
Definition: GLee.h:969
void setWindowSize(int windowSizeX, int windowSizeY)
Sets the size of the default window measured in pixels.
Definition: App.h:135
double getElapsedSeconds() const
Returns the number of seconds which have elapsed since application launch.
Definition: App.h:364
bool mShouldQuit
Definition: App.h:217
double getFpsSampleInterval() const
Returns the sampling rate in seconds for measuring the average frame-per-second as returned by getAve...
Definition: App.h:354
DataSourceRef loadResource(const std::string &macPath, int mswID, const std::string &mswType)
Returns a DataSource to an application resource. On Mac OS X, macPath is a path relative to the bundl...
Definition: App.h:636
static Vec2i getMousePos()
Returns the current location of the mouse in screen coordinates measured in points. Can be called outside the normal event loop.
Definition: App.cpp:564
void setFpsSampleInterval(double sampleInterval)
Sets the sampling rate in seconds for measuring the average frame-per-second as returned by getAverag...
Definition: App.h:356
Vec2i getWindowPos()
Returns the position of the active App's window measured in points.
Definition: App.h:592
void addAssetDirectory(const fs::path &dirPath)
Adds an absolute path dirPath to the active App's list of directories which are searched for assets...
Definition: App.h:653
Definition: Exception.h:32
void restoreWindowContext()
Restores the current rendering context to be the App's window or the screen in full-screen mode...
Definition: App.cpp:521
A high-resolution timer class.
Definition: Timer.h:36
std::ostream & console()
Returns a reference to an output console, which is an alias to std::cout on the mac, and a wrapper around OutputDebugString on MSW.
Definition: App.h:682
virtual void setup()
Override to perform any application setup after the Renderer has been initialized.
Definition: App.h:241
void restoreWindowContext()
Restores the current rendering context to be the App's window or the screen in full-screen mode...
Definition: App.h:692
void setWindowSize(int windowWidth, int windowHeight)
Sets the size of the App's current window measured in points. Ignored in full-screen mode...
Definition: App.h:320
cinder::app::RendererRef getRenderer()
Definition: AppCocoaTouch.mm:1046
signals::signal< void()> & getSignalUpdate()
Emitted at the start of each application update cycle.
Definition: App.h:281
Vec2i getWindowPos() const
Returns tcoordinates of the top-left corner of the current window measured in points.
Definition: App.h:337
DisplayRef getDisplay() const
Returns the display for the default window.
Definition: App.h:171
bool mPowerManagement
Definition: App.h:563
std::result_of< T()>::type dispatchSync(T fn)
Definition: App.h:466
Vec2i getWindowPos() const
Returns the position of the default window in screen coordinates measured in pixels.
Definition: App.h:142
Represents a touch event.
Definition: TouchEvent.h:34
WindowRef getWindowIndex(size_t index)
Gets a Window by index, in the range [0, getNumWindows()).
Definition: App.h:574
const std::string & getTitle() const
the title of the app reflected in ways particular to the app type and platform (such as its Window or...
Definition: App.h:200
std::shared_ptr< class DataSource > DataSourceRef
Definition: DataSource.h:35
GLdouble s
Definition: GLee.h:1378
bool isHighDensityDisplayEnabled() const
Returns whether Windows created on a high-density (Retina) display will have their resolution doubled...
Definition: App.h:182
Definition: Timeline.h:42
bool mEnableHighDensityDisplay
Definition: App.h:227
GLenum GLint GLuint mask
Definition: GLee.h:2241
float getFrameRate()
Returns the maximum frame-rate the active App will attempt to maintain.
Definition: App.h:601
fs::path getSaveFilePath(const fs::path &initialPath="", std::vector< std::string > extensions=std::vector< std::string >())
Presents the user with a file-save dialog and returns the selected file path.
Definition: App.cpp:426
DataSourceRef loadAsset(const fs::path &relativePath)
Returns a DataSourceRef to an application asset. Throws a AssetLoadExc on failure.
Definition: App.cpp:277
Definition: AppImplMsw.h:63
void setResizable(bool resizable=true)
Sets the default window to be resizable or not.
Definition: App.h:160
GLclampf f
Definition: GLee.h:15307
RendererRef getDefaultRenderer() const
Returns the default Renderer which will be used when creating a new Window. Set by the app instantiat...
Definition: App.h:484
Represents a keyboard event.
Definition: KeyEvent.h:32
fs::path getAssetPath(const fs::path &relativePath)
Returns a fs::path to an application asset. Returns an empty path on failure.
Definition: App.cpp:286
signals::signal< void()> & getSignalDidBecomeActive()
Definition: App.h:290
Settings()
Definition: App.cpp:66
Definition: CinderView.h:54
GLsizeiptr size
Definition: GLee.h:2089
void setWindowPos(const Vec2i &windowPos)
Sets the position of the default window in screen coordinates measured in pixels. ...
Definition: App.h:146
const std::vector< TouchEvent::Touch > & getActiveTouches() const
Definition: App.h:294
Vec2i getWindowSize() const
Gets the size of the default window measured in pixels.
Definition: App.h:139
void setDisplay(DisplayRef display)
Sets the display for the default window.
Definition: App.h:173
Vec2< int > Vec2i
Definition: Vector.h:1313
void setFullScreen(bool fullScreen=true)
Sets whether the active App is in full-screen mode based on fullScreen.
Definition: App.h:607
virtual void fileDrop(FileDropEvent event)
Override to receive file-drop events.
Definition: App.h:275