@girs/anthy-9000 9000.0.0-3.0.0-beta.12

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/README.md ADDED
@@ -0,0 +1,31 @@
1
+
2
+ # Anthy-9000
3
+
4
+ GJS TypeScript type definitions for Anthy-9000, generated from library version 9000.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gjs) v3.0.0-beta.12.
5
+
6
+ ## Install
7
+
8
+ To use this type definitions, install them with NPM like this:
9
+ ```bash
10
+ npm install @girs/anthy-9000
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ You can import this package into your project like this:
16
+ ```ts
17
+ import Anthy from '@girs/anthy-9000';
18
+ ```
19
+
20
+ Or if you prefer CommonJS, you can also use this:
21
+ ```ts
22
+ const Anthy = require('@girs/anthy-9000');
23
+ ```
24
+
25
+ If you use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules), you can also import this module like you would do this in JavaScript:
26
+
27
+ ```ts
28
+ import Anthy from 'gi://Anthy?version=9000';
29
+ ```
30
+
31
+ Depending on your project configuration, it is recommended to use a bundler like [esbuild](https://esbuild.github.io/). You can find examples using different bundlers [here](https://github.com/gjsify/ts-for-gir/tree/main/examples).
package/anthy-9000.cjs ADDED
@@ -0,0 +1,9 @@
1
+
2
+
3
+ imports.gi.versions.Anthy = '9000'
4
+ const Anthy = imports.gi.Anthy;
5
+
6
+ module.exports = Anthy;
7
+
8
+
9
+
@@ -0,0 +1,261 @@
1
+
2
+ /*
3
+ * Type Definitions for Gjs (https://gjs.guide/)
4
+ *
5
+ * These type definitions are automatically generated, do not edit them by hand.
6
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gjs
7
+ */
8
+ /**
9
+ * Anthy-9000
10
+ */
11
+
12
+ import type GObject from '@girs/gobject-2.0';
13
+ import type GLib from '@girs/glib-2.0';
14
+
15
+ export const COMPILED_ENCODING: number
16
+ export const EUC_JP_ENCODING: number
17
+ export const NTH_HALFKANA_CANDIDATE: number
18
+ export const NTH_HIRAGANA_CANDIDATE: number
19
+ export const NTH_KATAKANA_CANDIDATE: number
20
+ export const NTH_UNCONVERTED_CANDIDATE: number
21
+ export const RECONVERT_ALWAYS: number
22
+ export const RECONVERT_AUTO: number
23
+ export const RECONVERT_DISABLE: number
24
+ export const UTF8_ENCODING: number
25
+ export function commit_prediction(arg0: anthy_context_t, arg1: number): number
26
+ export function commit_segment(arg0: anthy_context_t, arg1: number, arg2: number): number
27
+ export function conf_override(arg0: string | null, arg1: string | null): void
28
+ export function context_set_encoding(ac: anthy_context_t, encoding: number): number
29
+ export function get_prediction(arg0: anthy_context_t, arg1: number, arg2: string | null, arg3: number): number
30
+ export function get_prediction_stat(arg0: anthy_context_t, arg1: any): number
31
+ export function get_segment(arg0: anthy_context_t, arg1: number, arg2: number, arg3: string | null, arg4: number): number
32
+ export function get_segment_stat(arg0: anthy_context_t, arg1: number, arg2: any): number
33
+ export function get_stat(arg0: anthy_context_t, arg1: any): number
34
+ export function get_version_string(): string | null
35
+ export function init(): number
36
+ export function print_context(arg0: anthy_context_t): void
37
+ export function quit(): void
38
+ export function release_context(arg0: anthy_context_t): void
39
+ export function reset_context(arg0: anthy_context_t): void
40
+ export function resize_segment(arg0: anthy_context_t, arg1: number, arg2: number): void
41
+ export function set_personality(arg0: string | null): number
42
+ export function set_prediction_string(arg0: anthy_context_t, arg1: string | null): number
43
+ export function set_reconversion_mode(ac: anthy_context_t, mode: number): number
44
+ export function set_string(arg0: anthy_context_t, arg1: string | null): number
45
+ export interface logger {
46
+ (level: number, arg1: string | null): void
47
+ }
48
+ export module GContext {
49
+
50
+ // Constructor properties interface
51
+
52
+ export interface ConstructorProperties extends GObject.InitiallyUnowned.ConstructorProperties {
53
+ }
54
+
55
+ }
56
+
57
+ export interface GContext {
58
+
59
+ // Own fields of Anthy-9000.Anthy.GContext
60
+
61
+ parent: GObject.InitiallyUnowned
62
+ priv: GContextPrivate
63
+
64
+ // Owm methods of Anthy-9000.Anthy.GContext
65
+
66
+ /**
67
+ * Commit a prediction string with `ntg_seg` .
68
+ * @param nth_seg Nth segment
69
+ */
70
+ commit_prediction(nth_seg: number): number
71
+ /**
72
+ * Commit a string with `ntg_seg` and `nth_lookup`.
73
+ * @param nth_seg Nth segment
74
+ * @param nth_lookup Nth lookup
75
+ */
76
+ commit_segment(nth_seg: number, nth_lookup: number): number
77
+ /**
78
+ * Set a personal dictionary.
79
+ * @param dict_name a Dictionary name
80
+ */
81
+ do_set_personality(dict_name: string | null): number
82
+ /**
83
+ * The number of the candidates
84
+ * @param nth_seg
85
+ * @returns The number of the candidates
86
+ */
87
+ get_nr_candidates(nth_seg: number): number
88
+ /**
89
+ * The number of the converted segments in the current prediction string.
90
+ * @returns The number of the converted segments in the current prediction string.
91
+ */
92
+ get_nr_predictions(): number
93
+ /**
94
+ * The number of the converted segments
95
+ * @returns The number of the converted segments
96
+ */
97
+ get_nr_segments(): number
98
+ /**
99
+ * A newly assigned string with `ntg_seg` .
100
+ * @param nth_seg Nth segment
101
+ * @returns A newly assigned string.
102
+ */
103
+ get_prediction(nth_seg: number): string | null
104
+ /**
105
+ * A newly assigned string with `ntg_seg` and `nth_lookup` .
106
+ * @param nth_seg Nth segment
107
+ * @param nth_lookup Nth lookup
108
+ * @returns A newly assigned string.
109
+ */
110
+ get_segment(nth_seg: number, nth_lookup: number): string | null
111
+ /**
112
+ * Initialize the personal dictionaries.
113
+ */
114
+ init_personality(): void
115
+ /**
116
+ * Resize the nth segment.
117
+ * @param nth nth segment
118
+ * @param resize size
119
+ */
120
+ resize_segment(nth: number, resize: number): void
121
+ /**
122
+ * Set an encoding.
123
+ * @param encoding An encoding
124
+ */
125
+ set_encoding(encoding: number): number
126
+ /**
127
+ * Set a prediction string.
128
+ * @param string A prediction string
129
+ */
130
+ set_prediction_string(string: string | null): number
131
+ /**
132
+ * Set a conversion string.
133
+ * @param string A conversion string
134
+ */
135
+ set_string(string: string | null): number
136
+
137
+ // Class property signals of Anthy-9000.Anthy.GContext
138
+
139
+ connect(sigName: string, callback: (...args: any[]) => void): number
140
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
141
+ emit(sigName: string, ...args: any[]): void
142
+ disconnect(id: number): void
143
+ }
144
+
145
+ /**
146
+ * An #AnthyGContext is an object that handles conversion strings.
147
+ * @class
148
+ */
149
+ export class GContext extends GObject.InitiallyUnowned {
150
+
151
+ // Own properties of Anthy-9000.Anthy.GContext
152
+
153
+ static name: string
154
+ static $gtype: GObject.GType<GContext>
155
+
156
+ // Constructors of Anthy-9000.Anthy.GContext
157
+
158
+ constructor(config?: GContext.ConstructorProperties)
159
+ /**
160
+ * New an #AnthyGobject.
161
+ * @constructor
162
+ * @returns A newly allocated #AnthyGContext
163
+ */
164
+ constructor()
165
+ /**
166
+ * New an #AnthyGobject.
167
+ * @constructor
168
+ * @returns A newly allocated #AnthyGContext
169
+ */
170
+ static new(): GContext
171
+ _init(config?: GContext.ConstructorProperties): void
172
+ }
173
+
174
+ export interface GContextClass {
175
+
176
+ // Own fields of Anthy-9000.Anthy.GContextClass
177
+
178
+ parent: GObject.InitiallyUnownedClass
179
+ }
180
+
181
+ export abstract class GContextClass {
182
+
183
+ // Own properties of Anthy-9000.Anthy.GContextClass
184
+
185
+ static name: string
186
+ }
187
+
188
+ export interface GContextPrivate {
189
+ }
190
+
191
+ export class GContextPrivate {
192
+
193
+ // Own properties of Anthy-9000.Anthy.GContextPrivate
194
+
195
+ static name: string
196
+ }
197
+
198
+ export interface anthy_context_t {
199
+ }
200
+
201
+ export class anthy_context_t {
202
+
203
+ // Own properties of Anthy-9000.Anthy.anthy_context_t
204
+
205
+ static name: string
206
+ }
207
+
208
+ export interface anthy_conv_stat {
209
+
210
+ // Own fields of Anthy-9000.Anthy.anthy_conv_stat
211
+
212
+ nr_segment: number
213
+ }
214
+
215
+ export class anthy_conv_stat {
216
+
217
+ // Own properties of Anthy-9000.Anthy.anthy_conv_stat
218
+
219
+ static name: string
220
+ }
221
+
222
+ export interface anthy_prediction_stat {
223
+
224
+ // Own fields of Anthy-9000.Anthy.anthy_prediction_stat
225
+
226
+ nr_prediction: number
227
+ }
228
+
229
+ export class anthy_prediction_stat {
230
+
231
+ // Own properties of Anthy-9000.Anthy.anthy_prediction_stat
232
+
233
+ static name: string
234
+ }
235
+
236
+ export interface anthy_segment_stat {
237
+
238
+ // Own fields of Anthy-9000.Anthy.anthy_segment_stat
239
+
240
+ nr_candidate: number
241
+ seg_len: number
242
+ }
243
+
244
+ export class anthy_segment_stat {
245
+
246
+ // Own properties of Anthy-9000.Anthy.anthy_segment_stat
247
+
248
+ static name: string
249
+ }
250
+
251
+ /**
252
+ * Name of the imported GIR library
253
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
254
+ */
255
+ export const __name__: string
256
+ /**
257
+ * Version of the imported GIR library
258
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
259
+ */
260
+ export const __version__: string
261
+ // END
@@ -0,0 +1,266 @@
1
+
2
+ /*
3
+ * Type Definitions for Gjs (https://gjs.guide/)
4
+ *
5
+ * These type definitions are automatically generated, do not edit them by hand.
6
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gjs
7
+ */
8
+ /**
9
+ * Anthy-9000
10
+ */
11
+
12
+ import type GObject from '@girs/gobject-2.0';
13
+ import type GLib from '@girs/glib-2.0';
14
+
15
+ export namespace Anthy {
16
+
17
+ const COMPILED_ENCODING: number
18
+ const EUC_JP_ENCODING: number
19
+ const NTH_HALFKANA_CANDIDATE: number
20
+ const NTH_HIRAGANA_CANDIDATE: number
21
+ const NTH_KATAKANA_CANDIDATE: number
22
+ const NTH_UNCONVERTED_CANDIDATE: number
23
+ const RECONVERT_ALWAYS: number
24
+ const RECONVERT_AUTO: number
25
+ const RECONVERT_DISABLE: number
26
+ const UTF8_ENCODING: number
27
+ function commit_prediction(arg0: anthy_context_t, arg1: number): number
28
+ function commit_segment(arg0: anthy_context_t, arg1: number, arg2: number): number
29
+ function conf_override(arg0: string | null, arg1: string | null): void
30
+ function context_set_encoding(ac: anthy_context_t, encoding: number): number
31
+ function get_prediction(arg0: anthy_context_t, arg1: number, arg2: string | null, arg3: number): number
32
+ function get_prediction_stat(arg0: anthy_context_t, arg1: any): number
33
+ function get_segment(arg0: anthy_context_t, arg1: number, arg2: number, arg3: string | null, arg4: number): number
34
+ function get_segment_stat(arg0: anthy_context_t, arg1: number, arg2: any): number
35
+ function get_stat(arg0: anthy_context_t, arg1: any): number
36
+ function get_version_string(): string | null
37
+ function init(): number
38
+ function print_context(arg0: anthy_context_t): void
39
+ function quit(): void
40
+ function release_context(arg0: anthy_context_t): void
41
+ function reset_context(arg0: anthy_context_t): void
42
+ function resize_segment(arg0: anthy_context_t, arg1: number, arg2: number): void
43
+ function set_personality(arg0: string | null): number
44
+ function set_prediction_string(arg0: anthy_context_t, arg1: string | null): number
45
+ function set_reconversion_mode(ac: anthy_context_t, mode: number): number
46
+ function set_string(arg0: anthy_context_t, arg1: string | null): number
47
+ interface logger {
48
+ (level: number, arg1: string | null): void
49
+ }
50
+ module GContext {
51
+
52
+ // Constructor properties interface
53
+
54
+ interface ConstructorProperties extends GObject.InitiallyUnowned.ConstructorProperties {
55
+ }
56
+
57
+ }
58
+
59
+ interface GContext {
60
+
61
+ // Own fields of Anthy-9000.Anthy.GContext
62
+
63
+ parent: GObject.InitiallyUnowned
64
+ priv: GContextPrivate
65
+
66
+ // Owm methods of Anthy-9000.Anthy.GContext
67
+
68
+ /**
69
+ * Commit a prediction string with `ntg_seg` .
70
+ * @param nth_seg Nth segment
71
+ */
72
+ commit_prediction(nth_seg: number): number
73
+ /**
74
+ * Commit a string with `ntg_seg` and `nth_lookup`.
75
+ * @param nth_seg Nth segment
76
+ * @param nth_lookup Nth lookup
77
+ */
78
+ commit_segment(nth_seg: number, nth_lookup: number): number
79
+ /**
80
+ * Set a personal dictionary.
81
+ * @param dict_name a Dictionary name
82
+ */
83
+ do_set_personality(dict_name: string | null): number
84
+ /**
85
+ * The number of the candidates
86
+ * @param nth_seg
87
+ * @returns The number of the candidates
88
+ */
89
+ get_nr_candidates(nth_seg: number): number
90
+ /**
91
+ * The number of the converted segments in the current prediction string.
92
+ * @returns The number of the converted segments in the current prediction string.
93
+ */
94
+ get_nr_predictions(): number
95
+ /**
96
+ * The number of the converted segments
97
+ * @returns The number of the converted segments
98
+ */
99
+ get_nr_segments(): number
100
+ /**
101
+ * A newly assigned string with `ntg_seg` .
102
+ * @param nth_seg Nth segment
103
+ * @returns A newly assigned string.
104
+ */
105
+ get_prediction(nth_seg: number): string | null
106
+ /**
107
+ * A newly assigned string with `ntg_seg` and `nth_lookup` .
108
+ * @param nth_seg Nth segment
109
+ * @param nth_lookup Nth lookup
110
+ * @returns A newly assigned string.
111
+ */
112
+ get_segment(nth_seg: number, nth_lookup: number): string | null
113
+ /**
114
+ * Initialize the personal dictionaries.
115
+ */
116
+ init_personality(): void
117
+ /**
118
+ * Resize the nth segment.
119
+ * @param nth nth segment
120
+ * @param resize size
121
+ */
122
+ resize_segment(nth: number, resize: number): void
123
+ /**
124
+ * Set an encoding.
125
+ * @param encoding An encoding
126
+ */
127
+ set_encoding(encoding: number): number
128
+ /**
129
+ * Set a prediction string.
130
+ * @param string A prediction string
131
+ */
132
+ set_prediction_string(string: string | null): number
133
+ /**
134
+ * Set a conversion string.
135
+ * @param string A conversion string
136
+ */
137
+ set_string(string: string | null): number
138
+
139
+ // Class property signals of Anthy-9000.Anthy.GContext
140
+
141
+ connect(sigName: string, callback: (...args: any[]) => void): number
142
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
143
+ emit(sigName: string, ...args: any[]): void
144
+ disconnect(id: number): void
145
+ }
146
+
147
+ /**
148
+ * An #AnthyGContext is an object that handles conversion strings.
149
+ * @class
150
+ */
151
+ class GContext extends GObject.InitiallyUnowned {
152
+
153
+ // Own properties of Anthy-9000.Anthy.GContext
154
+
155
+ static name: string
156
+ static $gtype: GObject.GType<GContext>
157
+
158
+ // Constructors of Anthy-9000.Anthy.GContext
159
+
160
+ constructor(config?: GContext.ConstructorProperties)
161
+ /**
162
+ * New an #AnthyGobject.
163
+ * @constructor
164
+ * @returns A newly allocated #AnthyGContext
165
+ */
166
+ constructor()
167
+ /**
168
+ * New an #AnthyGobject.
169
+ * @constructor
170
+ * @returns A newly allocated #AnthyGContext
171
+ */
172
+ static new(): GContext
173
+ _init(config?: GContext.ConstructorProperties): void
174
+ }
175
+
176
+ interface GContextClass {
177
+
178
+ // Own fields of Anthy-9000.Anthy.GContextClass
179
+
180
+ parent: GObject.InitiallyUnownedClass
181
+ }
182
+
183
+ abstract class GContextClass {
184
+
185
+ // Own properties of Anthy-9000.Anthy.GContextClass
186
+
187
+ static name: string
188
+ }
189
+
190
+ interface GContextPrivate {
191
+ }
192
+
193
+ class GContextPrivate {
194
+
195
+ // Own properties of Anthy-9000.Anthy.GContextPrivate
196
+
197
+ static name: string
198
+ }
199
+
200
+ interface anthy_context_t {
201
+ }
202
+
203
+ class anthy_context_t {
204
+
205
+ // Own properties of Anthy-9000.Anthy.anthy_context_t
206
+
207
+ static name: string
208
+ }
209
+
210
+ interface anthy_conv_stat {
211
+
212
+ // Own fields of Anthy-9000.Anthy.anthy_conv_stat
213
+
214
+ nr_segment: number
215
+ }
216
+
217
+ class anthy_conv_stat {
218
+
219
+ // Own properties of Anthy-9000.Anthy.anthy_conv_stat
220
+
221
+ static name: string
222
+ }
223
+
224
+ interface anthy_prediction_stat {
225
+
226
+ // Own fields of Anthy-9000.Anthy.anthy_prediction_stat
227
+
228
+ nr_prediction: number
229
+ }
230
+
231
+ class anthy_prediction_stat {
232
+
233
+ // Own properties of Anthy-9000.Anthy.anthy_prediction_stat
234
+
235
+ static name: string
236
+ }
237
+
238
+ interface anthy_segment_stat {
239
+
240
+ // Own fields of Anthy-9000.Anthy.anthy_segment_stat
241
+
242
+ nr_candidate: number
243
+ seg_len: number
244
+ }
245
+
246
+ class anthy_segment_stat {
247
+
248
+ // Own properties of Anthy-9000.Anthy.anthy_segment_stat
249
+
250
+ static name: string
251
+ }
252
+
253
+ /**
254
+ * Name of the imported GIR library
255
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
256
+ */
257
+ const __name__: string
258
+ /**
259
+ * Version of the imported GIR library
260
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
261
+ */
262
+ const __version__: string
263
+ }
264
+
265
+ export default Anthy;
266
+ // END
package/anthy-9000.js ADDED
@@ -0,0 +1,8 @@
1
+
2
+
3
+ // @ts-expect-error
4
+ import Anthy from 'gi://Anthy?version=9000';
5
+ export { Anthy };
6
+ export default Anthy;
7
+
8
+
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@girs/anthy-9000",
3
+ "version": "9000.0.0-3.0.0-beta.12",
4
+ "description": "GJS TypeScript type definitions for Anthy-9000, generated from library version 9000.0.0",
5
+ "type": "module",
6
+ "module": "anthy-9000.js",
7
+ "main": "anthy-9000.js",
8
+ "typedoc": {
9
+ "entryPoint": "./anthy-9000.d.ts",
10
+ "readmeFile": "./README.md",
11
+ "displayName": "Anthy-9000",
12
+ "tsconfig": "./tsconfig.doc.json"
13
+ },
14
+ "exports": {
15
+ ".": {
16
+ "import": {
17
+ "types": "./anthy-9000.d.ts",
18
+ "default": "./anthy-9000.js"
19
+ },
20
+ "require": {
21
+ "types": "./anthy-9000.d.cts",
22
+ "default": "./anthy-9000.cjs"
23
+ }
24
+ }
25
+ },
26
+ "scripts": {
27
+ "test": "yarn test:esm && yarn test:cjs",
28
+ "test:esm": "tsc --noEmit anthy-9000.d.ts",
29
+ "test:cjs": "tsc --noEmit anthy-9000.d.cts"
30
+ },
31
+ "dependencies": {
32
+ "@girs/glib-2.0": "^2.75.1-3.0.0-beta.12",
33
+ "@girs/gobject-2.0": "^2.75.1-3.0.0-beta.12"
34
+ },
35
+ "devDependencies": {
36
+ "typescript": "^*"
37
+ },
38
+ "keywords": [
39
+ "Gir",
40
+ "TypeScript",
41
+ "Anthy-9000"
42
+ ],
43
+ "author": "ts-for-gir",
44
+ "license": "Apache-2.0",
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "git+https://github.com/gjsify/ts-for-gir.git"
48
+ },
49
+ "bugs": {
50
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
51
+ },
52
+ "homepage": "https://github.com/gjsify/ts-for-gir#readme"
53
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "compilerOptions": {
3
+ // General settings for code interpretation
4
+ "target": "ESNext",
5
+ "module": "ESNext",
6
+ "experimentalDecorators": true,
7
+ "moduleResolution": "node",
8
+ "noEmit": true,
9
+ "noEmitOnError": false,
10
+ "baseUrl": "./",
11
+ "rootDir": ".",
12
+ // General settings for code generation
13
+ "removeComments": false,
14
+ "inlineSourceMap": false,
15
+ "inlineSources": false,
16
+ "newLine": "LF"
17
+ },
18
+ "include": ["./anthy-9000.d.ts"]
19
+ }