1 #ifndef __SP_SHORTCUTS_H__
2 #define __SP_SHORTCUTS_H__
4 /*
5 * Keyboard shortcut processing
6 *
7 * Author:
8 * Lauris Kaplinski <lauris@kaplinski.com>
9 *
10 * This code is in public domain
11 */
13 namespace Inkscape {
14 class Verb;
15 namespace UI {
16 namespace View {
17 class View;
18 }
19 }
20 }
22 /* We define high-bit mask for packing into single int */
24 #define SP_SHORTCUT_SHIFT_MASK (1 << 24)
25 #define SP_SHORTCUT_CONTROL_MASK (1 << 25)
26 #define SP_SHORTCUT_ALT_MASK (1 << 26)
27 #define SP_SHORTCUT_MODIFIER_MASK (SP_SHORTCUT_SHIFT_MASK|SP_SHORTCUT_CONTROL_MASK|SP_SHORTCUT_ALT_MASK)
29 /* Returns true if action was performed */
30 bool sp_shortcut_invoke (unsigned int shortcut, Inkscape::UI::View::View *view);
32 Inkscape::Verb * sp_shortcut_get_verb (unsigned int shortcut);
33 unsigned int sp_shortcut_get_primary (Inkscape::Verb * verb); // Returns GDK_VoidSymbol if no shortcut is found.
34 char* sp_shortcut_get_label (unsigned int shortcut); // Returns the human readable form of the shortcut (or NULL), for example Shift+Ctrl+F. Free the returned string with g_free.
36 #endif
38 /*
39 Local Variables:
40 mode:c++
41 c-file-style:"stroustrup"
42 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
43 indent-tabs-mode:nil
44 fill-column:99
45 End:
46 */
47 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :