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
26 #include <glib-object.h>
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
43 GStrv file_patterns
; /**< Array of filename extension patterns. */
45 struct GeanyProjectPrivate
*priv
; /* must be last, append fields before this item */
50 void project_write_config(void);
55 typedef struct ProjectPrefs
58 gboolean project_session
;
59 gboolean project_file_in_basedir
;
62 extern ProjectPrefs project_prefs
;
65 void project_init(void);
67 void project_finalize(void);
70 void project_new(void);
72 void project_open(void);
74 gboolean
project_close(gboolean open_default
);
76 void project_properties(void);
78 void project_build_properties(void);
80 gboolean
project_ask_close(void);
83 gboolean
project_load_file(const gchar
*locale_file_name
);
85 gboolean
project_load_file_with_session(const gchar
*locale_file_name
);
87 gchar
*project_get_base_path(void);
90 const struct GeanyFilePrefs
*project_get_file_prefs(void);
92 void project_save_prefs(GKeyFile
*config
);
94 void project_load_prefs(GKeyFile
*config
);
96 void project_setup_prefs(void);
98 void project_apply_prefs(void);
100 #endif /* GEANY_PRIVATE */
104 #endif /* GEANY_PROJECT_H */