summaryrefslogtreecommitdiff
path: root/src/appfinder-category-model.h
blob: 78fd694624ac76cbaa8f09dbefba1079e687e3e5 (plain)
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
/*
 * Copyright (C) 2011 Nick Schermer <nick@xfce.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#ifndef __XFCE_APPFINDER_CATEGORY_MODEL_H__
#define __XFCE_APPFINDER_CATEGORY_MODEL_H__

#include <gtk/gtk.h>

G_BEGIN_DECLS

typedef struct _XfceAppfinderCategoryModelClass XfceAppfinderCategoryModelClass;
typedef struct _XfceAppfinderCategoryModel      XfceAppfinderCategoryModel;

#define XFCE_TYPE_APPFINDER_CATEGORY_MODEL            (xfce_appfinder_category_model_get_type ())
#define XFCE_APPFINDER_CATEGORY_MODEL(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_APPFINDER_CATEGORY_MODEL, XfceAppfinderCategoryModel))
#define XFCE_APPFINDER_CATEGORY_MODEL_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_APPFINDER_CATEGORY_MODEL, XfceAppfinderCategoryModelClass))
#define XFCE_IS_APPFINDER_CATEGORY_MODEL(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_APPFINDER_CATEGORY_MODEL))
#define XFCE_IS_APPFINDER_CATEGORY_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_APPFINDER_CATEGORY_MODEL))
#define XFCE_APPFINDER_CATEGORY_MODEL_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_APPFINDER_CATEGORY_MODEL, XfceAppfinderCategoryModelClass))



enum
{
  XFCE_APPFINDER_CATEGORY_MODEL_COLUMN_NAME,
  XFCE_APPFINDER_CATEGORY_MODEL_COLUMN_ICON,
  XFCE_APPFINDER_CATEGORY_MODEL_COLUMN_DIRECTORY,
  XFCE_APPFINDER_CATEGORY_MODEL_N_COLUMNS,
};



GType                       xfce_appfinder_category_model_get_type           (void) G_GNUC_CONST;

XfceAppfinderCategoryModel *xfce_appfinder_category_model_new                (void) G_GNUC_MALLOC;

void                        xfce_appfinder_category_model_set_categories     (XfceAppfinderCategoryModel *model,
                                                                              GSList                     *categories);

gboolean                    xfce_appfinder_category_model_row_separator_func (GtkTreeModel               *tree_model,
                                                                              GtkTreeIter                *iter,
                                                                              gpointer                    user_data);

void                        xfce_appfinder_category_model_icon_theme_changed (XfceAppfinderCategoryModel *model);

GtkTreePath                *xfce_appfinder_category_model_find_category      (XfceAppfinderCategoryModel *model,
                                                                              const gchar                *name);

G_END_DECLS

#endif /* !__XFCE_APPFINDER_CATEGORY_MODEL_H__ */