diff options
author | Pranav Kant <pranavk@gnome.org> | 2015-06-09 16:27:37 +0530 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-02-07 21:03:04 -0500 |
commit | b86e248e59d7f9cff28c14a70daa419387227bf0 (patch) | |
tree | 14eb1f5013ddaa67a90723d744fbacd18dbb62ff /include | |
parent | c3952f71de630433365bd99e10b80a7356db265b (diff) |
lokdocview: Change parent class to GtkDrawingArea
It is not the job of the widget to provide the scroll bars.
(cherry picked from commit 8d0b34c3a6292ce9c5a081ef95890ae0c5e07ac7)
Change-Id: Iafc5724ed5b21717d711bb8f7e1a076dd1288b76
Diffstat (limited to 'include')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKitGtk.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitGtk.h b/include/LibreOfficeKit/LibreOfficeKitGtk.h index f8f905e25b52..120b63ca17df 100644 --- a/include/LibreOfficeKit/LibreOfficeKitGtk.h +++ b/include/LibreOfficeKit/LibreOfficeKitGtk.h @@ -31,22 +31,24 @@ typedef struct _LOKDocViewClass LOKDocViewClass; struct _LOKDocView { - GtkScrolledWindow aScrollWindow; + GtkDrawingArea aDrawingArea; struct LOKDocView_Impl* m_pImpl; }; struct _LOKDocViewClass { - GtkScrolledWindowClass parent_class; - void (* edit_changed) (LOKDocView* pView, gboolean was_edit); - void (* command_changed) (LOKDocView* pView, char* new_state); - void (* search_not_found) (LOKDocView* pView, char* new_state); - void (* part_changed) (LOKDocView* pView, int new_part); + GtkDrawingAreaClass parent_class; + void (* edit_changed) (LOKDocView* pView, gboolean was_edit); + void (* command_changed) (LOKDocView* pView, char* new_state); + void (* search_not_found) (LOKDocView* pView, char* new_state); + void (* part_changed) (LOKDocView* pView, int new_part); void (* size_changed) (LOKDocView* pView); }; GType lok_doc_view_get_type (void) G_GNUC_CONST; + GtkWidget* lok_doc_view_new (LibreOfficeKit* pOffice ); + gboolean lok_doc_view_open_document (LOKDocView* pDocView, char* pPath); @@ -81,9 +83,11 @@ void lok_doc_view_post_key (GtkWidget* p GdkEventKey* pEvent, gpointer pData); -/// Get the visible area of the document (in twips). -void lok_doc_view_get_visarea (LOKDocView* pThis, - GdkRectangle* pArea); +float lok_doc_view_pixel_to_twip (LOKDocView* pDocView, + float fInput); + +float lok_doc_view_twip_to_pixel (LOKDocView* pDocView, + float fInput); G_END_DECLS |