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
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."
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))
42 typedef struct _ESorter ESorter
;
43 typedef struct _ESorterInterface ESorterInterface
;
45 struct _ESorterInterface
{
46 GTypeInterface parent_interface
;
48 gint (*model_to_sorted
) (ESorter
*sorter
,
50 gint (*sorted_to_model
) (ESorter
*sorter
,
53 void (*get_model_to_sorted_array
)
57 void (*get_sorted_to_model_array
)
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
,
68 gint
e_sorter_sorted_to_model (ESorter
*sorter
,
70 void e_sorter_get_model_to_sorted_array
74 void e_sorter_get_sorted_to_model_array
78 gboolean
e_sorter_needs_sorting (ESorter
*sorter
);
82 #endif /* E_SORTER_H */