diff options
author | Tor Lillqvist <tml@collabora.com> | 2013-10-22 01:06:56 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2013-10-22 01:10:41 +0300 |
commit | 657a3a81828216240b6ff31377d62ca17e656368 (patch) | |
tree | 5729af9bbbd63c5d729ad183b14d52065d70fffa /include/touch/touch.h | |
parent | 36fb29338bbe2f3013ccedd244043e510b9ba0c1 (diff) |
Try to handle selection resizing in a more "correct" way
Faking mouse clicks is a stupid way to do it of course. Try to do it
"right". For now just worked on moving the end handle, but once that
works, similar code should be used for the start handle, too.
Does not work yet. It is hard to extract out from
SwEditWin::MouseButtonDown() exactly what all is relevant, and what
isn't, for this use case.
Change-Id: I76a226f787facbac645aaff8b4852d693bcf4ccb
Diffstat (limited to 'include/touch/touch.h')
-rw-r--r-- | include/touch/touch.h | 23 |
1 files changed, 19 insertions, 4 deletions
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 |