geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

project.h
Go to the documentation of this file.
1/*
2 * project.h - this file is part of Geany, a fast and lightweight IDE
3 *
4 * Copyright 2007 The Geany contributors
5 *
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.
10 *
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.
15 *
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.
19 */
20
21
22#ifndef GEANY_PROJECT_H
23#define GEANY_PROJECT_H 1
24
25#include <glib.h>
26#include <glib-object.h>
27
28G_BEGIN_DECLS
29
30#define GEANY_PROJECT_EXT "geany"
31
32
33/** Structure for representing a project. */
34typedef struct GeanyProject
35{
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. */
44
45 struct GeanyProjectPrivate *priv; /* must be last, append fields before this item */
46}
48
49
50void project_write_config(void);
51
52
53#ifdef GEANY_PRIVATE
54
55typedef struct ProjectPrefs
56{
57 gchar *session_file;
58 gboolean project_session;
59 gboolean project_file_in_basedir;
60} ProjectPrefs;
61
62extern ProjectPrefs project_prefs;
63
64
65void project_init(void);
66
67void project_finalize(void);
68
69
70void project_new(void);
71
72void project_open(void);
73
74gboolean project_close(gboolean open_default);
75
76void project_properties(void);
77
79
80gboolean project_ask_close(void);
81
82
83gboolean project_load_file(const gchar *locale_file_name);
84
85gboolean project_load_file_with_session(const gchar *locale_file_name);
86
87gchar *project_get_base_path(void);
88
89
90const struct GeanyFilePrefs *project_get_file_prefs(void);
91
92void project_save_prefs(GKeyFile *config);
93
94void project_load_prefs(GKeyFile *config);
95
96void project_setup_prefs(void);
97
98void project_apply_prefs(void);
99
100#endif /* GEANY_PRIVATE */
101
102G_END_DECLS
103
104#endif /* GEANY_PROJECT_H */
signal void(* project_open)(GObject *obj, GKeyFile *config, gpointer user_data)
Sent after a project is opened but before session files are loaded.
signal void(* project_close)(GObject *obj, gpointer user_data)
Sent after a project is closed.
void project_build_properties(void)
Definition: project.c:651
gchar * project_get_base_path(void)
Definition: project.c:1171
void project_apply_prefs(void)
Definition: project.c:1249
void project_finalize(void)
Definition: project.c:1348
gboolean project_load_file_with_session(const gchar *locale_file_name)
Definition: project.c:274
void project_init(void)
Definition: project.c:1343
void project_load_prefs(GKeyFile *config)
Definition: project.c:1212
gboolean project_load_file(const gchar *locale_file_name)
Definition: project.c:1011
ProjectPrefs project_prefs
Definition: project.c:53
void project_setup_prefs(void)
Definition: project.c:1230
const GeanyFilePrefs * project_get_file_prefs(void)
Definition: project.c:1327
gboolean project_ask_close(void)
Definition: project.c:660
void project_save_prefs(GKeyFile *config)
Definition: project.c:1197
void project_properties(void)
Definition: project.c:645
void project_new(void)
Definition: project.c:144
void project_write_config(void)
Forces the project file rewrite and emission of the project-save signal.
Definition: project.c:1159
struct GeanyProject GeanyProject
Structure for representing a project.
File Prefs.
Definition: document.h:47
Structure for representing a project.
Definition: project.h:35
GStrv file_patterns
Array of filename extension patterns.
Definition: project.h:43
gint type
Identifier whether it is a pure Geany project or modified/extended by a plugin.
Definition: project.h:42
gchar * file_name
Where the project file is stored (in UTF-8).
Definition: project.h:38
gchar * description
Short description of the project.
Definition: project.h:37
struct GeanyProjectPrivate * priv
Definition: project.h:45
gchar * base_path
Base path of the project directory (in UTF-8, maybe relative).
Definition: project.h:39
gchar * name
The name of the project.
Definition: project.h:36