1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-15 09:47:20 +00:00

* 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.
This commit is contained in:
Jan Djärv 2005-01-07 16:59:57 +00:00
parent 1bc9c7ed8b
commit ff59904afe
3 changed files with 28 additions and 12 deletions

View File

@ -1,3 +1,14 @@
2005-01-07 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* 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.
2005-01-07 Kim F. Storm <storm@cua.dk>
* xdisp.c (set_iterator_to_next): Fix 2004-12-13 change.

View File

@ -2850,7 +2850,7 @@ xg_gtk_scroll_destroy (widget, data)
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 @@ xg_create_scroll_bar (f, bar, scroll_callback, scroll_bar_name)
"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 @@ xg_tool_bar_callback (w, client_data)
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 @@ xg_tool_bar_help_callback (w, event, client_data)
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 @@ update_frame_tool_bar (f)
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 @@ update_frame_tool_bar (f)
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

View File

@ -1383,7 +1383,7 @@ x_get_foreign_selection (selection_symbol, target_type, time_stamp)
else if (INTEGERP (time_stamp))
requestor_time = (Time) XUINT (time_stamp);
else if (FLOATP (time_stamp))
requestor_time = (Time) XFLOAT (time_stamp);
requestor_time = (Time) XFLOAT_DATA (time_stamp);
else
error ("TIME_STAMP must be cons or number");
}
@ -2468,7 +2468,7 @@ x_check_property_data (data)
DPY is the display use to look up X atoms.
DATA is a Lisp list of values to be converted.
RET is the C array that contains the converted values. It is assumed
it is big enough to hol all values.
it is big enough to hold all values.
FORMAT is 8, 16 or 32 and gives the size in bits for each C value to
be stored in RET. */
@ -2492,7 +2492,7 @@ x_fill_property_data (dpy, data, ret, format)
if (INTEGERP (o))
val = (CARD32) XFASTINT (o);
else if (FLOATP (o))
val = (CARD32) XFLOAT (o);
val = (CARD32) XFLOAT_DATA (o);
else if (CONSP (o))
val = (CARD32) cons_to_long (o);
else if (STRINGP (o))
@ -2597,7 +2597,7 @@ If the value is 0 or the atom is not known, return the empty string. */)
if (INTEGERP (value))
atom = (Atom) XUINT (value);
else if (FLOATP (value))
atom = (Atom) XFLOAT (value);
atom = (Atom) XFLOAT_DATA (value);
else if (CONSP (value))
atom = (Atom) cons_to_long (value);
else
@ -2729,7 +2729,7 @@ are ignored. */)
else if (INTEGERP (dest))
wdest = (Window) XFASTINT (dest);
else if (FLOATP (dest))
wdest = (Window) XFLOAT (dest);
wdest = (Window) XFLOAT_DATA (dest);
else if (CONSP (dest))
{
if (! NUMBERP (XCAR (dest)) || ! NUMBERP (XCDR (dest)))