Initial commit - from Precise source
[freerdp-ubuntu-pcb-backport.git] / client / Windows / wfreerdp.h
1 /**
2  * FreeRDP: A Remote Desktop Protocol Client
3  * Windows Client
4  *
5  * Copyright 2009-2011 Jay Sorg
6  * Copyright 2010-2011 Vic Lee
7  * Copyright 2010-2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *     http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21
22 #ifndef __WFREERDP_H
23 #define __WFREERDP_H
24
25 #ifndef WIN32_LEAN_AND_MEAN
26 #define WIN32_LEAN_AND_MEAN
27 #endif
28
29 #include <winsock2.h>
30 #include <windows.h>
31
32 #include <freerdp/freerdp.h>
33 #include <freerdp/gdi/gdi.h>
34 #include <freerdp/gdi/dc.h>
35 #include <freerdp/gdi/region.h>
36 #include <freerdp/cache/cache.h>
37 #include <freerdp/codec/color.h>
38 #include <freerdp/utils/debug.h>
39 #include <freerdp/channels/channels.h>
40 #include <freerdp/codec/rfx.h>
41 #include <freerdp/codec/nsc.h>
42
43 #include "wf_event.h"
44
45 struct wf_bitmap
46 {
47         rdpBitmap _bitmap;
48         HDC hdc;
49         HBITMAP bitmap;
50         HBITMAP org_bitmap;
51         uint8* pdata;
52 };
53 typedef struct wf_bitmap wfBitmap;
54
55 struct wf_pointer
56 {
57         rdpPointer pointer;
58 };
59 typedef struct wf_pointer wfPointer;
60
61 typedef struct wf_info wfInfo;
62
63 struct wf_context
64 {
65         rdpContext _p;
66
67         wfInfo* wfi;
68 };
69 typedef struct wf_context wfContext;
70
71 struct wf_info
72 {
73         int fs_toggle;
74         int fullscreen;
75         int percentscreen;
76         char window_title[64];
77
78         HWND hwnd;
79         HGDI_DC hdc;
80         uint16 srcBpp;
81         uint16 dstBpp;
82         freerdp* instance;
83         wfBitmap* primary;
84         wfBitmap* drawing;
85         HCLRCONV clrconv;
86         HCURSOR cursor;
87         HBRUSH brush;
88         HBRUSH org_brush;
89         RECT update_rect;
90
91         wfBitmap* tile;
92         wfBitmap* image;
93         RFX_CONTEXT* rfx_context;
94         NSC_CONTEXT* nsc_context;
95
96         boolean sw_gdi;
97 };
98
99 #endif