• Position of several pointers
• Limitations
• Various
WINDEV
WEBDEV
WINDEV Mobile
Others
GesturePosY (Function)
In French: GestePosY
Returns the vertical position of the pointer (finger or stylus). The returned value depends on how the function is used:
• Used in a process linked to the movement of the pointer (click, move, pressed, released, ...), returns the vertical position (Y) of the pointer (finger or stylus) in relation to the relevant control or window.
• Used in another process, returns the last known position of the pointer in the control.
• If the device supports the multi-touch movements, used to retrieve the position of a specific contact point.
Some use examples: This allows you to find out:
• the position of pointer (finger or stylus) during a click in an image (function used in the click code of image).
• the position of the pointer (finger or stylus) during its move on the surface of a control (function used in the optional "Rollover" process of a control).
• the position of the nth pointer during a multi-touch movement on the surface of a control (if it is supported by the device).
Versions 18 and later
This function is now available for the iPhone/iPad applications.
New in version 18
This function is now available for the iPhone/iPad applications.
This function is now available for the iPhone/iPad applications.
Versions 19 and later
This function is now available in browser code.
New in version 19
This function is now available in browser code.
This function is now available in browser code.
Example
// Position of the pointer (finger or stylus) during a click in an Image control
nY is int = GesturePosY()
// Position of the second pointer pressed on the surface of a control
nY is int = GesturePosY(2)
// Position of the pointer in relation to the top left corner of the image displayed by the control
// when this image is not entirely displayed
nY is int = GesturePosY(1, gpImage)
// Position of the pointer in relation to the top left corner of the image displayed by the control
// when this image is not entirely displayed
nY is int = GesturePosY(1, gpImage)
Syntax
<Result> = GesturePosY([<Pointer Subscript> [, <Marker>]])
<Result>: Integer
• Vertical position (or Y coordinate) in pixels of the pointer in relation to the relevant marker,
• -1 if an error occurred.
<Pointer Subscript>: Optional integer
Subscript of the pointer (finger) whose vertical position must be retrieved. The first pointer in contact with the screen corresponds to the subscript 1.
If this parameter is not specified, the function will return the position of the first pointer in contact with the screen.
If the subscript does not correspond to a pointer in contact with the screen or if the specified subscript is greater than 1 and if the device does not support the multi-touch, the function will return -1.
<Marker>: Optional Integer constant
Marker used to calculate the position:
 gpControl (default value) Position of the pointer in relation to the top left corner: of the control, of the window if the event is on the window.of the page if the event is on the page. gpScreen Position of the pointer in the screen (in relation to the top left corner of the screen). gpWindow Position of the pointer in relation to the top left corner of the window to which belongs the control on which the event occurred. This constant is not available gpImage Position of the pointer in relation to the top left corner of the image displayed by an Image control. This constant can be used when an image is not entirely displayed in an Image control in order to find out the position of the pointer in the source image (while taking the possible zoom into account). This constant must be used only when GesturePosY is called in a process of an Image control. Otherwise, GesturePosY will return -1. This constant is not available. Versions 19 and latergpPageNew in version 19gpPagegpPage Position of the pointer in relation to the top left corner of the page to which belongs the control on which the event occurred. This constant is not available.
Remarks

Position of several pointers

To manage the position of several pointers on the screen, the device must:
• include a multi-touch feature
• operate with version 2.2 (or later) of the Android system.

Limitations

• This function is available on the devices running Android version 2.2 or later (api level 8).
A fatal error occurs if the function is used with an earlier system version.
To find out the version of Android system on which the application is run, use SysAndroidVersion.
• In the Android simulator or emulator, GesturePosY can only be used to retrieve the position of the first pointer.
• The browser used must support the multi-touch feature.

Various

• To find out the horizontal position (X) of a pointer, use GesturePosX.
• To find out the number of pointers in contact with the screen, use GestureNbPointer.
• To find out the subscript of the pointer that triggered the execution of a process linked to a movement on the screen, use GestureCurrentPointer.
Components
WDJS.DLL
wd230android.jar
Minimum required version
• Version 17