summaryrefslogtreecommitdiff
path: root/src/glibext/tokenstyle.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/glibext/tokenstyle.h')
-rw-r--r--src/glibext/tokenstyle.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/glibext/tokenstyle.h b/src/glibext/tokenstyle.h
index 923b725..2e19b51 100644
--- a/src/glibext/tokenstyle.h
+++ b/src/glibext/tokenstyle.h
@@ -26,6 +26,8 @@
#define _GLIBEXT_TOKENSTYLE_H
+#include <stdbool.h>
+#include <stdint.h>
#include <gtk/gtk.h>
@@ -38,11 +40,12 @@ typedef enum _TokenRenderingTag
{
TRT_NONE, /* Espace ou tabulation */
- TRT_RAW, /* Contenu brut */
+ TRT_RAW_PRINTABLE, /* Contenu brut */
+ TRT_RAW_NOT_PRINTABLE, /* Contenu brut */
TRT_RAW_FULL, /* Contenu brut et complet */
TRT_RAW_NULL, /* Contenu brut et nul */
- TRT_PRINTABLE, /* Caractère imprimable */
- TRT_NOT_PRINTABLE, /* Caractère non imprimable */
+ TRT_CHR_PRINTABLE, /* Caractère imprimable */
+ TRT_CHR_NOT_PRINTABLE, /* Caractère non imprimable */
TRT_COMMENT, /* Commentaire */
TRT_INDICATION, /* Aide à la lecture */
@@ -82,6 +85,10 @@ typedef enum _TokenRenderingTag
} TokenRenderingTag;
+/* Caractères par tabulation */
+#define TAB_SIZE 2
+
+
#define G_TYPE_TOKEN_STYLE (g_token_style_get_type())
DECLARE_GTYPE(GTokenStyle, g_token_style, G, TOKEN_STYLE);
@@ -90,6 +97,9 @@ DECLARE_GTYPE(GTokenStyle, g_token_style, G, TOKEN_STYLE);
/* Crée un gestionnaire de style pour le rendu des lignes. */
GTokenStyle *g_token_style_new(GtkWidget *);
+/* Fournit la quantité de pixels requise pour une ligne. */
+int g_token_style_get_line_height(const GTokenStyle *);
+
/* Fournit la quantité de pixels requise pour l'impression. */
int g_token_style_measure_width(const GTokenStyle *, TokenRenderingTag, size_t);
@@ -102,6 +112,9 @@ char *g_token_style_build_markup(const GTokenStyle *, TokenRenderingTag, const c
/* Ajoute du texte enjolivé selon un élément de thème. */
char *g_token_style_append_markup(const GTokenStyle *, char *, TokenRenderingTag, const char *);
+/* Détermine une taille de localisation, physique ou virtuelle. */
+int g_token_style_compute_location_width(const GTokenStyle *, uint64_t, bool);
+
#endif /* _GLIBEXT_TOKENSTYLE_H */