FreeRDP
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
rdtk.h
1
19#ifndef RDTK_H
20#define RDTK_H
21
22#include <winpr/assert.h>
23#include <winpr/winpr.h>
24
25#include <stdint.h>
26#include <rdtk/api.h>
27
28typedef struct rdtk_engine rdtkEngine;
29typedef struct rdtk_font rdtkFont;
30typedef struct rdtk_glyph rdtkGlyph;
31typedef struct rdtk_surface rdtkSurface;
32typedef struct rdtk_button rdtkButton;
33typedef struct rdtk_label rdtkLabel;
34typedef struct rdtk_text_field rdtkTextField;
35typedef struct rdtk_nine_patch rdtkNinePatch;
36
37#ifdef __cplusplus
38extern "C"
39{
40#endif
41
42 /* Engine */
43
44 RDTK_EXPORT void rdtk_engine_free(rdtkEngine* engine);
45
46 WINPR_ATTR_MALLOC(rdtk_engine_free, 1)
47 RDTK_EXPORT rdtkEngine* rdtk_engine_new(void);
48
49 /* Surface */
50
51 RDTK_EXPORT int rdtk_surface_fill(rdtkSurface* surface, uint16_t x, uint16_t y, uint16_t width,
52 uint16_t height, uint32_t color);
53
54 RDTK_EXPORT rdtkSurface* rdtk_surface_new(rdtkEngine* engine, uint8_t* data, uint16_t width,
55 uint16_t height, uint32_t scanline);
56 RDTK_EXPORT void rdtk_surface_free(rdtkSurface* surface);
57
58 /* Font */
59
60 RDTK_EXPORT int rdtk_font_draw_text(rdtkSurface* surface, uint16_t nXDst, uint16_t nYDst,
61 rdtkFont* font, const char* text);
62
63 /* Button */
64
65 RDTK_EXPORT int rdtk_button_draw(rdtkSurface* surface, uint16_t nXDst, uint16_t nYDst,
66 uint16_t nWidth, uint16_t nHeight, rdtkButton* button,
67 const char* text);
68
69 /* Label */
70
71 RDTK_EXPORT int rdtk_label_draw(rdtkSurface* surface, uint16_t nXDst, uint16_t nYDst,
72 uint16_t nWidth, uint16_t nHeight, rdtkLabel* label,
73 const char* text, uint16_t hAlign, uint16_t vAlign);
74
75 /* TextField */
76
77 RDTK_EXPORT int rdtk_text_field_draw(rdtkSurface* surface, uint16_t nXDst, uint16_t nYDst,
78 uint16_t nWidth, uint16_t nHeight,
79 rdtkTextField* textField, const char* text);
80
81#ifdef __cplusplus
82}
83#endif
84
85#endif /* RDTK_H */