aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNunoSempere <nuno.sempere@protonmail.com>2023-12-29 18:51:07 +0100
committerNunoSempere <nuno.sempere@protonmail.com>2023-12-29 18:51:07 +0100
commitda8a0d7624fbeacb52ae14fff8d75ff2ca1cf536 (patch)
treea8b59453fa4c7c85b090719f2a3adc7e1d3c45c3
parent75848c63a294f03024b92379cb264d56391294cd (diff)
add pointer to capturing mouse events.
-rw-r--r--rose.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/rose.c b/rose.c
index 599213a..bacb637 100644
--- a/rose.c
+++ b/rose.c
@@ -414,7 +414,15 @@ int keypress(void* self, GdkEvent* e, GtkNotebook* notebook)
for (int i = 0; i < sizeof(keys) / sizeof(keys[0]); i++)
if ((e->key.state == keys[i].mod || keys[i].mod == 0x0) && e->key.keyval == keys[i].key)
return handle_key(keys[i].id, notebook);
-
+ /*
+ printf("Event type: %d\n", e->type);
+ printf("Keyval: %d\n", e->key.keyval);
+ // Note: if I wanted to bind button presses, like the extra button in the mouse,
+ // I would have to bind the button-press-event signal instead.
+ // Some links in case I go down that road: <https://docs.gtk.org/gtk3/signal.Widget.button-press-event.html>
+ // https://docs.gtk.org/gdk3/union.Event.html
+ // https://docs.gtk.org/gdk3/struct.EventButton.html
+ */
return 0;
}