@girs/cogl-13 13.0.0-4.0.0-beta.38 → 13.0.0-4.0.0-beta.40

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/cogl-13.d.ts +129 -719
  3. package/package.json +7 -7
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/cogl-13)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Cogl-13, generated from library version 13.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.38.
8
+ GJS TypeScript type definitions for Cogl-13, generated from library version 13.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.40.
9
9
 
10
10
  ## Install
11
11
 
package/cogl-13.d.ts CHANGED
@@ -24,14 +24,6 @@ export namespace Cogl {
24
24
  /**
25
25
  * Data types for the components of a vertex attribute.
26
26
  */
27
-
28
- /**
29
- * Data types for the components of a vertex attribute.
30
- */
31
- export namespace AttributeType {
32
- export const $gtype: GObject.GType<AttributeType>;
33
- }
34
-
35
27
  enum AttributeType {
36
28
  /**
37
29
  * Data is the same size of a byte
@@ -56,13 +48,6 @@ export namespace Cogl {
56
48
  */
57
49
  FLOAT,
58
50
  }
59
- /**
60
- * Error codes that can be thrown when performing bitmap
61
- * operations. Note that gdk_pixbuf_new_from_file() can also throw
62
- * errors directly from the underlying image loading library. For
63
- * example, if GdkPixbuf is used then errors #GdkPixbufError<!-- -->s
64
- * will be used directly.
65
- */
66
51
 
67
52
  /**
68
53
  * Error codes that can be thrown when performing bitmap
@@ -71,10 +56,6 @@ export namespace Cogl {
71
56
  * example, if GdkPixbuf is used then errors #GdkPixbufError<!-- -->s
72
57
  * will be used directly.
73
58
  */
74
- export namespace BitmapError {
75
- export const $gtype: GObject.GType<BitmapError>;
76
- }
77
-
78
59
  enum BitmapError {
79
60
  /**
80
61
  * Generic failure code, something went
@@ -90,17 +71,10 @@ export namespace Cogl {
90
71
  */
91
72
  CORRUPT_IMAGE,
92
73
  }
93
- /**
94
- * Error enumeration for the blend strings parser
95
- */
96
74
 
97
75
  /**
98
76
  * Error enumeration for the blend strings parser
99
77
  */
100
- export namespace BlendStringError {
101
- export const $gtype: GObject.GType<BlendStringError>;
102
- }
103
-
104
78
  enum BlendStringError {
105
79
  /**
106
80
  * Generic parse error
@@ -120,15 +94,6 @@ export namespace Cogl {
120
94
  */
121
95
  GPU_UNSUPPORTED_ERROR,
122
96
  }
123
- /**
124
- * When using depth testing one of these functions is used to compare
125
- * the depth of an incoming fragment against the depth value currently
126
- * stored in the depth buffer. The function is changed using
127
- * cogl_depth_state_set_test_function().
128
- *
129
- * The test is only done when depth testing is explicitly enabled. (See
130
- * cogl_depth_state_set_test_enabled())
131
- */
132
97
 
133
98
  /**
134
99
  * When using depth testing one of these functions is used to compare
@@ -139,10 +104,6 @@ export namespace Cogl {
139
104
  * The test is only done when depth testing is explicitly enabled. (See
140
105
  * cogl_depth_state_set_test_enabled())
141
106
  */
142
- export namespace DepthTestFunction {
143
- export const $gtype: GObject.GType<DepthTestFunction>;
144
- }
145
-
146
107
  enum DepthTestFunction {
147
108
  /**
148
109
  * Never passes.
@@ -183,21 +144,12 @@ export namespace Cogl {
183
144
  */
184
145
  ALWAYS,
185
146
  }
186
- /**
187
- * All the capabilities that can vary between different GPUs supported
188
- * by Cogl. Applications that depend on any of these features should explicitly
189
- * check for them using cogl_has_feature() or cogl_has_features().
190
- */
191
147
 
192
148
  /**
193
149
  * All the capabilities that can vary between different GPUs supported
194
150
  * by Cogl. Applications that depend on any of these features should explicitly
195
151
  * check for them using cogl_has_feature() or cogl_has_features().
196
152
  */
197
- export namespace FeatureID {
198
- export const $gtype: GObject.GType<FeatureID>;
199
- }
200
-
201
153
  enum FeatureID {
202
154
  /**
203
155
  * Set if
@@ -236,17 +188,10 @@ export namespace Cogl {
236
188
  OGL_FEATURE_ID_BLIT_FRAMEBUFFER,
237
189
  OGL_FEATURE_ID_TIMESTAMP_QUERY,
238
190
  }
239
- /**
240
- * Return values for the #CoglXlibFilterFunc and #CoglWin32FilterFunc functions.
241
- */
242
191
 
243
192
  /**
244
193
  * Return values for the #CoglXlibFilterFunc and #CoglWin32FilterFunc functions.
245
194
  */
246
- export namespace FilterReturn {
247
- export const $gtype: GObject.GType<FilterReturn>;
248
- }
249
-
250
195
  enum FilterReturn {
251
196
  /**
252
197
  * The event was not handled, continues the
@@ -258,22 +203,6 @@ export namespace Cogl {
258
203
  */
259
204
  REMOVE,
260
205
  }
261
- /**
262
- * Identifiers that are passed to #CoglFrameCallback functions
263
- * (registered using cogl_onscreen_add_frame_callback()) that
264
- * mark the progression of a frame in some way which usually
265
- * means that new information will have been accumulated in the
266
- * frame's corresponding #CoglFrameInfo object.
267
- *
268
- * The last event that will be sent for a frame will be a
269
- * `COGL_FRAME_EVENT_COMPLETE` event and so these are a good
270
- * opportunity to collect statistics about a frame since the
271
- * #CoglFrameInfo should hold the most data at this point.
272
- *
273
- * <note>A frame may not be completed before the next frame can start
274
- * so applications should avoid needing to collect all statistics for
275
- * a particular frame before they can start a new frame.</note>
276
- */
277
206
 
278
207
  /**
279
208
  * Identifiers that are passed to #CoglFrameCallback functions
@@ -291,10 +220,6 @@ export namespace Cogl {
291
220
  * so applications should avoid needing to collect all statistics for
292
221
  * a particular frame before they can start a new frame.</note>
293
222
  */
294
- export namespace FrameEvent {
295
- export const $gtype: GObject.GType<FrameEvent>;
296
- }
297
-
298
223
  enum FrameEvent {
299
224
  /**
300
225
  * Notifies that the system compositor has
@@ -314,19 +239,9 @@ export namespace Cogl {
314
239
  COMPLETE,
315
240
  }
316
241
 
317
- export namespace FramebufferError {
318
- export const $gtype: GObject.GType<FramebufferError>;
319
- }
320
-
321
242
  enum FramebufferError {
322
243
  FRAMEBUFFER_ERROR_ALLOCATE,
323
244
  }
324
- /**
325
- * All the error values that might be returned by
326
- * cogl_get_graphics_reset_status(). Each value's meaning corresponds
327
- * to the similarly named value defined in the ARB_robustness and
328
- * NV_robustness_video_memory_purge extensions.
329
- */
330
245
 
331
246
  /**
332
247
  * All the error values that might be returned by
@@ -334,10 +249,6 @@ export namespace Cogl {
334
249
  * to the similarly named value defined in the ARB_robustness and
335
250
  * NV_robustness_video_memory_purge extensions.
336
251
  */
337
- export namespace GraphicsResetStatus {
338
- export const $gtype: GObject.GType<GraphicsResetStatus>;
339
- }
340
-
341
252
  enum GraphicsResetStatus {
342
253
  NO_ERROR,
343
254
  GUILTY_CONTEXT_RESET,
@@ -345,17 +256,6 @@ export namespace Cogl {
345
256
  UNKNOWN_CONTEXT_RESET,
346
257
  PURGED_CONTEXT_RESET,
347
258
  }
348
- /**
349
- * You should aim to use the smallest data type that gives you enough
350
- * range, since it reduces the size of your index array and can help
351
- * reduce the demand on memory bandwidth.
352
- *
353
- * Note that %COGL_INDICES_TYPE_UNSIGNED_INT is only supported if the
354
- * %COGL_FEATURE_ID_UNSIGNED_INT_INDICES feature is available. This
355
- * should always be available on OpenGL but on OpenGL ES it will only
356
- * be available if the GL_OES_element_index_uint extension is
357
- * advertized.
358
- */
359
259
 
360
260
  /**
361
261
  * You should aim to use the smallest data type that gives you enough
@@ -368,10 +268,6 @@ export namespace Cogl {
368
268
  * be available if the GL_OES_element_index_uint extension is
369
269
  * advertized.
370
270
  */
371
- export namespace IndicesType {
372
- export const $gtype: GObject.GType<IndicesType>;
373
- }
374
-
375
271
  enum IndicesType {
376
272
  /**
377
273
  * Your indices are unsigned bytes
@@ -386,12 +282,6 @@ export namespace Cogl {
386
282
  */
387
283
  INT,
388
284
  }
389
- /**
390
- * Alpha testing happens before blending primitives with the framebuffer and
391
- * gives an opportunity to discard fragments based on a comparison with the
392
- * incoming alpha value and a reference alpha value. The #CoglPipelineAlphaFunc
393
- * determines how the comparison is done.
394
- */
395
285
 
396
286
  /**
397
287
  * Alpha testing happens before blending primitives with the framebuffer and
@@ -399,10 +289,6 @@ export namespace Cogl {
399
289
  * incoming alpha value and a reference alpha value. The #CoglPipelineAlphaFunc
400
290
  * determines how the comparison is done.
401
291
  */
402
- export namespace PipelineAlphaFunc {
403
- export const $gtype: GObject.GType<PipelineAlphaFunc>;
404
- }
405
-
406
292
  enum PipelineAlphaFunc {
407
293
  /**
408
294
  * Never let the fragment through.
@@ -443,468 +329,144 @@ export namespace Cogl {
443
329
  */
444
330
  ALWAYS,
445
331
  }
446
- /**
447
- * Specifies which faces should be culled. This can be set on a
448
- * pipeline using cogl_pipeline_set_cull_face_mode().
449
- */
450
332
 
451
333
  /**
452
334
  * Specifies which faces should be culled. This can be set on a
453
335
  * pipeline using cogl_pipeline_set_cull_face_mode().
454
336
  */
455
- export namespace PipelineCullFaceMode {
456
- export const $gtype: GObject.GType<PipelineCullFaceMode>;
457
- }
458
-
459
337
  enum PipelineCullFaceMode {
460
338
  /**
461
339
  * Neither face will be
462
340
  * culled. This is the default.
463
341
  */
464
- NONE,
465
- /**
466
- * Front faces will be culled.
467
- */
468
- FRONT,
469
- /**
470
- * Back faces will be culled.
471
- */
472
- BACK,
473
- /**
474
- * All faces will be culled.
475
- */
476
- BOTH,
477
- }
478
- /**
479
- * Texture filtering is used whenever the current pixel maps either to more
480
- * than one texture element (texel) or less than one. These filter enums
481
- * correspond to different strategies used to come up with a pixel color, by
482
- * possibly referring to multiple neighbouring texels and taking a weighted
483
- * average or simply using the nearest texel.
484
- */
485
-
486
- /**
487
- * Texture filtering is used whenever the current pixel maps either to more
488
- * than one texture element (texel) or less than one. These filter enums
489
- * correspond to different strategies used to come up with a pixel color, by
490
- * possibly referring to multiple neighbouring texels and taking a weighted
491
- * average or simply using the nearest texel.
492
- */
493
- export namespace PipelineFilter {
494
- export const $gtype: GObject.GType<PipelineFilter>;
495
- }
496
-
497
- enum PipelineFilter {
498
- /**
499
- * Measuring in manhatten distance from the,
500
- * current pixel center, use the nearest texture texel
501
- */
502
- NEAREST,
503
- /**
504
- * Use the weighted average of the 4 texels
505
- * nearest the current pixel center
506
- */
507
- LINEAR,
508
- /**
509
- * Select the mimap level whose
510
- * texel size most closely matches the current pixel, and use the
511
- * %COGL_PIPELINE_FILTER_NEAREST criterion
512
- */
513
- NEAREST_MIPMAP_NEAREST,
514
- /**
515
- * Select the mimap level whose
516
- * texel size most closely matches the current pixel, and use the
517
- * %COGL_PIPELINE_FILTER_LINEAR criterion
518
- */
519
- LINEAR_MIPMAP_NEAREST,
520
- /**
521
- * Select the two mimap levels
522
- * whose texel size most closely matches the current pixel, use
523
- * the %COGL_PIPELINE_FILTER_NEAREST criterion on each one and take
524
- * their weighted average
525
- */
526
- NEAREST_MIPMAP_LINEAR,
527
- /**
528
- * Select the two mimap levels
529
- * whose texel size most closely matches the current pixel, use
530
- * the %COGL_PIPELINE_FILTER_LINEAR criterion on each one and take
531
- * their weighted average
532
- */
533
- LINEAR_MIPMAP_LINEAR,
534
- }
535
- /**
536
- * The wrap mode specifies what happens when texture coordinates
537
- * outside the range 0→1 are used. Note that if the filter mode is
538
- * anything but %COGL_PIPELINE_FILTER_NEAREST then texels outside the
539
- * range 0→1 might be used even when the coordinate is exactly 0 or 1
540
- * because OpenGL will try to sample neighbouring pixels. For example
541
- * if you are trying to render the full texture then you may get
542
- * artifacts around the edges when the pixels from the other side are
543
- * merged in if the wrap mode is set to repeat.
544
- */
545
-
546
- /**
547
- * The wrap mode specifies what happens when texture coordinates
548
- * outside the range 0→1 are used. Note that if the filter mode is
549
- * anything but %COGL_PIPELINE_FILTER_NEAREST then texels outside the
550
- * range 0→1 might be used even when the coordinate is exactly 0 or 1
551
- * because OpenGL will try to sample neighbouring pixels. For example
552
- * if you are trying to render the full texture then you may get
553
- * artifacts around the edges when the pixels from the other side are
554
- * merged in if the wrap mode is set to repeat.
555
- */
556
- export namespace PipelineWrapMode {
557
- export const $gtype: GObject.GType<PipelineWrapMode>;
558
- }
559
-
560
- enum PipelineWrapMode {
561
- /**
562
- * The texture will be repeated. This
563
- * is useful for example to draw a tiled background.
564
- */
565
- REPEAT,
566
- MIRRORED_REPEAT,
567
- /**
568
- * The coordinates outside the
569
- * range 0→1 will sample copies of the edge pixels of the
570
- * texture. This is useful to avoid artifacts if only one copy of
571
- * the texture is being rendered.
572
- */
573
- CLAMP_TO_EDGE,
574
- /**
575
- * Cogl will try to automatically
576
- * decide which of the above two to use. For cogl_rectangle(), it
577
- * will use repeat mode if any of the texture coordinates are
578
- * outside the range 0→1, otherwise it will use clamp to edge. For
579
- * cogl_polygon() it will always use repeat mode. For
580
- * cogl_vertex_buffer_draw() it will use repeat mode except for
581
- * layers that have point sprite coordinate generation enabled. This
582
- * is the default value.
583
- */
584
- AUTOMATIC,
585
- }
586
-
587
- export namespace RendererError {
588
- export const $gtype: GObject.GType<RendererError>;
589
- }
590
-
591
- enum RendererError {
592
- XLIB_DISPLAY_OPEN,
593
- BAD_CONSTRAINT,
594
- }
595
- class ScanoutError extends GLib.Error {
596
- static $gtype: GObject.GType<ScanoutError>;
597
-
598
- // Static fields
599
-
600
- static SCANOUT_ERROR_INHIBITED: number;
601
-
602
- // Constructors
603
-
604
- constructor(options: { message: string; code: number });
605
- _init(...args: any[]): void;
606
- }
607
-
608
- /**
609
- * Types of shaders
610
- */
611
-
612
- /**
613
- * Types of shaders
614
- */
615
- export namespace ShaderType {
616
- export const $gtype: GObject.GType<ShaderType>;
617
- }
618
-
619
- enum ShaderType {
620
- /**
621
- * A program for processing vertices
622
- */
623
- VERTEX,
624
- /**
625
- * A program for processing fragments
626
- */
627
- FRAGMENT,
628
- }
629
- /**
630
- * #CoglSnippetHook is used to specify a location within a
631
- * #CoglPipeline where the code of the snippet should be used when it
632
- * is attached to a pipeline.
633
- *
634
- * <glosslist>
635
- * <glossentry>
636
- * <glossterm>%COGL_SNIPPET_HOOK_VERTEX_GLOBALS</glossterm>
637
- * <glossdef>
638
- * <para>
639
- * Adds a shader snippet at the beginning of the global section of the
640
- * shader for the vertex processing. Any declarations here can be
641
- * shared with all other snippets that are attached to a vertex hook.
642
- * Only the ‘declarations’ string is used and the other strings are
643
- * ignored.
644
- * </para>
645
- * </glossdef>
646
- * </glossentry>
647
- * <glossentry>
648
- * <glossterm>%COGL_SNIPPET_HOOK_FRAGMENT_GLOBALS</glossterm>
649
- * <glossdef>
650
- * <para>
651
- * Adds a shader snippet at the beginning of the global section of the
652
- * shader for the fragment processing. Any declarations here can be
653
- * shared with all other snippets that are attached to a fragment
654
- * hook. Only the ‘declarations’ string is used and the other strings
655
- * are ignored.
656
- * </para>
657
- * </glossdef>
658
- * </glossentry>
659
- * <glossentry>
660
- * <glossterm>%COGL_SNIPPET_HOOK_VERTEX</glossterm>
661
- * <glossdef>
662
- * <para>
663
- * Adds a shader snippet that will hook on to the vertex processing
664
- * stage of the pipeline. This gives a chance for the application to
665
- * modify the vertex attributes generated by the shader. Typically the
666
- * snippet will modify cogl_color_out or cogl_position_out builtins.
667
- * </para>
668
- * <para>
669
- * The ‘declarations’ string in `snippet` will be inserted in the
670
- * global scope of the shader. Use this to declare any uniforms,
671
- * attributes or functions that the snippet requires.
672
- * </para>
673
- * <para>
674
- * The ‘pre’ string in `snippet` will be inserted at the top of the
675
- * main() function before any vertex processing is done.
676
- * </para>
677
- * <para>
678
- * The ‘replace’ string in `snippet` will be used instead of the
679
- * generated vertex processing if it is present. This can be used if
680
- * the application wants to provide a complete vertex shader and
681
- * doesn't need the generated output from Cogl.
682
- * </para>
683
- * <para>
684
- * The ‘post’ string in `snippet` will be inserted after all of the
685
- * standard vertex processing is done. This can be used to modify the
686
- * outputs.
687
- * </para>
688
- * </glossdef>
689
- * </glossentry>
690
- * <glossentry>
691
- * <glossterm>%COGL_SNIPPET_HOOK_VERTEX_TRANSFORM</glossterm>
692
- * <glossdef>
693
- * <para>
694
- * Adds a shader snippet that will hook on to the vertex transform stage.
695
- * Typically the snippet will use the cogl_modelview_matrix,
696
- * cogl_projection_matrix and cogl_modelview_projection_matrix matrices and the
697
- * cogl_position_in attribute. The hook must write to cogl_position_out.
698
- * The default processing for this hook will multiply cogl_position_in by
699
- * the combined modelview-projection matrix and store it on cogl_position_out.
700
- * </para>
701
- * <para>
702
- * The ‘declarations’ string in `snippet` will be inserted in the
703
- * global scope of the shader. Use this to declare any uniforms,
704
- * attributes or functions that the snippet requires.
705
- * </para>
706
- * <para>
707
- * The ‘pre’ string in `snippet` will be inserted at the top of the
708
- * main() function before the vertex transform is done.
709
- * </para>
710
- * <para>
711
- * The ‘replace’ string in `snippet` will be used instead of the
712
- * generated vertex transform if it is present.
713
- * </para>
714
- * <para>
715
- * The ‘post’ string in `snippet` will be inserted after all of the
716
- * standard vertex transformation is done. This can be used to modify the
717
- * cogl_position_out in addition to the default processing.
718
- * </para>
719
- * </glossdef>
720
- * </glossentry>
721
- * <glossentry>
722
- * <glossterm>%COGL_SNIPPET_HOOK_POINT_SIZE</glossterm>
723
- * <glossdef>
724
- * <para>
725
- * Adds a shader snippet that will hook on to the point size
726
- * calculation step within the vertex shader stage. The snippet should
727
- * write to the builtin cogl_point_size_out with the new point size.
728
- * The snippet can either read cogl_point_size_in directly and write a
729
- * new value or first read an existing value in cogl_point_size_out
730
- * that would be set by a previous snippet. Note that this hook is
731
- * only used if cogl_pipeline_set_per_vertex_point_size() is enabled
732
- * on the pipeline.
733
- * </para>
734
- * <para>
735
- * The ‘declarations’ string in `snippet` will be inserted in the
736
- * global scope of the shader. Use this to declare any uniforms,
737
- * attributes or functions that the snippet requires.
738
- * </para>
739
- * <para>
740
- * The ‘pre’ string in `snippet` will be inserted just before
741
- * calculating the point size.
742
- * </para>
743
- * <para>
744
- * The ‘replace’ string in `snippet` will be used instead of the
745
- * generated point size calculation if it is present.
746
- * </para>
747
- * <para>
748
- * The ‘post’ string in `snippet` will be inserted after the
749
- * standard point size calculation is done. This can be used to modify
750
- * cogl_point_size_out in addition to the default processing.
751
- * </para>
752
- * </glossdef>
753
- * </glossentry>
754
- * <glossentry>
755
- * <glossterm>%COGL_SNIPPET_HOOK_FRAGMENT</glossterm>
756
- * <glossdef>
757
- * <para>
758
- * Adds a shader snippet that will hook on to the fragment processing
759
- * stage of the pipeline. This gives a chance for the application to
760
- * modify the fragment color generated by the shader. Typically the
761
- * snippet will modify cogl_color_out.
762
- * </para>
763
- * <para>
764
- * The ‘declarations’ string in `snippet` will be inserted in the
765
- * global scope of the shader. Use this to declare any uniforms,
766
- * attributes or functions that the snippet requires.
767
- * </para>
768
- * <para>
769
- * The ‘pre’ string in `snippet` will be inserted at the top of the
770
- * main() function before any fragment processing is done.
771
- * </para>
772
- * <para>
773
- * The ‘replace’ string in `snippet` will be used instead of the
774
- * generated fragment processing if it is present. This can be used if
775
- * the application wants to provide a complete fragment shader and
776
- * doesn't need the generated output from Cogl.
777
- * </para>
778
- * <para>
779
- * The ‘post’ string in `snippet` will be inserted after all of the
780
- * standard fragment processing is done. At this point the generated
781
- * value for the rest of the pipeline state will already be in
782
- * cogl_color_out so the application can modify the result by altering
783
- * this variable.
784
- * </para>
785
- * </glossdef>
786
- * </glossentry>
787
- * <glossentry>
788
- * <glossterm>%COGL_SNIPPET_HOOK_TEXTURE_COORD_TRANSFORM</glossterm>
789
- * <glossdef>
790
- * <para>
791
- * Adds a shader snippet that will hook on to the texture coordinate
792
- * transformation of a particular layer. This can be used to replace
793
- * the processing for a layer or to modify the results.
794
- * </para>
795
- * <para>
796
- * Within the snippet code for this hook there are two extra
797
- * variables. The first is a mat4 called cogl_matrix which represents
798
- * the user matrix for this layer. The second is called cogl_tex_coord
799
- * and represents the incoming and outgoing texture coordinate. On
800
- * entry to the hook, cogl_tex_coord contains the value of the
801
- * corresponding texture coordinate attribute for this layer. The hook
802
- * is expected to modify this variable. The output will be passed as a
803
- * varying to the fragment processing stage. The default code will
804
- * just multiply cogl_matrix by cogl_tex_coord and store the result in
805
- * cogl_tex_coord.
806
- * </para>
807
- * <para>
808
- * The ‘declarations’ string in `snippet` will be inserted in the
809
- * global scope of the shader. Use this to declare any uniforms,
810
- * attributes or functions that the snippet requires.
811
- * </para>
812
- * <para>
813
- * The ‘pre’ string in `snippet` will be inserted just before the
814
- * fragment processing for this layer. At this point cogl_tex_coord
815
- * still contains the value of the texture coordinate attribute.
816
- * </para>
817
- * <para>
818
- * If a ‘replace’ string is given then this will be used instead of
819
- * the default fragment processing for this layer. The snippet can
820
- * modify cogl_tex_coord or leave it as is to apply no transformation.
821
- * </para>
822
- * <para>
823
- * The ‘post’ string in `snippet` will be inserted just after the
824
- * transformation. At this point cogl_tex_coord will contain the
825
- * results of the transformation but it can be further modified by the
826
- * snippet.
827
- * </para>
828
- * </glossdef>
829
- * </glossentry>
830
- * <glossentry>
831
- * <glossterm>%COGL_SNIPPET_HOOK_LAYER_FRAGMENT</glossterm>
832
- * <glossdef>
833
- * <para>
834
- * Adds a shader snippet that will hook on to the fragment processing
835
- * of a particular layer. This can be used to replace the processing
836
- * for a layer or to modify the results.
837
- * </para>
838
- * <para>
839
- * Within the snippet code for this hook there is an extra vec4
840
- * variable called ‘cogl_layer’. This contains the resulting color
841
- * that will be used for the layer. This can be modified in the ‘post’
842
- * section or it the default processing can be replaced entirely using
843
- * the ‘replace’ section.
844
- * </para>
845
- * <para>
846
- * The ‘declarations’ string in `snippet` will be inserted in the
847
- * global scope of the shader. Use this to declare any uniforms,
848
- * attributes or functions that the snippet requires.
849
- * </para>
850
- * <para>
851
- * The ‘pre’ string in `snippet` will be inserted just before the
852
- * fragment processing for this layer.
853
- * </para>
854
- * <para>
855
- * If a ‘replace’ string is given then this will be used instead of
856
- * the default fragment processing for this layer. The snippet must write to
857
- * the ‘cogl_layer’ variable in that case.
858
- * </para>
859
- * <para>
860
- * The ‘post’ string in `snippet` will be inserted just after the
861
- * fragment processing for the layer. The results can be modified by changing
862
- * the value of the ‘cogl_layer’ variable.
863
- * </para>
864
- * </glossdef>
865
- * </glossentry>
866
- * <glossentry>
867
- * <glossterm>%COGL_SNIPPET_HOOK_TEXTURE_LOOKUP</glossterm>
868
- * <glossdef>
869
- * <para>
870
- * Adds a shader snippet that will hook on to the texture lookup part
871
- * of a given layer. This gives a chance for the application to modify
872
- * the coordinates that will be used for the texture lookup or to
873
- * alter the returned texel.
874
- * </para>
875
- * <para>
876
- * Within the snippet code for this hook there are three extra
877
- * variables available. ‘cogl_sampler’ is a sampler object
878
- * representing the sampler for the layer where the snippet is
879
- * attached. ‘cogl_tex_coord’ is a vec4 which contains the texture
880
- * coordinates that will be used for the texture lookup. This can be
881
- * modified. ‘cogl_texel’ will contain the result of the texture
882
- * lookup. This can also be modified.
883
- * </para>
884
- * <para>
885
- * The ‘declarations’ string in `snippet` will be inserted in the
886
- * global scope of the shader. Use this to declare any uniforms,
887
- * attributes or functions that the snippet requires.
888
- * </para>
889
- * <para>
890
- * The ‘pre’ string in `snippet` will be inserted at the top of the
891
- * main() function before any fragment processing is done. This is a
892
- * good place to modify the cogl_tex_coord variable.
893
- * </para>
894
- * <para>
895
- * If a ‘replace’ string is given then this will be used instead of a
896
- * the default texture lookup. The snippet would typically use its own
897
- * sampler in this case.
898
- * </para>
899
- * <para>
900
- * The ‘post’ string in `snippet` will be inserted after texture lookup
901
- * has been performed. Here the snippet can modify the cogl_texel
902
- * variable to alter the returned texel.
903
- * </para>
904
- * </glossdef>
905
- * </glossentry>
906
- * </glosslist>
342
+ NONE,
343
+ /**
344
+ * Front faces will be culled.
345
+ */
346
+ FRONT,
347
+ /**
348
+ * Back faces will be culled.
349
+ */
350
+ BACK,
351
+ /**
352
+ * All faces will be culled.
353
+ */
354
+ BOTH,
355
+ }
356
+
357
+ /**
358
+ * Texture filtering is used whenever the current pixel maps either to more
359
+ * than one texture element (texel) or less than one. These filter enums
360
+ * correspond to different strategies used to come up with a pixel color, by
361
+ * possibly referring to multiple neighbouring texels and taking a weighted
362
+ * average or simply using the nearest texel.
363
+ */
364
+ enum PipelineFilter {
365
+ /**
366
+ * Measuring in manhatten distance from the,
367
+ * current pixel center, use the nearest texture texel
368
+ */
369
+ NEAREST,
370
+ /**
371
+ * Use the weighted average of the 4 texels
372
+ * nearest the current pixel center
373
+ */
374
+ LINEAR,
375
+ /**
376
+ * Select the mimap level whose
377
+ * texel size most closely matches the current pixel, and use the
378
+ * %COGL_PIPELINE_FILTER_NEAREST criterion
379
+ */
380
+ NEAREST_MIPMAP_NEAREST,
381
+ /**
382
+ * Select the mimap level whose
383
+ * texel size most closely matches the current pixel, and use the
384
+ * %COGL_PIPELINE_FILTER_LINEAR criterion
385
+ */
386
+ LINEAR_MIPMAP_NEAREST,
387
+ /**
388
+ * Select the two mimap levels
389
+ * whose texel size most closely matches the current pixel, use
390
+ * the %COGL_PIPELINE_FILTER_NEAREST criterion on each one and take
391
+ * their weighted average
392
+ */
393
+ NEAREST_MIPMAP_LINEAR,
394
+ /**
395
+ * Select the two mimap levels
396
+ * whose texel size most closely matches the current pixel, use
397
+ * the %COGL_PIPELINE_FILTER_LINEAR criterion on each one and take
398
+ * their weighted average
399
+ */
400
+ LINEAR_MIPMAP_LINEAR,
401
+ }
402
+
403
+ /**
404
+ * The wrap mode specifies what happens when texture coordinates
405
+ * outside the range 0→1 are used. Note that if the filter mode is
406
+ * anything but %COGL_PIPELINE_FILTER_NEAREST then texels outside the
407
+ * range 0→1 might be used even when the coordinate is exactly 0 or 1
408
+ * because OpenGL will try to sample neighbouring pixels. For example
409
+ * if you are trying to render the full texture then you may get
410
+ * artifacts around the edges when the pixels from the other side are
411
+ * merged in if the wrap mode is set to repeat.
412
+ */
413
+ enum PipelineWrapMode {
414
+ /**
415
+ * The texture will be repeated. This
416
+ * is useful for example to draw a tiled background.
417
+ */
418
+ REPEAT,
419
+ MIRRORED_REPEAT,
420
+ /**
421
+ * The coordinates outside the
422
+ * range 0→1 will sample copies of the edge pixels of the
423
+ * texture. This is useful to avoid artifacts if only one copy of
424
+ * the texture is being rendered.
425
+ */
426
+ CLAMP_TO_EDGE,
427
+ /**
428
+ * Cogl will try to automatically
429
+ * decide which of the above two to use. For cogl_rectangle(), it
430
+ * will use repeat mode if any of the texture coordinates are
431
+ * outside the range 0→1, otherwise it will use clamp to edge. For
432
+ * cogl_polygon() it will always use repeat mode. For
433
+ * cogl_vertex_buffer_draw() it will use repeat mode except for
434
+ * layers that have point sprite coordinate generation enabled. This
435
+ * is the default value.
436
+ */
437
+ AUTOMATIC,
438
+ }
439
+
440
+ enum RendererError {
441
+ XLIB_DISPLAY_OPEN,
442
+ BAD_CONSTRAINT,
443
+ }
444
+
445
+ class ScanoutError extends GLib.Error {
446
+ static $gtype: GObject.GType<GLib.Error>;
447
+
448
+ // Static fields
449
+
450
+ static SCANOUT_ERROR_INHIBITED: number;
451
+
452
+ // Constructors
453
+
454
+ constructor(options: { message: string; code: number });
455
+ }
456
+
457
+ /**
458
+ * Types of shaders
907
459
  */
460
+ enum ShaderType {
461
+ /**
462
+ * A program for processing vertices
463
+ */
464
+ VERTEX,
465
+ /**
466
+ * A program for processing fragments
467
+ */
468
+ FRAGMENT,
469
+ }
908
470
 
909
471
  /**
910
472
  * #CoglSnippetHook is used to specify a location within a
@@ -1185,10 +747,6 @@ export namespace Cogl {
1185
747
  * </glossentry>
1186
748
  * </glosslist>
1187
749
  */
1188
- export namespace SnippetHook {
1189
- export const $gtype: GObject.GType<SnippetHook>;
1190
- }
1191
-
1192
750
  enum SnippetHook {
1193
751
  /**
1194
752
  * A hook for the entire vertex processing
@@ -1239,19 +797,11 @@ export namespace Cogl {
1239
797
  */
1240
798
  TEXTURE_LOOKUP,
1241
799
  }
1242
- /**
1243
- * Represents how draw should affect the two buffers
1244
- * of a stereo framebuffer. See cogl_framebuffer_set_stereo_mode().
1245
- */
1246
800
 
1247
801
  /**
1248
802
  * Represents how draw should affect the two buffers
1249
803
  * of a stereo framebuffer. See cogl_framebuffer_set_stereo_mode().
1250
804
  */
1251
- export namespace StereoMode {
1252
- export const $gtype: GObject.GType<StereoMode>;
1253
- }
1254
-
1255
805
  enum StereoMode {
1256
806
  /**
1257
807
  * draw to both stereo buffers
@@ -1266,25 +816,6 @@ export namespace Cogl {
1266
816
  */
1267
817
  RIGHT,
1268
818
  }
1269
- /**
1270
- * Error enumeration for Cogl
1271
- *
1272
- * The `COGL_SYSTEM_ERROR_UNSUPPORTED` error can be thrown for a
1273
- * variety of reasons. For example:
1274
- *
1275
- * <itemizedlist>
1276
- * <listitem><para>You've tried to use a feature that is not
1277
- * advertised by cogl_has_feature().</para></listitem>
1278
- * <listitem><para>The GPU can not handle the configuration you have
1279
- * requested. An example might be if you try to use too many texture
1280
- * layers in a single #CoglPipeline</para></listitem>
1281
- * <listitem><para>The driver does not support some
1282
- * configuration.</para></listiem>
1283
- * </itemizedlist>
1284
- *
1285
- * Currently this is only used by Cogl API marked as experimental so
1286
- * this enum should also be considered experimental.
1287
- */
1288
819
 
1289
820
  /**
1290
821
  * Error enumeration for Cogl
@@ -1305,10 +836,6 @@ export namespace Cogl {
1305
836
  * Currently this is only used by Cogl API marked as experimental so
1306
837
  * this enum should also be considered experimental.
1307
838
  */
1308
- export namespace SystemError {
1309
- export const $gtype: GObject.GType<SystemError>;
1310
- }
1311
-
1312
839
  enum SystemError {
1313
840
  /**
1314
841
  * You tried to use a feature or
@@ -1321,17 +848,10 @@ export namespace Cogl {
1321
848
  */
1322
849
  NO_MEMORY,
1323
850
  }
1324
- /**
1325
- * See cogl_texture_set_components().
1326
- */
1327
851
 
1328
852
  /**
1329
853
  * See cogl_texture_set_components().
1330
854
  */
1331
- export namespace TextureComponents {
1332
- export const $gtype: GObject.GType<TextureComponents>;
1333
- }
1334
-
1335
855
  enum TextureComponents {
1336
856
  /**
1337
857
  * Only the alpha component
@@ -1356,17 +876,10 @@ export namespace Cogl {
1356
876
  */
1357
877
  DEPTH,
1358
878
  }
1359
- /**
1360
- * Error codes that can be thrown when allocating textures.
1361
- */
1362
879
 
1363
880
  /**
1364
881
  * Error codes that can be thrown when allocating textures.
1365
882
  */
1366
- export namespace TextureError {
1367
- export const $gtype: GObject.GType<TextureError>;
1368
- }
1369
-
1370
883
  enum TextureError {
1371
884
  /**
1372
885
  * Unsupported size
@@ -1383,17 +896,10 @@ export namespace Cogl {
1383
896
  */
1384
897
  TYPE,
1385
898
  }
1386
- /**
1387
- * Different ways of interpreting vertices when drawing.
1388
- */
1389
899
 
1390
900
  /**
1391
901
  * Different ways of interpreting vertices when drawing.
1392
902
  */
1393
- export namespace VerticesMode {
1394
- export const $gtype: GObject.GType<VerticesMode>;
1395
- }
1396
-
1397
903
  enum VerticesMode {
1398
904
  /**
1399
905
  * FIXME, equivalent to
@@ -1429,21 +935,12 @@ export namespace Cogl {
1429
935
  */
1430
936
  TRIANGLE_FAN,
1431
937
  }
1432
- /**
1433
- * Enum used to represent the two directions of rotation. This can be
1434
- * used to set the front face for culling by calling
1435
- * cogl_pipeline_set_front_face_winding().
1436
- */
1437
938
 
1438
939
  /**
1439
940
  * Enum used to represent the two directions of rotation. This can be
1440
941
  * used to set the front face for culling by calling
1441
942
  * cogl_pipeline_set_front_face_winding().
1442
943
  */
1443
- export namespace Winding {
1444
- export const $gtype: GObject.GType<Winding>;
1445
- }
1446
-
1447
944
  enum Winding {
1448
945
  /**
1449
946
  * Vertices are in a clockwise order
@@ -1455,10 +952,6 @@ export namespace Cogl {
1455
952
  COUNTER_CLOCKWISE,
1456
953
  }
1457
954
 
1458
- export namespace WinsysFeature {
1459
- export const $gtype: GObject.GType<WinsysFeature>;
1460
- }
1461
-
1462
955
  enum WinsysFeature {
1463
956
  VBLANK_COUNTER,
1464
957
  VBLANK_WAIT,
@@ -1471,6 +964,7 @@ export namespace Cogl {
1471
964
  SYNC_AND_COMPLETE_EVENT,
1472
965
  N_FEATURES,
1473
966
  }
967
+
1474
968
  const AFIRST_BIT: number;
1475
969
  const A_BIT: number;
1476
970
  const BGR_BIT: number;
@@ -1867,14 +1361,6 @@ export namespace Cogl {
1867
1361
  /**
1868
1362
  * Types of auxiliary buffers
1869
1363
  */
1870
-
1871
- /**
1872
- * Types of auxiliary buffers
1873
- */
1874
- export namespace BufferBit {
1875
- export const $gtype: GObject.GType<BufferBit>;
1876
- }
1877
-
1878
1364
  enum BufferBit {
1879
1365
  /**
1880
1366
  * Selects the primary color buffer
@@ -1889,17 +1375,10 @@ export namespace Cogl {
1889
1375
  */
1890
1376
  STENCIL,
1891
1377
  }
1892
- /**
1893
- * Target flags for FBOs.
1894
- */
1895
1378
 
1896
1379
  /**
1897
1380
  * Target flags for FBOs.
1898
1381
  */
1899
- export namespace BufferTarget {
1900
- export const $gtype: GObject.GType<BufferTarget>;
1901
- }
1902
-
1903
1382
  enum BufferTarget {
1904
1383
  /**
1905
1384
  * FIXME
@@ -1911,34 +1390,10 @@ export namespace Cogl {
1911
1390
  OFFSCREEN_BUFFER,
1912
1391
  }
1913
1392
 
1914
- export namespace EglImageFlags {
1915
- export const $gtype: GObject.GType<EglImageFlags>;
1916
- }
1917
-
1918
1393
  enum EglImageFlags {
1919
1394
  NONE,
1920
1395
  NO_GET_DATA,
1921
1396
  }
1922
- /**
1923
- * Pixel formats used by Cogl. For the formats with a byte per
1924
- * component, the order of the components specify the order in
1925
- * increasing memory addresses. So for example
1926
- * %COGL_PIXEL_FORMAT_RGB_888 would have the red component in the
1927
- * lowest address, green in the next address and blue after that
1928
- * regardless of the endianness of the system.
1929
- *
1930
- * For the formats with non byte aligned components the component
1931
- * order specifies the order within a 16-bit or 32-bit number from
1932
- * most significant bit to least significant. So for
1933
- * %COGL_PIXEL_FORMAT_RGB_565, the red component would be in bits
1934
- * 11-15, the green component would be in 6-11 and the blue component
1935
- * would be in 1-5. Therefore the order in memory depends on the
1936
- * endianness of the system.
1937
- *
1938
- * When uploading a texture %COGL_PIXEL_FORMAT_ANY can be used as the
1939
- * internal format. Cogl will try to pick the best format to use
1940
- * internally and convert the texture data if necessary.
1941
- */
1942
1397
 
1943
1398
  /**
1944
1399
  * Pixel formats used by Cogl. For the formats with a byte per
@@ -1960,10 +1415,6 @@ export namespace Cogl {
1960
1415
  * internal format. Cogl will try to pick the best format to use
1961
1416
  * internally and convert the texture data if necessary.
1962
1417
  */
1963
- export namespace PixelFormat {
1964
- export const $gtype: GObject.GType<PixelFormat>;
1965
- }
1966
-
1967
1418
  enum PixelFormat {
1968
1419
  /**
1969
1420
  * Any format
@@ -2157,23 +1608,17 @@ export namespace Cogl {
2157
1608
  DEPTH_32,
2158
1609
  DEPTH_24_STENCIL_8,
2159
1610
  }
2160
- /**
2161
- * Flags for cogl_framebuffer_read_pixels_into_bitmap()
2162
- */
2163
1611
 
2164
1612
  /**
2165
1613
  * Flags for cogl_framebuffer_read_pixels_into_bitmap()
2166
1614
  */
2167
- export namespace ReadPixelsFlags {
2168
- export const $gtype: GObject.GType<ReadPixelsFlags>;
2169
- }
2170
-
2171
1615
  enum ReadPixelsFlags {
2172
1616
  /**
2173
1617
  * Read from the color buffer
2174
1618
  */
2175
1619
  READ_PIXELS_COLOR_BUFFER,
2176
1620
  }
1621
+
2177
1622
  namespace Bitmap {
2178
1623
  // Signal signatures
2179
1624
  interface SignalSignatures extends Object.SignalSignatures {}
@@ -4922,7 +4367,6 @@ export namespace Cogl {
4922
4367
  // Constructors
4923
4368
 
4924
4369
  constructor(properties?: Partial<{}>);
4925
- _init(...args: any[]): void;
4926
4370
 
4927
4371
  static ['new'](): Color;
4928
4372
 
@@ -5151,7 +4595,6 @@ export namespace Cogl {
5151
4595
  instance_count: number;
5152
4596
  }>,
5153
4597
  );
5154
- _init(...args: any[]): void;
5155
4598
  }
5156
4599
 
5157
4600
  /**
@@ -5162,19 +4605,11 @@ export namespace Cogl {
5162
4605
  */
5163
4606
  abstract class FrameClosure {
5164
4607
  static $gtype: GObject.GType<FrameClosure>;
5165
-
5166
- // Constructors
5167
-
5168
- _init(...args: any[]): void;
5169
4608
  }
5170
4609
 
5171
4610
  type FramebufferClass = typeof Framebuffer;
5172
4611
  abstract class FramebufferDriverConfig {
5173
4612
  static $gtype: GObject.GType<FramebufferDriverConfig>;
5174
-
5175
- // Constructors
5176
-
5177
- _init(...args: any[]): void;
5178
4613
  }
5179
4614
 
5180
4615
  type OffscreenClass = typeof Offscreen;
@@ -5187,10 +4622,6 @@ export namespace Cogl {
5187
4622
  */
5188
4623
  class OnscreenDirtyClosure {
5189
4624
  static $gtype: GObject.GType<OnscreenDirtyClosure>;
5190
-
5191
- // Constructors
5192
-
5193
- _init(...args: any[]): void;
5194
4625
  }
5195
4626
 
5196
4627
  /**
@@ -5218,16 +4649,11 @@ export namespace Cogl {
5218
4649
  height: number;
5219
4650
  }>,
5220
4651
  );
5221
- _init(...args: any[]): void;
5222
4652
  }
5223
4653
 
5224
4654
  abstract class Scanout {
5225
4655
  static $gtype: GObject.GType<Scanout>;
5226
4656
 
5227
- // Constructors
5228
-
5229
- _init(...args: any[]): void;
5230
-
5231
4657
  // Static methods
5232
4658
 
5233
4659
  static error_quark(): GLib.Quark;
@@ -5246,26 +4672,14 @@ export namespace Cogl {
5246
4672
  z: number;
5247
4673
  tx: number;
5248
4674
  ty: number;
5249
-
5250
- // Constructors
5251
-
5252
- _init(...args: any[]): void;
5253
4675
  }
5254
4676
 
5255
4677
  abstract class TimestampQuery {
5256
4678
  static $gtype: GObject.GType<TimestampQuery>;
5257
-
5258
- // Constructors
5259
-
5260
- _init(...args: any[]): void;
5261
4679
  }
5262
4680
 
5263
4681
  abstract class TraceContext {
5264
4682
  static $gtype: GObject.GType<TraceContext>;
5265
-
5266
- // Constructors
5267
-
5268
- _init(...args: any[]): void;
5269
4683
  }
5270
4684
 
5271
4685
  class TraceHead {
@@ -5286,7 +4700,6 @@ export namespace Cogl {
5286
4700
  description: string;
5287
4701
  }>,
5288
4702
  );
5289
- _init(...args: any[]): void;
5290
4703
  }
5291
4704
 
5292
4705
  /**
@@ -5333,7 +4746,6 @@ export namespace Cogl {
5333
4746
  unused: number;
5334
4747
  }>,
5335
4748
  );
5336
- _init(...args: any[]): void;
5337
4749
  }
5338
4750
 
5339
4751
  class _ColorSizeCheck {
@@ -5350,7 +4762,6 @@ export namespace Cogl {
5350
4762
  compile_time_assert_CoglColor_size: number[];
5351
4763
  }>,
5352
4764
  );
5353
- _init(...args: any[]): void;
5354
4765
  }
5355
4766
 
5356
4767
  class _TextureVertexSizeCheck {
@@ -5367,7 +4778,6 @@ export namespace Cogl {
5367
4778
  compile_time_assert_CoglTextureVertex_size: number[];
5368
4779
  }>,
5369
4780
  );
5370
- _init(...args: any[]): void;
5371
4781
  }
5372
4782
 
5373
4783
  export interface TextureNamespace {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/cogl-13",
3
- "version": "13.0.0-4.0.0-beta.38",
3
+ "version": "13.0.0-4.0.0-beta.40",
4
4
  "description": "GJS TypeScript type definitions for Cogl-13, generated from library version 13.0.0",
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.0.0-beta.38",
35
- "@girs/cairo-1.0": "1.0.0-4.0.0-beta.38",
36
- "@girs/gobject-2.0": "2.86.0-4.0.0-beta.38",
37
- "@girs/glib-2.0": "2.86.0-4.0.0-beta.38",
38
- "@girs/graphene-1.0": "1.0.0-4.0.0-beta.38",
39
- "@girs/gl-1.0": "1.0.0-4.0.0-beta.38" },
34
+ "@girs/gjs": "4.0.0-beta.40",
35
+ "@girs/cairo-1.0": "1.0.0-4.0.0-beta.40",
36
+ "@girs/gobject-2.0": "2.86.4-4.0.0-beta.40",
37
+ "@girs/glib-2.0": "2.86.4-4.0.0-beta.40",
38
+ "@girs/graphene-1.0": "1.0.0-4.0.0-beta.40",
39
+ "@girs/gl-1.0": "1.0.0-4.0.0-beta.40" },
40
40
  "devDependencies": {
41
41
  "typescript": "*"
42
42
  },