1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #ifndef __CODE__
- #define __CODE__
- #include <stdbool.h>
- #include <hoedown/document.h>
- #include <hoedown/buffer.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- /*************
- * CONSTANTS *
- *************/
- typedef enum hoedown_code_language_flags {
- HOEDOWN_CODE_SHOW_COMPLEMENT = (1 << 0),
- HOEDOWN_CODE_SHOW_GENERIC = (1 << 1),
- HOEDOWN_CODE_SHOW_ALL = (1 << 2)
- } hoedown_code_language_flags;
- /*********
- * TYPES *
- *********/
- struct hoedown_code_renderer_state {
- void *opaque;
- hoedown_code_language_flags language_flags;
- char** languages;
- };
- typedef struct hoedown_code_renderer_state hoedown_code_renderer_state;
- /*************
- * FUNCTIONS *
- *************/
- /* hoedown_code_renderer_new: allocates a regular CODE renderer */
- hoedown_renderer *hoedown_code_renderer_new(char* langs, bool complement)
- __attribute__ ((malloc));
- /* hoedown_code_renderer_free: deallocate an CODE renderer */
- void hoedown_code_renderer_free(hoedown_renderer * renderer);
- #ifdef __cplusplus
- }
- #endif
- #endif /** __CODE__ **/
|