[libgnomekbd] Cleaning code a bit
- From: Sergey V. Udaltsov <svu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgnomekbd] Cleaning code a bit
- Date: Fri, 24 Dec 2010 00:45:58 +0000 (UTC)
commit 9a63194641320da5b9131fe34632f13506d6031b
Author: Sergey V. Udaltsov <svu gnome org>
Date: Fri Dec 24 10:27:49 2010 +0000
Cleaning code a bit
Preparing for introspection
libgnomekbd/gkbd-desktop-config.h | 5 +++--
libgnomekbd/gkbd-indicator-config.h | 5 +++--
libgnomekbd/gkbd-indicator-plugin-manager.h | 10 ++++++----
libgnomekbd/gkbd-indicator-plugin.h | 10 ++++++----
libgnomekbd/gkbd-keyboard-config.h | 5 +++--
libgnomekbd/gkbd-keyboard-drawing.c | 16 ++++++++--------
6 files changed, 29 insertions(+), 22 deletions(-)
---
diff --git a/libgnomekbd/gkbd-desktop-config.h b/libgnomekbd/gkbd-desktop-config.h
index acd160c..b9213c2 100644
--- a/libgnomekbd/gkbd-desktop-config.h
+++ b/libgnomekbd/gkbd-desktop-config.h
@@ -35,7 +35,8 @@ extern const gchar GKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES[];
/*
* General configuration
*/
-typedef struct _GkbdDesktopConfig {
+typedef struct _GkbdDesktopConfig GkbdDesktopConfig;
+struct _GkbdDesktopConfig {
gint default_group;
gboolean group_per_app;
gboolean handle_indicators;
@@ -46,7 +47,7 @@ typedef struct _GkbdDesktopConfig {
GSettings *settings;
int config_listener_id;
XklEngine *engine;
-} GkbdDesktopConfig;
+};
/**
* GkbdDesktopConfig functions
diff --git a/libgnomekbd/gkbd-indicator-config.h b/libgnomekbd/gkbd-indicator-config.h
index d1928b3..2638895 100644
--- a/libgnomekbd/gkbd-indicator-config.h
+++ b/libgnomekbd/gkbd-indicator-config.h
@@ -27,7 +27,8 @@
/*
* Indicator configuration
*/
-typedef struct _GkbdIndicatorConfig {
+typedef struct _GkbdIndicatorConfig GkbdIndicatorConfig;
+struct _GkbdIndicatorConfig {
int secondary_groups_mask;
gboolean show_flags;
@@ -44,7 +45,7 @@ typedef struct _GkbdIndicatorConfig {
GtkIconTheme *icon_theme;
int config_listener_id;
XklEngine *engine;
-} GkbdIndicatorConfig;
+};
/**
* GkbdIndicatorConfig functions -
diff --git a/libgnomekbd/gkbd-indicator-plugin-manager.h b/libgnomekbd/gkbd-indicator-plugin-manager.h
index 92370f7..f1371c3 100644
--- a/libgnomekbd/gkbd-indicator-plugin-manager.h
+++ b/libgnomekbd/gkbd-indicator-plugin-manager.h
@@ -23,16 +23,18 @@
#include <gmodule.h>
#include <libgnomekbd/gkbd-indicator-plugin.h>
-typedef struct _GkbdIndicatorPluginManager {
+typedef struct _GkbdIndicatorPluginManager GkbdIndicatorPluginManager;
+struct _GkbdIndicatorPluginManager {
GHashTable *all_plugin_recs;
GSList *inited_plugin_recs;
-} GkbdIndicatorPluginManager;
+};
-typedef struct _GkbdIndicatorPluginManagerRecord {
+typedef struct _GkbdIndicatorPluginManagerRecord GkbdIndicatorPluginManagerRecord;
+struct _GkbdIndicatorPluginManagerRecord {
const char *full_path;
GModule *module;
const GkbdIndicatorPlugin *plugin;
-} GkbdIndicatorPluginManagerRecord;
+};
extern void
gkbd_indicator_plugin_manager_init (GkbdIndicatorPluginManager * manager);
diff --git a/libgnomekbd/gkbd-indicator-plugin.h b/libgnomekbd/gkbd-indicator-plugin.h
index 3747b98..fe77842 100644
--- a/libgnomekbd/gkbd-indicator-plugin.h
+++ b/libgnomekbd/gkbd-indicator-plugin.h
@@ -27,9 +27,10 @@
struct _GkbdIndicatorPlugin;
-typedef struct _GkbdIndicatorPluginContainer {
+typedef struct _GkbdIndicatorPluginContainer GkbdIndicatorPluginContainer;
+struct _GkbdIndicatorPluginContainer {
GSettings *settings;
-} GkbdIndicatorPluginContainer;
+};
typedef const struct _GkbdIndicatorPlugin
*(*GkbdIndicatorPluginGetPluginFunc) (void);
@@ -70,7 +71,8 @@ typedef
void (*GkbdIndicatorPluginConfigureProperties)
(GkbdIndicatorPluginContainer * pc, GtkWindow * parent);
-typedef struct _GkbdIndicatorPlugin {
+typedef struct _GkbdIndicatorPlugin GkbdIndicatorPlugin;
+struct _GkbdIndicatorPlugin {
const char *name;
const char *description;
@@ -100,7 +102,7 @@ typedef struct _GkbdIndicatorPlugin {
/* not implemented */
GkbdIndicatorPluginCreateWidget create_widget_callback;
-} GkbdIndicatorPlugin;
+};
/**
* Functions accessible for plugins
diff --git a/libgnomekbd/gkbd-keyboard-config.h b/libgnomekbd/gkbd-keyboard-config.h
index a1a9168..e16effd 100644
--- a/libgnomekbd/gkbd-keyboard-config.h
+++ b/libgnomekbd/gkbd-keyboard-config.h
@@ -34,7 +34,8 @@ extern const gchar GKBD_KEYBOARD_CONFIG_KEY_OPTIONS[];
/*
* Keyboard Configuration
*/
-typedef struct _GkbdKeyboardConfig {
+typedef struct _GkbdKeyboardConfig GkbdKeyboardConfig;
+struct _GkbdKeyboardConfig {
gchar *model;
gchar **layouts_variants;
gchar **options;
@@ -43,7 +44,7 @@ typedef struct _GkbdKeyboardConfig {
GSettings *settings;
int config_listener_id;
XklEngine *engine;
-} GkbdKeyboardConfig;
+};
/**
* GkbdKeyboardConfig functions
diff --git a/libgnomekbd/gkbd-keyboard-drawing.c b/libgnomekbd/gkbd-keyboard-drawing.c
index 9b9b72b..129d903 100644
--- a/libgnomekbd/gkbd-keyboard-drawing.c
+++ b/libgnomekbd/gkbd-keyboard-drawing.c
@@ -2167,7 +2167,7 @@ gkbd_keyboard_drawing_set_mods (GkbdKeyboardDrawing * drawing, guint mods)
/**
* gkbd_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
@@ -2182,7 +2182,7 @@ gkbd_keyboard_drawing_set_mods (GkbdKeyboardDrawing * drawing, guint mods)
* @returns: %TRUE on success, %FALSE on failure
*/
gboolean
-gkbd_keyboard_drawing_render (GkbdKeyboardDrawing * drawing,
+gkbd_keyboard_drawing_render (GkbdKeyboardDrawing * kbdrawing,
cairo_t * cr,
PangoLayout * layout,
double x, double y,
@@ -2191,22 +2191,22 @@ gkbd_keyboard_drawing_render (GkbdKeyboardDrawing * drawing,
{
GkbdKeyboardDrawingRenderContext 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,
- >k_widget_get_style (GTK_WIDGET (drawing))->dark
- [gtk_widget_get_state (GTK_WIDGET (drawing))]
+ >k_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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]