FreeRDP/client/Windows/wf_client.h

159 lines
3.2 KiB
C
Raw Normal View History

/**
* FreeRDP: A Remote Desktop Protocol Implementation
* Windows Client
*
* Copyright 2009-2011 Jay Sorg
* Copyright 2010-2011 Vic Lee
* Copyright 2010-2011 Marc-Andre Moreau <marcandre.moreau@gmail.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.
*/
#ifndef FREERDP_CLIENT_WIN_INTERFACE_H
#define FREERDP_CLIENT_WIN_INTERFACE_H
#include <winpr/windows.h>
2014-10-25 02:30:04 +04:00
#include <winpr/collections.h>
#ifdef WITH_PROGRESS_BAR
#include <shobjidl.h>
#endif
#include <freerdp/api.h>
#include <freerdp/freerdp.h>
#include <freerdp/gdi/gdi.h>
#include <freerdp/gdi/dc.h>
#include <freerdp/gdi/region.h>
#include <freerdp/codec/color.h>
2014-09-12 19:13:01 +04:00
2014-10-24 19:30:04 +04:00
#include <freerdp/client/rail.h>
#include <freerdp/channels/channels.h>
#include <freerdp/codec/rfx.h>
#include <freerdp/codec/nsc.h>
#include <freerdp/client/file.h>
#include "wf_channels.h"
2014-02-27 07:43:52 +04:00
#include "wf_floatbar.h"
#include "wf_event.h"
2014-10-25 02:30:04 +04:00
#include "wf_cliprdr.h"
2013-04-09 02:27:59 +04:00
#ifdef __cplusplus
2019-11-06 17:24:51 +03:00
extern "C"
{
2013-04-09 02:27:59 +04:00
#endif
// System menu constants
#define SYSCOMMAND_ID_SMARTSIZING 1000
#define SYSCOMMAND_ID_REQUEST_CONTROL 1001
typedef struct
2019-11-06 17:24:51 +03:00
{
rdpBitmap _bitmap;
HDC hdc;
HBITMAP bitmap;
HBITMAP org_bitmap;
BYTE* pdata;
} wfBitmap;
2019-11-06 17:24:51 +03:00
typedef struct
2019-11-06 17:24:51 +03:00
{
rdpPointer pointer;
HCURSOR cursor;
} wfPointer;
2019-11-06 17:24:51 +03:00
struct wf_context
{
rdpClientContext common;
2019-11-06 17:24:51 +03:00
int offset_x;
int offset_y;
int fullscreen_toggle;
int fullscreen;
int percentscreen;
WCHAR* window_title;
int client_x;
int client_y;
int client_width;
int client_height;
HANDLE keyboardThread;
HICON icon;
HWND hWndParent;
HINSTANCE hInstance;
WNDCLASSEX wndClass;
LPCTSTR wndClassName;
HCURSOR hDefaultCursor;
UINT systemMenuInsertPosition;
2019-11-06 17:24:51 +03:00
HWND hwnd;
BOOL is_shown;
ITaskbarList3* taskBarList;
2019-11-06 17:24:51 +03:00
POINT diff;
wfBitmap* primary;
wfBitmap* drawing;
HCURSOR cursor;
HBRUSH brush;
HBRUSH org_brush;
RECT update_rect;
RECT scale_update_rect;
DWORD mainThreadId;
DWORD keyboardThreadId;
rdpFile* connectionRdpFile;
BOOL disablewindowtracking;
BOOL updating_scrollbars;
BOOL xScrollVisible;
int xMinScroll;
int xCurrentScroll;
int xMaxScroll;
BOOL yScrollVisible;
int yMinScroll;
int yCurrentScroll;
int yMaxScroll;
void* clipboard;
CliprdrClientContext* cliprdr;
2022-09-02 20:25:02 +03:00
2019-11-06 17:24:51 +03:00
wfFloatBar* floatbar;
RailClientContext* rail;
wHashTable* railWindows;
BOOL isConsole;
DispClientContext* disp;
UINT64 lastSentDate;
BOOL wasMaximized;
2019-11-06 17:24:51 +03:00
};
/**
* Client Interface
*/
FREERDP_API int RdpClientEntry(RDP_CLIENT_ENTRY_POINTS* pEntryPoints);
FREERDP_API int freerdp_client_set_window_size(wfContext* wfc, int width, int height);
FREERDP_API void wf_size_scrollbars(wfContext* wfc, UINT32 client_width, UINT32 client_height);
2013-04-09 02:27:59 +04:00
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CLIENT_WIN_INTERFACE_H */