@girs/cogl-13 4.3.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -41
- package/cogl-13.d.ts +205 -169
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -4,82 +4,77 @@
|
|
|
4
4
|

|
|
5
5
|

|
|
6
6
|
|
|
7
|
+
GJS TypeScript type definitions for Cogl-13 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.5.0.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
This package contains type declarations only. It ships no runtime code, so it adds
|
|
10
|
+
nothing to your program and works with any bundler or none at all.
|
|
9
11
|
|
|
10
12
|
## Install
|
|
11
13
|
|
|
12
|
-
Install the type definitions with npm:
|
|
13
14
|
```bash
|
|
14
15
|
npm install @girs/cogl-13
|
|
15
16
|
```
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
Any package manager works. The package has no dependencies beyond other `@girs/*`
|
|
19
|
+
type packages.
|
|
20
|
+
|
|
21
|
+
## What it exports
|
|
22
|
+
|
|
23
|
+
| Import | What you get |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `@girs/cogl-13` | the namespace as a default export, plus the ambient and global declarations |
|
|
26
|
+
| `@girs/cogl-13/ambient` | only the `gi://` module declarations |
|
|
27
|
+
| `@girs/cogl-13/import` | only the `imports.gi` declarations |
|
|
28
|
+
| `@girs/cogl-13/cogl-13` | the namespace, without the side-effecting declarations |
|
|
29
|
+
|
|
30
|
+
## Three ways to import
|
|
31
|
+
|
|
32
|
+
Which one you use depends on how you write imports elsewhere, not on your toolchain.
|
|
33
|
+
|
|
34
|
+
### As a module
|
|
18
35
|
|
|
19
|
-
Import it like any other module:
|
|
20
36
|
```ts
|
|
21
37
|
import Cogl from '@girs/cogl-13';
|
|
22
38
|
```
|
|
23
39
|
|
|
24
|
-
###
|
|
40
|
+
### As `gi://`
|
|
25
41
|
|
|
26
|
-
|
|
27
|
-
|
|
42
|
+
GJS resolves `gi://` at runtime. To give it types, reference the package once, either
|
|
43
|
+
from your entry point or from `tsconfig.json`:
|
|
28
44
|
|
|
29
|
-
`index.ts`:
|
|
30
45
|
```ts
|
|
31
|
-
import '@girs/cogl-13'
|
|
46
|
+
import '@girs/cogl-13';
|
|
32
47
|
```
|
|
33
48
|
|
|
34
|
-
`tsconfig.json`:
|
|
35
49
|
```json
|
|
36
|
-
{
|
|
37
|
-
"compilerOptions": {
|
|
38
|
-
...
|
|
39
|
-
},
|
|
40
|
-
"include": ["@girs/cogl-13"],
|
|
41
|
-
...
|
|
42
|
-
}
|
|
50
|
+
{ "include": ["@girs/cogl-13"] }
|
|
43
51
|
```
|
|
44
52
|
|
|
45
|
-
|
|
53
|
+
Then the runtime spelling type-checks:
|
|
46
54
|
|
|
47
55
|
```ts
|
|
48
56
|
import Cogl from 'gi://Cogl?version=13';
|
|
49
57
|
```
|
|
50
58
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
GJS's global `imports.gi` works too, with types.
|
|
54
|
-
For this you need to include `@girs/cogl-13` or `@girs/cogl-13/import` in your `tsconfig` or entry point Typescript file:
|
|
59
|
+
Referencing `@girs/cogl-13/ambient` instead pulls in these declarations
|
|
60
|
+
alone. See [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules).
|
|
55
61
|
|
|
56
|
-
`
|
|
57
|
-
```ts
|
|
58
|
-
import '@girs/cogl-13'
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
`tsconfig.json`:
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"compilerOptions": {
|
|
65
|
-
...
|
|
66
|
-
},
|
|
67
|
-
"include": ["@girs/cogl-13"],
|
|
68
|
-
...
|
|
69
|
-
}
|
|
70
|
-
```
|
|
62
|
+
### As `imports.gi`
|
|
71
63
|
|
|
72
|
-
|
|
64
|
+
GJS's global object works the same way, via `@girs/cogl-13/import`:
|
|
73
65
|
|
|
74
66
|
```ts
|
|
75
67
|
const Cogl = imports.gi.Cogl;
|
|
76
68
|
```
|
|
77
69
|
|
|
78
|
-
|
|
70
|
+
## Building
|
|
79
71
|
|
|
80
|
-
|
|
72
|
+
The declarations need no build step. If you bundle, every bundler works, since there is
|
|
73
|
+
no runtime code to resolve. The [examples](https://github.com/gjsify/ts-for-gir/tree/main/examples)
|
|
74
|
+
show working setups for several.
|
|
81
75
|
|
|
82
76
|
## Other packages
|
|
83
77
|
|
|
84
|
-
|
|
78
|
+
Every pre-generated package is at [gjsify/types](https://github.com/gjsify/types).
|
|
79
|
+
|
|
85
80
|
|
package/cogl-13.d.ts
CHANGED
|
@@ -32,25 +32,25 @@ export namespace Cogl {
|
|
|
32
32
|
/**
|
|
33
33
|
* Data is the same size of a byte
|
|
34
34
|
*/
|
|
35
|
-
BYTE,
|
|
35
|
+
BYTE = 5120,
|
|
36
36
|
/**
|
|
37
37
|
* Data is the same size of an
|
|
38
38
|
* unsigned byte
|
|
39
39
|
*/
|
|
40
|
-
UNSIGNED_BYTE,
|
|
40
|
+
UNSIGNED_BYTE = 5121,
|
|
41
41
|
/**
|
|
42
42
|
* Data is the same size of a short integer
|
|
43
43
|
*/
|
|
44
|
-
SHORT,
|
|
44
|
+
SHORT = 5122,
|
|
45
45
|
/**
|
|
46
46
|
* Data is the same size of
|
|
47
47
|
* an unsigned short integer
|
|
48
48
|
*/
|
|
49
|
-
UNSIGNED_SHORT,
|
|
49
|
+
UNSIGNED_SHORT = 5123,
|
|
50
50
|
/**
|
|
51
51
|
* Data is the same size of a float
|
|
52
52
|
*/
|
|
53
|
-
FLOAT,
|
|
53
|
+
FLOAT = 5126,
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
|
|
@@ -67,15 +67,15 @@ export namespace Cogl {
|
|
|
67
67
|
* Generic failure code, something went
|
|
68
68
|
* wrong.
|
|
69
69
|
*/
|
|
70
|
-
FAILED,
|
|
70
|
+
FAILED = 0,
|
|
71
71
|
/**
|
|
72
72
|
* Unknown image type.
|
|
73
73
|
*/
|
|
74
|
-
UNKNOWN_TYPE,
|
|
74
|
+
UNKNOWN_TYPE = 1,
|
|
75
75
|
/**
|
|
76
76
|
* An image file was broken somehow.
|
|
77
77
|
*/
|
|
78
|
-
CORRUPT_IMAGE,
|
|
78
|
+
CORRUPT_IMAGE = 2,
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
|
|
@@ -87,20 +87,20 @@ export namespace Cogl {
|
|
|
87
87
|
/**
|
|
88
88
|
* Generic parse error
|
|
89
89
|
*/
|
|
90
|
-
PARSE_ERROR,
|
|
90
|
+
PARSE_ERROR = 0,
|
|
91
91
|
/**
|
|
92
92
|
* Argument parse error
|
|
93
93
|
*/
|
|
94
|
-
ARGUMENT_PARSE_ERROR,
|
|
94
|
+
ARGUMENT_PARSE_ERROR = 1,
|
|
95
95
|
/**
|
|
96
96
|
* Internal parser error
|
|
97
97
|
*/
|
|
98
|
-
INVALID_ERROR,
|
|
98
|
+
INVALID_ERROR = 2,
|
|
99
99
|
/**
|
|
100
100
|
* Blend string not
|
|
101
101
|
* supported by the GPU
|
|
102
102
|
*/
|
|
103
|
-
GPU_UNSUPPORTED_ERROR,
|
|
103
|
+
GPU_UNSUPPORTED_ERROR = 3,
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
|
|
@@ -118,41 +118,41 @@ export namespace Cogl {
|
|
|
118
118
|
/**
|
|
119
119
|
* Never passes.
|
|
120
120
|
*/
|
|
121
|
-
NEVER,
|
|
121
|
+
NEVER = 512,
|
|
122
122
|
/**
|
|
123
123
|
* Passes if the fragment's depth
|
|
124
124
|
* value is less than the value currently in the depth buffer.
|
|
125
125
|
*/
|
|
126
|
-
LESS,
|
|
126
|
+
LESS = 513,
|
|
127
127
|
/**
|
|
128
128
|
* Passes if the fragment's depth
|
|
129
129
|
* value is equal to the value currently in the depth buffer.
|
|
130
130
|
*/
|
|
131
|
-
EQUAL,
|
|
131
|
+
EQUAL = 514,
|
|
132
132
|
/**
|
|
133
133
|
* Passes if the fragment's depth
|
|
134
134
|
* value is less or equal to the value currently in the depth buffer.
|
|
135
135
|
*/
|
|
136
|
-
LEQUAL,
|
|
136
|
+
LEQUAL = 515,
|
|
137
137
|
/**
|
|
138
138
|
* Passes if the fragment's depth
|
|
139
139
|
* value is greater than the value currently in the depth buffer.
|
|
140
140
|
*/
|
|
141
|
-
GREATER,
|
|
141
|
+
GREATER = 516,
|
|
142
142
|
/**
|
|
143
143
|
* Passes if the fragment's depth
|
|
144
144
|
* value is not equal to the value currently in the depth buffer.
|
|
145
145
|
*/
|
|
146
|
-
NOTEQUAL,
|
|
146
|
+
NOTEQUAL = 517,
|
|
147
147
|
/**
|
|
148
148
|
* Passes if the fragment's depth
|
|
149
149
|
* value greater than or equal to the value currently in the depth buffer.
|
|
150
150
|
*/
|
|
151
|
-
GEQUAL,
|
|
151
|
+
GEQUAL = 518,
|
|
152
152
|
/**
|
|
153
153
|
* Always passes.
|
|
154
154
|
*/
|
|
155
|
-
ALWAYS,
|
|
155
|
+
ALWAYS = 519,
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
|
|
@@ -168,37 +168,37 @@ export namespace Cogl {
|
|
|
168
168
|
* {@link Cogl.IndicesType.INT} is supported in
|
|
169
169
|
* `cogl_indices_new()`.
|
|
170
170
|
*/
|
|
171
|
-
OGL_FEATURE_ID_UNSIGNED_INT_INDICES,
|
|
171
|
+
OGL_FEATURE_ID_UNSIGNED_INT_INDICES = 0,
|
|
172
172
|
/**
|
|
173
173
|
* Whether `cogl_buffer_map()` is
|
|
174
174
|
* supported with CoglBufferAccess including read support.
|
|
175
175
|
*/
|
|
176
|
-
OGL_FEATURE_ID_MAP_BUFFER_FOR_READ,
|
|
176
|
+
OGL_FEATURE_ID_MAP_BUFFER_FOR_READ = 1,
|
|
177
177
|
/**
|
|
178
178
|
* Whether `cogl_buffer_map()` is
|
|
179
179
|
* supported with CoglBufferAccess including write support.
|
|
180
180
|
*/
|
|
181
|
-
OGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE,
|
|
182
|
-
OGL_FEATURE_ID_FENCE,
|
|
181
|
+
OGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE = 2,
|
|
182
|
+
OGL_FEATURE_ID_FENCE = 3,
|
|
183
183
|
/**
|
|
184
184
|
* Support for
|
|
185
185
|
* {@link Cogl.TextureComponents.RG} as the internal components of a
|
|
186
186
|
* texture.
|
|
187
187
|
*/
|
|
188
|
-
OGL_FEATURE_ID_TEXTURE_RG,
|
|
188
|
+
OGL_FEATURE_ID_TEXTURE_RG = 4,
|
|
189
189
|
/**
|
|
190
190
|
* Available if the age of {@link Cogl.Onscreen} back
|
|
191
191
|
* buffers are tracked and so `cogl_onscreen_get_buffer_age()` can be
|
|
192
192
|
* expected to return age values other than 0.
|
|
193
193
|
*/
|
|
194
|
-
OGL_FEATURE_ID_BUFFER_AGE,
|
|
195
|
-
OGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL,
|
|
194
|
+
OGL_FEATURE_ID_BUFFER_AGE = 5,
|
|
195
|
+
OGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL = 6,
|
|
196
196
|
/**
|
|
197
197
|
* Whether blitting using
|
|
198
198
|
* `cogl_blit_framebuffer()` is supported.
|
|
199
199
|
*/
|
|
200
|
-
OGL_FEATURE_ID_BLIT_FRAMEBUFFER,
|
|
201
|
-
OGL_FEATURE_ID_TIMESTAMP_QUERY,
|
|
200
|
+
OGL_FEATURE_ID_BLIT_FRAMEBUFFER = 7,
|
|
201
|
+
OGL_FEATURE_ID_TIMESTAMP_QUERY = 8,
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
|
|
@@ -211,11 +211,11 @@ export namespace Cogl {
|
|
|
211
211
|
* The event was not handled, continues the
|
|
212
212
|
* processing
|
|
213
213
|
*/
|
|
214
|
-
CONTINUE,
|
|
214
|
+
CONTINUE = 0,
|
|
215
215
|
/**
|
|
216
216
|
* Remove the event, stops the processing
|
|
217
217
|
*/
|
|
218
|
-
REMOVE,
|
|
218
|
+
REMOVE = 1,
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
|
|
@@ -242,7 +242,7 @@ export namespace Cogl {
|
|
|
242
242
|
* acknowledged a frame and is ready for a
|
|
243
243
|
* new frame to be created.
|
|
244
244
|
*/
|
|
245
|
-
SYNC,
|
|
245
|
+
SYNC = 1,
|
|
246
246
|
/**
|
|
247
247
|
* Notifies that a frame has ended. This
|
|
248
248
|
* is a good time for applications to
|
|
@@ -252,7 +252,7 @@ export namespace Cogl {
|
|
|
252
252
|
* events should be expected after a
|
|
253
253
|
* `COGL_FRAME_EVENT_COMPLETE` event.
|
|
254
254
|
*/
|
|
255
|
-
COMPLETE,
|
|
255
|
+
COMPLETE = 2,
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
|
|
@@ -260,7 +260,7 @@ export namespace Cogl {
|
|
|
260
260
|
* @gir-type Enum
|
|
261
261
|
*/
|
|
262
262
|
enum FramebufferError {
|
|
263
|
-
FRAMEBUFFER_ERROR_ALLOCATE,
|
|
263
|
+
FRAMEBUFFER_ERROR_ALLOCATE = 0,
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
|
|
@@ -272,11 +272,11 @@ export namespace Cogl {
|
|
|
272
272
|
* @gir-type Enum
|
|
273
273
|
*/
|
|
274
274
|
enum GraphicsResetStatus {
|
|
275
|
-
NO_ERROR,
|
|
276
|
-
GUILTY_CONTEXT_RESET,
|
|
277
|
-
INNOCENT_CONTEXT_RESET,
|
|
278
|
-
UNKNOWN_CONTEXT_RESET,
|
|
279
|
-
PURGED_CONTEXT_RESET,
|
|
275
|
+
NO_ERROR = 0,
|
|
276
|
+
GUILTY_CONTEXT_RESET = 1,
|
|
277
|
+
INNOCENT_CONTEXT_RESET = 2,
|
|
278
|
+
UNKNOWN_CONTEXT_RESET = 3,
|
|
279
|
+
PURGED_CONTEXT_RESET = 4,
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
|
|
@@ -296,15 +296,15 @@ export namespace Cogl {
|
|
|
296
296
|
/**
|
|
297
297
|
* Your indices are unsigned bytes
|
|
298
298
|
*/
|
|
299
|
-
BYTE,
|
|
299
|
+
BYTE = 0,
|
|
300
300
|
/**
|
|
301
301
|
* Your indices are unsigned shorts
|
|
302
302
|
*/
|
|
303
|
-
SHORT,
|
|
303
|
+
SHORT = 1,
|
|
304
304
|
/**
|
|
305
305
|
* Your indices are unsigned ints
|
|
306
306
|
*/
|
|
307
|
-
INT,
|
|
307
|
+
INT = 2,
|
|
308
308
|
}
|
|
309
309
|
|
|
310
310
|
|
|
@@ -319,41 +319,41 @@ export namespace Cogl {
|
|
|
319
319
|
/**
|
|
320
320
|
* Never let the fragment through.
|
|
321
321
|
*/
|
|
322
|
-
NEVER,
|
|
322
|
+
NEVER = 512,
|
|
323
323
|
/**
|
|
324
324
|
* Let the fragment through if the incoming
|
|
325
325
|
* alpha value is less than the reference alpha value
|
|
326
326
|
*/
|
|
327
|
-
LESS,
|
|
327
|
+
LESS = 513,
|
|
328
328
|
/**
|
|
329
329
|
* Let the fragment through if the incoming
|
|
330
330
|
* alpha value equals the reference alpha value
|
|
331
331
|
*/
|
|
332
|
-
EQUAL,
|
|
332
|
+
EQUAL = 514,
|
|
333
333
|
/**
|
|
334
334
|
* Let the fragment through if the incoming
|
|
335
335
|
* alpha value is less than or equal to the reference alpha value
|
|
336
336
|
*/
|
|
337
|
-
LEQUAL,
|
|
337
|
+
LEQUAL = 515,
|
|
338
338
|
/**
|
|
339
339
|
* Let the fragment through if the incoming
|
|
340
340
|
* alpha value is greater than the reference alpha value
|
|
341
341
|
*/
|
|
342
|
-
GREATER,
|
|
342
|
+
GREATER = 516,
|
|
343
343
|
/**
|
|
344
344
|
* Let the fragment through if the incoming
|
|
345
345
|
* alpha value does not equal the reference alpha value
|
|
346
346
|
*/
|
|
347
|
-
NOTEQUAL,
|
|
347
|
+
NOTEQUAL = 517,
|
|
348
348
|
/**
|
|
349
349
|
* Let the fragment through if the incoming
|
|
350
350
|
* alpha value is greater than or equal to the reference alpha value.
|
|
351
351
|
*/
|
|
352
|
-
GEQUAL,
|
|
352
|
+
GEQUAL = 518,
|
|
353
353
|
/**
|
|
354
354
|
* Always let the fragment through.
|
|
355
355
|
*/
|
|
356
|
-
ALWAYS,
|
|
356
|
+
ALWAYS = 519,
|
|
357
357
|
}
|
|
358
358
|
|
|
359
359
|
|
|
@@ -367,19 +367,19 @@ export namespace Cogl {
|
|
|
367
367
|
* Neither face will be
|
|
368
368
|
* culled. This is the default.
|
|
369
369
|
*/
|
|
370
|
-
NONE,
|
|
370
|
+
NONE = 0,
|
|
371
371
|
/**
|
|
372
372
|
* Front faces will be culled.
|
|
373
373
|
*/
|
|
374
|
-
FRONT,
|
|
374
|
+
FRONT = 1,
|
|
375
375
|
/**
|
|
376
376
|
* Back faces will be culled.
|
|
377
377
|
*/
|
|
378
|
-
BACK,
|
|
378
|
+
BACK = 2,
|
|
379
379
|
/**
|
|
380
380
|
* All faces will be culled.
|
|
381
381
|
*/
|
|
382
|
-
BOTH,
|
|
382
|
+
BOTH = 3,
|
|
383
383
|
}
|
|
384
384
|
|
|
385
385
|
|
|
@@ -396,38 +396,38 @@ export namespace Cogl {
|
|
|
396
396
|
* Measuring in manhatten distance from the,
|
|
397
397
|
* current pixel center, use the nearest texture texel
|
|
398
398
|
*/
|
|
399
|
-
NEAREST,
|
|
399
|
+
NEAREST = 9728,
|
|
400
400
|
/**
|
|
401
401
|
* Use the weighted average of the 4 texels
|
|
402
402
|
* nearest the current pixel center
|
|
403
403
|
*/
|
|
404
|
-
LINEAR,
|
|
404
|
+
LINEAR = 9729,
|
|
405
405
|
/**
|
|
406
406
|
* Select the mimap level whose
|
|
407
407
|
* texel size most closely matches the current pixel, and use the
|
|
408
408
|
* {@link Cogl.PipelineFilter.NEAREST} criterion
|
|
409
409
|
*/
|
|
410
|
-
NEAREST_MIPMAP_NEAREST,
|
|
410
|
+
NEAREST_MIPMAP_NEAREST = 9984,
|
|
411
411
|
/**
|
|
412
412
|
* Select the mimap level whose
|
|
413
413
|
* texel size most closely matches the current pixel, and use the
|
|
414
414
|
* {@link Cogl.PipelineFilter.LINEAR} criterion
|
|
415
415
|
*/
|
|
416
|
-
LINEAR_MIPMAP_NEAREST,
|
|
416
|
+
LINEAR_MIPMAP_NEAREST = 9985,
|
|
417
417
|
/**
|
|
418
418
|
* Select the two mimap levels
|
|
419
419
|
* whose texel size most closely matches the current pixel, use
|
|
420
420
|
* the {@link Cogl.PipelineFilter.NEAREST} criterion on each one and take
|
|
421
421
|
* their weighted average
|
|
422
422
|
*/
|
|
423
|
-
NEAREST_MIPMAP_LINEAR,
|
|
423
|
+
NEAREST_MIPMAP_LINEAR = 9986,
|
|
424
424
|
/**
|
|
425
425
|
* Select the two mimap levels
|
|
426
426
|
* whose texel size most closely matches the current pixel, use
|
|
427
427
|
* the {@link Cogl.PipelineFilter.LINEAR} criterion on each one and take
|
|
428
428
|
* their weighted average
|
|
429
429
|
*/
|
|
430
|
-
LINEAR_MIPMAP_LINEAR,
|
|
430
|
+
LINEAR_MIPMAP_LINEAR = 9987,
|
|
431
431
|
}
|
|
432
432
|
|
|
433
433
|
|
|
@@ -447,15 +447,15 @@ export namespace Cogl {
|
|
|
447
447
|
* The texture will be repeated. This
|
|
448
448
|
* is useful for example to draw a tiled background.
|
|
449
449
|
*/
|
|
450
|
-
REPEAT,
|
|
451
|
-
MIRRORED_REPEAT,
|
|
450
|
+
REPEAT = 10497,
|
|
451
|
+
MIRRORED_REPEAT = 33648,
|
|
452
452
|
/**
|
|
453
453
|
* The coordinates outside the
|
|
454
454
|
* range 0→1 will sample copies of the edge pixels of the
|
|
455
455
|
* texture. This is useful to avoid artifacts if only one copy of
|
|
456
456
|
* the texture is being rendered.
|
|
457
457
|
*/
|
|
458
|
-
CLAMP_TO_EDGE,
|
|
458
|
+
CLAMP_TO_EDGE = 33071,
|
|
459
459
|
/**
|
|
460
460
|
* Cogl will try to automatically
|
|
461
461
|
* decide which of the above two to use. For `cogl_rectangle()`, it
|
|
@@ -466,7 +466,7 @@ export namespace Cogl {
|
|
|
466
466
|
* layers that have point sprite coordinate generation enabled. This
|
|
467
467
|
* is the default value.
|
|
468
468
|
*/
|
|
469
|
-
AUTOMATIC,
|
|
469
|
+
AUTOMATIC = 519,
|
|
470
470
|
}
|
|
471
471
|
|
|
472
472
|
|
|
@@ -474,8 +474,8 @@ export namespace Cogl {
|
|
|
474
474
|
* @gir-type Enum
|
|
475
475
|
*/
|
|
476
476
|
enum RendererError {
|
|
477
|
-
XLIB_DISPLAY_OPEN,
|
|
478
|
-
BAD_CONSTRAINT,
|
|
477
|
+
XLIB_DISPLAY_OPEN = 0,
|
|
478
|
+
BAD_CONSTRAINT = 1,
|
|
479
479
|
}
|
|
480
480
|
|
|
481
481
|
|
|
@@ -501,11 +501,11 @@ export namespace Cogl {
|
|
|
501
501
|
/**
|
|
502
502
|
* A program for processing vertices
|
|
503
503
|
*/
|
|
504
|
-
VERTEX,
|
|
504
|
+
VERTEX = 0,
|
|
505
505
|
/**
|
|
506
506
|
* A program for processing fragments
|
|
507
507
|
*/
|
|
508
|
-
FRAGMENT,
|
|
508
|
+
FRAGMENT = 1,
|
|
509
509
|
}
|
|
510
510
|
|
|
511
511
|
|
|
@@ -794,50 +794,50 @@ export namespace Cogl {
|
|
|
794
794
|
* A hook for the entire vertex processing
|
|
795
795
|
* stage of the pipeline.
|
|
796
796
|
*/
|
|
797
|
-
VERTEX,
|
|
797
|
+
VERTEX = 0,
|
|
798
798
|
/**
|
|
799
799
|
* A hook for the vertex transformation.
|
|
800
800
|
*/
|
|
801
|
-
VERTEX_TRANSFORM,
|
|
801
|
+
VERTEX_TRANSFORM = 1,
|
|
802
802
|
/**
|
|
803
803
|
* A hook for declaring global data
|
|
804
804
|
* that can be shared with all other snippets that are on a vertex
|
|
805
805
|
* hook.
|
|
806
806
|
*/
|
|
807
|
-
VERTEX_GLOBALS,
|
|
807
|
+
VERTEX_GLOBALS = 2,
|
|
808
808
|
/**
|
|
809
809
|
* A hook for manipulating the point
|
|
810
810
|
* size of a vertex. This is only used if
|
|
811
811
|
* `cogl_pipeline_set_per_vertex_point_size()` is enabled on the
|
|
812
812
|
* pipeline.
|
|
813
813
|
*/
|
|
814
|
-
POINT_SIZE,
|
|
814
|
+
POINT_SIZE = 3,
|
|
815
815
|
/**
|
|
816
816
|
* A hook for the entire fragment
|
|
817
817
|
* processing stage of the pipeline.
|
|
818
818
|
*/
|
|
819
|
-
FRAGMENT,
|
|
819
|
+
FRAGMENT = 2048,
|
|
820
820
|
/**
|
|
821
821
|
* A hook for declaring global
|
|
822
822
|
* data wthat can be shared with all other snippets that are on a
|
|
823
823
|
* fragment hook.
|
|
824
824
|
*/
|
|
825
|
-
FRAGMENT_GLOBALS,
|
|
825
|
+
FRAGMENT_GLOBALS = 2049,
|
|
826
826
|
/**
|
|
827
827
|
* A hook for applying the
|
|
828
828
|
* layer matrix to a texture coordinate for a layer.
|
|
829
829
|
*/
|
|
830
|
-
TEXTURE_COORD_TRANSFORM,
|
|
830
|
+
TEXTURE_COORD_TRANSFORM = 4096,
|
|
831
831
|
/**
|
|
832
832
|
* A hook for the fragment
|
|
833
833
|
* processing of a particular layer.
|
|
834
834
|
*/
|
|
835
|
-
LAYER_FRAGMENT,
|
|
835
|
+
LAYER_FRAGMENT = 6144,
|
|
836
836
|
/**
|
|
837
837
|
* A hook for the texture lookup
|
|
838
838
|
* stage of a given layer in a pipeline.
|
|
839
839
|
*/
|
|
840
|
-
TEXTURE_LOOKUP,
|
|
840
|
+
TEXTURE_LOOKUP = 6145,
|
|
841
841
|
}
|
|
842
842
|
|
|
843
843
|
|
|
@@ -850,15 +850,15 @@ export namespace Cogl {
|
|
|
850
850
|
/**
|
|
851
851
|
* draw to both stereo buffers
|
|
852
852
|
*/
|
|
853
|
-
BOTH,
|
|
853
|
+
BOTH = 0,
|
|
854
854
|
/**
|
|
855
855
|
* draw only to the left stereo buffer
|
|
856
856
|
*/
|
|
857
|
-
LEFT,
|
|
857
|
+
LEFT = 1,
|
|
858
858
|
/**
|
|
859
859
|
* draw only to the left stereo buffer
|
|
860
860
|
*/
|
|
861
|
-
RIGHT,
|
|
861
|
+
RIGHT = 2,
|
|
862
862
|
}
|
|
863
863
|
|
|
864
864
|
|
|
@@ -887,12 +887,12 @@ export namespace Cogl {
|
|
|
887
887
|
* You tried to use a feature or
|
|
888
888
|
* configuration not currently available.
|
|
889
889
|
*/
|
|
890
|
-
UNSUPPORTED,
|
|
890
|
+
UNSUPPORTED = 0,
|
|
891
891
|
/**
|
|
892
892
|
* You tried to allocate a resource
|
|
893
893
|
* such as a texture and there wasn't enough memory.
|
|
894
894
|
*/
|
|
895
|
-
NO_MEMORY,
|
|
895
|
+
NO_MEMORY = 1,
|
|
896
896
|
}
|
|
897
897
|
|
|
898
898
|
|
|
@@ -904,25 +904,25 @@ export namespace Cogl {
|
|
|
904
904
|
/**
|
|
905
905
|
* Only the alpha component
|
|
906
906
|
*/
|
|
907
|
-
A,
|
|
907
|
+
A = 1,
|
|
908
908
|
/**
|
|
909
909
|
* Red and green components. Note that
|
|
910
910
|
* this can only be used if the {@link Cogl.FeatureID.OGL_FEATURE_ID_TEXTURE_RG} feature
|
|
911
911
|
* is advertised.
|
|
912
912
|
*/
|
|
913
|
-
RG,
|
|
913
|
+
RG = 2,
|
|
914
914
|
/**
|
|
915
915
|
* Red, green and blue components
|
|
916
916
|
*/
|
|
917
|
-
RGB,
|
|
917
|
+
RGB = 3,
|
|
918
918
|
/**
|
|
919
919
|
* Red, green, blue and alpha components
|
|
920
920
|
*/
|
|
921
|
-
RGBA,
|
|
921
|
+
RGBA = 4,
|
|
922
922
|
/**
|
|
923
923
|
* Only a depth component
|
|
924
924
|
*/
|
|
925
|
-
DEPTH,
|
|
925
|
+
DEPTH = 5,
|
|
926
926
|
}
|
|
927
927
|
|
|
928
928
|
|
|
@@ -934,17 +934,17 @@ export namespace Cogl {
|
|
|
934
934
|
/**
|
|
935
935
|
* Unsupported size
|
|
936
936
|
*/
|
|
937
|
-
SIZE,
|
|
937
|
+
SIZE = 0,
|
|
938
938
|
/**
|
|
939
939
|
* Unsupported format
|
|
940
940
|
*/
|
|
941
|
-
FORMAT,
|
|
942
|
-
BAD_PARAMETER,
|
|
941
|
+
FORMAT = 1,
|
|
942
|
+
BAD_PARAMETER = 2,
|
|
943
943
|
/**
|
|
944
944
|
* A primitive texture type that is
|
|
945
945
|
* unsupported by the driver was used
|
|
946
946
|
*/
|
|
947
|
-
TYPE,
|
|
947
|
+
TYPE = 3,
|
|
948
948
|
}
|
|
949
949
|
|
|
950
950
|
|
|
@@ -957,35 +957,35 @@ export namespace Cogl {
|
|
|
957
957
|
* FIXME, equivalent to
|
|
958
958
|
* <constant>GL_POINTS</constant>
|
|
959
959
|
*/
|
|
960
|
-
POINTS,
|
|
960
|
+
POINTS = 0,
|
|
961
961
|
/**
|
|
962
962
|
* FIXME, equivalent to <constant>GL_LINES</constant>
|
|
963
963
|
*/
|
|
964
|
-
LINES,
|
|
964
|
+
LINES = 1,
|
|
965
965
|
/**
|
|
966
966
|
* FIXME, equivalent to
|
|
967
967
|
* <constant>GL_LINE_LOOP</constant>
|
|
968
968
|
*/
|
|
969
|
-
LINE_LOOP,
|
|
969
|
+
LINE_LOOP = 2,
|
|
970
970
|
/**
|
|
971
971
|
* FIXME, equivalent to
|
|
972
972
|
* <constant>GL_LINE_STRIP</constant>
|
|
973
973
|
*/
|
|
974
|
-
LINE_STRIP,
|
|
974
|
+
LINE_STRIP = 3,
|
|
975
975
|
/**
|
|
976
976
|
* FIXME, equivalent to
|
|
977
977
|
* <constant>GL_TRIANGLES</constant>
|
|
978
978
|
*/
|
|
979
|
-
TRIANGLES,
|
|
979
|
+
TRIANGLES = 4,
|
|
980
980
|
/**
|
|
981
981
|
* FIXME, equivalent to
|
|
982
982
|
* <constant>GL_TRIANGLE_STRIP</constant>
|
|
983
983
|
*/
|
|
984
|
-
TRIANGLE_STRIP,
|
|
984
|
+
TRIANGLE_STRIP = 5,
|
|
985
985
|
/**
|
|
986
986
|
* FIXME, equivalent to <constant>GL_TRIANGLE_FAN</constant>
|
|
987
987
|
*/
|
|
988
|
-
TRIANGLE_FAN,
|
|
988
|
+
TRIANGLE_FAN = 6,
|
|
989
989
|
}
|
|
990
990
|
|
|
991
991
|
|
|
@@ -999,11 +999,11 @@ export namespace Cogl {
|
|
|
999
999
|
/**
|
|
1000
1000
|
* Vertices are in a clockwise order
|
|
1001
1001
|
*/
|
|
1002
|
-
CLOCKWISE,
|
|
1002
|
+
CLOCKWISE = 0,
|
|
1003
1003
|
/**
|
|
1004
1004
|
* Vertices are in a counter-clockwise order
|
|
1005
1005
|
*/
|
|
1006
|
-
COUNTER_CLOCKWISE,
|
|
1006
|
+
COUNTER_CLOCKWISE = 1,
|
|
1007
1007
|
}
|
|
1008
1008
|
|
|
1009
1009
|
|
|
@@ -1011,37 +1011,59 @@ export namespace Cogl {
|
|
|
1011
1011
|
* @gir-type Enum
|
|
1012
1012
|
*/
|
|
1013
1013
|
enum WinsysFeature {
|
|
1014
|
-
VBLANK_COUNTER,
|
|
1015
|
-
VBLANK_WAIT,
|
|
1016
|
-
TEXTURE_FROM_PIXMAP,
|
|
1017
|
-
SWAP_BUFFERS_EVENT,
|
|
1018
|
-
SWAP_REGION,
|
|
1019
|
-
SWAP_REGION_THROTTLE,
|
|
1020
|
-
SWAP_REGION_SYNCHRONIZED,
|
|
1021
|
-
BUFFER_AGE,
|
|
1022
|
-
SYNC_AND_COMPLETE_EVENT,
|
|
1023
|
-
N_FEATURES,
|
|
1014
|
+
VBLANK_COUNTER = 0,
|
|
1015
|
+
VBLANK_WAIT = 1,
|
|
1016
|
+
TEXTURE_FROM_PIXMAP = 2,
|
|
1017
|
+
SWAP_BUFFERS_EVENT = 3,
|
|
1018
|
+
SWAP_REGION = 4,
|
|
1019
|
+
SWAP_REGION_THROTTLE = 5,
|
|
1020
|
+
SWAP_REGION_SYNCHRONIZED = 6,
|
|
1021
|
+
BUFFER_AGE = 7,
|
|
1022
|
+
SYNC_AND_COMPLETE_EVENT = 8,
|
|
1023
|
+
N_FEATURES = 9,
|
|
1024
1024
|
}
|
|
1025
1025
|
|
|
1026
1026
|
|
|
1027
|
+
/**
|
|
1028
|
+
* @default 64
|
|
1029
|
+
*/
|
|
1027
1030
|
const AFIRST_BIT: number;
|
|
1028
1031
|
|
|
1032
|
+
/**
|
|
1033
|
+
* @default 16
|
|
1034
|
+
*/
|
|
1029
1035
|
const A_BIT: number;
|
|
1030
1036
|
|
|
1037
|
+
/**
|
|
1038
|
+
* @default 32
|
|
1039
|
+
*/
|
|
1031
1040
|
const BGR_BIT: number;
|
|
1032
1041
|
|
|
1042
|
+
/**
|
|
1043
|
+
* @default 256
|
|
1044
|
+
*/
|
|
1033
1045
|
const DEPTH_BIT: number;
|
|
1034
1046
|
|
|
1035
1047
|
/**
|
|
1036
1048
|
* The maximum number of planes of a pixel format (see also
|
|
1037
1049
|
* `cogl_pixel_format_get_planes()`).
|
|
1050
|
+
* @default 4
|
|
1038
1051
|
*/
|
|
1039
1052
|
const PIXEL_FORMAT_MAX_PLANES: number;
|
|
1040
1053
|
|
|
1054
|
+
/**
|
|
1055
|
+
* @default 128
|
|
1056
|
+
*/
|
|
1041
1057
|
const PREMULT_BIT: number;
|
|
1042
1058
|
|
|
1059
|
+
/**
|
|
1060
|
+
* @default 512
|
|
1061
|
+
*/
|
|
1043
1062
|
const STENCIL_BIT: number;
|
|
1044
1063
|
|
|
1064
|
+
/**
|
|
1065
|
+
* @default 127
|
|
1066
|
+
*/
|
|
1045
1067
|
const TEXTURE_MAX_WASTE: number;
|
|
1046
1068
|
|
|
1047
1069
|
function blend_string_error_quark(): number;
|
|
@@ -1094,6 +1116,7 @@ export namespace Cogl {
|
|
|
1094
1116
|
* @param dst_y Destination y position
|
|
1095
1117
|
* @param width Width of region to copy
|
|
1096
1118
|
* @param height Height of region to copy
|
|
1119
|
+
* @throws GLib.Error
|
|
1097
1120
|
*/
|
|
1098
1121
|
function blit_framebuffer(framebuffer: Framebuffer, dst: Framebuffer, src_x: number, src_y: number, dst_x: number, dst_y: number, width: number, height: number): boolean;
|
|
1099
1122
|
|
|
@@ -1444,11 +1467,13 @@ export namespace Cogl {
|
|
|
1444
1467
|
|
|
1445
1468
|
/**
|
|
1446
1469
|
* @param fd
|
|
1470
|
+
* @throws GLib.Error
|
|
1447
1471
|
*/
|
|
1448
1472
|
function start_tracing_with_fd(fd: number): boolean;
|
|
1449
1473
|
|
|
1450
1474
|
/**
|
|
1451
1475
|
* @param filename
|
|
1476
|
+
* @throws GLib.Error
|
|
1452
1477
|
*/
|
|
1453
1478
|
function start_tracing_with_path(filename: string): boolean;
|
|
1454
1479
|
|
|
@@ -1517,15 +1542,15 @@ export namespace Cogl {
|
|
|
1517
1542
|
/**
|
|
1518
1543
|
* Selects the primary color buffer
|
|
1519
1544
|
*/
|
|
1520
|
-
COLOR,
|
|
1545
|
+
COLOR = 1,
|
|
1521
1546
|
/**
|
|
1522
1547
|
* Selects the depth buffer
|
|
1523
1548
|
*/
|
|
1524
|
-
DEPTH,
|
|
1549
|
+
DEPTH = 2,
|
|
1525
1550
|
/**
|
|
1526
1551
|
* Selects the stencil buffer
|
|
1527
1552
|
*/
|
|
1528
|
-
STENCIL,
|
|
1553
|
+
STENCIL = 4,
|
|
1529
1554
|
}
|
|
1530
1555
|
|
|
1531
1556
|
|
|
@@ -1537,11 +1562,11 @@ export namespace Cogl {
|
|
|
1537
1562
|
/**
|
|
1538
1563
|
* FIXME
|
|
1539
1564
|
*/
|
|
1540
|
-
WINDOW_BUFFER,
|
|
1565
|
+
WINDOW_BUFFER = 2,
|
|
1541
1566
|
/**
|
|
1542
1567
|
* FIXME
|
|
1543
1568
|
*/
|
|
1544
|
-
OFFSCREEN_BUFFER,
|
|
1569
|
+
OFFSCREEN_BUFFER = 4,
|
|
1545
1570
|
}
|
|
1546
1571
|
|
|
1547
1572
|
|
|
@@ -1549,8 +1574,8 @@ export namespace Cogl {
|
|
|
1549
1574
|
* @gir-type Flags
|
|
1550
1575
|
*/
|
|
1551
1576
|
enum EglImageFlags {
|
|
1552
|
-
NONE,
|
|
1553
|
-
NO_GET_DATA,
|
|
1577
|
+
NONE = 0,
|
|
1578
|
+
NO_GET_DATA = 1,
|
|
1554
1579
|
}
|
|
1555
1580
|
|
|
1556
1581
|
|
|
@@ -1579,194 +1604,194 @@ export namespace Cogl {
|
|
|
1579
1604
|
/**
|
|
1580
1605
|
* Any format
|
|
1581
1606
|
*/
|
|
1582
|
-
ANY,
|
|
1607
|
+
ANY = 0,
|
|
1583
1608
|
/**
|
|
1584
1609
|
* 8 bits alpha mask
|
|
1585
1610
|
*/
|
|
1586
|
-
A_8,
|
|
1611
|
+
A_8 = 17,
|
|
1587
1612
|
/**
|
|
1588
1613
|
* RGB, 16 bits
|
|
1589
1614
|
*/
|
|
1590
|
-
RGB_565,
|
|
1615
|
+
RGB_565 = 4,
|
|
1591
1616
|
/**
|
|
1592
1617
|
* RGBA, 16 bits
|
|
1593
1618
|
*/
|
|
1594
|
-
RGBA_4444,
|
|
1619
|
+
RGBA_4444 = 21,
|
|
1595
1620
|
/**
|
|
1596
1621
|
* RGBA, 16 bits
|
|
1597
1622
|
*/
|
|
1598
|
-
RGBA_5551,
|
|
1623
|
+
RGBA_5551 = 22,
|
|
1599
1624
|
/**
|
|
1600
1625
|
* Not currently supported
|
|
1601
1626
|
*/
|
|
1602
|
-
YUV,
|
|
1627
|
+
YUV = 7,
|
|
1603
1628
|
/**
|
|
1604
1629
|
* Single luminance component
|
|
1605
1630
|
*/
|
|
1606
|
-
G_8,
|
|
1631
|
+
G_8 = 8,
|
|
1607
1632
|
/**
|
|
1608
1633
|
* Single luminance component, 16 bits
|
|
1609
1634
|
*/
|
|
1610
|
-
G_16,
|
|
1635
|
+
G_16 = 14,
|
|
1611
1636
|
/**
|
|
1612
1637
|
* RG, 16 bits. Note that red-green textures
|
|
1613
1638
|
* are only available if {@link Cogl.FeatureID.OGL_FEATURE_ID_TEXTURE_RG} is advertised.
|
|
1614
1639
|
* See `cogl_texture_set_components()` for details.
|
|
1615
1640
|
*/
|
|
1616
|
-
RG_88,
|
|
1641
|
+
RG_88 = 9,
|
|
1617
1642
|
/**
|
|
1618
1643
|
* RG, 32 bits
|
|
1619
1644
|
*/
|
|
1620
|
-
RG_1616,
|
|
1645
|
+
RG_1616 = 15,
|
|
1621
1646
|
/**
|
|
1622
1647
|
* RGB, 24 bits
|
|
1623
1648
|
*/
|
|
1624
|
-
RGB_888,
|
|
1649
|
+
RGB_888 = 2,
|
|
1625
1650
|
/**
|
|
1626
1651
|
* BGR, 24 bits
|
|
1627
1652
|
*/
|
|
1628
|
-
BGR_888,
|
|
1653
|
+
BGR_888 = 34,
|
|
1629
1654
|
/**
|
|
1630
1655
|
* RGBX, 32 bits
|
|
1631
1656
|
*/
|
|
1632
|
-
RGBX_8888,
|
|
1657
|
+
RGBX_8888 = 3,
|
|
1633
1658
|
/**
|
|
1634
1659
|
* RGBA, 32 bits
|
|
1635
1660
|
*/
|
|
1636
|
-
RGBA_8888,
|
|
1661
|
+
RGBA_8888 = 19,
|
|
1637
1662
|
/**
|
|
1638
1663
|
* BGRX, 32 bits
|
|
1639
1664
|
*/
|
|
1640
|
-
BGRX_8888,
|
|
1665
|
+
BGRX_8888 = 35,
|
|
1641
1666
|
/**
|
|
1642
1667
|
* BGRA, 32 bits
|
|
1643
1668
|
*/
|
|
1644
|
-
BGRA_8888,
|
|
1669
|
+
BGRA_8888 = 51,
|
|
1645
1670
|
/**
|
|
1646
1671
|
* XRGB, 32 bits
|
|
1647
1672
|
*/
|
|
1648
|
-
XRGB_8888,
|
|
1673
|
+
XRGB_8888 = 67,
|
|
1649
1674
|
/**
|
|
1650
1675
|
* ARGB, 32 bits
|
|
1651
1676
|
*/
|
|
1652
|
-
ARGB_8888,
|
|
1677
|
+
ARGB_8888 = 83,
|
|
1653
1678
|
/**
|
|
1654
1679
|
* XBGR, 32 bits
|
|
1655
1680
|
*/
|
|
1656
|
-
XBGR_8888,
|
|
1681
|
+
XBGR_8888 = 99,
|
|
1657
1682
|
/**
|
|
1658
1683
|
* ABGR, 32 bits
|
|
1659
1684
|
*/
|
|
1660
|
-
ABGR_8888,
|
|
1685
|
+
ABGR_8888 = 115,
|
|
1661
1686
|
/**
|
|
1662
1687
|
* RGBA, 32 bits, 10 bpc
|
|
1663
1688
|
*/
|
|
1664
|
-
RGBA_1010102,
|
|
1689
|
+
RGBA_1010102 = 29,
|
|
1665
1690
|
/**
|
|
1666
1691
|
* BGRA, 32 bits, 10 bpc
|
|
1667
1692
|
*/
|
|
1668
|
-
BGRA_1010102,
|
|
1693
|
+
BGRA_1010102 = 61,
|
|
1669
1694
|
/**
|
|
1670
1695
|
* XRGB, 32 bits, 10 bpc
|
|
1671
1696
|
*/
|
|
1672
|
-
XRGB_2101010,
|
|
1697
|
+
XRGB_2101010 = 77,
|
|
1673
1698
|
/**
|
|
1674
1699
|
* ARGB, 32 bits, 10 bpc
|
|
1675
1700
|
*/
|
|
1676
|
-
ARGB_2101010,
|
|
1701
|
+
ARGB_2101010 = 93,
|
|
1677
1702
|
/**
|
|
1678
1703
|
* XBGR, 32 bits, 10 bpc
|
|
1679
1704
|
*/
|
|
1680
|
-
XBGR_2101010,
|
|
1705
|
+
XBGR_2101010 = 109,
|
|
1681
1706
|
/**
|
|
1682
1707
|
* ABGR, 32 bits, 10 bpc
|
|
1683
1708
|
*/
|
|
1684
|
-
ABGR_2101010,
|
|
1709
|
+
ABGR_2101010 = 125,
|
|
1685
1710
|
/**
|
|
1686
1711
|
* RGBX half floating point, 64 bit
|
|
1687
1712
|
*/
|
|
1688
|
-
RGBX_FP_16161616,
|
|
1713
|
+
RGBX_FP_16161616 = 11,
|
|
1689
1714
|
/**
|
|
1690
1715
|
* RGBA half floating point, 64 bit
|
|
1691
1716
|
*/
|
|
1692
|
-
RGBA_FP_16161616,
|
|
1717
|
+
RGBA_FP_16161616 = 27,
|
|
1693
1718
|
/**
|
|
1694
1719
|
* BGRX half floating point, 64 bit
|
|
1695
1720
|
*/
|
|
1696
|
-
BGRX_FP_16161616,
|
|
1721
|
+
BGRX_FP_16161616 = 43,
|
|
1697
1722
|
/**
|
|
1698
1723
|
* BGRA half floating point, 64 bit
|
|
1699
1724
|
*/
|
|
1700
|
-
BGRA_FP_16161616,
|
|
1701
|
-
XRGB_FP_16161616,
|
|
1725
|
+
BGRA_FP_16161616 = 59,
|
|
1726
|
+
XRGB_FP_16161616 = 75,
|
|
1702
1727
|
/**
|
|
1703
1728
|
* ARGB half floating point, 64 bit
|
|
1704
1729
|
*/
|
|
1705
|
-
ARGB_FP_16161616,
|
|
1706
|
-
XBGR_FP_16161616,
|
|
1730
|
+
ARGB_FP_16161616 = 91,
|
|
1731
|
+
XBGR_FP_16161616 = 107,
|
|
1707
1732
|
/**
|
|
1708
1733
|
* ABGR half floating point, 64 bit
|
|
1709
1734
|
*/
|
|
1710
|
-
ABGR_FP_16161616,
|
|
1735
|
+
ABGR_FP_16161616 = 123,
|
|
1711
1736
|
/**
|
|
1712
1737
|
* Premultiplied RGBA, 32 bits
|
|
1713
1738
|
*/
|
|
1714
|
-
RGBA_8888_PRE,
|
|
1739
|
+
RGBA_8888_PRE = 147,
|
|
1715
1740
|
/**
|
|
1716
1741
|
* Premultiplied BGRA, 32 bits
|
|
1717
1742
|
*/
|
|
1718
|
-
BGRA_8888_PRE,
|
|
1743
|
+
BGRA_8888_PRE = 179,
|
|
1719
1744
|
/**
|
|
1720
1745
|
* Premultiplied ARGB, 32 bits
|
|
1721
1746
|
*/
|
|
1722
|
-
ARGB_8888_PRE,
|
|
1747
|
+
ARGB_8888_PRE = 211,
|
|
1723
1748
|
/**
|
|
1724
1749
|
* Premultiplied ABGR, 32 bits
|
|
1725
1750
|
*/
|
|
1726
|
-
ABGR_8888_PRE,
|
|
1751
|
+
ABGR_8888_PRE = 243,
|
|
1727
1752
|
/**
|
|
1728
1753
|
* Premultiplied RGBA, 16 bits
|
|
1729
1754
|
*/
|
|
1730
|
-
RGBA_4444_PRE,
|
|
1755
|
+
RGBA_4444_PRE = 149,
|
|
1731
1756
|
/**
|
|
1732
1757
|
* Premultiplied RGBA, 16 bits
|
|
1733
1758
|
*/
|
|
1734
|
-
RGBA_5551_PRE,
|
|
1759
|
+
RGBA_5551_PRE = 150,
|
|
1735
1760
|
/**
|
|
1736
1761
|
* Premultiplied RGBA, 32 bits, 10 bpc
|
|
1737
1762
|
*/
|
|
1738
|
-
RGBA_1010102_PRE,
|
|
1763
|
+
RGBA_1010102_PRE = 157,
|
|
1739
1764
|
/**
|
|
1740
1765
|
* Premultiplied BGRA, 32 bits, 10 bpc
|
|
1741
1766
|
*/
|
|
1742
|
-
BGRA_1010102_PRE,
|
|
1767
|
+
BGRA_1010102_PRE = 189,
|
|
1743
1768
|
/**
|
|
1744
1769
|
* Premultiplied ARGB, 32 bits, 10 bpc
|
|
1745
1770
|
*/
|
|
1746
|
-
ARGB_2101010_PRE,
|
|
1771
|
+
ARGB_2101010_PRE = 221,
|
|
1747
1772
|
/**
|
|
1748
1773
|
* Premultiplied ABGR, 32 bits, 10 bpc
|
|
1749
1774
|
*/
|
|
1750
|
-
ABGR_2101010_PRE,
|
|
1775
|
+
ABGR_2101010_PRE = 253,
|
|
1751
1776
|
/**
|
|
1752
1777
|
* Premultiplied RGBA half floating point, 64 bit
|
|
1753
1778
|
*/
|
|
1754
|
-
RGBA_FP_16161616_PRE,
|
|
1779
|
+
RGBA_FP_16161616_PRE = 155,
|
|
1755
1780
|
/**
|
|
1756
1781
|
* Premultiplied BGRA half floating point, 64 bit
|
|
1757
1782
|
*/
|
|
1758
|
-
BGRA_FP_16161616_PRE,
|
|
1783
|
+
BGRA_FP_16161616_PRE = 187,
|
|
1759
1784
|
/**
|
|
1760
1785
|
* Premultiplied ARGB half floating point, 64 bit
|
|
1761
1786
|
*/
|
|
1762
|
-
ARGB_FP_16161616_PRE,
|
|
1787
|
+
ARGB_FP_16161616_PRE = 219,
|
|
1763
1788
|
/**
|
|
1764
1789
|
* Premultiplied ABGR half floating point, 64 bit
|
|
1765
1790
|
*/
|
|
1766
|
-
ABGR_FP_16161616_PRE,
|
|
1767
|
-
DEPTH_16,
|
|
1768
|
-
DEPTH_32,
|
|
1769
|
-
DEPTH_24_STENCIL_8,
|
|
1791
|
+
ABGR_FP_16161616_PRE = 251,
|
|
1792
|
+
DEPTH_16 = 265,
|
|
1793
|
+
DEPTH_32 = 259,
|
|
1794
|
+
DEPTH_24_STENCIL_8 = 771,
|
|
1770
1795
|
}
|
|
1771
1796
|
|
|
1772
1797
|
|
|
@@ -1778,7 +1803,7 @@ export namespace Cogl {
|
|
|
1778
1803
|
/**
|
|
1779
1804
|
* Read from the color buffer
|
|
1780
1805
|
*/
|
|
1781
|
-
READ_PIXELS_COLOR_BUFFER,
|
|
1806
|
+
READ_PIXELS_COLOR_BUFFER = 1,
|
|
1782
1807
|
}
|
|
1783
1808
|
|
|
1784
1809
|
|
|
@@ -2105,6 +2130,7 @@ export namespace Cogl {
|
|
|
2105
2130
|
* program will abort with an error message if there is an error during
|
|
2106
2131
|
* automatic allocation.</note>
|
|
2107
2132
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
2133
|
+
* @throws GLib.Error
|
|
2108
2134
|
*/
|
|
2109
2135
|
allocate(): boolean;
|
|
2110
2136
|
|
|
@@ -3617,6 +3643,7 @@ export namespace Cogl {
|
|
|
3617
3643
|
* is in premultiplied form.
|
|
3618
3644
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired blend function.
|
|
3619
3645
|
* @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).
|
|
3646
|
+
* @throws GLib.Error
|
|
3620
3647
|
*/
|
|
3621
3648
|
set_blend(blend_string: string): boolean;
|
|
3622
3649
|
|
|
@@ -3771,6 +3798,7 @@ export namespace Cogl {
|
|
|
3771
3798
|
* @param layer_index Specifies the layer you want define a combine function for
|
|
3772
3799
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired texture combine function.
|
|
3773
3800
|
* @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
|
|
3801
|
+
* @throws GLib.Error
|
|
3774
3802
|
*/
|
|
3775
3803
|
set_layer_combine(layer_index: number, blend_string: string): boolean;
|
|
3776
3804
|
|
|
@@ -3833,6 +3861,7 @@ export namespace Cogl {
|
|
|
3833
3861
|
* @param layer_index the layer number to change.
|
|
3834
3862
|
* @param enable whether to enable point sprite coord generation.
|
|
3835
3863
|
* @returns `true` if the function succeeds, `false` otherwise.
|
|
3864
|
+
* @throws GLib.Error
|
|
3836
3865
|
*/
|
|
3837
3866
|
set_layer_point_sprite_coords_enabled(layer_index: number, enable: boolean): boolean;
|
|
3838
3867
|
|
|
@@ -3879,6 +3908,7 @@ export namespace Cogl {
|
|
|
3879
3908
|
* undefined.
|
|
3880
3909
|
* @param enable whether to enable per-vertex point size
|
|
3881
3910
|
* @returns `true` if the change succeeded or `false` otherwise
|
|
3911
|
+
* @throws GLib.Error
|
|
3882
3912
|
*/
|
|
3883
3913
|
set_per_vertex_point_size(enable: boolean): boolean;
|
|
3884
3914
|
|
|
@@ -4195,6 +4225,7 @@ export namespace Cogl {
|
|
|
4195
4225
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
4196
4226
|
* framebuffer and rendered too.</note>
|
|
4197
4227
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
4228
|
+
* @throws GLib.Error
|
|
4198
4229
|
*/
|
|
4199
4230
|
allocate(): boolean;
|
|
4200
4231
|
|
|
@@ -4340,6 +4371,7 @@ export namespace Cogl {
|
|
|
4340
4371
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
4341
4372
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
4342
4373
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
4374
|
+
* @throws GLib.Error
|
|
4343
4375
|
*/
|
|
4344
4376
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
4345
4377
|
|
|
@@ -4447,6 +4479,7 @@ export namespace Cogl {
|
|
|
4447
4479
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
4448
4480
|
* framebuffer and rendered too.</note>
|
|
4449
4481
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
4482
|
+
* @throws GLib.Error
|
|
4450
4483
|
*/
|
|
4451
4484
|
allocate(): boolean;
|
|
4452
4485
|
|
|
@@ -4592,6 +4625,7 @@ export namespace Cogl {
|
|
|
4592
4625
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
4593
4626
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
4594
4627
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
4628
|
+
* @throws GLib.Error
|
|
4595
4629
|
*/
|
|
4596
4630
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
4597
4631
|
|
|
@@ -5162,6 +5196,7 @@ export namespace Cogl {
|
|
|
5162
5196
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
5163
5197
|
* framebuffer and rendered too.</note>
|
|
5164
5198
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
5199
|
+
* @throws GLib.Error
|
|
5165
5200
|
*/
|
|
5166
5201
|
allocate(): boolean;
|
|
5167
5202
|
|
|
@@ -5307,6 +5342,7 @@ export namespace Cogl {
|
|
|
5307
5342
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
5308
5343
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
5309
5344
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
5345
|
+
* @throws GLib.Error
|
|
5310
5346
|
*/
|
|
5311
5347
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
5312
5348
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/cogl-13",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for Cogl-13",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "cogl-13.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.5.0",
|
|
35
|
+
"@girs/cairo-1.0": "^4.5.0",
|
|
36
|
+
"@girs/gobject-2.0": "^4.5.0",
|
|
37
|
+
"@girs/glib-2.0": "^4.5.0",
|
|
38
|
+
"@girs/graphene-1.0": "^4.5.0",
|
|
39
|
+
"@girs/gl-1.0": "^4.5.0" },
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"typescript": "*"
|
|
42
42
|
},
|