summaryrefslogtreecommitdiff
path: root/lib/astal/gtk3/src/widget/button.vala
diff options
context:
space:
mode:
Diffstat (limited to 'lib/astal/gtk3/src/widget/button.vala')
-rw-r--r--lib/astal/gtk3/src/widget/button.vala18
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/astal/gtk3/src/widget/button.vala b/lib/astal/gtk3/src/widget/button.vala
index bc10577..2d3095a 100644
--- a/lib/astal/gtk3/src/widget/button.vala
+++ b/lib/astal/gtk3/src/widget/button.vala
@@ -1,3 +1,9 @@
+/**
+ * This button has no extra functionality on top if its base [[email protected]] class.
+ *
+ * The purpose of this Button subclass is to have a destructable
+ * struct as the argument in GJS event handlers.
+ */
public class Astal.Button : Gtk.Button {
public signal void hover (HoverEvent event);
public signal void hover_lost (HoverEvent event);
@@ -39,9 +45,9 @@ public enum Astal.MouseButton {
FORWARD = 5,
}
-// these structs are here because gjs converts every event
-// into a union Gdk.Event, which cannot be destructured
-// and are not as convinent to work with as a struct
+/**
+ * Struct for [[email protected]]
+ */
public struct Astal.ClickEvent {
bool release;
uint time;
@@ -59,6 +65,9 @@ public struct Astal.ClickEvent {
}
}
+/**
+ * Struct for [[email protected]]
+ */
public struct Astal.HoverEvent {
bool lost;
uint time;
@@ -78,6 +87,9 @@ public struct Astal.HoverEvent {
}
}
+/**
+ * Struct for [[email protected]]
+ */
public struct Astal.ScrollEvent {
uint time;
double x;