gwenhywfar  4.8.0beta
Macros | Functions
htmlctx.c File Reference
#include "htmlctx_p.h"
#include "o_box_l.h"
#include "g_box_l.h"
#include <gwenhywfar/misc.h>
#include <gwenhywfar/debug.h>
#include <gwenhywfar/text.h>

Go to the source code of this file.

Macros

#define DISABLE_DEBUGLOG
 

Functions

int HtmlCtx_AddAttr (GWEN_XML_CONTEXT *ctx, const char *attrName, const char *attrData)
 
int HtmlCtx_AddComment (GWEN_XML_CONTEXT *ctx, const char *data)
 
int HtmlCtx_AddData (GWEN_XML_CONTEXT *ctx, const char *data)
 
void HtmlCtx_AddMediaPath (GWEN_XML_CONTEXT *ctx, const char *s)
 
int HtmlCtx_EndTag (GWEN_XML_CONTEXT *ctx, int closing)
 
GWENHYWFAR_CB void HtmlCtx_FreeData (void *bp, void *p)
 
uint32_t HtmlCtx_GetColorFromName (const GWEN_XML_CONTEXT *ctx, const char *name)
 
GWEN_DB_NODEHtmlCtx_GetCurrentAttributes (const GWEN_XML_CONTEXT *ctx)
 
HTML_GROUPHtmlCtx_GetCurrentGroup (const GWEN_XML_CONTEXT *ctx)
 
const char * HtmlCtx_GetCurrentTagName (const GWEN_XML_CONTEXT *ctx)
 
HTML_FONTHtmlCtx_GetFont (GWEN_XML_CONTEXT *ctx, const char *fontName, int fontSize, uint32_t fontFlags)
 
int HtmlCtx_GetHeight (const GWEN_XML_CONTEXT *ctx)
 
HTML_IMAGEHtmlCtx_GetImage (GWEN_XML_CONTEXT *ctx, const char *imageName)
 
GWEN_STRINGLISTHtmlCtx_GetMediaPaths (const GWEN_XML_CONTEXT *ctx)
 
HTML_OBJECT_TREE * HtmlCtx_GetObjects (const GWEN_XML_CONTEXT *ctx)
 
int HtmlCtx_GetResolutionX (const GWEN_XML_CONTEXT *ctx)
 
int HtmlCtx_GetResolutionY (const GWEN_XML_CONTEXT *ctx)
 
HTML_OBJECTHtmlCtx_GetRootObject (const GWEN_XML_CONTEXT *ctx)
 
HTML_PROPSHtmlCtx_GetStandardProps (const GWEN_XML_CONTEXT *ctx)
 
int HtmlCtx_GetTextHeight (GWEN_XML_CONTEXT *ctx, HTML_FONT *fnt, const char *s)
 
int HtmlCtx_GetTextWidth (GWEN_XML_CONTEXT *ctx, HTML_FONT *fnt, const char *s)
 
int HtmlCtx_GetWidth (const GWEN_XML_CONTEXT *ctx)
 
int HtmlCtx_Layout (GWEN_XML_CONTEXT *ctx, int width, int height)
 
GWEN_XML_CONTEXTHtmlCtx_new (uint32_t flags)
 
int HtmlCtx_SanitizeData (GWEN_XML_CONTEXT *ctx, const char *data, GWEN_BUFFER *buf)
 
void HtmlCtx_SetCurrentGroup (GWEN_XML_CONTEXT *ctx, HTML_GROUP *g)
 
void HtmlCtx_SetCurrentTagName (GWEN_XML_CONTEXT *ctx, const char *s)
 
HTMLCTX_GET_COLOR_FROM_NAME_FN HtmlCtx_SetGetColorFromNameFn (GWEN_XML_CONTEXT *ctx, HTMLCTX_GET_COLOR_FROM_NAME_FN fn)
 
HTMLCTX_GET_FONT_FN HtmlCtx_SetGetFontFn (GWEN_XML_CONTEXT *ctx, HTMLCTX_GET_FONT_FN fn)
 
HTMLCTX_GET_IMAGE_FN HtmlCtx_SetGetImageFn (GWEN_XML_CONTEXT *ctx, HTMLCTX_GET_IMAGE_FN fn)
 
HTMLCTX_GET_TEXT_HEIGHT_FN HtmlCtx_SetGetTextHeightFn (GWEN_XML_CONTEXT *ctx, HTMLCTX_GET_TEXT_HEIGHT_FN fn)
 
HTMLCTX_GET_TEXT_WIDTH_FN HtmlCtx_SetGetTextWidthFn (GWEN_XML_CONTEXT *ctx, HTMLCTX_GET_TEXT_WIDTH_FN fn)
 
void HtmlCtx_SetResolutionX (GWEN_XML_CONTEXT *ctx, int i)
 
void HtmlCtx_SetResolutionY (GWEN_XML_CONTEXT *ctx, int i)
 
void HtmlCtx_SetStandardProps (GWEN_XML_CONTEXT *ctx, HTML_PROPS *pr)
 
void HtmlCtx_SetText (GWEN_XML_CONTEXT *ctx, const char *s)
 
int HtmlCtx_StartTag (GWEN_XML_CONTEXT *ctx, const char *tagName)
 
HTML_OBJECT_TREE * HtmlCtx_TakeObjects (const GWEN_XML_CONTEXT *ctx)
 

Macro Definition Documentation

#define DISABLE_DEBUGLOG

Definition at line 16 of file htmlctx.c.

Function Documentation

int HtmlCtx_AddAttr ( GWEN_XML_CONTEXT ctx,
const char *  attrName,
const char *  attrData 
)

Definition at line 538 of file htmlctx.c.

References GWEN_DB_FLAGS_DEFAULT, GWEN_DB_SetCharValue(), and GWEN_INHERIT_GETDATA.

Referenced by HtmlCtx_new().

int HtmlCtx_AddComment ( GWEN_XML_CONTEXT ctx,
const char *  data 
)

Definition at line 525 of file htmlctx.c.

References GWEN_INHERIT_GETDATA.

Referenced by HtmlCtx_new().

int HtmlCtx_AddData ( GWEN_XML_CONTEXT ctx,
const char *  data 
)
void HtmlCtx_AddMediaPath ( GWEN_XML_CONTEXT ctx,
const char *  s 
)

Definition at line 166 of file htmlctx.c.

References GWEN_INHERIT_GETDATA, and GWEN_StringList_AppendString().

Referenced by FOX16_HtmlCtx::addMediaPath().

int HtmlCtx_EndTag ( GWEN_XML_CONTEXT ctx,
int  closing 
)
GWENHYWFAR_CB void HtmlCtx_FreeData ( void *  bp,
void *  p 
)
uint32_t HtmlCtx_GetColorFromName ( const GWEN_XML_CONTEXT ctx,
const char *  name 
)

Definition at line 593 of file htmlctx.c.

References GWEN_INHERIT_GETDATA.

Referenced by HtmlGroup_Box_StartTag().

GWEN_DB_NODE* HtmlCtx_GetCurrentAttributes ( const GWEN_XML_CONTEXT ctx)

Definition at line 230 of file htmlctx.c.

References GWEN_INHERIT_GETDATA.

Referenced by HtmlGroup_Box_StartTag(), and HtmlGroup_TableRow_StartTag().

HTML_GROUP* HtmlCtx_GetCurrentGroup ( const GWEN_XML_CONTEXT ctx)

Definition at line 180 of file htmlctx.c.

References GWEN_INHERIT_GETDATA.

const char* HtmlCtx_GetCurrentTagName ( const GWEN_XML_CONTEXT ctx)

Definition at line 204 of file htmlctx.c.

References GWEN_INHERIT_GETDATA.

HTML_FONT* HtmlCtx_GetFont ( GWEN_XML_CONTEXT ctx,
const char *  fontName,
int  fontSize,
uint32_t  fontFlags 
)
int HtmlCtx_GetHeight ( const GWEN_XML_CONTEXT ctx)

Definition at line 814 of file htmlctx.c.

References HtmlCtx_GetRootObject(), and HtmlObject_GetHeight().

HTML_IMAGE* HtmlCtx_GetImage ( GWEN_XML_CONTEXT ctx,
const char *  imageName 
)

The implementation must set width and height in the image returned.

Definition at line 627 of file htmlctx.c.

References GWEN_INHERIT_GETDATA, and NULL.

Referenced by HtmlGroup_Box_StartTag().

GWEN_STRINGLIST* HtmlCtx_GetMediaPaths ( const GWEN_XML_CONTEXT ctx)

Definition at line 154 of file htmlctx.c.

References GWEN_INHERIT_GETDATA.

Referenced by FOX16_HtmlCtx::getImage().

HTML_OBJECT_TREE* HtmlCtx_GetObjects ( const GWEN_XML_CONTEXT ctx)

Definition at line 242 of file htmlctx.c.

References GWEN_INHERIT_GETDATA.

int HtmlCtx_GetResolutionX ( const GWEN_XML_CONTEXT ctx)

Definition at line 106 of file htmlctx.c.

References GWEN_INHERIT_GETDATA.

Referenced by HtmlObject_Box_Layout().

int HtmlCtx_GetResolutionY ( const GWEN_XML_CONTEXT ctx)

Definition at line 130 of file htmlctx.c.

References GWEN_INHERIT_GETDATA.

Referenced by HtmlObject_Box_Layout().

HTML_OBJECT* HtmlCtx_GetRootObject ( const GWEN_XML_CONTEXT ctx)
HTML_PROPS* HtmlCtx_GetStandardProps ( const GWEN_XML_CONTEXT ctx)

Definition at line 354 of file htmlctx.c.

References GWEN_INHERIT_GETDATA.

int HtmlCtx_GetTextHeight ( GWEN_XML_CONTEXT ctx,
HTML_FONT fnt,
const char *  s 
)

Definition at line 576 of file htmlctx.c.

References GWEN_INHERIT_GETDATA.

Referenced by HtmlObject_Box_Layout(), and HtmlObject_Word_Layout().

int HtmlCtx_GetTextWidth ( GWEN_XML_CONTEXT ctx,
HTML_FONT fnt,
const char *  s 
)

Definition at line 559 of file htmlctx.c.

References GWEN_INHERIT_GETDATA.

Referenced by HtmlObject_Word_Layout().

int HtmlCtx_GetWidth ( const GWEN_XML_CONTEXT ctx)

Definition at line 802 of file htmlctx.c.

References HtmlCtx_GetRootObject(), and HtmlObject_GetWidth().

int HtmlCtx_Layout ( GWEN_XML_CONTEXT ctx,
int  width,
int  height 
)
GWEN_XML_CONTEXT* HtmlCtx_new ( uint32_t  flags)
int HtmlCtx_SanitizeData ( GWEN_XML_CONTEXT ctx,
const char *  data,
GWEN_BUFFER buf 
)
void HtmlCtx_SetCurrentGroup ( GWEN_XML_CONTEXT ctx,
HTML_GROUP g 
)
void HtmlCtx_SetCurrentTagName ( GWEN_XML_CONTEXT ctx,
const char *  s 
)

Definition at line 216 of file htmlctx.c.

References GWEN_INHERIT_GETDATA, and NULL.

Referenced by HtmlCtx_StartTag().

HTMLCTX_GET_COLOR_FROM_NAME_FN HtmlCtx_SetGetColorFromNameFn ( GWEN_XML_CONTEXT ctx,
HTMLCTX_GET_COLOR_FROM_NAME_FN  fn 
)

Definition at line 676 of file htmlctx.c.

References GWEN_INHERIT_GETDATA.

Referenced by FOX16_HtmlCtx::FOX16_HtmlCtx().

HTMLCTX_GET_FONT_FN HtmlCtx_SetGetFontFn ( GWEN_XML_CONTEXT ctx,
HTMLCTX_GET_FONT_FN  fn 
)

Definition at line 693 of file htmlctx.c.

References GWEN_INHERIT_GETDATA.

Referenced by FOX16_HtmlCtx::FOX16_HtmlCtx().

HTMLCTX_GET_IMAGE_FN HtmlCtx_SetGetImageFn ( GWEN_XML_CONTEXT ctx,
HTMLCTX_GET_IMAGE_FN  fn 
)

Definition at line 709 of file htmlctx.c.

References GWEN_INHERIT_GETDATA.

Referenced by FOX16_HtmlCtx::FOX16_HtmlCtx().

HTMLCTX_GET_TEXT_HEIGHT_FN HtmlCtx_SetGetTextHeightFn ( GWEN_XML_CONTEXT ctx,
HTMLCTX_GET_TEXT_HEIGHT_FN  fn 
)

Definition at line 659 of file htmlctx.c.

References GWEN_INHERIT_GETDATA.

Referenced by FOX16_HtmlCtx::FOX16_HtmlCtx().

HTMLCTX_GET_TEXT_WIDTH_FN HtmlCtx_SetGetTextWidthFn ( GWEN_XML_CONTEXT ctx,
HTMLCTX_GET_TEXT_WIDTH_FN  fn 
)

Definition at line 642 of file htmlctx.c.

References GWEN_INHERIT_GETDATA.

Referenced by FOX16_HtmlCtx::FOX16_HtmlCtx().

void HtmlCtx_SetResolutionX ( GWEN_XML_CONTEXT ctx,
int  i 
)

Definition at line 118 of file htmlctx.c.

References GWEN_INHERIT_GETDATA.

void HtmlCtx_SetResolutionY ( GWEN_XML_CONTEXT ctx,
int  i 
)

Definition at line 142 of file htmlctx.c.

References GWEN_INHERIT_GETDATA.

void HtmlCtx_SetStandardProps ( GWEN_XML_CONTEXT ctx,
HTML_PROPS pr 
)
void HtmlCtx_SetText ( GWEN_XML_CONTEXT ctx,
const char *  s 
)
int HtmlCtx_StartTag ( GWEN_XML_CONTEXT ctx,
const char *  tagName 
)
HTML_OBJECT_TREE* HtmlCtx_TakeObjects ( const GWEN_XML_CONTEXT ctx)

Definition at line 254 of file htmlctx.c.

References GWEN_INHERIT_GETDATA, and NULL.