libsf3
|
#include "sf3_core.h"
Go to the source code of this file.
Data Structures | |
struct | sf3_markup |
struct | sf3_markup_color |
Description of a color change. More... | |
struct | sf3_markup_size |
Description of a font size change. More... | |
struct | sf3_markup_heading |
Description of a heading. More... | |
struct | sf3_markup_link |
Description of a hyperlink. More... | |
struct | sf3_markup_target |
Description of a link target. More... | |
struct | sf3_markup_font |
Description of a font family change. More... | |
struct | sf3_text |
Macros | |
#define | SF3_FORMAT_ID_TEXT 0x08 |
The format_id for a text file. | |
Enumerations | |
enum | sf3_markup_option_type { SF3_MARKUP_BOLD = 0x01 , SF3_MARKUP_ITALIC = 0x02 , SF3_MARKUP_UNDERLINE = 0x03 , SF3_MARKUP_STRIKE = 0x04 , SF3_MARKUP_MONO = 0x05 , SF3_MARKUP_COLOR = 0x06 , SF3_MARKUP_SIZE = 0x07 , SF3_MARKUP_HEADING = 0x08 , SF3_MARKUP_LINK = 0x09 , SF3_MARKUP_TARGET = 0x0A , SF3_MARKUP_FONT = 0x0B } |
The possible markup option types. More... | |
Functions | |
SF3_INLINE const struct sf3_markup * | sf3_text_next_markup (const struct sf3_markup *markup) |
SF3_INLINE const char * | sf3_text_string (const struct sf3_text *text) |
Returns the raw textual contents. | |
SF3_EXPORT const char * | sf3_text_markup_option_type (enum sf3_markup_option_type type) |
Returns a human-readable string description of the markup option. | |
SF3_EXPORT size_t | sf3_text_size (const struct sf3_text *text) |
Computes the size of the text file in bytes. | |
#define SF3_FORMAT_ID_TEXT 0x08 |
The format_id for a text file.
Definition at line 6 of file sf3_text.h.
The possible markup option types.
Enumerator | |
---|---|
SF3_MARKUP_BOLD | The option marks bolding. |
SF3_MARKUP_ITALIC | The option marks italicisation. |
SF3_MARKUP_UNDERLINE | The option marks underlining. |
SF3_MARKUP_STRIKE | The option marks strikethrough. |
SF3_MARKUP_MONO | The option marks monospacing. |
SF3_MARKUP_COLOR | The option marks color and is a |
SF3_MARKUP_SIZE | The option marks font size and is a |
SF3_MARKUP_HEADING | The option marks a heading and is a |
SF3_MARKUP_LINK | The option marks a hyperlink and is a |
SF3_MARKUP_TARGET | The option marks a link target and is a |
SF3_MARKUP_FONT | The option marks a font switch and is a |
Definition at line 9 of file sf3_text.h.
SF3_EXPORT const char * sf3_text_markup_option_type | ( | enum sf3_markup_option_type | type | ) |
Returns a human-readable string description of the markup option.
Definition at line 147 of file sf3_text.h.
SF3_INLINE const struct sf3_markup * sf3_text_next_markup | ( | const struct sf3_markup * | markup | ) |
Returns the next markup option after this one. Note that this function does not perform any bounds checking whatsoever. It is up to you to ensure you do not call this with the last markup option.
Definition at line 113 of file sf3_text.h.
SF3_EXPORT size_t sf3_text_size | ( | const struct sf3_text * | text | ) |
Computes the size of the text file in bytes.
Definition at line 165 of file sf3_text.h.
SF3_INLINE const char * sf3_text_string | ( | const struct sf3_text * | text | ) |
Returns the raw textual contents.
Definition at line 140 of file sf3_text.h.