[nautilus-sendto] Add some gtk-doc documentation to nautilus-sendto-plugin
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [nautilus-sendto] Add some gtk-doc documentation to nautilus-sendto-plugin
- Date: Wed, 23 Sep 2009 11:40:32 +0000 (UTC)
commit 1ad0028cfdc4addffb2e819df45f92d2416aa312
Author: Bastien Nocera <hadess hadess net>
Date: Wed Sep 23 12:39:54 2009 +0100
Add some gtk-doc documentation to nautilus-sendto-plugin
src/nautilus-sendto-plugin.h | 59 ++++++++++++++++++++++++++++++++++--------
1 files changed, 48 insertions(+), 11 deletions(-)
---
diff --git a/src/nautilus-sendto-plugin.h b/src/nautilus-sendto-plugin.h
index f2f67e0..9700dd0 100644
--- a/src/nautilus-sendto-plugin.h
+++ b/src/nautilus-sendto-plugin.h
@@ -19,6 +19,7 @@
* Boston, MA 02110-1301 USA.
*
* Author: Roberto Majadas <roberto majadas openshine com>
+ * Bastien Nocera <hadess hadess net>
*/
#ifndef _NAUTILUS_SENDTO_PLUGIN_H_
@@ -30,34 +31,70 @@
typedef struct _NstPluginInfo NstPluginInfo;
typedef struct _NstPlugin NstPlugin;
+/**
+ * NstPluginCapabilities:
+ * @NAUTILUS_CAPS_NONE: No capabilities
+ * @NAUTILUS_CAPS_SEND_DIRECTORIES: The plugin can send whole directories without compression
+ * @NAUTILUS_CAPS_SEND_IMAGES: The plugin only sends images which could be resized
+ *
+ * Capabilities of the plugin.
+ **/
typedef enum {
NAUTILUS_CAPS_NONE = 0,
NAUTILUS_CAPS_SEND_DIRECTORIES = 1 << 0,
NAUTILUS_CAPS_SEND_IMAGES = 1 << 1,
} NstPluginCapabilities;
+/**
+ * NstPluginInfo:
+ * @icon: The icon name for the plugin selection drop-down
+ * @id: A unique ID representing the plugin
+ * @description: The label used in the plugin selection drop-down
+ * @never_unload: Whether to unload the plugin on exit. Enable this if your plugin registers a new #GType
+ * @capabilities: a bitmask of #NstPluginCapabilities
+ * @init: Check for dependencies, and return %FALSE if dependencies such as programs are missing.
+ * @get_contacts_widget: Return the contact widget, the widget to select the destination of the files
+ * @validate_destination: Validate whether the destination can receive the file. This callback is optional.
+ * @send_files: Actually send the files to the selected destination. The file list is a #GList of URI strings.
+ * @destroy: Free all the resources used by the plugin.
+ *
+ * A structure representing a nautilus-sendto plugin. You should also call NST_INIT_PLUGIN() on the plugin structure to export it.
+ **/
struct _NstPluginInfo
{
- gchar *icon;
- gchar *id;
- gchar *description;
- gboolean never_unload;
- NstPluginCapabilities capabilities;
- gboolean (*init) (NstPlugin *plugin);
+ gchar *icon;
+ gchar *id;
+ gchar *description;
+ gboolean never_unload;
+ NstPluginCapabilities capabilities;
+ gboolean (*init) (NstPlugin *plugin);
GtkWidget* (*get_contacts_widget) (NstPlugin *plugin);
- gboolean (*validate_destination) (NstPlugin *plugin, GtkWidget *contact_widget, char **error);
- gboolean (*send_files) (NstPlugin *plugin,
- GtkWidget *contact_widget,
- GList *file_list);
- gboolean (*destroy) (NstPlugin *plugin) ;
+ gboolean (*validate_destination) (NstPlugin *plugin, GtkWidget *contact_widget, char **error);
+ gboolean (*send_files) (NstPlugin *plugin,
+ GtkWidget *contact_widget,
+ GList *file_list);
+ gboolean (*destroy) (NstPlugin *plugin) ;
};
+/**
+ * NstPlugin:
+ * @module: the #GModule for the opened shared library
+ * @info: a #NstPluginInfo structure
+ *
+ * A structure as used in nautilus-sendto.
+ **/
struct _NstPlugin
{
GModule *module;
NstPluginInfo *info;
};
+/**
+ * NST_INIT_PLUGIN:
+ * @plugininfo: a #NstPluginInfo structure representing the plugin
+ *
+ * Call this on an #NstPluginInfo structure to make it available to nautilus-sendto.
+ **/
# define NST_INIT_PLUGIN(plugininfo) \
gboolean nst_init_plugin(NstPlugin *plugin); \
G_MODULE_EXPORT gboolean nst_init_plugin(NstPlugin *plugin) { \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]