@girs/cvc-1.0 4.4.0 → 4.6.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/README.md +36 -41
- package/cvc-1.0.d.ts +34 -31
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -4,82 +4,77 @@
|
|
|
4
4
|

|
|
5
5
|

|
|
6
6
|
|
|
7
|
+
GJS TypeScript type definitions for Cvc-1.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.6.0.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
This package contains type declarations only. It ships no runtime code, so it adds
|
|
10
|
+
nothing to your program and works with any bundler or none at all.
|
|
9
11
|
|
|
10
12
|
## Install
|
|
11
13
|
|
|
12
|
-
Install the type definitions with npm:
|
|
13
14
|
```bash
|
|
14
15
|
npm install @girs/cvc-1.0
|
|
15
16
|
```
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
Any package manager works. The package has no dependencies beyond other `@girs/*`
|
|
19
|
+
type packages.
|
|
20
|
+
|
|
21
|
+
## What it exports
|
|
22
|
+
|
|
23
|
+
| Import | What you get |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `@girs/cvc-1.0` | the namespace as a default export, plus the ambient and global declarations |
|
|
26
|
+
| `@girs/cvc-1.0/ambient` | only the `gi://` module declarations |
|
|
27
|
+
| `@girs/cvc-1.0/import` | only the `imports.gi` declarations |
|
|
28
|
+
| `@girs/cvc-1.0/cvc-1.0` | the namespace, without the side-effecting declarations |
|
|
29
|
+
|
|
30
|
+
## Three ways to import
|
|
31
|
+
|
|
32
|
+
Which one you use depends on how you write imports elsewhere, not on your toolchain.
|
|
33
|
+
|
|
34
|
+
### As a module
|
|
18
35
|
|
|
19
|
-
Import it like any other module:
|
|
20
36
|
```ts
|
|
21
37
|
import Cvc from '@girs/cvc-1.0';
|
|
22
38
|
```
|
|
23
39
|
|
|
24
|
-
###
|
|
40
|
+
### As `gi://`
|
|
25
41
|
|
|
26
|
-
|
|
27
|
-
|
|
42
|
+
GJS resolves `gi://` at runtime. To give it types, reference the package once, either
|
|
43
|
+
from your entry point or from `tsconfig.json`:
|
|
28
44
|
|
|
29
|
-
`index.ts`:
|
|
30
45
|
```ts
|
|
31
|
-
import '@girs/cvc-1.0'
|
|
46
|
+
import '@girs/cvc-1.0';
|
|
32
47
|
```
|
|
33
48
|
|
|
34
|
-
`tsconfig.json`:
|
|
35
49
|
```json
|
|
36
|
-
{
|
|
37
|
-
"compilerOptions": {
|
|
38
|
-
...
|
|
39
|
-
},
|
|
40
|
-
"include": ["@girs/cvc-1.0"],
|
|
41
|
-
...
|
|
42
|
-
}
|
|
50
|
+
{ "include": ["@girs/cvc-1.0"] }
|
|
43
51
|
```
|
|
44
52
|
|
|
45
|
-
|
|
53
|
+
Then the runtime spelling type-checks:
|
|
46
54
|
|
|
47
55
|
```ts
|
|
48
56
|
import Cvc from 'gi://Cvc?version=1.0';
|
|
49
57
|
```
|
|
50
58
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
GJS's global `imports.gi` works too, with types.
|
|
54
|
-
For this you need to include `@girs/cvc-1.0` or `@girs/cvc-1.0/import` in your `tsconfig` or entry point Typescript file:
|
|
59
|
+
Referencing `@girs/cvc-1.0/ambient` instead pulls in these declarations
|
|
60
|
+
alone. See [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules).
|
|
55
61
|
|
|
56
|
-
`
|
|
57
|
-
```ts
|
|
58
|
-
import '@girs/cvc-1.0'
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
`tsconfig.json`:
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"compilerOptions": {
|
|
65
|
-
...
|
|
66
|
-
},
|
|
67
|
-
"include": ["@girs/cvc-1.0"],
|
|
68
|
-
...
|
|
69
|
-
}
|
|
70
|
-
```
|
|
62
|
+
### As `imports.gi`
|
|
71
63
|
|
|
72
|
-
|
|
64
|
+
GJS's global object works the same way, via `@girs/cvc-1.0/import`:
|
|
73
65
|
|
|
74
66
|
```ts
|
|
75
67
|
const Cvc = imports.gi.Cvc;
|
|
76
68
|
```
|
|
77
69
|
|
|
78
|
-
|
|
70
|
+
## Building
|
|
79
71
|
|
|
80
|
-
|
|
72
|
+
The declarations need no build step. If you bundle, every bundler works, since there is
|
|
73
|
+
no runtime code to resolve. The [examples](https://github.com/gjsify/ts-for-gir/tree/main/examples)
|
|
74
|
+
show working setups for several.
|
|
81
75
|
|
|
82
76
|
## Other packages
|
|
83
77
|
|
|
84
|
-
|
|
78
|
+
Every pre-generated package is at [gjsify/types](https://github.com/gjsify/types).
|
|
79
|
+
|
|
85
80
|
|
package/cvc-1.0.d.ts
CHANGED
|
@@ -34,10 +34,10 @@ export namespace Cvc {
|
|
|
34
34
|
* @gir-type Enum
|
|
35
35
|
*/
|
|
36
36
|
enum MixerControlState {
|
|
37
|
-
CLOSED,
|
|
38
|
-
READY,
|
|
39
|
-
CONNECTING,
|
|
40
|
-
FAILED,
|
|
37
|
+
CLOSED = 0,
|
|
38
|
+
READY = 1,
|
|
39
|
+
CONNECTING = 2,
|
|
40
|
+
FAILED = 3,
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
|
|
@@ -52,10 +52,10 @@ export namespace Cvc {
|
|
|
52
52
|
* @gir-type Enum
|
|
53
53
|
*/
|
|
54
54
|
enum MixerStreamState {
|
|
55
|
-
INVALID,
|
|
56
|
-
RUNNING,
|
|
57
|
-
IDLE,
|
|
58
|
-
SUSPENDED,
|
|
55
|
+
INVALID = 0,
|
|
56
|
+
RUNNING = 1,
|
|
57
|
+
IDLE = 2,
|
|
58
|
+
SUSPENDED = 3,
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
|
|
@@ -70,11 +70,14 @@ export namespace Cvc {
|
|
|
70
70
|
* @gir-type Enum
|
|
71
71
|
*/
|
|
72
72
|
enum MixerUIDeviceDirection {
|
|
73
|
-
INPUT,
|
|
74
|
-
OUTPUT,
|
|
73
|
+
INPUT = 0,
|
|
74
|
+
OUTPUT = 1,
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
|
|
78
|
+
/**
|
|
79
|
+
* @default 0
|
|
80
|
+
*/
|
|
78
81
|
const MIXER_UI_DEVICE_INVALID: number;
|
|
79
82
|
|
|
80
83
|
/**
|
|
@@ -88,10 +91,10 @@ export namespace Cvc {
|
|
|
88
91
|
* @gir-type Flags
|
|
89
92
|
*/
|
|
90
93
|
enum HeadsetPortChoice {
|
|
91
|
-
NONE,
|
|
92
|
-
HEADPHONES,
|
|
93
|
-
HEADSET,
|
|
94
|
-
MIC,
|
|
94
|
+
NONE = 0,
|
|
95
|
+
HEADPHONES = 1,
|
|
96
|
+
HEADSET = 2,
|
|
97
|
+
MIC = 4,
|
|
95
98
|
}
|
|
96
99
|
|
|
97
100
|
|
|
@@ -102,7 +105,7 @@ export namespace Cvc {
|
|
|
102
105
|
* @signal
|
|
103
106
|
* @run-last
|
|
104
107
|
*/
|
|
105
|
-
"volume-changed": (
|
|
108
|
+
"volume-changed": (object: boolean) => void;
|
|
106
109
|
}
|
|
107
110
|
|
|
108
111
|
// Constructor properties interface
|
|
@@ -367,77 +370,77 @@ export namespace Cvc {
|
|
|
367
370
|
* @signal
|
|
368
371
|
* @run-last
|
|
369
372
|
*/
|
|
370
|
-
"active-input-update": (
|
|
373
|
+
"active-input-update": (object: number) => void;
|
|
371
374
|
/**
|
|
372
375
|
* @signal
|
|
373
376
|
* @run-last
|
|
374
377
|
*/
|
|
375
|
-
"active-output-update": (
|
|
378
|
+
"active-output-update": (object: number) => void;
|
|
376
379
|
/**
|
|
377
380
|
* @signal
|
|
378
381
|
* @run-last
|
|
379
382
|
*/
|
|
380
|
-
"audio-device-selection-needed": (
|
|
383
|
+
"audio-device-selection-needed": (object: number, p0: boolean, p1: number) => void;
|
|
381
384
|
/**
|
|
382
385
|
* @signal
|
|
383
386
|
* @run-last
|
|
384
387
|
*/
|
|
385
|
-
"card-added": (
|
|
388
|
+
"card-added": (object: number) => void;
|
|
386
389
|
/**
|
|
387
390
|
* @signal
|
|
388
391
|
* @run-last
|
|
389
392
|
*/
|
|
390
|
-
"card-removed": (
|
|
393
|
+
"card-removed": (object: number) => void;
|
|
391
394
|
/**
|
|
392
395
|
* @signal
|
|
393
396
|
* @run-last
|
|
394
397
|
*/
|
|
395
|
-
"default-sink-changed": (
|
|
398
|
+
"default-sink-changed": (object: number) => void;
|
|
396
399
|
/**
|
|
397
400
|
* @signal
|
|
398
401
|
* @run-last
|
|
399
402
|
*/
|
|
400
|
-
"default-source-changed": (
|
|
403
|
+
"default-source-changed": (object: number) => void;
|
|
401
404
|
/**
|
|
402
405
|
* @signal
|
|
403
406
|
* @run-last
|
|
404
407
|
*/
|
|
405
|
-
"input-added": (
|
|
408
|
+
"input-added": (object: number) => void;
|
|
406
409
|
/**
|
|
407
410
|
* @signal
|
|
408
411
|
* @run-last
|
|
409
412
|
*/
|
|
410
|
-
"input-removed": (
|
|
413
|
+
"input-removed": (object: number) => void;
|
|
411
414
|
/**
|
|
412
415
|
* @signal
|
|
413
416
|
* @run-last
|
|
414
417
|
*/
|
|
415
|
-
"output-added": (
|
|
418
|
+
"output-added": (object: number) => void;
|
|
416
419
|
/**
|
|
417
420
|
* @signal
|
|
418
421
|
* @run-last
|
|
419
422
|
*/
|
|
420
|
-
"output-removed": (
|
|
423
|
+
"output-removed": (object: number) => void;
|
|
421
424
|
/**
|
|
422
425
|
* @signal
|
|
423
426
|
* @run-last
|
|
424
427
|
*/
|
|
425
|
-
"state-changed": (
|
|
428
|
+
"state-changed": (object: number) => void;
|
|
426
429
|
/**
|
|
427
430
|
* @signal
|
|
428
431
|
* @run-last
|
|
429
432
|
*/
|
|
430
|
-
"stream-added": (
|
|
433
|
+
"stream-added": (object: number) => void;
|
|
431
434
|
/**
|
|
432
435
|
* @signal
|
|
433
436
|
* @run-last
|
|
434
437
|
*/
|
|
435
|
-
"stream-changed": (
|
|
438
|
+
"stream-changed": (object: number) => void;
|
|
436
439
|
/**
|
|
437
440
|
* @signal
|
|
438
441
|
* @run-last
|
|
439
442
|
*/
|
|
440
|
-
"stream-removed": (
|
|
443
|
+
"stream-removed": (object: number) => void;
|
|
441
444
|
"notify::name": (pspec: GObject.ParamSpec) => void;
|
|
442
445
|
}
|
|
443
446
|
|
|
@@ -1014,7 +1017,7 @@ export namespace Cvc {
|
|
|
1014
1017
|
* @signal
|
|
1015
1018
|
* @run-last
|
|
1016
1019
|
*/
|
|
1017
|
-
"monitor-update": (
|
|
1020
|
+
"monitor-update": (object: number) => void;
|
|
1018
1021
|
"notify::application-id": (pspec: GObject.ParamSpec) => void;
|
|
1019
1022
|
"notify::can-decibel": (pspec: GObject.ParamSpec) => void;
|
|
1020
1023
|
"notify::card-index": (pspec: GObject.ParamSpec) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/cvc-1.0",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for Cvc-1.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "cvc-1.0.js",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"test": "tsc --project tsconfig.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@girs/gjs": "^4.
|
|
35
|
-
"@girs/gio-2.0": "^4.
|
|
36
|
-
"@girs/gobject-2.0": "^4.
|
|
37
|
-
"@girs/glib-2.0": "^4.
|
|
38
|
-
"@girs/gmodule-2.0": "^4.
|
|
34
|
+
"@girs/gjs": "^4.6.0",
|
|
35
|
+
"@girs/gio-2.0": "^4.6.0",
|
|
36
|
+
"@girs/gobject-2.0": "^4.6.0",
|
|
37
|
+
"@girs/glib-2.0": "^4.6.0",
|
|
38
|
+
"@girs/gmodule-2.0": "^4.6.0" },
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"typescript": "*"
|
|
41
41
|
},
|