2 * FreeRDP: A Remote Desktop Protocol Client
5 * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
20 #ifndef __BITMAP_V2_CACHE_H
21 #define __BITMAP_V2_CACHE_H
23 #include <freerdp/api.h>
24 #include <freerdp/types.h>
25 #include <freerdp/update.h>
26 #include <freerdp/freerdp.h>
27 #include <freerdp/utils/stream.h>
29 typedef struct _BITMAP_V2_CELL BITMAP_V2_CELL;
30 typedef struct rdp_bitmap_cache rdpBitmapCache;
32 #include <freerdp/cache/cache.h>
34 struct _BITMAP_V2_CELL
40 struct rdp_bitmap_cache
42 pMemBlt MemBlt; /* 0 */
43 pMem3Blt Mem3Blt; /* 1 */
44 pCacheBitmap CacheBitmap; /* 2 */
45 pCacheBitmapV2 CacheBitmapV2; /* 3 */
46 pCacheBitmapV3 CacheBitmapV3; /* 4 */
47 pBitmapUpdate BitmapUpdate; /* 5 */
48 uint32 paddingA[16 - 6]; /* 6 */
50 uint32 maxCells; /* 16 */
51 BITMAP_V2_CELL* cells; /* 17 */
52 uint32 paddingB[32 - 18]; /* 18 */
59 rdpSettings* settings;
62 FREERDP_API rdpBitmap* bitmap_cache_get(rdpBitmapCache* bitmap_cache, uint32 id, uint32 index);
63 FREERDP_API void bitmap_cache_put(rdpBitmapCache* bitmap_cache, uint32 id, uint32 index, rdpBitmap* bitmap);
65 FREERDP_API void bitmap_cache_register_callbacks(rdpUpdate* update);
67 FREERDP_API rdpBitmapCache* bitmap_cache_new(rdpSettings* settings);
68 FREERDP_API void bitmap_cache_free(rdpBitmapCache* bitmap_cache);
70 #endif /* __BITMAP_V2_CACHE_H */