Scroom 0.14-49-gb7ae7a6d
Loading...
Searching...
No Matches
measure-framerate-callbacks.hh File Reference
#include <vector>
#include <boost/function.hpp>
#include <gtk/gtk.h>
Include dependency graph for measure-framerate-callbacks.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

GtkWidget * create_window ()
 
void init ()
 
void invalidate ()
 

Variables

std::vector< boost::function< bool()> > functions
 

Function Documentation

◆ create_window()

GtkWidget * create_window ( )
78{
79 GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
80 gtk_window_set_title(GTK_WINDOW(window), "Measure Framerate");
81 gtk_window_maximize(GTK_WINDOW(window));
82
83 g_signal_connect(static_cast<gpointer>(window), "hide", G_CALLBACK(on_hide), NULL);
84
85 drawingArea = gtk_drawing_area_new();
86 gtk_container_add(GTK_CONTAINER(window), drawingArea);
87 g_signal_connect(static_cast<gpointer>(drawingArea), "draw", G_CALLBACK(on_expose), NULL);
88 g_signal_connect(static_cast<gpointer>(drawingArea), "configure_event", G_CALLBACK(on_configure), NULL);
89
90 gtk_widget_show(drawingArea);
91 gtk_widget_show(window);
92
93 return window;
94}
static gboolean on_configure(GtkWidget *, GdkEventConfigure *, gpointer)
Definition measure-framerate-callbacks.cc:21
static gboolean on_expose(GtkWidget *widget, GdkEventExpose *, gpointer)
Definition measure-framerate-callbacks.cc:38
static GtkWidget * drawingArea
Definition measure-framerate-callbacks.cc:16
static void on_hide(GtkWidget *, gpointer)
Definition measure-framerate-callbacks.cc:36

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

void init ( )
96{ gdk_threads_add_idle(on_idle, nullptr); }
static gboolean on_idle(gpointer)
Definition measure-framerate-callbacks.cc:59

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ invalidate()

void invalidate ( )
99{
100 GdkWindow* window = gtk_widget_get_window(drawingArea);
101 gdk_window_invalidate_rect(window, nullptr, false);
102}

Referenced by Invalidator::operator()(), and InvalidatingCounter::operator()().

Here is the caller graph for this function:

Variable Documentation

◆ functions