File indexing completed on 2025-12-16 10:17:38
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #ifndef __G_BINDING_H__
0024 #define __G_BINDING_H__
0025
0026 #if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
0027 #error "Only <glib-object.h> can be included directly."
0028 #endif
0029
0030 #include <glib.h>
0031 #include <gobject/gobject.h>
0032
0033 G_BEGIN_DECLS
0034
0035 #define G_TYPE_BINDING_FLAGS (g_binding_flags_get_type ())
0036
0037 #define G_TYPE_BINDING (g_binding_get_type ())
0038 #define G_BINDING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_BINDING, GBinding))
0039 #define G_IS_BINDING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_BINDING))
0040
0041 typedef struct _GBinding GBinding;
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063 typedef gboolean (* GBindingTransformFunc) (GBinding *binding,
0064 const GValue *from_value,
0065 GValue *to_value,
0066 gpointer user_data);
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091 typedef enum {
0092 G_BINDING_DEFAULT = 0,
0093
0094 G_BINDING_BIDIRECTIONAL = 1 << 0,
0095 G_BINDING_SYNC_CREATE = 1 << 1,
0096 G_BINDING_INVERT_BOOLEAN = 1 << 2
0097 } GBindingFlags;
0098
0099 GOBJECT_AVAILABLE_IN_ALL
0100 GType g_binding_flags_get_type (void) G_GNUC_CONST;
0101 GOBJECT_AVAILABLE_IN_ALL
0102 GType g_binding_get_type (void) G_GNUC_CONST;
0103
0104 GOBJECT_AVAILABLE_IN_ALL
0105 GBindingFlags g_binding_get_flags (GBinding *binding);
0106 GOBJECT_DEPRECATED_IN_2_68_FOR(g_binding_dup_source)
0107 GObject * g_binding_get_source (GBinding *binding);
0108 GOBJECT_AVAILABLE_IN_2_68
0109 GObject * g_binding_dup_source (GBinding *binding);
0110 GOBJECT_DEPRECATED_IN_2_68_FOR(g_binding_dup_target)
0111 GObject * g_binding_get_target (GBinding *binding);
0112 GOBJECT_AVAILABLE_IN_2_68
0113 GObject * g_binding_dup_target (GBinding *binding);
0114 GOBJECT_AVAILABLE_IN_ALL
0115 const gchar * g_binding_get_source_property (GBinding *binding);
0116 GOBJECT_AVAILABLE_IN_ALL
0117 const gchar * g_binding_get_target_property (GBinding *binding);
0118 GOBJECT_AVAILABLE_IN_2_38
0119 void g_binding_unbind (GBinding *binding);
0120
0121 GOBJECT_AVAILABLE_IN_ALL
0122 GBinding *g_object_bind_property (gpointer source,
0123 const gchar *source_property,
0124 gpointer target,
0125 const gchar *target_property,
0126 GBindingFlags flags);
0127 GOBJECT_AVAILABLE_IN_ALL
0128 GBinding *g_object_bind_property_full (gpointer source,
0129 const gchar *source_property,
0130 gpointer target,
0131 const gchar *target_property,
0132 GBindingFlags flags,
0133 GBindingTransformFunc transform_to,
0134 GBindingTransformFunc transform_from,
0135 gpointer user_data,
0136 GDestroyNotify notify);
0137 GOBJECT_AVAILABLE_IN_ALL
0138 GBinding *g_object_bind_property_with_closures (gpointer source,
0139 const gchar *source_property,
0140 gpointer target,
0141 const gchar *target_property,
0142 GBindingFlags flags,
0143 GClosure *transform_to,
0144 GClosure *transform_from);
0145
0146 G_END_DECLS
0147
0148 #endif