summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2015-09-06 23:51:40 +0200
committerinfirit <[email protected]>2015-09-07 00:57:10 +0200
commit22f8bfcfb7f0c18a3bff0dd2c7e1b9094cf4bddb (patch)
tree39f8e9c9c84a4ff5933604654f642bcb5491426b
parent4e5967f9fc43827b3037c08dad51c30f68f50ba6 (diff)
downloadlibmatekbd-22f8bfcfb7f0c18a3bff0dd2c7e1b9094cf4bddb.tar.bz2
libmatekbd-22f8bfcfb7f0c18a3bff0dd2c7e1b9094cf4bddb.tar.xz
Cleaning code a bit
Preparing for introspection Taken from libgnomekbd, commit: 9a63194641320da5b9131fe34632f13506d6031b from: Sergey V. Udaltsov <[email protected]>
-rw-r--r--libmatekbd/matekbd-desktop-config.h5
-rw-r--r--libmatekbd/matekbd-indicator-config.h5
-rw-r--r--libmatekbd/matekbd-keyboard-config.h5
-rw-r--r--libmatekbd/matekbd-keyboard-drawing.c16
4 files changed, 17 insertions, 14 deletions
diff --git a/libmatekbd/matekbd-desktop-config.h b/libmatekbd/matekbd-desktop-config.h
index b2ced48..ce890ae 100644
--- a/libmatekbd/matekbd-desktop-config.h
+++ b/libmatekbd/matekbd-desktop-config.h
@@ -33,7 +33,8 @@ extern const gchar MATEKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES[];
/*
* General configuration
*/
-typedef struct _MatekbdDesktopConfig {
+typedef struct _MatekbdDesktopConfig MatekbdDesktopConfig;
+struct _MatekbdDesktopConfig {
gint default_group;
gboolean group_per_app;
gboolean handle_indicators;
@@ -44,7 +45,7 @@ typedef struct _MatekbdDesktopConfig {
GSettings *settings;
int config_listener_id;
XklEngine *engine;
-} MatekbdDesktopConfig;
+};
/**
* MatekbdDesktopConfig functions
diff --git a/libmatekbd/matekbd-indicator-config.h b/libmatekbd/matekbd-indicator-config.h
index d7545ff..c989f2a 100644
--- a/libmatekbd/matekbd-indicator-config.h
+++ b/libmatekbd/matekbd-indicator-config.h
@@ -27,7 +27,8 @@
/*
* Indicator configuration
*/
-typedef struct _MatekbdIndicatorConfig {
+typedef struct _MatekbdIndicatorConfig MatekbdIndicatorConfig;
+struct _MatekbdIndicatorConfig {
int secondary_groups_mask;
gboolean show_flags;
@@ -41,7 +42,7 @@ typedef struct _MatekbdIndicatorConfig {
GtkIconTheme *icon_theme;
int config_listener_id;
XklEngine *engine;
-} MatekbdIndicatorConfig;
+};
/**
* MatekbdIndicatorConfig functions -
diff --git a/libmatekbd/matekbd-keyboard-config.h b/libmatekbd/matekbd-keyboard-config.h
index bd6bbdc..5864f3d 100644
--- a/libmatekbd/matekbd-keyboard-config.h
+++ b/libmatekbd/matekbd-keyboard-config.h
@@ -32,7 +32,8 @@ extern const gchar MATEKBD_KEYBOARD_CONFIG_KEY_OPTIONS[];
/*
* Keyboard Configuration
*/
-typedef struct _MatekbdKeyboardConfig {
+typedef struct _MatekbdKeyboardConfig MatekbdKeyboardConfig;
+struct _MatekbdKeyboardConfig {
gchar *model;
gchar **layouts_variants;
gchar **options;
@@ -41,7 +42,7 @@ typedef struct _MatekbdKeyboardConfig {
GSettings *settings;
int config_listener_id;
XklEngine *engine;
-} MatekbdKeyboardConfig;
+};
/**
* MatekbdKeyboardConfig functions
diff --git a/libmatekbd/matekbd-keyboard-drawing.c b/libmatekbd/matekbd-keyboard-drawing.c
index a02779c..4b1c5ef 100644
--- a/libmatekbd/matekbd-keyboard-drawing.c
+++ b/libmatekbd/matekbd-keyboard-drawing.c
@@ -2230,7 +2230,7 @@ matekbd_keyboard_drawing_set_mods (MatekbdKeyboardDrawing * drawing, guint mods)
/**
* matekbd_keyboard_drawing_render:
- * @drawing: keyboard layout to render
+ * @kbdrawing: keyboard layout to render
* @cr: Cairo context to render to
* @layout: Pango layout to use to render text
* @x: left coordinate (pixels) of region to render in
@@ -2245,7 +2245,7 @@ matekbd_keyboard_drawing_set_mods (MatekbdKeyboardDrawing * drawing, guint mods)
* @returns: %TRUE on success, %FALSE on failure
*/
gboolean
-matekbd_keyboard_drawing_render (MatekbdKeyboardDrawing * drawing,
+matekbd_keyboard_drawing_render (MatekbdKeyboardDrawing * kbdrawing,
cairo_t * cr,
PangoLayout * layout,
double x, double y,
@@ -2254,22 +2254,22 @@ matekbd_keyboard_drawing_render (MatekbdKeyboardDrawing * drawing,
{
MatekbdKeyboardDrawingRenderContext context = {
cr,
- drawing->renderContext->angle,
+ kbdrawing->renderContext->angle,
layout,
pango_font_description_copy (gtk_widget_get_style
(GTK_WIDGET
- (drawing))->font_desc),
+ (kbdrawing))->font_desc),
1, 1,
- &gtk_widget_get_style (GTK_WIDGET (drawing))->dark
- [gtk_widget_get_state (GTK_WIDGET (drawing))]
+ &gtk_widget_get_style (GTK_WIDGET (kbdrawing))->dark
+ [gtk_widget_get_state (GTK_WIDGET (kbdrawing))]
};
- if (!context_setup_scaling (&context, drawing, width, height,
+ if (!context_setup_scaling (&context, kbdrawing, width, height,
dpi_x, dpi_y))
return FALSE;
cairo_translate (cr, x, y);
- draw_keyboard_to_context (&context, drawing);
+ draw_keyboard_to_context (&context, kbdrawing);
pango_font_description_free (context.font_desc);