FreeRDP
wf_floatbar.c File Reference
#include <winpr/crt.h>
#include <winpr/windows.h>
#include "wf_client.h"
#include "wf_floatbar.h"
#include "resource/resource.h"
#include "wf_gdi.h"

Macros

#define TAG   CLIENT_TAG("windows.floatbar")
 
#define TIMER_HIDE   1
 
#define TIMER_ANIMAT_SHOW   2
 
#define TIMER_ANIMAT_HIDE   3
 
#define BUTTON_LOCKPIN   0
 
#define BUTTON_MINIMIZE   1
 
#define BUTTON_RESTORE   2
 
#define BUTTON_CLOSE   3
 
#define BTN_MAX   4
 
#define BACKGROUND_W   576
 
#define BACKGROUND_H   27
 
#define BUTTON_OFFSET   5
 
#define BUTTON_Y   2
 
#define BUTTON_WIDTH   23
 
#define BUTTON_HEIGHT   21
 
#define BUTTON_SPACING   1
 
#define LOCK_X   (BACKGROUND_H + BUTTON_OFFSET)
 
#define CLOSE_X   ((BACKGROUND_W - (BACKGROUND_H + BUTTON_OFFSET)) - BUTTON_WIDTH)
 
#define RESTORE_X   (CLOSE_X - (BUTTON_WIDTH + BUTTON_SPACING))
 
#define MINIMIZE_X   (RESTORE_X - (BUTTON_WIDTH + BUTTON_SPACING))
 
#define TEXT_X   (BACKGROUND_H + ((BUTTON_WIDTH + BUTTON_SPACING) * 3) + 5)
 

Functions

static BOOL floatbar_kill_timers (wfFloatBar *floatbar)
 
static BOOL floatbar_animation (wfFloatBar *const floatbar, const BOOL show)
 
static BOOL floatbar_trigger_hide (wfFloatBar *floatbar)
 
static BOOL floatbar_hide (wfFloatBar *floatbar)
 
static BOOL floatbar_show (wfFloatBar *floatbar)
 
static BOOL button_set_locked (Button *button, BOOL locked)
 
static BOOL update_locked_state (wfFloatBar *floatbar)
 
static int button_hit (Button *const button)
 
static int button_paint (const Button *const button, const HDC hdc)
 
static Button * floatbar_create_button (wfFloatBar *const floatbar, const int type, const int resid, const int resid_act, const int x, const int y, const int h, const int w)
 
static Button * floatbar_create_lock_button (wfFloatBar *const floatbar, const int unlock_resid, const int unlock_resid_act, const int lock_resid, const int lock_resid_act, const int x, const int y, const int h, const int w)
 
static Button * floatbar_get_button (const wfFloatBar *const floatbar, const int x, const int y)
 
static BOOL floatbar_paint (wfFloatBar *const floatbar, const HDC hdc)
 
static LRESULT CALLBACK floatbar_proc (const HWND hWnd, const UINT Msg, const WPARAM wParam, const LPARAM lParam)
 
static BOOL floatbar_window_create (wfFloatBar *floatbar)
 
void wf_floatbar_free (wfFloatBar *floatbar)
 
wfFloatBar * wf_floatbar_new (wfContext *wfc, HINSTANCE window, DWORD flags)
 
BOOL wf_floatbar_toggle_fullscreen (wfFloatBar *floatbar, BOOL fullscreen)
 

Macro Definition Documentation

◆ BACKGROUND_H

#define BACKGROUND_H   27

◆ BACKGROUND_W

#define BACKGROUND_W   576

◆ BTN_MAX

#define BTN_MAX   4

◆ BUTTON_CLOSE

#define BUTTON_CLOSE   3

◆ BUTTON_HEIGHT

#define BUTTON_HEIGHT   21

◆ BUTTON_LOCKPIN

#define BUTTON_LOCKPIN   0

◆ BUTTON_MINIMIZE

#define BUTTON_MINIMIZE   1

◆ BUTTON_OFFSET

#define BUTTON_OFFSET   5

◆ BUTTON_RESTORE

#define BUTTON_RESTORE   2

◆ BUTTON_SPACING

#define BUTTON_SPACING   1

◆ BUTTON_WIDTH

#define BUTTON_WIDTH   23

◆ BUTTON_Y

#define BUTTON_Y   2

◆ CLOSE_X

#define CLOSE_X   ((BACKGROUND_W - (BACKGROUND_H + BUTTON_OFFSET)) - BUTTON_WIDTH)

◆ LOCK_X

#define LOCK_X   (BACKGROUND_H + BUTTON_OFFSET)

◆ MINIMIZE_X

#define MINIMIZE_X   (RESTORE_X - (BUTTON_WIDTH + BUTTON_SPACING))

◆ RESTORE_X

#define RESTORE_X   (CLOSE_X - (BUTTON_WIDTH + BUTTON_SPACING))

◆ TAG

#define TAG   CLIENT_TAG("windows.floatbar")

FreeRDP: A Remote Desktop Protocol Implementation Windows Float Bar

Copyright 2013 Zhang Zhaolong zhang.nosp@m.zl20.nosp@m.13@12.nosp@m.6.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.

◆ TEXT_X

#define TEXT_X   (BACKGROUND_H + ((BUTTON_WIDTH + BUTTON_SPACING) * 3) + 5)

◆ TIMER_ANIMAT_HIDE

#define TIMER_ANIMAT_HIDE   3

◆ TIMER_ANIMAT_SHOW

#define TIMER_ANIMAT_SHOW   2

◆ TIMER_HIDE

#define TIMER_HIDE   1

Function Documentation

◆ button_hit()

static int button_hit ( Button *const  button)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ button_paint()

static int button_paint ( const Button *const  button,
const HDC  hdc 
)
static
Here is the caller graph for this function:

◆ button_set_locked()

static BOOL button_set_locked ( Button *  button,
BOOL  locked 
)
static
Here is the caller graph for this function:

◆ floatbar_animation()

static BOOL floatbar_animation ( wfFloatBar *const  floatbar,
const BOOL  show 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ floatbar_create_button()

static Button* floatbar_create_button ( wfFloatBar *const  floatbar,
const int  type,
const int  resid,
const int  resid_act,
const int  x,
const int  y,
const int  h,
const int  w 
)
static
Here is the caller graph for this function:

◆ floatbar_create_lock_button()

static Button* floatbar_create_lock_button ( wfFloatBar *const  floatbar,
const int  unlock_resid,
const int  unlock_resid_act,
const int  lock_resid,
const int  lock_resid_act,
const int  x,
const int  y,
const int  h,
const int  w 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ floatbar_get_button()

static Button* floatbar_get_button ( const wfFloatBar *const  floatbar,
const int  x,
const int  y 
)
static
Here is the caller graph for this function:

◆ floatbar_hide()

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

◆ floatbar_kill_timers()

static BOOL floatbar_kill_timers ( wfFloatBar *  floatbar)
static
Here is the caller graph for this function:

◆ floatbar_paint()

static BOOL floatbar_paint ( wfFloatBar *const  floatbar,
const HDC  hdc 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ floatbar_proc()

static LRESULT CALLBACK floatbar_proc ( const HWND  hWnd,
const UINT  Msg,
const WPARAM  wParam,
const LPARAM  lParam 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ floatbar_show()

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

◆ floatbar_trigger_hide()

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

◆ floatbar_window_create()

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

◆ update_locked_state()

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

◆ wf_floatbar_free()

void wf_floatbar_free ( wfFloatBar *  floatbar)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wf_floatbar_new()

wfFloatBar* wf_floatbar_new ( wfContext *  wfc,
HINSTANCE  window,
DWORD  flags 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wf_floatbar_toggle_fullscreen()

BOOL wf_floatbar_toggle_fullscreen ( wfFloatBar *  floatbar,
BOOL  fullscreen 
)
Here is the call graph for this function:
Here is the caller graph for this function: