FreeRDP
xf_window.c File Reference
#include <stdarg.h>
#include <unistd.h>
#include <sys/types.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <winpr/thread.h>
#include <winpr/crt.h>
#include <winpr/string.h>
#include <freerdp/rail.h>
#include <freerdp/log.h>
#include "xf_rail.h"
#include "xf_input.h"
#include "FreeRDP_Icon_256px.h"
#include "xf_window.h"

Macros

#define TAG   CLIENT_TAG("x11")
 
#define DEBUG_X11(...)   do { } while (0)
 
#define xf_icon_prop   FreeRDP_Icon_256px_prop
 
#define MWM_HINTS_FUNCTIONS   (1L << 0)
 
#define MWM_HINTS_DECORATIONS   (1L << 1)
 
#define MWM_HINTS_INPUT_MODE   (1L << 2)
 
#define MWM_HINTS_STATUS   (1L << 3)
 
#define MWM_FUNC_ALL   (1L << 0)
 
#define MWM_FUNC_RESIZE   (1L << 1)
 
#define MWM_FUNC_MOVE   (1L << 2)
 
#define MWM_FUNC_MINIMIZE   (1L << 3)
 
#define MWM_FUNC_MAXIMIZE   (1L << 4)
 
#define MWM_FUNC_CLOSE   (1L << 5)
 
#define MWM_DECOR_ALL   (1L << 0)
 
#define MWM_DECOR_BORDER   (1L << 1)
 
#define MWM_DECOR_RESIZEH   (1L << 2)
 
#define MWM_DECOR_TITLE   (1L << 3)
 
#define MWM_DECOR_MENU   (1L << 4)
 
#define MWM_DECOR_MINIMIZE   (1L << 5)
 
#define MWM_DECOR_MAXIMIZE   (1L << 6)
 
#define PROP_MOTIF_WM_HINTS_ELEMENTS   5
 

Functions

static void xf_SetWindowTitleText (xfContext *xfc, Window window, const char *name)
 
void xf_SendClientEvent (xfContext *xfc, Window window, Atom atom, unsigned int numArgs,...)
 
void xf_SetWindowMinimized (xfContext *xfc, xfWindow *window)
 
void xf_SetWindowFullscreen (xfContext *xfc, xfWindow *window, BOOL fullscreen)
 
BOOL xf_GetWindowProperty (xfContext *xfc, Window window, Atom property, int length, unsigned long *nitems, unsigned long *bytes, BYTE **prop)
 
BOOL xf_GetCurrentDesktop (xfContext *xfc)
 
BOOL xf_GetWorkArea (xfContext *xfc)
 
void xf_SetWindowDecorations (xfContext *xfc, Window window, BOOL show)
 
void xf_SetWindowUnlisted (xfContext *xfc, Window window)
 
static void xf_SetWindowPID (xfContext *xfc, Window window, pid_t pid)
 
static const char * get_shm_id (void)
 
Window xf_CreateDummyWindow (xfContext *xfc)
 
void xf_DestroyDummyWindow (xfContext *xfc, Window window)
 
xfWindow * xf_CreateDesktopWindow (xfContext *xfc, char *name, int width, int height)
 
void xf_ResizeDesktopWindow (xfContext *xfc, xfWindow *window, int width, int height)
 
void xf_DestroyDesktopWindow (xfContext *xfc, xfWindow *window)
 
void xf_SetWindowStyle (xfContext *xfc, xfAppWindow *appWindow, UINT32 style, UINT32 ex_style)
 
void xf_SetWindowText (xfContext *xfc, xfAppWindow *appWindow, const char *name)
 
static void xf_FixWindowCoordinates (xfContext *xfc, int *x, int *y, int *width, int *height)
 
int xf_AppWindowInit (xfContext *xfc, xfAppWindow *appWindow)
 
void xf_SetWindowMinMaxInfo (xfContext *xfc, xfAppWindow *appWindow, int maxWidth, int maxHeight, int maxPosX, int maxPosY, int minTrackWidth, int minTrackHeight, int maxTrackWidth, int maxTrackHeight)
 
void xf_StartLocalMoveSize (xfContext *xfc, xfAppWindow *appWindow, int direction, int x, int y)
 
void xf_EndLocalMoveSize (xfContext *xfc, xfAppWindow *appWindow)
 
void xf_MoveWindow (xfContext *xfc, xfAppWindow *appWindow, int x, int y, int width, int height)
 
void xf_ShowWindow (xfContext *xfc, xfAppWindow *appWindow, BYTE state)
 
void xf_SetWindowRects (xfContext *xfc, xfAppWindow *appWindow, RECTANGLE_16 *rects, int nrects)
 
void xf_SetWindowVisibilityRects (xfContext *xfc, xfAppWindow *appWindow, UINT32 rectsOffsetX, UINT32 rectsOffsetY, RECTANGLE_16 *rects, int nrects)
 
void xf_UpdateWindowArea (xfContext *xfc, xfAppWindow *appWindow, int x, int y, int width, int height)
 
void xf_DestroyWindow (xfContext *xfc, xfAppWindow *appWindow)
 
xfAppWindow * xf_AppWindowFromX11Window (xfContext *xfc, Window wnd)
 

Macro Definition Documentation

#define DEBUG_X11 (   ...)    do { } while (0)
#define MWM_DECOR_ALL   (1L << 0)
#define MWM_DECOR_BORDER   (1L << 1)
#define MWM_DECOR_MAXIMIZE   (1L << 6)
#define MWM_DECOR_MENU   (1L << 4)
#define MWM_DECOR_MINIMIZE   (1L << 5)
#define MWM_DECOR_RESIZEH   (1L << 2)
#define MWM_DECOR_TITLE   (1L << 3)
#define MWM_FUNC_ALL   (1L << 0)
#define MWM_FUNC_CLOSE   (1L << 5)
#define MWM_FUNC_MAXIMIZE   (1L << 4)
#define MWM_FUNC_MINIMIZE   (1L << 3)
#define MWM_FUNC_MOVE   (1L << 2)
#define MWM_FUNC_RESIZE   (1L << 1)
#define MWM_HINTS_DECORATIONS   (1L << 1)
#define MWM_HINTS_FUNCTIONS   (1L << 0)
#define MWM_HINTS_INPUT_MODE   (1L << 2)
#define MWM_HINTS_STATUS   (1L << 3)
#define PROP_MOTIF_WM_HINTS_ELEMENTS   5
#define TAG   CLIENT_TAG("x11")

FreeRDP: A Remote Desktop Protocol Implementation X11 Windows

Copyright 2011 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Copyright 2012 HP Development Company, LLC Copyright 2016 Thincast Technologies GmbH Copyright 2016 Armin Novak armin.nosp@m..nov.nosp@m.ak@th.nosp@m.inca.nosp@m.st.co.nosp@m.m

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.

#define xf_icon_prop   FreeRDP_Icon_256px_prop

Function Documentation

static const char* get_shm_id ( void  )
static

Here is the call graph for this function:

Here is the caller graph for this function:

xfAppWindow* xf_AppWindowFromX11Window ( xfContext *  xfc,
Window  wnd 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int xf_AppWindowInit ( xfContext *  xfc,
xfAppWindow *  appWindow 
)

Here is the call graph for this function:

Here is the caller graph for this function:

xfWindow* xf_CreateDesktopWindow ( xfContext *  xfc,
char *  name,
int  width,
int  height 
)

Here is the call graph for this function:

Here is the caller graph for this function:

Window xf_CreateDummyWindow ( xfContext *  xfc)

Here is the caller graph for this function:

void xf_DestroyDesktopWindow ( xfContext *  xfc,
xfWindow *  window 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void xf_DestroyDummyWindow ( xfContext *  xfc,
Window  window 
)

Here is the caller graph for this function:

void xf_DestroyWindow ( xfContext *  xfc,
xfAppWindow *  appWindow 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void xf_EndLocalMoveSize ( xfContext *  xfc,
xfAppWindow *  appWindow 
)

Here is the call graph for this function:

Here is the caller graph for this function:

static void xf_FixWindowCoordinates ( xfContext *  xfc,
int *  x,
int *  y,
int *  width,
int *  height 
)
static

Here is the caller graph for this function:

BOOL xf_GetCurrentDesktop ( xfContext *  xfc)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL xf_GetWindowProperty ( xfContext *  xfc,
Window  window,
Atom  property,
int  length,
unsigned long *  nitems,
unsigned long *  bytes,
BYTE **  prop 
)

Here is the caller graph for this function:

BOOL xf_GetWorkArea ( xfContext *  xfc)

Here is the call graph for this function:

Here is the caller graph for this function:

void xf_MoveWindow ( xfContext *  xfc,
xfAppWindow *  appWindow,
int  x,
int  y,
int  width,
int  height 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void xf_ResizeDesktopWindow ( xfContext *  xfc,
xfWindow *  window,
int  width,
int  height 
)

Here is the caller graph for this function:

void xf_SendClientEvent ( xfContext *  xfc,
Window  window,
Atom  atom,
unsigned int  numArgs,
  ... 
)

Post an event from the client to the X server

Here is the caller graph for this function:

void xf_SetWindowDecorations ( xfContext *  xfc,
Window  window,
BOOL  show 
)

Here is the caller graph for this function:

void xf_SetWindowFullscreen ( xfContext *  xfc,
xfWindow *  window,
BOOL  fullscreen 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void xf_SetWindowMinimized ( xfContext *  xfc,
xfWindow *  window 
)

Here is the caller graph for this function:

void xf_SetWindowMinMaxInfo ( xfContext *  xfc,
xfAppWindow *  appWindow,
int  maxWidth,
int  maxHeight,
int  maxPosX,
int  maxPosY,
int  minTrackWidth,
int  minTrackHeight,
int  maxTrackWidth,
int  maxTrackHeight 
)

Here is the caller graph for this function:

static void xf_SetWindowPID ( xfContext *  xfc,
Window  window,
pid_t  pid 
)
static

Here is the caller graph for this function:

void xf_SetWindowRects ( xfContext *  xfc,
xfAppWindow *  appWindow,
RECTANGLE_16 *  rects,
int  nrects 
)
void xf_SetWindowStyle ( xfContext *  xfc,
xfAppWindow *  appWindow,
UINT32  style,
UINT32  ex_style 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void xf_SetWindowText ( xfContext *  xfc,
xfAppWindow *  appWindow,
const char *  name 
)

Here is the call graph for this function:

Here is the caller graph for this function:

static void xf_SetWindowTitleText ( xfContext *  xfc,
Window  window,
const char *  name 
)
static

Here is the caller graph for this function:

void xf_SetWindowUnlisted ( xfContext *  xfc,
Window  window 
)

Here is the caller graph for this function:

void xf_SetWindowVisibilityRects ( xfContext *  xfc,
xfAppWindow *  appWindow,
UINT32  rectsOffsetX,
UINT32  rectsOffsetY,
RECTANGLE_16 *  rects,
int  nrects 
)

Here is the caller graph for this function:

void xf_ShowWindow ( xfContext *  xfc,
xfAppWindow *  appWindow,
BYTE  state 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void xf_StartLocalMoveSize ( xfContext *  xfc,
xfAppWindow *  appWindow,
int  direction,
int  x,
int  y 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void xf_UpdateWindowArea ( xfContext *  xfc,
xfAppWindow *  appWindow,
int  x,
int  y,
int  width,
int  height 
)

Here is the call graph for this function:

Here is the caller graph for this function: