summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPranav Kant <pranavk@gnome.org>2015-09-24 14:41:26 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-09-25 12:03:11 +0000
commit392437393d97a157e8291d20f1d6b6ac357ff0db (patch)
treef6236371c45d9ee86d888447d3c0fa79e02e6931 /include
parentc1780ad265ce5f6abb3b91a4f70bf2b3d7a47149 (diff)
Move all introspection comments to header file
... wherever possible. There are few things we can't move to header file, for example, the comments corresponding to GObject properties, and signals. Change-Id: If74d61b17ccee11f8a056f3a93040d2cff2dd98d Reviewed-on: https://gerrit.libreoffice.org/18863 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitGtk.h132
1 files changed, 128 insertions, 4 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitGtk.h b/include/LibreOfficeKit/LibreOfficeKitGtk.h
index f17925b4c53a..81f42105d374 100644
--- a/include/LibreOfficeKit/LibreOfficeKitGtk.h
+++ b/include/LibreOfficeKit/LibreOfficeKitGtk.h
@@ -40,54 +40,178 @@ struct _LOKDocViewClass
GType lok_doc_view_get_type (void) G_GNUC_CONST;
+/**
+ * lok_doc_view_new:
+ * @pPath: LibreOffice install path.
+ * @cancellable: The cancellable object that you can use to cancel this
+ * operation.
+ * @error: The error that will be set if the object fails to initialize.
+ *
+ * Returns: (transfer none): The #LOKDocView widget instance.
+ */
GtkWidget* lok_doc_view_new (const gchar* pPath,
GCancellable *cancellable,
GError **error);
+/**
+ * lok_doc_view_new_from_widget:
+ * @pDocView: The #LOKDocView instance
+ *
+ * Returns: (transfer none): The #LOKDocView widget instance.
+ */
GtkWidget* lok_doc_view_new_from_widget (LOKDocView* pDocView);
+/**
+ * lok_doc_view_open_document:
+ * @pDocView: The #LOKDocView instance
+ * @pPath: (transfer full): The path of the document that #LOKDocView widget should try to open
+ * @cancellable:
+ * @callback:
+ * @userdata:
+ *
+ * Returns: %TRUE if the document is loaded succesfully, %FALSE otherwise
+ */
void lok_doc_view_open_document (LOKDocView* pDocView,
const gchar* pPath,
GCancellable* cancellable,
GAsyncReadyCallback callback,
gpointer userdata);
+/**
+ * lok_doc_view_open_document_finish:
+ * @pDocView: The #LOKDocView instance
+ * @res:
+ * @error:
+ *
+ * Returns: %TRUE if the document is loaded succesfully, %FALSE otherwise
+ */
gboolean lok_doc_view_open_document_finish (LOKDocView* pDocView,
GAsyncResult* res,
GError** error);
-/// Gets the document the viewer displays.
+/**
+ * lok_doc_view_get_document:
+ * @pDocView: The #LOKDocView instance
+ *
+ * Gets the document the viewer displays.
+ *
+ * Returns: The #LibreOfficeKitDocument instance the widget is currently showing
+ */
LibreOfficeKitDocument* lok_doc_view_get_document (LOKDocView* pDocView);
+/**
+ * lok_doc_view_set_zoom:
+ * @pDocView: The #LOKDocView instance
+ * @fZoom: The new zoom level that pDocView must set it into.
+ *
+ * Sets the new zoom level for the widget.
+ */
void lok_doc_view_set_zoom (LOKDocView* pDocView,
float fZoom);
+
+/**
+ * lok_doc_view_get_zoom:
+ * @pDocView: The #LOKDocView instance
+ *
+ * Returns: The current zoom factor value in float for pDocView
+ */
float lok_doc_view_get_zoom (LOKDocView* pDocView);
+/**
+ * lok_doc_view_get_parts:
+ * @pDocView: The #LOKDocView instance
+ */
int lok_doc_view_get_parts (LOKDocView* pDocView);
+
+/**
+ * lok_doc_view_get_part:
+ * @pDocView: The #LOKDocView instance
+ */
int lok_doc_view_get_part (LOKDocView* pDocView);
+
+/**
+ * lok_doc_view_set_part:
+ * @pDocView: The #LOKDocView instance
+ * @nPart:
+ */
void lok_doc_view_set_part (LOKDocView* pDocView,
int nPart);
+
+/**
+ * lok_doc_view_get_part_name:
+ * @pDocView: The #LOKDocView instance
+ * @nPart:
+ */
char* lok_doc_view_get_part_name (LOKDocView* pDocView,
int nPart);
+
+/**
+ * lok_doc_view_set_partmode:
+ * @pDocView: The #LOKDocView instance
+ * @nPartMode:
+ */
void lok_doc_view_set_partmode (LOKDocView* pDocView,
int nPartMode);
+/**
+ * lok_doc_view_reset_view:
+ * @pDocView: The #LOKDocView instance
+ */
void lok_doc_view_reset_view (LOKDocView* pDocView);
-/// Sets if the viewer is actually an editor or not.
+/**
+ * lok_doc_view_set_edit:
+ * @pDocView: The #LOKDocView instance
+ * @bEdit: %TRUE if the pDocView should go in edit mode, %FALSE otherwise
+ *
+ * Sets if the viewer is actually an editor or not.
+ */
void lok_doc_view_set_edit (LOKDocView* pDocView,
gboolean bEdit);
-/// Gets if the viewer is actually an editor or not.
+
+/**
+ * lok_doc_view_get_edit:
+ * @pDocView: The #LOKDocView instance
+ *
+ * Gets if the viewer is actually an editor or not.
+ *
+ * Returns: %TRUE if the given pDocView is in edit mode.
+ */
gboolean lok_doc_view_get_edit (LOKDocView* pDocView);
-/// Posts the .uno: command to the LibreOfficeKit.
+/**
+ * lok_doc_view_post_command:
+ * @pDocView: the #LOKDocView instance
+ * @pCommand: the command to issue to LO core
+ * @pArguments: the arguments to the given command
+ *
+ * Posts the .uno: command to the LibreOfficeKit.
+ */
void lok_doc_view_post_command (LOKDocView* pDocView,
const gchar* pCommand,
const gchar* pArguments);
+/**
+ * lok_doc_view_pixel_to_twip:
+ * @pDocView: The #LOKDocView instance
+ * @fInput: The value in pixels to convert to twips
+ *
+ * Converts the value in pixels to twips according to zoom level.
+ *
+ * Returns: The corresponding value in twips
+ */
float lok_doc_view_pixel_to_twip (LOKDocView* pDocView,
float fInput);
+/**
+ * lok_doc_view_twip_to_pixel:
+ * @pDocView: The #LOKDocView instance
+ * @fInput: The value in twips to convert to pixels
+ *
+ * Converts the value in twips to pixels according to zoom level.
+ *
+ * Returns: The corresponding value in pixels
+ */
float lok_doc_view_twip_to_pixel (LOKDocView* pDocView,
float fInput);