@girs/caja-2.0 2.0.0-4.0.0-beta.3
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 +86 -0
- package/caja-2.0-ambient.d.ts +12 -0
- package/caja-2.0-ambient.js +2 -0
- package/caja-2.0-import.d.ts +12 -0
- package/caja-2.0-import.js +3 -0
- package/caja-2.0.d.ts +635 -0
- package/caja-2.0.js +6 -0
- package/package.json +65 -0
- package/tsconfig.json +23 -0
- package/typedoc.json +7 -0
package/README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
|
|
2
|
+
# Caja-2.0
|
|
3
|
+
|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
GJS TypeScript type definitions for Caja-2.0, generated from library version 2.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.3.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
To use this type definitions, install them with NPM:
|
|
14
|
+
```bash
|
|
15
|
+
npm install @girs/caja-2.0
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
You can import this package into your project like this:
|
|
21
|
+
```ts
|
|
22
|
+
import Caja from '@girs/caja-2.0';
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Ambient Modules
|
|
26
|
+
|
|
27
|
+
You can also use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) to import this module like you would do this in JavaScript.
|
|
28
|
+
For this you need to include `@girs/caja-2.0` or `@girs/caja-2.0/ambient` in your `tsconfig` or entry point Typescript file:
|
|
29
|
+
|
|
30
|
+
`index.ts`:
|
|
31
|
+
```ts
|
|
32
|
+
import '@girs/caja-2.0'
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`tsconfig.json`:
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"compilerOptions": {
|
|
39
|
+
...
|
|
40
|
+
},
|
|
41
|
+
"include": ["@girs/caja-2.0"],
|
|
42
|
+
...
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Now you can import the ambient module with TypeScript support:
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
import Caja from 'gi://Caja?version=2.0';
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Global import
|
|
53
|
+
|
|
54
|
+
You can also import the module with Typescript support using the global `imports.gi` object of GJS.
|
|
55
|
+
For this you need to include `@girs/caja-2.0` or `@girs/caja-2.0/import` in your `tsconfig` or entry point Typescript file:
|
|
56
|
+
|
|
57
|
+
`index.ts`:
|
|
58
|
+
```ts
|
|
59
|
+
import '@girs/caja-2.0'
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
`tsconfig.json`:
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"compilerOptions": {
|
|
66
|
+
...
|
|
67
|
+
},
|
|
68
|
+
"include": ["@girs/caja-2.0"],
|
|
69
|
+
...
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Now you have also type support for this, too:
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
const Caja = imports.gi.Caja;
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Bundle
|
|
80
|
+
|
|
81
|
+
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).
|
|
82
|
+
|
|
83
|
+
## Other packages
|
|
84
|
+
|
|
85
|
+
All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
|
|
86
|
+
|
package/caja-2.0.d.ts
ADDED
|
@@ -0,0 +1,635 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Type Definitions for Gjs (https://gjs.guide/)
|
|
3
|
+
*
|
|
4
|
+
* These type definitions are automatically generated, do not edit them by hand.
|
|
5
|
+
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import './caja-2.0-ambient.d.ts';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Caja-2.0
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import type Gtk from '@girs/gtk-3.0';
|
|
15
|
+
import type xlib from '@girs/xlib-2.0';
|
|
16
|
+
import type Gdk from '@girs/gdk-3.0';
|
|
17
|
+
import type cairo from '@girs/cairo-1.0';
|
|
18
|
+
import type GObject from '@girs/gobject-2.0';
|
|
19
|
+
import type GLib from '@girs/glib-2.0';
|
|
20
|
+
import type Pango from '@girs/pango-1.0';
|
|
21
|
+
import type HarfBuzz from '@girs/harfbuzz-0.0';
|
|
22
|
+
import type freetype2 from '@girs/freetype2-2.0';
|
|
23
|
+
import type Gio from '@girs/gio-2.0';
|
|
24
|
+
import type GdkPixbuf from '@girs/gdkpixbuf-2.0';
|
|
25
|
+
import type GModule from '@girs/gmodule-2.0';
|
|
26
|
+
import type Atk from '@girs/atk-1.0';
|
|
27
|
+
|
|
28
|
+
export namespace Caja {
|
|
29
|
+
enum OperationResult {
|
|
30
|
+
/**
|
|
31
|
+
* the operation succeeded, and the extension
|
|
32
|
+
* is done with the request.
|
|
33
|
+
*/
|
|
34
|
+
COMPLETE,
|
|
35
|
+
/**
|
|
36
|
+
* the operation failed.
|
|
37
|
+
*/
|
|
38
|
+
FAILED,
|
|
39
|
+
/**
|
|
40
|
+
* the extension has begin an async operation.
|
|
41
|
+
* When this value is returned, the extension must set the handle parameter
|
|
42
|
+
* and call the callback closure when the operation is complete.
|
|
43
|
+
*/
|
|
44
|
+
IN_PROGRESS,
|
|
45
|
+
}
|
|
46
|
+
function file_info_create(location: Gio.File): FileInfo;
|
|
47
|
+
function file_info_create_for_uri(uri: string): FileInfo;
|
|
48
|
+
function file_info_list_copy(files: FileInfo[]): FileInfo[];
|
|
49
|
+
function file_info_list_free(files: FileInfo[]): void;
|
|
50
|
+
function file_info_lookup(location: Gio.File): FileInfo;
|
|
51
|
+
function file_info_lookup_for_uri(uri: string): FileInfo;
|
|
52
|
+
function info_provider_update_complete_invoke(
|
|
53
|
+
update_complete: GObject.Closure,
|
|
54
|
+
provider: InfoProvider,
|
|
55
|
+
handle: OperationHandle,
|
|
56
|
+
result: OperationResult,
|
|
57
|
+
): void;
|
|
58
|
+
function module_initialize(module: GObject.TypeModule): void;
|
|
59
|
+
function module_list_types(types: GObject.GType, num_types: number): void;
|
|
60
|
+
function module_shutdown(): void;
|
|
61
|
+
interface InfoProviderUpdateComplete {
|
|
62
|
+
(provider: InfoProvider, handle: OperationHandle, result: OperationResult): void;
|
|
63
|
+
}
|
|
64
|
+
module Column {
|
|
65
|
+
// Constructor properties interface
|
|
66
|
+
|
|
67
|
+
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
|
68
|
+
attribute: string;
|
|
69
|
+
attribute_q: number;
|
|
70
|
+
attributeQ: number;
|
|
71
|
+
description: string;
|
|
72
|
+
label: string;
|
|
73
|
+
name: string;
|
|
74
|
+
xalign: number;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
class Column extends GObject.Object {
|
|
79
|
+
static $gtype: GObject.GType<Column>;
|
|
80
|
+
|
|
81
|
+
// Own properties of Caja.Column
|
|
82
|
+
|
|
83
|
+
get attribute(): string;
|
|
84
|
+
set attribute(val: string);
|
|
85
|
+
get attribute_q(): number;
|
|
86
|
+
get attributeQ(): number;
|
|
87
|
+
get description(): string;
|
|
88
|
+
set description(val: string);
|
|
89
|
+
get label(): string;
|
|
90
|
+
set label(val: string);
|
|
91
|
+
get name(): string;
|
|
92
|
+
get xalign(): number;
|
|
93
|
+
set xalign(val: number);
|
|
94
|
+
|
|
95
|
+
// Constructors of Caja.Column
|
|
96
|
+
|
|
97
|
+
constructor(properties?: Partial<Column.ConstructorProps>, ...args: any[]);
|
|
98
|
+
|
|
99
|
+
_init(...args: any[]): void;
|
|
100
|
+
|
|
101
|
+
static ['new'](name: string, attribute: string, label: string, description: string): Column;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
module Menu {
|
|
105
|
+
// Constructor properties interface
|
|
106
|
+
|
|
107
|
+
interface ConstructorProps extends GObject.Object.ConstructorProps {}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
class Menu extends GObject.Object {
|
|
111
|
+
static $gtype: GObject.GType<Menu>;
|
|
112
|
+
|
|
113
|
+
// Constructors of Caja.Menu
|
|
114
|
+
|
|
115
|
+
constructor(properties?: Partial<Menu.ConstructorProps>, ...args: any[]);
|
|
116
|
+
|
|
117
|
+
_init(...args: any[]): void;
|
|
118
|
+
|
|
119
|
+
static ['new'](): Menu;
|
|
120
|
+
|
|
121
|
+
// Own methods of Caja.Menu
|
|
122
|
+
|
|
123
|
+
append_item(item: MenuItem): void;
|
|
124
|
+
get_items(): MenuItem[];
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
module MenuItem {
|
|
128
|
+
// Signal callback interfaces
|
|
129
|
+
|
|
130
|
+
interface Activate {
|
|
131
|
+
(): void;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Constructor properties interface
|
|
135
|
+
|
|
136
|
+
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
|
137
|
+
icon: string;
|
|
138
|
+
label: string;
|
|
139
|
+
menu: Menu;
|
|
140
|
+
name: string;
|
|
141
|
+
priority: boolean;
|
|
142
|
+
sensitive: boolean;
|
|
143
|
+
tip: string;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
class MenuItem extends GObject.Object {
|
|
148
|
+
static $gtype: GObject.GType<MenuItem>;
|
|
149
|
+
|
|
150
|
+
// Own properties of Caja.MenuItem
|
|
151
|
+
|
|
152
|
+
get icon(): string;
|
|
153
|
+
set icon(val: string);
|
|
154
|
+
get label(): string;
|
|
155
|
+
set label(val: string);
|
|
156
|
+
get menu(): Menu;
|
|
157
|
+
set menu(val: Menu);
|
|
158
|
+
get name(): string;
|
|
159
|
+
get priority(): boolean;
|
|
160
|
+
set priority(val: boolean);
|
|
161
|
+
get sensitive(): boolean;
|
|
162
|
+
set sensitive(val: boolean);
|
|
163
|
+
get tip(): string;
|
|
164
|
+
set tip(val: string);
|
|
165
|
+
|
|
166
|
+
// Constructors of Caja.MenuItem
|
|
167
|
+
|
|
168
|
+
constructor(properties?: Partial<MenuItem.ConstructorProps>, ...args: any[]);
|
|
169
|
+
|
|
170
|
+
_init(...args: any[]): void;
|
|
171
|
+
|
|
172
|
+
static ['new'](name: string, label: string, tip: string, icon: string): MenuItem;
|
|
173
|
+
|
|
174
|
+
// Own signals of Caja.MenuItem
|
|
175
|
+
|
|
176
|
+
connect(id: string, callback: (...args: any[]) => any): number;
|
|
177
|
+
connect_after(id: string, callback: (...args: any[]) => any): number;
|
|
178
|
+
emit(id: string, ...args: any[]): void;
|
|
179
|
+
connect(signal: 'activate', callback: (_source: this) => void): number;
|
|
180
|
+
connect_after(signal: 'activate', callback: (_source: this) => void): number;
|
|
181
|
+
emit(signal: 'activate'): void;
|
|
182
|
+
|
|
183
|
+
// Own static methods of Caja.MenuItem
|
|
184
|
+
|
|
185
|
+
static list_free(item_list: MenuItem[]): void;
|
|
186
|
+
|
|
187
|
+
// Own virtual methods of Caja.MenuItem
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* emits the activate signal.
|
|
191
|
+
*/
|
|
192
|
+
vfunc_activate(): void;
|
|
193
|
+
|
|
194
|
+
// Own methods of Caja.MenuItem
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* emits the activate signal.
|
|
198
|
+
*/
|
|
199
|
+
activate(): void;
|
|
200
|
+
/**
|
|
201
|
+
* Attachs a menu to the given #CajaMenuItem.
|
|
202
|
+
* @param menu pointer to a #CajaMenu to attach to the button
|
|
203
|
+
*/
|
|
204
|
+
set_submenu(menu: Menu): void;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
module PropertyPage {
|
|
208
|
+
// Constructor properties interface
|
|
209
|
+
|
|
210
|
+
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
|
211
|
+
label: Gtk.Widget;
|
|
212
|
+
name: string;
|
|
213
|
+
page: Gtk.Widget;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
class PropertyPage extends GObject.Object {
|
|
218
|
+
static $gtype: GObject.GType<PropertyPage>;
|
|
219
|
+
|
|
220
|
+
// Own properties of Caja.PropertyPage
|
|
221
|
+
|
|
222
|
+
get label(): Gtk.Widget;
|
|
223
|
+
set label(val: Gtk.Widget);
|
|
224
|
+
get name(): string;
|
|
225
|
+
get page(): Gtk.Widget;
|
|
226
|
+
set page(val: Gtk.Widget);
|
|
227
|
+
|
|
228
|
+
// Constructors of Caja.PropertyPage
|
|
229
|
+
|
|
230
|
+
constructor(properties?: Partial<PropertyPage.ConstructorProps>, ...args: any[]);
|
|
231
|
+
|
|
232
|
+
_init(...args: any[]): void;
|
|
233
|
+
|
|
234
|
+
static ['new'](name: string, label: Gtk.Widget, page: Gtk.Widget): PropertyPage;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
type ColumnClass = typeof Column;
|
|
238
|
+
abstract class ColumnDetails {
|
|
239
|
+
static $gtype: GObject.GType<ColumnDetails>;
|
|
240
|
+
|
|
241
|
+
// Constructors of Caja.ColumnDetails
|
|
242
|
+
|
|
243
|
+
_init(...args: any[]): void;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
type ColumnProviderIface = typeof ColumnProvider;
|
|
247
|
+
type ConfigurableIface = typeof Configurable;
|
|
248
|
+
abstract class File {
|
|
249
|
+
static $gtype: GObject.GType<File>;
|
|
250
|
+
|
|
251
|
+
// Constructors of Caja.File
|
|
252
|
+
|
|
253
|
+
_init(...args: any[]): void;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
type FileInfoIface = typeof FileInfo;
|
|
257
|
+
type InfoProviderIface = typeof InfoProvider;
|
|
258
|
+
type LocationWidgetProviderIface = typeof LocationWidgetProvider;
|
|
259
|
+
type MenuClass = typeof Menu;
|
|
260
|
+
type MenuItemClass = typeof MenuItem;
|
|
261
|
+
abstract class MenuItemDetails {
|
|
262
|
+
static $gtype: GObject.GType<MenuItemDetails>;
|
|
263
|
+
|
|
264
|
+
// Constructors of Caja.MenuItemDetails
|
|
265
|
+
|
|
266
|
+
_init(...args: any[]): void;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
abstract class MenuPrivate {
|
|
270
|
+
static $gtype: GObject.GType<MenuPrivate>;
|
|
271
|
+
|
|
272
|
+
// Constructors of Caja.MenuPrivate
|
|
273
|
+
|
|
274
|
+
_init(...args: any[]): void;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
type MenuProviderIface = typeof MenuProvider;
|
|
278
|
+
/**
|
|
279
|
+
* Handle for asynchronous interfaces. These are opaque handles that must
|
|
280
|
+
* be unique within an extension object. These are returned by operations
|
|
281
|
+
* that return CAJA_OPERATION_IN_PROGRESS.
|
|
282
|
+
*/
|
|
283
|
+
abstract class OperationHandle {
|
|
284
|
+
static $gtype: GObject.GType<OperationHandle>;
|
|
285
|
+
|
|
286
|
+
// Constructors of Caja.OperationHandle
|
|
287
|
+
|
|
288
|
+
_init(...args: any[]): void;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
type PropertyPageClass = typeof PropertyPage;
|
|
292
|
+
abstract class PropertyPageDetails {
|
|
293
|
+
static $gtype: GObject.GType<PropertyPageDetails>;
|
|
294
|
+
|
|
295
|
+
// Constructors of Caja.PropertyPageDetails
|
|
296
|
+
|
|
297
|
+
_init(...args: any[]): void;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
type PropertyPageProviderIface = typeof PropertyPageProvider;
|
|
301
|
+
type WidgetViewProviderIface = typeof WidgetViewProvider;
|
|
302
|
+
module ColumnProvider {
|
|
303
|
+
// Constructor properties interface
|
|
304
|
+
|
|
305
|
+
interface ConstructorProps extends GObject.Object.ConstructorProps {}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export interface ColumnProviderNamespace {
|
|
309
|
+
$gtype: GObject.GType<ColumnProvider>;
|
|
310
|
+
prototype: ColumnProvider;
|
|
311
|
+
}
|
|
312
|
+
interface ColumnProvider extends GObject.Object {
|
|
313
|
+
// Own methods of Caja.ColumnProvider
|
|
314
|
+
|
|
315
|
+
get_columns(): Column[];
|
|
316
|
+
|
|
317
|
+
// Own virtual methods of Caja.ColumnProvider
|
|
318
|
+
|
|
319
|
+
vfunc_get_columns(): Column[];
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export const ColumnProvider: ColumnProviderNamespace;
|
|
323
|
+
|
|
324
|
+
module Configurable {
|
|
325
|
+
// Constructor properties interface
|
|
326
|
+
|
|
327
|
+
interface ConstructorProps extends GObject.Object.ConstructorProps {}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
export interface ConfigurableNamespace {
|
|
331
|
+
$gtype: GObject.GType<Configurable>;
|
|
332
|
+
prototype: Configurable;
|
|
333
|
+
}
|
|
334
|
+
interface Configurable extends GObject.Object {
|
|
335
|
+
// Own methods of Caja.Configurable
|
|
336
|
+
|
|
337
|
+
run_config(): void;
|
|
338
|
+
|
|
339
|
+
// Own virtual methods of Caja.Configurable
|
|
340
|
+
|
|
341
|
+
vfunc_run_config(): void;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export const Configurable: ConfigurableNamespace;
|
|
345
|
+
|
|
346
|
+
module FileInfo {
|
|
347
|
+
// Constructor properties interface
|
|
348
|
+
|
|
349
|
+
interface ConstructorProps extends GObject.Object.ConstructorProps {}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export interface FileInfoNamespace {
|
|
353
|
+
$gtype: GObject.GType<FileInfo>;
|
|
354
|
+
prototype: FileInfo;
|
|
355
|
+
|
|
356
|
+
create(location: Gio.File): FileInfo;
|
|
357
|
+
create_for_uri(uri: string): FileInfo;
|
|
358
|
+
list_copy(files: FileInfo[]): FileInfo[];
|
|
359
|
+
list_free(files: FileInfo[]): void;
|
|
360
|
+
lookup(location: Gio.File): FileInfo;
|
|
361
|
+
lookup_for_uri(uri: string): FileInfo;
|
|
362
|
+
}
|
|
363
|
+
interface FileInfo extends GObject.Object {
|
|
364
|
+
// Own methods of Caja.FileInfo
|
|
365
|
+
|
|
366
|
+
add_emblem(emblem_name: string): void;
|
|
367
|
+
add_string_attribute(attribute_name: string, value: string): void;
|
|
368
|
+
can_write(): boolean;
|
|
369
|
+
get_activation_uri(): string;
|
|
370
|
+
get_file_type(): Gio.FileType;
|
|
371
|
+
get_location(): Gio.File;
|
|
372
|
+
get_mime_type(): string;
|
|
373
|
+
get_mount(): Gio.Mount | null;
|
|
374
|
+
get_name(): string;
|
|
375
|
+
get_parent_info(): FileInfo | null;
|
|
376
|
+
get_parent_location(): Gio.File | null;
|
|
377
|
+
get_parent_uri(): string;
|
|
378
|
+
get_string_attribute(attribute_name: string): string;
|
|
379
|
+
get_uri(): string;
|
|
380
|
+
get_uri_scheme(): string;
|
|
381
|
+
invalidate_extension_info(): void;
|
|
382
|
+
is_directory(): boolean;
|
|
383
|
+
is_gone(): boolean;
|
|
384
|
+
is_mime_type(mime_type: string): boolean;
|
|
385
|
+
|
|
386
|
+
// Own virtual methods of Caja.FileInfo
|
|
387
|
+
|
|
388
|
+
vfunc_add_emblem(emblem_name: string): void;
|
|
389
|
+
vfunc_add_string_attribute(attribute_name: string, value: string): void;
|
|
390
|
+
vfunc_can_write(): boolean;
|
|
391
|
+
vfunc_get_activation_uri(): string;
|
|
392
|
+
vfunc_get_file_type(): Gio.FileType;
|
|
393
|
+
vfunc_get_location(): Gio.File;
|
|
394
|
+
vfunc_get_mime_type(): string;
|
|
395
|
+
vfunc_get_mount(): Gio.Mount | null;
|
|
396
|
+
vfunc_get_name(): string;
|
|
397
|
+
vfunc_get_parent_info(): FileInfo | null;
|
|
398
|
+
vfunc_get_parent_location(): Gio.File | null;
|
|
399
|
+
vfunc_get_parent_uri(): string;
|
|
400
|
+
vfunc_get_string_attribute(attribute_name: string): string;
|
|
401
|
+
vfunc_get_uri(): string;
|
|
402
|
+
vfunc_get_uri_scheme(): string;
|
|
403
|
+
vfunc_invalidate_extension_info(): void;
|
|
404
|
+
vfunc_is_directory(): boolean;
|
|
405
|
+
vfunc_is_gone(): boolean;
|
|
406
|
+
vfunc_is_mime_type(mime_Type: string): boolean;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export const FileInfo: FileInfoNamespace;
|
|
410
|
+
|
|
411
|
+
module InfoProvider {
|
|
412
|
+
// Constructor properties interface
|
|
413
|
+
|
|
414
|
+
interface ConstructorProps extends GObject.Object.ConstructorProps {}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
export interface InfoProviderNamespace {
|
|
418
|
+
$gtype: GObject.GType<InfoProvider>;
|
|
419
|
+
prototype: InfoProvider;
|
|
420
|
+
|
|
421
|
+
update_complete_invoke(
|
|
422
|
+
update_complete: GObject.Closure,
|
|
423
|
+
provider: InfoProvider,
|
|
424
|
+
handle: OperationHandle,
|
|
425
|
+
result: OperationResult,
|
|
426
|
+
): void;
|
|
427
|
+
}
|
|
428
|
+
interface InfoProvider extends GObject.Object {
|
|
429
|
+
// Own methods of Caja.InfoProvider
|
|
430
|
+
|
|
431
|
+
cancel_update(handle: OperationHandle): void;
|
|
432
|
+
update_file_info(file: FileInfo, update_complete: GObject.Closure, handle: OperationHandle): OperationResult;
|
|
433
|
+
|
|
434
|
+
// Own virtual methods of Caja.InfoProvider
|
|
435
|
+
|
|
436
|
+
vfunc_cancel_update(handle: OperationHandle): void;
|
|
437
|
+
vfunc_update_file_info(
|
|
438
|
+
file: FileInfo,
|
|
439
|
+
update_complete: GObject.Closure,
|
|
440
|
+
handle: OperationHandle,
|
|
441
|
+
): OperationResult;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
export const InfoProvider: InfoProviderNamespace;
|
|
445
|
+
|
|
446
|
+
module LocationWidgetProvider {
|
|
447
|
+
// Constructor properties interface
|
|
448
|
+
|
|
449
|
+
interface ConstructorProps extends GObject.Object.ConstructorProps {}
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
export interface LocationWidgetProviderNamespace {
|
|
453
|
+
$gtype: GObject.GType<LocationWidgetProvider>;
|
|
454
|
+
prototype: LocationWidgetProvider;
|
|
455
|
+
}
|
|
456
|
+
interface LocationWidgetProvider extends GObject.Object {
|
|
457
|
+
// Own methods of Caja.LocationWidgetProvider
|
|
458
|
+
|
|
459
|
+
get_widget(uri: string, window: Gtk.Widget): Gtk.Widget;
|
|
460
|
+
|
|
461
|
+
// Own virtual methods of Caja.LocationWidgetProvider
|
|
462
|
+
|
|
463
|
+
vfunc_get_widget(uri: string, window: Gtk.Widget): Gtk.Widget;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
export const LocationWidgetProvider: LocationWidgetProviderNamespace;
|
|
467
|
+
|
|
468
|
+
module MenuProvider {
|
|
469
|
+
// Constructor properties interface
|
|
470
|
+
|
|
471
|
+
interface ConstructorProps extends GObject.Object.ConstructorProps {}
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
export interface MenuProviderNamespace {
|
|
475
|
+
$gtype: GObject.GType<MenuProvider>;
|
|
476
|
+
prototype: MenuProvider;
|
|
477
|
+
}
|
|
478
|
+
interface MenuProvider extends GObject.Object {
|
|
479
|
+
// Own methods of Caja.MenuProvider
|
|
480
|
+
|
|
481
|
+
emit_items_updated_signal(): void;
|
|
482
|
+
get_background_items(window: Gtk.Widget, current_folder: FileInfo): MenuItem[];
|
|
483
|
+
get_file_items(window: Gtk.Widget, files: FileInfo[]): MenuItem[];
|
|
484
|
+
get_toolbar_items(window: Gtk.Widget, current_folder: FileInfo): MenuItem[];
|
|
485
|
+
|
|
486
|
+
// Own virtual methods of Caja.MenuProvider
|
|
487
|
+
|
|
488
|
+
vfunc_get_background_items(window: Gtk.Widget, current_folder: FileInfo): MenuItem[];
|
|
489
|
+
vfunc_get_file_items(window: Gtk.Widget, files: FileInfo[]): MenuItem[];
|
|
490
|
+
vfunc_get_toolbar_items(window: Gtk.Widget, current_folder: FileInfo): MenuItem[];
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
export const MenuProvider: MenuProviderNamespace;
|
|
494
|
+
|
|
495
|
+
module PropertyPageProvider {
|
|
496
|
+
// Constructor properties interface
|
|
497
|
+
|
|
498
|
+
interface ConstructorProps extends GObject.Object.ConstructorProps {}
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
export interface PropertyPageProviderNamespace {
|
|
502
|
+
$gtype: GObject.GType<PropertyPageProvider>;
|
|
503
|
+
prototype: PropertyPageProvider;
|
|
504
|
+
}
|
|
505
|
+
interface PropertyPageProvider extends GObject.Object {
|
|
506
|
+
// Own methods of Caja.PropertyPageProvider
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* This function is called by Caja when it wants property page
|
|
510
|
+
* items from the extension.
|
|
511
|
+
*
|
|
512
|
+
* This function is called in the main thread before a property page
|
|
513
|
+
* is shown, so it should return quickly.
|
|
514
|
+
* @param files a #GList of #CajaFileInfo
|
|
515
|
+
* @returns A #GList of allocated #CajaPropertyPage items.
|
|
516
|
+
*/
|
|
517
|
+
get_pages(files: FileInfo[]): PropertyPage[];
|
|
518
|
+
|
|
519
|
+
// Own virtual methods of Caja.PropertyPageProvider
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* This function is called by Caja when it wants property page
|
|
523
|
+
* items from the extension.
|
|
524
|
+
*
|
|
525
|
+
* This function is called in the main thread before a property page
|
|
526
|
+
* is shown, so it should return quickly.
|
|
527
|
+
* @param files a #GList of #CajaFileInfo
|
|
528
|
+
*/
|
|
529
|
+
vfunc_get_pages(files: FileInfo[]): PropertyPage[];
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
export const PropertyPageProvider: PropertyPageProviderNamespace;
|
|
533
|
+
|
|
534
|
+
module WidgetViewProvider {
|
|
535
|
+
// Constructor properties interface
|
|
536
|
+
|
|
537
|
+
interface ConstructorProps extends GObject.Object.ConstructorProps {}
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
export interface WidgetViewProviderNamespace {
|
|
541
|
+
$gtype: GObject.GType<WidgetViewProvider>;
|
|
542
|
+
prototype: WidgetViewProvider;
|
|
543
|
+
}
|
|
544
|
+
interface WidgetViewProvider extends GObject.Object {
|
|
545
|
+
// Own methods of Caja.WidgetViewProvider
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Add a file of this location into the widget view.
|
|
549
|
+
* @param file add a #CajaFile into the widget view.
|
|
550
|
+
* @param directory the directory of the file.
|
|
551
|
+
*/
|
|
552
|
+
add_file(file: File, directory: File): void;
|
|
553
|
+
/**
|
|
554
|
+
* Clear the content of this widget view.
|
|
555
|
+
*/
|
|
556
|
+
clear(): void;
|
|
557
|
+
/**
|
|
558
|
+
* Return the first visible file. When use start visit the location, the caja's status is waiting, until
|
|
559
|
+
* get the first visible file.
|
|
560
|
+
* @returns the first visible file.
|
|
561
|
+
*/
|
|
562
|
+
get_first_visible_file(): string;
|
|
563
|
+
get_item_count(): number;
|
|
564
|
+
/**
|
|
565
|
+
* Set the location of this #CajaWidgetViewProvider.
|
|
566
|
+
* @param location
|
|
567
|
+
*/
|
|
568
|
+
set_location(location: string): void;
|
|
569
|
+
/**
|
|
570
|
+
* Set parent #GtkWindow of this #CajaWidgetViewProvider.
|
|
571
|
+
* @param window parent #GtkWindow
|
|
572
|
+
*/
|
|
573
|
+
set_window(window: Gtk.Window): void;
|
|
574
|
+
/**
|
|
575
|
+
* Whether this widget view works for the uri.
|
|
576
|
+
* @param uri the location to visit.
|
|
577
|
+
* @param file_type The #GFileType for the uri
|
|
578
|
+
* @param mime_type The mimetype for the uri
|
|
579
|
+
* @returns True to use custom widget view, False to ignore, and caja use normal view.
|
|
580
|
+
*/
|
|
581
|
+
supports_uri(uri: string, file_type: Gio.FileType, mime_type: string): boolean;
|
|
582
|
+
|
|
583
|
+
// Own virtual methods of Caja.WidgetViewProvider
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* Add a file of this location into the widget view.
|
|
587
|
+
* @param file add a #CajaFile into the widget view.
|
|
588
|
+
* @param directory the directory of the file.
|
|
589
|
+
*/
|
|
590
|
+
vfunc_add_file(file: File, directory: File): void;
|
|
591
|
+
/**
|
|
592
|
+
* Clear the content of this widget view.
|
|
593
|
+
*/
|
|
594
|
+
vfunc_clear(): void;
|
|
595
|
+
/**
|
|
596
|
+
* Return the first visible file. When use start visit the location, the caja's status is waiting, until
|
|
597
|
+
* get the first visible file.
|
|
598
|
+
*/
|
|
599
|
+
vfunc_get_first_visible_file(): string;
|
|
600
|
+
vfunc_get_item_count(): number;
|
|
601
|
+
/**
|
|
602
|
+
* Set the location of this #CajaWidgetViewProvider.
|
|
603
|
+
* @param location
|
|
604
|
+
*/
|
|
605
|
+
vfunc_set_location(location: string): void;
|
|
606
|
+
/**
|
|
607
|
+
* Set parent #GtkWindow of this #CajaWidgetViewProvider.
|
|
608
|
+
* @param window parent #GtkWindow
|
|
609
|
+
*/
|
|
610
|
+
vfunc_set_window(window: Gtk.Window): void;
|
|
611
|
+
/**
|
|
612
|
+
* Whether this widget view works for the uri.
|
|
613
|
+
* @param uri the location to visit.
|
|
614
|
+
* @param file_type The #GFileType for the uri
|
|
615
|
+
* @param mime_type The mimetype for the uri
|
|
616
|
+
*/
|
|
617
|
+
vfunc_supports_uri(uri: string, file_type: Gio.FileType, mime_type: string): boolean;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
export const WidgetViewProvider: WidgetViewProviderNamespace;
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* Name of the imported GIR library
|
|
624
|
+
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
|
625
|
+
*/
|
|
626
|
+
const __name__: string;
|
|
627
|
+
/**
|
|
628
|
+
* Version of the imported GIR library
|
|
629
|
+
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
|
630
|
+
*/
|
|
631
|
+
const __version__: string;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
export default Caja;
|
|
635
|
+
// END
|
package/caja-2.0.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@girs/caja-2.0",
|
|
3
|
+
"version": "2.0.0-4.0.0-beta.3",
|
|
4
|
+
"description": "GJS TypeScript type definitions for Caja-2.0, generated from library version 2.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"module": "caja-2.0.js",
|
|
7
|
+
"main": "caja-2.0.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
"./ambient": {
|
|
10
|
+
"types": "./caja-2.0-ambient.d.ts",
|
|
11
|
+
"import": "./caja-2.0-ambient.js",
|
|
12
|
+
"default": "./caja-2.0-ambient.js"
|
|
13
|
+
},
|
|
14
|
+
"./import": {
|
|
15
|
+
"types": "./caja-2.0-import.d.ts",
|
|
16
|
+
"import": "./caja-2.0-import.js",
|
|
17
|
+
"default": "./caja-2.0-import.js"
|
|
18
|
+
},
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./caja-2.0.d.ts",
|
|
21
|
+
"import": "./caja-2.0.js",
|
|
22
|
+
"default": "./caja-2.0.js"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"test": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit caja-2.0.d.ts"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@girs/atk-1.0": "^2.52.0-4.0.0-beta.3",
|
|
30
|
+
"@girs/cairo-1.0": "^1.0.0-4.0.0-beta.3",
|
|
31
|
+
"@girs/freetype2-2.0": "^2.0.0-4.0.0-beta.3",
|
|
32
|
+
"@girs/gdk-3.0": "^3.24.41-4.0.0-beta.3",
|
|
33
|
+
"@girs/gdkpixbuf-2.0": "^2.0.0-4.0.0-beta.3",
|
|
34
|
+
"@girs/gio-2.0": "^2.80.0-4.0.0-beta.3",
|
|
35
|
+
"@girs/gjs": "^4.0.0-beta.3",
|
|
36
|
+
"@girs/glib-2.0": "^2.80.0-4.0.0-beta.3",
|
|
37
|
+
"@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.3",
|
|
38
|
+
"@girs/gobject-2.0": "^2.80.0-4.0.0-beta.3",
|
|
39
|
+
"@girs/gtk-3.0": "^3.24.41-4.0.0-beta.3",
|
|
40
|
+
"@girs/harfbuzz-0.0": "^8.3.1-4.0.0-beta.3",
|
|
41
|
+
"@girs/pango-1.0": "^1.51.0-4.0.0-beta.3",
|
|
42
|
+
"@girs/xlib-2.0": "^2.0.0-4.0.0-beta.3"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"typescript": "*"
|
|
46
|
+
},
|
|
47
|
+
"keywords": [
|
|
48
|
+
"Gir",
|
|
49
|
+
"TypeScript",
|
|
50
|
+
"types",
|
|
51
|
+
"GObject-Introspection",
|
|
52
|
+
"GJS",
|
|
53
|
+
"Caja-2.0"
|
|
54
|
+
],
|
|
55
|
+
"author": "ts-for-gir",
|
|
56
|
+
"license": "MIT",
|
|
57
|
+
"repository": {
|
|
58
|
+
"type": "git",
|
|
59
|
+
"url": "git+https://github.com/gjsify/ts-for-gir.git"
|
|
60
|
+
},
|
|
61
|
+
"bugs": {
|
|
62
|
+
"url": "https://github.com/gjsify/ts-for-gir/issues"
|
|
63
|
+
},
|
|
64
|
+
"homepage": "https://github.com/gjsify/types/tree/main/caja-2.0#readme"
|
|
65
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
// General settings for code interpretation
|
|
4
|
+
"target": "ESNext",
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"lib": ["ESNext"],
|
|
7
|
+
"types": [],
|
|
8
|
+
"experimentalDecorators": true,
|
|
9
|
+
"moduleResolution": "node",
|
|
10
|
+
"noEmit": true,
|
|
11
|
+
"noEmitOnError": false,
|
|
12
|
+
"baseUrl": "./",
|
|
13
|
+
"rootDir": ".",
|
|
14
|
+
// General settings for code generation
|
|
15
|
+
"removeComments": false,
|
|
16
|
+
"inlineSourceMap": false,
|
|
17
|
+
"inlineSources": false,
|
|
18
|
+
"newLine": "LF"
|
|
19
|
+
},
|
|
20
|
+
"include": ["./caja-2.0.d.ts"]
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|