diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/touch/touch.h | 45 |
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 |