@girs/gdk-4.0 4.2.0 → 4.4.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 +8 -8
- package/gdk-4.0.d.ts +437 -61
- package/package.json +12 -12
package/gdk-4.0.d.ts
CHANGED
|
@@ -215,7 +215,7 @@ export namespace Gdk {
|
|
|
215
215
|
/**
|
|
216
216
|
* crossing because of a device switch (i.e.
|
|
217
217
|
* a mouse taking control of the pointer after a touch device), this event
|
|
218
|
-
* is synthetic as the pointer didn
|
|
218
|
+
* is synthetic as the pointer didn’t leave the surface.
|
|
219
219
|
*/
|
|
220
220
|
DEVICE_SWITCH,
|
|
221
221
|
}
|
|
@@ -506,6 +506,80 @@ export namespace Gdk {
|
|
|
506
506
|
}
|
|
507
507
|
|
|
508
508
|
|
|
509
|
+
/**
|
|
510
|
+
* @gir-type Enum
|
|
511
|
+
*/
|
|
512
|
+
export namespace FrameResult {
|
|
513
|
+
export const $gtype: GObject.GType<FrameResult>;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* An enumeration describing the process of rendering a frame.
|
|
518
|
+
* Rendering a frame starts with the frame clock cycle and then follows
|
|
519
|
+
* the rendered frame (if there was one) through the display server
|
|
520
|
+
* until it appears on screen.
|
|
521
|
+
*
|
|
522
|
+
* It is relevant in particular for {@link Gdk.FrameTimings} which
|
|
523
|
+
* may still be waiting for values to be filled in.
|
|
524
|
+
* @gir-type Enum
|
|
525
|
+
* @since 4.24
|
|
526
|
+
*/
|
|
527
|
+
enum FrameResult {
|
|
528
|
+
/**
|
|
529
|
+
* The frame is currently being prepared and rendered by GTK.
|
|
530
|
+
* This is the initial state.
|
|
531
|
+
*/
|
|
532
|
+
PREPARING,
|
|
533
|
+
/**
|
|
534
|
+
* GTK has determined that nothing needs to be rendered because
|
|
535
|
+
* there are no visual changes. No rendering will be submitted to
|
|
536
|
+
* the display server and because of that no information will
|
|
537
|
+
* be forthcoming from the display server.
|
|
538
|
+
*
|
|
539
|
+
* The frame is complete.
|
|
540
|
+
*/
|
|
541
|
+
SKIPPED,
|
|
542
|
+
/**
|
|
543
|
+
* GTK has determined that nothing needs to be rendered because
|
|
544
|
+
* there are no visual changes. This information has been submitted
|
|
545
|
+
* to the display server. The presentation time has been updated to
|
|
546
|
+
* reflect when this frame would have been displayed.
|
|
547
|
+
*
|
|
548
|
+
* The frame is complete.
|
|
549
|
+
*/
|
|
550
|
+
EMPTY,
|
|
551
|
+
/**
|
|
552
|
+
* A frame has been drawn and submitted to the display server, but
|
|
553
|
+
* the display server will not provide any further feedback about when
|
|
554
|
+
* or how the frame is going to be displayed.
|
|
555
|
+
*
|
|
556
|
+
* The frame is complete.
|
|
557
|
+
*/
|
|
558
|
+
SUBMITTED,
|
|
559
|
+
/**
|
|
560
|
+
* The frame has been drawn and submitted to the display server, but the
|
|
561
|
+
* display server has not yet replied what is going to happen with the
|
|
562
|
+
* rendered image.
|
|
563
|
+
*/
|
|
564
|
+
OUTSTANDING,
|
|
565
|
+
/**
|
|
566
|
+
* The frame has been drawn and submitted to the display server, but the
|
|
567
|
+
* display server has not displayed it. No presentation time will be available.
|
|
568
|
+
*
|
|
569
|
+
* The frame is complete.
|
|
570
|
+
*/
|
|
571
|
+
DISCARDED,
|
|
572
|
+
/**
|
|
573
|
+
* The frame has been drawn and submitted to the display server, and the
|
|
574
|
+
* display server has rendered it and displayed the result. The presentation
|
|
575
|
+
* time is accurately reflecting when that happened.
|
|
576
|
+
*
|
|
577
|
+
* The frame is complete.
|
|
578
|
+
*/
|
|
579
|
+
PRESENTED,
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
|
|
509
583
|
/**
|
|
510
584
|
* @gir-type Enum
|
|
511
585
|
*/
|
|
@@ -1425,6 +1499,14 @@ export namespace Gdk {
|
|
|
1425
1499
|
* The format is opaque.
|
|
1426
1500
|
*/
|
|
1427
1501
|
XRGB2101010,
|
|
1502
|
+
/**
|
|
1503
|
+
* 4 bytes per pixel
|
|
1504
|
+
*
|
|
1505
|
+
* Bits 31..30 contain the alpha channel, 29..20 blue, 19..10 green
|
|
1506
|
+
* and 9..0 red.
|
|
1507
|
+
*
|
|
1508
|
+
* The color values are premultiplied with the alpha value.
|
|
1509
|
+
*/
|
|
1428
1510
|
ABGR2101010_PREMULTIPLIED,
|
|
1429
1511
|
/**
|
|
1430
1512
|
* 4 bytes per pixel
|
|
@@ -7162,12 +7244,26 @@ export namespace Gdk {
|
|
|
7162
7244
|
*
|
|
7163
7245
|
* The names are the same as those in the
|
|
7164
7246
|
* `gdk/gdkkeysyms.h` header file
|
|
7165
|
-
* but without the leading
|
|
7247
|
+
* but without the leading “GDK_KEY_”.
|
|
7166
7248
|
* @param keyval_name a key name
|
|
7167
7249
|
* @returns the corresponding key value, or `GDK_KEY_VoidSymbol` if the key name is not a valid key
|
|
7168
7250
|
*/
|
|
7169
7251
|
function keyval_from_name(keyval_name: string): number;
|
|
7170
7252
|
|
|
7253
|
+
/**
|
|
7254
|
+
* Gets keyvals that are 'aliases' for `keyval`.
|
|
7255
|
+
*
|
|
7256
|
+
* Aliases are meant to be functionally equivalent and
|
|
7257
|
+
* should be treated the same with respect to keyboard
|
|
7258
|
+
* shortcuts, etc. An example are keypad keys that are
|
|
7259
|
+
* aliases for their normal counterpart, such as
|
|
7260
|
+
* `GDK_KEY_KP_Left` and `GDK_KEY_Left`.
|
|
7261
|
+
* @param keyval the keyval to get aliases for
|
|
7262
|
+
* @returns an array of keyvals
|
|
7263
|
+
* @since 4.24
|
|
7264
|
+
*/
|
|
7265
|
+
function keyval_get_aliases(keyval: number): number[] | null;
|
|
7266
|
+
|
|
7171
7267
|
/**
|
|
7172
7268
|
* Returns true if the given key value is in lower case.
|
|
7173
7269
|
* @param keyval a key value.
|
|
@@ -7187,7 +7283,7 @@ export namespace Gdk {
|
|
|
7187
7283
|
*
|
|
7188
7284
|
* The names are the same as those in the
|
|
7189
7285
|
* `gdk/gdkkeysyms.h` header file
|
|
7190
|
-
* but without the leading
|
|
7286
|
+
* but without the leading “GDK_KEY_”.
|
|
7191
7287
|
* @param keyval a key value
|
|
7192
7288
|
* @returns a string containing the name of the key
|
|
7193
7289
|
*/
|
|
@@ -8114,6 +8210,7 @@ export namespace Gdk {
|
|
|
8114
8210
|
* The returned context is guaranteed to be valid until
|
|
8115
8211
|
* {@link Gdk.DrawContext.end_frame} is called.
|
|
8116
8212
|
* @returns a Cairo context to draw on `GdkSurface
|
|
8213
|
+
* @deprecated since 4.18: Drawing content with Cairo should be done via Cairo rendernodes, not by using renderers.
|
|
8117
8214
|
*/
|
|
8118
8215
|
cairo_create(): cairo.Context | null;
|
|
8119
8216
|
}
|
|
@@ -8318,6 +8415,7 @@ export namespace Gdk {
|
|
|
8318
8415
|
* supported by GTK. In that case, `NULL` is returned, and `error` is set
|
|
8319
8416
|
* with an error message that can be presented to the user.
|
|
8320
8417
|
* @returns A newly allocated {@link Gdk.ColorState}
|
|
8418
|
+
* @since 4.16
|
|
8321
8419
|
*/
|
|
8322
8420
|
build_color_state(): ColorState;
|
|
8323
8421
|
|
|
@@ -8325,30 +8423,35 @@ export namespace Gdk {
|
|
|
8325
8423
|
* Returns the value of the color-primaries property
|
|
8326
8424
|
* of `self`.
|
|
8327
8425
|
* @returns the color-primaries value
|
|
8426
|
+
* @since 4.16
|
|
8328
8427
|
*/
|
|
8329
8428
|
get_color_primaries(): number;
|
|
8330
8429
|
|
|
8331
8430
|
/**
|
|
8332
8431
|
* Gets the matrix-coefficients property of `self`.
|
|
8333
8432
|
* @returns the matrix-coefficients value
|
|
8433
|
+
* @since 4.16
|
|
8334
8434
|
*/
|
|
8335
8435
|
get_matrix_coefficients(): number;
|
|
8336
8436
|
|
|
8337
8437
|
/**
|
|
8338
8438
|
* Gets the range property of `self`.
|
|
8339
8439
|
* @returns the range value
|
|
8440
|
+
* @since 4.16
|
|
8340
8441
|
*/
|
|
8341
8442
|
get_range(): CicpRange;
|
|
8342
8443
|
|
|
8343
8444
|
/**
|
|
8344
8445
|
* Gets the transfer-function property of `self`.
|
|
8345
8446
|
* @returns the transfer-function value
|
|
8447
|
+
* @since 4.16
|
|
8346
8448
|
*/
|
|
8347
8449
|
get_transfer_function(): number;
|
|
8348
8450
|
|
|
8349
8451
|
/**
|
|
8350
8452
|
* Sets the color-primaries property of `self`.
|
|
8351
8453
|
* @param color_primaries the new color primaries value
|
|
8454
|
+
* @since 4.16
|
|
8352
8455
|
*/
|
|
8353
8456
|
set_color_primaries(color_primaries: number): void;
|
|
8354
8457
|
|
|
@@ -8356,18 +8459,21 @@ export namespace Gdk {
|
|
|
8356
8459
|
* `self` a {@link Gdk.CicpParams}
|
|
8357
8460
|
* Sets the matrix-coefficients property of `self`.
|
|
8358
8461
|
* @param matrix_coefficients the new matrix-coefficients value
|
|
8462
|
+
* @since 4.16
|
|
8359
8463
|
*/
|
|
8360
8464
|
set_matrix_coefficients(matrix_coefficients: number): void;
|
|
8361
8465
|
|
|
8362
8466
|
/**
|
|
8363
8467
|
* Sets the range property of `self`
|
|
8364
8468
|
* @param range the range value
|
|
8469
|
+
* @since 4.16
|
|
8365
8470
|
*/
|
|
8366
8471
|
set_range(range: CicpRange): void;
|
|
8367
8472
|
|
|
8368
8473
|
/**
|
|
8369
8474
|
* Sets the transfer-function property of `self`.
|
|
8370
8475
|
* @param transfer_function the new transfer-function value
|
|
8476
|
+
* @since 4.16
|
|
8371
8477
|
*/
|
|
8372
8478
|
set_transfer_function(transfer_function: number): void;
|
|
8373
8479
|
}
|
|
@@ -8921,6 +9027,7 @@ export namespace Gdk {
|
|
|
8921
9027
|
* pointer indicating the function `res` was created by).
|
|
8922
9028
|
* @param source_tag an application-defined tag
|
|
8923
9029
|
* @returns `TRUE` if `res` has the indicated `source_tag`, `FALSE` if not.
|
|
9030
|
+
* @since 2.34
|
|
8924
9031
|
*/
|
|
8925
9032
|
is_tagged(source_tag: null): boolean;
|
|
8926
9033
|
|
|
@@ -8936,6 +9043,7 @@ export namespace Gdk {
|
|
|
8936
9043
|
* set by virtual methods should also be extracted by virtual methods,
|
|
8937
9044
|
* to enable subclasses to chain up correctly.
|
|
8938
9045
|
* @returns `TRUE` if `error` is has been filled in with an error from `res`, `FALSE` if not.
|
|
9046
|
+
* @since 2.34
|
|
8939
9047
|
*/
|
|
8940
9048
|
legacy_propagate_error(): boolean;
|
|
8941
9049
|
|
|
@@ -8955,6 +9063,7 @@ export namespace Gdk {
|
|
|
8955
9063
|
* Checks if `res` has the given `source_tag` (generally a function
|
|
8956
9064
|
* pointer indicating the function `res` was created by).
|
|
8957
9065
|
* @param source_tag an application-defined tag
|
|
9066
|
+
* @since 2.34
|
|
8958
9067
|
* @virtual
|
|
8959
9068
|
*/
|
|
8960
9069
|
vfunc_is_tagged(source_tag: null): boolean;
|
|
@@ -9359,6 +9468,7 @@ export namespace Gdk {
|
|
|
9359
9468
|
* pointer indicating the function `res` was created by).
|
|
9360
9469
|
* @param source_tag an application-defined tag
|
|
9361
9470
|
* @returns `TRUE` if `res` has the indicated `source_tag`, `FALSE` if not.
|
|
9471
|
+
* @since 2.34
|
|
9362
9472
|
*/
|
|
9363
9473
|
is_tagged(source_tag: null): boolean;
|
|
9364
9474
|
|
|
@@ -9374,6 +9484,7 @@ export namespace Gdk {
|
|
|
9374
9484
|
* set by virtual methods should also be extracted by virtual methods,
|
|
9375
9485
|
* to enable subclasses to chain up correctly.
|
|
9376
9486
|
* @returns `TRUE` if `error` is has been filled in with an error from `res`, `FALSE` if not.
|
|
9487
|
+
* @since 2.34
|
|
9377
9488
|
*/
|
|
9378
9489
|
legacy_propagate_error(): boolean;
|
|
9379
9490
|
|
|
@@ -9393,6 +9504,7 @@ export namespace Gdk {
|
|
|
9393
9504
|
* Checks if `res` has the given `source_tag` (generally a function
|
|
9394
9505
|
* pointer indicating the function `res` was created by).
|
|
9395
9506
|
* @param source_tag an application-defined tag
|
|
9507
|
+
* @since 2.34
|
|
9396
9508
|
* @virtual
|
|
9397
9509
|
*/
|
|
9398
9510
|
vfunc_is_tagged(source_tag: null): boolean;
|
|
@@ -9810,6 +9922,8 @@ export namespace Gdk {
|
|
|
9810
9922
|
* Will be -1 if there is no valid active layout.
|
|
9811
9923
|
*
|
|
9812
9924
|
* This is only relevant for keyboard devices.
|
|
9925
|
+
*
|
|
9926
|
+
* Value changes from compositor events, connect to notify if needed.
|
|
9813
9927
|
* @since 4.18
|
|
9814
9928
|
* @read-only
|
|
9815
9929
|
* @default 0
|
|
@@ -9822,6 +9936,8 @@ export namespace Gdk {
|
|
|
9822
9936
|
* Will be -1 if there is no valid active layout.
|
|
9823
9937
|
*
|
|
9824
9938
|
* This is only relevant for keyboard devices.
|
|
9939
|
+
*
|
|
9940
|
+
* Value changes from compositor events, connect to notify if needed.
|
|
9825
9941
|
* @since 4.18
|
|
9826
9942
|
* @read-only
|
|
9827
9943
|
* @default 0
|
|
@@ -9897,6 +10013,8 @@ export namespace Gdk {
|
|
|
9897
10013
|
* The names of the keyboard layouts of a {@link Gdk.Device}.
|
|
9898
10014
|
*
|
|
9899
10015
|
* This is only relevant for keyboard devices.
|
|
10016
|
+
*
|
|
10017
|
+
* Value changes from compositor events, connect to notify if needed.
|
|
9900
10018
|
* @since 4.18
|
|
9901
10019
|
* @read-only
|
|
9902
10020
|
*/
|
|
@@ -9906,6 +10024,8 @@ export namespace Gdk {
|
|
|
9906
10024
|
* The names of the keyboard layouts of a {@link Gdk.Device}.
|
|
9907
10025
|
*
|
|
9908
10026
|
* This is only relevant for keyboard devices.
|
|
10027
|
+
*
|
|
10028
|
+
* Value changes from compositor events, connect to notify if needed.
|
|
9909
10029
|
* @since 4.18
|
|
9910
10030
|
* @read-only
|
|
9911
10031
|
*/
|
|
@@ -10097,6 +10217,7 @@ export namespace Gdk {
|
|
|
10097
10217
|
*
|
|
10098
10218
|
* This is only relevant for keyboard devices.
|
|
10099
10219
|
* @returns The layout index of the active layout or -1.
|
|
10220
|
+
* @since 4.18
|
|
10100
10221
|
*/
|
|
10101
10222
|
get_active_layout_index(): number;
|
|
10102
10223
|
|
|
@@ -10145,6 +10266,7 @@ export namespace Gdk {
|
|
|
10145
10266
|
*
|
|
10146
10267
|
* This is only relevant for keyboard devices.
|
|
10147
10268
|
* @returns `null`-terminated array of strings of layouts,
|
|
10269
|
+
* @since 4.18
|
|
10148
10270
|
*/
|
|
10149
10271
|
get_layout_names(): string[] | null;
|
|
10150
10272
|
|
|
@@ -10223,6 +10345,7 @@ export namespace Gdk {
|
|
|
10223
10345
|
* events for a device that are not received from the OS, and will not
|
|
10224
10346
|
* update the timestamp).
|
|
10225
10347
|
* @returns the timestamp of the last activity for this device
|
|
10348
|
+
* @since 4.2
|
|
10226
10349
|
*/
|
|
10227
10350
|
get_timestamp(): number;
|
|
10228
10351
|
|
|
@@ -10598,6 +10721,7 @@ export namespace Gdk {
|
|
|
10598
10721
|
* Before using the returned {@link Gdk.GLContext}, you will need to
|
|
10599
10722
|
* call {@link Gdk.GLContext.make_current} or {@link Gdk.GLContext.realize}.
|
|
10600
10723
|
* @returns the newly created {@link Gdk.GLContext}
|
|
10724
|
+
* @since 4.6
|
|
10601
10725
|
*/
|
|
10602
10726
|
create_gl_context(): GLContext;
|
|
10603
10727
|
|
|
@@ -10657,6 +10781,7 @@ export namespace Gdk {
|
|
|
10657
10781
|
*
|
|
10658
10782
|
* This function is threadsafe. It can be called from any thread.
|
|
10659
10783
|
* @returns a {@link Gdk.DmabufFormats} object
|
|
10784
|
+
* @since 4.14
|
|
10660
10785
|
*/
|
|
10661
10786
|
get_dmabuf_formats(): DmabufFormats;
|
|
10662
10787
|
|
|
@@ -10708,6 +10833,7 @@ export namespace Gdk {
|
|
|
10708
10833
|
* Gets the startup notification ID for a Wayland display, or `null`
|
|
10709
10834
|
* if no ID has been defined.
|
|
10710
10835
|
* @returns the startup notification ID for `display`
|
|
10836
|
+
* @deprecated since 4.10
|
|
10711
10837
|
*/
|
|
10712
10838
|
get_startup_notification_id(): string | null;
|
|
10713
10839
|
|
|
@@ -10737,7 +10863,7 @@ export namespace Gdk {
|
|
|
10737
10863
|
* alpha channel.
|
|
10738
10864
|
*
|
|
10739
10865
|
* Even if a `true` is returned, it is possible that the
|
|
10740
|
-
* surface
|
|
10866
|
+
* surface’s alpha channel won’t be honored when displaying the
|
|
10741
10867
|
* surface on the screen: in particular, for X an appropriate
|
|
10742
10868
|
* windowing manager and compositing manager must be running to
|
|
10743
10869
|
* provide appropriate display. Use {@link Gdk.Display.is_composited}
|
|
@@ -10799,6 +10925,7 @@ export namespace Gdk {
|
|
|
10799
10925
|
* [gtk_window_set_auto_startup_notification()](../gtk4/method.Window.set_auto_startup_notification.html)
|
|
10800
10926
|
* is called to disable that feature.
|
|
10801
10927
|
* @param startup_id a startup-notification identifier, for which notification process should be completed
|
|
10928
|
+
* @deprecated since 4.10: Using {@link Gdk.Toplevel.set_startup_id} is sufficient
|
|
10802
10929
|
*/
|
|
10803
10930
|
notify_startup_complete(startup_id: string): void;
|
|
10804
10931
|
|
|
@@ -10818,12 +10945,14 @@ export namespace Gdk {
|
|
|
10818
10945
|
* as needed. But you can use it as a check when setting up code that
|
|
10819
10946
|
* might make use of OpenGL.
|
|
10820
10947
|
* @returns `true` if the display supports OpenGL
|
|
10948
|
+
* @since 4.4
|
|
10821
10949
|
*/
|
|
10822
10950
|
prepare_gl(): boolean;
|
|
10823
10951
|
|
|
10824
10952
|
/**
|
|
10825
10953
|
* Adds the given event to the event queue for `display`.
|
|
10826
10954
|
* @param event a {@link Gdk.Event}
|
|
10955
|
+
* @deprecated since 4.10: This function is only useful in very special situations and should not be used by applications.
|
|
10827
10956
|
*/
|
|
10828
10957
|
put_event(event: Event): void;
|
|
10829
10958
|
|
|
@@ -10844,6 +10973,7 @@ export namespace Gdk {
|
|
|
10844
10973
|
* If `true` is returned the application decides if it wants to draw shadows.
|
|
10845
10974
|
* If `false` is returned, the compositor decides if it wants to draw shadows.
|
|
10846
10975
|
* @returns `true` if surfaces can draw shadows or `false` if the display does not support this functionality.
|
|
10976
|
+
* @since 4.14
|
|
10847
10977
|
*/
|
|
10848
10978
|
supports_shadow_width(): boolean;
|
|
10849
10979
|
|
|
@@ -11329,6 +11459,7 @@ export namespace Gdk {
|
|
|
11329
11459
|
* makes sense to transfer the {@link GLib.Variant} between processes on the same machine,
|
|
11330
11460
|
* (as opposed to over the network), and within the same file system namespace.
|
|
11331
11461
|
* @returns a {@link GLib.Variant}, or `null` when serialization fails. The {@link GLib.Variant} will not be floating.
|
|
11462
|
+
* @since 2.38
|
|
11332
11463
|
*/
|
|
11333
11464
|
serialize(): GLib.Variant | null;
|
|
11334
11465
|
|
|
@@ -11350,6 +11481,7 @@ export namespace Gdk {
|
|
|
11350
11481
|
* - If `icon` is a {@link Gio.ThemedIcon} with exactly one name and no fallbacks,
|
|
11351
11482
|
* the encoding is simply the name (such as `network-server`).
|
|
11352
11483
|
* @returns An allocated NUL-terminated UTF8 string or `null` if `icon` can't be serialized. Use `g_free()` to free.
|
|
11484
|
+
* @since 2.20
|
|
11353
11485
|
*/
|
|
11354
11486
|
to_string(): string | null;
|
|
11355
11487
|
|
|
@@ -11372,6 +11504,7 @@ export namespace Gdk {
|
|
|
11372
11504
|
* As serialization will avoid using raw icon data when possible, it only
|
|
11373
11505
|
* makes sense to transfer the {@link GLib.Variant} between processes on the same machine,
|
|
11374
11506
|
* (as opposed to over the network), and within the same file system namespace.
|
|
11507
|
+
* @since 2.38
|
|
11375
11508
|
* @virtual
|
|
11376
11509
|
*/
|
|
11377
11510
|
vfunc_serialize(): GLib.Variant | null;
|
|
@@ -11379,6 +11512,7 @@ export namespace Gdk {
|
|
|
11379
11512
|
/**
|
|
11380
11513
|
* Serializes the `icon` into string tokens.
|
|
11381
11514
|
* This is can be invoked when `g_icon_new_for_string()` is called.
|
|
11515
|
+
* @since 2.20
|
|
11382
11516
|
* @virtual
|
|
11383
11517
|
*/
|
|
11384
11518
|
vfunc_to_tokens(): [boolean, string[], number];
|
|
@@ -11719,12 +11853,14 @@ export namespace Gdk {
|
|
|
11719
11853
|
* possibly with changing properties in between.
|
|
11720
11854
|
* @param data user data to pass to the destroy function
|
|
11721
11855
|
* @returns a newly built {@link Gdk.Texture} or `NULL` if the format is not supported
|
|
11856
|
+
* @since 4.14
|
|
11722
11857
|
*/
|
|
11723
11858
|
build(data: null): Texture | null;
|
|
11724
11859
|
|
|
11725
11860
|
/**
|
|
11726
11861
|
* Gets the color state previously set via `gdk_dmabuf_texture_builder_set_color_state()`.
|
|
11727
11862
|
* @returns the color state
|
|
11863
|
+
* @since 4.16
|
|
11728
11864
|
*/
|
|
11729
11865
|
get_color_state(): ColorState | null;
|
|
11730
11866
|
|
|
@@ -11732,6 +11868,7 @@ export namespace Gdk {
|
|
|
11732
11868
|
* Returns the display that this texture builder is
|
|
11733
11869
|
* associated with.
|
|
11734
11870
|
* @returns the display
|
|
11871
|
+
* @since 4.14
|
|
11735
11872
|
*/
|
|
11736
11873
|
get_display(): Display;
|
|
11737
11874
|
|
|
@@ -11739,6 +11876,7 @@ export namespace Gdk {
|
|
|
11739
11876
|
* Gets the file descriptor for a plane or -1 if none.
|
|
11740
11877
|
* @param plane the plane to get the fd for
|
|
11741
11878
|
* @returns the file descriptor
|
|
11879
|
+
* @since 4.14
|
|
11742
11880
|
*/
|
|
11743
11881
|
get_fd(plane: number): number;
|
|
11744
11882
|
|
|
@@ -11748,6 +11886,7 @@ export namespace Gdk {
|
|
|
11748
11886
|
*
|
|
11749
11887
|
* The format is specified as a fourcc code.
|
|
11750
11888
|
* @returns The format
|
|
11889
|
+
* @since 4.14
|
|
11751
11890
|
*/
|
|
11752
11891
|
get_fourcc(): number;
|
|
11753
11892
|
|
|
@@ -11755,18 +11894,21 @@ export namespace Gdk {
|
|
|
11755
11894
|
* Gets the height previously set via `gdk_dmabuf_texture_builder_set_height()` or
|
|
11756
11895
|
* 0 if the height wasn't set.
|
|
11757
11896
|
* @returns The height
|
|
11897
|
+
* @since 4.14
|
|
11758
11898
|
*/
|
|
11759
11899
|
get_height(): number;
|
|
11760
11900
|
|
|
11761
11901
|
/**
|
|
11762
11902
|
* Gets the modifier value.
|
|
11763
11903
|
* @returns the modifier
|
|
11904
|
+
* @since 4.14
|
|
11764
11905
|
*/
|
|
11765
11906
|
get_modifier(): number;
|
|
11766
11907
|
|
|
11767
11908
|
/**
|
|
11768
11909
|
* Gets the number of planes.
|
|
11769
11910
|
* @returns The number of planes
|
|
11911
|
+
* @since 4.14
|
|
11770
11912
|
*/
|
|
11771
11913
|
get_n_planes(): number;
|
|
11772
11914
|
|
|
@@ -11774,12 +11916,14 @@ export namespace Gdk {
|
|
|
11774
11916
|
* Gets the offset value for a plane.
|
|
11775
11917
|
* @param plane the plane to get the offset for
|
|
11776
11918
|
* @returns the offset
|
|
11919
|
+
* @since 4.14
|
|
11777
11920
|
*/
|
|
11778
11921
|
get_offset(plane: number): number;
|
|
11779
11922
|
|
|
11780
11923
|
/**
|
|
11781
11924
|
* Whether the data is premultiplied.
|
|
11782
11925
|
* @returns whether the data is premultiplied
|
|
11926
|
+
* @since 4.14
|
|
11783
11927
|
*/
|
|
11784
11928
|
get_premultiplied(): boolean;
|
|
11785
11929
|
|
|
@@ -11787,6 +11931,7 @@ export namespace Gdk {
|
|
|
11787
11931
|
* Gets the stride value for a plane.
|
|
11788
11932
|
* @param plane the plane to get the stride for
|
|
11789
11933
|
* @returns the stride
|
|
11934
|
+
* @since 4.14
|
|
11790
11935
|
*/
|
|
11791
11936
|
get_stride(plane: number): number;
|
|
11792
11937
|
|
|
@@ -11794,6 +11939,7 @@ export namespace Gdk {
|
|
|
11794
11939
|
* Gets the region previously set via `gdk_dmabuf_texture_builder_set_update_region()` or
|
|
11795
11940
|
* `null` if none was set.
|
|
11796
11941
|
* @returns The region
|
|
11942
|
+
* @since 4.14
|
|
11797
11943
|
*/
|
|
11798
11944
|
get_update_region(): cairo.Region | null;
|
|
11799
11945
|
|
|
@@ -11801,6 +11947,7 @@ export namespace Gdk {
|
|
|
11801
11947
|
* Gets the texture previously set via `gdk_dmabuf_texture_builder_set_update_texture()` or
|
|
11802
11948
|
* `null` if none was set.
|
|
11803
11949
|
* @returns The texture
|
|
11950
|
+
* @since 4.14
|
|
11804
11951
|
*/
|
|
11805
11952
|
get_update_texture(): Texture | null;
|
|
11806
11953
|
|
|
@@ -11808,6 +11955,7 @@ export namespace Gdk {
|
|
|
11808
11955
|
* Gets the width previously set via `gdk_dmabuf_texture_builder_set_width()` or
|
|
11809
11956
|
* 0 if the width wasn't set.
|
|
11810
11957
|
* @returns The width
|
|
11958
|
+
* @since 4.14
|
|
11811
11959
|
*/
|
|
11812
11960
|
get_width(): number;
|
|
11813
11961
|
|
|
@@ -11818,6 +11966,7 @@ export namespace Gdk {
|
|
|
11818
11966
|
* correct colorstate based on the format.
|
|
11819
11967
|
* If you don't know what colorstates are, this is probably the right thing.
|
|
11820
11968
|
* @param color_state a {@link Gdk.ColorState} or `NULL` to unset the colorstate.
|
|
11969
|
+
* @since 4.16
|
|
11821
11970
|
*/
|
|
11822
11971
|
set_color_state(color_state: ColorState | null): void;
|
|
11823
11972
|
|
|
@@ -11828,6 +11977,7 @@ export namespace Gdk {
|
|
|
11828
11977
|
* The display is used to determine the supported
|
|
11829
11978
|
* dma-buf formats.
|
|
11830
11979
|
* @param display the display
|
|
11980
|
+
* @since 4.14
|
|
11831
11981
|
*/
|
|
11832
11982
|
set_display(display: Display): void;
|
|
11833
11983
|
|
|
@@ -11835,6 +11985,7 @@ export namespace Gdk {
|
|
|
11835
11985
|
* Sets the file descriptor for a plane or to -1 to unset it.
|
|
11836
11986
|
* @param plane the plane to set the fd for
|
|
11837
11987
|
* @param fd the file descriptor
|
|
11988
|
+
* @since 4.14
|
|
11838
11989
|
*/
|
|
11839
11990
|
set_fd(plane: number, fd: number): void;
|
|
11840
11991
|
|
|
@@ -11845,6 +11996,7 @@ export namespace Gdk {
|
|
|
11845
11996
|
*
|
|
11846
11997
|
* The format must be set before calling {@link Gdk.DmabufTextureBuilder.build}.
|
|
11847
11998
|
* @param fourcc the texture's format or 0 to unset
|
|
11999
|
+
* @since 4.14
|
|
11848
12000
|
*/
|
|
11849
12001
|
set_fourcc(fourcc: number): void;
|
|
11850
12002
|
|
|
@@ -11853,18 +12005,21 @@ export namespace Gdk {
|
|
|
11853
12005
|
*
|
|
11854
12006
|
* The height must be set before calling {@link Gdk.DmabufTextureBuilder.build}.
|
|
11855
12007
|
* @param height the texture's height or 0 to unset
|
|
12008
|
+
* @since 4.14
|
|
11856
12009
|
*/
|
|
11857
12010
|
set_height(height: number): void;
|
|
11858
12011
|
|
|
11859
12012
|
/**
|
|
11860
12013
|
* Sets the modifier.
|
|
11861
12014
|
* @param modifier the modifier value
|
|
12015
|
+
* @since 4.14
|
|
11862
12016
|
*/
|
|
11863
12017
|
set_modifier(modifier: bigint | number): void;
|
|
11864
12018
|
|
|
11865
12019
|
/**
|
|
11866
12020
|
* Sets the number of planes of the texture.
|
|
11867
12021
|
* @param n_planes the number of planes
|
|
12022
|
+
* @since 4.14
|
|
11868
12023
|
*/
|
|
11869
12024
|
set_n_planes(n_planes: number): void;
|
|
11870
12025
|
|
|
@@ -11872,6 +12027,7 @@ export namespace Gdk {
|
|
|
11872
12027
|
* Sets the offset for a plane.
|
|
11873
12028
|
* @param plane the plane to set the offset for
|
|
11874
12029
|
* @param offset the offset value
|
|
12030
|
+
* @since 4.14
|
|
11875
12031
|
*/
|
|
11876
12032
|
set_offset(plane: number, offset: number): void;
|
|
11877
12033
|
|
|
@@ -11881,6 +12037,7 @@ export namespace Gdk {
|
|
|
11881
12037
|
* Unless otherwise specified, all formats including alpha channels are assumed
|
|
11882
12038
|
* to be premultiplied.
|
|
11883
12039
|
* @param premultiplied whether the data is premultiplied
|
|
12040
|
+
* @since 4.14
|
|
11884
12041
|
*/
|
|
11885
12042
|
set_premultiplied(premultiplied: boolean): void;
|
|
11886
12043
|
|
|
@@ -11890,6 +12047,7 @@ export namespace Gdk {
|
|
|
11890
12047
|
* The stride must be set for all planes before calling {@link Gdk.DmabufTextureBuilder.build}.
|
|
11891
12048
|
* @param plane the plane to set the stride for
|
|
11892
12049
|
* @param stride the stride value
|
|
12050
|
+
* @since 4.14
|
|
11893
12051
|
*/
|
|
11894
12052
|
set_stride(plane: number, stride: number): void;
|
|
11895
12053
|
|
|
@@ -11905,6 +12063,7 @@ export namespace Gdk {
|
|
|
11905
12063
|
*
|
|
11906
12064
|
* An example would be a screen recording where only the mouse pointer moves.
|
|
11907
12065
|
* @param region the region to update
|
|
12066
|
+
* @since 4.14
|
|
11908
12067
|
*/
|
|
11909
12068
|
set_update_region(region: cairo.Region | null): void;
|
|
11910
12069
|
|
|
@@ -11912,6 +12071,7 @@ export namespace Gdk {
|
|
|
11912
12071
|
* Sets the texture to be updated by this texture. See
|
|
11913
12072
|
* {@link Gdk.DmabufTextureBuilder.set_update_region} for an explanation.
|
|
11914
12073
|
* @param texture the texture to update
|
|
12074
|
+
* @since 4.14
|
|
11915
12075
|
*/
|
|
11916
12076
|
set_update_texture(texture: Texture | null): void;
|
|
11917
12077
|
|
|
@@ -11920,6 +12080,7 @@ export namespace Gdk {
|
|
|
11920
12080
|
*
|
|
11921
12081
|
* The width must be set before calling {@link Gdk.DmabufTextureBuilder.build}.
|
|
11922
12082
|
* @param width The texture's width or 0 to unset
|
|
12083
|
+
* @since 4.14
|
|
11923
12084
|
*/
|
|
11924
12085
|
set_width(width: number): void;
|
|
11925
12086
|
}
|
|
@@ -12269,6 +12430,7 @@ export namespace Gdk {
|
|
|
12269
12430
|
* use of [GskRenderer](../gsk4/class.Renderer.html)s, so application code
|
|
12270
12431
|
* does not need to call these functions explicitly.
|
|
12271
12432
|
* @param region minimum region that should be drawn
|
|
12433
|
+
* @deprecated since 4.16: Drawing directly to the surface is no longer recommended. Use `GskRenderNode` and `GskRenderer`.
|
|
12272
12434
|
*/
|
|
12273
12435
|
begin_frame(region: cairo.Region): void;
|
|
12274
12436
|
|
|
@@ -12281,6 +12443,7 @@ export namespace Gdk {
|
|
|
12281
12443
|
* When using a {@link Gdk.GLContext}, this function may call `glFlush()`
|
|
12282
12444
|
* implicitly before returning; it is not recommended to call `glFlush()`
|
|
12283
12445
|
* explicitly before calling this function.
|
|
12446
|
+
* @deprecated since 4.16: Drawing directly to the surface is no longer recommended. Use `GskRenderNode` and `GskRenderer`.
|
|
12284
12447
|
*/
|
|
12285
12448
|
end_frame(): void;
|
|
12286
12449
|
|
|
@@ -12300,6 +12463,7 @@ export namespace Gdk {
|
|
|
12300
12463
|
* If `context` is not in between calls to {@link Gdk.DrawContext.begin_frame}
|
|
12301
12464
|
* and {@link Gdk.DrawContext.end_frame}, `null` will be returned.
|
|
12302
12465
|
* @returns a Cairo region
|
|
12466
|
+
* @deprecated since 4.16: Drawing directly to the surface is no longer recommended. Use `GskRenderNode` and `GskRenderer`.
|
|
12303
12467
|
*/
|
|
12304
12468
|
get_frame_region(): cairo.Region | null;
|
|
12305
12469
|
|
|
@@ -12316,6 +12480,7 @@ export namespace Gdk {
|
|
|
12316
12480
|
* and {@link Gdk.DrawContext.end_frame}. In this situation, drawing commands
|
|
12317
12481
|
* may be effecting the contents of the `context`'s surface.
|
|
12318
12482
|
* @returns `true` if the context is between {@link Gdk.DrawContext.begin_frame} and {@link Gdk.DrawContext.end_frame} calls.
|
|
12483
|
+
* @deprecated since 4.16: Drawing directly to the surface is no longer recommended. Use `GskRenderNode` and `GskRenderer`.
|
|
12319
12484
|
*/
|
|
12320
12485
|
is_in_frame(): boolean;
|
|
12321
12486
|
}
|
|
@@ -12967,7 +13132,7 @@ export namespace Gdk {
|
|
|
12967
13132
|
* as `g_get_monotonic_time()`. The frame time does not advance during
|
|
12968
13133
|
* the time a frame is being painted, and outside of a frame, an attempt
|
|
12969
13134
|
* is made so that all calls to {@link Gdk.FrameClock.get_frame_time} that
|
|
12970
|
-
* are called at a
|
|
13135
|
+
* are called at a “similar” time get the same value. This means that
|
|
12971
13136
|
* if different animations are timed by looking at the difference in
|
|
12972
13137
|
* time between an initial value from {@link Gdk.FrameClock.get_frame_time}
|
|
12973
13138
|
* and the value inside the `Gdk.FrameClock::update` signal of the clock,
|
|
@@ -13046,10 +13211,10 @@ export namespace Gdk {
|
|
|
13046
13211
|
/**
|
|
13047
13212
|
* Gets the time that should currently be used for animations.
|
|
13048
13213
|
*
|
|
13049
|
-
* Inside the processing of a frame, it
|
|
13214
|
+
* Inside the processing of a frame, it’s the time used to compute the
|
|
13050
13215
|
* animation position of everything in a frame. Outside of a frame, it's
|
|
13051
|
-
* the time of the conceptual
|
|
13052
|
-
* the actual previous frame time, or if that
|
|
13216
|
+
* the time of the conceptual “previous frame,” which may be either
|
|
13217
|
+
* the actual previous frame time, or if that’s too old, an updated
|
|
13053
13218
|
* time.
|
|
13054
13219
|
* @returns a timestamp in microseconds, in the timescale of of `g_get_monotonic_time()`.
|
|
13055
13220
|
*/
|
|
@@ -13274,6 +13439,7 @@ export namespace Gdk {
|
|
|
13274
13439
|
/**
|
|
13275
13440
|
* Gets the allowed APIs set via `gdk_gl_context_set_allowed_apis()`.
|
|
13276
13441
|
* @returns the allowed APIs
|
|
13442
|
+
* @since 4.6
|
|
13277
13443
|
*/
|
|
13278
13444
|
get_allowed_apis(): GLAPI;
|
|
13279
13445
|
|
|
@@ -13282,6 +13448,7 @@ export namespace Gdk {
|
|
|
13282
13448
|
*
|
|
13283
13449
|
* If the renderer has not been realized yet, 0 is returned.
|
|
13284
13450
|
* @returns the currently used API
|
|
13451
|
+
* @since 4.6
|
|
13285
13452
|
*/
|
|
13286
13453
|
get_api(): GLAPI;
|
|
13287
13454
|
|
|
@@ -13323,6 +13490,7 @@ export namespace Gdk {
|
|
|
13323
13490
|
* As many contexts can share data now and no single shared context exists
|
|
13324
13491
|
* anymore, this function has been deprecated and now always returns `null`.
|
|
13325
13492
|
* @returns `null`
|
|
13493
|
+
* @deprecated since 4.4: Use {@link Gdk.GLContext.is_shared} to check if contexts can be shared.
|
|
13326
13494
|
*/
|
|
13327
13495
|
get_shared_context(): GLContext | null;
|
|
13328
13496
|
|
|
@@ -13381,6 +13549,7 @@ export namespace Gdk {
|
|
|
13381
13549
|
* is not, this function will return `false`.
|
|
13382
13550
|
* @param other the {@link Gdk.GLContext} that should be compatible with `self`
|
|
13383
13551
|
* @returns `true` if the two GL contexts are compatible.
|
|
13552
|
+
* @since 4.4
|
|
13384
13553
|
*/
|
|
13385
13554
|
is_shared(other: GLContext): boolean;
|
|
13386
13555
|
|
|
@@ -13406,6 +13575,7 @@ export namespace Gdk {
|
|
|
13406
13575
|
*
|
|
13407
13576
|
* By default, all APIs are allowed.
|
|
13408
13577
|
* @param apis the allowed APIs
|
|
13578
|
+
* @since 4.6
|
|
13409
13579
|
*/
|
|
13410
13580
|
set_allowed_apis(apis: GLAPI): void;
|
|
13411
13581
|
|
|
@@ -13465,6 +13635,7 @@ export namespace Gdk {
|
|
|
13465
13635
|
* after calling {@link Gdk.GLContext.realize} to decide whether to use
|
|
13466
13636
|
* the OpenGL or OpenGL ES API, extensions, or shaders.
|
|
13467
13637
|
* @param use_es whether the context should use OpenGL ES instead of OpenGL, or -1 to allow auto-detection
|
|
13638
|
+
* @deprecated since 4.6
|
|
13468
13639
|
*/
|
|
13469
13640
|
set_use_es(use_es: number): void;
|
|
13470
13641
|
}
|
|
@@ -13765,6 +13936,7 @@ export namespace Gdk {
|
|
|
13765
13936
|
* makes sense to transfer the {@link GLib.Variant} between processes on the same machine,
|
|
13766
13937
|
* (as opposed to over the network), and within the same file system namespace.
|
|
13767
13938
|
* @returns a {@link GLib.Variant}, or `null` when serialization fails. The {@link GLib.Variant} will not be floating.
|
|
13939
|
+
* @since 2.38
|
|
13768
13940
|
*/
|
|
13769
13941
|
serialize(): GLib.Variant | null;
|
|
13770
13942
|
|
|
@@ -13786,6 +13958,7 @@ export namespace Gdk {
|
|
|
13786
13958
|
* - If `icon` is a {@link Gio.ThemedIcon} with exactly one name and no fallbacks,
|
|
13787
13959
|
* the encoding is simply the name (such as `network-server`).
|
|
13788
13960
|
* @returns An allocated NUL-terminated UTF8 string or `null` if `icon` can't be serialized. Use `g_free()` to free.
|
|
13961
|
+
* @since 2.20
|
|
13789
13962
|
*/
|
|
13790
13963
|
to_string(): string | null;
|
|
13791
13964
|
|
|
@@ -13808,6 +13981,7 @@ export namespace Gdk {
|
|
|
13808
13981
|
* As serialization will avoid using raw icon data when possible, it only
|
|
13809
13982
|
* makes sense to transfer the {@link GLib.Variant} between processes on the same machine,
|
|
13810
13983
|
* (as opposed to over the network), and within the same file system namespace.
|
|
13984
|
+
* @since 2.38
|
|
13811
13985
|
* @virtual
|
|
13812
13986
|
*/
|
|
13813
13987
|
vfunc_serialize(): GLib.Variant | null;
|
|
@@ -13815,6 +13989,7 @@ export namespace Gdk {
|
|
|
13815
13989
|
/**
|
|
13816
13990
|
* Serializes the `icon` into string tokens.
|
|
13817
13991
|
* This is can be invoked when `g_icon_new_for_string()` is called.
|
|
13992
|
+
* @since 2.20
|
|
13818
13993
|
* @virtual
|
|
13819
13994
|
*/
|
|
13820
13995
|
vfunc_to_tokens(): [boolean, string[], number];
|
|
@@ -14097,12 +14272,14 @@ export namespace Gdk {
|
|
|
14097
14272
|
* possibly with changing properties in between.
|
|
14098
14273
|
* @param data user data to pass to the destroy function
|
|
14099
14274
|
* @returns a newly built {@link Gdk.Texture}
|
|
14275
|
+
* @since 4.12
|
|
14100
14276
|
*/
|
|
14101
14277
|
build(data: null): Texture;
|
|
14102
14278
|
|
|
14103
14279
|
/**
|
|
14104
14280
|
* Gets the color state previously set via `gdk_gl_texture_builder_set_color_state()`.
|
|
14105
14281
|
* @returns the color state
|
|
14282
|
+
* @since 4.16
|
|
14106
14283
|
*/
|
|
14107
14284
|
get_color_state(): ColorState;
|
|
14108
14285
|
|
|
@@ -14110,18 +14287,21 @@ export namespace Gdk {
|
|
|
14110
14287
|
* Gets the context previously set via `gdk_gl_texture_builder_set_context()` or
|
|
14111
14288
|
* `null` if none was set.
|
|
14112
14289
|
* @returns The context
|
|
14290
|
+
* @since 4.12
|
|
14113
14291
|
*/
|
|
14114
14292
|
get_context(): GLContext | null;
|
|
14115
14293
|
|
|
14116
14294
|
/**
|
|
14117
14295
|
* Gets the format previously set via `gdk_gl_texture_builder_set_format()`.
|
|
14118
14296
|
* @returns The format
|
|
14297
|
+
* @since 4.12
|
|
14119
14298
|
*/
|
|
14120
14299
|
get_format(): MemoryFormat;
|
|
14121
14300
|
|
|
14122
14301
|
/**
|
|
14123
14302
|
* Gets whether the texture has a mipmap.
|
|
14124
14303
|
* @returns Whether the texture has a mipmap
|
|
14304
|
+
* @since 4.12
|
|
14125
14305
|
*/
|
|
14126
14306
|
get_has_mipmap(): boolean;
|
|
14127
14307
|
|
|
@@ -14129,6 +14309,7 @@ export namespace Gdk {
|
|
|
14129
14309
|
* Gets the height previously set via `gdk_gl_texture_builder_set_height()` or
|
|
14130
14310
|
* 0 if the height wasn't set.
|
|
14131
14311
|
* @returns The height
|
|
14312
|
+
* @since 4.12
|
|
14132
14313
|
*/
|
|
14133
14314
|
get_height(): number;
|
|
14134
14315
|
|
|
@@ -14136,12 +14317,14 @@ export namespace Gdk {
|
|
|
14136
14317
|
* Gets the texture id previously set via `gdk_gl_texture_builder_set_id()` or
|
|
14137
14318
|
* 0 if the id wasn't set.
|
|
14138
14319
|
* @returns The id
|
|
14320
|
+
* @since 4.12
|
|
14139
14321
|
*/
|
|
14140
14322
|
get_id(): number;
|
|
14141
14323
|
|
|
14142
14324
|
/**
|
|
14143
14325
|
* Gets the `GLsync` previously set via `gdk_gl_texture_builder_set_sync()`.
|
|
14144
14326
|
* @returns the `GLSync`
|
|
14327
|
+
* @since 4.12
|
|
14145
14328
|
*/
|
|
14146
14329
|
get_sync(): null;
|
|
14147
14330
|
|
|
@@ -14149,6 +14332,7 @@ export namespace Gdk {
|
|
|
14149
14332
|
* Gets the region previously set via `gdk_gl_texture_builder_set_update_region()` or
|
|
14150
14333
|
* `null` if none was set.
|
|
14151
14334
|
* @returns The region
|
|
14335
|
+
* @since 4.12
|
|
14152
14336
|
*/
|
|
14153
14337
|
get_update_region(): cairo.Region | null;
|
|
14154
14338
|
|
|
@@ -14156,6 +14340,7 @@ export namespace Gdk {
|
|
|
14156
14340
|
* Gets the texture previously set via `gdk_gl_texture_builder_set_update_texture()` or
|
|
14157
14341
|
* `null` if none was set.
|
|
14158
14342
|
* @returns The texture
|
|
14343
|
+
* @since 4.12
|
|
14159
14344
|
*/
|
|
14160
14345
|
get_update_texture(): Texture | null;
|
|
14161
14346
|
|
|
@@ -14163,6 +14348,7 @@ export namespace Gdk {
|
|
|
14163
14348
|
* Gets the width previously set via `gdk_gl_texture_builder_set_width()` or
|
|
14164
14349
|
* 0 if the width wasn't set.
|
|
14165
14350
|
* @returns The width
|
|
14351
|
+
* @since 4.12
|
|
14166
14352
|
*/
|
|
14167
14353
|
get_width(): number;
|
|
14168
14354
|
|
|
@@ -14172,6 +14358,7 @@ export namespace Gdk {
|
|
|
14172
14358
|
* By default, the sRGB colorstate is used. If you don't know what
|
|
14173
14359
|
* colorstates are, this is probably the right thing.
|
|
14174
14360
|
* @param color_state a {@link Gdk.ColorState}
|
|
14361
|
+
* @since 4.16
|
|
14175
14362
|
*/
|
|
14176
14363
|
set_color_state(color_state: ColorState): void;
|
|
14177
14364
|
|
|
@@ -14181,6 +14368,7 @@ export namespace Gdk {
|
|
|
14181
14368
|
*
|
|
14182
14369
|
* The context must be set before calling {@link Gdk.GLTextureBuilder.build}.
|
|
14183
14370
|
* @param context The context the texture belongs to or `null` to unset
|
|
14371
|
+
* @since 4.12
|
|
14184
14372
|
*/
|
|
14185
14373
|
set_context(context: GLContext | null): void;
|
|
14186
14374
|
|
|
@@ -14202,6 +14390,7 @@ export namespace Gdk {
|
|
|
14202
14390
|
* Non-RGBA textures need to have swizzling parameters set up properly to be usable
|
|
14203
14391
|
* in GSK's shaders.
|
|
14204
14392
|
* @param format The texture's format
|
|
14393
|
+
* @since 4.12
|
|
14205
14394
|
*/
|
|
14206
14395
|
set_format(format: MemoryFormat): void;
|
|
14207
14396
|
|
|
@@ -14211,6 +14400,7 @@ export namespace Gdk {
|
|
|
14211
14400
|
*
|
|
14212
14401
|
* Typically, the `glGenerateMipmap` function is used to generate a mimap.
|
|
14213
14402
|
* @param has_mipmap Whether the texture has a mipmap
|
|
14403
|
+
* @since 4.12
|
|
14214
14404
|
*/
|
|
14215
14405
|
set_has_mipmap(has_mipmap: boolean): void;
|
|
14216
14406
|
|
|
@@ -14219,6 +14409,7 @@ export namespace Gdk {
|
|
|
14219
14409
|
*
|
|
14220
14410
|
* The height must be set before calling {@link Gdk.GLTextureBuilder.build}.
|
|
14221
14411
|
* @param height The texture's height or 0 to unset
|
|
14412
|
+
* @since 4.12
|
|
14222
14413
|
*/
|
|
14223
14414
|
set_height(height: number): void;
|
|
14224
14415
|
|
|
@@ -14229,6 +14420,7 @@ export namespace Gdk {
|
|
|
14229
14420
|
*
|
|
14230
14421
|
* The id must be set before calling {@link Gdk.GLTextureBuilder.build}.
|
|
14231
14422
|
* @param id The texture id to be used for creating the texture
|
|
14423
|
+
* @since 4.12
|
|
14232
14424
|
*/
|
|
14233
14425
|
set_id(id: number): void;
|
|
14234
14426
|
|
|
@@ -14242,6 +14434,7 @@ export namespace Gdk {
|
|
|
14242
14434
|
* The texture builder does not destroy it and it is the callers
|
|
14243
14435
|
* responsibility to make sure it doesn't leak.
|
|
14244
14436
|
* @param sync the GLSync object
|
|
14437
|
+
* @since 4.12
|
|
14245
14438
|
*/
|
|
14246
14439
|
set_sync(sync: null): void;
|
|
14247
14440
|
|
|
@@ -14257,6 +14450,7 @@ export namespace Gdk {
|
|
|
14257
14450
|
*
|
|
14258
14451
|
* An example would be a screen recording where only the mouse pointer moves.
|
|
14259
14452
|
* @param region the region to update
|
|
14453
|
+
* @since 4.12
|
|
14260
14454
|
*/
|
|
14261
14455
|
set_update_region(region: cairo.Region | null): void;
|
|
14262
14456
|
|
|
@@ -14264,6 +14458,7 @@ export namespace Gdk {
|
|
|
14264
14458
|
* Sets the texture to be updated by this texture. See
|
|
14265
14459
|
* {@link Gdk.GLTextureBuilder.set_update_region} for an explanation.
|
|
14266
14460
|
* @param texture the texture to update
|
|
14461
|
+
* @since 4.12
|
|
14267
14462
|
*/
|
|
14268
14463
|
set_update_texture(texture: Texture | null): void;
|
|
14269
14464
|
|
|
@@ -14272,6 +14467,7 @@ export namespace Gdk {
|
|
|
14272
14467
|
*
|
|
14273
14468
|
* The width must be set before calling {@link Gdk.GLTextureBuilder.build}.
|
|
14274
14469
|
* @param width The texture's width or 0 to unset
|
|
14470
|
+
* @since 4.12
|
|
14275
14471
|
*/
|
|
14276
14472
|
set_width(width: number): void;
|
|
14277
14473
|
}
|
|
@@ -14696,6 +14892,7 @@ export namespace Gdk {
|
|
|
14696
14892
|
* makes sense to transfer the {@link GLib.Variant} between processes on the same machine,
|
|
14697
14893
|
* (as opposed to over the network), and within the same file system namespace.
|
|
14698
14894
|
* @returns a {@link GLib.Variant}, or `null` when serialization fails. The {@link GLib.Variant} will not be floating.
|
|
14895
|
+
* @since 2.38
|
|
14699
14896
|
*/
|
|
14700
14897
|
serialize(): GLib.Variant | null;
|
|
14701
14898
|
|
|
@@ -14717,6 +14914,7 @@ export namespace Gdk {
|
|
|
14717
14914
|
* - If `icon` is a {@link Gio.ThemedIcon} with exactly one name and no fallbacks,
|
|
14718
14915
|
* the encoding is simply the name (such as `network-server`).
|
|
14719
14916
|
* @returns An allocated NUL-terminated UTF8 string or `null` if `icon` can't be serialized. Use `g_free()` to free.
|
|
14917
|
+
* @since 2.20
|
|
14720
14918
|
*/
|
|
14721
14919
|
to_string(): string | null;
|
|
14722
14920
|
|
|
@@ -14739,6 +14937,7 @@ export namespace Gdk {
|
|
|
14739
14937
|
* As serialization will avoid using raw icon data when possible, it only
|
|
14740
14938
|
* makes sense to transfer the {@link GLib.Variant} between processes on the same machine,
|
|
14741
14939
|
* (as opposed to over the network), and within the same file system namespace.
|
|
14940
|
+
* @since 2.38
|
|
14742
14941
|
* @virtual
|
|
14743
14942
|
*/
|
|
14744
14943
|
vfunc_serialize(): GLib.Variant | null;
|
|
@@ -14746,6 +14945,7 @@ export namespace Gdk {
|
|
|
14746
14945
|
/**
|
|
14747
14946
|
* Serializes the `icon` into string tokens.
|
|
14748
14947
|
* This is can be invoked when `g_icon_new_for_string()` is called.
|
|
14948
|
+
* @since 2.20
|
|
14749
14949
|
* @virtual
|
|
14750
14950
|
*/
|
|
14751
14951
|
vfunc_to_tokens(): [boolean, string[], number];
|
|
@@ -14995,6 +15195,7 @@ export namespace Gdk {
|
|
|
14995
15195
|
* It is possible to call this function multiple times to create multiple textures,
|
|
14996
15196
|
* possibly with changing properties in between.
|
|
14997
15197
|
* @returns a newly built {@link Gdk.Texture}
|
|
15198
|
+
* @since 4.16
|
|
14998
15199
|
*/
|
|
14999
15200
|
build(): Texture;
|
|
15000
15201
|
|
|
@@ -15002,18 +15203,21 @@ export namespace Gdk {
|
|
|
15002
15203
|
* Gets the bytes previously set via `gdk_memory_texture_builder_set_bytes()`
|
|
15003
15204
|
* or `null` if none was set.
|
|
15004
15205
|
* @returns The bytes
|
|
15206
|
+
* @since 4.16
|
|
15005
15207
|
*/
|
|
15006
15208
|
get_bytes(): GLib.Bytes | null;
|
|
15007
15209
|
|
|
15008
15210
|
/**
|
|
15009
15211
|
* Gets the colorstate previously set via `gdk_memory_texture_builder_set_color_state()`.
|
|
15010
15212
|
* @returns The colorstate
|
|
15213
|
+
* @since 4.16
|
|
15011
15214
|
*/
|
|
15012
15215
|
get_color_state(): ColorState;
|
|
15013
15216
|
|
|
15014
15217
|
/**
|
|
15015
15218
|
* Gets the format previously set via `gdk_memory_texture_builder_set_format()`.
|
|
15016
15219
|
* @returns The format
|
|
15220
|
+
* @since 4.16
|
|
15017
15221
|
*/
|
|
15018
15222
|
get_format(): MemoryFormat;
|
|
15019
15223
|
|
|
@@ -15021,6 +15225,7 @@ export namespace Gdk {
|
|
|
15021
15225
|
* Gets the height previously set via `gdk_memory_texture_builder_set_height()`
|
|
15022
15226
|
* or 0 if the height wasn't set.
|
|
15023
15227
|
* @returns The height
|
|
15228
|
+
* @since 4.16
|
|
15024
15229
|
*/
|
|
15025
15230
|
get_height(): number;
|
|
15026
15231
|
|
|
@@ -15028,12 +15233,14 @@ export namespace Gdk {
|
|
|
15028
15233
|
* Gets the offset previously set via `gdk_memory_texture_builder_set_offset()`.
|
|
15029
15234
|
* @param plane a plane
|
|
15030
15235
|
* @returns The offset associated to a `plane`
|
|
15236
|
+
* @since 4.20
|
|
15031
15237
|
*/
|
|
15032
15238
|
get_offset(plane: number): number;
|
|
15033
15239
|
|
|
15034
15240
|
/**
|
|
15035
15241
|
* Gets the stride previously set via `gdk_memory_texture_builder_set_stride()`.
|
|
15036
15242
|
* @returns the stride
|
|
15243
|
+
* @since 4.16
|
|
15037
15244
|
*/
|
|
15038
15245
|
get_stride(): number;
|
|
15039
15246
|
|
|
@@ -15041,6 +15248,7 @@ export namespace Gdk {
|
|
|
15041
15248
|
* Gets the stride previously set via `gdk_memory_texture_builder_set_stride_for_plane()`.
|
|
15042
15249
|
* @param plane a plane
|
|
15043
15250
|
* @returns The stride associated to a `plane`
|
|
15251
|
+
* @since 4.20
|
|
15044
15252
|
*/
|
|
15045
15253
|
get_stride_for_plane(plane: number): number;
|
|
15046
15254
|
|
|
@@ -15048,6 +15256,7 @@ export namespace Gdk {
|
|
|
15048
15256
|
* Gets the region previously set via `gdk_memory_texture_builder_set_update_region()`
|
|
15049
15257
|
* or `null` if none was set.
|
|
15050
15258
|
* @returns The update region
|
|
15259
|
+
* @since 4.16
|
|
15051
15260
|
*/
|
|
15052
15261
|
get_update_region(): cairo.Region | null;
|
|
15053
15262
|
|
|
@@ -15055,6 +15264,7 @@ export namespace Gdk {
|
|
|
15055
15264
|
* Gets the texture previously set via `gdk_memory_texture_builder_set_update_texture()`
|
|
15056
15265
|
* or `null` if none was set.
|
|
15057
15266
|
* @returns The update texture
|
|
15267
|
+
* @since 4.16
|
|
15058
15268
|
*/
|
|
15059
15269
|
get_update_texture(): Texture | null;
|
|
15060
15270
|
|
|
@@ -15062,6 +15272,7 @@ export namespace Gdk {
|
|
|
15062
15272
|
* Gets the width previously set via `gdk_memory_texture_builder_set_width()`
|
|
15063
15273
|
* or 0 if the width wasn't set.
|
|
15064
15274
|
* @returns The width
|
|
15275
|
+
* @since 4.16
|
|
15065
15276
|
*/
|
|
15066
15277
|
get_width(): number;
|
|
15067
15278
|
|
|
@@ -15070,6 +15281,7 @@ export namespace Gdk {
|
|
|
15070
15281
|
*
|
|
15071
15282
|
* The bytes must be set before calling {@link Gdk.MemoryTextureBuilder.build}.
|
|
15072
15283
|
* @param bytes The bytes the texture shows or `null` to unset
|
|
15284
|
+
* @since 4.16
|
|
15073
15285
|
*/
|
|
15074
15286
|
set_bytes(bytes: GLib.Bytes | Uint8Array | null): void;
|
|
15075
15287
|
|
|
@@ -15079,6 +15291,7 @@ export namespace Gdk {
|
|
|
15079
15291
|
* By default, the sRGB colorstate is used. If you don't know
|
|
15080
15292
|
* what colorstates are, this is probably the right thing.
|
|
15081
15293
|
* @param color_state The colorstate describing the data
|
|
15294
|
+
* @since 4.16
|
|
15082
15295
|
*/
|
|
15083
15296
|
set_color_state(color_state: ColorState): void;
|
|
15084
15297
|
|
|
@@ -15087,6 +15300,7 @@ export namespace Gdk {
|
|
|
15087
15300
|
*
|
|
15088
15301
|
* The default is `GDK_MEMORY_R8G8B8A8_PREMULTIPLIED`.
|
|
15089
15302
|
* @param format The texture's format
|
|
15303
|
+
* @since 4.16
|
|
15090
15304
|
*/
|
|
15091
15305
|
set_format(format: MemoryFormat): void;
|
|
15092
15306
|
|
|
@@ -15096,6 +15310,7 @@ export namespace Gdk {
|
|
|
15096
15310
|
* The height must be set before calling {@link Gdk.MemoryTextureBuilder.build}
|
|
15097
15311
|
* and conform to size requirements of the provided format.
|
|
15098
15312
|
* @param height The texture's height or 0 to unset
|
|
15313
|
+
* @since 4.16
|
|
15099
15314
|
*/
|
|
15100
15315
|
set_height(height: number): void;
|
|
15101
15316
|
|
|
@@ -15103,6 +15318,7 @@ export namespace Gdk {
|
|
|
15103
15318
|
* Sets the offset of the texture for `plane`.
|
|
15104
15319
|
* @param plane a plane
|
|
15105
15320
|
* @param offset the texture's offset for `plane`
|
|
15321
|
+
* @since 4.20
|
|
15106
15322
|
*/
|
|
15107
15323
|
set_offset(plane: number, offset: bigint | number): void;
|
|
15108
15324
|
|
|
@@ -15111,6 +15327,7 @@ export namespace Gdk {
|
|
|
15111
15327
|
*
|
|
15112
15328
|
* The rowstride must be set before calling {@link Gdk.MemoryTextureBuilder.build}.
|
|
15113
15329
|
* @param stride the stride or 0 to unset
|
|
15330
|
+
* @since 4.16
|
|
15114
15331
|
*/
|
|
15115
15332
|
set_stride(stride: bigint | number): void;
|
|
15116
15333
|
|
|
@@ -15118,6 +15335,7 @@ export namespace Gdk {
|
|
|
15118
15335
|
* Sets the stride of the texture for `plane`.
|
|
15119
15336
|
* @param plane a plane
|
|
15120
15337
|
* @param stride the texture's stride for `plane`
|
|
15338
|
+
* @since 4.20
|
|
15121
15339
|
*/
|
|
15122
15340
|
set_stride_for_plane(plane: number, stride: bigint | number): void;
|
|
15123
15341
|
|
|
@@ -15134,6 +15352,7 @@ export namespace Gdk {
|
|
|
15134
15352
|
*
|
|
15135
15353
|
* An example would be a screen recording where only the mouse pointer moves.
|
|
15136
15354
|
* @param region the region to update
|
|
15355
|
+
* @since 4.16
|
|
15137
15356
|
*/
|
|
15138
15357
|
set_update_region(region: cairo.Region | null): void;
|
|
15139
15358
|
|
|
@@ -15142,6 +15361,7 @@ export namespace Gdk {
|
|
|
15142
15361
|
*
|
|
15143
15362
|
* See {@link Gdk.MemoryTextureBuilder.set_update_region} for an explanation.
|
|
15144
15363
|
* @param texture the texture to update
|
|
15364
|
+
* @since 4.16
|
|
15145
15365
|
*/
|
|
15146
15366
|
set_update_texture(texture: Texture | null): void;
|
|
15147
15367
|
|
|
@@ -15151,6 +15371,7 @@ export namespace Gdk {
|
|
|
15151
15371
|
* The width must be set before calling {@link Gdk.MemoryTextureBuilder.build}
|
|
15152
15372
|
* and conform to size requirements of the provided format.
|
|
15153
15373
|
* @param width The texture's width or 0 to unset
|
|
15374
|
+
* @since 4.16
|
|
15154
15375
|
*/
|
|
15155
15376
|
set_width(width: number): void;
|
|
15156
15377
|
}
|
|
@@ -15391,6 +15612,7 @@ export namespace Gdk {
|
|
|
15391
15612
|
*
|
|
15392
15613
|
* This can be used to identify a monitor in the UI.
|
|
15393
15614
|
* @returns the monitor description
|
|
15615
|
+
* @since 4.10
|
|
15394
15616
|
*/
|
|
15395
15617
|
get_description(): string | null;
|
|
15396
15618
|
|
|
@@ -15404,8 +15626,8 @@ export namespace Gdk {
|
|
|
15404
15626
|
* Retrieves the size and position of the monitor within the
|
|
15405
15627
|
* display coordinate space.
|
|
15406
15628
|
*
|
|
15407
|
-
* The returned geometry is in
|
|
15408
|
-
*
|
|
15629
|
+
* The returned geometry is in ”application pixels”, not in
|
|
15630
|
+
* ”device pixels” (see {@link Gdk.Monitor.get_scale}).
|
|
15409
15631
|
*/
|
|
15410
15632
|
get_geometry(): Rectangle;
|
|
15411
15633
|
|
|
@@ -15447,9 +15669,10 @@ export namespace Gdk {
|
|
|
15447
15669
|
* to device pixels.
|
|
15448
15670
|
*
|
|
15449
15671
|
* This can be used if you want to create pixel based data for a
|
|
15450
|
-
* particular monitor, but most of the time you
|
|
15672
|
+
* particular monitor, but most of the time you’re drawing to a surface
|
|
15451
15673
|
* where it is better to use {@link Gdk.Surface.get_scale} instead.
|
|
15452
15674
|
* @returns the scale
|
|
15675
|
+
* @since 4.14
|
|
15453
15676
|
*/
|
|
15454
15677
|
get_scale(): number;
|
|
15455
15678
|
|
|
@@ -15461,7 +15684,7 @@ export namespace Gdk {
|
|
|
15461
15684
|
* it can be a higher value (often 2).
|
|
15462
15685
|
*
|
|
15463
15686
|
* This can be used if you want to create pixel based data for a
|
|
15464
|
-
* particular monitor, but most of the time you
|
|
15687
|
+
* particular monitor, but most of the time you’re drawing to a surface
|
|
15465
15688
|
* where it is better to use {@link Gdk.Surface.get_scale_factor} instead.
|
|
15466
15689
|
* @returns the scale factor
|
|
15467
15690
|
*/
|
|
@@ -15649,6 +15872,7 @@ export namespace Gdk {
|
|
|
15649
15872
|
/**
|
|
15650
15873
|
* Extracts the scroll direction relative to the physical motion.
|
|
15651
15874
|
* @returns the relative scroll direction.
|
|
15875
|
+
* @since 4.20
|
|
15652
15876
|
*/
|
|
15653
15877
|
get_relative_direction(): ScrollRelativeDirection;
|
|
15654
15878
|
|
|
@@ -15658,6 +15882,7 @@ export namespace Gdk {
|
|
|
15658
15882
|
* The unit will always be {@link Gdk.ScrollUnit.WHEEL} if the scroll direction is not
|
|
15659
15883
|
* {@link Gdk.ScrollDirection.SMOOTH}.
|
|
15660
15884
|
* @returns the scroll unit.
|
|
15885
|
+
* @since 4.8
|
|
15661
15886
|
*/
|
|
15662
15887
|
get_unit(): ScrollUnit;
|
|
15663
15888
|
|
|
@@ -15865,8 +16090,8 @@ export namespace Gdk {
|
|
|
15865
16090
|
* Emitted when the size of `surface` is changed, or when relayout should
|
|
15866
16091
|
* be performed.
|
|
15867
16092
|
*
|
|
15868
|
-
* Surface size is reported in
|
|
15869
|
-
*
|
|
16093
|
+
* Surface size is reported in ”application pixels”, not
|
|
16094
|
+
* ”device pixels” (see `gdk_surface_get_scale_factor()`).
|
|
15870
16095
|
* @signal
|
|
15871
16096
|
* @run-first
|
|
15872
16097
|
*/
|
|
@@ -15911,7 +16136,7 @@ export namespace Gdk {
|
|
|
15911
16136
|
/**
|
|
15912
16137
|
* Represents a rectangular region on the screen.
|
|
15913
16138
|
*
|
|
15914
|
-
* It
|
|
16139
|
+
* It’s a low-level object, used to implement high-level objects
|
|
15915
16140
|
* such as [GtkWindow](../gtk4/class.Window.html).
|
|
15916
16141
|
*
|
|
15917
16142
|
* The surfaces you see in practice are either {@link Gdk.Toplevel} or
|
|
@@ -16040,6 +16265,7 @@ export namespace Gdk {
|
|
|
16040
16265
|
/**
|
|
16041
16266
|
* Creates a new {@link Gdk.CairoContext} for rendering on `surface`.
|
|
16042
16267
|
* @returns the newly created {@link Gdk.CairoContext}
|
|
16268
|
+
* @deprecated since 4.18: Drawing content with Cairo should be done via Cairo rendernodes, not by using the Cairo renderer.
|
|
16043
16269
|
*/
|
|
16044
16270
|
create_cairo_context(): CairoContext;
|
|
16045
16271
|
|
|
@@ -16068,18 +16294,20 @@ export namespace Gdk {
|
|
|
16068
16294
|
* have transparency, black otherwise.)
|
|
16069
16295
|
*
|
|
16070
16296
|
* This function always returns a valid pointer, but it will return a
|
|
16071
|
-
* pointer to a
|
|
16297
|
+
* pointer to a “nil” surface if `other` is already in an error state
|
|
16072
16298
|
* or any other error occurs.
|
|
16073
16299
|
* @param content the content for the new surface
|
|
16074
16300
|
* @param width width of the new surface
|
|
16075
16301
|
* @param height height of the new surface
|
|
16076
16302
|
* @returns a pointer to the newly allocated surface. The caller owns the surface and should call `cairo_surface_destroy()` when done with it.
|
|
16303
|
+
* @deprecated since 4.12: Create a suitable cairo image surface yourself
|
|
16077
16304
|
*/
|
|
16078
16305
|
create_similar_surface(content: cairo.Content, width: number, height: number): cairo.Surface;
|
|
16079
16306
|
|
|
16080
16307
|
/**
|
|
16081
16308
|
* Sets an error and returns `null`.
|
|
16082
16309
|
* @returns `null`
|
|
16310
|
+
* @deprecated since 4.14: GTK does not expose any Vulkan internals. This function is a leftover that was accidentally exposed.
|
|
16083
16311
|
*/
|
|
16084
16312
|
create_vulkan_context(): VulkanContext;
|
|
16085
16313
|
|
|
@@ -16088,7 +16316,7 @@ export namespace Gdk {
|
|
|
16088
16316
|
* decrements `surface`'s reference count.
|
|
16089
16317
|
*
|
|
16090
16318
|
* The window system resources for all children of `surface` are also
|
|
16091
|
-
* destroyed, but the children
|
|
16319
|
+
* destroyed, but the children’s reference counts are not decremented.
|
|
16092
16320
|
*
|
|
16093
16321
|
* Note that a surface will not be destroyed automatically when its
|
|
16094
16322
|
* reference count reaches zero. You must call this function yourself
|
|
@@ -16149,8 +16377,8 @@ export namespace Gdk {
|
|
|
16149
16377
|
/**
|
|
16150
16378
|
* Returns the height of the given `surface`.
|
|
16151
16379
|
*
|
|
16152
|
-
* Surface size is reported in
|
|
16153
|
-
*
|
|
16380
|
+
* Surface size is reported in ”application pixels”, not
|
|
16381
|
+
* ”device pixels” (see {@link Gdk.Surface.get_scale_factor}).
|
|
16154
16382
|
* @returns The height of `surface`
|
|
16155
16383
|
*/
|
|
16156
16384
|
get_height(): number;
|
|
@@ -16177,6 +16405,7 @@ export namespace Gdk {
|
|
|
16177
16405
|
*
|
|
16178
16406
|
* The scale may change during the lifetime of the surface.
|
|
16179
16407
|
* @returns the scale
|
|
16408
|
+
* @since 4.12
|
|
16180
16409
|
*/
|
|
16181
16410
|
get_scale(): number;
|
|
16182
16411
|
|
|
@@ -16199,8 +16428,8 @@ export namespace Gdk {
|
|
|
16199
16428
|
/**
|
|
16200
16429
|
* Returns the width of the given `surface`.
|
|
16201
16430
|
*
|
|
16202
|
-
* Surface size is reported in
|
|
16203
|
-
*
|
|
16431
|
+
* Surface size is reported in ”application pixels”, not
|
|
16432
|
+
* ”device pixels” (see {@link Gdk.Surface.get_scale_factor}).
|
|
16204
16433
|
* @returns The width of `surface`
|
|
16205
16434
|
*/
|
|
16206
16435
|
get_width(): number;
|
|
@@ -16210,7 +16439,7 @@ export namespace Gdk {
|
|
|
16210
16439
|
*
|
|
16211
16440
|
* For toplevel surfaces, withdraws them, so they will no longer be
|
|
16212
16441
|
* known to the window manager; for all surfaces, unmaps them, so
|
|
16213
|
-
* they won
|
|
16442
|
+
* they won’t be displayed. Normally done automatically as
|
|
16214
16443
|
* part of [gtk_widget_hide()](../gtk4/method.Widget.hide.html).
|
|
16215
16444
|
*/
|
|
16216
16445
|
hide(): void;
|
|
@@ -16274,7 +16503,7 @@ export namespace Gdk {
|
|
|
16274
16503
|
* An input region is typically used with RGBA surfaces. The alpha
|
|
16275
16504
|
* channel of the surface defines which pixels are invisible and
|
|
16276
16505
|
* allows for nicely antialiased borders, and the input region
|
|
16277
|
-
* controls where the surface is
|
|
16506
|
+
* controls where the surface is “clickable”.
|
|
16278
16507
|
*
|
|
16279
16508
|
* Use {@link Gdk.Display.supports_input_shapes} to find out if
|
|
16280
16509
|
* a particular backend supports input regions.
|
|
@@ -16299,6 +16528,7 @@ export namespace Gdk {
|
|
|
16299
16528
|
* background is not opaque, please update this property in your
|
|
16300
16529
|
* [GtkWidgetClass.css_changed](../gtk4/vfunc.Widget.css_changed.html) handler.
|
|
16301
16530
|
* @param region a region, or `null` to make the entire surface opaque
|
|
16531
|
+
* @deprecated since 4.16: GDK can figure out the opaque parts of a window itself by inspecting the contents that are drawn.
|
|
16302
16532
|
*/
|
|
16303
16533
|
set_opaque_region(region: cairo.Region | null): void;
|
|
16304
16534
|
|
|
@@ -16463,6 +16693,7 @@ export namespace Gdk {
|
|
|
16463
16693
|
/**
|
|
16464
16694
|
* Returns the color state associated with the texture.
|
|
16465
16695
|
* @returns the color state of the {@link Gdk.Texture}
|
|
16696
|
+
* @since 4.16
|
|
16466
16697
|
*/
|
|
16467
16698
|
get_color_state(): ColorState;
|
|
16468
16699
|
|
|
@@ -16477,6 +16708,7 @@ export namespace Gdk {
|
|
|
16477
16708
|
* of the texture and is useful to determine the best format for
|
|
16478
16709
|
* downloading the texture.
|
|
16479
16710
|
* @returns the preferred format for the texture's data
|
|
16711
|
+
* @since 4.10
|
|
16480
16712
|
*/
|
|
16481
16713
|
get_format(): MemoryFormat;
|
|
16482
16714
|
|
|
@@ -16521,6 +16753,7 @@ export namespace Gdk {
|
|
|
16521
16753
|
* might also want to consider {@link Gdk.Texture.save_to_tiff_bytes}
|
|
16522
16754
|
* instead.
|
|
16523
16755
|
* @returns a newly allocated {@link GLib.Bytes} containing PNG data
|
|
16756
|
+
* @since 4.6
|
|
16524
16757
|
*/
|
|
16525
16758
|
save_to_png_bytes(): GLib.Bytes;
|
|
16526
16759
|
|
|
@@ -16530,6 +16763,7 @@ export namespace Gdk {
|
|
|
16530
16763
|
* GTK will attempt to store data without loss.
|
|
16531
16764
|
* @param filename the filename to store to
|
|
16532
16765
|
* @returns `true` if saving succeeded, `false` on failure.
|
|
16766
|
+
* @since 4.6
|
|
16533
16767
|
*/
|
|
16534
16768
|
save_to_tiff(filename: string): boolean;
|
|
16535
16769
|
|
|
@@ -16547,6 +16781,7 @@ export namespace Gdk {
|
|
|
16547
16781
|
* smaller size and a more portable format, you might want to
|
|
16548
16782
|
* use {@link Gdk.Texture.save_to_png_bytes}.
|
|
16549
16783
|
* @returns a newly allocated {@link GLib.Bytes} containing TIFF data
|
|
16784
|
+
* @since 4.6
|
|
16550
16785
|
*/
|
|
16551
16786
|
save_to_tiff_bytes(): GLib.Bytes;
|
|
16552
16787
|
|
|
@@ -16787,6 +17022,7 @@ export namespace Gdk {
|
|
|
16787
17022
|
* makes sense to transfer the {@link GLib.Variant} between processes on the same machine,
|
|
16788
17023
|
* (as opposed to over the network), and within the same file system namespace.
|
|
16789
17024
|
* @returns a {@link GLib.Variant}, or `null` when serialization fails. The {@link GLib.Variant} will not be floating.
|
|
17025
|
+
* @since 2.38
|
|
16790
17026
|
*/
|
|
16791
17027
|
serialize(): GLib.Variant | null;
|
|
16792
17028
|
|
|
@@ -16808,6 +17044,7 @@ export namespace Gdk {
|
|
|
16808
17044
|
* - If `icon` is a {@link Gio.ThemedIcon} with exactly one name and no fallbacks,
|
|
16809
17045
|
* the encoding is simply the name (such as `network-server`).
|
|
16810
17046
|
* @returns An allocated NUL-terminated UTF8 string or `null` if `icon` can't be serialized. Use `g_free()` to free.
|
|
17047
|
+
* @since 2.20
|
|
16811
17048
|
*/
|
|
16812
17049
|
to_string(): string | null;
|
|
16813
17050
|
|
|
@@ -16830,6 +17067,7 @@ export namespace Gdk {
|
|
|
16830
17067
|
* As serialization will avoid using raw icon data when possible, it only
|
|
16831
17068
|
* makes sense to transfer the {@link GLib.Variant} between processes on the same machine,
|
|
16832
17069
|
* (as opposed to over the network), and within the same file system namespace.
|
|
17070
|
+
* @since 2.38
|
|
16833
17071
|
* @virtual
|
|
16834
17072
|
*/
|
|
16835
17073
|
vfunc_serialize(): GLib.Variant | null;
|
|
@@ -16837,6 +17075,7 @@ export namespace Gdk {
|
|
|
16837
17075
|
/**
|
|
16838
17076
|
* Serializes the `icon` into string tokens.
|
|
16839
17077
|
* This is can be invoked when `g_icon_new_for_string()` is called.
|
|
17078
|
+
* @since 2.20
|
|
16840
17079
|
* @virtual
|
|
16841
17080
|
*/
|
|
16842
17081
|
vfunc_to_tokens(): [boolean, string[], number];
|
|
@@ -17081,11 +17320,26 @@ export namespace Gdk {
|
|
|
17081
17320
|
}
|
|
17082
17321
|
|
|
17083
17322
|
|
|
17323
|
+
/**
|
|
17324
|
+
* @gir-type Alias
|
|
17325
|
+
*/
|
|
17326
|
+
type AppLaunchContextClass = typeof AppLaunchContext;
|
|
17327
|
+
|
|
17328
|
+
/**
|
|
17329
|
+
* @gir-type Alias
|
|
17330
|
+
*/
|
|
17331
|
+
type CairoContextClass = typeof CairoContext;
|
|
17332
|
+
|
|
17084
17333
|
/**
|
|
17085
17334
|
* @gir-type Alias
|
|
17086
17335
|
*/
|
|
17087
17336
|
type CicpParamsClass = typeof CicpParams;
|
|
17088
17337
|
|
|
17338
|
+
/**
|
|
17339
|
+
* @gir-type Alias
|
|
17340
|
+
*/
|
|
17341
|
+
type ClipboardClass = typeof Clipboard;
|
|
17342
|
+
|
|
17089
17343
|
/**
|
|
17090
17344
|
* Provides information to interpret colors and pixels in a variety of ways.
|
|
17091
17345
|
*
|
|
@@ -17107,6 +17361,7 @@ export namespace Gdk {
|
|
|
17107
17361
|
* Returns the color state object representing the oklab color space.
|
|
17108
17362
|
*
|
|
17109
17363
|
* This is a perceptually uniform color state.
|
|
17364
|
+
* @since 4.18
|
|
17110
17365
|
*/
|
|
17111
17366
|
static get_oklab(): ColorState;
|
|
17112
17367
|
|
|
@@ -17115,6 +17370,7 @@ export namespace Gdk {
|
|
|
17115
17370
|
*
|
|
17116
17371
|
* This is the polar variant of oklab, in which the hue is encoded as
|
|
17117
17372
|
* a polar coordinate.
|
|
17373
|
+
* @since 4.18
|
|
17118
17374
|
*/
|
|
17119
17375
|
static get_oklch(): ColorState;
|
|
17120
17376
|
|
|
@@ -17128,6 +17384,7 @@ export namespace Gdk {
|
|
|
17128
17384
|
*
|
|
17129
17385
|
* See e.g. [the CSS HDR Module](https://drafts.csswg.org/css-color-hdr/#valdef-color-rec2100-linear)
|
|
17130
17386
|
* for details about this colorstate.
|
|
17387
|
+
* @since 4.16
|
|
17131
17388
|
*/
|
|
17132
17389
|
static get_rec2100_linear(): ColorState;
|
|
17133
17390
|
|
|
@@ -17141,6 +17398,7 @@ export namespace Gdk {
|
|
|
17141
17398
|
*
|
|
17142
17399
|
* See e.g. [the CSS HDR Module](https://drafts.csswg.org/css-color-hdr/#valdef-color-rec2100-pq)
|
|
17143
17400
|
* for details about this colorstate.
|
|
17401
|
+
* @since 4.16
|
|
17144
17402
|
*/
|
|
17145
17403
|
static get_rec2100_pq(): ColorState;
|
|
17146
17404
|
|
|
@@ -17154,6 +17412,7 @@ export namespace Gdk {
|
|
|
17154
17412
|
*
|
|
17155
17413
|
* See e.g. [the CSS Color Module](https://www.w3.org/TR/css-color-4/#predefined-sRGB)
|
|
17156
17414
|
* for details about this colorstate.
|
|
17415
|
+
* @since 4.16
|
|
17157
17416
|
*/
|
|
17158
17417
|
static get_srgb(): ColorState;
|
|
17159
17418
|
|
|
@@ -17166,6 +17425,7 @@ export namespace Gdk {
|
|
|
17166
17425
|
*
|
|
17167
17426
|
* See e.g. [the CSS Color Module](https://www.w3.org/TR/css-color-4/#predefined-sRGB-linear)
|
|
17168
17427
|
* for details about this colorstate.
|
|
17428
|
+
* @since 4.16
|
|
17169
17429
|
*/
|
|
17170
17430
|
static get_srgb_linear(): ColorState;
|
|
17171
17431
|
|
|
@@ -17177,6 +17437,7 @@ export namespace Gdk {
|
|
|
17177
17437
|
* represented with Cicp parameters. If that is the case,
|
|
17178
17438
|
* this function returns `NULL`.
|
|
17179
17439
|
* @returns A new {@link Gdk.CicpParams}
|
|
17440
|
+
* @since 4.16
|
|
17180
17441
|
*/
|
|
17181
17442
|
create_cicp_params(): CicpParams | null;
|
|
17182
17443
|
|
|
@@ -17188,6 +17449,7 @@ export namespace Gdk {
|
|
|
17188
17449
|
* color states will never compare equal.
|
|
17189
17450
|
* @param other another `GdkColorStatee`
|
|
17190
17451
|
* @returns `true` if the two color states compare equal
|
|
17452
|
+
* @since 4.16
|
|
17191
17453
|
*/
|
|
17192
17454
|
equal(other: ColorState): boolean;
|
|
17193
17455
|
|
|
@@ -17198,12 +17460,14 @@ export namespace Gdk {
|
|
|
17198
17460
|
* even though they may not be equal in the sense of {@link Gdk.ColorState.equal}.
|
|
17199
17461
|
* @param other another `GdkColorStatee`
|
|
17200
17462
|
* @returns `true` if the two color states are equivalent
|
|
17463
|
+
* @since 4.20
|
|
17201
17464
|
*/
|
|
17202
17465
|
equivalent(other: ColorState): boolean;
|
|
17203
17466
|
|
|
17204
17467
|
/**
|
|
17205
17468
|
* Increase the reference count of `self`.
|
|
17206
17469
|
* @returns the object that was passed in
|
|
17470
|
+
* @since 4.16
|
|
17207
17471
|
*/
|
|
17208
17472
|
ref(): ColorState;
|
|
17209
17473
|
|
|
@@ -17212,11 +17476,17 @@ export namespace Gdk {
|
|
|
17212
17476
|
*
|
|
17213
17477
|
* Unless `self` is static, it will be freed
|
|
17214
17478
|
* when the reference count reaches zero.
|
|
17479
|
+
* @since 4.16
|
|
17215
17480
|
*/
|
|
17216
17481
|
unref(): void;
|
|
17217
17482
|
}
|
|
17218
17483
|
|
|
17219
17484
|
|
|
17485
|
+
/**
|
|
17486
|
+
* @gir-type Alias
|
|
17487
|
+
*/
|
|
17488
|
+
type ContentDeserializerClass = typeof ContentDeserializer;
|
|
17489
|
+
|
|
17220
17490
|
/**
|
|
17221
17491
|
* Used to advertise and negotiate the format of content.
|
|
17222
17492
|
*
|
|
@@ -17272,6 +17542,7 @@ export namespace Gdk {
|
|
|
17272
17542
|
* If `string` does not describe valid content formats, `null`
|
|
17273
17543
|
* is returned.
|
|
17274
17544
|
* @param string the string to parse
|
|
17545
|
+
* @since 4.4
|
|
17275
17546
|
*/
|
|
17276
17547
|
static parse(string: string): ContentFormats | null;
|
|
17277
17548
|
|
|
@@ -17311,6 +17582,7 @@ export namespace Gdk {
|
|
|
17311
17582
|
/**
|
|
17312
17583
|
* Returns whether the content formats contain any formats.
|
|
17313
17584
|
* @returns true if `formats` contains no mime types and no GTypes
|
|
17585
|
+
* @since 4.18
|
|
17314
17586
|
*/
|
|
17315
17587
|
is_empty(): boolean;
|
|
17316
17588
|
|
|
@@ -17477,11 +17749,49 @@ export namespace Gdk {
|
|
|
17477
17749
|
*/
|
|
17478
17750
|
type ContentProviderClass = typeof ContentProvider;
|
|
17479
17751
|
|
|
17752
|
+
/**
|
|
17753
|
+
* @gir-type Alias
|
|
17754
|
+
*/
|
|
17755
|
+
type ContentSerializerClass = typeof ContentSerializer;
|
|
17756
|
+
|
|
17757
|
+
/**
|
|
17758
|
+
* @gir-type Alias
|
|
17759
|
+
*/
|
|
17760
|
+
type CursorClass = typeof Cursor;
|
|
17761
|
+
|
|
17762
|
+
/**
|
|
17763
|
+
* @gir-type Alias
|
|
17764
|
+
*/
|
|
17765
|
+
type DeviceClass = typeof Device;
|
|
17766
|
+
|
|
17767
|
+
/**
|
|
17768
|
+
* @gir-type Struct
|
|
17769
|
+
*/
|
|
17770
|
+
abstract class DevicePadClass {
|
|
17771
|
+
static $gtype: GObject.GType<DevicePadClass>;
|
|
17772
|
+
}
|
|
17773
|
+
|
|
17774
|
+
|
|
17480
17775
|
/**
|
|
17481
17776
|
* @gir-type Alias
|
|
17482
17777
|
*/
|
|
17483
17778
|
type DevicePadInterface = typeof DevicePad;
|
|
17484
17779
|
|
|
17780
|
+
/**
|
|
17781
|
+
* @gir-type Alias
|
|
17782
|
+
*/
|
|
17783
|
+
type DeviceToolClass = typeof DeviceTool;
|
|
17784
|
+
|
|
17785
|
+
/**
|
|
17786
|
+
* @gir-type Alias
|
|
17787
|
+
*/
|
|
17788
|
+
type DisplayClass = typeof Display;
|
|
17789
|
+
|
|
17790
|
+
/**
|
|
17791
|
+
* @gir-type Alias
|
|
17792
|
+
*/
|
|
17793
|
+
type DisplayManagerClass = typeof DisplayManager;
|
|
17794
|
+
|
|
17485
17795
|
/**
|
|
17486
17796
|
* Provides information about supported DMA buffer formats.
|
|
17487
17797
|
*
|
|
@@ -17514,6 +17824,7 @@ export namespace Gdk {
|
|
|
17514
17824
|
* @param fourcc a format code
|
|
17515
17825
|
* @param modifier a format modifier
|
|
17516
17826
|
* @returns `TRUE` if the format specified by the arguments is part of `formats`
|
|
17827
|
+
* @since 4.14
|
|
17517
17828
|
*/
|
|
17518
17829
|
contains(fourcc: number, modifier: bigint | number): boolean;
|
|
17519
17830
|
|
|
@@ -17522,6 +17833,7 @@ export namespace Gdk {
|
|
|
17522
17833
|
* same dmabuf formats, in the same order.
|
|
17523
17834
|
* @param formats2 another {@link Gdk.DmabufFormats}
|
|
17524
17835
|
* @returns `TRUE` if `formats1` and `formats2` are equal
|
|
17836
|
+
* @since 4.14
|
|
17525
17837
|
*/
|
|
17526
17838
|
equal(formats2: DmabufFormats | null): boolean;
|
|
17527
17839
|
|
|
@@ -17529,6 +17841,7 @@ export namespace Gdk {
|
|
|
17529
17841
|
* Gets the fourcc code and modifier for a format
|
|
17530
17842
|
* that is contained in `formats`.
|
|
17531
17843
|
* @param idx the index of the format to return
|
|
17844
|
+
* @since 4.14
|
|
17532
17845
|
*/
|
|
17533
17846
|
get_format(idx: bigint | number): [number, number];
|
|
17534
17847
|
|
|
@@ -17540,12 +17853,14 @@ export namespace Gdk {
|
|
|
17540
17853
|
* platforms, {@link Gdk.DmabufFormats.get_n_formats} will
|
|
17541
17854
|
* always return zero.
|
|
17542
17855
|
* @returns the number of formats
|
|
17856
|
+
* @since 4.14
|
|
17543
17857
|
*/
|
|
17544
17858
|
get_n_formats(): number;
|
|
17545
17859
|
|
|
17546
17860
|
/**
|
|
17547
17861
|
* Increases the reference count of `formats`.
|
|
17548
17862
|
* @returns the passed-in object
|
|
17863
|
+
* @since 4.14
|
|
17549
17864
|
*/
|
|
17550
17865
|
ref(): DmabufFormats;
|
|
17551
17866
|
|
|
@@ -17554,6 +17869,7 @@ export namespace Gdk {
|
|
|
17554
17869
|
*
|
|
17555
17870
|
* When the reference count reaches zero,
|
|
17556
17871
|
* the object is freed.
|
|
17872
|
+
* @since 4.14
|
|
17557
17873
|
*/
|
|
17558
17874
|
unref(): void;
|
|
17559
17875
|
}
|
|
@@ -17569,6 +17885,11 @@ export namespace Gdk {
|
|
|
17569
17885
|
*/
|
|
17570
17886
|
type DmabufTextureClass = typeof DmabufTexture;
|
|
17571
17887
|
|
|
17888
|
+
/**
|
|
17889
|
+
* @gir-type Alias
|
|
17890
|
+
*/
|
|
17891
|
+
type DragClass = typeof Drag;
|
|
17892
|
+
|
|
17572
17893
|
/**
|
|
17573
17894
|
* @gir-type Alias
|
|
17574
17895
|
*/
|
|
@@ -17587,11 +17908,22 @@ export namespace Gdk {
|
|
|
17587
17908
|
* Sets the size the drag surface prefers to be resized to.
|
|
17588
17909
|
* @param width the width
|
|
17589
17910
|
* @param height the height
|
|
17911
|
+
* @since 4.12
|
|
17590
17912
|
*/
|
|
17591
17913
|
set_size(width: number, height: number): void;
|
|
17592
17914
|
}
|
|
17593
17915
|
|
|
17594
17916
|
|
|
17917
|
+
/**
|
|
17918
|
+
* @gir-type Alias
|
|
17919
|
+
*/
|
|
17920
|
+
type DrawContextClass = typeof DrawContext;
|
|
17921
|
+
|
|
17922
|
+
/**
|
|
17923
|
+
* @gir-type Alias
|
|
17924
|
+
*/
|
|
17925
|
+
type DropClass = typeof Drop;
|
|
17926
|
+
|
|
17595
17927
|
/**
|
|
17596
17928
|
* An opaque type representing a sequence of related events.
|
|
17597
17929
|
* @gir-type Struct
|
|
@@ -17622,6 +17954,7 @@ export namespace Gdk {
|
|
|
17622
17954
|
*
|
|
17623
17955
|
* This function is meant for language bindings.
|
|
17624
17956
|
* @returns the files inside the list
|
|
17957
|
+
* @since 4.6
|
|
17625
17958
|
*/
|
|
17626
17959
|
get_files(): Gio.File[];
|
|
17627
17960
|
}
|
|
@@ -17633,21 +17966,13 @@ export namespace Gdk {
|
|
|
17633
17966
|
type FrameClockClass = typeof FrameClock;
|
|
17634
17967
|
|
|
17635
17968
|
/**
|
|
17636
|
-
*
|
|
17637
|
-
*/
|
|
17638
|
-
abstract class FrameClockPrivate {
|
|
17639
|
-
static $gtype: GObject.GType<FrameClockPrivate>;
|
|
17640
|
-
}
|
|
17641
|
-
|
|
17642
|
-
|
|
17643
|
-
/**
|
|
17644
|
-
* Holds timing information for a single frame of the application’s displays.
|
|
17969
|
+
* Holds timing information for a single frame of the application’s displays.
|
|
17645
17970
|
*
|
|
17646
17971
|
* To retrieve {@link Gdk.FrameTimings} objects, use {@link Gdk.FrameClock.get_timings}
|
|
17647
17972
|
* or {@link Gdk.FrameClock.get_current_timings}. The information in
|
|
17648
17973
|
* {@link Gdk.FrameTimings} is useful for precise synchronization of video with
|
|
17649
17974
|
* the event or audio streams, and for measuring quality metrics for the
|
|
17650
|
-
* application
|
|
17975
|
+
* application’s display, such as latency and jitter.
|
|
17651
17976
|
* @gir-type Struct
|
|
17652
17977
|
*/
|
|
17653
17978
|
abstract class FrameTimings {
|
|
@@ -17717,12 +18042,28 @@ export namespace Gdk {
|
|
|
17717
18042
|
* Gets the natural interval between presentation times for
|
|
17718
18043
|
* the display that this frame was displayed on.
|
|
17719
18044
|
*
|
|
17720
|
-
* Frame presentation usually happens during the
|
|
17721
|
-
* blanking interval
|
|
18045
|
+
* Frame presentation usually happens during the “vertical
|
|
18046
|
+
* blanking interval”.
|
|
17722
18047
|
* @returns the refresh interval of the display, in microseconds, or 0 if the refresh interval is not available. See {@link Gdk.FrameTimings.get_complete}.
|
|
17723
18048
|
*/
|
|
17724
18049
|
get_refresh_interval(): number;
|
|
17725
18050
|
|
|
18051
|
+
/**
|
|
18052
|
+
* Gets the result of the frame cycle that recorded these timings.
|
|
18053
|
+
*
|
|
18054
|
+
* The timing information in a {@link Gdk.FrameTimings} is filled in
|
|
18055
|
+
* incrementally as the frame as drawn and passed off to the
|
|
18056
|
+
* window system for processing and display to the user. The
|
|
18057
|
+
* accessor functions for {@link Gdk.FrameTimings} can return 0 to
|
|
18058
|
+
* indicate an unavailable value for two reasons: either because
|
|
18059
|
+
* the information is not yet available, or because it isn't
|
|
18060
|
+
* available at all. Looking at the result of the timings gives
|
|
18061
|
+
* an explanation for why a value is not available.
|
|
18062
|
+
* @returns The result of the frame these timings have been recorded for.
|
|
18063
|
+
* @since 4.24
|
|
18064
|
+
*/
|
|
18065
|
+
get_result(): FrameResult;
|
|
18066
|
+
|
|
17726
18067
|
/**
|
|
17727
18068
|
* Increases the reference count of `timings`.
|
|
17728
18069
|
* @returns `timings`
|
|
@@ -17738,6 +18079,11 @@ export namespace Gdk {
|
|
|
17738
18079
|
}
|
|
17739
18080
|
|
|
17740
18081
|
|
|
18082
|
+
/**
|
|
18083
|
+
* @gir-type Alias
|
|
18084
|
+
*/
|
|
18085
|
+
type GLContextClass = typeof GLContext;
|
|
18086
|
+
|
|
17741
18087
|
/**
|
|
17742
18088
|
* @gir-type Alias
|
|
17743
18089
|
*/
|
|
@@ -17880,6 +18226,7 @@ export namespace Gdk {
|
|
|
17880
18226
|
|
|
17881
18227
|
/**
|
|
17882
18228
|
* Obtains the shadow widths of this layout.
|
|
18229
|
+
* @since 4.2
|
|
17883
18230
|
*/
|
|
17884
18231
|
get_shadow_width(): [number, number, number, number];
|
|
17885
18232
|
|
|
@@ -17936,6 +18283,7 @@ export namespace Gdk {
|
|
|
17936
18283
|
* @param right width of the right part of the shadow
|
|
17937
18284
|
* @param top height of the top part of the shadow
|
|
17938
18285
|
* @param bottom height of the bottom part of the shadow
|
|
18286
|
+
* @since 4.2
|
|
17939
18287
|
*/
|
|
17940
18288
|
set_shadow_width(left: number, right: number, top: number, bottom: number): void;
|
|
17941
18289
|
|
|
@@ -17953,10 +18301,10 @@ export namespace Gdk {
|
|
|
17953
18301
|
|
|
17954
18302
|
|
|
17955
18303
|
/**
|
|
17956
|
-
* Represents a color, in a way that is compatible with cairo
|
|
18304
|
+
* Represents a color, in a way that is compatible with cairo’s notion of color.
|
|
17957
18305
|
*
|
|
17958
|
-
* {@link Gdk.RGBA} is a convenient way to pass colors around. It
|
|
17959
|
-
* cairo
|
|
18306
|
+
* {@link Gdk.RGBA} is a convenient way to pass colors around. It’s based on
|
|
18307
|
+
* cairo’s way to deal with colors and mirrors its behavior. All values
|
|
17960
18308
|
* are in the range from 0.0 to 1.0 inclusive. So the color
|
|
17961
18309
|
* (0.0, 0.0, 0.0, 0.0) represents transparent black and
|
|
17962
18310
|
* (1.0, 1.0, 1.0, 1.0) is opaque white. Other values will
|
|
@@ -18035,22 +18383,22 @@ export namespace Gdk {
|
|
|
18035
18383
|
* The string can be either one of:
|
|
18036
18384
|
*
|
|
18037
18385
|
* - A standard name (Taken from the CSS specification).
|
|
18038
|
-
* - A hexadecimal value in the form
|
|
18039
|
-
*
|
|
18040
|
-
* - A hexadecimal value in the form
|
|
18041
|
-
* or
|
|
18042
|
-
* - A RGB color in the form
|
|
18386
|
+
* - A hexadecimal value in the form “\#rgb”, “\#rrggbb”,
|
|
18387
|
+
* “\#rrrgggbbb” or ”\#rrrrggggbbbb”
|
|
18388
|
+
* - A hexadecimal value in the form “\#rgba”, “\#rrggbbaa”,
|
|
18389
|
+
* or ”\#rrrrggggbbbbaaaa”
|
|
18390
|
+
* - A RGB color in the form “rgb(r,g,b)” (In this case the color
|
|
18043
18391
|
* will have full opacity)
|
|
18044
|
-
* - A RGBA color in the form
|
|
18045
|
-
* - A HSL color in the form
|
|
18046
|
-
* - A HSLA color in the form
|
|
18392
|
+
* - A RGBA color in the form “rgba(r,g,b,a)”
|
|
18393
|
+
* - A HSL color in the form “hsl(h,s,l)”
|
|
18394
|
+
* - A HSLA color in the form “hsla(h,s,l,a)”
|
|
18047
18395
|
*
|
|
18048
|
-
* Where
|
|
18049
|
-
* blue and alpha color values. In the last two cases,
|
|
18050
|
-
* and
|
|
18396
|
+
* Where “r”, “g”, “b” and “a” are respectively the red, green,
|
|
18397
|
+
* blue and alpha color values. In the last two cases, “r”, “g”,
|
|
18398
|
+
* and “b” are either integers in the range 0 to 255 or percentage
|
|
18051
18399
|
* values in the range 0% to 100%, and a is a floating point value
|
|
18052
|
-
* in the range 0 to 1. The range for
|
|
18053
|
-
*
|
|
18400
|
+
* in the range 0 to 1. The range for “h” is 0 to 360, and
|
|
18401
|
+
* “s”, “l” can be either numbers in the range 0 to 100 or
|
|
18054
18402
|
* percentages.
|
|
18055
18403
|
* @param spec the string specifying the color
|
|
18056
18404
|
* @returns `true` if the parsing succeeded
|
|
@@ -18058,23 +18406,26 @@ export namespace Gdk {
|
|
|
18058
18406
|
parse(spec: string): boolean;
|
|
18059
18407
|
|
|
18060
18408
|
/**
|
|
18061
|
-
*
|
|
18409
|
+
* Appends a representation of `rgba` to `string`.
|
|
18410
|
+
* @param string the string to print to
|
|
18411
|
+
* @returns A newly allocated text string
|
|
18412
|
+
* @since 4.22
|
|
18062
18413
|
*/
|
|
18063
18414
|
print(string: GLib.String): GLib.String;
|
|
18064
18415
|
|
|
18065
18416
|
/**
|
|
18066
18417
|
* Returns a textual specification of `rgba` in the form
|
|
18067
|
-
* `rgb(r,g,b)` or `rgba(r,g,b,a)`, where
|
|
18068
|
-
*
|
|
18069
|
-
* respectively.
|
|
18070
|
-
* in the range 0 to 255, and
|
|
18418
|
+
* `rgb(r,g,b)` or `rgba(r,g,b,a)`, where “r”, “g”, “b” and
|
|
18419
|
+
* “a” represent the red, green, blue and alpha values
|
|
18420
|
+
* respectively. “r”, “g”, and “b” are represented as integers
|
|
18421
|
+
* in the range 0 to 255, and “a” is represented as a floating
|
|
18071
18422
|
* point value in the range 0 to 1.
|
|
18072
18423
|
*
|
|
18073
18424
|
* These string forms are string forms that are supported by
|
|
18074
18425
|
* the CSS3 colors module, and can be parsed by {@link Gdk.RGBA.parse}.
|
|
18075
18426
|
*
|
|
18076
18427
|
* Note that this string representation may lose some precision,
|
|
18077
|
-
* since
|
|
18428
|
+
* since “r”, “g” and “b” are represented as 8-bit integers. If
|
|
18078
18429
|
* this is a concern, you should use a different representation.
|
|
18079
18430
|
* @returns A newly allocated text string
|
|
18080
18431
|
*/
|
|
@@ -18085,7 +18436,7 @@ export namespace Gdk {
|
|
|
18085
18436
|
/**
|
|
18086
18437
|
* Represents a rectangle.
|
|
18087
18438
|
*
|
|
18088
|
-
* {@link Gdk.Rectangle} is identical to `cairo_rectangle_t`. Together with Cairo
|
|
18439
|
+
* {@link Gdk.Rectangle} is identical to `cairo_rectangle_t`. Together with Cairo’s
|
|
18089
18440
|
* `cairo_region_t` data type, these are the central types for representing
|
|
18090
18441
|
* sets of pixels.
|
|
18091
18442
|
*
|
|
@@ -18141,7 +18492,7 @@ export namespace Gdk {
|
|
|
18141
18492
|
* Calculates the intersection of two rectangles.
|
|
18142
18493
|
*
|
|
18143
18494
|
* It is allowed for `dest` to be the same as either `src1` or `src2`.
|
|
18144
|
-
* If the rectangles do not intersect, `dest
|
|
18495
|
+
* If the rectangles do not intersect, `dest`’s width and height is set
|
|
18145
18496
|
* to 0 and its x and y values are undefined. If you are only interested
|
|
18146
18497
|
* in whether the rectangles intersect, but not in the intersecting area
|
|
18147
18498
|
* itself, pass `null` for `dest`.
|
|
@@ -18165,6 +18516,11 @@ export namespace Gdk {
|
|
|
18165
18516
|
}
|
|
18166
18517
|
|
|
18167
18518
|
|
|
18519
|
+
/**
|
|
18520
|
+
* @gir-type Alias
|
|
18521
|
+
*/
|
|
18522
|
+
type SeatClass = typeof Seat;
|
|
18523
|
+
|
|
18168
18524
|
/**
|
|
18169
18525
|
* @gir-type Alias
|
|
18170
18526
|
*/
|
|
@@ -18207,6 +18563,7 @@ export namespace Gdk {
|
|
|
18207
18563
|
*
|
|
18208
18564
|
* This function is meant for language bindings.
|
|
18209
18565
|
* @returns A copy of the downloader
|
|
18566
|
+
* @since 4.10
|
|
18210
18567
|
*/
|
|
18211
18568
|
copy(): TextureDownloader;
|
|
18212
18569
|
|
|
@@ -18222,6 +18579,7 @@ export namespace Gdk {
|
|
|
18222
18579
|
* This function cannot be used with a multiplanar format. Use
|
|
18223
18580
|
* {@link Gdk.TextureDownloader.download_bytes_with_planes} for that purpose.
|
|
18224
18581
|
* @returns The downloaded pixels
|
|
18582
|
+
* @since 4.10
|
|
18225
18583
|
*/
|
|
18226
18584
|
download_bytes(): [GLib.Bytes, number];
|
|
18227
18585
|
|
|
@@ -18232,6 +18590,7 @@ export namespace Gdk {
|
|
|
18232
18590
|
* If the format does have less than 4 planes, the remaining offsets and strides will be
|
|
18233
18591
|
* set to `0`.
|
|
18234
18592
|
* @returns The downloaded pixels
|
|
18593
|
+
* @since 4.20
|
|
18235
18594
|
*/
|
|
18236
18595
|
download_bytes_with_planes(): [GLib.Bytes, number[], number[]];
|
|
18237
18596
|
|
|
@@ -18241,29 +18600,34 @@ export namespace Gdk {
|
|
|
18241
18600
|
* This function cannot be used with a multiplanar format.
|
|
18242
18601
|
* @param data pointer to enough memory to be filled with the downloaded data of the texture
|
|
18243
18602
|
* @param stride rowstride in bytes
|
|
18603
|
+
* @since 4.10
|
|
18244
18604
|
*/
|
|
18245
18605
|
download_into(data: Uint8Array | string, stride: bigint | number): void;
|
|
18246
18606
|
|
|
18247
18607
|
/**
|
|
18248
18608
|
* Frees the given downloader and all its associated resources.
|
|
18609
|
+
* @since 4.10
|
|
18249
18610
|
*/
|
|
18250
18611
|
free(): void;
|
|
18251
18612
|
|
|
18252
18613
|
/**
|
|
18253
18614
|
* Gets the color state that the data will be downloaded in.
|
|
18254
18615
|
* @returns The color state of the download
|
|
18616
|
+
* @since 4.16
|
|
18255
18617
|
*/
|
|
18256
18618
|
get_color_state(): ColorState;
|
|
18257
18619
|
|
|
18258
18620
|
/**
|
|
18259
18621
|
* Gets the format that the data will be downloaded in.
|
|
18260
18622
|
* @returns The format of the download
|
|
18623
|
+
* @since 4.10
|
|
18261
18624
|
*/
|
|
18262
18625
|
get_format(): MemoryFormat;
|
|
18263
18626
|
|
|
18264
18627
|
/**
|
|
18265
18628
|
* Gets the texture that the downloader will download.
|
|
18266
18629
|
* @returns The texture to download
|
|
18630
|
+
* @since 4.10
|
|
18267
18631
|
*/
|
|
18268
18632
|
get_texture(): Texture;
|
|
18269
18633
|
|
|
@@ -18273,6 +18637,7 @@ export namespace Gdk {
|
|
|
18273
18637
|
* By default, the sRGB colorstate returned by {@link ColorState.get_srgb}
|
|
18274
18638
|
* is used.
|
|
18275
18639
|
* @param color_state the color state to use
|
|
18640
|
+
* @since 4.16
|
|
18276
18641
|
*/
|
|
18277
18642
|
set_color_state(color_state: ColorState): void;
|
|
18278
18643
|
|
|
@@ -18281,12 +18646,14 @@ export namespace Gdk {
|
|
|
18281
18646
|
*
|
|
18282
18647
|
* By default, GDK_MEMORY_DEFAULT is set.
|
|
18283
18648
|
* @param format the format to use
|
|
18649
|
+
* @since 4.10
|
|
18284
18650
|
*/
|
|
18285
18651
|
set_format(format: MemoryFormat): void;
|
|
18286
18652
|
|
|
18287
18653
|
/**
|
|
18288
18654
|
* Changes the texture the downloader will download.
|
|
18289
18655
|
* @param texture the new texture to download
|
|
18656
|
+
* @since 4.10
|
|
18290
18657
|
*/
|
|
18291
18658
|
set_texture(texture: Texture): void;
|
|
18292
18659
|
}
|
|
@@ -18481,6 +18848,11 @@ export namespace Gdk {
|
|
|
18481
18848
|
}
|
|
18482
18849
|
|
|
18483
18850
|
|
|
18851
|
+
/**
|
|
18852
|
+
* @gir-type Alias
|
|
18853
|
+
*/
|
|
18854
|
+
type VulkanContextClass = typeof VulkanContext;
|
|
18855
|
+
|
|
18484
18856
|
namespace DevicePad {
|
|
18485
18857
|
|
|
18486
18858
|
// Constructor properties interface
|
|
@@ -19185,7 +19557,7 @@ export namespace Gdk {
|
|
|
19185
19557
|
/**
|
|
19186
19558
|
* Begins an interactive resize operation.
|
|
19187
19559
|
*
|
|
19188
|
-
* You might use this function to implement a
|
|
19560
|
+
* You might use this function to implement a “window resize grip.”
|
|
19189
19561
|
* @param edge the edge or corner from which the drag is started
|
|
19190
19562
|
* @param device the device used for the operation
|
|
19191
19563
|
* @param button the button being used to drag, or 0 for a keyboard-initiated drag
|
|
@@ -19208,6 +19580,7 @@ export namespace Gdk {
|
|
|
19208
19580
|
/**
|
|
19209
19581
|
* The capabilities that are available for this toplevel.
|
|
19210
19582
|
* @returns the capabilities of the {@link Gdk.Toplevel}.
|
|
19583
|
+
* @since 4.20
|
|
19211
19584
|
*/
|
|
19212
19585
|
get_capabilities(): ToplevelCapabilities;
|
|
19213
19586
|
|
|
@@ -19215,6 +19588,7 @@ export namespace Gdk {
|
|
|
19215
19588
|
* Returns the gravity that is used when changing the toplevel
|
|
19216
19589
|
* size programmatically.
|
|
19217
19590
|
* @returns the gravity
|
|
19591
|
+
* @since 4.20
|
|
19218
19592
|
*/
|
|
19219
19593
|
get_gravity(): Gravity;
|
|
19220
19594
|
|
|
@@ -19314,6 +19688,7 @@ export namespace Gdk {
|
|
|
19314
19688
|
* Sets the gravity that is used when changing the toplevel
|
|
19315
19689
|
* size programmatically.
|
|
19316
19690
|
* @param gravity the new gravity
|
|
19691
|
+
* @since 4.20
|
|
19317
19692
|
*/
|
|
19318
19693
|
set_gravity(gravity: Gravity): void;
|
|
19319
19694
|
|
|
@@ -19373,7 +19748,7 @@ export namespace Gdk {
|
|
|
19373
19748
|
* on `parent` and keep `surface` above `parent`.
|
|
19374
19749
|
*
|
|
19375
19750
|
* See [gtk_window_set_transient_for()](../gtk4/method.Window.set_transient_for.html)
|
|
19376
|
-
* if you
|
|
19751
|
+
* if you’re using [GtkWindow](../gtk4/class.Window.html).
|
|
19377
19752
|
* @param parent another toplevel {@link Gdk.Surface}
|
|
19378
19753
|
*/
|
|
19379
19754
|
set_transient_for(parent: Surface): void;
|
|
@@ -19401,6 +19776,7 @@ export namespace Gdk {
|
|
|
19401
19776
|
* Performs a title bar gesture.
|
|
19402
19777
|
* @param gesture a {@link Gdk.TitlebarGesture}
|
|
19403
19778
|
* @returns whether the gesture was performed
|
|
19779
|
+
* @since 4.4
|
|
19404
19780
|
*/
|
|
19405
19781
|
titlebar_gesture(gesture: TitlebarGesture): boolean;
|
|
19406
19782
|
}
|