Main xgtk plug-in implementation, global vars, engines and apis including the all important gvplugin_xgtk_LTX_library. More...
#include <gtk/gtk.h>
#include <graphviz/gvc.h>
#include <graphviz/gvplugin.h>
#include <graphviz/gvplugin_device.h>
#include <graphviz/types.h>
#include <inttypes.h>
#include <features.h>
#include <stdint.h>
#include <stddef.h>
#include <cairo.h>
#include <iostream>
#include <bits/types.h>
#include <time.h>
#include <X11/Xlib.h>
#include <signal.h>
#include <unistd.h>
#include <sys/time.h>
#include <stdio.h>
#include <string.h>
#include "callbacks.h"
Go to the source code of this file.
Defines | |
#define | GLADE_HOOKUP_OBJECT(component, widget, name) |
Hookup object to widget with call to g_object_set_data_full. | |
#define | GLADE_HOOKUP_OBJECT_NO_REF(component, widget, name) g_object_set_data (G_OBJECT (component), name, widget) |
Hookup object to widget with call to g_object_set_data. | |
Functions | |
GtkWidget * | create_window (void) |
Create a GTK window. | |
static void | gtk_finalize (GVJ_t *firstjob) |
End point for the plug-in engine. | |
static void | gtk_initialize (GVJ_t *firstjob) |
Start point for the plug-in. | |
GtkWidget * | lookup_widget (GtkWidget *widget, const gchar *widget_name) |
Obtain a widget from a lower point in the widget structure. | |
gboolean | Redraw (gpointer data) |
Redraw main window. | |
Variables | |
static gvplugin_api_t | apis [] |
Libgvc api descriptor, type and gvplugin_installed_t structure. | |
static gvdevice_engine_t | device_engine_xgtk |
Libgvc plug-in render engine description. | |
static gvdevice_features_t | device_features_xgtk |
Libgvc plug-in render feature descriptor. | |
gvplugin_installed_t | gvdevice_types_xgtk [] |
Libgvc plug-in descriptor, name. engine and features, must be null terminated. | |
gvplugin_library_t | gvplugin_xgtk_LTX_library = {(char*)"xgtk", apis } |
Libgvc plug-in library object, the name of this variable is very specific (its specification is in the Libgvc documentation). |
Main xgtk plug-in implementation, global vars, engines and apis including the all important gvplugin_xgtk_LTX_library.
Definition in file gvplugin_xgtk.cpp.
#define GLADE_HOOKUP_OBJECT | ( | component, | |||
widget, | |||||
name | ) |
g_object_set_data_full (G_OBJECT (component), name, \ gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
Hookup object to widget with call to g_object_set_data_full.
Link a widget to an other widget by a specific name.
The linked widget can latter be retrieved using g_object_get_data
, the current macro is in fact just a wrapper to the g_object_set_data_full
GTK function.
Definition at line 63 of file gvplugin_xgtk.cpp.
#define GLADE_HOOKUP_OBJECT_NO_REF | ( | component, | |||
widget, | |||||
name | ) | g_object_set_data (G_OBJECT (component), name, widget) |
Hookup object to widget with call to g_object_set_data.
Simpler version of the GLADE_HOOKUP_OBJECT that uses g_object_set_data
instead of g_object_set_data_full
.
Definition at line 73 of file gvplugin_xgtk.cpp.
GtkWidget* create_window | ( | void | ) |
Create a GTK window.
This function creates a window that will contain the representation of the graph.
Definition at line 120 of file gvplugin_xgtk.cpp.
static void gtk_finalize | ( | GVJ_t * | firstjob | ) | [static] |
End point for the plug-in engine.
This function is the end point for the gvdevice_engine_t
object.
This function shows the main window and starts the gtk_main
object.
firstjob | job structure of the plug-in, and only by the way |
Definition at line 206 of file gvplugin_xgtk.cpp.
static void gtk_initialize | ( | GVJ_t * | firstjob | ) | [static] |
Start point for the plug-in.
This function is the start point of the gvdevice_engine_t
object.
Making it the start point of the render plug-in. It is responsible for starting GTK and initializing the display.
It can NOT start the gtk_main
function.
firstjob | job structure of the plug-in |
Definition at line 176 of file gvplugin_xgtk.cpp.
GtkWidget* lookup_widget | ( | GtkWidget * | widget, | |
const gchar * | widget_name | |||
) |
Obtain a widget from a lower point in the widget structure.
This function works it way up the parent of the widget until it reaches the desired widget.
This function is used in conjunction with macros GLADE_HOOKUP_OBJECT and GLADE_HOOKUP_OBJECT_NO_REF.
It will not work if the widget was not added using these macros.
widget | the source | |
widget_name | reference name of the widget to obtain |
Definition at line 86 of file gvplugin_xgtk.cpp.
gboolean Redraw | ( | gpointer | data | ) |
Redraw main window.
This function invalidates the main window which makes it redraw itself, this is a way to periodically call the expose event.
data | input data pointer, the window widget to invalidate is received here |
Definition at line 157 of file gvplugin_xgtk.cpp.
gvplugin_api_t apis[] [static] |
{ {API_device, gvdevice_types_xgtk}, {(api_t)0, 0}, }
Libgvc api descriptor, type and gvplugin_installed_t
structure.
Definition at line 250 of file gvplugin_xgtk.cpp.
gvdevice_engine_t device_engine_xgtk [static] |
{ gtk_initialize, NULL, gtk_finalize, }
Libgvc plug-in render engine description.
Definition at line 229 of file gvplugin_xgtk.cpp.
gvdevice_features_t device_features_xgtk [static] |
{ GVDEVICE_DOES_TRUECOLOR | GVDEVICE_EVENTS , {0.,0.}, {100.,100.}, {96.,96.}, }
Libgvc plug-in render feature descriptor.
Definition at line 236 of file gvplugin_xgtk.cpp.
gvplugin_installed_t gvdevice_types_xgtk[] |
{ {0,(char*)"xgtk:cairo", 0, &device_engine_xgtk, &device_features_xgtk}, {0, NULL, 0, NULL, NULL} }
Libgvc plug-in descriptor, name. engine and features, must be null terminated.
Definition at line 244 of file gvplugin_xgtk.cpp.
gvplugin_library_t gvplugin_xgtk_LTX_library = {(char*)"xgtk", apis } |
Libgvc plug-in library object, the name of this variable is very specific (its specification is in the Libgvc documentation).
Xgtk external graphviz library/plugin (only plugin, there's no need to create a library since it can be linked internally.
Xgtk external graphviz library/plugin (only plugin, there's no need to create a library since it can be linked internally).
Definition at line 256 of file gvplugin_xgtk.cpp.