[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - include/touch
include/touch/touch.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 59cc423a3056a0253a24244373f79d94ffe6ff20 Author: Tor Lillqvist Date: Thu Oct 31 13:11:40 2013 +0200 Fix copypasta Change-Id: Ib5e7162426ab08a1912a19d4e3a00c794e4fb80e diff --git a/include/touch/touch.h b/include/touch/touch.h index f0cdabe..6601a05 100644 --- a/include/touch/touch.h +++ b/include/touch/touch.h @@ -120,8 +120,8 @@ CGSizeToMLOPixelSize(CGSize cgSize) CG_INLINE CGSize MLOPixelsToCGSize(MLOPixel width, MLOPixel height) { -CGFloat fWidth = CGFloatToMLOPixel(width); -CGFloat fHeight = CGFloatToMLOPixel(height); +CGFloat fWidth = MLOPixelToCGFloat(width); +CGFloat fHeight = MLOPixelToCGFloat(height); return CGSizeMake(fWidth, fHeight); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - include/touch sw/source vcl/ios
include/touch/touch.h |2 +- sw/source/core/view/viewsh.cxx | 12 vcl/ios/iosinst.cxx| 11 +++ 3 files changed, 12 insertions(+), 13 deletions(-) New commits: commit 8e22438b560121b74f588cef19891b4e2c3e45a6 Author: Ptyl Dragon Date: Tue Oct 29 16:22:06 2013 +0200 changed to CGSize Change-Id: Ic84fcadf4332210693586825cdd8e32ef0f2a727 diff --git a/include/touch/touch.h b/include/touch/touch.h index a480fb6..ae4f491 100644 --- a/include/touch/touch.h +++ b/include/touch/touch.h @@ -111,7 +111,7 @@ context, contextHeight, contextWidth specify where to draw. */ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, int tilePosX, int tilePosY, int tileWidth, int tileHeight); void touch_lo_copy_buffer(const void * source, size_t sourceWidth, size_t sourceHeight, size_t sourceBytesPerRow, void * target, size_t targetWidth, size_t targetHeight); -Size touch_lo_get_content_size(); +CGSize touch_lo_get_content_size(); void touch_lo_mouse_drag(int x, int y, MLOMouseButtonState state); // Move the start of the selection to (x,y) diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 9427b3d..c4a8dd8 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1772,7 +1772,6 @@ void ViewShell::PaintTile(OutputDevice *pOut, const Rectangle &rRect) } #if !HAVE_FEATURE_DESKTOP - extern "C" void touch_lo_draw_tile(void * context, int contextWidth, int contextHeight, int tilePosX, int tilePosY, int tileWidth, int tileHeight) { @@ -1814,17 +1813,6 @@ void touch_lo_draw_tile(void * context, int contextWidth, int contextHeight, int contextHeight); } } - -extern "C" -Size touch_lo_get_content_size() -{ -SwWrtShell *pViewShell = GetActiveWrtShell(); -Size contentSize(0,0); -if (pViewShell) -{ -} -return contentSize; -} #endif extern "C" void touch_ui_selection_none() {} diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index 39208f5..d6e580a 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -415,6 +415,17 @@ touch_lo_copy_buffer(const void * source, size_t sourceWidth, size_t sourceHeigh } extern "C" +CGSize touch_lo_get_content_size() +{ +CGSize contentSize = CGSizeMake(0,0); +SalFrame *pFocus = IosSalInstance::getInstance()->getFocusFrame(); +if (pFocus) +{ +} +return contentSize; +} + +extern "C" void touch_lo_render_windows(void *context, int minX, int minY, int width, int height) { CGContextRef cgContext = (CGContextRef) context; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - include/touch sw/source vcl/ios
include/touch/touch.h | 15 ++- sw/source/core/view/viewsh.cxx |9 + vcl/ios/iosinst.cxx| 11 --- 3 files changed, 23 insertions(+), 12 deletions(-) New commits: commit 02cf93393fc0c0af8673008dee159a976acaeb3a Author: Ptyl Dragon Date: Tue Oct 29 18:12:00 2013 +0200 created a long long unit for MLOContentSize Change-Id: I41910058088161119d3cae8ca625d456652d890f diff --git a/include/touch/touch.h b/include/touch/touch.h index ae4f491..6ba2fab 100644 --- a/include/touch/touch.h +++ b/include/touch/touch.h @@ -69,6 +69,19 @@ typedef CGRect MLORect; typedef basegfx::B2IBox MLORect; #endif +typedef long long MLOContentSizeDimension; +struct MLOContentSize { +MLOContentSizeDimension width; +MLOContentSizeDimension height; +}; +typedef struct MLOContentSize MLOContentSize; + +CG_INLINE MLOContentSize +MLOContentSizeMake(MLOContentSizeDimension width, MLOContentSizeDimension height) +{ +MLOContentSize size; size.width = width; size.height = height; return size; +} + void touch_ui_selection_start(MLOSelectionKind kind, const void *documentHandle, MLORect *rectangles, @@ -111,7 +124,7 @@ context, contextHeight, contextWidth specify where to draw. */ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, int tilePosX, int tilePosY, int tileWidth, int tileHeight); void touch_lo_copy_buffer(const void * source, size_t sourceWidth, size_t sourceHeight, size_t sourceBytesPerRow, void * target, size_t targetWidth, size_t targetHeight); -CGSize touch_lo_get_content_size(); +MLOContentSize touch_lo_get_content_size(); void touch_lo_mouse_drag(int x, int y, MLOMouseButtonState state); // Move the start of the selection to (x,y) diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 68ba9bb..1df00fed 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1817,6 +1817,15 @@ void touch_lo_draw_tile(void * context, int contextWidth, int contextHeight, int } Application::ReleaseSolarMutex(); } +extern "C" +MLOContentSize touch_lo_get_content_size() +{ +SwWrtShell *pViewShell = GetActiveWrtShell(); +if (pViewShell) +{ +} +return MLOContentSizeMake(0,0); +} #endif extern "C" void touch_ui_selection_none() {} diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index d6e580a..39208f5 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -415,17 +415,6 @@ touch_lo_copy_buffer(const void * source, size_t sourceWidth, size_t sourceHeigh } extern "C" -CGSize touch_lo_get_content_size() -{ -CGSize contentSize = CGSizeMake(0,0); -SalFrame *pFocus = IosSalInstance::getInstance()->getFocusFrame(); -if (pFocus) -{ -} -return contentSize; -} - -extern "C" void touch_lo_render_windows(void *context, int minX, int minY, int width, int height) { CGContextRef cgContext = (CGContextRef) context; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - include/touch ios/shared sw/source
include/touch/touch.h | 74 -- ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m |4 sw/source/core/view/viewsh.cxx | 26 ++- 3 files changed, 90 insertions(+), 14 deletions(-) New commits: commit 19879fe620e72f45f8faffee8f8d1271d803aa6e Author: Ptyl Dragon Date: Wed Oct 30 19:42:09 2013 +0200 ready for integration with CATiledLayer Change-Id: I50f519a37036ed3d17f73c80b33f4a9c4c19cb52 diff --git a/include/touch/touch.h b/include/touch/touch.h index 6ba2fab..f0cdabe 100644 --- a/include/touch/touch.h +++ b/include/touch/touch.h @@ -69,19 +69,75 @@ typedef CGRect MLORect; typedef basegfx::B2IBox MLORect; #endif -typedef long long MLOContentSizeDimension; -struct MLOContentSize { -MLOContentSizeDimension width; -MLOContentSizeDimension height; +// MLODip - Device Independent Pixels + +typedef long long MLOPixel; +static const MLOPixel LO_TWIPS_TO_MLO_PIXEL_RATIO = 10L; +struct MLOPixelSize { +MLOPixel width; +MLOPixel height; +}; +typedef struct MLOPixelSize MLOPixelSize; +struct MLOPixelPoint { +MLOPixel x; +MLOPixel y; }; -typedef struct MLOContentSize MLOContentSize; +typedef struct MLOPixelPoint MLOPixelPoint; + +CG_INLINE CGFloat +MLOPixelToCGFloat(MLOPixel mloPixel) +{ +return (CGFloat) (mloPixel / LO_TWIPS_TO_MLO_PIXEL_RATIO); +} + +CG_INLINE MLOPixel +CGFloatToMLOPixel(CGFloat cgFloat) +{ +return (MLOPixel) cgFloat * LO_TWIPS_TO_MLO_PIXEL_RATIO; +} + +CG_INLINE MLOPixelSize +MLOPixelSizeMake(MLOPixel width, MLOPixel height) +{ +MLOPixelSize size; size.width = width; size.height = height; return size; +} + +CG_INLINE MLOPixelPoint +MLOPixelPointMake(MLOPixel x, MLOPixel y) +{ +MLOPixelPoint point; point.x = x; point.y = y; return point; +} + +CG_INLINE MLOPixelSize +CGSizeToMLOPixelSize(CGSize cgSize) +{ +MLOPixelSize mloPixelSize; +mloPixelSize.width = MLOPixelToCGFloat(cgSize.width); +mloPixelSize.height = MLOPixelToCGFloat(cgSize.height); +return mloPixelSize; +} + +CG_INLINE CGSize +MLOPixelsToCGSize(MLOPixel width, MLOPixel height) +{ +CGFloat fWidth = CGFloatToMLOPixel(width); +CGFloat fHeight = CGFloatToMLOPixel(height); +return CGSizeMake(fWidth, fHeight); +} -CG_INLINE MLOContentSize -MLOContentSizeMake(MLOContentSizeDimension width, MLOContentSizeDimension height) +CG_INLINE CGSize +MLOPixelSizeToCGSize(MLOPixelSize mloPixelSize) { -MLOContentSize size; size.width = width; size.height = height; return size; +return MLOPixelsToCGSize(mloPixelSize.width, mloPixelSize.height); } +MLOPixelPoint CGPointToMLOPixelPoint(CGPoint cgPoint); + +CGPoint MLOPixelPointToCGPoint(MLOPixelPoint mloPixelPoint); + + +// selection + void touch_ui_selection_start(MLOSelectionKind kind, const void *documentHandle, MLORect *rectangles, @@ -124,7 +180,7 @@ context, contextHeight, contextWidth specify where to draw. */ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, int tilePosX, int tilePosY, int tileWidth, int tileHeight); void touch_lo_copy_buffer(const void * source, size_t sourceWidth, size_t sourceHeight, size_t sourceBytesPerRow, void * target, size_t targetWidth, size_t targetHeight); -MLOContentSize touch_lo_get_content_size(); +CGSize touch_lo_get_content_size(); void touch_lo_mouse_drag(int x, int y, MLOMouseButtonState state); // Move the start of the selection to (x,y) diff --git a/ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m b/ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m index 3523dca..f2a6f8e 100644 --- a/ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m +++ b/ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m @@ -470,3 +470,7 @@ void touch_ui_selection_start(MLOSelectionKind kind, rectangles[i].origin.y); } } + +void touch_ui_selection_none(){ +// STUB +} diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 420715a..8606126 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1818,7 +1818,7 @@ void touch_lo_draw_tile(void * context, int contextWidth, int contextHeight, int Application::ReleaseSolarMutex(); } extern "C" -MLOContentSize touch_lo_get_content_size() +CGSize touch_lo_get_content_size() { SwWrtShell *pViewShell = GetActiveWrtShell(); if (pViewShell) @@ -1826,14 +1826,30 @@ MLOContentSize touch_lo_get_content_size() static const long WIDTH_ADDITION = 6L * DOCUMENTBORDER; static const long HEIGHT_ADDITION = 2L * DOCUMENTBORDER; Size documentSize =pViewShell->GetView().GetDocSz(); -return MLOContentSizeMake(documentSize.Width() + WIDTH_ADDITION, +return MLOPixelsToCGSize(documentSize.Width() + WIDTH_ADDITION, documentSize.Height() + HEIG
[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - include/touch ios/shared sw/source
include/touch/touch.h | 98 ++ ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m |8 sw/source/core/view/viewsh.cxx | 46 ++-- 3 files changed, 90 insertions(+), 62 deletions(-) New commits: commit d1528ec8e05d2a8bde93facbe338bde4cc1e017a Author: Ptyl Dragon Date: Thu Oct 31 15:20:13 2013 +0200 added units MLODpxes and MLORips Change-Id: Ica09fbd0f6a822f464df302dba4cf40d1d089697 diff --git a/include/touch/touch.h b/include/touch/touch.h index 6601a05..5902376 100644 --- a/include/touch/touch.h +++ b/include/touch/touch.h @@ -71,69 +71,89 @@ typedef basegfx::B2IBox MLORect; // MLODip - Device Independent Pixels -typedef long long MLOPixel; -static const MLOPixel LO_TWIPS_TO_MLO_PIXEL_RATIO = 10L; -struct MLOPixelSize { -MLOPixel width; -MLOPixel height; +typedef long long MLORip; +typedef CGFloat MLODpx; +typedef CGPoint MLODpxPoint; +typedef CGSize MLODpxSize; + +CG_INLINE MLODpxPoint +MLODpxPointByDpxes(MLODpx x, MLODpx y) +{ +return CGPointMake(x, y); +} + +CG_INLINE MLODpxSize +MLODpxSizeByDpxes(MLODpx width, MLODpx height) +{ +return CGSizeMake(width, height); +} + +static const MLORip LO_TWIPS_TO_MLO_RIP_RATIO = 10L; + +struct MLORipSize +{ +MLORip width; +MLORip height; }; -typedef struct MLOPixelSize MLOPixelSize; -struct MLOPixelPoint { -MLOPixel x; -MLOPixel y; +typedef struct MLORipSize MLORipSize; + +struct MLORipPoint +{ +MLORip x; +MLORip y; }; -typedef struct MLOPixelPoint MLOPixelPoint; +typedef struct MLORipPoint MLORipPoint; -CG_INLINE CGFloat -MLOPixelToCGFloat(MLOPixel mloPixel) +CG_INLINE MLODpx +MLODpxByRip(MLORip rip) { -return (CGFloat) (mloPixel / LO_TWIPS_TO_MLO_PIXEL_RATIO); +return (MLODpx) (rip / LO_TWIPS_TO_MLO_RIP_RATIO); } -CG_INLINE MLOPixel -CGFloatToMLOPixel(CGFloat cgFloat) +CG_INLINE MLORip +MLORipByDpx(MLODpx dpx) { -return (MLOPixel) cgFloat * LO_TWIPS_TO_MLO_PIXEL_RATIO; +return (MLORip) (dpx * LO_TWIPS_TO_MLO_RIP_RATIO); } -CG_INLINE MLOPixelSize -MLOPixelSizeMake(MLOPixel width, MLOPixel height) +CG_INLINE MLORipSize +MLORipSizeByRips(MLORip width, MLORip height) { -MLOPixelSize size; size.width = width; size.height = height; return size; +MLORipSize ripSize; ripSize.width = width; ripSize.height = height; return ripSize; } -CG_INLINE MLOPixelPoint -MLOPixelPointMake(MLOPixel x, MLOPixel y) +CG_INLINE MLORipPoint +MLORipPointByRips(MLORip x, MLORip y) { -MLOPixelPoint point; point.x = x; point.y = y; return point; +MLORipPoint point; point.x = x; point.y = y; return point; } -CG_INLINE MLOPixelSize -CGSizeToMLOPixelSize(CGSize cgSize) +CG_INLINE MLORipSize +MLORipSizeByDpxSize(MLODpxSize dpxSize) { -MLOPixelSize mloPixelSize; -mloPixelSize.width = MLOPixelToCGFloat(cgSize.width); -mloPixelSize.height = MLOPixelToCGFloat(cgSize.height); -return mloPixelSize; +MLORipSize ripSize; +ripSize.width = MLORipByDpx(dpxSize.width); +ripSize.height = MLORipByDpx(dpxSize.height); +return ripSize; } -CG_INLINE CGSize -MLOPixelsToCGSize(MLOPixel width, MLOPixel height) +CG_INLINE MLODpxSize +MLODpxSizeByRips(MLORip width, MLORip height) { -CGFloat fWidth = MLOPixelToCGFloat(width); -CGFloat fHeight = MLOPixelToCGFloat(height); +CGFloat fWidth = MLODpxByRip(width); +CGFloat fHeight = MLODpxByRip(height); return CGSizeMake(fWidth, fHeight); } -CG_INLINE CGSize -MLOPixelSizeToCGSize(MLOPixelSize mloPixelSize) +CG_INLINE MLODpxSize +MLODpxSizeByRipSize(MLORipSize ripSize) { -return MLOPixelsToCGSize(mloPixelSize.width, mloPixelSize.height); +return MLODpxSizeByRips(ripSize.width, ripSize.height); } -MLOPixelPoint CGPointToMLOPixelPoint(CGPoint cgPoint); +MLORipPoint MLORipPointByDpxPoint(MLODpxPoint mloDpxPoint); -CGPoint MLOPixelPointToCGPoint(MLOPixelPoint mloPixelPoint); +MLODpxPoint MLODpxPointByMLORipPoint(MLORipPoint mloRipPoint); // selection @@ -178,9 +198,9 @@ void touch_lo_keyboard_input(int c); tilePosX, tilePosY, tileWidth, tileHeight address the part of the document to be drawn. context, contextHeight, contextWidth specify where to draw. */ -void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, int tilePosX, int tilePosY, int tileWidth, int tileHeight); +void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLODpxPoint tilePosition, MLODpxSize tileSize); void touch_lo_copy_buffer(const void * source, size_t sourceWidth, size_t sourceHeight, size_t sourceBytesPerRow, void * target, size_t targetWidth, size_t targetHeight); -CGSize touch_lo_get_content_size(); +MLODpxSize touch_lo_get_content_size(); void touch_lo_mouse_drag(int x, int y, MLOMouseButtonState state); // Move the start of the selection to (x,y) diff --git a/ios/shared/ios_sharedlo/objective