diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/ios/iosinst.hxx | 7 | ||||
-rw-r--r-- | vcl/ios/iosinst.cxx | 27 |
2 files changed, 34 insertions, 0 deletions
diff --git a/vcl/inc/ios/iosinst.hxx b/vcl/inc/ios/iosinst.hxx index 2ff9e5784f14..0dfa7eb2f750 100644 --- a/vcl/inc/ios/iosinst.hxx +++ b/vcl/inc/ios/iosinst.hxx @@ -52,6 +52,7 @@ public: void damaged( IosSalFrame *frame, const basegfx::B2IBox& rDamageRect); + // Functions scheduled to be run as "user events" in the LO thread typedef struct { bool done; CGContextRef context; @@ -61,6 +62,12 @@ public: DECL_LINK( DisplayConfigurationChanged, void* ); + typedef struct { + const void *documentHandle; + int x, y; + } SelectionEndMoveArg; + DECL_LINK( SelectionEndMove, SelectionEndMoveArg* ); + pthread_mutex_t m_aRenderMutex; pthread_cond_t m_aRenderCond; }; diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index 2416bf6c97d5..50716f030dfc 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -24,6 +24,7 @@ #include <basebmp/scanlineformats.hxx> #include <vcl/msgbox.hxx> #include <touch/touch.h> +#include <touch/touch-impl.h> #include "ios/iosinst.hxx" #include "headless/svpdummies.hxx" @@ -507,6 +508,32 @@ void touch_lo_keyboard_did_hide() } } +IMPL_LINK( IosSalInstance, SelectionEndMove, SelectionEndMoveArg*, pArg ) +{ + touch_lo_selection_end_move_impl(pArg->documentHandle, pArg->x, pArg->y); + + delete pArg; + + return 0; +} + +extern "C" +void touch_lo_selection_end_move(const void *documentHandle, + int x, + int y) +{ + IosSalInstance *pInstance = IosSalInstance::getInstance(); + + if ( pInstance == NULL ) + return; + + IosSalInstance::SelectionEndMoveArg *pArg = new IosSalInstance::SelectionEndMoveArg; + pArg->documentHandle = documentHandle; + pArg->x = x; + pArg->y = y; + Application::PostUserEvent( LINK( pInstance, IosSalInstance, SelectionEndMove), pArg ); +} + extern "C" void touch_lo_draw_tile(void * /*context*/, int /*contextWidth*/, int /*contextHeight*/, int /*tilePosX*/, int /*tilePosY*/, int /*tileWidth*/, int /*tileHeight*/) { |