aboutsummaryrefslogtreecommitdiffstats
path: root/char-table.h
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-10-18 05:55:18 +0200
committerMattias Andrée <m@maandree.se>2026-10-18 05:55:18 +0200
commite578c50ffbd02f2f7b9116b6b9eb096bb1fcee60 (patch)
treea70534fc3c758dd23c494a086e2af46a7d0e602d /char-table.h
parentMisc (diff)
downloadgcmap-e578c50ffbd02f2f7b9116b6b9eb096bb1fcee60.tar.gz
gcmap-e578c50ffbd02f2f7b9116b6b9eb096bb1fcee60.tar.bz2
gcmap-e578c50ffbd02f2f7b9116b6b9eb096bb1fcee60.tar.xz
Misc
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r--char-table.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/char-table.h b/char-table.h
index 0d41d17..e0c828f 100644
--- a/char-table.h
+++ b/char-table.h
@@ -10,6 +10,14 @@
#define GCMAP_CHAR_TABLE_GET_CLASS(OBJ) (G_TYPE_INSTANCE_GET_CLASS((OBJ), GCMAP_TYPE_CHAR_TABLE, CharTableClass))
+enum char_table_selection_type {
+ COPY_TO_TEXTFIELD,
+ COPY_TO_PRIMARY,
+ COPY_TO_SECONDARY,
+ DRAG_ANNOUNCEMENT
+};
+
+
typedef struct _CharTable {
GtkDrawingArea parent_instance;
int nrows, ncols;
@@ -26,15 +34,18 @@ typedef struct _CharTable {
unsigned long int vadjustment_value_changed_id;
unsigned shift_keys;
int right_button_down;
+ uint32_t pointer_cell;
int font_size;
int snap_cols_to_2pow;
int snap_rows_to_2pow;
+ int drag_x, drag_y, drag_stage;
+ GtkTargetList *drag_targets;
unsigned multiclick_count;
PangoWeight font_weight;
PangoStyle font_style;
const struct libcmap_range *ranges;
size_t nranges;
- void (*selection_callback)(uint32_t index, uint32_t codepoint, int meta, int copy_to_text_field);
+ void (*selection_callback)(uint32_t index, uint32_t codepoint, enum char_table_selection_type selection_type);
} CharTable;
typedef struct _CharTableClass {
@@ -49,6 +60,7 @@ 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_font_size_at_pointer(CharTable *this, int size, double x, double y);
void gcmap_char_table_set_snap_cols_to_2pow(CharTable *this, int active);
void gcmap_char_table_set_snap_rows_to_2pow(CharTable *this, int active);
void gcmap_char_table_set_ranges(CharTable *this, const struct libcmap_range *ranges, size_t nranges);