"Fix" some GCC -Wparentheses warnings
[geany-mirror.git] / src / project.h
blobce74317f2cbb5fb896e7d799523a460e6a86f305
1 /*
2 * project.h - this file is part of Geany, a fast and lightweight IDE
4 * Copyright 2007 The Geany contributors
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.
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.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 #ifndef GEANY_PROJECT_H
23 #define GEANY_PROJECT_H 1
25 #include <glib.h>
26 #include <glib-object.h>
28 G_BEGIN_DECLS
30 #define GEANY_PROJECT_EXT "geany"
33 /** Structure for representing a project. */
34 typedef struct GeanyProject
36 gchar *name; /**< The name of the project. */
37 gchar *description; /**< Short description of the project. */
38 gchar *file_name; /**< Where the project file is stored (in UTF-8). */
39 gchar *base_path; /**< Base path of the project directory (in UTF-8, maybe relative). */
40 /** Identifier whether it is a pure Geany project or modified/extended
41 * by a plugin. */
42 gint type;
43 GStrv file_patterns; /**< Array of filename extension patterns. */
45 struct GeanyProjectPrivate *priv; /* must be last, append fields before this item */
47 GeanyProject;
50 void project_write_config(void);
53 #ifdef GEANY_PRIVATE
55 typedef struct ProjectPrefs
57 gchar *session_file;
58 gboolean project_file_in_basedir;
59 } ProjectPrefs;
61 extern ProjectPrefs project_prefs;
64 void project_init(void);
66 void project_finalize(void);
69 void project_new(gboolean from_folder);
71 void project_open(void);
73 gboolean project_close(gboolean open_default);
75 void project_properties(void);
77 void project_build_properties(void);
79 gboolean project_ask_close(void);
82 gboolean project_load_file(const gchar *locale_file_name);
84 gboolean project_load_file_with_session(const gchar *locale_file_name);
86 gchar *project_get_base_path(void);
89 const struct GeanyFilePrefs *project_get_file_prefs(void);
91 void project_save_prefs(GKeyFile *config);
93 void project_load_prefs(GKeyFile *config);
95 void project_setup_prefs(void);
97 void project_apply_prefs(void);
99 #endif /* GEANY_PRIVATE */
101 G_END_DECLS
103 #endif /* GEANY_PROJECT_H */