FreeRDP
AdvancedKeyboardView.h
1 /*
2  Advanced keyboard view interface
3 
4  Copyright 2013 Thincast Technologies GmbH, Author: Martin Fleisz
5 
6  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
7  If a copy of the MPL was not distributed with this file, You can obtain one at
8  http://mozilla.org/MPL/2.0/.
9  */
10 
11 #import <UIKit/UIKit.h>
12 
13 // forward declaration
14 @protocol AdvancedKeyboardDelegate <NSObject>
15 @optional
16 // called when a function key was pressed and a virtual keycode is provided
17 // @key: virtual key code
18 - (void)advancedKeyPressedVKey:(int)key;
19 // called when a function key was pressed and the keys unicode is provided
20 // @key: unicode character
21 - (void)advancedKeyPressedUnicode:(int)key;
22 @end
23 
24 @interface AdvancedKeyboardView : UIView
25 {
26  @private
27  // view containing function keys (F-keys) and function block (ins, del, home, end, ...)
28  UIView *_function_keys_view;
29 
30  // view containing numpad keys (0-9, +-/*)
31  UIView *_numpad_keys_view;
32 
33  // view containing cursor keys (up, down, left, right)
34  UIView *_cursor_keys_view;
35 
36  // currently visible view
37  UIView *_cur_view;
38 
39  // delegate
40  NSObject<AdvancedKeyboardDelegate> *_delegate;
41 }
42 
43 @property(assign) NSObject<AdvancedKeyboardDelegate> *delegate;
44 
45 // init keyboard view with frame and delegate
46 - (id)initWithFrame:(CGRect)frame delegate:(NSObject<AdvancedKeyboardDelegate> *)delegate;
47 
48 @end