-
Notifications
You must be signed in to change notification settings - Fork 263
/
codenavigation.h
86 lines (72 loc) · 2.43 KB
/
codenavigation.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
* codenavigation.h - this file is part of "codenavigation", which is
* part of the "geany-plugins" project.
*
* Copyright 2009 Lionel Fuentes <funto66(at)gmail(dot)com>
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#ifndef CODENAVIGATION_H
#define CODENAVIGATION_H
/* First */
#include "geany.h" /* for the GeanyApp data type */
/* Other includes */
#include "editor.h" /* for the declaration of the GeanyEditor struct, not strictly necessary
as it will be also included by plugindata.h */
#include "document.h" /* for the declaration of the GeanyDocument struct */
#include "ui_utils.h"
#include "Scintilla.h" /* for the SCNotification struct */
#include "keybindings.h"
#include "filetypes.h"
#include <gdk/gdkkeysyms.h>
#include <string.h>
#include "switch_head_impl.h"
/* Last */
#include "plugindata.h" /* this defines the plugin API */
#include "geanyfunctions.h" /* this wraps geany_functions function pointers */
/* Debug flag */
/*#define CODE_NAVIGATION_DEBUG
*/
#define CODE_NAVIGATION_VERSION "0.1"
/* Log utilities */
#ifdef CODE_NAVIGATION_DEBUG
static void log_debug(const gchar* s, ...)
{
gchar* format = g_strconcat("[CODENAV DEBUG] : ", s, "\n", NULL);
va_list l;
va_start(l, s);
g_vprintf(format, l);
g_free(format);
va_end(l);
}
#define log_func() g_print("[CODENAV FUNC] : %s", G_STRFUNC)
#else
static void log_debug(const gchar* s, ...) {}
#define log_func() {}
#endif
/* IDs for keybindings */
enum
{
KEY_ID_SWITCH_HEAD_IMPL,
KEY_ID_GOTO_FILE,
NB_KEY_IDS
};
/* Items for controlling geany */
extern GeanyPlugin *geany_plugin;
extern GeanyData *geany_data;
extern GeanyFunctions *geany_functions;
extern GeanyKeyGroup *plugin_key_group;
#endif /* CODENAVIGATION_H */