Commit Graph

6 Commits

Author SHA1 Message Date
Emmanuele Bassi
ebaa96c0fa Turn GtkExpression into a GTypeInstance
Since it's a type with sub-classes, we need to use GTypeInstance (at the
very least), otherwise we won't be able to address each sub-class as
such.

This is similar to how GskRenderNode and GdkEvent are handled, with the
added difficulty that GtkExpression is meant to be used in properties,
in order to be deserialised by GtkBuilder. This requires adding a
GParamSpec sub-class that we can match on from within GtkBuilder,
alongside some convenience API for storing a GtkExpression inside a
GValue.
2020-06-01 21:07:53 +01:00
Benjamin Otte
b43c8ae646 expression: Allow passing a this object to bind()
This gives a bit more control over the arguments passed to expressions.
2020-05-30 19:26:46 -04:00
Benjamin Otte
b7efe4eb4f expression: Add gtk_expression_bind()
Add a simple way to bind expressions to object properties. This is
essentially the thing to replace g_object_bind_property().
2020-05-30 17:48:44 -04:00
Benjamin Otte
ec742f9373 expression: Add the ability to watch an expression 2020-05-30 17:48:44 -04:00
Benjamin Otte
bd8655fdee expression: Add GtkObjectExpression
Weak refs break cycles...
2020-05-30 17:42:09 -04:00
Benjamin Otte
e9f1ee5aab Add GtkExpression
GtkExpressions allow looking up values from objects.

There are a few simple expressions, but the main one is the closure
expression that just calls a user-provided closure.
2020-05-30 17:42:08 -04:00