Version bump.
[geany-mirror.git] / src / project.h
blob33eb81e42e2ed697dbc391bcc7347142fa4c1ea8
1 /*
2 * project.h - this file is part of Geany, a fast and lightweight IDE
4 * Copyright 2007-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
5 * Copyright 2007-2010 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.
21 * $Id$
25 #ifndef GEANY_PROJECT_H
26 #define GEANY_PROJECT_H 1
28 #define GEANY_PROJECT_EXT "geany"
31 /** Structure for representing a project. */
32 typedef struct GeanyProject
34 gchar *name; /**< The name of the project. */
35 gchar *description; /**< Short description of the project. */
36 gchar *file_name; /**< Where the project file is stored (in UTF-8). */
37 gchar *base_path; /**< Base path of the project directory (in UTF-8, maybe relative). */
38 /** Identifier whether it is a pure Geany project or modified/extended
39 * by a plugin. */
40 gint type;
41 gchar **file_patterns; /**< Array of filename extension patterns. */
43 struct GeanyProjectPrivate *priv; /* must be last, append fields before this item */
44 #ifdef GEANY_PRIVATE
45 /* Do not use following fields in plugins */
46 GPtrArray *build_filetypes_list; /* Project has custom filetype builds for these. */
47 gint long_line_behaviour; /* 0 - disabled, 1 - follow global settings, 2 - enabled (custom) */
48 gint long_line_column; /* Long line marker position. */
49 #endif
51 GeanyProject;
54 typedef struct ProjectPrefs
56 gchar *session_file;
57 gboolean project_session;
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(void);
71 void project_open(void);
73 void 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 void project_save_prefs(GKeyFile *config);
91 void project_load_prefs(GKeyFile *config);
93 void project_setup_prefs(void);
95 void project_apply_prefs(void);
97 #endif