summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPranav Kant <pranavk@gnome.org>2015-06-06 03:10:31 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-06-09 10:44:23 +0200
commitc5f1f7ad2710914fdd6645dd8ce958c70d1d8381 (patch)
tree534668cd82421bcc16fadf717b71c9fc43a98fc9 /include
parentc8caa803b43d7091318f1129b7b4cc7ee417c336 (diff)
lokdocview: Modernise LOKDocView as GObject
Change-Id: I3bbd07ce8163890f9b88567966622dd4fbe9d94d
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitGtk.h63
1 files changed, 36 insertions, 27 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitGtk.h b/include/LibreOfficeKit/LibreOfficeKitGtk.h
index 069c565435bb..747e45e531f9 100644
--- a/include/LibreOfficeKit/LibreOfficeKitGtk.h
+++ b/include/LibreOfficeKit/LibreOfficeKitGtk.h
@@ -18,9 +18,13 @@
G_BEGIN_DECLS
-#define LOK_DOC_VIEW(obj) GTK_CHECK_CAST (obj, lok_doc_view_get_type(), LOKDocView)
-#define LOK_DOC_VIEW_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, lok_doc_view_get_type(), LOKDocViewClass)
-#define IS_LOK_DOC_VIEW(obj) GTK_CHECK_TYPE (obj, lok_doc_view_get_type())
+#define LOK_TYPE_DOC_VIEW (lok_doc_view_get_type())
+#define LOK_DOC_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), LOK_TYPE_DOC_VIEW, LOKDocView))
+#define LOK_IS_DOC_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LOK_TYPE_DOC_VIEW))
+#define LOK_DOC_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), LOK_TYPE_DOC_VIEW, LOKDocViewClass))
+#define LOK_IS_DOC_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), LOK_TYPE_DOC_VIEW))
+#define LOK_DOC_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), LOK_TYPE_DOC_VIEW, LOKDocViewClass))
+
typedef struct _LOKDocView LOKDocView;
typedef struct _LOKDocViewClass LOKDocViewClass;
@@ -40,40 +44,45 @@ struct _LOKDocViewClass
void (* part_changed) (LOKDocView* pView, int new_part);
};
-guint lok_doc_view_get_type (void);
-GtkWidget* lok_doc_view_new ( LibreOfficeKit* pOffice );
-gboolean lok_doc_view_open_document (LOKDocView* pDocView,
- char* pPath);
+GType lok_doc_view_get_type (void);
+GtkWidget* lok_doc_view_new (LibreOfficeKit* pOffice );
+gboolean lok_doc_view_open_document (LOKDocView* pDocView,
+ char* pPath);
/// Gets the document the viewer displays.
-LibreOfficeKitDocument* lok_doc_view_get_document(LOKDocView* pDocView);
-
-void lok_doc_view_set_zoom (LOKDocView* pDocView,
- float fZoom);
-float lok_doc_view_get_zoom (LOKDocView* pDocView);
-
-int lok_doc_view_get_parts (LOKDocView* pDocView);
-int lok_doc_view_get_part (LOKDocView* pDocView);
-void lok_doc_view_set_part (LOKDocView* pDocView,
- int nPart);
-char* lok_doc_view_get_part_name (LOKDocView* pDocView,
- int nPart);
-void lok_doc_view_set_partmode (LOKDocView* pDocView,
- int nPartMode);
+LibreOfficeKitDocument* lok_doc_view_get_document (LOKDocView* pDocView);
+
+void lok_doc_view_set_zoom (LOKDocView* pDocView,
+ float fZoom);
+float lok_doc_view_get_zoom (LOKDocView* pDocView);
+
+int lok_doc_view_get_parts (LOKDocView* pDocView);
+int lok_doc_view_get_part (LOKDocView* pDocView);
+void lok_doc_view_set_part (LOKDocView* pDocView,
+ int nPart);
+char* lok_doc_view_get_part_name (LOKDocView* pDocView,
+ int nPart);
+void lok_doc_view_set_partmode (LOKDocView* pDocView,
+ int nPartMode);
/// Sets if the viewer is actually an editor or not.
-void lok_doc_view_set_edit (LOKDocView* pDocView,
- gboolean bEdit);
+void lok_doc_view_set_edit (LOKDocView* pDocView,
+ gboolean bEdit);
/// Gets if the viewer is actually an editor or not.
-gboolean lok_doc_view_get_edit (LOKDocView* pDocView);
+gboolean lok_doc_view_get_edit (LOKDocView* pDocView);
/// Posts the .uno: command to the LibreOfficeKit.
-void lok_doc_view_post_command (LOKDocView* pDocView, const char* pCommand, const char* pArguments);
+void lok_doc_view_post_command (LOKDocView* pDocView,
+ const char* pCommand,
+ const char* pArguments);
/// Posts a keyboard event to LibreOfficeKit.
-void lok_doc_view_post_key (GtkWidget* pWidget, GdkEventKey* pEvent, gpointer pData);
+void lok_doc_view_post_key (GtkWidget* pWidget,
+ GdkEventKey* pEvent,
+ gpointer pData);
/// Get the visible area of the document (in twips).
-void lok_doc_view_get_visarea(LOKDocView* pThis, GdkRectangle* pArea);
+void lok_doc_view_get_visarea (LOKDocView* pThis,
+ GdkRectangle* pArea);
G_END_DECLS