From 025b7f5b1d4d20f41a32e28b3028f91566086090 Mon Sep 17 00:00:00 2001 From: Sergey Udaltsov Date: Sat, 11 Mar 2006 02:07:24 +0000 Subject: gtk-doc documentation is generally complete, in a first round... --- libxklavier/xkl_config_item.h | 6 +- libxklavier/xkl_config_rec.h | 155 +++++++++++++------------- libxklavier/xkl_config_registry.h | 159 +++++++++++++++------------ libxklavier/xkl_engine_marshal.h | 30 +++--- libxklavier/xklavier_config.c | 6 +- libxklavier/xklavier_evt.c | 38 +++---- libxklavier/xklavier_evt_xkb.c | 24 ++--- libxklavier/xklavier_evt_xmm.c | 8 +- libxklavier/xklavier_private.h | 222 +++++++++++++++++++------------------- libxklavier/xklavier_toplevel.c | 8 +- libxklavier/xklavier_xkb.c | 6 +- 11 files changed, 345 insertions(+), 317 deletions(-) diff --git a/libxklavier/xkl_config_item.h b/libxklavier/xkl_config_item.h index bd3843e..bad205a 100644 --- a/libxklavier/xkl_config_item.h +++ b/libxklavier/xkl_config_item.h @@ -26,8 +26,6 @@ extern "C" { #endif /* __cplusplus */ -#ifndef DOXYGEN_SHOULD_SKIP_THIS - typedef struct _XklConfigItem XklConfigItem; typedef struct _XklConfigItemClass XklConfigItemClass; @@ -38,8 +36,6 @@ extern "C" { #define XKL_IS_CONFIG_ITEM_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), XKL_TYPE_CONFIG_ITEM)) #define XKL_CONFIG_ITEM_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS ((obj), XKL_TYPE_CONFIG_ITEM, XklConfigItemClass)) -#endif // DOXYGEN_SHOULD_SKIP_THIS - /** * The configuration item. Corresponds to XML element "configItem". */ @@ -92,6 +88,7 @@ extern "C" { extern XklConfigItem *xkl_config_item_new(void); /** + * ConfigItemProcessFunc: * @item: the item from registry * @data: anything which can be stored into the pointer * @@ -101,6 +98,7 @@ extern "C" { gpointer data); /** + * GroupProcessFunc: * @item: the item from registry * @allow_multiple_selection: a flag whether this group allows multiple selection * @data: anything which can be stored into the pointer diff --git a/libxklavier/xkl_config_rec.h b/libxklavier/xkl_config_rec.h index 1daf4dd..3170244 100644 --- a/libxklavier/xkl_config_rec.h +++ b/libxklavier/xkl_config_rec.h @@ -1,7 +1,3 @@ -/** - * @file xkl_config_rec.h - */ - #ifndef __XKL_CONFIG_REC_H__ #define __XKL_CONFIG_REC_H__ @@ -12,8 +8,6 @@ extern "C" { #endif /* __cplusplus */ -#ifndef DOXYGEN_SHOULD_SKIP_THIS - typedef struct _XklConfigRec XklConfigRec; typedef struct _XklConfigRecClass XklConfigRecClass; @@ -24,96 +18,108 @@ extern "C" { #define XKL_IS_CONFIG_REC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), XKL_TYPE_CONFIG_REC)) #define XKL_CONFIG_REC_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS ((obj), XKL_TYPE_CONFIG_REC, XklConfigRecClass)) -#endif // DOXYGEN_SHOULD_SKIP_THIS - -/** +/* * Basic configuration params */ struct _XklConfigRec { -/** +/* * The superclass object */ GObject parent; -/** +/* * The keyboard model */ gchar *model; -/** +/* * The array of keyboard layouts */ gchar **layouts; -/** +/* * The array of keyboard layout variants (if any) */ gchar **variants; -/** +/* * The array of keyboard layout options */ gchar **options; }; -/** +/* * The XklConfigRec class, derived from GObject */ struct _XklConfigRecClass { - /** - * The superclass - */ + /* + * The superclass + */ GObjectClass parent_class; }; /** + * xkl_config_rec_get_type: + * * Get type info for XConfigRec - * @return GType for XConfigRec + * + * Returns: GType for XConfigRec */ extern GType xkl_config_rec_get_type(void); /** + * xkl_config_rec_new: + * * Create new XklConfigRec - * @return new instance + * + * Returns: new instance */ extern XklConfigRec *xkl_config_rec_new(void); /** - * @defgroup activation XKB configuration activation - * @{ - */ - -/** + * xkl_config_rec_activate: + * @data: valid XKB configuration + * @engine: the engine + * * Activates some XKB configuration - * @param data is a valid XKB configuration * description. Can be NULL - * @return TRUE on success - * @see XklSetKeyAsSwitcher - * At the moment, accepts only _ONE_ layout. Later probably I'll improve this.. + * + * Returns: TRUE on success */ extern gboolean xkl_config_rec_activate(const XklConfigRec * data, XklEngine * engine); /** + * xkl_config_rec_get_from_server: + * @data: buffer for XKB configuration + * @engine: the engine + * * Loads the current XKB configuration (from X server) - * @param data is a buffer for XKB configuration - * @return TRUE on success + * + * Returns: TRUE on success */ extern gboolean xkl_config_rec_get_from_server(XklConfigRec * data, XklEngine * engine); /** + * xkl_config_rec_get_from_backup: + * @data: buffer for XKB configuration + * @engine: the engine + * * Loads the current XKB configuration (from backup) - * @param data is a buffer for XKB configuration - * @return TRUE on success - * @see XklBackupNamesProp + * + * Returns: TRUE on success */ extern gboolean xkl_config_rec_get_from_backup(XklConfigRec * data, XklEngine * engine); /** - * Writes some XKB configuration into XKM/XKB file - * @param file_name is a name of the file to create - * @param data is a valid XKB configuration + * xkl_config_rec_write_to_file: + * @file_name: name of the file to create + * @data: valid XKB configuration * description. Can be NULL - * @param binary is a flag indicating whether the output file should be binary - * @return TRUE on success + * @binary: flag indicating whether the output file should be binary + * @engine: the engine + * + * Writes some XKB configuration into XKM/XKB/... file + * + * Returns: TRUE on success */ extern gboolean xkl_config_rec_write_to_file(XklEngine * engine, const gchar * @@ -123,21 +129,16 @@ extern "C" { const gboolean binary); -/** @} */ - -/** - * @defgroup props Saving and restoring XKB configuration into X root window properties - * Generalizes XkbRF_GetNamesProp and XkbRF_SetNamesProp. - * @{ - */ - /** + * xkl_config_rec_get_from_root_window_property: + * @rules_atom_name: atom name of the root window property to read + * @rules_file_out: pointer to hold the file name + * @config_out: buffer to hold the result + * @engine: the engine + * * Gets the XKB configuration from any root window property - * @param rules_atom_name is an atom name of the root window property to read - * @param rules_file_out is a pointer to hold the file name - * @param config_out is a buffer to hold the result - - * all records are allocated using standard malloc - * @return TRUE on success + * + * Returns: TRUE on success */ extern gboolean xkl_config_rec_get_from_root_window_property(XklConfigRec * @@ -150,11 +151,15 @@ extern "C" { engine); /** + * xkl_config_rec_set_to_root_window_property: + * @rules_atom_name: atom name of the root window property to write + * @rules_file: rules file name + * @config: configuration to save + * @engine: the engine + * * Saves the XKB configuration into any root window property - * @param rules_atom_name is an atom name of the root window property to write - * @param rules_file is a rules file name - * @param config is a configuration to save - * @return TRUE on success + * + * Returns: TRUE on success */ extern gboolean xkl_config_rec_set_to_root_window_property(const XklConfigRec @@ -169,44 +174,46 @@ extern "C" { engine); /** + * xkl_backup_names_prop: + * @engine: the engine + * * Backups current XKB configuration into some property - * if this property is not defined yet. - * @return TRUE on success + * + * Returns: TRUE on success */ extern gboolean xkl_backup_names_prop(XklEngine * engine); /** + * xkl_restore_names_prop: + * @engine: the engine + * * Restores XKB from the property saved by xkl_backup_names_prop - * @return TRUE on success - * @see xkl_backup_names_prop + * + * Returns: TRUE on success */ extern gboolean xkl_restore_names_prop(XklEngine * engine); -/** @} */ - -/** - * @defgroup xklconfig XklConfigRec management utilities - * Little utilities for managing XklConfigRec. - * @{ - */ - /** + * xkl_config_rec_reset: + * @data: record to reset + * * Resets the record (equal to Destroy and Init) - * @param data is a record to reset */ extern void xkl_config_rec_reset(XklConfigRec * data); /** - * Compares the records - * @param data1 is a record to compare - * @param data2 is another record - * @return TRUE if records are same + * xkl_config_rec_equals: + * @data1: record to compare + * @data2: another record + * + * Compares two records + * + * Returns: TRUE if records are same */ extern gboolean xkl_config_rec_equals(XklConfigRec * data1, XklConfigRec * data2); -/** @} */ - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/libxklavier/xkl_config_registry.h b/libxklavier/xkl_config_registry.h index 4daf649..a1c108e 100644 --- a/libxklavier/xkl_config_registry.h +++ b/libxklavier/xkl_config_registry.h @@ -1,7 +1,3 @@ -/** - * @file xkl_config_registry.h - */ - #ifndef __XKL_CONFIG_REGISTRY_H__ #define __XKL_CONFIG_REGISTRY_H__ @@ -13,8 +9,6 @@ extern "C" { #endif /* __cplusplus */ -#ifndef DOXYGEN_SHOULD_SKIP_THIS - typedef struct _XklConfigRegistry XklConfigRegistry; typedef struct _XklConfigRegistryPrivate XklConfigRegistryPrivate; typedef struct _XklConfigRegistryClass XklConfigRegistryClass; @@ -26,8 +20,6 @@ extern "C" { #define XKL_IS_CONFIG_REGISTRY_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), XKL_TYPE_CONFIG_REGISTRY)) #define XKL_CONFIG_REGISTRY_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS ((obj), XKL_TYPE_CONFIG_REGISTRY, XklConfigRegistryClass)) -#endif // DOXYGEN_SHOULD_SKIP_THIS - /** * The configuration manager. Corresponds to XML element "configItem". */ @@ -50,54 +42,66 @@ extern "C" { GObjectClass parent_class; }; /** + * xkl_config_registry_get_type: + * * Get type info for XConfig - * @return GType for XConfig + * + * Returns: GType for XConfig */ extern GType xkl_config_registry_get_type(void); /** + * xkl_config_registry_get_instance: + * @engine: the engine to use for accessing X in all the operations + * (like accessing root window properties etc) + * * Create new XklConfig - * @return new instance + * + * Returns: new instance */ extern XklConfigRegistry * xkl_config_registry_get_instance(XklEngine * engine); /** - * @defgroup xklconfiginitterm XKB configuration handling initialization and termination - * @{ - */ - -/** + * xkl_config_registry_load_from_file: + * @config: the config registry + * @file_name: file to load + * * Loads XML configuration registry - * @param file_name file name to load - * @return true on success + * + * Returns: TRUE on success */ extern gboolean xkl_config_registry_load_from_file(XklConfigRegistry * config, const gchar * file_name); /** - * Loads XML configuration registry - * @return true on success + * xkl_config_registry_load: + * @config: the config registry + * + * Loads XML configuration registry. The name is taken from X server + * (for XKB/libxkbfile, from the root window property) + * + * Returns: TRUE on success */ extern gboolean xkl_config_registry_load(XklConfigRegistry * config); /** + * xkl_config_registry_free: + * @config: the config registry + * * Frees XML configuration registry */ extern void xkl_config_registry_free(XklConfigRegistry * config); -/** @} */ - -/** - * @defgroup enum XKB configuration elements enumeration functions - * @{ - */ /** + * xkl_config_registry_foreach_model: + * @config: the config registry + * @func: callback to call for every model + * @data: anything which can be stored into the pointer + * * Enumerates keyboard models from the XML configuration registry - * @param func is a callback to call for every model - * @param data is anything which can be stored into the pointer */ extern void xkl_config_registry_foreach_model(XklConfigRegistry * config, @@ -105,9 +109,12 @@ extern "C" { func, gpointer data); /** + * xkl_config_registry_foreach_layout: + * @config: the config registry + * @func: callback to call for every layout + * @data: anything which can be stored into the pointer + * * Enumerates keyboard layouts from the XML configuration registry - * @param func is a callback to call for every layout - * @param data is anything which can be stored into the pointer */ extern void xkl_config_registry_foreach_layout(XklConfigRegistry * config, @@ -116,10 +123,13 @@ extern "C" { gpointer data); /** + * xkl_config_registry_foreach_layout_variant: + * @config: the config registry + * @layout_name: layout name for which variants will be listed + * @func: callback to call for every layout variant + * @data: anything which can be stored into the pointer + * * Enumerates keyboard layout variants from the XML configuration registry - * @param layout_name is the layout name for which variants will be listed - * @param func is a callback to call for every layout variant - * @param data is anything which can be stored into the pointer */ extern void xkl_config_registry_foreach_layout_variant(XklConfigRegistry * @@ -130,9 +140,12 @@ extern "C" { func, gpointer data); /** + * xkl_config_registry_foreach_option_group: + * @config: the config registry + * @func: callback to call for every option group + * @data: anything which can be stored into the pointer + * * Enumerates keyboard option groups from the XML configuration registry - * @param func is a callback to call for every option group - * @param data is anything which can be stored into the pointer */ extern void xkl_config_registry_foreach_option_group(XklConfigRegistry * @@ -141,11 +154,14 @@ extern "C" { gpointer data); /** - * Enumerates keyboard options from the XML configuration registry - * @param option_group_name is the option group name for which variants + * xkl_config_registry_foreach_option: + * @config: the config registry + * @option_group_name: option group name for which variants * will be listed - * @param func is a callback to call for every option - * @param data is anything which can be stored into the pointer + * @func: callback to call for every option + * @data: anything which can be stored into the pointer + * + * Enumerates keyboard options from the XML configuration registry */ extern void xkl_config_registry_foreach_option(XklConfigRegistry * config, @@ -155,18 +171,15 @@ extern "C" { func, gpointer data); -/** @} */ - /** - * @defgroup lookup XKB configuration element lookup functions - * @{ - */ - -/** - * Loads a keyboard model information from the XML configuration registry. - * @param item is a pointer to a XklConfigItem containing the name of the + * xkl_config_registry_find_model: + * @config: the config registry + * @item: pointer to a XklConfigItem containing the name of the * keyboard model. On successfull return, the descriptions are filled. - * @return TRUE if appropriate element was found and loaded + * + * Loads a keyboard model information from the XML configuration registry. + * + * Returns: TRUE if appropriate element was found and loaded */ extern gboolean xkl_config_registry_find_model(XklConfigRegistry * config, @@ -174,10 +187,14 @@ extern "C" { item); /** - * Loads a keyboard layout information from the XML configuration registry. - * @param item is a pointer to a XklConfigItem containing the name of the + * xkl_config_registry_find_layout: + * @config: the config registry + * @item: pointer to a XklConfigItem containing the name of the * keyboard layout. On successfull return, the descriptions are filled. - * @return TRUE if appropriate element was found and loaded + * + * Loads a keyboard layout information from the XML configuration registry. + * + * Returns: TRUE if appropriate element was found and loaded */ extern gboolean xkl_config_registry_find_layout(XklConfigRegistry * config, @@ -185,12 +202,16 @@ extern "C" { item); /** + * xkl_config_registry_find_variant: + * @config: the config registry + * @layout_name: name of the parent layout + * @item: pointer to a XklConfigItem containing the name of the + * keyboard layout variant. On successfull return, the descriptions are filled. + * * Loads a keyboard layout variant information from the XML configuration * registry. - * @param layout_name is a name of the parent layout - * @param item is a pointer to a XklConfigItem containing the name of the - * keyboard layout variant. On successfull return, the descriptions are filled. - * @return TRUE if appropriate element was found and loaded + * + * Returns: TRUE if appropriate element was found and loaded */ extern gboolean xkl_config_registry_find_variant(XklConfigRegistry * config, @@ -200,13 +221,17 @@ extern "C" { item); /** - * Loads a keyboard option group information from the XML configuration - * registry. - * @param item is a pointer to a XklConfigItem containing the name of the + * xkl_config_registry_find_option_group: + * @config: the config registry + * @item: pointer to a XklConfigItem containing the name of the * keyboard option group. On successfull return, the descriptions are filled. - * @param allow_multiple_selection is a pointer to some gboolean variable to fill + * @allow_multiple_selection: pointer to some gboolean variable to fill * the corresponding attribute of XML element "group". - * @return TRUE if appropriate element was found and loaded + * + * Loads a keyboard option group information from the XML configuration + * registry. + * + * Returns: TRUE if appropriate element was found and loaded */ extern gboolean xkl_config_registry_find_option_group(XklConfigRegistry * @@ -216,12 +241,16 @@ extern "C" { allow_multiple_selection); /** + * xkl_config_registry_find_option: + * @config: the config registry + * @option_group_name: name of the option group + * @item: pointer to a XklConfigItem containing the name of the + * keyboard option. On successfull return, the descriptions are filled. + * * Loads a keyboard option information from the XML configuration * registry. - * @param option_group_name is a name of the option group - * @param item is a pointer to a XklConfigItem containing the name of the - * keyboard option. On successfull return, the descriptions are filled. - * @return TRUE if appropriate element was found and loaded + * + * Returns: TRUE if appropriate element was found and loaded */ extern gboolean xkl_config_registry_find_option(XklConfigRegistry * config, @@ -229,8 +258,6 @@ extern "C" { option_group_name, XklConfigItem * item); -/** @} */ - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/libxklavier/xkl_engine_marshal.h b/libxklavier/xkl_engine_marshal.h index 1481b87..c1e4115 100644 --- a/libxklavier/xkl_engine_marshal.h +++ b/libxklavier/xkl_engine_marshal.h @@ -5,27 +5,23 @@ #include G_BEGIN_DECLS - /* VOID:VOID (marshal.list:1) */ #define xkl_engine_VOID__VOID g_cclosure_marshal_VOID__VOID - /* INT:LONG,LONG (marshal.list:2) */ -extern void xkl_engine_INT__LONG_LONG (GClosure *closure, - GValue *return_value, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint, - gpointer marshal_data); +extern void xkl_engine_INT__LONG_LONG(GClosure * closure, + GValue * return_value, + guint n_param_values, + const GValue * param_values, + gpointer invocation_hint, + gpointer marshal_data); /* VOID:FLAGS,INT,BOOLEAN (marshal.list:3) */ -extern void xkl_engine_VOID__FLAGS_INT_BOOLEAN (GClosure *closure, - GValue *return_value, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint, - gpointer marshal_data); +extern void xkl_engine_VOID__FLAGS_INT_BOOLEAN(GClosure * closure, + GValue * return_value, + guint n_param_values, + const GValue * param_values, + gpointer invocation_hint, + gpointer marshal_data); G_END_DECLS - -#endif /* __xkl_engine_MARSHAL_H__ */ - +#endif /* __xkl_engine_MARSHAL_H__ */ diff --git a/libxklavier/xklavier_config.c b/libxklavier/xklavier_config.c index 3c1d166..20a6652 100644 --- a/libxklavier/xklavier_config.c +++ b/libxklavier/xklavier_config.c @@ -89,7 +89,7 @@ xkl_read_config_item(xmlNodePtr iptr, XklConfigItem * item) xkl_get_language_priority((gchar *) lang); - /** + /* * Find desc/shortdesc with highest priority */ if (!g_ascii_strcasecmp(node_name, @@ -124,7 +124,7 @@ xkl_read_config_item(xmlNodePtr iptr, XklConfigItem * item) if (short_desc_element == NULL) short_desc_element = nt_short_desc_element; - /** + /* * Actually, here we should have some code to find * the correct localized description... */ @@ -535,7 +535,7 @@ xkl_config_registry_find_option(XklConfigRegistry * config, option_group_name, pitem, NULL); } -/** +/* * Calling through vtable */ gboolean diff --git a/libxklavier/xklavier_evt.c b/libxklavier/xklavier_evt.c index a367c5d..b6a628b 100644 --- a/libxklavier/xklavier_evt.c +++ b/libxklavier/xklavier_evt.c @@ -121,11 +121,11 @@ xkl_engine_process_focus_in_evt(XklEngine * engine, xkl_debug(150, "Leaving transparent window\n"); - /* - * Reload the current state from the current window. - * Do not do it for transparent window - we keep the state from - * the _previous_ window. - */ + /* + * Reload the current state from the current window. + * Do not do it for transparent window - we keep the state from + * the _previous_ window. + */ if (!old_win_transparent && xkl_engine_get_toplevel_window_state(engine, xkl_engine_priv @@ -195,11 +195,11 @@ xkl_engine_process_focus_in_evt(XklEngine * engine, group, selected_window_state. group); - /* - * For fast mouse movements - the state is probably not updated yet - * (because of the group change notification being late). - * so we'll enforce the update. But this should only happen in GPA mode - */ + /* + * For fast mouse movements - the state is probably not updated yet + * (because of the group change notification being late). + * so we'll enforce the update. But this should only happen in GPA mode + */ xkl_engine_update_current_state (engine, selected_window_state. @@ -495,9 +495,9 @@ xkl_engine_process_state_modification(XklEngine * engine, return; } - /* - * Only if we manage states - otherwise xkl_engine_priv(engine,curr_toplvl_win) does not make sense - */ + /* + * Only if we manage states - otherwise xkl_engine_priv(engine,curr_toplvl_win) does not make sense + */ if (!xkl_engine_find_toplevel_window (engine, focused, &focused_toplevel) && xkl_engine_priv(engine, @@ -518,9 +518,9 @@ xkl_engine_process_state_modification(XklEngine * engine, if (focused_toplevel != xkl_engine_priv(engine, curr_toplvl_win)) { - /* - * If not state - we got the new window - */ + /* + * If not state - we got the new window + */ if (!xkl_engine_get_toplevel_window_state (engine, focused_toplevel, &old_state)) { xkl_engine_update_current_state(engine, @@ -534,9 +534,9 @@ xkl_engine_process_state_modification(XklEngine * engine, &xkl_engine_priv(engine, curr_state)); } - /* - * There is state - just get the state from the window - */ + /* + * There is state - just get the state from the window + */ else { grp = old_state.group; inds = old_state.indicators; diff --git a/libxklavier/xklavier_evt_xkb.c b/libxklavier/xklavier_evt_xkb.c index c5b9c73..e0d20a2 100644 --- a/libxklavier/xklavier_evt_xkb.c +++ b/libxklavier/xklavier_evt_xkb.c @@ -30,9 +30,9 @@ xkl_xkb_process_x_event(XklEngine * engine, XEvent * xev) xkl_debug(150, "Xkb event detected\n"); switch (kev->any.xkb_type) { - /* - * Group is changed! - */ + /* + * Group is changed! + */ case XkbStateNotify: #define GROUP_CHANGE_MASK \ ( XkbGroupStateMask | XkbGroupBaseMask | XkbGroupLatchMask | XkbGroupLockMask ) @@ -63,9 +63,9 @@ xkl_xkb_process_x_event(XklEngine * engine, XEvent * xev) break; - /* - * Indicators are changed! - */ + /* + * Indicators are changed! + */ case XkbIndicatorStateNotify: xkl_debug(150, "XkbIndicatorStateNotify\n"); @@ -85,9 +85,9 @@ xkl_xkb_process_x_event(XklEngine * engine, XEvent * xev) 0, inds, TRUE); break; - /* - * The configuration is changed! - */ + /* + * The configuration is changed! + */ case XkbIndicatorMapNotify: case XkbControlsNotify: case XkbNamesNotify: @@ -105,9 +105,9 @@ xkl_xkb_process_x_event(XklEngine * engine, XEvent * xev) "XKB event: XkbNewKeyboardNotify"); break; - /* - * ...Not interested... - */ + /* + * ...Not interested... + */ default: xkl_debug(150, "Unknown XKB event %d [%s]\n", kev->any.xkb_type, diff --git a/libxklavier/xklavier_evt_xmm.c b/libxklavier/xklavier_evt_xmm.c index eba326d..5e4b6c7 100644 --- a/libxklavier/xklavier_evt_xmm.c +++ b/libxklavier/xklavier_evt_xmm.c @@ -49,7 +49,7 @@ xkl_xmm_process_property_event(XklEngine * engine, XPropertyEvent * kpe) Atom state_atom = xkl_engine_backend(engine, XklXmm, state_atom); xkl_debug(200, "Processing the PropertyNotify event: %d/%d\n", kpe->atom, state_atom); - /** + /* * Group is changed! */ if (kpe->atom == state_atom) { @@ -80,7 +80,7 @@ xkl_xmm_process_property_event(XklEngine * engine, XPropertyEvent * kpe) 0, False); } } else - /** + /* * Configuration is changed! */ if (kpe->atom == xkl_engine_priv(engine, base_config_atom)) { @@ -91,7 +91,7 @@ xkl_xmm_process_property_event(XklEngine * engine, XPropertyEvent * kpe) return 0; } -/** +/* * XMM event handler */ gint @@ -110,7 +110,7 @@ xkl_xmm_process_x_event(XklEngine * engine, XEvent * xev) return 0; } -/** +/* * We have to find which of Shift/Lock/Control/ModX masks * belong to Caps/Num/Scroll lock */ diff --git a/libxklavier/xklavier_private.h b/libxklavier/xklavier_private.h index 92d0182..6688d99 100644 --- a/libxklavier/xklavier_private.h +++ b/libxklavier/xklavier_private.h @@ -45,170 +45,170 @@ struct _XklEnginePrivate { Display *display; - /* - * Backend name - */ + /* + * Backend name + */ const gchar *backend_id; - /* - * Functions supported by the backend, combination of XKLF_* constants - */ + /* + * Functions supported by the backend, combination of XKLF_* constants + */ guint8 features; - /* - * Activates the configuration. - * xkb: create proper the XkbDescRec and send it to the server - * xmodmap: save the property, init layout #1 - */ + /* + * Activates the configuration. + * xkb: create proper the XkbDescRec and send it to the server + * xmodmap: save the property, init layout #1 + */ gboolean(*activate_config_rec) (XklEngine * engine, const XklConfigRec * data); - /* - * Background-specific initialization. - * xkb: XkbInitAtoms - init internal xkb atoms table - * xmodmap: void. - */ + /* + * Background-specific initialization. + * xkb: XkbInitAtoms - init internal xkb atoms table + * xmodmap: void. + */ void (*init_config_registry) (XklConfigRegistry * config); - /* - * Loads the registry tree into DOM (using whatever path(s)) - * The XklVTConfigFreeRegistry is static - no virtualization necessary. - * xkb: loads xml from XKB_BASE+"/rules/"+ruleset+".xml" - * xmodmap: loads xml from XMODMAP_BASE+"/"+ruleset+".xml" - */ + /* + * Loads the registry tree into DOM (using whatever path(s)) + * The XklVTConfigFreeRegistry is static - no virtualization necessary. + * xkb: loads xml from XKB_BASE+"/rules/"+ruleset+".xml" + * xmodmap: loads xml from XMODMAP_BASE+"/"+ruleset+".xml" + */ gboolean(*load_config_registry) (XklConfigRegistry * config); - /* - * Write the configuration into the file (binary/textual) - * xkb: write xkb or xkm file - * xmodmap: if text requested, just dump XklConfigRec to the - * file - not really useful. If binary - fail (not supported) - */ + /* + * Write the configuration into the file (binary/textual) + * xkb: write xkb or xkm file + * xmodmap: if text requested, just dump XklConfigRec to the + * file - not really useful. If binary - fail (not supported) + */ gboolean(*write_config_rec_to_file) (XklEngine * engine, const gchar * file_name, const XklConfigRec * data, const gboolean binary); - /* - * Get the list of the group names - * xkb: return cached list of the group names - * xmodmap: return the list of layouts from the internal XklConfigRec - */ + /* + * Get the list of the group names + * xkb: return cached list of the group names + * xmodmap: return the list of layouts from the internal XklConfigRec + */ const gchar **(*get_groups_names) (XklEngine * engine); - /* - * Get the maximum number of loaded groups - * xkb: returns 1 or XkbNumKbdGroups - * xmodmap: return 0 - */ + /* + * Get the maximum number of loaded groups + * xkb: returns 1 or XkbNumKbdGroups + * xmodmap: return 0 + */ guint(*get_max_num_groups) (XklEngine * engine); - /* - * Get the number of loaded groups - * xkb: return from the cached XkbDesc - * xmodmap: return number of layouts from internal XklConfigRec - */ + /* + * Get the number of loaded groups + * xkb: return from the cached XkbDesc + * xmodmap: return number of layouts from internal XklConfigRec + */ guint(*get_num_groups) (XklEngine * engine); - /* - * Switches the keyboard to the group N - * xkb: simple one-liner to call the XKB function - * xmodmap: changes the root window property - * (listener invokes xmodmap with appropriate config file). - */ + /* + * Switches the keyboard to the group N + * xkb: simple one-liner to call the XKB function + * xmodmap: changes the root window property + * (listener invokes xmodmap with appropriate config file). + */ void (*lock_group) (XklEngine * engine, gint group); - /* - * Handles X events. - * xkb: XkbEvent handling - * xmodmap: keep track on the root window properties. What else can we do? - */ + /* + * Handles X events. + * xkb: XkbEvent handling + * xmodmap: keep track on the root window properties. What else can we do? + */ gint(*process_x_event) (XklEngine * engine, XEvent * xev); - /* - * Flushes the cached server config info. - * xkb: frees XkbDesc - * xmodmap: frees internal XklConfigRec - */ + /* + * Flushes the cached server config info. + * xkb: frees XkbDesc + * xmodmap: frees internal XklConfigRec + */ void (*free_all_info) (XklEngine * engine); - /* - * Compares the cached info with the actual one, from the server - * xkb: Compares some parts of XkbDescPtr - * xmodmap: returns False - */ + /* + * Compares the cached info with the actual one, from the server + * xkb: Compares some parts of XkbDescPtr + * xmodmap: returns False + */ gboolean(*if_cached_info_equals_actual) (XklEngine * engine); - /* - * Loads the configuration info from the server - * xkb: loads XkbDesc, names, indicators - * xmodmap: loads internal XklConfigRec from server - */ + /* + * Loads the configuration info from the server + * xkb: loads XkbDesc, names, indicators + * xmodmap: loads internal XklConfigRec from server + */ gboolean(*load_all_info) (XklEngine * engine); - /* - * Gets the current state - * xkb: XkbGetState and XkbGetIndicatorState - * xmodmap: check the root window property (regarding the group) - */ + /* + * Gets the current state + * xkb: XkbGetState and XkbGetIndicatorState + * xmodmap: check the root window property (regarding the group) + */ void (*get_server_state) (XklEngine * engine, XklState * current_state_out); - /* - * Stop tracking the keyboard-related events - * xkb: XkbSelectEvents(..., 0) - * xmodmap: Ungrab the switching shortcut. - */ + /* + * Stop tracking the keyboard-related events + * xkb: XkbSelectEvents(..., 0) + * xmodmap: Ungrab the switching shortcut. + */ gint(*pause_listen) (XklEngine * engine); - /* - * Start tracking the keyboard-related events - * xkb: XkbSelectEvents + XkbSelectEventDetails - * xmodmap: Grab the switching shortcut. - */ + /* + * Start tracking the keyboard-related events + * xkb: XkbSelectEvents + XkbSelectEventDetails + * xmodmap: Grab the switching shortcut. + */ gint(*resume_listen) (XklEngine * engine); - /* - * Set the indicators state from the XklState - * xkb: XklSetIndicator for all indicators - * xmodmap: NULL. Not supported - */ + /* + * Set the indicators state from the XklState + * xkb: XklSetIndicator for all indicators + * xmodmap: NULL. Not supported + */ void (*set_indicators) (XklEngine * engine, const XklState * window_state); - /* - * Perform the cleanup - */ + /* + * Perform the cleanup + */ void (*finalize) (XklEngine * engine); /* all data is private - no direct access */ - /* - * The base configuration atom. - * xkb: _XKB_RF_NAMES_PROP_ATOM - * xmodmap: "_XMM_NAMES" - */ + /* + * The base configuration atom. + * xkb: _XKB_RF_NAMES_PROP_ATOM + * xmodmap: "_XMM_NAMES" + */ Atom base_config_atom; - /* - * The configuration backup atom - * xkb: "_XKB_RULES_NAMES_BACKUP" - * xmodmap: "_XMM_NAMES_BACKUP" - */ + /* + * The configuration backup atom + * xkb: "_XKB_RULES_NAMES_BACKUP" + * xmodmap: "_XMM_NAMES_BACKUP" + */ Atom backup_config_atom; - /* - * Fallback for missing model - */ + /* + * Fallback for missing model + */ const gchar *default_model; - /* - * Fallback for missing layout - */ + /* + * Fallback for missing layout + */ const gchar *default_layout; - /* - * Any stuff backend might need to put in here - */ + /* + * Any stuff backend might need to put in here + */ gpointer backend; }; diff --git a/libxklavier/xklavier_toplevel.c b/libxklavier/xklavier_toplevel.c index 6b19d7e..07dc7a4 100644 --- a/libxklavier/xklavier_toplevel.c +++ b/libxklavier/xklavier_toplevel.c @@ -197,10 +197,10 @@ xkl_engine_find_toplevel_window(XklEngine * engine, Window win, return FALSE; } - /* - * Here we first check the children (in case win is just above some "App Window") - * and then go upstairs - */ + /* + * Here we first check the children (in case win is just above some "App Window") + * and then go upstairs + */ child = children; while (num) { if (xkl_engine_if_window_has_wm_state(engine, *child)) { diff --git a/libxklavier/xklavier_xkb.c b/libxklavier/xklavier_xkb.c index fda8bee..b32da71 100644 --- a/libxklavier/xklavier_xkb.c +++ b/libxklavier/xklavier_xkb.c @@ -190,7 +190,7 @@ xkl_xkb_if_cached_info_equals_actual(XklEngine * engine) rv = i < 0; } } - /** + /* * in case of failure, reuse in _XklXkbLoadAllInfo * in case of success - free it */ @@ -207,7 +207,7 @@ xkl_xkb_if_cached_info_equals_actual(XklEngine * engine) return rv; } -/** +/* * Load some XKB parameters */ gboolean @@ -287,7 +287,7 @@ xkl_xkb_lock_group(XklEngine * engine, gint group) XSync(display, False); } -/** +/* * Updates current internal state from X state */ void -- cgit v1.2.1