ios/iosremote/iosremote/Communication/CommandTransmitter.h |    5 +++++
 ios/iosremote/iosremote/Communication/CommandTransmitter.m |    9 +++++++++
 ios/iosremote/iosremote/slideShow_vc.m                     |    6 ++++++
 3 files changed, 20 insertions(+)

New commits:
commit 666fe3e96c6715e455c6ab3e509e5e1c271cf9d9
Author: Siqi LIU <m...@siqi.fr>
Date:   Fri Jul 26 10:52:41 2013 +0200

    send proper pointer visibility command when touch begins/ ends
    
    Change-Id: I2427f1857ca8189db39c20009103d93b935dd5bb

diff --git a/ios/iosremote/iosremote/Communication/CommandTransmitter.h 
b/ios/iosremote/iosremote/Communication/CommandTransmitter.h
index f0243b3..b93cf7b 100644
--- a/ios/iosremote/iosremote/Communication/CommandTransmitter.h
+++ b/ios/iosremote/iosremote/Communication/CommandTransmitter.h
@@ -27,6 +27,11 @@
 - (void) startPresentation;
 - (void) stopPresentation;
 
+// Update pointer position
 - (void) pointerCoordination:(CGPoint) aPoint;
+// Set pointer to the proper position and set it to visible on screen.
+- (void) setPointerVisibleAt: (CGPoint)aPoint;
+// Dismiss the pointer when touch ended.
+- (void) setPointerDismissed;
 
 @end
diff --git a/ios/iosremote/iosremote/Communication/CommandTransmitter.m 
b/ios/iosremote/iosremote/Communication/CommandTransmitter.m
index 07cdc9a..111c1ec 100644
--- a/ios/iosremote/iosremote/Communication/CommandTransmitter.m
+++ b/ios/iosremote/iosremote/Communication/CommandTransmitter.m
@@ -48,6 +48,15 @@
     [self.client sendCommand:[NSString 
stringWithFormat:@"pointer_coordination\n%f\n%f\n\n", aPoint.x, aPoint.y]];
 }
 
+- (void) setPointerVisibleAt: (CGPoint)aPoint
+{
+    [self.client sendCommand:[NSString 
stringWithFormat:@"pointer_started\n%f\n%f\n\n", aPoint.x, aPoint.y]];
+}
+
+- (void) setPointerDismissed
+{
+    [self.client sendCommand:@"pointer_dismissed\n\n"];
+}
 
 /**
  * Blank the screen to the default colour (set server-side), which is
diff --git a/ios/iosremote/iosremote/slideShow_vc.m 
b/ios/iosremote/iosremote/slideShow_vc.m
index f66e279..5fb3350 100644
--- a/ios/iosremote/iosremote/slideShow_vc.m
+++ b/ios/iosremote/iosremote/slideShow_vc.m
@@ -191,6 +191,11 @@
         CGPoint loc = [touch locationInView:self.touchPointerImage];
         if (loc.x >= 0 && loc.x <= self.touchPointerImage.frame.size.width
             && loc.y >= 0 && loc.y <= 
self.touchPointerImage.frame.size.height){
+            CGPoint pointerInPercentage;
+            pointerInPercentage.x = loc.x / 
self.touchPointerImage.frame.size.width;
+            pointerInPercentage.y = loc.y / 
self.touchPointerImage.frame.size.height;
+            [self.comManager.transmitter 
setPointerVisibleAt:pointerInPercentage];
+            
             CGPoint p;
             p.x = loc.x + self.touchPointerImage.frame.origin.x;
             p.y = loc.y + self.touchPointerImage.frame.origin.y;
@@ -230,6 +235,7 @@
 - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
 {
     [self.movingPointer setHidden:YES];
+    [self.comManager.transmitter setPointerDismissed];
 }
 
 #pragma mark - System defaults
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to