summaryrefslogtreecommitdiff
path: root/include/touch
diff options
context:
space:
mode:
Diffstat (limited to 'include/touch')
-rw-r--r--include/touch/touch-impl.h33
-rw-r--r--include/touch/touch.h23
2 files changed, 52 insertions, 4 deletions
diff --git a/include/touch/touch-impl.h b/include/touch/touch-impl.h
new file mode 100644
index 000000000000..a2550b1958bf
--- /dev/null
+++ b/include/touch/touch-impl.h
@@ -0,0 +1,33 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Copyright 2013 LibreOffice contributors.
+ *
+ * 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_TOUCH_TOUCH_IMPL_H
+#define INCLUDED_TOUCH_TOUCH_IMPL_H
+
+#ifdef __cplusplus
+extern "C" {
+#if 0
+} // To avoid an editor indenting all inside the extern "C"
+#endif
+#endif
+
+// "Implementation" of touch_lo_* functions, called on the LO thread through
+// the PostUserEvent mechanism. Not called by UI thread code.
+
+void touch_lo_selection_end_move_impl(const void *documentHandle,
+ int x,
+ int y);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // INCLUDED_TOUCH_TOUCH_IMPL_H
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/touch/touch.h b/include/touch/touch.h
index 9e5c011df708..f999eca745e0 100644
--- a/include/touch/touch.h
+++ b/include/touch/touch.h
@@ -82,12 +82,14 @@ void touch_ui_selection_resize_done(bool success,
void touch_ui_selection_none();
-// 2) Those implmented in the lower layers to be called by the upper
+// 2) Those implemented 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
// CocoaTouch-based source file. Of course it depends on the case
// where that is wanted, and this all is work in progress. Prefixed by
-// touch_lo_.
+// touch_lo_. All these are called on the UI thread and except for
+// those so marked schedule work to be done asynchronously on the LO
+// thread.
typedef enum { DOWN, MOVE, UP} MLOMouseButtonState;
typedef enum { NONE, SHIFT, META } MLOModifiers;
@@ -95,9 +97,7 @@ typedef int MLOModifierMask;
void touch_lo_keyboard_did_hide();
-void touch_lo_runMain();
void touch_lo_set_view_size(int width, int height);
-void touch_lo_render_windows(void *context, int minX, int minY, int width, int height);
void touch_lo_tap(int x, int y);
void touch_lo_mouse(int x, int y, MLOMouseButtonState state, MLOModifierMask modifiers);
void touch_lo_pan(int deltaX, int deltaY);
@@ -113,10 +113,25 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, int
void touch_lo_mouse_drag(int x, int y, MLOMouseButtonState state);
+// Move the end of the selection to (x,y)
+// (work in progress, of course there should be a corresponding function
+// to move the start of the selection, too.)
+void touch_lo_selection_end_move(const void *documentHandle,
+ int x,
+ int y);
+
void touch_lo_selection_attempt_resize(const void *documentHandle,
MLORect *selectedRectangles,
int numberOfRectangles);
+// Special case: synchronous: waits for the rendering to complete
+void touch_lo_render_windows(void *context, int minX, int minY, int width, int height);
+
+// Special case: This is the function that is called in the newly
+// created LO thread to run the LO code.
+void touch_lo_runMain();
+
+
#ifdef __cplusplus
}
#endif