static void
ui_save_graph(GtkWindow *window1, gchar *filename)
{
- GVJ_t *job;
GtkWidget *dialog;
- job = (GVJ_t *)g_object_get_data(G_OBJECT(window1), "job");
+ GVJ_t *job = g_object_get_data(G_OBJECT(window1), "job");
dialog = gtk_file_chooser_dialog_new(
"Save graph as", window1, GTK_FILE_CHOOSER_ACTION_SAVE,
(void)user_data;
GtkWindow *window1;
- gchar *filename;
window1 = GTK_WINDOW(menuitem);
- filename = (gchar *)g_object_get_data(G_OBJECT(window1), "activefilename");
+ gchar *filename = g_object_get_data(G_OBJECT(window1), "activefilename");
ui_save_graph(window1, filename);
}
(void)event;
(void)user_data;
- GVJ_t *job;
cairo_t *cr;
- job = (GVJ_t *)g_object_get_data(G_OBJECT(widget),"job");
+ GVJ_t *job = g_object_get_data(G_OBJECT(widget),"job");
cr = gdk_cairo_create(widget->window);
(job->callbacks->motion)(job, job->pointer);
{
(void)user_data;
- GVJ_t *job;
-
- job = (GVJ_t *)g_object_get_data(G_OBJECT(widget),"job");
+ GVJ_t *job = g_object_get_data(G_OBJECT(widget),"job");
job->pointer.x = event->x;
job->pointer.y = event->y;
gtk_widget_queue_draw(widget);
(void)event;
(void)user_data;
- GVJ_t *job;
cairo_t *cr;
double tmp;
- job = (GVJ_t *)g_object_get_data(G_OBJECT(widget),"job");
+ GVJ_t *job = g_object_get_data(G_OBJECT(widget),"job");
cr = gdk_cairo_create(widget->window);
(job->callbacks->motion)(job, job->pointer);
{
(void)user_data;
- GVJ_t *job;
double zoom_to_fit;
/*FIXME - should allow for margins */
/* plugin/xlib/gvdevice_xlib.c */
/* lib/gvc/gvevent.c */
- job = (GVJ_t *)g_object_get_data(G_OBJECT(widget),"job");
+ GVJ_t *job = g_object_get_data(G_OBJECT(widget),"job");
if (! job->has_been_rendered) {
zoom_to_fit = MIN((double) event->width / (double) job->width,
(double) event->height / (double) job->height);
{
(void)user_data;
- GVJ_t *job;
pointf pointer;
- job = (GVJ_t *)g_object_get_data(G_OBJECT(widget),"job");
+ GVJ_t *job = g_object_get_data(G_OBJECT(widget),"job");
pointer.x = event->x;
pointer.y = event->y;
(job->callbacks->button_press)(job, event->button, pointer);
{
(void)user_data;
- GVJ_t *job;
pointf pointer;
- job = (GVJ_t *)g_object_get_data(G_OBJECT(widget),"job");
+ GVJ_t *job = g_object_get_data(G_OBJECT(widget),"job");
pointer.x = event->x;
pointer.y = event->y;
(job->callbacks->button_release)(job, event->button, pointer);
{
(void)user_data;
- GVJ_t *job;
pointf pointer;
- job = (GVJ_t *)g_object_get_data(G_OBJECT(widget),"job");
+ GVJ_t *job = g_object_get_data(G_OBJECT(widget),"job");
pointer.x = ((GdkEventScroll *)event)->x;
pointer.y = ((GdkEventScroll *)event)->y;
switch (((GdkEventScroll *)event)->direction) {