summaryrefslogtreecommitdiff
path: root/src/Gtk/Tune.dcl
diff options
context:
space:
mode:
authorCamil Staps2019-11-01 18:41:10 +0100
committerCamil Staps2019-11-01 18:41:10 +0100
commit0497dfb79211aa1e64304fa446d230c41ca73daa (patch)
treecc29910a32b81db4430aff1a74172174039e9c25 /src/Gtk/Tune.dcl
parentRemove dependency on supporting C code (diff)
Cleanup and add documentation
Diffstat (limited to 'src/Gtk/Tune.dcl')
-rw-r--r--src/Gtk/Tune.dcl16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/Gtk/Tune.dcl b/src/Gtk/Tune.dcl
index f5966ec..63e48a4 100644
--- a/src/Gtk/Tune.dcl
+++ b/src/Gtk/Tune.dcl
@@ -1,12 +1,18 @@
definition module Gtk.Tune
+/**
+ * This module provides a class and useful infix operators for 'tuning' things.
+ * Tuning involves modifying an existing element, typically a widget. A single
+ * `tune` class avoids the need for a variety of `set...` functions.
+ */
+
from Gtk.State import :: GtkM
-from Gtk.Types import :: GtkCSSClass, :: GtkMargins
-from Gtk.Widgets import :: GtkWidget, class gtkWidget
+//* Modify `elem` with `option`.
class tune elem option :: !option !elem -> GtkM elem
+/**
+ * Infix operator to tune something, typically used when creating the element.
+ * For example: `newTextView <<@ Insensitive >>= \text_view -> ...`.
+ */
(<<@) infixl 2 :: !(GtkM elem) !option -> GtkM elem | tune elem option
-
-instance tune w GtkMargins | gtkWidget w
-instance tune w GtkCSSClass | gtkWidget w