1. 08 Jun, 2019 1 commit
    • YAMAMOTO Mitsuharu's avatar
      Implement native image rotation and cropping on cairo · 88c49ac3
      YAMAMOTO Mitsuharu authored
      * src/dispextern.h (struct image) [USE_CAIRO]:
      * src/image.c (free_image, image_clear_image_1)
      (image_set_crop, image_set_size, image_set_rotation)
      (image_create_x_image_and_pixmap) [USE_CAIRO]: #ifdef out HAVE_XRENDER part.
      
      * src/image.c (cr_create_surface_from_pix_containers) [USE_CAIRO]: Rename
      from cr_create_surface_from_pix_containers.  Change arguments to pair of
      Emacs_Pix_Container:s.  Move block_input and unblock_input to caller.
      (cr_put_image_to_cr_data) [USE_CAIRO]: New function.
      (prepare_image_for_display) [USE_CAIRO]: Use it.
      (image_set_transform) [USE_CAIRO]: Create dummy solid color pattern equipped
      with transformation matrix and set it to img->cr_data.
      
      * src/xterm.c (fringe_bmp) [USE_CAIRO]: Change type to cairo_pattern_t **.
      (x_cr_define_fringe_bitmap, x_cr_destroy_fringe_bitmap) [USE_CAIRO]: Create
      or destroy cairo pattern.
      (x_cr_draw_image) [USE_CAIRO]: Remove arguments image_width and image_height.
      Change type of image to cairo pattern.  All callers changed.
      
      * src/gtkutil.c (xg_get_image_for_pixmap) [USE_CAIRO]: Get cairo surface
      from img->cr_data, which is of cairo pattern now.
      88c49ac3
  2. 29 May, 2019 1 commit
  3. 28 May, 2019 1 commit
    • YAMAMOTO Mitsuharu's avatar
      Support tool bar icon image also on GTK+2 with cairo · c617b4bf
      YAMAMOTO Mitsuharu authored
      * src/gtkutil.c (xg_get_pixbuf_from_surface) [USE_CAIRO && !HAVE_GTK3]: New
      function.
      (xg_get_image_for_pixmap) [USE_CAIRO && !HAVE_GTK3]: Use it.
      (xg_tool_item_stale_p, update_frame_tool_bar) [USE_CAIRO && !HAVE_GTK3]: Use
      cairo code also on GTK+2.
      c617b4bf
  4. 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
  5. 26 Apr, 2019 1 commit
    • 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
  6. 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
  7. 05 Apr, 2019 1 commit
  8. 26 Mar, 2019 1 commit
  9. 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
  10. 31 Jan, 2019 1 commit
    • Paul Eggert's avatar
      Prefer static to extern where either will do · 47679e63
      Paul Eggert authored
      * src/charset.c (charset_table_size):
      * src/pdumper.c (dump_private):
      * src/sysdep.c (init_sigsegv):
      * src/window.c (old_selected_window):
      Now static.
      * src/charset.c (charset_table_size):
      Now int, since the value always fits in int.
      * src/gtkutil.c (xg_gtk_initialized): Now present only if
      HAVE_XWIDGETS, to make it clearer that this is an xwidgets
      hack.  All uses changed.
      * src/lread.c (ndefsubr): Remove; unused.
      * src/pdumper.h: Use usual GNU indenting style for functions,
      since my static-vs-extern checking hack relies on it.
      (dump_public): Always declare; simpler and doesn’t hurt.
      (pdumper_handle_page_fault): Remove unused decl.
      47679e63
  11. 09 Jan, 2019 1 commit
    • Paul Eggert's avatar
      Use shortcuts for Flength · a8465033
      Paul Eggert authored
      When calculating the length of a Lisp object whose type is
      known, use a specialized length operation on it to save a bit
      of runtime overhead.
      * src/callint.c (Fcall_interactively):
      * src/minibuf.c (read_minibuf_unwind):
      Use ASIZE rather than Flength on values that must be vectors.
      * src/charset.c (Fsort_charsets):
      * src/coding.c (detect_coding_sjis):
      (Fdefine_coding_system_internal):
      * src/data.c (wrong_choice):
      * src/eval.c (Flet, eval_sub, Fapply, apply_lambda):
      * src/fns.c (sort_list):
      * src/font.c (font_vconcat_entity_vectors)
      (font_find_for_lface):
      * src/frame.c (Fmodify_frame_parameters):
      * src/fringe.c (get_logical_fringe_bitmap):
      * src/ftfont.c (ftfont_get_open_type_spec):
      * src/gtkutil.c (xg_print_frames_dialog):
      * src/lread.c (read1, read_vector):
      * src/keymap.c (Fkey_description):
      * src/kqueue.c (Fkqueue_add_watch):
      * src/macfont.m (macfont_get_open_type_spec):
      * src/menu.c (parse_single_submenu, x_popup_menu_1):
      * src/minibuf.c (Finternal_complete_buffer):
      * src/nsfont.m (ns_findfonts, nsfont_list_family):
      * src/process.c (Fmake_process):
      * src/search.c (Fset_match_data):
      * src/xfaces.c (Fx_family_fonts):
      Use list_length rather than Flength on values that must be lists.
      * src/fns.c (list_length): New function.
      (Flength): Use it.
      * src/nsfont.m (ns_findfonts):
      Use !NILP (x) rather than XFIXNUM (Flength (x)) != 0.
      * src/xdisp.c (store_mode_line_string):
      Use SCHARS rather than Flength on values that must be strings.
      a8465033
  12. 01 Jan, 2019 1 commit
  13. 27 Nov, 2018 1 commit
    • Robert Pluim's avatar
      Don't call xwidget functions until GTK has been initialized · a291f624
      Robert Pluim authored
      Follow up fix to Bug#33294.
      
      * src/gtkutil.c: Define xg_gtk_initialized.
      (xg_initialize): Set it when GTK has finished initializing.
      
      * src/gtkutil.h: Declare xg_gtk_initialized.
      
      * src/xwidget.c (Fmake_xwidget): Error out if GTK has not been
      initialized.
      (xwidget_init_view): Likewise.
      a291f624
  14. 13 Oct, 2018 1 commit
  15. 11 Sep, 2018 1 commit
    • Paul Eggert's avatar
      Adjust to TIMESPEC_HZ renaming · ef939833
      Paul Eggert authored
      Adjust to lib/timespec.h’s renaming of TIMESPEC_RESOLUTION and
      LOG10_TIMESPEC_RESOLUTION to TIMESPEC_HZ and
      LOG10_TIMESPEC_HZ.  The old names were misnomers.
      All uses changed.
      ef939833
  16. 24 Aug, 2018 1 commit
    • Glenn Morris's avatar
      Update GNOME bugtracker URLs · 624e7dc7
      Glenn Morris authored
      * configure.ac, admin/notes/multi-tty, etc/PROBLEMS:
      * src/emacs.c (main):
      * src/xterm.c (x_connection_closed): Update GNOME bugtracker URLs.
      ; * src/gtkutil.c (xg_display_close):
      ; * src/image.c (svg_load_image): Update URLs in comments.
      624e7dc7
  17. 08 Aug, 2018 1 commit
    • Tom Tromey's avatar
      More macro renamings for bignum · d1ec3a0a
      Tom Tromey authored
      * src/alloc.c, src/bidi.c, src/buffer.c, src/buffer.h, src/bytecode.c,
      src/callint.c, src/callproc.c, src/casefiddle.c, src/casetab.c,
      src/category.c, src/ccl.c, src/character.c, src/character.h,
      src/charset.c, src/charset.h, src/chartab.c, src/cmds.c, src/coding.c,
      src/composite.c, src/composite.h, src/data.c, src/dbusbind.c,
      src/decompress.c, src/dired.c, src/dispextern.h, src/dispnew.c,
      src/disptab.h, src/doc.c, src/dosfns.c, src/editfns.c,
      src/emacs-module.c, src/emacs.c, src/eval.c, src/fileio.c,
      src/floatfns.c, src/fns.c, src/font.c, src/font.h, src/fontset.c,
      src/frame.c, src/frame.h, src/fringe.c, src/ftcrfont.c, src/ftfont.c,
      src/gfilenotify.c, src/gnutls.c, src/gtkutil.c, src/image.c,
      src/indent.c, src/insdel.c, src/intervals.c, src/json.c,
      src/keyboard.c, src/keymap.c, src/kqueue.c, src/lcms.c, src/lisp.h,
      src/lread.c, src/macros.c, src/marker.c, src/menu.c, src/minibuf.c,
      src/msdos.c, src/print.c, src/process.c, src/profiler.c, src/search.c,
      src/sound.c, src/syntax.c, src/syntax.h, src/sysdep.c, src/term.c,
      src/termhooks.h, src/textprop.c, src/undo.c, src/w32.c,
      src/w32console.c, src/w32fns.c, src/w32font.c, src/w32inevt.c,
      src/w32proc.c, src/w32select.c, src/w32term.c, src/w32term.h,
      src/w32uniscribe.c, src/window.c, src/xdisp.c, src/xfaces.c,
      src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c, src/xml.c,
      src/xrdb.c, src/xselect.c, src/xsettings.c, src/xterm.c, src/xwidget.c
      Rename XINT->XFIXNUM, XFASTINT->XFIXNAT, XUINT->XUFIXNUM.
      d1ec3a0a
  18. 13 Jul, 2018 1 commit
    • Tom Tromey's avatar
      Rename integerp->fixnum, etc, in preparation for bignums · 42fe787b
      Tom Tromey authored
      * src/json.c, src/keyboard.c, src/keyboard.h, src/keymap.c,
      src/kqueue.c, src/lcms.c, src/lisp.h, src/lread.c, src/macros.c,
      src/marker.c, src/menu.c, src/minibuf.c, src/msdos.c, src/print.c,
      src/process.c, src/profiler.c, src/search.c, src/sound.c,
      src/syntax.c, src/sysdep.c, src/term.c, src/terminal.c,
      src/textprop.c, src/undo.c, src/w16select.c, src/w32.c,
      src/w32console.c, src/w32cygwinx.c, src/w32fns.c, src/w32font.c,
      src/w32inevt.c, src/w32proc.c, src/w32select.c, src/w32term.c,
      src/w32uniscribe.c, src/widget.c, src/window.c, src/xdisp.c,
      src/xfaces.c, src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c,
      src/xrdb.c, src/xselect.c, src/xterm.c, src/xwidget.c: Rename
      INTEGERP->FIXNUM, make_number->make_fixnum, CHECK_NUMBER->CHECK_FIXNUM,
      make_natnum->make_fixed_natum, NUMBERP->FIXED_OR_FLOATP,
      NATNUMP->FIXNATP, CHECK_NATNUM->CHECK_FIXNAT.
      42fe787b
  19. 21 Jun, 2018 1 commit
  20. 26 May, 2018 1 commit
  21. 24 Jan, 2018 1 commit
  22. 19 Jan, 2018 1 commit
  23. 18 Jan, 2018 1 commit
    • Martin Rudalics's avatar
      Fix some tooltip related problems · e462308f
      Martin Rudalics authored
      Replace 'tooltip' frame parameter with a 'tooltip' member in
      the frame structure.  For GTK+ builds use 'tip_last_frame' to
      find the frame for which the currently visible tooltip was
      made.  For modeline help-echoing have tooltips show applicable
      actions only.
      
      * lisp/bindings.el (mode-line-default-help-echo): New function
      as default value of homonymous option.
      * src/dispextern.h (tip_frame, tip_window): Remove
      declarations.
      * src/frame.c (make_frame): Initialize new frame structure
      member 'tooltip'.
      (Fframe_list, other_frames): Rewrite with new macro
      FRAME_TOOLTIP_P.
      * src/frame.h (struct frame): New member 'tooltip'.
      (FRAME_TOOLTIP_P): New macro.
      * src/gtkutil.c (xg_prepare_tooltip, xg_hide_tooltip): Rewrite
      using boolean return values.
      * src/nsfns.m (tip_frame): Remove declaration.
      * src/w32fns.c (w32_display_monitor_attributes_list)
      (w32_display_monitor_attributes_list_fallback): Rewrite with
      new macro FRAME_TOOLTIP_P.
      (tip_last_string, tip_last_frame, tip_last_parms): New Lisp
      scalars replacing Lisp vector last_show_tip_args.
      (x_create_tip_frame): Set new frame's 'tooltip' structure
      member to true.
      (x_hide_tip): Additionally test tip_frame for liveness.
      (Fx_show_tip): Handle last_show_tip_args to tip_last_frame,
      tip_last_string and tip_last_parms conversion.
      (syms_of_w32fns): staticpro tip_last_frame, tip_last_string
      and tip_last_parms instead of last_show_tip_args.
      * src/w32term.c (w32_read_socket, x_new_font): Rewrite with
      new macro FRAME_TOOLTIP_P.
      * src/w32term.h (tip_window): Add external declaration.
      * src/xdisp.c (x_consider_frame_title, prepare_menu_bars)
      (should_produce_line_number): Rewrite with new macro
      FRAME_TOOLTIP_P.
      (note_mode_line_or_margin_highlight): If
      `mode-line-default-help-echo' specifies a function, call it to
      produce help echo string.
      * src/xfns.c (x_make_monitor_attribute_list)
      (Fx_display_monitor_attributes_list): Rewrite with
      new macro FRAME_TOOLTIP_P.
      (tip_last_string, tip_last_frame, tip_last_parms): New Lisp
      scalars replacing Lisp vector last_show_tip_args.
      (x_create_tip_frame): Set new frame's 'tooltip' structure
      member to true.
      (x_hide_tip): Rewrite with additional tests of frames for
      liveness and taking into account that for GTK+ tips the
      reference frame is now stored in tip_last_frame instead of
      tip_frame.
      (Fx_show_tip): Handle last_show_tip_args to tip_last_frame,
      tip_last_string and tip_last_parms conversion.  For GTK+ store
      FRAME argument in tip_last-frame.
      (syms_of_xfns): staticpro tip_last_frame, tip_last_string
      and tip_last_parms instead of last_show_tip_args.
      * src/xterm.c (x_update_begin, handle_one_xevent, x_new_font)
      (x_set_window_size): Rewrite with new macro FRAME_TOOLTIP_P.
      * src/xterm.h (tip_window): Add external declaration.
      * etc/NEWS: Mention new modeline tooltips behavior.
      e462308f
  24. 01 Jan, 2018 1 commit
  25. 20 Dec, 2017 1 commit
  26. 26 Nov, 2017 1 commit
  27. 03 Oct, 2017 1 commit
  28. 02 Oct, 2017 1 commit
    • Paul Eggert's avatar
      Prefer HTTPS to HTTP for gnu.org · 5172fa02
      Paul Eggert authored
      This fixes some URLs I omitted from my previous pass,
      notably those in lists.gnu.org.  Although lists.gnu.org
      does not yet support TLS 1.1, TLS 1.0 is better than nothing.
      * lisp/erc/erc.el (erc-official-location):
      * lisp/mail/emacsbug.el (report-emacs-bug):
      Use https:, not http:.
      5172fa02
  29. 29 Sep, 2017 2 commits
  30. 26 Sep, 2017 2 commits
  31. 23 Sep, 2017 4 commits
  32. 19 Sep, 2017 1 commit
  33. 13 Sep, 2017 1 commit
    • Paul Eggert's avatar
      Prefer HTTPS to FTP and HTTP in documentation · bc511a64
      Paul Eggert authored
      Most of this change is to boilerplate commentary such as license URLs.
      This change was prompted by ftp://ftp.gnu.org's going-away party,
      planned for November.  Change these FTP URLs to https://ftp.gnu.org
      instead.  Make similar changes for URLs to other organizations moving
      away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
      fsf.org when this works, as this will further help defend against
      man-in-the-middle attacks (for this part I omitted the MS-DOS and
      MS-Windows sources and the test tarballs to keep the workload down).
      HTTPS is not fully working to lists.gnu.org so I left those URLs alone
      for now.
      bc511a64
  34. 27 Aug, 2017 2 commits
    • Philipp Stephani's avatar
      Fix GdkSettings-related deprecation warnings · 853ed453
      Philipp Stephani authored
      * src/gtkutil.c (xg_initialize): Don’t set deprecated and ignored
      gtk-menu-bar-accel setting in new versions of GTK+.  Use g_object_set
      instead of deprecated gtk_settngs_set_string_property otherwise.
      853ed453
    • Philipp Stephani's avatar
      Always use gtk_window_move in new versions · fe49aa17
      Philipp Stephani authored
      * src/gtkutil.c (my_log_handler): Don’t define in new versions of
      GTK+.
      (xg_set_geometry): Always use gtk_window_move in new versions of GTK+.
      
      * src/xterm.c (syms_of_xterm): Document that x-gtk-use-window-move
      is ignored.
      
      * lisp/subr.el (x-gtk-use-window-move): Make obsolete.
      fe49aa17