summaryrefslogtreecommitdiff
path: root/src/glibext/gbuffersegment.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-01-15 14:57:19 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-01-15 14:57:19 (GMT)
commite28ba4839188307f94293af4e29ed6e774c0a499 (patch)
tree2b3ce4dd609f5fe03fcfc3641c9723b39205079b /src/glibext/gbuffersegment.h
parent0a028b306093746324eabdb94881083f9b7e61c1 (diff)
Exported disassembled content in plain text or HTML format properly.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@455 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/glibext/gbuffersegment.h')
-rw-r--r--src/glibext/gbuffersegment.h51
1 files changed, 42 insertions, 9 deletions
diff --git a/src/glibext/gbuffersegment.h b/src/glibext/gbuffersegment.h
index f5cd4b2..10ae374 100644
--- a/src/glibext/gbuffersegment.h
+++ b/src/glibext/gbuffersegment.h
@@ -91,15 +91,6 @@ typedef enum _SegRenderingStyle
} SegRenderingStyle;
-/* Types d'exportation */
-typedef enum _BufferExportType
-{
- BET_TEXT,
-
- BET_COUNT
-
-} BufferExportType;
-
/* Fragment de caractères aux propriétés communes (instance) */
typedef struct _GBufferSegment GBufferSegment;
@@ -136,6 +127,48 @@ void g_buffer_segment_set_style(GBufferSegment *, SegRenderingStyle);
/* Imprime le fragment de texte représenté. */
void g_buffer_segment_draw(GBufferSegment *, cairo_t *, gint *, gint);
+/* Types d'exportation */
+typedef enum _BufferExportType
+{
+ BET_TEXT, /* Exportation en texte brut */
+ BET_HTML, /* Exportation en HTML */
+
+ BET_COUNT
+
+} BufferExportType;
+
+/* Elements sur lesquels une exportation peut s'appuyer */
+typedef struct _buffer_export_context
+{
+ union
+ {
+ int fd; /* Flux ouvert en écriture */
+
+ };
+
+ union
+ {
+ /* BET_TEXT */
+ const char *sep; /* Séparation entre colonnes */
+
+ /* BET_HTML */
+ struct
+ {
+ const char *font_name; /* Police d'impression */
+ const char *bg_color; /* Fond du tableau HTML */
+
+ };
+
+ };
+
+} buffer_export_context;
+
+/* Exporte tous les styles utilisés par des segments. */
+void g_buffer_segment_export_style(buffer_export_context *, BufferExportType);
+
+/* Exporte le fragment de texte représenté. */
+void g_buffer_segment_export(const GBufferSegment *, buffer_export_context *, BufferExportType);
+
#endif /* _GLIBEXT_GBUFFERSEGMENT_H */