2005-11-22 12:26:26 +00:00
|
|
|
/*
|
|
|
|
* geany.h - this file is part of Geany, a fast and lightweight IDE
|
|
|
|
*
|
2007-01-14 17:36:42 +00:00
|
|
|
* Copyright 2005-2007 Enrico Tröger <enrico.troeger@uvena.de>
|
2007-01-06 18:00:34 +00:00
|
|
|
* Copyright 2006-2007 Nick Treleaven <nick.treleaven@btinternet.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
|
|
|
|
# define PLAT_GTK 1 // needed when including ScintillaWidget.h
|
|
|
|
#endif
|
|
|
|
|
2006-01-06 18:37:24 +00:00
|
|
|
|
2006-03-15 23:19:45 +00:00
|
|
|
// for detailed description look in the documentation, things are not
|
|
|
|
// listed in the documentation should not be changed ;-)
|
2005-11-22 12:26:26 +00:00
|
|
|
#define GEANY_HOME_DIR g_get_home_dir()
|
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"
|
2007-10-10 16:27:47 +00:00
|
|
|
#define GEANY_CODENAME "Vensell"
|
2005-11-22 12:26:26 +00:00
|
|
|
#define GEANY_HOMEPAGE "http://geany.uvena.de/"
|
2007-01-18 22:13:50 +00:00
|
|
|
#define GEANY_PROJECT_EXT "geany"
|
2006-10-24 23:50:50 +00:00
|
|
|
#define GEANY_USE_WIN32_DIALOG 0
|
2006-03-10 00:48:37 +00:00
|
|
|
#define GEANY_CHECK_FILE_DELAY 30
|
2006-11-23 15:48:02 +00:00
|
|
|
#define GEANY_WORDCHARS "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
2007-07-07 17:12:50 +00:00
|
|
|
#define GEANY_TOGGLE_MARK "~ "
|
2006-06-18 20:21:19 +00:00
|
|
|
#define GEANY_MAX_WORD_LENGTH 192
|
2005-11-22 12:26:26 +00:00
|
|
|
#define GEANY_MAX_AUTOCOMPLETE_WORDS 30
|
2007-11-12 09:27:43 +00:00
|
|
|
#define GEANY_MAX_SYMBOLLIST_HEIGHT 10
|
2005-11-22 12:26:26 +00:00
|
|
|
#define GEANY_STRING_UNTITLED _("untitled")
|
2006-03-15 23:19:45 +00:00
|
|
|
#define GEANY_MSGWIN_HEIGHT 208
|
|
|
|
#define GEANY_WINDOW_MINIMAL_WIDTH 620
|
|
|
|
#define GEANY_WINDOW_MINIMAL_HEIGHT 440
|
|
|
|
#define GEANY_WINDOW_DEFAULT_WIDTH 900
|
|
|
|
#define GEANY_WINDOW_DEFAULT_HEIGHT 600
|
2006-07-01 15:04:41 +00:00
|
|
|
// some default settings which are used at the very first start of Geany to fill configuration file
|
|
|
|
#define GEANY_DEFAULT_TOOLS_MAKE "make"
|
2006-09-22 12:05:18 +00:00
|
|
|
#ifdef G_OS_WIN32
|
|
|
|
#define GEANY_DEFAULT_TOOLS_TERMINAL "cmd.exe"
|
|
|
|
#else
|
2006-07-01 15:04:41 +00:00
|
|
|
#define GEANY_DEFAULT_TOOLS_TERMINAL "xterm"
|
2006-09-22 12:05:18 +00:00
|
|
|
#endif
|
2007-04-29 10:57:25 +00:00
|
|
|
#define GEANY_DEFAULT_TOOLS_BROWSER "firefox"
|
2006-07-01 15:04:41 +00:00
|
|
|
#define GEANY_DEFAULT_TOOLS_PRINTCMD "lpr"
|
2006-07-13 14:30:44 +00:00
|
|
|
#define GEANY_DEFAULT_TOOLS_GREP "grep"
|
2006-08-08 13:01:50 +00:00
|
|
|
#define GEANY_DEFAULT_MRU_LENGTH 10
|
2006-07-24 17:27:30 +00:00
|
|
|
#define GEANY_DEFAULT_FONT_SYMBOL_LIST "Sans 9"
|
|
|
|
#define GEANY_DEFAULT_FONT_MSG_WINDOW "Sans 9"
|
|
|
|
#define GEANY_DEFAULT_FONT_EDITOR "Monospace 10"
|
2005-11-22 12:26:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2007-08-15 15:37:21 +00:00
|
|
|
// useful forward declarations
|
|
|
|
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-11-20 18:15:46 +00:00
|
|
|
gchar **active_plugins; // list of plugin filenames to load at startup
|
2007-08-23 11:34:06 +00:00
|
|
|
const TMWorkspace *tm_workspace;
|
|
|
|
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)
|
|
|
|
|
|
|
|
/* Important widgets */
|
|
|
|
GtkWidget *window;
|
2005-11-22 12:26:26 +00:00
|
|
|
GtkWidget *toolbar;
|
|
|
|
GtkWidget *treeview_notebook;
|
|
|
|
GtkWidget *notebook;
|
2007-10-24 10:52:48 +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
|
|
|
|
2007-08-23 11:34:06 +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
|