@girs/cogl-14 4.2.0 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,25 +5,25 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/cogl-14)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Cogl-14 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.2.0.
8
+ GJS TypeScript type definitions for Cogl-14 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.4.0.
9
9
 
10
10
  ## Install
11
11
 
12
- To use this type definitions, install them with NPM:
12
+ Install the type definitions with npm:
13
13
  ```bash
14
14
  npm install @girs/cogl-14
15
15
  ```
16
16
 
17
17
  ## Usage
18
18
 
19
- You can import this package into your project like this:
19
+ Import it like any other module:
20
20
  ```ts
21
21
  import Cogl from '@girs/cogl-14';
22
22
  ```
23
23
 
24
24
  ### Ambient Modules
25
25
 
26
- You can also use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) to import this module like you would do this in JavaScript.
26
+ [Ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) let you write the same import you would in plain JavaScript.
27
27
  For this you need to include `@girs/cogl-14` or `@girs/cogl-14/ambient` in your `tsconfig` or entry point Typescript file:
28
28
 
29
29
  `index.ts`:
@@ -42,7 +42,7 @@ import '@girs/cogl-14'
42
42
  }
43
43
  ```
44
44
 
45
- Now you can import the ambient module with TypeScript support:
45
+ The ambient module now resolves with types:
46
46
 
47
47
  ```ts
48
48
  import Cogl from 'gi://Cogl?version=14';
@@ -50,7 +50,7 @@ import Cogl from 'gi://Cogl?version=14';
50
50
 
51
51
  ### Global import
52
52
 
53
- You can also import the module with Typescript support using the global `imports.gi` object of GJS.
53
+ GJS's global `imports.gi` works too, with types.
54
54
  For this you need to include `@girs/cogl-14` or `@girs/cogl-14/import` in your `tsconfig` or entry point Typescript file:
55
55
 
56
56
  `index.ts`:
@@ -69,7 +69,7 @@ import '@girs/cogl-14'
69
69
  }
70
70
  ```
71
71
 
72
- Now you have also type support for this, too:
72
+ That form carries types as well:
73
73
 
74
74
  ```ts
75
75
  const Cogl = imports.gi.Cogl;
@@ -77,7 +77,7 @@ const Cogl = imports.gi.Cogl;
77
77
 
78
78
  ### Bundle
79
79
 
80
- Depending on your project configuration, it is recommended to use a bundler like [esbuild](https://esbuild.github.io/). You can find examples using different bundlers [here](https://github.com/gjsify/ts-for-gir/tree/main/examples).
80
+ Most projects want a bundler. [esbuild](https://esbuild.github.io/) is the smallest thing that works; the [examples directory](https://github.com/gjsify/ts-for-gir/tree/main/examples) has setups for several others.
81
81
 
82
82
  ## Other packages
83
83
 
package/cogl-14.d.ts CHANGED
@@ -5854,6 +5854,7 @@ export namespace Cogl {
5854
5854
  * `main()` function. It is allowed to use a program with only a vertex
5855
5855
  * shader or only a fragment shader.
5856
5856
  * @param shader a {@link Cogl.Shader} for a vertex of fragment shader.
5857
+ * @deprecated since 1.16: Use {@link Cogl.Snippet} api
5857
5858
  */
5858
5859
  attach_shader(shader: Shader): void;
5859
5860
 
@@ -5863,6 +5864,7 @@ export namespace Cogl {
5863
5864
  * shader object and is possible to modify as an external parameter.
5864
5865
  * @param uniform_name the name of a uniform.
5865
5866
  * @returns the offset of a uniform in a specified program.
5867
+ * @deprecated since 1.16: Use {@link Cogl.Snippet} api instead
5866
5868
  */
5867
5869
  get_uniform_location(uniform_name: string): number;
5868
5870
 
@@ -5870,6 +5872,7 @@ export namespace Cogl {
5870
5872
  * Links a program making it ready for use. Note that calling this
5871
5873
  * function is optional. If it is not called the program will
5872
5874
  * automatically be linked the first time it is used.
5875
+ * @deprecated since 1.16: Use {@link Cogl.Snippet} api
5873
5876
  */
5874
5877
  link(): void;
5875
5878
 
@@ -5878,6 +5881,7 @@ export namespace Cogl {
5878
5881
  * `program`.
5879
5882
  * @param uniform_location the uniform location retrieved from {@link Program.get_uniform_location}.
5880
5883
  * @param value the new value of the uniform.
5884
+ * @deprecated since 1.16: Use {@link Cogl.Snippet} api instead
5881
5885
  */
5882
5886
  set_uniform_1f(uniform_location: number, value: number): void;
5883
5887
 
@@ -5886,6 +5890,7 @@ export namespace Cogl {
5886
5890
  * `program`.
5887
5891
  * @param uniform_location the uniform location retrieved from {@link Program.get_uniform_location}.
5888
5892
  * @param value the new value of the uniform.
5893
+ * @deprecated since 1.16: Use {@link Cogl.Snippet} api instead
5889
5894
  */
5890
5895
  set_uniform_1i(uniform_location: number, value: number): void;
5891
5896
 
@@ -5895,6 +5900,7 @@ export namespace Cogl {
5895
5900
  * @param uniform_location the uniform location retrieved from {@link Program.get_uniform_location}.
5896
5901
  * @param n_components The number of components for the uniform. For example with glsl you'd use 3 for a vec3 or 4 for a vec4.
5897
5902
  * @param value the new value of the uniform[s].
5903
+ * @deprecated since 1.16: Use {@link Cogl.Snippet} api instead
5898
5904
  */
5899
5905
  set_uniform_float(uniform_location: number, n_components: number, value: number[]): void;
5900
5906
 
@@ -5904,6 +5910,7 @@ export namespace Cogl {
5904
5910
  * @param uniform_location the uniform location retrieved from {@link Program.get_uniform_location}.
5905
5911
  * @param n_components The number of components for the uniform. For example with glsl you'd use 3 for a vec3 or 4 for a vec4.
5906
5912
  * @param value the new value of the uniform[s].
5913
+ * @deprecated since 1.16: Use {@link Cogl.Snippet} api instead
5907
5914
  */
5908
5915
  set_uniform_int(uniform_location: number, n_components: number, value: number[]): void;
5909
5916
 
@@ -5914,6 +5921,7 @@ export namespace Cogl {
5914
5921
  * @param dimensions The dimensions of the matrix. So for for example pass 2 for a 2x2 matrix or 3 for 3x3.
5915
5922
  * @param transpose Whether to transpose the matrix when setting the uniform.
5916
5923
  * @param value the new value of the uniform.
5924
+ * @deprecated since 1.16: Use {@link Cogl.Snippet} api instead
5917
5925
  */
5918
5926
  set_uniform_matrix(uniform_location: number, dimensions: number, transpose: boolean, value: number[]): void;
5919
5927
  }
@@ -6299,6 +6307,7 @@ export namespace Cogl {
6299
6307
  /**
6300
6308
  * Retrieves the type of a shader
6301
6309
  * @returns {@link Cogl.ShaderType.VERTEX} if the shader is a vertex processor or {@link Cogl.ShaderType.FRAGMENT} if the shader is a fragment processor
6310
+ * @deprecated since 1.16: Use {@link Cogl.Snippet} api
6302
6311
  */
6303
6312
  get_shader_type(): ShaderType;
6304
6313
 
@@ -6306,6 +6315,7 @@ export namespace Cogl {
6306
6315
  * Replaces the current source associated with a shader with a new
6307
6316
  * one.
6308
6317
  * @param source Shader source.
6318
+ * @deprecated since 1.16: Use {@link Cogl.Snippet} api
6309
6319
  */
6310
6320
  source(source: string): void;
6311
6321
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/cogl-14",
3
- "version": "4.2.0",
3
+ "version": "4.4.0",
4
4
  "description": "GJS TypeScript type definitions for Cogl-14",
5
5
  "type": "module",
6
6
  "module": "cogl-14.js",
@@ -31,13 +31,13 @@
31
31
  "test": "tsc --project tsconfig.json"
32
32
  },
33
33
  "dependencies": {
34
- "@girs/gjs": "^4.2.0",
35
- "@girs/xlib-2.0": "^4.2.0",
36
- "@girs/mtk-14": "^4.2.0",
37
- "@girs/graphene-1.0": "^4.2.0",
38
- "@girs/gobject-2.0": "^4.2.0",
39
- "@girs/glib-2.0": "^4.2.0",
40
- "@girs/gl-1.0": "^4.2.0" },
34
+ "@girs/gjs": "^4.4.0",
35
+ "@girs/xlib-2.0": "^4.4.0",
36
+ "@girs/mtk-14": "^4.4.0",
37
+ "@girs/graphene-1.0": "^4.4.0",
38
+ "@girs/gobject-2.0": "^4.4.0",
39
+ "@girs/glib-2.0": "^4.4.0",
40
+ "@girs/gl-1.0": "^4.4.0" },
41
41
  "devDependencies": {
42
42
  "typescript": "*"
43
43
  },