#elif defined USE_GTK
! gtk_events_pending ()
#else
- ! XPending ((Display*) data)
+ ! XPending (data)
#endif
)
{
- EMACS_TIME next_time = timer_check (), *ntp;
- SELECT_TYPE read_fds;
+ struct timespec next_time = timer_check (), *ntp;
+ fd_set read_fds;
struct x_display_info *dpyinfo;
int n = 0;
XFlush (dpyinfo->display);
}
- if (! EMACS_TIME_VALID_P (next_time))
+ if (! timespec_valid_p (next_time))
ntp = 0;
else
ntp = &next_time;
xg_menu_item_cb_data *cb_data;
Lisp_Object help;
- cb_data = (xg_menu_item_cb_data*) g_object_get_data (G_OBJECT (widget),
- XG_ITEM_DATA);
+ cb_data = g_object_get_data (G_OBJECT (widget), XG_ITEM_DATA);
if (! cb_data) return;
help = call_data ? cb_data->help : Qnil;
static void
menu_highlight_callback (Widget widget, LWLIB_ID id, void *call_data)
{
- struct frame *f;
- Lisp_Object help;
-
- widget_value *wv = (widget_value *) call_data;
-
- help = wv ? wv->help : Qnil;
+ widget_value *wv = call_data;
+ Lisp_Object help = wv ? wv->help : Qnil;
/* Determine the frame for the help event. */
- f = menubar_id_to_frame (id);
+ struct frame *f = menubar_id_to_frame (id);
show_help_event (f, widget, help);
}
static void
menubar_selection_callback (GtkWidget *widget, gpointer client_data)
{
- xg_menu_item_cb_data *cb_data = (xg_menu_item_cb_data*) client_data;
+ xg_menu_item_cb_data *cb_data = client_data;
if (xg_crazy_callback_abort)
return;
static void
menu_position_func (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data)
{
- struct next_popup_x_y* data = (struct next_popup_x_y*)user_data;
+ struct next_popup_x_y *data = user_data;
GtkRequisition req;
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (data->f);
int disp_width = x_display_pixel_width (dpyinfo);
static void
popup_selection_callback (GtkWidget *widget, gpointer client_data)
{
- xg_menu_item_cb_data *cb_data = (xg_menu_item_cb_data*) client_data;
+ xg_menu_item_cb_data *cb_data = client_data;
if (xg_crazy_callback_abort) return;
- if (cb_data) menu_item_selection = (Lisp_Object *) cb_data->call_data;
+ if (cb_data) menu_item_selection = cb_data->call_data;
}
static void
static void
popup_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data)
{
- menu_item_selection = (Lisp_Object *) client_data;
+ menu_item_selection = client_data;
}
/* ARG is the LWLIB ID of the dialog box, represented
make_number (menu_id & ~(-1 << (fact)))));
/* Process events that apply to the menu. */
- popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id, 1);
+ popup_get_selection (0, FRAME_X_DISPLAY_INFO (f), menu_id, 1);
unbind_to (specpdl_count, Qnil);
}
/* Treat the pointer as an integer. There's no problem
as long as pointers have enough bits to hold small integers. */
if ((intptr_t) client_data != -1)
- menu_item_selection = (Lisp_Object *) client_data;
+ menu_item_selection = client_data;
popup_activated_flag = 0;
}
/* Treat the pointer as an integer. There's no problem
as long as pointers have enough bits to hold small integers. */
if ((intptr_t) client_data != -1)
- menu_item_selection = (Lisp_Object *) client_data;
+ menu_item_selection = client_data;
block_input ();
lw_destroy_all_widgets (id);
Fcons (make_number (dialog_id >> (fact)),
make_number (dialog_id & ~(-1 << (fact)))));
- popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f),
- dialog_id, 1);
+ popup_get_selection (0, FRAME_X_DISPLAY_INFO (f), dialog_id, 1);
unbind_to (count, Qnil);
}