aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-command-manager.c25
-rw-r--r--embed/ephy-command-manager.h6
2 files changed, 28 insertions, 3 deletions
diff --git a/embed/ephy-command-manager.c b/embed/ephy-command-manager.c
index 2f9375d9e..9161b7a8c 100644
--- a/embed/ephy-command-manager.c
+++ b/embed/ephy-command-manager.c
@@ -57,6 +57,15 @@ ephy_command_manager_base_init (gpointer g_class)
if (!initialized)
{
+/**
+ * EphyCommandManager::command-changed:
+ * @manager:
+ * @command: The command whose avalability has changed
+ *
+ * The ::command-changed signal is emitted when @command has changed from being
+ * available to unavailable, or vice-versa. The new availability can be tested
+ * with ephy_command_manager_can_do_command().
+ **/
g_signal_new ("command_changed",
EPHY_TYPE_COMMAND_MANAGER,
G_SIGNAL_RUN_FIRST,
@@ -71,6 +80,13 @@ ephy_command_manager_base_init (gpointer g_class)
}
}
+/**
+ * ephy_command_manager_do_command:
+ * @manager: an #EphyCommandManager
+ * @command: the command
+ *
+ * Performs @command.
+ **/
void
ephy_command_manager_do_command (EphyCommandManager *manager,
const char *command)
@@ -79,6 +95,15 @@ ephy_command_manager_do_command (EphyCommandManager *manager,
iface->do_command (manager, command);
}
+/**
+ * ephy_command_manager_can_do_command:
+ * @manager: an #EphyCommandManager
+ * @command: the command
+ *
+ * Returns %TRUE if @command can be performed.
+ *
+ * Return value: %TRUE if @command can be performed.
+ **/
gboolean
ephy_command_manager_can_do_command (EphyCommandManager *manager,
const char *command)
diff --git a/embed/ephy-command-manager.h b/embed/ephy-command-manager.h
index aee7004d3..b64c1c8b1 100644
--- a/embed/ephy-command-manager.h
+++ b/embed/ephy-command-manager.h
@@ -33,10 +33,10 @@ G_BEGIN_DECLS
#define EPHY_IS_COMMAND_MANAGER_IFACE(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_COMMAND_MANAGER))
#define EPHY_COMMAND_MANAGER_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EPHY_TYPE_COMMAND_MANAGER, EphyCommandManagerIface))
-typedef struct EphyCommandManager EphyCommandManager;
-typedef struct EphyCommandManagerIface EphyCommandManagerIface;
+typedef struct _EphyCommandManager EphyCommandManager;
+typedef struct _EphyCommandManagerIface EphyCommandManagerIface;
-struct EphyCommandManagerIface
+struct _EphyCommandManagerIface
{
GTypeInterface base_iface;