1*cdf0e10cSrcweir /*****************************************************************************
2*cdf0e10cSrcweir  * GlobalKeyboardDevice.h
3*cdf0e10cSrcweir  * RemoteControlWrapper
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Created by Martin Kahr on 11.03.06 under a MIT-style license.
6*cdf0e10cSrcweir  * Copyright (c) 2006 martinkahr.com. All rights reserved.
7*cdf0e10cSrcweir  *
8*cdf0e10cSrcweir  * Code modified and adapted to OpenOffice.org
9*cdf0e10cSrcweir  * by Eric Bachard on 11.08.2008 under the same license
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * Permission is hereby granted, free of charge, to any person obtaining a
12*cdf0e10cSrcweir  * copy of this software and associated documentation files (the "Software"),
13*cdf0e10cSrcweir  * to deal in the Software without restriction, including without limitation
14*cdf0e10cSrcweir  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15*cdf0e10cSrcweir  * and/or sell copies of the Software, and to permit persons to whom the
16*cdf0e10cSrcweir  * Software is furnished to do so, subject to the following conditions:
17*cdf0e10cSrcweir  *
18*cdf0e10cSrcweir  * The above copyright notice and this permission notice shall be included
19*cdf0e10cSrcweir  * in all copies or substantial portions of the Software.
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22*cdf0e10cSrcweir  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23*cdf0e10cSrcweir  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24*cdf0e10cSrcweir  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25*cdf0e10cSrcweir  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26*cdf0e10cSrcweir  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27*cdf0e10cSrcweir  * THE SOFTWARE.
28*cdf0e10cSrcweir  *
29*cdf0e10cSrcweir  *****************************************************************************/
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #import <Cocoa/Cocoa.h>
32*cdf0e10cSrcweir #import <Carbon/Carbon.h>
33*cdf0e10cSrcweir 
34*cdf0e10cSrcweir #import "RemoteControl.h"
35*cdf0e10cSrcweir 
36*cdf0e10cSrcweir 
37*cdf0e10cSrcweir /*
38*cdf0e10cSrcweir  This class registers for a number of global keyboard shortcuts to simulate a remote control
39*cdf0e10cSrcweir  */
40*cdf0e10cSrcweir 
41*cdf0e10cSrcweir @interface GlobalKeyboardDevice : RemoteControl {
42*cdf0e10cSrcweir 
43*cdf0e10cSrcweir 	NSMutableDictionary* hotKeyRemoteEventMapping;
44*cdf0e10cSrcweir 	EventHandlerRef eventHandlerRef;
45*cdf0e10cSrcweir 
46*cdf0e10cSrcweir }
47*cdf0e10cSrcweir 
mapRemoteButton:defaultKeycode:defaultModifiers:(RemoteControlEventIdentifier,unsigned int,unsigned int)48*cdf0e10cSrcweir - (void) mapRemoteButton: (RemoteControlEventIdentifier) remoteButtonIdentifier defaultKeycode: (unsigned int) defaultKeycode defaultModifiers: (unsigned int) defaultModifiers;
49*cdf0e10cSrcweir 
registerHotKeyCode:modifiers:remoteEventIdentifier:(unsigned int,unsigned int,RemoteControlEventIdentifier)50*cdf0e10cSrcweir - (BOOL)registerHotKeyCode: (unsigned int) keycode modifiers: (unsigned int) modifiers remoteEventIdentifier: (RemoteControlEventIdentifier) identifier;
51*cdf0e10cSrcweir 
52*cdf0e10cSrcweir 
53*cdf0e10cSrcweir 
54*cdf0e10cSrcweir @end
55