FreeRDP
xf_event.c File Reference
#include <freerdp/config.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <string.h>
#include <math.h>
#include <winpr/assert.h>
#include <winpr/path.h>
#include <freerdp/log.h>
#include <freerdp/locale/keyboard.h>
#include "xf_rail.h"
#include "xf_window.h"
#include "xf_cliprdr.h"
#include "xf_disp.h"
#include "xf_input.h"
#include "xf_gfx.h"
#include "xf_graphics.h"
#include "xf_utils.h"
#include "xf_event.h"

Macros

#define TAG   CLIENT_TAG("x11")
 
#define CLAMP_COORDINATES(x, y)
 
#define DEBUG_X11(...)
 

Functions

const char * x11_event_string (int event)
 
static BOOL xf_action_script_append (xfContext *xfc, const char *buffer, size_t size, void *user, const char *what, const char *arg)
 
BOOL xf_event_action_script_init (xfContext *xfc)
 
void xf_event_action_script_free (xfContext *xfc)
 
static BOOL action_script_run (xfContext *xfc, const char *buffer, size_t size, void *user, const char *what, const char *arg)
 
static BOOL xf_event_execute_action_script (xfContext *xfc, const XEvent *event)
 
void xf_adjust_coordinates_to_screen (xfContext *xfc, UINT32 *x, UINT32 *y)
 
void xf_event_adjust_coordinates (xfContext *xfc, int *x, int *y)
 
static BOOL xf_event_Expose (xfContext *xfc, const XExposeEvent *event, BOOL app)
 
static BOOL xf_event_VisibilityNotify (xfContext *xfc, const XVisibilityEvent *event, BOOL app)
 
BOOL xf_generic_MotionNotify (xfContext *xfc, int x, int y, int state, Window window, BOOL app)
 
BOOL xf_generic_RawMotionNotify (xfContext *xfc, int x, int y, Window window, BOOL app)
 
static BOOL xf_event_MotionNotify (xfContext *xfc, const XMotionEvent *event, BOOL app)
 
BOOL xf_generic_ButtonEvent (xfContext *xfc, int x, int y, int button, Window window, BOOL app, BOOL down)
 
static BOOL xf_grab_mouse (xfContext *xfc)
 
static BOOL xf_grab_kbd (xfContext *xfc)
 
static BOOL xf_event_ButtonPress (xfContext *xfc, const XButtonEvent *event, BOOL app)
 
static BOOL xf_event_ButtonRelease (xfContext *xfc, const XButtonEvent *event, BOOL app)
 
static BOOL xf_event_KeyPress (xfContext *xfc, const XKeyEvent *event, BOOL app)
 
static BOOL xf_event_KeyRelease (xfContext *xfc, const XKeyEvent *event, BOOL app)
 
static BOOL xf_event_KeyReleaseOrIgnore (xfContext *xfc, const XKeyEvent *event, BOOL app)
 
static BOOL xf_event_FocusIn (xfContext *xfc, const XFocusInEvent *event, BOOL app)
 
static BOOL xf_event_FocusOut (xfContext *xfc, const XFocusOutEvent *event, BOOL app)
 
static BOOL xf_event_MappingNotify (xfContext *xfc, const XMappingEvent *event, BOOL app)
 
static BOOL xf_event_ClientMessage (xfContext *xfc, const XClientMessageEvent *event, BOOL app)
 
static BOOL xf_event_EnterNotify (xfContext *xfc, const XEnterWindowEvent *event, BOOL app)
 
static BOOL xf_event_LeaveNotify (xfContext *xfc, const XLeaveWindowEvent *event, BOOL app)
 
static BOOL xf_event_ConfigureNotify (xfContext *xfc, const XConfigureEvent *event, BOOL app)
 
static BOOL xf_event_MapNotify (xfContext *xfc, const XMapEvent *event, BOOL app)
 
static BOOL xf_event_UnmapNotify (xfContext *xfc, const XUnmapEvent *event, BOOL app)
 
static BOOL xf_event_PropertyNotify (xfContext *xfc, const XPropertyEvent *event, BOOL app)
 
static BOOL xf_event_suppress_events (xfContext *xfc, xfAppWindow *appWindow, const XEvent *event)
 
BOOL xf_event_process (freerdp *instance, const XEvent *event)
 
BOOL xf_generic_RawButtonEvent (xfContext *xfc, int button, BOOL app, BOOL down)
 

Macro Definition Documentation

◆ CLAMP_COORDINATES

#define CLAMP_COORDINATES (   x,
  y 
)
Value:
do \
{ \
if ((x) < 0) \
(x) = 0; \
if ((y) < 0) \
(y) = 0; \
} while (0)
UINT16 y
Definition: include/freerdp/event.h:111
UINT16 x
Definition: include/freerdp/event.h:110

◆ DEBUG_X11

#define DEBUG_X11 (   ...)
Value:
do \
{ \
} while (0)

◆ TAG

#define TAG   CLIENT_TAG("x11")

FreeRDP: A Remote Desktop Protocol Implementation X11 Event Handling

Copyright 2011 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Copyright 2023 HP Development Company, L.P.

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

◆ action_script_run()

static BOOL action_script_run ( xfContext *  xfc,
const char *  buffer,
size_t  size,
void *  user,
const char *  what,
const char *  arg 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ x11_event_string()

const char* x11_event_string ( int  event)

FreeRDP: A Remote Desktop Protocol Implementation X11 Event Handling

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 caller graph for this function:

◆ xf_action_script_append()

static BOOL xf_action_script_append ( xfContext *  xfc,
const char *  buffer,
size_t  size,
void *  user,
const char *  what,
const char *  arg 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_adjust_coordinates_to_screen()

void xf_adjust_coordinates_to_screen ( xfContext *  xfc,
UINT32 *  x,
UINT32 *  y 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_action_script_free()

void xf_event_action_script_free ( xfContext *  xfc)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_action_script_init()

BOOL xf_event_action_script_init ( xfContext *  xfc)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_adjust_coordinates()

void xf_event_adjust_coordinates ( xfContext *  xfc,
int *  x,
int *  y 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_ButtonPress()

static BOOL xf_event_ButtonPress ( xfContext *  xfc,
const XButtonEvent *  event,
BOOL  app 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_ButtonRelease()

static BOOL xf_event_ButtonRelease ( xfContext *  xfc,
const XButtonEvent *  event,
BOOL  app 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_ClientMessage()

static BOOL xf_event_ClientMessage ( xfContext *  xfc,
const XClientMessageEvent *  event,
BOOL  app 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_ConfigureNotify()

static BOOL xf_event_ConfigureNotify ( xfContext *  xfc,
const XConfigureEvent *  event,
BOOL  app 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_EnterNotify()

static BOOL xf_event_EnterNotify ( xfContext *  xfc,
const XEnterWindowEvent *  event,
BOOL  app 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_execute_action_script()

static BOOL xf_event_execute_action_script ( xfContext *  xfc,
const XEvent *  event 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_Expose()

static BOOL xf_event_Expose ( xfContext *  xfc,
const XExposeEvent *  event,
BOOL  app 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_FocusIn()

static BOOL xf_event_FocusIn ( xfContext *  xfc,
const XFocusInEvent *  event,
BOOL  app 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_FocusOut()

static BOOL xf_event_FocusOut ( xfContext *  xfc,
const XFocusOutEvent *  event,
BOOL  app 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_KeyPress()

static BOOL xf_event_KeyPress ( xfContext *  xfc,
const XKeyEvent *  event,
BOOL  app 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_KeyRelease()

static BOOL xf_event_KeyRelease ( xfContext *  xfc,
const XKeyEvent *  event,
BOOL  app 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_KeyReleaseOrIgnore()

static BOOL xf_event_KeyReleaseOrIgnore ( xfContext *  xfc,
const XKeyEvent *  event,
BOOL  app 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_LeaveNotify()

static BOOL xf_event_LeaveNotify ( xfContext *  xfc,
const XLeaveWindowEvent *  event,
BOOL  app 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_MapNotify()

static BOOL xf_event_MapNotify ( xfContext *  xfc,
const XMapEvent *  event,
BOOL  app 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_MappingNotify()

static BOOL xf_event_MappingNotify ( xfContext *  xfc,
const XMappingEvent *  event,
BOOL  app 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_MotionNotify()

static BOOL xf_event_MotionNotify ( xfContext *  xfc,
const XMotionEvent *  event,
BOOL  app 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_process()

BOOL xf_event_process ( freerdp *  instance,
const XEvent *  event 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_PropertyNotify()

static BOOL xf_event_PropertyNotify ( xfContext *  xfc,
const XPropertyEvent *  event,
BOOL  app 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_suppress_events()

static BOOL xf_event_suppress_events ( xfContext *  xfc,
xfAppWindow *  appWindow,
const XEvent *  event 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_UnmapNotify()

static BOOL xf_event_UnmapNotify ( xfContext *  xfc,
const XUnmapEvent *  event,
BOOL  app 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_event_VisibilityNotify()

static BOOL xf_event_VisibilityNotify ( xfContext *  xfc,
const XVisibilityEvent *  event,
BOOL  app 
)
static
Here is the caller graph for this function:

◆ xf_generic_ButtonEvent()

BOOL xf_generic_ButtonEvent ( xfContext *  xfc,
int  x,
int  y,
int  button,
Window  window,
BOOL  app,
BOOL  down 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_generic_MotionNotify()

BOOL xf_generic_MotionNotify ( xfContext *  xfc,
int  x,
int  y,
int  state,
Window  window,
BOOL  app 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_generic_RawButtonEvent()

BOOL xf_generic_RawButtonEvent ( xfContext *  xfc,
int  button,
BOOL  app,
BOOL  down 
)
Here is the call graph for this function:

◆ xf_generic_RawMotionNotify()

BOOL xf_generic_RawMotionNotify ( xfContext *  xfc,
int  x,
int  y,
Window  window,
BOOL  app 
)
Here is the call graph for this function:

◆ xf_grab_kbd()

static BOOL xf_grab_kbd ( xfContext *  xfc)
static
Here is the caller graph for this function:

◆ xf_grab_mouse()

static BOOL xf_grab_mouse ( xfContext *  xfc)
static
Here is the call graph for this function:
Here is the caller graph for this function: