diff options
author | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-06-12 17:38:10 +0100 |
---|---|---|
committer | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-06-25 13:04:31 +0100 |
commit | d465dfb209948a795e393bfc4a05485e893f24d0 (patch) | |
tree | 34ac06cad54d57d31c332f29d701ac25ae437c0a /include/LibreOfficeKit | |
parent | e6b881521c5220a2504811ecfaed1c5cc33910d6 (diff) |
Implement LibreOfficeKit gtk+ viewer widget.
Very basic, but works.
Change-Id: I0c521e833b53e13065e0be48e6fa767e44b29787
Diffstat (limited to 'include/LibreOfficeKit')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKitGtk.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitGtk.h b/include/LibreOfficeKit/LibreOfficeKitGtk.h new file mode 100644 index 000000000000..2435fc26a632 --- /dev/null +++ b/include/LibreOfficeKit/LibreOfficeKitGtk.h @@ -0,0 +1,60 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_DESKTOP_INC_LIBREOFFICEKITGTK_H +#define INCLUDED_DESKTOP_INC_LIBREOFFICEKITGTK_H + +#include <gtk/gtk.h> +#include <gdk/gdk.h> + +#define LOK_USE_UNSTABLE_API +#include <LibreOfficeKit/LibreOfficeKit.h> + +#ifdef __cplusplus +extern "C" +{ +#endif + +#define LOK_DOCVIEW(obj) GTK_CHECK_CAST (obj, lok_docview_get_type(), LOKDocView) +#define LOK_DOCVIEW_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, lok_docview_get_type(), LOKDocViewClass) +#define IS_LOK_DOCVIEW(obj) GTK_CHECK_TYPE (obj, lok_docview_get_type()) + + +typedef struct _LOKDocView LOKDocView; +typedef struct _LOKDocViewClass LOKDocViewClass; + +struct _LOKDocView +{ + GtkScrolledWindow scrollWindow; + + GtkWidget* pEventBox; + GtkWidget* pCanvas; + GdkPixbuf* pPixBuf; + + LibreOfficeKit* pOffice; + LibreOfficeKitDocument* pDocument; +}; + +struct _LOKDocViewClass +{ + GtkScrolledWindowClass parent_class; + + void (*lok_docview) (LOKDocView* pDocView); +}; + +guint lok_docview_get_type (void); +GtkWidget* lok_docview_new ( LibreOfficeKit* pOffice ); +gboolean lok_docview_open_document (LOKDocView* pDocView, + char* pPath); + +#ifdef __cplusplus +} +#endif + +#endif
\ No newline at end of file |