@girs/cogl-11 4.3.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 +1 -1
- package/cogl-11.d.ts +181 -0
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for Cogl-11 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.
|
|
8
|
+
GJS TypeScript type definitions for Cogl-11 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.4.0.
|
|
9
9
|
|
|
10
10
|
## Install
|
|
11
11
|
|
package/cogl-11.d.ts
CHANGED
|
@@ -1809,27 +1809,32 @@ export namespace Cogl {
|
|
|
1809
1809
|
* Parses an image file enough to extract the width and height
|
|
1810
1810
|
* of the bitmap.
|
|
1811
1811
|
* @param filename the file to check
|
|
1812
|
+
* @since 1.0
|
|
1812
1813
|
*/
|
|
1813
1814
|
static get_size_from_file(filename: string): [boolean, number, number];
|
|
1814
1815
|
|
|
1815
1816
|
// Methods
|
|
1816
1817
|
/**
|
|
1817
1818
|
* @returns the {@link Cogl.PixelFormat} that the data for the bitmap is in.
|
|
1819
|
+
* @since 1.10
|
|
1818
1820
|
*/
|
|
1819
1821
|
get_format(): PixelFormat;
|
|
1820
1822
|
|
|
1821
1823
|
/**
|
|
1822
1824
|
* @returns the height of the bitmap
|
|
1825
|
+
* @since 1.10
|
|
1823
1826
|
*/
|
|
1824
1827
|
get_height(): number;
|
|
1825
1828
|
|
|
1826
1829
|
/**
|
|
1827
1830
|
* @returns the rowstride of the bitmap. This is the number of bytes between the address of start of one row to the address of the next row in the image.
|
|
1831
|
+
* @since 1.10
|
|
1828
1832
|
*/
|
|
1829
1833
|
get_rowstride(): number;
|
|
1830
1834
|
|
|
1831
1835
|
/**
|
|
1832
1836
|
* @returns the width of the bitmap
|
|
1837
|
+
* @since 1.10
|
|
1833
1838
|
*/
|
|
1834
1839
|
get_width(): number;
|
|
1835
1840
|
}
|
|
@@ -1936,6 +1941,7 @@ export namespace Cogl {
|
|
|
1936
1941
|
* Gets the frame counter for the {@link Cogl.Onscreen} that corresponds
|
|
1937
1942
|
* to this frame.
|
|
1938
1943
|
* @returns The frame counter value
|
|
1944
|
+
* @since 1.14
|
|
1939
1945
|
*/
|
|
1940
1946
|
get_frame_counter(): number;
|
|
1941
1947
|
|
|
@@ -1951,6 +1957,7 @@ export namespace Cogl {
|
|
|
1951
1957
|
* <note>Some buggy Mesa drivers up to 9.0.1 may
|
|
1952
1958
|
* incorrectly report non-monotonic timestamps.</note>
|
|
1953
1959
|
* @returns the presentation time for the frame
|
|
1960
|
+
* @since 1.14
|
|
1954
1961
|
*/
|
|
1955
1962
|
get_presentation_time_us(): number;
|
|
1956
1963
|
|
|
@@ -1964,6 +1971,7 @@ export namespace Cogl {
|
|
|
1964
1971
|
* more reliable than using `cogl_frame_info_get_output()` followed by
|
|
1965
1972
|
* `cogl_output_get_refresh_rate()`.</note>
|
|
1966
1973
|
* @returns the refresh rate in Hertz
|
|
1974
|
+
* @since 1.14
|
|
1967
1975
|
*/
|
|
1968
1976
|
get_refresh_rate(): number;
|
|
1969
1977
|
|
|
@@ -2068,6 +2076,7 @@ export namespace Cogl {
|
|
|
2068
2076
|
* used. The disadvantage of relying on automatic allocation is that the
|
|
2069
2077
|
* program will abort with an error message if there is an error during
|
|
2070
2078
|
* automatic allocation.</note>
|
|
2079
|
+
* @since 1.8
|
|
2071
2080
|
* @virtual
|
|
2072
2081
|
*/
|
|
2073
2082
|
vfunc_allocate(): boolean;
|
|
@@ -2090,6 +2099,7 @@ export namespace Cogl {
|
|
|
2090
2099
|
* program will abort with an error message if there is an error during
|
|
2091
2100
|
* automatic allocation.</note>
|
|
2092
2101
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
2102
|
+
* @since 1.8
|
|
2093
2103
|
*/
|
|
2094
2104
|
allocate(): boolean;
|
|
2095
2105
|
|
|
@@ -2098,6 +2108,7 @@ export namespace Cogl {
|
|
|
2098
2108
|
* that includes the color buffer then the specified `color` is used.
|
|
2099
2109
|
* @param buffers A mask of {@link Cogl.BufferBit}<!-- -->'s identifying which auxiliary buffers to clear
|
|
2100
2110
|
* @param color The color to clear the color buffer too if specified in `buffers`.
|
|
2111
|
+
* @since 1.8
|
|
2101
2112
|
*/
|
|
2102
2113
|
clear(buffers: bigint | number, color: Color): void;
|
|
2103
2114
|
|
|
@@ -2109,6 +2120,7 @@ export namespace Cogl {
|
|
|
2109
2120
|
* @param green The green component of color to clear the color buffer too if specified in `buffers`.
|
|
2110
2121
|
* @param blue The blue component of color to clear the color buffer too if specified in `buffers`.
|
|
2111
2122
|
* @param alpha The alpha component of color to clear the color buffer too if specified in `buffers`.
|
|
2123
|
+
* @since 1.8
|
|
2112
2124
|
*/
|
|
2113
2125
|
clear4f(buffers: bigint | number, red: number, green: number, blue: number, alpha: number): void;
|
|
2114
2126
|
|
|
@@ -2130,6 +2142,7 @@ export namespace Cogl {
|
|
|
2130
2142
|
* framebuffer, and it's not meaningful to try and discard the color buffer of
|
|
2131
2143
|
* a {@link Cogl.Offscreen} framebuffer since they are single-buffered.
|
|
2132
2144
|
* @param buffers A {@link Cogl.BufferBit} mask of which ancillary buffers you want to discard.
|
|
2145
|
+
* @since 1.8
|
|
2133
2146
|
*/
|
|
2134
2147
|
discard_buffers(buffers: bigint | number): void;
|
|
2135
2148
|
|
|
@@ -2179,6 +2192,7 @@ export namespace Cogl {
|
|
|
2179
2192
|
* @param y_2 y coordinate lower right on screen.
|
|
2180
2193
|
* @param tex_coords An array containing groups of 4 float values: [s_1, t_1, s_2, t_2] that are interpreted as two texture coordinates; one for the top left texel, and one for the bottom right texel. Each value should be between 0.0 and 1.0, where the coordinate (0.0, 0.0) represents the top left of the texture, and (1.0, 1.0) the bottom right.
|
|
2181
2194
|
* @param tex_coords_len The length of the `tex_coords` array. (For one layer and one group of texture coordinates, this would be 4)
|
|
2195
|
+
* @since 1.10
|
|
2182
2196
|
*/
|
|
2183
2197
|
draw_multitextured_rectangle(pipeline: Pipeline, x_1: number, y_1: number, x_2: number, y_2: number, tex_coords: number[], tex_coords_len: number): void;
|
|
2184
2198
|
|
|
@@ -2199,6 +2213,7 @@ export namespace Cogl {
|
|
|
2199
2213
|
* @param y_1 Y coordinate of the top-left corner
|
|
2200
2214
|
* @param x_2 X coordinate of the bottom-right corner
|
|
2201
2215
|
* @param y_2 Y coordinate of the bottom-right corner
|
|
2216
|
+
* @since 1.10
|
|
2202
2217
|
*/
|
|
2203
2218
|
draw_rectangle(pipeline: Pipeline, x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
2204
2219
|
|
|
@@ -2225,6 +2240,7 @@ export namespace Cogl {
|
|
|
2225
2240
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
2226
2241
|
* @param coordinates an array of coordinates containing groups of 4 float values: [x_1, y_1, x_2, y_2] that are interpreted as two position coordinates; one for the top left of the rectangle (x1, y1), and one for the bottom right of the rectangle (x2, y2).
|
|
2227
2242
|
* @param n_rectangles number of rectangles defined in `coordinates`.
|
|
2243
|
+
* @since 1.10
|
|
2228
2244
|
*/
|
|
2229
2245
|
draw_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
2230
2246
|
|
|
@@ -2264,6 +2280,7 @@ export namespace Cogl {
|
|
|
2264
2280
|
* @param t_1 T texture coordinate of the top-left coorner
|
|
2265
2281
|
* @param s_2 S texture coordinate of the bottom-right coorner
|
|
2266
2282
|
* @param t_2 T texture coordinate of the bottom-right coorner
|
|
2283
|
+
* @since 1.10
|
|
2267
2284
|
*/
|
|
2268
2285
|
draw_textured_rectangle(pipeline: Pipeline, x_1: number, y_1: number, x_2: number, y_2: number, s_1: number, t_1: number, s_2: number, t_2: number): void;
|
|
2269
2286
|
|
|
@@ -2305,6 +2322,7 @@ export namespace Cogl {
|
|
|
2305
2322
|
* @param pipeline A {@link Cogl.Pipeline} state object
|
|
2306
2323
|
* @param coordinates an array containing groups of 8 float values: [x_1, y_1, x_2, y_2, s_1, t_1, s_2, t_2] that have the same meaning as the arguments for `cogl_framebuffer_draw_textured_rectangle()`.
|
|
2307
2324
|
* @param n_rectangles number of rectangles to `coordinates` to draw
|
|
2325
|
+
* @since 1.10
|
|
2308
2326
|
*/
|
|
2309
2327
|
draw_textured_rectangles(pipeline: Pipeline, coordinates: number[], n_rectangles: number): void;
|
|
2310
2328
|
|
|
@@ -2318,6 +2336,7 @@ export namespace Cogl {
|
|
|
2318
2336
|
* One example might be for benchmarking purposes to be sure timing
|
|
2319
2337
|
* measurements reflect the time that the GPU is busy for not just the time it
|
|
2320
2338
|
* takes to queue rendering commands.
|
|
2339
|
+
* @since 1.10
|
|
2321
2340
|
*/
|
|
2322
2341
|
finish(): void;
|
|
2323
2342
|
|
|
@@ -2339,18 +2358,21 @@ export namespace Cogl {
|
|
|
2339
2358
|
* @param top Y position of the top clipping plane where it intersects the near clipping plane
|
|
2340
2359
|
* @param z_near The distance to the near clipping plane (Must be positive)
|
|
2341
2360
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
2361
|
+
* @since 1.10
|
|
2342
2362
|
*/
|
|
2343
2363
|
frustum(left: number, right: number, bottom: number, top: number, z_near: number, z_far: number): void;
|
|
2344
2364
|
|
|
2345
2365
|
/**
|
|
2346
2366
|
* Retrieves the number of alpha bits of `framebuffer`
|
|
2347
2367
|
* @returns the number of bits
|
|
2368
|
+
* @since 1.8
|
|
2348
2369
|
*/
|
|
2349
2370
|
get_alpha_bits(): number;
|
|
2350
2371
|
|
|
2351
2372
|
/**
|
|
2352
2373
|
* Retrieves the number of blue bits of `framebuffer`
|
|
2353
2374
|
* @returns the number of bits
|
|
2375
|
+
* @since 1.8
|
|
2354
2376
|
*/
|
|
2355
2377
|
get_blue_bits(): number;
|
|
2356
2378
|
|
|
@@ -2359,12 +2381,14 @@ export namespace Cogl {
|
|
|
2359
2381
|
* instantiated within. This is the {@link Cogl.Context} that was passed to
|
|
2360
2382
|
* `cogl_onscreen_new()` for example.
|
|
2361
2383
|
* @returns The {@link Cogl.Context} that the given `framebuffer` was instantiated within.
|
|
2384
|
+
* @since 1.8
|
|
2362
2385
|
*/
|
|
2363
2386
|
get_context(): Context;
|
|
2364
2387
|
|
|
2365
2388
|
/**
|
|
2366
2389
|
* Retrieves the number of depth bits of `framebuffer`
|
|
2367
2390
|
* @returns the number of bits
|
|
2391
|
+
* @since 2.0
|
|
2368
2392
|
*/
|
|
2369
2393
|
get_depth_bits(): number;
|
|
2370
2394
|
|
|
@@ -2372,6 +2396,7 @@ export namespace Cogl {
|
|
|
2372
2396
|
* Queries whether depth buffer writing is enabled for `framebuffer`. This
|
|
2373
2397
|
* can be controlled via `cogl_framebuffer_set_depth_write_enabled()`.
|
|
2374
2398
|
* @returns `true` if depth writing is enabled or `false` if not.
|
|
2399
|
+
* @since 1.18
|
|
2375
2400
|
*/
|
|
2376
2401
|
get_depth_write_enabled(): boolean;
|
|
2377
2402
|
|
|
@@ -2383,18 +2408,21 @@ export namespace Cogl {
|
|
|
2383
2408
|
* display pipeline does not support dithering. This value only represents
|
|
2384
2409
|
* the user's request for dithering.</note>
|
|
2385
2410
|
* @returns `true` if dithering has been requested or `false` if not.
|
|
2411
|
+
* @since 1.8
|
|
2386
2412
|
*/
|
|
2387
2413
|
get_dither_enabled(): boolean;
|
|
2388
2414
|
|
|
2389
2415
|
/**
|
|
2390
2416
|
* Retrieves the number of green bits of `framebuffer`
|
|
2391
2417
|
* @returns the number of bits
|
|
2418
|
+
* @since 1.8
|
|
2392
2419
|
*/
|
|
2393
2420
|
get_green_bits(): number;
|
|
2394
2421
|
|
|
2395
2422
|
/**
|
|
2396
2423
|
* Queries the current height of the given `framebuffer`.
|
|
2397
2424
|
* @returns The height of `framebuffer`.
|
|
2425
|
+
* @since 1.8
|
|
2398
2426
|
*/
|
|
2399
2427
|
get_height(): number;
|
|
2400
2428
|
|
|
@@ -2402,17 +2430,20 @@ export namespace Cogl {
|
|
|
2402
2430
|
|
|
2403
2431
|
/**
|
|
2404
2432
|
* Stores the current model-view matrix in `matrix`.
|
|
2433
|
+
* @since 1.10
|
|
2405
2434
|
*/
|
|
2406
2435
|
get_modelview_matrix(): Graphene.Matrix;
|
|
2407
2436
|
|
|
2408
2437
|
/**
|
|
2409
2438
|
* Stores the current projection matrix in `matrix`.
|
|
2439
|
+
* @since 1.10
|
|
2410
2440
|
*/
|
|
2411
2441
|
get_projection_matrix(): Graphene.Matrix;
|
|
2412
2442
|
|
|
2413
2443
|
/**
|
|
2414
2444
|
* Retrieves the number of red bits of `framebuffer`
|
|
2415
2445
|
* @returns the number of bits
|
|
2446
|
+
* @since 1.8
|
|
2416
2447
|
*/
|
|
2417
2448
|
get_red_bits(): number;
|
|
2418
2449
|
|
|
@@ -2430,6 +2461,7 @@ export namespace Cogl {
|
|
|
2430
2461
|
* framebuffer has been allocated the value will reflect the actual
|
|
2431
2462
|
* number of samples that will be made by the GPU.
|
|
2432
2463
|
* @returns The number of point samples made per pixel when rasterizing geometry or 0 if single-sample rendering has been chosen.
|
|
2464
|
+
* @since 1.10
|
|
2433
2465
|
*/
|
|
2434
2466
|
get_samples_per_pixel(): number;
|
|
2435
2467
|
|
|
@@ -2437,6 +2469,7 @@ export namespace Cogl {
|
|
|
2437
2469
|
* Gets the current {@link Cogl.StereoMode}, which defines which stereo buffers
|
|
2438
2470
|
* should be drawn to. See `cogl_framebuffer_set_stereo_mode()`.
|
|
2439
2471
|
* @returns A {@link Cogl.StereoMode}
|
|
2472
|
+
* @since 1.20
|
|
2440
2473
|
*/
|
|
2441
2474
|
get_stereo_mode(): StereoMode;
|
|
2442
2475
|
|
|
@@ -2445,6 +2478,7 @@ export namespace Cogl {
|
|
|
2445
2478
|
* using `cogl_framebuffer_set_viewport()` or the default values which are 0, 0,
|
|
2446
2479
|
* framebuffer_width and framebuffer_height. The values are written into the
|
|
2447
2480
|
* given `viewport` array.
|
|
2481
|
+
* @since 1.8
|
|
2448
2482
|
*/
|
|
2449
2483
|
get_viewport4fv(): number[];
|
|
2450
2484
|
|
|
@@ -2452,6 +2486,7 @@ export namespace Cogl {
|
|
|
2452
2486
|
* Queries the height of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
2453
2487
|
* or the default value which is the height of the framebuffer.
|
|
2454
2488
|
* @returns The height of the viewport.
|
|
2489
|
+
* @since 1.8
|
|
2455
2490
|
*/
|
|
2456
2491
|
get_viewport_height(): number;
|
|
2457
2492
|
|
|
@@ -2459,6 +2494,7 @@ export namespace Cogl {
|
|
|
2459
2494
|
* Queries the width of the viewport as set using `cogl_framebuffer_set_viewport()`
|
|
2460
2495
|
* or the default value which is the width of the framebuffer.
|
|
2461
2496
|
* @returns The width of the viewport.
|
|
2497
|
+
* @since 1.8
|
|
2462
2498
|
*/
|
|
2463
2499
|
get_viewport_width(): number;
|
|
2464
2500
|
|
|
@@ -2466,6 +2502,7 @@ export namespace Cogl {
|
|
|
2466
2502
|
* Queries the x coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
2467
2503
|
* or the default value which is 0.
|
|
2468
2504
|
* @returns The x coordinate of the viewport origin.
|
|
2505
|
+
* @since 1.8
|
|
2469
2506
|
*/
|
|
2470
2507
|
get_viewport_x(): number;
|
|
2471
2508
|
|
|
@@ -2473,17 +2510,20 @@ export namespace Cogl {
|
|
|
2473
2510
|
* Queries the y coordinate of the viewport origin as set using `cogl_framebuffer_set_viewport()`
|
|
2474
2511
|
* or the default value which is 0.
|
|
2475
2512
|
* @returns The y coordinate of the viewport origin.
|
|
2513
|
+
* @since 1.8
|
|
2476
2514
|
*/
|
|
2477
2515
|
get_viewport_y(): number;
|
|
2478
2516
|
|
|
2479
2517
|
/**
|
|
2480
2518
|
* Queries the current width of the given `framebuffer`.
|
|
2481
2519
|
* @returns The width of `framebuffer`.
|
|
2520
|
+
* @since 1.8
|
|
2482
2521
|
*/
|
|
2483
2522
|
get_width(): number;
|
|
2484
2523
|
|
|
2485
2524
|
/**
|
|
2486
2525
|
* Resets the current model-view matrix to the identity matrix.
|
|
2526
|
+
* @since 1.10
|
|
2487
2527
|
*/
|
|
2488
2528
|
identity_matrix(): void;
|
|
2489
2529
|
|
|
@@ -2496,6 +2536,7 @@ export namespace Cogl {
|
|
|
2496
2536
|
* @param y_2 The y coordinate for the second horizontal clipping plane
|
|
2497
2537
|
* @param near The <emphasis>distance</emphasis> to the near clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
2498
2538
|
* @param far The <emphasis>distance</emphasis> to the far clipping plane (will be <emphasis>negative</emphasis> if the plane is behind the viewer)
|
|
2539
|
+
* @since 1.10
|
|
2499
2540
|
*/
|
|
2500
2541
|
orthographic(x_1: number, y_1: number, x_2: number, y_2: number, near: number, far: number): void;
|
|
2501
2542
|
|
|
@@ -2511,6 +2552,7 @@ export namespace Cogl {
|
|
|
2511
2552
|
* @param aspect The (width over height) aspect ratio for display
|
|
2512
2553
|
* @param z_near The distance to the near clipping plane (Must be positive, and must not be 0)
|
|
2513
2554
|
* @param z_far The distance to the far clipping plane (Must be positive)
|
|
2555
|
+
* @since 1.10
|
|
2514
2556
|
*/
|
|
2515
2557
|
perspective(fov_y: number, aspect: number, z_near: number, z_far: number): void;
|
|
2516
2558
|
|
|
@@ -2518,17 +2560,20 @@ export namespace Cogl {
|
|
|
2518
2560
|
* Reverts the clipping region to the state before the last call to
|
|
2519
2561
|
* `cogl_framebuffer_push_scissor_clip()`, `cogl_framebuffer_push_rectangle_clip()`
|
|
2520
2562
|
* `cogl_framebuffer_push_path_clip()`, or `cogl_framebuffer_push_primitive_clip()`.
|
|
2563
|
+
* @since 1.10
|
|
2521
2564
|
*/
|
|
2522
2565
|
pop_clip(): void;
|
|
2523
2566
|
|
|
2524
2567
|
/**
|
|
2525
2568
|
* Restores the model-view matrix on the top of the matrix stack.
|
|
2569
|
+
* @since 1.10
|
|
2526
2570
|
*/
|
|
2527
2571
|
pop_matrix(): void;
|
|
2528
2572
|
|
|
2529
2573
|
/**
|
|
2530
2574
|
* Copies the current model-view matrix onto the matrix stack. The matrix
|
|
2531
2575
|
* can later be restored with `cogl_framebuffer_pop_matrix()`.
|
|
2576
|
+
* @since 1.10
|
|
2532
2577
|
*/
|
|
2533
2578
|
push_matrix(): void;
|
|
2534
2579
|
|
|
@@ -2545,6 +2590,7 @@ export namespace Cogl {
|
|
|
2545
2590
|
* @param y_1 y coordinate for top left corner of the clip rectangle
|
|
2546
2591
|
* @param x_2 x coordinate for bottom right corner of the clip rectangle
|
|
2547
2592
|
* @param y_2 y coordinate for bottom right corner of the clip rectangle
|
|
2593
|
+
* @since 1.10
|
|
2548
2594
|
*/
|
|
2549
2595
|
push_rectangle_clip(x_1: number, y_1: number, x_2: number, y_2: number): void;
|
|
2550
2596
|
|
|
@@ -2566,6 +2612,7 @@ export namespace Cogl {
|
|
|
2566
2612
|
* @param y top edge of the clip rectangle in window coordinates
|
|
2567
2613
|
* @param width width of the clip rectangle
|
|
2568
2614
|
* @param height height of the clip rectangle
|
|
2615
|
+
* @since 1.10
|
|
2569
2616
|
*/
|
|
2570
2617
|
push_scissor_clip(x: number, y: number, width: number, height: number): void;
|
|
2571
2618
|
|
|
@@ -2603,6 +2650,7 @@ export namespace Cogl {
|
|
|
2603
2650
|
* @param format The pixel format to store the data in
|
|
2604
2651
|
* @param pixels The address of the buffer to store the data in
|
|
2605
2652
|
* @returns `true` if the read succeeded or `false` otherwise.
|
|
2653
|
+
* @since 1.10
|
|
2606
2654
|
*/
|
|
2607
2655
|
read_pixels(x: number, y: number, width: number, height: number, format: PixelFormat, pixels: number): boolean;
|
|
2608
2656
|
|
|
@@ -2622,6 +2670,7 @@ export namespace Cogl {
|
|
|
2622
2670
|
* @param source Identifies which auxiliary buffer you want to read (only COGL_READ_PIXELS_COLOR_BUFFER supported currently)
|
|
2623
2671
|
* @param bitmap The bitmap to store the results in.
|
|
2624
2672
|
* @returns `true` if the read succeeded or `false` otherwise. The function is only likely to fail if the bitmap points to a pixel buffer and it could not be mapped.
|
|
2673
|
+
* @since 1.10
|
|
2625
2674
|
*/
|
|
2626
2675
|
read_pixels_into_bitmap(x: number, y: number, source: ReadPixelsFlags, bitmap: Bitmap): boolean;
|
|
2627
2676
|
|
|
@@ -2646,6 +2695,7 @@ export namespace Cogl {
|
|
|
2646
2695
|
* If you are performing incremental updates to a framebuffer you
|
|
2647
2696
|
* should consider using `cogl_framebuffer_resolve_samples_region()`
|
|
2648
2697
|
* instead to avoid resolving redundant pixels.
|
|
2698
|
+
* @since 1.8
|
|
2649
2699
|
*/
|
|
2650
2700
|
resolve_samples(): void;
|
|
2651
2701
|
|
|
@@ -2675,6 +2725,7 @@ export namespace Cogl {
|
|
|
2675
2725
|
* @param y top-left y coordinate of region to resolve
|
|
2676
2726
|
* @param width width of region to resolve
|
|
2677
2727
|
* @param height height of region to resolve
|
|
2728
|
+
* @since 1.8
|
|
2678
2729
|
*/
|
|
2679
2730
|
resolve_samples_region(x: number, y: number, width: number, height: number): void;
|
|
2680
2731
|
|
|
@@ -2688,6 +2739,7 @@ export namespace Cogl {
|
|
|
2688
2739
|
* @param x X-component of vertex to rotate around.
|
|
2689
2740
|
* @param y Y-component of vertex to rotate around.
|
|
2690
2741
|
* @param z Z-component of vertex to rotate around.
|
|
2742
|
+
* @since 1.10
|
|
2691
2743
|
*/
|
|
2692
2744
|
rotate(angle: number, x: number, y: number, z: number): void;
|
|
2693
2745
|
|
|
@@ -2695,6 +2747,7 @@ export namespace Cogl {
|
|
|
2695
2747
|
* Multiplies the current model-view matrix by one that rotates
|
|
2696
2748
|
* according to the rotation described by `euler`.
|
|
2697
2749
|
* @param euler A {@link Graphene.Euler}
|
|
2750
|
+
* @since 2.0
|
|
2698
2751
|
*/
|
|
2699
2752
|
rotate_euler(euler: Graphene.Euler): void;
|
|
2700
2753
|
|
|
@@ -2704,6 +2757,7 @@ export namespace Cogl {
|
|
|
2704
2757
|
* @param x Amount to scale along the x-axis
|
|
2705
2758
|
* @param y Amount to scale along the y-axis
|
|
2706
2759
|
* @param z Amount to scale along the z-axis
|
|
2760
|
+
* @since 1.10
|
|
2707
2761
|
*/
|
|
2708
2762
|
scale(x: number, y: number, z: number): void;
|
|
2709
2763
|
|
|
@@ -2715,6 +2769,7 @@ export namespace Cogl {
|
|
|
2715
2769
|
*
|
|
2716
2770
|
* Depth buffer writing is enabled by default.
|
|
2717
2771
|
* @param depth_write_enabled `true` to enable depth writing or `false` to disable
|
|
2772
|
+
* @since 1.18
|
|
2718
2773
|
*/
|
|
2719
2774
|
set_depth_write_enabled(depth_write_enabled: boolean): void;
|
|
2720
2775
|
|
|
@@ -2733,18 +2788,21 @@ export namespace Cogl {
|
|
|
2733
2788
|
*
|
|
2734
2789
|
* Dithering is enabled by default.
|
|
2735
2790
|
* @param dither_enabled `true` to enable dithering or `false` to disable
|
|
2791
|
+
* @since 1.8
|
|
2736
2792
|
*/
|
|
2737
2793
|
set_dither_enabled(dither_enabled: boolean): void;
|
|
2738
2794
|
|
|
2739
2795
|
/**
|
|
2740
2796
|
* Sets `matrix` as the new model-view matrix.
|
|
2741
2797
|
* @param matrix the new model-view matrix
|
|
2798
|
+
* @since 1.10
|
|
2742
2799
|
*/
|
|
2743
2800
|
set_modelview_matrix(matrix: Graphene.Matrix): void;
|
|
2744
2801
|
|
|
2745
2802
|
/**
|
|
2746
2803
|
* Sets `matrix` as the new projection matrix.
|
|
2747
2804
|
* @param matrix the new projection matrix
|
|
2805
|
+
* @since 1.10
|
|
2748
2806
|
*/
|
|
2749
2807
|
set_projection_matrix(matrix: Graphene.Matrix): void;
|
|
2750
2808
|
|
|
@@ -2782,6 +2840,7 @@ export namespace Cogl {
|
|
|
2782
2840
|
* framebuffer has changed this can lead to redundant work being
|
|
2783
2841
|
* done.</note>
|
|
2784
2842
|
* @param samples_per_pixel The minimum number of samples per pixel
|
|
2843
|
+
* @since 1.8
|
|
2785
2844
|
*/
|
|
2786
2845
|
set_samples_per_pixel(samples_per_pixel: number): void;
|
|
2787
2846
|
|
|
@@ -2794,6 +2853,7 @@ export namespace Cogl {
|
|
|
2794
2853
|
* enabled. (See `cogl_onscreen_template_set_stereo_enabled()`,
|
|
2795
2854
|
* `cogl_framebuffer_get_is_stereo()`.)
|
|
2796
2855
|
* @param stereo_mode A {@link Cogl.StereoMode} specifying which stereo buffers should be drawn tow.
|
|
2856
|
+
* @since 1.20
|
|
2797
2857
|
*/
|
|
2798
2858
|
set_stereo_mode(stereo_mode: StereoMode): void;
|
|
2799
2859
|
|
|
@@ -2817,12 +2877,14 @@ export namespace Cogl {
|
|
|
2817
2877
|
* @param y The top-left y coordinate of the viewport origin (only integers supported currently)
|
|
2818
2878
|
* @param width The width of the viewport (only integers supported currently)
|
|
2819
2879
|
* @param height The height of the viewport (only integers supported currently)
|
|
2880
|
+
* @since 1.8
|
|
2820
2881
|
*/
|
|
2821
2882
|
set_viewport(x: number, y: number, width: number, height: number): void;
|
|
2822
2883
|
|
|
2823
2884
|
/**
|
|
2824
2885
|
* Multiplies the current model-view matrix by the given matrix.
|
|
2825
2886
|
* @param matrix the matrix to multiply with the current model-view
|
|
2887
|
+
* @since 1.10
|
|
2826
2888
|
*/
|
|
2827
2889
|
transform(matrix: Graphene.Matrix): void;
|
|
2828
2890
|
|
|
@@ -2832,6 +2894,7 @@ export namespace Cogl {
|
|
|
2832
2894
|
* @param x Distance to translate along the x-axis
|
|
2833
2895
|
* @param y Distance to translate along the y-axis
|
|
2834
2896
|
* @param z Distance to translate along the z-axis
|
|
2897
|
+
* @since 1.10
|
|
2835
2898
|
*/
|
|
2836
2899
|
translate(x: number, y: number, z: number): void;
|
|
2837
2900
|
}
|
|
@@ -3005,6 +3068,7 @@ export namespace Cogl {
|
|
|
3005
3068
|
* explicitly checked to determine if Cogl is currently tracking the
|
|
3006
3069
|
* age of {@link Cogl.Onscreen} back buffer contents. If this feature is
|
|
3007
3070
|
* missing then this function will always return 0.</note>
|
|
3071
|
+
* @since 1.14
|
|
3008
3072
|
* @virtual
|
|
3009
3073
|
*/
|
|
3010
3074
|
vfunc_get_buffer_age(): number;
|
|
@@ -3061,6 +3125,7 @@ export namespace Cogl {
|
|
|
3061
3125
|
* @param rectangles An array of integer 4-tuples representing damaged rectangles as (x, y, width, height) tuples.
|
|
3062
3126
|
* @param n_rectangles The number of 4-tuples to be read from `rectangles`
|
|
3063
3127
|
* @param info
|
|
3128
|
+
* @since 1.16
|
|
3064
3129
|
* @virtual
|
|
3065
3130
|
*/
|
|
3066
3131
|
vfunc_swap_buffers_with_damage(rectangles: number, n_rectangles: number, info: FrameInfo): void;
|
|
@@ -3078,6 +3143,7 @@ export namespace Cogl {
|
|
|
3078
3143
|
* @param rectangles An array of integer 4-tuples representing rectangles as (x, y, width, height) tuples.
|
|
3079
3144
|
* @param n_rectangles The number of 4-tuples to be read from `rectangles`
|
|
3080
3145
|
* @param info
|
|
3146
|
+
* @since 1.10
|
|
3081
3147
|
* @virtual
|
|
3082
3148
|
*/
|
|
3083
3149
|
vfunc_swap_region(rectangles: number, n_rectangles: number, info: FrameInfo): void;
|
|
@@ -3103,6 +3169,7 @@ export namespace Cogl {
|
|
|
3103
3169
|
* @param callback A callback function to call for dirty events
|
|
3104
3170
|
* @param destroy An optional callback to destroy `user_data` when the `callback` is removed or `onscreen` is freed.
|
|
3105
3171
|
* @returns a {@link Cogl.OnscreenDirtyClosure} pointer that can be used to remove the callback and associated `user_data` later.
|
|
3172
|
+
* @since 1.16
|
|
3106
3173
|
*/
|
|
3107
3174
|
add_dirty_callback(callback: OnscreenDirtyCallback, destroy: UserDataDestroyCallback | null): OnscreenDirtyClosure;
|
|
3108
3175
|
|
|
@@ -3133,6 +3200,7 @@ export namespace Cogl {
|
|
|
3133
3200
|
* @param callback A callback function to call for frame events
|
|
3134
3201
|
* @param destroy An optional callback to destroy `user_data` when the `callback` is removed or `onscreen` is freed.
|
|
3135
3202
|
* @returns a {@link Cogl.FrameClosure} pointer that can be used to remove the callback and associated `user_data` later.
|
|
3203
|
+
* @since 1.14
|
|
3136
3204
|
*/
|
|
3137
3205
|
add_frame_callback(callback: FrameCallback, destroy: UserDataDestroyCallback | null): FrameClosure;
|
|
3138
3206
|
|
|
@@ -3176,6 +3244,7 @@ export namespace Cogl {
|
|
|
3176
3244
|
* age of {@link Cogl.Onscreen} back buffer contents. If this feature is
|
|
3177
3245
|
* missing then this function will always return 0.</note>
|
|
3178
3246
|
* @returns The age of the buffer contents or 0 when the buffer contents are undefined.
|
|
3247
|
+
* @since 1.14
|
|
3179
3248
|
*/
|
|
3180
3249
|
get_buffer_age(): number;
|
|
3181
3250
|
|
|
@@ -3185,6 +3254,7 @@ export namespace Cogl {
|
|
|
3185
3254
|
* `cogl_onscreen_swap_buffers()` or `cogl_onscreen_swap_region()`
|
|
3186
3255
|
* is called.
|
|
3187
3256
|
* @returns the current frame counter value
|
|
3257
|
+
* @since 1.14
|
|
3188
3258
|
*/
|
|
3189
3259
|
get_frame_counter(): number;
|
|
3190
3260
|
|
|
@@ -3203,6 +3273,7 @@ export namespace Cogl {
|
|
|
3203
3273
|
* requests e.g. to show an already visible window. This also means
|
|
3204
3274
|
* that it's acceptable to alternatively use native APIs to show and
|
|
3205
3275
|
* hide windows without confusing Cogl.</note>
|
|
3276
|
+
* @since 2.0
|
|
3206
3277
|
*/
|
|
3207
3278
|
hide(): void;
|
|
3208
3279
|
|
|
@@ -3224,6 +3295,7 @@ export namespace Cogl {
|
|
|
3224
3295
|
* `cogl_onscreen_add_dirty_callback()` to destroy the user data then
|
|
3225
3296
|
* this will also get called.
|
|
3226
3297
|
* @param closure A {@link Cogl.OnscreenDirtyClosure} returned from `cogl_onscreen_add_dirty_callback()`
|
|
3298
|
+
* @since 1.16
|
|
3227
3299
|
*/
|
|
3228
3300
|
remove_dirty_callback(closure: OnscreenDirtyClosure): void;
|
|
3229
3301
|
|
|
@@ -3235,6 +3307,7 @@ export namespace Cogl {
|
|
|
3235
3307
|
* `cogl_onscreen_add_frame_callback()` to destroy the user data then
|
|
3236
3308
|
* this will get called.
|
|
3237
3309
|
* @param closure A {@link Cogl.FrameClosure} returned from `cogl_onscreen_add_frame_callback()`
|
|
3310
|
+
* @since 1.14
|
|
3238
3311
|
*/
|
|
3239
3312
|
remove_frame_callback(closure: FrameClosure): void;
|
|
3240
3313
|
|
|
@@ -3259,6 +3332,7 @@ export namespace Cogl {
|
|
|
3259
3332
|
* requests e.g. to show an already visible window. This also means
|
|
3260
3333
|
* that it's acceptable to alternatively use native APIs to show and
|
|
3261
3334
|
* hide windows without confusing Cogl.</note>
|
|
3335
|
+
* @since 2.0
|
|
3262
3336
|
*/
|
|
3263
3337
|
show(): void;
|
|
3264
3338
|
|
|
@@ -3278,6 +3352,7 @@ export namespace Cogl {
|
|
|
3278
3352
|
* render a full buffer for every frame.</note>
|
|
3279
3353
|
* @param frame_info
|
|
3280
3354
|
* @param user_data
|
|
3355
|
+
* @since 1.10
|
|
3281
3356
|
*/
|
|
3282
3357
|
swap_buffers(frame_info: FrameInfo, user_data: null): void;
|
|
3283
3358
|
|
|
@@ -3323,6 +3398,7 @@ export namespace Cogl {
|
|
|
3323
3398
|
* @param n_rectangles The number of 4-tuples to be read from `rectangles`
|
|
3324
3399
|
* @param info
|
|
3325
3400
|
* @param user_data
|
|
3401
|
+
* @since 1.16
|
|
3326
3402
|
*/
|
|
3327
3403
|
swap_buffers_with_damage(rectangles: number, n_rectangles: number, info: FrameInfo, user_data: null): void;
|
|
3328
3404
|
|
|
@@ -3340,6 +3416,7 @@ export namespace Cogl {
|
|
|
3340
3416
|
* @param n_rectangles The number of 4-tuples to be read from `rectangles`
|
|
3341
3417
|
* @param info
|
|
3342
3418
|
* @param user_data
|
|
3419
|
+
* @since 1.10
|
|
3343
3420
|
*/
|
|
3344
3421
|
swap_region(rectangles: number, n_rectangles: number, info: FrameInfo, user_data: null): void;
|
|
3345
3422
|
}
|
|
@@ -3383,6 +3460,7 @@ export namespace Cogl {
|
|
|
3383
3460
|
* and need to be added with `cogl_pipeline_add_snippet()` instead.
|
|
3384
3461
|
* @param layer The layer to hook the snippet to
|
|
3385
3462
|
* @param snippet A {@link Cogl.Snippet}
|
|
3463
|
+
* @since 1.10
|
|
3386
3464
|
*/
|
|
3387
3465
|
add_layer_snippet(layer: number, snippet: Snippet): void;
|
|
3388
3466
|
|
|
@@ -3392,6 +3470,7 @@ export namespace Cogl {
|
|
|
3392
3470
|
* `snippet`. Note that some hook points are specific to a layer and
|
|
3393
3471
|
* must be added with `cogl_pipeline_add_layer_snippet()` instead.
|
|
3394
3472
|
* @param snippet The {@link Cogl.Snippet} to add to the vertex processing hook
|
|
3473
|
+
* @since 1.10
|
|
3395
3474
|
*/
|
|
3396
3475
|
add_snippet(snippet: Snippet): void;
|
|
3397
3476
|
|
|
@@ -3405,32 +3484,38 @@ export namespace Cogl {
|
|
|
3405
3484
|
* keep track of a pipelines ancestry which we may use to help minimize GPU
|
|
3406
3485
|
* state changes.
|
|
3407
3486
|
* @returns a pointer to the newly allocated {@link Cogl.Pipeline}
|
|
3487
|
+
* @since 2.0
|
|
3408
3488
|
*/
|
|
3409
3489
|
copy(): Pipeline;
|
|
3410
3490
|
|
|
3411
3491
|
/**
|
|
3412
3492
|
* Iterates all the layer indices of the given `pipeline`.
|
|
3413
3493
|
* @param callback A {@link Cogl.PipelineLayerCallback} to be called for each layer index
|
|
3494
|
+
* @since 2.0
|
|
3414
3495
|
*/
|
|
3415
3496
|
foreach_layer(callback: PipelineLayerCallback): void;
|
|
3416
3497
|
|
|
3417
3498
|
/**
|
|
3418
3499
|
* @returns The alpha test function of `pipeline`.
|
|
3500
|
+
* @since 2.0
|
|
3419
3501
|
*/
|
|
3420
3502
|
get_alpha_test_function(): PipelineAlphaFunc;
|
|
3421
3503
|
|
|
3422
3504
|
/**
|
|
3423
3505
|
* @returns The alpha test reference value of `pipeline`.
|
|
3506
|
+
* @since 2.0
|
|
3424
3507
|
*/
|
|
3425
3508
|
get_alpha_test_reference(): number;
|
|
3426
3509
|
|
|
3427
3510
|
/**
|
|
3428
3511
|
* Retrieves the current pipeline color.
|
|
3512
|
+
* @since 2.0
|
|
3429
3513
|
*/
|
|
3430
3514
|
get_color(): Color;
|
|
3431
3515
|
|
|
3432
3516
|
/**
|
|
3433
3517
|
* @returns the cull face mode that was previously set with `cogl_pipeline_set_cull_face_mode()`. Status: Unstable
|
|
3518
|
+
* @since 2.0
|
|
3434
3519
|
*/
|
|
3435
3520
|
get_cull_face_mode(): PipelineCullFaceMode;
|
|
3436
3521
|
|
|
@@ -3443,6 +3528,7 @@ export namespace Cogl {
|
|
|
3443
3528
|
* {@link Cogl.Winding.CLOCKWISE} sets them to be clockwise. The default is
|
|
3444
3529
|
* {@link Cogl.Winding.COUNTER_CLOCKWISE}.
|
|
3445
3530
|
* @returns The `pipeline` front face winding Status: Unstable
|
|
3531
|
+
* @since 2.0
|
|
3446
3532
|
*/
|
|
3447
3533
|
get_front_face_winding(): Winding;
|
|
3448
3534
|
|
|
@@ -3455,6 +3541,7 @@ export namespace Cogl {
|
|
|
3455
3541
|
* changed using `cogl_pipeline_set_layer_filters()`.
|
|
3456
3542
|
* @param layer_index the layer number to change.
|
|
3457
3543
|
* @returns The magnification {@link Cogl.PipelineFilter} for the specified layer.
|
|
3544
|
+
* @since 1.10
|
|
3458
3545
|
*/
|
|
3459
3546
|
get_layer_mag_filter(layer_index: number): PipelineFilter;
|
|
3460
3547
|
|
|
@@ -3467,6 +3554,7 @@ export namespace Cogl {
|
|
|
3467
3554
|
* changed using `cogl_pipeline_set_layer_filters()`.
|
|
3468
3555
|
* @param layer_index the layer number to change.
|
|
3469
3556
|
* @returns The minification {@link Cogl.PipelineFilter} for the specified layer.
|
|
3557
|
+
* @since 1.10
|
|
3470
3558
|
*/
|
|
3471
3559
|
get_layer_min_filter(layer_index: number): PipelineFilter;
|
|
3472
3560
|
|
|
@@ -3475,12 +3563,14 @@ export namespace Cogl {
|
|
|
3475
3563
|
* texture layer.
|
|
3476
3564
|
* @param layer_index the layer number to check.
|
|
3477
3565
|
* @returns whether the texture coordinates will be replaced with point sprite coordinates.
|
|
3566
|
+
* @since 2.0
|
|
3478
3567
|
*/
|
|
3479
3568
|
get_layer_point_sprite_coords_enabled(layer_index: number): boolean;
|
|
3480
3569
|
|
|
3481
3570
|
/**
|
|
3482
3571
|
* @param layer_index the index of the layer
|
|
3483
3572
|
* @returns the texture that was set for the given layer of the pipeline or `null` if no texture was set.
|
|
3573
|
+
* @since 1.10
|
|
3484
3574
|
*/
|
|
3485
3575
|
get_layer_texture(layer_index: number): Texture;
|
|
3486
3576
|
|
|
@@ -3489,6 +3579,7 @@ export namespace Cogl {
|
|
|
3489
3579
|
* layer.
|
|
3490
3580
|
* @param layer_index the layer number to change.
|
|
3491
3581
|
* @returns the wrap mode for the 's' coordinate of texture lookups on this layer.
|
|
3582
|
+
* @since 1.6
|
|
3492
3583
|
*/
|
|
3493
3584
|
get_layer_wrap_mode_s(layer_index: number): PipelineWrapMode;
|
|
3494
3585
|
|
|
@@ -3497,17 +3588,20 @@ export namespace Cogl {
|
|
|
3497
3588
|
* layer.
|
|
3498
3589
|
* @param layer_index the layer number to change.
|
|
3499
3590
|
* @returns the wrap mode for the 't' coordinate of texture lookups on this layer.
|
|
3591
|
+
* @since 1.6
|
|
3500
3592
|
*/
|
|
3501
3593
|
get_layer_wrap_mode_t(layer_index: number): PipelineWrapMode;
|
|
3502
3594
|
|
|
3503
3595
|
/**
|
|
3504
3596
|
* Retrieves the number of layers defined for the given `pipeline`
|
|
3505
3597
|
* @returns the number of layers
|
|
3598
|
+
* @since 2.0
|
|
3506
3599
|
*/
|
|
3507
3600
|
get_n_layers(): number;
|
|
3508
3601
|
|
|
3509
3602
|
/**
|
|
3510
3603
|
* @returns `true` if the pipeline has per-vertex point size enabled or `false` otherwise. The per-vertex point size can be enabled with `cogl_pipeline_set_per_vertex_point_size()`.
|
|
3604
|
+
* @since 2.0
|
|
3511
3605
|
*/
|
|
3512
3606
|
get_per_vertex_point_size(): boolean;
|
|
3513
3607
|
|
|
@@ -3515,6 +3609,7 @@ export namespace Cogl {
|
|
|
3515
3609
|
* Get the size of points drawn when {@link Cogl.VerticesMode.POINTS} is
|
|
3516
3610
|
* used with the vertex buffer API.
|
|
3517
3611
|
* @returns the point size of the `pipeline`.
|
|
3612
|
+
* @since 2.0
|
|
3518
3613
|
*/
|
|
3519
3614
|
get_point_size(): number;
|
|
3520
3615
|
|
|
@@ -3530,6 +3625,7 @@ export namespace Cogl {
|
|
|
3530
3625
|
* before calling this function.
|
|
3531
3626
|
* @param uniform_name The name of a uniform
|
|
3532
3627
|
* @returns A integer representing the location of the given uniform.
|
|
3628
|
+
* @since 2.0
|
|
3533
3629
|
*/
|
|
3534
3630
|
get_uniform_location(uniform_name: string): number;
|
|
3535
3631
|
|
|
@@ -3537,12 +3633,14 @@ export namespace Cogl {
|
|
|
3537
3633
|
* Queries what user program has been associated with the given
|
|
3538
3634
|
* `pipeline` using `cogl_pipeline_set_user_program()`.
|
|
3539
3635
|
* @returns The current user program or `null`.
|
|
3636
|
+
* @since 2.0
|
|
3540
3637
|
*/
|
|
3541
3638
|
get_user_program(): Handle;
|
|
3542
3639
|
|
|
3543
3640
|
/**
|
|
3544
3641
|
* This function removes a layer from your pipeline
|
|
3545
3642
|
* @param layer_index Specifies the layer you want to remove
|
|
3643
|
+
* @since 1.10
|
|
3546
3644
|
*/
|
|
3547
3645
|
remove_layer(layer_index: number): void;
|
|
3548
3646
|
|
|
@@ -3556,6 +3654,7 @@ export namespace Cogl {
|
|
|
3556
3654
|
* The default is {@link Cogl.PipelineAlphaFunc.ALWAYS}
|
|
3557
3655
|
* @param alpha_func A `CoglPipelineAlphaFunc` constant
|
|
3558
3656
|
* @param alpha_reference A reference point that the chosen alpha function uses to compare incoming fragments to.
|
|
3657
|
+
* @since 2.0
|
|
3559
3658
|
*/
|
|
3560
3659
|
set_alpha_test_function(alpha_func: PipelineAlphaFunc, alpha_reference: number): void;
|
|
3561
3660
|
|
|
@@ -3627,6 +3726,7 @@ export namespace Cogl {
|
|
|
3627
3726
|
* is in premultiplied form.
|
|
3628
3727
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired blend function.
|
|
3629
3728
|
* @returns `true` if the blend string was successfully parsed, and the described blending is supported by the underlying driver/hardware. If there was an error, `false` is returned and `error` is set accordingly (if present).
|
|
3729
|
+
* @since 2.0
|
|
3630
3730
|
*/
|
|
3631
3731
|
set_blend(blend_string: string): boolean;
|
|
3632
3732
|
|
|
@@ -3634,6 +3734,7 @@ export namespace Cogl {
|
|
|
3634
3734
|
* When blending is setup to reference a CONSTANT blend factor then
|
|
3635
3735
|
* blending will depend on the constant set with this function.
|
|
3636
3736
|
* @param constant_color The constant color you want
|
|
3737
|
+
* @since 2.0
|
|
3637
3738
|
*/
|
|
3638
3739
|
set_blend_constant(constant_color: Color): void;
|
|
3639
3740
|
|
|
@@ -3647,6 +3748,7 @@ export namespace Cogl {
|
|
|
3647
3748
|
*
|
|
3648
3749
|
* The default value is (1.0, 1.0, 1.0, 1.0)
|
|
3649
3750
|
* @param color The components of the color
|
|
3751
|
+
* @since 2.0
|
|
3650
3752
|
*/
|
|
3651
3753
|
set_color(color: Color): void;
|
|
3652
3754
|
|
|
@@ -3658,6 +3760,7 @@ export namespace Cogl {
|
|
|
3658
3760
|
* @param green The green component
|
|
3659
3761
|
* @param blue The blue component
|
|
3660
3762
|
* @param alpha The alpha component
|
|
3763
|
+
* @since 2.0
|
|
3661
3764
|
*/
|
|
3662
3765
|
set_color4f(red: number, green: number, blue: number, alpha: number): void;
|
|
3663
3766
|
|
|
@@ -3669,6 +3772,7 @@ export namespace Cogl {
|
|
|
3669
3772
|
* @param green The green component
|
|
3670
3773
|
* @param blue The blue component
|
|
3671
3774
|
* @param alpha The alpha component
|
|
3775
|
+
* @since 2.0
|
|
3672
3776
|
*/
|
|
3673
3777
|
set_color4ub(red: number, green: number, blue: number, alpha: number): void;
|
|
3674
3778
|
|
|
@@ -3688,6 +3792,7 @@ export namespace Cogl {
|
|
|
3688
3792
|
*
|
|
3689
3793
|
* Status: Unstable
|
|
3690
3794
|
* @param cull_face_mode The new mode to set
|
|
3795
|
+
* @since 2.0
|
|
3691
3796
|
*/
|
|
3692
3797
|
set_cull_face_mode(cull_face_mode: PipelineCullFaceMode): void;
|
|
3693
3798
|
|
|
@@ -3702,6 +3807,7 @@ export namespace Cogl {
|
|
|
3702
3807
|
*
|
|
3703
3808
|
* Status: Unstable
|
|
3704
3809
|
* @param front_winding the winding order
|
|
3810
|
+
* @since 2.0
|
|
3705
3811
|
*/
|
|
3706
3812
|
set_front_face_winding(front_winding: Winding): void;
|
|
3707
3813
|
|
|
@@ -3785,6 +3891,7 @@ export namespace Cogl {
|
|
|
3785
3891
|
* @param layer_index Specifies the layer you want define a combine function for
|
|
3786
3892
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired texture combine function.
|
|
3787
3893
|
* @returns `true` if the blend string was successfully parsed, and the described texture combining is supported by the underlying driver and or hardware. On failure, `false` is returned and `error` is set
|
|
3894
|
+
* @since 2.0
|
|
3788
3895
|
*/
|
|
3789
3896
|
set_layer_combine(layer_index: number, blend_string: string): boolean;
|
|
3790
3897
|
|
|
@@ -3793,6 +3900,7 @@ export namespace Cogl {
|
|
|
3793
3900
|
* description then you can use this function to define its value.
|
|
3794
3901
|
* @param layer_index Specifies the layer you want to specify a constant used for texture combining
|
|
3795
3902
|
* @param constant The constant color you want
|
|
3903
|
+
* @since 2.0
|
|
3796
3904
|
*/
|
|
3797
3905
|
set_layer_combine_constant(layer_index: number, constant: Color): void;
|
|
3798
3906
|
|
|
@@ -3807,6 +3915,7 @@ export namespace Cogl {
|
|
|
3807
3915
|
* @param layer_index the layer number to change.
|
|
3808
3916
|
* @param min_filter the filter used when scaling a texture down.
|
|
3809
3917
|
* @param mag_filter the filter used when magnifying a texture.
|
|
3918
|
+
* @since 1.10
|
|
3810
3919
|
*/
|
|
3811
3920
|
set_layer_filters(layer_index: number, min_filter: PipelineFilter, mag_filter: PipelineFilter): void;
|
|
3812
3921
|
|
|
@@ -3815,6 +3924,7 @@ export namespace Cogl {
|
|
|
3815
3924
|
* and rotate a single layer of a pipeline used to fill your geometry.
|
|
3816
3925
|
* @param layer_index the index for the layer inside `pipeline`
|
|
3817
3926
|
* @param matrix the transformation matrix for the layer
|
|
3927
|
+
* @since 1.10
|
|
3818
3928
|
*/
|
|
3819
3929
|
set_layer_matrix(layer_index: number, matrix: Graphene.Matrix): void;
|
|
3820
3930
|
|
|
@@ -3834,6 +3944,7 @@ export namespace Cogl {
|
|
|
3834
3944
|
* specify the texture type so that any pipeline copies can share the
|
|
3835
3945
|
* internal texture type state for efficiency.
|
|
3836
3946
|
* @param layer_index The layer number to modify
|
|
3947
|
+
* @since 1.10
|
|
3837
3948
|
*/
|
|
3838
3949
|
set_layer_null_texture(layer_index: number): void;
|
|
3839
3950
|
|
|
@@ -3847,6 +3958,7 @@ export namespace Cogl {
|
|
|
3847
3958
|
* @param layer_index the layer number to change.
|
|
3848
3959
|
* @param enable whether to enable point sprite coord generation.
|
|
3849
3960
|
* @returns `true` if the function succeeds, `false` otherwise.
|
|
3961
|
+
* @since 2.0
|
|
3850
3962
|
*/
|
|
3851
3963
|
set_layer_point_sprite_coords_enabled(layer_index: number, enable: boolean): boolean;
|
|
3852
3964
|
|
|
@@ -3863,6 +3975,7 @@ export namespace Cogl {
|
|
|
3863
3975
|
* `cogl_pipeline_set_layer_wrap_mode_t()` separately.
|
|
3864
3976
|
* @param layer_index the layer number to change.
|
|
3865
3977
|
* @param mode the new wrap mode
|
|
3978
|
+
* @since 2.0
|
|
3866
3979
|
*/
|
|
3867
3980
|
set_layer_wrap_mode(layer_index: number, mode: PipelineWrapMode): void;
|
|
3868
3981
|
|
|
@@ -3870,6 +3983,7 @@ export namespace Cogl {
|
|
|
3870
3983
|
* Sets the wrap mode for the 's' coordinate of texture lookups on this layer.
|
|
3871
3984
|
* @param layer_index the layer number to change.
|
|
3872
3985
|
* @param mode the new wrap mode
|
|
3986
|
+
* @since 2.0
|
|
3873
3987
|
*/
|
|
3874
3988
|
set_layer_wrap_mode_s(layer_index: number, mode: PipelineWrapMode): void;
|
|
3875
3989
|
|
|
@@ -3877,6 +3991,7 @@ export namespace Cogl {
|
|
|
3877
3991
|
* Sets the wrap mode for the 't' coordinate of texture lookups on this layer.
|
|
3878
3992
|
* @param layer_index the layer number to change.
|
|
3879
3993
|
* @param mode the new wrap mode
|
|
3994
|
+
* @since 2.0
|
|
3880
3995
|
*/
|
|
3881
3996
|
set_layer_wrap_mode_t(layer_index: number, mode: PipelineWrapMode): void;
|
|
3882
3997
|
|
|
@@ -3893,6 +4008,7 @@ export namespace Cogl {
|
|
|
3893
4008
|
* undefined.
|
|
3894
4009
|
* @param enable whether to enable per-vertex point size
|
|
3895
4010
|
* @returns `true` if the change succeeded or `false` otherwise
|
|
4011
|
+
* @since 2.0
|
|
3896
4012
|
*/
|
|
3897
4013
|
set_per_vertex_point_size(enable: boolean): boolean;
|
|
3898
4014
|
|
|
@@ -3910,6 +4026,7 @@ export namespace Cogl {
|
|
|
3910
4026
|
* if an application wants to draw points it must make sure to use a
|
|
3911
4027
|
* pipeline that has an explicit point size set on it.
|
|
3912
4028
|
* @param point_size the new point size.
|
|
4029
|
+
* @since 2.0
|
|
3913
4030
|
*/
|
|
3914
4031
|
set_point_size(point_size: number): void;
|
|
3915
4032
|
|
|
@@ -3926,6 +4043,7 @@ export namespace Cogl {
|
|
|
3926
4043
|
* uniform.
|
|
3927
4044
|
* @param uniform_location The uniform's location identifier
|
|
3928
4045
|
* @param value The new value for the uniform
|
|
4046
|
+
* @since 2.0
|
|
3929
4047
|
*/
|
|
3930
4048
|
set_uniform_1f(uniform_location: number, value: number): void;
|
|
3931
4049
|
|
|
@@ -3942,6 +4060,7 @@ export namespace Cogl {
|
|
|
3942
4060
|
* uniform or a sampler uniform.
|
|
3943
4061
|
* @param uniform_location The uniform's location identifier
|
|
3944
4062
|
* @param value The new value for the uniform
|
|
4063
|
+
* @since 2.0
|
|
3945
4064
|
*/
|
|
3946
4065
|
set_uniform_1i(uniform_location: number, value: number): void;
|
|
3947
4066
|
|
|
@@ -3962,6 +4081,7 @@ export namespace Cogl {
|
|
|
3962
4081
|
* @param n_components The number of components in the corresponding uniform's type
|
|
3963
4082
|
* @param count The number of values to set
|
|
3964
4083
|
* @param value Pointer to the new values to set
|
|
4084
|
+
* @since 2.0
|
|
3965
4085
|
*/
|
|
3966
4086
|
set_uniform_float(uniform_location: number, n_components: number, count: number, value: number): void;
|
|
3967
4087
|
|
|
@@ -3982,6 +4102,7 @@ export namespace Cogl {
|
|
|
3982
4102
|
* @param n_components The number of components in the corresponding uniform's type
|
|
3983
4103
|
* @param count The number of values to set
|
|
3984
4104
|
* @param value Pointer to the new values to set
|
|
4105
|
+
* @since 2.0
|
|
3985
4106
|
*/
|
|
3986
4107
|
set_uniform_int(uniform_location: number, n_components: number, count: number, value: number): void;
|
|
3987
4108
|
|
|
@@ -4008,6 +4129,7 @@ export namespace Cogl {
|
|
|
4008
4129
|
* @param count The number of values to set
|
|
4009
4130
|
* @param transpose Whether to transpose the matrix
|
|
4010
4131
|
* @param value Pointer to the new values to set
|
|
4132
|
+
* @since 2.0
|
|
4011
4133
|
*/
|
|
4012
4134
|
set_uniform_matrix(uniform_location: number, dimensions: number, count: number, transpose: boolean, value: number): void;
|
|
4013
4135
|
|
|
@@ -4048,6 +4170,7 @@ export namespace Cogl {
|
|
|
4048
4170
|
* meantime we hope this will handle most practical GLSL and ARBfp
|
|
4049
4171
|
* requirements.
|
|
4050
4172
|
* @param program A {@link Cogl.Handle} to a linked CoglProgram
|
|
4173
|
+
* @since 2.0
|
|
4051
4174
|
*/
|
|
4052
4175
|
set_user_program(program: Handle): void;
|
|
4053
4176
|
}
|
|
@@ -4085,26 +4208,31 @@ export namespace Cogl {
|
|
|
4085
4208
|
// Methods
|
|
4086
4209
|
/**
|
|
4087
4210
|
* @returns the source string that was set with `cogl_snippet_set_declarations()` or `null` if none was set.
|
|
4211
|
+
* @since 1.10
|
|
4088
4212
|
*/
|
|
4089
4213
|
get_declarations(): string;
|
|
4090
4214
|
|
|
4091
4215
|
/**
|
|
4092
4216
|
* @returns the hook that was set when `cogl_snippet_new()` was called.
|
|
4217
|
+
* @since 1.10
|
|
4093
4218
|
*/
|
|
4094
4219
|
get_hook(): SnippetHook;
|
|
4095
4220
|
|
|
4096
4221
|
/**
|
|
4097
4222
|
* @returns the source string that was set with `cogl_snippet_set_post()` or `null` if none was set.
|
|
4223
|
+
* @since 1.10
|
|
4098
4224
|
*/
|
|
4099
4225
|
get_post(): string;
|
|
4100
4226
|
|
|
4101
4227
|
/**
|
|
4102
4228
|
* @returns the source string that was set with `cogl_snippet_set_pre()` or `null` if none was set.
|
|
4229
|
+
* @since 1.10
|
|
4103
4230
|
*/
|
|
4104
4231
|
get_pre(): string;
|
|
4105
4232
|
|
|
4106
4233
|
/**
|
|
4107
4234
|
* @returns the source string that was set with `cogl_snippet_set_replace()` or `null` if none was set.
|
|
4235
|
+
* @since 1.10
|
|
4108
4236
|
*/
|
|
4109
4237
|
get_replace(): string;
|
|
4110
4238
|
|
|
@@ -4118,6 +4246,7 @@ export namespace Cogl {
|
|
|
4118
4246
|
* to its first pipeline. After that the snippet should be considered
|
|
4119
4247
|
* immutable.
|
|
4120
4248
|
* @param declarations The new source string for the declarations section of this snippet.
|
|
4249
|
+
* @since 1.10
|
|
4121
4250
|
*/
|
|
4122
4251
|
set_declarations(declarations: string): void;
|
|
4123
4252
|
|
|
@@ -4131,6 +4260,7 @@ export namespace Cogl {
|
|
|
4131
4260
|
* to its first pipeline. After that the snippet should be considered
|
|
4132
4261
|
* immutable.
|
|
4133
4262
|
* @param post The new source string for the post section of this snippet.
|
|
4263
|
+
* @since 1.10
|
|
4134
4264
|
*/
|
|
4135
4265
|
set_post(post: string): void;
|
|
4136
4266
|
|
|
@@ -4144,6 +4274,7 @@ export namespace Cogl {
|
|
|
4144
4274
|
* to its first pipeline. After that the snippet should be considered
|
|
4145
4275
|
* immutable.
|
|
4146
4276
|
* @param pre The new source string for the pre section of this snippet.
|
|
4277
|
+
* @since 1.10
|
|
4147
4278
|
*/
|
|
4148
4279
|
set_pre(pre: string): void;
|
|
4149
4280
|
|
|
@@ -4157,6 +4288,7 @@ export namespace Cogl {
|
|
|
4157
4288
|
* to its first pipeline. After that the snippet should be considered
|
|
4158
4289
|
* immutable.
|
|
4159
4290
|
* @param replace The new source string for the replace section of this snippet.
|
|
4291
|
+
* @since 1.10
|
|
4160
4292
|
*/
|
|
4161
4293
|
set_replace(replace: string): void;
|
|
4162
4294
|
}
|
|
@@ -4220,6 +4352,7 @@ export namespace Cogl {
|
|
|
4220
4352
|
* is {@link Cogl.TextureComponents.RGBA}. The other constructors which take
|
|
4221
4353
|
* a %CoglBitmap or a data pointer default to the same components as
|
|
4222
4354
|
* the pixel format of the data.
|
|
4355
|
+
* @since 1.18
|
|
4223
4356
|
*/
|
|
4224
4357
|
get_components(): TextureComponents;
|
|
4225
4358
|
|
|
@@ -4266,6 +4399,7 @@ export namespace Cogl {
|
|
|
4266
4399
|
*
|
|
4267
4400
|
* By default the pre-multipled state is `TRUE`.
|
|
4268
4401
|
* @returns `true` if red, green and blue components are internally stored pre-multiplied by the alpha value or `false` if not.
|
|
4402
|
+
* @since 1.18
|
|
4269
4403
|
*/
|
|
4270
4404
|
get_premultiplied(): boolean;
|
|
4271
4405
|
|
|
@@ -4303,6 +4437,7 @@ export namespace Cogl {
|
|
|
4303
4437
|
* an image format as long as {@link Cogl.TextureComponents.RG} isn't used
|
|
4304
4438
|
* as the texture's components.
|
|
4305
4439
|
* @param components
|
|
4440
|
+
* @since 1.18
|
|
4306
4441
|
*/
|
|
4307
4442
|
set_components(components: TextureComponents): void;
|
|
4308
4443
|
|
|
@@ -4380,6 +4515,7 @@ export namespace Cogl {
|
|
|
4380
4515
|
*
|
|
4381
4516
|
* By default the `premultipled` state is `TRUE`.
|
|
4382
4517
|
* @param premultiplied Whether any internally stored red, green or blue components are pre-multiplied by an alpha component.
|
|
4518
|
+
* @since 1.18
|
|
4383
4519
|
*/
|
|
4384
4520
|
set_premultiplied(premultiplied: boolean): void;
|
|
4385
4521
|
|
|
@@ -4417,6 +4553,7 @@ export namespace Cogl {
|
|
|
4417
4553
|
* @param dst_height height of destination region to write. (Must be less than or equal to the bitmap height)
|
|
4418
4554
|
* @param bitmap The source bitmap to read from
|
|
4419
4555
|
* @returns `true` if the subregion upload was successful, and `false` otherwise
|
|
4556
|
+
* @since 1.8
|
|
4420
4557
|
*/
|
|
4421
4558
|
set_region_from_bitmap(src_x: number, src_y: number, dst_x: number, dst_y: number, dst_width: number, dst_height: number, bitmap: Bitmap): boolean;
|
|
4422
4559
|
}
|
|
@@ -4472,6 +4609,7 @@ export namespace Cogl {
|
|
|
4472
4609
|
* is {@link Cogl.TextureComponents.RGBA}. The other constructors which take
|
|
4473
4610
|
* a %CoglBitmap or a data pointer default to the same components as
|
|
4474
4611
|
* the pixel format of the data.
|
|
4612
|
+
* @since 1.18
|
|
4475
4613
|
*/
|
|
4476
4614
|
get_components(): TextureComponents;
|
|
4477
4615
|
|
|
@@ -4518,6 +4656,7 @@ export namespace Cogl {
|
|
|
4518
4656
|
*
|
|
4519
4657
|
* By default the pre-multipled state is `TRUE`.
|
|
4520
4658
|
* @returns `true` if red, green and blue components are internally stored pre-multiplied by the alpha value or `false` if not.
|
|
4659
|
+
* @since 1.18
|
|
4521
4660
|
*/
|
|
4522
4661
|
get_premultiplied(): boolean;
|
|
4523
4662
|
|
|
@@ -4555,6 +4694,7 @@ export namespace Cogl {
|
|
|
4555
4694
|
* an image format as long as {@link Cogl.TextureComponents.RG} isn't used
|
|
4556
4695
|
* as the texture's components.
|
|
4557
4696
|
* @param components
|
|
4697
|
+
* @since 1.18
|
|
4558
4698
|
*/
|
|
4559
4699
|
set_components(components: TextureComponents): void;
|
|
4560
4700
|
|
|
@@ -4632,6 +4772,7 @@ export namespace Cogl {
|
|
|
4632
4772
|
*
|
|
4633
4773
|
* By default the `premultipled` state is `TRUE`.
|
|
4634
4774
|
* @param premultiplied Whether any internally stored red, green or blue components are pre-multiplied by an alpha component.
|
|
4775
|
+
* @since 1.18
|
|
4635
4776
|
*/
|
|
4636
4777
|
set_premultiplied(premultiplied: boolean): void;
|
|
4637
4778
|
|
|
@@ -4669,6 +4810,7 @@ export namespace Cogl {
|
|
|
4669
4810
|
* @param dst_height height of destination region to write. (Must be less than or equal to the bitmap height)
|
|
4670
4811
|
* @param bitmap The source bitmap to read from
|
|
4671
4812
|
* @returns `true` if the subregion upload was successful, and `false` otherwise
|
|
4813
|
+
* @since 1.8
|
|
4672
4814
|
*/
|
|
4673
4815
|
set_region_from_bitmap(src_x: number, src_y: number, dst_x: number, dst_y: number, dst_width: number, dst_height: number, bitmap: Bitmap): boolean;
|
|
4674
4816
|
}
|
|
@@ -4697,6 +4839,7 @@ export namespace Cogl {
|
|
|
4697
4839
|
* parameter, when using {@link Cogl.Color}<!-- -->s as keys in a {@link GLib.HashTable}.
|
|
4698
4840
|
* @param v1 a {@link Cogl.Color}
|
|
4699
4841
|
* @param v2 a {@link Cogl.Color}
|
|
4842
|
+
* @since 1.0
|
|
4700
4843
|
*/
|
|
4701
4844
|
static equal(v1: null, v2: null): boolean;
|
|
4702
4845
|
|
|
@@ -4706,6 +4849,7 @@ export namespace Cogl {
|
|
|
4706
4849
|
* @param hue hue value, in the 0 .. 360 range
|
|
4707
4850
|
* @param saturation saturation value, in the 0 .. 1 range
|
|
4708
4851
|
* @param luminance luminance value, in the 0 .. 1 range
|
|
4852
|
+
* @since 1.16
|
|
4709
4853
|
*/
|
|
4710
4854
|
static init_from_hsl(hue: number, saturation: number, luminance: number): Color;
|
|
4711
4855
|
|
|
@@ -4713,11 +4857,13 @@ export namespace Cogl {
|
|
|
4713
4857
|
/**
|
|
4714
4858
|
* Creates a copy of `color`
|
|
4715
4859
|
* @returns a newly-allocated {@link Cogl.Color}. Use `cogl_color_free()` to free the allocate resources
|
|
4860
|
+
* @since 1.0
|
|
4716
4861
|
*/
|
|
4717
4862
|
copy(): Color;
|
|
4718
4863
|
|
|
4719
4864
|
/**
|
|
4720
4865
|
* Frees the resources allocated by `cogl_color_new()` and `cogl_color_copy()`
|
|
4866
|
+
* @since 1.0
|
|
4721
4867
|
*/
|
|
4722
4868
|
free(): void;
|
|
4723
4869
|
|
|
@@ -4725,6 +4871,7 @@ export namespace Cogl {
|
|
|
4725
4871
|
* Retrieves the alpha channel of `color` as a fixed point
|
|
4726
4872
|
* value between 0 and 1.0.
|
|
4727
4873
|
* @returns the alpha channel of the passed color
|
|
4874
|
+
* @since 1.0
|
|
4728
4875
|
*/
|
|
4729
4876
|
get_alpha(): number;
|
|
4730
4877
|
|
|
@@ -4732,6 +4879,7 @@ export namespace Cogl {
|
|
|
4732
4879
|
* Retrieves the alpha channel of `color` as a byte value
|
|
4733
4880
|
* between 0 and 255
|
|
4734
4881
|
* @returns the alpha channel of the passed color
|
|
4882
|
+
* @since 1.0
|
|
4735
4883
|
*/
|
|
4736
4884
|
get_alpha_byte(): number;
|
|
4737
4885
|
|
|
@@ -4739,6 +4887,7 @@ export namespace Cogl {
|
|
|
4739
4887
|
* Retrieves the alpha channel of `color` as a floating point
|
|
4740
4888
|
* value between 0.0 and 1.0
|
|
4741
4889
|
* @returns the alpha channel of the passed color
|
|
4890
|
+
* @since 1.0
|
|
4742
4891
|
*/
|
|
4743
4892
|
get_alpha_float(): number;
|
|
4744
4893
|
|
|
@@ -4746,6 +4895,7 @@ export namespace Cogl {
|
|
|
4746
4895
|
* Retrieves the blue channel of `color` as a fixed point
|
|
4747
4896
|
* value between 0 and 1.0.
|
|
4748
4897
|
* @returns the blue channel of the passed color
|
|
4898
|
+
* @since 1.0
|
|
4749
4899
|
*/
|
|
4750
4900
|
get_blue(): number;
|
|
4751
4901
|
|
|
@@ -4753,6 +4903,7 @@ export namespace Cogl {
|
|
|
4753
4903
|
* Retrieves the blue channel of `color` as a byte value
|
|
4754
4904
|
* between 0 and 255
|
|
4755
4905
|
* @returns the blue channel of the passed color
|
|
4906
|
+
* @since 1.0
|
|
4756
4907
|
*/
|
|
4757
4908
|
get_blue_byte(): number;
|
|
4758
4909
|
|
|
@@ -4760,6 +4911,7 @@ export namespace Cogl {
|
|
|
4760
4911
|
* Retrieves the blue channel of `color` as a floating point
|
|
4761
4912
|
* value between 0.0 and 1.0
|
|
4762
4913
|
* @returns the blue channel of the passed color
|
|
4914
|
+
* @since 1.0
|
|
4763
4915
|
*/
|
|
4764
4916
|
get_blue_float(): number;
|
|
4765
4917
|
|
|
@@ -4767,6 +4919,7 @@ export namespace Cogl {
|
|
|
4767
4919
|
* Retrieves the green channel of `color` as a fixed point
|
|
4768
4920
|
* value between 0 and 1.0.
|
|
4769
4921
|
* @returns the green channel of the passed color
|
|
4922
|
+
* @since 1.0
|
|
4770
4923
|
*/
|
|
4771
4924
|
get_green(): number;
|
|
4772
4925
|
|
|
@@ -4774,6 +4927,7 @@ export namespace Cogl {
|
|
|
4774
4927
|
* Retrieves the green channel of `color` as a byte value
|
|
4775
4928
|
* between 0 and 255
|
|
4776
4929
|
* @returns the green channel of the passed color
|
|
4930
|
+
* @since 1.0
|
|
4777
4931
|
*/
|
|
4778
4932
|
get_green_byte(): number;
|
|
4779
4933
|
|
|
@@ -4781,6 +4935,7 @@ export namespace Cogl {
|
|
|
4781
4935
|
* Retrieves the green channel of `color` as a floating point
|
|
4782
4936
|
* value between 0.0 and 1.0
|
|
4783
4937
|
* @returns the green channel of the passed color
|
|
4938
|
+
* @since 1.0
|
|
4784
4939
|
*/
|
|
4785
4940
|
get_green_float(): number;
|
|
4786
4941
|
|
|
@@ -4788,6 +4943,7 @@ export namespace Cogl {
|
|
|
4788
4943
|
* Retrieves the red channel of `color` as a fixed point
|
|
4789
4944
|
* value between 0 and 1.0.
|
|
4790
4945
|
* @returns the red channel of the passed color
|
|
4946
|
+
* @since 1.0
|
|
4791
4947
|
*/
|
|
4792
4948
|
get_red(): number;
|
|
4793
4949
|
|
|
@@ -4795,6 +4951,7 @@ export namespace Cogl {
|
|
|
4795
4951
|
* Retrieves the red channel of `color` as a byte value
|
|
4796
4952
|
* between 0 and 255
|
|
4797
4953
|
* @returns the red channel of the passed color
|
|
4954
|
+
* @since 1.0
|
|
4798
4955
|
*/
|
|
4799
4956
|
get_red_byte(): number;
|
|
4800
4957
|
|
|
@@ -4802,6 +4959,7 @@ export namespace Cogl {
|
|
|
4802
4959
|
* Retrieves the red channel of `color` as a floating point
|
|
4803
4960
|
* value between 0.0 and 1.0
|
|
4804
4961
|
* @returns the red channel of the passed color
|
|
4962
|
+
* @since 1.0
|
|
4805
4963
|
*/
|
|
4806
4964
|
get_red_float(): number;
|
|
4807
4965
|
|
|
@@ -4811,12 +4969,14 @@ export namespace Cogl {
|
|
|
4811
4969
|
* @param green value of the green channel, between 0 and 1.0
|
|
4812
4970
|
* @param blue value of the blue channel, between 0 and 1.0
|
|
4813
4971
|
* @param alpha value of the alpha channel, between 0 and 1.0
|
|
4972
|
+
* @since 1.4
|
|
4814
4973
|
*/
|
|
4815
4974
|
init_from_4f(red: number, green: number, blue: number, alpha: number): void;
|
|
4816
4975
|
|
|
4817
4976
|
/**
|
|
4818
4977
|
* Sets the values of the passed channels into a {@link Cogl.Color}
|
|
4819
4978
|
* @param color_array a pointer to an array of 4 float color components
|
|
4979
|
+
* @since 1.4
|
|
4820
4980
|
*/
|
|
4821
4981
|
init_from_4fv(color_array: number): void;
|
|
4822
4982
|
|
|
@@ -4826,6 +4986,7 @@ export namespace Cogl {
|
|
|
4826
4986
|
* @param green value of the green channel, between 0 and 255
|
|
4827
4987
|
* @param blue value of the blue channel, between 0 and 255
|
|
4828
4988
|
* @param alpha value of the alpha channel, between 0 and 255
|
|
4989
|
+
* @since 1.4
|
|
4829
4990
|
*/
|
|
4830
4991
|
init_from_4ub(red: number, green: number, blue: number, alpha: number): void;
|
|
4831
4992
|
|
|
@@ -4833,78 +4994,91 @@ export namespace Cogl {
|
|
|
4833
4994
|
* Converts a non-premultiplied color to a pre-multiplied color. For
|
|
4834
4995
|
* example, semi-transparent red is (1.0, 0, 0, 0.5) when non-premultiplied
|
|
4835
4996
|
* and (0.5, 0, 0, 0.5) when premultiplied.
|
|
4997
|
+
* @since 1.0
|
|
4836
4998
|
*/
|
|
4837
4999
|
premultiply(): void;
|
|
4838
5000
|
|
|
4839
5001
|
/**
|
|
4840
5002
|
* Sets the alpha channel of `color` to `alpha`.
|
|
4841
5003
|
* @param alpha a float value between 0.0f and 1.0f
|
|
5004
|
+
* @since 1.4
|
|
4842
5005
|
*/
|
|
4843
5006
|
set_alpha(alpha: number): void;
|
|
4844
5007
|
|
|
4845
5008
|
/**
|
|
4846
5009
|
* Sets the alpha channel of `color` to `alpha`.
|
|
4847
5010
|
* @param alpha a byte value between 0 and 255
|
|
5011
|
+
* @since 1.4
|
|
4848
5012
|
*/
|
|
4849
5013
|
set_alpha_byte(alpha: number): void;
|
|
4850
5014
|
|
|
4851
5015
|
/**
|
|
4852
5016
|
* Sets the alpha channel of `color` to `alpha`.
|
|
4853
5017
|
* @param alpha a float value between 0.0f and 1.0f
|
|
5018
|
+
* @since 1.4
|
|
4854
5019
|
*/
|
|
4855
5020
|
set_alpha_float(alpha: number): void;
|
|
4856
5021
|
|
|
4857
5022
|
/**
|
|
4858
5023
|
* Sets the blue channel of `color` to `blue`.
|
|
4859
5024
|
* @param blue a float value between 0.0f and 1.0f
|
|
5025
|
+
* @since 1.4
|
|
4860
5026
|
*/
|
|
4861
5027
|
set_blue(blue: number): void;
|
|
4862
5028
|
|
|
4863
5029
|
/**
|
|
4864
5030
|
* Sets the blue channel of `color` to `blue`.
|
|
4865
5031
|
* @param blue a byte value between 0 and 255
|
|
5032
|
+
* @since 1.4
|
|
4866
5033
|
*/
|
|
4867
5034
|
set_blue_byte(blue: number): void;
|
|
4868
5035
|
|
|
4869
5036
|
/**
|
|
4870
5037
|
* Sets the blue channel of `color` to `blue`.
|
|
4871
5038
|
* @param blue a float value between 0.0f and 1.0f
|
|
5039
|
+
* @since 1.4
|
|
4872
5040
|
*/
|
|
4873
5041
|
set_blue_float(blue: number): void;
|
|
4874
5042
|
|
|
4875
5043
|
/**
|
|
4876
5044
|
* Sets the green channel of `color` to `green`.
|
|
4877
5045
|
* @param green a float value between 0.0f and 1.0f
|
|
5046
|
+
* @since 1.4
|
|
4878
5047
|
*/
|
|
4879
5048
|
set_green(green: number): void;
|
|
4880
5049
|
|
|
4881
5050
|
/**
|
|
4882
5051
|
* Sets the green channel of `color` to `green`.
|
|
4883
5052
|
* @param green a byte value between 0 and 255
|
|
5053
|
+
* @since 1.4
|
|
4884
5054
|
*/
|
|
4885
5055
|
set_green_byte(green: number): void;
|
|
4886
5056
|
|
|
4887
5057
|
/**
|
|
4888
5058
|
* Sets the green channel of `color` to `green`.
|
|
4889
5059
|
* @param green a float value between 0.0f and 1.0f
|
|
5060
|
+
* @since 1.4
|
|
4890
5061
|
*/
|
|
4891
5062
|
set_green_float(green: number): void;
|
|
4892
5063
|
|
|
4893
5064
|
/**
|
|
4894
5065
|
* Sets the red channel of `color` to `red`.
|
|
4895
5066
|
* @param red a float value between 0.0f and 1.0f
|
|
5067
|
+
* @since 1.4
|
|
4896
5068
|
*/
|
|
4897
5069
|
set_red(red: number): void;
|
|
4898
5070
|
|
|
4899
5071
|
/**
|
|
4900
5072
|
* Sets the red channel of `color` to `red`.
|
|
4901
5073
|
* @param red a byte value between 0 and 255
|
|
5074
|
+
* @since 1.4
|
|
4902
5075
|
*/
|
|
4903
5076
|
set_red_byte(red: number): void;
|
|
4904
5077
|
|
|
4905
5078
|
/**
|
|
4906
5079
|
* Sets the red channel of `color` to `red`.
|
|
4907
5080
|
* @param red a float value between 0.0f and 1.0f
|
|
5081
|
+
* @since 1.4
|
|
4908
5082
|
*/
|
|
4909
5083
|
set_red_float(red: number): void;
|
|
4910
5084
|
|
|
@@ -4913,6 +5087,7 @@ export namespace Cogl {
|
|
|
4913
5087
|
*
|
|
4914
5088
|
* The `hue` value is in the 0 .. 360 range. The `luminance` and
|
|
4915
5089
|
* `saturation` values are in the 0 .. 1 range.
|
|
5090
|
+
* @since 1.16
|
|
4916
5091
|
*/
|
|
4917
5092
|
to_hsl(): [number, number, number];
|
|
4918
5093
|
|
|
@@ -4920,6 +5095,7 @@ export namespace Cogl {
|
|
|
4920
5095
|
* Converts a pre-multiplied color to a non-premultiplied color. For
|
|
4921
5096
|
* example, semi-transparent red is (0.5, 0, 0, 0.5) when premultiplied
|
|
4922
5097
|
* and (1.0, 0, 0, 0.5) when non-premultiplied.
|
|
5098
|
+
* @since 1.4
|
|
4923
5099
|
*/
|
|
4924
5100
|
unpremultiply(): void;
|
|
4925
5101
|
}
|
|
@@ -5193,6 +5369,7 @@ export namespace Cogl {
|
|
|
5193
5369
|
* is {@link Cogl.TextureComponents.RGBA}. The other constructors which take
|
|
5194
5370
|
* a %CoglBitmap or a data pointer default to the same components as
|
|
5195
5371
|
* the pixel format of the data.
|
|
5372
|
+
* @since 1.18
|
|
5196
5373
|
*/
|
|
5197
5374
|
get_components(): TextureComponents;
|
|
5198
5375
|
|
|
@@ -5239,6 +5416,7 @@ export namespace Cogl {
|
|
|
5239
5416
|
*
|
|
5240
5417
|
* By default the pre-multipled state is `TRUE`.
|
|
5241
5418
|
* @returns `true` if red, green and blue components are internally stored pre-multiplied by the alpha value or `false` if not.
|
|
5419
|
+
* @since 1.18
|
|
5242
5420
|
*/
|
|
5243
5421
|
get_premultiplied(): boolean;
|
|
5244
5422
|
|
|
@@ -5276,6 +5454,7 @@ export namespace Cogl {
|
|
|
5276
5454
|
* an image format as long as {@link Cogl.TextureComponents.RG} isn't used
|
|
5277
5455
|
* as the texture's components.
|
|
5278
5456
|
* @param components
|
|
5457
|
+
* @since 1.18
|
|
5279
5458
|
*/
|
|
5280
5459
|
set_components(components: TextureComponents): void;
|
|
5281
5460
|
|
|
@@ -5353,6 +5532,7 @@ export namespace Cogl {
|
|
|
5353
5532
|
*
|
|
5354
5533
|
* By default the `premultipled` state is `TRUE`.
|
|
5355
5534
|
* @param premultiplied Whether any internally stored red, green or blue components are pre-multiplied by an alpha component.
|
|
5535
|
+
* @since 1.18
|
|
5356
5536
|
*/
|
|
5357
5537
|
set_premultiplied(premultiplied: boolean): void;
|
|
5358
5538
|
|
|
@@ -5390,6 +5570,7 @@ export namespace Cogl {
|
|
|
5390
5570
|
* @param dst_height height of destination region to write. (Must be less than or equal to the bitmap height)
|
|
5391
5571
|
* @param bitmap The source bitmap to read from
|
|
5392
5572
|
* @returns `true` if the subregion upload was successful, and `false` otherwise
|
|
5573
|
+
* @since 1.8
|
|
5393
5574
|
*/
|
|
5394
5575
|
set_region_from_bitmap(src_x: number, src_y: number, dst_x: number, dst_y: number, dst_width: number, dst_height: number, bitmap: Bitmap): boolean;
|
|
5395
5576
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/cogl-11",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for Cogl-11",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "cogl-11.js",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"test": "tsc --project tsconfig.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@girs/gjs": "^4.
|
|
35
|
-
"@girs/cairo-1.0": "^4.
|
|
36
|
-
"@girs/gobject-2.0": "^4.
|
|
37
|
-
"@girs/glib-2.0": "^4.
|
|
38
|
-
"@girs/graphene-1.0": "^4.
|
|
39
|
-
"@girs/gl-1.0": "^4.
|
|
34
|
+
"@girs/gjs": "^4.4.0",
|
|
35
|
+
"@girs/cairo-1.0": "^4.4.0",
|
|
36
|
+
"@girs/gobject-2.0": "^4.4.0",
|
|
37
|
+
"@girs/glib-2.0": "^4.4.0",
|
|
38
|
+
"@girs/graphene-1.0": "^4.4.0",
|
|
39
|
+
"@girs/gl-1.0": "^4.4.0" },
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"typescript": "*"
|
|
42
42
|
},
|