NMEStyle.c File Reference
Detailed Description
Hooks to collect style information separately.
- Author:
- Yves Piguet. Copyright 2007-2008, Yves Piguet.
Definition in file NMEStyle.c.
#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, 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.
|
Function Documentation
Convert style markup string to a NMEStyleEnum value.
- Parameters:
-
| [in] | markup | markup string, as provided by NMEProcessHookFun |
| [in] | level | heading or list level (1 = topmost) |
- Returns:
- style
Definition at line 72 of file NMEStyle.c.
Initialize NMEStyleTable.
- Parameters:
-
| [out] | table | table of style spans |
| [in] | size | size of table in bytes |
| [in] | convertOffsetsToUnicode | TRUE 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 57 of file NMEStyle.c.
Process hook for storing styles in a table.
- Parameters:
-
| [in] | level | heading or list level (1 = topmost) |
| [in] | item | list item or heading counter |
| [in] | enter | TRUE when entering construct, FALSE when exiting |
| [in] | markup | null-terminated string for initial markup ("p" for par, "*" for unnumbered list of any level, "//" for italic, "{{{" for preformatted) |
| [in] | srcIndex | current index in source code |
| [in,out] | context | current context |
| [in,out] | data | table of styles |
- Returns:
- error code (kNMEErrOk for success)
Definition at line 118 of file NMEStyle.c.