mirror of
https://github.com/RoCry/blozi-etag.git
synced 2025-12-06 09:02:49 +08:00
Added MacOS drag+drop image transmit over BLE tool
This commit is contained in:
BIN
Image2ESL/.DS_Store
vendored
Normal file
BIN
Image2ESL/.DS_Store
vendored
Normal file
Binary file not shown.
356
Image2ESL/Image2ESL.xcodeproj/project.pbxproj
Normal file
356
Image2ESL/Image2ESL.xcodeproj/project.pbxproj
Normal file
@@ -0,0 +1,356 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 55;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
191C5EBA276E1C100051F53F /* DragDropView.m in Sources */ = {isa = PBXBuildFile; fileRef = 191C5EB8276E1C100051F53F /* DragDropView.m */; };
|
||||
191C5EBB276E1C100051F53F /* MyBLE.m in Sources */ = {isa = PBXBuildFile; fileRef = 191C5EB9276E1C100051F53F /* MyBLE.m */; };
|
||||
191C5EBD277368620051F53F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 191C5EBC277368620051F53F /* Main.storyboard */; };
|
||||
19AF6368276E1AF80022088D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 19AF6367276E1AF80022088D /* AppDelegate.m */; };
|
||||
19AF636B276E1AF80022088D /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 19AF636A276E1AF80022088D /* ViewController.m */; };
|
||||
19AF636D276E1AF90022088D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 19AF636C276E1AF90022088D /* Assets.xcassets */; };
|
||||
19AF6372276E1AF90022088D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 19AF6371276E1AF90022088D /* main.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
191C5EB6276E1C100051F53F /* DragDropView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DragDropView.h; sourceTree = "<group>"; };
|
||||
191C5EB7276E1C100051F53F /* MyBLE.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyBLE.h; sourceTree = "<group>"; };
|
||||
191C5EB8276E1C100051F53F /* DragDropView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DragDropView.m; sourceTree = "<group>"; };
|
||||
191C5EB9276E1C100051F53F /* MyBLE.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyBLE.m; sourceTree = "<group>"; };
|
||||
191C5EBC277368620051F53F /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
|
||||
191C5EC2277390680051F53F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
19AF6363276E1AF80022088D /* Image2ESL.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Image2ESL.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
19AF6366276E1AF80022088D /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||
19AF6367276E1AF80022088D /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
|
||||
19AF6369276E1AF80022088D /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
|
||||
19AF636A276E1AF80022088D /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
|
||||
19AF636C276E1AF90022088D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
19AF6371276E1AF90022088D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
19AF6373276E1AF90022088D /* Image2ESL.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Image2ESL.entitlements; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
19AF6360276E1AF80022088D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
19AF635A276E1AF80022088D = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
19AF6365276E1AF80022088D /* Image2ESL */,
|
||||
19AF6364276E1AF80022088D /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
19AF6364276E1AF80022088D /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
19AF6363276E1AF80022088D /* Image2ESL.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
19AF6365276E1AF80022088D /* Image2ESL */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
191C5EC2277390680051F53F /* Info.plist */,
|
||||
19AF6366276E1AF80022088D /* AppDelegate.h */,
|
||||
19AF6367276E1AF80022088D /* AppDelegate.m */,
|
||||
19AF6369276E1AF80022088D /* ViewController.h */,
|
||||
19AF636A276E1AF80022088D /* ViewController.m */,
|
||||
191C5EB6276E1C100051F53F /* DragDropView.h */,
|
||||
191C5EB8276E1C100051F53F /* DragDropView.m */,
|
||||
191C5EB7276E1C100051F53F /* MyBLE.h */,
|
||||
191C5EB9276E1C100051F53F /* MyBLE.m */,
|
||||
19AF636C276E1AF90022088D /* Assets.xcassets */,
|
||||
191C5EBC277368620051F53F /* Main.storyboard */,
|
||||
19AF6371276E1AF90022088D /* main.m */,
|
||||
19AF6373276E1AF90022088D /* Image2ESL.entitlements */,
|
||||
);
|
||||
path = Image2ESL;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
19AF6362276E1AF80022088D /* Image2ESL */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 19AF6376276E1AF90022088D /* Build configuration list for PBXNativeTarget "Image2ESL" */;
|
||||
buildPhases = (
|
||||
19AF635F276E1AF80022088D /* Sources */,
|
||||
19AF6360276E1AF80022088D /* Frameworks */,
|
||||
19AF6361276E1AF80022088D /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Image2ESL;
|
||||
productName = Image2ESL;
|
||||
productReference = 19AF6363276E1AF80022088D /* Image2ESL.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
19AF635B276E1AF80022088D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = 1;
|
||||
LastUpgradeCheck = 1320;
|
||||
TargetAttributes = {
|
||||
19AF6362276E1AF80022088D = {
|
||||
CreatedOnToolsVersion = 13.2.1;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 19AF635E276E1AF80022088D /* Build configuration list for PBXProject "Image2ESL" */;
|
||||
compatibilityVersion = "Xcode 13.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 19AF635A276E1AF80022088D;
|
||||
productRefGroup = 19AF6364276E1AF80022088D /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
19AF6362276E1AF80022088D /* Image2ESL */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
19AF6361276E1AF80022088D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
191C5EBD277368620051F53F /* Main.storyboard in Resources */,
|
||||
19AF636D276E1AF90022088D /* Assets.xcassets in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
19AF635F276E1AF80022088D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
19AF636B276E1AF80022088D /* ViewController.m in Sources */,
|
||||
19AF6372276E1AF90022088D /* main.m in Sources */,
|
||||
19AF6368276E1AF80022088D /* AppDelegate.m in Sources */,
|
||||
191C5EBA276E1C100051F53F /* DragDropView.m in Sources */,
|
||||
191C5EBB276E1C100051F53F /* MyBLE.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
19AF6374276E1AF90022088D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 12.1;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
19AF6375276E1AF90022088D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 12.1;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
19AF6377276E1AF90022088D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_ENTITLEMENTS = Image2ESL/Image2ESL.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = Image2ESL/Info.plist;
|
||||
INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "Send images to ESL tags";
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright = "";
|
||||
INFOPLIST_KEY_NSMainStoryboardFile = Main;
|
||||
INFOPLIST_KEY_NSPrincipalClass = NSApplication;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 12.1;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = bitbank.Image2ESL;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
19AF6378276E1AF90022088D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_ENTITLEMENTS = Image2ESL/Image2ESL.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = Image2ESL/Info.plist;
|
||||
INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "Send images to ESL tags";
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright = "";
|
||||
INFOPLIST_KEY_NSMainStoryboardFile = Main;
|
||||
INFOPLIST_KEY_NSPrincipalClass = NSApplication;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 12.1;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = bitbank.Image2ESL;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
19AF635E276E1AF80022088D /* Build configuration list for PBXProject "Image2ESL" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
19AF6374276E1AF90022088D /* Debug */,
|
||||
19AF6375276E1AF90022088D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
19AF6376276E1AF90022088D /* Build configuration list for PBXNativeTarget "Image2ESL" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
19AF6377276E1AF90022088D /* Debug */,
|
||||
19AF6378276E1AF90022088D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 19AF635B276E1AF80022088D /* Project object */;
|
||||
}
|
||||
7
Image2ESL/Image2ESL.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
7
Image2ESL/Image2ESL.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Bucket
|
||||
uuid = "1501C540-F74F-4954-B477-74FD2977FD33"
|
||||
type = "1"
|
||||
version = "2.0">
|
||||
<Breakpoints>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
uuid = "1ADD666B-DC80-4EED-B8FD-E7CAB9FCAAC6"
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Image2ESL/ViewController.m"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "70"
|
||||
endingLineNumber = "70"
|
||||
landmarkName = "-TransmitPushed:"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
uuid = "4D656C7F-083A-4981-9666-77F58B0C3A41"
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Image2ESL/MyBLE.m"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "199"
|
||||
endingLineNumber = "199"
|
||||
landmarkName = "-writeData:withLength:withResponse:"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
uuid = "D1CDAACB-4FA6-4A7B-B642-5F44C029F073"
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Image2ESL/MyBLE.m"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "81"
|
||||
endingLineNumber = "81"
|
||||
landmarkName = "-centralManager:didRetrievePeripherals:"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
uuid = "2464379D-8BC0-402D-9701-E474D3F4A151"
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Image2ESL/MyBLE.m"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "74"
|
||||
endingLineNumber = "74"
|
||||
landmarkName = "-centralManager:didRetrievePeripherals:"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
uuid = "EB90A5F6-F36B-429D-A704-94CDFB473475"
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Image2ESL/ViewController.m"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "155"
|
||||
endingLineNumber = "155"
|
||||
landmarkName = "-sendImage"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
uuid = "A7387134-7A8B-4554-8125-983A0A0F6E48"
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Image2ESL/ViewController.m"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "162"
|
||||
endingLineNumber = "162"
|
||||
landmarkName = "-sendImage"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
uuid = "1039F6AA-3456-4783-982C-1BB621D73AE2"
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Image2ESL/ViewController.m"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "137"
|
||||
endingLineNumber = "137"
|
||||
landmarkName = "-DitherImage:width:height:pitch:dither:"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
</Breakpoints>
|
||||
</Bucket>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>SchemeUserState</key>
|
||||
<dict>
|
||||
<key>Image2ESL.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
Image2ESL/Image2ESL/.DS_Store
vendored
Normal file
BIN
Image2ESL/Image2ESL/.DS_Store
vendored
Normal file
Binary file not shown.
13
Image2ESL/Image2ESL/AppDelegate.h
Normal file
13
Image2ESL/Image2ESL/AppDelegate.h
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// AppDelegate.h
|
||||
// Image2ESL
|
||||
//
|
||||
// Created by Larry Bank
|
||||
// Copyright (c) 2021 BitBank Software Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface AppDelegate : NSObject <NSApplicationDelegate>
|
||||
|
||||
@end
|
||||
33
Image2ESL/Image2ESL/AppDelegate.m
Normal file
33
Image2ESL/Image2ESL/AppDelegate.m
Normal file
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// AppDelegate.m
|
||||
// Image2ESL
|
||||
//
|
||||
// Created by Larry Bank
|
||||
// Copyright (c) 2021 BitBank Software Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
@interface AppDelegate ()
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
|
||||
// Insert code here to initialize your application
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (void)applicationWillTerminate:(NSNotification *)aNotification {
|
||||
// Insert code here to tear down your application
|
||||
}
|
||||
|
||||
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "16x16"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "16x16"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "32x32"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "32x32"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "128x128"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "128x128"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "256x256"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "256x256"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "512x512"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "512x512"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
6
Image2ESL/Image2ESL/Assets.xcassets/Contents.json
Normal file
6
Image2ESL/Image2ESL/Assets.xcassets/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
Image2ESL/Image2ESL/Base.lproj/.DS_Store
vendored
Normal file
BIN
Image2ESL/Image2ESL/Base.lproj/.DS_Store
vendored
Normal file
Binary file not shown.
19
Image2ESL/Image2ESL/DragDropView.h
Normal file
19
Image2ESL/Image2ESL/DragDropView.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// DragDropView.h
|
||||
// Image2ESL
|
||||
//
|
||||
// Created by Larry Bank
|
||||
// Copyright (c) 2021 BitBank Software Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@class ViewController;
|
||||
//#import "ViewController.h"
|
||||
|
||||
@interface DragDropView : NSView
|
||||
|
||||
@property (nonatomic, retain) ViewController *myVC;
|
||||
|
||||
@end
|
||||
59
Image2ESL/Image2ESL/DragDropView.m
Normal file
59
Image2ESL/Image2ESL/DragDropView.m
Normal file
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// DragDropView.m
|
||||
// Image2ESL
|
||||
//
|
||||
// Created by Larry Bank
|
||||
// Copyright (c) 2021 BitBank Software Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DragDropView.h"
|
||||
#import "ViewController.h"
|
||||
|
||||
@implementation DragDropView
|
||||
|
||||
|
||||
- (id)initWithFrame:(NSRect)frame{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self registerForDraggedTypes:[NSArray arrayWithObject:NSPasteboardTypeFileURL]];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender{
|
||||
[self setNeedsDisplay: YES];
|
||||
return NSDragOperationGeneric;
|
||||
}
|
||||
|
||||
- (void)draggingExited:(id <NSDraggingInfo>)sender{
|
||||
[self setNeedsDisplay: YES];
|
||||
}
|
||||
|
||||
- (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender {
|
||||
[self setNeedsDisplay: YES];
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
|
||||
{
|
||||
NSPasteboard *pboard = [sender draggingPasteboard];
|
||||
|
||||
if ( [[pboard types] containsObject:NSPasteboardTypeFileURL] ) {
|
||||
NSArray<Class> *classes = @[[NSURL class]];
|
||||
NSDictionary *options = @{};
|
||||
NSArray<NSURL*> *files = [pboard readObjectsForClasses:classes options:options];
|
||||
for (NSURL *url in files) {
|
||||
NSString *str = [url path];
|
||||
if (str != nil)
|
||||
[_myVC processFile: str];
|
||||
}
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)concludeDragOperation:(id <NSDraggingInfo>)sender{
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"PrintFileNotification"
|
||||
object:self userInfo:nil];
|
||||
}
|
||||
|
||||
@end
|
||||
5
Image2ESL/Image2ESL/Image2ESL.entitlements
Normal file
5
Image2ESL/Image2ESL/Image2ESL.entitlements
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict/>
|
||||
</plist>
|
||||
8
Image2ESL/Image2ESL/Info.plist
Normal file
8
Image2ESL/Image2ESL/Info.plist
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFPlugInTypes</key>
|
||||
<dict/>
|
||||
</dict>
|
||||
</plist>
|
||||
786
Image2ESL/Image2ESL/Main.storyboard
Normal file
786
Image2ESL/Image2ESL/Main.storyboard
Normal file
@@ -0,0 +1,786 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="19529" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19529"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Application-->
|
||||
<scene sceneID="JPo-4y-FX3">
|
||||
<objects>
|
||||
<application id="hnw-xV-0zn" sceneMemberID="viewController">
|
||||
<menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
|
||||
<items>
|
||||
<menuItem title="Image2ESL" id="1Xt-HY-uBw">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Image2ESL" systemMenu="apple" id="uQy-DD-JDr">
|
||||
<items>
|
||||
<menuItem title="About Image2ESL" id="5kV-Vb-QxS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
|
||||
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
|
||||
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
|
||||
<menuItem title="Services" id="NMo-om-nkz">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
|
||||
<menuItem title="Hide Image2ESL" keyEquivalent="h" id="Olw-nP-bQN">
|
||||
<connections>
|
||||
<action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="hideOtherApplications:" target="Ady-hI-5gd" id="VT4-aY-XCT"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Show All" id="Kd2-mp-pUS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="unhideAllApplications:" target="Ady-hI-5gd" id="Dhg-Le-xox"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
|
||||
<menuItem title="Quit Image2ESL" keyEquivalent="q" id="4sb-4s-VLi">
|
||||
<connections>
|
||||
<action selector="terminate:" target="Ady-hI-5gd" id="Te7-pn-YzF"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="File" id="dMs-cI-mzQ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="File" id="bib-Uj-vzu">
|
||||
<items>
|
||||
<menuItem title="New" keyEquivalent="n" id="Was-JA-tGl">
|
||||
<connections>
|
||||
<action selector="newDocument:" target="Ady-hI-5gd" id="4Si-XN-c54"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Open…" keyEquivalent="o" id="IAo-SY-fd9">
|
||||
<connections>
|
||||
<action selector="openDocument:" target="Ady-hI-5gd" id="bVn-NM-KNZ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Open Recent" id="tXI-mr-wws">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="oas-Oc-fiZ">
|
||||
<items>
|
||||
<menuItem title="Clear Menu" id="vNY-rz-j42">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="clearRecentDocuments:" target="Ady-hI-5gd" id="Daa-9d-B3U"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>
|
||||
<menuItem title="Close" keyEquivalent="w" id="DVo-aG-piG">
|
||||
<connections>
|
||||
<action selector="performClose:" target="Ady-hI-5gd" id="HmO-Ls-i7Q"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Save…" keyEquivalent="s" id="pxx-59-PXV">
|
||||
<connections>
|
||||
<action selector="saveDocument:" target="Ady-hI-5gd" id="teZ-XB-qJY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Save As…" keyEquivalent="S" id="Bw7-FT-i3A">
|
||||
<connections>
|
||||
<action selector="saveDocumentAs:" target="Ady-hI-5gd" id="mDf-zr-I0C"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Revert to Saved" keyEquivalent="r" id="KaW-ft-85H">
|
||||
<connections>
|
||||
<action selector="revertDocumentToSaved:" target="Ady-hI-5gd" id="iJ3-Pv-kwq"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="aJh-i4-bef"/>
|
||||
<menuItem title="Page Setup…" keyEquivalent="P" id="qIS-W8-SiK">
|
||||
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="runPageLayout:" target="Ady-hI-5gd" id="Din-rz-gC5"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Print…" keyEquivalent="p" id="aTl-1u-JFS">
|
||||
<connections>
|
||||
<action selector="print:" target="Ady-hI-5gd" id="qaZ-4w-aoO"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Edit" id="5QF-Oa-p0T">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Edit" id="W48-6f-4Dl">
|
||||
<items>
|
||||
<menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
|
||||
<connections>
|
||||
<action selector="undo:" target="Ady-hI-5gd" id="M6e-cu-g7V"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
|
||||
<connections>
|
||||
<action selector="redo:" target="Ady-hI-5gd" id="oIA-Rs-6OD"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
|
||||
<menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
|
||||
<connections>
|
||||
<action selector="cut:" target="Ady-hI-5gd" id="YJe-68-I9s"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
|
||||
<connections>
|
||||
<action selector="copy:" target="Ady-hI-5gd" id="G1f-GL-Joy"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
|
||||
<connections>
|
||||
<action selector="paste:" target="Ady-hI-5gd" id="UvS-8e-Qdg"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteAsPlainText:" target="Ady-hI-5gd" id="cEh-KX-wJQ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Delete" id="pa3-QI-u2k">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="delete:" target="Ady-hI-5gd" id="0Mk-Ml-PaM"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
|
||||
<connections>
|
||||
<action selector="selectAll:" target="Ady-hI-5gd" id="VNm-Mi-diN"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/>
|
||||
<menuItem title="Find" id="4EN-yA-p0u">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Find" id="1b7-l0-nxx">
|
||||
<items>
|
||||
<menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="cD7-Qs-BN4"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="WD3-Gg-5AJ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="NDo-RZ-v9R"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="HOh-sY-3ay"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="U76-nv-p5D"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
|
||||
<connections>
|
||||
<action selector="centerSelectionInVisibleArea:" target="Ady-hI-5gd" id="IOG-6D-g5B"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
|
||||
<items>
|
||||
<menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
|
||||
<connections>
|
||||
<action selector="showGuessPanel:" target="Ady-hI-5gd" id="vFj-Ks-hy3"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
|
||||
<connections>
|
||||
<action selector="checkSpelling:" target="Ady-hI-5gd" id="fz7-VC-reM"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="bNw-od-mp5"/>
|
||||
<menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleContinuousSpellChecking:" target="Ady-hI-5gd" id="7w6-Qz-0kB"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleGrammarChecking:" target="Ady-hI-5gd" id="muD-Qn-j4w"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticSpellingCorrection:" target="Ady-hI-5gd" id="2lM-Qi-WAP"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Substitutions" id="9ic-FL-obx">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
|
||||
<items>
|
||||
<menuItem title="Show Substitutions" id="z6F-FW-3nz">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="orderFrontSubstitutionsPanel:" target="Ady-hI-5gd" id="oku-mr-iSq"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/>
|
||||
<menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleSmartInsertDelete:" target="Ady-hI-5gd" id="3IJ-Se-DZD"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Quotes" id="hQb-2v-fYv">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticQuoteSubstitution:" target="Ady-hI-5gd" id="ptq-xd-QOA"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Dashes" id="rgM-f4-ycn">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticDashSubstitution:" target="Ady-hI-5gd" id="oCt-pO-9gS"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Links" id="cwL-P1-jid">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticLinkDetection:" target="Ady-hI-5gd" id="Gip-E3-Fov"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Data Detectors" id="tRr-pd-1PS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticDataDetection:" target="Ady-hI-5gd" id="R1I-Nq-Kbl"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Text Replacement" id="HFQ-gK-NFA">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticTextReplacement:" target="Ady-hI-5gd" id="DvP-Fe-Py6"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Transformations" id="2oI-Rn-ZJC">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Transformations" id="c8a-y6-VQd">
|
||||
<items>
|
||||
<menuItem title="Make Upper Case" id="vmV-6d-7jI">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="uppercaseWord:" target="Ady-hI-5gd" id="sPh-Tk-edu"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Make Lower Case" id="d9M-CD-aMd">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="lowercaseWord:" target="Ady-hI-5gd" id="iUZ-b5-hil"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Capitalize" id="UEZ-Bs-lqG">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="capitalizeWord:" target="Ady-hI-5gd" id="26H-TL-nsh"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Speech" id="xrE-MZ-jX0">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Speech" id="3rS-ZA-NoH">
|
||||
<items>
|
||||
<menuItem title="Start Speaking" id="Ynk-f8-cLZ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="startSpeaking:" target="Ady-hI-5gd" id="654-Ng-kyl"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Stop Speaking" id="Oyz-dy-DGm">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="stopSpeaking:" target="Ady-hI-5gd" id="dX8-6p-jy9"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Format" id="jxT-CU-nIS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Format" id="GEO-Iw-cKr">
|
||||
<items>
|
||||
<menuItem title="Font" id="Gi5-1S-RQB">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Font" systemMenu="font" id="aXa-aM-Jaq">
|
||||
<items>
|
||||
<menuItem title="Show Fonts" keyEquivalent="t" id="Q5e-8K-NDq">
|
||||
<connections>
|
||||
<action selector="orderFrontFontPanel:" target="YLy-65-1bz" id="WHr-nq-2xA"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Bold" tag="2" keyEquivalent="b" id="GB9-OM-e27">
|
||||
<connections>
|
||||
<action selector="addFontTrait:" target="YLy-65-1bz" id="hqk-hr-sYV"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Italic" tag="1" keyEquivalent="i" id="Vjx-xi-njq">
|
||||
<connections>
|
||||
<action selector="addFontTrait:" target="YLy-65-1bz" id="IHV-OB-c03"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Underline" keyEquivalent="u" id="WRG-CD-K1S">
|
||||
<connections>
|
||||
<action selector="underline:" target="Ady-hI-5gd" id="FYS-2b-JAY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="5gT-KC-WSO"/>
|
||||
<menuItem title="Bigger" tag="3" keyEquivalent="+" id="Ptp-SP-VEL">
|
||||
<connections>
|
||||
<action selector="modifyFont:" target="YLy-65-1bz" id="Uc7-di-UnL"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smaller" tag="4" keyEquivalent="-" id="i1d-Er-qST">
|
||||
<connections>
|
||||
<action selector="modifyFont:" target="YLy-65-1bz" id="HcX-Lf-eNd"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="kx3-Dk-x3B"/>
|
||||
<menuItem title="Kern" id="jBQ-r6-VK2">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Kern" id="tlD-Oa-oAM">
|
||||
<items>
|
||||
<menuItem title="Use Default" id="GUa-eO-cwY">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useStandardKerning:" target="Ady-hI-5gd" id="6dk-9l-Ckg"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use None" id="cDB-IK-hbR">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="turnOffKerning:" target="Ady-hI-5gd" id="U8a-gz-Maa"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Tighten" id="46P-cB-AYj">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="tightenKerning:" target="Ady-hI-5gd" id="hr7-Nz-8ro"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Loosen" id="ogc-rX-tC1">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="loosenKerning:" target="Ady-hI-5gd" id="8i4-f9-FKE"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Ligatures" id="o6e-r0-MWq">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Ligatures" id="w0m-vy-SC9">
|
||||
<items>
|
||||
<menuItem title="Use Default" id="agt-UL-0e3">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useStandardLigatures:" target="Ady-hI-5gd" id="7uR-wd-Dx6"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use None" id="J7y-lM-qPV">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="turnOffLigatures:" target="Ady-hI-5gd" id="iX2-gA-Ilz"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use All" id="xQD-1f-W4t">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useAllLigatures:" target="Ady-hI-5gd" id="KcB-kA-TuK"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Baseline" id="OaQ-X3-Vso">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Baseline" id="ijk-EB-dga">
|
||||
<items>
|
||||
<menuItem title="Use Default" id="3Om-Ey-2VK">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="unscript:" target="Ady-hI-5gd" id="0vZ-95-Ywn"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Superscript" id="Rqc-34-cIF">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="superscript:" target="Ady-hI-5gd" id="3qV-fo-wpU"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Subscript" id="I0S-gh-46l">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="subscript:" target="Ady-hI-5gd" id="Q6W-4W-IGz"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Raise" id="2h7-ER-AoG">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="raiseBaseline:" target="Ady-hI-5gd" id="4sk-31-7Q9"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Lower" id="1tx-W0-xDw">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="lowerBaseline:" target="Ady-hI-5gd" id="OF1-bc-KW4"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="Ndw-q3-faq"/>
|
||||
<menuItem title="Show Colors" keyEquivalent="C" id="bgn-CT-cEk">
|
||||
<connections>
|
||||
<action selector="orderFrontColorPanel:" target="Ady-hI-5gd" id="mSX-Xz-DV3"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="iMs-zA-UFJ"/>
|
||||
<menuItem title="Copy Style" keyEquivalent="c" id="5Vv-lz-BsD">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="copyFont:" target="Ady-hI-5gd" id="GJO-xA-L4q"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste Style" keyEquivalent="v" id="vKC-jM-MkH">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteFont:" target="Ady-hI-5gd" id="JfD-CL-leO"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Text" id="Fal-I4-PZk">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Text" id="d9c-me-L2H">
|
||||
<items>
|
||||
<menuItem title="Align Left" keyEquivalent="{" id="ZM1-6Q-yy1">
|
||||
<connections>
|
||||
<action selector="alignLeft:" target="Ady-hI-5gd" id="zUv-R1-uAa"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Center" keyEquivalent="|" id="VIY-Ag-zcb">
|
||||
<connections>
|
||||
<action selector="alignCenter:" target="Ady-hI-5gd" id="spX-mk-kcS"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Justify" id="J5U-5w-g23">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="alignJustified:" target="Ady-hI-5gd" id="ljL-7U-jND"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Align Right" keyEquivalent="}" id="wb2-vD-lq4">
|
||||
<connections>
|
||||
<action selector="alignRight:" target="Ady-hI-5gd" id="r48-bG-YeY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="4s2-GY-VfK"/>
|
||||
<menuItem title="Writing Direction" id="H1b-Si-o9J">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Writing Direction" id="8mr-sm-Yjd">
|
||||
<items>
|
||||
<menuItem title="Paragraph" enabled="NO" id="ZvO-Gk-QUH">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem id="YGs-j5-SAR">
|
||||
<string key="title"> Default</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionNatural:" target="Ady-hI-5gd" id="qtV-5e-UBP"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="Lbh-J2-qVU">
|
||||
<string key="title"> Left to Right</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="S0X-9S-QSf"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="jFq-tB-4Kx">
|
||||
<string key="title"> Right to Left</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="5fk-qB-AqJ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="swp-gr-a21"/>
|
||||
<menuItem title="Selection" enabled="NO" id="cqv-fj-IhA">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem id="Nop-cj-93Q">
|
||||
<string key="title"> Default</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionNatural:" target="Ady-hI-5gd" id="lPI-Se-ZHp"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="BgM-ve-c93">
|
||||
<string key="title"> Left to Right</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="caW-Bv-w94"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="RB4-Sm-HuC">
|
||||
<string key="title"> Right to Left</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="EXD-6r-ZUu"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="fKy-g9-1gm"/>
|
||||
<menuItem title="Show Ruler" id="vLm-3I-IUL">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleRuler:" target="Ady-hI-5gd" id="FOx-HJ-KwY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Copy Ruler" keyEquivalent="c" id="MkV-Pr-PK5">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="copyRuler:" target="Ady-hI-5gd" id="71i-fW-3W2"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste Ruler" keyEquivalent="v" id="LVM-kO-fVI">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteRuler:" target="Ady-hI-5gd" id="cSh-wd-qM2"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="View" id="H8h-7b-M4v">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="View" id="HyV-fh-RgO">
|
||||
<items>
|
||||
<menuItem title="Show Toolbar" keyEquivalent="t" id="snW-S8-Cw5">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleToolbarShown:" target="Ady-hI-5gd" id="BXY-wc-z0C"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Customize Toolbar…" id="1UK-8n-QPP">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="runToolbarCustomizationPalette:" target="Ady-hI-5gd" id="pQI-g3-MTW"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="hB3-LF-h0Y"/>
|
||||
<menuItem title="Show Sidebar" keyEquivalent="s" id="kIP-vf-haE">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleSidebar:" target="Ady-hI-5gd" id="iwa-gc-5KM"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleFullScreen:" target="Ady-hI-5gd" id="dU3-MA-1Rq"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Window" id="aUF-d1-5bR">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
|
||||
<items>
|
||||
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
|
||||
<connections>
|
||||
<action selector="performMiniaturize:" target="Ady-hI-5gd" id="VwT-WD-YPe"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Zoom" id="R4o-n2-Eq4">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="performZoom:" target="Ady-hI-5gd" id="DIl-cC-cCs"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
|
||||
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="arrangeInFront:" target="Ady-hI-5gd" id="DRN-fu-gQh"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Help" id="wpr-3q-Mcd">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
|
||||
<items>
|
||||
<menuItem title="Image2ESL Help" keyEquivalent="?" id="FKE-Sm-Kum">
|
||||
<connections>
|
||||
<action selector="showHelp:" target="Ady-hI-5gd" id="y7X-2Q-9no"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/>
|
||||
</connections>
|
||||
</application>
|
||||
<customObject id="Voe-Tx-rLC" customClass="AppDelegate"/>
|
||||
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
|
||||
<customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="75" y="0.0"/>
|
||||
</scene>
|
||||
<!--Window Controller-->
|
||||
<scene sceneID="R2V-B0-nI4">
|
||||
<objects>
|
||||
<windowController id="B8D-0N-5wS" sceneMemberID="viewController">
|
||||
<window key="window" title="Image2ESL" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="196" y="240" width="480" height="270"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="B8D-0N-5wS" id="98r-iN-zZc"/>
|
||||
</connections>
|
||||
</window>
|
||||
<connections>
|
||||
<segue destination="XfG-lQ-9wD" kind="relationship" relationship="window.shadowedContentViewController" id="cq2-FE-JQM"/>
|
||||
</connections>
|
||||
</windowController>
|
||||
<customObject id="Oky-zY-oP4" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="75" y="250"/>
|
||||
</scene>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="hIz-AP-VOD">
|
||||
<objects>
|
||||
<viewController id="XfG-lQ-9wD" customClass="ViewController" sceneMemberID="viewController">
|
||||
<view key="view" id="m2S-Jp-Qdl">
|
||||
<rect key="frame" x="0.0" y="0.0" width="640" height="480"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="rga-zO-Ac4">
|
||||
<rect key="frame" x="36" y="433" width="85" height="32"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="push" title="Connect" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Mbh-Sd-bfa">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="ConnectPushed:" target="XfG-lQ-9wD" id="z64-do-UO9"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="jeq-af-i1g">
|
||||
<rect key="frame" x="520" y="433" width="85" height="32"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="push" title="Send" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="zur-6x-z3a">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="TransmitPushed:" target="XfG-lQ-9wD" id="CJm-ow-CN7"/>
|
||||
</connections>
|
||||
</button>
|
||||
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Tbk-tW-0yl" customClass="DragDropView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="640" height="480"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Cg3-ap-Mtc">
|
||||
<rect key="frame" x="32" y="26" width="576" height="400"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" id="0sY-8m-yCI"/>
|
||||
</imageView>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Zys-OO-ldj">
|
||||
<rect key="frame" x="117" y="444" width="407" height="16"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="Connect, then drop an image here" id="YJt-pB-cZE">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6BC-bo-6dw">
|
||||
<rect key="frame" x="520" y="399" width="85" height="32"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="push" title="Erase" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="HlI-n9-iHH">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="FeedPushed:" target="XfG-lQ-9wD" id="1kl-WU-vGC"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3Pt-xg-CtN">
|
||||
<rect key="frame" x="41" y="405" width="88" height="18"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="check" title="Dither" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="rQR-9o-KBP">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
</button>
|
||||
</subviews>
|
||||
</customView>
|
||||
</subviews>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="DitherCheck" destination="rQR-9o-KBP" id="dN9-Lg-QK1"/>
|
||||
<outlet property="StatusLabel" destination="Zys-OO-ldj" id="UMQ-Cb-uEF"/>
|
||||
<outlet property="myImage" destination="Cg3-ap-Mtc" id="emA-AS-2a8"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="75" y="655"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
36
Image2ESL/Image2ESL/MyBLE.h
Normal file
36
Image2ESL/Image2ESL/MyBLE.h
Normal file
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// MyBLE.h
|
||||
// Image2ESL
|
||||
//
|
||||
// Created by Larry Bank
|
||||
// Copyright (c) 2021 BitBank Software Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "CoreBluetooth/CoreBluetooth.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MyBLE : NSObject <CBCentralManagerDelegate>
|
||||
|
||||
@property (nonatomic, strong) CBCentralManager *centralManager;
|
||||
|
||||
- (instancetype)init;
|
||||
- (void)startScan;
|
||||
- (void)writeData: (uint8_t *)pData withLength:(int)len withResponse:(bool)response;
|
||||
- (NSString *)getName;
|
||||
- (bool)isConnected;
|
||||
|
||||
@property (retain) NSMutableArray *discoveredPeripherals;
|
||||
@property (strong, nonatomic) CBCentralManager * manager;
|
||||
@property (atomic) int count;
|
||||
@property (nonatomic) dispatch_queue_t bleQueue;
|
||||
@property (nonatomic) CBPeripheral *myPeripheral;
|
||||
@property (nonatomic) CBCharacteristic *myChar;
|
||||
@property (nonatomic) bool bConnected;
|
||||
@property (copy) NSString *manufacturer;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
206
Image2ESL/Image2ESL/MyBLE.m
Normal file
206
Image2ESL/Image2ESL/MyBLE.m
Normal file
@@ -0,0 +1,206 @@
|
||||
//
|
||||
// MyBLE.m
|
||||
// Image2ESL
|
||||
//
|
||||
// Created by Larry Bank
|
||||
// Copyright (c) 2021 BitBank Software Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MyBLE.h"
|
||||
|
||||
static NSString *ESLService = @"13187b10-eba9-a3ba-044e-83d3217d9a38";
|
||||
static NSString *ESLChar = @"4b646063-6264-f3a7-8941-e65356ea82fe";
|
||||
|
||||
@implementation MyBLE
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
_bConnected = false;
|
||||
self.centralManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil];
|
||||
// return [self initWithQueue:nil];
|
||||
self.discoveredPeripherals = [NSMutableArray array];
|
||||
self = [super init];
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[self.centralManager stopScan];
|
||||
// [_manager dealloc]
|
||||
}
|
||||
|
||||
- (bool)isConnected
|
||||
{
|
||||
return _bConnected;
|
||||
} /* isConnected */
|
||||
|
||||
- (NSString *)getName
|
||||
{
|
||||
return [_myPeripheral name];
|
||||
} /* getName */
|
||||
|
||||
- (void)centralManager:(CBCentralManager *)central
|
||||
didDiscoverPeripheral:(CBPeripheral *)aPeripheral
|
||||
advertisementData:(NSDictionary *)advertisementData
|
||||
RSSI:(NSNumber *)RSSI
|
||||
{
|
||||
NSMutableArray *peripherals = [self mutableArrayValueForKey:@"discoveredPeripherals"];
|
||||
const char* deviceName = [[aPeripheral name] cStringUsingEncoding:NSASCIIStringEncoding];
|
||||
|
||||
if (deviceName) printf("Found device: %s\n", deviceName);
|
||||
if( deviceName && ![self.discoveredPeripherals containsObject:aPeripheral])
|
||||
{
|
||||
// check if it's one of the supported name
|
||||
if (memcmp(deviceName, "ESL", 3) == 0) {
|
||||
printf("Found a supported e-ink label: %s, connecting...\n", deviceName);
|
||||
[peripherals addObject:aPeripheral];
|
||||
[self.discoveredPeripherals addObject:aPeripheral];
|
||||
[self connectToPeripheral: aPeripheral];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
- (void) centralManager: (CBCentralManager *)central
|
||||
didConnectPeripheral: (CBPeripheral *)aPeripheral
|
||||
{
|
||||
[aPeripheral setDelegate:self];
|
||||
[aPeripheral discoverServices:nil];
|
||||
}
|
||||
|
||||
- (void) centralManager:(CBCentralManager *)central
|
||||
didRetrievePeripherals:(NSArray *)peripherals
|
||||
{
|
||||
NSLog(@"Retrieved peripheral: %lu - %@", [peripherals count], peripherals);
|
||||
|
||||
[self.centralManager stopScan];
|
||||
|
||||
/* If there are any known devices, automatically connect to it.*/
|
||||
if([peripherals count] >=1)
|
||||
{
|
||||
_myPeripheral = [peripherals objectAtIndex:0];
|
||||
[self.centralManager connectPeripheral:_myPeripheral
|
||||
options:nil];
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
- (void)centralManagerDidUpdateState:(CBCentralManager *)manager
|
||||
{
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// Invoked whenever an existing connection with the peripheral is torn down.
|
||||
- (void) centralManager: (CBCentralManager *)central
|
||||
didDisconnectPeripheral: (CBPeripheral *)aPeripheral
|
||||
error: (NSError *)error
|
||||
{
|
||||
printf("didDisconnectPeripheral\n");
|
||||
_bConnected = NO;
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"StatusChangedNotification"
|
||||
object:self userInfo:nil];
|
||||
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/// Invoked whenever the central manager fails to create a connection with the peripheral.
|
||||
- (void) centralManager: (CBCentralManager *)central didFailToConnectPeripheral:(CBPeripheral *)aPeripheral
|
||||
error:(NSError *)error
|
||||
{
|
||||
NSLog(@"Fail to connect to peripheral: %@ with error = %@", aPeripheral, [error localizedDescription]);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
- (void) startScan
|
||||
{
|
||||
NSLog(@"Start scanning");
|
||||
|
||||
[self.centralManager scanForPeripheralsWithServices: nil options: nil];
|
||||
} /* startScan */
|
||||
|
||||
- (void) connectToPeripheral: (CBPeripheral *)aPeripheral
|
||||
{
|
||||
[self.centralManager stopScan];
|
||||
_myPeripheral = aPeripheral;
|
||||
NSDictionary *connectOptions = @{
|
||||
CBConnectPeripheralOptionNotifyOnConnectionKey: @YES,
|
||||
CBConnectPeripheralOptionNotifyOnDisconnectionKey: @YES,
|
||||
CBConnectPeripheralOptionNotifyOnNotificationKey: @YES,
|
||||
// CBConnectPeripheralOptionEnableTransportBridgingKey:,
|
||||
// CBConnectPeripheralOptionRequiresANCS:,
|
||||
CBConnectPeripheralOptionStartDelayKey: @0
|
||||
};
|
||||
[self.centralManager connectPeripheral:_myPeripheral options:connectOptions];
|
||||
}
|
||||
|
||||
// Invoked upon completion of a -[discoverServices:] request.
|
||||
// Discover available characteristics on interested services
|
||||
- (void) peripheral: (CBPeripheral *)aPeripheral
|
||||
didDiscoverServices:(NSError *)error
|
||||
{
|
||||
for (CBService *aService in aPeripheral.services)
|
||||
{
|
||||
NSLog(@"Service found with UUID: %@", aService.UUID);
|
||||
[aPeripheral discoverCharacteristics:nil forService:aService];
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// Invoked upon completion of a -[discoverCharacteristics:forService:] request.
|
||||
// Perform appropriate operations on interested characteristics
|
||||
- (void) peripheral: (CBPeripheral *)aPeripheral didDiscoverCharacteristicsForService:(CBService *)service error:(NSError *)error
|
||||
{
|
||||
for (CBCharacteristic *aChar in service.characteristics)
|
||||
{
|
||||
NSLog(@"Service: %@ with Char: %@", [aChar service].UUID, aChar.UUID);
|
||||
CBUUID *theSvc = [CBUUID UUIDWithString:ESLService];
|
||||
CBUUID *theChr = [CBUUID UUIDWithString:ESLChar];
|
||||
if ([[aChar service].UUID isEqual:theSvc] && [aChar.UUID isEqual:theChr]) {
|
||||
printf("Found the service+char we're looking for!\n");
|
||||
_myChar = aChar; // keep these since we will need them for communicating
|
||||
_bConnected = YES; // indicates that we're ready to send data
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"StatusChangedNotification"
|
||||
object:self userInfo:nil];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Invoked upon completion of a -[readValueForCharacteristic:] request or on the reception of a notification/indication.
|
||||
- (void) peripheral: (CBPeripheral *)aPeripheral didUpdateValueForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error
|
||||
{
|
||||
[self printCharacteristicData:characteristic];
|
||||
}
|
||||
|
||||
- (void) printCharacteristicData: (CBCharacteristic *)characteristic
|
||||
{
|
||||
#if DEBUG_MODE
|
||||
NSLog(@"Read Characteristics: %@", characteristic.UUID);
|
||||
NSLog(@"%@", [characteristic description]);
|
||||
#endif
|
||||
NSData * updatedValue = characteristic.value;
|
||||
printf("%s\n",(char*)updatedValue.bytes);
|
||||
}
|
||||
|
||||
- (void) peripheral: (CBPeripheral *)peripheral didDiscoverDescriptorsForCharacteristic:(CBDescriptor *)descriptor error:(NSError *)error
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
- (void)peripheral: (CBPeripheral *)peripheral didUpdateNotificationStateForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error
|
||||
{
|
||||
|
||||
}
|
||||
- (void)peripheral: (CBPeripheral *)peripheral didModifyServices:(NSArray<CBService *> *)invalidatedServices
|
||||
{
|
||||
exit(0);
|
||||
}
|
||||
|
||||
- (void)writeData: (uint8_t *)pData withLength:(int)len withResponse:(bool)response
|
||||
{
|
||||
NSData *myData = [NSData dataWithBytes:pData length:len];
|
||||
|
||||
if (response)
|
||||
[_myPeripheral writeValue:myData forCharacteristic:_myChar type:CBCharacteristicWriteWithResponse];
|
||||
else
|
||||
[_myPeripheral writeValue:myData forCharacteristic:_myChar type:CBCharacteristicWriteWithoutResponse];
|
||||
|
||||
} /* writeData */
|
||||
|
||||
@end
|
||||
27
Image2ESL/Image2ESL/ViewController.h
Normal file
27
Image2ESL/Image2ESL/ViewController.h
Normal file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// ViewController.h
|
||||
// Image2ESL
|
||||
//
|
||||
// Created by Larry Bank
|
||||
// Copyright (c) 2021 BitBank Software Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "DragDropView.h"
|
||||
#import "MyBLE.h"
|
||||
|
||||
@interface ViewController : NSViewController
|
||||
|
||||
@property (nonatomic, retain) DragDropView *myview;
|
||||
@property (nonatomic) NSString *filename;
|
||||
@property (weak) IBOutlet NSImageView *myImage;
|
||||
@property (weak) IBOutlet NSTextField *StatusLabel;
|
||||
@property (weak) IBOutlet NSButtonCell *DitherCheck;
|
||||
|
||||
// Process a new file
|
||||
- (void)processFile:(NSString *)path;
|
||||
- (void)ditherFile:(NSNotification *) notification;
|
||||
- (uint8_t *)DitherImage:(uint8_t*)pPixels width:(int)iWidth height:(int)iHeight pitch:(int)iSrcPitch dither:(bool)bDither;
|
||||
- (void) sendImage;
|
||||
@end
|
||||
|
||||
278
Image2ESL/Image2ESL/ViewController.m
Normal file
278
Image2ESL/Image2ESL/ViewController.m
Normal file
@@ -0,0 +1,278 @@
|
||||
//
|
||||
// ViewController.m
|
||||
// Image2ESL
|
||||
//
|
||||
// Created by Larry Bank
|
||||
// Copyright (c) 2021 BitBank Software Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ViewController.h"
|
||||
#import "MyBLE.h"
|
||||
|
||||
MyBLE *BLEClass;
|
||||
uint8_t contrast_lookup[256];
|
||||
static uint8_t *pDithered = NULL; // Dithered image data ready to print
|
||||
static int iWidth, iHeight; // size of the image that's ready to print
|
||||
|
||||
@implementation ViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
// Do any additional setup after loading the view.
|
||||
BLEClass = [[MyBLE alloc] init];
|
||||
|
||||
_myview = [DragDropView alloc];
|
||||
_myview.myVC = self; // give DragDropView access to our methods
|
||||
[[self view] addSubview:_myview];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(ditherFile:)
|
||||
name:@"PrintFileNotification"
|
||||
object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(statusChanged:)
|
||||
name:@"StatusChangedNotification"
|
||||
object:nil];
|
||||
|
||||
// [BLEClass startScan]; // scan and connect to any printers in the area
|
||||
}
|
||||
|
||||
- (void)viewDidLayout {
|
||||
// the outer frame size is known here, so set our drag/drop frame to the same size
|
||||
|
||||
// _myview.frame = NSMakeRect(0, 0, self.view.frame.size.width, self.view.frame.size.height);
|
||||
|
||||
[_myview initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
|
||||
}
|
||||
- (void)setRepresentedObject:(id)representedObject {
|
||||
[super setRepresentedObject:representedObject];
|
||||
|
||||
// Update the view, if already loaded.
|
||||
}
|
||||
- (IBAction)FeedPushed:(NSButton *)sender {
|
||||
NSLog(@"Erase!");
|
||||
uint8_t ucTemp[4];
|
||||
ucTemp[0] = 0x00; // erase memory
|
||||
ucTemp[1] = 0xff; // to white
|
||||
[BLEClass writeData:ucTemp withLength:2 withResponse:NO];
|
||||
[NSThread sleepForTimeInterval: 0.01];
|
||||
ucTemp[0] = 0x01; // send memory image to EPD
|
||||
[BLEClass writeData:ucTemp withLength:1 withResponse:NO];
|
||||
}
|
||||
- (IBAction)ConnectPushed:(NSButton *)sender {
|
||||
NSLog(@"Connect!");
|
||||
[BLEClass startScan];
|
||||
}
|
||||
|
||||
- (IBAction)TransmitPushed:(NSButton *)sender {
|
||||
NSLog(@"Send!");
|
||||
[self sendImage];
|
||||
}
|
||||
|
||||
// Process a new file
|
||||
- (void)processFile:(NSString *)path
|
||||
{
|
||||
_filename = [[NSString alloc] initWithString:path];
|
||||
NSLog(@"User dropped file %@", _filename);
|
||||
|
||||
} /* processFile */
|
||||
|
||||
- (uint8_t *)DitherImage:(uint8_t*)pPixels width:(int)iWidth height:(int)iHeight pitch:(int)iSrcPitch dither:(bool)bDither
|
||||
{
|
||||
int x, y, xmask=0, iDestPitch=0;
|
||||
int32_t cNew, lFErr, v=0, h;
|
||||
int32_t e1,e2,e3,e4;
|
||||
uint8_t cOut; // forward errors for gray
|
||||
uint8_t *pSrc, *pDest, *errors, *pErrors=NULL, *d, *s; // destination 8bpp image
|
||||
uint8_t pixelmask=0, shift=0;
|
||||
uint8_t ucTemp[640];
|
||||
|
||||
errors = ucTemp; // plenty of space here for the bitmaps we'll generate
|
||||
memset(ucTemp, 0, sizeof(ucTemp));
|
||||
pSrc = pPixels; // write the new pixels over the original
|
||||
iDestPitch = (iWidth+7)/8;
|
||||
pDest = (uint8_t *)malloc(iDestPitch * iHeight);
|
||||
pixelmask = 0x80;
|
||||
shift = 1;
|
||||
xmask = 7;
|
||||
for (y=0; y<iHeight; y++)
|
||||
{
|
||||
s = &pSrc[y * iSrcPitch];
|
||||
d = &pDest[y * iDestPitch];
|
||||
pErrors = &errors[1]; // point to second pixel to avoid boundary check
|
||||
lFErr = 0;
|
||||
cOut = 0;
|
||||
for (x=0; x<iWidth; x++)
|
||||
{
|
||||
cNew = *s++; // get grayscale uint8_t pixel
|
||||
if (bDither) {
|
||||
cNew = (cNew * 2)/3; // make white end of spectrum less "blown out"
|
||||
// add forward error
|
||||
cNew += lFErr;
|
||||
if (cNew > 255) cNew = 255; // clip to uint8_t
|
||||
}
|
||||
cOut <<= shift; // pack new pixels into a byte
|
||||
cOut |= (cNew >> (8-shift)); // keep top N bits
|
||||
if ((x & xmask) == xmask) // store it when the byte is full
|
||||
{
|
||||
*d++ = ~cOut; // color is inverted
|
||||
cOut = 0;
|
||||
}
|
||||
// calculate the Floyd-Steinberg error for this pixel
|
||||
v = cNew - (cNew & pixelmask); // new error for N-bit gray output (always positive)
|
||||
h = v >> 1;
|
||||
e1 = (7*h)>>3; // 7/16
|
||||
e2 = h - e1; // 1/16
|
||||
e3 = (5*h) >> 3; // 5/16
|
||||
e4 = h - e3; // 3/16
|
||||
// distribute error to neighbors
|
||||
lFErr = e1 + pErrors[1];
|
||||
pErrors[1] = (uint8_t)e2;
|
||||
pErrors[0] += e3;
|
||||
pErrors[-1] += e4;
|
||||
pErrors++;
|
||||
} // for x
|
||||
cOut <<= (8-(x & 7));
|
||||
*d++ = ~cOut; // store partial byte
|
||||
} // for y
|
||||
return pDest;
|
||||
} /* DitherImage */
|
||||
|
||||
//
|
||||
// Send the image that was previously dithered
|
||||
// to the connected ESL
|
||||
//
|
||||
- (void)sendImage
|
||||
{
|
||||
uint8_t uc, ucSrcMask, ucDestMask, *s, *d, ucTemp[32]; // holds each packet to send
|
||||
int iPitch = (iHeight+7)/8;
|
||||
int x, y;
|
||||
|
||||
if (pDithered == NULL) return; // no image to send
|
||||
|
||||
// Now send it to the ESL
|
||||
ucTemp[0] = 0x02; // set byte pos
|
||||
ucTemp[1] = ucTemp[2] = 0; // start of image
|
||||
[BLEClass writeData:ucTemp withLength:3 withResponse:NO];
|
||||
[NSThread sleepForTimeInterval: 0.01];
|
||||
// transmit it rotated since the memory is laid out 90 degrees clockwise rotated
|
||||
ucTemp[0] = 0x03; // image data
|
||||
for (x=iWidth-1; x>=0; x--) {
|
||||
ucSrcMask = (0x80 >> (x&7));
|
||||
uc = 0xff;
|
||||
ucDestMask = 0x80;
|
||||
s = &pDithered[x>>3];
|
||||
d = &ucTemp[1];
|
||||
for (y=0; y<iHeight; y++) { // form the bytes of each line
|
||||
if (s[0] & ucSrcMask)
|
||||
uc &= ~ucDestMask;
|
||||
ucDestMask >>= 1;
|
||||
if (ucDestMask == 0) {
|
||||
*d++ = uc; // store 8 bits of output
|
||||
uc = 0xff;
|
||||
ucDestMask = 0x80;
|
||||
}
|
||||
s += ((iWidth+7)>>3);
|
||||
} // for y
|
||||
*d++ = uc; // store last partial byte
|
||||
[BLEClass writeData:ucTemp withLength:(iPitch+1) withResponse:NO];
|
||||
[NSThread sleepForTimeInterval: 0.005];
|
||||
} // for x
|
||||
ucTemp[0] = 0x01; // display the new image data
|
||||
[BLEClass writeData:ucTemp withLength:1 withResponse:NO];
|
||||
|
||||
} /* sendImage */
|
||||
|
||||
- (void)statusChanged:(NSNotification *) notification
|
||||
{
|
||||
if ([BLEClass isConnected]) {
|
||||
_StatusLabel.stringValue = [NSString stringWithFormat:@"Connected to: %@", [BLEClass getName]];
|
||||
} else {
|
||||
_StatusLabel.stringValue = @"Disconnected";
|
||||
}
|
||||
} /* statusChanged */
|
||||
|
||||
- (void)ditherFile:(NSNotification *) notification
|
||||
{
|
||||
// load the file into an image object
|
||||
NSData *theFileData = [[NSData alloc] initWithContentsOfFile:_filename options: NSDataReadingMappedAlways error: nil]; // read file into memory
|
||||
if (theFileData) {
|
||||
// decode the image into a bitmap
|
||||
NSBitmapImageRep *bitmap = [[NSBitmapImageRep alloc] initWithData:theFileData];
|
||||
if (bitmap) {
|
||||
// convert to grayscale
|
||||
NSColorSpace *targetColorSpace = [NSColorSpace genericGrayColorSpace];
|
||||
NSBitmapImageRep *grayBitmap = [bitmap bitmapImageRepByConvertingToColorSpace: targetColorSpace renderingIntent: NSColorRenderingIntentDefault];
|
||||
|
||||
int iOriginalWidth, iOriginalHeight;
|
||||
iOriginalWidth = bitmap.size.width;
|
||||
iOriginalHeight = bitmap.size.height;
|
||||
iWidth = 250; // ESL width in pixels
|
||||
iHeight = 122;
|
||||
NSSize newSize;
|
||||
newSize.width = iWidth;
|
||||
newSize.height = iHeight;
|
||||
// now resize it
|
||||
NSBitmapImageRep *rep = [[NSBitmapImageRep alloc]
|
||||
initWithBitmapDataPlanes:NULL
|
||||
pixelsWide:newSize.width
|
||||
pixelsHigh:newSize.height
|
||||
bitsPerSample:8
|
||||
samplesPerPixel:1
|
||||
hasAlpha:NO
|
||||
isPlanar:NO
|
||||
colorSpaceName:NSCalibratedWhiteColorSpace
|
||||
bytesPerRow:0
|
||||
bitsPerPixel:0];
|
||||
rep.size = newSize;
|
||||
[NSGraphicsContext saveGraphicsState];
|
||||
[NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithBitmapImageRep:rep]];
|
||||
[grayBitmap drawInRect:NSMakeRect(0, 0, newSize.width, newSize.height)];
|
||||
[NSGraphicsContext restoreGraphicsState];
|
||||
uint8_t *pPixels = [rep bitmapData];
|
||||
if (pDithered) free(pDithered);
|
||||
bool bDither = (_DitherCheck.state == NSControlStateValueOn);
|
||||
pDithered = [self DitherImage:pPixels width:iWidth height:iHeight pitch:(int)rep.bytesPerRow dither:bDither];
|
||||
// Create a preview image
|
||||
// convert the 1-bpp image to 8-bit grayscale so that we can show it in the preview window
|
||||
uint8_t *pGray = (uint8_t *)malloc((iWidth+7) * iHeight);
|
||||
int x, y;
|
||||
uint8_t c, ucMask, *s, *d;
|
||||
for (y=0; y<iHeight; y++) {
|
||||
s = &pDithered[y * ((iWidth+7)/8)];
|
||||
d = &pGray[iWidth * y];
|
||||
ucMask = 0x80;
|
||||
c = *s++;
|
||||
for (x=0; x<iWidth; x++) {
|
||||
if (c & ucMask)
|
||||
*d++ = 0;
|
||||
else
|
||||
*d++ = 0xff;
|
||||
ucMask >>= 1;
|
||||
if (ucMask == 0) {
|
||||
ucMask = 0x80;
|
||||
c = *s++;
|
||||
}
|
||||
} // for x
|
||||
} // for y
|
||||
// make an NSImage out of the grayscale bitmap
|
||||
CGColorSpaceRef colorSpace;
|
||||
CGContextRef gtx;
|
||||
NSUInteger bitsPerComponent = 8;
|
||||
NSUInteger bytesPerRow = iWidth;
|
||||
colorSpace = CGColorSpaceCreateDeviceGray();
|
||||
gtx = CGBitmapContextCreate(pGray, iWidth, iHeight, bitsPerComponent, bytesPerRow, colorSpace, kCGBitmapByteOrderDefault | kCGImageAlphaNone);
|
||||
CGImageRef myimage = CGBitmapContextCreateImage(gtx);
|
||||
// CGContextSetInterpolationQuality(gtx, kCGInterpolationNone);
|
||||
NSImage *image = [[NSImage alloc]initWithCGImage:myimage size:NSZeroSize];
|
||||
_myImage.image = image; // set it into the image view
|
||||
// Free temp objects
|
||||
CGColorSpaceRelease(colorSpace);
|
||||
CGContextRelease(gtx);
|
||||
CGImageRelease(myimage);
|
||||
free(pGray);
|
||||
}
|
||||
}
|
||||
} /* ditherFile*/
|
||||
@end
|
||||
16
Image2ESL/Image2ESL/main.m
Normal file
16
Image2ESL/Image2ESL/main.m
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// main.m
|
||||
// Image2ESL
|
||||
//
|
||||
// Created by Larry Bank
|
||||
// Copyright (c) 2021 BitBank Software Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
int main(int argc, const char * argv[]) {
|
||||
@autoreleasepool {
|
||||
// Setup code that might create autoreleased objects goes here.
|
||||
}
|
||||
return NSApplicationMain(argc, argv);
|
||||
}
|
||||
Reference in New Issue
Block a user