Gesture APIs-furthering Windows Mobile 6.5 touch gesture framework

Source: Internet
Author: User

The Windows Mobile 6.5 developer kit was available in early June. It brings new features to the majority of technology enthusiasts, including widgets and gesture API. Some developers have made explorations and attempts on the widgets application, including guojing, Jack Ma, and Jack. net. Let's take a look at the example of gesture API in TDK.

Before you start, you need to pay attention to the following two points for the gesture API:

First, the gesture API can only be used on the Windows Mobile 6.5 platform, and earlier versions of Windows Mobile do not support it. Therefore, do not develop applications based on the gesture API on Windows Mobile 6.0 or 6.1 (because many devices currently use this version.

Second, on the Windows Mobile 6.5 platform, classic and professional SKUs only support the gesture API, because we all know that standard does not support touch.

The gesture API example provided by TDK is located in the % \ Windows Mobile 6.5 developer Tool Kit \ Samples Directory. It contains three projects: gesturemetricssample, physicsenginesample, and wagsample. Gesture is used for the three projects respectively. h. gesturephysicsengine. H and windowautogesture. h these three headers are all located in the % \ Program Files \ Windows Mobile 6 SDK \ pocketpc \ include \ armv4i directory.

Gesture metrics sample

The gesturemetricssample example shows how to use the gid_hold (hold), gid_select (select), and gid_doubleselect (double-click) messages in wm_gesture.

When you click the screen with a touch pen, start the hold timer (id_hold_timer). If gid_hold is detected in wm_gesture, kill the hold timer (id_hold_timer) and prompt the user; if gid_select is detected in wm_gesture, double-click the timer (id_doubleselect_timer). If gid_doubleselect is detected in wm_gesture, kill the double-click timer (id_doubleselect_timer ), and prompt the user.

Physics engine sample

The physicsenginesample example shows how to use the gid_pan, gid_scroll, and gid_end messages in wm_gesture. Note that before using physics engine, you must declare a global variable of the hphysicsengine type.

With this physics engine, we can browse large-resolution images on the device, use a pen to slide on the touch screen, and select the desired part. During the transition, it has a sliding scrolling effect. This function is currently added. You can try to use the "image and video" tool provided by Windows Mobile to open the image. In this case, there is no sliding scrolling effect,ProgramIf physics engine is used, the sliding scrolling effect can be generated.

Wagsample

The following figure shows the functions implemented in the example of wagsample and physicsenginesample. The difference is that it adds the user's choice, that is, you can choose whether to support touch pens, whether to support scrolling, and so on.

Here is just a superficial introduction to the example of the gesture API that comes with wm6.5 TDK. The main reason is that there is too little information on msdn (which does not seem to be available yet ). Basically, I will share my experience using these three examples with you. The next step is to create an instance by yourself, learn how to use the gesture API, and gradually unlock its secret.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.