From 5fb18e1517327a59bdc2ec68133281f0a9c5fcac Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 4 Mar 2015 10:09:53 +0100 Subject: LOK: add LOK_CALLBACK_CURSOR_VISIBLE With this, if a Writer document contains an image, then clicking on the image then back to the text properly shows/hides the blinking cursor. Change-Id: I3313319ded614a2eb86e1c66c926189511a7cca6 --- include/LibreOfficeKit/LibreOfficeKitEnums.h | 11 ++++++++++- include/LibreOfficeKit/LibreOfficeKitGtk.h | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'include/LibreOfficeKit') diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h index a8aca2f7abec..aed96d64a7c5 100644 --- a/include/LibreOfficeKit/LibreOfficeKitEnums.h +++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h @@ -78,7 +78,16 @@ typedef enum * LOK_CALLBACK_TEXT_SELECTION one. Rectangle format is the same as * LOK_CALLBACK_INVALIDATE_TILES. */ - LOK_CALLBACK_TEXT_SELECTION_END + LOK_CALLBACK_TEXT_SELECTION_END, + /** + * The blinking text cursor is now visible or not. + * + * Clients should assume that this is false initially and are expected to + * show a blinking cursor at the rectangle described by + * LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR once it becomes true. Payload is + * either the "true" or the "false" string. + */ + LOK_CALLBACK_CURSOR_VISIBLE } LibreOfficeKitCallbackType; diff --git a/include/LibreOfficeKit/LibreOfficeKitGtk.h b/include/LibreOfficeKit/LibreOfficeKitGtk.h index dbd2f8d9ff69..c98b61271691 100644 --- a/include/LibreOfficeKit/LibreOfficeKitGtk.h +++ b/include/LibreOfficeKit/LibreOfficeKitGtk.h @@ -46,6 +46,8 @@ struct _LOKDocView GdkRectangle m_aVisibleCursor; /// Cursor overlay is visible or hidden (for blinking). gboolean m_bCursorOverlayVisible; + /// Cursor is visible or hidden (e.g. for graphic selection). + gboolean m_bCursorVisible; /// Time of the last button press. guint32 m_nLastButtonPressTime; /// Time of the last button release. -- cgit