Move typedefs out of geany.h and into their own headers
[geany-mirror.git] / src / geany.h
blobf8d26d0a675478b91a6dee8336f401129c67837a
1 /*
2 * geany.h - this file is part of Geany, a fast and lightweight IDE
4 * Copyright 2005-2012 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
5 * Copyright 2006-2012 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 along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 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 #include <gtk/gtk.h>
30 G_BEGIN_DECLS
32 #if defined(HAVE_CONFIG_H) && defined(GEANY_PRIVATE)
33 # include "config.h"
34 #endif
36 #include "tm_tagmanager.h"
38 #ifndef PLAT_GTK
39 # define PLAT_GTK 1 /* needed when including ScintillaWidget.h */
40 #endif
42 /* Compatibility for sharing macros between API and core, overridden in plugindata.h */
43 #define GEANY(symbol_name) symbol_name
46 /* for detailed description look in the documentation, things are not
47 * listed in the documentation should not be changed */
48 #define GEANY_FILEDEFS_SUBDIR "filedefs"
49 #define GEANY_TEMPLATES_SUBDIR "templates"
50 #define GEANY_CODENAME "Veed"
51 #define GEANY_HOMEPAGE "http://www.geany.org/"
52 #define GEANY_WIKI "http://wiki.geany.org/"
53 #define GEANY_BUG_REPORT "http://www.geany.org/Support/Bugs"
54 #define GEANY_DONATE "https://sourceforge.net/donate/index.php?group_id=153444"
55 #define GEANY_STRING_UNTITLED _("untitled")
56 #define GEANY_DEFAULT_DIALOG_HEIGHT 350
57 #define GEANY_WINDOW_DEFAULT_WIDTH 900
58 #define GEANY_WINDOW_DEFAULT_HEIGHT 600
61 /** Important application fields. */
62 typedef struct GeanyApp
64 gboolean debug_mode; /**< @c TRUE if debug messages should be printed. */
65 /** User configuration directory, usually @c ~/.config/geany.
66 * This is a full path read by @ref tm_get_real_path().
67 * @note Plugin configuration files should be saved as:
68 * @code g_build_path(G_DIR_SEPARATOR_S, geany->app->configdir, "plugins", "pluginname",
69 * "file.conf", NULL); @endcode */
70 gchar *configdir;
71 gchar *datadir;
72 gchar *docdir;
73 const TMWorkspace *tm_workspace; /**< TagManager workspace/session tags. */
74 struct GeanyProject *project; /**< Currently active project or @c NULL if none is open. */
76 GeanyApp;
78 extern GeanyApp *app;
80 extern GObject *geany_object;
83 extern gboolean ignore_callback;
86 /* prototype is here so that all files can use it. */
87 void geany_debug(gchar const *format, ...) G_GNUC_PRINTF (1, 2);
90 #ifndef G_GNUC_WARN_UNUSED_RESULT
91 #define G_GNUC_WARN_UNUSED_RESULT
92 #endif
94 G_END_DECLS
96 #endif