Mercurial > emacs
diff src/gtkutil.c @ 59411:ecb6689e04bf
* gtkutil.c (xg_gtk_scroll_destroy, xg_create_scroll_bar)
(xg_tool_bar_callback, xg_tool_bar_help_callback)
(update_frame_tool_bar): Cast to EMACS_INT to avoid compiler
warning.
* xselect.c (x_get_foreign_selection, x_fill_property_data)
(Fx_get_atom_name, Fx_send_client_event): Replace XFLOAT with
XFLOAT_DATA to get extract number from Lisp object.
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Fri, 07 Jan 2005 16:59:57 +0000 |
parents | 0096c58ce34a |
children | eb72706060ad |
line wrap: on
line diff
--- a/src/gtkutil.c Fri Jan 07 16:12:34 2005 +0000 +++ b/src/gtkutil.c Fri Jan 07 16:59:57 2005 +0000 @@ -2850,7 +2850,7 @@ gpointer data; { gpointer p; - int id = (int)data; + int id = (int) (EMACS_INT) data; /* The EMACS_INT cast avoids a warning. */ p = g_object_get_data (G_OBJECT (widget), XG_LAST_SB_DATA); if (p) xfree (p); @@ -2920,10 +2920,11 @@ "value-changed", scroll_callback, (gpointer) bar); + /* The EMACS_INT cast avoids a warning. */ g_signal_connect (G_OBJECT (wscroll), "destroy", G_CALLBACK (xg_gtk_scroll_destroy), - (gpointer) scroll_id); + (gpointer) (EMACS_INT) scroll_id); /* Connect to button press and button release to detect if any scroll bar has the pointer. */ @@ -3112,7 +3113,8 @@ GtkWidget *w; gpointer client_data; { - int idx = (int)client_data; + /* The EMACS_INT cast avoids a warning. */ + int idx = (int) (EMACS_INT) client_data; FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (w), XG_FRAME_DATA); Lisp_Object key, frame; struct input_event event; @@ -3209,7 +3211,8 @@ GdkEventCrossing *event; gpointer client_data; { - int idx = (int)client_data; + /* The EMACS_INT cast avoids a warning. */ + int idx = (int) (EMACS_INT) client_data; FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (w), XG_FRAME_DATA); Lisp_Object help, frame; @@ -3452,11 +3455,12 @@ gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin); + /* The EMACS_INT cast avoids a warning. */ gtk_toolbar_append_item (GTK_TOOLBAR (x->toolbar_widget), 0, 0, 0, w, GTK_SIGNAL_FUNC (xg_tool_bar_callback), - (gpointer)i); + (gpointer) (EMACS_INT) i); /* Save the image so we can see if an update is needed when this function is called again. */ @@ -3486,14 +3490,15 @@ rather than the GtkButton specific signals "enter" and "leave", so we can have only one callback. The event will tell us what kind of event it is. */ + /* The EMACS_INT cast avoids a warning. */ g_signal_connect (G_OBJECT (w), "enter-notify-event", G_CALLBACK (xg_tool_bar_help_callback), - (gpointer)i); + (gpointer) (EMACS_INT) i); g_signal_connect (G_OBJECT (w), "leave-notify-event", G_CALLBACK (xg_tool_bar_help_callback), - (gpointer)i); + (gpointer) (EMACS_INT) i); } } else