From a8a5fc9be239973db9ef4590669ae36d588bb4ef Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 27 Aug 2018 18:43:22 +0200 Subject: Add char_to_key_code.h header file Make a corresponding header file for `char_to_key_code.m`. This enables us to include those functions in other source files. --- DomeKey.xcodeproj/project.pbxproj | 2 ++ lib/char_to_key_code.h | 17 +++++++++++++++++ lib/char_to_key_code.m | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 lib/char_to_key_code.h diff --git a/DomeKey.xcodeproj/project.pbxproj b/DomeKey.xcodeproj/project.pbxproj index fb73c83..7d2fb9b 100644 --- a/DomeKey.xcodeproj/project.pbxproj +++ b/DomeKey.xcodeproj/project.pbxproj @@ -76,6 +76,7 @@ D1E101FC2133FA0300B2CA29 /* KeyboardSimulator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KeyboardSimulator.h; sourceTree = ""; }; D1E101FD2133FA0300B2CA29 /* KeyboardSimulator.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KeyboardSimulator.m; sourceTree = ""; }; D1E1020721345E2200B2CA29 /* char_to_key_code.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = char_to_key_code.m; path = lib/char_to_key_code.m; sourceTree = SOURCE_ROOT; }; + D1E102092134611800B2CA29 /* char_to_key_code.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = char_to_key_code.h; path = lib/char_to_key_code.h; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -144,6 +145,7 @@ D1E1020621345DF100B2CA29 /* lib */ = { isa = PBXGroup; children = ( + D1E102092134611800B2CA29 /* char_to_key_code.h */, D1E1020721345E2200B2CA29 /* char_to_key_code.m */, ); name = lib; diff --git a/lib/char_to_key_code.h b/lib/char_to_key_code.h new file mode 100644 index 0000000..40c0c10 --- /dev/null +++ b/lib/char_to_key_code.h @@ -0,0 +1,17 @@ +// +// char_to_key_code.h +// DomeKey +// +// Created by tw on 8/27/18. +// Copyright © 2018 tw. All rights reserved. +// + +#ifndef char_to_key_code_h +#define char_to_key_code_h + +#import + +NSString* keyCodeToString(CGKeyCode keyCode); +NSNumber* charToKeyCode(const char c); + +#endif /* char_to_key_code_h */ diff --git a/lib/char_to_key_code.m b/lib/char_to_key_code.m index 210536d..ab4da15 100644 --- a/lib/char_to_key_code.m +++ b/lib/char_to_key_code.m @@ -1,4 +1,4 @@ -#import +#import "char_to_key_code.h" // Théo Winterhalter // https://stackoverflow.com/users/1275975/th%c3%a9o-winterhalter -- cgit v1.2.3