aboutsummaryrefslogtreecommitdiffstats
path: root/char-table.h
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-06-07 17:04:14 +0200
committerMattias Andrée <m@maandree.se>2026-06-07 17:04:14 +0200
commitf0e237344af327be7828b6f03a3588a76e867fa3 (patch)
treec8f401428ca767143e68321a366036ae82ea82f5 /char-table.h
parentwhitespace fix (diff)
downloadgcmap-f0e237344af327be7828b6f03a3588a76e867fa3.tar.gz
gcmap-f0e237344af327be7828b6f03a3588a76e867fa3.tar.bz2
gcmap-f0e237344af327be7828b6f03a3588a76e867fa3.tar.xz
Misc
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r--char-table.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/char-table.h b/char-table.h
index 87d65d4..33999b2 100644
--- a/char-table.h
+++ b/char-table.h
@@ -3,7 +3,7 @@
#define GCMAP_TYPE_CHAR_TABLE (gcmap_char_table_get_type())
-#define GCMAP_TYPE_CHAR(OBJ) (G_TYPE_CHECK_INSTANCE_CAST((OBJ), GCMAP_TYPE_CHAR_TABLE, CharTable))
+#define GCMAP_CHAR_TABLE(OBJ) (G_TYPE_CHECK_INSTANCE_CAST((OBJ), GCMAP_TYPE_CHAR_TABLE, CharTable))
#define GCMAP_CHAR_TABLE_CLASS(CLASS) (G_TYPE_CHECK_CLASS_CAST((CLASS), GCMAP_TYPE_CHAR_TABLE, CharTableClass))
#define IS_GCMAP_CHAR_TABLE(OBJ) (G_TYPE_CHECK_INSTANCE_TYPE((OBJ), GCMAP_TYPE_CHAR_TABLE))
#define IS_GCMAP_CHAR_TABLE_CLASS(CLASS) (G_TYPE_CHECK_CLASS_TYPE((CLASS), GCMAP_TYPE_CHAR_TABLE))
@@ -12,9 +12,18 @@
typedef struct _CharTable {
GtkDrawingArea parent_instance;
- int nrows, ncols, max_w, max_h;
+ int nrows, ncols;
+ int max_w, max_h;
+ int cell_h, table_h;
+ uint32_t nchars;
+ int viewport_w, viewport_h;
PangoFontDescription *font;
PangoLayout *layout;
+ int font_size;
+ PangoWeight font_weight;
+ PangoStyle font_style;
+ const struct libcmap_range *ranges;
+ size_t nranges;
} CharTable;
typedef struct _CharTableClass {
@@ -23,4 +32,11 @@ typedef struct _CharTableClass {
GType gcmap_char_table_get_type(void);
-GtkWidget *gcmap_char_table_new(void);
+GtkWidget *gcmap_char_table_new(const char *font_family, int font_size, PangoWeight font_weight, PangoStyle font_style);
+
+void gcmap_char_table_set_font_family(CharTable *this, const char *family);
+void gcmap_char_table_set_font_weight(CharTable *this, PangoWeight weight);
+void gcmap_char_table_set_font_style(CharTable *this, PangoStyle style);
+void gcmap_char_table_set_font_size(CharTable *this, int size);
+void gcmap_char_table_set_ranges(CharTable *this, const struct libcmap_range *ranges, size_t nranges);
+void gcmap_char_table_viewport_updated(CharTable *this, int viewport_w, int viewport_h);