gwenhywfar  4.8.0beta
htmlctx_be.h
Go to the documentation of this file.
1 /***************************************************************************
2  begin : Mon Feb 22 2010
3  copyright : (C) 2010 by Martin Preuss
4  email : martin@libchipcard.de
5 
6  ***************************************************************************
7  * Please see toplevel file COPYING for license details *
8  ***************************************************************************/
9 
10 
11 #ifndef HTMLXMLCTX_BE_H
12 #define HTMLXMLCTX_BE_H
13 
14 #include <gwenhywfar/htmlfont_be.h>
15 #include <gwenhywfar/htmlobject_be.h>
16 #include <gwenhywfar/htmlimage_be.h>
17 
18 #include <gwenhywfar/xmlctx.h>
19 #include <gwenhywfar/stringlist.h>
20 
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 
28  HTML_FONT *fnt,
29  const char *s);
30 
32  HTML_FONT *fnt,
33  const char *s);
34 
35 
36 typedef uint32_t (*HTMLCTX_GET_COLOR_FROM_NAME_FN)(const GWEN_XML_CONTEXT *ctx, const char *s);
37 
38 
39 typedef HTML_FONT* (*HTMLCTX_GET_FONT_FN)(GWEN_XML_CONTEXT *ctx,
40  const char *fontName,
41  int fontSize,
42  uint32_t fontFlags);
43 
44 typedef HTML_IMAGE* (*HTMLCTX_GET_IMAGE_FN)(GWEN_XML_CONTEXT *ctx, const char *imageName);
45 
46 
47 
49 GWEN_XML_CONTEXT *HtmlCtx_new(uint32_t flags);
50 
52 void HtmlCtx_SetText(GWEN_XML_CONTEXT *ctx, const char *s);
53 
55 int HtmlCtx_Layout(GWEN_XML_CONTEXT *ctx, int width, int height);
56 
59 
60 
63  const char *fontName,
64  int fontSize,
65  uint32_t fontFlags);
66 
71 HTML_IMAGE *HtmlCtx_GetImage(GWEN_XML_CONTEXT *ctx, const char *imageName);
72 
75 
78 
79 
81 int HtmlCtx_GetWidth(const GWEN_XML_CONTEXT *ctx);
82 
84 int HtmlCtx_GetHeight(const GWEN_XML_CONTEXT *ctx);
85 
86 
89 
92 
95 
98 
99 
102 
104 void HtmlCtx_AddMediaPath(GWEN_XML_CONTEXT *ctx, const char *s);
105 
106 
110 
114 
115 
119 
123 
126 
127 #ifdef __cplusplus
128 }
129 #endif
130 
131 #endif
132