1 /*
2 * codenavigation.h - this file is part of "codenavigation", which is
3 * part of the "geany-plugins" project.
4 *
5 * Copyright 2009 Lionel Fuentes <funto66(at)gmail(dot)com>
6 * Copyright 2014 Federico Reghenzani <federico(dot)dev(at)reghe(dot)net>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, see <http://www.gnu.org/licenses/>.
20 */
21
22 #ifndef CODENAVIGATION_H
23 #define CODENAVIGATION_H
24
25 /* First */
26 #include <geanyplugin.h>
27
28 /* Other includes */
29 #include "Scintilla.h" /* for the SCNotification struct */
30
31 #include <gdk/gdkkeysyms.h>
32
33 #include <string.h>
34
35 #include "switch_head_impl.h"
36
37 /* Debug flag */
38 /*#define CODE_NAVIGATION_DEBUG*/
39
40 #define CODE_NAVIGATION_VERSION "0.2"
41
42 /* Log utilities */
43 #ifdef CODE_NAVIGATION_DEBUG
44 #include <glib/gprintf.h>
45
46
log_debug(const gchar * s,...)47 static void log_debug(const gchar* s, ...)
48 {
49 gchar* format = g_strconcat("[CODENAV DEBUG] : ", s, "\n", NULL);
50 va_list l;
51 va_start(l, s);
52 g_vprintf(format, l);
53 g_free(format);
54 va_end(l);
55 }
56
57 #define log_func() g_print("[CODENAV FUNC] : %s\n", G_STRFUNC)
58 #else
59 #define log_debug(...) {}
60 #define log_func() {}
61 #endif
62
63 /* IDs for keybindings */
64 enum
65 {
66 KEY_ID_SWITCH_HEAD_IMPL,
67 KEY_ID_GOTO_FILE,
68 NB_KEY_IDS
69 };
70
71 /* Items for controlling geany */
72 extern GeanyPlugin *geany_plugin;
73 extern GeanyData *geany_data;
74
75 extern GeanyKeyGroup *plugin_key_group;
76
77 #endif /* CODENAVIGATION_H */
78