static Lisp_Object Qdebug_on_next_call;
#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
-static Lisp_Object xdialog_show (FRAME_PTR, bool, Lisp_Object, Lisp_Object,
+static Lisp_Object xdialog_show (struct frame *, bool, Lisp_Object, Lisp_Object,
const char **);
#endif
\f
menubar_id_to_frame (LWLIB_ID id)
{
Lisp_Object tail, frame;
- FRAME_PTR f;
+ struct frame *f;
FOR_EACH_FRAME (tail, frame)
{
the scroll bar or the edit window. Fx_popup_menu needs to be
sure it is the edit window. */
void
-mouse_position_for_popup (FRAME_PTR f, int *x, int *y)
+mouse_position_for_popup (struct frame *f, int *x, int *y)
{
Window root, dummy_window;
int dummy;
`x-popup-dialog' does not return. */)
(Lisp_Object position, Lisp_Object contents, Lisp_Object header)
{
- FRAME_PTR f = NULL;
+ struct frame *f = NULL;
Lisp_Object window;
/* Decode the first argument: find the window or frame to use. */
{
#if 0 /* Using the frame the mouse is on may not be right. */
/* Use the mouse's current position. */
- FRAME_PTR new_f = SELECTED_FRAME ();
+ struct frame *new_f = SELECTED_FRAME ();
Lisp_Object bar_window;
enum scroll_bar_part part;
Time time;
#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;
(Lisp_Object frame)
{
XEvent ev;
- FRAME_PTR f = decode_window_system_frame (frame);
+ struct frame *f = decode_window_system_frame (frame);
Widget menubar;
block_input ();
(Lisp_Object frame)
{
GtkWidget *menubar;
- FRAME_PTR f;
-
- /* gcc 2.95 doesn't accept the FRAME_PTR declaration after
- block_input (). */
+ struct frame *f;
block_input ();
f = decode_window_system_frame (frame);
execute Lisp code. */
void
-x_activate_menubar (FRAME_PTR f)
+x_activate_menubar (struct frame *f)
{
eassert (FRAME_X_P (f));
for that widget.
F is the frame if known, or NULL if not known. */
static void
-show_help_event (FRAME_PTR f, xt_or_gtk_widget widget, Lisp_Object help)
+show_help_event (struct frame *f, xt_or_gtk_widget widget, Lisp_Object help)
{
Lisp_Object frame;
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
menubar_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data)
{
- FRAME_PTR f;
+ struct frame *f;
f = menubar_id_to_frame (id);
if (!f)
changed. */
static void
-update_frame_menubar (FRAME_PTR f)
+update_frame_menubar (struct frame *f)
{
#ifdef USE_GTK
xg_update_frame_menubar (f);
it is set the first time this is called, from initialize_frame_menubar. */
void
-set_frame_menubar (FRAME_PTR f, bool first_time, bool deep_p)
+set_frame_menubar (struct frame *f, bool first_time, bool deep_p)
{
xt_or_gtk_widget menubar_widget;
#ifdef USE_X_TOOLKIT
is visible. */
void
-initialize_frame_menubar (FRAME_PTR f)
+initialize_frame_menubar (struct frame *f)
{
/* This function is called before the first chance to redisplay
the frame. It has to be, so the frame will have the right size. */
#ifndef USE_GTK
void
-free_frame_menubar (FRAME_PTR f)
+free_frame_menubar (struct frame *f)
{
Widget menubar_widget;
create_and_show_popup_menu below. */
struct next_popup_x_y
{
- FRAME_PTR f;
+ struct frame *f;
int x;
int y;
};
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
menu pops down.
menu_item_selection will be set to the selection. */
static void
-create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y,
+create_and_show_popup_menu (struct frame *f, widget_value *first_wv, int x, int y,
bool for_click, Time timestamp)
{
int i;
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
menu pops down.
menu_item_selection will be set to the selection. */
static void
-create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv,
+create_and_show_popup_menu (struct frame *f, widget_value *first_wv,
int x, int y, bool for_click, Time timestamp)
{
int i;
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);
}
}
Lisp_Object
-xmenu_show (FRAME_PTR f, int x, int y, bool for_click, bool keymaps,
+xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
Lisp_Object title, const char **error_name, Time timestamp)
{
int i;
/* 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;
}
dialog pops down.
menu_item_selection will be set to the selection. */
static void
-create_and_show_dialog (FRAME_PTR f, widget_value *first_wv)
+create_and_show_dialog (struct frame *f, widget_value *first_wv)
{
GtkWidget *menu;
/* 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);
dialog pops down.
menu_item_selection will be set to the selection. */
static void
-create_and_show_dialog (FRAME_PTR f, widget_value *first_wv)
+create_and_show_dialog (struct frame *f, widget_value *first_wv)
{
LWLIB_ID dialog_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);
}
"button6", "button7", "button8", "button9", "button10" };
static Lisp_Object
-xdialog_show (FRAME_PTR f,
+xdialog_show (struct frame *f,
bool keymaps,
Lisp_Object title,
Lisp_Object header,
static void
pop_down_menu (Lisp_Object arg)
{
- FRAME_PTR f = XSAVE_POINTER (arg, 0);
+ struct frame *f = XSAVE_POINTER (arg, 0);
XMenu *menu = XSAVE_POINTER (arg, 1);
block_input ();
Lisp_Object
-xmenu_show (FRAME_PTR f, int x, int y, bool for_click, bool keymaps,
+xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
Lisp_Object title, const char **error_name, Time timestamp)
{
Window root;