2 * project.h - this file is part of Geany, a fast and lightweight IDE
4 * Copyright 2007-2012 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
5 * Copyright 2007-2012 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #ifndef GEANY_PROJECT_H
24 #define GEANY_PROJECT_H 1
27 #include <glib-object.h>
31 #define GEANY_PROJECT_EXT "geany"
34 /** Structure for representing a project. */
35 typedef struct GeanyProject
37 gchar
*name
; /**< The name of the project. */
38 gchar
*description
; /**< Short description of the project. */
39 gchar
*file_name
; /**< Where the project file is stored (in UTF-8). */
40 gchar
*base_path
; /**< Base path of the project directory (in UTF-8, maybe relative). */
41 /** Identifier whether it is a pure Geany project or modified/extended
44 GStrv file_patterns
; /**< Array of filename extension patterns. */
46 struct GeanyProjectPrivate
*priv
; /* must be last, append fields before this item */
51 void project_write_config(void);
56 typedef struct ProjectPrefs
59 gboolean project_session
;
60 gboolean project_file_in_basedir
;
63 extern ProjectPrefs project_prefs
;
66 void project_init(void);
68 void project_finalize(void);
71 void project_new(void);
73 void project_open(void);
75 gboolean
project_close(gboolean open_default
);
77 void project_properties(void);
79 void project_build_properties(void);
81 gboolean
project_ask_close(void);
84 gboolean
project_load_file(const gchar
*locale_file_name
);
86 gboolean
project_load_file_with_session(const gchar
*locale_file_name
);
88 gchar
*project_get_base_path(void);
91 const struct GeanyFilePrefs
*project_get_file_prefs(void);
93 void project_save_prefs(GKeyFile
*config
);
95 void project_load_prefs(GKeyFile
*config
);
97 void project_setup_prefs(void);
99 void project_apply_prefs(void);
101 #endif /* GEANY_PRIVATE */
105 #endif /* GEANY_PROJECT_H */