@girs/xreaderview-1.5 4.4.0 → 4.5.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 +52 -38
- package/package.json +20 -20
- package/tsconfig.json +1 -1
- package/xreaderview-1.5-vocabulary.d.ts +200 -0
- package/xreaderview-1.5-vocabulary.js +48 -0
- package/xreaderview-1.5.d.ts +79 -34
package/README.md
CHANGED
|
@@ -4,82 +4,96 @@
|
|
|
4
4
|

|
|
5
5
|

|
|
6
6
|
|
|
7
|
+
GJS TypeScript type definitions for XreaderView-1.5 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.5.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/xreaderview-1.5
|
|
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/xreaderview-1.5` | the namespace as a default export, plus the ambient and global declarations |
|
|
26
|
+
| `@girs/xreaderview-1.5/ambient` | only the `gi://` module declarations |
|
|
27
|
+
| `@girs/xreaderview-1.5/import` | only the `imports.gi` declarations |
|
|
28
|
+
| `@girs/xreaderview-1.5/xreaderview-1.5` | the namespace, without the side-effecting declarations |
|
|
29
|
+
| `@girs/xreaderview-1.5/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 XreaderView from '@girs/xreaderview-1.5';
|
|
22
39
|
```
|
|
23
40
|
|
|
24
|
-
###
|
|
41
|
+
### As `gi://`
|
|
25
42
|
|
|
26
|
-
|
|
27
|
-
|
|
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/xreaderview-1.5'
|
|
47
|
+
import '@girs/xreaderview-1.5';
|
|
32
48
|
```
|
|
33
49
|
|
|
34
|
-
`tsconfig.json`:
|
|
35
50
|
```json
|
|
36
|
-
{
|
|
37
|
-
"compilerOptions": {
|
|
38
|
-
...
|
|
39
|
-
},
|
|
40
|
-
"include": ["@girs/xreaderview-1.5"],
|
|
41
|
-
...
|
|
42
|
-
}
|
|
51
|
+
{ "include": ["@girs/xreaderview-1.5"] }
|
|
43
52
|
```
|
|
44
53
|
|
|
45
|
-
|
|
54
|
+
Then the runtime spelling type-checks:
|
|
46
55
|
|
|
47
56
|
```ts
|
|
48
57
|
import XreaderView from 'gi://XreaderView?version=1.5';
|
|
49
58
|
```
|
|
50
59
|
|
|
51
|
-
|
|
60
|
+
Referencing `@girs/xreaderview-1.5/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
|
|
54
|
-
For this you need to include `@girs/xreaderview-1.5` or `@girs/xreaderview-1.5/import` in your `tsconfig` or entry point Typescript file:
|
|
65
|
+
GJS's global object works the same way, via `@girs/xreaderview-1.5/import`:
|
|
55
66
|
|
|
56
|
-
`index.ts`:
|
|
57
67
|
```ts
|
|
58
|
-
|
|
68
|
+
const XreaderView = imports.gi.XreaderView;
|
|
59
69
|
```
|
|
60
70
|
|
|
61
|
-
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"compilerOptions": {
|
|
65
|
-
...
|
|
66
|
-
},
|
|
67
|
-
"include": ["@girs/xreaderview-1.5"],
|
|
68
|
-
...
|
|
69
|
-
}
|
|
70
|
-
```
|
|
71
|
+
## Widget vocabulary
|
|
71
72
|
|
|
72
|
-
|
|
73
|
+
`xreaderview-1.5` 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
|
-
|
|
77
|
+
import type { Widgets, PropsOf } from '@girs/xreaderview-1.5/vocabulary';
|
|
78
|
+
import { OWN_PROPS, ENUM_NICKS, PROVENANCE } from '@girs/xreaderview-1.5/vocabulary';
|
|
76
79
|
```
|
|
77
80
|
|
|
78
|
-
|
|
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
|
-
|
|
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
|
-
|
|
97
|
+
Every pre-generated package is at [gjsify/types](https://github.com/gjsify/types).
|
|
98
|
+
|
|
85
99
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/xreaderview-1.5",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for XreaderView-1.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "xreaderview-1.5.js",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"import": "./xreaderview-1.5-import.js",
|
|
17
17
|
"default": "./xreaderview-1.5-import.js"
|
|
18
18
|
},
|
|
19
|
-
"./
|
|
20
|
-
"types": "./xreaderview-1.5-
|
|
21
|
-
"import": "./xreaderview-1.5-
|
|
22
|
-
"default": "./xreaderview-1.5-
|
|
19
|
+
"./vocabulary": {
|
|
20
|
+
"types": "./xreaderview-1.5-vocabulary.d.ts",
|
|
21
|
+
"import": "./xreaderview-1.5-vocabulary.js",
|
|
22
|
+
"default": "./xreaderview-1.5-vocabulary.js"
|
|
23
23
|
},
|
|
24
24
|
"./xreaderview-1.5": {
|
|
25
25
|
"types": "./xreaderview-1.5.d.ts",
|
|
@@ -36,21 +36,21 @@
|
|
|
36
36
|
"test": "tsc --project tsconfig.json"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@girs/gjs": "^4.
|
|
40
|
-
"@girs/xreaderdocument-1.5": "^4.
|
|
41
|
-
"@girs/gtk-3.0": "^4.
|
|
42
|
-
"@girs/xlib-2.0": "^4.
|
|
43
|
-
"@girs/gdk-3.0": "^4.
|
|
44
|
-
"@girs/cairo-1.0": "^4.
|
|
45
|
-
"@girs/gobject-2.0": "^4.
|
|
46
|
-
"@girs/glib-2.0": "^4.
|
|
47
|
-
"@girs/pango-1.0": "^4.
|
|
48
|
-
"@girs/harfbuzz-0.0": "^4.
|
|
49
|
-
"@girs/freetype2-2.0": "^4.
|
|
50
|
-
"@girs/gio-2.0": "^4.
|
|
51
|
-
"@girs/gmodule-2.0": "^4.
|
|
52
|
-
"@girs/gdkpixbuf-2.0": "^4.
|
|
53
|
-
"@girs/atk-1.0": "^4.
|
|
39
|
+
"@girs/gjs": "^4.5.0",
|
|
40
|
+
"@girs/xreaderdocument-1.5": "^4.5.0",
|
|
41
|
+
"@girs/gtk-3.0": "^4.5.0",
|
|
42
|
+
"@girs/xlib-2.0": "^4.5.0",
|
|
43
|
+
"@girs/gdk-3.0": "^4.5.0",
|
|
44
|
+
"@girs/cairo-1.0": "^4.5.0",
|
|
45
|
+
"@girs/gobject-2.0": "^4.5.0",
|
|
46
|
+
"@girs/glib-2.0": "^4.5.0",
|
|
47
|
+
"@girs/pango-1.0": "^4.5.0",
|
|
48
|
+
"@girs/harfbuzz-0.0": "^4.5.0",
|
|
49
|
+
"@girs/freetype2-2.0": "^4.5.0",
|
|
50
|
+
"@girs/gio-2.0": "^4.5.0",
|
|
51
|
+
"@girs/gmodule-2.0": "^4.5.0",
|
|
52
|
+
"@girs/gdkpixbuf-2.0": "^4.5.0",
|
|
53
|
+
"@girs/atk-1.0": "^4.5.0" },
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"typescript": "*"
|
|
56
56
|
},
|
package/tsconfig.json
CHANGED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The GIR-derived widget VOCABULARY for XreaderView-1.5.
|
|
3
|
+
*
|
|
4
|
+
* GENERATED — do not edit. Provenance: XreaderView-1.5 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface
|
|
5
|
+
*
|
|
6
|
+
* 2 concrete widgets, 2 declarations, 4 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 XreaderDocument from '@girs/xreaderdocument-1.5';
|
|
28
|
+
import type XreaderView from './xreaderview-1.5.js';
|
|
29
|
+
import type { GtkBuildableConstructOnly, GtkBuildableProps, GtkContainerConstructOnly, GtkContainerProps, GtkScrollableConstructOnly, GtkScrollableProps, GtkWidgetConstructOnly, GtkWidgetProps } from '@girs/gtk-3.0/vocabulary';
|
|
30
|
+
|
|
31
|
+
// ---------------------------------------------------------------------------
|
|
32
|
+
// Enum nicks — the string vocabulary GObject registered, from GIR's `glib:nick`.
|
|
33
|
+
//
|
|
34
|
+
// Not derived from the member name. Substituting underscores for dashes is not a law:
|
|
35
|
+
// some nicks keep an underscore the substitution would have replaced, and only the
|
|
36
|
+
// attribute knows which. Gtk-4.0 and Adw-1 contradict no derivation at all, which is
|
|
37
|
+
// how a derived nick passes review and breaks elsewhere.
|
|
38
|
+
// Re-measure with `scripts/check-nick-derivation.mjs` in ts-for-gir.
|
|
39
|
+
// ---------------------------------------------------------------------------
|
|
40
|
+
|
|
41
|
+
export type EvJobPriorityNick = 'priority-urgent' | 'priority-high' | 'priority-low' | 'priority-none' | 'n-priorities';
|
|
42
|
+
export type EvJobRunModeNick = 'thread' | 'main-loop';
|
|
43
|
+
export type EvSizingModeNick = 'best-fit' | 'fit-width' | 'free';
|
|
44
|
+
export type EvViewSelectionModeNick = 'text' | 'rectangle';
|
|
45
|
+
|
|
46
|
+
// ---------------------------------------------------------------------------
|
|
47
|
+
// Property surfaces — one interface per GIR DECLARATION, mirroring GIR's own
|
|
48
|
+
// inheritance rather than flattening per widget.
|
|
49
|
+
//
|
|
50
|
+
// The interfaces are load-bearing, not tidiness: `GtkBox` declares four properties
|
|
51
|
+
// of its own and `orientation` is not among them — it lives on `Gtk.Orientable`,
|
|
52
|
+
// because GObject installs interface properties on the implementor at runtime while
|
|
53
|
+
// GIR keeps them once, on the interface.
|
|
54
|
+
// ---------------------------------------------------------------------------
|
|
55
|
+
|
|
56
|
+
export interface EvViewProps extends GtkContainerProps, GtkBuildableProps, GtkScrollableProps {
|
|
57
|
+
}
|
|
58
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
59
|
+
export type EvViewConstructOnly = GtkContainerConstructOnly | GtkBuildableConstructOnly | GtkScrollableConstructOnly;
|
|
60
|
+
|
|
61
|
+
export interface EvViewPresentationProps extends GtkWidgetProps, GtkBuildableProps {
|
|
62
|
+
/** @default 0 */
|
|
63
|
+
'current-page'?: number;
|
|
64
|
+
document?: XreaderDocument.Document;
|
|
65
|
+
/** @default FALSE */
|
|
66
|
+
'inverted-colors'?: boolean;
|
|
67
|
+
/** @default 0 */
|
|
68
|
+
rotation?: number;
|
|
69
|
+
}
|
|
70
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
71
|
+
export type EvViewPresentationConstructOnly = GtkWidgetConstructOnly | GtkBuildableConstructOnly | 'current-page' | 'document' | 'inverted-colors';
|
|
72
|
+
|
|
73
|
+
// ---------------------------------------------------------------------------
|
|
74
|
+
// The GType-keyed widget map.
|
|
75
|
+
//
|
|
76
|
+
// Keyed by GType because that is also the GtkBuilder XML key and the typelib key. A
|
|
77
|
+
// consumer maps GTypes to tags in ITS convention — kebab for JSX intrinsics, Pascal
|
|
78
|
+
// for a Vue `GlobalComponents`, the class itself for a renderer whose element type
|
|
79
|
+
// is the class. None of those is baked in here.
|
|
80
|
+
//
|
|
81
|
+
// `slotCandidates` is a candidate list and never an answer: derived from methods
|
|
82
|
+
// taking exactly one widget argument. The GIR cannot tell adoption from reference —
|
|
83
|
+
// `set_title_widget` parents its argument and `set_activatable_widget` does not, and
|
|
84
|
+
// both are `void f(GtkWidget*)` at `transfer-ownership="none"`. Curation decides;
|
|
85
|
+
// this is what notices when a release adds a candidate.
|
|
86
|
+
// ---------------------------------------------------------------------------
|
|
87
|
+
|
|
88
|
+
export interface Widgets {
|
|
89
|
+
EvView: {
|
|
90
|
+
class: XreaderView.View;
|
|
91
|
+
props: EvViewProps;
|
|
92
|
+
signals: XreaderView.View.SignalSignatures;
|
|
93
|
+
constructOnly: EvViewConstructOnly;
|
|
94
|
+
slotCandidates: {};
|
|
95
|
+
};
|
|
96
|
+
EvViewPresentation: {
|
|
97
|
+
class: XreaderView.ViewPresentation;
|
|
98
|
+
props: EvViewPresentationProps;
|
|
99
|
+
signals: XreaderView.ViewPresentation.SignalSignatures;
|
|
100
|
+
constructOnly: EvViewPresentationConstructOnly;
|
|
101
|
+
slotCandidates: {};
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** Every GType this namespace can create. A consumer derives its own tag map. */
|
|
106
|
+
export type WidgetGType = keyof Widgets;
|
|
107
|
+
|
|
108
|
+
// ---------------------------------------------------------------------------
|
|
109
|
+
// Child holders — the same shape, for objects that CARRY a widget without being one.
|
|
110
|
+
//
|
|
111
|
+
// `GtkListItem`, `GtkListHeader`, `GtkColumnViewCell` and `AdwToggle` descend from
|
|
112
|
+
// `GObject.Object` and hold a widget through `set_child`/`get_child`. A renderer places
|
|
113
|
+
// them exactly like a container, so they belong in the vocabulary; a check asking "is
|
|
114
|
+
// this a widget" must still be able to say no. Hence a sibling table rather than four
|
|
115
|
+
// more rows in `Widgets`: concatenate them when you mean both.
|
|
116
|
+
// ---------------------------------------------------------------------------
|
|
117
|
+
|
|
118
|
+
export interface ChildHolders {
|
|
119
|
+
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** Every GType this namespace holds a child in without it being a widget. */
|
|
123
|
+
export type ChildHolderGType = keyof ChildHolders;
|
|
124
|
+
|
|
125
|
+
/** The writable, optional, GObject-keyed property surface of one GType. */
|
|
126
|
+
export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
|
|
127
|
+
|
|
128
|
+
/** The signal table this package already emits, reached by GType. */
|
|
129
|
+
export type SignalsOf<G extends WidgetGType> = Widgets[G]['signals'];
|
|
130
|
+
|
|
131
|
+
/** The instance type — what a `ref`-shaped prop should infer. */
|
|
132
|
+
export type InstanceOf<G extends WidgetGType> = Widgets[G]['class'];
|
|
133
|
+
|
|
134
|
+
/** Property names that can only be set at construction. */
|
|
135
|
+
export type ConstructOnlyOf<G extends WidgetGType> = Widgets[G]['constructOnly'];
|
|
136
|
+
|
|
137
|
+
/** Candidate child slots — see the note above; curation decides. */
|
|
138
|
+
export type SlotCandidatesOf<G extends WidgetGType> = keyof Widgets[G]['slotCandidates'];
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* The same facts as runtime data, for a consumer that CHECKS them.
|
|
142
|
+
*
|
|
143
|
+
* Types are erased, so a spec that asks the installed GTK whether every property
|
|
144
|
+
* here is a writable ParamSpec, every signal resolvable by `GObject.signal_lookup`
|
|
145
|
+
* and every nick resolvable through an enum lookup cannot read the interfaces
|
|
146
|
+
* above. Emitted headlessly with no GTK present, which is exactly why the checking
|
|
147
|
+
* belongs to the consumer and the DATA belongs here.
|
|
148
|
+
*/
|
|
149
|
+
export const PROVENANCE: {
|
|
150
|
+
readonly namespace: string;
|
|
151
|
+
readonly version: string;
|
|
152
|
+
/** The version the LIBRARY states, or null where it states none. Never the namespace's. */
|
|
153
|
+
readonly libraryVersion: string | null;
|
|
154
|
+
readonly childHolders: number;
|
|
155
|
+
readonly droppedBases: readonly string[];
|
|
156
|
+
readonly inlinedBases: readonly string[];
|
|
157
|
+
readonly unsettableProps: readonly string[];
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
/** Declaration GType -> its own settable properties, as GObject registered them. */
|
|
161
|
+
export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Declaration GType -> the signals it registers itself, never its parents'.
|
|
165
|
+
*
|
|
166
|
+
* Keyed like `OWN_PROPS`, so both are read at every link of a `DECLS` chain. An
|
|
167
|
+
* abstract base has no `Widgets` row and still owns signals — `GtkWidget` owns 13.
|
|
168
|
+
*/
|
|
169
|
+
export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
|
|
170
|
+
|
|
171
|
+
/** Widget GType -> every declaration its members come from, self first. */
|
|
172
|
+
export const DECLS: Readonly<Record<string, readonly string[]>>;
|
|
173
|
+
|
|
174
|
+
/** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
|
|
175
|
+
export const CHILD_HOLDERS: readonly string[];
|
|
176
|
+
|
|
177
|
+
/** Enum GType -> the nicks this surface offers. */
|
|
178
|
+
export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
|
|
179
|
+
|
|
180
|
+
/** Widget GType -> slot name -> the method that may adopt a child there. */
|
|
181
|
+
export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* `Type`, `Type.property` and `Type::signal` -> the release that introduced it.
|
|
185
|
+
*
|
|
186
|
+
* What keeps a runtime cross-check honest across a version gap without an
|
|
187
|
+
* allowlist: a name the installed library lacks is a defect UNLESS the version
|
|
188
|
+
* here is newer than the one running.
|
|
189
|
+
*
|
|
190
|
+
* ALL THREE key shapes, because that test only works for the names it covers. A
|
|
191
|
+
* property-only map leaves a consumer no way to explain a missing SIGNAL, which is
|
|
192
|
+
* a correct vocabulary reported as 18 defects; a member-only map leaves it no way to
|
|
193
|
+
* explain a missing CLASS, and that one fails as a bare
|
|
194
|
+
* `TypeError: can't access property "$gtype", ctor() is undefined` that does not
|
|
195
|
+
* even name the GType.
|
|
196
|
+
*
|
|
197
|
+
* A key is present only where the GIR states a version — sparse by nature (`version`
|
|
198
|
+
* sits on 29 of the 301 classes and interfaces in Gtk-4.0), never inferred.
|
|
199
|
+
*/
|
|
200
|
+
export const SINCE: Readonly<Record<string, string>>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// The widget vocabulary of XreaderView-1.5 as runtime data.
|
|
2
|
+
//
|
|
3
|
+
// GENERATED — do not edit. Provenance: XreaderView-1.5 — 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: 'XreaderView',
|
|
11
|
+
version: '1.5',
|
|
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
|
+
EvViewPresentation: ['current-page', 'document', 'inverted-colors', 'rotation'],
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const OWN_SIGNALS = {
|
|
24
|
+
EvView: ['activate', 'annot-added', 'annot-removed', 'binding-activated', 'external-link', 'handle-link', 'layers-changed', 'popup', 'selection-changed', 'sync-source'],
|
|
25
|
+
EvViewPresentation: ['change-page', 'external-link', 'finished'],
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const DECLS = {
|
|
29
|
+
EvView: ['EvView', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkScrollable'],
|
|
30
|
+
EvViewPresentation: ['EvViewPresentation', 'GtkWidget', 'GtkBuildable'],
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// The GTypes above that are NOT widgets: they hold one through `set_child`/`get_child`
|
|
34
|
+
// and descend from `GObject.Object`. A renderer places them like a container; a check
|
|
35
|
+
// asking "is this a widget" must not count them. Derived from the accessor pair, never
|
|
36
|
+
// from a list — the count is in the provenance line above.
|
|
37
|
+
export const CHILD_HOLDERS = [];
|
|
38
|
+
|
|
39
|
+
export const ENUM_NICKS = {
|
|
40
|
+
EvJobPriority: ['priority-urgent', 'priority-high', 'priority-low', 'priority-none', 'n-priorities'],
|
|
41
|
+
EvJobRunMode: ['thread', 'main-loop'],
|
|
42
|
+
EvSizingMode: ['best-fit', 'fit-width', 'free'],
|
|
43
|
+
EvViewSelectionMode: ['text', 'rectangle'],
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const SLOT_CANDIDATES = {};
|
|
47
|
+
|
|
48
|
+
export const SINCE = {};
|
package/xreaderview-1.5.d.ts
CHANGED
|
@@ -44,11 +44,11 @@ export namespace XreaderView {
|
|
|
44
44
|
* @gir-type Enum
|
|
45
45
|
*/
|
|
46
46
|
enum JobPriority {
|
|
47
|
-
PRIORITY_URGENT,
|
|
48
|
-
PRIORITY_HIGH,
|
|
49
|
-
PRIORITY_LOW,
|
|
50
|
-
PRIORITY_NONE,
|
|
51
|
-
N_PRIORITIES,
|
|
47
|
+
PRIORITY_URGENT = 0,
|
|
48
|
+
PRIORITY_HIGH = 1,
|
|
49
|
+
PRIORITY_LOW = 2,
|
|
50
|
+
PRIORITY_NONE = 3,
|
|
51
|
+
N_PRIORITIES = 4,
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
|
|
@@ -63,8 +63,8 @@ export namespace XreaderView {
|
|
|
63
63
|
* @gir-type Enum
|
|
64
64
|
*/
|
|
65
65
|
enum JobRunMode {
|
|
66
|
-
THREAD,
|
|
67
|
-
MAIN_LOOP,
|
|
66
|
+
THREAD = 0,
|
|
67
|
+
MAIN_LOOP = 1,
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
|
|
@@ -79,9 +79,9 @@ export namespace XreaderView {
|
|
|
79
79
|
* @gir-type Enum
|
|
80
80
|
*/
|
|
81
81
|
enum SizingMode {
|
|
82
|
-
BEST_FIT,
|
|
83
|
-
FIT_WIDTH,
|
|
84
|
-
FREE,
|
|
82
|
+
BEST_FIT = 0,
|
|
83
|
+
FIT_WIDTH = 1,
|
|
84
|
+
FREE = 2,
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
|
|
@@ -96,37 +96,79 @@ export namespace XreaderView {
|
|
|
96
96
|
* @gir-type Enum
|
|
97
97
|
*/
|
|
98
98
|
enum ViewSelectionMode {
|
|
99
|
-
TEXT,
|
|
100
|
-
RECTANGLE,
|
|
99
|
+
TEXT = 0,
|
|
100
|
+
RECTANGLE = 1,
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
|
|
104
|
+
/**
|
|
105
|
+
* @default mail-attachment
|
|
106
|
+
*/
|
|
104
107
|
const STOCK_ATTACHMENT: string;
|
|
105
108
|
|
|
109
|
+
/**
|
|
110
|
+
* @default close
|
|
111
|
+
*/
|
|
106
112
|
const STOCK_CLOSE: string;
|
|
107
113
|
|
|
114
|
+
/**
|
|
115
|
+
* @default inverted
|
|
116
|
+
*/
|
|
108
117
|
const STOCK_INVERTED_COLORS: string;
|
|
109
118
|
|
|
119
|
+
/**
|
|
120
|
+
* @default resize-se
|
|
121
|
+
*/
|
|
110
122
|
const STOCK_RESIZE_SE: string;
|
|
111
123
|
|
|
124
|
+
/**
|
|
125
|
+
* @default resize-sw
|
|
126
|
+
*/
|
|
112
127
|
const STOCK_RESIZE_SW: string;
|
|
113
128
|
|
|
129
|
+
/**
|
|
130
|
+
* @default object-rotate-left
|
|
131
|
+
*/
|
|
114
132
|
const STOCK_ROTATE_LEFT: string;
|
|
115
133
|
|
|
134
|
+
/**
|
|
135
|
+
* @default object-rotate-right
|
|
136
|
+
*/
|
|
116
137
|
const STOCK_ROTATE_RIGHT: string;
|
|
117
138
|
|
|
139
|
+
/**
|
|
140
|
+
* @default x-office-presentation
|
|
141
|
+
*/
|
|
118
142
|
const STOCK_RUN_PRESENTATION: string;
|
|
119
143
|
|
|
144
|
+
/**
|
|
145
|
+
* @default view-page-continuous
|
|
146
|
+
*/
|
|
120
147
|
const STOCK_VIEW_CONTINUOUS: string;
|
|
121
148
|
|
|
149
|
+
/**
|
|
150
|
+
* @default view-page-facing
|
|
151
|
+
*/
|
|
122
152
|
const STOCK_VIEW_DUAL: string;
|
|
123
153
|
|
|
154
|
+
/**
|
|
155
|
+
* @default eye
|
|
156
|
+
*/
|
|
124
157
|
const STOCK_VISIBLE: string;
|
|
125
158
|
|
|
159
|
+
/**
|
|
160
|
+
* @default zoom
|
|
161
|
+
*/
|
|
126
162
|
const STOCK_ZOOM: string;
|
|
127
163
|
|
|
164
|
+
/**
|
|
165
|
+
* @default zoom-fit-height
|
|
166
|
+
*/
|
|
128
167
|
const STOCK_ZOOM_PAGE: string;
|
|
129
168
|
|
|
169
|
+
/**
|
|
170
|
+
* @default zoom-fit-width
|
|
171
|
+
*/
|
|
130
172
|
const STOCK_ZOOM_WIDTH: string;
|
|
131
173
|
|
|
132
174
|
/**
|
|
@@ -152,15 +194,15 @@ export namespace XreaderView {
|
|
|
152
194
|
* @gir-type Flags
|
|
153
195
|
*/
|
|
154
196
|
enum JobPageDataFlags {
|
|
155
|
-
NONE,
|
|
156
|
-
LINKS,
|
|
157
|
-
TEXT,
|
|
158
|
-
TEXT_MAPPING,
|
|
159
|
-
TEXT_LAYOUT,
|
|
160
|
-
IMAGES,
|
|
161
|
-
FORMS,
|
|
162
|
-
ANNOTS,
|
|
163
|
-
ALL,
|
|
197
|
+
NONE = 0,
|
|
198
|
+
LINKS = 1,
|
|
199
|
+
TEXT = 2,
|
|
200
|
+
TEXT_MAPPING = 4,
|
|
201
|
+
TEXT_LAYOUT = 8,
|
|
202
|
+
IMAGES = 16,
|
|
203
|
+
FORMS = 32,
|
|
204
|
+
ANNOTS = 64,
|
|
205
|
+
ALL = 127,
|
|
164
206
|
}
|
|
165
207
|
|
|
166
208
|
|
|
@@ -171,7 +213,7 @@ export namespace XreaderView {
|
|
|
171
213
|
* @signal
|
|
172
214
|
* @run-last
|
|
173
215
|
*/
|
|
174
|
-
"page-changed": (
|
|
216
|
+
"page-changed": (object: number, p0: number) => void;
|
|
175
217
|
"notify::continuous": (pspec: GObject.ParamSpec) => void;
|
|
176
218
|
"notify::document": (pspec: GObject.ParamSpec) => void;
|
|
177
219
|
"notify::dual-odd-left": (pspec: GObject.ParamSpec) => void;
|
|
@@ -712,7 +754,7 @@ export namespace XreaderView {
|
|
|
712
754
|
* @signal
|
|
713
755
|
* @run-last
|
|
714
756
|
*/
|
|
715
|
-
updated: (
|
|
757
|
+
updated: (object: number) => void;
|
|
716
758
|
}
|
|
717
759
|
|
|
718
760
|
// Constructor properties interface
|
|
@@ -799,7 +841,7 @@ export namespace XreaderView {
|
|
|
799
841
|
* @signal
|
|
800
842
|
* @run-last
|
|
801
843
|
*/
|
|
802
|
-
updated: (
|
|
844
|
+
updated: (object: number) => void;
|
|
803
845
|
}
|
|
804
846
|
|
|
805
847
|
// Constructor properties interface
|
|
@@ -1318,7 +1360,7 @@ export namespace XreaderView {
|
|
|
1318
1360
|
* @signal
|
|
1319
1361
|
* @run-last
|
|
1320
1362
|
*/
|
|
1321
|
-
done: (
|
|
1363
|
+
done: (object: Gtk.PrintOperationResult) => void;
|
|
1322
1364
|
/**
|
|
1323
1365
|
* @signal
|
|
1324
1366
|
* @run-last
|
|
@@ -1385,6 +1427,9 @@ export namespace XreaderView {
|
|
|
1385
1427
|
|
|
1386
1428
|
get_embed_page_setup(): boolean;
|
|
1387
1429
|
|
|
1430
|
+
/**
|
|
1431
|
+
* @throws GLib.Error
|
|
1432
|
+
*/
|
|
1388
1433
|
get_error(): void;
|
|
1389
1434
|
|
|
1390
1435
|
get_job_name(): string;
|
|
@@ -1439,31 +1484,31 @@ export namespace XreaderView {
|
|
|
1439
1484
|
* @action
|
|
1440
1485
|
* @run-last
|
|
1441
1486
|
*/
|
|
1442
|
-
"annot-added": (
|
|
1487
|
+
"annot-added": (object: XreaderDocument.Annotation) => void;
|
|
1443
1488
|
/**
|
|
1444
1489
|
* @signal
|
|
1445
1490
|
* @action
|
|
1446
1491
|
* @run-last
|
|
1447
1492
|
*/
|
|
1448
|
-
"annot-removed": (
|
|
1493
|
+
"annot-removed": (object: XreaderDocument.Annotation) => void;
|
|
1449
1494
|
/**
|
|
1450
1495
|
* @signal
|
|
1451
1496
|
* @action
|
|
1452
1497
|
* @run-last
|
|
1453
1498
|
*/
|
|
1454
|
-
"binding-activated": (
|
|
1499
|
+
"binding-activated": (object: Gtk.ScrollType, p0: boolean) => void;
|
|
1455
1500
|
/**
|
|
1456
1501
|
* @signal
|
|
1457
1502
|
* @action
|
|
1458
1503
|
* @run-last
|
|
1459
1504
|
*/
|
|
1460
|
-
"external-link": (
|
|
1505
|
+
"external-link": (object: GObject.Object) => void;
|
|
1461
1506
|
/**
|
|
1462
1507
|
* @signal
|
|
1463
1508
|
* @action
|
|
1464
1509
|
* @run-last
|
|
1465
1510
|
*/
|
|
1466
|
-
"handle-link": (
|
|
1511
|
+
"handle-link": (object: GObject.Object) => void;
|
|
1467
1512
|
/**
|
|
1468
1513
|
* @signal
|
|
1469
1514
|
* @action
|
|
@@ -1475,7 +1520,7 @@ export namespace XreaderView {
|
|
|
1475
1520
|
* @action
|
|
1476
1521
|
* @run-last
|
|
1477
1522
|
*/
|
|
1478
|
-
popup: (
|
|
1523
|
+
popup: (object: null) => void;
|
|
1479
1524
|
/**
|
|
1480
1525
|
* @signal
|
|
1481
1526
|
* @action
|
|
@@ -1487,7 +1532,7 @@ export namespace XreaderView {
|
|
|
1487
1532
|
* @action
|
|
1488
1533
|
* @run-last
|
|
1489
1534
|
*/
|
|
1490
|
-
"sync-source": (
|
|
1535
|
+
"sync-source": (object: null) => void;
|
|
1491
1536
|
"notify::border-width": (pspec: GObject.ParamSpec) => void;
|
|
1492
1537
|
"notify::child": (pspec: GObject.ParamSpec) => void;
|
|
1493
1538
|
"notify::resize-mode": (pspec: GObject.ParamSpec) => void;
|
|
@@ -1839,13 +1884,13 @@ export namespace XreaderView {
|
|
|
1839
1884
|
* @action
|
|
1840
1885
|
* @run-last
|
|
1841
1886
|
*/
|
|
1842
|
-
"change-page": (
|
|
1887
|
+
"change-page": (object: Gtk.ScrollType) => void;
|
|
1843
1888
|
/**
|
|
1844
1889
|
* @signal
|
|
1845
1890
|
* @action
|
|
1846
1891
|
* @run-last
|
|
1847
1892
|
*/
|
|
1848
|
-
"external-link": (
|
|
1893
|
+
"external-link": (object: GObject.Object) => void;
|
|
1849
1894
|
/**
|
|
1850
1895
|
* @signal
|
|
1851
1896
|
* @action
|