jGL
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
jGL::DesktopDisplay Class Reference

#include <desktopDisplay.h>

Inheritance diagram for jGL::DesktopDisplay:
Inheritance graph
[legend]
Collaboration diagram for jGL::DesktopDisplay:
Collaboration graph
[legend]

Classes

struct  Config
 
struct  WindowData
 

Public Member Functions

 DesktopDisplay (glm::ivec2 res, const char *title, GLFWkeyfun keyCallback, GLFWmousebuttonfun mouseButtonCallback, GLFWscrollfun mouseScrollCallback, const Config conf)
 
 DesktopDisplay (glm::ivec2 res, const char *title, const Config conf)
 
 ~DesktopDisplay ()
 
GLFWwindow * getWindow () const
 
bool isOpen ()
 
bool closing ()
 
void open ()
 
void close ()
 
void setAsFocus ()
 
void keyCallback (GLFWwindow *window, int key, int scancode, int action, int mods)
 
void mousePosition (double &x, double &y)
 
void setMousePosition (double x, double y)
 
int getKeyLastState (int key)
 
void loop ()
 
std::vector< EventgetEvents (int code)
 
bool keyHasEvent (int key, EventType action)
 
bool keyHasAnyEvents (int key, std::vector< EventType > actions)
 
std::vector< EventTypegetEventTypes (int code)
 
Event getEvent (int code)
 
void setIcon (const std::vector< std::vector< std::byte > > &icons)
 
glm::ivec2 frameBufferSize () const
 
glm::ivec2 windowSize () const
 
glm::vec2 contentScale () const
 
glm::ivec4 windowFrameSize () const
 
glm::ivec2 windowPosition () const
 
void setWindowPosition (glm::ivec2 s)
 
- Public Member Functions inherited from jGL::Display
 Display (glm::ivec2 res)
 
unsigned getResX () const
 
unsigned getResY () const
 
glm::ivec2 getRes () const
 
virtual void setFrameLimit (unsigned fps)
 

Additional Inherited Members

- Protected Member Functions inherited from jGL::Display
virtual void throttle ()
 
- Protected Attributes inherited from jGL::Display
glm::ivec2 resolution
 
bool unlimited
 
unsigned framesPerSecond
 
std::chrono::microseconds microsPerFrame
 
std::chrono::steady_clock::time_point lastFrame
 

Constructor & Destructor Documentation

◆ DesktopDisplay() [1/2]

jGL::DesktopDisplay::DesktopDisplay ( glm::ivec2  res,
const char *  title,
GLFWkeyfun  keyCallback,
GLFWmousebuttonfun  mouseButtonCallback,
GLFWscrollfun  mouseScrollCallback,
const Config  conf 
)

◆ DesktopDisplay() [2/2]

jGL::DesktopDisplay::DesktopDisplay ( glm::ivec2  res,
const char *  title,
const Config  conf 
)

◆ ~DesktopDisplay()

jGL::DesktopDisplay::~DesktopDisplay ( )
inline

Member Function Documentation

◆ close()

void jGL::DesktopDisplay::close ( )
inline

◆ closing()

bool jGL::DesktopDisplay::closing ( )
inline

◆ contentScale()

glm::vec2 jGL::DesktopDisplay::contentScale ( ) const
inline

◆ frameBufferSize()

glm::ivec2 jGL::DesktopDisplay::frameBufferSize ( ) const
inline

◆ getEvent()

Event jGL::DesktopDisplay::getEvent ( int  code)
inline

◆ getEvents()

std::vector< Event > jGL::DesktopDisplay::getEvents ( int  code)
inline

◆ getEventTypes()

std::vector< EventType > jGL::DesktopDisplay::getEventTypes ( int  code)
inline

◆ getKeyLastState()

int jGL::DesktopDisplay::getKeyLastState ( int  key)
inline

◆ getWindow()

GLFWwindow * jGL::DesktopDisplay::getWindow ( ) const
inline

◆ isOpen()

bool jGL::DesktopDisplay::isOpen ( )
inline

◆ keyCallback()

void jGL::DesktopDisplay::keyCallback ( GLFWwindow *  window,
int  key,
int  scancode,
int  action,
int  mods 
)

◆ keyHasAnyEvents()

bool jGL::DesktopDisplay::keyHasAnyEvents ( int  key,
std::vector< EventType actions 
)
inline

◆ keyHasEvent()

bool jGL::DesktopDisplay::keyHasEvent ( int  key,
EventType  action 
)
inline

◆ loop()

void jGL::DesktopDisplay::loop ( )
inlinevirtual

Reimplemented from jGL::Display.

◆ mousePosition()

void jGL::DesktopDisplay::mousePosition ( double &  x,
double &  y 
)
inline

◆ open()

void jGL::DesktopDisplay::open ( )
inline

◆ setAsFocus()

void jGL::DesktopDisplay::setAsFocus ( )
inline

◆ setIcon()

void jGL::DesktopDisplay::setIcon ( const std::vector< std::vector< std::byte > > &  icons)
inline

◆ setMousePosition()

void jGL::DesktopDisplay::setMousePosition ( double  x,
double  y 
)
inline

◆ setWindowPosition()

void jGL::DesktopDisplay::setWindowPosition ( glm::ivec2  s)
inline

◆ windowFrameSize()

glm::ivec4 jGL::DesktopDisplay::windowFrameSize ( ) const
inline

◆ windowPosition()

glm::ivec2 jGL::DesktopDisplay::windowPosition ( ) const
inline

◆ windowSize()

glm::ivec2 jGL::DesktopDisplay::windowSize ( ) const
inline

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