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