Recognize #!/bin/dash as shebang for Shell files (closes #3470986)
[geany-mirror.git] / src / geany.h
blob98341fba9fef58f5158e2ffe23244b28c0fd15d2
1 /*
2 * geany.h - this file is part of Geany, a fast and lightweight IDE
4 * Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
5 * Copyright 2006-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.
22 /* Main header - should be included first in all source files.
23 * externs and function prototypes are implemented in main.c. */
25 #ifndef GEANY_H
26 #define GEANY_H
28 #if defined(HAVE_CONFIG_H) && defined(GEANY_PRIVATE)
29 # include "config.h"
30 #endif
32 #include <gtk/gtk.h>
34 #include "tm_tagmanager.h"
36 #ifndef PLAT_GTK
37 # define PLAT_GTK 1 /* needed when including ScintillaWidget.h */
38 #endif
40 /* Compatibility for sharing macros between API and core, overridden in plugindata.h */
41 #define GEANY(symbol_name) symbol_name
44 /* for detailed description look in the documentation, things are not
45 * listed in the documentation should not be changed */
46 #define GEANY_FILEDEFS_SUBDIR "filedefs"
47 #define GEANY_TEMPLATES_SUBDIR "templates"
48 #define GEANY_CODENAME "Tavira"
49 #define GEANY_HOMEPAGE "http://www.geany.org/"
50 #define GEANY_STRING_UNTITLED _("untitled")
51 #define GEANY_DEFAULT_DIALOG_HEIGHT 350
52 #define GEANY_WINDOW_DEFAULT_WIDTH 900
53 #define GEANY_WINDOW_DEFAULT_HEIGHT 600
57 /* Common forward declarations */
58 typedef struct GeanyDocument GeanyDocument;
59 typedef struct GeanyEditor GeanyEditor;
60 typedef struct GeanyFiletype GeanyFiletype;
63 /** Important application fields. */
64 typedef struct GeanyApp
66 gboolean debug_mode; /**< @c TRUE if debug messages should be printed. */
67 /** User configuration directory, usually @c ~/.config/geany.
68 * This is a full path read by @ref tm_get_real_path().
69 * @note Plugin configuration files should be saved as:
70 * @code g_build_path(G_DIR_SEPARATOR_S, geany->app->configdir, "plugins", "pluginname",
71 * "file.conf", NULL); @endcode */
72 gchar *configdir;
73 gchar *datadir;
74 gchar *docdir;
75 const TMWorkspace *tm_workspace; /**< TagManager workspace/session tags. */
76 struct GeanyProject *project; /**< Currently active project or @c NULL if none is open. */
78 GeanyApp;
80 extern GeanyApp *app;
82 extern GObject *geany_object;
85 extern gboolean ignore_callback;
88 /* prototype is here so that all files can use it. */
89 void geany_debug(gchar const *format, ...) G_GNUC_PRINTF (1, 2);
92 #ifndef G_GNUC_WARN_UNUSED_RESULT
93 #define G_GNUC_WARN_UNUSED_RESULT
94 #endif
96 #endif