[gtkglarea/jjardon/gtk3: 10/15] examples/viewlw.c: Replace the use of gtk_object_* api
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkglarea/jjardon/gtk3: 10/15] examples/viewlw.c: Replace the use of gtk_object_* api
- Date: Mon, 24 Mar 2014 18:35:09 +0000 (UTC)
commit 1a8bf3fc9ef227ba7d5033f8808f1454df9a792f
Author: Javier Jardón <jjardon gnome org>
Date: Mon Mar 24 18:32:41 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]