Compare commits
15 Commits
eekboard-1
...
eekboard-1
| Author | SHA1 | Date | |
|---|---|---|---|
| 1774a2c23e | |||
| 668b974dd7 | |||
| 4427f81dd9 | |||
| 9490428535 | |||
| 8d70eedc5f | |||
| 74550d2424 | |||
| 148d8e7524 | |||
| aca9a4dcb6 | |||
| 953c35bdac | |||
| 596b33f149 | |||
| ef3ea618d2 | |||
| 362b210a31 | |||
| 15f7b0ecff | |||
| f72e9f5293 | |||
| 0d93f31eea |
@ -9,6 +9,7 @@ include/eek-0.90/eek/eek-section.h
|
||||
include/eek-0.90/eek/eek-serializable.h
|
||||
include/eek-0.90/eek/eek-symbol.h
|
||||
include/eek-0.90/eek/eek-symbol-matrix.h
|
||||
include/eek-0.90/eek/eek-text.h
|
||||
include/eek-0.90/eek/eek-theme.h
|
||||
include/eek-0.90/eek/eek-types.h
|
||||
include/eek-0.90/eek/eek-xml.h
|
||||
|
||||
@ -900,7 +900,7 @@
|
||||
<return-type type="EekKeysym*"/>
|
||||
<parameters>
|
||||
<parameter name="xkeysym" type="guint"/>
|
||||
<parameter name="modifier" type="EekModifierType"/>
|
||||
<parameter name="modifier_mask" type="EekModifierType"/>
|
||||
</parameters>
|
||||
</constructor>
|
||||
</object>
|
||||
@ -1061,6 +1061,18 @@
|
||||
<implements>
|
||||
<interface name="EekSerializable"/>
|
||||
</implements>
|
||||
<method name="category_from_name" symbol="eek_symbol_category_from_name">
|
||||
<return-type type="EekSymbolCategory"/>
|
||||
<parameters>
|
||||
<parameter name="name" type="gchar*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="category_get_name" symbol="eek_symbol_category_get_name">
|
||||
<return-type type="gchar*"/>
|
||||
<parameters>
|
||||
<parameter name="category" type="EekSymbolCategory"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="get_category" symbol="eek_symbol_get_category">
|
||||
<return-type type="EekSymbolCategory"/>
|
||||
<parameters>
|
||||
@ -1082,7 +1094,7 @@
|
||||
<method name="get_modifier_mask" symbol="eek_symbol_get_modifier_mask">
|
||||
<return-type type="EekModifierType"/>
|
||||
<parameters>
|
||||
<parameter name="keysym" type="EekSymbol*"/>
|
||||
<parameter name="symbol" type="EekSymbol*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="get_name" symbol="eek_symbol_get_name">
|
||||
@ -1127,7 +1139,7 @@
|
||||
<method name="set_modifier_mask" symbol="eek_symbol_set_modifier_mask">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="keysym" type="EekSymbol*"/>
|
||||
<parameter name="symbol" type="EekSymbol*"/>
|
||||
<parameter name="mask" type="EekModifierType"/>
|
||||
</parameters>
|
||||
</method>
|
||||
@ -1144,6 +1156,24 @@
|
||||
<property name="modifier-mask" type="EekModifierType" readable="1" writable="1" construct="1" construct-only="0"/>
|
||||
<property name="name" type="char*" readable="1" writable="1" construct="1" construct-only="0"/>
|
||||
</object>
|
||||
<object name="EekText" parent="EekSymbol" type-name="EekText" get-type="eek_text_get_type">
|
||||
<implements>
|
||||
<interface name="EekSerializable"/>
|
||||
</implements>
|
||||
<method name="get_text" symbol="eek_text_get_text">
|
||||
<return-type type="gchar*"/>
|
||||
<parameters>
|
||||
<parameter name="text" type="EekText*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<constructor name="new" symbol="eek_text_new">
|
||||
<return-type type="EekText*"/>
|
||||
<parameters>
|
||||
<parameter name="text" type="gchar*"/>
|
||||
</parameters>
|
||||
</constructor>
|
||||
<property name="text" type="char*" readable="1" writable="1" construct="0" construct-only="1"/>
|
||||
</object>
|
||||
<object name="EekTheme" parent="GObject" type-name="EekTheme" get-type="eek_theme_get_type">
|
||||
<method name="load_stylesheet" symbol="eek_theme_load_stylesheet">
|
||||
<return-type type="gboolean"/>
|
||||
@ -1235,6 +1265,7 @@
|
||||
<constant name="EEK_SERIALIZABLE_H" type="int" value="1"/>
|
||||
<constant name="EEK_SYMBOL_H" type="int" value="1"/>
|
||||
<constant name="EEK_SYMBOL_MATRIX_H" type="int" value="1"/>
|
||||
<constant name="EEK_TEXT_H" type="int" value="1"/>
|
||||
<constant name="EEK_TYPES_H" type="int" value="1"/>
|
||||
<constant name="EEK_XML_H" type="int" value="1"/>
|
||||
<constant name="EEK_XML_LAYOUT_H" type="int" value="1"/>
|
||||
|
||||
@ -1 +1,24 @@
|
||||
Eek cheader_filename="eek/eek.h"
|
||||
|
||||
EekBounds is_value_type="1"
|
||||
eek_bounds_copy hidden="1"
|
||||
eek_bounds_free hidden="1"
|
||||
|
||||
EekPoint is_value_type="1"
|
||||
eek_point_copy hidden="1"
|
||||
eek_point_free hidden="1"
|
||||
|
||||
EekOutline is_value_type="1"
|
||||
eek_outline_copy hidden="1"
|
||||
eek_outline_free hidden="1"
|
||||
|
||||
EekColor is_value_type="1"
|
||||
eek_color_copy hidden="1"
|
||||
eek_color_free hidden="1"
|
||||
eek_color_new hidden="1"
|
||||
|
||||
eek_element_get_bounds.bounds is_out="1"
|
||||
eek_element_get_absolute_position.x is_out="1"
|
||||
eek_element_get_absolute_position.y is_out="1"
|
||||
eek_element_get_symbol_index.group is_out="1"
|
||||
eek_element_get_symbol_index.level is_out="1"
|
||||
|
||||
@ -20,7 +20,7 @@ AC_PREREQ(2.63)
|
||||
dnl AC_CONFIG_SRCDIR([configure.ac])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
AC_INIT([eekboard], [1.0.3], [ueno@unixuser.org])
|
||||
AC_INIT([eekboard], [1.0.5], [ueno@unixuser.org])
|
||||
|
||||
dnl Init automake
|
||||
AM_INIT_AUTOMAKE
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -547,8 +547,8 @@
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol name="cycle-keyboard" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" label="☺" category="keyname">preferences</symbol>
|
||||
<symbol name="cycle-keyboard" icon="input-keyboard-symbolic" label="⌨" category="keyname">cycle-keyboard</symbol>
|
||||
<symbol name="preferences" icon="preferences-system-symbolic" label="☺" category="keyname">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0"?>
|
||||
<schemalist>
|
||||
<schema id="org.fedorahosted.eekboard" path="/org/fedorahosted/eekboard/">
|
||||
<key name="keyboard" type="s">
|
||||
<default>'us'</default>
|
||||
<key name="keyboards" type="as">
|
||||
<default>['us']</default>
|
||||
<summary>Keyboard types</summary>
|
||||
<description>keyboard types (comma separated).</description>
|
||||
<description>keyboard types.</description>
|
||||
</key>
|
||||
<key name="ui-toolkit" type="s">
|
||||
<default>'gtk'</default>
|
||||
@ -46,6 +46,16 @@
|
||||
<summary>Switch to fullscreen mode when startup</summary>
|
||||
<description>If true, switch to fullscreen mode when startup.</description>
|
||||
</key>
|
||||
<key name="size-constraint-landscape" type="(dd)">
|
||||
<default>(1.0, 0.3)</default>
|
||||
<summary>Constraint of the maximum window size on landscape screen</summary>
|
||||
<description>Constraint of maximum window size on landscape screen</description>
|
||||
</key>
|
||||
<key name="size-constraint-portrait" type="(dd)">
|
||||
<default>(1.0, 0.5)</default>
|
||||
<summary>Constraint of the maximum window size on portrait screen</summary>
|
||||
<description>Constraint of maximum window size on portrait screen</description>
|
||||
</key>
|
||||
<key name="theme" type="s">
|
||||
<default>'default'</default>
|
||||
<summary>Theme</summary>
|
||||
|
||||
@ -141,11 +141,11 @@ eek_gtk_keyboard_real_draw (GtkWidget *self,
|
||||
style = gtk_widget_get_style (self);
|
||||
state = gtk_widget_get_state (self);
|
||||
|
||||
color = color_from_gdk_color (&style->fg[state]);
|
||||
color = color_from_gdk_color (&style->text[state]);
|
||||
eek_renderer_set_default_foreground_color (priv->renderer, color);
|
||||
eek_color_free (color);
|
||||
|
||||
color = color_from_gdk_color (&style->bg[state]);
|
||||
color = color_from_gdk_color (&style->base[state]);
|
||||
eek_renderer_set_default_background_color (priv->renderer, color);
|
||||
eek_color_free (color);
|
||||
}
|
||||
@ -229,12 +229,17 @@ eek_gtk_keyboard_real_button_release_event (GtkWidget *self,
|
||||
GdkEventButton *event)
|
||||
{
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
||||
GList *head;
|
||||
GList *head = eek_keyboard_get_pressed_keys (priv->keyboard);
|
||||
|
||||
head = eek_keyboard_get_pressed_keys (priv->keyboard);
|
||||
for (; head; head = g_list_next (head)) {
|
||||
/* Make a copy of HEAD before sending "released" signal on
|
||||
elements, so that the default handler of
|
||||
EekKeyboard::key-released signal can remove elements from its
|
||||
internal copy */
|
||||
head = g_list_copy (head);
|
||||
for (; head; head = g_list_next (head))
|
||||
g_signal_emit_by_name (head->data, "released", priv->keyboard);
|
||||
}
|
||||
g_list_free (head);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -251,12 +256,20 @@ eek_gtk_keyboard_real_motion_notify_event (GtkWidget *self,
|
||||
if (key) {
|
||||
GList *head = eek_keyboard_get_pressed_keys (priv->keyboard);
|
||||
gboolean found = FALSE;
|
||||
|
||||
/* Make a copy of HEAD before sending "cancelled" signal on
|
||||
elements, so that the default handler of
|
||||
EekKeyboard::key-cancelled signal can remove elements from its
|
||||
internal copy */
|
||||
head = g_list_copy (head);
|
||||
for (; head; head = g_list_next (head)) {
|
||||
if (head->data == key)
|
||||
found = TRUE;
|
||||
else
|
||||
g_signal_emit_by_name (head->data, "cancelled", priv->keyboard);
|
||||
}
|
||||
g_list_free (head);
|
||||
|
||||
if (!found)
|
||||
g_signal_emit_by_name (key, "pressed", priv->keyboard);
|
||||
}
|
||||
@ -269,12 +282,16 @@ eek_gtk_keyboard_real_unmap (GtkWidget *self)
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
||||
|
||||
if (priv->keyboard) {
|
||||
GList *head;
|
||||
GList *head = eek_keyboard_get_pressed_keys (priv->keyboard);
|
||||
|
||||
head = eek_keyboard_get_pressed_keys (priv->keyboard);
|
||||
for (; head; head = g_list_next (head)) {
|
||||
/* Make a copy of HEAD before sending "released" signal on
|
||||
elements, so that the default handler of
|
||||
EekKeyboard::key-released signal can remove elements from its
|
||||
internal copy */
|
||||
head = g_list_copy (head);
|
||||
for (; head; head = g_list_next (head))
|
||||
g_signal_emit_by_name (head->data, "released", priv->keyboard);
|
||||
}
|
||||
g_list_free (head);
|
||||
}
|
||||
|
||||
GTK_WIDGET_CLASS (eek_gtk_keyboard_parent_class)->unmap (self);
|
||||
|
||||
@ -331,16 +331,12 @@ eek_keyboard_real_key_cancelled (EekKeyboard *self,
|
||||
EekKeyboardPrivate *priv = EEK_KEYBOARD_GET_PRIVATE(self);
|
||||
GList *head;
|
||||
|
||||
for (head = priv->pressed_keys; head; ) {
|
||||
EekKey *pressed_key = head->data;
|
||||
if (pressed_key == key) {
|
||||
GList *next = g_list_next (head);
|
||||
priv->pressed_keys =
|
||||
g_list_remove_link (priv->pressed_keys, head);
|
||||
for (head = priv->pressed_keys; head; head = g_list_next (head)) {
|
||||
if (head->data == key) {
|
||||
priv->pressed_keys = g_list_remove_link (priv->pressed_keys, head);
|
||||
g_list_free1 (head);
|
||||
head = next;
|
||||
} else
|
||||
head = g_list_next (head);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -249,8 +249,8 @@ render_key_outline (EekRenderer *renderer,
|
||||
/* need to rescale so that the border fit inside the clipping
|
||||
region */
|
||||
eek_element_get_bounds (EEK_ELEMENT(key), &bounds);
|
||||
scale = MIN((bounds.width - border_width) / bounds.width,
|
||||
(bounds.height - border_width) / bounds.height);
|
||||
scale = MIN((bounds.width - border_width * 2) / bounds.width,
|
||||
(bounds.height - border_width * 2) / bounds.height);
|
||||
|
||||
outline = eek_keyboard_get_outline (priv->keyboard, oref);
|
||||
outline = eek_outline_copy (outline);
|
||||
@ -260,8 +260,8 @@ render_key_outline (EekRenderer *renderer,
|
||||
}
|
||||
|
||||
cairo_translate (cr,
|
||||
border_width / 2 * priv->scale,
|
||||
border_width / 2 * priv->scale);
|
||||
border_width * priv->scale * scale,
|
||||
border_width * priv->scale * scale);
|
||||
|
||||
if (gradient_type != EEK_GRADIENT_NONE) {
|
||||
cairo_pattern_t *pat;
|
||||
@ -608,6 +608,7 @@ eek_renderer_real_render_key_label (EekRenderer *self,
|
||||
EekBounds bounds;
|
||||
const TextProperty *prop;
|
||||
PangoFontDescription *font;
|
||||
PangoLayoutLine *line;
|
||||
gdouble scale;
|
||||
|
||||
symbol = eek_key_get_symbol_with_fallback (key, 0, 0);
|
||||
@ -654,6 +655,9 @@ eek_renderer_real_render_key_label (EekRenderer *self,
|
||||
pango_font_description_free (font);
|
||||
|
||||
pango_layout_set_text (layout, label, -1);
|
||||
line = pango_layout_get_line (layout, 0);
|
||||
if (line->resolved_dir == PANGO_DIRECTION_RTL)
|
||||
pango_layout_set_alignment (layout, PANGO_ALIGN_RIGHT);
|
||||
pango_layout_set_width (layout,
|
||||
PANGO_SCALE * bounds.width * priv->scale * scale);
|
||||
if (prop->ellipses)
|
||||
|
||||
@ -18,6 +18,11 @@
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* SECTION:eek-text
|
||||
* @short_description: an #EekText represents a text symbol
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
@ -166,6 +171,12 @@ eek_text_new (const gchar *text)
|
||||
NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_text_get_text:
|
||||
* @text: an #EekText
|
||||
*
|
||||
* Get a text value associated with @text
|
||||
*/
|
||||
const gchar *
|
||||
eek_text_get_text (EekText *text)
|
||||
{
|
||||
|
||||
@ -39,6 +39,12 @@ G_BEGIN_DECLS
|
||||
typedef struct _EekTextClass EekTextClass;
|
||||
typedef struct _EekTextPrivate EekTextPrivate;
|
||||
|
||||
/**
|
||||
* EekText:
|
||||
*
|
||||
* The #EekText structure contains only private data and should only
|
||||
* be accessed using the provided API.
|
||||
*/
|
||||
struct _EekText {
|
||||
/*< private >*/
|
||||
EekSymbol parent;
|
||||
|
||||
@ -360,8 +360,9 @@ eekboard_client_destroy_context (EekboardClient *client,
|
||||
g_return_if_fail (EEKBOARD_IS_CLIENT(client));
|
||||
g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
|
||||
|
||||
send_destroy_context (client, context, cancellable);
|
||||
|
||||
priv = EEKBOARD_CLIENT_GET_PRIVATE(client);
|
||||
object_path = g_dbus_proxy_get_object_path (G_DBUS_PROXY(context));
|
||||
g_hash_table_remove (priv->context_hash, object_path);
|
||||
|
||||
send_destroy_context (client, context, cancellable);
|
||||
}
|
||||
|
||||
@ -41,6 +41,8 @@ static gchar *opt_address = NULL;
|
||||
static gboolean opt_focus = FALSE;
|
||||
static gboolean opt_keystroke = FALSE;
|
||||
|
||||
static gchar *opt_keyboards = NULL;
|
||||
|
||||
static gboolean opt_fullscreen = FALSE;
|
||||
|
||||
static const GOptionEntry options[] = {
|
||||
@ -58,6 +60,8 @@ static const GOptionEntry options[] = {
|
||||
{"listen-keystroke", 's', 0, G_OPTION_ARG_NONE, &opt_keystroke,
|
||||
N_("Listen keystroke events with AT-SPI")},
|
||||
#endif /* HAVE_ATSPI */
|
||||
{"keyboards", 'k', 0, G_OPTION_ARG_STRING, &opt_keyboards,
|
||||
N_("Specify keyboards (comma separated)")},
|
||||
{"fullscreen", 'F', 0, G_OPTION_ARG_NONE, &opt_fullscreen,
|
||||
N_("Create window in fullscreen mode")},
|
||||
{NULL}
|
||||
@ -103,17 +107,19 @@ enum FocusListenerType {
|
||||
};
|
||||
|
||||
static gboolean
|
||||
set_keyboard (Client *client,
|
||||
const gchar *keyboard)
|
||||
set_keyboards (Client *client,
|
||||
const gchar * const *keyboards)
|
||||
{
|
||||
if (g_strcmp0 (keyboard, "system") == 0) {
|
||||
if (g_strv_length ((gchar **)keyboards) == 0) {
|
||||
if (!client_enable_xkl (client)) {
|
||||
g_printerr ("Can't register xklavier event listeners\n");
|
||||
return FALSE;
|
||||
}
|
||||
} else {
|
||||
if (!client_set_keyboard (client, keyboard)) {
|
||||
g_printerr ("Can't set keyboard \"%s\"\n", keyboard);
|
||||
if (!client_set_keyboards (client, keyboards)) {
|
||||
gchar *str = g_strjoinv (", ", (gchar **)keyboards);
|
||||
g_printerr ("Can't set keyboards \"%s\"\n", str);
|
||||
g_free (str);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@ -133,7 +139,7 @@ main (int argc, char **argv)
|
||||
GMainLoop *loop = NULL;
|
||||
gint focus;
|
||||
GSettings *settings = NULL;
|
||||
gchar *keyboard;
|
||||
gchar **keyboards;
|
||||
gint retval = 0;
|
||||
|
||||
if (!gtk_init_check (&argc, &argv)) {
|
||||
@ -312,13 +318,16 @@ main (int argc, char **argv)
|
||||
G_CALLBACK(on_destroyed), loop);
|
||||
g_object_unref (eekboard);
|
||||
|
||||
keyboard = g_settings_get_string (settings, "keyboard");
|
||||
if (!set_keyboard (client, keyboard)) {
|
||||
g_free (keyboard);
|
||||
if (opt_keyboards != NULL)
|
||||
keyboards = g_strsplit (opt_keyboards, ",", -1);
|
||||
else
|
||||
keyboards = g_settings_get_strv (settings, "keyboards");
|
||||
if (!set_keyboards (client, (const gchar * const *)keyboards)) {
|
||||
g_strfreev (keyboards);
|
||||
retval = 1;
|
||||
goto out;
|
||||
}
|
||||
g_free (keyboard);
|
||||
g_strfreev (keyboards);
|
||||
|
||||
g_main_loop_run (loop);
|
||||
|
||||
|
||||
111
src/client.c
111
src/client.c
@ -127,12 +127,13 @@ static void focus_listener_cb (const AtspiEvent *event,
|
||||
static gboolean keystroke_listener_cb (const AtspiDeviceEvent *stroke,
|
||||
void *user_data);
|
||||
#endif /* HAVE_ATSPI */
|
||||
static gboolean set_keyboard (Client *client,
|
||||
const gchar *keyboard);
|
||||
static gboolean set_keyboard_from_xkl (Client *client);
|
||||
static gboolean set_keyboards (Client *client,
|
||||
const gchar * const *keyboard);
|
||||
static gboolean set_keyboards_from_xkl
|
||||
(Client *client);
|
||||
#ifdef HAVE_XTEST
|
||||
static void update_modifier_keycodes
|
||||
(Client *client);
|
||||
(Client *client);
|
||||
#endif /* HAVE_XTEST */
|
||||
|
||||
static void
|
||||
@ -297,11 +298,11 @@ client_init (Client *client)
|
||||
}
|
||||
|
||||
gboolean
|
||||
client_set_keyboard (Client *client,
|
||||
const gchar *keyboard)
|
||||
client_set_keyboards (Client *client,
|
||||
const gchar * const *keyboards)
|
||||
{
|
||||
gboolean retval;
|
||||
retval = set_keyboard (client, keyboard);
|
||||
retval = set_keyboards (client, keyboards);
|
||||
if (retval && IS_KEYBOARD_VISIBLE (client))
|
||||
eekboard_context_show_keyboard (client->context, NULL);
|
||||
return retval;
|
||||
@ -343,7 +344,7 @@ client_enable_xkl (Client *client)
|
||||
|
||||
xkl_engine_start_listen (client->xkl_engine, XKLL_TRACK_KEYBOARD_STATE);
|
||||
|
||||
retval = set_keyboard_from_xkl (client);
|
||||
retval = set_keyboards_from_xkl (client);
|
||||
if (IS_KEYBOARD_VISIBLE (client))
|
||||
eekboard_context_show_keyboard (client->context, NULL);
|
||||
|
||||
@ -697,7 +698,7 @@ on_xkl_config_changed (XklEngine *xklengine,
|
||||
Client *client = user_data;
|
||||
gboolean retval;
|
||||
|
||||
retval = set_keyboard_from_xkl (client);
|
||||
retval = set_keyboards_from_xkl (client);
|
||||
g_return_if_fail (retval);
|
||||
|
||||
#ifdef HAVE_XTEST
|
||||
@ -706,46 +707,39 @@ on_xkl_config_changed (XklEngine *xklengine,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
set_keyboard (Client *client,
|
||||
const gchar *keyboard)
|
||||
set_keyboards (Client *client,
|
||||
const gchar * const *keyboards)
|
||||
{
|
||||
GSList *keyboards = NULL;
|
||||
gchar **strv, **p;
|
||||
|
||||
g_return_val_if_fail (keyboard != NULL, FALSE);
|
||||
g_return_val_if_fail (*keyboard != '\0', FALSE);
|
||||
guint keyboard_id;
|
||||
const gchar * const *p;
|
||||
GSList *head = NULL;
|
||||
|
||||
if (client->keyboards)
|
||||
g_slist_free (client->keyboards);
|
||||
|
||||
strv = g_strsplit (keyboard, ",", -1);
|
||||
for (p = strv; *p != NULL; p++) {
|
||||
guint keyboard_id;
|
||||
|
||||
keyboard_id = eekboard_context_add_keyboard (client->context,
|
||||
*p,
|
||||
NULL);
|
||||
if (keyboard_id == 0)
|
||||
for (p = keyboards; *p != NULL; p++) {
|
||||
keyboard_id = eekboard_context_add_keyboard (client->context, *p, NULL);
|
||||
if (keyboard_id == 0) {
|
||||
g_slist_free (head);
|
||||
return FALSE;
|
||||
keyboards = g_slist_prepend (keyboards,
|
||||
GUINT_TO_POINTER(keyboard_id));
|
||||
}
|
||||
g_strfreev (strv);
|
||||
head = g_slist_prepend (head, GUINT_TO_POINTER(keyboard_id));
|
||||
}
|
||||
|
||||
/* make a cycle */
|
||||
keyboards = g_slist_reverse (keyboards);
|
||||
g_slist_last (keyboards)->next = keyboards;
|
||||
client->keyboards = keyboards;
|
||||
head = g_slist_reverse (head);
|
||||
g_slist_last (head)->next = head;
|
||||
client->keyboards = head;
|
||||
|
||||
/* select the first keyboard */
|
||||
eekboard_context_set_keyboard (client->context,
|
||||
GPOINTER_TO_UINT(keyboards->data),
|
||||
GPOINTER_TO_UINT(head->data),
|
||||
NULL);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
set_keyboard_from_xkl (Client *client)
|
||||
set_keyboards_from_xkl (Client *client)
|
||||
{
|
||||
XklConfigRec *rec;
|
||||
gchar *layout, *keyboard;
|
||||
@ -911,10 +905,6 @@ send_fake_key_event (Client *client,
|
||||
guint xkeysym;
|
||||
guint keycode, replaced_keysym = 0;
|
||||
|
||||
/* Ignore special keys and modifiers */
|
||||
if (!EEK_IS_KEYSYM(symbol) || eek_symbol_is_modifier (symbol))
|
||||
return;
|
||||
|
||||
xkeysym = eek_keysym_get_xkeysym (EEK_KEYSYM(symbol));
|
||||
g_return_if_fail (xkeysym > 0);
|
||||
|
||||
@ -941,8 +931,7 @@ send_fake_key_event (Client *client,
|
||||
send_fake_modifier_key_event (client, modifiers, is_pressed);
|
||||
XSync (GDK_DISPLAY_XDISPLAY (display), False);
|
||||
|
||||
keycode = XKeysymToKeycode (GDK_DISPLAY_XDISPLAY (display),
|
||||
xkeysym);
|
||||
keycode = XKeysymToKeycode (GDK_DISPLAY_XDISPLAY (display), xkeysym);
|
||||
g_return_if_fail (keycode > 0);
|
||||
|
||||
XTestFakeKeyEvent (GDK_DISPLAY_XDISPLAY (display),
|
||||
@ -955,6 +944,48 @@ send_fake_key_event (Client *client,
|
||||
replace_keycode (client, &keycode, &replaced_keysym);
|
||||
}
|
||||
|
||||
static void
|
||||
send_fake_key_events (Client *client,
|
||||
EekSymbol *symbol,
|
||||
guint keyboard_modifiers)
|
||||
{
|
||||
/* Ignore modifier keys */
|
||||
if (eek_symbol_is_modifier (symbol))
|
||||
return;
|
||||
|
||||
/* If symbol is a text, convert chars in it to keysym */
|
||||
if (EEK_IS_TEXT(symbol)) {
|
||||
const gchar *utf8 = eek_text_get_text (EEK_TEXT(symbol));
|
||||
glong items_written;
|
||||
gunichar *ucs4 = g_utf8_to_ucs4_fast (utf8, -1, &items_written);
|
||||
gint i;
|
||||
|
||||
for (i = 0; i < items_written; i++) {
|
||||
guint xkeysym;
|
||||
EekKeysym *keysym;
|
||||
gchar *name;
|
||||
|
||||
name = g_strdup_printf ("U%04X", ucs4[i]);
|
||||
xkeysym = XStringToKeysym (name);
|
||||
g_free (name);
|
||||
|
||||
keysym = eek_keysym_new (xkeysym);
|
||||
send_fake_key_events (client,
|
||||
EEK_SYMBOL(keysym),
|
||||
keyboard_modifiers);
|
||||
}
|
||||
g_free (ucs4);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Ignore special keys */
|
||||
if (!EEK_IS_KEYSYM(symbol))
|
||||
return;
|
||||
|
||||
send_fake_key_event (client, symbol, keyboard_modifiers, TRUE);
|
||||
send_fake_key_event (client, symbol, keyboard_modifiers, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
on_key_pressed (EekboardContext *context,
|
||||
const gchar *keyname,
|
||||
@ -978,9 +1009,7 @@ on_key_pressed (EekboardContext *context,
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
send_fake_key_event (client, symbol, modifiers, TRUE);
|
||||
send_fake_key_event (client, symbol, modifiers, FALSE);
|
||||
send_fake_key_events (client, symbol, modifiers);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@ -33,8 +33,8 @@ typedef struct _Client Client;
|
||||
|
||||
Client *client_new (GDBusConnection *connection);
|
||||
|
||||
gboolean client_set_keyboard (Client *client,
|
||||
const gchar *keyboard);
|
||||
gboolean client_set_keyboards (Client *client,
|
||||
const gchar * const *keyboard);
|
||||
|
||||
gboolean client_enable_xkl (Client *client);
|
||||
void client_disable_xkl (Client *client);
|
||||
|
||||
@ -62,6 +62,35 @@ set_rate (const GValue *value,
|
||||
return g_variant_new_uint32 (msecs);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
get_strv (GValue *value,
|
||||
GVariant *variant,
|
||||
gpointer user_data)
|
||||
{
|
||||
const gchar **strv = g_variant_get_strv (variant, NULL);
|
||||
gchar *text = g_strjoinv (", ", (gchar **)strv);
|
||||
g_free (strv);
|
||||
g_value_set_string (value, text);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static GVariant *
|
||||
set_strv (const GValue *value,
|
||||
const GVariantType *expected_type,
|
||||
gpointer user_data)
|
||||
{
|
||||
const gchar *text = g_value_get_string (value);
|
||||
gchar **strv = g_strsplit (text, ",", -1), **p;
|
||||
GVariant *variant;
|
||||
|
||||
for (p = strv; *p != NULL; p++)
|
||||
g_strstrip (*p);
|
||||
|
||||
variant = g_variant_new_strv ((const gchar * const *)strv, -1);
|
||||
g_strfreev (strv);
|
||||
return variant;
|
||||
}
|
||||
|
||||
PreferencesDialog *
|
||||
preferences_dialog_new (void)
|
||||
{
|
||||
@ -138,9 +167,10 @@ preferences_dialog_new (void)
|
||||
gtk_builder_get_object (builder, "keyboard_entry");
|
||||
dialog->keyboard_entry = GTK_WIDGET(object);
|
||||
|
||||
g_settings_bind (dialog->settings, "keyboard",
|
||||
g_settings_bind_with_mapping (dialog->settings, "keyboards",
|
||||
GTK_ENTRY(dialog->keyboard_entry), "text",
|
||||
G_SETTINGS_BIND_DEFAULT);
|
||||
G_SETTINGS_BIND_DEFAULT,
|
||||
get_strv, set_strv, NULL, NULL);
|
||||
|
||||
return dialog;
|
||||
}
|
||||
|
||||
@ -36,6 +36,8 @@
|
||||
enum {
|
||||
PROP_0,
|
||||
PROP_UI_TOOLKIT,
|
||||
PROP_SIZE_CONSTRAINT_LANDSCAPE,
|
||||
PROP_SIZE_CONSTRAINT_PORTRAIT,
|
||||
PROP_LAST
|
||||
};
|
||||
|
||||
@ -59,6 +61,8 @@ struct _ServerContextService {
|
||||
|
||||
GSettings *settings;
|
||||
UIToolkitType ui_toolkit;
|
||||
gdouble size_constraint_landscape[2];
|
||||
gdouble size_constraint_portrait[2];
|
||||
};
|
||||
|
||||
struct _ServerContextServiceClass {
|
||||
@ -69,6 +73,8 @@ G_DEFINE_TYPE (ServerContextService, server_context_service, EEKBOARD_TYPE_CONTE
|
||||
|
||||
static void update_widget (ServerContextService *context);
|
||||
static void set_geometry (ServerContextService *context);
|
||||
static void set_dock (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
|
||||
static void
|
||||
on_monitors_changed (GdkScreen *screen,
|
||||
@ -154,39 +160,27 @@ on_notify_visible (GObject *object, GParamSpec *spec, gpointer user_data)
|
||||
}
|
||||
|
||||
static void
|
||||
on_realize_set_dock (GtkWidget *widget,
|
||||
gpointer user_data)
|
||||
set_dock (GtkWidget *widget, GtkAllocation *allocation)
|
||||
{
|
||||
#ifdef HAVE_XDOCK
|
||||
GdkWindow *window = gtk_widget_get_window (widget);
|
||||
gint x, y, width, height;
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
gint depth;
|
||||
#endif /* GTK_CHECK_VERSION(3,0,0) */
|
||||
long vals[12];
|
||||
|
||||
/* set window type to dock */
|
||||
gdk_window_set_type_hint (window, GDK_WINDOW_TYPE_HINT_DOCK);
|
||||
|
||||
/* set bottom strut */
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
gdk_window_get_geometry (window, &x, &y, &width, &height);
|
||||
#else
|
||||
gdk_window_get_geometry (window, &x, &y, &width, &height, &depth);
|
||||
#endif /* GTK_CHECK_VERSION(3,0,0) */
|
||||
|
||||
vals[0] = 0;
|
||||
vals[1] = 0;
|
||||
vals[2] = 0;
|
||||
vals[3] = height;
|
||||
vals[3] = allocation->height;
|
||||
vals[4] = 0;
|
||||
vals[5] = 0;
|
||||
vals[6] = 0;
|
||||
vals[7] = 0;
|
||||
vals[8] = 0;
|
||||
vals[9] = 0;
|
||||
vals[10] = x;
|
||||
vals[11] = x + width;
|
||||
vals[10] = allocation->x;
|
||||
vals[11] = allocation->x + allocation->width;
|
||||
|
||||
XChangeProperty (GDK_WINDOW_XDISPLAY (window),
|
||||
GDK_WINDOW_XID (window),
|
||||
@ -197,6 +191,25 @@ on_realize_set_dock (GtkWidget *widget,
|
||||
#endif /* HAVE_XDOCK */
|
||||
}
|
||||
|
||||
static void
|
||||
on_realize_set_dock (GtkWidget *widget,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkAllocation allocation;
|
||||
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
set_dock (widget, &allocation);
|
||||
}
|
||||
|
||||
static void
|
||||
on_size_allocate_set_dock (GtkWidget *widget,
|
||||
GdkRectangle *allocation,
|
||||
gpointer user_data)
|
||||
{
|
||||
if (gtk_widget_get_realized (widget))
|
||||
set_dock (widget, allocation);
|
||||
}
|
||||
|
||||
static void
|
||||
on_realize_set_non_maximizable (GtkWidget *widget,
|
||||
gpointer user_data)
|
||||
@ -238,7 +251,16 @@ set_geometry (ServerContextService *context)
|
||||
context);
|
||||
|
||||
if (eekboard_context_service_get_fullscreen (EEKBOARD_CONTEXT_SERVICE(context))) {
|
||||
gint width = rect.width, height = rect.height / 2;
|
||||
gint width = rect.width;
|
||||
gint height = rect.height;
|
||||
|
||||
if (width > height) {
|
||||
width *= context->size_constraint_landscape[0];
|
||||
height *= context->size_constraint_landscape[1];
|
||||
} else {
|
||||
width *= context->size_constraint_portrait[0];
|
||||
height *= context->size_constraint_portrait[1];
|
||||
}
|
||||
|
||||
if (width * bounds.height > height * bounds.width)
|
||||
width = (height / bounds.height) * bounds.width;
|
||||
@ -258,6 +280,9 @@ set_geometry (ServerContextService *context)
|
||||
g_signal_connect_after (context->window, "realize",
|
||||
G_CALLBACK(on_realize_set_dock),
|
||||
context);
|
||||
g_signal_connect_after (context->window, "size-allocate",
|
||||
G_CALLBACK(on_size_allocate_set_dock),
|
||||
context);
|
||||
} else {
|
||||
if (context->ui_toolkit == UI_TOOLKIT_CLUTTER) {
|
||||
#if HAVE_CLUTTER_GTK
|
||||
@ -402,6 +427,7 @@ server_context_service_set_property (GObject *object,
|
||||
{
|
||||
ServerContextService *context = SERVER_CONTEXT_SERVICE(object);
|
||||
const gchar *ui_toolkit;
|
||||
GVariant *variant;
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_UI_TOOLKIT:
|
||||
@ -415,6 +441,19 @@ server_context_service_set_property (GObject *object,
|
||||
else
|
||||
g_warning ("unknown UI toolkit %s", ui_toolkit);
|
||||
break;
|
||||
case PROP_SIZE_CONSTRAINT_LANDSCAPE:
|
||||
variant = g_value_get_variant (value);
|
||||
g_variant_get (variant, "(dd)",
|
||||
&context->size_constraint_landscape[0],
|
||||
&context->size_constraint_landscape[1]);
|
||||
break;
|
||||
case PROP_SIZE_CONSTRAINT_PORTRAIT:
|
||||
variant = g_value_get_variant (value);
|
||||
g_variant_get (variant, "(dd)",
|
||||
&context->size_constraint_portrait[0],
|
||||
&context->size_constraint_portrait[1]);
|
||||
break;
|
||||
|
||||
default:
|
||||
g_object_set_property (object,
|
||||
g_param_spec_get_name (pspec),
|
||||
@ -459,6 +498,26 @@ server_context_service_class_init (ServerContextServiceClass *klass)
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_UI_TOOLKIT,
|
||||
pspec);
|
||||
|
||||
pspec = g_param_spec_variant ("size-constraint-landscape",
|
||||
"Size constraint landscape",
|
||||
"Size constraint landscape",
|
||||
G_VARIANT_TYPE("(dd)"),
|
||||
NULL,
|
||||
G_PARAM_WRITABLE);
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_SIZE_CONSTRAINT_LANDSCAPE,
|
||||
pspec);
|
||||
|
||||
pspec = g_param_spec_variant ("size-constraint-portrait",
|
||||
"Size constraint portrait",
|
||||
"Size constraint portrait",
|
||||
G_VARIANT_TYPE("(dd)"),
|
||||
NULL,
|
||||
G_PARAM_WRITABLE);
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_SIZE_CONSTRAINT_PORTRAIT,
|
||||
pspec);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -484,6 +543,20 @@ server_context_service_init (ServerContextService *context)
|
||||
g_settings_bind (context->settings, "ui-toolkit",
|
||||
context, "ui-toolkit",
|
||||
G_SETTINGS_BIND_GET);
|
||||
g_settings_bind_with_mapping (context->settings, "size-constraint-landscape",
|
||||
context, "size-constraint-landscape",
|
||||
G_SETTINGS_BIND_GET,
|
||||
(GSettingsBindGetMapping)g_value_set_variant,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
g_settings_bind_with_mapping (context->settings, "size-constraint-portrait",
|
||||
context, "size-constraint-portrait",
|
||||
G_SETTINGS_BIND_GET,
|
||||
(GSettingsBindGetMapping)g_value_set_variant,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
}
|
||||
|
||||
ServerContextService *
|
||||
|
||||
@ -93,8 +93,6 @@ main (int argc, char **argv)
|
||||
|
||||
eek_init ();
|
||||
|
||||
g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
|
||||
|
||||
if (opt_system)
|
||||
bus_type = G_BUS_TYPE_SYSTEM;
|
||||
else if (opt_address)
|
||||
|
||||
Reference in New Issue
Block a user