node-native-win-utils 1.4.0 → 2.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.
Files changed (204) hide show
  1. package/README.md +29 -82
  2. package/binding.gyp +2 -0
  3. package/dist/dirnameLocal.cjs +4 -0
  4. package/dist/dirnameLocal.d.cts +1 -0
  5. package/dist/dirnameLocal.d.mts +1 -0
  6. package/dist/dirnameLocal.mjs +2 -0
  7. package/dist/{index.js → index.cjs} +46 -15
  8. package/dist/{index.d.ts → index.d.cts} +24 -12
  9. package/dist/index.d.mts +191 -0
  10. package/dist/index.mjs +177 -0
  11. package/dist/keyCodes.d.mts +101 -0
  12. package/dist/keyCodes.mjs +201 -0
  13. package/node22.json +16 -0
  14. package/package.json +19 -9
  15. package/prebuilds/win32-x64/node-native-win-utils.node +0 -0
  16. package/src/cpp/keyboard.cpp +141 -140
  17. package/src/cpp/main.cpp +9 -3
  18. package/src/cpp/{capturewindow.cpp → screenshot.cpp} +174 -2
  19. package/src/dirnameLocal.mts +3 -0
  20. package/src/index.mts +454 -0
  21. package/src/keyCodes.mts +203 -0
  22. package/dllCopy.js +0 -14
  23. package/include/opencv2/core/affine.hpp +0 -678
  24. package/include/opencv2/core/async.hpp +0 -105
  25. package/include/opencv2/core/base.hpp +0 -664
  26. package/include/opencv2/core/bindings_utils.hpp +0 -325
  27. package/include/opencv2/core/bufferpool.hpp +0 -40
  28. package/include/opencv2/core/check.hpp +0 -170
  29. package/include/opencv2/core/core.hpp +0 -48
  30. package/include/opencv2/core/core_c.h +0 -3128
  31. package/include/opencv2/core/cuda/block.hpp +0 -211
  32. package/include/opencv2/core/cuda/border_interpolate.hpp +0 -722
  33. package/include/opencv2/core/cuda/color.hpp +0 -309
  34. package/include/opencv2/core/cuda/common.hpp +0 -131
  35. package/include/opencv2/core/cuda/datamov_utils.hpp +0 -113
  36. package/include/opencv2/core/cuda/detail/color_detail.hpp +0 -2018
  37. package/include/opencv2/core/cuda/detail/reduce.hpp +0 -365
  38. package/include/opencv2/core/cuda/detail/reduce_key_val.hpp +0 -502
  39. package/include/opencv2/core/cuda/detail/transform_detail.hpp +0 -392
  40. package/include/opencv2/core/cuda/detail/type_traits_detail.hpp +0 -191
  41. package/include/opencv2/core/cuda/detail/vec_distance_detail.hpp +0 -121
  42. package/include/opencv2/core/cuda/dynamic_smem.hpp +0 -88
  43. package/include/opencv2/core/cuda/emulation.hpp +0 -269
  44. package/include/opencv2/core/cuda/filters.hpp +0 -293
  45. package/include/opencv2/core/cuda/funcattrib.hpp +0 -79
  46. package/include/opencv2/core/cuda/functional.hpp +0 -805
  47. package/include/opencv2/core/cuda/limits.hpp +0 -128
  48. package/include/opencv2/core/cuda/reduce.hpp +0 -209
  49. package/include/opencv2/core/cuda/saturate_cast.hpp +0 -292
  50. package/include/opencv2/core/cuda/scan.hpp +0 -258
  51. package/include/opencv2/core/cuda/simd_functions.hpp +0 -869
  52. package/include/opencv2/core/cuda/transform.hpp +0 -75
  53. package/include/opencv2/core/cuda/type_traits.hpp +0 -90
  54. package/include/opencv2/core/cuda/utility.hpp +0 -230
  55. package/include/opencv2/core/cuda/vec_distance.hpp +0 -232
  56. package/include/opencv2/core/cuda/vec_math.hpp +0 -923
  57. package/include/opencv2/core/cuda/vec_traits.hpp +0 -288
  58. package/include/opencv2/core/cuda/warp.hpp +0 -139
  59. package/include/opencv2/core/cuda/warp_reduce.hpp +0 -76
  60. package/include/opencv2/core/cuda/warp_shuffle.hpp +0 -162
  61. package/include/opencv2/core/cuda.hpp +0 -1279
  62. package/include/opencv2/core/cuda.inl.hpp +0 -763
  63. package/include/opencv2/core/cuda_stream_accessor.hpp +0 -86
  64. package/include/opencv2/core/cuda_types.hpp +0 -144
  65. package/include/opencv2/core/cv_cpu_dispatch.h +0 -381
  66. package/include/opencv2/core/cv_cpu_helper.h +0 -550
  67. package/include/opencv2/core/cvdef.h +0 -973
  68. package/include/opencv2/core/cvstd.hpp +0 -190
  69. package/include/opencv2/core/cvstd.inl.hpp +0 -197
  70. package/include/opencv2/core/cvstd_wrapper.hpp +0 -154
  71. package/include/opencv2/core/detail/async_promise.hpp +0 -71
  72. package/include/opencv2/core/detail/dispatch_helper.impl.hpp +0 -49
  73. package/include/opencv2/core/detail/exception_ptr.hpp +0 -27
  74. package/include/opencv2/core/directx.hpp +0 -184
  75. package/include/opencv2/core/dualquaternion.hpp +0 -979
  76. package/include/opencv2/core/dualquaternion.inl.hpp +0 -487
  77. package/include/opencv2/core/eigen.hpp +0 -402
  78. package/include/opencv2/core/fast_math.hpp +0 -433
  79. package/include/opencv2/core/hal/hal.hpp +0 -256
  80. package/include/opencv2/core/hal/interface.h +0 -190
  81. package/include/opencv2/core/hal/intrin.hpp +0 -939
  82. package/include/opencv2/core/hal/intrin_avx.hpp +0 -3177
  83. package/include/opencv2/core/hal/intrin_avx512.hpp +0 -3090
  84. package/include/opencv2/core/hal/intrin_cpp.hpp +0 -3321
  85. package/include/opencv2/core/hal/intrin_forward.hpp +0 -191
  86. package/include/opencv2/core/hal/intrin_lasx.hpp +0 -3236
  87. package/include/opencv2/core/hal/intrin_msa.hpp +0 -1887
  88. package/include/opencv2/core/hal/intrin_neon.hpp +0 -2610
  89. package/include/opencv2/core/hal/intrin_rvv.hpp +0 -3320
  90. package/include/opencv2/core/hal/intrin_rvv071.hpp +0 -2545
  91. package/include/opencv2/core/hal/intrin_rvv_scalable.hpp +0 -2080
  92. package/include/opencv2/core/hal/intrin_sse.hpp +0 -3467
  93. package/include/opencv2/core/hal/intrin_sse_em.hpp +0 -180
  94. package/include/opencv2/core/hal/intrin_vsx.hpp +0 -1608
  95. package/include/opencv2/core/hal/intrin_wasm.hpp +0 -2782
  96. package/include/opencv2/core/hal/msa_macros.h +0 -1558
  97. package/include/opencv2/core/hal/simd_utils.impl.hpp +0 -186
  98. package/include/opencv2/core/llapi/llapi.h +0 -102
  99. package/include/opencv2/core/mat.hpp +0 -3775
  100. package/include/opencv2/core/mat.inl.hpp +0 -3422
  101. package/include/opencv2/core/matx.hpp +0 -1536
  102. package/include/opencv2/core/neon_utils.hpp +0 -128
  103. package/include/opencv2/core/ocl.hpp +0 -917
  104. package/include/opencv2/core/ocl_genbase.hpp +0 -69
  105. package/include/opencv2/core/opencl/ocl_defs.hpp +0 -82
  106. package/include/opencv2/core/opencl/opencl_info.hpp +0 -212
  107. package/include/opencv2/core/opencl/opencl_svm.hpp +0 -81
  108. package/include/opencv2/core/opencl/runtime/autogenerated/opencl_clblas.hpp +0 -602
  109. package/include/opencv2/core/opencl/runtime/autogenerated/opencl_clfft.hpp +0 -146
  110. package/include/opencv2/core/opencl/runtime/autogenerated/opencl_core.hpp +0 -371
  111. package/include/opencv2/core/opencl/runtime/autogenerated/opencl_core_wrappers.hpp +0 -272
  112. package/include/opencv2/core/opencl/runtime/autogenerated/opencl_gl.hpp +0 -62
  113. package/include/opencv2/core/opencl/runtime/autogenerated/opencl_gl_wrappers.hpp +0 -42
  114. package/include/opencv2/core/opencl/runtime/opencl_clblas.hpp +0 -53
  115. package/include/opencv2/core/opencl/runtime/opencl_clfft.hpp +0 -53
  116. package/include/opencv2/core/opencl/runtime/opencl_core.hpp +0 -84
  117. package/include/opencv2/core/opencl/runtime/opencl_core_wrappers.hpp +0 -47
  118. package/include/opencv2/core/opencl/runtime/opencl_gl.hpp +0 -53
  119. package/include/opencv2/core/opencl/runtime/opencl_gl_wrappers.hpp +0 -47
  120. package/include/opencv2/core/opencl/runtime/opencl_svm_20.hpp +0 -48
  121. package/include/opencv2/core/opencl/runtime/opencl_svm_definitions.hpp +0 -42
  122. package/include/opencv2/core/opencl/runtime/opencl_svm_hsa_extension.hpp +0 -166
  123. package/include/opencv2/core/opengl.hpp +0 -733
  124. package/include/opencv2/core/openvx/ovx_defs.hpp +0 -48
  125. package/include/opencv2/core/operations.hpp +0 -610
  126. package/include/opencv2/core/optim.hpp +0 -302
  127. package/include/opencv2/core/ovx.hpp +0 -28
  128. package/include/opencv2/core/parallel/backend/parallel_for.openmp.hpp +0 -72
  129. package/include/opencv2/core/parallel/backend/parallel_for.tbb.hpp +0 -153
  130. package/include/opencv2/core/parallel/parallel_backend.hpp +0 -90
  131. package/include/opencv2/core/persistence.hpp +0 -1350
  132. package/include/opencv2/core/private/cv_cpu_include_simd_declarations.hpp +0 -30
  133. package/include/opencv2/core/private.cuda.hpp +0 -169
  134. package/include/opencv2/core/private.hpp +0 -896
  135. package/include/opencv2/core/quaternion.hpp +0 -1696
  136. package/include/opencv2/core/quaternion.inl.hpp +0 -1063
  137. package/include/opencv2/core/saturate.hpp +0 -180
  138. package/include/opencv2/core/simd_intrinsics.hpp +0 -87
  139. package/include/opencv2/core/softfloat.hpp +0 -514
  140. package/include/opencv2/core/sse_utils.hpp +0 -652
  141. package/include/opencv2/core/traits.hpp +0 -417
  142. package/include/opencv2/core/types.hpp +0 -2457
  143. package/include/opencv2/core/types_c.h +0 -2126
  144. package/include/opencv2/core/utility.hpp +0 -1229
  145. package/include/opencv2/core/utils/allocator_stats.hpp +0 -29
  146. package/include/opencv2/core/utils/allocator_stats.impl.hpp +0 -158
  147. package/include/opencv2/core/utils/buffer_area.private.hpp +0 -136
  148. package/include/opencv2/core/utils/configuration.private.hpp +0 -22
  149. package/include/opencv2/core/utils/filesystem.hpp +0 -82
  150. package/include/opencv2/core/utils/filesystem.private.hpp +0 -66
  151. package/include/opencv2/core/utils/fp_control.private.hpp +0 -29
  152. package/include/opencv2/core/utils/fp_control_utils.hpp +0 -69
  153. package/include/opencv2/core/utils/instrumentation.hpp +0 -125
  154. package/include/opencv2/core/utils/lock.private.hpp +0 -119
  155. package/include/opencv2/core/utils/logger.defines.hpp +0 -42
  156. package/include/opencv2/core/utils/logger.hpp +0 -218
  157. package/include/opencv2/core/utils/logtag.hpp +0 -28
  158. package/include/opencv2/core/utils/plugin_loader.private.hpp +0 -165
  159. package/include/opencv2/core/utils/tls.hpp +0 -235
  160. package/include/opencv2/core/utils/trace.hpp +0 -252
  161. package/include/opencv2/core/utils/trace.private.hpp +0 -421
  162. package/include/opencv2/core/va_intel.hpp +0 -75
  163. package/include/opencv2/core/version.hpp +0 -26
  164. package/include/opencv2/core/vsx_utils.hpp +0 -1047
  165. package/include/opencv2/core.hpp +0 -3365
  166. package/include/opencv2/imgcodecs/imgcodecs.hpp +0 -48
  167. package/include/opencv2/imgcodecs/imgcodecs_c.h +0 -1
  168. package/include/opencv2/imgcodecs/ios.h +0 -59
  169. package/include/opencv2/imgcodecs/legacy/constants_c.h +0 -54
  170. package/include/opencv2/imgcodecs/macosx.h +0 -20
  171. package/include/opencv2/imgcodecs.hpp +0 -407
  172. package/include/opencv2/imgproc/bindings.hpp +0 -34
  173. package/include/opencv2/imgproc/detail/gcgraph.hpp +0 -395
  174. package/include/opencv2/imgproc/hal/hal.hpp +0 -246
  175. package/include/opencv2/imgproc/hal/interface.h +0 -46
  176. package/include/opencv2/imgproc/imgproc.hpp +0 -48
  177. package/include/opencv2/imgproc/imgproc_c.h +0 -1177
  178. package/include/opencv2/imgproc/segmentation.hpp +0 -141
  179. package/include/opencv2/imgproc/types_c.h +0 -659
  180. package/include/opencv2/imgproc.hpp +0 -5035
  181. package/include/opencv2/opencv_modules.hpp +0 -17
  182. package/include/tesseract/baseapi.h +0 -820
  183. package/include/tesseract/capi.h +0 -485
  184. package/include/tesseract/export.h +0 -37
  185. package/include/tesseract/ltrresultiterator.h +0 -235
  186. package/include/tesseract/ocrclass.h +0 -158
  187. package/include/tesseract/osdetect.h +0 -139
  188. package/include/tesseract/pageiterator.h +0 -364
  189. package/include/tesseract/publictypes.h +0 -281
  190. package/include/tesseract/renderer.h +0 -334
  191. package/include/tesseract/resultiterator.h +0 -250
  192. package/include/tesseract/tesseract.h +0 -40
  193. package/include/tesseract/unichar.h +0 -174
  194. package/include/tesseract/version.h +0 -34
  195. package/include/tesseract/version.h.in +0 -34
  196. package/libs/libjpeg-turbo.lib +0 -0
  197. package/libs/libpng.lib +0 -0
  198. package/libs/opencv_core470.lib +0 -0
  199. package/libs/opencv_imgcodecs470.lib +0 -0
  200. package/libs/opencv_imgproc470.lib +0 -0
  201. package/libs/tesseract.lib +0 -0
  202. package/libs/zlib.lib +0 -0
  203. /package/dist/{keyCodes.js → keyCodes.cjs} +0 -0
  204. /package/dist/{keyCodes.d.ts → keyCodes.d.cts} +0 -0
@@ -1,485 +0,0 @@
1
- // SPDX-License-Identifier: Apache-2.0
2
- // File: capi.h
3
- // Description: C-API TessBaseAPI
4
- //
5
- // (C) Copyright 2012, Google Inc.
6
- // Licensed under the Apache License, Version 2.0 (the "License");
7
- // you may not use this file except in compliance with the License.
8
- // You may obtain a copy of the License at
9
- // http://www.apache.org/licenses/LICENSE-2.0
10
- // Unless required by applicable law or agreed to in writing, software
11
- // distributed under the License is distributed on an "AS IS" BASIS,
12
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- // See the License for the specific language governing permissions and
14
- // limitations under the License.
15
-
16
- #ifndef API_CAPI_H_
17
- #define API_CAPI_H_
18
-
19
- #include "export.h"
20
-
21
- #ifdef __cplusplus
22
- # include <tesseract/baseapi.h>
23
- # include <tesseract/ocrclass.h>
24
- # include <tesseract/pageiterator.h>
25
- # include <tesseract/renderer.h>
26
- # include <tesseract/resultiterator.h>
27
- #endif
28
-
29
- #include <stdbool.h>
30
- #include <stdio.h>
31
-
32
- #ifdef __cplusplus
33
- extern "C" {
34
- #endif
35
-
36
- #ifndef BOOL
37
- # define BOOL int
38
- # define TRUE 1
39
- # define FALSE 0
40
- #endif
41
-
42
- #ifdef __cplusplus
43
- typedef tesseract::TessResultRenderer TessResultRenderer;
44
- typedef tesseract::TessBaseAPI TessBaseAPI;
45
- typedef tesseract::PageIterator TessPageIterator;
46
- typedef tesseract::ResultIterator TessResultIterator;
47
- typedef tesseract::MutableIterator TessMutableIterator;
48
- typedef tesseract::ChoiceIterator TessChoiceIterator;
49
- typedef tesseract::OcrEngineMode TessOcrEngineMode;
50
- typedef tesseract::PageSegMode TessPageSegMode;
51
- typedef tesseract::PageIteratorLevel TessPageIteratorLevel;
52
- typedef tesseract::Orientation TessOrientation;
53
- typedef tesseract::ParagraphJustification TessParagraphJustification;
54
- typedef tesseract::WritingDirection TessWritingDirection;
55
- typedef tesseract::TextlineOrder TessTextlineOrder;
56
- typedef tesseract::PolyBlockType TessPolyBlockType;
57
- typedef tesseract::ETEXT_DESC ETEXT_DESC;
58
- #else
59
- typedef struct TessResultRenderer TessResultRenderer;
60
- typedef struct TessBaseAPI TessBaseAPI;
61
- typedef struct TessPageIterator TessPageIterator;
62
- typedef struct TessResultIterator TessResultIterator;
63
- typedef struct TessMutableIterator TessMutableIterator;
64
- typedef struct TessChoiceIterator TessChoiceIterator;
65
- typedef enum TessOcrEngineMode {
66
- OEM_TESSERACT_ONLY,
67
- OEM_LSTM_ONLY,
68
- OEM_TESSERACT_LSTM_COMBINED,
69
- OEM_DEFAULT
70
- } TessOcrEngineMode;
71
- typedef enum TessPageSegMode {
72
- PSM_OSD_ONLY,
73
- PSM_AUTO_OSD,
74
- PSM_AUTO_ONLY,
75
- PSM_AUTO,
76
- PSM_SINGLE_COLUMN,
77
- PSM_SINGLE_BLOCK_VERT_TEXT,
78
- PSM_SINGLE_BLOCK,
79
- PSM_SINGLE_LINE,
80
- PSM_SINGLE_WORD,
81
- PSM_CIRCLE_WORD,
82
- PSM_SINGLE_CHAR,
83
- PSM_SPARSE_TEXT,
84
- PSM_SPARSE_TEXT_OSD,
85
- PSM_RAW_LINE,
86
- PSM_COUNT
87
- } TessPageSegMode;
88
- typedef enum TessPageIteratorLevel {
89
- RIL_BLOCK,
90
- RIL_PARA,
91
- RIL_TEXTLINE,
92
- RIL_WORD,
93
- RIL_SYMBOL
94
- } TessPageIteratorLevel;
95
- typedef enum TessPolyBlockType {
96
- PT_UNKNOWN,
97
- PT_FLOWING_TEXT,
98
- PT_HEADING_TEXT,
99
- PT_PULLOUT_TEXT,
100
- PT_EQUATION,
101
- PT_INLINE_EQUATION,
102
- PT_TABLE,
103
- PT_VERTICAL_TEXT,
104
- PT_CAPTION_TEXT,
105
- PT_FLOWING_IMAGE,
106
- PT_HEADING_IMAGE,
107
- PT_PULLOUT_IMAGE,
108
- PT_HORZ_LINE,
109
- PT_VERT_LINE,
110
- PT_NOISE,
111
- PT_COUNT
112
- } TessPolyBlockType;
113
- typedef enum TessOrientation {
114
- ORIENTATION_PAGE_UP,
115
- ORIENTATION_PAGE_RIGHT,
116
- ORIENTATION_PAGE_DOWN,
117
- ORIENTATION_PAGE_LEFT
118
- } TessOrientation;
119
- typedef enum TessParagraphJustification {
120
- JUSTIFICATION_UNKNOWN,
121
- JUSTIFICATION_LEFT,
122
- JUSTIFICATION_CENTER,
123
- JUSTIFICATION_RIGHT
124
- } TessParagraphJustification;
125
- typedef enum TessWritingDirection {
126
- WRITING_DIRECTION_LEFT_TO_RIGHT,
127
- WRITING_DIRECTION_RIGHT_TO_LEFT,
128
- WRITING_DIRECTION_TOP_TO_BOTTOM
129
- } TessWritingDirection;
130
- typedef enum TessTextlineOrder {
131
- TEXTLINE_ORDER_LEFT_TO_RIGHT,
132
- TEXTLINE_ORDER_RIGHT_TO_LEFT,
133
- TEXTLINE_ORDER_TOP_TO_BOTTOM
134
- } TessTextlineOrder;
135
- typedef struct ETEXT_DESC ETEXT_DESC;
136
- #endif
137
-
138
- typedef bool (*TessCancelFunc)(void *cancel_this, int words);
139
- typedef bool (*TessProgressFunc)(ETEXT_DESC *ths, int left, int right, int top,
140
- int bottom);
141
-
142
- struct Pix;
143
- struct Boxa;
144
- struct Pixa;
145
-
146
- /* General free functions */
147
-
148
- TESS_API const char *TessVersion();
149
- TESS_API void TessDeleteText(const char *text);
150
- TESS_API void TessDeleteTextArray(char **arr);
151
- TESS_API void TessDeleteIntArray(const int *arr);
152
-
153
- /* Renderer API */
154
- TESS_API TessResultRenderer *TessTextRendererCreate(const char *outputbase);
155
- TESS_API TessResultRenderer *TessHOcrRendererCreate(const char *outputbase);
156
- TESS_API TessResultRenderer *TessHOcrRendererCreate2(const char *outputbase,
157
- BOOL font_info);
158
- TESS_API TessResultRenderer *TessAltoRendererCreate(const char *outputbase);
159
- TESS_API TessResultRenderer *TessPAGERendererCreate(const char *outputbase);
160
- TESS_API TessResultRenderer *TessTsvRendererCreate(const char *outputbase);
161
- TESS_API TessResultRenderer *TessPDFRendererCreate(const char *outputbase,
162
- const char *datadir,
163
- BOOL textonly);
164
- TESS_API TessResultRenderer *TessUnlvRendererCreate(const char *outputbase);
165
- TESS_API TessResultRenderer *TessBoxTextRendererCreate(const char *outputbase);
166
- TESS_API TessResultRenderer *TessLSTMBoxRendererCreate(const char *outputbase);
167
- TESS_API TessResultRenderer *TessWordStrBoxRendererCreate(
168
- const char *outputbase);
169
-
170
- TESS_API void TessDeleteResultRenderer(TessResultRenderer *renderer);
171
- TESS_API void TessResultRendererInsert(TessResultRenderer *renderer,
172
- TessResultRenderer *next);
173
- TESS_API TessResultRenderer *TessResultRendererNext(
174
- TessResultRenderer *renderer);
175
- TESS_API BOOL TessResultRendererBeginDocument(TessResultRenderer *renderer,
176
- const char *title);
177
- TESS_API BOOL TessResultRendererAddImage(TessResultRenderer *renderer,
178
- TessBaseAPI *api);
179
- TESS_API BOOL TessResultRendererEndDocument(TessResultRenderer *renderer);
180
-
181
- TESS_API const char *TessResultRendererExtention(TessResultRenderer *renderer);
182
- TESS_API const char *TessResultRendererTitle(TessResultRenderer *renderer);
183
- TESS_API int TessResultRendererImageNum(TessResultRenderer *renderer);
184
-
185
- /* Base API */
186
-
187
- TESS_API TessBaseAPI *TessBaseAPICreate();
188
- TESS_API void TessBaseAPIDelete(TessBaseAPI *handle);
189
-
190
- TESS_API void TessBaseAPISetInputName(TessBaseAPI *handle, const char *name);
191
- TESS_API const char *TessBaseAPIGetInputName(TessBaseAPI *handle);
192
-
193
- TESS_API void TessBaseAPISetInputImage(TessBaseAPI *handle, struct Pix *pix);
194
- TESS_API struct Pix *TessBaseAPIGetInputImage(TessBaseAPI *handle);
195
-
196
- TESS_API int TessBaseAPIGetSourceYResolution(TessBaseAPI *handle);
197
- TESS_API const char *TessBaseAPIGetDatapath(TessBaseAPI *handle);
198
-
199
- TESS_API void TessBaseAPISetOutputName(TessBaseAPI *handle, const char *name);
200
-
201
- TESS_API BOOL TessBaseAPISetVariable(TessBaseAPI *handle, const char *name,
202
- const char *value);
203
- TESS_API BOOL TessBaseAPISetDebugVariable(TessBaseAPI *handle, const char *name,
204
- const char *value);
205
-
206
- TESS_API BOOL TessBaseAPIGetIntVariable(const TessBaseAPI *handle,
207
- const char *name, int *value);
208
- TESS_API BOOL TessBaseAPIGetBoolVariable(const TessBaseAPI *handle,
209
- const char *name, BOOL *value);
210
- TESS_API BOOL TessBaseAPIGetDoubleVariable(const TessBaseAPI *handle,
211
- const char *name, double *value);
212
- TESS_API const char *TessBaseAPIGetStringVariable(const TessBaseAPI *handle,
213
- const char *name);
214
-
215
- TESS_API void TessBaseAPIPrintVariables(const TessBaseAPI *handle, FILE *fp);
216
- TESS_API BOOL TessBaseAPIPrintVariablesToFile(const TessBaseAPI *handle,
217
- const char *filename);
218
-
219
- TESS_API int TessBaseAPIInit1(TessBaseAPI *handle, const char *datapath,
220
- const char *language, TessOcrEngineMode oem,
221
- char **configs, int configs_size);
222
- TESS_API int TessBaseAPIInit2(TessBaseAPI *handle, const char *datapath,
223
- const char *language, TessOcrEngineMode oem);
224
- TESS_API int TessBaseAPIInit3(TessBaseAPI *handle, const char *datapath,
225
- const char *language);
226
-
227
- TESS_API int TessBaseAPIInit4(TessBaseAPI *handle, const char *datapath,
228
- const char *language, TessOcrEngineMode mode,
229
- char **configs, int configs_size, char **vars_vec,
230
- char **vars_values, size_t vars_vec_size,
231
- BOOL set_only_non_debug_params);
232
-
233
- TESS_API int TessBaseAPIInit5(TessBaseAPI *handle, const char *data, int data_size,
234
- const char *language, TessOcrEngineMode mode,
235
- char **configs, int configs_size, char **vars_vec,
236
- char **vars_values, size_t vars_vec_size,
237
- BOOL set_only_non_debug_params);
238
-
239
- TESS_API const char *TessBaseAPIGetInitLanguagesAsString(
240
- const TessBaseAPI *handle);
241
- TESS_API char **TessBaseAPIGetLoadedLanguagesAsVector(
242
- const TessBaseAPI *handle);
243
- TESS_API char **TessBaseAPIGetAvailableLanguagesAsVector(
244
- const TessBaseAPI *handle);
245
-
246
- TESS_API void TessBaseAPIInitForAnalysePage(TessBaseAPI *handle);
247
-
248
- TESS_API void TessBaseAPIReadConfigFile(TessBaseAPI *handle,
249
- const char *filename);
250
- TESS_API void TessBaseAPIReadDebugConfigFile(TessBaseAPI *handle,
251
- const char *filename);
252
-
253
- TESS_API void TessBaseAPISetPageSegMode(TessBaseAPI *handle,
254
- TessPageSegMode mode);
255
- TESS_API TessPageSegMode TessBaseAPIGetPageSegMode(const TessBaseAPI *handle);
256
-
257
- TESS_API char *TessBaseAPIRect(TessBaseAPI *handle,
258
- const unsigned char *imagedata,
259
- int bytes_per_pixel, int bytes_per_line,
260
- int left, int top, int width, int height);
261
-
262
- TESS_API void TessBaseAPIClearAdaptiveClassifier(TessBaseAPI *handle);
263
-
264
- TESS_API void TessBaseAPISetImage(TessBaseAPI *handle,
265
- const unsigned char *imagedata, int width,
266
- int height, int bytes_per_pixel,
267
- int bytes_per_line);
268
- TESS_API void TessBaseAPISetImage2(TessBaseAPI *handle, struct Pix *pix);
269
-
270
- TESS_API void TessBaseAPISetSourceResolution(TessBaseAPI *handle, int ppi);
271
-
272
- TESS_API void TessBaseAPISetRectangle(TessBaseAPI *handle, int left, int top,
273
- int width, int height);
274
-
275
- TESS_API struct Pix *TessBaseAPIGetThresholdedImage(TessBaseAPI *handle);
276
- TESS_API float TessBaseAPIGetGradient(TessBaseAPI *handle);
277
- TESS_API struct Boxa *TessBaseAPIGetRegions(TessBaseAPI *handle,
278
- struct Pixa **pixa);
279
- TESS_API struct Boxa *TessBaseAPIGetTextlines(TessBaseAPI *handle,
280
- struct Pixa **pixa,
281
- int **blockids);
282
- TESS_API struct Boxa *TessBaseAPIGetTextlines1(TessBaseAPI *handle,
283
- BOOL raw_image, int raw_padding,
284
- struct Pixa **pixa,
285
- int **blockids, int **paraids);
286
- TESS_API struct Boxa *TessBaseAPIGetStrips(TessBaseAPI *handle,
287
- struct Pixa **pixa, int **blockids);
288
- TESS_API struct Boxa *TessBaseAPIGetWords(TessBaseAPI *handle,
289
- struct Pixa **pixa);
290
- TESS_API struct Boxa *TessBaseAPIGetConnectedComponents(TessBaseAPI *handle,
291
- struct Pixa **cc);
292
- TESS_API struct Boxa *TessBaseAPIGetComponentImages(TessBaseAPI *handle,
293
- TessPageIteratorLevel level,
294
- BOOL text_only,
295
- struct Pixa **pixa,
296
- int **blockids);
297
- TESS_API struct Boxa *TessBaseAPIGetComponentImages1(
298
- TessBaseAPI *handle, TessPageIteratorLevel level, BOOL text_only,
299
- BOOL raw_image, int raw_padding, struct Pixa **pixa, int **blockids,
300
- int **paraids);
301
-
302
- TESS_API int TessBaseAPIGetThresholdedImageScaleFactor(
303
- const TessBaseAPI *handle);
304
-
305
- TESS_API TessPageIterator *TessBaseAPIAnalyseLayout(TessBaseAPI *handle);
306
-
307
- TESS_API int TessBaseAPIRecognize(TessBaseAPI *handle, ETEXT_DESC *monitor);
308
-
309
- TESS_API BOOL TessBaseAPIProcessPages(TessBaseAPI *handle, const char *filename,
310
- const char *retry_config,
311
- int timeout_millisec,
312
- TessResultRenderer *renderer);
313
- TESS_API BOOL TessBaseAPIProcessPage(TessBaseAPI *handle, struct Pix *pix,
314
- int page_index, const char *filename,
315
- const char *retry_config,
316
- int timeout_millisec,
317
- TessResultRenderer *renderer);
318
-
319
- TESS_API TessResultIterator *TessBaseAPIGetIterator(TessBaseAPI *handle);
320
- TESS_API TessMutableIterator *TessBaseAPIGetMutableIterator(
321
- TessBaseAPI *handle);
322
-
323
- TESS_API char *TessBaseAPIGetUTF8Text(TessBaseAPI *handle);
324
- TESS_API char *TessBaseAPIGetHOCRText(TessBaseAPI *handle, int page_number);
325
-
326
- TESS_API char *TessBaseAPIGetAltoText(TessBaseAPI *handle, int page_number);
327
- TESS_API char *TessBaseAPIGetPAGEText(TessBaseAPI *handle, int page_number);
328
- TESS_API char *TessBaseAPIGetTsvText(TessBaseAPI *handle, int page_number);
329
-
330
- TESS_API char *TessBaseAPIGetBoxText(TessBaseAPI *handle, int page_number);
331
- TESS_API char *TessBaseAPIGetLSTMBoxText(TessBaseAPI *handle, int page_number);
332
- TESS_API char *TessBaseAPIGetWordStrBoxText(TessBaseAPI *handle,
333
- int page_number);
334
-
335
- TESS_API char *TessBaseAPIGetUNLVText(TessBaseAPI *handle);
336
- TESS_API int TessBaseAPIMeanTextConf(TessBaseAPI *handle);
337
-
338
- TESS_API int *TessBaseAPIAllWordConfidences(TessBaseAPI *handle);
339
-
340
- #ifndef DISABLED_LEGACY_ENGINE
341
- TESS_API BOOL TessBaseAPIAdaptToWordStr(TessBaseAPI *handle,
342
- TessPageSegMode mode,
343
- const char *wordstr);
344
- #endif // #ifndef DISABLED_LEGACY_ENGINE
345
-
346
- TESS_API void TessBaseAPIClear(TessBaseAPI *handle);
347
- TESS_API void TessBaseAPIEnd(TessBaseAPI *handle);
348
-
349
- TESS_API int TessBaseAPIIsValidWord(TessBaseAPI *handle, const char *word);
350
- TESS_API BOOL TessBaseAPIGetTextDirection(TessBaseAPI *handle, int *out_offset,
351
- float *out_slope);
352
-
353
- TESS_API const char *TessBaseAPIGetUnichar(TessBaseAPI *handle, int unichar_id);
354
-
355
- TESS_API void TessBaseAPIClearPersistentCache(TessBaseAPI *handle);
356
-
357
- #ifndef DISABLED_LEGACY_ENGINE
358
-
359
- // Call TessDeleteText(*best_script_name) to free memory allocated by this
360
- // function
361
- TESS_API BOOL TessBaseAPIDetectOrientationScript(TessBaseAPI *handle,
362
- int *orient_deg,
363
- float *orient_conf,
364
- const char **script_name,
365
- float *script_conf);
366
- #endif // #ifndef DISABLED_LEGACY_ENGINE
367
-
368
- TESS_API void TessBaseAPISetMinOrientationMargin(TessBaseAPI *handle,
369
- double margin);
370
-
371
- TESS_API int TessBaseAPINumDawgs(const TessBaseAPI *handle);
372
-
373
- TESS_API TessOcrEngineMode TessBaseAPIOem(const TessBaseAPI *handle);
374
-
375
- TESS_API void TessBaseGetBlockTextOrientations(TessBaseAPI *handle,
376
- int **block_orientation,
377
- bool **vertical_writing);
378
-
379
- /* Page iterator */
380
-
381
- TESS_API void TessPageIteratorDelete(TessPageIterator *handle);
382
-
383
- TESS_API TessPageIterator *TessPageIteratorCopy(const TessPageIterator *handle);
384
-
385
- TESS_API void TessPageIteratorBegin(TessPageIterator *handle);
386
-
387
- TESS_API BOOL TessPageIteratorNext(TessPageIterator *handle,
388
- TessPageIteratorLevel level);
389
-
390
- TESS_API BOOL TessPageIteratorIsAtBeginningOf(const TessPageIterator *handle,
391
- TessPageIteratorLevel level);
392
-
393
- TESS_API BOOL TessPageIteratorIsAtFinalElement(const TessPageIterator *handle,
394
- TessPageIteratorLevel level,
395
- TessPageIteratorLevel element);
396
-
397
- TESS_API BOOL TessPageIteratorBoundingBox(const TessPageIterator *handle,
398
- TessPageIteratorLevel level,
399
- int *left, int *top, int *right,
400
- int *bottom);
401
-
402
- TESS_API TessPolyBlockType
403
- TessPageIteratorBlockType(const TessPageIterator *handle);
404
-
405
- TESS_API struct Pix *TessPageIteratorGetBinaryImage(
406
- const TessPageIterator *handle, TessPageIteratorLevel level);
407
-
408
- TESS_API struct Pix *TessPageIteratorGetImage(const TessPageIterator *handle,
409
- TessPageIteratorLevel level,
410
- int padding,
411
- struct Pix *original_image,
412
- int *left, int *top);
413
-
414
- TESS_API BOOL TessPageIteratorBaseline(const TessPageIterator *handle,
415
- TessPageIteratorLevel level, int *x1,
416
- int *y1, int *x2, int *y2);
417
-
418
- TESS_API void TessPageIteratorOrientation(
419
- TessPageIterator *handle, TessOrientation *orientation,
420
- TessWritingDirection *writing_direction, TessTextlineOrder *textline_order,
421
- float *deskew_angle);
422
-
423
- TESS_API void TessPageIteratorParagraphInfo(
424
- TessPageIterator *handle, TessParagraphJustification *justification,
425
- BOOL *is_list_item, BOOL *is_crown, int *first_line_indent);
426
-
427
- /* Result iterator */
428
-
429
- TESS_API void TessResultIteratorDelete(TessResultIterator *handle);
430
- TESS_API TessResultIterator *TessResultIteratorCopy(
431
- const TessResultIterator *handle);
432
- TESS_API TessPageIterator *TessResultIteratorGetPageIterator(
433
- TessResultIterator *handle);
434
- TESS_API const TessPageIterator *TessResultIteratorGetPageIteratorConst(
435
- const TessResultIterator *handle);
436
- TESS_API TessChoiceIterator *TessResultIteratorGetChoiceIterator(
437
- const TessResultIterator *handle);
438
-
439
- TESS_API BOOL TessResultIteratorNext(TessResultIterator *handle,
440
- TessPageIteratorLevel level);
441
- TESS_API char *TessResultIteratorGetUTF8Text(const TessResultIterator *handle,
442
- TessPageIteratorLevel level);
443
- TESS_API float TessResultIteratorConfidence(const TessResultIterator *handle,
444
- TessPageIteratorLevel level);
445
- TESS_API const char *TessResultIteratorWordRecognitionLanguage(
446
- const TessResultIterator *handle);
447
- TESS_API const char *TessResultIteratorWordFontAttributes(
448
- const TessResultIterator *handle, BOOL *is_bold, BOOL *is_italic,
449
- BOOL *is_underlined, BOOL *is_monospace, BOOL *is_serif, BOOL *is_smallcaps,
450
- int *pointsize, int *font_id);
451
-
452
- TESS_API BOOL
453
- TessResultIteratorWordIsFromDictionary(const TessResultIterator *handle);
454
- TESS_API BOOL TessResultIteratorWordIsNumeric(const TessResultIterator *handle);
455
- TESS_API BOOL
456
- TessResultIteratorSymbolIsSuperscript(const TessResultIterator *handle);
457
- TESS_API BOOL
458
- TessResultIteratorSymbolIsSubscript(const TessResultIterator *handle);
459
- TESS_API BOOL
460
- TessResultIteratorSymbolIsDropcap(const TessResultIterator *handle);
461
-
462
- TESS_API void TessChoiceIteratorDelete(TessChoiceIterator *handle);
463
- TESS_API BOOL TessChoiceIteratorNext(TessChoiceIterator *handle);
464
- TESS_API const char *TessChoiceIteratorGetUTF8Text(
465
- const TessChoiceIterator *handle);
466
- TESS_API float TessChoiceIteratorConfidence(const TessChoiceIterator *handle);
467
-
468
- /* Progress monitor */
469
-
470
- TESS_API ETEXT_DESC *TessMonitorCreate();
471
- TESS_API void TessMonitorDelete(ETEXT_DESC *monitor);
472
- TESS_API void TessMonitorSetCancelFunc(ETEXT_DESC *monitor,
473
- TessCancelFunc cancelFunc);
474
- TESS_API void TessMonitorSetCancelThis(ETEXT_DESC *monitor, void *cancelThis);
475
- TESS_API void *TessMonitorGetCancelThis(ETEXT_DESC *monitor);
476
- TESS_API void TessMonitorSetProgressFunc(ETEXT_DESC *monitor,
477
- TessProgressFunc progressFunc);
478
- TESS_API int TessMonitorGetProgress(ETEXT_DESC *monitor);
479
- TESS_API void TessMonitorSetDeadlineMSecs(ETEXT_DESC *monitor, int deadline);
480
-
481
- #ifdef __cplusplus
482
- }
483
- #endif
484
-
485
- #endif // API_CAPI_H_
@@ -1,37 +0,0 @@
1
- // SPDX-License-Identifier: Apache-2.0
2
- // File: export.h
3
- // Description: Place holder
4
- //
5
- // (C) Copyright 2006, Google Inc.
6
- // Licensed under the Apache License, Version 2.0 (the "License");
7
- // you may not use this file except in compliance with the License.
8
- // You may obtain a copy of the License at
9
- // http://www.apache.org/licenses/LICENSE-2.0
10
- // Unless required by applicable law or agreed to in writing, software
11
- // distributed under the License is distributed on an "AS IS" BASIS,
12
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- // See the License for the specific language governing permissions and
14
- // limitations under the License.
15
-
16
- #ifndef TESSERACT_PLATFORM_H_
17
- #define TESSERACT_PLATFORM_H_
18
-
19
- #ifndef TESS_API
20
- # if defined(_WIN32) || defined(__CYGWIN__)
21
- # if defined(TESS_EXPORTS)
22
- # define TESS_API __declspec(dllexport)
23
- # elif defined(TESS_IMPORTS)
24
- # define TESS_API __declspec(dllimport)
25
- # else
26
- # define TESS_API
27
- # endif
28
- # else
29
- # if defined(TESS_EXPORTS) || defined(TESS_IMPORTS)
30
- # define TESS_API __attribute__((visibility("default")))
31
- # else
32
- # define TESS_API
33
- # endif
34
- # endif
35
- #endif
36
-
37
- #endif // TESSERACT_PLATFORM_H_