summaryrefslogtreecommitdiff
path: root/font-viewer/font-model.h
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2017-01-08 16:46:23 +0100
committerraveit65 <[email protected]>2017-02-17 12:28:22 +0100
commit51220e425ac45e81db7f76f3148b804898e54d1d (patch)
tree97d351ce99ccbe052e99ab9e226ded41bd89b99e /font-viewer/font-model.h
parent32675c4626963abe0515a8c5e1d35e8eba750846 (diff)
downloadmate-control-center-51220e425ac45e81db7f76f3148b804898e54d1d.tar.bz2
mate-control-center-51220e425ac45e81db7f76f3148b804898e54d1d.tar.xz
Font-viewer: add FontViewModel
taken from: https://git.gnome.org/browse/gnome-font-viewer/commit/?id=184661h
Diffstat (limited to 'font-viewer/font-model.h')
-rw-r--r--font-viewer/font-model.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/font-viewer/font-model.h b/font-viewer/font-model.h
new file mode 100644
index 00000000..869e54d3
--- /dev/null
+++ b/font-viewer/font-model.h
@@ -0,0 +1,67 @@
+/* -*- mode: C; c-basic-offset: 4 -*-
+ * mate-font-viewer
+ *
+ * Copyright (C) 2012 Cosimo Cecchi <[email protected]>
+ *
+ * based on font-method.c code from
+ *
+ * fontilus - a collection of font utilities for MATE
+ * Copyright (C) 2002-2003 James Henstridge <[email protected]>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+#ifndef __FONT_VIEW_MODEL_H__
+#define __FONT_VIEW_MODEL_H__
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+typedef enum {
+ COLUMN_NAME,
+ COLUMN_POINTER,
+ COLUMN_PATH,
+ COLUMN_ICON,
+ NUM_COLUMNS
+} FontViewModelColumns;
+
+typedef struct _FontViewModelPrivate FontViewModelPrivate;
+
+#define FONT_VIEW_TYPE_MODEL font_view_model_get_type()
+#define FONT_VIEW_MODEL(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_VIEW_TYPE_MODEL, FontViewModel))
+
+typedef struct {
+ GtkListStore parent;
+
+ FontViewModelPrivate *priv;
+} FontViewModel;
+
+typedef struct {
+ GtkListStoreClass parent_class;
+} FontViewModelClass;
+
+GType font_view_model_get_type (void);
+GtkTreeModel * font_view_model_new (void);
+
+gboolean font_view_model_get_iter_for_file (FontViewModel *self,
+ const gchar *file,
+ GtkTreeIter *iter);
+
+G_END_DECLS
+
+#endif /* __FONT_VIEW_MODEL_H__ */
+