to font->mac_fontnum.
[USE_MAC_FONT_PANEL] (mac_set_font_info_for_selection): New function.
(x_new_focus_frame) [USE_MAC_FONT_PANEL]: Use it.
(QCfamily, QCweight, QCslant, Qnormal, Qbold, Qitalic): Add extern.
(QWindow) [MAC_OSX]: Likewise.
(Qfont) [USE_MAC_FONT_PANEL]: Likewise.
(Vmac_atsu_font_table) [USE_ATSUI]: New variable.
(syms_of_macterm) [USE_ATSUI]: Defvar it.
(Qtoolbar_switch_mode) [MAC_OSX]: New variable.
(Qpanel_closed, Qselection) [USE_MAC_FONT_PANEL]: Likewise.
(syms_of_macterm): Intern and staticpro them.
(init_font_name_table) [USE_ATSUI]: Set data to Vmac_atsu_font_table.
[TARGET_API_MAC_CARBON] (mac_store_event_ref_as_apple_event): New
function.
[USE_CARBON_EVENTS] (mac_handle_command_event): Use it.
[MAC_OSX] (mac_store_services_event): Likewise.
[USE_CARBON_EVENTS] (mac_handle_window_event) [MAC_OSX]: Handle
kEventWindowToolbarSwitchMode event.
(install_window_handler) [USE_CARBON_EVENTS && MAC_OSX]: Register it.
[MAC_OSX] (mac_store_services_event): Change return type to OSStatus.
[USE_MAC_FONT_PANEL] (mac_handle_font_event): New function.
(install_window_handler) [USE_MAC_FONT_PANEL]: Install it.
(XTread_socket): Select window on mouse click if x_focus_frame is NULL.
(mac_frame_parm_handlers, syms_of_macfns): Replace x_set_font with it.
(mac_window) [TARGET_API_MAC_CARBON && MAC_OSX]: Specify
kWindowToolbarButtonAttribute when creating window.
(Fmac_clear_font_name_table): Move from macfns.c.
(syms_of_macfns): Likewise for defsubr.
[USE_MAC_FONT_PANEL] (Fmac_set_font_panel_visibility): New defun.
(syms_of_macfns) [USE_MAC_FONT_PANEL]: Defsubr it.
(syms_of_image) [MAC_OS]: Intern and staticpro it.
[MAC_OS] (gif_load): Save image extension data in img->data.lisp_val.
[MAC_OSX] (image_load_quartz2d): Use cfstring_create_with_utf8_cstring
instead of cfstring_create_with_string.
path select also for proxy icon click.
[TARGET_API_MAC_CARBON] (mac_post_mouse_moved_event): New function.
[USE_TOOLKIT_SCROLL_BARS] (scroll_bar_timer_callback): Use it.
(xlfdpat_create): Remove unused label `error' and trailing sentences.
(mac_do_track_drag, mac_do_receive_drag): Move functions to macselect.c.
(mac_do_track_dragUPP, mac_do_receive_dragUPP): Move variables to
macselect.c.
(install_drag_handler, remove_drag_handler): Add extern.
(mac_store_apple_event): Change return type to void. All uses changed.
Create Lisp object from Apple event and store it into input event.
(mac_make_lispy_event_code): Remove function.
[TARGET_API_MAC_CARBON] (mac_store_drag_event): New function.
(install_window_handler): Call install_drag_handler.
(remove_window_handler): Call remove_drag_handler.
(mac_store_apple_event): Change return type to void in extern.
(mac_handle_apple_event): Don't get return value from
mac_store_apple_event.
[TARGET_API_MAC_CARBON] (Vmac_dnd_known_types): New variable.
(syms_of_macselect) [TARGET_API_MAC_CARBON]: Defvar it.
[TARGET_API_MAC_CARBON] (mac_do_track_drag): Move function from
macterm.c. Use Vmac_dnd_known_types as acceptable flavors.
[TARGET_API_MAC_CARBON] (mac_do_receive_drag): Likewise. New
implementation using create_apple_event_from_drag_ref.
[TARGET_API_MAC_CARBON] (mac_do_track_dragUPP)
(mac_do_receive_dragUPP): Move variables from macterm.c.
(install_drag_handler, remove_drag_handler): New functions.
`const AEDesc *'.
[TARGET_API_MAC_CARBON] (create_apple_event): New function.
[TARGET_API_MAC_CARBON] (create_apple_event_from_event_ref): Use it.
Use xrealloc instead of repeated xmalloc/xfree.
[TARGET_API_MAC_CARBON] (create_apple_event_from_drag_ref): New
function.
endpoints of strictly horizontal/vertical lines.
(mac_set_clip_rectangles) [USE_CG_DRAWING]: Set clip_rects.
(pcm_init, pcm_get_status): New functions.
(x_per_char_metric, XLoadQueryFont): Use them instead of
XCharStructRow and related macros.
(x_draw_relief_rect): Don't adjust arguments of mac_draw_line.
(x_free_frame_resources) [TARGET_API_MAC_CARBON]: Free FRAME_FILE_NAME.
(XTread_socket) [TARGET_API_MAC_CARBON]: Handle proxy icon drag
and window path pop-up menu on title bar.
(mac_use_core_graphics) [USE_CG_DRAWING]: Set default to 1.
(USE_CG_DRAWING): Don't define if compiled on Mac OS X 10.1.
(enum pcm_status): New enum.
(XCHARSTRUCTROW_CHAR_VALID_P, XCHARSTRUCTROW_SET_CHAR_VALID)
(XCharStructRow): Remove. Now validity is represented by
non-negativeness of sum of ascent and descent.
(struct MacFontStruct): Change type of member `rows'.
(struct _XGC) [USE_CG_DRAWING]: Add member `clip_rects'.