Initial commit - from Precise source
[freerdp-ubuntu-pcb-backport.git] / include / freerdp / rail / window_list.h
1 /**
2  * FreeRDP: A Remote Desktop Protocol Client
3  * RAIL Window List
4  *
5  * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
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 __RAIL_WINDOW_LIST_H
21 #define __RAIL_WINDOW_LIST_H
22
23 #include <freerdp/api.h>
24 #include <freerdp/types.h>
25 #include <freerdp/update.h>
26 #include <freerdp/utils/stream.h>
27
28 typedef struct rdp_window_list rdpWindowList;
29
30 #include <freerdp/rail/rail.h>
31 #include <freerdp/rail/window.h>
32
33 struct rdp_window_list
34 {
35         rdpRail* rail;
36         rdpWindow* head;
37         rdpWindow* tail;
38         rdpWindow* iterator;
39 };
40
41 FREERDP_API void window_list_rewind(rdpWindowList* list);
42 FREERDP_API boolean window_list_has_next(rdpWindowList* list);
43 FREERDP_API rdpWindow* window_list_get_next(rdpWindowList* list);
44
45 FREERDP_API rdpWindow* window_list_get_by_id(rdpWindowList* list, uint32 windowId);
46 FREERDP_API rdpWindow* window_list_get_by_extra_id(rdpWindowList* list, void* extraId);
47
48 FREERDP_API void window_list_create(rdpWindowList* list, WINDOW_ORDER_INFO* orderInfo, WINDOW_STATE_ORDER* window_state);
49 FREERDP_API void window_list_update(rdpWindowList* list, WINDOW_ORDER_INFO* orderInfo, WINDOW_STATE_ORDER* window_state);
50 FREERDP_API void window_list_delete(rdpWindowList* list, WINDOW_ORDER_INFO* orderInfo);
51
52 FREERDP_API rdpWindowList* window_list_new(rdpRail* rail);
53 FREERDP_API void window_list_free(rdpWindowList* list);
54
55 #endif /* __RAIL_WINDOW_LIST_H */