cscg24-guacamole

CSCG 2024 Challenge 'Guacamole Mashup'
git clone https://git.sinitax.com/sinitax/cscg24-guacamole
Log | Files | Refs | sfeed.txt

glyph.h (1780B)


      1/**
      2 * FreeRDP: A Remote Desktop Protocol Implementation
      3 * Glyph Cache
      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 FREERDP_GLYPH_CACHE_H
     21#define FREERDP_GLYPH_CACHE_H
     22
     23#include <freerdp/api.h>
     24#include <freerdp/types.h>
     25#include <freerdp/update.h>
     26
     27#include <winpr/wlog.h>
     28#include <winpr/stream.h>
     29
     30typedef struct _GLYPH_CACHE GLYPH_CACHE;
     31typedef struct _FRAGMENT_CACHE_ENTRY FRAGMENT_CACHE_ENTRY;
     32typedef struct _FRAGMENT_CACHE FRAGMENT_CACHE;
     33typedef struct rdp_glyph_cache rdpGlyphCache;
     34
     35#include <freerdp/cache/cache.h>
     36
     37struct _GLYPH_CACHE
     38{
     39	UINT32 number;
     40	UINT32 maxCellSize;
     41	rdpGlyph** entries;
     42};
     43
     44struct _FRAGMENT_CACHE_ENTRY
     45{
     46	void* fragment;
     47	UINT32 size;
     48};
     49
     50struct _FRAGMENT_CACHE
     51{
     52	FRAGMENT_CACHE_ENTRY* entries;
     53};
     54
     55struct rdp_glyph_cache
     56{
     57	FRAGMENT_CACHE fragCache;
     58	GLYPH_CACHE glyphCache[10];
     59
     60	wLog* log;
     61	rdpContext* context;
     62	rdpSettings* settings;
     63};
     64
     65#ifdef __cplusplus
     66extern "C"
     67{
     68#endif
     69
     70	FREERDP_API void glyph_cache_register_callbacks(rdpUpdate* update);
     71
     72	FREERDP_API rdpGlyphCache* glyph_cache_new(rdpSettings* settings);
     73	FREERDP_API void glyph_cache_free(rdpGlyphCache* glyph);
     74
     75#ifdef __cplusplus
     76}
     77#endif
     78
     79#endif /* FREERDP_GLYPH_CACHE_H */