gvaluearray.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /* GObject - GLib Type, Object, Parameter and Signal Library
  2. * Copyright (C) 2001 Red Hat, Inc.
  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 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
  15. * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
  16. *
  17. * gvaluearray.h: GLib array type holding GValues
  18. */
  19. #ifndef __G_VALUE_ARRAY_H__
  20. #define __G_VALUE_ARRAY_H__
  21. #if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
  22. #error "Only <glib-object.h> can be included directly."
  23. #endif
  24. #include <gobject/gvalue.h>
  25. G_BEGIN_DECLS
  26. /**
  27. * G_TYPE_VALUE_ARRAY:
  28. *
  29. * The type ID of the "GValueArray" type which is a boxed type,
  30. * used to pass around pointers to GValueArrays.
  31. *
  32. * Deprecated: 2.32: Use #GArray instead of #GValueArray
  33. */
  34. #define G_TYPE_VALUE_ARRAY (g_value_array_get_type ())
  35. /* --- typedefs & structs --- */
  36. typedef struct _GValueArray GValueArray;
  37. /**
  38. * GValueArray:
  39. * @n_values: number of values contained in the array
  40. * @values: array of values
  41. *
  42. * A #GValueArray contains an array of #GValue elements.
  43. */
  44. struct _GValueArray
  45. {
  46. guint n_values;
  47. GValue *values;
  48. /*< private >*/
  49. guint n_prealloced;
  50. };
  51. /* --- prototypes --- */
  52. GLIB_DEPRECATED_IN_2_32_FOR(GArray)
  53. GType g_value_array_get_type (void) G_GNUC_CONST;
  54. GLIB_DEPRECATED_IN_2_32_FOR(GArray)
  55. GValue* g_value_array_get_nth (GValueArray *value_array,
  56. guint index_);
  57. GLIB_DEPRECATED_IN_2_32_FOR(GArray)
  58. GValueArray* g_value_array_new (guint n_prealloced);
  59. GLIB_DEPRECATED_IN_2_32_FOR(GArray)
  60. void g_value_array_free (GValueArray *value_array);
  61. GLIB_DEPRECATED_IN_2_32_FOR(GArray)
  62. GValueArray* g_value_array_copy (const GValueArray *value_array);
  63. GLIB_DEPRECATED_IN_2_32_FOR(GArray)
  64. GValueArray* g_value_array_prepend (GValueArray *value_array,
  65. const GValue *value);
  66. GLIB_DEPRECATED_IN_2_32_FOR(GArray)
  67. GValueArray* g_value_array_append (GValueArray *value_array,
  68. const GValue *value);
  69. GLIB_DEPRECATED_IN_2_32_FOR(GArray)
  70. GValueArray* g_value_array_insert (GValueArray *value_array,
  71. guint index_,
  72. const GValue *value);
  73. GLIB_DEPRECATED_IN_2_32_FOR(GArray)
  74. GValueArray* g_value_array_remove (GValueArray *value_array,
  75. guint index_);
  76. GLIB_DEPRECATED_IN_2_32_FOR(GArray)
  77. GValueArray* g_value_array_sort (GValueArray *value_array,
  78. GCompareFunc compare_func);
  79. GLIB_DEPRECATED_IN_2_32_FOR(GArray)
  80. GValueArray* g_value_array_sort_with_data (GValueArray *value_array,
  81. GCompareDataFunc compare_func,
  82. gpointer user_data);
  83. G_END_DECLS
  84. #endif /* __G_VALUE_ARRAY_H__ */