diff options
| author | Dmitry Antipov | 2013-08-03 07:29:03 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-08-03 07:29:03 +0400 |
| commit | a10c82694e253f891cdfa220ba75b59f5ed50ab3 (patch) | |
| tree | 3dcdc0400f8fa190ac1e2408c38bb2b4e82f52ff /src/xmenu.c | |
| parent | 0372256bed8f8c1372579001ba42b21dbe5d2adb (diff) | |
| download | emacs-a10c82694e253f891cdfa220ba75b59f5ed50ab3.tar.gz emacs-a10c82694e253f891cdfa220ba75b59f5ed50ab3.zip | |
Drop FRAME_PTR typedef.
* composite.c, font.c, font.h, fontset.c, fontset.h, frame.c, frame.h:
* ftfont.c, ftxfont.c, gtkutil.c, gtkutil.h, image.c, keyboard.c:
* menu.c, menu.h, msdos.c, nsfns.m, nsfont.m, nsmenu.m, nsterm.h:
* nsterm.m, scroll.c, term.c, w32fns.c, w32font.c, w32font.h:
* w32inevt.c, w32inevt.h, w32menu.c, w32notify.c, w32term.c, w32term.h:
* w32uniscribe.c, w32xfns.c, widget.c, window.c, xdisp.c, xfaces.c:
* xfns.c, xfont.c, xftfont.c, xmenu.c, xselect.c, xterm.c:
All related users changed.
Diffstat (limited to 'src/xmenu.c')
| -rw-r--r-- | src/xmenu.c | 49 |
1 files changed, 23 insertions, 26 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index 66365a73fd0..cad892444ff 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -111,7 +111,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 111 | static Lisp_Object Qdebug_on_next_call; | 111 | static Lisp_Object Qdebug_on_next_call; |
| 112 | 112 | ||
| 113 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) | 113 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) |
| 114 | static Lisp_Object xdialog_show (FRAME_PTR, bool, Lisp_Object, Lisp_Object, | 114 | static Lisp_Object xdialog_show (struct frame *, bool, Lisp_Object, Lisp_Object, |
| 115 | const char **); | 115 | const char **); |
| 116 | #endif | 116 | #endif |
| 117 | 117 | ||
| @@ -130,7 +130,7 @@ static struct frame * | |||
| 130 | menubar_id_to_frame (LWLIB_ID id) | 130 | menubar_id_to_frame (LWLIB_ID id) |
| 131 | { | 131 | { |
| 132 | Lisp_Object tail, frame; | 132 | Lisp_Object tail, frame; |
| 133 | FRAME_PTR f; | 133 | struct frame *f; |
| 134 | 134 | ||
| 135 | FOR_EACH_FRAME (tail, frame) | 135 | FOR_EACH_FRAME (tail, frame) |
| 136 | { | 136 | { |
| @@ -154,7 +154,7 @@ menubar_id_to_frame (LWLIB_ID id) | |||
| 154 | the scroll bar or the edit window. Fx_popup_menu needs to be | 154 | the scroll bar or the edit window. Fx_popup_menu needs to be |
| 155 | sure it is the edit window. */ | 155 | sure it is the edit window. */ |
| 156 | void | 156 | void |
| 157 | mouse_position_for_popup (FRAME_PTR f, int *x, int *y) | 157 | mouse_position_for_popup (struct frame *f, int *x, int *y) |
| 158 | { | 158 | { |
| 159 | Window root, dummy_window; | 159 | Window root, dummy_window; |
| 160 | int dummy; | 160 | int dummy; |
| @@ -219,7 +219,7 @@ for instance using the window manager, then this produces a quit and | |||
| 219 | `x-popup-dialog' does not return. */) | 219 | `x-popup-dialog' does not return. */) |
| 220 | (Lisp_Object position, Lisp_Object contents, Lisp_Object header) | 220 | (Lisp_Object position, Lisp_Object contents, Lisp_Object header) |
| 221 | { | 221 | { |
| 222 | FRAME_PTR f = NULL; | 222 | struct frame *f = NULL; |
| 223 | Lisp_Object window; | 223 | Lisp_Object window; |
| 224 | 224 | ||
| 225 | /* Decode the first argument: find the window or frame to use. */ | 225 | /* Decode the first argument: find the window or frame to use. */ |
| @@ -229,7 +229,7 @@ for instance using the window manager, then this produces a quit and | |||
| 229 | { | 229 | { |
| 230 | #if 0 /* Using the frame the mouse is on may not be right. */ | 230 | #if 0 /* Using the frame the mouse is on may not be right. */ |
| 231 | /* Use the mouse's current position. */ | 231 | /* Use the mouse's current position. */ |
| 232 | FRAME_PTR new_f = SELECTED_FRAME (); | 232 | struct frame *new_f = SELECTED_FRAME (); |
| 233 | Lisp_Object bar_window; | 233 | Lisp_Object bar_window; |
| 234 | enum scroll_bar_part part; | 234 | enum scroll_bar_part part; |
| 235 | Time time; | 235 | Time time; |
| @@ -481,7 +481,7 @@ If FRAME is nil or not given, use the selected frame. */) | |||
| 481 | (Lisp_Object frame) | 481 | (Lisp_Object frame) |
| 482 | { | 482 | { |
| 483 | XEvent ev; | 483 | XEvent ev; |
| 484 | FRAME_PTR f = decode_window_system_frame (frame); | 484 | struct frame *f = decode_window_system_frame (frame); |
| 485 | Widget menubar; | 485 | Widget menubar; |
| 486 | block_input (); | 486 | block_input (); |
| 487 | 487 | ||
| @@ -559,10 +559,7 @@ If FRAME is nil or not given, use the selected frame. */) | |||
| 559 | (Lisp_Object frame) | 559 | (Lisp_Object frame) |
| 560 | { | 560 | { |
| 561 | GtkWidget *menubar; | 561 | GtkWidget *menubar; |
| 562 | FRAME_PTR f; | 562 | struct frame *f; |
| 563 | |||
| 564 | /* gcc 2.95 doesn't accept the FRAME_PTR declaration after | ||
| 565 | block_input (). */ | ||
| 566 | 563 | ||
| 567 | block_input (); | 564 | block_input (); |
| 568 | f = decode_window_system_frame (frame); | 565 | f = decode_window_system_frame (frame); |
| @@ -620,7 +617,7 @@ popup_widget_loop (int do_timers, GtkWidget *widget) | |||
| 620 | execute Lisp code. */ | 617 | execute Lisp code. */ |
| 621 | 618 | ||
| 622 | void | 619 | void |
| 623 | x_activate_menubar (FRAME_PTR f) | 620 | x_activate_menubar (struct frame *f) |
| 624 | { | 621 | { |
| 625 | eassert (FRAME_X_P (f)); | 622 | eassert (FRAME_X_P (f)); |
| 626 | 623 | ||
| @@ -682,7 +679,7 @@ popup_deactivate_callback ( | |||
| 682 | for that widget. | 679 | for that widget. |
| 683 | F is the frame if known, or NULL if not known. */ | 680 | F is the frame if known, or NULL if not known. */ |
| 684 | static void | 681 | static void |
| 685 | show_help_event (FRAME_PTR f, xt_or_gtk_widget widget, Lisp_Object help) | 682 | show_help_event (struct frame *f, xt_or_gtk_widget widget, Lisp_Object help) |
| 686 | { | 683 | { |
| 687 | Lisp_Object frame; | 684 | Lisp_Object frame; |
| 688 | 685 | ||
| @@ -815,7 +812,7 @@ menubar_selection_callback (GtkWidget *widget, gpointer client_data) | |||
| 815 | static void | 812 | static void |
| 816 | menubar_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data) | 813 | menubar_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data) |
| 817 | { | 814 | { |
| 818 | FRAME_PTR f; | 815 | struct frame *f; |
| 819 | 816 | ||
| 820 | f = menubar_id_to_frame (id); | 817 | f = menubar_id_to_frame (id); |
| 821 | if (!f) | 818 | if (!f) |
| @@ -829,7 +826,7 @@ menubar_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data) | |||
| 829 | changed. */ | 826 | changed. */ |
| 830 | 827 | ||
| 831 | static void | 828 | static void |
| 832 | update_frame_menubar (FRAME_PTR f) | 829 | update_frame_menubar (struct frame *f) |
| 833 | { | 830 | { |
| 834 | #ifdef USE_GTK | 831 | #ifdef USE_GTK |
| 835 | xg_update_frame_menubar (f); | 832 | xg_update_frame_menubar (f); |
| @@ -911,7 +908,7 @@ apply_systemfont_to_menu (struct frame *f, Widget w) | |||
| 911 | it is set the first time this is called, from initialize_frame_menubar. */ | 908 | it is set the first time this is called, from initialize_frame_menubar. */ |
| 912 | 909 | ||
| 913 | void | 910 | void |
| 914 | set_frame_menubar (FRAME_PTR f, bool first_time, bool deep_p) | 911 | set_frame_menubar (struct frame *f, bool first_time, bool deep_p) |
| 915 | { | 912 | { |
| 916 | xt_or_gtk_widget menubar_widget; | 913 | xt_or_gtk_widget menubar_widget; |
| 917 | #ifdef USE_X_TOOLKIT | 914 | #ifdef USE_X_TOOLKIT |
| @@ -1263,7 +1260,7 @@ set_frame_menubar (FRAME_PTR f, bool first_time, bool deep_p) | |||
| 1263 | is visible. */ | 1260 | is visible. */ |
| 1264 | 1261 | ||
| 1265 | void | 1262 | void |
| 1266 | initialize_frame_menubar (FRAME_PTR f) | 1263 | initialize_frame_menubar (struct frame *f) |
| 1267 | { | 1264 | { |
| 1268 | /* This function is called before the first chance to redisplay | 1265 | /* This function is called before the first chance to redisplay |
| 1269 | the frame. It has to be, so the frame will have the right size. */ | 1266 | the frame. It has to be, so the frame will have the right size. */ |
| @@ -1278,7 +1275,7 @@ initialize_frame_menubar (FRAME_PTR f) | |||
| 1278 | 1275 | ||
| 1279 | #ifndef USE_GTK | 1276 | #ifndef USE_GTK |
| 1280 | void | 1277 | void |
| 1281 | free_frame_menubar (FRAME_PTR f) | 1278 | free_frame_menubar (struct frame *f) |
| 1282 | { | 1279 | { |
| 1283 | Widget menubar_widget; | 1280 | Widget menubar_widget; |
| 1284 | 1281 | ||
| @@ -1355,7 +1352,7 @@ static Lisp_Object *volatile menu_item_selection; | |||
| 1355 | create_and_show_popup_menu below. */ | 1352 | create_and_show_popup_menu below. */ |
| 1356 | struct next_popup_x_y | 1353 | struct next_popup_x_y |
| 1357 | { | 1354 | { |
| 1358 | FRAME_PTR f; | 1355 | struct frame *f; |
| 1359 | int x; | 1356 | int x; |
| 1360 | int y; | 1357 | int y; |
| 1361 | }; | 1358 | }; |
| @@ -1413,7 +1410,7 @@ pop_down_menu (void *arg) | |||
| 1413 | menu pops down. | 1410 | menu pops down. |
| 1414 | menu_item_selection will be set to the selection. */ | 1411 | menu_item_selection will be set to the selection. */ |
| 1415 | static void | 1412 | static void |
| 1416 | create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y, | 1413 | create_and_show_popup_menu (struct frame *f, widget_value *first_wv, int x, int y, |
| 1417 | bool for_click, Time timestamp) | 1414 | bool for_click, Time timestamp) |
| 1418 | { | 1415 | { |
| 1419 | int i; | 1416 | int i; |
| @@ -1522,7 +1519,7 @@ pop_down_menu (Lisp_Object arg) | |||
| 1522 | menu pops down. | 1519 | menu pops down. |
| 1523 | menu_item_selection will be set to the selection. */ | 1520 | menu_item_selection will be set to the selection. */ |
| 1524 | static void | 1521 | static void |
| 1525 | create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, | 1522 | create_and_show_popup_menu (struct frame *f, widget_value *first_wv, |
| 1526 | int x, int y, bool for_click, Time timestamp) | 1523 | int x, int y, bool for_click, Time timestamp) |
| 1527 | { | 1524 | { |
| 1528 | int i; | 1525 | int i; |
| @@ -1601,7 +1598,7 @@ cleanup_widget_value_tree (void *arg) | |||
| 1601 | } | 1598 | } |
| 1602 | 1599 | ||
| 1603 | Lisp_Object | 1600 | Lisp_Object |
| 1604 | xmenu_show (FRAME_PTR f, int x, int y, bool for_click, bool keymaps, | 1601 | xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps, |
| 1605 | Lisp_Object title, const char **error_name, Time timestamp) | 1602 | Lisp_Object title, const char **error_name, Time timestamp) |
| 1606 | { | 1603 | { |
| 1607 | int i; | 1604 | int i; |
| @@ -1894,7 +1891,7 @@ dialog_selection_callback (GtkWidget *widget, gpointer client_data) | |||
| 1894 | dialog pops down. | 1891 | dialog pops down. |
| 1895 | menu_item_selection will be set to the selection. */ | 1892 | menu_item_selection will be set to the selection. */ |
| 1896 | static void | 1893 | static void |
| 1897 | create_and_show_dialog (FRAME_PTR f, widget_value *first_wv) | 1894 | create_and_show_dialog (struct frame *f, widget_value *first_wv) |
| 1898 | { | 1895 | { |
| 1899 | GtkWidget *menu; | 1896 | GtkWidget *menu; |
| 1900 | 1897 | ||
| @@ -1940,7 +1937,7 @@ dialog_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data) | |||
| 1940 | dialog pops down. | 1937 | dialog pops down. |
| 1941 | menu_item_selection will be set to the selection. */ | 1938 | menu_item_selection will be set to the selection. */ |
| 1942 | static void | 1939 | static void |
| 1943 | create_and_show_dialog (FRAME_PTR f, widget_value *first_wv) | 1940 | create_and_show_dialog (struct frame *f, widget_value *first_wv) |
| 1944 | { | 1941 | { |
| 1945 | LWLIB_ID dialog_id; | 1942 | LWLIB_ID dialog_id; |
| 1946 | 1943 | ||
| @@ -1984,7 +1981,7 @@ static const char * button_names [] = { | |||
| 1984 | "button6", "button7", "button8", "button9", "button10" }; | 1981 | "button6", "button7", "button8", "button9", "button10" }; |
| 1985 | 1982 | ||
| 1986 | static Lisp_Object | 1983 | static Lisp_Object |
| 1987 | xdialog_show (FRAME_PTR f, | 1984 | xdialog_show (struct frame *f, |
| 1988 | bool keymaps, | 1985 | bool keymaps, |
| 1989 | Lisp_Object title, | 1986 | Lisp_Object title, |
| 1990 | Lisp_Object header, | 1987 | Lisp_Object header, |
| @@ -2214,7 +2211,7 @@ menu_help_callback (char const *help_string, int pane, int item) | |||
| 2214 | static void | 2211 | static void |
| 2215 | pop_down_menu (Lisp_Object arg) | 2212 | pop_down_menu (Lisp_Object arg) |
| 2216 | { | 2213 | { |
| 2217 | FRAME_PTR f = XSAVE_POINTER (arg, 0); | 2214 | struct frame *f = XSAVE_POINTER (arg, 0); |
| 2218 | XMenu *menu = XSAVE_POINTER (arg, 1); | 2215 | XMenu *menu = XSAVE_POINTER (arg, 1); |
| 2219 | 2216 | ||
| 2220 | block_input (); | 2217 | block_input (); |
| @@ -2242,7 +2239,7 @@ pop_down_menu (Lisp_Object arg) | |||
| 2242 | 2239 | ||
| 2243 | 2240 | ||
| 2244 | Lisp_Object | 2241 | Lisp_Object |
| 2245 | xmenu_show (FRAME_PTR f, int x, int y, bool for_click, bool keymaps, | 2242 | xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps, |
| 2246 | Lisp_Object title, const char **error_name, Time timestamp) | 2243 | Lisp_Object title, const char **error_name, Time timestamp) |
| 2247 | { | 2244 | { |
| 2248 | Window root; | 2245 | Window root; |