FreeRDP
input.c File Reference
#include <winpr/crt.h>
#include <freerdp/input.h>
#include <freerdp/log.h>
#include "message.h"
#include "input.h"

Macros

#define TAG   FREERDP_TAG("core")
 
#define INPUT_EVENT_SYNC   0x0000
 
#define INPUT_EVENT_SCANCODE   0x0004
 
#define INPUT_EVENT_UNICODE   0x0005
 
#define INPUT_EVENT_MOUSE   0x8001
 
#define INPUT_EVENT_MOUSEX   0x8002
 
#define RDP_CLIENT_INPUT_PDU_HEADER_LENGTH   4
 

Functions

static void rdp_write_client_input_pdu_header (wStream *s, UINT16 number)
 
static void rdp_write_input_event_header (wStream *s, UINT32 time, UINT16 type)
 
static wStream * rdp_client_input_pdu_init (rdpRdp *rdp, UINT16 type)
 
static BOOL rdp_send_client_input_pdu (rdpRdp *rdp, wStream *s)
 
static void input_write_synchronize_event (wStream *s, UINT32 flags)
 
static BOOL input_send_synchronize_event (rdpInput *input, UINT32 flags)
 
static void input_write_keyboard_event (wStream *s, UINT16 flags, UINT16 code)
 
static BOOL input_send_keyboard_event (rdpInput *input, UINT16 flags, UINT16 code)
 
static void input_write_unicode_keyboard_event (wStream *s, UINT16 flags, UINT16 code)
 
static BOOL input_send_unicode_keyboard_event (rdpInput *input, UINT16 flags, UINT16 code)
 
static void input_write_mouse_event (wStream *s, UINT16 flags, UINT16 x, UINT16 y)
 
static BOOL input_send_mouse_event (rdpInput *input, UINT16 flags, UINT16 x, UINT16 y)
 
static void input_write_extended_mouse_event (wStream *s, UINT16 flags, UINT16 x, UINT16 y)
 
static BOOL input_send_extended_mouse_event (rdpInput *input, UINT16 flags, UINT16 x, UINT16 y)
 
static BOOL input_send_focus_in_event (rdpInput *input, UINT16 toggleStates)
 
static BOOL input_send_keyboard_pause_event (rdpInput *input)
 
static BOOL input_send_fastpath_synchronize_event (rdpInput *input, UINT32 flags)
 
static BOOL input_send_fastpath_keyboard_event (rdpInput *input, UINT16 flags, UINT16 code)
 
static BOOL input_send_fastpath_unicode_keyboard_event (rdpInput *input, UINT16 flags, UINT16 code)
 
static BOOL input_send_fastpath_mouse_event (rdpInput *input, UINT16 flags, UINT16 x, UINT16 y)
 
static BOOL input_send_fastpath_extended_mouse_event (rdpInput *input, UINT16 flags, UINT16 x, UINT16 y)
 
static BOOL input_send_fastpath_focus_in_event (rdpInput *input, UINT16 toggleStates)
 
static BOOL input_send_fastpath_keyboard_pause_event (rdpInput *input)
 
static BOOL input_recv_sync_event (rdpInput *input, wStream *s)
 
static BOOL input_recv_keyboard_event (rdpInput *input, wStream *s)
 
static BOOL input_recv_unicode_keyboard_event (rdpInput *input, wStream *s)
 
static BOOL input_recv_mouse_event (rdpInput *input, wStream *s)
 
static BOOL input_recv_extended_mouse_event (rdpInput *input, wStream *s)
 
static BOOL input_recv_event (rdpInput *input, wStream *s)
 
BOOL input_recv (rdpInput *input, wStream *s)
 
BOOL input_register_client_callbacks (rdpInput *input)
 
BOOL freerdp_input_send_synchronize_event (rdpInput *input, UINT32 flags)
 
BOOL freerdp_input_send_keyboard_event (rdpInput *input, UINT16 flags, UINT16 code)
 
BOOL freerdp_input_send_keyboard_event_ex (rdpInput *input, BOOL down, UINT32 rdp_scancode)
 
BOOL freerdp_input_send_unicode_keyboard_event (rdpInput *input, UINT16 flags, UINT16 code)
 
BOOL freerdp_input_send_mouse_event (rdpInput *input, UINT16 flags, UINT16 x, UINT16 y)
 
BOOL freerdp_input_send_extended_mouse_event (rdpInput *input, UINT16 flags, UINT16 x, UINT16 y)
 
BOOL freerdp_input_send_focus_in_event (rdpInput *input, UINT16 toggleStates)
 
BOOL freerdp_input_send_keyboard_pause_event (rdpInput *input)
 
int input_process_events (rdpInput *input)
 
static void input_free_queued_message (void *obj)
 
rdpInput * input_new (rdpRdp *rdp)
 
void input_free (rdpInput *input)
 

Macro Definition Documentation

#define INPUT_EVENT_MOUSE   0x8001
#define INPUT_EVENT_MOUSEX   0x8002
#define INPUT_EVENT_SCANCODE   0x0004
#define INPUT_EVENT_SYNC   0x0000
#define INPUT_EVENT_UNICODE   0x0005
#define RDP_CLIENT_INPUT_PDU_HEADER_LENGTH   4
#define TAG   FREERDP_TAG("core")

FreeRDP: A Remote Desktop Protocol Implementation Input PDUs

Copyright 2011 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.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.

Function Documentation

BOOL freerdp_input_send_extended_mouse_event ( rdpInput *  input,
UINT16  flags,
UINT16  x,
UINT16  y 
)

Here is the caller graph for this function:

BOOL freerdp_input_send_focus_in_event ( rdpInput *  input,
UINT16  toggleStates 
)

Here is the caller graph for this function:

BOOL freerdp_input_send_keyboard_event ( rdpInput *  input,
UINT16  flags,
UINT16  code 
)

Here is the caller graph for this function:

BOOL freerdp_input_send_keyboard_event_ex ( rdpInput *  input,
BOOL  down,
UINT32  rdp_scancode 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL freerdp_input_send_keyboard_pause_event ( rdpInput *  input)

Here is the caller graph for this function:

BOOL freerdp_input_send_mouse_event ( rdpInput *  input,
UINT16  flags,
UINT16  x,
UINT16  y 
)

Here is the caller graph for this function:

BOOL freerdp_input_send_synchronize_event ( rdpInput *  input,
UINT32  flags 
)

Here is the caller graph for this function:

BOOL freerdp_input_send_unicode_keyboard_event ( rdpInput *  input,
UINT16  flags,
UINT16  code 
)
void input_free ( rdpInput *  input)

Here is the call graph for this function:

Here is the caller graph for this function:

static void input_free_queued_message ( void obj)
static

Here is the call graph for this function:

Here is the caller graph for this function:

rdpInput* input_new ( rdpRdp *  rdp)

Here is the call graph for this function:

Here is the caller graph for this function:

int input_process_events ( rdpInput *  input)

Here is the call graph for this function:

BOOL input_recv ( rdpInput *  input,
wStream *  s 
)

FreeRDP: A Remote Desktop Protocol Implementation Input PDUs

Copyright 2011 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.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.

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL input_recv_event ( rdpInput *  input,
wStream *  s 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL input_recv_extended_mouse_event ( rdpInput *  input,
wStream *  s 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL input_recv_keyboard_event ( rdpInput *  input,
wStream *  s 
)
static

Note: A lot of code in FreeRDP and in dependent projects checks the KBDFLAGS_DOWN flag in order to detect a key press. According to the specs only the absence of the slow-path KBDFLAGS_RELEASE flag indicates a key-down event. The slow-path KBDFLAGS_DOWN flag merely indicates that the key was down prior to this event. The checks for KBDFLAGS_DOWN only work successfully because the code handling the fast-path keyboard input sets the KBDFLAGS_DOWN flag if the FASTPATH_INPUT_KBDFLAGS_RELEASE flag is missing. Since the same input callback is used for slow- and fast-path events we have to follow that "convention" here.

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL input_recv_mouse_event ( rdpInput *  input,
wStream *  s 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL input_recv_sync_event ( rdpInput *  input,
wStream *  s 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL input_recv_unicode_keyboard_event ( rdpInput *  input,
wStream *  s 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL input_register_client_callbacks ( rdpInput *  input)

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL input_send_extended_mouse_event ( rdpInput *  input,
UINT16  flags,
UINT16  x,
UINT16  y 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL input_send_fastpath_extended_mouse_event ( rdpInput *  input,
UINT16  flags,
UINT16  x,
UINT16  y 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL input_send_fastpath_focus_in_event ( rdpInput *  input,
UINT16  toggleStates 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL input_send_fastpath_keyboard_event ( rdpInput *  input,
UINT16  flags,
UINT16  code 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL input_send_fastpath_keyboard_pause_event ( rdpInput *  input)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL input_send_fastpath_mouse_event ( rdpInput *  input,
UINT16  flags,
UINT16  x,
UINT16  y 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL input_send_fastpath_synchronize_event ( rdpInput *  input,
UINT32  flags 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL input_send_fastpath_unicode_keyboard_event ( rdpInput *  input,
UINT16  flags,
UINT16  code 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL input_send_focus_in_event ( rdpInput *  input,
UINT16  toggleStates 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL input_send_keyboard_event ( rdpInput *  input,
UINT16  flags,
UINT16  code 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL input_send_keyboard_pause_event ( rdpInput *  input)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL input_send_mouse_event ( rdpInput *  input,
UINT16  flags,
UINT16  x,
UINT16  y 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL input_send_synchronize_event ( rdpInput *  input,
UINT32  flags 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL input_send_unicode_keyboard_event ( rdpInput *  input,
UINT16  flags,
UINT16  code 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void input_write_extended_mouse_event ( wStream *  s,
UINT16  flags,
UINT16  x,
UINT16  y 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void input_write_keyboard_event ( wStream *  s,
UINT16  flags,
UINT16  code 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void input_write_mouse_event ( wStream *  s,
UINT16  flags,
UINT16  x,
UINT16  y 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void input_write_synchronize_event ( wStream *  s,
UINT32  flags 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void input_write_unicode_keyboard_event ( wStream *  s,
UINT16  flags,
UINT16  code 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static wStream* rdp_client_input_pdu_init ( rdpRdp *  rdp,
UINT16  type 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL rdp_send_client_input_pdu ( rdpRdp *  rdp,
wStream *  s 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void rdp_write_client_input_pdu_header ( wStream *  s,
UINT16  number 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void rdp_write_input_event_header ( wStream *  s,
UINT32  time,
UINT16  type 
)
static

Here is the call graph for this function:

Here is the caller graph for this function: