Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 35bc163107 | |||
| 317d8a58dc | |||
| 89b3ab9a81 | |||
| 8690808a29 | |||
| be4ac32477 | |||
| 5068f36d9d | |||
| 8c48e96f50 | |||
| f15619287a | |||
| eb5c28e77f | |||
| 7fb34feaf8 | |||
| 20a6cf52ac | |||
| c566d8853e | |||
| 0beddc6856 | |||
| 3170a0b615 | |||
| 4f28e3413a | |||
| 291be9fa79 | |||
| fd5d060eee | |||
| cffe07521e | |||
| 36af546362 | |||
| 0da848a5a0 | |||
| 8c9ae98bda | |||
| ef025509ba | |||
| c096698ec1 | |||
| 3aaaed3bae |
@ -1,7 +1,7 @@
|
|||||||
# German layout by Mark Müller
|
# German layout by Mark Müller
|
||||||
# Version 2019101900
|
# Version 2019111700
|
||||||
---
|
---
|
||||||
bounds: { x: 0, y: 1, width: 360, height: 210 }
|
bounds: { x: 0, y: 1, width: 360, height: 208 }
|
||||||
|
|
||||||
outlines:
|
outlines:
|
||||||
default:
|
default:
|
||||||
@ -20,27 +20,27 @@ views:
|
|||||||
- "q w e r t z u i o p"
|
- "q w e r t z u i o p"
|
||||||
- "a s d f g h j k l"
|
- "a s d f g h j k l"
|
||||||
- "Shift_L y x c v b n m BackSpace"
|
- "Shift_L y x c v b n m BackSpace"
|
||||||
- "show_numbers show_dechars preferences space , period Return"
|
- "show_numbers show_eschars preferences space , . Return"
|
||||||
upper:
|
upper:
|
||||||
- "Q W E R T Z U I O P"
|
- "Q W E R T Z U I O P"
|
||||||
- "A S D F G H J K L"
|
- "A S D F G H J K L"
|
||||||
- "Shift_L Y X C V B N M BackSpace"
|
- "Shift_L Y X C V B N M BackSpace"
|
||||||
- "show_numbers show_dechars preferences space ! ? Return"
|
- "show_numbers show_eschars preferences space ! ? Return"
|
||||||
numbers:
|
numbers:
|
||||||
- "1 2 3 4 5 6 7 8 9 0"
|
- "1 2 3 4 5 6 7 8 9 0"
|
||||||
- "@ # € % & - _ + ( )"
|
- "@ # € % & - _ + ( )"
|
||||||
- "show_symbols , \" ' colon = < > BackSpace"
|
- "show_symbols , \" ' : = < > BackSpace"
|
||||||
- "show_letters show_dechars preferences space , period Return"
|
- "show_letters show_eschars preferences space , . Return"
|
||||||
symbols:
|
symbols:
|
||||||
- "~ ` ´ | · √ µ ÷ × ¶"
|
- "~ ` ´ | · √ µ ÷ × ¶"
|
||||||
- "© ® £ $ ¥ ^ ° * { }"
|
- "© ® £ $ ¥ ^ ° * { }"
|
||||||
- "show_numbers \\ / § π τ [ ] BackSpace"
|
- "show_numbers \\ / § π τ [ ] BackSpace"
|
||||||
- "show_letters show_dechars preferences space , period Return"
|
- "show_letters show_eschars preferences space , . Return"
|
||||||
dechars:
|
eschars:
|
||||||
- "ä è é ö ü Ä È É Ö Ü"
|
- "ä è é ö ü Ä È É Ö Ü"
|
||||||
- "à â ê î ô À Â È Î Ô"
|
- "à â ê î ô À Â È Î Ô"
|
||||||
- "show_numbers « » ç Ç æ œ ß BackSpace"
|
- "show_numbers « » ç Ç æ œ ß BackSpace"
|
||||||
- "show_letters show_dechars preferences space „ “ Return"
|
- "show_letters show_eschars preferences space „ “ Return"
|
||||||
|
|
||||||
buttons:
|
buttons:
|
||||||
Shift_L:
|
Shift_L:
|
||||||
@ -53,6 +53,7 @@ buttons:
|
|||||||
BackSpace:
|
BackSpace:
|
||||||
outline: "altline"
|
outline: "altline"
|
||||||
icon: "edit-clear-symbolic"
|
icon: "edit-clear-symbolic"
|
||||||
|
keysym: "BackSpace"
|
||||||
preferences:
|
preferences:
|
||||||
action: "show_prefs"
|
action: "show_prefs"
|
||||||
outline: "special"
|
outline: "special"
|
||||||
@ -72,24 +73,18 @@ buttons:
|
|||||||
set_view: "symbols"
|
set_view: "symbols"
|
||||||
outline: "altline"
|
outline: "altline"
|
||||||
label: "*/="
|
label: "*/="
|
||||||
show_dechars:
|
show_eschars:
|
||||||
action:
|
action:
|
||||||
locking:
|
locking:
|
||||||
lock_view: "dechars"
|
lock_view: "eschars"
|
||||||
unlock_view: "base"
|
unlock_view: "base"
|
||||||
outline: "altline"
|
outline: "altline"
|
||||||
label: "äÄ"
|
label: "äÄ"
|
||||||
|
|
||||||
period:
|
|
||||||
outline: "default"
|
|
||||||
label: "."
|
|
||||||
space:
|
space:
|
||||||
outline: "spaceline"
|
outline: "spaceline"
|
||||||
label: " "
|
label: " "
|
||||||
|
keysym: "space"
|
||||||
Return:
|
Return:
|
||||||
outline: "altline"
|
outline: "altline"
|
||||||
icon: "key-enter"
|
icon: "key-enter"
|
||||||
colon:
|
keysym: "Return"
|
||||||
label: ":"
|
|
||||||
"\"":
|
|
||||||
keysym: "quotedbl"
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
# Japanese Kana layout by Mark Müller
|
# Japanese Kana layout by Mark Müller
|
||||||
# Version 2019101900
|
# Version 2019111800
|
||||||
---
|
---
|
||||||
bounds: { x: 0, y: 1, width: 360, height: 210 }
|
bounds: { x: 0, y: 1, width: 360, height: 208 }
|
||||||
|
|
||||||
outlines:
|
outlines:
|
||||||
default:
|
default:
|
||||||
@ -199,25 +199,29 @@ views:
|
|||||||
- "\\ ´ ` · ¶"
|
- "\\ ´ ` · ¶"
|
||||||
|
|
||||||
buttons:
|
buttons:
|
||||||
# following 4 buttons are keysyms from libxkbcommon
|
# following 4 buttons use the corresponding xkb name as keysym
|
||||||
BackSpace:
|
BackSpace:
|
||||||
outline: "wide"
|
outline: "wide"
|
||||||
icon: "edit-clear-symbolic"
|
icon: "edit-clear-symbolic"
|
||||||
|
keysym: "BackSpace"
|
||||||
Return:
|
Return:
|
||||||
outline: "wide"
|
outline: "wide"
|
||||||
icon: "key-enter"
|
icon: "key-enter"
|
||||||
|
keysym: "Return"
|
||||||
Left:
|
Left:
|
||||||
outline: "wide"
|
outline: "wide"
|
||||||
label: "←"
|
label: "←"
|
||||||
|
keysym: "Left"
|
||||||
Right:
|
Right:
|
||||||
outline: "wide"
|
outline: "wide"
|
||||||
label: "→"
|
label: "→"
|
||||||
|
keysym: "Right"
|
||||||
# special button "preferences" is handled in the code
|
# special button "preferences" is handled in the code
|
||||||
preferences:
|
preferences:
|
||||||
action: "show_prefs"
|
action: "show_prefs"
|
||||||
outline: "special"
|
outline: "special"
|
||||||
icon: "keyboard-mode-symbolic"
|
icon: "keyboard-mode-symbolic"
|
||||||
# space button (unicode)
|
# space button with unicode keysym for ideographic space
|
||||||
space:
|
space:
|
||||||
outline: "default-wide"
|
outline: "default-wide"
|
||||||
label: "␣"
|
label: "␣"
|
||||||
8
data/langs/de-DE.txt
Normal file
8
data/langs/de-DE.txt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
us Englisch (US)
|
||||||
|
de Deutsch
|
||||||
|
el Griechisch
|
||||||
|
es Spanisch
|
||||||
|
it Italienisch
|
||||||
|
jp+kana Japanisch (Kana)
|
||||||
|
no Norwegisch
|
||||||
|
|
||||||
@ -2,7 +2,9 @@ us English (US)
|
|||||||
de German
|
de German
|
||||||
el Greek
|
el Greek
|
||||||
es Spanish
|
es Spanish
|
||||||
|
fi Finnish
|
||||||
it Italian
|
it Italian
|
||||||
jp+kana Japanese (kana)
|
jp+kana Japanese (kana)
|
||||||
nb Norwegian
|
no Norwegian
|
||||||
|
se Swedish
|
||||||
|
|
||||||
|
|||||||
7
data/langs/es-ES.txt
Normal file
7
data/langs/es-ES.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
us Inglés (EE.UU.)
|
||||||
|
de Alemán
|
||||||
|
el Griego
|
||||||
|
es Español
|
||||||
|
it Italiano
|
||||||
|
jp+kana Japonés (Kana)
|
||||||
|
no Noruego
|
||||||
@ -2,7 +2,8 @@ us angielski (USA)
|
|||||||
de niemiecki
|
de niemiecki
|
||||||
el grecki
|
el grecki
|
||||||
es hiszpański
|
es hiszpański
|
||||||
|
fi fiński
|
||||||
it włoski
|
it włoski
|
||||||
jp+kana japoński (kana)
|
jp+kana japoński (kana)
|
||||||
nb norweski
|
no norweski
|
||||||
|
se szwedzki
|
||||||
|
|||||||
7
debian/changelog
vendored
7
debian/changelog
vendored
@ -1,3 +1,10 @@
|
|||||||
|
squeekboard (1.3.1) amber-phone; urgency=medium
|
||||||
|
|
||||||
|
* Update and fix layouts and languages
|
||||||
|
* Make tests less likely to fail
|
||||||
|
|
||||||
|
-- Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> Wed, 20 Nov 2019 22:10:48 +0000
|
||||||
|
|
||||||
squeekboard (1.3.0) amber-phone; urgency=medium
|
squeekboard (1.3.0) amber-phone; urgency=medium
|
||||||
|
|
||||||
* Language selection popup
|
* Language selection popup
|
||||||
|
|||||||
@ -50,8 +50,7 @@ typedef struct _EekRendererPrivate
|
|||||||
gint origin_x;
|
gint origin_x;
|
||||||
gint origin_y;
|
gint origin_y;
|
||||||
|
|
||||||
PangoFontDescription *ascii_font;
|
PangoFontDescription *font; // owned reference
|
||||||
PangoFontDescription *font;
|
|
||||||
cairo_surface_t *keyboard_surface;
|
cairo_surface_t *keyboard_surface;
|
||||||
|
|
||||||
} EekRendererPrivate;
|
} EekRendererPrivate;
|
||||||
@ -59,8 +58,7 @@ typedef struct _EekRendererPrivate
|
|||||||
G_DEFINE_TYPE_WITH_PRIVATE (EekRenderer, eek_renderer, G_TYPE_OBJECT)
|
G_DEFINE_TYPE_WITH_PRIVATE (EekRenderer, eek_renderer, G_TYPE_OBJECT)
|
||||||
|
|
||||||
/* eek-keyboard-drawing.c */
|
/* eek-keyboard-drawing.c */
|
||||||
static void eek_renderer_real_render_button_label (EekRenderer *self,
|
static void eek_renderer_render_button_label (EekRenderer *self, cairo_t *cr, GtkStyleContext *ctx,
|
||||||
PangoLayout *layout,
|
|
||||||
const struct squeek_button *button);
|
const struct squeek_button *button);
|
||||||
|
|
||||||
static void invalidate (EekRenderer *renderer);
|
static void invalidate (EekRenderer *renderer);
|
||||||
@ -125,9 +123,9 @@ static void
|
|||||||
render_keyboard_surface (EekRenderer *renderer, struct squeek_view *view)
|
render_keyboard_surface (EekRenderer *renderer, struct squeek_view *view)
|
||||||
{
|
{
|
||||||
EekRendererPrivate *priv = eek_renderer_get_instance_private (renderer);
|
EekRendererPrivate *priv = eek_renderer_get_instance_private (renderer);
|
||||||
EekColor foreground;
|
|
||||||
|
|
||||||
eek_renderer_get_foreground_color (priv->view_context, &foreground);
|
GdkRGBA color = {0};
|
||||||
|
gtk_style_context_get_color (priv->view_context, GTK_STATE_FLAG_NORMAL, &color);
|
||||||
|
|
||||||
EekBounds bounds = squeek_view_get_bounds (level_keyboard_current(priv->keyboard));
|
EekBounds bounds = squeek_view_get_bounds (level_keyboard_current(priv->keyboard));
|
||||||
|
|
||||||
@ -152,15 +150,16 @@ render_keyboard_surface (EekRenderer *renderer, struct squeek_view *view)
|
|||||||
cairo_translate (data.cr, bounds.x, bounds.y);
|
cairo_translate (data.cr, bounds.x, bounds.y);
|
||||||
|
|
||||||
cairo_set_source_rgba (data.cr,
|
cairo_set_source_rgba (data.cr,
|
||||||
foreground.red,
|
color.red,
|
||||||
foreground.green,
|
color.green,
|
||||||
foreground.blue,
|
color.blue,
|
||||||
foreground.alpha);
|
color.alpha);
|
||||||
|
|
||||||
/* draw rows */
|
/* draw rows */
|
||||||
squeek_view_foreach(level_keyboard_current(priv->keyboard),
|
squeek_view_foreach(level_keyboard_current(priv->keyboard),
|
||||||
create_keyboard_surface_row_callback,
|
create_keyboard_surface_row_callback,
|
||||||
&data);
|
&data);
|
||||||
|
|
||||||
cairo_restore (data.cr);
|
cairo_restore (data.cr);
|
||||||
|
|
||||||
cairo_destroy (data.cr);
|
cairo_destroy (data.cr);
|
||||||
@ -198,9 +197,6 @@ static void render_button_in_context(EekRenderer *self,
|
|||||||
struct button_place *place,
|
struct button_place *place,
|
||||||
gboolean active) {
|
gboolean active) {
|
||||||
cairo_surface_t *outline_surface = NULL;
|
cairo_surface_t *outline_surface = NULL;
|
||||||
PangoLayout *layout;
|
|
||||||
PangoRectangle extents = { 0, };
|
|
||||||
EekColor foreground;
|
|
||||||
|
|
||||||
/* render outline */
|
/* render outline */
|
||||||
EekBounds bounds = squeek_button_get_bounds(place->button);
|
EekBounds bounds = squeek_button_get_bounds(place->button);
|
||||||
@ -231,7 +227,6 @@ static void render_button_in_context(EekRenderer *self,
|
|||||||
cairo_surface_destroy(outline_surface);
|
cairo_surface_destroy(outline_surface);
|
||||||
cairo_paint (cr);
|
cairo_paint (cr);
|
||||||
|
|
||||||
eek_renderer_get_foreground_color (ctx, &foreground);
|
|
||||||
/* render icon (if any) */
|
/* render icon (if any) */
|
||||||
const char *icon_name = squeek_button_get_icon_name(place->button);
|
const char *icon_name = squeek_button_get_icon_name(place->button);
|
||||||
|
|
||||||
@ -249,10 +244,13 @@ static void render_button_in_context(EekRenderer *self,
|
|||||||
cairo_rectangle (cr, 0, 0, width, height);
|
cairo_rectangle (cr, 0, 0, width, height);
|
||||||
cairo_clip (cr);
|
cairo_clip (cr);
|
||||||
/* Draw the shape of the icon using the foreground color */
|
/* Draw the shape of the icon using the foreground color */
|
||||||
cairo_set_source_rgba (cr, foreground.red,
|
GdkRGBA color = {0};
|
||||||
foreground.green,
|
gtk_style_context_get_color (ctx, GTK_STATE_FLAG_NORMAL, &color);
|
||||||
foreground.blue,
|
|
||||||
foreground.alpha);
|
cairo_set_source_rgba (cr, color.red,
|
||||||
|
color.green,
|
||||||
|
color.blue,
|
||||||
|
color.alpha);
|
||||||
cairo_mask_surface (cr, icon_surface, 0.0, 0.0);
|
cairo_mask_surface (cr, icon_surface, 0.0, 0.0);
|
||||||
cairo_surface_destroy(icon_surface);
|
cairo_surface_destroy(icon_surface);
|
||||||
cairo_fill (cr);
|
cairo_fill (cr);
|
||||||
@ -260,25 +258,7 @@ static void render_button_in_context(EekRenderer *self,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* render label */
|
eek_renderer_render_button_label (self, cr, ctx, place->button);
|
||||||
layout = pango_cairo_create_layout (cr);
|
|
||||||
eek_renderer_real_render_button_label (self, layout, place->button);
|
|
||||||
pango_layout_get_extents (layout, NULL, &extents);
|
|
||||||
|
|
||||||
cairo_save (cr);
|
|
||||||
cairo_move_to
|
|
||||||
(cr,
|
|
||||||
(bounds.width - (double)extents.width / PANGO_SCALE) / 2,
|
|
||||||
(bounds.height - (double)extents.height / PANGO_SCALE) / 2);
|
|
||||||
|
|
||||||
cairo_set_source_rgba (cr,
|
|
||||||
foreground.red,
|
|
||||||
foreground.green,
|
|
||||||
foreground.blue,
|
|
||||||
foreground.alpha);
|
|
||||||
pango_cairo_show_layout (cr, layout);
|
|
||||||
cairo_restore (cr);
|
|
||||||
g_object_unref (layout);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -363,8 +343,9 @@ eek_renderer_apply_transformation_for_button (cairo_t *cr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
eek_renderer_real_render_button_label (EekRenderer *self,
|
eek_renderer_render_button_label (EekRenderer *self,
|
||||||
PangoLayout *layout,
|
cairo_t *cr,
|
||||||
|
GtkStyleContext *ctx,
|
||||||
const struct squeek_button *button)
|
const struct squeek_button *button)
|
||||||
{
|
{
|
||||||
EekRendererPrivate *priv = eek_renderer_get_instance_private (self);
|
EekRendererPrivate *priv = eek_renderer_get_instance_private (self);
|
||||||
@ -381,16 +362,11 @@ eek_renderer_real_render_button_label (EekRenderer *self,
|
|||||||
|
|
||||||
if (!priv->font) {
|
if (!priv->font) {
|
||||||
const PangoFontDescription *base_font;
|
const PangoFontDescription *base_font;
|
||||||
gdouble ascii_size, size;
|
gdouble size;
|
||||||
|
|
||||||
base_font = pango_context_get_font_description (priv->pcontext);
|
base_font = pango_context_get_font_description (priv->pcontext);
|
||||||
// FIXME: Base font size on the same size unit used for button sizing,
|
// FIXME: Base font size on the same size unit used for button sizing,
|
||||||
// and make the default about 1/3 of the current row height
|
// and make the default about 1/3 of the current row height
|
||||||
ascii_size = 30000.0;
|
|
||||||
priv->ascii_font = pango_font_description_copy (base_font);
|
|
||||||
pango_font_description_set_size (priv->ascii_font,
|
|
||||||
(gint)round(ascii_size));
|
|
||||||
|
|
||||||
size = 30000.0;
|
size = 30000.0;
|
||||||
priv->font = pango_font_description_copy (base_font);
|
priv->font = pango_font_description_copy (base_font);
|
||||||
pango_font_description_set_size (priv->font, (gint)round(size * 0.6));
|
pango_font_description_set_size (priv->font, (gint)round(size * 0.6));
|
||||||
@ -403,6 +379,8 @@ eek_renderer_real_render_button_label (EekRenderer *self,
|
|||||||
font = pango_font_description_copy (priv->font);
|
font = pango_font_description_copy (priv->font);
|
||||||
pango_font_description_set_size (font,
|
pango_font_description_set_size (font,
|
||||||
(gint)round(pango_font_description_get_size (font) * scale));
|
(gint)round(pango_font_description_get_size (font) * scale));
|
||||||
|
|
||||||
|
PangoLayout *layout = pango_cairo_create_layout (cr);
|
||||||
pango_layout_set_font_description (layout, font);
|
pango_layout_set_font_description (layout, font);
|
||||||
pango_font_description_free (font);
|
pango_font_description_free (font);
|
||||||
|
|
||||||
@ -413,6 +391,27 @@ eek_renderer_real_render_button_label (EekRenderer *self,
|
|||||||
}
|
}
|
||||||
pango_layout_set_width (layout,
|
pango_layout_set_width (layout,
|
||||||
PANGO_SCALE * bounds.width * scale);
|
PANGO_SCALE * bounds.width * scale);
|
||||||
|
|
||||||
|
PangoRectangle extents = { 0, };
|
||||||
|
pango_layout_get_extents (layout, NULL, &extents);
|
||||||
|
|
||||||
|
cairo_save (cr);
|
||||||
|
cairo_move_to
|
||||||
|
(cr,
|
||||||
|
(bounds.width - (double)extents.width / PANGO_SCALE) / 2,
|
||||||
|
(bounds.height - (double)extents.height / PANGO_SCALE) / 2);
|
||||||
|
|
||||||
|
GdkRGBA color = {0};
|
||||||
|
gtk_style_context_get_color (ctx, GTK_STATE_FLAG_NORMAL, &color);
|
||||||
|
|
||||||
|
cairo_set_source_rgba (cr,
|
||||||
|
color.red,
|
||||||
|
color.green,
|
||||||
|
color.blue,
|
||||||
|
color.alpha);
|
||||||
|
pango_cairo_show_layout (cr, layout);
|
||||||
|
cairo_restore (cr);
|
||||||
|
g_object_unref (layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -550,7 +549,6 @@ eek_renderer_finalize (GObject *object)
|
|||||||
g_object_unref(priv->css_provider);
|
g_object_unref(priv->css_provider);
|
||||||
g_object_unref(priv->view_context);
|
g_object_unref(priv->view_context);
|
||||||
g_object_unref(priv->button_context);
|
g_object_unref(priv->button_context);
|
||||||
pango_font_description_free (priv->ascii_font);
|
|
||||||
pango_font_description_free (priv->font);
|
pango_font_description_free (priv->font);
|
||||||
G_OBJECT_CLASS (eek_renderer_parent_class)->finalize (object);
|
G_OBJECT_CLASS (eek_renderer_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
@ -850,22 +848,6 @@ eek_renderer_render_keyboard (EekRenderer *renderer,
|
|||||||
EEK_RENDERER_GET_CLASS(renderer)->render_keyboard (renderer, cr);
|
EEK_RENDERER_GET_CLASS(renderer)->render_keyboard (renderer, cr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
eek_renderer_get_foreground_color (GtkStyleContext *context,
|
|
||||||
EekColor *color)
|
|
||||||
{
|
|
||||||
g_return_if_fail (color);
|
|
||||||
|
|
||||||
GtkStateFlags flags = GTK_STATE_FLAG_NORMAL;
|
|
||||||
GdkRGBA gcolor;
|
|
||||||
|
|
||||||
gtk_style_context_get_color (context, flags, &gcolor);
|
|
||||||
color->red = gcolor.red;
|
|
||||||
color->green = gcolor.green;
|
|
||||||
color->blue = gcolor.blue;
|
|
||||||
color->alpha = gcolor.alpha;
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
sign (EekPoint *p1, EekPoint *p2, EekPoint *p3)
|
sign (EekPoint *p1, EekPoint *p2, EekPoint *p3)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -86,16 +86,6 @@ cairo_surface_t *eek_renderer_get_icon_surface(const gchar *icon_name,
|
|||||||
|
|
||||||
void eek_renderer_render_keyboard (EekRenderer *renderer,
|
void eek_renderer_render_keyboard (EekRenderer *renderer,
|
||||||
cairo_t *cr);
|
cairo_t *cr);
|
||||||
|
|
||||||
void eek_renderer_set_default_foreground_color
|
|
||||||
(EekRenderer *renderer,
|
|
||||||
const EekColor *color);
|
|
||||||
void eek_renderer_set_default_background_color
|
|
||||||
(EekRenderer *renderer,
|
|
||||||
const EekColor *color);
|
|
||||||
void eek_renderer_get_foreground_color
|
|
||||||
(GtkStyleContext *context,
|
|
||||||
EekColor *color);
|
|
||||||
void eek_renderer_set_border_width (EekRenderer *renderer,
|
void eek_renderer_set_border_width (EekRenderer *renderer,
|
||||||
gdouble border_width);
|
gdouble border_width);
|
||||||
void eek_renderer_apply_transformation_for_button
|
void eek_renderer_apply_transformation_for_button
|
||||||
|
|||||||
@ -72,35 +72,3 @@ eek_bounds_free (EekBounds *bounds)
|
|||||||
{
|
{
|
||||||
g_slice_free (EekBounds, bounds);
|
g_slice_free (EekBounds, bounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EekColor */
|
|
||||||
G_DEFINE_BOXED_TYPE(EekColor, eek_color, eek_color_copy, eek_color_free);
|
|
||||||
|
|
||||||
EekColor *
|
|
||||||
eek_color_copy (const EekColor *color)
|
|
||||||
{
|
|
||||||
return g_slice_dup (EekColor, color);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
eek_color_free (EekColor *color)
|
|
||||||
{
|
|
||||||
g_slice_free (EekColor, color);
|
|
||||||
}
|
|
||||||
|
|
||||||
EekColor *
|
|
||||||
eek_color_new (gdouble red,
|
|
||||||
gdouble green,
|
|
||||||
gdouble blue,
|
|
||||||
gdouble alpha)
|
|
||||||
{
|
|
||||||
EekColor *color;
|
|
||||||
|
|
||||||
color = g_slice_new (EekColor);
|
|
||||||
color->red = red;
|
|
||||||
color->green = green;
|
|
||||||
color->blue = blue;
|
|
||||||
color->alpha = alpha;
|
|
||||||
|
|
||||||
return color;
|
|
||||||
}
|
|
||||||
|
|||||||
@ -34,10 +34,8 @@ G_BEGIN_DECLS
|
|||||||
|
|
||||||
#define EEK_TYPE_POINT (eek_point_get_type ())
|
#define EEK_TYPE_POINT (eek_point_get_type ())
|
||||||
#define EEK_TYPE_BOUNDS (eek_bounds_get_type ())
|
#define EEK_TYPE_BOUNDS (eek_bounds_get_type ())
|
||||||
#define EEK_TYPE_COLOR (eek_color_get_type ())
|
|
||||||
|
|
||||||
typedef struct _EekBounds EekBounds;
|
typedef struct _EekBounds EekBounds;
|
||||||
typedef struct _EekColor EekColor;
|
|
||||||
|
|
||||||
typedef struct _EekboardContextService EekboardContextService;
|
typedef struct _EekboardContextService EekboardContextService;
|
||||||
typedef struct _LevelKeyboard LevelKeyboard;
|
typedef struct _LevelKeyboard LevelKeyboard;
|
||||||
@ -85,33 +83,6 @@ GType eek_bounds_get_type (void) G_GNUC_CONST;
|
|||||||
EekBounds *eek_bounds_copy (const EekBounds *bounds);
|
EekBounds *eek_bounds_copy (const EekBounds *bounds);
|
||||||
void eek_bounds_free (EekBounds *bounds);
|
void eek_bounds_free (EekBounds *bounds);
|
||||||
|
|
||||||
/**
|
|
||||||
* EekColor:
|
|
||||||
* @red: red component of color, between 0.0 and 1.0
|
|
||||||
* @green: green component of color, between 0.0 and 1.0
|
|
||||||
* @blue: blue component of color, between 0.0 and 1.0
|
|
||||||
* @alpha: alpha component of color, between 0.0 and 1.0
|
|
||||||
*
|
|
||||||
* Color used for drawing.
|
|
||||||
*/
|
|
||||||
struct _EekColor
|
|
||||||
{
|
|
||||||
/*< public >*/
|
|
||||||
gdouble red;
|
|
||||||
gdouble green;
|
|
||||||
gdouble blue;
|
|
||||||
gdouble alpha;
|
|
||||||
};
|
|
||||||
|
|
||||||
GType eek_color_get_type (void) G_GNUC_CONST;
|
|
||||||
|
|
||||||
EekColor *eek_color_new (gdouble red,
|
|
||||||
gdouble green,
|
|
||||||
gdouble blue,
|
|
||||||
gdouble alpha);
|
|
||||||
EekColor *eek_color_copy (const EekColor *color);
|
|
||||||
void eek_color_free (EekColor *color);
|
|
||||||
|
|
||||||
struct transformation {
|
struct transformation {
|
||||||
gdouble origin_x;
|
gdouble origin_x;
|
||||||
gdouble origin_y;
|
gdouble origin_y;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
project(
|
project(
|
||||||
'squeekboard',
|
'squeekboard',
|
||||||
'c', 'rust',
|
'c', 'rust',
|
||||||
version: '1.3.0',
|
version: '1.3.1',
|
||||||
license: 'GPLv3',
|
license: 'GPLv3',
|
||||||
meson_version: '>=0.51.0',
|
meson_version: '>=0.51.0',
|
||||||
default_options: [
|
default_options: [
|
||||||
|
|||||||
@ -72,7 +72,7 @@ build_rstests = custom_target(
|
|||||||
output: ['src'],
|
output: ['src'],
|
||||||
install: false,
|
install: false,
|
||||||
console: true,
|
console: true,
|
||||||
command: [cargo_script, '', 'build', '--tests'],
|
command: [cargo_script, '', 'test', '--no-run'],
|
||||||
depends: rslibs, # no point building tests if the code itself fails
|
depends: rslibs, # no point building tests if the code itself fails
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -80,6 +80,8 @@ test(
|
|||||||
'rstest',
|
'rstest',
|
||||||
cargo_script,
|
cargo_script,
|
||||||
args: ['', 'test'],
|
args: ['', 'test'],
|
||||||
|
# this is a whole Carg-based test suite, let it run for a while
|
||||||
|
timeout: 900,
|
||||||
depends: build_rstests,
|
depends: build_rstests,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,7 @@ const KEYBOARDS: &[(*const str, *const str)] = &[
|
|||||||
("es", include_str!("../data/keyboards/es.yaml")),
|
("es", include_str!("../data/keyboards/es.yaml")),
|
||||||
("fi", include_str!("../data/keyboards/fi.yaml")),
|
("fi", include_str!("../data/keyboards/fi.yaml")),
|
||||||
("it", include_str!("../data/keyboards/it.yaml")),
|
("it", include_str!("../data/keyboards/it.yaml")),
|
||||||
("ja+kana", include_str!("../data/keyboards/ja+kana.yaml")),
|
("jp+kana", include_str!("../data/keyboards/jp+kana.yaml")),
|
||||||
("no", include_str!("../data/keyboards/no.yaml")),
|
("no", include_str!("../data/keyboards/no.yaml")),
|
||||||
("number", include_str!("../data/keyboards/number.yaml")),
|
("number", include_str!("../data/keyboards/number.yaml")),
|
||||||
("se", include_str!("../data/keyboards/se.yaml")),
|
("se", include_str!("../data/keyboards/se.yaml")),
|
||||||
@ -39,7 +39,9 @@ pub fn get_keyboard(needle: &str) -> Option<&'static str> {
|
|||||||
|
|
||||||
/// Translations of the layout identifier strings
|
/// Translations of the layout identifier strings
|
||||||
const LAYOUT_NAMES: &[(*const str, *const str)] = &[
|
const LAYOUT_NAMES: &[(*const str, *const str)] = &[
|
||||||
|
("de-DE", include_str!("../data/langs/de-DE.txt")),
|
||||||
("en-US", include_str!("../data/langs/en-US.txt")),
|
("en-US", include_str!("../data/langs/en-US.txt")),
|
||||||
|
("es-ES", include_str!("../data/langs/es-ES.txt")),
|
||||||
("pl-PL", include_str!("../data/langs/pl-PL.txt")),
|
("pl-PL", include_str!("../data/langs/pl-PL.txt")),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -54,7 +54,7 @@ foreach layout : [
|
|||||||
'es',
|
'es',
|
||||||
'fi',
|
'fi',
|
||||||
'it',
|
'it',
|
||||||
'ja+kana',
|
'jp+kana',
|
||||||
'no',
|
'no',
|
||||||
'number',
|
'number',
|
||||||
'se',
|
'se',
|
||||||
|
|||||||
Reference in New Issue
Block a user