FreeRDP
xf_floatbar.c File Reference
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/extensions/shape.h>
#include <X11/cursorfont.h>
#include <winpr/assert.h>
#include "xf_floatbar.h"
#include "resource/close.xbm"
#include "resource/lock.xbm"
#include "resource/unlock.xbm"
#include "resource/minimize.xbm"
#include "resource/restore.xbm"
#include <freerdp/log.h>

Macros

#define TAG   CLIENT_TAG("x11")
 
#define FLOATBAR_HEIGHT   26
 
#define FLOATBAR_DEFAULT_WIDTH   576
 
#define FLOATBAR_MIN_WIDTH   200
 
#define FLOATBAR_BORDER   24
 
#define FLOATBAR_BUTTON_WIDTH   24
 
#define FLOATBAR_COLOR_BACKGROUND   "RGB:31/6c/a9"
 
#define FLOATBAR_COLOR_BORDER   "RGB:75/9a/c8"
 
#define FLOATBAR_COLOR_FOREGROUND   "RGB:FF/FF/FF"
 
#define DEBUG_X11(...)
 
#define XF_FLOATBAR_MODE_NONE   0
 
#define XF_FLOATBAR_MODE_DRAGGING   1
 
#define XF_FLOATBAR_MODE_RESIZE_LEFT   2
 
#define XF_FLOATBAR_MODE_RESIZE_RIGHT   3
 
#define XF_FLOATBAR_BUTTON_CLOSE   1
 
#define XF_FLOATBAR_BUTTON_RESTORE   2
 
#define XF_FLOATBAR_BUTTON_MINIMIZE   3
 
#define XF_FLOATBAR_BUTTON_LOCKED   4
 

Typedefs

typedef BOOL(* OnClick) (xfFloatbar *)
 

Functions

static xfFloatbarButton * xf_floatbar_new_button (xfFloatbar *floatbar, int type)
 
static BOOL xf_floatbar_button_onclick_close (xfFloatbar *floatbar)
 
static BOOL xf_floatbar_button_onclick_minimize (xfFloatbar *floatbar)
 
static BOOL xf_floatbar_button_onclick_restore (xfFloatbar *floatbar)
 
static BOOL xf_floatbar_button_onclick_locked (xfFloatbar *floatbar)
 
BOOL xf_floatbar_set_root_y (xfFloatbar *floatbar, int y)
 
BOOL xf_floatbar_hide_and_show (xfFloatbar *floatbar)
 
static BOOL create_floatbar (xfFloatbar *floatbar)
 
BOOL xf_floatbar_toggle_fullscreen (xfFloatbar *floatbar, bool fullscreen)
 
xfFloatbar * xf_floatbar_new (xfContext *xfc, Window window, const char *name, DWORD flags)
 
static unsigned long xf_floatbar_get_color (xfFloatbar *floatbar, char *rgb_value)
 
static void xf_floatbar_event_expose (xfFloatbar *floatbar)
 
static xfFloatbarButton * xf_floatbar_get_button (xfFloatbar *floatbar, Window window)
 
static void xf_floatbar_button_update_positon (xfFloatbar *floatbar)
 
static void xf_floatbar_button_event_expose (xfFloatbar *floatbar, Window window)
 
static void xf_floatbar_button_event_buttonpress (xfFloatbar *floatbar, const XButtonEvent *event)
 
static void xf_floatbar_button_event_buttonrelease (xfFloatbar *floatbar, const XButtonEvent *event)
 
static void xf_floatbar_event_buttonpress (xfFloatbar *floatbar, const XButtonEvent *event)
 
static void xf_floatbar_event_buttonrelease (xfFloatbar *floatbar, const XButtonEvent *event)
 
static void xf_floatbar_resize (xfFloatbar *floatbar, const XMotionEvent *event)
 
static void xf_floatbar_dragging (xfFloatbar *floatbar, const XMotionEvent *event)
 
static void xf_floatbar_event_motionnotify (xfFloatbar *floatbar, const XMotionEvent *event)
 
static void xf_floatbar_button_event_focusin (xfFloatbar *floatbar, const XAnyEvent *event)
 
static void xf_floatbar_button_event_focusout (xfFloatbar *floatbar, const XAnyEvent *event)
 
static void xf_floatbar_event_focusout (xfFloatbar *floatbar)
 
BOOL xf_floatbar_check_event (xfFloatbar *floatbar, const XEvent *event)
 
BOOL xf_floatbar_event_process (xfFloatbar *floatbar, const XEvent *event)
 
static void xf_floatbar_button_free (xfContext *xfc, xfFloatbarButton *button)
 
void xf_floatbar_free (xfFloatbar *floatbar)
 
BOOL xf_floatbar_is_locked (xfFloatbar *floatbar)
 

Macro Definition Documentation

◆ DEBUG_X11

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

◆ FLOATBAR_BORDER

#define FLOATBAR_BORDER   24

◆ FLOATBAR_BUTTON_WIDTH

#define FLOATBAR_BUTTON_WIDTH   24

◆ FLOATBAR_COLOR_BACKGROUND

#define FLOATBAR_COLOR_BACKGROUND   "RGB:31/6c/a9"

◆ FLOATBAR_COLOR_BORDER

#define FLOATBAR_COLOR_BORDER   "RGB:75/9a/c8"

◆ FLOATBAR_COLOR_FOREGROUND

#define FLOATBAR_COLOR_FOREGROUND   "RGB:FF/FF/FF"

◆ FLOATBAR_DEFAULT_WIDTH

#define FLOATBAR_DEFAULT_WIDTH   576

◆ FLOATBAR_HEIGHT

#define FLOATBAR_HEIGHT   26

◆ FLOATBAR_MIN_WIDTH

#define FLOATBAR_MIN_WIDTH   200

◆ TAG

#define TAG   CLIENT_TAG("x11")

FreeRDP: A Remote Desktop Protocol Implementation X11 Windows

Licensed under the Apache License, Version 2.0 (the "License");n 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.

◆ XF_FLOATBAR_BUTTON_CLOSE

#define XF_FLOATBAR_BUTTON_CLOSE   1

◆ XF_FLOATBAR_BUTTON_LOCKED

#define XF_FLOATBAR_BUTTON_LOCKED   4

◆ XF_FLOATBAR_BUTTON_MINIMIZE

#define XF_FLOATBAR_BUTTON_MINIMIZE   3

◆ XF_FLOATBAR_BUTTON_RESTORE

#define XF_FLOATBAR_BUTTON_RESTORE   2

◆ XF_FLOATBAR_MODE_DRAGGING

#define XF_FLOATBAR_MODE_DRAGGING   1

◆ XF_FLOATBAR_MODE_NONE

#define XF_FLOATBAR_MODE_NONE   0

◆ XF_FLOATBAR_MODE_RESIZE_LEFT

#define XF_FLOATBAR_MODE_RESIZE_LEFT   2

◆ XF_FLOATBAR_MODE_RESIZE_RIGHT

#define XF_FLOATBAR_MODE_RESIZE_RIGHT   3

Typedef Documentation

◆ OnClick

typedef BOOL(* OnClick) (xfFloatbar *)

Function Documentation

◆ create_floatbar()

static BOOL create_floatbar ( xfFloatbar *  floatbar)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_floatbar_button_event_buttonpress()

static void xf_floatbar_button_event_buttonpress ( xfFloatbar *  floatbar,
const XButtonEvent *  event 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_floatbar_button_event_buttonrelease()

static void xf_floatbar_button_event_buttonrelease ( xfFloatbar *  floatbar,
const XButtonEvent *  event 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_floatbar_button_event_expose()

static void xf_floatbar_button_event_expose ( xfFloatbar *  floatbar,
Window  window 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_floatbar_button_event_focusin()

static void xf_floatbar_button_event_focusin ( xfFloatbar *  floatbar,
const XAnyEvent *  event 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_floatbar_button_event_focusout()

static void xf_floatbar_button_event_focusout ( xfFloatbar *  floatbar,
const XAnyEvent *  event 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_floatbar_button_free()

static void xf_floatbar_button_free ( xfContext *  xfc,
xfFloatbarButton *  button 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_floatbar_button_onclick_close()

static BOOL xf_floatbar_button_onclick_close ( xfFloatbar *  floatbar)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_floatbar_button_onclick_locked()

static BOOL xf_floatbar_button_onclick_locked ( xfFloatbar *  floatbar)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_floatbar_button_onclick_minimize()

static BOOL xf_floatbar_button_onclick_minimize ( xfFloatbar *  floatbar)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_floatbar_button_onclick_restore()

static BOOL xf_floatbar_button_onclick_restore ( xfFloatbar *  floatbar)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_floatbar_button_update_positon()

static void xf_floatbar_button_update_positon ( xfFloatbar *  floatbar)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_floatbar_check_event()

BOOL xf_floatbar_check_event ( xfFloatbar *  floatbar,
const XEvent *  event 
)
Here is the caller graph for this function:

◆ xf_floatbar_dragging()

static void xf_floatbar_dragging ( xfFloatbar *  floatbar,
const XMotionEvent *  event 
)
static
Here is the caller graph for this function:

◆ xf_floatbar_event_buttonpress()

static void xf_floatbar_event_buttonpress ( xfFloatbar *  floatbar,
const XButtonEvent *  event 
)
static
Here is the caller graph for this function:

◆ xf_floatbar_event_buttonrelease()

static void xf_floatbar_event_buttonrelease ( xfFloatbar *  floatbar,
const XButtonEvent *  event 
)
static
Here is the caller graph for this function:

◆ xf_floatbar_event_expose()

static void xf_floatbar_event_expose ( xfFloatbar *  floatbar)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_floatbar_event_focusout()

static void xf_floatbar_event_focusout ( xfFloatbar *  floatbar)
static
Here is the caller graph for this function:

◆ xf_floatbar_event_motionnotify()

static void xf_floatbar_event_motionnotify ( xfFloatbar *  floatbar,
const XMotionEvent *  event 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_floatbar_event_process()

BOOL xf_floatbar_event_process ( xfFloatbar *  floatbar,
const XEvent *  event 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_floatbar_free()

void xf_floatbar_free ( xfFloatbar *  floatbar)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_floatbar_get_button()

static xfFloatbarButton* xf_floatbar_get_button ( xfFloatbar *  floatbar,
Window  window 
)
static
Here is the caller graph for this function:

◆ xf_floatbar_get_color()

static unsigned long xf_floatbar_get_color ( xfFloatbar *  floatbar,
char *  rgb_value 
)
static
Here is the caller graph for this function:

◆ xf_floatbar_hide_and_show()

BOOL xf_floatbar_hide_and_show ( xfFloatbar *  floatbar)
Here is the caller graph for this function:

◆ xf_floatbar_is_locked()

BOOL xf_floatbar_is_locked ( xfFloatbar *  floatbar)
Here is the caller graph for this function:

◆ xf_floatbar_new()

xfFloatbar* xf_floatbar_new ( xfContext *  xfc,
Window  window,
const char *  name,
DWORD  flags 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_floatbar_new_button()

xfFloatbarButton * xf_floatbar_new_button ( xfFloatbar *  floatbar,
int  type 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xf_floatbar_resize()

static void xf_floatbar_resize ( xfFloatbar *  floatbar,
const XMotionEvent *  event 
)
static
Here is the caller graph for this function:

◆ xf_floatbar_set_root_y()

BOOL xf_floatbar_set_root_y ( xfFloatbar *  floatbar,
int  y 
)
Here is the caller graph for this function:

◆ xf_floatbar_toggle_fullscreen()

BOOL xf_floatbar_toggle_fullscreen ( xfFloatbar *  floatbar,
bool  fullscreen 
)
Here is the call graph for this function:
Here is the caller graph for this function: