nyctergatis.com

Contact

Projects
Sysquake Remote Live
NME
PDF
Hike
Sudoku
GifBuilder
jpeglib for Palm OS
MySQL Client
Cross-GCC for Mac OS
NMEStyle.c File Reference

Hooks to collect style information separately. More...

#include "NMEStyle.h"

Go to the source code of this file.

Functions

void NMEStyleInit (NMEStyleTable *table, NMEInt size, NMEBoolean convertOffsetsToUnicode)
 Initialize NMEStyleTable.
static NMEStyleEnum decodeStyle (NMEConstText markup, NMEInt level)
 Convert style markup string to a NMEStyleEnum value.
NMEErr NMEStyleSpanHook (NMEInt level, NMEInt item, NMEBoolean enter, NMEConstText markup, NMEInt srcIndex, NMEInt srcLineNumber, NMEContext *context, void *data)
 Process hook for storing styles in a table.

Variables

NMEOutputFormat const NMEOutputFormatBasicText
 Format strings for basic text output, suitable for separate style.

Detailed Description

Hooks to collect style information separately.

Author:
Yves Piguet.

Definition in file NMEStyle.c.


Function Documentation

static NMEStyleEnum decodeStyle ( NMEConstText  markup,
NMEInt  level 
) [static]

Convert style markup string to a NMEStyleEnum value.

Parameters:
[in]markupmarkup string, as provided by NMEProcessHookFun
[in]levelheading or list level (1 = topmost)
Returns:
style

Definition at line 74 of file NMEStyle.c.

void NMEStyleInit ( NMEStyleTable table,
NMEInt  size,
NMEBoolean  convertOffsetsToUnicode 
)

Initialize NMEStyleTable.

Parameters:
[out]tabletable of style spans
[in]sizesize of table in bytes
[in]convertOffsetsToUnicodeTRUE if original text is in UTF-8 and span locations in table must be converted to values for UCS-16 text (16-bit unicode), FALSE if span locations in table are in bytes (independant from the chararcter encoding)

Definition at line 59 of file NMEStyle.c.

NMEErr NMEStyleSpanHook ( NMEInt  level,
NMEInt  item,
NMEBoolean  enter,
NMEConstText  markup,
NMEInt  srcIndex,
NMEInt  srcLineNumber,
NMEContext context,
void *  data 
)

Process hook for storing styles in a table.

Parameters:
[in]levelheading or list level (1 = topmost)
[in]itemlist item or heading counter
[in]enterTRUE when entering construct, FALSE when exiting
[in]markupnull-terminated string for initial markup ("p" for par, "*" for unnumbered list of any level, "//" for italic, "{{{" for preformatted)
[in]srcIndexcurrent index in source code
[in]srcLineNumbercurrent line number in source code
[in,out]contextcurrent context
[in,out]datatable of styles
Returns:
error code (kNMEErrOk for success)

Definition at line 120 of file NMEStyle.c.

Generated by Doxygen.
Copyright 2007-2013, Yves Piguet.
All rights reserved.