Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

160 righe
6.2 KiB

  1. /* gtktreestore.h
  2. * Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com>
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Library 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. * Library General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Library General Public
  15. * License along with this library; if not, write to the
  16. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  17. * Boston, MA 02111-1307, USA.
  18. */
  19. #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
  20. #error "Only <gtk/gtk.h> can be included directly."
  21. #endif
  22. #ifndef __GTK_TREE_STORE_H__
  23. #define __GTK_TREE_STORE_H__
  24. #include <gdkconfig.h>
  25. #include <gtk/gtktreemodel.h>
  26. #include <gtk/gtktreesortable.h>
  27. #include <stdarg.h>
  28. G_BEGIN_DECLS
  29. #define GTK_TYPE_TREE_STORE (gtk_tree_store_get_type ())
  30. #define GTK_TREE_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TREE_STORE, GtkTreeStore))
  31. #define GTK_TREE_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE_STORE, GtkTreeStoreClass))
  32. #define GTK_IS_TREE_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TREE_STORE))
  33. #define GTK_IS_TREE_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TREE_STORE))
  34. #define GTK_TREE_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TREE_STORE, GtkTreeStoreClass))
  35. typedef struct _GtkTreeStore GtkTreeStore;
  36. typedef struct _GtkTreeStoreClass GtkTreeStoreClass;
  37. struct _GtkTreeStore
  38. {
  39. GObject parent;
  40. gint GSEAL (stamp);
  41. gpointer GSEAL (root);
  42. gpointer GSEAL (last);
  43. gint GSEAL (n_columns);
  44. gint GSEAL (sort_column_id);
  45. GList *GSEAL (sort_list);
  46. GtkSortType GSEAL (order);
  47. GType *GSEAL (column_headers);
  48. GtkTreeIterCompareFunc GSEAL (default_sort_func);
  49. gpointer GSEAL (default_sort_data);
  50. GDestroyNotify GSEAL (default_sort_destroy);
  51. guint GSEAL (columns_dirty) : 1;
  52. };
  53. struct _GtkTreeStoreClass
  54. {
  55. GObjectClass parent_class;
  56. /* Padding for future expansion */
  57. void (*_gtk_reserved1) (void);
  58. void (*_gtk_reserved2) (void);
  59. void (*_gtk_reserved3) (void);
  60. void (*_gtk_reserved4) (void);
  61. };
  62. GType gtk_tree_store_get_type (void) G_GNUC_CONST;
  63. GtkTreeStore *gtk_tree_store_new (gint n_columns,
  64. ...);
  65. GtkTreeStore *gtk_tree_store_newv (gint n_columns,
  66. GType *types);
  67. void gtk_tree_store_set_column_types (GtkTreeStore *tree_store,
  68. gint n_columns,
  69. GType *types);
  70. /* NOTE: use gtk_tree_model_get to get values from a GtkTreeStore */
  71. void gtk_tree_store_set_value (GtkTreeStore *tree_store,
  72. GtkTreeIter *iter,
  73. gint column,
  74. GValue *value);
  75. void gtk_tree_store_set (GtkTreeStore *tree_store,
  76. GtkTreeIter *iter,
  77. ...);
  78. void gtk_tree_store_set_valuesv (GtkTreeStore *tree_store,
  79. GtkTreeIter *iter,
  80. gint *columns,
  81. GValue *values,
  82. gint n_values);
  83. void gtk_tree_store_set_valist (GtkTreeStore *tree_store,
  84. GtkTreeIter *iter,
  85. va_list var_args);
  86. gboolean gtk_tree_store_remove (GtkTreeStore *tree_store,
  87. GtkTreeIter *iter);
  88. void gtk_tree_store_insert (GtkTreeStore *tree_store,
  89. GtkTreeIter *iter,
  90. GtkTreeIter *parent,
  91. gint position);
  92. void gtk_tree_store_insert_before (GtkTreeStore *tree_store,
  93. GtkTreeIter *iter,
  94. GtkTreeIter *parent,
  95. GtkTreeIter *sibling);
  96. void gtk_tree_store_insert_after (GtkTreeStore *tree_store,
  97. GtkTreeIter *iter,
  98. GtkTreeIter *parent,
  99. GtkTreeIter *sibling);
  100. void gtk_tree_store_insert_with_values (GtkTreeStore *tree_store,
  101. GtkTreeIter *iter,
  102. GtkTreeIter *parent,
  103. gint position,
  104. ...);
  105. void gtk_tree_store_insert_with_valuesv (GtkTreeStore *tree_store,
  106. GtkTreeIter *iter,
  107. GtkTreeIter *parent,
  108. gint position,
  109. gint *columns,
  110. GValue *values,
  111. gint n_values);
  112. void gtk_tree_store_prepend (GtkTreeStore *tree_store,
  113. GtkTreeIter *iter,
  114. GtkTreeIter *parent);
  115. void gtk_tree_store_append (GtkTreeStore *tree_store,
  116. GtkTreeIter *iter,
  117. GtkTreeIter *parent);
  118. gboolean gtk_tree_store_is_ancestor (GtkTreeStore *tree_store,
  119. GtkTreeIter *iter,
  120. GtkTreeIter *descendant);
  121. gint gtk_tree_store_iter_depth (GtkTreeStore *tree_store,
  122. GtkTreeIter *iter);
  123. void gtk_tree_store_clear (GtkTreeStore *tree_store);
  124. gboolean gtk_tree_store_iter_is_valid (GtkTreeStore *tree_store,
  125. GtkTreeIter *iter);
  126. void gtk_tree_store_reorder (GtkTreeStore *tree_store,
  127. GtkTreeIter *parent,
  128. gint *new_order);
  129. void gtk_tree_store_swap (GtkTreeStore *tree_store,
  130. GtkTreeIter *a,
  131. GtkTreeIter *b);
  132. void gtk_tree_store_move_before (GtkTreeStore *tree_store,
  133. GtkTreeIter *iter,
  134. GtkTreeIter *position);
  135. void gtk_tree_store_move_after (GtkTreeStore *tree_store,
  136. GtkTreeIter *iter,
  137. GtkTreeIter *position);
  138. G_END_DECLS
  139. #endif /* __GTK_TREE_STORE_H__ */