5 * ROX-Filer, filer for the ROX desktop project
6 * By Thomas Leonard, <tal197@users.sourceforge.net>.
9 #ifndef __VIEW_IFACE_H__
10 #define __VIEW_IFACE_H__
12 #include <glib-object.h>
14 typedef struct _ViewIface ViewIface
;
15 typedef struct _ViewIfaceClass ViewIfaceClass
;
16 struct _ViewIfaceClass
18 GTypeInterface base_iface
;
20 void (*sort
)(ViewIface
*obj
);
21 void (*style_changed
)(ViewIface
*obj
, int flags
);
22 gboolean (*autoselect
)(ViewIface
*obj
, const gchar
*leaf
);
23 void (*add_items
)(ViewIface
*obj
, GPtrArray
*items
);
24 void (*update_items
)(ViewIface
*obj
, GPtrArray
*items
);
25 void (*delete_if
)(ViewIface
*obj
,
26 gboolean (*test
)(gpointer item
, gpointer data
),
28 void (*clear
)(ViewIface
*obj
);
31 #define VIEW_TYPE_IFACE (view_iface_get_type())
33 #define VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
34 VIEW_TYPE_IFACE, ViewIface))
36 #define VIEW_IS_IFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
39 #define VIEW_IFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), \
40 VIEW_TYPE_IFACE, ViewIfaceClass))
42 /* Flags for view_style_changed() */
44 VIEW_UPDATE_VIEWDATA
= 1 << 0,
45 VIEW_UPDATE_NAME
= 1 << 1,
48 GType
view_iface_get_type(void);
49 void view_sort(ViewIface
*obj
);
50 void view_style_changed(ViewIface
*obj
, int flags
);
51 gboolean
view_autoselect(ViewIface
*obj
, const gchar
*leaf
);
52 void view_add_items(ViewIface
*obj
, GPtrArray
*items
);
53 void view_update_items(ViewIface
*obj
, GPtrArray
*items
);
54 void view_delete_if(ViewIface
*obj
,
55 gboolean (*test
)(gpointer item
, gpointer data
),
57 void view_clear(ViewIface
*obj
);
59 #endif /* __VIEW_IFACE_H__ */