cufo/textsink.h: Text Target Styler and Stream
[cufo: Formatted Output]

Data Structures

struct  cufo_textsink
struct  cufo_textstyler
struct  cufo_textstyle

Defines

#define CUFO_TEXTSTYLER_STATIC(name)

Functions

int cufo_textsink_width (cufo_textsink_t sink)
void cufo_textsink_block_boundary (cufo_textsink_t sink)
void cufo_textstyle_init (cufo_textstyle_t style, size_t sink_size, cu_clop(sink_init, void, cufo_textsink_t))
void cufo_textstyle_bind_static (cufo_textstyle_t style, cufo_tag_t tag, cufo_textstyler_t styler)
cufo_textstyle_t cufo_default_textstyle (void)

Variables

struct cufo_textstyle cufoP_default_textstyle

Detailed Description

Note:
Don't use this directly unless writing a text style definition, instead call the appropriate open-function from cufo/stream.h.

Define Documentation

#define CUFO_TEXTSTYLER_STATIC ( name   ) 
Value:
static struct cufo_textstyler name##_styler \
        = {CUCON_HZMAP_NODE_INIT, 0, name##_enter, name##_leave}

Make a static declaration and partial initialisation of a cufo_textstyler struct using name as a prefix for the identifiers involved. This will define name_styler from name_enter and name_leave. Association with a tag is postponed to cufo_textstyle_bind_static, since the tags need to be dynamically allocated.


Function Documentation

void cufo_textstyle_bind_static ( cufo_textstyle_t  style,
cufo_tag_t  tag,
cufo_textstyler_t  styler 
)

Bind styler, which declared and partly initialised with CUFO_TEXTSTYLER_STATIC, as callbacks for tag. styler may only occur in one such call.

void cufo_textstyle_init ( cufo_textstyle_t  style,
size_t  sink_size,
cu_clop(sink_init, void, cufo_textsink_t  
)

Initialises style with the given sink size and sink initialiser. sink_size is the full size of the sink struct of some type derived from cufo_textsink. At sink creation, the cufo_textsink base struct is first initialised, then sink_init is called to finish the initialisation.

Generated 2009-11-23 for culibs-0.25 using Doxygen. Maintained by Petter Urkedal.