aboutsummaryrefslogtreecommitdiffstats
path: root/src/macmenu.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* (popup_activated_flag): New variable.YAMAMOTO Mitsuharu2007-03-181-0/+15
| | | | | (x_activate_menubar, mac_menu_show): Set it during menu tracking. (popup_activated): New function.
* (mac_menu_show): Call unbind_to early. Use variableYAMAMOTO Mitsuharu2007-02-231-19/+15
| | | | | | `menu_item_selection' as in W32 version. [TARGET_API_MAC_CARBON] (mac_handle_dialog_event): Add explicit braces to avoid ambiguous `else'.
* Add 2007 to copyright years.Glenn Morris2007-01-211-1/+1
|
* [TARGET_API_MAC_CARBON] (create_and_show_dialog):YAMAMOTO Mitsuharu2007-01-151-3/+9
| | | | | | Create movable modal window instead of movable alert window. [TARGET_API_MAC_CARBON] (create_and_show_dialog) [!MAC_OSX]: Use DeactivateControl instead of DisableControl.
* [TARGET_API_MAC_CARBON] (create_and_show_dialog): UseYAMAMOTO Mitsuharu2007-01-141-11/+36
| | | | | DisableControl for disabled items. Set default button to first enabled one. Use icon of application in execution.
* (HAVE_DIALOGS): Define if TARGET_API_MAC_CARBON.YAMAMOTO Mitsuharu2007-01-121-5/+358
| | | | | | | | | | | | | | (mac_handle_dialog_event, install_dialog_event_handler) (create_and_show_dialog) [TARGET_API_MAC_CARBON]: New functions. (DIALOG_LEFT_MARGIN, DIALOG_TOP_MARGIN, DIALOG_RIGHT_MARGIN) (DIALOG_BOTTOM_MARGIN, DIALOG_MIN_INNER_WIDTH) (DIALOG_MAX_INNER_WIDTH, DIALOG_BUTTON_BUTTON_HORIZONTAL_SPACE) (DIALOG_BUTTON_BUTTON_VERTICAL_SPACE, DIALOG_BUTTON_MIN_WIDTH) (DIALOG_TEXT_MIN_HEIGHT, DIALOG_TEXT_BUTTONS_VERTICAL_SPACE) (DIALOG_ICON_WIDTH, DIALOG_ICON_HEIGHT, DIALOG_ICON_LEFT_MARGIN) (DIALOG_ICON_TOP_MARGIN) [TARGET_API_MAC_CARBON]: New macros. (mac_dialog) [TARGET_API_MAC_CARBON]: Remove function. (mac_dialog_show) [TARGET_API_MAC_CARBON]: Use create_and_show_dialog.
* (mac_dialog_modal_filter) [MAC_OSX]: New function.YAMAMOTO Mitsuharu2007-01-091-4/+117
| | | | | | | (Fx_popup_dialog) [MAC_OSX]: Use standard alert if called from Fmessage_box, Fyes_or_no_p, or Fy_or_n_p. [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030] (menu_quit_handler): Use mac_quit_char_key_p.
* (Vshow_help_function) [TARGET_API_MAC_CARBON]: Add extern.YAMAMOTO Mitsuharu2007-01-051-0/+78
| | | | | | | | (restore_show_help_function, menu_target_item_handler) [TARGET_API_MAC_CARBON]: New functions. (install_menu_target_item_handler): New function. (add_menu_item) [TARGET_API_MAC_CARBON]: Set help string as menu item property.
* (menu_quit_handler, install_menu_quit_handler):YAMAMOTO Mitsuharu2006-11-141-6/+10
| | | | | | | | Replace `#ifdef HAVE_CANCELMENUTRACKING' with `#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030'. (install_menu_quit_handler) [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 && MAC_OS_X_VERSION_MIN_REQUIRED == 1020]: Check if CancelMenuTracking is available.
* (Fmenu_or_popup_active_p): Define outside HAVE_MENUS.Chong Yidong2006-11-061-11/+11
|
* (Fmenu_or_popup_active_p): New function.Eli Zaretskii2006-11-051-0/+12
| | | | (syms_of_macmenu): Defsubr it.
* (install_menu_quit_handler): Make variable `typesList'YAMAMOTO Mitsuharu2006-10-311-3/+4
| | | | | static const. (name_is_separator): Add const qualifier to arguments.
* (enum mac_menu_kind, min_menu_id): New enumerator andYAMAMOTO Mitsuharu2006-09-191-21/+42
| | | | | | | | menu ID for Apple menu. (menubar_selection_callback): Remove function. (find_and_call_menu_selection): New function from xmenu.c. (x_activate_menubar): Use it. (set_frame_menubar): Don't use f->output_data.mac->menubar_active.
* * src/macmenu.c (Vmenu_updating_frame, syms_of_xmenu):YAMAMOTO Mitsuharu2006-09-101-7/+2
| | | | | * src/w32menu.c (Vmenu_updating_frame, syms_of_xmenu): Apply 2006-09-08 change for xmenu.c.
* (restore_menu_items, cleanup_popup_menu): Return a value.YAMAMOTO Mitsuharu2006-05-051-0/+2
|
* (restore_menu_items, save_menu_items): New functions from xmenu.c.YAMAMOTO Mitsuharu2006-04-211-5/+53
| | | | | (set_frame_menubar, digest_single_submenu): Apply 2006-04-18 changes for xmenu.c.
* (min_menu_id): Make element type explicit.YAMAMOTO Mitsuharu2006-04-121-1/+1
|
* (enum mac_menu_kind): New enum.YAMAMOTO Mitsuharu2006-03-241-51/+66
| | | | | | | | | | | | | | (min_menu_id): New variable. (POPUP_SUBMENU_ID, MIN_POPUP_SUBMENU_ID, MIN_MENU_ID) (MIN_SUBMENU_ID): Remove defines. All uses are replaced with min_menu_id and enumerators in enum mac_menu_kind. (fill_menu, dispose_menus, install_menu_quit_handler): New arg KIND. All uses changed. Add range check for menu ID. (fill_menubar): Add range check for menu ID. [HAVE_CANCELMENUTRACKING] (menu_quit_handler): Check error code of GetEventParameter. (set_frame_menubar, mac_menu_show): Call install_menu_quit_handler for each menu kind.
* (digest_single_submenu): Apply 2006-02-19 change for xmenu.c.YAMAMOTO Mitsuharu2006-02-221-1/+4
|
* (popup_activated_flag, submenu_id)YAMAMOTO Mitsuharu2006-02-191-127/+116
| | | | | | | | | | | | | | | | (next_menubar_widget_id): Remove variables. (initialize_frame_menubar): Remove function. (pop_down_menu, mac_menu_show): Simplify save value. (dispose_menus): New function. (pop_down_menu, fill_menubar): Use it. (fill_submenu): Remove function. All uses changed to fill_menu. (add_menu_item): Remove args SUBMENU and FORCE_DISABLE. New arg POS. Don't call SetMenuItemHierarchicalID here. (fill_menu): Add arg SUBMENU_ID. Return submenu_id that is to be used next. Call SetMenuItemHierarchicalID here. (fill_menubar): Add arg DEEP_P. All uses changed. Clean up menu objects if needed. Reuse existing menu bar titles if possible. (set_frame_menubar): Don't clean up menu objects here.
* (set_frame_menubar): Don't call DrawMenuBar.YAMAMOTO Mitsuharu2006-02-151-2/+0
|
* Update years in copyright notice; nfc.Thien-Thi Nguyen2006-02-061-1/+1
|
* (Qmac_apple_event): Add extern.YAMAMOTO Mitsuharu2005-12-211-187/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | (set_frame_menubar, mac_menu_show keymp_panes) (single_keymap_panes, list_of_panes, list_of_item) (single_menu_item): Add argument types to prototypes. (mac_dialog_show) [HAVE_DIALOGS]: Likewise. (struct skp): New struct (from xmenu.c). (single_keymap_panes, single_menu_item, list_of_panes) (list_of_item): Sync with xmenu.c. (Fx_popup_menu, Fx_popup_dialog): Likewise. Don't get window from POSITION if it is mac-apple-event event. (menubar_selection_callback): Don't use menu_command_in_progress. (set_frame_menubar): First parse all submenus, then make widget_value trees from them. Don't allocate any widget_value objects until we are done with the parsing. (parse_single_submenu, digest_single_submenu): New functions. (single_submenu): Function deleted, replaced by those two. (install_menu_quit_handler) [HAVE_CANCELMENUTRACKING]: Don't create or dispose of EventHandlerUPP. Install hander to all submenus. (mac_menu_show) [!HAVE_MULTILINGUAL_MENU]: Use ENCODE_MENU_STRING instead of ENCODE_SYSTEM. (free_frame_menubar, fill_submenu, fill_menu): Don't use NULL for integer values. [HAVE_DIALOGS] (mac_dialog_show): Sync with xdialog_show (in xmenu.c). (add_menu_item) [TARGET_API_MAC_CARBON]: Use CFString functions to format menu item string. Don't use NULL for integer value.
* (Fx_popup_menu): Add `else' to set Vmenu_updating_frame to nilJuri Linkov2005-12-201-1/+2
| | | | only if position is nil.
* Update years in copyright notice; nfc.Thien-Thi Nguyen2005-08-071-1/+2
|
* (Fx_popup_menu, Fx_popup_menu): Doc fixes.YAMAMOTO Mitsuharu2005-07-231-21/+36
|
* Update FSF's address.Lute Kamstra2005-07-041-2/+2
|
* * composite.c (compose_chars_in_text):Kim F. Storm2005-06-081-4/+4
| | | | | | | | | | | * eval.c (do_autoload): * macmenu.c (set_frame_menubar): * process.c (read_process_output, exec_sentinel): * xmenu.c (set_frame_menubar): * xdisp.c (prepare_menu_bars, update_menu_bar, update_tool_bar): * w32menu.c (set_frame_menubar): Use record_unwind_save_match_data. Rename restore_match_data to restore_search_regs.
* * macmenu.c (menu_quit_handler, install_menu_quit_handler): NewJan Djärv2005-06-061-32/+121
| | | | | functions for popping down menus on C-g. (set_frame_menubar, mac_menu_show): Call install_menu_quit_handler.
* * macmenu.c (cleanup_popup_menu): New function.Jan Djärv2005-06-041-2/+14
| | | | | | | (Fx_popup_menu): unwind protect cleanup_popup_menu in case mac_menu_show Quit:s. (mac_menu_show): Quit on cancel if not popped up on click (i.e. a dialog).
* (Fx_popup_dialog): Allow 3rd optional argument.Nick Roberts2005-05-241-1/+1
|
* (Fx_popup_dialog): Add a third boolean argument to select frame titleNick Roberts2005-05-241-9/+18
| | | | | ("Question"/"Information"). (mac_dialog_show): Use it.
* Don't include signal.h.YAMAMOTO Mitsuharu2005-05-131-1/+0
|
* [TARGET_API_MAC_CARBON]: Don't include headers that are included viaYAMAMOTO Mitsuharu2005-03-041-2/+2
| | | | Carbon.h.
* * macterm.h (cfstring_create_with_utf8_cstring): Added prototype.Steven Tamm2004-12-031-11/+2
| | | | | | | | | | | | | * image.c (image_load_quartz2d): Use cfstring_create_with_utf8_cstring * macmenu.c (add_menu_item): Use cfstring_create_with_utf8_cstring * macfns.c (x_set_name, x_set_title): Use cfstring_create_with_utf8_cstring (Fx_file_dialog): Use cfstring_create_with_utf8_cstring and use constant CFRefs instead of creating them each time for labels. * mac.c (cfstring_create_with_utf8_cstring): Added to prevent crashes with invalid characters.
* * macmenu.c (add_menu_item): Fallback on MacRoman if encodingSteven Tamm2004-12-011-0/+8
| | | | menu text as UTF8 fails.
* macfns.c (mac_get_window_bounds): Add extern.Steven Tamm2004-10-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | (x_real_positions): Use mac_get_window_bounds. macmenu.c (update_submenu_strings): Apply 2004-09-07 change for xmenu.c (YAILOM). macterm.c [!MAC_OSX]: Include Windows.h. (front_emacs_window): Rename from mac_front_window. All uses changed. Return the frontmost non-tooltip emacs window. (mac_get_window_bounds): New function. (x_calc_absolute_position): Use the difference of width and height between the inner and outer window. (x_set_offset): Specify window position by the coordinae of the outer window. Adjust the position if the title bar is completely outside the screen. (app_is_suspended, app_sleep_time): Remove unused variables. (do_app_resume, do_app_suspend): Remove their contents because window-activate/deactivate events will do the job. (do_zoom_window): Remove unused variables. Make compliant to the standard way of zooming. Set f->left_pos and f->top_pos. (XTread_socket): Don't use argument `expected'. Don't use FrontWindow to determine the clicked window. Exclude unprocessed mouseUp cases in the early stage. Add parentheses to fix operator precedence. (XTread_socket) [TARGET_API_MAC_CARBON]: Don't specify drag area.
* (add_menu_item): Remove unused variable `i'. Don'tSteven Tamm2004-09-021-3/+3
| | | | let separator items destroy refence constants of other menu items.
* * macmenu.c (_widget_value): Added lname and lkey.Jan Djärv2004-08-301-10/+43
| | | | | | | | (single_submenu): Set lname and lkey in widget_value instead of name and key. (update_submenu_strings): New function. (set_frame_menubar): Remove call to inhibit_garbage_collection, call update_submenu_strings.
* macmenu.c (mac_menu_show): Remove shadowing of menu variableSteven Tamm2004-08-301-6/+6
| | | | by using different names for inner loop variables.
* macmenu.c (ENCODE_MENU_STRING): Added to handle multibyteSteven Tamm2004-08-261-5/+25
| | | | | | | | strings in menu items. (single_submenu): Use ENCODE_MENU_STRING (mac_menu_show): Use ENCODE_MENU_STRING. Reset grabbed because button release isn't passed to event loop (add_menu_item): Use SetMenuItemWithCFString
* Support Tooltips with the Carbon emacs port.Steven Tamm2004-05-301-15/+3
| | | | Some code cleanup using helper macros.
* Various fixes to support USE_LSB_TAG with carbon emacs. Mostly fixingSteven Tamm2004-05-141-1/+2
| | | | prototypes and confusions between pointers and lisp objects
* Inserting Yamomotosan's changes for MacOSX image support, better supportSteven Tamm2004-02-261-28/+1
| | | | of Asian fonts, and some long awaited header cleanup and centralization.
* Add arch taglinesMiles Bader2003-09-011-0/+3
|
* (menubar_selection_callback): Don't pass uninitializedStefan Monnier2003-06-151-1/+2
| | | | data to kbd_buffer_store_event.
* Make (few) trivial substitutions for renamed andKim F. Storm2003-05-241-4/+2
| | | | new macros in dispextern.h, frame.h and window.h.
* Trailing whitespace deleted.Juanma Barranquero2003-02-041-33/+33
|
* * macmenu.c (MIN_POPUP_SUBMENU_ID): AddedSteven Tamm2002-12-221-24/+48
| | | | | | | (mac_menu_show): Added support for hierarchical popup menus (add_menu_item): Removed indentation support (fill_submenu, fill_menu): Now creates hierarchical menus instead of using indentation
* 2002-12-02 Andrew Choi <akochoi@shaw.ca>Andrew Choi2002-12-021-5/+7
| | | | | | | | | | | * macmenu.c (add_menu_item, fill_menubar): Truncate menu item names to 255 characters. * macterm.c (XTread_socket): If all frames have been collapsed, expand the first one before handling drag-and-drop events. * s/darwin.h (GETPGRP_NO_ARG): Delete. Replaced by GETPGRP_VOID, which is detected by autoconf.