Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gtkexpression.h
Go to the documentation of this file.
1/*
2 * Copyright © 2019 Benjamin Otte
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Authors: Benjamin Otte <otte@gnome.org>
18 */
19
20
21#pragma once
22
23#include <gtk/gtktypes.h>
24
26
27#define GTK_TYPE_EXPRESSION (gtk_expression_get_type ())
28#define GTK_TYPE_EXPRESSION_WATCH (gtk_expression_watch_get_type())
29
30#define GTK_IS_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_EXPRESSION))
31#define GTK_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_EXPRESSION, GtkExpression))
32
33typedef struct _GtkExpression GtkExpression;
34typedef struct _GtkExpressionWatch GtkExpressionWatch;
35
36/**
37 * GtkExpressionNotify:
38 * @user_data: data passed to gtk_expression_watch()
39 *
40 * Callback called by gtk_expression_watch() when the
41 * expression value changes.
42 */
43typedef void (* GtkExpressionNotify) (gpointer user_data);
44
47
53
60 gpointer this_,
61 GValue *value);
64 gpointer this_,
66 gpointer user_data,
67 GDestroyNotify user_destroy);
70 gpointer target,
71 const char * property,
72 gpointer this_);
73
82 GValue *value);
85
86#define GTK_TYPE_PROPERTY_EXPRESSION (gtk_property_expression_get_type())
87typedef struct _GtkPropertyExpression GtkPropertyExpression;
88
91
94 GtkExpression *expression,
95 const char *property_name);
98 GParamSpec *pspec);
99
104
105#define GTK_TYPE_CONSTANT_EXPRESSION (gtk_constant_expression_get_type())
106typedef struct _GtkConstantExpression GtkConstantExpression;
107
110
113 ...);
116
119
120#define GTK_TYPE_OBJECT_EXPRESSION (gtk_object_expression_get_type())
121typedef struct _GtkObjectExpression GtkObjectExpression;
122
125
128
131
132#define GTK_TYPE_CLOSURE_EXPRESSION (gtk_closure_expression_get_type())
133typedef struct _GtkClosureExpression GtkClosureExpression;
134
137
140 GClosure *closure,
141 guint n_params,
142 GtkExpression **params);
143
144#define GTK_TYPE_CCLOSURE_EXPRESSION (gtk_cclosure_expression_get_type())
145typedef struct _GtkCClosureExpression GtkCClosureExpression;
146
149
152 GClosureMarshal marshal,
153 guint n_params,
154 GtkExpression **params,
155 GCallback callback_func,
156 gpointer user_data,
157 GClosureNotify user_destroy);
158
159/* GObject integration, so we can use GtkBuilder */
160
161/**
162 * GTK_VALUE_HOLDS_EXPRESSION:
163 * @value: a `GValue`
164 *
165 * Evaluates to %TRUE if @value was initialized with %GTK_TYPE_EXPRESSION.
166 */
167#define GTK_VALUE_HOLDS_EXPRESSION(value) (G_VALUE_HOLDS ((value), GTK_TYPE_EXPRESSION))
168
171 GtkExpression *expression);
174 GtkExpression *expression);
179
180#define GTK_TYPE_PARAM_SPEC_EXPRESSION (gtk_param_expression_get_type())
181#define GTK_PARAM_SPEC_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PARAM_SPEC_EXPRESSION, GtkParamSpecExpression))
182#define GTK_IS_PARAM_SPEC_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PARAM_SPEC_EXPRESSION))
183
184/**
185 * GtkParamSpecExpression:
186 *
187 * A `GParamSpec` for properties holding a `GtkExpression`.
188 */
189typedef struct {
190 /*< private >*/
193
198 const char *nick,
199 const char *blurb,
200 GParamFlags flags);
201
203
void(* GCallback)(void)
Definition gclosure.h:92
void(* GClosureNotify)(gpointer data, GClosure *closure)
Definition gclosure.h:101
void(* GClosureMarshal)(GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data)
Definition gclosure.h:121
#define GDK_AVAILABLE_IN_4_2
#define GDK_AVAILABLE_IN_ALL
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
#define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func)
Definition gmacros.h:1400
GParamFlags
Definition gparam.h:155
GDK_AVAILABLE_IN_ALL void gtk_value_take_expression(GValue *value, GtkExpression *expression)
GDK_AVAILABLE_IN_ALL void gtk_expression_unref(GtkExpression *self)
GDK_AVAILABLE_IN_ALL GtkExpression * gtk_constant_expression_new_for_value(const GValue *value)
GDK_AVAILABLE_IN_ALL GtkExpression * gtk_closure_expression_new(GType value_type, GClosure *closure, guint n_params, GtkExpression **params)
GDK_AVAILABLE_IN_ALL GType gtk_object_expression_get_type(void) G_GNUC_CONST
GDK_AVAILABLE_IN_ALL GType gtk_param_expression_get_type(void) G_GNUC_CONST
struct _GtkCClosureExpression GtkCClosureExpression
struct _GtkExpression GtkExpression
GDK_AVAILABLE_IN_ALL GtkExpression * gtk_object_expression_new(GObject *object)
GDK_AVAILABLE_IN_ALL GtkExpression * gtk_value_dup_expression(const GValue *value)
GDK_AVAILABLE_IN_ALL GObject * gtk_object_expression_get_object(GtkExpression *expression)
GDK_AVAILABLE_IN_ALL GtkExpression * gtk_property_expression_new(GType this_type, GtkExpression *expression, const char *property_name)
GDK_AVAILABLE_IN_ALL void gtk_value_set_expression(GValue *value, GtkExpression *expression)
GDK_AVAILABLE_IN_ALL GtkExpressionWatch * gtk_expression_watch_ref(GtkExpressionWatch *watch)
GDK_AVAILABLE_IN_ALL GtkExpression * gtk_constant_expression_new(GType value_type,...)
GDK_AVAILABLE_IN_ALL GType gtk_expression_get_type(void) G_GNUC_CONST
GDK_AVAILABLE_IN_ALL gboolean gtk_expression_watch_evaluate(GtkExpressionWatch *watch, GValue *value)
GDK_AVAILABLE_IN_ALL GtkExpressionWatch * gtk_expression_bind(GtkExpression *self, gpointer target, const char *property, gpointer this_)
GDK_AVAILABLE_IN_ALL GtkExpression * gtk_cclosure_expression_new(GType value_type, GClosureMarshal marshal, guint n_params, GtkExpression **params, GCallback callback_func, gpointer user_data, GClosureNotify user_destroy)
void(* GtkExpressionNotify)(gpointer user_data)
GDK_AVAILABLE_IN_4_2 GType gtk_expression_watch_get_type(void) G_GNUC_CONST
struct _GtkObjectExpression GtkObjectExpression
GDK_AVAILABLE_IN_ALL GType gtk_expression_get_value_type(GtkExpression *self)
struct _GtkClosureExpression GtkClosureExpression
GDK_AVAILABLE_IN_ALL GtkExpression * gtk_value_get_expression(const GValue *value)
GDK_AVAILABLE_IN_ALL GParamSpec * gtk_param_spec_expression(const char *name, const char *nick, const char *blurb, GParamFlags flags)
struct _GtkExpressionWatch GtkExpressionWatch
GDK_AVAILABLE_IN_ALL gboolean gtk_expression_is_static(GtkExpression *self)
GDK_AVAILABLE_IN_ALL GtkExpressionWatch * gtk_expression_watch(GtkExpression *self, gpointer this_, GtkExpressionNotify notify, gpointer user_data, GDestroyNotify user_destroy)
struct _GtkConstantExpression GtkConstantExpression
GDK_AVAILABLE_IN_ALL void gtk_expression_watch_unref(GtkExpressionWatch *watch)
GDK_AVAILABLE_IN_ALL gboolean gtk_expression_evaluate(GtkExpression *self, gpointer this_, GValue *value)
GDK_AVAILABLE_IN_ALL GType gtk_cclosure_expression_get_type(void) G_GNUC_CONST
GDK_AVAILABLE_IN_ALL void gtk_expression_watch_unwatch(GtkExpressionWatch *watch)
GDK_AVAILABLE_IN_ALL GParamSpec * gtk_property_expression_get_pspec(GtkExpression *expression)
GDK_AVAILABLE_IN_ALL const GValue * gtk_constant_expression_get_value(GtkExpression *expression)
struct _GtkPropertyExpression GtkPropertyExpression
GDK_AVAILABLE_IN_ALL GtkExpression * gtk_expression_ref(GtkExpression *self)
GDK_AVAILABLE_IN_ALL GtkExpression * gtk_property_expression_get_expression(GtkExpression *expression)
GDK_AVAILABLE_IN_ALL GType gtk_property_expression_get_type(void) G_GNUC_CONST
GDK_AVAILABLE_IN_ALL GtkExpression * gtk_property_expression_new_for_pspec(GtkExpression *expression, GParamSpec *pspec)
GDK_AVAILABLE_IN_ALL GType gtk_constant_expression_get_type(void) G_GNUC_CONST
GDK_AVAILABLE_IN_ALL GType gtk_closure_expression_get_type(void) G_GNUC_CONST
gsize GType
Definition gtype.h:427
gint gboolean
Definition gtypes.h:56
void * gpointer
Definition gtypes.h:109
void(* GDestroyNotify)(gpointer data)
Definition gtypes.h:140
unsigned int guint
Definition gtypes.h:61
const char * name
Definition lsqlite3.c:2154
int value
Definition lsqlite3.c:2155