(glyph_rect, remember_mouse_glyph): Remove mac specific versions.
(XTmouse_position): Adapt to use generic remember_mouse_glyph
instead of pixel_to_glyph_coords.
(init_jpeg_functions): Don't initialize `fn_jpeg_stdio_src'.
(our_common_init_source): Rename from `our_init_source'.
(our_common_term_source): Rename from `our_term_source'.
(our_memory_fill_input_buffer): Rename from `our_fill_input_buffer'.
(our_memory_skip_input_data): Rename from `our_skip_input_data'.
(jpeg_memory_src): Use the new names.
(struct jpeg_stdio_mgr): New struct.
(JPEG_STDIO_BUFFER_SIZE): New constant.
(our_stdio_fill_input_buffer, our_stdio_skip_input_data, jpeg_file_src): New
functions.
(jpeg_load): Use `jpeg_file_src' instead of `fn_jpeg_stdio_src'.
(fm_font_family_alist): New variable.
(syms_of_macterm): Initialize and staticpro it.
(decode_mac_font_name): Replace '-' in family name with '_' if it
occurs just once. Lower family name.
(parse_x_font_name): Rename from x_font_name_to_mac_font_name.
All uses changed. Remove argument MF and code conversion for it.
Add argument SIZE. Rename argument MF_DECODED to FAMILY, and CS
to CHARSET. Parse font size. Lower family name. Return integer
value for status of parsing.
(init_font_name_table) [USE_ATSUI]: Use decode_mac_font_name.
Don't use Fdowncase because family name is already lowered by
decode_mac_font_name.
(init_font_name_table): Always call decode_mac_font_name. Add
pair of family name and its reference to fm_font_family_alist.
(mac_clear_font_name_table): Clear fm_font_family_alist.
(XLoadQueryFont): Move font size parsing part to parse_x_font_name.
Lookup fm_font_family_alist to get font family reference.
(XLoadQueryFont) [USE_ATSUI]: Don't use Fdowncase because family
name is already lowered by parse_x_font_name.
(note_mouse_movement): Use it to remember the current glyph if
changed.
(XTmouse_position): Fix calculation of fake glyph under mouse.
Move code to calculate glyph under mouse into
remember_mouse_glyph.
(struct mac_output): Remove members mWP and pending_menu_activation.
Put members scroll_bar_foreground_pixel and
scroll_bar_background_pixel in #if 0.
(FRAME_MAC_WINDOW, FRAME_X_WINDOW): Use window_desc.
for_overlaps.
(get_glyph_string_clip_rects): New function created from
get_glyph_string_clip_rect. Set clipping rectangles according to
the value of for_overlaps. Enable to store multiple clipping
rectangles.
(get_glyph_string_clip_rect): Use get_glyph_string_clip_rects.
(fill_composite_glyph_string, fill_glyph_string, draw_glyphs):
Rename argument OVERLAPS_P to OVERLAPS. All uses in macros changed.
(x_fix_overlapping_area): Add OVERLAPS arg. Pass it to draw_glyphs.
(draw_phys_cursor_glyph): Set width of erased cursor to use it for
calculating clipping rectangles later. Call
x_fix_overlapping_area with new OVERLAPS arg to draw only erased
cursor area.
(expose_overlaps): Call x_fix_overlapping_area with new
OVERLAPS arg to draw overlaps in both preceding and succeeding rows.
to for_overlaps. Now occupy 3 bits.
(OVERLAPS_PRED, OVERLAPS_SUCC, OVERLAPS_BOTH)
(OVERLAPS_ERASED_CURSOR): New defines.
(struct redisplay_interface): Add new OVERLAPS arg to member
fix_overlapping_area.
(x_fix_overlapping_area): Add new OVERLAPS arg.
(get_glyph_string_clip_rects): Add extern.