Updated Spanish translation
[evolution.git] / e-util / e-sorter.h
blob5778d313c483a375a27c00e0bce48c7fd7e08a96
1 /*
2 * e-sorter.h
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 * for more details.
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program; if not, see <http://www.gnu.org/licenses/>.
18 #if !defined (__E_UTIL_H_INSIDE__) && !defined (LIBEUTIL_COMPILATION)
19 #error "Only <e-util/e-util.h> should be included directly."
20 #endif
22 #ifndef E_SORTER_H
23 #define E_SORTER_H
25 #include <glib-object.h>
27 /* Standard GObject macros */
28 #define E_TYPE_SORTER \
29 (e_sorter_get_type ())
30 #define E_SORTER(obj) \
31 (G_TYPE_CHECK_INSTANCE_CAST \
32 ((obj), E_TYPE_SORTER, ESorter))
33 #define E_IS_SORTER(obj) \
34 (G_TYPE_CHECK_INSTANCE_TYPE \
35 ((obj), E_TYPE_SORTER))
36 #define E_SORTER_GET_INTERFACE(obj) \
37 (G_TYPE_INSTANCE_GET_INTERFACE \
38 ((obj), E_TYPE_SORTER, ESorterInterface))
40 G_BEGIN_DECLS
42 typedef struct _ESorter ESorter;
43 typedef struct _ESorterInterface ESorterInterface;
45 struct _ESorterInterface {
46 GTypeInterface parent_interface;
48 gint (*model_to_sorted) (ESorter *sorter,
49 gint row);
50 gint (*sorted_to_model) (ESorter *sorter,
51 gint row);
53 void (*get_model_to_sorted_array)
54 (ESorter *sorter,
55 gint **array,
56 gint *count);
57 void (*get_sorted_to_model_array)
58 (ESorter *sorter,
59 gint **array,
60 gint *count);
62 gboolean (*needs_sorting) (ESorter *sorter);
65 GType e_sorter_get_type (void) G_GNUC_CONST;
66 gint e_sorter_model_to_sorted (ESorter *sorter,
67 gint row);
68 gint e_sorter_sorted_to_model (ESorter *sorter,
69 gint row);
70 void e_sorter_get_model_to_sorted_array
71 (ESorter *sorter,
72 gint **array,
73 gint *count);
74 void e_sorter_get_sorted_to_model_array
75 (ESorter *sorter,
76 gint **array,
77 gint *count);
78 gboolean e_sorter_needs_sorting (ESorter *sorter);
80 G_END_DECLS
82 #endif /* E_SORTER_H */