@girs/cogl-12 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-12.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-12 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-12
|
|
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-12` | the namespace as a default export, plus the ambient and global declarations |
|
|
26
|
+
| `@girs/cogl-12/ambient` | only the `gi://` module declarations |
|
|
27
|
+
| `@girs/cogl-12/import` | only the `imports.gi` declarations |
|
|
28
|
+
| `@girs/cogl-12/cogl-12` | 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-12';
|
|
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-12'
|
|
46
|
+
import '@girs/cogl-12';
|
|
32
47
|
```
|
|
33
48
|
|
|
34
|
-
`tsconfig.json`:
|
|
35
49
|
```json
|
|
36
|
-
{
|
|
37
|
-
"compilerOptions": {
|
|
38
|
-
...
|
|
39
|
-
},
|
|
40
|
-
"include": ["@girs/cogl-12"],
|
|
41
|
-
...
|
|
42
|
-
}
|
|
50
|
+
{ "include": ["@girs/cogl-12"] }
|
|
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=12';
|
|
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-12` or `@girs/cogl-12/import` in your `tsconfig` or entry point Typescript file:
|
|
59
|
+
Referencing `@girs/cogl-12/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-12'
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
`tsconfig.json`:
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"compilerOptions": {
|
|
65
|
-
...
|
|
66
|
-
},
|
|
67
|
-
"include": ["@girs/cogl-12"],
|
|
68
|
-
...
|
|
69
|
-
}
|
|
70
|
-
```
|
|
62
|
+
### As `imports.gi`
|
|
71
63
|
|
|
72
|
-
|
|
64
|
+
GJS's global object works the same way, via `@girs/cogl-12/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-12.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
|
|
|
@@ -1511,15 +1534,15 @@ export namespace Cogl {
|
|
|
1511
1534
|
/**
|
|
1512
1535
|
* Selects the primary color buffer
|
|
1513
1536
|
*/
|
|
1514
|
-
COLOR,
|
|
1537
|
+
COLOR = 1,
|
|
1515
1538
|
/**
|
|
1516
1539
|
* Selects the depth buffer
|
|
1517
1540
|
*/
|
|
1518
|
-
DEPTH,
|
|
1541
|
+
DEPTH = 2,
|
|
1519
1542
|
/**
|
|
1520
1543
|
* Selects the stencil buffer
|
|
1521
1544
|
*/
|
|
1522
|
-
STENCIL,
|
|
1545
|
+
STENCIL = 4,
|
|
1523
1546
|
}
|
|
1524
1547
|
|
|
1525
1548
|
|
|
@@ -1531,11 +1554,11 @@ export namespace Cogl {
|
|
|
1531
1554
|
/**
|
|
1532
1555
|
* FIXME
|
|
1533
1556
|
*/
|
|
1534
|
-
WINDOW_BUFFER,
|
|
1557
|
+
WINDOW_BUFFER = 2,
|
|
1535
1558
|
/**
|
|
1536
1559
|
* FIXME
|
|
1537
1560
|
*/
|
|
1538
|
-
OFFSCREEN_BUFFER,
|
|
1561
|
+
OFFSCREEN_BUFFER = 4,
|
|
1539
1562
|
}
|
|
1540
1563
|
|
|
1541
1564
|
|
|
@@ -1543,8 +1566,8 @@ export namespace Cogl {
|
|
|
1543
1566
|
* @gir-type Flags
|
|
1544
1567
|
*/
|
|
1545
1568
|
enum EglImageFlags {
|
|
1546
|
-
NONE,
|
|
1547
|
-
NO_GET_DATA,
|
|
1569
|
+
NONE = 0,
|
|
1570
|
+
NO_GET_DATA = 1,
|
|
1548
1571
|
}
|
|
1549
1572
|
|
|
1550
1573
|
|
|
@@ -1573,156 +1596,156 @@ export namespace Cogl {
|
|
|
1573
1596
|
/**
|
|
1574
1597
|
* Any format
|
|
1575
1598
|
*/
|
|
1576
|
-
ANY,
|
|
1599
|
+
ANY = 0,
|
|
1577
1600
|
/**
|
|
1578
1601
|
* 8 bits alpha mask
|
|
1579
1602
|
*/
|
|
1580
|
-
A_8,
|
|
1603
|
+
A_8 = 17,
|
|
1581
1604
|
/**
|
|
1582
1605
|
* RGB, 16 bits
|
|
1583
1606
|
*/
|
|
1584
|
-
RGB_565,
|
|
1607
|
+
RGB_565 = 4,
|
|
1585
1608
|
/**
|
|
1586
1609
|
* RGBA, 16 bits
|
|
1587
1610
|
*/
|
|
1588
|
-
RGBA_4444,
|
|
1611
|
+
RGBA_4444 = 21,
|
|
1589
1612
|
/**
|
|
1590
1613
|
* RGBA, 16 bits
|
|
1591
1614
|
*/
|
|
1592
|
-
RGBA_5551,
|
|
1615
|
+
RGBA_5551 = 22,
|
|
1593
1616
|
/**
|
|
1594
1617
|
* Not currently supported
|
|
1595
1618
|
*/
|
|
1596
|
-
YUV,
|
|
1619
|
+
YUV = 7,
|
|
1597
1620
|
/**
|
|
1598
1621
|
* Single luminance component
|
|
1599
1622
|
*/
|
|
1600
|
-
G_8,
|
|
1623
|
+
G_8 = 8,
|
|
1601
1624
|
/**
|
|
1602
1625
|
* RG, 16 bits. Note that red-green textures
|
|
1603
1626
|
* are only available if {@link Cogl.FeatureID.OGL_FEATURE_ID_TEXTURE_RG} is advertised.
|
|
1604
1627
|
* See `cogl_texture_set_components()` for details.
|
|
1605
1628
|
*/
|
|
1606
|
-
RG_88,
|
|
1629
|
+
RG_88 = 9,
|
|
1607
1630
|
/**
|
|
1608
1631
|
* RGB, 24 bits
|
|
1609
1632
|
*/
|
|
1610
|
-
RGB_888,
|
|
1633
|
+
RGB_888 = 2,
|
|
1611
1634
|
/**
|
|
1612
1635
|
* BGR, 24 bits
|
|
1613
1636
|
*/
|
|
1614
|
-
BGR_888,
|
|
1637
|
+
BGR_888 = 34,
|
|
1615
1638
|
/**
|
|
1616
1639
|
* RGBA, 32 bits
|
|
1617
1640
|
*/
|
|
1618
|
-
RGBA_8888,
|
|
1641
|
+
RGBA_8888 = 19,
|
|
1619
1642
|
/**
|
|
1620
1643
|
* BGRA, 32 bits
|
|
1621
1644
|
*/
|
|
1622
|
-
BGRA_8888,
|
|
1645
|
+
BGRA_8888 = 51,
|
|
1623
1646
|
/**
|
|
1624
1647
|
* ARGB, 32 bits
|
|
1625
1648
|
*/
|
|
1626
|
-
ARGB_8888,
|
|
1649
|
+
ARGB_8888 = 83,
|
|
1627
1650
|
/**
|
|
1628
1651
|
* ABGR, 32 bits
|
|
1629
1652
|
*/
|
|
1630
|
-
ABGR_8888,
|
|
1653
|
+
ABGR_8888 = 115,
|
|
1631
1654
|
/**
|
|
1632
1655
|
* RGBA, 32 bits, 10 bpc
|
|
1633
1656
|
*/
|
|
1634
|
-
RGBA_1010102,
|
|
1657
|
+
RGBA_1010102 = 29,
|
|
1635
1658
|
/**
|
|
1636
1659
|
* BGRA, 32 bits, 10 bpc
|
|
1637
1660
|
*/
|
|
1638
|
-
BGRA_1010102,
|
|
1639
|
-
XRGB_2101010,
|
|
1661
|
+
BGRA_1010102 = 61,
|
|
1662
|
+
XRGB_2101010 = 77,
|
|
1640
1663
|
/**
|
|
1641
1664
|
* ARGB, 32 bits, 10 bpc
|
|
1642
1665
|
*/
|
|
1643
|
-
ARGB_2101010,
|
|
1644
|
-
XBGR_2101010,
|
|
1666
|
+
ARGB_2101010 = 93,
|
|
1667
|
+
XBGR_2101010 = 109,
|
|
1645
1668
|
/**
|
|
1646
1669
|
* ABGR, 32 bits, 10 bpc
|
|
1647
1670
|
*/
|
|
1648
|
-
ABGR_2101010,
|
|
1671
|
+
ABGR_2101010 = 125,
|
|
1649
1672
|
/**
|
|
1650
1673
|
* RGBA half floating point, 64 bit
|
|
1651
1674
|
*/
|
|
1652
|
-
RGBA_FP_16161616,
|
|
1675
|
+
RGBA_FP_16161616 = 27,
|
|
1653
1676
|
/**
|
|
1654
1677
|
* BGRA half floating point, 64 bit
|
|
1655
1678
|
*/
|
|
1656
|
-
BGRA_FP_16161616,
|
|
1657
|
-
XRGB_FP_16161616,
|
|
1679
|
+
BGRA_FP_16161616 = 59,
|
|
1680
|
+
XRGB_FP_16161616 = 75,
|
|
1658
1681
|
/**
|
|
1659
1682
|
* ARGB half floating point, 64 bit
|
|
1660
1683
|
*/
|
|
1661
|
-
ARGB_FP_16161616,
|
|
1662
|
-
XBGR_FP_16161616,
|
|
1684
|
+
ARGB_FP_16161616 = 91,
|
|
1685
|
+
XBGR_FP_16161616 = 107,
|
|
1663
1686
|
/**
|
|
1664
1687
|
* ABGR half floating point, 64 bit
|
|
1665
1688
|
*/
|
|
1666
|
-
ABGR_FP_16161616,
|
|
1689
|
+
ABGR_FP_16161616 = 123,
|
|
1667
1690
|
/**
|
|
1668
1691
|
* Premultiplied RGBA, 32 bits
|
|
1669
1692
|
*/
|
|
1670
|
-
RGBA_8888_PRE,
|
|
1693
|
+
RGBA_8888_PRE = 147,
|
|
1671
1694
|
/**
|
|
1672
1695
|
* Premultiplied BGRA, 32 bits
|
|
1673
1696
|
*/
|
|
1674
|
-
BGRA_8888_PRE,
|
|
1697
|
+
BGRA_8888_PRE = 179,
|
|
1675
1698
|
/**
|
|
1676
1699
|
* Premultiplied ARGB, 32 bits
|
|
1677
1700
|
*/
|
|
1678
|
-
ARGB_8888_PRE,
|
|
1701
|
+
ARGB_8888_PRE = 211,
|
|
1679
1702
|
/**
|
|
1680
1703
|
* Premultiplied ABGR, 32 bits
|
|
1681
1704
|
*/
|
|
1682
|
-
ABGR_8888_PRE,
|
|
1705
|
+
ABGR_8888_PRE = 243,
|
|
1683
1706
|
/**
|
|
1684
1707
|
* Premultiplied RGBA, 16 bits
|
|
1685
1708
|
*/
|
|
1686
|
-
RGBA_4444_PRE,
|
|
1709
|
+
RGBA_4444_PRE = 149,
|
|
1687
1710
|
/**
|
|
1688
1711
|
* Premultiplied RGBA, 16 bits
|
|
1689
1712
|
*/
|
|
1690
|
-
RGBA_5551_PRE,
|
|
1713
|
+
RGBA_5551_PRE = 150,
|
|
1691
1714
|
/**
|
|
1692
1715
|
* Premultiplied RGBA, 32 bits, 10 bpc
|
|
1693
1716
|
*/
|
|
1694
|
-
RGBA_1010102_PRE,
|
|
1717
|
+
RGBA_1010102_PRE = 157,
|
|
1695
1718
|
/**
|
|
1696
1719
|
* Premultiplied BGRA, 32 bits, 10 bpc
|
|
1697
1720
|
*/
|
|
1698
|
-
BGRA_1010102_PRE,
|
|
1721
|
+
BGRA_1010102_PRE = 189,
|
|
1699
1722
|
/**
|
|
1700
1723
|
* Premultiplied ARGB, 32 bits, 10 bpc
|
|
1701
1724
|
*/
|
|
1702
|
-
ARGB_2101010_PRE,
|
|
1725
|
+
ARGB_2101010_PRE = 221,
|
|
1703
1726
|
/**
|
|
1704
1727
|
* Premultiplied ABGR, 32 bits, 10 bpc
|
|
1705
1728
|
*/
|
|
1706
|
-
ABGR_2101010_PRE,
|
|
1729
|
+
ABGR_2101010_PRE = 253,
|
|
1707
1730
|
/**
|
|
1708
1731
|
* Premultiplied RGBA half floating point, 64 bit
|
|
1709
1732
|
*/
|
|
1710
|
-
RGBA_FP_16161616_PRE,
|
|
1733
|
+
RGBA_FP_16161616_PRE = 155,
|
|
1711
1734
|
/**
|
|
1712
1735
|
* Premultiplied BGRA half floating point, 64 bit
|
|
1713
1736
|
*/
|
|
1714
|
-
BGRA_FP_16161616_PRE,
|
|
1737
|
+
BGRA_FP_16161616_PRE = 187,
|
|
1715
1738
|
/**
|
|
1716
1739
|
* Premultiplied ARGB half floating point, 64 bit
|
|
1717
1740
|
*/
|
|
1718
|
-
ARGB_FP_16161616_PRE,
|
|
1741
|
+
ARGB_FP_16161616_PRE = 219,
|
|
1719
1742
|
/**
|
|
1720
1743
|
* Premultiplied ABGR half floating point, 64 bit
|
|
1721
1744
|
*/
|
|
1722
|
-
ABGR_FP_16161616_PRE,
|
|
1723
|
-
DEPTH_16,
|
|
1724
|
-
DEPTH_32,
|
|
1725
|
-
DEPTH_24_STENCIL_8,
|
|
1745
|
+
ABGR_FP_16161616_PRE = 251,
|
|
1746
|
+
DEPTH_16 = 265,
|
|
1747
|
+
DEPTH_32 = 259,
|
|
1748
|
+
DEPTH_24_STENCIL_8 = 771,
|
|
1726
1749
|
}
|
|
1727
1750
|
|
|
1728
1751
|
|
|
@@ -1734,7 +1757,7 @@ export namespace Cogl {
|
|
|
1734
1757
|
/**
|
|
1735
1758
|
* Read from the color buffer
|
|
1736
1759
|
*/
|
|
1737
|
-
READ_PIXELS_COLOR_BUFFER,
|
|
1760
|
+
READ_PIXELS_COLOR_BUFFER = 1,
|
|
1738
1761
|
}
|
|
1739
1762
|
|
|
1740
1763
|
|
|
@@ -2061,6 +2084,7 @@ export namespace Cogl {
|
|
|
2061
2084
|
* program will abort with an error message if there is an error during
|
|
2062
2085
|
* automatic allocation.</note>
|
|
2063
2086
|
* @returns `true` if there were no error allocating the framebuffer, else `false`.
|
|
2087
|
+
* @throws GLib.Error
|
|
2064
2088
|
*/
|
|
2065
2089
|
allocate(): boolean;
|
|
2066
2090
|
|
|
@@ -3589,6 +3613,7 @@ export namespace Cogl {
|
|
|
3589
3613
|
* is in premultiplied form.
|
|
3590
3614
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired blend function.
|
|
3591
3615
|
* @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).
|
|
3616
|
+
* @throws GLib.Error
|
|
3592
3617
|
*/
|
|
3593
3618
|
set_blend(blend_string: string): boolean;
|
|
3594
3619
|
|
|
@@ -3743,6 +3768,7 @@ export namespace Cogl {
|
|
|
3743
3768
|
* @param layer_index Specifies the layer you want define a combine function for
|
|
3744
3769
|
* @param blend_string A <link linkend="cogl-Blend-Strings">Cogl blend string</link> describing the desired texture combine function.
|
|
3745
3770
|
* @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
|
|
3771
|
+
* @throws GLib.Error
|
|
3746
3772
|
*/
|
|
3747
3773
|
set_layer_combine(layer_index: number, blend_string: string): boolean;
|
|
3748
3774
|
|
|
@@ -3805,6 +3831,7 @@ export namespace Cogl {
|
|
|
3805
3831
|
* @param layer_index the layer number to change.
|
|
3806
3832
|
* @param enable whether to enable point sprite coord generation.
|
|
3807
3833
|
* @returns `true` if the function succeeds, `false` otherwise.
|
|
3834
|
+
* @throws GLib.Error
|
|
3808
3835
|
*/
|
|
3809
3836
|
set_layer_point_sprite_coords_enabled(layer_index: number, enable: boolean): boolean;
|
|
3810
3837
|
|
|
@@ -3851,6 +3878,7 @@ export namespace Cogl {
|
|
|
3851
3878
|
* undefined.
|
|
3852
3879
|
* @param enable whether to enable per-vertex point size
|
|
3853
3880
|
* @returns `true` if the change succeeded or `false` otherwise
|
|
3881
|
+
* @throws GLib.Error
|
|
3854
3882
|
*/
|
|
3855
3883
|
set_per_vertex_point_size(enable: boolean): boolean;
|
|
3856
3884
|
|
|
@@ -4167,6 +4195,7 @@ export namespace Cogl {
|
|
|
4167
4195
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
4168
4196
|
* framebuffer and rendered too.</note>
|
|
4169
4197
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
4198
|
+
* @throws GLib.Error
|
|
4170
4199
|
*/
|
|
4171
4200
|
allocate(): boolean;
|
|
4172
4201
|
|
|
@@ -4312,6 +4341,7 @@ export namespace Cogl {
|
|
|
4312
4341
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
4313
4342
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
4314
4343
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
4344
|
+
* @throws GLib.Error
|
|
4315
4345
|
*/
|
|
4316
4346
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
4317
4347
|
|
|
@@ -4419,6 +4449,7 @@ export namespace Cogl {
|
|
|
4419
4449
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
4420
4450
|
* framebuffer and rendered too.</note>
|
|
4421
4451
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
4452
|
+
* @throws GLib.Error
|
|
4422
4453
|
*/
|
|
4423
4454
|
allocate(): boolean;
|
|
4424
4455
|
|
|
@@ -4564,6 +4595,7 @@ export namespace Cogl {
|
|
|
4564
4595
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
4565
4596
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
4566
4597
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
4598
|
+
* @throws GLib.Error
|
|
4567
4599
|
*/
|
|
4568
4600
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
4569
4601
|
|
|
@@ -5134,6 +5166,7 @@ export namespace Cogl {
|
|
|
5134
5166
|
* the texture, or if the texture is attached to a {@link Cogl.Offscreen}
|
|
5135
5167
|
* framebuffer and rendered too.</note>
|
|
5136
5168
|
* @returns `true` if the texture was successfully allocated, otherwise `false` and `error` will be updated if it wasn't `null`.
|
|
5169
|
+
* @throws GLib.Error
|
|
5137
5170
|
*/
|
|
5138
5171
|
allocate(): boolean;
|
|
5139
5172
|
|
|
@@ -5279,6 +5312,7 @@ export namespace Cogl {
|
|
|
5279
5312
|
* @param data the source data, pointing to the first top-left pixel to set
|
|
5280
5313
|
* @param level The mipmap level to update (Normally 0 for the largest, base texture)
|
|
5281
5314
|
* @returns `true` if the data upload was successful, and `false` otherwise
|
|
5315
|
+
* @throws GLib.Error
|
|
5282
5316
|
*/
|
|
5283
5317
|
set_data(format: PixelFormat, rowstride: number, data: Uint8Array | string, level: number): boolean;
|
|
5284
5318
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/cogl-12",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for Cogl-12",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "cogl-12.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
|
},
|