//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft
// premium shared source license agreement under which you licensed
// this source code. If you did not accept the terms of the license
// agreement, you are not authorized to use this source code.
// For the terms of the license, please see the license agreement
// signed by you and Microsoft.
// THE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES.
//
#ifndef _GESTUREPHYSICSENGINE_H_
#define _GESTUREPHYSICSENGINE_H_
#if (_MSC_VER >= 1000)
#pragma once
#endif
#include <windows.h>
/// <summary>
/// Defines a common value for a normal frame delay rate expected to be used when displaying
/// output from the physics engine. We are aiming at 25fps and also allow ~6ms latency in the timer
/// </summary>
#define GESTURE_ANIMATION_FRAME_DELAY_MS 34
#ifdef __cplusplus
extern "C"
{
#endif
/// <summary>
/// Describes the initialization parameters for a physics engine object
/// </summary>
typedef struct tagPHYSICSENGINEINIT
{
/// <summary>
/// Specifies the size of the structure in bytes. This must be set to
/// sizeof(PHYSICSENGINEINIT).
/// </summary>
DWORD cbSize;
/// <summary>
/// Reserved engine type - must be set to zero
/// </summary>
DWORD dwEngineType;
/// <summary>
/// Specifies flags which control the behavior of the engine. Currently only
/// 0 or PHYSICSENGINE_FLAG_USERTIME is supported. Any other values will
/// cause RKCreatePhysicsEngine to fail. Specifying 0 here will cause the
/// physics engine to operate in its default mode, reading the time from
/// the system clock.
/// </summary>
DWORD dwFlags;
/// <summary>
/// Specifies the initial velocity in pixels per second
/// </summary>
LONG lInitialVelocity;
/// <summary>
/// Specifies the angle at which the animation should occur. The angle is
/// specified as a value in the range 0-65536, where 0 is -2pi radians,
/// pointing east, and 65536 is +2pi radians. Angles increase in an
/// anti-clockwise direction.
/// </summary>
DWORD dwInitialAngle;
/// <summary>
/// Specifies the X-axis movement mode. Acceptable values are
/// PHYSICSENGINE_MOVEMENT_MODE_DECELERATE. Any other value will cause
/// CreatePhysicsEngine to fail.
/// </summary>
BYTE bXAxisMovementMode;
/// <summary>
/// Specifies the X-axis boundary mode. Acceptable values are
/// PHYSICSENGINE_BOUNDARY_MODE_NONE, PHYSICSENGINE_BOUNDARY_MODE_RUBBERBAND
/// </summary>
BYTE bXAxisBoundaryMode;
/// <summary>
/// Specifies the Y-axis movement mode. Acceptable values are
/// PHYSICSENGINE_MOVEMENT_MODE_DECELERATE. Any other value will cause
/// CreatePhysicsEngine to fail.
/// </summary>
BYTE bYAxisMovementMode;
/// <summary>
/// Specifies the Y-axis boundary mode. Acceptable values are
/// PHYSICSENGINE_BOUNDARY_MODE_NONE, PHYSICSENGINE_BOUNDARY_MODE_RUBBERBAND
/// </summary>
BYTE bYAxisBoundaryMode;
/// <summary>
/// Rectangle specifying the boundary
/// </summary>
RECT rcBoundary;
/// <summary>
/// Size of viewable region
/// </summary>
SIZE sizeView;
/// <summary>
/// Specifies the initial position of the top-left corner of the viewable
/// region
/// </summary>
POINT ptInitialPosition;
/// <summary>
/// Specifies the size of an item for snapping. An item size less than one
/// in either dimension will be treated the same as a one. The physics engine
/// will only stop on item boundaries. An item size of one will allow the
/// physics engine to stop at any point on that axis.
/// </summary>
SIZE sizeItem;
} PHYSICSENGINEINIT;
/// <summary>
/// Describes the state of the physics engine at the current engine time
/// </summary>
typedef struct tagPHYSICSENGINESTATE
{
/// <summary>
/// Specifies the size of the structure in bytes. This must be set to
/// sizeof(PHYSICSENGINESTATE).
/// </summary>
DWORD cbSize;
/// <summary>
/// Specifies the current engine time in milliseconds
/// </summary>
DWORD dwTime;
/// <summary>
/// Specifies the current position in pixels
/// </summary>
POINT ptPosition;
/// <summary>
/// Specifies the velocity along the X-axis in pixels per second
/// </summary>
LONG lVelocityX;
/// <summary>
/// Specifies the velocity along the Y-axis in pixels per second
/// </summary>
LONG lVelocityY;
/// <summary>
/// Indicates that the animation is complete
/// </summary>
BOOL fComplete;
} PHYSICSENGINESTATE;
/// <summary>
/// Engine never exceeds limits and has no transition at limit
/// <summary>
#define PHYSICSENGINE_BOUNDARY_MODE_NONE 0
/// <summary>
/// Engine can pass limits as part of transition effect
/// </summary>
#define PHYSICSENGINE_BOUNDARY_MODE_RUBBERBAND 1
/// <summary>
/// Reserved for internal physics engine use
/// </summary>
#define PHYSICSENGINE_BOUNDARY_MODE_RESERVED_1 2
/// <summary>
/// Engine will decelerate over time
/// </summary>
#define PHYSICSENGINE_MOVEMENT_MODE_DECELERATE 0
/// <summary>
/// Specifies that the physics engine should allow the user to specify the time
/// </summary>
#define PHYSICSENGINE_FLAG_USERTIME 1
/// <summary>
/// Reserved for internal physics engine use
/// </summary>
#define PHYSICSENGINE_FLAG_RESERVED_1 0x80000000
/// <summary>
/// Reserved for internal physics engine use
/// </summary>
#define PHYSICSENGINE_FLAG_RESERVED_2 0x40000000
/// <summary>
/// Internal mask defines all valid flags. Any flags not covered by this will
/// be rejected
/// </summary>
#define PHYSICSENGINE_ALL_FLAGS (PHYSICSENGINE_FLAG_USERTIME | PHYSICSENGINE_FLAG_RESERVED_1 | PHYSICSENGINE_FLAG_RESERVED_2)
/// <summary>
/// Handle to an instance of the PhysicsEngine. These objects should be
/// destroyed by calling RKDestroyPhysicsEngine
/// </summary>
DECLARE_HANDLE(HPHYSICSENGINE);
/// <summary>
/// Creates a PhysicsEngine object and configures it with the specified
/// parameters
/// </summary>
/// <param name="pEngineInit">Pointer to PHYSICSENGINEINIT, used to configure
/// the object</param>
/// <param name="phResult">Pointer to a variable of type HPHYSICSENGINE to
/// receive the result</param>
/// <returns>An HRESULT to indicate success or failure. S_OK is returned on
/// success.</returns>
HRESULT TKCreatePhysicsEngine(__in const PHYSICSENGINEINIT* pEngineInit, __out HPHYSICSENGINE* phResult);
/// <summary>
/// Destroys a physics engine object
/// </summary>
/// <param name="hEngine">A handle to a physics engine object</param>
/// <returns>An HRESULT to indicate success or failure. S_OK is returned on
/// success.</returns>
HRESULT TKDestroyPhysicsEngine(HPHYSICSENGINE hEngine);
/// <summary>
/// Set the current timestamp of the PhysicsEngine object. The time is set to
/// zero upon construction. The time is specified relative to the start of the
/// animation
/// </summary>
/// <param name="hEngine">A handle to a physics engine object</param>
/// <param name="dwTime">The timestamp</param>
/// <returns>An HRESULT to indicate success or failure. S_OK is returned on
/// success.</returns>
HRESULT TKSetPhysicsEngineUserTime(HPHYSICSENGINE hEngine, DWORD dwTime);
/// <summary>
/// Query the state of the physics engine, retrieving the position offset,
/// velocity and completion status of the engine at the time last specified by
/// a call to RKSetPhysicsEngineUserTime.
/// </summary>
/// <param name="hEngine">A handle to a physics engine object</param>
/// <param name="pState">A pointer to a PHYSICSENGINESTATE structure
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
http://www.devdiv.net/thread-21400-1-1.html http://code.msdn.microsoft.com/gestureswm http://msdn.microsoft.com/zh-cn/windowsmobile/default.aspx [Windows Mobile]Gestures API 擷取使用者的手勢 :http://www.dotblogs.com.tw/chou/archive/2009/08/05/9877.aspx http://www.cnblogs.com/dearsj001 ... login=1#commentform
资源推荐
资源详情
资源评论
收起资源包目录
Microsoft.WindowsMobile.Gestures.zip (52个子文件)
Microsoft.WindowsMobile.Gestures
AutoGestureContext.cs 21KB
AutoGestureAnimationState.cs 646B
GestureExtensions.cs 2KB
PhysicsAnimationFrameEventArgs.cs 4KB
GestureEventArgs.cs 4KB
AutoGestureManager.cs 15KB
PhysicsEngine.cs 26KB
MS.Internal
WindowAutoGestureNativeMethods.cs 11KB
GesturePhysicsEngineNativeMethods.cs 10KB
Lazy.cs 13KB
WindowsNativeMethods.cs 6KB
Hook.cs 9KB
GestureNativeMethods.cs 9KB
GestureScrollEventArgs.cs 3KB
Gestures.cd 3KB
GestureState.cs 1KB
GestureScrollDirection.cs 1KB
AutoGestureAnimationExtraState.cs 745B
GestureRecognizer.cs 12KB
GestureKind.cs 1KB
AutoGestureAnimateEventArgs.cs 1KB
AutoGestureStatusEventArgs.cs 2KB
Properties
AssemblyInfo.cs 1KB
Resources.resx 5KB
Resources.Designer.cs 2KB
Microsoft.WindowsMobile.Gestures.csproj 5KB
PhysicsAnimationFrame.cs 4KB
GestureHarness
BuiltinForm.Designer.cs 7KB
Program.cs 902B
LondonEngland.bmp 2.12MB
AutoGestureForm.Designer.cs 4KB
GestureForm.resx 6KB
GestureForm.cs 2KB
AutoGestureForm.resx 3.18MB
GestureHarness.csproj 6KB
BuiltinForm.resx 1.04MB
MainForm.resx 6KB
AutoGestureForm.cs 1KB
BuiltinForm.cs 950B
PhysicsForm.cs 4KB
PhysicsForm.Designer.cs 6KB
MainForm.Designer.cs 5KB
GestureForm.Designer.cs 4KB
MainForm.cs 2KB
PhysicsForm.resx 3.18MB
Properties
AssemblyInfo.cs 2KB
Resources.resx 5KB
Resources.Designer.cs 2KB
Gestures.sln 3KB
WindowAutoGesture.h 3KB
gesture.h 4KB
GesturePhysicsEngine.h 8KB
共 52 条
- 1
资源评论
- liuhentaxue2012-10-31不是6.5的,是6.0的
wt0731
- 粉丝: 42
- 资源: 115
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功