~ubuntu-branches/ubuntu/oneiric/cairo-dock/oneiric-201106091216

« back to all changes in this revision

Viewing changes to src/gldit/cairo-dock-keybinder.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2011-03-17 14:08:48 UTC
  • mfrom: (1.1.14 upstream)
  • Revision ID: james.westby@ubuntu.com-20110317140848-b8efysl4ynhjm87k
Tags: 2.3.0~1-0ubuntu1
* New Upstream Version (LP: #723994)
* Upstream short ChangeLog:
 - Updated translations
 - Updated the integration of the new versions of kwin and compiz
 - Updated default theme
 - Fixed a few bugs
 - Updated the man
* debian/control:
 - Added suggests apps for cairo-dock-core (needed by the default theme)
 - Updated the description (from launchpad.net/cairo-dock)
 - Added cairo-dock-plug-ins as a new suggestion for cairo-dock-core
* debian/patches:
 - Updated the default theme to use default apps of Ubuntu Natty 
* Switch to dpkg-source 3.0 (quilt) format
* Removed the desktop-file-category patch (sync with debian packages)
* debian/rules:
 - Added a CMake flag to disable the gtk grip
 - No longer used simple-patchsys
* Updated the debian/watch

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#define __CD_KEY_BINDER_H__
33
33
 
34
34
#include <glib/gtypes.h>
 
35
#include "cairo-dock-struct.h"
 
36
#include "cairo-dock-manager.h"
35
37
 
36
38
G_BEGIN_DECLS
37
39
 
42
44
* You bind an action to a shortcut with \ref cd_keybinder_bind, and unbind it with \ref cd_keybinder_unbind.
43
45
*/
44
46
 
 
47
typedef struct _CairoShortcutsManager CairoShortcutsManager;
 
48
 
 
49
#ifndef _MANAGER_DEF_
 
50
extern CairoShortcutsManager myShortcutsMgr;
 
51
#endif
 
52
 
45
53
/// Definition of a callback, called when a shortcut is pressed by the user.
46
54
typedef void (* CDBindkeyHandler) (const char *keystring, gpointer user_data);
47
55
 
48
 
void cd_keybinder_init (void);
49
 
void cd_keybinder_stop (void);
 
56
// params
 
57
 
 
58
// manager
 
59
struct _CairoShortcutsManager {
 
60
        GldiManager mgr;
 
61
        gboolean (*bind) (const char *keystring, CDBindkeyHandler handler, gpointer user_data);
 
62
        void (*unbind) (const char *keystring, CDBindkeyHandler handler);
 
63
        gboolean (*simulate_key_sequence) (const gchar *cKeyString);
 
64
        } ;
 
65
 
 
66
// signals
 
67
typedef enum {
 
68
        NB_NOTIFICATIONS_SHORTCUTS
 
69
        } CairoShortcutsNotifications;
 
70
 
 
71
 
 
72
void cd_keybinder_init (void);  /// merge with init
 
73
void cd_keybinder_stop (void);  /// useless
50
74
 
51
75
/** Bind a shortcut to an action. Unbind it when you don't want it anymore, or when 'user_data' is freed.
52
76
 * @param keystring a shortcut.
67
91
 
68
92
gboolean cd_keybinder_is_modifier (guint keycode);
69
93
 
70
 
guint32 cd_keybinder_get_current_event_time (void);
 
94
//guint32 cd_keybinder_get_current_event_time (void);
71
95
 
72
96
/** Trigger the given shortcut. It will be as if the user effectively pressed the shortcut on its keyboard. It uses the 'XTest' X extension.
73
97
 * @param cKeyString a shortcut.
 
98
 * @return TRUE if success.
74
99
*/
75
100
gboolean cairo_dock_simulate_key_sequence (gchar *cKeyString);
76
101
 
 
102
 
 
103
void gldi_register_shortcuts_manager (void);
 
104
 
77
105
G_END_DECLS
78
106
 
79
107
#endif /* __CD_KEY_BINDER_H__ */