@girs/cogl-11 4.4.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-11.d.ts +195 -161
- 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-11 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-11
|
|
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-11` | the namespace as a default export, plus the ambient and global declarations |
|
|
26
|
+
| `@girs/cogl-11/ambient` | only the `gi://` module declarations |
|
|
27
|
+
| `@girs/cogl-11/import` | only the `imports.gi` declarations |
|
|
28
|
+
| `@girs/cogl-11/cogl-11` | 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-11';
|
|
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-11'
|
|
46
|
+
import '@girs/cogl-11';
|
|
32
47
|
```
|
|
33
48
|
|
|
34
|
-
`tsconfig.json`:
|
|
35
49
|
```json
|
|
36
|
-
{
|
|
37
|
-
"compilerOptions": {
|
|
38
|
-
...
|
|
39
|
-
},
|
|
40
|
-
"include": ["@girs/cogl-11"],
|
|
41
|
-
...
|
|
42
|
-
}
|
|
50
|
+
{ "include": ["@girs/cogl-11"] }
|
|
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=11';
|
|
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-11` or `@girs/cogl-11/import` in your `tsconfig` or entry point Typescript file:
|
|
59
|
+
Referencing `@girs/cogl-11/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-11'
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
`tsconfig.json`:
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"compilerOptions": {
|
|
65
|
-
...
|
|
66
|
-
},
|
|
67
|
-
"include": ["@girs/cogl-11"],
|
|
68
|
-
...
|
|
69
|
-
}
|
|
70
|
-
```
|
|
62
|
+
### As `imports.gi`
|
|
71
63
|
|
|
72
|
-
|
|
64
|
+
GJS's global object works the same way, via `@girs/cogl-11/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-11.d.ts
CHANGED
|
@@ -33,25 +33,25 @@ export namespace Cogl {
|
|
|
33
33
|
/**
|
|
34
34
|
* Data is the same size of a byte
|
|
35
35
|
*/
|
|
36
|
-
BYTE,
|
|
36
|
+
BYTE = 5120,
|
|
37
37
|
/**
|
|
38
38
|
* Data is the same size of an
|
|
39
39
|
* unsigned byte
|
|
40
40
|
*/
|
|
41
|
-
UNSIGNED_BYTE,
|
|
41
|
+
UNSIGNED_BYTE = 5121,
|
|
42
42
|
/**
|
|
43
43
|
* Data is the same size of a short integer
|
|
44
44
|
*/
|
|
45
|
-
SHORT,
|
|
45
|
+
SHORT = 5122,
|
|
46
46
|
/**
|
|
47
47
|
* Data is the same size of
|
|
48
48
|
* an unsigned short integer
|
|
49
49
|
*/
|
|
50
|
-
UNSIGNED_SHORT,
|
|
50
|
+
UNSIGNED_SHORT = 5123,
|
|
51
51
|
/**
|
|
52
52
|
* Data is the same size of a float
|
|
53
53
|
*/
|
|
54
|
-
FLOAT,
|
|
54
|
+
FLOAT = 5126,
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
|
|
@@ -69,15 +69,15 @@ export namespace Cogl {
|
|
|
69
69
|
* Generic failure code, something went
|
|
70
70
|
* wrong.
|
|
71
71
|
*/
|
|
72
|
-
FAILED,
|
|
72
|
+
FAILED = 0,
|
|
73
73
|
/**
|
|
74
74
|
* Unknown image type.
|
|
75
75
|
*/
|
|
76
|
-
UNKNOWN_TYPE,
|
|
76
|
+
UNKNOWN_TYPE = 1,
|
|
77
77
|
/**
|
|
78
78
|
* An image file was broken somehow.
|
|
79
79
|
*/
|
|
80
|
-
CORRUPT_IMAGE,
|
|
80
|
+
CORRUPT_IMAGE = 2,
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
|
|
@@ -90,20 +90,20 @@ export namespace Cogl {
|
|
|
90
90
|
/**
|
|
91
91
|
* Generic parse error
|
|
92
92
|
*/
|
|
93
|
-
PARSE_ERROR,
|
|
93
|
+
PARSE_ERROR = 0,
|
|
94
94
|
/**
|
|
95
95
|
* Argument parse error
|
|
96
96
|
*/
|
|
97
|
-
ARGUMENT_PARSE_ERROR,
|
|
97
|
+
ARGUMENT_PARSE_ERROR = 1,
|
|
98
98
|
/**
|
|
99
99
|
* Internal parser error
|
|
100
100
|
*/
|
|
101
|
-
INVALID_ERROR,
|
|
101
|
+
INVALID_ERROR = 2,
|
|
102
102
|
/**
|
|
103
103
|
* Blend string not
|
|
104
104
|
* supported by the GPU
|
|
105
105
|
*/
|
|
106
|
-
GPU_UNSUPPORTED_ERROR,
|
|
106
|
+
GPU_UNSUPPORTED_ERROR = 3,
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
|
|
@@ -121,41 +121,41 @@ export namespace Cogl {
|
|
|
121
121
|
/**
|
|
122
122
|
* Never passes.
|
|
123
123
|
*/
|
|
124
|
-
NEVER,
|
|
124
|
+
NEVER = 512,
|
|
125
125
|
/**
|
|
126
126
|
* Passes if the fragment's depth
|
|
127
127
|
* value is less than the value currently in the depth buffer.
|
|
128
128
|
*/
|
|
129
|
-
LESS,
|
|
129
|
+
LESS = 513,
|
|
130
130
|
/**
|
|
131
131
|
* Passes if the fragment's depth
|
|
132
132
|
* value is equal to the value currently in the depth buffer.
|
|
133
133
|
*/
|
|
134
|
-
EQUAL,
|
|
134
|
+
EQUAL = 514,
|
|
135
135
|
/**
|
|
136
136
|
* Passes if the fragment's depth
|
|
137
137
|
* value is less or equal to the value currently in the depth buffer.
|
|
138
138
|
*/
|
|
139
|
-
LEQUAL,
|
|
139
|
+
LEQUAL = 515,
|
|
140
140
|
/**
|
|
141
141
|
* Passes if the fragment's depth
|
|
142
142
|
* value is greater than the value currently in the depth buffer.
|
|
143
143
|
*/
|
|
144
|
-
GREATER,
|
|
144
|
+
GREATER = 516,
|
|
145
145
|
/**
|
|
146
146
|
* Passes if the fragment's depth
|
|
147
147
|
* value is not equal to the value currently in the depth buffer.
|
|
148
148
|
*/
|
|
149
|
-
NOTEQUAL,
|
|
149
|
+
NOTEQUAL = 517,
|
|
150
150
|
/**
|
|
151
151
|
* Passes if the fragment's depth
|
|
152
152
|
* value greater than or equal to the value currently in the depth buffer.
|
|
153
153
|
*/
|
|
154
|
-
GEQUAL,
|
|
154
|
+
GEQUAL = 518,
|
|
155
155
|
/**
|
|
156
156
|
* Always passes.
|
|
157
157
|
*/
|
|
158
|
-
ALWAYS,
|
|
158
|
+
ALWAYS = 519,
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
|
|
@@ -172,37 +172,37 @@ export namespace Cogl {
|
|
|
172
172
|
* {@link Cogl.IndicesType.INT} is supported in
|
|
173
173
|
* `cogl_indices_new()`.
|
|
174
174
|
*/
|
|
175
|
-
OGL_FEATURE_ID_UNSIGNED_INT_INDICES,
|
|
175
|
+
OGL_FEATURE_ID_UNSIGNED_INT_INDICES = 0,
|
|
176
176
|
/**
|
|
177
177
|
* Whether `cogl_buffer_map()` is
|
|
178
178
|
* supported with CoglBufferAccess including read support.
|
|
179
179
|
*/
|
|
180
|
-
OGL_FEATURE_ID_MAP_BUFFER_FOR_READ,
|
|
180
|
+
OGL_FEATURE_ID_MAP_BUFFER_FOR_READ = 1,
|
|
181
181
|
/**
|
|
182
182
|
* Whether `cogl_buffer_map()` is
|
|
183
183
|
* supported with CoglBufferAccess including write support.
|
|
184
184
|
*/
|
|
185
|
-
OGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE,
|
|
186
|
-
OGL_FEATURE_ID_FENCE,
|
|
185
|
+
OGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE = 2,
|
|
186
|
+
OGL_FEATURE_ID_FENCE = 3,
|
|
187
187
|
/**
|
|
188
188
|
* Support for
|
|
189
189
|
* {@link Cogl.TextureComponents.RG} as the internal components of a
|
|
190
190
|
* texture.
|
|
191
191
|
*/
|
|
192
|
-
OGL_FEATURE_ID_TEXTURE_RG,
|
|
192
|
+
OGL_FEATURE_ID_TEXTURE_RG = 4,
|
|
193
193
|
/**
|
|
194
194
|
* Available if the age of {@link Cogl.Onscreen} back
|
|
195
195
|
* buffers are tracked and so `cogl_onscreen_get_buffer_age()` can be
|
|
196
196
|
* expected to return age values other than 0.
|
|
197
197
|
*/
|
|
198
|
-
OGL_FEATURE_ID_BUFFER_AGE,
|
|
199
|
-
OGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL,
|
|
198
|
+
OGL_FEATURE_ID_BUFFER_AGE = 5,
|
|
199
|
+
OGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL = 6,
|
|
200
200
|
/**
|
|
201
201
|
* Whether blitting using
|
|
202
202
|
* `cogl_blit_framebuffer()` is supported.
|
|
203
203
|
*/
|
|
204
|
-
OGL_FEATURE_ID_BLIT_FRAMEBUFFER,
|
|
205
|
-
OGL_FEATURE_ID_TIMESTAMP_QUERY,
|
|
204
|
+
OGL_FEATURE_ID_BLIT_FRAMEBUFFER = 7,
|
|
205
|
+
OGL_FEATURE_ID_TIMESTAMP_QUERY = 8,
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
|
|
@@ -215,11 +215,11 @@ export namespace Cogl {
|
|
|
215
215
|
* The event was not handled, continues the
|
|
216
216
|
* processing
|
|
217
217
|
*/
|
|
218
|
-
CONTINUE,
|
|
218
|
+
CONTINUE = 0,
|
|
219
219
|
/**
|
|
220
220
|
* Remove the event, stops the processing
|
|
221
221
|
*/
|
|
222
|
-
REMOVE,
|
|
222
|
+
REMOVE = 1,
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
|
|
@@ -247,7 +247,7 @@ export namespace Cogl {
|
|
|
247
247
|
* acknowledged a frame and is ready for a
|
|
248
248
|
* new frame to be created.
|
|
249
249
|
*/
|
|
250
|
-
SYNC,
|
|
250
|
+
SYNC = 1,
|
|
251
251
|
/**
|
|
252
252
|
* Notifies that a frame has ended. This
|
|
253
253
|
* is a good time for applications to
|
|
@@ -257,7 +257,7 @@ export namespace Cogl {
|
|
|
257
257
|
* events should be expected after a
|
|
258
258
|
* `COGL_FRAME_EVENT_COMPLETE` event.
|
|
259
259
|
*/
|
|
260
|
-
COMPLETE,
|
|
260
|
+
COMPLETE = 2,
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
|
|
@@ -265,7 +265,7 @@ export namespace Cogl {
|
|
|
265
265
|
* @gir-type Enum
|
|
266
266
|
*/
|
|
267
267
|
enum FramebufferError {
|
|
268
|
-
FRAMEBUFFER_ERROR_ALLOCATE,
|
|
268
|
+
FRAMEBUFFER_ERROR_ALLOCATE = 0,
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
|
|
@@ -277,11 +277,11 @@ export namespace Cogl {
|
|
|
277
277
|
* @gir-type Enum
|
|
278
278
|
*/
|
|
279
279
|
enum GraphicsResetStatus {
|
|
280
|
-
NO_ERROR,
|
|
281
|
-
GUILTY_CONTEXT_RESET,
|
|
282
|
-
INNOCENT_CONTEXT_RESET,
|
|
283
|
-
UNKNOWN_CONTEXT_RESET,
|
|
284
|
-
PURGED_CONTEXT_RESET,
|
|
280
|
+
NO_ERROR = 0,
|
|
281
|
+
GUILTY_CONTEXT_RESET = 1,
|
|
282
|
+
INNOCENT_CONTEXT_RESET = 2,
|
|
283
|
+
UNKNOWN_CONTEXT_RESET = 3,
|
|
284
|
+
PURGED_CONTEXT_RESET = 4,
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
|
|
@@ -301,15 +301,15 @@ export namespace Cogl {
|
|
|
301
301
|
/**
|
|
302
302
|
* Your indices are unsigned bytes
|
|
303
303
|
*/
|
|
304
|
-
BYTE,
|
|
304
|
+
BYTE = 0,
|
|
305
305
|
/**
|
|
306
306
|
* Your indices are unsigned shorts
|
|
307
307
|
*/
|
|
308
|
-
SHORT,
|
|
308
|
+
SHORT = 1,
|
|
309
309
|
/**
|
|
310
310
|
* Your indices are unsigned ints
|
|
311
311
|
*/
|
|
312
|
-
INT,
|
|
312
|
+
INT = 2,
|
|
313
313
|
}
|
|
314
314
|
|
|
315
315
|
|
|
@@ -324,41 +324,41 @@ export namespace Cogl {
|
|
|
324
324
|
/**
|
|
325
325
|
* Never let the fragment through.
|
|
326
326
|
*/
|
|
327
|
-
NEVER,
|
|
327
|
+
NEVER = 512,
|
|
328
328
|
/**
|
|
329
329
|
* Let the fragment through if the incoming
|
|
330
330
|
* alpha value is less than the reference alpha value
|
|
331
331
|
*/
|
|
332
|
-
LESS,
|
|
332
|
+
LESS = 513,
|
|
333
333
|
/**
|
|
334
334
|
* Let the fragment through if the incoming
|
|
335
335
|
* alpha value equals the reference alpha value
|
|
336
336
|
*/
|
|
337
|
-
EQUAL,
|
|
337
|
+
EQUAL = 514,
|
|
338
338
|
/**
|
|
339
339
|
* Let the fragment through if the incoming
|
|
340
340
|
* alpha value is less than or equal to the reference alpha value
|
|
341
341
|
*/
|
|
342
|
-
LEQUAL,
|
|
342
|
+
LEQUAL = 515,
|
|
343
343
|
/**
|
|
344
344
|
* Let the fragment through if the incoming
|
|
345
345
|
* alpha value is greater than the reference alpha value
|
|
346
346
|
*/
|
|
347
|
-
GREATER,
|
|
347
|
+
GREATER = 516,
|
|
348
348
|
/**
|
|
349
349
|
* Let the fragment through if the incoming
|
|
350
350
|
* alpha value does not equal the reference alpha value
|
|
351
351
|
*/
|
|
352
|
-
NOTEQUAL,
|
|
352
|
+
NOTEQUAL = 517,
|
|
353
353
|
/**
|
|
354
354
|
* Let the fragment through if the incoming
|
|
355
355
|
* alpha value is greater than or equal to the reference alpha value.
|
|
356
356
|
*/
|
|
357
|
-
GEQUAL,
|
|
357
|
+
GEQUAL = 518,
|
|
358
358
|
/**
|
|
359
359
|
* Always let the fragment through.
|
|
360
360
|
*/
|
|
361
|
-
ALWAYS,
|
|
361
|
+
ALWAYS = 519,
|
|
362
362
|
}
|
|
363
363
|
|
|
364
364
|
|
|
@@ -372,19 +372,19 @@ export namespace Cogl {
|
|
|
372
372
|
* Neither face will be
|
|
373
373
|
* culled. This is the default.
|
|
374
374
|
*/
|
|
375
|
-
NONE,
|
|
375
|
+
NONE = 0,
|
|
376
376
|
/**
|
|
377
377
|
* Front faces will be culled.
|
|
378
378
|
*/
|
|
379
|
-
FRONT,
|
|
379
|
+
FRONT = 1,
|
|
380
380
|
/**
|
|
381
381
|
* Back faces will be culled.
|
|
382
382
|
*/
|
|
383
|
-
BACK,
|
|
383
|
+
BACK = 2,
|
|
384
384
|
/**
|
|
385
385
|
* All faces will be culled.
|
|
386
386
|
*/
|
|
387
|
-
BOTH,
|
|
387
|
+
BOTH = 3,
|
|
388
388
|
}
|
|
389
389
|
|
|
390
390
|
|
|
@@ -401,38 +401,38 @@ export namespace Cogl {
|
|
|
401
401
|
* Measuring in manhatten distance from the,
|
|
402
402
|
* current pixel center, use the nearest texture texel
|
|
403
403
|
*/
|
|
404
|
-
NEAREST,
|
|
404
|
+
NEAREST = 9728,
|
|
405
405
|
/**
|
|
406
406
|
* Use the weighted average of the 4 texels
|
|
407
407
|
* nearest the current pixel center
|
|
408
408
|
*/
|
|
409
|
-
LINEAR,
|
|
409
|
+
LINEAR = 9729,
|
|
410
410
|
/**
|
|
411
411
|
* Select the mimap level whose
|
|
412
412
|
* texel size most closely matches the current pixel, and use the
|
|
413
413
|
* {@link Cogl.PipelineFilter.NEAREST} criterion
|
|
414
414
|
*/
|
|
415
|
-
NEAREST_MIPMAP_NEAREST,
|
|
415
|
+
NEAREST_MIPMAP_NEAREST = 9984,
|
|
416
416
|
/**
|
|
417
417
|
* Select the mimap level whose
|
|
418
418
|
* texel size most closely matches the current pixel, and use the
|
|
419
419
|
* {@link Cogl.PipelineFilter.LINEAR} criterion
|
|
420
420
|
*/
|
|
421
|
-
LINEAR_MIPMAP_NEAREST,
|
|
421
|
+
LINEAR_MIPMAP_NEAREST = 9985,
|
|
422
422
|
/**
|
|
423
423
|
* Select the two mimap levels
|
|
424
424
|
* whose texel size most closely matches the current pixel, use
|
|
425
425
|
* the {@link Cogl.PipelineFilter.NEAREST} criterion on each one and take
|
|
426
426
|
* their weighted average
|
|
427
427
|
*/
|
|
428
|
-
NEAREST_MIPMAP_LINEAR,
|
|
428
|
+
NEAREST_MIPMAP_LINEAR = 9986,
|
|
429
429
|
/**
|
|
430
430
|
* Select the two mimap levels
|
|
431
431
|
* whose texel size most closely matches the current pixel, use
|
|
432
432
|
* the {@link Cogl.PipelineFilter.LINEAR} criterion on each one and take
|
|
433
433
|
* their weighted average
|
|
434
434
|
*/
|
|
435
|
-
LINEAR_MIPMAP_LINEAR,
|
|
435
|
+
LINEAR_MIPMAP_LINEAR = 9987,
|
|
436
436
|
}
|
|
437
437
|
|
|
438
438
|
|
|
@@ -453,15 +453,15 @@ export namespace Cogl {
|
|
|
453
453
|
* The texture will be repeated. This
|
|
454
454
|
* is useful for example to draw a tiled background.
|
|
455
455
|
*/
|
|
456
|
-
REPEAT,
|
|
457
|
-
MIRRORED_REPEAT,
|
|
456
|
+
REPEAT = 10497,
|
|
457
|
+
MIRRORED_REPEAT = 33648,
|
|
458
458
|
/**
|
|
459
459
|
* The coordinates outside the
|
|
460
460
|
* range 0→1 will sample copies of the edge pixels of the
|
|
461
461
|
* texture. This is useful to avoid artifacts if only one copy of
|
|
462
462
|
* the texture is being rendered.
|
|
463
463
|
*/
|
|
464
|
-
CLAMP_TO_EDGE,
|
|
464
|
+
CLAMP_TO_EDGE = 33071,
|
|
465
465
|
/**
|
|
466
466
|
* Cogl will try to automatically
|
|
467
467
|
* decide which of the above two to use. For `cogl_rectangle()`, it
|
|
@@ -472,7 +472,7 @@ export namespace Cogl {
|
|
|
472
472
|
* layers that have point sprite coordinate generation enabled. This
|
|
473
473
|
* is the default value.
|
|
474
474
|
*/
|
|
475
|
-
AUTOMATIC,
|
|
475
|
+
AUTOMATIC = 519,
|
|
476
476
|
}
|
|
477
477
|
|
|
478
478
|
|
|
@@ -480,8 +480,8 @@ export namespace Cogl {
|
|
|
480
480
|
* @gir-type Enum
|
|
481
481
|
*/
|
|
482
482
|
enum RendererError {
|
|
483
|
-
XLIB_DISPLAY_OPEN,
|
|
484
|
-
BAD_CONSTRAINT,
|
|
483
|
+
XLIB_DISPLAY_OPEN = 0,
|
|
484
|
+
BAD_CONSTRAINT = 1,
|
|
485
485
|
}
|
|
486
486
|
|
|
487
487
|
|
|
@@ -508,11 +508,11 @@ export namespace Cogl {
|
|
|
508
508
|
/**
|
|
509
509
|
* A program for processing vertices
|
|
510
510
|
*/
|
|
511
|
-
VERTEX,
|
|
511
|
+
VERTEX = 0,
|
|
512
512
|
/**
|
|
513
513
|
* A program for processing fragments
|
|
514
514
|
*/
|
|
515
|
-
FRAGMENT,
|
|
515
|
+
FRAGMENT = 1,
|
|
516
516
|
}
|
|
517
517
|
|
|
518
518
|
|
|
@@ -802,50 +802,50 @@ export namespace Cogl {
|
|
|
802
802
|
* A hook for the entire vertex processing
|
|
803
803
|
* stage of the pipeline.
|
|
804
804
|
*/
|
|
805
|
-
VERTEX,
|
|
805
|
+
VERTEX = 0,
|
|
806
806
|
/**
|
|
807
807
|
* A hook for the vertex transformation.
|
|
808
808
|
*/
|
|
809
|
-
VERTEX_TRANSFORM,
|
|
809
|
+
VERTEX_TRANSFORM = 1,
|
|
810
810
|
/**
|
|
811
811
|
* A hook for declaring global data
|
|
812
812
|
* that can be shared with all other snippets that are on a vertex
|
|
813
813
|
* hook.
|
|
814
814
|
*/
|
|
815
|
-
VERTEX_GLOBALS,
|
|
815
|
+
VERTEX_GLOBALS = 2,
|
|
816
816
|
/**
|
|
817
817
|
* A hook for manipulating the point
|
|
818
818
|
* size of a vertex. This is only used if
|
|
819
819
|
* `cogl_pipeline_set_per_vertex_point_size()` is enabled on the
|
|
820
820
|
* pipeline.
|
|
821
821
|
*/
|
|
822
|
-
POINT_SIZE,
|
|
822
|
+
POINT_SIZE = 3,
|
|
823
823
|
/**
|
|
824
824
|
* A hook for the entire fragment
|
|
825
825
|
* processing stage of the pipeline.
|
|
826
826
|
*/
|
|
827
|
-
FRAGMENT,
|
|
827
|
+
FRAGMENT = 2048,
|
|
828
828
|
/**
|
|
829
829
|
* A hook for declaring global
|
|
830
830
|
* data wthat can be shared with all other snippets that are on a
|
|
831
831
|
* fragment hook.
|
|
832
832
|
*/
|
|
833
|
-
FRAGMENT_GLOBALS,
|
|
833
|
+
FRAGMENT_GLOBALS = 2049,
|
|
834
834
|
/**
|
|
835
835
|
* A hook for applying the
|
|
836
836
|
* layer matrix to a texture coordinate for a layer.
|
|
837
837
|
*/
|
|
838
|
-
TEXTURE_COORD_TRANSFORM,
|
|
838
|
+
TEXTURE_COORD_TRANSFORM = 4096,
|
|
839
839
|
/**
|
|
840
840
|
* A hook for the fragment
|
|
841
841
|
* processing of a particular layer.
|
|
842
842
|
*/
|
|
843
|
-
LAYER_FRAGMENT,
|
|
843
|
+
LAYER_FRAGMENT = 6144,
|
|
844
844
|
/**
|
|
845
845
|
* A hook for the texture lookup
|
|
846
846
|
* stage of a given layer in a pipeline.
|
|
847
847
|
*/
|
|
848
|
-
TEXTURE_LOOKUP,
|
|
848
|
+
TEXTURE_LOOKUP = 6145,
|
|
849
849
|
}
|
|
850
850
|
|
|
851
851
|
|
|
@@ -858,15 +858,15 @@ export namespace Cogl {
|
|
|
858
858
|
/**
|
|
859
859
|
* draw to both stereo buffers
|
|
860
860
|
*/
|
|
861
|
-
BOTH,
|
|
861
|
+
BOTH = 0,
|
|
862
862
|
/**
|
|
863
863
|
* draw only to the left stereo buffer
|
|
864
864
|
*/
|
|
865
|
-
LEFT,
|
|
865
|
+
LEFT = 1,
|
|
866
866
|
/**
|
|
867
867
|
* draw only to the left stereo buffer
|
|
868
868
|
*/
|
|
869
|
-
RIGHT,
|
|
869
|
+
RIGHT = 2,
|
|
870
870
|
}
|
|
871
871
|
|
|
872
872
|
|
|
@@ -896,12 +896,12 @@ export namespace Cogl {
|
|
|
896
896
|
* You tried to use a feature or
|
|
897
897
|
* configuration not currently available.
|
|
898
898
|
*/
|
|
899
|
-
UNSUPPORTED,
|
|
899
|
+
UNSUPPORTED = 0,
|
|
900
900
|
/**
|
|
901
901
|
* You tried to allocate a resource
|
|
902
902
|
* such as a texture and there wasn't enough memory.
|
|
903
903
|
*/
|
|
904
|
-
NO_MEMORY,
|
|
904
|
+
NO_MEMORY = 1,
|
|
905
905
|
}
|
|
906
906
|
|
|
907
907
|
|
|
@@ -914,25 +914,25 @@ export namespace Cogl {
|
|
|
914
914
|
/**
|
|
915
915
|
* Only the alpha component
|
|
916
916
|
*/
|
|
917
|
-
A,
|
|
917
|
+
A = 1,
|
|
918
918
|
/**
|
|
919
919
|
* Red and green components. Note that
|
|
920
920
|
* this can only be used if the {@link Cogl.FeatureID.OGL_FEATURE_ID_TEXTURE_RG} feature
|
|
921
921
|
* is advertised.
|
|
922
922
|
*/
|
|
923
|
-
RG,
|
|
923
|
+
RG = 2,
|
|
924
924
|
/**
|
|
925
925
|
* Red, green and blue components
|
|
926
926
|
*/
|
|
927
|
-
RGB,
|
|
927
|
+
RGB = 3,
|
|
928
928
|
/**
|
|
929
929
|
* Red, green, blue and alpha components
|
|
930
930
|
*/
|
|
931
|
-
RGBA,
|
|
931
|
+
RGBA = 4,
|
|
932
932
|
/**
|
|
933
933
|
* Only a depth component
|
|
934
934
|
*/
|
|
935
|
-
DEPTH,
|
|
935
|
+
DEPTH = 5,
|
|
936
936
|
}
|
|
937
937
|
|
|
938
938
|
|
|
@@ -945,17 +945,17 @@ export namespace Cogl {
|
|
|
945
945
|
/**
|
|
946
946
|
* Unsupported size
|
|
947
947
|
*/
|
|
948
|
-
SIZE,
|
|
948
|
+
SIZE = 0,
|
|
949
949
|
/**
|
|
950
950
|
* Unsupported format
|
|
951
951
|
*/
|
|
952
|
-
FORMAT,
|
|
953
|
-
BAD_PARAMETER,
|
|
952
|
+
FORMAT = 1,
|
|
953
|
+
BAD_PARAMETER = 2,
|
|
954
954
|
/**
|
|
955
955
|
* A primitive texture type that is
|
|
956
956
|
* unsupported by the driver was used
|
|
957
957
|
*/
|
|
958
|
-
TYPE,
|
|
958
|
+
TYPE = 3,
|
|
959
959
|
}
|
|
960
960
|
|
|
961
961
|
|
|
@@ -969,35 +969,35 @@ export namespace Cogl {
|
|
|
969
969
|
* FIXME, equivalent to
|
|
970
970
|
* <constant>GL_POINTS</constant>
|
|
971
971
|
*/
|
|
972
|
-
POINTS,
|
|
972
|
+
POINTS = 0,
|
|
973
973
|
/**
|
|
974
974
|
* FIXME, equivalent to <constant>GL_LINES</constant>
|
|
975
975
|
*/
|
|
976
|
-
LINES,
|
|
976
|
+
LINES = 1,
|
|
977
977
|
/**
|
|
978
978
|
* FIXME, equivalent to
|
|
979
979
|
* <constant>GL_LINE_LOOP</constant>
|
|
980
980
|
*/
|
|
981
|
-
LINE_LOOP,
|
|
981
|
+
LINE_LOOP = 2,
|
|
982
982
|
/**
|
|
983
983
|
* FIXME, equivalent to
|
|
984
984
|
* <constant>GL_LINE_STRIP</constant>
|
|
985
985
|
*/
|
|
986
|
-
LINE_STRIP,
|
|
986
|
+
LINE_STRIP = 3,
|
|
987
987
|
/**
|
|
988
988
|
* FIXME, equivalent to
|
|
989
989
|
* <constant>GL_TRIANGLES</constant>
|
|
990
990
|
*/
|
|
991
|
-
TRIANGLES,
|
|
991
|
+
TRIANGLES = 4,
|
|
992
992
|
/**
|
|
993
993
|
* FIXME, equivalent to
|
|
994
994
|
* <constant>GL_TRIANGLE_STRIP</constant>
|
|
995
995
|
*/
|
|
996
|
-
TRIANGLE_STRIP,
|
|
996
|
+
TRIANGLE_STRIP = 5,
|
|
997
997
|
/**
|
|
998
998
|
* FIXME, equivalent to <constant>GL_TRIANGLE_FAN</constant>
|
|
999
999
|
*/
|
|
1000
|
-
TRIANGLE_FAN,
|
|
1000
|
+
TRIANGLE_FAN = 6,
|
|
1001
1001
|
}
|
|
1002
1002
|
|
|
1003
1003
|
|
|
@@ -1011,11 +1011,11 @@ export namespace Cogl {
|
|
|
1011
1011
|
/**
|
|
1012
1012
|
* Vertices are in a clockwise order
|
|
1013
1013
|
*/
|
|
1014
|
-
CLOCKWISE,
|
|
1014
|
+
CLOCKWISE = 0,
|
|
1015
1015
|
/**
|
|
1016
1016
|
* Vertices are in a counter-clockwise order
|
|
1017
1017
|
*/
|
|
1018
|
-
COUNTER_CLOCKWISE,
|
|
1018
|
+
COUNTER_CLOCKWISE = 1,
|
|
1019
1019
|
}
|
|
1020
1020
|
|
|
1021
1021
|
|
|
@@ -1023,37 +1023,59 @@ export namespace Cogl {
|
|
|
1023
1023
|
* @gir-type Enum
|
|
1024
1024
|
*/
|
|
1025
1025
|
enum WinsysFeature {
|
|
1026
|
-
VBLANK_COUNTER,
|
|
1027
|
-
VBLANK_WAIT,
|
|
1028
|
-
TEXTURE_FROM_PIXMAP,
|
|
1029
|
-
SWAP_BUFFERS_EVENT,
|
|
1030
|
-
SWAP_REGION,
|
|
1031
|
-
SWAP_REGION_THROTTLE,
|
|
1032
|
-
SWAP_REGION_SYNCHRONIZED,
|
|
1033
|
-
BUFFER_AGE,
|
|
1034
|
-
SYNC_AND_COMPLETE_EVENT,
|
|
1035
|
-
N_FEATURES,
|
|
1026
|
+
VBLANK_COUNTER = 0,
|
|
1027
|
+
VBLANK_WAIT = 1,
|
|
1028
|
+
TEXTURE_FROM_PIXMAP = 2,
|
|
1029
|
+
SWAP_BUFFERS_EVENT = 3,
|
|
1030
|
+
SWAP_REGION = 4,
|
|
1031
|
+
SWAP_REGION_THROTTLE = 5,
|
|
1032
|
+
SWAP_REGION_SYNCHRONIZED = 6,
|
|
1033
|
+
BUFFER_AGE = 7,
|
|
1034
|
+
SYNC_AND_COMPLETE_EVENT = 8,
|
|
1035
|
+
N_FEATURES = 9,
|
|
1036
1036
|
}
|
|
1037
1037
|
|
|
1038
1038
|
|
|
1039
|
+
/**
|
|
1040
|
+
* @default 64
|
|
1041
|
+
*/
|
|
1039
1042
|
const AFIRST_BIT: number;
|
|
1040
1043
|
|
|
1044
|
+
/**
|
|
1045
|
+
* @default 16
|
|
1046
|
+
*/
|
|
1041
1047
|
const A_BIT: number;
|
|
1042
1048
|
|
|
1049
|
+
/**
|
|
1050
|
+
* @default 32
|
|
1051
|
+
*/
|
|
1043
1052
|
const BGR_BIT: number;
|
|
1044
1053
|
|
|
1054
|
+
/**
|
|
1055
|
+
* @default 256
|
|
1056
|
+
*/
|
|
1045
1057
|
const DEPTH_BIT: number;
|
|
1046
1058
|
|
|
1047
1059
|
/**
|
|
1048
1060
|
* The maximum number of planes of a pixel format (see also
|
|
1049
1061
|
* `cogl_pixel_format_get_planes()`).
|
|
1062
|
+
* @default 4
|
|
1050
1063
|
*/
|
|
1051
1064
|
const PIXEL_FORMAT_MAX_PLANES: number;
|
|
1052
1065
|
|
|
1066
|
+
/**
|
|
1067
|
+
* @default 128
|
|
1068
|
+
*/
|
|
1053
1069
|
const PREMULT_BIT: number;
|
|
1054
1070
|
|
|
1071
|
+
/**
|
|
1072
|
+
* @default 512
|
|
1073
|
+
*/
|
|
1055
1074
|
const STENCIL_BIT: number;
|
|
1056
1075
|
|
|
1076
|
+
/**
|
|
1077
|
+
* @default 127
|
|
1078
|
+
*/
|
|
1057
1079
|
const TEXTURE_MAX_WASTE: number;
|
|
1058
1080
|
|
|
1059
1081
|
function blend_string_error_quark(): number;
|
|
@@ -1106,6 +1128,7 @@ export namespace Cogl {
|
|
|
1106
1128
|
* @param dst_y Destination y position
|
|
1107
1129
|
* @param width Width of region to copy
|
|
1108
1130
|
* @param height Height of region to copy
|
|
1131
|
+
* @throws GLib.Error
|
|
1109
1132
|
*/
|
|
1110
1133
|
function blit_framebuffer(framebuffer: Framebuffer, dst: Framebuffer, src_x: number, src_y: number, dst_x: number, dst_y: number, width: number, height: number): boolean;
|
|
1111
1134
|
|
|
@@ -1543,15 +1566,15 @@ export namespace Cogl {
|
|
|
1543
1566
|
/**
|
|
1544
1567
|
* Selects the primary color buffer
|
|
1545
1568
|
*/
|
|
1546
|
-
COLOR,
|
|
1569
|
+
COLOR = 1,
|
|
1547
1570
|
/**
|
|
1548
1571
|
* Selects the depth buffer
|
|
1549
1572
|
*/
|
|
1550
|
-
DEPTH,
|
|
1573
|
+
DEPTH = 2,
|
|
1551
1574
|
/**
|
|
1552
1575
|
* Selects the stencil buffer
|
|
1553
1576
|
*/
|
|
1554
|
-
STENCIL,
|
|
1577
|
+
STENCIL = 4,
|
|
1555
1578
|
}
|
|
1556
1579
|
|
|
1557
1580
|
|
|
@@ -1564,11 +1587,11 @@ export namespace Cogl {
|
|
|
1564
1587
|
/**
|
|
1565
1588
|
* FIXME
|
|
1566
1589
|
*/
|
|
1567
|
-
WINDOW_BUFFER,
|
|
1590
|
+
WINDOW_BUFFER = 2,
|
|
1568
1591
|
/**
|
|
1569
1592
|
* FIXME
|
|
1570
1593
|
*/
|
|
1571
|
-
OFFSCREEN_BUFFER,
|
|
1594
|
+
OFFSCREEN_BUFFER = 4,
|
|
1572
1595
|
}
|
|
1573
1596
|
|
|
1574
1597
|
|
|
@@ -1576,8 +1599,8 @@ export namespace Cogl {
|
|
|
1576
1599
|
* @gir-type Flags
|
|
1577
1600
|
*/
|
|
1578
1601
|
enum EglImageFlags {
|
|
1579
|
-
NONE,
|
|
1580
|
-
NO_GET_DATA,
|
|
1602
|
+
NONE = 0,
|
|
1603
|
+
NO_GET_DATA = 1,
|
|
1581
1604
|
}
|
|
1582
1605
|
|
|
1583
1606
|
|
|
@@ -1607,156 +1630,156 @@ export namespace Cogl {
|
|
|
1607
1630
|
/**
|
|
1608
1631
|
* Any format
|
|
1609
1632
|
*/
|
|
1610
|
-
ANY,
|
|
1633
|
+
ANY = 0,
|
|
1611
1634
|
/**
|
|
1612
1635
|
* 8 bits alpha mask
|
|
1613
1636
|
*/
|
|
1614
|
-
A_8,
|
|
1637
|
+
A_8 = 17,
|
|
1615
1638
|
/**
|
|
1616
1639
|
* RGB, 16 bits
|
|
1617
1640
|
*/
|
|
1618
|
-
RGB_565,
|
|
1641
|
+
RGB_565 = 4,
|
|
1619
1642
|
/**
|
|
1620
1643
|
* RGBA, 16 bits
|
|
1621
1644
|
*/
|
|
1622
|
-
RGBA_4444,
|
|
1645
|
+
RGBA_4444 = 21,
|
|
1623
1646
|
/**
|
|
1624
1647
|
* RGBA, 16 bits
|
|
1625
1648
|
*/
|
|
1626
|
-
RGBA_5551,
|
|
1649
|
+
RGBA_5551 = 22,
|
|
1627
1650
|
/**
|
|
1628
1651
|
* Not currently supported
|
|
1629
1652
|
*/
|
|
1630
|
-
YUV,
|
|
1653
|
+
YUV = 7,
|
|
1631
1654
|
/**
|
|
1632
1655
|
* Single luminance component
|
|
1633
1656
|
*/
|
|
1634
|
-
G_8,
|
|
1657
|
+
G_8 = 8,
|
|
1635
1658
|
/**
|
|
1636
1659
|
* RG, 16 bits. Note that red-green textures
|
|
1637
1660
|
* are only available if {@link Cogl.FeatureID.OGL_FEATURE_ID_TEXTURE_RG} is advertised.
|
|
1638
1661
|
* See `cogl_texture_set_components()` for details.
|
|
1639
1662
|
*/
|
|
1640
|
-
RG_88,
|
|
1663
|
+
RG_88 = 9,
|
|
1641
1664
|
/**
|
|
1642
1665
|
* RGB, 24 bits
|
|
1643
1666
|
*/
|
|
1644
|
-
RGB_888,
|
|
1667
|
+
RGB_888 = 2,
|
|
1645
1668
|
/**
|
|
1646
1669
|
* BGR, 24 bits
|
|
1647
1670
|
*/
|
|
1648
|
-
BGR_888,
|
|
1671
|
+
BGR_888 = 34,
|
|
1649
1672
|
/**
|
|
1650
1673
|
* RGBA, 32 bits
|
|
1651
1674
|
*/
|
|
1652
|
-
RGBA_8888,
|
|
1675
|
+
RGBA_8888 = 19,
|
|
1653
1676
|
/**
|
|
1654
1677
|
* BGRA, 32 bits
|
|
1655
1678
|
*/
|
|
1656
|
-
BGRA_8888,
|
|
1679
|
+
BGRA_8888 = 51,
|
|
1657
1680
|
/**
|
|
1658
1681
|
* ARGB, 32 bits
|
|
1659
1682
|
*/
|
|
1660
|
-
ARGB_8888,
|
|
1683
|
+
ARGB_8888 = 83,
|
|
1661
1684
|
/**
|
|
1662
1685
|
* ABGR, 32 bits
|
|
1663
1686
|
*/
|
|
1664
|
-
ABGR_8888,
|
|
1687
|
+
ABGR_8888 = 115,
|
|
1665
1688
|
/**
|
|
1666
1689
|
* RGBA, 32 bits, 10 bpc
|
|
1667
1690
|
*/
|
|
1668
|
-
RGBA_1010102,
|
|
1691
|
+
RGBA_1010102 = 29,
|
|
1669
1692
|
/**
|
|
1670
1693
|
* BGRA, 32 bits, 10 bpc
|
|
1671
1694
|
*/
|
|
1672
|
-
BGRA_1010102,
|
|
1673
|
-
XRGB_2101010,
|
|
1695
|
+
BGRA_1010102 = 61,
|
|
1696
|
+
XRGB_2101010 = 77,
|
|
1674
1697
|
/**
|
|
1675
1698
|
* ARGB, 32 bits, 10 bpc
|
|
1676
1699
|
*/
|
|
1677
|
-
ARGB_2101010,
|
|
1678
|
-
XBGR_2101010,
|
|
1700
|
+
ARGB_2101010 = 93,
|
|
1701
|
+
XBGR_2101010 = 109,
|
|
1679
1702
|
/**
|
|
1680
1703
|
* ABGR, 32 bits, 10 bpc
|
|
1681
1704
|
*/
|
|
1682
|
-
ABGR_2101010,
|
|
1705
|
+
ABGR_2101010 = 125,
|
|
1683
1706
|
/**
|
|
1684
1707
|
* RGBA half floating point, 64 bit
|
|
1685
1708
|
*/
|
|
1686
|
-
RGBA_FP_16161616,
|
|
1709
|
+
RGBA_FP_16161616 = 27,
|
|
1687
1710
|
/**
|
|
1688
1711
|
* BGRA half floating point, 64 bit
|
|
1689
1712
|
*/
|
|
1690
|
-
BGRA_FP_16161616,
|
|
1691
|
-
XRGB_FP_16161616,
|
|
1713
|
+
BGRA_FP_16161616 = 59,
|
|
1714
|
+
XRGB_FP_16161616 = 75,
|
|
1692
1715
|
/**
|
|
1693
1716
|
* ARGB half floating point, 64 bit
|
|
1694
1717
|
*/
|
|
1695
|
-
ARGB_FP_16161616,
|
|
1696
|
-
XBGR_FP_16161616,
|
|
1718
|
+
ARGB_FP_16161616 = 91,
|
|
1719
|
+
XBGR_FP_16161616 = 107,
|
|
1697
1720
|
/**
|
|
1698
1721
|
* ABGR half floating point, 64 bit
|
|
1699
1722
|
*/
|
|
1700
|
-
ABGR_FP_16161616,
|
|
1723
|
+
ABGR_FP_16161616 = 123,
|
|
1701
1724
|
/**
|
|
1702
1725
|
* Premultiplied RGBA, 32 bits
|
|
1703
1726
|
*/
|
|
1704
|
-
RGBA_8888_PRE,
|
|
1727
|
+
RGBA_8888_PRE = 147,
|
|
1705
1728
|
/**
|
|
1706
1729
|
* Premultiplied BGRA, 32 bits
|
|
1707
1730
|
*/
|
|
1708
|
-
BGRA_8888_PRE,
|
|
1731
|
+
BGRA_8888_PRE = 179,
|
|
1709
1732
|
/**
|
|
1710
1733
|
* Premultiplied ARGB, 32 bits
|
|
1711
1734
|
*/
|
|
1712
|
-
ARGB_8888_PRE,
|
|
1735
|
+
ARGB_8888_PRE = 211,
|
|
1713
1736
|
/**
|
|
1714
1737
|
* Premultiplied ABGR, 32 bits
|
|
1715
1738
|
*/
|
|
1716
|
-
ABGR_8888_PRE,
|
|
1739
|
+
ABGR_8888_PRE = 243,
|
|
1717
1740
|
/**
|
|
1718
1741
|
* Premultiplied RGBA, 16 bits
|
|
1719
1742
|
*/
|
|
1720
|
-
RGBA_4444_PRE,
|
|
1743
|
+
RGBA_4444_PRE = 149,
|
|
1721
1744
|
/**
|
|
1722
1745
|
* Premultiplied RGBA, 16 bits
|
|
1723
1746
|
*/
|
|
1724
|
-
RGBA_5551_PRE,
|
|
1747
|
+
RGBA_5551_PRE = 150,
|
|
1725
1748
|
/**
|
|
1726
1749
|
* Premultiplied RGBA, 32 bits, 10 bpc
|
|
1727
1750
|
*/
|
|
1728
|
-
RGBA_1010102_PRE,
|
|
1751
|
+
RGBA_1010102_PRE = 157,
|
|
1729
1752
|
/**
|
|
1730
1753
|
* Premultiplied BGRA, 32 bits, 10 bpc
|
|
1731
1754
|
*/
|
|
1732
|
-
BGRA_1010102_PRE,
|
|
1755
|
+
BGRA_1010102_PRE = 189,
|
|
1733
1756
|
/**
|
|
1734
1757
|
* Premultiplied ARGB, 32 bits, 10 bpc
|
|
1735
1758
|
*/
|
|
1736
|
-
ARGB_2101010_PRE,
|
|
1759
|
+
ARGB_2101010_PRE = 221,
|
|
1737
1760
|
/**
|
|
1738
1761
|
* Premultiplied ABGR, 32 bits, 10 bpc
|
|
1739
1762
|
*/
|
|
1740
|
-
ABGR_2101010_PRE,
|
|
1763
|
+
ABGR_2101010_PRE = 253,
|
|
1741
1764
|
/**
|
|
1742
1765
|
* Premultiplied RGBA half floating point, 64 bit
|
|
1743
1766
|
*/
|
|
1744
|
-
RGBA_FP_16161616_PRE,
|
|
1767
|
+
RGBA_FP_16161616_PRE = 155,
|
|
1745
1768
|
/**
|
|
1746
1769
|
* Premultiplied BGRA half floating point, 64 bit
|
|
1747
1770
|
*/
|
|
1748
|
-
BGRA_FP_16161616_PRE,
|
|
1771
|
+
BGRA_FP_16161616_PRE = 187,
|
|
1749
1772
|
/**
|
|
1750
1773
|
* Premultiplied ARGB half floating point, 64 bit
|
|
1751
1774
|
*/
|
|
1752
|
-
ARGB_FP_16161616_PRE,
|
|
1775
|
+
ARGB_FP_16161616_PRE = 219,
|
|
1753
1776
|
/**
|
|
1754
1777
|
* Premultiplied ABGR half floating point, 64 bit
|
|
1755
1778
|
*/
|
|
1756
|
-
ABGR_FP_16161616_PRE,
|
|
1757
|
-
DEPTH_16,
|
|
1758
|
-
DEPTH_32,
|
|
1759
|
-
DEPTH_24_STENCIL_8,
|
|
1779
|
+
ABGR_FP_16161616_PRE = 251,
|
|
1780
|
+
DEPTH_16 = 265,
|
|
1781
|
+
DEPTH_32 = 259,
|
|
1782
|
+
DEPTH_24_STENCIL_8 = 771,
|
|
1760
1783
|
}
|
|
1761
1784
|
|
|
1762
1785
|
|
|
@@ -1769,7 +1792,7 @@ export namespace Cogl {
|
|
|
1769
1792
|
/**
|
|
1770
1793
|
* Read from the color buffer
|
|
1771
1794
|
*/
|
|
1772
|
-
READ_PIXELS_COLOR_BUFFER,
|
|
1795
|
+
READ_PIXELS_COLOR_BUFFER = 1,
|
|
1773
1796
|
}
|
|
1774
1797
|
|
|
1775
1798
|
|
|
@@ -2100,6 +2123,7 @@ export namespace Cogl {
|
|
|
2100
2123
|
* automatic allocation.</note>
|
|
2101
2124
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
2102
2125
|
* @since 1.8
|
|
2126
|
+
* @throws GLib.Error
|
|
2103
2127
|
*/
|
|
2104
2128
|
allocate(): boolean;
|
|
2105
2129
|
|
|
@@ -3727,6 +3751,7 @@ export namespace Cogl {
|
|
|
3727
3751
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired blend function.
|
|
3728
3752
|
* @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
3753
|
* @since 2.0
|
|
3754
|
+
* @throws GLib.Error
|
|
3730
3755
|
*/
|
|
3731
3756
|
set_blend(blend_string: string): boolean;
|
|
3732
3757
|
|
|
@@ -3892,6 +3917,7 @@ export namespace Cogl {
|
|
|
3892
3917
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired texture combine function.
|
|
3893
3918
|
* @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
3919
|
* @since 2.0
|
|
3920
|
+
* @throws GLib.Error
|
|
3895
3921
|
*/
|
|
3896
3922
|
set_layer_combine(layer_index: number, blend_string: string): boolean;
|
|
3897
3923
|
|
|
@@ -3959,6 +3985,7 @@ export namespace Cogl {
|
|
|
3959
3985
|
* @param enable whether to enable point sprite coord generation.
|
|
3960
3986
|
* @returns `true` if the function succeeds, `false` otherwise.
|
|
3961
3987
|
* @since 2.0
|
|
3988
|
+
* @throws GLib.Error
|
|
3962
3989
|
*/
|
|
3963
3990
|
set_layer_point_sprite_coords_enabled(layer_index: number, enable: boolean): boolean;
|
|
3964
3991
|
|
|
@@ -4009,6 +4036,7 @@ export namespace Cogl {
|
|
|
4009
4036
|
* @param enable whether to enable per-vertex point size
|
|
4010
4037
|
* @returns `true` if the change succeeded or `false` otherwise
|
|
4011
4038
|
* @since 2.0
|
|
4039
|
+
* @throws GLib.Error
|
|
4012
4040
|
*/
|
|
4013
4041
|
set_per_vertex_point_size(enable: boolean): boolean;
|
|
4014
4042
|
|
|
@@ -4341,6 +4369,7 @@ export namespace Cogl {
|
|
|
4341
4369
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
4342
4370
|
* framebuffer and rendered too.</note>
|
|
4343
4371
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
4372
|
+
* @throws GLib.Error
|
|
4344
4373
|
*/
|
|
4345
4374
|
allocate(): boolean;
|
|
4346
4375
|
|
|
@@ -4489,6 +4518,7 @@ export namespace Cogl {
|
|
|
4489
4518
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
4490
4519
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
4491
4520
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
4521
|
+
* @throws GLib.Error
|
|
4492
4522
|
*/
|
|
4493
4523
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
4494
4524
|
|
|
@@ -4598,6 +4628,7 @@ export namespace Cogl {
|
|
|
4598
4628
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
4599
4629
|
* framebuffer and rendered too.</note>
|
|
4600
4630
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
4631
|
+
* @throws GLib.Error
|
|
4601
4632
|
*/
|
|
4602
4633
|
allocate(): boolean;
|
|
4603
4634
|
|
|
@@ -4746,6 +4777,7 @@ export namespace Cogl {
|
|
|
4746
4777
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
4747
4778
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
4748
4779
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
4780
|
+
* @throws GLib.Error
|
|
4749
4781
|
*/
|
|
4750
4782
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
4751
4783
|
|
|
@@ -5358,6 +5390,7 @@ export namespace Cogl {
|
|
|
5358
5390
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
5359
5391
|
* framebuffer and rendered too.</note>
|
|
5360
5392
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
5393
|
+
* @throws GLib.Error
|
|
5361
5394
|
*/
|
|
5362
5395
|
allocate(): boolean;
|
|
5363
5396
|
|
|
@@ -5506,6 +5539,7 @@ export namespace Cogl {
|
|
|
5506
5539
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
5507
5540
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
5508
5541
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
5542
|
+
* @throws GLib.Error
|
|
5509
5543
|
*/
|
|
5510
5544
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
5511
5545
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/cogl-11",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.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.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
|
},
|