[gtkglarea/jjardon/gtk3: 10/11] examples/viewlw.c: Replace the use of gtk_object_* api



commit 1a32d66e9d96c74d1f7817fc3128290b67b8ec09
Author: Javier Jardón <javier jardon codethink co uk>
Date:   Thu Mar 20 13:55:08 2014 +0000

    examples/viewlw.c: Replace the use of gtk_object_* api

 examples/viewlw.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/examples/viewlw.c b/examples/viewlw.c
index 428ae35..2d98e7c 100644
--- a/examples/viewlw.c
+++ b/examples/viewlw.c
@@ -98,7 +98,7 @@ gint glarea_expose(GtkWidget *widget, GdkEventExpose *event)
   GLfloat m[4][4];
 
   GtkGLArea *glarea = GTK_GL_AREA(widget);
-  mesh_info *info = (mesh_info*)gtk_object_get_data(GTK_OBJECT(widget), "mesh_info");
+  mesh_info *info = (mesh_info*) g_object_get_data (G_OBJECT (widget), "mesh_info");
 
   /* draw only last expose */
   if (event->count > 0) {
@@ -151,7 +151,7 @@ gint glarea_configure(GtkWidget *widget, GdkEventConfigure *event)
 gint glarea_destroy(GtkWidget *widget)
 {
   /* delete mesh info */
-  mesh_info *info = (mesh_info*)gtk_object_get_data(GTK_OBJECT(widget),"mesh_info");
+  mesh_info *info = (mesh_info*) g_object_get_data(G_OBJECT (widget), "mesh_info");
   if (info) {
     lw_object_free(info->lwobject);
     g_free(info);
@@ -161,7 +161,7 @@ gint glarea_destroy(GtkWidget *widget)
 
 gint glarea_button_press(GtkWidget *widget, GdkEventButton *event)
 {
-  mesh_info *info = (mesh_info*)gtk_object_get_data(GTK_OBJECT(widget), "mesh_info");
+  mesh_info *info = (mesh_info*) g_object_get_data(G_OBJECT (widget), "mesh_info");
   if (event->button == 1) {
     /* beginning of drag, reset mouse position */
     info->beginx = event->x;
@@ -177,7 +177,7 @@ gint glarea_motion_notify(GtkWidget *widget, GdkEventMotion *event)
   GdkRectangle area;
   GdkModifierType state;
   GtkAllocation allocation;
-  mesh_info *info = (mesh_info*)gtk_object_get_data(GTK_OBJECT(widget), "mesh_info");
+  mesh_info *info = (mesh_info*) g_object_get_data(G_OBJECT (widget), "mesh_info");
 
   if (event->is_hint) {
     /* fix this! */
@@ -345,7 +345,7 @@ gint show_lwobject(char const *lwobject_name)
   info->beginy = 0;
   info->zoom   = 45;
   trackball(info->quat , 0.0, 0.0, 0.0, 0.0);
-  gtk_object_set_data(GTK_OBJECT(glarea), "mesh_info", info);
+  g_object_set_data (G_OBJECT(glarea), "mesh_info", info);
 
 
   /* create new top level window */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]