FreeRDP
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
server/ainput.h
1
21#ifndef FREERDP_CHANNEL_AINPUT_SERVER_H
22#define FREERDP_CHANNEL_AINPUT_SERVER_H
23
24#include <freerdp/channels/wtsvc.h>
25#include <freerdp/channels/ainput.h>
26
27#ifdef __cplusplus
28extern "C"
29{
30#endif
31
32 typedef enum AINPUT_SERVER_OPEN_RESULT
33 {
34 AINPUT_SERVER_OPEN_RESULT_OK = 0,
35 AINPUT_SERVER_OPEN_RESULT_CLOSED = 1,
36 AINPUT_SERVER_OPEN_RESULT_NOTSUPPORTED = 2,
37 AINPUT_SERVER_OPEN_RESULT_ERROR = 3
38 } AINPUT_SERVER_OPEN_RESULT;
39
40 typedef struct s_ainput_server_context ainput_server_context;
41
42 typedef BOOL (*psAInputChannelIdAssigned)(ainput_server_context* context, UINT32 channelId);
43
44 typedef UINT (*psAInputServerInitialize)(ainput_server_context* context, BOOL externalThread);
45 typedef UINT (*psAInputServerPoll)(ainput_server_context* context);
46 typedef BOOL (*psAInputServerChannelHandle)(ainput_server_context* context, HANDLE* handle);
47
48 typedef UINT (*psAInputServerOpen)(ainput_server_context* context);
49 typedef UINT (*psAInputServerClose)(ainput_server_context* context);
50 typedef BOOL (*psAInputServerIsOpen)(ainput_server_context* context);
51
52 typedef UINT (*psAInputServerOpenResult)(ainput_server_context* context,
53 AINPUT_SERVER_OPEN_RESULT result);
54 typedef UINT (*psAInputServerMouseEvent)(ainput_server_context* context, UINT64 timestamp,
55 UINT64 flags, INT32 x, INT32 y);
56
58 {
59 HANDLE vcm;
60
61 /* Server self-defined pointer. */
62 void* data;
63
64 /*** APIs called by the server. ***/
68 psAInputServerOpen Open;
69
77 psAInputServerInitialize Initialize;
78
83 psAInputServerPoll Poll;
84
89 psAInputServerChannelHandle ChannelHandle;
90
94 psAInputServerClose Close;
98 psAInputServerIsOpen IsOpen;
99
100 /*** Callbacks registered by the server. ***/
101
105 psAInputServerMouseEvent MouseEvent;
106
107 rdpContext* rdpcontext;
108
112 psAInputChannelIdAssigned ChannelIdAssigned;
113 };
114
115 FREERDP_API void ainput_server_context_free(ainput_server_context* context);
116
117 WINPR_ATTR_MALLOC(ainput_server_context_free, 1)
118 FREERDP_API ainput_server_context* ainput_server_context_new(HANDLE vcm);
119
120#ifdef __cplusplus
121}
122#endif
123
124#endif /* FREERDP_CHANNEL_AINPUT_SERVER_H */
psAInputServerOpen Open
psAInputServerChannelHandle ChannelHandle
Poll When externalThread=TRUE call to get a handle to wait for events. Will return FALSE until the ha...
psAInputServerInitialize Initialize
psAInputServerIsOpen IsOpen
psAInputChannelIdAssigned ChannelIdAssigned
psAInputServerClose Close
psAInputServerPoll Poll
Poll When externalThread=TRUE call periodically from your main loop. if externalThread=FALSE do not c...
psAInputServerMouseEvent MouseEvent