aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Djärv2005-01-07 16:59:57 +0000
committerJan Djärv2005-01-07 16:59:57 +0000
commitff59904afeadf91b9b0c101d273a46e5571fba9f (patch)
tree6a484bae92178df4e0749d617a3b03130d2c70eb
parent1bc9c7ed8b140a10f1e263091882f41aa6615b1d (diff)
downloademacs-ff59904afeadf91b9b0c101d273a46e5571fba9f.tar.gz
emacs-ff59904afeadf91b9b0c101d273a46e5571fba9f.zip
* 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.
-rw-r--r--src/ChangeLog11
-rw-r--r--src/gtkutil.c19
-rw-r--r--src/xselect.c10
3 files changed, 28 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index f78945f644b..9e3c5e56559 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,14 @@
12005-01-07 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2
3 * gtkutil.c (xg_gtk_scroll_destroy, xg_create_scroll_bar)
4 (xg_tool_bar_callback, xg_tool_bar_help_callback)
5 (update_frame_tool_bar): Cast to EMACS_INT to avoid compiler
6 warning.
7
8 * xselect.c (x_get_foreign_selection, x_fill_property_data)
9 (Fx_get_atom_name, Fx_send_client_event): Replace XFLOAT with
10 XFLOAT_DATA to get extract number from Lisp object.
11
12005-01-07 Kim F. Storm <storm@cua.dk> 122005-01-07 Kim F. Storm <storm@cua.dk>
2 13
3 * xdisp.c (set_iterator_to_next): Fix 2004-12-13 change. 14 * xdisp.c (set_iterator_to_next): Fix 2004-12-13 change.
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 22919230a65..686168badda 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -2850,7 +2850,7 @@ xg_gtk_scroll_destroy (widget, data)
2850 gpointer data; 2850 gpointer data;
2851{ 2851{
2852 gpointer p; 2852 gpointer p;
2853 int id = (int)data; 2853 int id = (int) (EMACS_INT) data; /* The EMACS_INT cast avoids a warning. */
2854 2854
2855 p = g_object_get_data (G_OBJECT (widget), XG_LAST_SB_DATA); 2855 p = g_object_get_data (G_OBJECT (widget), XG_LAST_SB_DATA);
2856 if (p) xfree (p); 2856 if (p) xfree (p);
@@ -2920,10 +2920,11 @@ xg_create_scroll_bar (f, bar, scroll_callback, scroll_bar_name)
2920 "value-changed", 2920 "value-changed",
2921 scroll_callback, 2921 scroll_callback,
2922 (gpointer) bar); 2922 (gpointer) bar);
2923 /* The EMACS_INT cast avoids a warning. */
2923 g_signal_connect (G_OBJECT (wscroll), 2924 g_signal_connect (G_OBJECT (wscroll),
2924 "destroy", 2925 "destroy",
2925 G_CALLBACK (xg_gtk_scroll_destroy), 2926 G_CALLBACK (xg_gtk_scroll_destroy),
2926 (gpointer) scroll_id); 2927 (gpointer) (EMACS_INT) scroll_id);
2927 2928
2928 /* Connect to button press and button release to detect if any scroll bar 2929 /* Connect to button press and button release to detect if any scroll bar
2929 has the pointer. */ 2930 has the pointer. */
@@ -3112,7 +3113,8 @@ xg_tool_bar_callback (w, client_data)
3112 GtkWidget *w; 3113 GtkWidget *w;
3113 gpointer client_data; 3114 gpointer client_data;
3114{ 3115{
3115 int idx = (int)client_data; 3116 /* The EMACS_INT cast avoids a warning. */
3117 int idx = (int) (EMACS_INT) client_data;
3116 FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (w), XG_FRAME_DATA); 3118 FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (w), XG_FRAME_DATA);
3117 Lisp_Object key, frame; 3119 Lisp_Object key, frame;
3118 struct input_event event; 3120 struct input_event event;
@@ -3209,7 +3211,8 @@ xg_tool_bar_help_callback (w, event, client_data)
3209 GdkEventCrossing *event; 3211 GdkEventCrossing *event;
3210 gpointer client_data; 3212 gpointer client_data;
3211{ 3213{
3212 int idx = (int)client_data; 3214 /* The EMACS_INT cast avoids a warning. */
3215 int idx = (int) (EMACS_INT) client_data;
3213 FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (w), XG_FRAME_DATA); 3216 FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (w), XG_FRAME_DATA);
3214 Lisp_Object help, frame; 3217 Lisp_Object help, frame;
3215 3218
@@ -3452,11 +3455,12 @@ update_frame_tool_bar (f)
3452 3455
3453 gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin); 3456 gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin);
3454 3457
3458 /* The EMACS_INT cast avoids a warning. */
3455 gtk_toolbar_append_item (GTK_TOOLBAR (x->toolbar_widget), 3459 gtk_toolbar_append_item (GTK_TOOLBAR (x->toolbar_widget),
3456 0, 0, 0, 3460 0, 0, 0,
3457 w, 3461 w,
3458 GTK_SIGNAL_FUNC (xg_tool_bar_callback), 3462 GTK_SIGNAL_FUNC (xg_tool_bar_callback),
3459 (gpointer)i); 3463 (gpointer) (EMACS_INT) i);
3460 3464
3461 /* Save the image so we can see if an update is needed when 3465 /* Save the image so we can see if an update is needed when
3462 this function is called again. */ 3466 this function is called again. */
@@ -3486,14 +3490,15 @@ update_frame_tool_bar (f)
3486 rather than the GtkButton specific signals "enter" and 3490 rather than the GtkButton specific signals "enter" and
3487 "leave", so we can have only one callback. The event 3491 "leave", so we can have only one callback. The event
3488 will tell us what kind of event it is. */ 3492 will tell us what kind of event it is. */
3493 /* The EMACS_INT cast avoids a warning. */
3489 g_signal_connect (G_OBJECT (w), 3494 g_signal_connect (G_OBJECT (w),
3490 "enter-notify-event", 3495 "enter-notify-event",
3491 G_CALLBACK (xg_tool_bar_help_callback), 3496 G_CALLBACK (xg_tool_bar_help_callback),
3492 (gpointer)i); 3497 (gpointer) (EMACS_INT) i);
3493 g_signal_connect (G_OBJECT (w), 3498 g_signal_connect (G_OBJECT (w),
3494 "leave-notify-event", 3499 "leave-notify-event",
3495 G_CALLBACK (xg_tool_bar_help_callback), 3500 G_CALLBACK (xg_tool_bar_help_callback),
3496 (gpointer)i); 3501 (gpointer) (EMACS_INT) i);
3497 } 3502 }
3498 } 3503 }
3499 else 3504 else
diff --git a/src/xselect.c b/src/xselect.c
index 38547ea6bbf..5dd63b9c735 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -1383,7 +1383,7 @@ x_get_foreign_selection (selection_symbol, target_type, time_stamp)
1383 else if (INTEGERP (time_stamp)) 1383 else if (INTEGERP (time_stamp))
1384 requestor_time = (Time) XUINT (time_stamp); 1384 requestor_time = (Time) XUINT (time_stamp);
1385 else if (FLOATP (time_stamp)) 1385 else if (FLOATP (time_stamp))
1386 requestor_time = (Time) XFLOAT (time_stamp); 1386 requestor_time = (Time) XFLOAT_DATA (time_stamp);
1387 else 1387 else
1388 error ("TIME_STAMP must be cons or number"); 1388 error ("TIME_STAMP must be cons or number");
1389 } 1389 }
@@ -2468,7 +2468,7 @@ x_check_property_data (data)
2468 DPY is the display use to look up X atoms. 2468 DPY is the display use to look up X atoms.
2469 DATA is a Lisp list of values to be converted. 2469 DATA is a Lisp list of values to be converted.
2470 RET is the C array that contains the converted values. It is assumed 2470 RET is the C array that contains the converted values. It is assumed
2471 it is big enough to hol all values. 2471 it is big enough to hold all values.
2472 FORMAT is 8, 16 or 32 and gives the size in bits for each C value to 2472 FORMAT is 8, 16 or 32 and gives the size in bits for each C value to
2473 be stored in RET. */ 2473 be stored in RET. */
2474 2474
@@ -2492,7 +2492,7 @@ x_fill_property_data (dpy, data, ret, format)
2492 if (INTEGERP (o)) 2492 if (INTEGERP (o))
2493 val = (CARD32) XFASTINT (o); 2493 val = (CARD32) XFASTINT (o);
2494 else if (FLOATP (o)) 2494 else if (FLOATP (o))
2495 val = (CARD32) XFLOAT (o); 2495 val = (CARD32) XFLOAT_DATA (o);
2496 else if (CONSP (o)) 2496 else if (CONSP (o))
2497 val = (CARD32) cons_to_long (o); 2497 val = (CARD32) cons_to_long (o);
2498 else if (STRINGP (o)) 2498 else if (STRINGP (o))
@@ -2597,7 +2597,7 @@ If the value is 0 or the atom is not known, return the empty string. */)
2597 if (INTEGERP (value)) 2597 if (INTEGERP (value))
2598 atom = (Atom) XUINT (value); 2598 atom = (Atom) XUINT (value);
2599 else if (FLOATP (value)) 2599 else if (FLOATP (value))
2600 atom = (Atom) XFLOAT (value); 2600 atom = (Atom) XFLOAT_DATA (value);
2601 else if (CONSP (value)) 2601 else if (CONSP (value))
2602 atom = (Atom) cons_to_long (value); 2602 atom = (Atom) cons_to_long (value);
2603 else 2603 else
@@ -2729,7 +2729,7 @@ are ignored. */)
2729 else if (INTEGERP (dest)) 2729 else if (INTEGERP (dest))
2730 wdest = (Window) XFASTINT (dest); 2730 wdest = (Window) XFASTINT (dest);
2731 else if (FLOATP (dest)) 2731 else if (FLOATP (dest))
2732 wdest = (Window) XFLOAT (dest); 2732 wdest = (Window) XFLOAT_DATA (dest);
2733 else if (CONSP (dest)) 2733 else if (CONSP (dest))
2734 { 2734 {
2735 if (! NUMBERP (XCAR (dest)) || ! NUMBERP (XCDR (dest))) 2735 if (! NUMBERP (XCAR (dest)) || ! NUMBERP (XCDR (dest)))