2007-01-15 18:12:32 +00:00
|
|
|
/*
|
|
|
|
* project.h - this file is part of Geany, a fast and lightweight IDE
|
|
|
|
*
|
2011-01-19 19:39:09 +00:00
|
|
|
* Copyright 2007-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
|
|
|
* Copyright 2007-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
2007-01-15 18:12:32 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef GEANY_PROJECT_H
|
|
|
|
#define GEANY_PROJECT_H 1
|
|
|
|
|
2012-03-28 22:50:18 -07:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2008-04-23 16:47:42 +00:00
|
|
|
#define GEANY_PROJECT_EXT "geany"
|
|
|
|
|
|
|
|
|
2008-07-24 14:37:36 +00:00
|
|
|
/** Structure for representing a project. */
|
|
|
|
typedef struct GeanyProject
|
2007-01-15 18:12:32 +00:00
|
|
|
{
|
2008-07-24 14:37:36 +00:00
|
|
|
gchar *name; /**< The name of the project. */
|
|
|
|
gchar *description; /**< Short description of the project. */
|
|
|
|
gchar *file_name; /**< Where the project file is stored (in UTF-8). */
|
|
|
|
gchar *base_path; /**< Base path of the project directory (in UTF-8, maybe relative). */
|
|
|
|
/** Identifier whether it is a pure Geany project or modified/extended
|
|
|
|
* by a plugin. */
|
|
|
|
gint type;
|
|
|
|
gchar **file_patterns; /**< Array of filename extension patterns. */
|
2008-12-27 12:55:04 +00:00
|
|
|
|
|
|
|
struct GeanyProjectPrivate *priv; /* must be last, append fields before this item */
|
2009-08-26 14:56:05 +00:00
|
|
|
#ifdef GEANY_PRIVATE
|
2009-08-24 12:39:13 +00:00
|
|
|
/* Do not use following fields in plugins */
|
2010-03-10 16:20:34 +00:00
|
|
|
GPtrArray *build_filetypes_list; /* Project has custom filetype builds for these. */
|
|
|
|
gint long_line_behaviour; /* 0 - disabled, 1 - follow global settings, 2 - enabled (custom) */
|
|
|
|
gint long_line_column; /* Long line marker position. */
|
2009-08-26 14:56:05 +00:00
|
|
|
#endif
|
2008-07-24 14:37:36 +00:00
|
|
|
}
|
|
|
|
GeanyProject;
|
|
|
|
|
2007-01-15 18:12:32 +00:00
|
|
|
|
2008-07-24 14:37:36 +00:00
|
|
|
typedef struct ProjectPrefs
|
2007-04-21 12:25:17 +00:00
|
|
|
{
|
|
|
|
gchar *session_file;
|
2008-01-16 16:30:34 +00:00
|
|
|
gboolean project_session;
|
2008-10-02 15:09:33 +00:00
|
|
|
gboolean project_file_in_basedir;
|
2007-04-21 12:25:17 +00:00
|
|
|
} ProjectPrefs;
|
|
|
|
|
|
|
|
extern ProjectPrefs project_prefs;
|
|
|
|
|
2007-01-15 18:12:32 +00:00
|
|
|
|
2008-12-27 12:55:04 +00:00
|
|
|
void project_init(void);
|
|
|
|
|
|
|
|
void project_finalize(void);
|
|
|
|
|
|
|
|
|
2008-02-20 11:24:23 +00:00
|
|
|
void project_new(void);
|
2007-01-15 18:12:32 +00:00
|
|
|
|
2008-02-20 11:24:23 +00:00
|
|
|
void project_open(void);
|
2007-01-15 18:12:32 +00:00
|
|
|
|
2007-11-18 18:24:23 +00:00
|
|
|
void project_close(gboolean open_default);
|
2007-01-15 18:12:32 +00:00
|
|
|
|
2008-02-20 11:24:23 +00:00
|
|
|
void project_properties(void);
|
2007-01-15 18:12:32 +00:00
|
|
|
|
2010-07-07 12:04:28 +00:00
|
|
|
void project_build_properties(void);
|
|
|
|
|
2009-04-05 14:14:29 +00:00
|
|
|
gboolean project_ask_close(void);
|
|
|
|
|
2007-01-15 18:12:32 +00:00
|
|
|
|
2007-04-21 12:25:17 +00:00
|
|
|
gboolean project_load_file(const gchar *locale_file_name);
|
|
|
|
|
2009-04-05 14:14:29 +00:00
|
|
|
gboolean project_load_file_with_session(const gchar *locale_file_name);
|
|
|
|
|
2008-02-20 11:24:23 +00:00
|
|
|
gchar *project_get_base_path(void);
|
2008-01-11 16:53:25 +00:00
|
|
|
|
2007-04-21 12:25:17 +00:00
|
|
|
|
2012-01-19 18:09:29 +00:00
|
|
|
const struct GeanyFilePrefs *project_get_file_prefs(void);
|
|
|
|
|
2007-04-21 12:25:17 +00:00
|
|
|
void project_save_prefs(GKeyFile *config);
|
|
|
|
|
|
|
|
void project_load_prefs(GKeyFile *config);
|
|
|
|
|
2008-02-20 11:24:23 +00:00
|
|
|
void project_setup_prefs(void);
|
2007-04-29 16:36:42 +00:00
|
|
|
|
2008-02-20 11:24:23 +00:00
|
|
|
void project_apply_prefs(void);
|
2007-04-29 16:36:42 +00:00
|
|
|
|
2012-03-28 22:50:18 -07:00
|
|
|
G_END_DECLS
|
|
|
|
|
2007-01-15 18:12:32 +00:00
|
|
|
#endif
|