| 1 |
#ifndef TNY_GTK_HEADER_LIST_ITERATOR_H |
|---|
| 2 |
#define TNY_GTK_HEADER_LIST_ITERATOR_H |
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
#include <glib.h> |
|---|
| 24 |
#include <glib-object.h> |
|---|
| 25 |
|
|---|
| 26 |
#include <tny-shared.h> |
|---|
| 27 |
#include <tny-list.h> |
|---|
| 28 |
#include <tny-iterator.h> |
|---|
| 29 |
|
|---|
| 30 |
G_BEGIN_DECLS |
|---|
| 31 |
|
|---|
| 32 |
#define TNY_TYPE_GTK_HEADER_LIST_ITERATOR (_tny_gtk_header_list_iterator_get_type ()) |
|---|
| 33 |
#define TNY_GTK_HEADER_LIST_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TNY_TYPE_GTK_HEADER_LIST_ITERATOR, TnyGtkHeaderListIterator)) |
|---|
| 34 |
#define TNY_GTK_HEADER_LIST_ITERATOR_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), TNY_TYPE_GTK_HEADER_LIST_ITERATOR, TnyGtkHeaderListIteratorClass)) |
|---|
| 35 |
#define TNY_IS_GTK_HEADER_LIST_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TNY_TYPE_GTK_HEADER_LIST_ITERATOR)) |
|---|
| 36 |
#define TNY_IS_GTK_HEADER_LIST_ITERATOR_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), TNY_TYPE_GTK_HEADER_LIST_ITERATOR)) |
|---|
| 37 |
#define TNY_GTK_HEADER_LIST_ITERATOR_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), TNY_TYPE_GTK_HEADER_LIST_ITERATOR, TnyGtkHeaderListIteratorClass)) |
|---|
| 38 |
|
|---|
| 39 |
typedef struct _TnyGtkHeaderListIterator TnyGtkHeaderListIterator; |
|---|
| 40 |
typedef struct _TnyGtkHeaderListIteratorClass TnyGtkHeaderListIteratorClass; |
|---|
| 41 |
|
|---|
| 42 |
struct _TnyGtkHeaderListIterator |
|---|
| 43 |
{ |
|---|
| 44 |
GObject parent; |
|---|
| 45 |
TnyGtkHeaderListModel *model; |
|---|
| 46 |
guint current; |
|---|
| 47 |
}; |
|---|
| 48 |
|
|---|
| 49 |
struct _TnyGtkHeaderListIteratorClass |
|---|
| 50 |
{ |
|---|
| 51 |
GObjectClass parent; |
|---|
| 52 |
}; |
|---|
| 53 |
|
|---|
| 54 |
TnyIterator* _tny_gtk_header_list_iterator_new (TnyGtkHeaderListModel *model); |
|---|
| 55 |
|
|---|
| 56 |
gboolean _tny_gtk_header_list_iterator_is_done_nl (TnyGtkHeaderListIterator *self); |
|---|
| 57 |
gpointer _tny_gtk_header_list_iterator_get_current_nl (TnyGtkHeaderListIterator *me); |
|---|
| 58 |
void _tny_gtk_header_list_iterator_nth_nl (TnyGtkHeaderListIterator *me, guint nth); |
|---|
| 59 |
void _tny_gtk_header_list_iterator_first_nl (TnyGtkHeaderListIterator *me); |
|---|
| 60 |
void _tny_gtk_header_list_iterator_prev_nl (TnyGtkHeaderListIterator *me); |
|---|
| 61 |
void _tny_gtk_header_list_iterator_next_nl (TnyGtkHeaderListIterator *me); |
|---|
| 62 |
|
|---|
| 63 |
|
|---|
| 64 |
|
|---|
| 65 |
#define TNY_GTK_HEADER_LIST_MODEL_GET_PRIVATE(o) (TnyGtkHeaderListModelPriv*)(((TnyGtkHeaderListModel*)(o))->priv) |
|---|
| 66 |
|
|---|
| 67 |
typedef struct _TnyGtkHeaderListModelPriv TnyGtkHeaderListModelPriv; |
|---|
| 68 |
|
|---|
| 69 |
struct _TnyGtkHeaderListModelPriv |
|---|
| 70 |
{ |
|---|
| 71 |
GStaticRecMutex *iterator_lock; |
|---|
| 72 |
TnyFolder *folder; |
|---|
| 73 |
gint stamp, registered; |
|---|
| 74 |
gint updating_views; |
|---|
| 75 |
GMutex *ra_lock, *to_lock; |
|---|
| 76 |
gint cur_len; |
|---|
| 77 |
guint add_timeout; |
|---|
| 78 |
|
|---|
| 79 |
guint timeout_span; |
|---|
| 80 |
GPtrArray *items; |
|---|
| 81 |
GArray *del_timeouts; |
|---|
| 82 |
TnyIterator *iterator; |
|---|
| 83 |
gboolean no_duplicates; |
|---|
| 84 |
}; |
|---|
| 85 |
|
|---|
| 86 |
G_END_DECLS |
|---|
| 87 |
|
|---|
| 88 |
#endif |
|---|
| 89 |
|
|---|