1 /*
2  * overviewprefs.h - This file is part of the Geany Overview plugin
3  *
4  * Copyright (c) 2015 Matthew Brush <mbrush@codebrainz.ca>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19  * MA 02110-1301, USA.
20  *
21  */
22 
23 #ifndef OVERVIEWPREFS_H_
24 #define OVERVIEWPREFS_H_ 1
25 
26 #include <glib-object.h>
27 
28 G_BEGIN_DECLS
29 
30 #define OVERVIEW_TYPE_PREFS            (overview_prefs_get_type ())
31 #define OVERVIEW_PREFS(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), OVERVIEW_TYPE_PREFS, OverviewPrefs))
32 #define OVERVIEW_PREFS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), OVERVIEW_TYPE_PREFS, OverviewPrefsClass))
33 #define OVERVIEW_IS_PREFS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), OVERVIEW_TYPE_PREFS))
34 #define OVERVIEW_IS_PREFS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), OVERVIEW_TYPE_PREFS))
35 #define OVERVIEW_PREFS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), OVERVIEW_TYPE_PREFS, OverviewPrefsClass))
36 
37 typedef struct OverviewPrefs_      OverviewPrefs;
38 typedef struct OverviewPrefsClass_ OverviewPrefsClass;
39 
40 GType          overview_prefs_get_type       (void);
41 OverviewPrefs *overview_prefs_new            (void);
42 gboolean       overview_prefs_load           (OverviewPrefs *prefs,
43                                               const gchar   *filename,
44                                               GError       **error);
45 gboolean       overview_prefs_save           (OverviewPrefs *prefs,
46                                               const gchar   *filename,
47                                               GError       **error);
48 gboolean       overview_prefs_from_data      (OverviewPrefs *prefs,
49                                               const gchar   *contents,
50                                               gssize         size,
51                                               GError       **error);
52 gchar*         overview_prefs_to_data        (OverviewPrefs *prefs,
53                                               gsize         *size,
54                                               GError       **error);
55 void           overview_prefs_bind_scintilla (OverviewPrefs *prefs,
56                                               GObject       *sci);
57 
58 #define OVERVIEW_PREFS_DEFAULT_CONFIG   \
59     "[overview]\n"                      \
60     "width = 120\n"                     \
61     "zoom = -10\n"                      \
62     "show-tooltip = true\n"             \
63     "double-buffered = true\n"          \
64     "scroll-lines = 4\n"                \
65     "show-scrollbar = true\n"           \
66     "overlay-enabled = true\n"          \
67     "overlay-color = #000000\n"         \
68     "overlay-alpha = 0.10\n"            \
69     "overlay-outline-color = #000000\n" \
70     "overlay-outline-alpha = 0.10\n"    \
71     "overlay-inverted = true\n"         \
72     "position = right\n"                \
73     "visible = true\n"                  \
74     "\n"
75 
76 G_END_DECLS
77 
78 #endif /* OVERVIEWPREFS_H_ */
79