diff options
| author | YAMAMOTO Mitsuharu | 2006-09-19 03:18:46 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2006-09-19 03:18:46 +0000 |
| commit | 20a1fc8bd9fbe27796d9d7a30018b43c351e39f7 (patch) | |
| tree | a13afbcaac78cbd0be75061c82d0d1e19809b8f0 /src | |
| parent | b0da976d4932de188395733216d16ed1f63965ae (diff) | |
| download | emacs-20a1fc8bd9fbe27796d9d7a30018b43c351e39f7.tar.gz emacs-20a1fc8bd9fbe27796d9d7a30018b43c351e39f7.zip | |
(menubar_selection_callback): Remove extern.
(M_APPLE): Change to 234.
(do_apple_menu) [!TARGET_API_MAC_CARBON]: Make non-static.
(do_menu_choice): Remove function.
Diffstat (limited to 'src')
| -rw-r--r-- | src/macterm.c | 46 |
1 files changed, 4 insertions, 42 deletions
diff --git a/src/macterm.c b/src/macterm.c index 5b1bda42891..7cd7bd87225 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -261,9 +261,6 @@ static int is_emacs_window P_ ((WindowPtr)); | |||
| 261 | static XCharStruct *mac_per_char_metric P_ ((XFontStruct *, XChar2b *, int)); | 261 | static XCharStruct *mac_per_char_metric P_ ((XFontStruct *, XChar2b *, int)); |
| 262 | static void XSetFont P_ ((Display *, GC, XFontStruct *)); | 262 | static void XSetFont P_ ((Display *, GC, XFontStruct *)); |
| 263 | 263 | ||
| 264 | /* Defined in macmenu.h. */ | ||
| 265 | extern void menubar_selection_callback (FRAME_PTR, int); | ||
| 266 | |||
| 267 | #define GC_FORE_COLOR(gc) (&(gc)->fore_color) | 264 | #define GC_FORE_COLOR(gc) (&(gc)->fore_color) |
| 268 | #define GC_BACK_COLOR(gc) (&(gc)->back_color) | 265 | #define GC_BACK_COLOR(gc) (&(gc)->back_color) |
| 269 | #define GC_FONT(gc) ((gc)->xgcv.font) | 266 | #define GC_FONT(gc) ((gc)->xgcv.font) |
| @@ -8492,7 +8489,7 @@ mac_set_font_info_for_selection (f, face_id, c) | |||
| 8492 | #endif | 8489 | #endif |
| 8493 | #endif /* ! TARGET_API_MAC_CARBON */ | 8490 | #endif /* ! TARGET_API_MAC_CARBON */ |
| 8494 | 8491 | ||
| 8495 | #define M_APPLE 128 | 8492 | #define M_APPLE 234 |
| 8496 | #define I_ABOUT 1 | 8493 | #define I_ABOUT 1 |
| 8497 | 8494 | ||
| 8498 | #define WINDOW_RESOURCE 128 | 8495 | #define WINDOW_RESOURCE 128 |
| @@ -9082,10 +9079,10 @@ mac_tsm_suspend () | |||
| 9082 | } | 9079 | } |
| 9083 | #endif | 9080 | #endif |
| 9084 | 9081 | ||
| 9085 | static void | 9082 | #if !TARGET_API_MAC_CARBON |
| 9083 | void | ||
| 9086 | do_apple_menu (SInt16 menu_item) | 9084 | do_apple_menu (SInt16 menu_item) |
| 9087 | { | 9085 | { |
| 9088 | #if !TARGET_API_MAC_CARBON | ||
| 9089 | Str255 item_name; | 9086 | Str255 item_name; |
| 9090 | SInt16 da_driver_refnum; | 9087 | SInt16 da_driver_refnum; |
| 9091 | 9088 | ||
| @@ -9096,43 +9093,8 @@ do_apple_menu (SInt16 menu_item) | |||
| 9096 | GetMenuItemText (GetMenuHandle (M_APPLE), menu_item, item_name); | 9093 | GetMenuItemText (GetMenuHandle (M_APPLE), menu_item, item_name); |
| 9097 | da_driver_refnum = OpenDeskAcc (item_name); | 9094 | da_driver_refnum = OpenDeskAcc (item_name); |
| 9098 | } | 9095 | } |
| 9099 | #endif /* !TARGET_API_MAC_CARBON */ | ||
| 9100 | } | ||
| 9101 | |||
| 9102 | void | ||
| 9103 | do_menu_choice (SInt32 menu_choice) | ||
| 9104 | { | ||
| 9105 | SInt16 menu_id, menu_item; | ||
| 9106 | |||
| 9107 | menu_id = HiWord (menu_choice); | ||
| 9108 | menu_item = LoWord (menu_choice); | ||
| 9109 | |||
| 9110 | switch (menu_id) | ||
| 9111 | { | ||
| 9112 | case 0: | ||
| 9113 | break; | ||
| 9114 | |||
| 9115 | case M_APPLE: | ||
| 9116 | do_apple_menu (menu_item); | ||
| 9117 | break; | ||
| 9118 | |||
| 9119 | default: | ||
| 9120 | { | ||
| 9121 | struct frame *f = mac_focus_frame (&one_mac_display_info); | ||
| 9122 | MenuHandle menu = GetMenuHandle (menu_id); | ||
| 9123 | if (menu) | ||
| 9124 | { | ||
| 9125 | UInt32 refcon; | ||
| 9126 | |||
| 9127 | GetMenuItemRefCon (menu, menu_item, &refcon); | ||
| 9128 | menubar_selection_callback (f, refcon); | ||
| 9129 | } | ||
| 9130 | } | ||
| 9131 | } | ||
| 9132 | |||
| 9133 | HiliteMenu (0); | ||
| 9134 | } | 9096 | } |
| 9135 | 9097 | #endif /* !TARGET_API_MAC_CARBON */ | |
| 9136 | 9098 | ||
| 9137 | /* Handle drags in size box. Based on code contributed by Ben | 9099 | /* Handle drags in size box. Based on code contributed by Ben |
| 9138 | Mesander and IM - Window Manager A. */ | 9100 | Mesander and IM - Window Manager A. */ |