@girs/gdkpixbuf-2.0 2.0.0-3.2.6 → 2.0.0-3.2.8

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
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/gdkpixbuf-2.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for GdkPixbuf-2.0, generated from library version 2.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.6.
8
+ GJS TypeScript type definitions for GdkPixbuf-2.0, generated from library version 2.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.8.
9
9
 
10
10
  GdkPixbuf is a library for image loading and manipulation. The GdkPixbuf documentation contains both the programmer's guide and the API reference.
11
11
 
@@ -0,0 +1,2 @@
1
+ export {}
2
+
@@ -0,0 +1,3 @@
1
+ const gi = globalThis.imports?.gi || {};
2
+ export default gi;
3
+
@@ -204,7 +204,7 @@ export const PIXBUF_MINOR: number
204
204
  * This is the version being compiled against; contrast with
205
205
  * `gdk_pixbuf_version`.
206
206
  */
207
- export const PIXBUF_VERSION: string | null
207
+ export const PIXBUF_VERSION: string
208
208
  export function pixbuf_error_quark(): GLib.Quark
209
209
  /**
210
210
  * A function of this type is responsible for freeing the pixel array
@@ -238,47 +238,6 @@ export interface PixbufModuleFillInfoFunc {
238
238
  export interface PixbufModuleFillVtableFunc {
239
239
  (module: PixbufModule): void
240
240
  }
241
- /**
242
- * Incrementally loads a buffer into the image data.
243
- * @callback
244
- * @param context the state object created by [callback`GdkPixbuf`.PixbufModuleBeginLoadFunc]
245
- * @param buf the data to load
246
- * @returns `TRUE` if the incremental load was successful
247
- */
248
- export interface PixbufModuleIncrementLoadFunc {
249
- (context: any | null, buf: Uint8Array): boolean
250
- }
251
- /**
252
- * Loads a file from a standard C file stream into a new `GdkPixbufAnimation`.
253
- *
254
- * In case of error, this function should return `NULL` and set the `error` argument.
255
- * @callback
256
- * @param f the file stream from which the image should be loaded
257
- * @returns a newly created `GdkPixbufAnimation` for the contents of the file
258
- */
259
- export interface PixbufModuleLoadAnimationFunc {
260
- (f: any | null): PixbufAnimation
261
- }
262
- /**
263
- * Loads a file from a standard C file stream into a new `GdkPixbuf`.
264
- *
265
- * In case of error, this function should return `NULL` and set the `error` argument.
266
- * @callback
267
- * @param f the file stream from which the image should be loaded
268
- * @returns a newly created `GdkPixbuf` for the contents of the file
269
- */
270
- export interface PixbufModuleLoadFunc {
271
- (f: any | null): Pixbuf
272
- }
273
- /**
274
- * Loads XPM data into a new `GdkPixbuf`.
275
- * @callback
276
- * @param data the XPM data
277
- * @returns a newly created `GdkPixbuf` for the XPM data
278
- */
279
- export interface PixbufModuleLoadXpmDataFunc {
280
- (data: string[]): Pixbuf
281
- }
282
241
  /**
283
242
  * Defines the type of the function that gets called once the initial
284
243
  * setup of `pixbuf` is done.
@@ -293,31 +252,6 @@ export interface PixbufModuleLoadXpmDataFunc {
293
252
  export interface PixbufModulePreparedFunc {
294
253
  (pixbuf: Pixbuf, anim: PixbufAnimation): void
295
254
  }
296
- /**
297
- * Saves a `GdkPixbuf` into a standard C file stream.
298
- *
299
- * The optional `param_keys` and `param_values` arrays contain the keys and
300
- * values (in the same order) for attributes to be saved alongside the image
301
- * data.
302
- * @callback
303
- * @param f the file stream into which the image should be saved
304
- * @param pixbuf the image to save
305
- * @param param_keys parameter keys to save
306
- * @param param_values parameter values to save
307
- * @returns `TRUE` on success; in case of failure, `FALSE` is returned and the `error` is set
308
- */
309
- export interface PixbufModuleSaveFunc {
310
- (f: any | null, pixbuf: Pixbuf, param_keys: string[] | null, param_values: string[] | null): boolean
311
- }
312
- /**
313
- * Checks whether the given `option_key` is supported when saving.
314
- * @callback
315
- * @param option_key the option key to check
316
- * @returns `TRUE` if the option is supported
317
- */
318
- export interface PixbufModuleSaveOptionSupportedFunc {
319
- (option_key: string | null): boolean
320
- }
321
255
  /**
322
256
  * Defines the type of the function that gets called once the size
323
257
  * of the loaded image is known.
@@ -339,17 +273,6 @@ export interface PixbufModuleSaveOptionSupportedFunc {
339
273
  export interface PixbufModuleSizeFunc {
340
274
  (width: number, height: number): void
341
275
  }
342
- /**
343
- * Finalizes the image loading state.
344
- *
345
- * This function is called on success and error states.
346
- * @callback
347
- * @param context the state object created by [callback`GdkPixbuf`.PixbufModuleBeginLoadFunc]
348
- * @returns `TRUE` if the loading operation was successful
349
- */
350
- export interface PixbufModuleStopLoadFunc {
351
- (context: any | null): boolean
352
- }
353
276
  /**
354
277
  * Defines the type of the function that gets called every time a region
355
278
  * of `pixbuf` is updated.
@@ -396,7 +319,7 @@ export module Pixbuf {
396
319
  *
397
320
  * Currently only 8 bit per sample are supported.
398
321
  */
399
- bits_per_sample?: number | null
322
+ bitsPerSample?: number | null
400
323
  /**
401
324
  * The color space of the pixbuf.
402
325
  *
@@ -406,7 +329,7 @@ export module Pixbuf {
406
329
  /**
407
330
  * Whether the pixbuf has an alpha channel.
408
331
  */
409
- has_alpha?: boolean | null
332
+ hasAlpha?: boolean | null
410
333
  /**
411
334
  * The number of rows of the pixbuf.
412
335
  */
@@ -416,8 +339,8 @@ export module Pixbuf {
416
339
  *
417
340
  * Currently, only 3 or 4 samples per pixel are supported.
418
341
  */
419
- n_channels?: number | null
420
- pixel_bytes?: GLib.Bytes | null
342
+ nChannels?: number | null
343
+ pixelBytes?: GLib.Bytes | null
421
344
  /**
422
345
  * A pointer to the pixel data of the pixbuf.
423
346
  */
@@ -434,23 +357,6 @@ export module Pixbuf {
434
357
  * The number of columns of the pixbuf.
435
358
  */
436
359
  width?: number | null
437
- /**
438
- * The number of bits per sample.
439
- *
440
- * Currently only 8 bit per sample are supported.
441
- */
442
- bitsPerSample?: number | null
443
- /**
444
- * Whether the pixbuf has an alpha channel.
445
- */
446
- hasAlpha?: boolean | null
447
- /**
448
- * The number of samples per pixel.
449
- *
450
- * Currently, only 3 or 4 samples per pixel are supported.
451
- */
452
- nChannels?: number | null
453
- pixelBytes?: GLib.Bytes | null
454
360
  }
455
361
 
456
362
  }
@@ -459,12 +365,6 @@ export interface Pixbuf extends Gio.Icon, Gio.LoadableIcon {
459
365
 
460
366
  // Own properties of GdkPixbuf-2.0.GdkPixbuf.Pixbuf
461
367
 
462
- /**
463
- * The number of bits per sample.
464
- *
465
- * Currently only 8 bit per sample are supported.
466
- */
467
- readonly bits_per_sample: number
468
368
  /**
469
369
  * The number of bits per sample.
470
370
  *
@@ -477,10 +377,6 @@ export interface Pixbuf extends Gio.Icon, Gio.LoadableIcon {
477
377
  * Currently, only `GDK_COLORSPACE_RGB` is supported.
478
378
  */
479
379
  readonly colorspace: Colorspace
480
- /**
481
- * Whether the pixbuf has an alpha channel.
482
- */
483
- readonly has_alpha: boolean
484
380
  /**
485
381
  * Whether the pixbuf has an alpha channel.
486
382
  */
@@ -489,19 +385,12 @@ export interface Pixbuf extends Gio.Icon, Gio.LoadableIcon {
489
385
  * The number of rows of the pixbuf.
490
386
  */
491
387
  readonly height: number
492
- /**
493
- * The number of samples per pixel.
494
- *
495
- * Currently, only 3 or 4 samples per pixel are supported.
496
- */
497
- readonly n_channels: number
498
388
  /**
499
389
  * The number of samples per pixel.
500
390
  *
501
391
  * Currently, only 3 or 4 samples per pixel are supported.
502
392
  */
503
393
  readonly nChannels: number
504
- readonly pixel_bytes: GLib.Bytes
505
394
  readonly pixelBytes: GLib.Bytes
506
395
  /**
507
396
  * A pointer to the pixel data of the pixbuf.
@@ -731,7 +620,7 @@ export interface Pixbuf extends Gio.Icon, Gio.LoadableIcon {
731
620
  * @param key a nul-terminated string.
732
621
  * @returns the value associated with `key`
733
622
  */
734
- get_option(key: string | null): string | null
623
+ get_option(key: string): string | null
735
624
  /**
736
625
  * Returns a `GHashTable` with a list of all the options that may have been
737
626
  * attached to the `pixbuf` when it was loaded, or that may have been
@@ -800,7 +689,7 @@ export interface Pixbuf extends Gio.Icon, Gio.LoadableIcon {
800
689
  * @param key a nul-terminated string representing the key to remove.
801
690
  * @returns `TRUE` if an option was removed, `FALSE` if not.
802
691
  */
803
- remove_option(key: string | null): boolean
692
+ remove_option(key: string): boolean
804
693
  /**
805
694
  * Rotates a pixbuf by a multiple of 90 degrees, and returns the
806
695
  * result in a new pixbuf.
@@ -842,7 +731,7 @@ export interface Pixbuf extends Gio.Icon, Gio.LoadableIcon {
842
731
  * @param option_values values for named options
843
732
  * @returns whether an error was set
844
733
  */
845
- save_to_bufferv(type: string | null, option_keys: string[] | null, option_values: string[] | null): [ /* returnType */ boolean, /* buffer */ Uint8Array ]
734
+ save_to_bufferv(type: string, option_keys: string[] | null, option_values: string[] | null): [ /* returnType */ boolean, /* buffer */ Uint8Array ]
846
735
  /**
847
736
  * Vector version of `gdk_pixbuf_save_to_callback()`.
848
737
  *
@@ -858,7 +747,7 @@ export interface Pixbuf extends Gio.Icon, Gio.LoadableIcon {
858
747
  * @param option_values values for named options
859
748
  * @returns whether an error was set
860
749
  */
861
- save_to_callbackv(save_func: PixbufSaveFunc, type: string | null, option_keys: string[] | null, option_values: string[] | null): boolean
750
+ save_to_callbackv(save_func: PixbufSaveFunc, type: string, option_keys: string[] | null, option_values: string[] | null): boolean
862
751
  /**
863
752
  * Saves `pixbuf` to an output stream.
864
753
  *
@@ -873,7 +762,7 @@ export interface Pixbuf extends Gio.Icon, Gio.LoadableIcon {
873
762
  * @param cancellable optional `GCancellable` object, `NULL` to ignore
874
763
  * @returns `TRUE` if the pixbuf was saved successfully, `FALSE` if an error was set.
875
764
  */
876
- save_to_streamv(stream: Gio.OutputStream, type: string | null, option_keys: string[] | null, option_values: string[] | null, cancellable: Gio.Cancellable | null): boolean
765
+ save_to_streamv(stream: Gio.OutputStream, type: string, option_keys: string[] | null, option_values: string[] | null, cancellable: Gio.Cancellable | null): boolean
877
766
  /**
878
767
  * Saves `pixbuf` to an output stream asynchronously.
879
768
  *
@@ -891,7 +780,7 @@ export interface Pixbuf extends Gio.Icon, Gio.LoadableIcon {
891
780
  * @param cancellable optional `GCancellable` object, `NULL` to ignore
892
781
  * @param callback a `GAsyncReadyCallback` to call when the pixbuf is saved
893
782
  */
894
- save_to_streamv_async(stream: Gio.OutputStream, type: string | null, option_keys: string[] | null, option_values: string[] | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
783
+ save_to_streamv_async(stream: Gio.OutputStream, type: string, option_keys: string[] | null, option_values: string[] | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
895
784
  /**
896
785
  * Vector version of `gdk_pixbuf_save()`.
897
786
  *
@@ -906,7 +795,7 @@ export interface Pixbuf extends Gio.Icon, Gio.LoadableIcon {
906
795
  * @param option_values values for named options
907
796
  * @returns whether an error was set
908
797
  */
909
- savev(filename: string, type: string | null, option_keys: string[] | null, option_values: string[] | null): boolean
798
+ savev(filename: string, type: string, option_keys: string[] | null, option_values: string[] | null): boolean
910
799
  /**
911
800
  * Creates a transformation of the source image `src` by scaling by
912
801
  * `scale_x` and `scale_y` then translating by `offset_x` and `offset_y,`
@@ -967,7 +856,7 @@ export interface Pixbuf extends Gio.Icon, Gio.LoadableIcon {
967
856
  * @param value a nul-terminated string.
968
857
  * @returns `TRUE` on success
969
858
  */
970
- set_option(key: string | null, value: string | null): boolean
859
+ set_option(key: string, value: string): boolean
971
860
 
972
861
  // Class property signals of GdkPixbuf-2.0.GdkPixbuf.Pixbuf
973
862
 
@@ -1350,7 +1239,7 @@ export class Pixbuf extends GObject.Object {
1350
1239
  * @param resource_path the path of the resource file
1351
1240
  * @returns A newly-created pixbuf
1352
1241
  */
1353
- static new_from_resource(resource_path: string | null): Pixbuf
1242
+ static new_from_resource(resource_path: string): Pixbuf
1354
1243
  /**
1355
1244
  * Creates a new pixbuf by loading an image from an resource.
1356
1245
  *
@@ -1372,7 +1261,7 @@ export class Pixbuf extends GObject.Object {
1372
1261
  * @param preserve_aspect_ratio `TRUE` to preserve the image's aspect ratio
1373
1262
  * @returns A newly-created pixbuf
1374
1263
  */
1375
- static new_from_resource_at_scale(resource_path: string | null, width: number, height: number, preserve_aspect_ratio: boolean): Pixbuf
1264
+ static new_from_resource_at_scale(resource_path: string, width: number, height: number, preserve_aspect_ratio: boolean): Pixbuf
1376
1265
  /**
1377
1266
  * Creates a new pixbuf by loading an image from an input stream.
1378
1267
  *
@@ -1536,7 +1425,7 @@ export class Pixbuf extends GObject.Object {
1536
1425
  * provided modules.
1537
1426
  * @param path Path to directory where the `loaders.cache` is installed
1538
1427
  */
1539
- static init_modules(path: string | null): boolean
1428
+ static init_modules(path: string): boolean
1540
1429
  /**
1541
1430
  * Finishes an asynchronous pixbuf save operation started with
1542
1431
  * gdk_pixbuf_save_to_stream_async().
@@ -1766,7 +1655,7 @@ export class PixbufAnimation extends GObject.Object {
1766
1655
  * @param resource_path the path of the resource file
1767
1656
  * @returns A newly-created animation
1768
1657
  */
1769
- static new_from_resource(resource_path: string | null): PixbufAnimation
1658
+ static new_from_resource(resource_path: string): PixbufAnimation
1770
1659
  /**
1771
1660
  * Creates a new animation by loading it from an input stream.
1772
1661
  *
@@ -2244,7 +2133,7 @@ export class PixbufLoader extends GObject.Object {
2244
2133
  * @param mime_type the mime type to be loaded
2245
2134
  * @returns A newly-created pixbuf loader.
2246
2135
  */
2247
- static new_with_mime_type(mime_type: string | null): PixbufLoader
2136
+ static new_with_mime_type(mime_type: string): PixbufLoader
2248
2137
  /**
2249
2138
  * Creates a new pixbuf loader object that always attempts to parse
2250
2139
  * image data as if it were an image of type `image_type,` instead of
@@ -2264,7 +2153,7 @@ export class PixbufLoader extends GObject.Object {
2264
2153
  * @param image_type name of the image format to be loaded with the image
2265
2154
  * @returns A newly-created pixbuf loader.
2266
2155
  */
2267
- static new_with_type(image_type: string | null): PixbufLoader
2156
+ static new_with_type(image_type: string): PixbufLoader
2268
2157
  _init(config?: PixbufLoader.ConstructorProperties): void
2269
2158
  }
2270
2159
 
@@ -2589,7 +2478,7 @@ export interface PixbufFormat {
2589
2478
  * @param option_key the name of an option
2590
2479
  * @returns `TRUE` if the specified option is supported
2591
2480
  */
2592
- is_save_option_supported(option_key: string | null): boolean
2481
+ is_save_option_supported(option_key: string): boolean
2593
2482
  /**
2594
2483
  * Returns whether this image format is scalable.
2595
2484
  *
@@ -2675,41 +2564,10 @@ export interface PixbufModule {
2675
2564
  * @field
2676
2565
  */
2677
2566
  info: PixbufFormat
2678
- /**
2679
- * loads an image from a file.
2680
- * @field
2681
- */
2682
- load: PixbufModuleLoadFunc
2683
- /**
2684
- * loads an image from data in memory.
2685
- * @field
2686
- */
2687
- load_xpm_data: PixbufModuleLoadXpmDataFunc
2688
- /**
2689
- * stops an incremental load.
2690
- * @field
2691
- */
2692
- stop_load: PixbufModuleStopLoadFunc
2693
- /**
2694
- * continues an incremental load.
2695
- * @field
2696
- */
2697
- load_increment: PixbufModuleIncrementLoadFunc
2698
- /**
2699
- * loads an animation from a file.
2700
- * @field
2701
- */
2702
- load_animation: PixbufModuleLoadAnimationFunc
2703
- /**
2704
- * saves a `GdkPixbuf` to a file.
2705
- * @field
2706
- */
2707
- save: PixbufModuleSaveFunc
2708
- /**
2709
- * returns whether a save option key is supported by the module
2710
- * @field
2711
- */
2712
- is_save_option_supported: PixbufModuleSaveOptionSupportedFunc
2567
+ stop_load: (context: any) => boolean
2568
+ load_increment: (context: any, buf: number, size: number) => boolean
2569
+ save: (f: any, pixbuf: Pixbuf, param_keys: string | null, param_values: string | null) => boolean
2570
+ is_save_option_supported: (option_key: string) => boolean
2713
2571
  }
2714
2572
 
2715
2573
  /**
@@ -206,7 +206,7 @@ const PIXBUF_MINOR: number
206
206
  * This is the version being compiled against; contrast with
207
207
  * `gdk_pixbuf_version`.
208
208
  */
209
- const PIXBUF_VERSION: string | null
209
+ const PIXBUF_VERSION: string
210
210
  function pixbuf_error_quark(): GLib.Quark
211
211
  /**
212
212
  * A function of this type is responsible for freeing the pixel array
@@ -240,47 +240,6 @@ interface PixbufModuleFillInfoFunc {
240
240
  interface PixbufModuleFillVtableFunc {
241
241
  (module: PixbufModule): void
242
242
  }
243
- /**
244
- * Incrementally loads a buffer into the image data.
245
- * @callback
246
- * @param context the state object created by [callback`GdkPixbuf`.PixbufModuleBeginLoadFunc]
247
- * @param buf the data to load
248
- * @returns `TRUE` if the incremental load was successful
249
- */
250
- interface PixbufModuleIncrementLoadFunc {
251
- (context: any | null, buf: Uint8Array): boolean
252
- }
253
- /**
254
- * Loads a file from a standard C file stream into a new `GdkPixbufAnimation`.
255
- *
256
- * In case of error, this function should return `NULL` and set the `error` argument.
257
- * @callback
258
- * @param f the file stream from which the image should be loaded
259
- * @returns a newly created `GdkPixbufAnimation` for the contents of the file
260
- */
261
- interface PixbufModuleLoadAnimationFunc {
262
- (f: any | null): PixbufAnimation
263
- }
264
- /**
265
- * Loads a file from a standard C file stream into a new `GdkPixbuf`.
266
- *
267
- * In case of error, this function should return `NULL` and set the `error` argument.
268
- * @callback
269
- * @param f the file stream from which the image should be loaded
270
- * @returns a newly created `GdkPixbuf` for the contents of the file
271
- */
272
- interface PixbufModuleLoadFunc {
273
- (f: any | null): Pixbuf
274
- }
275
- /**
276
- * Loads XPM data into a new `GdkPixbuf`.
277
- * @callback
278
- * @param data the XPM data
279
- * @returns a newly created `GdkPixbuf` for the XPM data
280
- */
281
- interface PixbufModuleLoadXpmDataFunc {
282
- (data: string[]): Pixbuf
283
- }
284
243
  /**
285
244
  * Defines the type of the function that gets called once the initial
286
245
  * setup of `pixbuf` is done.
@@ -295,31 +254,6 @@ interface PixbufModuleLoadXpmDataFunc {
295
254
  interface PixbufModulePreparedFunc {
296
255
  (pixbuf: Pixbuf, anim: PixbufAnimation): void
297
256
  }
298
- /**
299
- * Saves a `GdkPixbuf` into a standard C file stream.
300
- *
301
- * The optional `param_keys` and `param_values` arrays contain the keys and
302
- * values (in the same order) for attributes to be saved alongside the image
303
- * data.
304
- * @callback
305
- * @param f the file stream into which the image should be saved
306
- * @param pixbuf the image to save
307
- * @param param_keys parameter keys to save
308
- * @param param_values parameter values to save
309
- * @returns `TRUE` on success; in case of failure, `FALSE` is returned and the `error` is set
310
- */
311
- interface PixbufModuleSaveFunc {
312
- (f: any | null, pixbuf: Pixbuf, param_keys: string[] | null, param_values: string[] | null): boolean
313
- }
314
- /**
315
- * Checks whether the given `option_key` is supported when saving.
316
- * @callback
317
- * @param option_key the option key to check
318
- * @returns `TRUE` if the option is supported
319
- */
320
- interface PixbufModuleSaveOptionSupportedFunc {
321
- (option_key: string | null): boolean
322
- }
323
257
  /**
324
258
  * Defines the type of the function that gets called once the size
325
259
  * of the loaded image is known.
@@ -341,17 +275,6 @@ interface PixbufModuleSaveOptionSupportedFunc {
341
275
  interface PixbufModuleSizeFunc {
342
276
  (width: number, height: number): void
343
277
  }
344
- /**
345
- * Finalizes the image loading state.
346
- *
347
- * This function is called on success and error states.
348
- * @callback
349
- * @param context the state object created by [callback`GdkPixbuf`.PixbufModuleBeginLoadFunc]
350
- * @returns `TRUE` if the loading operation was successful
351
- */
352
- interface PixbufModuleStopLoadFunc {
353
- (context: any | null): boolean
354
- }
355
278
  /**
356
279
  * Defines the type of the function that gets called every time a region
357
280
  * of `pixbuf` is updated.
@@ -398,7 +321,7 @@ module Pixbuf {
398
321
  *
399
322
  * Currently only 8 bit per sample are supported.
400
323
  */
401
- bits_per_sample?: number | null
324
+ bitsPerSample?: number | null
402
325
  /**
403
326
  * The color space of the pixbuf.
404
327
  *
@@ -408,7 +331,7 @@ module Pixbuf {
408
331
  /**
409
332
  * Whether the pixbuf has an alpha channel.
410
333
  */
411
- has_alpha?: boolean | null
334
+ hasAlpha?: boolean | null
412
335
  /**
413
336
  * The number of rows of the pixbuf.
414
337
  */
@@ -418,8 +341,8 @@ module Pixbuf {
418
341
  *
419
342
  * Currently, only 3 or 4 samples per pixel are supported.
420
343
  */
421
- n_channels?: number | null
422
- pixel_bytes?: GLib.Bytes | null
344
+ nChannels?: number | null
345
+ pixelBytes?: GLib.Bytes | null
423
346
  /**
424
347
  * A pointer to the pixel data of the pixbuf.
425
348
  */
@@ -436,23 +359,6 @@ module Pixbuf {
436
359
  * The number of columns of the pixbuf.
437
360
  */
438
361
  width?: number | null
439
- /**
440
- * The number of bits per sample.
441
- *
442
- * Currently only 8 bit per sample are supported.
443
- */
444
- bitsPerSample?: number | null
445
- /**
446
- * Whether the pixbuf has an alpha channel.
447
- */
448
- hasAlpha?: boolean | null
449
- /**
450
- * The number of samples per pixel.
451
- *
452
- * Currently, only 3 or 4 samples per pixel are supported.
453
- */
454
- nChannels?: number | null
455
- pixelBytes?: GLib.Bytes | null
456
362
  }
457
363
 
458
364
  }
@@ -461,12 +367,6 @@ interface Pixbuf extends Gio.Icon, Gio.LoadableIcon {
461
367
 
462
368
  // Own properties of GdkPixbuf-2.0.GdkPixbuf.Pixbuf
463
369
 
464
- /**
465
- * The number of bits per sample.
466
- *
467
- * Currently only 8 bit per sample are supported.
468
- */
469
- readonly bits_per_sample: number
470
370
  /**
471
371
  * The number of bits per sample.
472
372
  *
@@ -479,10 +379,6 @@ interface Pixbuf extends Gio.Icon, Gio.LoadableIcon {
479
379
  * Currently, only `GDK_COLORSPACE_RGB` is supported.
480
380
  */
481
381
  readonly colorspace: Colorspace
482
- /**
483
- * Whether the pixbuf has an alpha channel.
484
- */
485
- readonly has_alpha: boolean
486
382
  /**
487
383
  * Whether the pixbuf has an alpha channel.
488
384
  */
@@ -491,19 +387,12 @@ interface Pixbuf extends Gio.Icon, Gio.LoadableIcon {
491
387
  * The number of rows of the pixbuf.
492
388
  */
493
389
  readonly height: number
494
- /**
495
- * The number of samples per pixel.
496
- *
497
- * Currently, only 3 or 4 samples per pixel are supported.
498
- */
499
- readonly n_channels: number
500
390
  /**
501
391
  * The number of samples per pixel.
502
392
  *
503
393
  * Currently, only 3 or 4 samples per pixel are supported.
504
394
  */
505
395
  readonly nChannels: number
506
- readonly pixel_bytes: GLib.Bytes
507
396
  readonly pixelBytes: GLib.Bytes
508
397
  /**
509
398
  * A pointer to the pixel data of the pixbuf.
@@ -733,7 +622,7 @@ interface Pixbuf extends Gio.Icon, Gio.LoadableIcon {
733
622
  * @param key a nul-terminated string.
734
623
  * @returns the value associated with `key`
735
624
  */
736
- get_option(key: string | null): string | null
625
+ get_option(key: string): string | null
737
626
  /**
738
627
  * Returns a `GHashTable` with a list of all the options that may have been
739
628
  * attached to the `pixbuf` when it was loaded, or that may have been
@@ -802,7 +691,7 @@ interface Pixbuf extends Gio.Icon, Gio.LoadableIcon {
802
691
  * @param key a nul-terminated string representing the key to remove.
803
692
  * @returns `TRUE` if an option was removed, `FALSE` if not.
804
693
  */
805
- remove_option(key: string | null): boolean
694
+ remove_option(key: string): boolean
806
695
  /**
807
696
  * Rotates a pixbuf by a multiple of 90 degrees, and returns the
808
697
  * result in a new pixbuf.
@@ -844,7 +733,7 @@ interface Pixbuf extends Gio.Icon, Gio.LoadableIcon {
844
733
  * @param option_values values for named options
845
734
  * @returns whether an error was set
846
735
  */
847
- save_to_bufferv(type: string | null, option_keys: string[] | null, option_values: string[] | null): [ /* returnType */ boolean, /* buffer */ Uint8Array ]
736
+ save_to_bufferv(type: string, option_keys: string[] | null, option_values: string[] | null): [ /* returnType */ boolean, /* buffer */ Uint8Array ]
848
737
  /**
849
738
  * Vector version of `gdk_pixbuf_save_to_callback()`.
850
739
  *
@@ -860,7 +749,7 @@ interface Pixbuf extends Gio.Icon, Gio.LoadableIcon {
860
749
  * @param option_values values for named options
861
750
  * @returns whether an error was set
862
751
  */
863
- save_to_callbackv(save_func: PixbufSaveFunc, type: string | null, option_keys: string[] | null, option_values: string[] | null): boolean
752
+ save_to_callbackv(save_func: PixbufSaveFunc, type: string, option_keys: string[] | null, option_values: string[] | null): boolean
864
753
  /**
865
754
  * Saves `pixbuf` to an output stream.
866
755
  *
@@ -875,7 +764,7 @@ interface Pixbuf extends Gio.Icon, Gio.LoadableIcon {
875
764
  * @param cancellable optional `GCancellable` object, `NULL` to ignore
876
765
  * @returns `TRUE` if the pixbuf was saved successfully, `FALSE` if an error was set.
877
766
  */
878
- save_to_streamv(stream: Gio.OutputStream, type: string | null, option_keys: string[] | null, option_values: string[] | null, cancellable: Gio.Cancellable | null): boolean
767
+ save_to_streamv(stream: Gio.OutputStream, type: string, option_keys: string[] | null, option_values: string[] | null, cancellable: Gio.Cancellable | null): boolean
879
768
  /**
880
769
  * Saves `pixbuf` to an output stream asynchronously.
881
770
  *
@@ -893,7 +782,7 @@ interface Pixbuf extends Gio.Icon, Gio.LoadableIcon {
893
782
  * @param cancellable optional `GCancellable` object, `NULL` to ignore
894
783
  * @param callback a `GAsyncReadyCallback` to call when the pixbuf is saved
895
784
  */
896
- save_to_streamv_async(stream: Gio.OutputStream, type: string | null, option_keys: string[] | null, option_values: string[] | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
785
+ save_to_streamv_async(stream: Gio.OutputStream, type: string, option_keys: string[] | null, option_values: string[] | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
897
786
  /**
898
787
  * Vector version of `gdk_pixbuf_save()`.
899
788
  *
@@ -908,7 +797,7 @@ interface Pixbuf extends Gio.Icon, Gio.LoadableIcon {
908
797
  * @param option_values values for named options
909
798
  * @returns whether an error was set
910
799
  */
911
- savev(filename: string, type: string | null, option_keys: string[] | null, option_values: string[] | null): boolean
800
+ savev(filename: string, type: string, option_keys: string[] | null, option_values: string[] | null): boolean
912
801
  /**
913
802
  * Creates a transformation of the source image `src` by scaling by
914
803
  * `scale_x` and `scale_y` then translating by `offset_x` and `offset_y,`
@@ -969,7 +858,7 @@ interface Pixbuf extends Gio.Icon, Gio.LoadableIcon {
969
858
  * @param value a nul-terminated string.
970
859
  * @returns `TRUE` on success
971
860
  */
972
- set_option(key: string | null, value: string | null): boolean
861
+ set_option(key: string, value: string): boolean
973
862
 
974
863
  // Class property signals of GdkPixbuf-2.0.GdkPixbuf.Pixbuf
975
864
 
@@ -1352,7 +1241,7 @@ class Pixbuf extends GObject.Object {
1352
1241
  * @param resource_path the path of the resource file
1353
1242
  * @returns A newly-created pixbuf
1354
1243
  */
1355
- static new_from_resource(resource_path: string | null): Pixbuf
1244
+ static new_from_resource(resource_path: string): Pixbuf
1356
1245
  /**
1357
1246
  * Creates a new pixbuf by loading an image from an resource.
1358
1247
  *
@@ -1374,7 +1263,7 @@ class Pixbuf extends GObject.Object {
1374
1263
  * @param preserve_aspect_ratio `TRUE` to preserve the image's aspect ratio
1375
1264
  * @returns A newly-created pixbuf
1376
1265
  */
1377
- static new_from_resource_at_scale(resource_path: string | null, width: number, height: number, preserve_aspect_ratio: boolean): Pixbuf
1266
+ static new_from_resource_at_scale(resource_path: string, width: number, height: number, preserve_aspect_ratio: boolean): Pixbuf
1378
1267
  /**
1379
1268
  * Creates a new pixbuf by loading an image from an input stream.
1380
1269
  *
@@ -1538,7 +1427,7 @@ class Pixbuf extends GObject.Object {
1538
1427
  * provided modules.
1539
1428
  * @param path Path to directory where the `loaders.cache` is installed
1540
1429
  */
1541
- static init_modules(path: string | null): boolean
1430
+ static init_modules(path: string): boolean
1542
1431
  /**
1543
1432
  * Finishes an asynchronous pixbuf save operation started with
1544
1433
  * gdk_pixbuf_save_to_stream_async().
@@ -1768,7 +1657,7 @@ class PixbufAnimation extends GObject.Object {
1768
1657
  * @param resource_path the path of the resource file
1769
1658
  * @returns A newly-created animation
1770
1659
  */
1771
- static new_from_resource(resource_path: string | null): PixbufAnimation
1660
+ static new_from_resource(resource_path: string): PixbufAnimation
1772
1661
  /**
1773
1662
  * Creates a new animation by loading it from an input stream.
1774
1663
  *
@@ -2246,7 +2135,7 @@ class PixbufLoader extends GObject.Object {
2246
2135
  * @param mime_type the mime type to be loaded
2247
2136
  * @returns A newly-created pixbuf loader.
2248
2137
  */
2249
- static new_with_mime_type(mime_type: string | null): PixbufLoader
2138
+ static new_with_mime_type(mime_type: string): PixbufLoader
2250
2139
  /**
2251
2140
  * Creates a new pixbuf loader object that always attempts to parse
2252
2141
  * image data as if it were an image of type `image_type,` instead of
@@ -2266,7 +2155,7 @@ class PixbufLoader extends GObject.Object {
2266
2155
  * @param image_type name of the image format to be loaded with the image
2267
2156
  * @returns A newly-created pixbuf loader.
2268
2157
  */
2269
- static new_with_type(image_type: string | null): PixbufLoader
2158
+ static new_with_type(image_type: string): PixbufLoader
2270
2159
  _init(config?: PixbufLoader.ConstructorProperties): void
2271
2160
  }
2272
2161
 
@@ -2591,7 +2480,7 @@ interface PixbufFormat {
2591
2480
  * @param option_key the name of an option
2592
2481
  * @returns `TRUE` if the specified option is supported
2593
2482
  */
2594
- is_save_option_supported(option_key: string | null): boolean
2483
+ is_save_option_supported(option_key: string): boolean
2595
2484
  /**
2596
2485
  * Returns whether this image format is scalable.
2597
2486
  *
@@ -2677,41 +2566,10 @@ interface PixbufModule {
2677
2566
  * @field
2678
2567
  */
2679
2568
  info: PixbufFormat
2680
- /**
2681
- * loads an image from a file.
2682
- * @field
2683
- */
2684
- load: PixbufModuleLoadFunc
2685
- /**
2686
- * loads an image from data in memory.
2687
- * @field
2688
- */
2689
- load_xpm_data: PixbufModuleLoadXpmDataFunc
2690
- /**
2691
- * stops an incremental load.
2692
- * @field
2693
- */
2694
- stop_load: PixbufModuleStopLoadFunc
2695
- /**
2696
- * continues an incremental load.
2697
- * @field
2698
- */
2699
- load_increment: PixbufModuleIncrementLoadFunc
2700
- /**
2701
- * loads an animation from a file.
2702
- * @field
2703
- */
2704
- load_animation: PixbufModuleLoadAnimationFunc
2705
- /**
2706
- * saves a `GdkPixbuf` to a file.
2707
- * @field
2708
- */
2709
- save: PixbufModuleSaveFunc
2710
- /**
2711
- * returns whether a save option key is supported by the module
2712
- * @field
2713
- */
2714
- is_save_option_supported: PixbufModuleSaveOptionSupportedFunc
2569
+ stop_load: (context: any) => boolean
2570
+ load_increment: (context: any, buf: number, size: number) => boolean
2571
+ save: (f: any, pixbuf: Pixbuf, param_keys: string | null, param_values: string | null) => boolean
2572
+ is_save_option_supported: (option_key: string) => boolean
2715
2573
  }
2716
2574
 
2717
2575
  /**
package/package.json CHANGED
@@ -1,13 +1,19 @@
1
1
  {
2
2
  "name": "@girs/gdkpixbuf-2.0",
3
- "version": "2.0.0-3.2.6",
3
+ "version": "2.0.0-3.2.8",
4
4
  "description": "GJS TypeScript type definitions for GdkPixbuf-2.0, generated from library version 2.0.0",
5
5
  "type": "module",
6
6
  "module": "gdkpixbuf-2.0.js",
7
7
  "main": "gdkpixbuf-2.0.js",
8
8
  "exports": {
9
- "./ambient": "./gdkpixbuf-2.0-ambient.d.ts",
10
- "./import": "./gdkpixbuf-2.0-import.d.ts",
9
+ "./ambient": {
10
+ "types": "./gdkpixbuf-2.0-ambient.d.ts",
11
+ "default": "./gdkpixbuf-2.0-ambient.js"
12
+ },
13
+ "./import": {
14
+ "types": "./gdkpixbuf-2.0-import.d.ts",
15
+ "default": "./gdkpixbuf-2.0-import.js"
16
+ },
11
17
  ".": {
12
18
  "import": {
13
19
  "types": "./gdkpixbuf-2.0.d.ts",
@@ -25,11 +31,11 @@
25
31
  "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit gdkpixbuf-2.0.d.cts"
26
32
  },
27
33
  "dependencies": {
28
- "@girs/gio-2.0": "^2.78.0-3.2.6",
29
- "@girs/gjs": "^3.2.6",
30
- "@girs/glib-2.0": "^2.78.0-3.2.6",
31
- "@girs/gmodule-2.0": "^2.0.0-3.2.6",
32
- "@girs/gobject-2.0": "^2.78.0-3.2.6"
34
+ "@girs/gio-2.0": "^2.77.0-3.2.8",
35
+ "@girs/gjs": "^3.2.8",
36
+ "@girs/glib-2.0": "^2.77.0-3.2.8",
37
+ "@girs/gmodule-2.0": "^2.0.0-3.2.8",
38
+ "@girs/gobject-2.0": "^2.77.0-3.2.8"
33
39
  },
34
40
  "devDependencies": {
35
41
  "typescript": "*"
@@ -46,7 +52,7 @@
46
52
  "license": "MIT",
47
53
  "repository": {
48
54
  "type": "git",
49
- "url": "git+https://github.com/gjsify/types.git"
55
+ "url": "git+https://github.com/gjsify/ts-for-gir.git"
50
56
  },
51
57
  "bugs": {
52
58
  "url": "https://github.com/gjsify/ts-for-gir/issues"