summaryrefslogtreecommitdiff
path: root/include/touch/touch.h
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2013-10-18 15:15:29 +0300
committerTor Lillqvist <tml@collabora.com>2013-10-18 15:45:20 +0300
commit24f8446c9e7d1a0ea01cc11ca87abf85ba43342d (patch)
treec307f5c3eb4730d6776b974dd0dff8f91d7149e9 /include/touch/touch.h
parent359472b2b50165966c27c239eccd3ecfb03e2acc (diff)
Work in progress: Text selection handling for iOS
Change-Id: I31c6bcb9a4b26653d439601f78d71fd94d938eeb
Diffstat (limited to 'include/touch/touch.h')
-rw-r--r--include/touch/touch.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/include/touch/touch.h b/include/touch/touch.h
index c8af48edabc8..11440f16062b 100644
--- a/include/touch/touch.h
+++ b/include/touch/touch.h
@@ -18,8 +18,24 @@
#if !HAVE_FEATURE_DESKTOP
+// Let's try this way: Use Quartz 2D types for iOS, and LO's basegfx
+// types for others, when/if this API is used for others. But of
+// course, it is quite likely that some degree of redesign is needed
+// at such a stage anyway...
+
+#ifdef IOS
+#include <premac.h>
+#include <CoreGraphics/CoreGraphics.h>
+#include <postmac.h>
+#else
+#include <basegfx/range/b2ibox.hxx>
+#endif
+
#ifdef __cplusplus
extern "C" {
+#if 0
+} // To avoid an editor indenting all inside the extern "C"
+#endif
#endif
// These functions are the interface between the upper GUI layers of a
@@ -41,6 +57,31 @@ void touch_ui_show_keyboard();
void touch_ui_hide_keyboard();
bool touch_ui_keyboard_visible();
+typedef enum {
+ MLOSelectionNone,
+ MLOSelectionText,
+ MLOSelectionGraphic
+} MLOSelectionKind;
+
+#ifdef IOS
+typedef CGRect MLORect;
+#else
+typedef basegfx::B2IBox MLORect;
+#endif
+
+void touch_ui_selection_start(MLOSelectionKind kind,
+ const void *documentHandle,
+ MLORect *rectangles,
+ int rectangleCount,
+ void *preview);
+
+void touch_ui_selection_resize_done(bool success,
+ const void *documentHandle,
+ MLORect *rectangles,
+ int rectangleCount);
+
+void touch_ui_selection_none();
+
// 2) Those implmented in the lower layers to be called by the upper
// layer, in cases where we don't want to include a bunch of the
// "normal" LibreOffice C++ headers in an otherwise purely Objective-C
@@ -69,6 +110,10 @@ typedef enum { DOWN, MOVE, UP} MLOMouseButtonState;
void touch_lo_mouse_drag(int x, int y, MLOMouseButtonState state);
+void touch_lo_selection_attempt_resize(const void *documentHandle,
+ MLORect *selectedRectangles,
+ int numberOfRectangles);
+
#ifdef __cplusplus
}
#endif