Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Side by Side Diff: ui/base/keycodes/keyboard_code_conversion_mac.h

Issue 7569005: Rename UI_API to UI_EXPORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_BASE_KEYCODES_KEYBOARD_CODE_CONVERSION_MAC_H_ 5 #ifndef UI_BASE_KEYCODES_KEYBOARD_CODE_CONVERSION_MAC_H_
6 #define UI_BASE_KEYCODES_KEYBOARD_CODE_CONVERSION_MAC_H_ 6 #define UI_BASE_KEYCODES_KEYBOARD_CODE_CONVERSION_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "ui/base/keycodes/keyboard_codes_posix.h" 11 #include "ui/base/keycodes/keyboard_codes_posix.h"
12 #include "ui/ui_api.h" 12 #include "ui/base/ui_export.h"
13 13
14 namespace ui { 14 namespace ui {
15 15
16 // We use windows virtual keycodes throughout our keyboard event related code, 16 // We use windows virtual keycodes throughout our keyboard event related code,
17 // including unit tests. But Mac uses a different set of virtual keycodes. 17 // including unit tests. But Mac uses a different set of virtual keycodes.
18 // This function converts a windows virtual keycode into Mac's virtual key code 18 // This function converts a windows virtual keycode into Mac's virtual key code
19 // and corresponding unicode character. |flags| is the modifiers mask such 19 // and corresponding unicode character. |flags| is the modifiers mask such
20 // as NSControlKeyMask, NSShiftKeyMask, etc. 20 // as NSControlKeyMask, NSShiftKeyMask, etc.
21 // When success, the corresponding Mac's virtual key code will be returned. 21 // When success, the corresponding Mac's virtual key code will be returned.
22 // The corresponding unicode character will be stored in |character|, and the 22 // The corresponding unicode character will be stored in |character|, and the
23 // corresponding unicode character ignoring the modifiers will be stored in 23 // corresponding unicode character ignoring the modifiers will be stored in
24 // |characterIgnoringModifiers|. 24 // |characterIgnoringModifiers|.
25 // -1 will be returned if the keycode can't be converted. 25 // -1 will be returned if the keycode can't be converted.
26 // This function is mainly for simulating keyboard events in unit tests. 26 // This function is mainly for simulating keyboard events in unit tests.
27 // See third_party/WebKit/Source/WebKit/chromium/src/mac/WebInputEventFactory.mm for 27 // See third_party/WebKit/Source/WebKit/chromium/src/mac/WebInputEventFactory.mm for
28 // reverse conversion. 28 // reverse conversion.
29 UI_API int MacKeyCodeForWindowsKeyCode(KeyboardCode keycode, 29 UI_EXPORT int MacKeyCodeForWindowsKeyCode(KeyboardCode keycode,
30 NSUInteger flags, 30 NSUInteger flags,
31 unichar* character, 31 unichar* character,
32 unichar* characterIgnoringModifiers); 32 unichar* characterIgnoringModifiers);
33 33
34 } // namespace ui 34 } // namespace ui
35 35
36 #endif // UI_BASE_KEYCODES_KEYBOARD_CODE_CONVERSION_MAC_H_ 36 #endif // UI_BASE_KEYCODES_KEYBOARD_CODE_CONVERSION_MAC_H_
OLDNEW
« no previous file with comments | « ui/base/keycodes/keyboard_code_conversion_gtk.h ('k') | ui/base/keycodes/keyboard_code_conversion_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698