FreeRDP
|
#include <freerdp/config.h>
#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/assert.h>
#include <winpr/thread.h>
#include <winpr/crt.h>
#include <winpr/string.h>
#include <freerdp/rail.h>
#include <freerdp/log.h>
#include "xf_gfx.h"
#include "xf_rail.h"
#include "xf_input.h"
#include "xf_keyboard.h"
#include "xf_utils.h"
#include <FreeRDP_Icon_256px.h>
#include "xf_window.h"
Macros | |
#define | TAG CLIENT_TAG("x11") |
#define | DEBUG_X11(...) |
#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_SetWindowActions (xfContext *xfc, xfAppWindow *appWindow) |
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) |
BOOL | xf_AppWindowCreate (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) |
static void | xf_AppWindowDestroyImage (xfAppWindow *appWindow) |
void | xf_DestroyWindow (xfContext *xfc, xfAppWindow *appWindow) |
xfAppWindow * | xf_AppWindowFromX11Window (xfContext *xfc, Window wnd) |
UINT | xf_AppUpdateWindowFromSurface (xfContext *xfc, gdiGfxSurface *surface) |
BOOL | xf_AppWindowResize (xfContext *xfc, xfAppWindow *appWindow) |
#define DEBUG_X11 | ( | ... | ) |
#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 Copyright 2012 HP Development Company, LLC Copyright 2016 Thincast Technologies GmbH Copyright 2016 Armin Novak ndre .more au@g mail. comarmin .nov ak@th inca st.co 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 |
|
static |
UINT xf_AppUpdateWindowFromSurface | ( | xfContext * | xfc, |
gdiGfxSurface * | surface | ||
) |
BOOL xf_AppWindowCreate | ( | xfContext * | xfc, |
xfAppWindow * | appWindow | ||
) |
|
static |
xfAppWindow* xf_AppWindowFromX11Window | ( | xfContext * | xfc, |
Window | wnd | ||
) |
int xf_AppWindowInit | ( | xfContext * | xfc, |
xfAppWindow * | appWindow | ||
) |
BOOL xf_AppWindowResize | ( | xfContext * | xfc, |
xfAppWindow * | appWindow | ||
) |
xfWindow* xf_CreateDesktopWindow | ( | xfContext * | xfc, |
char * | name, | ||
int | width, | ||
int | height | ||
) |
Window xf_CreateDummyWindow | ( | xfContext * | xfc | ) |
void xf_DestroyDesktopWindow | ( | xfContext * | xfc, |
xfWindow * | window | ||
) |
void xf_DestroyDummyWindow | ( | xfContext * | xfc, |
Window | window | ||
) |
void xf_DestroyWindow | ( | xfContext * | xfc, |
xfAppWindow * | appWindow | ||
) |
void xf_EndLocalMoveSize | ( | xfContext * | xfc, |
xfAppWindow * | appWindow | ||
) |
|
static |
BOOL xf_GetCurrentDesktop | ( | xfContext * | xfc | ) |
BOOL xf_GetWindowProperty | ( | xfContext * | xfc, |
Window | window, | ||
Atom | property, | ||
int | length, | ||
unsigned long * | nitems, | ||
unsigned long * | bytes, | ||
BYTE ** | prop | ||
) |
BOOL xf_GetWorkArea | ( | xfContext * | xfc | ) |
void xf_MoveWindow | ( | xfContext * | xfc, |
xfAppWindow * | appWindow, | ||
int | x, | ||
int | y, | ||
int | width, | ||
int | height | ||
) |
void xf_ResizeDesktopWindow | ( | xfContext * | xfc, |
xfWindow * | window, | ||
int | width, | ||
int | height | ||
) |
void xf_SendClientEvent | ( | xfContext * | xfc, |
Window | window, | ||
Atom | atom, | ||
unsigned int | numArgs, | ||
... | |||
) |
Post an event from the client to the X server
void xf_SetWindowActions | ( | xfContext * | xfc, |
xfAppWindow * | appWindow | ||
) |
void xf_SetWindowDecorations | ( | xfContext * | xfc, |
Window | window, | ||
BOOL | show | ||
) |
void xf_SetWindowFullscreen | ( | xfContext * | xfc, |
xfWindow * | window, | ||
BOOL | fullscreen | ||
) |
void xf_SetWindowMinimized | ( | xfContext * | xfc, |
xfWindow * | window | ||
) |
void xf_SetWindowMinMaxInfo | ( | xfContext * | xfc, |
xfAppWindow * | appWindow, | ||
int | maxWidth, | ||
int | maxHeight, | ||
int | maxPosX, | ||
int | maxPosY, | ||
int | minTrackWidth, | ||
int | minTrackHeight, | ||
int | maxTrackWidth, | ||
int | maxTrackHeight | ||
) |
|
static |
void xf_SetWindowRects | ( | xfContext * | xfc, |
xfAppWindow * | appWindow, | ||
RECTANGLE_16 * | rects, | ||
int | nrects | ||
) |
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_SetWindowUnlisted | ( | xfContext * | xfc, |
Window | window | ||
) |
void xf_SetWindowVisibilityRects | ( | xfContext * | xfc, |
xfAppWindow * | appWindow, | ||
UINT32 | rectsOffsetX, | ||
UINT32 | rectsOffsetY, | ||
RECTANGLE_16 * | rects, | ||
int | nrects | ||
) |
void xf_ShowWindow | ( | xfContext * | xfc, |
xfAppWindow * | appWindow, | ||
BYTE | state | ||
) |
void xf_StartLocalMoveSize | ( | xfContext * | xfc, |
xfAppWindow * | appWindow, | ||
int | direction, | ||
int | x, | ||
int | y | ||
) |
void xf_UpdateWindowArea | ( | xfContext * | xfc, |
xfAppWindow * | appWindow, | ||
int | x, | ||
int | y, | ||
int | width, | ||
int | height | ||
) |