Add doc comment for libeekboard.
This commit is contained in:
		@ -360,6 +360,12 @@ eekboard_context_service_class_init (EekboardContextServiceClass *klass)
 | 
				
			|||||||
    gobject_class->dispose = eekboard_context_service_dispose;
 | 
					    gobject_class->dispose = eekboard_context_service_dispose;
 | 
				
			||||||
    gobject_class->finalize = eekboard_context_service_finalize;
 | 
					    gobject_class->finalize = eekboard_context_service_finalize;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * EekboardContextService::enabled:
 | 
				
			||||||
 | 
					     * @context: an #EekboardContextService
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * Emitted when @context is enabled.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    signals[ENABLED] =
 | 
					    signals[ENABLED] =
 | 
				
			||||||
        g_signal_new (I_("enabled"),
 | 
					        g_signal_new (I_("enabled"),
 | 
				
			||||||
                      G_TYPE_FROM_CLASS(gobject_class),
 | 
					                      G_TYPE_FROM_CLASS(gobject_class),
 | 
				
			||||||
@ -371,6 +377,12 @@ eekboard_context_service_class_init (EekboardContextServiceClass *klass)
 | 
				
			|||||||
                      G_TYPE_NONE,
 | 
					                      G_TYPE_NONE,
 | 
				
			||||||
                      0);
 | 
					                      0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * EekboardContextService::disabled:
 | 
				
			||||||
 | 
					     * @context: an #EekboardContextService
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * Emitted when @context is enabled.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    signals[DISABLED] =
 | 
					    signals[DISABLED] =
 | 
				
			||||||
        g_signal_new (I_("disabled"),
 | 
					        g_signal_new (I_("disabled"),
 | 
				
			||||||
                      G_TYPE_FROM_CLASS(gobject_class),
 | 
					                      G_TYPE_FROM_CLASS(gobject_class),
 | 
				
			||||||
@ -382,6 +394,11 @@ eekboard_context_service_class_init (EekboardContextServiceClass *klass)
 | 
				
			|||||||
                      G_TYPE_NONE,
 | 
					                      G_TYPE_NONE,
 | 
				
			||||||
                      0);
 | 
					                      0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * EekboardContextService:object-path:
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * D-Bus object path.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    pspec = g_param_spec_string ("object-path",
 | 
					    pspec = g_param_spec_string ("object-path",
 | 
				
			||||||
                                 "Object-path",
 | 
					                                 "Object-path",
 | 
				
			||||||
                                 "Object-path",
 | 
					                                 "Object-path",
 | 
				
			||||||
@ -391,6 +408,11 @@ eekboard_context_service_class_init (EekboardContextServiceClass *klass)
 | 
				
			|||||||
                                     PROP_OBJECT_PATH,
 | 
					                                     PROP_OBJECT_PATH,
 | 
				
			||||||
                                     pspec);
 | 
					                                     pspec);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * EekboardContextService:connection:
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * D-Bus connection.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    pspec = g_param_spec_object ("connection",
 | 
					    pspec = g_param_spec_object ("connection",
 | 
				
			||||||
                                 "Connection",
 | 
					                                 "Connection",
 | 
				
			||||||
                                 "Connection",
 | 
					                                 "Connection",
 | 
				
			||||||
@ -400,6 +422,11 @@ eekboard_context_service_class_init (EekboardContextServiceClass *klass)
 | 
				
			|||||||
                                     PROP_CONNECTION,
 | 
					                                     PROP_CONNECTION,
 | 
				
			||||||
                                     pspec);
 | 
					                                     pspec);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * EekboardContextService:client-name:
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * Name of a client who created this context service.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    pspec = g_param_spec_string ("client-name",
 | 
					    pspec = g_param_spec_string ("client-name",
 | 
				
			||||||
                                 "Client-name",
 | 
					                                 "Client-name",
 | 
				
			||||||
                                 "Client-name",
 | 
					                                 "Client-name",
 | 
				
			||||||
@ -409,6 +436,11 @@ eekboard_context_service_class_init (EekboardContextServiceClass *klass)
 | 
				
			|||||||
                                     PROP_CLIENT_NAME,
 | 
					                                     PROP_CLIENT_NAME,
 | 
				
			||||||
                                     pspec);
 | 
					                                     pspec);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * EekboardContextService:keyboard:
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * An #EekKeyboard currently active in this context.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    pspec = g_param_spec_object ("keyboard",
 | 
					    pspec = g_param_spec_object ("keyboard",
 | 
				
			||||||
                                 "Keyboard",
 | 
					                                 "Keyboard",
 | 
				
			||||||
                                 "Keyboard",
 | 
					                                 "Keyboard",
 | 
				
			||||||
@ -418,6 +450,11 @@ eekboard_context_service_class_init (EekboardContextServiceClass *klass)
 | 
				
			|||||||
                                     PROP_KEYBOARD,
 | 
					                                     PROP_KEYBOARD,
 | 
				
			||||||
                                     pspec);
 | 
					                                     pspec);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * EekboardContextService:visible:
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * Flag to indicate if keyboard is visible or not.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    pspec = g_param_spec_boolean ("visible",
 | 
					    pspec = g_param_spec_boolean ("visible",
 | 
				
			||||||
                                  "Visible",
 | 
					                                  "Visible",
 | 
				
			||||||
                                  "Visible",
 | 
					                                  "Visible",
 | 
				
			||||||
@ -427,6 +464,11 @@ eekboard_context_service_class_init (EekboardContextServiceClass *klass)
 | 
				
			|||||||
                                     PROP_VISIBLE,
 | 
					                                     PROP_VISIBLE,
 | 
				
			||||||
                                     pspec);
 | 
					                                     pspec);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * EekboardContextService:fullscreen:
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * Flag to indicate if keyboard is rendered in fullscreen mode.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    pspec = g_param_spec_boolean ("fullscreen",
 | 
					    pspec = g_param_spec_boolean ("fullscreen",
 | 
				
			||||||
                                  "Fullscreen",
 | 
					                                  "Fullscreen",
 | 
				
			||||||
                                  "Fullscreen",
 | 
					                                  "Fullscreen",
 | 
				
			||||||
@ -847,6 +889,13 @@ handle_method_call (GDBusConnection       *connection,
 | 
				
			|||||||
    g_return_if_reached ();
 | 
					    g_return_if_reached ();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * eekboard_context_service_enable:
 | 
				
			||||||
 | 
					 * @context: an #EekboardContextService
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Enable @context.  This function is called when @context is pushed
 | 
				
			||||||
 | 
					 * by eekboard_service_push_context().
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
eekboard_context_service_enable (EekboardContextService *context)
 | 
					eekboard_context_service_enable (EekboardContextService *context)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -872,6 +921,13 @@ eekboard_context_service_enable (EekboardContextService *context)
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * eekboard_context_service_disable:
 | 
				
			||||||
 | 
					 * @context: an #EekboardContextService
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Disable @context.  This function is called when @context is pushed
 | 
				
			||||||
 | 
					 * by eekboard_service_pop_context().
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
eekboard_context_service_disable (EekboardContextService *context)
 | 
					eekboard_context_service_disable (EekboardContextService *context)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -897,13 +953,27 @@ eekboard_context_service_disable (EekboardContextService *context)
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const EekKeyboard *
 | 
					/**
 | 
				
			||||||
 | 
					 * eekboard_context_service_get_keyboard:
 | 
				
			||||||
 | 
					 * @context: an #EekboardContextService
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Get keyboard currently active in @context.
 | 
				
			||||||
 | 
					 * Returns: (transfer none): an #EekKeyboard
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					EekKeyboard *
 | 
				
			||||||
eekboard_context_service_get_keyboard (EekboardContextService *context)
 | 
					eekboard_context_service_get_keyboard (EekboardContextService *context)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
 | 
					    EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
 | 
				
			||||||
    return priv->keyboard;
 | 
					    return priv->keyboard;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * eekboard_context_service_get_fullscreen:
 | 
				
			||||||
 | 
					 * @context: an #EekboardContextService
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Check if keyboard is rendered in fullscreen mode in @context.
 | 
				
			||||||
 | 
					 * Returns: %TRUE or %FALSE
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
gboolean
 | 
					gboolean
 | 
				
			||||||
eekboard_context_service_get_fullscreen (EekboardContextService *context)
 | 
					eekboard_context_service_get_fullscreen (EekboardContextService *context)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -911,6 +981,13 @@ eekboard_context_service_get_fullscreen (EekboardContextService *context)
 | 
				
			|||||||
    return priv->fullscreen;
 | 
					    return priv->fullscreen;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * eekboard_context_service_get_client_name:
 | 
				
			||||||
 | 
					 * @context: an #EekboardContextService
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Get the name of client which created @context.
 | 
				
			||||||
 | 
					 * Returns: (transfer none): a string
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
const gchar *
 | 
					const gchar *
 | 
				
			||||||
eekboard_context_service_get_client_name (EekboardContextService *context)
 | 
					eekboard_context_service_get_client_name (EekboardContextService *context)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
				
			|||||||
@ -40,16 +40,31 @@ typedef struct _EekboardContextService EekboardContextService;
 | 
				
			|||||||
typedef struct _EekboardContextServiceClass EekboardContextServiceClass;
 | 
					typedef struct _EekboardContextServiceClass EekboardContextServiceClass;
 | 
				
			||||||
typedef struct _EekboardContextServicePrivate EekboardContextServicePrivate;
 | 
					typedef struct _EekboardContextServicePrivate EekboardContextServicePrivate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * EekboardContextService:
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * The #EekboardContextService structure contains only private data
 | 
				
			||||||
 | 
					 * and should only be accessed using the provided API.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
struct _EekboardContextService {
 | 
					struct _EekboardContextService {
 | 
				
			||||||
    GObject parent;
 | 
					    GObject parent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekboardContextServicePrivate *priv;
 | 
					    EekboardContextServicePrivate *priv;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * EekboardContextServiceClass:
 | 
				
			||||||
 | 
					 * @create_keyboard: virtual function for create a keyboard from string
 | 
				
			||||||
 | 
					 * @show_keyboard: virtual function for show a keyboard
 | 
				
			||||||
 | 
					 * @hide_keyboard: virtual function for hide a keyboard
 | 
				
			||||||
 | 
					 * @enabled: class handler for #EekboardContextService::enabled signal
 | 
				
			||||||
 | 
					 * @disabled: class handler for #EekboardContextService::disabled signal
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
struct _EekboardContextServiceClass {
 | 
					struct _EekboardContextServiceClass {
 | 
				
			||||||
    /*< private >*/
 | 
					    /*< private >*/
 | 
				
			||||||
    GObjectClass parent_class;
 | 
					    GObjectClass parent_class;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /*< public >*/
 | 
				
			||||||
    EekKeyboard *(*create_keyboard)    (EekboardContextService *self,
 | 
					    EekKeyboard *(*create_keyboard)    (EekboardContextService *self,
 | 
				
			||||||
                                        const gchar            *keyboard_type);
 | 
					                                        const gchar            *keyboard_type);
 | 
				
			||||||
    void         (*show_keyboard)      (EekboardContextService *self);
 | 
					    void         (*show_keyboard)      (EekboardContextService *self);
 | 
				
			||||||
@ -64,18 +79,16 @@ struct _EekboardContextServiceClass {
 | 
				
			|||||||
    gpointer pdummy[24];
 | 
					    gpointer pdummy[24];
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
GType              eekboard_context_service_get_type
 | 
					GType         eekboard_context_service_get_type
 | 
				
			||||||
                   (void) G_GNUC_CONST;
 | 
					                                              (void) G_GNUC_CONST;
 | 
				
			||||||
void               eekboard_context_service_enable
 | 
					void          eekboard_context_service_enable (EekboardContextService *context);
 | 
				
			||||||
                   (EekboardContextService *context);
 | 
					void          eekboard_context_service_disable (EekboardContextService *context);
 | 
				
			||||||
void               eekboard_context_service_disable
 | 
					EekKeyboard  *eekboard_context_service_get_keyboard
 | 
				
			||||||
                   (EekboardContextService *context);
 | 
					                                              (EekboardContextService *context);
 | 
				
			||||||
const EekKeyboard *eekboard_context_service_get_keyboard
 | 
					gboolean      eekboard_context_service_get_fullscreen
 | 
				
			||||||
                   (EekboardContextService *context);
 | 
					                                              (EekboardContextService *context);
 | 
				
			||||||
gboolean           eekboard_context_service_get_fullscreen
 | 
					const gchar * eekboard_context_service_get_client_name
 | 
				
			||||||
                   (EekboardContextService *context);
 | 
					                                              (EekboardContextService *context);
 | 
				
			||||||
const gchar *      eekboard_context_service_get_client_name
 | 
					 | 
				
			||||||
                   (EekboardContextService *context);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
G_END_DECLS
 | 
					G_END_DECLS
 | 
				
			||||||
#endif  /* EEKBOARD_CONTEXT_SERVICE_H */
 | 
					#endif  /* EEKBOARD_CONTEXT_SERVICE_H */
 | 
				
			||||||
 | 
				
			|||||||
@ -247,6 +247,11 @@ eekboard_service_class_init (EekboardServiceClass *klass)
 | 
				
			|||||||
                      G_TYPE_NONE,
 | 
					                      G_TYPE_NONE,
 | 
				
			||||||
                      0);
 | 
					                      0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * EekboardService:object-path:
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * D-Bus object path.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    pspec = g_param_spec_string ("object-path",
 | 
					    pspec = g_param_spec_string ("object-path",
 | 
				
			||||||
                                 "Object-path",
 | 
					                                 "Object-path",
 | 
				
			||||||
                                 "Object-path",
 | 
					                                 "Object-path",
 | 
				
			||||||
@ -256,6 +261,11 @@ eekboard_service_class_init (EekboardServiceClass *klass)
 | 
				
			|||||||
                                     PROP_OBJECT_PATH,
 | 
					                                     PROP_OBJECT_PATH,
 | 
				
			||||||
                                     pspec);
 | 
					                                     pspec);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * EekboardService:connection:
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * D-Bus connection.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    pspec = g_param_spec_object ("connection",
 | 
					    pspec = g_param_spec_object ("connection",
 | 
				
			||||||
                                 "Connection",
 | 
					                                 "Connection",
 | 
				
			||||||
                                 "Connection",
 | 
					                                 "Connection",
 | 
				
			||||||
@ -477,9 +487,16 @@ handle_method_call (GDBusConnection       *connection,
 | 
				
			|||||||
    g_return_if_reached ();
 | 
					    g_return_if_reached ();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * eekboard_service_new:
 | 
				
			||||||
 | 
					 * @connection: a #GDBusConnection
 | 
				
			||||||
 | 
					 * @object_path: object path
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Create an empty server for testing purpose.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
EekboardService *
 | 
					EekboardService *
 | 
				
			||||||
eekboard_service_new (const gchar     *object_path,
 | 
					eekboard_service_new (GDBusConnection *connection,
 | 
				
			||||||
                      GDBusConnection *connection)
 | 
					                      const gchar     *object_path)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    return g_object_new (EEKBOARD_TYPE_SERVICE,
 | 
					    return g_object_new (EEKBOARD_TYPE_SERVICE,
 | 
				
			||||||
                         "object-path", object_path,
 | 
					                         "object-path", object_path,
 | 
				
			||||||
 | 
				
			|||||||
@ -38,12 +38,23 @@ typedef struct _EekboardService EekboardService;
 | 
				
			|||||||
typedef struct _EekboardServiceClass EekboardServiceClass;
 | 
					typedef struct _EekboardServiceClass EekboardServiceClass;
 | 
				
			||||||
typedef struct _EekboardServicePrivate EekboardServicePrivate;
 | 
					typedef struct _EekboardServicePrivate EekboardServicePrivate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * EekboardService:
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * The #EekboardService structure contains only private data and
 | 
				
			||||||
 | 
					 * should only be accessed using the provided API.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
struct _EekboardService {
 | 
					struct _EekboardService {
 | 
				
			||||||
 | 
					    /*< private >*/
 | 
				
			||||||
    GObject parent;
 | 
					    GObject parent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EekboardServicePrivate *priv;
 | 
					    EekboardServicePrivate *priv;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * EekboardServiceClass:
 | 
				
			||||||
 | 
					 * @create_context: virtual function for creating a context
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
struct _EekboardServiceClass {
 | 
					struct _EekboardServiceClass {
 | 
				
			||||||
    /*< private >*/
 | 
					    /*< private >*/
 | 
				
			||||||
    GObjectClass parent_class;
 | 
					    GObjectClass parent_class;
 | 
				
			||||||
@ -59,8 +70,8 @@ struct _EekboardServiceClass {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
GType             eekboard_service_get_type (void) G_GNUC_CONST;
 | 
					GType             eekboard_service_get_type (void) G_GNUC_CONST;
 | 
				
			||||||
EekboardService * eekboard_service_new      (const gchar     *object_path,
 | 
					EekboardService * eekboard_service_new      (GDBusConnection *connection,
 | 
				
			||||||
                                             GDBusConnection *connection);
 | 
					                                             const gchar     *object_path);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
G_END_DECLS
 | 
					G_END_DECLS
 | 
				
			||||||
#endif  /* EEKBOARD_SERVICE_H */
 | 
					#endif  /* EEKBOARD_SERVICE_H */
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user