Blame include/freerdp/pointer.h

Packit 1fb8d4
/**
Packit 1fb8d4
 * FreeRDP: A Remote Desktop Protocol Implementation
Packit 1fb8d4
 * Pointer Updates Interface API
Packit 1fb8d4
 *
Packit 1fb8d4
 * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
Packit 1fb8d4
 *
Packit 1fb8d4
 * Licensed under the Apache License, Version 2.0 (the "License");
Packit 1fb8d4
 * you may not use this file except in compliance with the License.
Packit 1fb8d4
 * You may obtain a copy of the License at
Packit 1fb8d4
 *
Packit 1fb8d4
 *     http://www.apache.org/licenses/LICENSE-2.0
Packit 1fb8d4
 *
Packit 1fb8d4
 * Unless required by applicable law or agreed to in writing, software
Packit 1fb8d4
 * distributed under the License is distributed on an "AS IS" BASIS,
Packit 1fb8d4
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Packit 1fb8d4
 * See the License for the specific language governing permissions and
Packit 1fb8d4
 * limitations under the License.
Packit 1fb8d4
 */
Packit 1fb8d4
Packit 1fb8d4
#ifndef FREERDP_UPDATE_POINTER_H
Packit 1fb8d4
#define FREERDP_UPDATE_POINTER_H
Packit 1fb8d4
Packit 1fb8d4
#include <freerdp/types.h>
Packit 1fb8d4
Packit 1fb8d4
#define PTR_MSG_TYPE_SYSTEM		0x0001
Packit 1fb8d4
#define PTR_MSG_TYPE_POSITION		0x0003
Packit 1fb8d4
#define PTR_MSG_TYPE_COLOR		0x0006
Packit 1fb8d4
#define PTR_MSG_TYPE_CACHED		0x0007
Packit 1fb8d4
#define PTR_MSG_TYPE_POINTER		0x0008
Packit 1fb8d4
Packit 1fb8d4
#define SYSPTR_NULL			0x00000000
Packit 1fb8d4
#define SYSPTR_DEFAULT			0x00007F00
Packit 1fb8d4
Packit 1fb8d4
struct _POINTER_POSITION_UPDATE
Packit 1fb8d4
{
Packit 1fb8d4
	UINT32 xPos;
Packit 1fb8d4
	UINT32 yPos;
Packit 1fb8d4
};
Packit 1fb8d4
typedef struct _POINTER_POSITION_UPDATE POINTER_POSITION_UPDATE;
Packit 1fb8d4
Packit 1fb8d4
struct _POINTER_SYSTEM_UPDATE
Packit 1fb8d4
{
Packit 1fb8d4
	UINT32 type;
Packit 1fb8d4
};
Packit 1fb8d4
typedef struct _POINTER_SYSTEM_UPDATE POINTER_SYSTEM_UPDATE;
Packit 1fb8d4
Packit 1fb8d4
struct _POINTER_COLOR_UPDATE
Packit 1fb8d4
{
Packit 1fb8d4
	UINT32 cacheIndex;
Packit 1fb8d4
	UINT32 xPos;
Packit 1fb8d4
	UINT32 yPos;
Packit 1fb8d4
	UINT32 width;
Packit 1fb8d4
	UINT32 height;
Packit 1fb8d4
	UINT32 lengthAndMask;
Packit 1fb8d4
	UINT32 lengthXorMask;
Packit 1fb8d4
	BYTE* xorMaskData;
Packit 1fb8d4
	BYTE* andMaskData;
Packit 1fb8d4
};
Packit 1fb8d4
typedef struct _POINTER_COLOR_UPDATE POINTER_COLOR_UPDATE;
Packit 1fb8d4
Packit 1fb8d4
struct _POINTER_NEW_UPDATE
Packit 1fb8d4
{
Packit 1fb8d4
	UINT32 xorBpp;
Packit 1fb8d4
	POINTER_COLOR_UPDATE colorPtrAttr;
Packit 1fb8d4
};
Packit 1fb8d4
typedef struct _POINTER_NEW_UPDATE POINTER_NEW_UPDATE;
Packit 1fb8d4
Packit 1fb8d4
struct _POINTER_CACHED_UPDATE
Packit 1fb8d4
{
Packit 1fb8d4
	UINT32 cacheIndex;
Packit 1fb8d4
};
Packit 1fb8d4
typedef struct _POINTER_CACHED_UPDATE POINTER_CACHED_UPDATE;
Packit 1fb8d4
Packit 1fb8d4
typedef BOOL (*pPointerPosition)(rdpContext* context,
Packit 1fb8d4
                                 const POINTER_POSITION_UPDATE* pointer_position);
Packit 1fb8d4
typedef BOOL (*pPointerSystem)(rdpContext* context,
Packit 1fb8d4
                               const POINTER_SYSTEM_UPDATE* pointer_system);
Packit 1fb8d4
typedef BOOL (*pPointerColor)(rdpContext* context,
Packit 1fb8d4
                              const POINTER_COLOR_UPDATE* pointer_color);
Packit 1fb8d4
typedef BOOL (*pPointerNew)(rdpContext* context,
Packit 1fb8d4
                            const POINTER_NEW_UPDATE* pointer_new);
Packit 1fb8d4
typedef BOOL (*pPointerCached)(rdpContext* context,
Packit 1fb8d4
                               const POINTER_CACHED_UPDATE* pointer_cached);
Packit 1fb8d4
Packit 1fb8d4
struct rdp_pointer_update
Packit 1fb8d4
{
Packit 1fb8d4
	rdpContext* context; /* 0 */
Packit 1fb8d4
	UINT32 paddingA[16 - 1]; /* 1 */
Packit 1fb8d4
Packit 1fb8d4
	pPointerPosition PointerPosition; /* 16 */
Packit 1fb8d4
	pPointerSystem PointerSystem; /* 17 */
Packit 1fb8d4
	pPointerColor PointerColor; /* 18 */
Packit 1fb8d4
	pPointerNew PointerNew; /* 19 */
Packit 1fb8d4
	pPointerCached PointerCached; /* 20 */
Packit 1fb8d4
	UINT32 paddingB[32 - 21]; /* 21 */
Packit 1fb8d4
};
Packit 1fb8d4
typedef struct rdp_pointer_update rdpPointerUpdate;
Packit 1fb8d4
Packit 1fb8d4
#endif /* FREERDP_UPDATE_POINTER_H */