aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interface.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface.h')
-rw-r--r--src/interface.h28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/interface.h b/src/interface.h
index 80da8d9..33b094b 100644
--- a/src/interface.h
+++ b/src/interface.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012-2024 Robin Haberkorn
+ * Copyright (C) 2012-2025 Robin Haberkorn
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -132,7 +132,9 @@ typedef enum {
void teco_interface_popup_add(teco_popup_entry_type_t type,
const gchar *name, gsize name_len, gboolean highlight);
/** @pure */
-void teco_interface_popup_show(void);
+void teco_interface_popup_show(gsize prefix_len);
+/** @pure */
+void teco_interface_popup_scroll(void);
/** @pure */
gboolean teco_interface_popup_is_shown(void);
/** @pure */
@@ -141,6 +143,28 @@ void teco_interface_popup_clear(void);
/** @pure */
gboolean teco_interface_is_interrupted(void);
+typedef struct {
+ enum {
+ TECO_MOUSE_PRESSED = 1,
+ TECO_MOUSE_RELEASED,
+ TECO_MOUSE_SCROLLUP,
+ TECO_MOUSE_SCROLLDOWN
+ } type;
+
+ guint x; /*< X-coordinate relative to view */
+ guint y; /*< Y-coordinate relative to view */
+
+ gint button; /*< number of pressed mouse button or -1 */
+
+ enum {
+ TECO_MOUSE_SHIFT = (1 << 0),
+ TECO_MOUSE_CTRL = (1 << 1),
+ TECO_MOUSE_ALT = (1 << 2)
+ } mods;
+} teco_mouse_t;
+
+extern teco_mouse_t teco_mouse;
+
/** @pure main entry point */
gboolean teco_interface_event_loop(GError **error);