@m430/capacitor-label-printer 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/API.md +218 -0
- package/LICENSE +21 -0
- package/M430CapacitorLabelPrinter.podspec +21 -0
- package/README.md +190 -0
- package/android/build.gradle +46 -0
- package/android/libs/.gitkeep +1 -0
- package/android/libs/fat-generic-tspl-bluetooth-classic-0.1.16-GA.jar +0 -0
- package/android/src/main/AndroidManifest.xml +12 -0
- package/android/src/main/java/com/m430/capacitor/labelprinter/.gitkeep +1 -0
- package/android/src/main/java/com/m430/capacitor/labelprinter/AndroidPrinterManager.java +132 -0
- package/android/src/main/java/com/m430/capacitor/labelprinter/AndroidStatusMapper.java +54 -0
- package/android/src/main/java/com/m430/capacitor/labelprinter/LabelPrinterPlugin.java +273 -0
- package/android/src/main/java/com/m430/capacitor/labelprinter/VendorAndroidDeviceCatalog.java +81 -0
- package/android/src/main/java/com/m430/capacitor/labelprinter/VendorAndroidPrinterSession.java +189 -0
- package/capacitor-label-printer.podspec +21 -0
- package/dist/docs.json +443 -0
- package/dist/esm/cpcl/builder.d.ts +10 -0
- package/dist/esm/cpcl/builder.js +35 -0
- package/dist/esm/definitions.d.ts +107 -0
- package/dist/esm/definitions.js +1 -0
- package/dist/esm/errors.d.ts +1 -0
- package/dist/esm/errors.js +1 -0
- package/dist/esm/index.d.ts +9 -0
- package/dist/esm/index.js +11 -0
- package/dist/esm/tspl/builder.d.ts +13 -0
- package/dist/esm/tspl/builder.js +45 -0
- package/dist/esm/tspl/helpers.d.ts +2 -0
- package/dist/esm/tspl/helpers.js +6 -0
- package/dist/esm/types.d.ts +12 -0
- package/dist/esm/types.js +1 -0
- package/dist/esm/web.d.ts +21 -0
- package/dist/esm/web.js +34 -0
- package/dist/plugin.cjs.js +143 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +136 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Plugin/.gitkeep +1 -0
- package/ios/Plugin/IOSPrinterManager.swift +230 -0
- package/ios/Plugin/IOSStatusMapper.swift +57 -0
- package/ios/Plugin/LabelPrinterPlugin.swift +141 -0
- package/ios/VendorFrameworks/.gitkeep +1 -0
- package/ios/VendorFrameworks/adapter.framework/Headers/BasedOtherConnectedDevice.h +17 -0
- package/ios/VendorFrameworks/adapter.framework/Headers/ConnectedDevice.h +213 -0
- package/ios/VendorFrameworks/adapter.framework/Headers/IPRTBlueToothBaseDef.h +22 -0
- package/ios/VendorFrameworks/adapter.framework/Headers/KeepStateConnectedDevice.h +18 -0
- package/ios/VendorFrameworks/adapter.framework/Headers/QueueConfig.h +18 -0
- package/ios/VendorFrameworks/adapter.framework/Headers/ReadOptions.h +22 -0
- package/ios/VendorFrameworks/adapter.framework/Headers/WroteReporter.h +23 -0
- package/ios/VendorFrameworks/adapter.framework/Headers/adapter.h +18 -0
- package/ios/VendorFrameworks/adapter.framework/Info.plist +0 -0
- package/ios/VendorFrameworks/adapter.framework/Modules/module.modulemap +6 -0
- package/ios/VendorFrameworks/adapter.framework/adapter +0 -0
- package/ios/VendorFrameworks/appleble.framework/Frameworks/adapter.framework/Info.plist +0 -0
- package/ios/VendorFrameworks/appleble.framework/Frameworks/adapter.framework/_CodeSignature/CodeResources +101 -0
- package/ios/VendorFrameworks/appleble.framework/Frameworks/adapter.framework/adapter +0 -0
- package/ios/VendorFrameworks/appleble.framework/Frameworks/ibridge.framework/Frameworks/adapter.framework/Info.plist +0 -0
- package/ios/VendorFrameworks/appleble.framework/Frameworks/ibridge.framework/Frameworks/adapter.framework/adapter +0 -0
- package/ios/VendorFrameworks/appleble.framework/Frameworks/ibridge.framework/Info.plist +0 -0
- package/ios/VendorFrameworks/appleble.framework/Frameworks/ibridge.framework/_CodeSignature/CodeResources +132 -0
- package/ios/VendorFrameworks/appleble.framework/Frameworks/ibridge.framework/ibridge +0 -0
- package/ios/VendorFrameworks/appleble.framework/Headers/AppleBle.h +25 -0
- package/ios/VendorFrameworks/appleble.framework/Info.plist +0 -0
- package/ios/VendorFrameworks/appleble.framework/Modules/module.modulemap +6 -0
- package/ios/VendorFrameworks/appleble.framework/_CodeSignature/CodeResources +252 -0
- package/ios/VendorFrameworks/appleble.framework/appleble +0 -0
- package/ios/VendorFrameworks/father.framework/Frameworks/adapter.framework/Info.plist +0 -0
- package/ios/VendorFrameworks/father.framework/Frameworks/adapter.framework/adapter +0 -0
- package/ios/VendorFrameworks/father.framework/Headers/Appendat.h +28 -0
- package/ios/VendorFrameworks/father.framework/Headers/Arg.h +22 -0
- package/ios/VendorFrameworks/father.framework/Headers/BasicBatteryVolumeArg.h +16 -0
- package/ios/VendorFrameworks/father.framework/Headers/BinaryCommand.h +17 -0
- package/ios/VendorFrameworks/father.framework/Headers/CPCLCommand.h +10 -0
- package/ios/VendorFrameworks/father.framework/Headers/CallbackData.h +26 -0
- package/ios/VendorFrameworks/father.framework/Headers/Checker.h +16 -0
- package/ios/VendorFrameworks/father.framework/Headers/Command.h +25 -0
- package/ios/VendorFrameworks/father.framework/Headers/CommandClause.h +33 -0
- package/ios/VendorFrameworks/father.framework/Headers/Commander.h +31 -0
- package/ios/VendorFrameworks/father.framework/Headers/DataWriteOperation.h +42 -0
- package/ios/VendorFrameworks/father.framework/Headers/DefaultCommand.h +16 -0
- package/ios/VendorFrameworks/father.framework/Headers/EasyArg.h +16 -0
- package/ios/VendorFrameworks/father.framework/Headers/FastBinary.h +20 -0
- package/ios/VendorFrameworks/father.framework/Headers/HexOutput.h +19 -0
- package/ios/VendorFrameworks/father.framework/Headers/IDataWriteCallback.h +25 -0
- package/ios/VendorFrameworks/father.framework/Headers/Lifecycle.h +21 -0
- package/ios/VendorFrameworks/father.framework/Headers/NewLineArg.h +15 -0
- package/ios/VendorFrameworks/father.framework/Headers/OnlyBinaryHeaderArg.h +15 -0
- package/ios/VendorFrameworks/father.framework/Headers/OnlyTextHeaderArg.h +16 -0
- package/ios/VendorFrameworks/father.framework/Headers/PImageTool.h +22 -0
- package/ios/VendorFrameworks/father.framework/Headers/PReplaceKit.h +16 -0
- package/ios/VendorFrameworks/father.framework/Headers/PSDK.h +60 -0
- package/ios/VendorFrameworks/father.framework/Headers/PVariableKit.h +18 -0
- package/ios/VendorFrameworks/father.framework/Headers/PsdkConst.h +33 -0
- package/ios/VendorFrameworks/father.framework/Headers/Raw.h +22 -0
- package/ios/VendorFrameworks/father.framework/Headers/SimpleCheck.h +16 -0
- package/ios/VendorFrameworks/father.framework/Headers/SingleCommand.h +32 -0
- package/ios/VendorFrameworks/father.framework/Headers/TSPLCommand.h +10 -0
- package/ios/VendorFrameworks/father.framework/Headers/WriteControl.h +12 -0
- package/ios/VendorFrameworks/father.framework/Headers/WriteOptions.h +28 -0
- package/ios/VendorFrameworks/father.framework/Headers/father.h +21 -0
- package/ios/VendorFrameworks/father.framework/Info.plist +0 -0
- package/ios/VendorFrameworks/father.framework/Modules/module.modulemap +6 -0
- package/ios/VendorFrameworks/father.framework/father +0 -0
- package/ios/VendorFrameworks/tspl.framework/Frameworks/father.framework/Frameworks/adapter.framework/Info.plist +0 -0
- package/ios/VendorFrameworks/tspl.framework/Frameworks/father.framework/Frameworks/adapter.framework/adapter +0 -0
- package/ios/VendorFrameworks/tspl.framework/Frameworks/father.framework/Info.plist +0 -0
- package/ios/VendorFrameworks/tspl.framework/Frameworks/father.framework/father +0 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/BasicTSPL.h +146 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/BasicTSPLArg.h +17 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/GenericTSPL.h +16 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TBar.h +30 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TBarCode.h +54 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TBatteryVolume.h +19 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TBox.h +32 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TCircle.h +26 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TCleanBmpFlash.h +20 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TClear.h +20 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TCut.h +21 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TDensity.h +21 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TDirection.h +51 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TDmatrix.h +29 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TDownloadBmpFlash.h +16 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TGap.h +21 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TImage.h +36 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TLine.h +34 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TMddle.h +16 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TPage.h +22 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TPrint.h +21 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TQRCode.h +35 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TReadState.h +16 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TReverse.h +27 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TSN.h +19 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TSPLCodeType.h +53 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TSPLCorrectLevel.h +21 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TSPLFont.h +83 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TSPLImageMode.h +30 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TSPLLineMode.h +37 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TSPLLineType.h +21 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TSPLOutDirection.h +27 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TSPLRotation.h +36 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TSPLShowType.h +36 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TSPL_.h +18 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TSpeed.h +20 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TText.h +38 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TTextBox.h +44 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/TVersion.h +19 -0
- package/ios/VendorFrameworks/tspl.framework/Headers/tspl.h +45 -0
- package/ios/VendorFrameworks/tspl.framework/Info.plist +0 -0
- package/ios/VendorFrameworks/tspl.framework/Modules/module.modulemap +6 -0
- package/ios/VendorFrameworks/tspl.framework/tspl +0 -0
- package/package.json +95 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//
|
|
2
|
+
// TQRCode.h
|
|
3
|
+
// TSPL
|
|
4
|
+
//
|
|
5
|
+
// Created by IPRT on 2022/10/12.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <tspl/BasicTSPLArg.h>
|
|
9
|
+
#import "TSPLCorrectLevel.h"
|
|
10
|
+
#import "TSPLRotation.h"
|
|
11
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 二维条码
|
|
15
|
+
*/
|
|
16
|
+
@interface TQRCode : BasicTSPLArg
|
|
17
|
+
|
|
18
|
+
/// 起始x坐标
|
|
19
|
+
@property (nonatomic , readonly) TQRCode *(^x)(int startX);
|
|
20
|
+
/// 起始y坐标
|
|
21
|
+
@property (nonatomic , readonly) TQRCode *(^y)(int startY);
|
|
22
|
+
/// 单元宽度
|
|
23
|
+
@property (nonatomic , readonly) TQRCode *(^cellWidth)(int cWidth);
|
|
24
|
+
/// 纠错等级
|
|
25
|
+
@property (nonatomic , readonly) TQRCode *(^correctLevel)(TCorrectLevel clevel);
|
|
26
|
+
/// 旋转角度
|
|
27
|
+
@property (nonatomic , readonly) TQRCode *(^rotation)(TRotation rot);
|
|
28
|
+
/// 条码内容
|
|
29
|
+
@property (nonatomic , readonly) TQRCode *(^content)(NSString * cnt);
|
|
30
|
+
/// 二维码版本(可不填)
|
|
31
|
+
@property (nonatomic , readonly) TQRCode *(^version)(NSString * vsion);
|
|
32
|
+
|
|
33
|
+
@end
|
|
34
|
+
|
|
35
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//
|
|
2
|
+
// TReverse.h
|
|
3
|
+
// TSPL
|
|
4
|
+
//
|
|
5
|
+
// Created by IPRT on 2022/10/12.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <tspl/BasicTSPLArg.h>
|
|
9
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 反色
|
|
13
|
+
*/
|
|
14
|
+
@interface TReverse : BasicTSPLArg
|
|
15
|
+
|
|
16
|
+
/// 反色区域起始x坐标
|
|
17
|
+
@property (nonatomic , readonly) TReverse *(^x)(int startX);
|
|
18
|
+
/// 反色区域起始y坐标
|
|
19
|
+
@property (nonatomic , readonly) TReverse *(^y)(int startY);
|
|
20
|
+
/// 反色区域高度
|
|
21
|
+
@property (nonatomic , readonly) TReverse *(^height)(int h);
|
|
22
|
+
/// 反色区域宽度
|
|
23
|
+
@property (nonatomic , readonly) TReverse *(^width)(int w);
|
|
24
|
+
|
|
25
|
+
@end
|
|
26
|
+
|
|
27
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//
|
|
2
|
+
// TSN.h
|
|
3
|
+
// TSPL
|
|
4
|
+
//
|
|
5
|
+
// Created by IPRT on 2022/10/12.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <father/OnlyTextHeaderArg.h>
|
|
9
|
+
|
|
10
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* 打印机 SN 号
|
|
14
|
+
*/
|
|
15
|
+
@interface TSN : OnlyTextHeaderArg
|
|
16
|
+
|
|
17
|
+
@end
|
|
18
|
+
|
|
19
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
//
|
|
2
|
+
// CodeType.h
|
|
3
|
+
// TSPL
|
|
4
|
+
//
|
|
5
|
+
// Created by IPRT on 2022/10/11.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
typedef NSString * TCodeType NS_STRING_ENUM ;
|
|
10
|
+
/**
|
|
11
|
+
* 39
|
|
12
|
+
*/
|
|
13
|
+
extern TCodeType const _Nonnull CODE_39;
|
|
14
|
+
/**
|
|
15
|
+
* 128
|
|
16
|
+
*/
|
|
17
|
+
extern TCodeType const _Nonnull CODE_128;
|
|
18
|
+
/**
|
|
19
|
+
* 93
|
|
20
|
+
*/
|
|
21
|
+
extern TCodeType const _Nonnull CODE_93;
|
|
22
|
+
/**
|
|
23
|
+
* ITF
|
|
24
|
+
*/
|
|
25
|
+
extern TCodeType const _Nonnull CODE_ITF;
|
|
26
|
+
/**
|
|
27
|
+
* UPCA
|
|
28
|
+
*/
|
|
29
|
+
extern TCodeType const _Nonnull CODE_UPCA;
|
|
30
|
+
/**
|
|
31
|
+
* UPCE
|
|
32
|
+
*/
|
|
33
|
+
extern TCodeType const _Nonnull CODE_UPCE;
|
|
34
|
+
/**
|
|
35
|
+
* CODABAR
|
|
36
|
+
*/
|
|
37
|
+
extern TCodeType const _Nonnull CODE_CODABAR;
|
|
38
|
+
/**
|
|
39
|
+
* EAN8
|
|
40
|
+
*/
|
|
41
|
+
extern TCodeType const _Nonnull CODE_EAN8;
|
|
42
|
+
/**
|
|
43
|
+
* EAN13
|
|
44
|
+
*/
|
|
45
|
+
extern TCodeType const _Nonnull CODE_EAN13;
|
|
46
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
47
|
+
|
|
48
|
+
@interface TSPLCodeType : NSObject
|
|
49
|
+
@property (nonatomic , readonly) TSPLCodeType *(^codeType)(TCodeType type);
|
|
50
|
+
-(NSString *)getCodeType;
|
|
51
|
+
@end
|
|
52
|
+
|
|
53
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//
|
|
2
|
+
// CorrectLevel.h
|
|
3
|
+
// CPCL
|
|
4
|
+
//
|
|
5
|
+
// Created by IPRT on 2022/10/7.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
typedef NSString * TCorrectLevel NS_STRING_ENUM ;
|
|
10
|
+
extern TCorrectLevel const _Nonnull L;
|
|
11
|
+
extern TCorrectLevel const _Nonnull M;
|
|
12
|
+
extern TCorrectLevel const _Nonnull Q;
|
|
13
|
+
extern TCorrectLevel const _Nonnull H;
|
|
14
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
15
|
+
|
|
16
|
+
@interface TSPLCorrectLevel : NSObject
|
|
17
|
+
@property(nonatomic , assign)TCorrectLevel level;
|
|
18
|
+
-(NSString *)getLevel;
|
|
19
|
+
@end
|
|
20
|
+
|
|
21
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Font.h
|
|
3
|
+
// CPCL
|
|
4
|
+
//
|
|
5
|
+
// Created by IPRT on 2022/10/7.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
typedef NSString * TFont NS_STRING_ENUM ;
|
|
10
|
+
/**
|
|
11
|
+
* 16点阵
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
extern TFont const _Nonnull TSS16;
|
|
15
|
+
/**
|
|
16
|
+
* 20点阵
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
extern TFont const _Nonnull TSS20;
|
|
20
|
+
/**
|
|
21
|
+
*20点阵放大一倍
|
|
22
|
+
*/
|
|
23
|
+
extern TFont const _Nonnull TSS20_MAX1;
|
|
24
|
+
/**
|
|
25
|
+
* 24点阵
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
extern TFont const _Nonnull TSS24;
|
|
29
|
+
/**
|
|
30
|
+
* 28点阵
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
extern TFont const _Nonnull TSS28;
|
|
34
|
+
/**
|
|
35
|
+
* 32点阵
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
extern TFont const _Nonnull TSS32;
|
|
39
|
+
/**
|
|
40
|
+
* 24点阵放大一倍
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
extern TFont const _Nonnull TSS24_MAX1;
|
|
44
|
+
/**
|
|
45
|
+
* 28点阵放大一倍
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
extern TFont const _Nonnull TSS28_MAX1;
|
|
49
|
+
/**
|
|
50
|
+
* 32点阵放大一倍
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
extern TFont const _Nonnull TSS32_MAX1;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 24点阵放大两倍
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
extern TFont const _Nonnull TSS24_MAX2;
|
|
60
|
+
/**
|
|
61
|
+
* 28点阵放大两倍
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
extern TFont const _Nonnull TSS28_MAX2;
|
|
65
|
+
/**
|
|
66
|
+
* 32点阵放大两倍
|
|
67
|
+
*/
|
|
68
|
+
|
|
69
|
+
extern TFont const _Nonnull TSS32_MAX2;
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
73
|
+
|
|
74
|
+
@interface TSPLFont : NSObject
|
|
75
|
+
@property(nonatomic , readonly)TSPLFont *(^font)(TFont fnt);
|
|
76
|
+
- (int) getEx;
|
|
77
|
+
- (int) getEy;
|
|
78
|
+
- (int) getFamily;
|
|
79
|
+
- (int) getSize;
|
|
80
|
+
- (int) getHeight;
|
|
81
|
+
@end
|
|
82
|
+
|
|
83
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ImageMode.h
|
|
3
|
+
// TSPL
|
|
4
|
+
//
|
|
5
|
+
// Created by IPRT on 2022/10/11.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
typedef NS_ENUM (int, TImageMode) {
|
|
10
|
+
/**
|
|
11
|
+
* 覆盖前面的
|
|
12
|
+
*/
|
|
13
|
+
OVERWRITE = 0,
|
|
14
|
+
/**
|
|
15
|
+
* 取交集
|
|
16
|
+
*/
|
|
17
|
+
OR = 1,
|
|
18
|
+
/**
|
|
19
|
+
* 取差集
|
|
20
|
+
*/
|
|
21
|
+
XOR = 2
|
|
22
|
+
};
|
|
23
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
24
|
+
|
|
25
|
+
@interface TSPLImageMode : NSObject
|
|
26
|
+
@property (nonatomic , readonly) TSPLImageMode *(^mode)(TImageMode imagemode);
|
|
27
|
+
-(int)getMode;
|
|
28
|
+
@end
|
|
29
|
+
|
|
30
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//
|
|
2
|
+
// LineM.h
|
|
3
|
+
// TSPL
|
|
4
|
+
//
|
|
5
|
+
// Created by IPRT on 2022/10/11.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
typedef NSString * TLineMode NS_STRING_ENUM ;
|
|
10
|
+
/**
|
|
11
|
+
* 实线
|
|
12
|
+
*/
|
|
13
|
+
extern TLineMode const _Nonnull TLineModeSOLID_LINE;
|
|
14
|
+
/**
|
|
15
|
+
* 虚线
|
|
16
|
+
*/
|
|
17
|
+
extern TLineMode const _Nonnull TLineModeDOTTED_LINE_M1;
|
|
18
|
+
/**
|
|
19
|
+
* 虚线
|
|
20
|
+
*/
|
|
21
|
+
extern TLineMode const _Nonnull TLineModeDOTTED_LINE_M2;
|
|
22
|
+
/**
|
|
23
|
+
* 虚线
|
|
24
|
+
*/
|
|
25
|
+
extern TLineMode const _Nonnull TLineModeDOTTED_LINE_M3;
|
|
26
|
+
/**
|
|
27
|
+
* 虚线
|
|
28
|
+
*/
|
|
29
|
+
extern TLineMode const _Nonnull TLineModeDOTTED_LINE_M4;
|
|
30
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
31
|
+
|
|
32
|
+
@interface TSPLLineMode : NSObject
|
|
33
|
+
@property (nonatomic , readonly) TSPLLineMode *(^line)(TLineMode linem);
|
|
34
|
+
-(NSString *)getLine;
|
|
35
|
+
@end
|
|
36
|
+
|
|
37
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Line.h
|
|
3
|
+
// TSPL
|
|
4
|
+
//
|
|
5
|
+
// Created by IPRT on 2022/10/11.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
typedef NS_ENUM (NSInteger, TLineType)
|
|
10
|
+
{
|
|
11
|
+
TLineTypeSOLID_LINE = 0,
|
|
12
|
+
TLineTypeDOTTED_LINE = 1,
|
|
13
|
+
};
|
|
14
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
15
|
+
|
|
16
|
+
@interface TSPLLineType : NSObject
|
|
17
|
+
@property(nonatomic , readonly) TSPLLineType *(^lineType)(TLineType l);
|
|
18
|
+
-(int) getLine;
|
|
19
|
+
@end
|
|
20
|
+
|
|
21
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//
|
|
2
|
+
// TSPLOutDirection.h
|
|
3
|
+
// tspl
|
|
4
|
+
//
|
|
5
|
+
// Created by IPRT on 2022/11/1.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
typedef NS_ENUM (NSInteger, TOutDirection)
|
|
10
|
+
{
|
|
11
|
+
/**
|
|
12
|
+
* 0-上端先出
|
|
13
|
+
*/
|
|
14
|
+
UP_OUT = 0,
|
|
15
|
+
/**
|
|
16
|
+
*1-下端先出
|
|
17
|
+
*/
|
|
18
|
+
DOWN_OUT = 1
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
22
|
+
|
|
23
|
+
@interface TSPLOutDirection : NSObject
|
|
24
|
+
|
|
25
|
+
@end
|
|
26
|
+
|
|
27
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Rotation.h
|
|
3
|
+
// CPCL
|
|
4
|
+
//
|
|
5
|
+
// Created by IPRT on 2022/10/7.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
typedef NS_ENUM (NSInteger, TRotation)
|
|
10
|
+
{
|
|
11
|
+
/**
|
|
12
|
+
* 旋转0度
|
|
13
|
+
*/
|
|
14
|
+
ROTATION_0 = 0,
|
|
15
|
+
/**
|
|
16
|
+
* 旋转90度
|
|
17
|
+
*/
|
|
18
|
+
ROTATION_90 = 90,
|
|
19
|
+
/**
|
|
20
|
+
* 旋转180度
|
|
21
|
+
*/
|
|
22
|
+
ROTATION_180 = 180,
|
|
23
|
+
/**
|
|
24
|
+
* 旋转270度
|
|
25
|
+
*/
|
|
26
|
+
ROTATION_270 = 270
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
30
|
+
|
|
31
|
+
@interface TSPLRotation : NSObject
|
|
32
|
+
@property(nonatomic , readonly) TSPLRotation *(^rotation)(TRotation rot);
|
|
33
|
+
-(int)getRotation;
|
|
34
|
+
@end
|
|
35
|
+
|
|
36
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ShowType.h
|
|
3
|
+
// TSPL
|
|
4
|
+
//
|
|
5
|
+
// Created by IPRT on 2022/10/11.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
typedef NS_ENUM (NSInteger, TShowType)
|
|
10
|
+
{
|
|
11
|
+
/**
|
|
12
|
+
* 不显示
|
|
13
|
+
*/
|
|
14
|
+
NO_SHOW = 0,
|
|
15
|
+
/**
|
|
16
|
+
* 居左显示
|
|
17
|
+
*/
|
|
18
|
+
SHOW_LEFT = 1,
|
|
19
|
+
/**
|
|
20
|
+
* 居中显示
|
|
21
|
+
*/
|
|
22
|
+
SHOW_CENTER = 2,
|
|
23
|
+
/**
|
|
24
|
+
* 居右显示
|
|
25
|
+
*/
|
|
26
|
+
SHOW_RIGHT = 3
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
30
|
+
|
|
31
|
+
@interface TSPLShowType : NSObject
|
|
32
|
+
@property(nonatomic , readonly) TSPLShowType *(^showType)(TShowType stypevoid);;
|
|
33
|
+
-(int)getShowType;
|
|
34
|
+
@end
|
|
35
|
+
|
|
36
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//
|
|
2
|
+
// TSPL_.h
|
|
3
|
+
// tspl
|
|
4
|
+
//
|
|
5
|
+
// Created by IPRT on 2022/11/24.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
#import "GenericTSPL.h"
|
|
10
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
11
|
+
|
|
12
|
+
@interface TSPL_ : NSObject
|
|
13
|
+
|
|
14
|
+
@property(nonatomic , readonly) GenericTSPL *(^genericWithConnectedDevice)(ConnectedDevice *connectedDevice);
|
|
15
|
+
@property(nonatomic , readonly) GenericTSPL *(^genericWithLifecycle)(Lifecycle *lifecycle);
|
|
16
|
+
@end
|
|
17
|
+
|
|
18
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//
|
|
2
|
+
// TSpeed.h
|
|
3
|
+
// TSPL
|
|
4
|
+
//
|
|
5
|
+
// Created by IPRT on 2022/10/12.
|
|
6
|
+
//
|
|
7
|
+
#import <tspl/BasicTSPLArg.h>
|
|
8
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 打印速度
|
|
12
|
+
*/
|
|
13
|
+
@interface TSpeed : BasicTSPLArg
|
|
14
|
+
|
|
15
|
+
/// 速度
|
|
16
|
+
@property (nonatomic , readonly) TSpeed *(^speed)(int s);
|
|
17
|
+
|
|
18
|
+
@end
|
|
19
|
+
|
|
20
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//
|
|
2
|
+
// TText.h
|
|
3
|
+
// TSPL
|
|
4
|
+
//
|
|
5
|
+
// Created by IPRT on 2022/10/12.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <tspl/BasicTSPLArg.h>
|
|
9
|
+
#import "TSPLFont.h"
|
|
10
|
+
#import "TSPLRotation.h"
|
|
11
|
+
|
|
12
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 文本
|
|
16
|
+
*/
|
|
17
|
+
@interface TText : BasicTSPLArg
|
|
18
|
+
|
|
19
|
+
/// 起始x坐标
|
|
20
|
+
@property (nonatomic , readonly) TText *(^x)(int startX);
|
|
21
|
+
/// 起始y坐标
|
|
22
|
+
@property (nonatomic , readonly) TText *(^y)(int startY);
|
|
23
|
+
/// 字体
|
|
24
|
+
@property (nonatomic , readonly) TText *(^font)(TFont fnt);
|
|
25
|
+
/// 旋转角度:可选参数 0,90,180,270
|
|
26
|
+
@property (nonatomic , readonly) TText *(^rotation)(TRotation rot);
|
|
27
|
+
/// 横向放大倍数
|
|
28
|
+
@property (nonatomic , readonly) TText *(^xmulti)(int xmul);
|
|
29
|
+
/// 纵向放大倍数
|
|
30
|
+
@property (nonatomic , readonly) TText *(^ymulti)(int ymul);
|
|
31
|
+
/// 是否加粗
|
|
32
|
+
@property (nonatomic , readonly) TText *(^isBold)(BOOL bold);
|
|
33
|
+
/// 内容
|
|
34
|
+
@property (nonatomic , readonly) TText *(^content)(NSString * cnt);
|
|
35
|
+
|
|
36
|
+
@end
|
|
37
|
+
|
|
38
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//
|
|
2
|
+
// TTextBox.h
|
|
3
|
+
// TSPL
|
|
4
|
+
//
|
|
5
|
+
// Created by IPRT on 2022/10/12.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <tspl/BasicTSPLArg.h>
|
|
9
|
+
#import "TSPLFont.h"
|
|
10
|
+
#import "TSPLRotation.h"
|
|
11
|
+
|
|
12
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 文本框
|
|
16
|
+
*/
|
|
17
|
+
@interface TTextBox : BasicTSPLArg
|
|
18
|
+
|
|
19
|
+
/// 起始x坐标
|
|
20
|
+
@property (nonatomic , readonly) TTextBox *(^x)(int startX);
|
|
21
|
+
/// 起始y坐标
|
|
22
|
+
@property (nonatomic , readonly) TTextBox *(^y)(int startY);
|
|
23
|
+
/// 字体
|
|
24
|
+
@property (nonatomic , readonly) TTextBox *(^font)(TFont fnt);
|
|
25
|
+
/// 旋转角度:可选参数 0,90,180,270
|
|
26
|
+
@property (nonatomic , readonly) TTextBox *(^rotation)(TRotation rot);
|
|
27
|
+
/// false: 旋转每一个字 true:整体旋转
|
|
28
|
+
@property (nonatomic , readonly) TTextBox *(^rotationType)(BOOL rType);
|
|
29
|
+
/// 横向放大倍数
|
|
30
|
+
@property (nonatomic , readonly) TTextBox *(^mulX)(int xmul);
|
|
31
|
+
/// 纵向放大倍数
|
|
32
|
+
@property (nonatomic , readonly) TTextBox *(^mulY)(int ymul);
|
|
33
|
+
/// 文本框宽度
|
|
34
|
+
@property (nonatomic , readonly) TTextBox *(^width)(int w);
|
|
35
|
+
/// 行间距
|
|
36
|
+
@property (nonatomic , readonly) TTextBox *(^lineSpace)(int space);
|
|
37
|
+
/// 是否加粗
|
|
38
|
+
@property (nonatomic , readonly) TTextBox *(^isBold)(BOOL bold);
|
|
39
|
+
/// 内容
|
|
40
|
+
@property (nonatomic , readonly) TTextBox *(^content)(NSString * cnt);
|
|
41
|
+
|
|
42
|
+
@end
|
|
43
|
+
|
|
44
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//
|
|
2
|
+
// TVersion.h
|
|
3
|
+
// TSPL
|
|
4
|
+
//
|
|
5
|
+
// Created by IPRT on 2022/10/12.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <father/OnlyTextHeaderArg.h>
|
|
9
|
+
|
|
10
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* 获取版本
|
|
14
|
+
*/
|
|
15
|
+
@interface TVersion : OnlyTextHeaderArg
|
|
16
|
+
|
|
17
|
+
@end
|
|
18
|
+
|
|
19
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
//
|
|
2
|
+
// tspl.h
|
|
3
|
+
// tspl
|
|
4
|
+
//
|
|
5
|
+
// Created by aiyin on 2022/10/30.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
#import <tspl/BasicTSPLArg.h>
|
|
10
|
+
#import <tspl/TLine.h>
|
|
11
|
+
#import <tspl/TBar.h>
|
|
12
|
+
#import <tspl/TBarCode.h>
|
|
13
|
+
#import <tspl/TText.h>
|
|
14
|
+
#import <tspl/TQRCode.h>
|
|
15
|
+
#import <tspl/TTextBox.h>
|
|
16
|
+
#import <tspl/TDownloadBmpFlash.h>
|
|
17
|
+
#import <tspl/TGap.h>
|
|
18
|
+
#import <tspl/TVersion.h>
|
|
19
|
+
#import <tspl/TCut.h>
|
|
20
|
+
#import <tspl/TImage.h>
|
|
21
|
+
#import <tspl/TSN.h>
|
|
22
|
+
#import <tspl/TDensity.h>
|
|
23
|
+
#import <tspl/TReadState.h>
|
|
24
|
+
#import <tspl/TReverse.h>
|
|
25
|
+
#import <tspl/TDmatrix.h>
|
|
26
|
+
#import <tspl/TPage.h>
|
|
27
|
+
#import <tspl/TSpeed.h>
|
|
28
|
+
#import <tspl/TCircle.h>
|
|
29
|
+
#import <tspl/TClear.h>
|
|
30
|
+
#import <tspl/TDirection.h>
|
|
31
|
+
#import <tspl/TBox.h>
|
|
32
|
+
#import <tspl/TCleanBmpFlash.h>
|
|
33
|
+
#import <tspl/TPrint.h>
|
|
34
|
+
#import <tspl/TBAtteryVolume.h>
|
|
35
|
+
#import <tspl/TMddle.h>
|
|
36
|
+
#import <TSPL/BasicTSPL.h>
|
|
37
|
+
//! Project version number for tspl.
|
|
38
|
+
FOUNDATION_EXPORT double tsplVersionNumber;
|
|
39
|
+
|
|
40
|
+
//! Project version string for tspl.
|
|
41
|
+
FOUNDATION_EXPORT const unsigned char tsplVersionString[];
|
|
42
|
+
|
|
43
|
+
// In this header, you should import all the public headers of your framework using statements like #import <tspl/PublicHeader.h>
|
|
44
|
+
|
|
45
|
+
|
|
Binary file
|
|
Binary file
|