File: eggtreemodelunion.h

package info (click to toggle)
screem 0.12.1-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 19,728 kB
  • ctags: 8,333
  • sloc: ansic: 98,234; sh: 8,278; xml: 2,278; makefile: 1,054
file content (94 lines) | stat: -rw-r--r-- 3,981 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/**
 * eggtreemodelunion.h: Union treemodel.
 *
 * Copyright (C) 2003, Kristian Rietveld.
 */

#ifndef __EGG_TREE_MODEL_UNION_H__
#define __EGG_TREE_MODEL_UNION_H__

#include <gtk/gtktreemodel.h>

G_BEGIN_DECLS

#define EGG_TYPE_TREE_MODEL_UNION              (egg_tree_model_union_get_type ())
#define EGG_TREE_MODEL_UNION(obj)              (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_TREE_MODEL_UNION, EggTreeModelUnion))
#define EGG_TREE_MODEL_UNION_CLASS(vtable)     (G_TYPE_CHECK_CLASS_CAST ((vtable), EGG_TYPE_TREE_MODEL_UNION, EggTreeModelUnionClass))
#define EGG_IS_TREE_MODEL_UNION(obj)           (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_TREE_MODEL_UNION))
#define EGG_IS_TREE_MODEL_UNION_CLASS(vtable)  (G_TYPE_CHECK_CLASS_TYPE ((vtable), EGG_TYPE_TREE_MODEL_UNION))
#define EGG_TREE_MODEL_UNION_GET_CLASS(inst)   (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TREE_MODEL_UNION, EggTreeModelUnionClass))

typedef struct _EggTreeModelUnion		EggTreeModelUnion;
typedef struct _EggTreeModelUnionClass		EggTreeModelUnionClass;

struct _EggTreeModelUnion
{
  GObject parent_instance;

  /*< private >*/
  GList *root;
  GHashTable *childs;

  GHashTable *child_paths;

  gint length;

  gint n_columns;
  GType *column_headers;

  gint stamp;
};

struct _EggTreeModelUnionClass
{
  GObjectClass parent_class;
};


GType         egg_tree_model_union_get_type             (void);
GtkTreeModel *egg_tree_model_union_new                  (gint               n_columns,
							 ...);
GtkTreeModel *egg_tree_model_union_newv                 (gint               n_columns,
		                                         GType             *types);
void          egg_tree_model_union_set_column_types     (EggTreeModelUnion *umodel,
		                                         gint               n_types,
							 GType             *types);

void          egg_tree_model_union_append               (EggTreeModelUnion *umodel,
                                                         GtkTreeModel      *model);
void          egg_tree_model_union_prepend              (EggTreeModelUnion *umodel,
                                                         GtkTreeModel      *model);
void          egg_tree_model_union_insert               (EggTreeModelUnion *umodel,
                                                         GtkTreeModel      *model,
				                         gint              position);

void          egg_tree_model_union_append_with_mapping  (EggTreeModelUnion *umodel,
                                                         GtkTreeModel      *model,
					                 ...);
void          egg_tree_model_union_prepend_with_mapping (EggTreeModelUnion *umodel,
                                                         GtkTreeModel      *model,
					                 ...);
void          egg_tree_model_union_insert_with_mapping  (EggTreeModelUnion *umodel,
                                                         GtkTreeModel      *model,
					                 gint               position,
					                 ...);
void          egg_tree_model_union_insert_with_mappingv (EggTreeModelUnion *umodel,
		                                        GtkTreeModel       *model,
							gint                position,
							gint               *column_mappings);

void          egg_tree_model_union_set_child            (EggTreeModelUnion *umodel,
                                                         GtkTreeModel      *model,
                                                         GtkTreeIter       *iter);

void          egg_tree_model_union_clear                (EggTreeModelUnion *umodel);
void          egg_tree_model_union_remove               (EggTreeModelUnion *umodel,
                                                         GtkTreeModel      *model);

gboolean      egg_tree_model_union_contains             (EggTreeModelUnion *umodel,
		                                         GtkTreeModel      *model);


G_END_DECLS

#endif /* __EGG_TREE_MODEL_UNION_H__ */