1 /* GLIB - Library of useful routines for C programming
2 * Copyright (C) 2002 Soeren Sandmann (sandmann@daimi.au.dk)
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.
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.
14 * You should have received a copy of the GNU Lesser 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.
22 #ifndef __GSEQUENCE_H__
23 #define __GSEQUENCE_H__
28 * Do not use this API. It is here, internal to gtk+, for 2.6 only.
29 * In 2.8 the plan is to add a similar data structure to GLib.
32 typedef struct _GtkSequence GtkSequence;
33 typedef struct _GtkSequenceNode *GtkSequencePtr;
36 GtkSequence * _gtk_sequence_new (GDestroyNotify data_destroy);
37 void _gtk_sequence_free (GtkSequence *seq);
38 void _gtk_sequence_sort (GtkSequence *seq,
39 GCompareDataFunc cmp_func,
41 void _gtk_sequence_append (GtkSequence *seq,
43 void _gtk_sequence_prepend (GtkSequence *seq,
45 GtkSequencePtr _gtk_sequence_insert (GtkSequencePtr ptr,
47 void _gtk_sequence_remove (GtkSequencePtr ptr);
48 void _gtk_sequence_move (GtkSequencePtr ptr,
50 void _gtk_sequence_swap (GtkSequencePtr a,
52 GtkSequencePtr _gtk_sequence_insert_sorted (GtkSequence *seq,
54 GCompareDataFunc cmp_func,
56 void _gtk_sequence_set (GtkSequencePtr ptr,
58 void _gtk_sequence_insert_sequence (GtkSequencePtr ptr,
59 GtkSequence *other_seq);
60 void _gtk_sequence_concatenate (GtkSequence *seq1,
62 void _gtk_sequence_remove_range (GtkSequencePtr begin,
64 GtkSequence **removed);
65 gint _gtk_sequence_get_length (GtkSequence *seq);
66 GtkSequencePtr _gtk_sequence_get_end_ptr (GtkSequence *seq);
67 GtkSequencePtr _gtk_sequence_get_begin_ptr (GtkSequence *seq);
68 GtkSequencePtr _gtk_sequence_get_ptr_at_pos (GtkSequence *seq,
70 void _gtk_sequence_sort_changed (GtkSequencePtr ptr,
71 GCompareDataFunc cmp_func,
73 void _gtk_sequence_foreach (GtkSequence *seq,
78 gboolean _gtk_sequence_ptr_is_end (GtkSequencePtr ptr);
79 gboolean _gtk_sequence_ptr_is_begin (GtkSequencePtr ptr);
80 gint _gtk_sequence_ptr_get_position (GtkSequencePtr ptr);
81 GtkSequencePtr _gtk_sequence_ptr_next (GtkSequencePtr ptr);
82 GtkSequencePtr _gtk_sequence_ptr_prev (GtkSequencePtr ptr);
83 GtkSequencePtr _gtk_sequence_ptr_move (GtkSequencePtr ptr,
85 gpointer _gtk_sequence_ptr_get_data (GtkSequencePtr ptr);
86 GtkSequence *_gtk_sequence_ptr_get_sequence (GtkSequencePtr ptr);
90 /* return TRUE if you want to be called again with two
93 typedef gboolean (* GtkSequenceSearchFunc) (GtkSequencePtr begin,
97 void _gtk_sequence_search (GtkSequence *seq,
98 GtkSequenceSearchFunc f,
102 gint _gtk_sequence_calc_tree_height (GtkSequence *seq);
104 #endif /* __GSEQUENCE_H__ */