@girs/braseromedia-3.1 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 CHANGED
@@ -4,82 +4,96 @@
4
4
  ![version](https://img.shields.io/npm/v/@girs/braseromedia-3.1)
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/braseromedia-3.1)
6
6
 
7
+ GJS TypeScript type definitions for BraseroMedia-3.1 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.6.0.
7
8
 
8
- GJS TypeScript type definitions for BraseroMedia-3.1 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.4.0.
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/braseromedia-3.1
15
16
  ```
16
17
 
17
- ## Usage
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/braseromedia-3.1` | the namespace as a default export, plus the ambient and global declarations |
26
+ | `@girs/braseromedia-3.1/ambient` | only the `gi://` module declarations |
27
+ | `@girs/braseromedia-3.1/import` | only the `imports.gi` declarations |
28
+ | `@girs/braseromedia-3.1/braseromedia-3.1` | the namespace, without the side-effecting declarations |
29
+ | `@girs/braseromedia-3.1/vocabulary` | GIR-derived widget data: settable properties, enum nicks, slot candidates |
30
+
31
+ ## Three ways to import
32
+
33
+ Which one you use depends on how you write imports elsewhere, not on your toolchain.
34
+
35
+ ### As a module
18
36
 
19
- Import it like any other module:
20
37
  ```ts
21
38
  import BraseroMedia from '@girs/braseromedia-3.1';
22
39
  ```
23
40
 
24
- ### Ambient Modules
41
+ ### As `gi://`
25
42
 
26
- [Ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) let you write the same import you would in plain JavaScript.
27
- For this you need to include `@girs/braseromedia-3.1` or `@girs/braseromedia-3.1/ambient` in your `tsconfig` or entry point Typescript file:
43
+ GJS resolves `gi://` at runtime. To give it types, reference the package once, either
44
+ from your entry point or from `tsconfig.json`:
28
45
 
29
- `index.ts`:
30
46
  ```ts
31
- import '@girs/braseromedia-3.1'
47
+ import '@girs/braseromedia-3.1';
32
48
  ```
33
49
 
34
- `tsconfig.json`:
35
50
  ```json
36
- {
37
- "compilerOptions": {
38
- ...
39
- },
40
- "include": ["@girs/braseromedia-3.1"],
41
- ...
42
- }
51
+ { "include": ["@girs/braseromedia-3.1"] }
43
52
  ```
44
53
 
45
- The ambient module now resolves with types:
54
+ Then the runtime spelling type-checks:
46
55
 
47
56
  ```ts
48
57
  import BraseroMedia from 'gi://BraseroMedia?version=3.1';
49
58
  ```
50
59
 
51
- ### Global import
60
+ Referencing `@girs/braseromedia-3.1/ambient` instead pulls in these declarations
61
+ alone. See [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules).
62
+
63
+ ### As `imports.gi`
52
64
 
53
- GJS's global `imports.gi` works too, with types.
54
- For this you need to include `@girs/braseromedia-3.1` or `@girs/braseromedia-3.1/import` in your `tsconfig` or entry point Typescript file:
65
+ GJS's global object works the same way, via `@girs/braseromedia-3.1/import`:
55
66
 
56
- `index.ts`:
57
67
  ```ts
58
- import '@girs/braseromedia-3.1'
68
+ const BraseroMedia = imports.gi.BraseroMedia;
59
69
  ```
60
70
 
61
- `tsconfig.json`:
62
- ```json
63
- {
64
- "compilerOptions": {
65
- ...
66
- },
67
- "include": ["@girs/braseromedia-3.1"],
68
- ...
69
- }
70
- ```
71
+ ## Widget vocabulary
71
72
 
72
- That form carries types as well:
73
+ `braseromedia-3.1` declares widgets, so it also carries what the GIR says about them, as
74
+ types and as values a test can read:
73
75
 
74
76
  ```ts
75
- const BraseroMedia = imports.gi.BraseroMedia;
77
+ import type { Widgets, PropsOf } from '@girs/braseromedia-3.1/vocabulary';
78
+ import { OWN_PROPS, ENUM_NICKS, PROVENANCE } from '@girs/braseromedia-3.1/vocabulary';
76
79
  ```
77
80
 
78
- ### Bundle
81
+ Properties are keyed the way GObject registered them, writable-only and optional, so they
82
+ match `g_object_set`, GtkBuilder XML and Blueprint. `PROVENANCE.libraryVersion` names the
83
+ library release this was generated from, which lets a check tell "newer than what is
84
+ installed" from "wrong".
79
85
 
80
- Most projects want a bundler. [esbuild](https://esbuild.github.io/) is the smallest thing that works; the [examples directory](https://github.com/gjsify/ts-for-gir/tree/main/examples) has setups for several others.
86
+ This subpath answers what the GIR says, not what the installed library has. For the
87
+ second question, ask the library.
88
+
89
+ ## Building
90
+
91
+ The declarations need no build step. If you bundle, every bundler works, since there is
92
+ no runtime code to resolve. The [examples](https://github.com/gjsify/ts-for-gir/tree/main/examples)
93
+ show working setups for several.
81
94
 
82
95
  ## Other packages
83
96
 
84
- All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
97
+ Every pre-generated package is at [gjsify/types](https://github.com/gjsify/types).
98
+
85
99
 
@@ -0,0 +1,195 @@
1
+ /**
2
+ * The GIR-derived widget VOCABULARY for BraseroMedia-3.1.
3
+ *
4
+ * GENERATED — do not edit. Provenance: BraseroMedia-3.1 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface
5
+ *
6
+ * 2 concrete widgets, 2 declarations, 0 enum nick unions, 0 slot candidates.
7
+ *
8
+ * Module-scoped exports only. There is no `JSX` namespace here, no tag spelling and
9
+ * no `on<Signal>` prop name: those are DIALECT, and every framework answers them
10
+ * differently. The shape to avoid is the GLOBAL AUGMENT — a `declare global` on
11
+ * `React.JSX` collides with every other library on a shared tag — while a
12
+ * module-scoped `JSX` behind a `jsxImportSource` does not. This package is used by
13
+ * projects that want nothing to do with JSX, so it emits neither; a consumer declaring
14
+ * a module-scoped namespace over these names is doing it right.
15
+ *
16
+ * Three things this is and `ConstructorProps` is not: WRITABLE-only (measured on
17
+ * Gtk-4.0, `ConstructorProps` offers 150 read-only properties across 68 classes as
18
+ * settable, and GTK's failure mode for writing one is exit 0), OPTIONAL, and keyed
19
+ * by the name GObject actually REGISTERED — the dashed spelling `g_object_set`,
20
+ * GtkBuilder XML and Blueprint all use.
21
+ *
22
+ * Signal handler types are not re-derived: `X.SignalSignatures`, which this package
23
+ * already emits for every class with the parent chain, every implemented interface
24
+ * and the `notify::` keys folded in, is what `Widgets[G]['signals']` points at.
25
+ */
26
+
27
+ import type BraseroMedia from './braseromedia-3.1.js';
28
+ import type { GtkBinConstructOnly, GtkBinProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkCellEditableConstructOnly, GtkCellEditableProps, GtkCellLayoutConstructOnly, GtkCellLayoutProps, GtkComboBoxConstructOnly, GtkComboBoxProps, GtkContainerConstructOnly, GtkContainerProps, GtkWidgetConstructOnly, GtkWidgetProps } from '@girs/gtk-3.0/vocabulary';
29
+
30
+ // ---------------------------------------------------------------------------
31
+ // Enum nicks — the string vocabulary GObject registered, from GIR's `glib:nick`.
32
+ //
33
+ // Not derived from the member name. Substituting underscores for dashes is not a law:
34
+ // some nicks keep an underscore the substitution would have replaced, and only the
35
+ // attribute knows which. Gtk-4.0 and Adw-1 contradict no derivation at all, which is
36
+ // how a derived nick passes review and breaks elsewhere.
37
+ // Re-measure with `scripts/check-nick-derivation.mjs` in ts-for-gir.
38
+ // ---------------------------------------------------------------------------
39
+
40
+
41
+
42
+ // ---------------------------------------------------------------------------
43
+ // Property surfaces — one interface per GIR DECLARATION, mirroring GIR's own
44
+ // inheritance rather than flattening per widget.
45
+ //
46
+ // The interfaces are load-bearing, not tidiness: `GtkBox` declares four properties
47
+ // of its own and `orientation` is not among them — it lives on `Gtk.Orientable`,
48
+ // because GObject installs interface properties on the implementor at runtime while
49
+ // GIR keeps them once, on the interface.
50
+ // ---------------------------------------------------------------------------
51
+
52
+ export interface BraseroDriveSelectionProps extends GtkComboBoxProps, GtkBuildableProps, GtkCellEditableProps, GtkCellLayoutProps {
53
+ Drive?: BraseroMedia.Drive;
54
+ /** @default 254 */
55
+ 'drive-type'?: number;
56
+ }
57
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
58
+ export type BraseroDriveSelectionConstructOnly = GtkComboBoxConstructOnly | GtkBuildableConstructOnly | GtkCellEditableConstructOnly | GtkCellLayoutConstructOnly;
59
+
60
+ export interface BraseroMediumSelectionProps extends GtkComboBoxProps, GtkBuildableProps, GtkCellEditableProps, GtkCellLayoutProps {
61
+ /** @default 0 */
62
+ 'media-type'?: number;
63
+ medium?: BraseroMedia.Medium;
64
+ }
65
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
66
+ export type BraseroMediumSelectionConstructOnly = GtkComboBoxConstructOnly | GtkBuildableConstructOnly | GtkCellEditableConstructOnly | GtkCellLayoutConstructOnly;
67
+
68
+ // ---------------------------------------------------------------------------
69
+ // The GType-keyed widget map.
70
+ //
71
+ // Keyed by GType because that is also the GtkBuilder XML key and the typelib key. A
72
+ // consumer maps GTypes to tags in ITS convention — kebab for JSX intrinsics, Pascal
73
+ // for a Vue `GlobalComponents`, the class itself for a renderer whose element type
74
+ // is the class. None of those is baked in here.
75
+ //
76
+ // `slotCandidates` is a candidate list and never an answer: derived from methods
77
+ // taking exactly one widget argument. The GIR cannot tell adoption from reference —
78
+ // `set_title_widget` parents its argument and `set_activatable_widget` does not, and
79
+ // both are `void f(GtkWidget*)` at `transfer-ownership="none"`. Curation decides;
80
+ // this is what notices when a release adds a candidate.
81
+ // ---------------------------------------------------------------------------
82
+
83
+ export interface Widgets {
84
+ BraseroDriveSelection: {
85
+ class: BraseroMedia.DriveSelection;
86
+ props: BraseroDriveSelectionProps;
87
+ signals: BraseroMedia.DriveSelection.SignalSignatures;
88
+ constructOnly: BraseroDriveSelectionConstructOnly;
89
+ slotCandidates: {};
90
+ };
91
+ BraseroMediumSelection: {
92
+ class: BraseroMedia.MediumSelection;
93
+ props: BraseroMediumSelectionProps;
94
+ signals: BraseroMedia.MediumSelection.SignalSignatures;
95
+ constructOnly: BraseroMediumSelectionConstructOnly;
96
+ slotCandidates: {};
97
+ };
98
+ }
99
+
100
+ /** Every GType this namespace can create. A consumer derives its own tag map. */
101
+ export type WidgetGType = keyof Widgets;
102
+
103
+ // ---------------------------------------------------------------------------
104
+ // Child holders — the same shape, for objects that CARRY a widget without being one.
105
+ //
106
+ // `GtkListItem`, `GtkListHeader`, `GtkColumnViewCell` and `AdwToggle` descend from
107
+ // `GObject.Object` and hold a widget through `set_child`/`get_child`. A renderer places
108
+ // them exactly like a container, so they belong in the vocabulary; a check asking "is
109
+ // this a widget" must still be able to say no. Hence a sibling table rather than four
110
+ // more rows in `Widgets`: concatenate them when you mean both.
111
+ // ---------------------------------------------------------------------------
112
+
113
+ export interface ChildHolders {
114
+
115
+ }
116
+
117
+ /** Every GType this namespace holds a child in without it being a widget. */
118
+ export type ChildHolderGType = keyof ChildHolders;
119
+
120
+ /** The writable, optional, GObject-keyed property surface of one GType. */
121
+ export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
122
+
123
+ /** The signal table this package already emits, reached by GType. */
124
+ export type SignalsOf<G extends WidgetGType> = Widgets[G]['signals'];
125
+
126
+ /** The instance type — what a `ref`-shaped prop should infer. */
127
+ export type InstanceOf<G extends WidgetGType> = Widgets[G]['class'];
128
+
129
+ /** Property names that can only be set at construction. */
130
+ export type ConstructOnlyOf<G extends WidgetGType> = Widgets[G]['constructOnly'];
131
+
132
+ /** Candidate child slots — see the note above; curation decides. */
133
+ export type SlotCandidatesOf<G extends WidgetGType> = keyof Widgets[G]['slotCandidates'];
134
+
135
+ /**
136
+ * The same facts as runtime data, for a consumer that CHECKS them.
137
+ *
138
+ * Types are erased, so a spec that asks the installed GTK whether every property
139
+ * here is a writable ParamSpec, every signal resolvable by `GObject.signal_lookup`
140
+ * and every nick resolvable through an enum lookup cannot read the interfaces
141
+ * above. Emitted headlessly with no GTK present, which is exactly why the checking
142
+ * belongs to the consumer and the DATA belongs here.
143
+ */
144
+ export const PROVENANCE: {
145
+ readonly namespace: string;
146
+ readonly version: string;
147
+ /** The version the LIBRARY states, or null where it states none. Never the namespace's. */
148
+ readonly libraryVersion: string | null;
149
+ readonly childHolders: number;
150
+ readonly droppedBases: readonly string[];
151
+ readonly inlinedBases: readonly string[];
152
+ readonly unsettableProps: readonly string[];
153
+ };
154
+
155
+ /** Declaration GType -> its own settable properties, as GObject registered them. */
156
+ export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
157
+
158
+ /**
159
+ * Declaration GType -> the signals it registers itself, never its parents'.
160
+ *
161
+ * Keyed like `OWN_PROPS`, so both are read at every link of a `DECLS` chain. An
162
+ * abstract base has no `Widgets` row and still owns signals — `GtkWidget` owns 13.
163
+ */
164
+ export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
165
+
166
+ /** Widget GType -> every declaration its members come from, self first. */
167
+ export const DECLS: Readonly<Record<string, readonly string[]>>;
168
+
169
+ /** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
170
+ export const CHILD_HOLDERS: readonly string[];
171
+
172
+ /** Enum GType -> the nicks this surface offers. */
173
+ export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
174
+
175
+ /** Widget GType -> slot name -> the method that may adopt a child there. */
176
+ export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
177
+
178
+ /**
179
+ * `Type`, `Type.property` and `Type::signal` -> the release that introduced it.
180
+ *
181
+ * What keeps a runtime cross-check honest across a version gap without an
182
+ * allowlist: a name the installed library lacks is a defect UNLESS the version
183
+ * here is newer than the one running.
184
+ *
185
+ * ALL THREE key shapes, because that test only works for the names it covers. A
186
+ * property-only map leaves a consumer no way to explain a missing SIGNAL, which is
187
+ * a correct vocabulary reported as 18 defects; a member-only map leaves it no way to
188
+ * explain a missing CLASS, and that one fails as a bare
189
+ * `TypeError: can't access property "$gtype", ctor() is undefined` that does not
190
+ * even name the GType.
191
+ *
192
+ * A key is present only where the GIR states a version — sparse by nature (`version`
193
+ * sits on 29 of the 301 classes and interfaces in Gtk-4.0), never inferred.
194
+ */
195
+ export const SINCE: Readonly<Record<string, string>>;
@@ -0,0 +1,44 @@
1
+ // The widget vocabulary of BraseroMedia-3.1 as runtime data.
2
+ //
3
+ // GENERATED — do not edit. Provenance: BraseroMedia-3.1 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface
4
+ //
5
+ // The type half of this subpath is the sibling `.d.ts`. This file exists because
6
+ // types are erased: a consumer that wants to ask the installed library whether every
7
+ // name here is real needs values, not declarations.
8
+
9
+ export const PROVENANCE = {
10
+ namespace: 'BraseroMedia',
11
+ version: '3.1',
12
+ libraryVersion: null,
13
+ childHolders: 0,
14
+ droppedBases: ['GObject.InitiallyUnowned', 'GObject.Object', 'Atk.ImplementorIface'],
15
+ inlinedBases: [],
16
+ unsettableProps: [],
17
+ };
18
+
19
+ export const OWN_PROPS = {
20
+ BraseroDriveSelection: ['Drive', 'drive-type'],
21
+ BraseroMediumSelection: ['media-type', 'medium'],
22
+ };
23
+
24
+ export const OWN_SIGNALS = {
25
+ BraseroDriveSelection: ['drive-changed'],
26
+ BraseroMediumSelection: ['medium-changed'],
27
+ };
28
+
29
+ export const DECLS = {
30
+ BraseroDriveSelection: ['BraseroDriveSelection', 'GtkComboBox', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkCellEditable', 'GtkCellLayout'],
31
+ BraseroMediumSelection: ['BraseroMediumSelection', 'GtkComboBox', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkCellEditable', 'GtkCellLayout'],
32
+ };
33
+
34
+ // The GTypes above that are NOT widgets: they hold one through `set_child`/`get_child`
35
+ // and descend from `GObject.Object`. A renderer places them like a container; a check
36
+ // asking "is this a widget" must not count them. Derived from the accessor pair, never
37
+ // from a list — the count is in the provenance line above.
38
+ export const CHILD_HOLDERS = [];
39
+
40
+ export const ENUM_NICKS = {};
41
+
42
+ export const SLOT_CANDIDATES = {};
43
+
44
+ export const SINCE = {};
@@ -37,48 +37,105 @@ export namespace BraseroMedia {
37
37
  * @gir-type Enum
38
38
  */
39
39
  enum MediaError {
40
- NONE,
41
- GENERAL,
42
- IMAGE_INVALID,
40
+ NONE = 0,
41
+ GENERAL = 1,
42
+ IMAGE_INVALID = 2,
43
43
  }
44
44
 
45
45
 
46
+ /**
47
+ * @default 16392
48
+ */
46
49
  const MEDIUM_BDRE: number;
47
50
 
51
+ /**
52
+ * @default 33800
53
+ */
48
54
  const MEDIUM_BDR_RANDOM: number;
49
55
 
56
+ /**
57
+ * @default 34824
58
+ */
50
59
  const MEDIUM_BDR_SRM: number;
51
60
 
61
+ /**
62
+ * @default 38920
63
+ */
52
64
  const MEDIUM_BDR_SRM_POW: number;
53
65
 
66
+ /**
67
+ * @default 65544
68
+ */
54
69
  const MEDIUM_BD_ROM: number;
55
70
 
71
+ /**
72
+ * @default 32770
73
+ */
56
74
  const MEDIUM_CDR: number;
57
75
 
76
+ /**
77
+ * @default 65538
78
+ */
58
79
  const MEDIUM_CDROM: number;
59
80
 
81
+ /**
82
+ * @default 16386
83
+ */
60
84
  const MEDIUM_CDRW: number;
61
85
 
86
+ /**
87
+ * @default 32900
88
+ */
62
89
  const MEDIUM_DVDR: number;
63
90
 
91
+ /**
92
+ * @default 16516
93
+ */
64
94
  const MEDIUM_DVDRW: number;
65
95
 
96
+ /**
97
+ * @default 16452
98
+ */
66
99
  const MEDIUM_DVDRW_PLUS: number;
67
100
 
101
+ /**
102
+ * @default 16468
103
+ */
68
104
  const MEDIUM_DVDRW_PLUS_DL: number;
69
105
 
106
+ /**
107
+ * @default 16644
108
+ */
70
109
  const MEDIUM_DVDRW_RESTRICTED: number;
71
110
 
111
+ /**
112
+ * @default 32916
113
+ */
72
114
  const MEDIUM_DVDR_DL: number;
73
115
 
116
+ /**
117
+ * @default 33300
118
+ */
74
119
  const MEDIUM_DVDR_JUMP_DL: number;
75
120
 
121
+ /**
122
+ * @default 32836
123
+ */
76
124
  const MEDIUM_DVDR_PLUS: number;
77
125
 
126
+ /**
127
+ * @default 32852
128
+ */
78
129
  const MEDIUM_DVDR_PLUS_DL: number;
79
130
 
131
+ /**
132
+ * @default 36
133
+ */
80
134
  const MEDIUM_DVD_RAM: number;
81
135
 
136
+ /**
137
+ * @default 65540
138
+ */
82
139
  const MEDIUM_DVD_ROM: number;
83
140
 
84
141
  /**
@@ -121,18 +178,18 @@ export namespace BraseroMedia {
121
178
  * @gir-type Flags
122
179
  */
123
180
  enum DriveCaps {
124
- NONE,
125
- CDR,
126
- CDRW,
127
- DVDR,
128
- DVDRW,
129
- DVDR_PLUS,
130
- DVDRW_PLUS,
131
- DVDR_PLUS_DL,
132
- DVDRW_PLUS_DL,
133
- DVDRAM,
134
- BDR,
135
- BDRW,
181
+ NONE = 0,
182
+ CDR = 1,
183
+ CDRW = 2,
184
+ DVDR = 4,
185
+ DVDRW = 8,
186
+ DVDR_PLUS = 16,
187
+ DVDRW_PLUS = 32,
188
+ DVDR_PLUS_DL = 64,
189
+ DVDRW_PLUS_DL = 128,
190
+ DVDRAM = 1024,
191
+ BDR = 256,
192
+ BDRW = 512,
136
193
  }
137
194
 
138
195
 
@@ -140,12 +197,12 @@ export namespace BraseroMedia {
140
197
  * @gir-type Flags
141
198
  */
142
199
  enum DriveType {
143
- NONE,
144
- FILE,
145
- WRITER,
146
- READER,
147
- ALL_BUT_FILE,
148
- ALL,
200
+ NONE = 0,
201
+ FILE = 1,
202
+ WRITER = 2,
203
+ READER = 4,
204
+ ALL_BUT_FILE = 254,
205
+ ALL = 255,
149
206
  }
150
207
 
151
208
 
@@ -155,32 +212,32 @@ export namespace BraseroMedia {
155
212
  * @gir-type Flags
156
213
  */
157
214
  enum Media {
158
- UNSUPPORTED,
159
- BUSY,
160
- NONE,
161
- FILE,
162
- CD,
163
- DVD,
164
- BD,
165
- DUAL_L,
166
- RAM,
167
- PLUS,
168
- SEQUENTIAL,
169
- RESTRICTED,
170
- JUMP,
171
- RANDOM,
172
- SRM,
173
- POW,
174
- REWRITABLE,
175
- WRITABLE,
176
- ROM,
177
- BLANK,
178
- CLOSED,
179
- APPENDABLE,
180
- UNFORMATTED,
181
- PROTECTED,
182
- HAS_DATA,
183
- HAS_AUDIO,
215
+ UNSUPPORTED = -2,
216
+ BUSY = -1,
217
+ NONE = 0,
218
+ FILE = 1,
219
+ CD = 2,
220
+ DVD = 4,
221
+ BD = 8,
222
+ DUAL_L = 16,
223
+ RAM = 32,
224
+ PLUS = 64,
225
+ SEQUENTIAL = 128,
226
+ RESTRICTED = 256,
227
+ JUMP = 512,
228
+ RANDOM = 1024,
229
+ SRM = 2048,
230
+ POW = 4096,
231
+ REWRITABLE = 16384,
232
+ WRITABLE = 32768,
233
+ ROM = 65536,
234
+ BLANK = 131072,
235
+ CLOSED = 262144,
236
+ APPENDABLE = 524288,
237
+ UNFORMATTED = 1048576,
238
+ PROTECTED = 2097152,
239
+ HAS_DATA = 4194304,
240
+ HAS_AUDIO = 8388608,
184
241
  }
185
242
 
186
243
 
@@ -188,16 +245,16 @@ export namespace BraseroMedia {
188
245
  * @gir-type Flags
189
246
  */
190
247
  enum MediaType {
191
- NONE,
192
- FILE,
193
- DATA,
194
- AUDIO,
195
- WRITABLE,
196
- REWRITABLE,
197
- ANY_IN_BURNER,
198
- CD,
199
- ALL_BUT_FILE,
200
- ALL,
248
+ NONE = 0,
249
+ FILE = 1,
250
+ DATA = 2,
251
+ AUDIO = 4,
252
+ WRITABLE = 8,
253
+ REWRITABLE = 16,
254
+ ANY_IN_BURNER = 32,
255
+ CD = 64,
256
+ ALL_BUT_FILE = 254,
257
+ ALL = 255,
201
258
  }
202
259
 
203
260
 
@@ -209,13 +266,13 @@ export namespace BraseroMedia {
209
266
  * @signal
210
267
  * @run-last
211
268
  */
212
- "medium-added": (arg0: Medium) => void;
269
+ "medium-added": (medium: Medium) => void;
213
270
  /**
214
271
  * This signal gets emitted when a medium is not longer available
215
272
  * @signal
216
273
  * @run-last
217
274
  */
218
- "medium-removed": (arg0: Medium) => void;
275
+ "medium-removed": (medium: Medium) => void;
219
276
  "notify::device": (pspec: GObject.ParamSpec) => void;
220
277
  "notify::gdrive": (pspec: GObject.ParamSpec) => void;
221
278
  "notify::udi": (pspec: GObject.ParamSpec) => void;
@@ -330,6 +387,7 @@ export namespace BraseroMedia {
330
387
  * Open the drive tray or ejects the media if there is any inside.
331
388
  * @param wait `gboolean` whether to wait for the completion of the operation (with a GMainLoop)
332
389
  * @returns a `gboolean`. TRUE on success, FALSE otherwise.
390
+ * @throws GLib.Error
333
391
  */
334
392
  eject(wait: boolean): boolean;
335
393
 
@@ -440,14 +498,14 @@ export namespace BraseroMedia {
440
498
 
441
499
  namespace DriveSelection {
442
500
  // Signal signatures
443
- interface SignalSignatures extends Gtk.ComboBox.SignalSignatures {
501
+ interface SignalSignatures extends Gtk.ComboBox.SignalSignatures, Gtk.CellEditable.SignalSignatures {
444
502
  /**
445
503
  * This signal gets emitted when the selected medium has changed
446
504
  * @signal
447
505
  * @action
448
506
  * @run-first
449
507
  */
450
- "drive-changed": (arg0: Drive) => void;
508
+ "drive-changed": (drive: Drive) => void;
451
509
  "notify::drive": (pspec: GObject.ParamSpec) => void;
452
510
  "notify::drive-type": (pspec: GObject.ParamSpec) => void;
453
511
  "notify::active": (pspec: GObject.ParamSpec) => void;
@@ -1141,25 +1199,25 @@ export namespace BraseroMedia {
1141
1199
  * @signal
1142
1200
  * @run-last
1143
1201
  */
1144
- "drive-added": (arg0: Drive) => void;
1202
+ "drive-added": (medium: Drive) => void;
1145
1203
  /**
1146
1204
  * This signal gets emitted when a drive is not longer available
1147
1205
  * @signal
1148
1206
  * @run-last
1149
1207
  */
1150
- "drive-removed": (arg0: Drive) => void;
1208
+ "drive-removed": (medium: Drive) => void;
1151
1209
  /**
1152
1210
  * This signal gets emitted when a new medium was detected
1153
1211
  * @signal
1154
1212
  * @run-last
1155
1213
  */
1156
- "medium-added": (arg0: Medium) => void;
1214
+ "medium-added": (medium: Medium) => void;
1157
1215
  /**
1158
1216
  * This signal gets emitted when a medium is not longer available
1159
1217
  * @signal
1160
1218
  * @run-last
1161
1219
  */
1162
- "medium-removed": (arg0: Medium) => void;
1220
+ "medium-removed": (medium: Medium) => void;
1163
1221
  }
1164
1222
 
1165
1223
  // Constructor properties interface
@@ -1249,14 +1307,14 @@ export namespace BraseroMedia {
1249
1307
 
1250
1308
  namespace MediumSelection {
1251
1309
  // Signal signatures
1252
- interface SignalSignatures extends Gtk.ComboBox.SignalSignatures {
1310
+ interface SignalSignatures extends Gtk.ComboBox.SignalSignatures, Gtk.CellEditable.SignalSignatures {
1253
1311
  /**
1254
1312
  * This signal gets emitted when the selected medium has changed.
1255
1313
  * @signal
1256
1314
  * @action
1257
1315
  * @run-first
1258
1316
  */
1259
- "medium-changed": (arg0: Medium) => void;
1317
+ "medium-changed": (medium: Medium) => void;
1260
1318
  "notify::media-type": (pspec: GObject.ParamSpec) => void;
1261
1319
  "notify::medium": (pspec: GObject.ParamSpec) => void;
1262
1320
  "notify::active": (pspec: GObject.ParamSpec) => void;
@@ -1768,6 +1826,7 @@ export namespace BraseroMedia {
1768
1826
  /**
1769
1827
  * Returns the path for mount point for `volume`.
1770
1828
  * @returns a `gchar` *
1829
+ * @throws GLib.Error
1771
1830
  */
1772
1831
  get_mount_point(): string;
1773
1832
 
@@ -1791,6 +1850,7 @@ export namespace BraseroMedia {
1791
1850
  * @param parent_window {@link Gtk.Window} *
1792
1851
  * @param wait `gboolean`
1793
1852
  * @returns a `gboolean`. TRUE if the operation succeeded.
1853
+ * @throws GLib.Error
1794
1854
  */
1795
1855
  mount(parent_window: Gtk.Window, wait: boolean): boolean;
1796
1856
 
@@ -1799,6 +1859,7 @@ export namespace BraseroMedia {
1799
1859
  * the operation finishes.
1800
1860
  * @param wait `gboolean`
1801
1861
  * @returns a `gboolean`. TRUE if the operation succeeded.
1862
+ * @throws GLib.Error
1802
1863
  */
1803
1864
  umount(wait: boolean): boolean;
1804
1865
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/braseromedia-3.1",
3
- "version": "4.4.0",
3
+ "version": "4.6.0",
4
4
  "description": "GJS TypeScript type definitions for BraseroMedia-3.1",
5
5
  "type": "module",
6
6
  "module": "braseromedia-3.1.js",
@@ -16,10 +16,10 @@
16
16
  "import": "./braseromedia-3.1-import.js",
17
17
  "default": "./braseromedia-3.1-import.js"
18
18
  },
19
- "./surface": {
20
- "types": "./braseromedia-3.1-surface.d.ts",
21
- "import": "./braseromedia-3.1-surface.js",
22
- "default": "./braseromedia-3.1-surface.js"
19
+ "./vocabulary": {
20
+ "types": "./braseromedia-3.1-vocabulary.d.ts",
21
+ "import": "./braseromedia-3.1-vocabulary.js",
22
+ "default": "./braseromedia-3.1-vocabulary.js"
23
23
  },
24
24
  "./braseromedia-3.1": {
25
25
  "types": "./braseromedia-3.1.d.ts",
@@ -36,20 +36,20 @@
36
36
  "test": "tsc --project tsconfig.json"
37
37
  },
38
38
  "dependencies": {
39
- "@girs/gjs": "^4.4.0",
40
- "@girs/gtk-3.0": "^4.4.0",
41
- "@girs/xlib-2.0": "^4.4.0",
42
- "@girs/gdk-3.0": "^4.4.0",
43
- "@girs/cairo-1.0": "^4.4.0",
44
- "@girs/gobject-2.0": "^4.4.0",
45
- "@girs/glib-2.0": "^4.4.0",
46
- "@girs/pango-1.0": "^4.4.0",
47
- "@girs/harfbuzz-0.0": "^4.4.0",
48
- "@girs/freetype2-2.0": "^4.4.0",
49
- "@girs/gio-2.0": "^4.4.0",
50
- "@girs/gmodule-2.0": "^4.4.0",
51
- "@girs/gdkpixbuf-2.0": "^4.4.0",
52
- "@girs/atk-1.0": "^4.4.0" },
39
+ "@girs/gjs": "^4.6.0",
40
+ "@girs/gtk-3.0": "^4.6.0",
41
+ "@girs/xlib-2.0": "^4.6.0",
42
+ "@girs/gdk-3.0": "^4.6.0",
43
+ "@girs/cairo-1.0": "^4.6.0",
44
+ "@girs/gobject-2.0": "^4.6.0",
45
+ "@girs/glib-2.0": "^4.6.0",
46
+ "@girs/pango-1.0": "^4.6.0",
47
+ "@girs/harfbuzz-0.0": "^4.6.0",
48
+ "@girs/freetype2-2.0": "^4.6.0",
49
+ "@girs/gio-2.0": "^4.6.0",
50
+ "@girs/gmodule-2.0": "^4.6.0",
51
+ "@girs/gdkpixbuf-2.0": "^4.6.0",
52
+ "@girs/atk-1.0": "^4.6.0" },
53
53
  "devDependencies": {
54
54
  "typescript": "*"
55
55
  },
package/tsconfig.json CHANGED
@@ -62,7 +62,7 @@
62
62
  ]
63
63
  }
64
64
  },
65
- "include": ["./braseromedia-3.1.d.ts","./braseromedia-3.1-surface.d.ts"]
65
+ "include": ["./braseromedia-3.1.d.ts","./braseromedia-3.1-vocabulary.d.ts"]
66
66
  }
67
67
 
68
68