2005-11-22 12:26:26 +00:00
|
|
|
/*
|
|
|
|
* geany.h - this file is part of Geany, a fast and lightweight IDE
|
|
|
|
*
|
2008-01-06 18:11:57 +00:00
|
|
|
* Copyright 2005-2008 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
|
|
|
* Copyright 2006-2008 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
2005-11-22 12:26:26 +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
|
2006-05-22 00:25:19 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2005-11-22 12:26:26 +00:00
|
|
|
*
|
2005-11-27 20:54:28 +00:00
|
|
|
* $Id$
|
2005-11-22 12:26:26 +00:00
|
|
|
*/
|
|
|
|
|
2007-08-23 11:34:06 +00:00
|
|
|
/* Main header - should be included first in all source files.
|
|
|
|
* externs and function prototypes are implemented in main.c. */
|
|
|
|
|
2006-07-20 21:17:17 +00:00
|
|
|
#ifndef GEANY_H
|
|
|
|
#define GEANY_H
|
|
|
|
|
2005-11-22 12:26:26 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
|
|
#include "tm_tagmanager.h"
|
|
|
|
|
2007-08-15 15:37:21 +00:00
|
|
|
#ifndef PLAT_GTK
|
2008-02-27 13:17:29 +00:00
|
|
|
# define PLAT_GTK 1 /* needed when including ScintillaWidget.h */
|
2007-08-15 15:37:21 +00:00
|
|
|
#endif
|
|
|
|
|
2006-01-06 18:37:24 +00:00
|
|
|
|
2008-02-27 13:17:29 +00:00
|
|
|
/* for detailed description look in the documentation, things are not
|
|
|
|
* listed in the documentation should not be changed */
|
2006-05-19 17:18:06 +00:00
|
|
|
#define GEANY_FILEDEFS_SUBDIR "filedefs"
|
2007-01-06 18:00:34 +00:00
|
|
|
#define GEANY_TEMPLATES_SUBDIR "templates"
|
2008-10-19 13:52:12 +00:00
|
|
|
#define GEANY_CODENAME "Argon"
|
2008-09-01 11:15:16 +00:00
|
|
|
#define GEANY_HOMEPAGE "http://www.geany.org/"
|
2006-10-24 23:50:50 +00:00
|
|
|
#define GEANY_USE_WIN32_DIALOG 0
|
2005-11-22 12:26:26 +00:00
|
|
|
#define GEANY_STRING_UNTITLED _("untitled")
|
2008-02-04 08:48:20 +00:00
|
|
|
#define GEANY_WINDOW_MINIMAL_WIDTH 550
|
|
|
|
#define GEANY_WINDOW_MINIMAL_HEIGHT 350
|
2006-03-15 23:19:45 +00:00
|
|
|
#define GEANY_WINDOW_DEFAULT_WIDTH 900
|
|
|
|
#define GEANY_WINDOW_DEFAULT_HEIGHT 600
|
2005-11-22 12:26:26 +00:00
|
|
|
|
|
|
|
|
2008-07-24 14:37:36 +00:00
|
|
|
/* Common forward declarations */
|
2008-06-15 13:35:48 +00:00
|
|
|
typedef struct GeanyDocument GeanyDocument;
|
2008-12-17 16:00:18 +00:00
|
|
|
typedef struct GeanyEditor GeanyEditor;
|
2008-05-29 18:02:20 +00:00
|
|
|
typedef struct GeanyFiletype GeanyFiletype;
|
2007-01-15 18:12:32 +00:00
|
|
|
|
|
|
|
|
2008-07-24 14:37:36 +00:00
|
|
|
/** Important application fields. */
|
2007-08-23 11:34:06 +00:00
|
|
|
typedef struct GeanyApp
|
2005-11-22 12:26:26 +00:00
|
|
|
{
|
2008-07-24 14:37:36 +00:00
|
|
|
gboolean debug_mode; /**< @c TRUE if debug messages should be printed. */
|
2008-11-13 14:37:47 +00:00
|
|
|
/** User configuration directory, usually @c ~/.config/geany.
|
2008-11-26 13:15:53 +00:00
|
|
|
* This is a full path read by @ref tm_get_real_path().
|
2008-07-24 14:37:36 +00:00
|
|
|
* @note Plugin configuration files should be saved as:
|
|
|
|
* @code g_build_path(G_DIR_SEPARATOR_S, geany->app->configdir, "plugins", "pluginname",
|
|
|
|
* "file.conf"); @endcode */
|
2005-11-22 12:26:26 +00:00
|
|
|
gchar *configdir;
|
2006-07-26 17:02:16 +00:00
|
|
|
gchar *datadir;
|
|
|
|
gchar *docdir;
|
2008-07-24 14:37:36 +00:00
|
|
|
const TMWorkspace *tm_workspace; /**< TagManager workspace/session tags. */
|
|
|
|
struct GeanyProject *project; /**< Currently active project or @c NULL if none is open. */
|
2007-08-23 11:34:06 +00:00
|
|
|
}
|
|
|
|
GeanyApp;
|
2005-11-22 12:26:26 +00:00
|
|
|
|
2007-08-23 11:34:06 +00:00
|
|
|
extern GeanyApp *app;
|
2005-11-22 12:26:26 +00:00
|
|
|
|
2009-01-03 12:54:13 +00:00
|
|
|
extern GObject *geany_object;
|
|
|
|
|
2006-05-19 17:18:06 +00:00
|
|
|
|
2008-05-22 14:41:28 +00:00
|
|
|
extern gboolean ignore_callback;
|
|
|
|
|
|
|
|
|
2005-11-22 12:26:26 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
UP,
|
|
|
|
DOWN,
|
|
|
|
LEFT,
|
|
|
|
RIGHT
|
|
|
|
};
|
|
|
|
|
2007-03-08 18:02:08 +00:00
|
|
|
enum
|
|
|
|
{
|
2006-02-22 13:40:26 +00:00
|
|
|
KILOBYTE = 1024,
|
|
|
|
MEGABYTE = (KILOBYTE*1024),
|
|
|
|
GIGABYTE = (MEGABYTE*1024)
|
|
|
|
};
|
|
|
|
|
2006-10-18 20:48:54 +00:00
|
|
|
|
2007-07-13 15:54:16 +00:00
|
|
|
/* Useful for some variable argument list functions, e.g. in utils.h */
|
|
|
|
#if ! GLIB_CHECK_VERSION(2, 8, 0)
|
|
|
|
#define G_GNUC_NULL_TERMINATED
|
|
|
|
#endif
|
|
|
|
|
2006-04-27 18:06:35 +00:00
|
|
|
|
2008-02-27 13:17:29 +00:00
|
|
|
/* prototype is here so that all files can use it. */
|
2006-10-21 11:16:54 +00:00
|
|
|
void geany_debug(gchar const *format, ...) G_GNUC_PRINTF (1, 2);
|
|
|
|
|
2005-11-22 12:26:26 +00:00
|
|
|
#endif
|