reference

This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.

#include <ofAppEGLWindow.h>

Inheritance diagram for ofAppEGLWindow:
ofAppBaseGLESWindow ofThread ofAppBaseWindow

Public Types

typedef ofAppEGLWindowSettings Settings
 
- Public Types inherited from ofThread
enum  { INFINITE_JOIN_TIMEOUT = -1 }
 

Public Member Functions

 ofAppEGLWindow ()
 
virtual ~ofAppEGLWindow ()
 
void setup (const ofAppEGLWindowSettings &settings)
 
void setup (const ofGLESWindowSettings &settings)
 
void update ()
 
void draw ()
 
void close ()
 
void makeCurrent ()
 
void swapBuffers ()
 
void startRender ()
 
void finishRender ()
 
ofCoreEventsevents ()
 
std::shared_ptr< ofBaseRenderer > & renderer ()
 
void setThreadTimeout (long timeOut)
 
virtual void hideCursor ()
 
virtual void showCursor ()
 
virtual void setWindowPosition (int x, int y)
 
virtual void setWindowShape (int w, int h)
 
virtual glm::vec2 getWindowPosition ()
 
virtual glm::vec2 getWindowSize ()
 
virtual glm::vec2 getScreenSize ()
 
virtual void setOrientation (ofOrientation orientation)
 
virtual ofOrientation getOrientation ()
 
virtual bool doesHWOrientation ()
 
virtual int getWidth ()
 
virtual int getHeight ()
 
virtual void setWindowTitle (std::string title)
 
virtual ofWindowMode getWindowMode ()
 
virtual void setFullscreen (bool fullscreen)
 
virtual void toggleFullscreen ()
 
virtual void enableSetupScreen ()
 
virtual void disableSetupScreen ()
 
virtual void setVerticalSync (bool enabled)
 
EGLDisplay getEglDisplay () const
 
EGLSurface getEglSurface () const
 
EGLContext getEglContext () const
 
DisplaygetX11Display ()
 
Window getX11Window ()
 
EGLConfig getEglConfig () const
 
EGLint getEglVersionMajor () const
 
EGLint getEglVersionMinor () const
 
virtual void setup (const ofGLESWindowSettings &settings)=0
 
void setup (const ofWindowSettings &settings)
 
- Public Member Functions inherited from ofAppBaseGLESWindow
virtual ~ofAppBaseGLESWindow ()
 
- Public Member Functions inherited from ofAppBaseWindow
 ofAppBaseWindow ()
 
virtual ~ofAppBaseWindow ()
 
virtual bool getWindowShouldClose ()
 
virtual void setWindowShouldClose ()
 
virtual void setClipboardString (const std::string &text)
 
virtual std::string getClipboardString ()
 
virtual void * getWindowContext ()
 
- Public Member Functions inherited from ofThread
 ofThread ()
 Create an ofThread.
 
bool isThreadRunning () const
 Check the running status of the thread.
 
std::thread::id getThreadId () const
 Get the unique thread id.
 
std::string getThreadName () const
 Get the unique thread name, in the form of "Thread id#".
 
void setThreadName (const std::string &name)
 
void startThread ()
 Start the thread.
 
 OF_DEPRECATED_MSG ("Use tryLock instead of setting the type of lock on startThread", void startThread(bool mutexBlocks))
 Start the thread with options.
 
bool lock ()
 Lock the mutex.
 
bool tryLock ()
 Tries to lock the mutex.
 
void unlock ()
 Unlock the mutex.
 
void stopThread ()
 Stop the thread.
 
void waitForThread (bool callStopThread=true, long milliseconds=INFINITE_JOIN_TIMEOUT)
 Wait for the thread to exit (aka "joining" the thread).
 
void sleep (long milliseconds)
 Tell the thread to sleep for a certain amount of milliseconds.
 
void yield ()
 Tell the thread to give up its CPU time other threads.
 
bool isCurrentThread () const
 Query whether the current thread is active.
 
std::thread & getNativeThread ()
 Get a reference to the underlying Poco thread.
 
const std::thread & getNativeThread () const
 Get a const reference to the underlying Poco thread.
 

Static Public Member Functions

static void loop ()
 
static bool doesLoop ()
 
static bool allowsMultiWindow ()
 
static bool needsPolling ()
 
static void pollEvents ()
 

Protected Member Functions

void setWindowRect (const ofRectangle &requestedWindowRect)
 
virtual void setupPeripherals ()
 
virtual ofRectangle getScreenRect ()
 
int getWindowWidth ()
 
int getWindowHeight ()
 
void threadedFunction ()
 The thread's run function.
 
void checkEvents ()
 
bool hasMouse ()
 
bool hasKeyboard ()
 
bool createSurface ()
 
bool destroySurface ()
 
bool createWindow (const ofRectangle &requestedWindowRect)
 
bool destroyWindow ()
 
void initNative ()
 
void exitNative ()
 
EGLNativeWindowType getNativeWindow ()
 
EGLNativeDisplayType getNativeDisplay ()
 
bool createX11NativeWindow (const ofRectangle &requestedWindowRect)
 
void setupNativeEvents ()
 
void destroyNativeEvents ()
 
void setupNativeUDev ()
 
void destroyNativeUDev ()
 
void setupNativeInput ()
 
void destroyNativeInput ()
 
void readNativeUDevEvents ()
 
void readNativeInputEvents ()
 
void processInput (int fd, const char *node)
 
void addInput (const char *node, bool isMouse)
 
void removeInput (const char *node)
 
void printInput ()
 

Static Protected Member Functions

static void handleX11Event (const XEvent &event)
 

Protected Attributes

ofWindowMode windowMode
 
bool bNewScreenMode
 This indicates if a (new) window rectangle has to be adjusted.
 
int buttonInUse
 Mouse button currently in use.
 
bool bEnableSetupScreen
 This indicates the need/intent to draw a setup screen.
 
bool bShowCursor
 Indicate the visibility of the (mouse) cursor.
 
std::string eglDisplayString
 
int nFramesSinceWindowResized
 The number of frames passed/shown since the window got resized.
 
ofOrientation orientation
 
std::queue< ofMouseEventArgsmouseEvents
 
std::queue< ofKeyEventArgskeyEvents
 
std::queue< ofTouchEventArgstouchEvents
 
ofImage mouseCursor
 
float mouseScaleX
 Amount by which to mouse movements along the X axis.
 
float mouseScaleY
 Amount by which to mouse movements along the Y axis.
 
int mouseAbsXMin
 
int mouseAbsXMax
 
int mouseAbsYMin
 
int mouseAbsYMax
 
EGLDisplay eglDisplay
 
EGLSurface eglSurface
 
EGLContext eglContext
 
EGLConfig eglConfig
 
EGLint eglVersionMajor
 
EGLint eglVersionMinor
 
ofRectangle nonFullscreenWindowRect
 
ofRectangle currentWindowRect
 
bool isUsingX11
 Indicate the use of the X Window System.
 
bool isWindowInited
 Indicate that the window is (properly) initialized.
 
bool isSurfaceInited
 Indicate that the surface is (properly) initialized.
 
Displayx11Display
 Indicate which X11 display is in use (currently).
 
Screen * x11Screen
 Indicate which X11 screen is in use (currently).
 
Window x11Window
 
long x11ScreenNum
 The number of the X11 screen is in use (currently).
 
- Protected Attributes inherited from ofThread
std::thread thread
 The Poco::Thread that runs the Poco::Runnable.
 
std::mutex mutex
 The internal mutex called through lock() & unlock().
 

Member Typedef Documentation

◆ Settings

Constructor & Destructor Documentation

◆ ofAppEGLWindow()

ofAppEGLWindow::ofAppEGLWindow ( )

◆ ~ofAppEGLWindow()

ofAppEGLWindow::~ofAppEGLWindow ( )
virtual

Member Function Documentation

◆ addInput()

void ofAppEGLWindow::addInput ( const char *  node,
bool  isMouse 
)
protected

◆ allowsMultiWindow()

static bool ofAppEGLWindow::allowsMultiWindow ( )
inlinestatic

◆ checkEvents()

void ofAppEGLWindow::checkEvents ( )
protected

◆ close()

void ofAppEGLWindow::close ( )
virtual

Reimplemented from ofAppBaseWindow.

◆ createSurface()

bool ofAppEGLWindow::createSurface ( )
protected

◆ createWindow()

bool ofAppEGLWindow::createWindow ( const ofRectangle requestedWindowRect)
protected

◆ createX11NativeWindow()

bool ofAppEGLWindow::createX11NativeWindow ( const ofRectangle requestedWindowRect)
protected

◆ destroyNativeEvents()

void ofAppEGLWindow::destroyNativeEvents ( )
protected

◆ destroyNativeInput()

void ofAppEGLWindow::destroyNativeInput ( )
protected

◆ destroyNativeUDev()

void ofAppEGLWindow::destroyNativeUDev ( )
protected

◆ destroySurface()

bool ofAppEGLWindow::destroySurface ( )
protected

◆ destroyWindow()

bool ofAppEGLWindow::destroyWindow ( )
protected

◆ disableSetupScreen()

void ofAppEGLWindow::disableSetupScreen ( )
virtual

Reimplemented from ofAppBaseWindow.

◆ doesHWOrientation()

bool ofAppEGLWindow::doesHWOrientation ( )
virtual

Reimplemented from ofAppBaseWindow.

◆ doesLoop()

static bool ofAppEGLWindow::doesLoop ( )
inlinestatic

◆ draw()

void ofAppEGLWindow::draw ( )
virtual

Implements ofAppBaseWindow.

◆ enableSetupScreen()

void ofAppEGLWindow::enableSetupScreen ( )
virtual

Reimplemented from ofAppBaseWindow.

◆ events()

ofCoreEvents & ofAppEGLWindow::events ( )
virtual

Implements ofAppBaseWindow.

◆ exitNative()

void ofAppEGLWindow::exitNative ( )
protected

◆ finishRender()

void ofAppEGLWindow::finishRender ( )
virtual

Reimplemented from ofAppBaseWindow.

◆ getEglConfig()

EGLConfig ofAppEGLWindow::getEglConfig ( ) const

◆ getEglContext()

EGLContext ofAppEGLWindow::getEglContext ( ) const

◆ getEglDisplay()

EGLDisplay ofAppEGLWindow::getEglDisplay ( ) const

◆ getEglSurface()

EGLSurface ofAppEGLWindow::getEglSurface ( ) const

◆ getEglVersionMajor()

EGLint ofAppEGLWindow::getEglVersionMajor ( ) const

◆ getEglVersionMinor()

EGLint ofAppEGLWindow::getEglVersionMinor ( ) const

◆ getHeight()

int ofAppEGLWindow::getHeight ( )
virtual

Reimplemented from ofAppBaseWindow.

◆ getNativeDisplay()

EGLNativeDisplayType ofAppEGLWindow::getNativeDisplay ( )
protected

◆ getNativeWindow()

EGLNativeWindowType ofAppEGLWindow::getNativeWindow ( )
protected

◆ getOrientation()

ofOrientation ofAppEGLWindow::getOrientation ( )
virtual

Reimplemented from ofAppBaseWindow.

◆ getScreenRect()

ofRectangle ofAppEGLWindow::getScreenRect ( )
protectedvirtual

◆ getScreenSize()

glm::vec2 ofAppEGLWindow::getScreenSize ( )
virtual

Reimplemented from ofAppBaseWindow.

◆ getWidth()

int ofAppEGLWindow::getWidth ( )
virtual

Reimplemented from ofAppBaseWindow.

◆ getWindowHeight()

int ofAppEGLWindow::getWindowHeight ( )
protected

◆ getWindowMode()

ofWindowMode ofAppEGLWindow::getWindowMode ( )
virtual

Reimplemented from ofAppBaseWindow.

◆ getWindowPosition()

glm::vec2 ofAppEGLWindow::getWindowPosition ( )
virtual

Reimplemented from ofAppBaseWindow.

◆ getWindowSize()

glm::vec2 ofAppEGLWindow::getWindowSize ( )
virtual

Reimplemented from ofAppBaseWindow.

◆ getWindowWidth()

int ofAppEGLWindow::getWindowWidth ( )
protected

◆ getX11Display()

Display * ofAppEGLWindow::getX11Display ( )

◆ getX11Window()

Window ofAppEGLWindow::getX11Window ( )

◆ handleX11Event()

void ofAppEGLWindow::handleX11Event ( const XEvent &  event)
staticprotected

◆ hasKeyboard()

bool ofAppEGLWindow::hasKeyboard ( )
inlineprotected

◆ hasMouse()

bool ofAppEGLWindow::hasMouse ( )
inlineprotected

◆ hideCursor()

void ofAppEGLWindow::hideCursor ( )
virtual

Reimplemented from ofAppBaseWindow.

◆ initNative()

void ofAppEGLWindow::initNative ( )
protected

◆ loop()

static void ofAppEGLWindow::loop ( )
inlinestatic

◆ makeCurrent()

void ofAppEGLWindow::makeCurrent ( )
virtual

Reimplemented from ofAppBaseWindow.

◆ needsPolling()

static bool ofAppEGLWindow::needsPolling ( )
inlinestatic

◆ pollEvents()

void ofAppEGLWindow::pollEvents ( )
static

◆ printInput()

void ofAppEGLWindow::printInput ( )
protected

◆ processInput()

void ofAppEGLWindow::processInput ( int  fd,
const char *  node 
)
protected

◆ readNativeInputEvents()

void ofAppEGLWindow::readNativeInputEvents ( )
protected

◆ readNativeUDevEvents()

void ofAppEGLWindow::readNativeUDevEvents ( )
protected

◆ removeInput()

void ofAppEGLWindow::removeInput ( const char *  node)
protected

◆ renderer()

shared_ptr< ofBaseRenderer > & ofAppEGLWindow::renderer ( )
virtual

Implements ofAppBaseWindow.

◆ setFullscreen()

void ofAppEGLWindow::setFullscreen ( bool  fullscreen)
virtual

Reimplemented from ofAppBaseWindow.

◆ setOrientation()

void ofAppEGLWindow::setOrientation ( ofOrientation  orientation)
virtual

Reimplemented from ofAppBaseWindow.

◆ setThreadTimeout()

void ofAppEGLWindow::setThreadTimeout ( long  timeOut)
inline

◆ setup() [1/4]

void ofAppEGLWindow::setup ( const ofAppEGLWindowSettings settings)

◆ setup() [2/4]

void ofAppEGLWindow::setup ( const ofGLESWindowSettings settings)
virtual

Implements ofAppBaseGLESWindow.

◆ setup() [3/4]

virtual void ofAppBaseGLESWindow::setup ( const ofGLESWindowSettings settings)
virtual

Implements ofAppBaseGLESWindow.

◆ setup() [4/4]

void ofAppBaseGLESWindow::setup ( const ofWindowSettings settings)
inlinevirtual

Reimplemented from ofAppBaseGLESWindow.

◆ setupNativeEvents()

void ofAppEGLWindow::setupNativeEvents ( )
protected

◆ setupNativeInput()

void ofAppEGLWindow::setupNativeInput ( )
protected

◆ setupNativeUDev()

void ofAppEGLWindow::setupNativeUDev ( )
protected

◆ setupPeripherals()

void ofAppEGLWindow::setupPeripherals ( )
protectedvirtual

◆ setVerticalSync()

void ofAppEGLWindow::setVerticalSync ( bool  enabled)
virtual

Reimplemented from ofAppBaseWindow.

◆ setWindowPosition()

void ofAppEGLWindow::setWindowPosition ( int  x,
int  y 
)
virtual

Reimplemented from ofAppBaseWindow.

◆ setWindowRect()

void ofAppEGLWindow::setWindowRect ( const ofRectangle requestedWindowRect)
protected

◆ setWindowShape()

void ofAppEGLWindow::setWindowShape ( int  w,
int  h 
)
virtual

Reimplemented from ofAppBaseWindow.

◆ setWindowTitle()

void ofAppEGLWindow::setWindowTitle ( std::string  title)
virtual

Reimplemented from ofAppBaseWindow.

◆ showCursor()

void ofAppEGLWindow::showCursor ( )
virtual

Reimplemented from ofAppBaseWindow.

◆ startRender()

void ofAppEGLWindow::startRender ( )
virtual

Reimplemented from ofAppBaseWindow.

◆ swapBuffers()

void ofAppEGLWindow::swapBuffers ( )
virtual

Reimplemented from ofAppBaseWindow.

◆ threadedFunction()

void ofAppEGLWindow::threadedFunction ( )
protectedvirtual

The thread's run function.

Users must overide this in your their derived class and then implement their threaded activity inside the loop. If the the users's threadedFunction does not have a loop, the contents of the threadedFunction will be executed once and the thread will then exit.

For tasks that must be repeated, the user can use a while loop that will run repeatedly until the thread's threadRunning is set to false via the stopThread() method.

void MyThreadedClass::threadedFunction()
{
    // Start the loop and continue until
    // isThreadRunning() returns false.
    while(isThreadRunning())
    {
        // Do activity repeatedly here:

        // int j = 1 + 1;

        // This while loop will run as fast as it possibly
        // can, consuming as much processor speed as it can.
        // To help the processor stay cool, users are
        // encouraged to let the while loop sleep via the
        // sleep() method, or call the yield() method to let
        // other threads have a turn.  See the sleep() and
        // yield() methods for more information.

        // sleep(100);
    }
}

Reimplemented from ofThread.

◆ toggleFullscreen()

void ofAppEGLWindow::toggleFullscreen ( )
virtual

Reimplemented from ofAppBaseWindow.

◆ update()

void ofAppEGLWindow::update ( )
virtual

Implements ofAppBaseWindow.

Member Data Documentation

◆ bEnableSetupScreen

bool ofAppEGLWindow::bEnableSetupScreen
protected

This indicates the need/intent to draw a setup screen.

◆ bNewScreenMode

bool ofAppEGLWindow::bNewScreenMode
protected

This indicates if a (new) window rectangle has to be adjusted.

◆ bShowCursor

bool ofAppEGLWindow::bShowCursor
protected

Indicate the visibility of the (mouse) cursor.

◆ buttonInUse

int ofAppEGLWindow::buttonInUse
protected

Mouse button currently in use.

◆ currentWindowRect

ofRectangle ofAppEGLWindow::currentWindowRect
protected

◆ eglConfig

EGLConfig ofAppEGLWindow::eglConfig
protected

◆ eglContext

EGLContext ofAppEGLWindow::eglContext
protected

◆ eglDisplay

EGLDisplay ofAppEGLWindow::eglDisplay
protected

◆ eglDisplayString

std::string ofAppEGLWindow::eglDisplayString
protected

◆ eglSurface

EGLSurface ofAppEGLWindow::eglSurface
protected

◆ eglVersionMajor

EGLint ofAppEGLWindow::eglVersionMajor
protected

◆ eglVersionMinor

EGLint ofAppEGLWindow::eglVersionMinor
protected

◆ isSurfaceInited

bool ofAppEGLWindow::isSurfaceInited
protected

Indicate that the surface is (properly) initialized.

◆ isUsingX11

bool ofAppEGLWindow::isUsingX11
protected

Indicate the use of the X Window System.

◆ isWindowInited

bool ofAppEGLWindow::isWindowInited
protected

Indicate that the window is (properly) initialized.

◆ keyEvents

std::queue<ofKeyEventArgs> ofAppEGLWindow::keyEvents
protected

◆ mouseAbsXMax

int ofAppEGLWindow::mouseAbsXMax
protected

◆ mouseAbsXMin

int ofAppEGLWindow::mouseAbsXMin
protected

◆ mouseAbsYMax

int ofAppEGLWindow::mouseAbsYMax
protected

◆ mouseAbsYMin

int ofAppEGLWindow::mouseAbsYMin
protected

◆ mouseCursor

ofImage ofAppEGLWindow::mouseCursor
protected

◆ mouseEvents

std::queue<ofMouseEventArgs> ofAppEGLWindow::mouseEvents
protected

◆ mouseScaleX

float ofAppEGLWindow::mouseScaleX
protected

Amount by which to mouse movements along the X axis.

◆ mouseScaleY

float ofAppEGLWindow::mouseScaleY
protected

Amount by which to mouse movements along the Y axis.

◆ nFramesSinceWindowResized

int ofAppEGLWindow::nFramesSinceWindowResized
protected

The number of frames passed/shown since the window got resized.

◆ nonFullscreenWindowRect

ofRectangle ofAppEGLWindow::nonFullscreenWindowRect
protected

◆ orientation

ofOrientation ofAppEGLWindow::orientation
protected

◆ touchEvents

std::queue<ofTouchEventArgs> ofAppEGLWindow::touchEvents
protected

◆ windowMode

ofWindowMode ofAppEGLWindow::windowMode
protected

◆ x11Display

Display* ofAppEGLWindow::x11Display
protected

Indicate which X11 display is in use (currently).

◆ x11Screen

Screen* ofAppEGLWindow::x11Screen
protected

Indicate which X11 screen is in use (currently).

◆ x11ScreenNum

long ofAppEGLWindow::x11ScreenNum
protected

The number of the X11 screen is in use (currently).

◆ x11Window

Window ofAppEGLWindow::x11Window
protected

The documentation for this class was generated from the following files: