[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/pgtk bfbcb11 026/100: implement set-tool-bar-position and set-st
From: |
Yuuki Harano |
Subject: |
feature/pgtk bfbcb11 026/100: implement set-tool-bar-position and set-sticky |
Date: |
Tue, 24 Nov 2020 08:02:30 -0500 (EST) |
branch: feature/pgtk
commit bfbcb112484c3521cd9238e1c84aa961c2c89c2f
Author: Yuuki Harano <masm+github@masm11.me>
Commit: Jeff Walsh <fejfighter@gmail.com>
implement set-tool-bar-position and set-sticky
* ../src/pgtkfns.c (pgtk_set_tool_bar_position)
(pgtk_frame_parm_handlers):
tool-bar-position 実装。
---
src/pgtkfns.c | 38 +++++++++++++++++++++++++++++++++-----
1 file changed, 33 insertions(+), 5 deletions(-)
diff --git a/src/pgtkfns.c b/src/pgtkfns.c
index 0418182..f7edc07 100644
--- a/src/pgtkfns.c
+++ b/src/pgtkfns.c
@@ -715,6 +715,34 @@ x_set_override_redirect (struct frame *f, Lisp_Object
new_value, Lisp_Object old
}
}
+static void
+pgtk_set_sticky (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)
+{
+ if (!NILP (new_value))
+ gtk_window_stick (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)));
+ else
+ gtk_window_unstick (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)));
+}
+
+static void
+pgtk_set_tool_bar_position (struct frame *f,
+ Lisp_Object new_value,
+ Lisp_Object old_value)
+{
+ Lisp_Object choice = list4 (Qleft, Qright, Qtop, Qbottom);
+
+ if (!NILP (Fmemq (new_value, choice)))
+ {
+ if (!EQ (new_value, old_value))
+ {
+ xg_change_toolbar_position (f, new_value);
+ fset_tool_bar_position (f, new_value);
+ }
+ }
+ else
+ wrong_choice (choice, new_value);
+}
+
/* Note: see frame.c for template, also where generic functions are impl */
frame_parm_handler pgtk_frame_parm_handlers[] =
{
@@ -743,18 +771,18 @@ frame_parm_handler pgtk_frame_parm_handlers[] =
gui_set_horizontal_scroll_bars, /* generic OK */
gui_set_visibility, /* generic OK */
x_set_tool_bar_lines,
- 0, /* x_set_scroll_bar_foreground, will ignore (not possible on NS) */
- 0, /* x_set_scroll_bar_background, will ignore (not possible on NS) */
+ 0, /* x_set_scroll_bar_foreground, will ignore */
+ 0, /* x_set_scroll_bar_background, will ignore */
gui_set_screen_gamma, /* generic OK */
gui_set_line_spacing, /* generic OK, sets f->extra_line_spacing to int */
gui_set_left_fringe, /* generic OK */
gui_set_right_fringe, /* generic OK */
- 0, /* x_set_wait_for_wm, will ignore */
+ 0, /* x_set_wait_for_wm */
gui_set_fullscreen, /* generic OK */
gui_set_font_backend, /* generic OK */
gui_set_alpha,
- 0, /* x_set_sticky */
- 0, /* x_set_tool_bar_position */
+ pgtk_set_sticky,
+ pgtk_set_tool_bar_position,
0, /* x_set_inhibit_double_buffering */
x_set_undecorated,
0, /* x_set_parent_frame, */
- feature/pgtk 9752896 042/100: Bring pgtk more inline with X11-cairo builds, (continued)
- feature/pgtk 9752896 042/100: Bring pgtk more inline with X11-cairo builds, Yuuki Harano, 2020/11/24
- feature/pgtk 164800d 013/100: Add Preferred geometry settings, Yuuki Harano, 2020/11/24
- feature/pgtk 383ced7 071/100: Fix migrating Child frames, Yuuki Harano, 2020/11/24
- feature/pgtk 3b161dd 066/100: * src/pgtkselect.h: Change coding style, Yuuki Harano, 2020/11/24
- feature/pgtk 89cbe37 070/100: * src/keyboard.c (make_lispy_event): Fix coding style, Yuuki Harano, 2020/11/24
- feature/pgtk f6d8c59 001/100: Introduce Pure GTK3 port, Yuuki Harano, 2020/11/24
- feature/pgtk a9c8a56 006/100: Fix xdg-open handling, Yuuki Harano, 2020/11/24
- feature/pgtk ed1f7d1 008/100: Simplify compilaiton condtion, Yuuki Harano, 2020/11/24
- feature/pgtk cdc04b4 010/100: Implement menubar for pgtk emacs, Yuuki Harano, 2020/11/24
- feature/pgtk 85441c9 016/100: Add Stipple support for PGTK, Yuuki Harano, 2020/11/24
- feature/pgtk bfbcb11 026/100: implement set-tool-bar-position and set-sticky,
Yuuki Harano <=
- feature/pgtk af5b725 061/100: * src/pgtkmenu.c: change coding style, Yuuki Harano, 2020/11/24
- feature/pgtk e649275 058/100: * src/pgtkterm.c: change coding style, Yuuki Harano, 2020/11/24
- feature/pgtk de7b0da 049/100: use pgtk_menu_set_in_use., Yuuki Harano, 2020/11/24
- feature/pgtk af1e279 073/100: Restore support for terminal only emacs in PGTK (add --with-pgtk), Yuuki Harano, 2020/11/24
- feature/pgtk 8669feb 054/100: Make icons and titles work like on X, Yuuki Harano, 2020/11/24
- feature/pgtk 20dbd4e 069/100: Change coding style, Yuuki Harano, 2020/11/24
- feature/pgtk 9e56fa9 034/100: Support focus on click event, Yuuki Harano, 2020/11/24
- feature/pgtk 385e85c 038/100: End Resize flickering by copying surface rather than just clearing, Yuuki Harano, 2020/11/24
- feature/pgtk cbd28cd 046/100: improve code readability., Yuuki Harano, 2020/11/24
- feature/pgtk ef67659 045/100: Set screen/display dpi res to make broadway work as expected, Yuuki Harano, 2020/11/24