2 * project.h - this file is part of Geany, a fast and lightweight IDE
4 * Copyright 2007-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
5 * Copyright 2007-2011 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
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #ifndef GEANY_PROJECT_H
24 #define GEANY_PROJECT_H 1
26 #define GEANY_PROJECT_EXT "geany"
29 /** Structure for representing a project. */
30 typedef struct GeanyProject
32 gchar
*name
; /**< The name of the project. */
33 gchar
*description
; /**< Short description of the project. */
34 gchar
*file_name
; /**< Where the project file is stored (in UTF-8). */
35 gchar
*base_path
; /**< Base path of the project directory (in UTF-8, maybe relative). */
36 /** Identifier whether it is a pure Geany project or modified/extended
39 gchar
**file_patterns
; /**< Array of filename extension patterns. */
41 struct GeanyProjectPrivate
*priv
; /* must be last, append fields before this item */
43 /* Do not use following fields in plugins */
44 GPtrArray
*build_filetypes_list
; /* Project has custom filetype builds for these. */
45 gint long_line_behaviour
; /* 0 - disabled, 1 - follow global settings, 2 - enabled (custom) */
46 gint long_line_column
; /* Long line marker position. */
52 typedef struct ProjectPrefs
55 gboolean project_session
;
56 gboolean project_file_in_basedir
;
59 extern ProjectPrefs project_prefs
;
62 void project_init(void);
64 void project_finalize(void);
67 void project_new(void);
69 void project_open(void);
71 void project_close(gboolean open_default
);
73 void project_properties(void);
75 void project_build_properties(void);
77 gboolean
project_ask_close(void);
80 gboolean
project_load_file(const gchar
*locale_file_name
);
82 gboolean
project_load_file_with_session(const gchar
*locale_file_name
);
84 gchar
*project_get_base_path(void);
87 void project_save_prefs(GKeyFile
*config
);
89 void project_load_prefs(GKeyFile
*config
);
91 void project_setup_prefs(void);
93 void project_apply_prefs(void);