aboutsummaryrefslogtreecommitdiffstats
path: root/src/macterm.c
Commit message (Collapse)AuthorAgeFilesLines
* (mac-emulate-three-button-mouse): Delete duplicate words.Juri Linkov2005-07-181-1/+1
|
* (x_bitmap_icon, x_make_frame_visible): Remove declarations.YAMAMOTO Mitsuharu2005-07-181-164/+136
| | | | | | | | | | | | | | | | | | | (XSetFont): Add declaration. (mac_set_forecolor, mac_set_backcolor, mac_set_colors): Remove functions. (GC_FORE_COLOR, GC_BACK_COLOR, GC_FONT, MAC_WINDOW_NORMAL_GC): New defines. (XDrawLine, mac_draw_line_to_pixmap, XClearWindow) (mac_draw_bitmap, XCreatePixmapFromBitmapData, XFillRectangle) (mac_draw_rectangle, mac_draw_string_common, mac_scroll_area): Use them. (mac_erase_rectangle): New function. (XClearArea, x_draw_fringe_bitmap, x_clear_glyph_string_rect) (x_draw_stretch_glyph_string): Use it. (XChangeGC, XCreateGC, XGetGCValues, XSetForeground) (XSetBackground, XSetFont): Adjust for new GC implementation. (x_draw_fringe_bitmap, x_draw_box_rect): Use GC to set colors. (XTset_vertical_scroll_bar): Clear area under scroll bar.
* (mac_window_to_frame): Remove duplicate define.YAMAMOTO Mitsuharu2005-07-141-2/+0
|
* Don't include stdlib.h or composite.h.YAMAMOTO Mitsuharu2005-07-131-316/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (x_use_underline_position_properties, last_mouse_press_frame) (x_noop_count, Qvendor_specific_keysyms): Remove unused variables. (syms_of_macterm, mac_initialize): Don't initialize them. (waiting_for_input, initial_argv, initial_argc) (Vcommand_line_args, Vx_no_window_manager, errno, window_scroll) (set_frame_menubar, path_from_vol_dir_name): Remove externs. (extra_keyboard_modifiers): Fix type in extern. (x_window_to_frame, x_window_to_scroll_bar): Remove declarations. (x_scroll_bar_report_motion): Add argument types to declaration. (mac_compute_glyph_string_overhangs): Add declaration. (disable_mouse_highlight): Remove unused variable. [USE_TOOLKIT_SCROLL_BARS] (construct_scroll_bar_click) (x_scroll_bar_handle_press, x_scroll_bar_handle_release) (x_scroll_bar_handle_drag): Remove argument `timestamp'. All callers changed. [USE_TOOLKIT_SCROLL_BARS] (construct_scroll_bar_click): Don't set timestamp. [USE_CARBON_EVENTS] (mac_handle_mouse_event): Likewise. (x_scroll_bar_create, XTset_vertical_scroll_bar): Show scroll bar only when its width is less than the height. (XTredeem_scroll_bar): Sync with xterm.c. (font_name_table, font_name_table_size, font_name_count): Make static. (drag_and_drop_file_list): Remove variable. Previous use is now local to function. (do_ae_open_documents): Move DRAG_N_DROP event construction part from XTread_socket. (XTread_socket): Consolidate setting of event timestamp. Move DRAG_N_DROP event construction part to do_ae_open_documents. Support extra_keyboard_modifiers.
* (mac_draw_vertical_window_border): Use foreground ofYAMAMOTO Mitsuharu2005-07-061-18/+30
| | | | | | | | | | VERTICAL_BORDER_FACE_ID for vertical border line. (mac_encode_char): Call check_ccl_update in advance. (mac_to_x_fontname, x_font_name_to_mac_font_name) (init_font_name_table, mac_do_list_fonts, XLoadQueryFont): Don't assume that font family length is less than 32. (x_compute_min_glyph_bounds): Make static. (x_load_font): Never set fonts_changed_p to zero.
* Update FSF's address.Lute Kamstra2005-07-041-2/+2
|
* [USE_CARBON_EVENTS] (mac_convert_event_ref): Fix last change.YAMAMOTO Mitsuharu2005-06-271-0/+2
|
* (mac_compute_glyph_string_overhangs): Don't setYAMAMOTO Mitsuharu2005-06-151-124/+190
| | | | | | | | | | | | | | | | overhangs unless the given glyph type is noncomposite CHAR_GLYPH. [USE_CARBON_EVENTS] (mac_convert_event_ref): Convert dead key down events. (XTread_socket): Don't pass keyboard events with the option modifier to the system when Vmac_command_key_is_meta is nil or Vmac_option_modifier is non-nil. [USE_CARBON_EVENTS] (read_socket_inev): New variable. [USE_CARBON_EVENTS] (init_command_handler): Fix argument. [USE_CARBON_EVENTS] (mac_handle_mouse_event): New Carbon event handler function. (install_window_handler) [USE_CARBON_EVENTS]: Install it. (XTread_socket) [USE_CARBON_EVENTS]: Move mouse wheel event handler part to mac_handle_mouse_event.
* * macterm.c: Make mac_quit_char_modifiers and mac_quit_char_keycodeJan Djärv2005-06-061-2/+2
| | | | non-static.
* (mac_to_x_fontname, mac_do_list_fonts): Set XLFDYAMAMOTO Mitsuharu2005-06-011-4/+5
| | | | resolution fields for scalable fonts to 0.
* [USE_TOOLKIT_SCROLL_BARS] (get_control_part_bounds):YAMAMOTO Mitsuharu2005-05-131-42/+43
| | | | | | | | | | | | Rename from get_control_part_bound. All callers changed. (x_scroll_bar_clear): New function. (x_clear_frame): Use it. (XTset_vertical_scroll_bar): Don't call Draw1Control. (x_scroll_bar_handle_click): Change type of second argument from int to ControlPartCode. (check_alarm): Remove declaration. (XTread_Socket) [!TARGET_API_MAC_CARBON]: Don't call it. (XTread_Socket): Use ControlPartCode instead of SInt16.
* (toolkit_scroll_bar_interaction): Remove unusedYAMAMOTO Mitsuharu2005-05-061-79/+423
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | variable. (mac_handle_tool_bar_click): Remove unused function and declaration. [USE_TOOLKIT_SCROLL_BARS] (scroll_bar_timer_callback) (install_scroll_bar_timer, set_scroll_bar_timer) (control_part_code_to_scroll_bar_part, construct_scroll_bar_click) (get_control_part_bound, x_scroll_bar_handle_press) (x_scroll_bar_handle_release, x_scroll_bar_handle_drag) (x_set_toolkit_scroll_bar_thumb): New functions and declarations. [USE_TOOLKIT_SCROLL_BARS] (last_scroll_bar_part, scroll_bar_timer) (scroll_bar_timer_event_posted_p): New variables. [USE_TOOLKIT_SCROLL_BARS] (SCROLL_BAR_FIRST_DELAY) (SCROLL_BAR_CONTINUOUS_DELAY): New macros. (x_scroll_bar_create): Set control reference with NewControl. (x_scroll_bar_create) [USE_TOOLKIT_SCROLL_BARS]: Initialize track_top and track_height to nil. (x_scroll_bar_set_handle, x_scroll_bar_note_movement): Put functions in #ifndef USE_TOOLKIT_SCROLL_BARS. (XTset_vertical_scroll_bar): Don't make space between scroll bar and associated window. (XTset_vertical_scroll_bar) [MAC_OSX]: Get scroll bar area width from window config. (XTset_vertical_scroll_bar) [USE_TOOLKIT_SCROLL_BARS]: Set track_top and track_height to nil when scroll bar size is changed. Recalculate them if they are nil. (XTread_socket) [MAC_OSX]: Use control kind to determine if the clicked control is a scroll bar. (XTread_socket) [USE_TOOLKIT_SCROLL_BARS]: Use toolkit scroll bar event handler functions. Don't add modifiers to scroll bar click events. Call scroll bar release handler when window is deactivated. (mac_initialize): Remove unused code for X toolkit. (syms_of_macterm) [!USE_TOOLKIT_SCROLL_BARS]: Initialize Vx_toolkit_scroll_bars to nil.
* (handling_window_update, terminate_flag): Remove variables.YAMAMOTO Mitsuharu2005-04-241-126/+219
| | | | | | | | | | | | | | | | | | | | | | | (do_window_update, do_ae_quit_application, XTread_socket): Don't use them. (WNE_SLEEP_AT_SUSPEND, WNE_SLEEP_AT_RESUME): Don't define. [USE_CARBON_EVENTS && MAC_OSX] (mac_handle_service_event) (init_service_handler): Move to macselect.c. Remove declarations. [USE_CARBON_EVENTS && MAC_OSX] (init_service_handler): Add extern. (Qapplication, Qabout): New variables. (syms_of_mac): Initialize them. [USE_CARBON_EVENTS && MAC_OSX] (Qpreferences, Qservices, Qpaste) (Qperform): New variables. (syms_of_mac) [USE_CARBON_EVENTS && MAC_OSX]: Initialize them. (do_get_menus) [!TARGET_API_MAC_CARBON]: Don't call AppendResMenu. (do_menu_choice): Unhighlight menu bar also when menu_id is 0. (mac_store_application_menu_event, init_menu_bar): New functions. [USE_CARBON_EVENTS] (mac_handle_command_event) (init_command_handler): New functions. (mac_handle_window_event): Return noErr on window update event. (do_ae_quit_application): Call mac_store_application_menu_event. (mac_initialize) [USE_CARBON_EVENTS]: Call init_command_handler and init_menu_bar.
* (Qbig5, Qcn_gb, Qsjis, Qeuc_kr): Remove variables.YAMAMOTO Mitsuharu2005-04-191-397/+327
| | | | | | | | | | | | | | | | | | | | | | | | | | (syms_of_mac): Don't initialize them. (Vmac_charset_info_alist): New variable. (syms_of_mac): Defvar it. (create_text_encoding_info_alist): New function. (decode_mac_font_name, mac_to_x_fontname) (x_font_name_to_mac_font_name, init_font_name_table): Don't hard code the correspondence among XLFD charsets, Mac script codes, and Emacs coding systems. Use Vmac_charset_info_alist and result of create_text_encoding_info_alist instead. (init_font_name_table) [TARGET_API_MAC_CARBON]: Use Font Manager routines also on Mac OS Classic. (init_font_name_table) [!TARGET_API_MAC_CARBON]: Use add_font_name_table_entry. (mac_do_list_fonts): Regard 0 in XLFD scaleble fields as specified. Derive unspecified scalable fields from specified one. (x_list_fonts): Consider Valternate_fontname_alist. (kDefaultFontSize): Change value from 9 to 12. (XLoadQueryFont): Get decoded font family, font face, and charset from x_font_name_to_mac_font_name. Set full name of loaded font. (mac_unload_font): Free `full_name' member. (x_load_font): Don't try XLoadQueryFont if x_list_fonts returns NULL. Copy full_name member of struct MacFontStruct to that of struct font_info.
* (XTread_socket): Don't beep on keyboard input even if no frame isYAMAMOTO Mitsuharu2005-04-181-1/+5
| | | | visible.
* (x_autoselect_window_p): Remove variable.YAMAMOTO Mitsuharu2005-04-161-157/+206
| | | | | | | | | | | | | | | | | | | | | | | (last_window): New variable. (XTreassert_line_highlight, x_change_line_highlight): Remove declarations. (mac_focus_changed, x_detect_focus_change): New functions and declarations. (XTextExtents16, front_emacs_window): Remove function. (mac_focus_frame): New function. (XTmouse_position, do_menu_choice, do_zoom_window, XTread_socket) (mac_check_for_quit_char): Use it instead of front_emacs_window. (x_scroll_bar_report_motion): Obtain window from control owner. (x_make_frame_invisible): Set window manager size hint. (do_mouse_moved): Remove function. (XTread_socket): Move its contents here. Generate select-window event on mouse movement if needed. Use x_detect_focus_change on activate/deactivate events. Don't deiconify frame or invalidate window rectangle when dnd items are dropped. Don't activate/deactivate root control. (frame_highlight, frame_unhighlight): Activate/deactivate root control here. (syms_of_macterm): Delete DEFVAR_BOOL for x_autoselect_window_p.
* [!TARGET_API_MAC_CARBON]: Don't include TextEncodingConverter.h.YAMAMOTO Mitsuharu2005-04-141-1/+0
|
* macterm.c (syms_of_macterm): Removing redundant definition ofSteven Tamm2005-04-141-4/+0
| | | | mac-pass-control-to-system
* (mac_keyboard_text_encoding, current_mac_keyboard_text_encoding):YAMAMOTO Mitsuharu2005-04-121-84/+17
| | | | | | | Remove variables. (XTread_socket): Store language-change event if keyboard script change is detected. Don't convert input to `mac_keyboard_text_encoding'. (syms_of_macterm): Delete DEFVAR_INT for mac-keyboard-text-encoding.
* (x_list_fonts): FONT-LIST-CACHE is now cadr part of name_list_element.YAMAMOTO Mitsuharu2005-03-161-55/+18
| | | | | | | (mac_make_rdb): Create resource database from preferences and argument string. (mac_term_init): Save resource database to cddr part of name_list_element.
* (activate_scroll_bars, deactivate_scroll_bars): Remove functions andYAMAMOTO Mitsuharu2005-03-161-102/+53
| | | | | | | | | | | | | | | | | | | | | | declarations. (mac_set_colors): Take argument for saving background color. All callers changed. (XDrawLine, XClearArea, mac_draw_bitmap, XFillRectangle) (mac_draw_rectangle, mac_draw_string_common): Save and Restore background color. (x_update_end, mac_do_track_drag): Don't reset background color. (mac_define_frame_cursor) [!TARGET_API_MAC_CARBON]: Use SetThemeCursor. (x_set_window_size) [TARGET_API_MAC_CARBON]: Move progress indicator control to the upper-right corner of the window. (arrow_cursor) [!TARGET_API_MAC_CARBON]: Remove variable. (do_init_managers) [!TARGET_API_MAC_CARBON]: Don't initialize it. (do_window_update): Update controls after updating content area. (mac_handle_window_event): Remove unused extern. (XTread_socket): Check both control handle and control part code to determine whether a scroll bar is clicked. Activate/deactivate root control instead of contained scroll bar controls. (make_mac_terminal_frame): Use ThemeCursor constants.
* (keycode_to_xkeysym_table): Change mapping so that it coincide withYAMAMOTO Mitsuharu2005-03-151-7/+11
| | | | | that in Apple X11 except `clear', `enter' on laptops, and fn + `enter' on laptops.
* [TARGET_API_MAC_CARBON && !MAC_OSX]: Define USE_CARBON_EVENTS to 1.YAMAMOTO Mitsuharu2005-03-041-24/+54
| | | | | | | | | | | | | | | | | | | | | | | | [__MRC__ && TARGET_API_MAC_CARBON]: Don't declare `qd'. (x_free_frame_resources): Call remove_window_handler for non-tooltip windows. [TARGET_API_MAC_CARBON]: Don't include headers that are included via Carbon.h. [TARGET_API_MAC_CARBON] (mac_do_track_dragUPP) (mac_do_receive_dragUPP): New variables. (mac_handle_service_event, init_service_handler): Put declarations and definitions in #ifdef MAC_OSX. (install_window_handler) [TARGET_API_MAC_CARBON]: Create UPPs for drag-and-drop handler functions and register them. (remove_window_handler): New function. (do_ae_open_documents, mac_do_receive_drag) [!MAC_OSX]: Use fsspec_to_posix_pathname. (main): Change #if !TARGET_API_MAC_CARBON to #ifdef MAC_OS8. (XTread_socket) [!MAC_OSX]: Don't pass keyboard events to TSM. [MAC_OS8] (make_mac_terminal_frame) [TARGET_API_MAC_CARBON]: Set default cursors. (mac_initialize) [USE_CARBON_EVENTS && !MAC_OSX] : Don't call init_service_handler or init_quit_char_handler. (mac_initialize) [!MAC_OSX]: Don't call MakeMeTheFrontProcess.
* (mac_draw_string_common, x_make_frame_visible): UseYAMAMOTO Mitsuharu2005-02-031-3/+3
| | | | | MAC_OS_X_VERSION_MAX_ALLOWED to conditionalize by the compiling OS version.
* (syms_of_macterm) <mac-reverse-ctrl-meta>: Fix docstring indentation.Jesper Harder2005-01-301-7/+7
| | | | (syms_of_macterm) <mac-emulate-three-button-mouse>: do.
* (x_draw_hollow_cursor): Use get_phys_cursor_geometry.Kim F. Storm2005-01-271-22/+3
|
* * dispextern.h (struct glyph_string): New members clip_head andSteven Tamm2005-01-241-32/+73
| | | | | | | | | | | | | | | | | | | clip_tail. * xdisp.c (get_glyph_string_clip_rect): Restrict horizontal clip region to the area between clip_head and clip_tail. (draw_glyphs): Record the area that need to be actually redrawn to the new variables clip_head and clip_tail when there are overhangs. Set values of these variables to the corresponding members in struct glyph_string. Refine x coordinates for * macgui.h (STORE_XCHARSETSTRUCT): New macro. * macterm.c (mac_compute_glyph_string_overhangs): Implement with QDTextBounds. (x_draw_glyph_string): Don't fill the background of the successor of a glyph with a right overhang if the successor will draw a cursor. (XLoadQueryFont): Obtain font metrics using QDTextBounds. (x_redisplay_interface): Add entry for compute_glyph_string_overhangs.
* (x_draw_glyph_string_box): Fix last_x for full width rows.Kim F. Storm2005-01-201-9/+3
|
* (syms_of_macterm) <mac-allow-anti-aliasing>: Doc fix.Kim F. Storm2005-01-161-2/+4
|
* * macterm.c (mac_to_x_fontname): Removed spurious argument.Steven Tamm2005-01-161-1/+1
|
* (mac_draw_string_common): Fix compilation on OSX 10.1.Andreas Schwab2005-01-161-3/+3
|
* Changed name from mac-use-core-graphics to mac-allow-anti-aliasingSteven Tamm2005-01-161-1/+1
|
* * macterm.c (Vmac_use_core_graphics): definedSteven Tamm2005-01-161-0/+24
| | | | | | (syms_of_macterm): Added mac-use-core-graphics (mac_draw_string_common): Use core graphics text rendering if mac-use-core-graphics is enabled.
* * macfns.c (x_set_foreground_color, x_set_background_color): SyncSteven Tamm2005-01-161-0/+56
| | | | | | | with xfns.c. (mac_window, x_create_tip_frame): Use XSetWindowBackground. * macterm.c (XSetBackground, XSetWindowBackground): New functions. * macterm.h (XSetBackground, XSetWindowBackground): Add externs.
* * macterm.c (XLoadQueryFont): Correctly handle 0 sizeSteven Tamm2005-01-071-4/+9
| | | | font widths that are returned from some Japanese fonts.
* * macfns.c: Include sys/param.h.Steven Tamm2005-01-061-22/+45
| | | | | | | | | | | | | | | | | | | | | | | | [TARGET_API_MAC_CARBON] (mac_nav_event_callback): New declaration and function. [TARGET_API_MAC_CARBON] (Fx_file_dialog): Use MAXPATHLEN for size of filename string. Set event callback function when creating dialog boxes. Add code conversions for filenames. Don't dispose apple event descriptor record if failed to create it. * macterm.c: Include sys/param.h. [USE_CARBON_EVENTS] (mac_handle_window_event): Add handler for kEventWindowUpdate. (install_window_handler) [USE_CARBON_EVENTS]: Register it. (do_ae_open_documents) [TARGET_API_MAC_CARBON]: Get FSRef instead of FSSpec from apple event descriptor record. (do_ae_open_documents) [TARGET_API_MAC_CARBON]: Use MAXPATHLEN for size of filename string. [TARGET_API_MAC_CARBON] (mac_do_receive_drag): Likewise. [TARGET_API_MAC_CARBON] (mac_do_receive_drag): Return error when a file dialog is in action. [TARGET_API_MAC_CARBON] (mac_do_track_drag): Likewise. Reject only when there are no filename items. Set background color before (un)highlighting the window below the dragged items. (XTread_socket) [!USE_CARBON_EVENTS]: Don't call do_window_update.
* * macterm.c (x_new_font): Set FRAME_SPACE_WIDTH.Steven Tamm2005-01-031-10/+42
| | | | | | (x_font_min_bounds, XLoadQueryFont): Use the correct font width metrics for max and min bounds. (x_load_font): Correctly calculate average font width metrics.
* * macterm.c (SelectionRange): Add Xcode position apple event struct.Steven Tamm2004-12-301-0/+19
| | | | | | | (do_ae_open_documents): Handle Xcode-style file position open events. * term/mac-win.el (mac-drag-n-drop): Handle drag-n-drop events that include line numbers.
* * term/mac-win.el: Require x-dnd.Steven Tamm2004-12-291-56/+113
| | | | | | | | | | | | | | | | | | | | | | | (mac-drag-n-drop): Sync with W32 version. Use x-dnd.el functions. * macfns.c (install_window_handler): Modify extern to return OSErr value. (mac_window): Handle return value of install_window_handler. * macterm.c (reflect_byte): Remove function. (mac_create_bitmap_from_bitmap_data): Don't call it. Lookup table instead. (mac_do_font_lists): Simplify calculation of the longest nonspecial string. [TARGET_API_MAC_CARBON] (init_mac_drag_n_drop): Remove function and declaration. (mac_initialize) [TARGET_API_MAC_CARBON]: Don't call it. [TARGET_API_MAC_CARBON] (mac_do_track_drag): New function and declaration. (install_window_handler): Return OSErr value. (install_window_handler) [TARGET_API_MAC_CARBON]: Register handlers for tracking/receiving drag-and-drop items. (do_ae_open_documents): Generate unibyte strings for filenames. [TARGET_API_MAC_CARBON] (mac_do_receive_drag): Likewise. Reject only non-filename items. Set event modifiers. Set return value.
* * dispextern.h: Change HAVE_CARBON to MAC_OS.Steven Tamm2004-12-271-252/+496
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (struct glyph_string): Likewise. * emacs.c (main) [MAC_OS8]: Call mac_term_init instead of mac_initialize. * fileio.c (Fnext_read_file_uses_dialog_p, Fread_file_name): Change TARGET_API_MAC_CARBON to HAVE_CARBON. * fns.c (vector): Change MAC_OSX to MAC_OS. * frame.c (x_set_frame_parameters, x_report_frame_params) (x_set_fullscreen): Remove #ifndef HAVE_CARBON. (x_set_border_width, Vdefault_frame_scroll_bars): Change HAVE_CARBON to MAC_OS. * image.c [MAC_OS]: Include sys/stat.h. [MAC_OS && !MAC_OSX]: Include sys/param.h, ImageCompression.h, and QuickTimeComponents.h. * mac.c [!MAC_OSX] (mac_wait_next_event): Add extern. [!MAC_OSX] (select): Use mac_wait_next_event. [!MAC_OSX] (run_mac_command): Change EXEC_SUFFIXES to Vexec_suffixes. [!MAC_OSX] (select, run_mac_command): Change `#ifdef TARGET_API_MAC_CARBON' to `#if TARGET_API_MAC_CARBON'. (mac_clear_font_name_table): Add extern. (Fmac_clear_font_name_table): New defun. (syms_of_mac): Defsubr it. [MAC_OSX] (SELECT_POLLING_PERIOD_USEC): New define. [MAC_OSX] (select_and_poll_event): New function. [MAC_OSX] (sys_select): Use it. [MAC_OSX && SELECT_USE_CFSOCKET] (socket_callback): New function. [MAC_OSX && SELECT_USE_CFSOCKET] (SELECT_TIMEOUT_THRESHOLD_RUNLOOP, EVENT_CLASS_SOCK): New defines. [MAC_OSX] (sys_select) [SELECT_USE_CFSOCKET]: Use CFSocket and RunLoop for simultaneously monitoring two kinds of inputs, window events and process outputs, without periodically polling. * macfns.c (mac_initialized): Remove extern. (stricmp): Put in #if 0. All callers changed to use xstricmp in xfaces.c. (strnicmp): Decrement `n' at the end of each loop, not the beginning. (check_mac): Use the term "Mac native windows" instead of "Mac OS". (check_x_display_info, x_display_info_for_name): Sync with xfns.c. (mac_get_rdb_resource): New function (from w32reg.c). (x_get_string_resource): Use it. (install_window_handler): Add extern. (mac_window): New function. (Fx_create_frame): Use it instead of make_mac_frame. Set parameter for Qfullscreen. Call x_wm_set_size_hint. (Fx_open_connection, Fx_close_connection): New defuns. (syms_of_macfns): Defsubr them. (x_create_tip_frame) [TARGET_API_MAC_CARBON]: Add kWindowNoUpdatesAttribute to the window attribute. (x_create_tip_frame) [!TARGET_API_MAC_CARBON]: Use NewCWindow. (x_create_tip_frame): Don't call ShowWindow. (Fx_show_tip): Call ShowWindow. (Fx_file_dialog): Change `#ifdef TARGET_API_MAC_CARBON' to `#if TARGET_API_MAC_CARBON'. (mac_frame_parm_handlers): Set handlers for Qfullscreen. (syms_of_macfns) [MAC_OSX]: Initialize mac_in_use to 0. * macgui.h [!MAC_OSX]: Don't include Controls.h. Include Windows.h. (Window): Typedef to WindowPtr and move outside `#if TARGET_API_MAC_CARBON'. (XSizeHints): New struct. * macterm.c (x_update_begin, x_update_end) [TARGET_API_MAC_CARBON]: Disable screen updates during update of a frame. (x_draw_glyph_string_background, x_draw_glyph_string_foreground) [MAC_OS8]: Use XDrawImageString/XDrawImageString16. (construct_mouse_click): Put in #if 0. (x_check_fullscreen, x_check_fullscreen_move): Remove decls. (x_scroll_bar_create, x_scroll_bar_handle_click): Change `#ifdef TARGET_API_MAC_CARBON' to `#if TARGET_API_MAC_CARBON'. (activate_scroll_bars, deactivate_scroll_bars) [!TARGET_API_MAC_CARBON]: Use ActivateControl/DeactivateControl. (x_make_frame_visible) [TARGET_API_MAC_CARBON]: Reposition window if the position is neither user-specified nor program-specified. (x_free_frame_resources): Free size_hints. (x_wm_set_size_hint): Allocate size_hints if needed. Set size_hints. (mac_clear_font_name_table): New function. (mac_do_list_fonts): Initialize font_name_table if needed. (x_list_fonts): Don't initialize font_name_table. Add BLOCK_INPUT around mac_do_list_fonts. (mac_unload_font): New function. (x_load_font): Add BLOCK_INPUT around XLoadQueryFont. (init_mac_drag_n_drop, mac_do_receive_drag): Enclose declarations and definitions with #if TARGET_API_MAC_CARBON. [USE_CARBON_EVENTS] (mac_handle_window_event): Add decl. (install_window_handler): Add decl. (do_window_update): Add BeginUpdate/EndUpdate for the tooltip window. Use UpdateControls. Get the rectangle that should be updated and restrict the target of expose_frame to it. (do_grow_window): Set minimum height/width according to size_hints. (do_grow_window) [TARGET_API_MAC_CARBON]: Use ResizeWindow. (do_zoom_window): Don't use x_set_window_size. [USE_CARBON_EVENTS] (mac_handle_window_event): New function. (install_window_handler): New function. [!USE_CARBON_EVENTS] (mouse_region): New variable. [!USE_CARBON_EVENTS] (mac_wait_next_event): New function. (XTread_socket) [USE_CARBON_EVENTS]: Move call to GetEventDispatcherTarget inside BLOCK_INPUT. (XTread_socket) [!USE_CARBON_EVENTS]: Use mac_wait_next_event. Update mouse_region when mouse is moved. (make_mac_frame): Remove. (make_mac_terminal_frame): Put in #ifdef MAC_OS8. Initialize mouse pointer shapes. Change values of f->left_pos and f->top_pos. Don't use make_mac_frame. Use NewCWindow. Don't call ShowWindow. (mac_initialize_display_info) [MAC_OSX]: Create mac_id_name from Vinvocation_name and Vsystem_name. (mac_make_rdb): New function (from w32term.c). (mac_term_init): Use it. Add BLOCK_INPUT. Error if display has already been opened. Don't pass argument to mac_initialize_display_info. Don't set dpyinfo->height/width. Add entries to x_display_list and x_display_name_list. (x_delete_display): New function. (mac_initialize): Don't call mac_initialize_display_info. (syms_of_macterm) [!MAC_OSX]: Don't call Fprovide. * macterm.h (check_mac): Add extern. (struct mac_output): New member size_hints. (FRAME_SIZE_HINTS): New macro. (mac_unload_font): Add extern. * xdisp.c (expose_window, expose_frame): Remove kludges for Mac. * xfaces.c (clear_font_table) [MAC_OS]: call mac_unload_font.
* (mac_do_list_fonts): Fix memory leakSteven Tamm2004-12-201-2/+2
|
* * term/mac-win.el (encoding-vector, mac-font-encoder-list)Steven Tamm2004-12-181-23/+81
| | | | | | | | | (ccl-encode-mac-centraleurroman-font): Use centraleurroman instead of centraleuropean as the name * macterm.c (endif, x_font_name_to_mac_font_name): Use maccentraleurroman instead of maccentraleuropean (mac_c_string_match, mac_do_list_fonts): Speed up font search by quickly finding a specific font without needing regexps.
* * keyboard.c: Don't undef SIGIOSteven Tamm2004-11-301-93/+125
| | | | | | | | | | | | | | | | | | | | | | | | | * s/darwin.h (NO_SOCK_SIGIO): Define NO_SOCK_SIGIO on carbon * Makefile.in (mac.o): Depend on blockinput.h and atimer.h. (macfns.o): Don't depend on ccl.h. * macfns.c (mac_frame_parm_handlers): Set handlers for Qleft_fringe and Qright_fringe. * macterm.c (mac_fill_rectangle_to_pixmap) (mac_draw_rectangle_to_pixmap, mac_copy_area_to_pixmap) (mac_copy_area_with_mask_to_pixmap, x_draw_image_foreground_1): Put in #if 0. (mac_scroll_area) [TARGET_API_MAC_CARBON]: Use ScrollWindowRect. (x_flush) [TARGET_API_MAC_CARBON]: Don't traverse frames. (XFlush) [TARGET_API_MAC_CARBON]: Define to an empty replacement. (x_draw_glyph_string_background, x_draw_glyph_string_foreground) [!MAC_OS8]: Added ifdef'd out code for os8. Don't use XDrawImageString. Always draw background and foreground separately. (x_draw_image_foreground): Use clipping instead of computing the intersection rectangle. (x_draw_image_glyph_string): Don't draw an image with mask to a pixmap. (x_redisplay_interface): Set flush_display_optional member to 0. (XTread_socket): Correctly reset the TEConverter object.
* (x_clip_to_row): Add area arg. Callers changed.Kim F. Storm2004-11-211-9/+10
| | | | (x_draw_hollow_cursor, x_draw_bar_cursor): Clip to TEXT_AREA.
* 2004-10-28 Will <[email protected]>John Wiegley2004-10-291-1/+39
| | | | | * macterm.c: allow user to assign key modifiers to the Mac Option key via a 'mac-option-modifier' variable.
* macterm.c (x_raise_frame): Add BLOCK_INPUT around SelectWindowSteven Tamm2004-10-101-4/+14
| | | | | | | | | | | | | | (x_lower_frame): Add BLOCK_INPUT around SendBehind (make_mac_frame): Add BLOCK_INPUT around the making of a terminal frame (mac_initialize): Add BLOCK_INPUT around carbon initialization macgui.h (mktime): Use emacs_mktime macfns.c (Fx_file_dialog): Add BLOCK_INPUT around more code. Make a cancel file-open dialog be like C-g. mac.c (mktime): Use emacs_mktime (Fdo_applescript): Add BLOCK_INPUT around do_applescript (Fmac_paste_function): Add better error handling for carbon cut/paste
* (x_update_window_end): Fix flicker on vertical line betweenKim F. Storm2004-10-071-7/+6
| | | | | windows. Update vertical line after drawing window fringes, but only if actually drawing any bitmaps--or there is no fringe.
* macfns.c (mac_get_window_bounds): Add extern.Steven Tamm2004-10-061-134/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | (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.
* (x_update_end): Move SetPortWindowPort to insideSteven Tamm2004-09-021-5/+5
| | | | | BLOCK_INPUT. (x_set_offset): Use FRAME_MAC_WINDOW.
* Fixes for Ctrl-G support on carbon, replacing old timeout based pollingSteven Tamm2004-07-191-4/+0
| | | | | | | | | | | | | | with alarm based polling. mac.c (sys_select): Redo sys_select to use alarm-based polling instead of 1 sec timeouts (like solaris). macterm.c (x_make_frame_visible): Comment in polling on frame creation. keyboard.c: Undef SIGIO on Carbon atimer.c (alarm_signal_handler): Call alarm handlers after scheduling. eval.c (Feval): Remove quit_char test process.c (wait_reading_process_input): Remove clearing stdin for select call on process input