diff options
author | Benjamin Otte <otte@redhat.com> | 2019-11-21 05:53:56 +0100 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-05-30 17:48:44 -0400 |
commit | ec742f9373356ec05fabf7b083fbc33be0c276a0 (patch) | |
tree | 943f3a641085d4cfb0caff24ba6b53966a8d757a /gtk/gtkexpression.h | |
parent | fde75aa9f68530b693f47a4ef327dc29a3070ee5 (diff) | |
download | gtk+-ec742f9373356ec05fabf7b083fbc33be0c276a0.tar.gz |
expression: Add the ability to watch an expression
Diffstat (limited to 'gtk/gtkexpression.h')
-rw-r--r-- | gtk/gtkexpression.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gtk/gtkexpression.h b/gtk/gtkexpression.h index 3df3788d1b..2b40f4d932 100644 --- a/gtk/gtkexpression.h +++ b/gtk/gtkexpression.h @@ -26,6 +26,16 @@ G_BEGIN_DECLS typedef struct _GtkExpression GtkExpression; +typedef struct _GtkExpressionWatch GtkExpressionWatch; + +/** + * GtkExpressionNotify: + * @user_data: data passed to gtk_expression_watch() + * + * Callback called by gtk_expression_watch() when the + * expression value changes. + */ +typedef void (* GtkExpressionNotify) (gpointer user_data); #define GTK_IS_EXPRESSION(expr) ((expr) != NULL) @@ -42,9 +52,27 @@ void gtk_expression_unref (GtkExpression GDK_AVAILABLE_IN_ALL GType gtk_expression_get_value_type (GtkExpression *self); GDK_AVAILABLE_IN_ALL +gboolean gtk_expression_is_static (GtkExpression *self); +GDK_AVAILABLE_IN_ALL gboolean gtk_expression_evaluate (GtkExpression *self, gpointer this_, GValue *value); +GDK_AVAILABLE_IN_ALL +GtkExpressionWatch * gtk_expression_watch (GtkExpression *self, + gpointer this_, + GtkExpressionNotify notify, + gpointer user_data, + GDestroyNotify user_destroy); + +GDK_AVAILABLE_IN_ALL +GtkExpressionWatch * gtk_expression_watch_ref (GtkExpressionWatch *watch); +GDK_AVAILABLE_IN_ALL +void gtk_expression_watch_unref (GtkExpressionWatch *watch); +GDK_AVAILABLE_IN_ALL +gboolean gtk_expression_watch_evaluate (GtkExpressionWatch *watch, + GValue *value); +GDK_AVAILABLE_IN_ALL +void gtk_expression_watch_unwatch (GtkExpressionWatch *watch); GDK_AVAILABLE_IN_ALL GtkExpression * gtk_property_expression_new (GType this_type, |