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-04-19 10:39:27 +00:00
|
|
|
#define GEANY_CODENAME "Quillan"
|
2005-11-22 12:26:26 +00:00
|
|
|
#define GEANY_HOMEPAGE "http://geany.uvena.de/"
|
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-02-27 13:17:29 +00:00
|
|
|
/* useful forward declarations */
|
2007-08-15 15:37:21 +00:00
|
|
|
typedef struct filetype filetype;
|
2007-01-15 18:12:32 +00:00
|
|
|
typedef struct _GeanyProject GeanyProject;
|
|
|
|
|
|
|
|
|
2007-08-23 11:34:06 +00:00
|
|
|
/* Commonly used items.
|
|
|
|
* Remember to increment abi_version in plugindata.h when changing items. */
|
|
|
|
typedef struct GeanyApp
|
2005-11-22 12:26:26 +00:00
|
|
|
{
|
2007-08-23 11:34:06 +00:00
|
|
|
gboolean debug_mode;
|
2005-11-22 12:26:26 +00:00
|
|
|
gchar *configdir;
|
2006-07-26 17:02:16 +00:00
|
|
|
gchar *datadir;
|
|
|
|
gchar *docdir;
|
2007-08-23 11:34:06 +00:00
|
|
|
const TMWorkspace *tm_workspace;
|
2008-02-27 13:17:29 +00:00
|
|
|
GeanyProject *project; /* currently active project or NULL if none is open */
|
|
|
|
gboolean ignore_callback; /* should not be used in new code
|
|
|
|
(use clicked instead of toggled signal) */
|
2007-08-23 11:34:06 +00:00
|
|
|
|
|
|
|
/* Important widgets */
|
|
|
|
GtkWidget *window;
|
2005-11-22 12:26:26 +00:00
|
|
|
GtkWidget *toolbar;
|
|
|
|
GtkWidget *treeview_notebook;
|
|
|
|
GtkWidget *notebook;
|
2008-02-27 13:17:29 +00:00
|
|
|
GtkWidget *statusbar; /* use ui_set_statusbar() to set */
|
2005-11-22 12:26:26 +00:00
|
|
|
GtkWidget *popup_menu;
|
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
|
|
|
|
2006-05-19 17:18:06 +00:00
|
|
|
|
2005-11-22 12:26:26 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
GEANY_IMAGE_SMALL_CROSS,
|
|
|
|
GEANY_IMAGE_LOGO,
|
|
|
|
GEANY_IMAGE_COMPILE,
|
|
|
|
GEANY_IMAGE_SAVE_ALL,
|
|
|
|
GEANY_IMAGE_NEW_ARROW
|
|
|
|
};
|
|
|
|
|
|
|
|
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
|