2011-11-22 01:44:50 +04:00
|
|
|
/**
|
2012-10-09 07:02:04 +04:00
|
|
|
* FreeRDP: A Remote Desktop Protocol Implementation
|
2011-11-22 01:44:50 +04:00
|
|
|
* Pointer Updates Interface API
|
|
|
|
*
|
|
|
|
* Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2012-12-14 09:25:48 +04:00
|
|
|
#ifndef FREERDP_UPDATE_POINTER_H
|
|
|
|
#define FREERDP_UPDATE_POINTER_H
|
2011-11-22 01:44:50 +04:00
|
|
|
|
|
|
|
#include <freerdp/types.h>
|
|
|
|
|
2019-11-06 17:24:51 +03:00
|
|
|
#define PTR_MSG_TYPE_SYSTEM 0x0001
|
|
|
|
#define PTR_MSG_TYPE_POSITION 0x0003
|
|
|
|
#define PTR_MSG_TYPE_COLOR 0x0006
|
|
|
|
#define PTR_MSG_TYPE_CACHED 0x0007
|
|
|
|
#define PTR_MSG_TYPE_POINTER 0x0008
|
2019-12-19 11:35:53 +03:00
|
|
|
#define PTR_MSG_TYPE_POINTER_LARGE 0x0009
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2019-11-06 17:24:51 +03:00
|
|
|
#define SYSPTR_NULL 0x00000000
|
|
|
|
#define SYSPTR_DEFAULT 0x00007F00
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2022-02-14 16:59:22 +03:00
|
|
|
typedef struct
|
2011-11-22 01:44:50 +04:00
|
|
|
{
|
2012-10-09 11:26:39 +04:00
|
|
|
UINT32 xPos;
|
|
|
|
UINT32 yPos;
|
2022-02-14 16:59:22 +03:00
|
|
|
} POINTER_POSITION_UPDATE;
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2022-02-14 16:59:22 +03:00
|
|
|
typedef struct
|
2011-11-22 01:44:50 +04:00
|
|
|
{
|
2012-10-09 11:26:39 +04:00
|
|
|
UINT32 type;
|
2022-02-14 16:59:22 +03:00
|
|
|
} POINTER_SYSTEM_UPDATE;
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2022-02-14 16:59:22 +03:00
|
|
|
typedef struct
|
2011-11-22 01:44:50 +04:00
|
|
|
{
|
2012-10-09 11:26:39 +04:00
|
|
|
UINT32 cacheIndex;
|
|
|
|
UINT32 xPos;
|
|
|
|
UINT32 yPos;
|
|
|
|
UINT32 width;
|
|
|
|
UINT32 height;
|
|
|
|
UINT32 lengthAndMask;
|
|
|
|
UINT32 lengthXorMask;
|
2012-10-09 11:01:37 +04:00
|
|
|
BYTE* xorMaskData;
|
|
|
|
BYTE* andMaskData;
|
2022-02-14 16:59:22 +03:00
|
|
|
} POINTER_COLOR_UPDATE;
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2022-02-14 16:59:22 +03:00
|
|
|
typedef struct
|
2019-12-19 11:35:53 +03:00
|
|
|
{
|
|
|
|
UINT16 xorBpp;
|
|
|
|
UINT16 cacheIndex;
|
|
|
|
UINT16 hotSpotX;
|
|
|
|
UINT16 hotSpotY;
|
|
|
|
UINT16 width;
|
|
|
|
UINT16 height;
|
|
|
|
UINT32 lengthAndMask;
|
|
|
|
UINT32 lengthXorMask;
|
|
|
|
BYTE* xorMaskData;
|
|
|
|
BYTE* andMaskData;
|
2022-02-14 16:59:22 +03:00
|
|
|
} POINTER_LARGE_UPDATE;
|
2019-12-19 11:35:53 +03:00
|
|
|
|
2022-02-14 16:59:22 +03:00
|
|
|
typedef struct
|
2011-11-22 01:44:50 +04:00
|
|
|
{
|
2012-10-09 11:26:39 +04:00
|
|
|
UINT32 xorBpp;
|
2011-11-22 01:44:50 +04:00
|
|
|
POINTER_COLOR_UPDATE colorPtrAttr;
|
2022-02-14 16:59:22 +03:00
|
|
|
} POINTER_NEW_UPDATE;
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2022-02-14 16:59:22 +03:00
|
|
|
typedef struct
|
2011-11-22 01:44:50 +04:00
|
|
|
{
|
2012-10-09 11:26:39 +04:00
|
|
|
UINT32 cacheIndex;
|
2022-02-14 16:59:22 +03:00
|
|
|
} POINTER_CACHED_UPDATE;
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2016-04-05 18:07:45 +03:00
|
|
|
typedef BOOL (*pPointerPosition)(rdpContext* context,
|
|
|
|
const POINTER_POSITION_UPDATE* pointer_position);
|
2019-11-06 17:24:51 +03:00
|
|
|
typedef BOOL (*pPointerSystem)(rdpContext* context, const POINTER_SYSTEM_UPDATE* pointer_system);
|
|
|
|
typedef BOOL (*pPointerColor)(rdpContext* context, const POINTER_COLOR_UPDATE* pointer_color);
|
|
|
|
typedef BOOL (*pPointerNew)(rdpContext* context, const POINTER_NEW_UPDATE* pointer_new);
|
|
|
|
typedef BOOL (*pPointerCached)(rdpContext* context, const POINTER_CACHED_UPDATE* pointer_cached);
|
2019-12-19 11:35:53 +03:00
|
|
|
typedef BOOL (*pPointerLarge)(rdpContext* context, const POINTER_LARGE_UPDATE* pointer_large);
|
2011-11-22 02:48:03 +04:00
|
|
|
|
|
|
|
struct rdp_pointer_update
|
|
|
|
{
|
2019-11-06 17:24:51 +03:00
|
|
|
rdpContext* context; /* 0 */
|
2012-10-09 11:26:39 +04:00
|
|
|
UINT32 paddingA[16 - 1]; /* 1 */
|
2011-11-22 02:48:03 +04:00
|
|
|
|
|
|
|
pPointerPosition PointerPosition; /* 16 */
|
2019-11-06 17:24:51 +03:00
|
|
|
pPointerSystem PointerSystem; /* 17 */
|
|
|
|
pPointerColor PointerColor; /* 18 */
|
|
|
|
pPointerNew PointerNew; /* 19 */
|
|
|
|
pPointerCached PointerCached; /* 20 */
|
2019-12-19 11:35:53 +03:00
|
|
|
pPointerLarge PointerLarge; /* 21 */
|
|
|
|
UINT32 paddingB[32 - 22]; /* 22 */
|
2011-11-22 02:48:03 +04:00
|
|
|
};
|
|
|
|
typedef struct rdp_pointer_update rdpPointerUpdate;
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2012-12-14 09:25:48 +04:00
|
|
|
#endif /* FREERDP_UPDATE_POINTER_H */
|