1. 15 Jan, 2020 1 commit
    • Stefan Kangas's avatar
      Remove unused ftx font backend driver · 576dfc8a
      Stefan Kangas authored
      * src/ftxfont.c: Remove file.
      * admin/notes/font-backend:
      * configure.ac:
      * src/Makefile.in:
      * src/deps.mk (ftxfont.o):
      * src/font.c (syms_of_font):
      * src/font.h (top-level, font_property_index):
      * src/xfns.c (Fx_create_frame, x_create_tip_frame): Remove unused ftx
      font backend driver.  Thanks to Glenn Morris for pointing out that it
      can be removed.  (Bug#34663)
      576dfc8a
  2. 07 Jan, 2020 1 commit
  3. 01 Jan, 2020 4 commits
  4. 25 Dec, 2019 1 commit
  5. 03 Dec, 2019 1 commit
  6. 04 Nov, 2019 1 commit
  7. 01 Oct, 2019 1 commit
  8. 31 Aug, 2019 1 commit
    • Juri Linkov's avatar
      Frame-local tab-bar and window-local tab-line. · 3e0ad29a
      Juri Linkov authored
      * etc/NEWS: Add 'tab-bar-mode' and 'global-tab-line-mode'.
      
      * etc/TODO: Remove tab-related items.
      
      * lisp/cus-start.el: Add tab-bar-mode, tab-bar-max-label-size.
      
      * lisp/frame.el (frame-notice-user-settings): handle tab-bar-lines.
      
      * lisp/loadup.el: Load "tab-bar".
      
      * lisp/menu-bar.el (menu-bar-options-save): Add tab-bar-mode.
      (menu-bar-showhide-menu): Define showhide-tab-bar.
      
      * lisp/startup.el (tab-bar-images-pixel-height): New defconst.
      (command-line): Reset tab-bar-mode.
      (x-apply-session-resources): Add "tabBar", "TabBar".
      
      * lisp/subr.el (read-key): Add tab-bar.
      
      * lisp/tab-bar.el: New file.
      * lisp/tab-line.el: New file.
      
      * lisp/window.el (window--dump-frame): Add tab-bar-height.
      
      * src/dispextern.h (enum window_part): Add ON_TAB_LINE.
      (struct glyph_matrix): Add tab_line_p.
      (struct glyph_row): Add tab_line_p.
      (MATRIX_TAB_LINE_ROW): New macro.
      (MATRIX_FIRST_TEXT_ROW): Handle more mode lines.
      (MR_PARTIALLY_VISIBLE_AT_TOP): Add WINDOW_TAB_LINE_HEIGHT.
      (MATRIX_TAB_LINE_HEIGHT, CURRENT_TAB_LINE_HEIGHT)
      (DESIRED_TAB_LINE_HEIGHT): New macros.
      (enum face_id): Add TAB_BAR_FACE_ID and TAB_LINE_FACE_ID.
      (struct it): Add tab_line_p.
      (tab_bar_item_idx, tab_bar_item_image): New enums.
      (DEFAULT_TAB_BAR_LABEL_SIZE, DEFAULT_TAB_BAR_BUTTON_MARGIN)
      (DEFAULT_TAB_BAR_BUTTON_RELIEF, DEFAULT_TAB_BAR_IMAGE_HEIGHT):
      New constants.
      
      * src/dispnew.c (adjust_glyph_matrix): Use window_wants_tab_line.
      (shift_glyph_matrix): Add WINDOW_TAB_LINE_HEIGHT.
      (clear_current_matrices, clear_desired_matrices):
      Call clear_glyph_matrix on tab_bar_window.
      (blank_row): Add WINDOW_TAB_LINE_HEIGHT.
      (required_matrix_height): Change 2 to 3.
      (fake_current_matrices): Reset tab_line_p.
      (adjust_frame_glyphs_for_window_redisplay): Handle tab_bar_window.
      Add FRAME_TAB_BAR_HEIGHT and FRAME_TAB_BAR_LINES.
      (free_glyphs): Handle tab_bar_window.
      (update_frame): Handle tab_bar_window.
      (update_window): Handle row->tab_line_p.
      (scrolling_window): Change arg type from bool to int.
      Change header_line_p to tab_line_p.
      (buffer_posn_from_coords): Add window_wants_tab_line.
      (mode_line_string): Use MATRIX_TAB_LINE_ROW for part ON_TAB_LINE.
      
      * src/frame.c (frame_default_tab_bar_height): New internal variable.
      (adjust_frame_size): Handle tab_bar_window.
      (make_frame): Reset tab_bar_redisplayed, tab_bar_resized and
      last_tab_bar_item.
      (Ftab_bar_pixel_width): New function.
      (frame_parms): Add tab-bar-lines.
      (gui_figure_window_size): Add new arg tabbar_p.
      (syms_of_frame): Add Qtab_bar_size, Qupdate_frame_tab_bar,
      Qfree_frame_tab_bar, Qtab_bar_lines, Stab_bar_pixel_width.
      Add Qtab_bar_lines to frame_inhibit_implied_resize.
      (tab-bar-mode): New variable.
      
      * src/frame.h (GCALIGNED_STRUCT): Add tab_bar_window,
      desired_tab_bar_string, current_tab_bar_string.
      (GCALIGNED_STRUCT): Add tab_bar_items, last_tab_bar_item,
      minimize_tab_bar_window_p, tab_bar_redisplayed, tab_bar_resized,
      tab_bar_lines, tab_bar_height, n_tab_bar_rows, n_tab_bar_items.
      (fset_tab_bar_items, fset_tab_bar_window)
      (fset_current_tab_bar_string, fset_desired_tab_bar_string):
      New inlines.
      (FRAME_TAB_BAR_LINES, FRAME_TAB_BAR_HEIGHT): New macros.
      (FRAME_TOP_MARGIN, FRAME_TOP_MARGIN_HEIGHT):
      Use FRAME_TAB_BAR_LINES.
      
      * src/fringe.c (draw_fringe_bitmap_1, update_window_fringes):
      Add WINDOW_TAB_LINE_HEIGHT.
      
      * src/gtkutil.c (xg_frame_set_char_size): Add FRAME_TABBAR_WIDTH.
      (x_wm_set_size_hint): Add FRAME_TABBAR_WIDTH.
      
      * src/keyboard.c (read_char): Handle Qtab_bar.
      (kbd_buffer_get_event): Handle TAB_BAR_EVENT.
      (make_lispy_position): Add WINDOW_TAB_LINE_HEIGHT.
      Handle TAB_BAR_EVENT.
      (tab_bar_items_vector, tab_bar_item_properties, ntab_bar_items):
      New internal variables.
      (tab_bar_items, process_tab_bar_item, set_prop_tab_bar)
      (parse_tab_bar_item, init_tab_bar_items, append_tab_bar_item):
      New functions.
      (read_char_x_menu_prompt, read_key_sequence): Handle Qtab_bar.
      (tab-bar-separator-image-expression): New variable.
      
      * src/keymap.c (syms_of_keymap): Add Qtab_bar and Qtab_line.
      
      * src/menu.c (x_popup_menu_1, Fx_popup_dialog): Handle Qtab_bar.
      
      * src/termhooks.h (enum event_kind): Add TAB_BAR_EVENT.
      (GCALIGNED_STRUCT): Add change_tab_bar_height_hook.
      
      * src/w32fns.c (w32_frame_parm_handlers): Add w32_set_tab_bar_lines.
      
      * src/w32term.c (w32_draw_window_cursor): Add WINDOW_TAB_LINE_HEIGHT.
      
      * src/window.c (window_body_height): Add WINDOW_TAB_LINE_HEIGHT.
      (Fwindow_tab_line_height): New function.
      (coordinates_in_window): Use window_wants_tab_line with
      CURRENT_TAB_LINE_HEIGHT.
      (window_relative_x_coord): Add ON_TAB_LINE.
      (Fcoordinates_in_window_p): Add ON_TAB_LINE.
      (window_from_coordinates): Add new arg tab_bar_p.
      (Fwindow_line_height): Use window_wants_tab_line with
      WINDOW_TAB_LINE_HEIGHT.
      (Fwindow_lines_pixel_dimensions): Add WINDOW_TAB_LINE_HEIGHT.
      (make_window): Set tab_line_height to -1.
      (window_wants_tab_line): New function.
      (window_internal_height): Use window_wants_tab_line.
      (window_scroll_pixel_based): Add WINDOW_TAB_LINE_HEIGHT.
      (Frecenter): Set minimize_tab_bar_window_p to 1.
      (GCALIGNED_STRUCT): Add frame_tab_bar_lines and frame_tab_bar_height.
      (Fcurrent_window_configuration): Set frame_tab_bar_lines and
      frame_tab_bar_height.
      (set_window_scroll_bars): Add WINDOW_TAB_LINE_HEIGHT.
      (syms_of_window): Add Qtab_line_format and Swindow_tab_line_height.
      
      * src/window.h (GCALIGNED_STRUCT): Add tab_line_height.
      (WINDOW_TAB_BAR_P, WINDOW_TAB_LINE_HEIGHT, WINDOW_TAB_LINE_LINES):
      New macros.
      (WINDOW_TOP_EDGE_Y, WINDOW_BOTTOM_EDGE_Y, WINDOW_TAB_LINE_HEIGHT):
      Add WINDOW_TAB_BAR_P.
      
      * src/xdisp.c (window_box_height): Add window_wants_tab_line with
      MATRIX_TAB_LINE_ROW and CURRENT_TAB_LINE_HEIGHT.
      (pos_visible_p): Use window_wants_tab_line.
      Add WINDOW_TAB_LINE_HEIGHT.
      (get_glyph_string_clip_rects): Add WINDOW_TAB_LINE_HEIGHT.
      (get_phys_cursor_geometry): Add WINDOW_TAB_LINE_HEIGHT.
      (remember_mouse_glyph): Use MATRIX_TAB_LINE_ROW for part
      ON_TAB_LINE.
      (init_iterator): Use MATRIX_TAB_LINE_ROW for TAB_LINE_FACE_ID.
      Add WINDOW_TAB_LINE_HEIGHT.  Add window_wants_tab_line.
      (Fwindow_text_pixel_size): Add WINDOW_TAB_LINE_HEIGHT.
      (prepare_menu_bars): Call update_tab_bar.
      (update_tab_bar, build_desired_tab_bar_string)
      (display_tab_bar_line, tab_bar_height, Ftab_bar_height)
      (redisplay_tab_bar, tab_bar_item_info, get_tab_bar_item)
      (handle_tab_bar_click, note_tab_bar_highlight): New functions.
      (compute_window_start_on_continuation_line): Use window_wants_tab_line.
      (try_cursor_movement): Use window_wants_tab_line with
      CURRENT_TAB_LINE_HEIGHT.
      (redisplay_window): Use window_wants_tab_line with
      CURRENT_TAB_LINE_HEIGHT.
      (try_window_reusing_current_matrix): Use window_wants_tab_line
      with WINDOW_TAB_LINE_HEIGHT.
      (Fdump_tab_bar_row): New function.
      (compute_line_metrics): Add WINDOW_TAB_LINE_HEIGHT.
      (display_line): Use window_wants_tab_line.
      (display_mode_line): Set tab_line_p to true if face_id is
      TAB_LINE_FACE_ID.
      (Fformat_mode_line): Handle Qtab_line and Qtab_bar.
      (gui_clear_end_of_line): Add WINDOW_TAB_LINE_HEIGHT.
      (erase_phys_cursor): Use WINDOW_TAB_LINE_HEIGHT.
      (show_mouse_face): Use tab_bar_window.
      (note_mode_line_or_margin_highlight): Use MATRIX_TAB_LINE_ROW for
      area ON_TAB_LINE.
      (note_mouse_highlight): Call note_tab_bar_highlight,
      (expose_frame): Handle tab_bar_window.
      (syms_of_xdisp): Add Sdump_tab_bar_row and Stab_bar_height.
      (auto-resize-tab-bars, auto-raise-tab-bar-buttons)
      (tab-bar-border, tab-bar-button-margin, tab-bar-button-relief)
      (tab-bar-max-label-size): New variables.
      
      * src/xfaces.c (lookup_basic_face): Add TAB_LINE_FACE_ID and
      TAB_BAR_FACE_ID.
      (syms_of_xfaces): Define Qtab_bar and Qtab_line.
      
      * src/xfns.c (x_set_tab_bar_lines, x_change_tab_bar_height):
      New functions.
      (xic_set_statusarea): Add FRAME_TABBAR_TOP_HEIGHT.
      (frame_geometry): Add FRAME_TAB_BAR_HEIGHT and Qtab_bar_size.
      
      * src/xterm.c (x_draw_image_relief): Use tab_bar_button_relief.
      (x_draw_image_relief): Use TAB_BAR_FACE_ID.
      (handle_one_xevent): Handle tab_bar_window.
      (x_set_window_size_1): Add FRAME_TABBAR_WIDTH.
      (x_create_terminal): Set change_tab_bar_height_hook.
      
      * src/xterm.h (struct x_output): Add tabbar_top_height,
      tabbar_bottom_height, tabbar_left_width, tabbar_right_width
      tabbar_widget, tabbar_in_hbox, tabbar_is_packed.
      (FRAME_TABBAR_TOP_HEIGHT): Add FRAME_TABBAR_TOP_HEIGHT,
      FRAME_TABBAR_BOTTOM_HEIGHT, FRAME_TABBAR_HEIGHT,
      FRAME_TABBAR_LEFT_WIDTH, FRAME_TABBAR_RIGHT_WIDTH,
      FRAME_TABBAR_WIDTH.
      3e0ad29a
  9. 09 Aug, 2019 4 commits
  10. 30 Jun, 2019 2 commits
  11. 21 Jun, 2019 1 commit
    • YAMAMOTO Mitsuharu's avatar
      Fix blank tooltips on cairo (Bug#36298) · 2a229f49
      YAMAMOTO Mitsuharu authored
      * src/xterm.h (x_cr_update_surface_desired_size) [USE_CAIRO]: Add extern.
      * src/xterm.c (x_cr_update_surface_desired_size) [USE_CAIRO]: Make non-static.
      * src/xfns.c (Fx_show_tip) [USE_CAIRO]: Call x_cr_update_surface_desired_size.
      2a229f49
  12. 19 Jun, 2019 1 commit
  13. 10 Jun, 2019 1 commit
  14. 08 Jun, 2019 1 commit
    • YAMAMOTO Mitsuharu's avatar
      Support X core font driver on cairo (Bug#28236) · faf10bd8
      YAMAMOTO Mitsuharu authored
      * configure.ac (HAVE_X_WINDOWS): Add xfont.o to FONT_OBJ if HAVE_CAIRO.
      
      * doc/lispref/frames.texi (Font and Color Parameters): Mention X core font
      driver with Cairo drawing.
      
      * src/font.c (syms_of_font) [HAVE_X_WINDOWS && USE_CAIRO]: Call syms_of_xfont.
      
      * src/xfns.c (x_create_tip_frame) [USE_CAIRO]: Register xfont_driver.
      
      * src/xterm.c (x_cr_gc_clip) [USE_CAIRO]: New function extracted from
      x_begin_cr_clip.
      (x_begin_cr_clip) [USE_CAIRO]: Use it.
      (xlib_surface_key, saved_drawable_key) [USE_CAIRO]: New variables.
      (x_cr_destroy_xlib_surface, x_try_cr_xlib_drawable)
      (x_end_cr_xlib_drawable) [USE_CAIRO]: New functions.
      (x_draw_composite_glyph_string_foreground)
      (x_draw_glyph_string_foreground) [USE_CAIRO]: Get Xlib surface when drawing
      text with X core fonts into bitmap surfaces.  Add fallback code for drawing
      into outline surfaces.
      faf10bd8
  15. 20 May, 2019 1 commit
    • Alexander Gramiak's avatar
      Introduce Emacs_Color struct and typedef · c0e146e4
      Alexander Gramiak authored
      This avoids clashing with the XColor struct from X.
      
      * src/dispextern [HAVE_X_WINDOWS]: Define Emacs_Color alias.
      [!HAVE_X_WINDOWS]: Rename XColor compatibility struct to
      Emacs_Color. Remove unused fields.
      
      * src/gtkutil.c:
      * src/gtkutil.h:
      * src/image.c:
      * src/nsterm.h:
      * src/nsterm.m:
      * src/termhooks.h:
      * src/w32fns.c:
      * src/w32term.c:
      * src/w32term.h:
      * src/xfaces.c:
      * src/xfns.c:
      * src/xterm.h: Use Emacs_Color over XColor outside of X-specific
      sections.
      c0e146e4
  16. 18 May, 2019 1 commit
    • YAMAMOTO Mitsuharu's avatar
      Avoid triple buffering with Xdbe in cairo · b87e5eea
      YAMAMOTO Mitsuharu authored
      * src/xterm.h (struct x_output): Remove member cr_surface.
      Add members cr_surface_desired_width and cr_surface_desired_height.
      (x_cr_destroy_frame_context) [USE_CAIRO]: Add extern.
      
      * src/xterm.c (x_free_cr_resources): Remove function.
      (FRAME_CR_SURFACE) [USE_CAIRO]: Remove macro.
      (FRAME_CR_SURFACE_DESIRED_WIDTH, FRAME_CR_SURFACE_DESIRED_HEIGHT) [USE_CAIRO]:
      New macros.
      (x_cr_destroy_frame_context) [USE_CAIRO]: Rename from x_cr_destroy_surface.
      All Uses changed.  Don't use FRAME_CR_SURFACE.  Make non-static.
      (x_cr_update_surface_desired_size) [USE_CAIRO]: New function.
      (x_begin_cr_clip) [USE_CAIRO]: Create Xlib surface if Xdbe is in use.
      Use FRAME_CR_SURFACE_DESIRED_WIDTH and FRAME_CR_SURFACE_DESIRED_HEIGHT.
      (x_end_cr_clip) [USE_CAIRO]: Call x_mark_frame_dirty if Xdbe is in use.
      (x_cr_draw_frame, x_cr_export_frames) [USE_CAIRO]: Save and restore cairo
      context instead of freeing and clearing it.
      (x_update_begin) [USE_CAIRO]: Don't create cairo surface here.
      (show_back_buffer) [USE_CAIRO]: Call cairo_surface_flush before swapping.
      (x_update_end) [USE_CAIRO]: Don't copy image surface if Xdbe is in use.
      Get image surface by cairo_get_target instead of FRAME_CR_SURFACE.
      (x_scroll_run) [USE_CAIRO]: Use XCopyArea if Xdbe is in use.
      (handle_one_xevent) [USE_CAIRO] <ConfigureNotify>: Call
      x_cr_update_surface_desired_size instead of x_cr_destroy_surface.
      (x_free_frame_resources) [USE_CAIRO]: Call x_cr_destroy_frame_context instead
      of x_free_cr_resources.
      
      * src/xfns.c (set_up_x_back_buffer, tear_down_x_back_buffer) [USE_CAIRO]:
      Call x_cr_destroy_frame_context.
      b87e5eea
  17. 11 May, 2019 1 commit
  18. 04 May, 2019 1 commit
    • YAMAMOTO Mitsuharu's avatar
      Add new font backend drivers for text shaping by HarfBuzz · f208d5ae
      YAMAMOTO Mitsuharu authored
      * etc/NEWS: Mention new font backend drivers xfthb and ftcrhb.
      
      * src/font.h [HAVE_HARFBUZZ]: Include hb.h.
      (struct font_driver) [HAVE_HARFBUZZ]: New members begin_hb_font and
      end_hb_font.
      (ftfont_match, ftfont_list): Remove externs.
      (ftfont_match2, ftfont_list2):
      (fthbfont_combining_capability, fthbfont_begin_hb_font)
      (fthbfont_shape) [HAVE_HARFBUZZ]:
      (xfthbfont_driver) [HAVE_XFT && HAVE_HARFBUZZ]:
      (ftcrhbfont_driver) [USE_CAIRO && HAVE_HARFBUZZ]: Add externs.
      
      * src/ftcrfont.c (ftcrfont_list): Use ftfont_list2.
      (ftcrfont_match): Use ftfont_match2.
      (ftcrfont_open): Get font type from entity.
      (ftcrfont_open) [HAVE_HARFBUZZ]: Use HarfBuzz version of driver if specified.
      (ftcrfont_shape) [HAVE_HARFBUZZ]: Make shaping fail.
      (ftcrhbfont_list, ftcrhbfont_match)
      (ftcrhbfont_begin_hb_font) [HAVE_HARFBUZZ]: New functions.
      (ftcrhbfont_driver) [HAVE_HARFBUZZ]: New variable.
      (syms_of_ftcrfont_for_pdumper) [HAVE_HARFBUZZ]: Initialize and register it.
      (syms_of_ftcrfont) [HAVE_HARFBUZZ]: New symbol Qftcrhb.
      
      * src/ftfont.c: Include math.h for lround.
      (fthbfont_driver) [HAVE_HARFBUZZ]: New variable.
      (ftfont_get_hb_font) [HAVE_HARFBUZZ]: Remove function.
      (ftfont_list, ftfont_match): Make static.
      (ftfont_list2, ftfont_match2): New functions.
      (ftfont_open2) [HAVE_HARFBUZZ]: Use HarfBuzz version of driver if specified.
      (ftfont_open): Get font type from entity.
      (ftfont_shape, ftfont_combining_capability, ftfont_driver) [HAVE_HARFBUZZ]:
      Move HarfBuzz specific part from here ...
      (fthbfont_shape, fthbfont_combining_capability)
      (fthbfont_driver) [HAVE_HARFBUZZ]: ... to here.   New functions and variable.
      (fthbfont_begin_hb_font) [HAVE_HARFBUZZ]: New function.
      (fthbfont_shape_by_hb) [HAVE_HARFBUZZ]: Rename from ftfont_shape_by_hb.
      Don't take FreeType specific arguments ft_face and matrix.  Use begin_hb_font
      and end_hb_font font driver functions.  Use text_extents font driver functions
      instead of ftfont_glyph_metrics.
      (syms_of_ftfont) [HAVE_HARFBUZZ]: New symbol Qfreetypehb.
      (syms_of_ftfont_for_pdumper) [HAVE_HARFBUZZ]: Initialize and register
      fthbfont_drivert.
      
      * src/ftxfont.c (ftxfont_list): Use ftfont_list2.
      (ftxfont_match): Use ftfont_match2.
      (ftxfont_driver) [HAVE_HARFBUZZ]: Don't initialize shape member explicitly.
      
      * src/xfns.c (Fx_create_frame) [USE_CAIRO && HAVE_HARFBUZZ]:
      (Fx_create_frame) [HAVE_XFT && HAVE_HARFBUZZ]: Register HarfBuzz versions of
      font drivers.
      
      * src/xftfont.c (xftfont_list): Use ftfont_list2.
      (xftfont_match): Use ftfont_match2.
      (xftfont_open): Get font type from entity.
      (xftfont_open) [HAVE_HARFBUZZ]: Use HarfBuzz version of driver if specified.
      (xftfont_shape) [HAVE_HARFBUZZ]: Make shaping fail.
      (xfthbfont_list, xfthbfont_match, xfthbfont_begin_hb_font)
      (xfthbfont_end_hb_font) [HAVE_HARFBUZZ]: New functions.
      (xftfont_driver) [HAVE_HARFBUZZ]: Don't initialize shape member explicitly.
      (xfthbfont_driver) [HAVE_HARFBUZZ]: New variable.
      (syms_of_xftfont_for_pdumper) [HAVE_HARFBUZZ]: Initialize and register it.
      (syms_of_xftfont) [HAVE_HARFBUZZ]: New symbol Qxfthb.
      f208d5ae
  19. 26 Apr, 2019 3 commits
    • Alexander Gramiak's avatar
      Add terminal hook defined_color_hook · 41e20ee4
      Alexander Gramiak authored
      * src/termhooks.h (defined_color_hook): New terminal hook.
      
      * src/xterm.c:
      * src/nsterm.m:
      * src/term.c:
      * src/w32term.c: Set defined_color_hook.
      
      * src/xfaces.c: Use defined_color_hook.
      (defined_color): Remove.
      
      * src/image.c: Remove redefinitions of x_defined_color, and use
      defined_color_hook.
      41e20ee4
    • Alexander Gramiak's avatar
      Rename generic x_* identifiers · a411517f
      Alexander Gramiak authored
      * src/image.c: Rename x_* procedures to image_*.
      
      * src/frame.c: Rename x_* procedures to gui_*. Rename
      xrdb_get_resource to gui_display_get_resource. Rename x_get_arg to
      gui_display_get arg.
      
      * src/frame.h: Rename can_x_set_window_size to can_set_window_size.
      
      * src/xfaces.c: Rename realize_x_face to realize_gui_face. Rename
      x_supports_face_attributes_p to gui_supports_face_attributes_p.
      
      * src/keyboard.c:
      * src/lisp.h:
      * src/nsterm.m:
      * src/w32term.c:
      * src/xterm.c: Rename x_get_keysym_name to get_keysym_name.
      
      * src/nsfns.c:
      * src/nsterm.m: Rename x_* procedures to ns_*.
      
      * src/w32fns.c:
      * src/w32term.c: Rename x_* procedures to w32_*.
      
      * src/termhooks.h (query_colors, get_focus_frame, focus_frame_hook)
      (frame_visible_invisible_hook, iconify_frame_hook)
      (set_window_size_hook, set_frame_offset_hook, set_frame_alpha_hook)
      (set_new_font_hook, set_bitmap_icon_hook, implicit_set_name_hook)
      (activate_menubar_hook, change_tool_bar_height_hook)
      (set_scroll_bar_default_width_hook)
      (set_scroll_bar_default_height_hook, get_string_resource_hook): New
      terminal hooks to replace backend-specific x_* procedures.
      
      * src/dispextern.h (clear_under_internal_border): New RIF procedure.
      
      * src/alloc.c:
      * src/frame.c:
      * src/xdisp.c: Use FRAME_OUTPUT_DATA instead of FRAME_X_OUTPUT.
      
      * src/frame.c:
      * src/w32term.c:
      * src/w32fns.c: Use FRAME_NATIVE_WINDOW instead of FRAME_X_WINDOW.
      a411517f
    • Alexander Gramiak's avatar
      Rename generic x_* procedures in xdisp.c · ff4e31fa
      Alexander Gramiak authored
      * src/xdisp.c (x_consider_frame_title, x_get_glyph_overhangs)
      (x_produce_glyphs, x_write_glyphs, x_insert_glyphs)
      (x_clear_end_of_line), x_fix_overlapping_area)
      (x_update_cursor, x_clear_cursor, x_clear_window_mouse_face)
      (x_draw_vertical_border, x_draw_right_divider, x_draw_bottom_divider)
      (x_intersect_rectangles): Rename with a gui prefix to indicate
      non-X-specific functionality.
      
      * src/composite.c:
      * src/dispextern.h:
      * src/nsfns.m:
      * src/nsterm.m:
      * src/w32fns.c:
      * src/w32term.c:
      * src/window.c:
      * src/xfns.c:
      * src/xterm.c: Use the renamed procedures.
      ff4e31fa
  20. 24 Apr, 2019 1 commit
    • YAMAMOTO Mitsuharu's avatar
      Don't link libXft when using cairo · 5f4e8e2e
      YAMAMOTO Mitsuharu authored
      * configure.ac: Check cairo early.  Don't try Xft if cairo is used.
      * lwlib/lwlib-utils.h [USE_CAIRO]: Include cairo.h and fontconfig.h.
      (XftFont, XftDraw, XftColor, XGlyphInfo) [USE_CAIRO]: New typedefs.
      (XftFontOpenName, XftFontClose, XftDrawCreate, XftDrawDestroy)
      (XftDrawRect, XftDrawStringUtf8, XftTextExtentsUtf8) [USE_CAIRO]: New macros.
      (crxft_font_open_name, crxft_font_close, crxft_draw_create)
      (crxft_draw_rect, crxft_draw_string, crxft_text_extents) [USE_CAIRO]: New
      externs.
      * lwlib/lwlib-utils.c [USE_CAIRO]: Include math.h, cairo-ft.h, and
      cairo-xlib.h.
      (crxft_font_open_name, crxft_font_close, crxft_draw_create)
      (crxft_set_source_color, crxft_draw_rect, crxft_draw_string)
      (crxft_text_extents) [USE_CAIRO]: New Xft compatibility functions.
      * lwlib/xlwmenuP.h [USE_CAIRO]: Include lwlib-utils.h.
      * lwlib/xlwmenu.c (display_menu_item) [USE_CAIRO]: Call
      cairo_surface_mark_dirty and cairo_surface_flush.
      * lwlib/lwlib-Xaw.c [USE_CAIRO]: Include stdlib.h and lwlib-utils.h.
      (draw_text) [USE_CAIRO]: Call cairo_surface_flush.
      * src/xsettings.c [USE_CAIRO]: Include fontconfig.h
      (apply_xft_settings) [!HAVE_XFT]: Don't call XftDefaultSubstitute or
      XftDefaultSet.
      * lwlib/lwlib-Xaw.c:
      * lwlib/lwlib-int.h:
      * lwlib/xlwmenu.c:
      * lwlib/xlwmenuP.h:
      * src/xrdb.c:
      * src/xsettings.c:
      * src/xterm.c: Replace all #ifdef HAVE_XFT with #if defined USE_CAIRO ||
      defined HAVE_XFT.
      * src/xfns.c (x_default_font_parameter): Replace #ifdef HAVE_XFT with #if
      defined	USE_CAIRO || defined HAVE_XFT.
      5f4e8e2e
  21. 15 Apr, 2019 1 commit
    • Alexander Gramiak's avatar
      Bump minimum GTK versions to 2.24 and 3.10 · fc0f469f
      Alexander Gramiak authored
      * configure.ac: Bump required GTK 2 and GTK 3 versions and the
      associated GLib versions. Remove obsolete AC_CHECK_FUNCS calls. These
      check for functions available in later GTK 2 versions. These checks
      and can safely be removed with the exception of
      gtk_window_set_has_resize_grip, which according to a comment in
      gtkutil.c causes an issue in Ubuntu's GTK 2.
      
      * src/gtkutil.c:
      * src/xfns.c:
      * src/xterm.c:
      * src/xterm.h: Remove now unused conditional blocks. Use HAVE_GTK3
      instead of GTK_CHECK_VERSION where now applicable. Remove checks of
      now always true USE_GTK_TOOLTIP.
      fc0f469f
  22. 14 Apr, 2019 2 commits
  23. 13 Apr, 2019 1 commit
  24. 07 Apr, 2019 2 commits
  25. 16 Mar, 2019 1 commit
  26. 04 Mar, 2019 1 commit
    • Paul Eggert's avatar
      Simplify list creation in C code · 5c2563a5
      Paul Eggert authored
      The main new thing here is that C code can now say
      ‘list (a, b, c, d, e, f)’ instead of
      ‘listn (CONSTYPE_HEAP, 6, a, b, c, d, e, f)’,
      thus relieving callers of the responsibility of counting
      arguments (plus, the code feels more like Lisp).  The old
      list1 ... list5 functions remain, as they’re probably a bit
      faster for small lists.
      * src/alloc.c (cons_listn, pure_listn): New functions.
      (listn): Omit enum argument.
      All callers changed to use either new ‘list’ or ‘pure_list’ macros.
      * src/charset.c (Fdefine_charset_internal):
      * src/coding.c (detect_coding_system)
      (Fset_terminal_coding_system_internal):
      * src/frame.c (frame_size_history_add, adjust_frame_size):
      * src/gtkutil.c (xg_frame_set_char_size):
      * src/keyboard.c (command_loop_1):
      * src/nsfns.m (frame_geometry):
      * src/widget.c (set_frame_size):
      * src/xfaces.c (Fcolor_distance):
      * src/xfns.c (frame_geometry):
      * src/xterm.c (x_set_window_size_1):
      * src/xwidget.c (Fxwidget_size_request):
      Prefer list1i, list2i, etc. to open-coding them.
      * src/charset.c (Fset_charset_priority):
      * src/nsterm.m (append2):
      * src/window.c (window_list):
      * src/xfaces.c (Fx_list_fonts):
      Use nconc2 instead of open-coding it.
      * src/eval.c (eval_sub, backtrace_frame_apply):
      * src/kqueue.c (kqueue_generate_event):
      * src/nsterm.m (performDragOperation:):
      * src/pdumper.c (Fpdumper_stats):
      * src/w32.c (init_environment):
      Prefer list1, list2, etc. to open-coding them.
      * src/font.c (font_list_entities):
      Parenthesize to avoid expanding new ‘list’ macro.
      * src/gtkutil.c (GETSETUP): Rename from MAKE_FLOAT_PAGE_SETUP
      to get lines to fit.  Move outside the ‘list’ call, since it’s
      now a macro.
      * src/keymap.c (Fmake_keymap): Simplify.
      * src/lisp.h (list, pure_list): New macros.
      (list1i): New function.
      5c2563a5
  27. 01 Jan, 2019 1 commit
  28. 09 Dec, 2018 1 commit
    • Paul Eggert's avatar
      Add make_vector and make_nil_vector · d79bb756
      Paul Eggert authored
      This makes the callers a bit easier to read, and doubtless
      improves efficiency very slightly.  It also simplifies
      possible future changes to allow bignum indexes to buffers.
      * src/alloc.c (allocate_vectorlike):
      Prefer ptrdiff_t to size_t when either will do.
      (make_vector): New function.
      (Fmake_vector): Use it.
      * src/buffer.c (syms_of_buffer):
      * src/bytecode.c (syms_of_bytecode):
      * src/category.c (Fmake_category_table, init_category_once):
      * src/ccl.c (syms_of_ccl):
      * src/character.c (syms_of_character):
      * src/charset.c (Fdefine_charset_internal)
      (Ffind_charset_region, Ffind_charset_string):
      * src/chartab.c (copy_char_table):
      * src/coding.c (Fdefine_coding_system_internal, syms_of_coding):
      * src/composite.c (get_composition_id, Fcomposition_get_gstring):
      * src/composite.h (LGLYPH_NEW):
      * src/fns.c (concat, Flocale_info, make_hash_table):
      * src/font.c (font_otf_ValueRecord, font_otf_anchor)
      (build_style_table, syms_of_font):
      * src/fontset.c (RFONT_DEF_NEW, fontset_find_font)
      (dump_fontset, syms_of_fontset):
      * src/image.c (xpm_make_color_table_v):
      * src/keyboard.c (modify_event_symbol, menu_bar_items)
      (parse_menu_item, parse_tool_bar_item, init_tool_bar_items)
      (syms_of_keyboard):
      * src/keymap.c (Fdefine_key, describe_map, describe_vector):
      * src/lread.c (read_vector):
      * src/macfont.m (macfont_shape):
      * src/menu.c (init_menu_items):
      * src/nsfns.m (ns_make_monitor_attribute_list):
      * src/process.c (conv_sockaddr_to_lisp, network_interface_info):
      * src/profiler.c (make_log):
      * src/window.c (Fcurrent_window_configuration):
      * src/xdisp.c (with_echo_area_buffer_unwind_data)
      (format_mode_line_unwind_data):
      * src/xfaces.c (Finternal_make_lisp_face)
      (Fface_attributes_as_vector):
      * src/xfns.c (x_make_monitor_attribute_list)
      (Fx_display_monitor_attributes_list):
      * src/xfont.c (syms_of_xfont):
      * src/xselect.c (x_handle_dnd_message):
      * src/xwidget.c (save_script_callback):
      Prefer make_nil_vector (N) to Fmake_vector (make_fixnum (N), Qnil).
      * src/callint.c (Fcall_interactively):
      * src/charset.c (load_charset_map):
      * src/chartab.c (Fmake_char_table, uniprop_encode_value_numeric):
      * src/composite.c (get_composition_id)
      * src/dispnew.c (Fframe_or_buffer_changed_p)
      (syms_of_display):
      * src/fns.c (make_hash_table, maybe_resize_hash_table):
      * src/font.c (font_style_to_value):
      * src/fontset.c (FONTSET_ADD, fontset_add):
      * src/json.c (json_to_lisp):
      * src/keymap.c (syms_of_keymap):
      * src/lread.c (init_obarray):
      * src/profiler.c (make_log, Fprofiler_cpu_log):
      * src/term.c (term_get_fkeys_1):
      Prefer make_vector (N, V) to Fmake_vector (make_fixnum (N), V).
      * src/font.c (build_style_table):
      * src/macfont.m (macfont_shape):
      * src/process.c (conv_sockaddr_to_lisp, network_interface_info):
      Prefer make_uninit_vector if the vector will be initialized soon.
      * src/lisp.h (make_nil_vector): New function.
      d79bb756
  29. 04 Sep, 2018 1 commit