gbindinggroup.h 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /* GObject - GLib Type, Object, Parameter and Signal Library
  2. *
  3. * Copyright (C) 2015-2022 Christian Hergert <christian@hergert.me>
  4. * Copyright (C) 2015 Garrett Regier <garrettregier@gmail.com>
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General
  17. * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
  18. *
  19. * SPDX-License-Identifier: LGPL-2.1-or-later
  20. */
  21. #ifndef __G_BINDING_GROUP_H__
  22. #define __G_BINDING_GROUP_H__
  23. #if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
  24. #error "Only <glib-object.h> can be included directly."
  25. #endif
  26. #include <glib.h>
  27. #include <gobject/gobject.h>
  28. #include <gobject/gbinding.h>
  29. G_BEGIN_DECLS
  30. #define G_BINDING_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_BINDING_GROUP, GBindingGroup))
  31. #define G_IS_BINDING_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_BINDING_GROUP))
  32. #define G_TYPE_BINDING_GROUP (g_binding_group_get_type())
  33. typedef struct _GBindingGroup GBindingGroup;
  34. GOBJECT_AVAILABLE_IN_2_72
  35. GType g_binding_group_get_type (void) G_GNUC_CONST;
  36. GOBJECT_AVAILABLE_IN_2_72
  37. GBindingGroup *g_binding_group_new (void);
  38. GOBJECT_AVAILABLE_IN_2_72
  39. gpointer g_binding_group_dup_source (GBindingGroup *self);
  40. GOBJECT_AVAILABLE_IN_2_72
  41. void g_binding_group_set_source (GBindingGroup *self,
  42. gpointer source);
  43. GOBJECT_AVAILABLE_IN_2_72
  44. void g_binding_group_bind (GBindingGroup *self,
  45. const gchar *source_property,
  46. gpointer target,
  47. const gchar *target_property,
  48. GBindingFlags flags);
  49. GOBJECT_AVAILABLE_IN_2_72
  50. void g_binding_group_bind_full (GBindingGroup *self,
  51. const gchar *source_property,
  52. gpointer target,
  53. const gchar *target_property,
  54. GBindingFlags flags,
  55. GBindingTransformFunc transform_to,
  56. GBindingTransformFunc transform_from,
  57. gpointer user_data,
  58. GDestroyNotify user_data_destroy);
  59. GOBJECT_AVAILABLE_IN_2_72
  60. void g_binding_group_bind_with_closures (GBindingGroup *self,
  61. const gchar *source_property,
  62. gpointer target,
  63. const gchar *target_property,
  64. GBindingFlags flags,
  65. GClosure *transform_to,
  66. GClosure *transform_from);
  67. G_END_DECLS
  68. #endif /* __G_BINDING_GROUP_H__ */