The display manager class.
More...
#include <display_manager_gtk4.h>
|
|
static std::string | text_ = "0x0" |
| | The text to display.
|
| |
|
| static void | Activate (GtkApplication *app, gpointer user_data) |
| | GTK4 Activate callback.
|
| |
| static void | Destroy (GtkWidget *widget, gpointer data) |
| | Destroy the GTK4 window.
|
| |
| static void | DrawCallback (GtkDrawingArea *area, cairo_t *cr, int width, int height, gpointer user_data) |
| | Refesh the display.
|
| |
| static void | DrawText (unsigned char *bitmap, int width, int height, const char *text) |
| | Draw text on the screen.
|
| |
| static gboolean | RenderCallback (GtkGLArea *area, GdkGLContext *context) |
| | Render the display.
|
| |
| static void | ResizeCallback (GtkGLArea *area, int width, int height) |
| | Resize the display.
|
| |
| static void | RealizeCallback (GtkGLArea *area) |
| | Create the context.
|
| |
| static void | UnrealizeCallback (GtkGLArea *area) |
| | Unrealize the context.
|
| |
|
|
bool | initaliased_ = false |
| | Initalized flag.
|
| |
|
| static GLuint | texture_ |
| | The frame buffer.
|
| |
|
static GLuint | texture2_ |
| | The second texture.
|
| |
| static std::vector< uint8_t > | frame_buffer_ |
| | Frame buffer device.
|
| |
| static int | width_ = kDefaultWidth |
| | The default width.
|
| |
| static int | height_ = kDefaultHeight |
| | The default height.
|
| |
| static GtkApplication * | app_ |
| | The GTK4 application.
|
| |
| static GtkWidget * | window_ |
| | The GTK4 window.
|
| |
| static GtkWidget * | drawing_area_ |
| | The drawing area.
|
| |
| static std::mutex | frame_buffer_mutex_ |
| | The mutex for the frame buffer.
|
| |
| static std::vector< uint8_t > | draw_buffer_ |
| | The draw buffer.
|
| |
| static std::vector< uint8_t > | draw_buffer_flip_ |
| | The draw buffer flip.
|
| |
| static GtkWidget * | gl_area_ |
| | The running flag.
|
| |
|
static bool | fullscreen_ = false |
| | The running flag.
|
| |
|
static bool | opengl_ = false |
| | The running flag.
|
| |
|
|
Resolution | last_requested_resolution_ = {0, 0, 0} |
| | Last requested resolution.
|
| |
|
std::vector< uint8_t > | scaled_frame_buffer_ |
| | Scaled frame buffer for resolutions that do not match the display.
|
| |
|
std::string | name_ |
| | The name of the display, can be used in the window title if windowing is supported.
|
| |
The display manager class.
◆ Activate()
| void mediax::gtk4::DisplayManager::Activate |
( |
GtkApplication * |
app, |
|
|
gpointer |
user_data |
|
) |
| |
|
staticprivate |
GTK4 Activate callback.
- Parameters
-
◆ Destroy()
| void mediax::gtk4::DisplayManager::Destroy |
( |
GtkWidget * |
widget, |
|
|
gpointer |
data |
|
) |
| |
|
staticprivate |
Destroy the GTK4 window.
- Parameters
-
◆ DisplayBuffer()
| Status mediax::gtk4::DisplayManager::DisplayBuffer |
( |
uint8_t * |
frame_buffer, |
|
|
Resolution |
resolution, |
|
|
std::string |
text |
|
) |
| |
|
overridevirtual |
Buffer must be in the format RGBA.
- Parameters
-
| frame_buffer | the frame buffer to display |
| resolution | the resolution of the frame buffer |
| text | the text to display |
- Returns
- Status
Implements mediax::DisplayManagerBase.
◆ DrawCallback()
| void mediax::gtk4::DisplayManager::DrawCallback |
( |
GtkDrawingArea * |
area, |
|
|
cairo_t * |
cr, |
|
|
int |
width, |
|
|
int |
height, |
|
|
gpointer |
user_data |
|
) |
| |
|
staticprivate |
Refesh the display.
- Parameters
-
| area | |
| cr | |
| width | |
| height | |
| user_data | |
◆ DrawText()
| static void mediax::gtk4::DisplayManager::DrawText |
( |
unsigned char * |
bitmap, |
|
|
int |
width, |
|
|
int |
height, |
|
|
const char * |
text |
|
) |
| |
|
staticprivate |
Draw text on the screen.
- Parameters
-
◆ Flush()
| void mediax::gtk4::DisplayManager::Flush |
( |
| ) |
|
|
overridevirtual |
◆ GetBytesPerPixel()
| int mediax::gtk4::DisplayManager::GetBytesPerPixel |
( |
| ) |
|
|
inlinefinalvirtual |
◆ GetColourspace()
◆ GetResolution()
| Resolution mediax::gtk4::DisplayManager::GetResolution |
( |
| ) |
|
|
overridevirtual |
◆ Initalise() [1/2]
| Status mediax::gtk4::DisplayManager::Initalise |
( |
| ) |
|
|
overridevirtual |
◆ Initalise() [2/2]
| Status mediax::gtk4::DisplayManager::Initalise |
( |
uint32_t |
width, |
|
|
uint32_t |
height, |
|
|
bool |
fullscreen |
|
) |
| |
Initalise the display manager.
- Returns
- StatusDisplayManager
◆ operator=()
◆ RealizeCallback()
| void mediax::gtk4::DisplayManager::RealizeCallback |
( |
GtkGLArea * |
area | ) |
|
|
staticprivate |
Create the context.
- Parameters
-
◆ RenderCallback()
| gboolean mediax::gtk4::DisplayManager::RenderCallback |
( |
GtkGLArea * |
area, |
|
|
GdkGLContext * |
context |
|
) |
| |
|
staticprivate |
Render the display.
- Parameters
-
- Returns
- gboolean
◆ ResizeCallback()
| void mediax::gtk4::DisplayManager::ResizeCallback |
( |
GtkGLArea * |
area, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
|
staticprivate |
Resize the display.
- Parameters
-
◆ Run()
| void mediax::gtk4::DisplayManager::Run |
( |
| ) |
|
|
overridevirtual |
◆ Stop()
| void mediax::gtk4::DisplayManager::Stop |
( |
| ) |
|
|
overridevirtual |
◆ ToggleFullscreen()
| void mediax::gtk4::DisplayManager::ToggleFullscreen |
( |
| ) |
|
|
overridevirtual |
◆ UnrealizeCallback()
| void mediax::gtk4::DisplayManager::UnrealizeCallback |
( |
GtkGLArea * |
area | ) |
|
|
staticprivate |
Unrealize the context.
- Parameters
-
◆ app_
| GtkApplication * mediax::gtk4::DisplayManager::app_ |
|
staticprivate |
The GTK4 application.
GTK4 application.
◆ draw_buffer_
| std::vector< uint8_t > mediax::gtk4::DisplayManager::draw_buffer_ |
|
staticprivate |
The draw buffer.
Draw buffer.
◆ draw_buffer_flip_
| std::vector< uint8_t > mediax::gtk4::DisplayManager::draw_buffer_flip_ |
|
staticprivate |
The draw buffer flip.
Draw buffer flip.
◆ drawing_area_
| GtkWidget * mediax::gtk4::DisplayManager::drawing_area_ |
|
staticprivate |
The drawing area.
GTK4 drawing area.
◆ frame_buffer_
| std::vector< uint8_t > mediax::gtk4::DisplayManager::frame_buffer_ |
|
staticprivate |
Frame buffer device.
Static frame buffer.
◆ frame_buffer_mutex_
| std::mutex mediax::gtk4::DisplayManager::frame_buffer_mutex_ |
|
staticprivate |
The mutex for the frame buffer.
Mutex.
◆ gl_area_
| GtkWidget * mediax::gtk4::DisplayManager::gl_area_ |
|
staticprivate |
The running flag.
OpenGL.
◆ height_
The default height.
Initalise height (default)
◆ texture_
| GLuint mediax::gtk4::DisplayManager::texture_ |
|
staticprivate |
The frame buffer.
Texture.
◆ width_
The default width.
Initalise width (default)
◆ window_
| GtkWidget * mediax::gtk4::DisplayManager::window_ |
|
staticprivate |
The GTK4 window.
GTK4 window.
The documentation for this class was generated from the following files: