htmlctx_be.h
Go to the documentation of this file.
/***************************************************************************
begin : Mon Feb 22 2010
copyright : (C) 2010 by Martin Preuss
email : martin@libchipcard.de
***************************************************************************
* Please see toplevel file COPYING for license details *
***************************************************************************/
#ifndef HTMLXMLCTX_BE_H
#define HTMLXMLCTX_BE_H
#include <gwenhywfar/htmlfont_be.h>
#include <gwenhywfar/htmlobject_be.h>
#include <gwenhywfar/htmlimage_be.h>
#include <gwenhywfar/xmlctx.h>
#include <gwenhywfar/stringlist.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef int (*HTMLCTX_GET_TEXT_WIDTH_FN)(GWEN_XML_CONTEXT *ctx,
HTML_FONT *fnt,
const char *s);
typedef int (*HTMLCTX_GET_TEXT_HEIGHT_FN)(GWEN_XML_CONTEXT *ctx,
HTML_FONT *fnt,
const char *s);
typedef uint32_t (*HTMLCTX_GET_COLOR_FROM_NAME_FN)(const GWEN_XML_CONTEXT *ctx, const char *s);
typedef HTML_FONT *(*HTMLCTX_GET_FONT_FN)(GWEN_XML_CONTEXT *ctx,
const char *fontName,
int fontSize,
uint32_t fontFlags);
typedef HTML_IMAGE *(*HTMLCTX_GET_IMAGE_FN)(GWEN_XML_CONTEXT *ctx, const char *imageName);
GWENHYWFAR_API
GWEN_XML_CONTEXT *HtmlCtx_new(uint32_t flags);
GWENHYWFAR_API
void HtmlCtx_SetText(GWEN_XML_CONTEXT *ctx, const char *s);
GWENHYWFAR_API
int HtmlCtx_Layout(GWEN_XML_CONTEXT *ctx, int width, int height);
GWENHYWFAR_API
HTML_OBJECT *HtmlCtx_GetRootObject(const GWEN_XML_CONTEXT *ctx);
GWENHYWFAR_API
HTML_FONT *HtmlCtx_GetFont(GWEN_XML_CONTEXT *ctx,
const char *fontName,
int fontSize,
uint32_t fontFlags);
GWENHYWFAR_API
HTML_IMAGE *HtmlCtx_GetImage(GWEN_XML_CONTEXT *ctx, const char *imageName);
GWENHYWFAR_API
HTML_PROPS *HtmlCtx_GetStandardProps(const GWEN_XML_CONTEXT *ctx);
GWENHYWFAR_API
void HtmlCtx_SetStandardProps(GWEN_XML_CONTEXT *ctx, HTML_PROPS *pr);
GWENHYWFAR_API
int HtmlCtx_GetWidth(const GWEN_XML_CONTEXT *ctx);
GWENHYWFAR_API
int HtmlCtx_GetHeight(const GWEN_XML_CONTEXT *ctx);
GWENHYWFAR_API
int HtmlCtx_GetResolutionX(const GWEN_XML_CONTEXT *ctx);
GWENHYWFAR_API
void HtmlCtx_SetResolutionX(GWEN_XML_CONTEXT *ctx, int i);
GWENHYWFAR_API
int HtmlCtx_GetResolutionY(const GWEN_XML_CONTEXT *ctx);
GWENHYWFAR_API
void HtmlCtx_SetResolutionY(GWEN_XML_CONTEXT *ctx, int i);
GWENHYWFAR_API
GWEN_STRINGLIST *HtmlCtx_GetMediaPaths(const GWEN_XML_CONTEXT *ctx);
GWENHYWFAR_API
void HtmlCtx_AddMediaPath(GWEN_XML_CONTEXT *ctx, const char *s);
GWENHYWFAR_API
HTMLCTX_GET_TEXT_WIDTH_FN HtmlCtx_SetGetTextWidthFn(GWEN_XML_CONTEXT *ctx,
HTMLCTX_GET_TEXT_WIDTH_FN fn);
GWENHYWFAR_API
HTMLCTX_GET_TEXT_HEIGHT_FN HtmlCtx_SetGetTextHeightFn(GWEN_XML_CONTEXT *ctx,
HTMLCTX_GET_TEXT_HEIGHT_FN fn);
GWENHYWFAR_API
HTMLCTX_GET_COLOR_FROM_NAME_FN HtmlCtx_SetGetColorFromNameFn(GWEN_XML_CONTEXT *ctx,
HTMLCTX_GET_COLOR_FROM_NAME_FN fn);
GWENHYWFAR_API
HTMLCTX_GET_FONT_FN HtmlCtx_SetGetFontFn(GWEN_XML_CONTEXT *ctx,
HTMLCTX_GET_FONT_FN fn);
GWENHYWFAR_API
HTMLCTX_GET_IMAGE_FN HtmlCtx_SetGetImageFn(GWEN_XML_CONTEXT *ctx, HTMLCTX_GET_IMAGE_FN fn);
#ifdef __cplusplus
}
#endif
#endif
GWENHYWFAR_API
#define GWENHYWFAR_API
Definition gwenhywfarapi.h:67
HtmlCtx_Layout
GWENHYWFAR_API int HtmlCtx_Layout(GWEN_XML_CONTEXT *ctx, int width, int height)
HtmlCtx_GetImage
GWENHYWFAR_API HTML_IMAGE * HtmlCtx_GetImage(GWEN_XML_CONTEXT *ctx, const char *imageName)
HTMLCTX_GET_TEXT_HEIGHT_FN
int(* HTMLCTX_GET_TEXT_HEIGHT_FN)(GWEN_XML_CONTEXT *ctx, HTML_FONT *fnt, const char *s)
Definition htmlctx_be.h:31
HtmlCtx_GetFont
GWENHYWFAR_API HTML_FONT * HtmlCtx_GetFont(GWEN_XML_CONTEXT *ctx, const char *fontName, int fontSize, uint32_t fontFlags)
HtmlCtx_GetHeight
GWENHYWFAR_API int HtmlCtx_GetHeight(const GWEN_XML_CONTEXT *ctx)
HtmlCtx_GetStandardProps
GWENHYWFAR_API HTML_PROPS * HtmlCtx_GetStandardProps(const GWEN_XML_CONTEXT *ctx)
HtmlCtx_SetResolutionX
GWENHYWFAR_API void HtmlCtx_SetResolutionX(GWEN_XML_CONTEXT *ctx, int i)
HTMLCTX_GET_FONT_FN
HTML_FONT *(* HTMLCTX_GET_FONT_FN)(GWEN_XML_CONTEXT *ctx, const char *fontName, int fontSize, uint32_t fontFlags)
Definition htmlctx_be.h:39
HtmlCtx_SetGetColorFromNameFn
GWENHYWFAR_API HTMLCTX_GET_COLOR_FROM_NAME_FN HtmlCtx_SetGetColorFromNameFn(GWEN_XML_CONTEXT *ctx, HTMLCTX_GET_COLOR_FROM_NAME_FN fn)
HtmlCtx_SetGetImageFn
GWENHYWFAR_API HTMLCTX_GET_IMAGE_FN HtmlCtx_SetGetImageFn(GWEN_XML_CONTEXT *ctx, HTMLCTX_GET_IMAGE_FN fn)
HtmlCtx_SetGetTextHeightFn
GWENHYWFAR_API HTMLCTX_GET_TEXT_HEIGHT_FN HtmlCtx_SetGetTextHeightFn(GWEN_XML_CONTEXT *ctx, HTMLCTX_GET_TEXT_HEIGHT_FN fn)
HtmlCtx_SetGetFontFn
GWENHYWFAR_API HTMLCTX_GET_FONT_FN HtmlCtx_SetGetFontFn(GWEN_XML_CONTEXT *ctx, HTMLCTX_GET_FONT_FN fn)
HtmlCtx_new
GWENHYWFAR_API GWEN_XML_CONTEXT * HtmlCtx_new(uint32_t flags)
HtmlCtx_SetGetTextWidthFn
GWENHYWFAR_API HTMLCTX_GET_TEXT_WIDTH_FN HtmlCtx_SetGetTextWidthFn(GWEN_XML_CONTEXT *ctx, HTMLCTX_GET_TEXT_WIDTH_FN fn)
HtmlCtx_GetResolutionY
GWENHYWFAR_API int HtmlCtx_GetResolutionY(const GWEN_XML_CONTEXT *ctx)
HTMLCTX_GET_TEXT_WIDTH_FN
int(* HTMLCTX_GET_TEXT_WIDTH_FN)(GWEN_XML_CONTEXT *ctx, HTML_FONT *fnt, const char *s)
Definition htmlctx_be.h:27
HtmlCtx_SetResolutionY
GWENHYWFAR_API void HtmlCtx_SetResolutionY(GWEN_XML_CONTEXT *ctx, int i)
HtmlCtx_SetStandardProps
GWENHYWFAR_API void HtmlCtx_SetStandardProps(GWEN_XML_CONTEXT *ctx, HTML_PROPS *pr)
HTMLCTX_GET_IMAGE_FN
HTML_IMAGE *(* HTMLCTX_GET_IMAGE_FN)(GWEN_XML_CONTEXT *ctx, const char *imageName)
Definition htmlctx_be.h:44
HtmlCtx_GetWidth
GWENHYWFAR_API int HtmlCtx_GetWidth(const GWEN_XML_CONTEXT *ctx)
HtmlCtx_GetResolutionX
GWENHYWFAR_API int HtmlCtx_GetResolutionX(const GWEN_XML_CONTEXT *ctx)
HtmlCtx_SetText
GWENHYWFAR_API void HtmlCtx_SetText(GWEN_XML_CONTEXT *ctx, const char *s)
HTMLCTX_GET_COLOR_FROM_NAME_FN
uint32_t(* HTMLCTX_GET_COLOR_FROM_NAME_FN)(const GWEN_XML_CONTEXT *ctx, const char *s)
Definition htmlctx_be.h:36
HtmlCtx_GetMediaPaths
GWENHYWFAR_API GWEN_STRINGLIST * HtmlCtx_GetMediaPaths(const GWEN_XML_CONTEXT *ctx)
HtmlCtx_AddMediaPath
GWENHYWFAR_API void HtmlCtx_AddMediaPath(GWEN_XML_CONTEXT *ctx, const char *s)
HtmlCtx_GetRootObject
GWENHYWFAR_API HTML_OBJECT * HtmlCtx_GetRootObject(const GWEN_XML_CONTEXT *ctx)
htmlfont_be.h
HTML_FONT
struct HTML_FONT HTML_FONT
Definition htmlfont_be.h:23
htmlimage_be.h
HTML_IMAGE
struct HTML_IMAGE HTML_IMAGE
Definition htmlimage_be.h:23
htmlobject_be.h
HTML_OBJECT
struct HTML_OBJECT HTML_OBJECT
Definition htmlobject_be.h:25
HTML_PROPS
struct HTML_PROPS HTML_PROPS
Definition htmlprops_be.h:15
stringlist.h
GWEN_STRINGLIST
struct GWEN_STRINGLISTSTRUCT GWEN_STRINGLIST
Definition stringlist.h:56
xmlctx.h
GWEN_XML_CONTEXT
struct GWEN_XML_CONTEXT GWEN_XML_CONTEXT
Definition xmlctx.h:39