shortcuts.h revision 560a131fd676a3d5926ebbf12e4aa7a91ad38e90
20293N/A#ifndef __SP_SHORTCUTS_H__
20293N/A#define __SP_SHORTCUTS_H__
20293N/A
20293N/A/*
20293N/A * Keyboard shortcut processing
20293N/A *
20293N/A * Author:
20293N/A * Lauris Kaplinski <lauris@kaplinski.com>
20293N/A *
20293N/A * This code is in public domain
20293N/A */
20293N/A
20293N/Anamespace Inkscape {
20293N/A class Verb;
20293N/A namespace UI {
20293N/A namespace View {
20293N/A class View;
20293N/A }
20293N/A }
20293N/A}
20293N/A
20293N/A/* We define high-bit mask for packing into single int */
20293N/A
20293N/A#define SP_SHORTCUT_SHIFT_MASK (1 << 24)
20293N/A#define SP_SHORTCUT_CONTROL_MASK (1 << 25)
20293N/A#define SP_SHORTCUT_ALT_MASK (1 << 26)
20293N/A#define SP_SHORTCUT_MODIFIER_MASK (SP_SHORTCUT_SHIFT_MASK|SP_SHORTCUT_CONTROL_MASK|SP_SHORTCUT_ALT_MASK)
20293N/A
20293N/A/* Returns true if action was performed */
20293N/Abool sp_shortcut_invoke (unsigned int shortcut, Inkscape::UI::View::View *view);
20293N/A
20293N/AInkscape::Verb * sp_shortcut_get_verb (unsigned int shortcut);
20293N/Aunsigned int sp_shortcut_get_primary (Inkscape::Verb * verb); // Returns GDK_VoidSymbol if no shortcut is found.
20293N/Achar* 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.
20293N/A
20293N/A#endif
20293N/A
20293N/A/*
20293N/A Local Variables:
20293N/A mode:c++
20293N/A c-file-style:"stroustrup"
20293N/A c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
20293N/A indent-tabs-mode:nil
20293N/A fill-column:99
20293N/A End:
20293N/A*/
20293N/A// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
20293N/A