[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/android c8aca918f79 1/2: Synchronize tool bar position code with
From: |
Po Lu |
Subject: |
feature/android c8aca918f79 1/2: Synchronize tool bar position code with X |
Date: |
Mon, 19 Jun 2023 22:17:58 -0400 (EDT) |
branch: feature/android
commit c8aca918f798e8131f5075b41d0c957e77721e31
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Synchronize tool bar position code with X
* src/androidfns.c (android_set_tool_bar_position): New
function.
(android_frame_parm_handlers): Add new frame param handler.
---
src/androidfns.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/androidfns.c b/src/androidfns.c
index cc48de1a359..c76e2c0075d 100644
--- a/src/androidfns.c
+++ b/src/androidfns.c
@@ -249,6 +249,22 @@ android_set_tool_bar_lines (struct frame *f, Lisp_Object
value,
android_change_tool_bar_height (f, nlines * FRAME_LINE_HEIGHT (f));
}
+static void
+android_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, Qtop))
+ error ("The only supported tool bar position is top");
+ }
+ else
+ wrong_choice (choice, new_value);
+}
+
void
android_change_tool_bar_height (struct frame *f, int height)
{
@@ -2931,7 +2947,7 @@ frame_parm_handler android_frame_parm_handlers[] =
gui_set_visibility,
android_set_tab_bar_lines,
android_set_tool_bar_lines,
- NULL,
+ android_set_tool_bar_position,
NULL,
gui_set_screen_gamma,
gui_set_line_spacing,