Merge branch 'awakecoding' of github.com:vworkspace/FreeRDP
[platform/upstream/freerdp.git] / client / Wayland / wlf_window.h
1 /**
2  * FreeRDP: A Remote Desktop Protocol Implementation
3  * Wayland Windows
4  *
5  * Copyright 2014 Manuel Bachmann <tarnyko@tarnyko.net>
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *     http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19
20 #ifndef __WLF_WINDOW_H
21 #define __WLF_WINDOW_H
22
23 #include <wayland-client.h>
24
25 typedef struct wlf_window wlfWindow;
26
27 #include "wlfreerdp.h"
28
29 struct wlf_buffer
30 {
31         struct wl_buffer* buffer;
32         void* shm_data;
33         BOOL busy;
34 };
35 typedef struct wlf_buffer wlfBuffer;
36
37 struct wlf_window
38 {
39         int width;
40         int height;
41         struct wl_surface* surface;
42         struct wl_shell_surface* shell_surface;
43         struct wl_callback* callback;
44         wlfBuffer buffers[2];
45         wlfDisplay* display;
46         void* data;
47         BOOL fullscreen;
48 };
49
50 wlfWindow* wlf_CreateDesktopWindow(wlfContext* wlfc, char* name, int width, int height, BOOL decorations);
51 void wlf_ResizeDesktopWindow(wlfContext* wlfc, wlfWindow* window, int width, int height);
52 void wlf_SetWindowText(wlfContext* wlfc, wlfWindow* window, char* name);
53 void wlf_SetWindowFullscreen(wlfContext* wlfc, wlfWindow* window, BOOL fullscree);
54 void wlf_ShowWindow(wlfContext* wlfc, wlfWindow* window, BYTE state);
55 void wlf_UpdateWindowArea(wlfContext* wlfc, wlfWindow* window, int x, int y, int width, int height);
56 void wlf_DestroyWindow(wlfContext* wlfc, wlfWindow* window);
57
58 #endif /* __WLF_WINDOW_H */