]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoFix font lock is not applied on continued lines
Yuuki Harano [Mon, 13 Jul 2020 14:38:07 +0000 (23:38 +0900)]
Fix font lock is not applied on continued lines

* src/pgtkterm.c (pgtk_parse_color): Remove alpha bits.

4 years agoRestore support for terminal only emacs in PGTK (add --with-pgtk)
Jeff Walsh [Thu, 2 Jul 2020 06:27:30 +0000 (16:27 +1000)]
Restore support for terminal only emacs in PGTK (add --with-pgtk)

* configure.ac: add "--with-pgtk" switch for building pgtk terminal
support.
Adjust X11 window system tests to no clobber pgtk preferences

4 years agoAdd font chooser functionality
Jeff Walsh [Mon, 29 Jun 2020 12:54:57 +0000 (22:54 +1000)]
Add font chooser functionality

* src/pgtkfns.c (Fpgtk_popup_font_panel): repurpose X/gtk font chooser code
(syms_of_pgtkfns): add new symbol

4 years agoFix migrating Child frames
Jeff Walsh [Thu, 25 Jun 2020 06:17:37 +0000 (16:17 +1000)]
Fix migrating Child frames

* src/pgtkterm.c:
(x_calc_absolute_position): Remove Function that has no effect
(x_set_offset): titlebar off should not be stored as an offset, only
used to calculate final move locations

4 years ago* src/keyboard.c (make_lispy_event): Fix coding style
Yuuki Harano [Tue, 26 May 2020 11:41:09 +0000 (20:41 +0900)]
* src/keyboard.c (make_lispy_event): Fix coding style

4 years agoChange coding style
Yuuki Harano [Tue, 26 May 2020 11:38:38 +0000 (20:38 +0900)]
Change coding style

* src/gtkutil.c (xg_display_open):
(xg_get_image_for_pixmap):
(xg_frame_resized):
(xg_create_frame_widgets):
(x_wm_set_size_hint):
(xg_frame_restack):
(xg_finish_scroll_bar_creation):
(xg_update_scrollbar_pos):
(xg_update_horizontal_scrollbar_pos):
(xg_set_toolkit_scroll_bar_thumb):
(xg_event_is_for_scrollbar):

4 years agoFix coding style
Yuuki Harano [Tue, 26 May 2020 11:25:28 +0000 (20:25 +0900)]
Fix coding style

* src/emacs.c (main): Fix coding style

4 years agoChange coding style
Yuuki Harano [Tue, 26 May 2020 11:22:20 +0000 (20:22 +0900)]
Change coding style

* src/image.c (image_create_pattern_from_pixbuf): Change coding style
(image_create_bitmap_from_data): Change coding style
(image_create_bitmap_from_file): Change coding style

4 years ago* src/pgtkselect.h: Change coding style
Yuuki Harano [Sun, 24 May 2020 10:45:35 +0000 (19:45 +0900)]
* src/pgtkselect.h: Change coding style

4 years ago* src/pgtkim.c: Change coding style
Yuuki Harano [Sun, 24 May 2020 10:41:51 +0000 (19:41 +0900)]
* src/pgtkim.c: Change coding style

4 years ago* src/pgtkterm.h: Change coding style
Yuuki Harano [Sun, 24 May 2020 10:39:44 +0000 (19:39 +0900)]
* src/pgtkterm.h: Change coding style

4 years ago* src/pgtkterm.h: Remove unused code
Yuuki Harano [Sun, 24 May 2020 10:37:24 +0000 (19:37 +0900)]
* src/pgtkterm.h: Remove unused code

4 years ago* src/pgtkgui.h: change coding style
Yuuki Harano [Sun, 24 May 2020 10:33:43 +0000 (19:33 +0900)]
* src/pgtkgui.h: change coding style

4 years ago* src/pgtkmenu.c: change coding style
Yuuki Harano [Sun, 24 May 2020 10:31:06 +0000 (19:31 +0900)]
* src/pgtkmenu.c: change coding style

4 years ago* src/pgtkselect.c: change coding style
Yuuki Harano [Sun, 24 May 2020 09:16:03 +0000 (18:16 +0900)]
* src/pgtkselect.c: change coding style

4 years ago* src/pgtkfns.c: change coding style
Yuuki Harano [Sun, 24 May 2020 09:11:22 +0000 (18:11 +0900)]
* src/pgtkfns.c: change coding style

4 years ago* src/pgtkterm.c: change coding style
Yuuki Harano [Sat, 23 May 2020 15:08:00 +0000 (00:08 +0900)]
* src/pgtkterm.c: change coding style

4 years ago* src/pgtkmenu.c (set_frame_menubar): Suppress gcc warning
Yuuki Harano [Sun, 17 May 2020 11:04:18 +0000 (20:04 +0900)]
* src/pgtkmenu.c (set_frame_menubar): Suppress gcc warning

4 years ago* src/pgtkterm.c (pgtk_defined_color): support gtk special colors
Yuuki Harano [Tue, 12 May 2020 13:39:15 +0000 (22:39 +0900)]
* src/pgtkterm.c (pgtk_defined_color): support gtk special colors

Color functions take the frame

* src/gtkutil.c (xg_check_special_colors): pass frame as argument.
* src/pgtkfns.c (x_set_foreground_color, x_set_background_color,
x_set_cursor_color, pgtk_set_scroll_bar_foreground,
pgtk_set_scroll_bar_background, Fxw_color_defined_p,
Fxw_color_values): pass frame as argument.
* src/pgtkterm.c (pgtk_parse_color): take frame as argument.
(pgtk_lisp_to_color): take frame as argument, and pass it.

Remove pgtk_lisp_to_color

* src/pgtkfns.c (x_set_foreground_color, x_set_background_color,
x_set_cursor_color): use x_decode_color instead of pgtk_lisp_to_color.
(Fxw_color_defined_p, Fxw_color_values):
use pgtk_defined_color instead of pgtk_lisp_to_color.
* src/pgtkterm.c (pgtk_lisp_to_color): remove.

* src/gtkutil.c (xg_check_special_colors): change color format

* src/pgtkterm.h: remove pgtk_lisp_to_color declaration

4 years ago* pgtkmenu.c (set_frame_menubar): fix empty menu.
Yuuki Harano [Wed, 6 May 2020 10:04:23 +0000 (19:04 +0900)]
* pgtkmenu.c (set_frame_menubar): fix empty menu.

4 years agoMake icons and titles work like on X
Yuuki Harano [Wed, 6 May 2020 03:55:04 +0000 (12:55 +0900)]
Make icons and titles work like on X

* pgtk-win.el (frame-title-format, icon-title-format): remove.
* pgtkfns.c (pgtk_set_name_as_filename):  remove.
* pgtkfns.c (pgtk_set_name_internal): remove gtk_window_set_icon_name call.
* pgtkfns.c (pgtk_set_name): change value of update_mode_lines.
* pgtkfns.c (pgtk_explicitly_set_name):
prefer the symbol to an immediate value.
* pgtkfns.c (pgtk_implicitly_set_name): remove pgtk_set_name_as_filename call.
* pgtkfns.c (x_set_icon_type, x_set_icon_name): re-port from X code.
* pgtkfns.c (xg_set_icon, xg_set_icon_from_xpm_data): port from X code.
* pgtkterm.c (pgtk_bitmap_icon, pgtk_text_icon, pgtk_create_terminal):
port from X code.
* pgtkterm.h: add function declarations.

4 years ago* pgtk-win.el: fix compile-time warnings.
Yuuki Harano [Fri, 1 May 2020 15:21:03 +0000 (00:21 +0900)]
* pgtk-win.el: fix compile-time warnings.

4 years ago* src/pgtkterm.c: Remove incorrect mark_object call.
Yuuki Harano [Mon, 27 Apr 2020 14:51:01 +0000 (23:51 +0900)]
* src/pgtkterm.c: Remove incorrect mark_object call.

4 years agofollow x_set_internal_border_width change.
Yuuki Harano [Sat, 11 Apr 2020 14:36:36 +0000 (23:36 +0900)]
follow x_set_internal_border_width change.

* ../src/pgtkfns.c (x_set_internal_border_width):

4 years agorestore frame_rehighlight_hook.
Yuuki Harano [Sat, 11 Apr 2020 14:36:08 +0000 (23:36 +0900)]
restore frame_rehighlight_hook.

* src/frame.c (gui_set_border_width):

4 years agouse pgtk_menu_set_in_use.
Yuuki Harano [Sun, 5 Apr 2020 10:23:10 +0000 (19:23 +0900)]
use pgtk_menu_set_in_use.

* ../src/pgtkfns.c:
(Fx_file_dialog, clean_up_dialog):

* src/pgtkmenu.c (pgtk_menu_wait_for_event):

4 years agoimplement popup/context menu
Yuuki Harano [Fri, 3 Apr 2020 14:36:41 +0000 (23:36 +0900)]
implement popup/context menu

* ../src/pgtkterm.c (x_draw_glyph_string_background)
(x_draw_glyph_string_foreground)
(x_draw_composite_glyph_string_foreground)
(x_draw_glyphless_glyph_string_foreground, x_draw_relief_rect)
(x_draw_box_rect, x_draw_glyph_string_box, x_draw_image_relief)
(x_draw_image_foreground, x_draw_image_glyph_string)
(button_event):

* src/pgtkterm.h (struct pgtk_display_info):

* src/pgtkmenu.c (pgtk_menu_set_in_use)
(pgtk_menu_wait_for_event, Fx_menu_bar_open_internal)
(popup_widget_loop, pgtk_activate_menubar)
(popup_deactivate_callback, show_help_event): new functions
(menu_highlight_callback): remove
(update_frame_menubar, popup_selection_callback, pop_down_menu)
(create_and_show_popup_menu, cleanup_widget_value_tree)
(pgtk_menu_show, dialog_selection_callback): new
(create_and_show_dialog, pgtk_dialog_show, pgtk_popup_dialog)
(popup_activated, Fmenu_or_popup_active_p, syms_of_pgtkmenu):

4 years agominimize gtkutil.c differences.
Yuuki Harano [Mon, 30 Mar 2020 16:32:10 +0000 (01:32 +0900)]
minimize gtkutil.c differences.

* src/pgtkterm.h: remove compiletime ifdefs

* src/gtkutil.h: block out unused decl

* src/gtkutil.c:
(xg_get_pixbuf_from_pix_and_mask, xg_height_or_width_changed)
(xg_create_frame_widgets, x_wm_set_size_hint)
(xg_event_is_for_menubar, update_frame_tool_bar):

resolve argument type mismatch.
fix compatibility.

4 years agoimprove code readability.
Yuuki Harano [Mon, 30 Mar 2020 16:31:07 +0000 (01:31 +0900)]
improve code readability.

* src/gtkutil.c (xg_create_frame_widgets):

4 years agoSet screen/display dpi res to make broadway work as expected
Jeff Walsh [Tue, 18 Feb 2020 06:13:26 +0000 (17:13 +1100)]
Set screen/display dpi res to make broadway work as expected

* src/pgtkterm.c (pgtk_initialize_display_info)
(window_state_event, pgtk_term_init):

* src/gtkutil.c (xg_create_frame_widgets):

* src/pgtkterm.c (pgtk_initialize_display_info)
(window_state_event, pgtk_term_init):

* src/ftcrfont.c (ftcrfont_open):

4 years agoSome work toward posframe on wayland
Jeff Walsh [Thu, 9 Jan 2020 05:36:11 +0000 (16:36 +1100)]
Some work toward posframe on wayland

* src/pgtkterm.c (flip_cr_context, x_set_offset): update for new functionality
(pgtk_set_window_size): remove dead code
(x_set_parent_frame): cleanup trace code
(pgtk_cr_update_surface_desired_size): add comment

* src/pgtkmenu.c (Fmenu_or_popup_active_p):

* src/pgtkfns.c (pgtk_frame_parm_handlers, Fx_create_frame):

* src/gtkutil.c (xg_create_frame_widgets, x_wm_set_size_hint):

* src/gtkutil.c (xg_create_frame_widgets):

hacky GTK offsets taht will need better calculations

Get parent frame's editor widget allocation for the offset

Fix child-frame offsets for negative values

Add some function comments around the new double context handling

4 years agoEnd Resize flickering by copying surface rather than just clearing
Jeff Walsh [Mon, 13 Jan 2020 05:17:50 +0000 (16:17 +1100)]
End Resize flickering by copying surface rather than just clearing

* src/pgtkterm.h (FRAME_NATIVE_WINDOW):

* src/pgtkterm.c (pgtk_set_window_size): cleanup traces
(x_draw_bar_cursor, pgtk_handle_draw, syms_of_pgtkterm):

4 years agoBring pgtk more inline with X11-cairo builds
Jeff Walsh [Tue, 14 Jan 2020 05:44:38 +0000 (16:44 +1100)]
Bring pgtk more inline with X11-cairo builds

* src/pgtkterm.h (struct pgtk_output):

* src/pgtkterm.c (FRAME_CR_ACTIVE_CONTEXT, flip_cr_context)
(x_draw_bar_cursor, pgtk_scroll_run, pgtk_update_end)
(pgtk_cr_draw_image, pgtk_flash, pgtk_handle_draw)
(pgtk_cr_update_surface_desired_size, pgtk_begin_cr_clip)
(pgtk_cr_destroy_frame_context):

* src/image.c (image_create_pattern_from_pixbuf):

- Don't create a context each time, just hold a reference

- Pull in a few cairo image changes from master

- Remove redundant code in pgtk_update_begin()

4 years agoupdate redisplay_interface.
Yuuki Harano [Tue, 24 Mar 2020 15:23:42 +0000 (00:23 +0900)]
update redisplay_interface.

* src/pgtkfns.c (Fx_create_frame, pgtk_default_font_parameter):

* src/pgtkterm.c (pgtk_redisplay_interface):

* src/pgtkterm.h:

4 years agoemacsclient should use both of DISPLAY and WAYLAND_DISPLAY.
Yuuki Harano [Mon, 23 Mar 2020 15:33:57 +0000 (00:33 +0900)]
emacsclient should use both of DISPLAY and WAYLAND_DISPLAY.

* lisp/server.el (server-create-window-system-frame): error out when
not on a supported window

* lib-src/emacsclient.c (decode_options): handle WALAND_DISPLAY on PGTK

4 years agoBefore sleep, dispatch draw events.
Yuuki Harano [Tue, 21 Jan 2020 13:45:37 +0000 (22:45 +0900)]
Before sleep, dispatch draw events.

* src/pgtkterm.c (pgtk_select): remove sigio signal
  (pgtk_term_init): dispatch draw

4 years agoEnd Resize flickering by copying surface rather than just clearing
Jeff Walsh [Mon, 13 Jan 2020 05:17:50 +0000 (16:17 +1100)]
End Resize flickering by copying surface rather than just clearing

* src/pgtkterm.h (struct pgtk_output): store desired sizes

* src/pgtkterm.c (FRAME_CR_SURFACE_DESIRED_HEIGHT)
(FRAME_CR_SURFACE_DESIRED_WIDTH, size_allocate, configure_event)
(pgtk_cr_update_surface_desired_size): add "desired" size for handling
surface change

* src/gtkutil.c (xg_frame_resized, xg_create_frame_widgets): remove
surface destroy, turn off double buffer call

4 years agoAdd support for Jpeglib
Yuuki Harano [Sat, 11 Jan 2020 16:29:39 +0000 (01:29 +0900)]
Add support for Jpeglib

configure.ac: enable jpeglib support for pgtk

jpeglib を使えるようにした。

imagemagick がうまく機能してるので気付かなかった…

4 years agoLet gtk handle scaling.
Yuuki Harano [Thu, 21 Nov 2019 15:27:12 +0000 (00:27 +0900)]
Let gtk handle scaling.

* src/gtkutil.c (xg_get_scale):

4 years agoimplement pre-edit input method
Yuuki Harano [Wed, 13 Nov 2019 14:36:27 +0000 (23:36 +0900)]
implement pre-edit input method

* src/termhooks.h (enum event_kind): new pgtk value

* src/pgtkterm.h (struct pgtk_display_info):

* src/pgtkterm.c (x_free_frame_resources, pgtk_delete_terminal)
(pgtk_enqueue_string, pgtk_enqueue_preedit, key_press_event)
(focus_in_event, focus_out_event, pgtk_term_init): call pgtkim

* src/pgtkim.c: new file
(im_context_commit_cb, im_context_retrieve_surrounding_cb)
(make_color_string, im_context_preedit_changed_cb)
(im_context_preedit_end_cb, im_context_preedit_start_cb)
(pgtk_im_focus_in, pgtk_im_focus_out, pgtk_im_filter_keypress)
(pgtk_im_finish, Fpgtk_use_im_context, syms_of_pgtkim):

* src/pgtkfns.c (check_pgtk_display_info):

* src/keyboard.c (kbd_buffer_get_event, make_lispy_event)
(keys_of_keyboard):

* src/emacs.c (main): add syms_of_pgtkim

* lisp/term/pgtk-win.el (pgtk-preedit-text): new defun

* configure.ac (XWIDGETS_OBJ): add pgtkim.o

input method 対応

preedit を overlay で表示するようにした。

preedit 表示後すぐに反映されなかったのを修正

この機能を ON/OFF できるようにした。

default off.

確定と同時に次の preedit が始まった場合に表示位置がおかしかったのを修正。

sample.

preedit をテキストで渡すようにした

4 years agoSupport focus on click event
Yuuki Harano [Sat, 12 Oct 2019 16:41:34 +0000 (01:41 +0900)]
Support focus on click event

* src/pgtkterm.c (enter_notify_event, leave_notify_event)
(focus_in_event, focus_out_event): support focus on click

focus-on-click な環境に対応。

4 years agoexperimental support of tab-bar.
Yuuki Harano [Tue, 8 Oct 2019 14:05:55 +0000 (23:05 +0900)]
experimental support of tab-bar.

* src/window.h: compile conditional

* src/pgtkterm.h: function decls

* src/pgtkterm.c (x_draw_image_relief, pgtk_create_terminal)
(motion_notify_event, button_event): tabbar support

* src/pgtkfns.c (x_set_tab_bar_lines, x_change_tab_bar_height)
(pgtk_frame_parm_handlers, Fx_create_frame, frame_geometry): tabbar support

余計なイベントが生成されていたのを修正。

4 years agoMake multipdisplay work by limiting selection while enabed
Yuuki Harano [Wed, 31 Jul 2019 16:26:55 +0000 (01:26 +0900)]
Make multipdisplay work by limiting selection while enabed

* src/pgtkterm.c (pgtk_mouse_position):

* src/pgtkselect.c (pgtk_selection_usable): new function
(Fpgtk_own_selection_internal, Fpgtk_disown_selection_internal)
(Fpgtk_selection_exists_p, Fpgtk_selection_owner_p)
(Fpgtk_get_selection_internal): check usable selection

multi-display で落ちる理由を一つ潰した。

まだまだありそう。

multi-display 時は selection を使えないようにした。

4 years agoImprove drawing efficency by refactoring code
Yuuki Harano [Mon, 29 Jul 2019 13:44:58 +0000 (22:44 +0900)]
Improve drawing efficency by refactoring code

* ../src/pgtkterm.c (fill_background, fill_background_by_face)
(x_draw_glyph_string_background, x_draw_glyph_string_bg_rect)
(x_draw_image_glyph_string, x_draw_stretch_glyph_string)
(pgtk_clear_under_internal_border): Refator duplcate code

更に効率化。

4 years agoimprove some efficiency - simplify draws
Yuuki Harano [Mon, 29 Jul 2019 12:31:42 +0000 (21:31 +0900)]
improve some efficiency - simplify draws

* src/pgtkterm.h (struct pgtk_bitmap_record):

* src/pgtkterm.c (create_background_surface_by_face):

* src/image.c (image_create_pattern_from_pixbuf)
(image_create_bitmap_from_data, image_create_bitmap_from_file):

少し効率化。

4 years agoimplement restacking and cleanup frame z order
Yuuki Harano [Thu, 25 Jul 2019 17:14:13 +0000 (02:14 +0900)]
implement restacking and cleanup frame z order

src/pgtkfns.c:
(pgtk_frame_restack,  Fpgtk_frame_restack, syms_of_pgtkfns):

pgtk-frame-restack を実装だけ。

ついでに、pgtk-frame-list-z-order は無意味なので削除した。

4 years agoimplement pgtk-frame-list-z-order same as frame-list.
Yuuki Harano [Thu, 25 Jul 2019 16:47:48 +0000 (01:47 +0900)]
implement pgtk-frame-list-z-order same as frame-list.

* src/pgtkfns.c (Fpgtk_frame_list_z_order): return frame list as it's
the same

4 years agoImplement Scroll-bar-forground and scroll-bar-background
Yuuki Harano [Sun, 21 Jul 2019 14:11:50 +0000 (23:11 +0900)]
Implement Scroll-bar-forground and scroll-bar-background

* src/pgtkterm.h (struct pgtk_output):

* src/pgtkterm.c (x_free_frame_resources):

* src/pgtkfns.c (pgtk_set_scroll_bar_foreground)
(pgtk_set_scroll_bar_background, pgtk_frame_parm_handlers)
(Fx_create_frame):

* src/gtkutil.c (xg_finish_scroll_bar_creation):handle scrollbar css values

* etc/org.gnu.emacs.defaults.gschema.xml: add scroll bar fields

scroll-bar-foreground, scroll-bar-background 実装。

4 years agoimplement set-tool-bar-position and set-sticky
Yuuki Harano [Sat, 20 Jul 2019 16:22:45 +0000 (01:22 +0900)]
implement set-tool-bar-position and set-sticky

* ../src/pgtkfns.c (pgtk_set_tool_bar_position)
(pgtk_frame_parm_handlers):

tool-bar-position 実装。

4 years agoTIMERFD support for PGTK, prevent calling when timerfd<0
Yuuki Harano [Thu, 18 Jul 2019 15:15:52 +0000 (00:15 +0900)]
TIMERFD support for PGTK, prevent calling when timerfd<0

* ../src/atimer.c (set_alarm):

4 years agoAdd PGTK support for fullscreen
Yuuki Harano [Thu, 18 Jul 2019 10:42:02 +0000 (19:42 +0900)]
Add PGTK support for fullscreen

* src/gtkutil.c (x_wm_set_size_hint): Fullscreen support for PGTK

fullscreen にできるようにした。

4 years agoUse gsettings instead of X resource database
Yuuki Harano [Wed, 17 Jul 2019 16:07:36 +0000 (01:07 +0900)]
Use gsettings instead of X resource database

* src/pgtkfns.c (pgtk_is_lower_char, pgtk_is_upper_char)
(pgtk_is_numeric_char, parse_resource_key)
(pgtk_get_defaults_value, pgtk_set_defaults_value)
(Fpgtk_set_resource, pgtk_get_string_resource): handle gsettings scheme

* m4/gsettings.m4: new file

* etc/org.gnu.emacs.defaults.gschema.xml: new file

* configure.ac (GLIB_DISABLE_DEPRECATION_WARNINGS)
(gsettingsschemadir):

* Makefile.in (gsettingsschemadir, GLIB_COMPILE_SCHEMAS)
(install, uninstall, clean):

* .gitignore: add gschema

*.gschema.valid は生成ファイルなので無視。

schema の置き場所を変更。

4 years agoImplement Meta key detection
Yuuki Harano [Tue, 9 Jul 2019 17:32:35 +0000 (02:32 +0900)]
Implement Meta key detection

* ../src/pgtkterm.c (x_find_modifier_meanings, )
(key_press_event, construct_mouse_click, scroll_event)
(pgtk_term_init):

* src/pgtkterm.h (struct pgtk_display_info):

* ../src/gtkutil.c (xg_tool_bar_callback):

meta キーの検出を実装。

X11 で alt キーを meta キーとして使えなくなっていたのを修正。

4 years agoImplement invisible-pointer to create blinking effect
Yuuki Harano [Sun, 7 Jul 2019 16:56:21 +0000 (01:56 +0900)]
Implement invisible-pointer to create blinking effect

* src/pgtkterm.h (struct pgtk_display_info): add cursor and callback

* src/pgtkterm.c (x_setup_pointer_blanking)
(XTtoggle_invisible_pointer, x_toggle_visible_pointer): new functions
(pgtk_create_terminal, pgtk_term_init): use gdkcursor

* src/pgtkgui.h: define Emacs_cursor as a GdkCursor

invisible pointer 実装。

4 years agoinit border_pixel.
Yuuki Harano [Fri, 26 Jul 2019 14:55:03 +0000 (23:55 +0900)]
init border_pixel.

* ../src/pgtkfns.c (Fx_create_frame): remove if preprocessor

4 years agoborder_color/pixel width
Yuuki Harano [Sun, 7 Jul 2019 13:43:59 +0000 (22:43 +0900)]
border_color/pixel width

* src/pgtkterm.h (struct pgtk_output):

* src/pgtkterm.c (x_free_frame_resources, frame_highlight)
(frame_unhighlight, pgtk_frame_rehighlight): use css information

* src/pgtkfns.c (x_set_border_color, pgtk_frame_parm_handlers)
(Fx_create_frame): new functions connected

* src/frame.c (gui_set_border_width): ifdef for PGTK

border_color/pixel 対応。

4 years agoAdd support for handing the internal border
Yuuki Harano [Sat, 6 Jul 2019 18:15:20 +0000 (03:15 +0900)]
Add support for handing the internal border

src/pgtkterm.c (pgtk_clear_under_internal_border): remove #if 0
src/pgtkfns.c (x_set_internal_border_width): add clear and fill support

internal-border 対応。

4 years agoAddframe highlighting support
Yuuki Harano [Sat, 6 Jul 2019 17:24:14 +0000 (02:24 +0900)]
Addframe highlighting support

* ../src/pgtkterm.c:
(pgtk_focus_frame, set_opacity_recursively, x_set_frame_alpha)
(frame_highlight, frame_unhighlight, pgtk_frame_rehighlight)
(XTframe_rehighlight, x_new_focus_frame, pgtk_create_terminal):

frame の highlight に対応。

とりあえず opacity のみ対応。

4 years agoAdd Stipple support for PGTK
Yuuki Harano [Fri, 5 Jul 2019 13:37:18 +0000 (22:37 +0900)]
Add Stipple support for PGTK

* ../src/pgtkterm.c (create_background_surface_by_face)
(create_background_surface, x_draw_glyph_string_background)
(x_draw_glyph_string_bg_rect, x_draw_image_glyph_string)
(x_draw_stretch_glyph_string, pgtk_draw_fringe_bitmap): handle stipple

* ../src/image.c (image_create_bitmap_from_file, )
(syms_of_image): Add pgtk support

* ../lisp/faces.el (face-valid-attribute-values): add pgtk support

stipple 対応。

stipple がまともに動いてなかったので修正。

4 years agoAdd support for make-frame-(in)visible
Yuuki Harano [Tue, 2 Jul 2019 16:05:10 +0000 (01:05 +0900)]
Add support for make-frame-(in)visible

* ../src/pgtkterm.c (pgtk_make_frame_visible_wait_for_map_event_cb)
(pgtk_make_frame_visible_wait_for_map_event_timeout)
(x_make_frame_visible, x_new_font)
(pgtk_make_frame_visible_invisible, pgtk_make_frame_visible)
(pgtk_redisplay_interface, pgtk_create_terminal, map_event)
(syms_of_pgtkterm):

make-frame-visible/invisible 実装。

4 years agoEarly toolbar improvements
Jeff Walsh [Fri, 12 Jun 2020 11:44:18 +0000 (21:44 +1000)]
Early toolbar improvements

* src/xdisp.c (redisplay_tool_bar):

* src/pgtkterm.h:

* src/pgtkterm.c:
(pgtk_make_frame_visible, pgtk_make_frame_invisible)
(pgtk_update_begin, pgtk_parse_color, pgtk_query_colors)
(syms_of_pgtkterm):

* src/pgtkfns.c: cleanup function

* src/image.c (image_create_bitmap_from_file):

* src/gtkutil.c (xg_get_pixbuf_from_pix_and_mask):

4 years agoAdd Preferred geometry settings
Yuuki Harano [Tue, 25 Jun 2019 15:30:33 +0000 (00:30 +0900)]
Add Preferred geometry settings

* ../src/pgtkterm.h (struct pgtk_output):

* ../src/pgtkterm.c (pgtk_set_window_size):

* ../src/gtkutil.c (x_wm_set_size_hint):

* ../src/emacsgtkfixed.c (emacs_fixed_get_preferred_width)
(emacs_fixed_get_preferred_height):

Fixup toolbar handling

toolbar, menubar の ON/OFF でサイズが変化していっていたのを修正。

4 years agoMigrate to Emacs_GC
Yuuki Harano [Tue, 25 Jun 2019 12:36:39 +0000 (21:36 +0900)]
Migrate to Emacs_GC

* ../src/xfaces.c (x_create_gc, x_free_gc):

* ../src/pgtkterm.h (struct pgtk_output, struct pgtk_output):

* ../src/pgtkterm.c (x_set_cursor_gc, x_set_mouse_face_gc)
(x_setup_relief_color, x_draw_image_foreground_1)
(x_draw_image_foreground)
(pgtk_cr_draw_image, pgtk_draw_fringe_bitmap)
(pgtk_begin_cr_clip, pgtk_set_cr_source_with_gc_foreground)
(pgtk_set_cr_source_with_gc_background):

* ../src/pgtkgui.h:

* ../src/dispextern.h (struct glyph_string): clean up XGCValues  emulation

XGCValues, GC 廃止。

Emacs_GC に統一。

4 years agoAdd pgtk-read-file-name function
Yuuki Harano [Sat, 22 Jun 2019 18:19:10 +0000 (03:19 +0900)]
Add pgtk-read-file-name function

* ../src/pgtkfns.c (read_file_name_closed_cb)
(Fpgtk_read_file_name, syms_of_pgtkfns): add function

pgtk-read-file-name を作成。

toolbar からよく呼ばれるので…

4 years agoImplement menubar for pgtk emacs
Jeff Walsh [Sat, 15 Jun 2019 04:44:47 +0000 (14:44 +1000)]
Implement menubar for pgtk emacs

* src/xdisp.c (display_menu_bar): add pgtk case

* ../src/pgtkterm.c (pgtk_create_terminal): update hooks
(pgtk_menu_show): delete

* src/pgtkterm.h: add decls

* src/pgtkmenu.c: new file

* ../src/pgtkfns.c (x_set_menu_bar_lines)
(x_change_tool_bar_height, x_set_tool_bar_lines)
(Fx_create_frame):

4 years agoCleanup x_* to gui_ to match upstream work
Yuuki Harano [Fri, 3 May 2019 08:20:47 +0000 (17:20 +0900)]
Cleanup x_* to gui_ to match upstream work

* ../src/pgtkterm.h (struct pgtk_display_info):

* ../src/pgtkterm.c (mark_pgtkterm, x_free_frame_resources)
(pgtk_update_window_end, pgtk_mouse_position)
(pgtk_redisplay_interface, pgtk_query_frame_background_color)
(pgtk_delete_terminal, pgtk_create_terminal)
(pgtk_query_frame_background_color, frame_highlight)
(motion_notify_event, button_event, scroll_event):

* ../src/pgtkfns.c (x_set_cursor_color, x_icon)
(pgtk_frame_parm_handlers, x_default_font_parameter)
(Fx_create_frame):

"for the time being, commit" -- rename x->gui, frame_X_X(f) macros

ひとまず commit。

4 years agoSimplify compilaiton condtion
Yuuki Harano [Wed, 3 Apr 2019 13:14:28 +0000 (22:14 +0900)]
Simplify compilaiton condtion

* ../src/menu.c (single_menu_item):

change condition.

4 years agoreplace listn with list.
Yuuki Harano [Wed, 3 Apr 2019 12:45:37 +0000 (21:45 +0900)]
replace listn with list.

* ../src/pgtkfns.c (frame_geometry):

replace listn with list.

4 years agoFix xdg-open handling
Yuuki Harano [Sat, 12 May 2018 14:49:00 +0000 (23:49 +0900)]
Fix xdg-open handling

* ../src/pgtkterm.c (pgtk_term_init, NUM_ARGV, pgtk_term_init):

* ../lisp/net/browse-url.el (browse-url):

xdg-open できなかったのを修正。

4 years agoAdd support for cursor_foreground_colors
Yuuki Harano [Sat, 13 Jan 2018 11:27:11 +0000 (20:27 +0900)]
Add support for cursor_foreground_colors

* ../src/pgtkterm.c (x_set_cursor_gc):

* ../src/pgtkfns.c (x_set_cursor_color, Fx_create_frame)
(syms_of_pgtkfns):

* src/pgtkterm.h (struct pgtk_output):

cursor_foreground_color 対応。

あんまり意味なかった感じ。

4 years agoDon't mark name_list_element as it's not required
Yuuki Harano [Wed, 10 Jan 2018 13:33:18 +0000 (22:33 +0900)]
Don't mark name_list_element as it's not required

* ../src/pgtkterm.c (mark_pgtkterm):

これは余分。

4 years agoAdd set_skip_taskbar frame parm
Yuuki Harano [Mon, 8 Jan 2018 12:21:55 +0000 (21:21 +0900)]
Add set_skip_taskbar frame parm

* src/pgtkfns.c (x_set_skip_taskbar, pgtk_frame_parm_handlers):
  Add set_skip_taskbar

4 years agoAdd set_undecorated frame parameter
Yuuki Harano [Mon, 8 Jan 2018 12:13:25 +0000 (21:13 +0900)]
Add set_undecorated frame parameter

* src/pgtkfns.c (x_set_undecorated, pgtk_frame_parm_handlers): Add
undecorated frame parameter handle

4 years agoIntroduce Pure GTK3 port
Yuuki Harano [Sat, 28 Oct 2017 07:16:29 +0000 (16:16 +0900)]
Introduce Pure GTK3 port

* src/xsettings.h:

* src/xsettings.c:
(dpyinfo_valid, store_tool_bar_style_changed)
(XSETTINGS_FONT_NAME, get_prop_window, read_settings)
(apply_xft_settings, read_and_apply_settings)
(xft_settings_event, init_xsettings, xsettings_initialize):

* src/xfaces.c:
(x_create_gc, x_free_gc):

* src/xdisp.c (redisplay_tool_bar, redisplay_internal)
(draw_glyphs_debug, draw_glyphs, mouse_face_from_buffer_pos)
(note_mouse_highlight):

* src/terminal.c (Fterminal_live_p):

* src/termhooks.h (enum output_method, GCALIGNED_STRUCT)
(TERMINAL_FONT_CACHE):

* src/process.c (wait_reading_process_output):

* src/pgtkterm.h:

* src/pgtkterm.c:

* src/pgtkselect.h:

* src/pgtkselect.c:

* src/pgtkgui.h:

* src/pgtkfns.c:

* src/image.c:
(XGetPixel, XPutPixel, image_create_bitmap_from_data)
(image_create_bitmap_from_file, free_bitmap_record)
(image_destroy_x_image, gui_put_x_image, image_get_x_image)
(Create_Pixmap_From_Bitmap_Data, xbm_load_image, )
(xpm_load_image, lookup_rgb_color, image_disable_image)
(image_build_heuristic_mask, imagemagick_load_image):

* src/gtkutil.h:

* src/gtkutil.c (PGTK_TRACE, xg_set_screen, xg_display_open)
(xg_display_close, xg_create_default_cursor)
(xg_get_pixbuf_from_pix_and_mask, xg_check_special_colors)
(qttip_cb, hierarchy_ch_cb, xg_prepare_tooltip, )
(xg_show_tooltip, xg_hide_tooltip, xg_frame_resized)
(xg_frame_set_char_size, xg_height_or_width_changed)
(xg_set_widget_bg, style_changed_cb, xg_create_frame_widgets)
(xg_free_frame_widgets, x_wm_set_size_hint, xg_frame_restack)
(xg_mark_data, xg_update_frame_menubar, free_frame_menubar)
(xg_update_submenu, xg_finish_scroll_bar_creation)
(xg_update_scrollbar_pos, xg_update_horizontal_scrollbar_pos)
(xg_set_toolkit_scroll_bar_thumb, xg_event_is_for_scrollbar)
(draw_page, xg_pack_tool_bar, xg_create_tool_bar)
(xg_update_tool_bar_sizes, update_frame_tool_bar)
(free_frame_tool_bar, xg_change_toolbar_position):

* src/ftcrfont.c:
(ftcrfont_draw):

* src/fringe.c:
(init_fringe_bitmap):

* src/frame.h (GCALIGNED_STRUCT, FRAME_WINDOW_P):

* src/frame.c (Fframep):

* src/font.h:

* src/font.c (syms_of_font):

* src/emacsgtkfixed.c:
(emacs_fixed_get_preferred_width)
(emacs_fixed_get_preferred_height, XSetWMSizeHints):

* src/emacs.c (main):

* src/dispnew.c (init_display_interactive):

* src/dispextern.h:

* src/alloc.c:
(garbage_collect):

* src/Makefile.in (PGTK_OBJ, PGTK_LIBS, base_obj, LIBES):

* src/.gdbinit:

* lisp/url/url-privacy.el (url-setup-privacy-info):

* lisp/term/pgtk-win.el (featurep):

* lisp/startup.el (command-line, fancy-splash-frame):

* lisp/net/eww.el (eww-form-submit, eww-form-file)
(eww-form-checkbox, eww-form-select):

* lisp/mwheel.el (mouse-wheel-down-event, mouse-wheel-up-event):

* lisp/loadup.el (featurep):

* lisp/international/mule-cmds.el (set-coding-system-map):

* lisp/frame.el (pgtk-frame-geometry, frame-geometry)
(w32-frame-edges, frame-edges)
(pgtk-mouse-absolute-pixel-position)
(mouse-absolute-pixel-position)
(pgtk-set-mouse-absolute-pixel-position)
(pgtk-frame-list-z-order, frame-list-z-order)
(pgtk-frame-restack, frame-restack, display-mouse-p)
(display-graphic-p, display-symbol-keys-p, )
(display-pixel-height, display-mm-height, display-mm-width)
(display-backing-store, display-save-under, display-color-cells)
(display-planes, display-visual-class)
(pgtk-display-monitor-attributes-list)
(display-monitor-attributes-list):

* lisp/faces.el (face-spec-set-match-display, tool-bar):

* lisp/cus-edit.el (custom-button, custom-button-mouse)
(custom-button-pressed, custom-display):

* configure.ac (AUTO_DEPEND, XARGS_LIMIT, XWIDGETS_OBJ):

4 years agoMigrate usage of GPM_CLICK_EVENT to MOUSE_CLICK_EVENT.
Jared Finder [Sun, 15 Nov 2020 07:44:26 +0000 (23:44 -0800)]
Migrate usage of GPM_CLICK_EVENT to MOUSE_CLICK_EVENT.

* src/termhooks.h (enum event_kind):
* src/term.c (term_mouse_click, handle_one_term_event):
* src/keyboard.c (discard_mouse_events, make_lispy_event): Migrate
usage of GPM_CLICK_EVENT to MOUSE_CLICK_EVENT.

4 years ago* lisp/emacs-lisp/package.el (package-strip-rcs-id): Don't ignore errors
Stefan Monnier [Sat, 21 Nov 2020 00:28:34 +0000 (19:28 -0500)]
* lisp/emacs-lisp/package.el (package-strip-rcs-id): Don't ignore errors

Ignoring errors here just postpones the error and replaces a clear
"invalid version syntax" with a confusing "package lacks a version".

4 years agoUse cl-letf instead of unwind-protect in a test
Mauro Aranda [Fri, 20 Nov 2020 22:28:03 +0000 (19:28 -0300)]
Use cl-letf instead of unwind-protect in a test

* test/lisp/cus-edit-tests.el (cus-edit-tests-customize-saved/show-obsolete):
Good use case for cl-letf, so use it.
Suggested by Stefan Monnier <monnier@iro.umontreal.ca> in:
https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg00914.html

4 years ago* test/manual/indent/tcl.tcl: Add string interpolation case
Stefan Monnier [Fri, 20 Nov 2020 21:54:06 +0000 (16:54 -0500)]
* test/manual/indent/tcl.tcl: Add string interpolation case

4 years agoDon't optimize away `eval` when its lexical context is different
Stefan Monnier [Fri, 20 Nov 2020 21:45:56 +0000 (16:45 -0500)]
Don't optimize away `eval` when its lexical context is different

* lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-eval):
Obey lexical-binding.

4 years agoTake care of a FIXME in cus-edit-tests.el
Mauro Aranda [Fri, 20 Nov 2020 21:37:30 +0000 (18:37 -0300)]
Take care of a FIXME in cus-edit-tests.el

* test/lisp/cus-edit-tests.el (cus-edit-tests-customize-saved/show-obsolete):
Add a fake saved-value property, to be able check that the obsolete
option is present in the Customize buffer.  Expect the test to pass
now.

4 years agoDon't quote lambda in idlwave.el
Stefan Kangas [Fri, 20 Nov 2020 16:25:31 +0000 (17:25 +0100)]
Don't quote lambda in idlwave.el

* lisp/progmodes/idlwave.el (idlwave-keyword-abbrev): Don't quote
lambda.

4 years agoRemove remaining XEmacs compat code from erc-log.el
Stefan Kangas [Fri, 20 Nov 2020 15:44:52 +0000 (16:44 +0100)]
Remove remaining XEmacs compat code from erc-log.el

* lisp/erc/erc-log.el (erc-save-buffer-in-logs): Remove XEmacs
compat code.

4 years agoDon't set XEmacs only properties start-open and end-open
Stefan Kangas [Fri, 20 Nov 2020 15:43:57 +0000 (16:43 +0100)]
Don't set XEmacs only properties start-open and end-open

* lisp/epa.el (epa-sign-region, epa-encrypt-region):
* lisp/erc/erc.el (erc-display-prompt):
* lisp/gnus/message.el (message-forward-make-body-mime):
* lisp/net/eudc-bob.el (eudc-bob-display-jpeg)
(eudc-bob-display-audio, eudc-bob-display-generic-binary):
* lisp/url/url-http.el
(url-http-chunked-encoding-after-change-function): Don't set XEmacs
only properties start-open and end-open.

4 years agoRemove XEmacs compat code from idlw-shell.el
Stefan Kangas [Fri, 20 Nov 2020 15:22:35 +0000 (16:22 +0100)]
Remove XEmacs compat code from idlw-shell.el

* lisp/progmodes/idlw-shell.el:
(idlwave-shell-use-toolbar): Doc fix.
(idlwave-default-mouse-track-event-is-with-button): Declare obsolete.
(idlwave-shell-update-bp-overlays): Remove XEmacs compat code.

4 years agoRemove some XEmacs compat code from ediff-wind.el
Stefan Kangas [Fri, 20 Nov 2020 15:19:14 +0000 (16:19 +0100)]
Remove some XEmacs compat code from ediff-wind.el

* lisp/vc/ediff-wind.el (ediff-window)
(ediff-compute-toolbar-width): Remove some XEmacs compat code.

4 years agoRemove Emacs 20 compat code from org.el
Stefan Kangas [Fri, 20 Nov 2020 14:17:22 +0000 (15:17 +0100)]
Remove Emacs 20 compat code from org.el

* lisp/org/org.el (org-org-menu, org-create-customize-menu):
Remove Emacs 20 compat code.

4 years agoRemove Emacs 20 compat code from idlwave.el
Stefan Kangas [Fri, 20 Nov 2020 14:13:08 +0000 (15:13 +0100)]
Remove Emacs 20 compat code from idlwave.el

* lisp/progmodes/idlwave.el (idlwave-indent-line)
(idlwave-toggle-comment-region, idlwave-reset-sintern)
(idlwave-unit-name, idlwave-mode-menu-def)
(idlwave-create-customize-menu): Remove Emacs 20 compat code.

4 years agoProperly mark obsolete semantic functions as such
Stefan Kangas [Fri, 20 Nov 2020 13:57:22 +0000 (14:57 +0100)]
Properly mark obsolete semantic functions as such

* lisp/cedet/semantic/ia.el (semantic-ia-get-completions)
(semantic-ia-get-completions-deprecated): Make obsolete.

4 years agoMark compat alias in cus-face.el obsolete
Stefan Kangas [Fri, 20 Nov 2020 13:56:49 +0000 (14:56 +0100)]
Mark compat alias in cus-face.el obsolete

* lisp/cus-face.el (custom-facep): Mark compat alias obsolete.
* lisp/cus-dep.el (custom-make-dependencies):
* lisp/cus-edit.el (customize-changed-options)
(custom-unsaved-options, customize-saved, customize-apropos)
(custom-save-faces): Adjust callers.

4 years agoFix compilation on MS-Windows with librsvg > 2.46.0
Eli Zaretskii [Fri, 20 Nov 2020 15:00:36 +0000 (17:00 +0200)]
Fix compilation on MS-Windows with librsvg > 2.46.0

* src/image.c (rsvg_handle_get_dimensions, init_svg_functions):
Make 'rsvg_handle_get_dimensions' available and defined for all
versions of librsvg.  (Bug#44655)

4 years agoHide obsolete options in most customize commands
Stefan Kangas [Fri, 20 Nov 2020 13:33:25 +0000 (14:33 +0100)]
Hide obsolete options in most customize commands

* lisp/cus-edit.el (custom--filter-obsolete-variables): New defun.
* lisp/cus-edit.el (customize-changed-options)
(customize-apropos, custom-group-value-create): Hide obsolete user
options.  (Bug#44598)
* test/lisp/cus-edit-tests.el: New file.

4 years agoRevert unintended part of last change to jsonrpc-request
João Tãvora [Fri, 20 Nov 2020 10:02:52 +0000 (10:02 +0000)]
Revert unintended part of last change to jsonrpc-request

While playing around with the timing in this function, I left
this change that could freeze the function on some platforms.

* lisp/jsonrpc.el (jsonrpc-request): Use accept-process-output.
(Version): Bump to 1.0.14

4 years agoMove semantic/tag obsolete variables to avoid a warning
Lars Ingebrigtsen [Fri, 20 Nov 2020 02:33:38 +0000 (03:33 +0100)]
Move semantic/tag obsolete variables to avoid a warning

* lisp/cedet/semantic/tag.el (semantic-token-version): Move to
avoid a compilation warning.

4 years agoFix default timeout handling in jsonrpc-request
João Távora [Fri, 20 Nov 2020 01:18:16 +0000 (01:18 +0000)]
Fix default timeout handling in jsonrpc-request

* lisp/jsonrpc.el (jsonrpc-request): Use default timeout if not passed.
(Version): Bump to 1.0.13

4 years agoAvoid a compilation warning about an ambiguous else
Lars Ingebrigtsen [Thu, 19 Nov 2020 23:19:18 +0000 (00:19 +0100)]
Avoid a compilation warning about an ambiguous else

* src/data.c (set_internal): Avoid compilation warning.

data.c:1443:9: error: suggest explicit braces to avoid ambiguous ‘else’
 1443 |      if (idx > 0 && bindflag == SET_INTERNAL_SET
      |         ^

4 years ago* src/data.c (set_internal): Fix bug#44733
Stefan Monnier [Thu, 19 Nov 2020 22:13:04 +0000 (17:13 -0500)]
* src/data.c (set_internal): Fix bug#44733

Set the default value when `set` encounters a PER_BUFFER variable
which has been let-bound globally, to match the behavior seen with
`make-variable-buffer-local`.

* test/src/data-tests.el (binding-test--let-buffer-local):
Add corresponding test.
(data-tests--set-default-per-buffer): Add tentative test for the
performance problem encountered in bug#41029.

4 years agoRemove some XEmacs compat code from filesets.el
Stefan Kangas [Thu, 19 Nov 2020 19:58:26 +0000 (20:58 +0100)]
Remove some XEmacs compat code from filesets.el

* lisp/filesets.el (filesets-init): Remove some XEmacs compat code.
(filesets-error): Declare obsolete.
(filesets-directory-files, filesets-get-selection)
(filesets-spawn-external-viewer, filesets-get-filelist)
(filesets-open, filesets-close, filesets-get-menu-epilog)
(filesets-ingroup-collect-files, filesets-build-ingroup-submenu)
(filesets-update-pre010505): Adjust callers.

4 years agoRemove some compat code from ffap.el
Stefan Kangas [Thu, 19 Nov 2020 16:46:16 +0000 (17:46 +0100)]
Remove some compat code from ffap.el

* lisp/ffap.el (ffap-mouse-event, ffap-event-buffer): Make obsolete.
(ffap-menu-ask, ffap-at-mouse): Adjust callers.

4 years agoDeclare some compat aliases obsolete
Stefan Kangas [Thu, 19 Nov 2020 16:42:14 +0000 (17:42 +0100)]
Declare some compat aliases obsolete

* lisp/cedet/semantic/tag.el (semantic-token-version)
(semantic-token-incompatible-version):
* lisp/emulation/edt.el (edt-bind-standard-key): Make compat
aliases obsolete.

4 years agoRemove some compat code from url.el
Stefan Kangas [Thu, 19 Nov 2020 16:41:18 +0000 (17:41 +0100)]
Remove some compat code from url.el

* lisp/url/url.el (url-warn): Make into obsolete alias for
display-warning.
* lisp/url/url-auth.el (url-register-auth-scheme):
* lisp/url/url-news.el (url-news-open-host):
* lisp/url/url-proxy.el (url-find-proxy-for-url): Adjust callers.