gvaluearray.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /* GObject - GLib Type, Object, Parameter and Signal Library
  2. * Copyright (C) 2001 Red Hat, Inc.
  3. *
  4. * SPDX-License-Identifier: LGPL-2.1-or-later
  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. * gvaluearray.h: GLib array type holding GValues
  20. */
  21. #ifndef __G_VALUE_ARRAY_H__
  22. #define __G_VALUE_ARRAY_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 <gobject/gvalue.h>
  27. G_BEGIN_DECLS
  28. /**
  29. * G_TYPE_VALUE_ARRAY:
  30. *
  31. * The type ID of the "GValueArray" type which is a boxed type,
  32. * used to pass around pointers to GValueArrays.
  33. *
  34. * Deprecated: 2.32: Use #GArray instead of #GValueArray
  35. */
  36. #define G_TYPE_VALUE_ARRAY (g_value_array_get_type ()) GOBJECT_DEPRECATED_MACRO_IN_2_32_FOR(G_TYPE_ARRAY)
  37. /* --- typedefs & structs --- */
  38. typedef struct _GValueArray GValueArray;
  39. struct _GValueArray
  40. {
  41. guint n_values;
  42. GValue *values;
  43. /*< private >*/
  44. guint n_prealloced;
  45. };
  46. /* --- prototypes --- */
  47. GOBJECT_DEPRECATED_IN_2_32_FOR(GArray)
  48. GType g_value_array_get_type (void) G_GNUC_CONST;
  49. GOBJECT_DEPRECATED_IN_2_32_FOR(GArray)
  50. GValue* g_value_array_get_nth (GValueArray *value_array,
  51. guint index_);
  52. GOBJECT_DEPRECATED_IN_2_32_FOR(GArray)
  53. GValueArray* g_value_array_new (guint n_prealloced);
  54. GOBJECT_DEPRECATED_IN_2_32_FOR(GArray)
  55. void g_value_array_free (GValueArray *value_array);
  56. GOBJECT_DEPRECATED_IN_2_32_FOR(GArray)
  57. GValueArray* g_value_array_copy (const GValueArray *value_array);
  58. GOBJECT_DEPRECATED_IN_2_32_FOR(GArray)
  59. GValueArray* g_value_array_prepend (GValueArray *value_array,
  60. const GValue *value);
  61. GOBJECT_DEPRECATED_IN_2_32_FOR(GArray)
  62. GValueArray* g_value_array_append (GValueArray *value_array,
  63. const GValue *value);
  64. GOBJECT_DEPRECATED_IN_2_32_FOR(GArray)
  65. GValueArray* g_value_array_insert (GValueArray *value_array,
  66. guint index_,
  67. const GValue *value);
  68. GOBJECT_DEPRECATED_IN_2_32_FOR(GArray)
  69. GValueArray* g_value_array_remove (GValueArray *value_array,
  70. guint index_);
  71. GOBJECT_DEPRECATED_IN_2_32_FOR(GArray)
  72. GValueArray* g_value_array_sort (GValueArray *value_array,
  73. GCompareFunc compare_func);
  74. GOBJECT_DEPRECATED_IN_2_32_FOR(GArray)
  75. GValueArray* g_value_array_sort_with_data (GValueArray *value_array,
  76. GCompareDataFunc compare_func,
  77. gpointer user_data);
  78. G_END_DECLS
  79. #endif /* __G_VALUE_ARRAY_H__ */