[graph-gtk] Fixed improper callback signatures in simple_container
- From: Isaac Wagner <isaacbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [graph-gtk] Fixed improper callback signatures in simple_container
- Date: Sun, 29 Jul 2012 16:41:28 +0000 (UTC)
commit 8866e5d6cf49a1812514c8a1c36a6988dbf79878
Author: Isaac Wagner <isaacbw src gnome org>
Date: Sun Jul 29 12:41:06 2012 -0400
Fixed improper callback signatures in simple_container
tests/simple_container.c | 25 +++++++++++++------------
1 files changed, 13 insertions(+), 12 deletions(-)
---
diff --git a/tests/simple_container.c b/tests/simple_container.c
index e84405c..45d2a90 100644
--- a/tests/simple_container.c
+++ b/tests/simple_container.c
@@ -1,12 +1,13 @@
#include <gtk/gtk.h>
#include <graph-gtk-view.h>
+#include <graph-gtk-node.h>
static void menu_item_activated (GtkMenuItem*, gpointer);
static void button_clicked(GtkButton*, gpointer);
-static void node_selected(gpointer data, GraphGtkNode *node);
-static void node_deselected(gpointer data, GraphGtkNode *node);
-static void nodes_connected(gpointer data, GraphGtkNode *from, const gchar* output, GraphGtkNode *to, const gchar* input);
-static void nodes_disconnected(gpointer data, GraphGtkNode *from, const gchar* output, GraphGtkNode *to, const gchar* input);
+static void node_selected(GraphGtkView *view, GraphGtkNode *node, gpointer user_data);
+static void node_deselected(GraphGtkView *view, GraphGtkNode *node, gpointer user_data);
+static void nodes_connected(GraphGtkView *view, GraphGtkNode *from, const gchar* output, GraphGtkNode *to, const gchar* input, gpointer user_data);
+static void nodes_disconnected(GraphGtkView *view, GraphGtkNode *from, const gchar* output, GraphGtkNode *to, const gchar* input, gpointer user_data);
gint
main(gint argc,
@@ -19,10 +20,10 @@ main(gint argc,
g_signal_connect (window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
GtkWidget *graphView = graph_gtk_view_new();
- g_signal_connect(graphView, "node-selected", node_selected, NULL);
- g_signal_connect(graphView, "node-deselected", node_deselected, NULL);
- g_signal_connect(graphView, "nodes-connected", nodes_connected, NULL);
- g_signal_connect(graphView, "nodes-disconnected", nodes_disconnected, NULL);
+ g_signal_connect(graphView, "node-selected", G_CALLBACK(node_selected), NULL);
+ g_signal_connect(graphView, "node-deselected", G_CALLBACK(node_deselected), NULL);
+ g_signal_connect(graphView, "nodes-connected", G_CALLBACK(nodes_connected), NULL);
+ g_signal_connect(graphView, "nodes-disconnected", G_CALLBACK(nodes_disconnected), NULL);
GtkWidget *vbox = gtk_vbox_new(FALSE, 0);
gtk_container_add(GTK_CONTAINER(window), vbox);
@@ -164,25 +165,25 @@ button_clicked(GtkButton *button, gpointer data)
}
static void
-nodes_connected(gpointer data, GraphGtkNode *from, const gchar* output, GraphGtkNode *to, const gchar* input)
+nodes_connected(GraphGtkView *view, GraphGtkNode *from, const gchar* output, GraphGtkNode *to, const gchar* input, gpointer data)
{
g_print("Connected pads: %s->%s\n", output, input);
}
static void
-nodes_disconnected(gpointer data, GraphGtkNode *from, const gchar* output, GraphGtkNode *to, const gchar* input)
+nodes_disconnected(GraphGtkView *view, GraphGtkNode *from, const gchar* output, GraphGtkNode *to, const gchar* input, gpointer data)
{
g_print("Disconnected pads: %s->%s\n", output, input);
}
static void
-node_selected(gpointer data, GraphGtkNode *node)
+node_selected(GraphGtkView *view, GraphGtkNode *node, gpointer data)
{
g_print("Selected: %s\n", graph_gtk_node_get_name(node));
}
static void
-node_deselected(gpointer data, GraphGtkNode *node)
+node_deselected(GraphGtkView *view, GraphGtkNode *node, gpointer data)
{
g_print("Deselected: %s\n", graph_gtk_node_get_name(node));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]