@girs/cogl-16 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-16)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Cogl-16 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.2.0.
8
+ GJS TypeScript type definitions for Cogl-16 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-16
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-16';
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-16` or `@girs/cogl-16/ambient` in your `tsconfig` or entry point Typescript file:
28
28
 
29
29
  `index.ts`:
@@ -42,7 +42,7 @@ import '@girs/cogl-16'
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=16';
@@ -50,7 +50,7 @@ import Cogl from 'gi://Cogl?version=16';
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-16` or `@girs/cogl-16/import` in your `tsconfig` or entry point Typescript file:
55
55
 
56
56
  `index.ts`:
@@ -69,7 +69,7 @@ import '@girs/cogl-16'
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-16.d.ts CHANGED
@@ -5074,6 +5074,7 @@ export namespace Cogl {
5074
5074
  * `main()` function. It is allowed to use a program with only a vertex
5075
5075
  * shader or only a fragment shader.
5076
5076
  * @param shader a {@link Cogl.Shader} for a vertex of fragment shader.
5077
+ * @deprecated since 1.16: Use {@link Cogl.Snippet} api
5077
5078
  */
5078
5079
  attach_shader(shader: Shader): void;
5079
5080
 
@@ -5083,6 +5084,7 @@ export namespace Cogl {
5083
5084
  * shader object and is possible to modify as an external parameter.
5084
5085
  * @param uniform_name the name of a uniform.
5085
5086
  * @returns the offset of a uniform in a specified program.
5087
+ * @deprecated since 1.16: Use {@link Cogl.Snippet} api instead
5086
5088
  */
5087
5089
  get_uniform_location(uniform_name: string): number;
5088
5090
 
@@ -5090,6 +5092,7 @@ export namespace Cogl {
5090
5092
  * Links a program making it ready for use. Note that calling this
5091
5093
  * function is optional. If it is not called the program will
5092
5094
  * automatically be linked the first time it is used.
5095
+ * @deprecated since 1.16: Use {@link Cogl.Snippet} api
5093
5096
  */
5094
5097
  link(): void;
5095
5098
 
@@ -5098,6 +5101,7 @@ export namespace Cogl {
5098
5101
  * `program`.
5099
5102
  * @param uniform_location the uniform location retrieved from {@link Program.get_uniform_location}.
5100
5103
  * @param value the new value of the uniform.
5104
+ * @deprecated since 1.16: Use {@link Cogl.Snippet} api instead
5101
5105
  */
5102
5106
  set_uniform_1f(uniform_location: number, value: number): void;
5103
5107
 
@@ -5106,6 +5110,7 @@ export namespace Cogl {
5106
5110
  * `program`.
5107
5111
  * @param uniform_location the uniform location retrieved from {@link Program.get_uniform_location}.
5108
5112
  * @param value the new value of the uniform.
5113
+ * @deprecated since 1.16: Use {@link Cogl.Snippet} api instead
5109
5114
  */
5110
5115
  set_uniform_1i(uniform_location: number, value: number): void;
5111
5116
 
@@ -5115,6 +5120,7 @@ export namespace Cogl {
5115
5120
  * @param uniform_location the uniform location retrieved from {@link Program.get_uniform_location}.
5116
5121
  * @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.
5117
5122
  * @param value the new value of the uniform[s].
5123
+ * @deprecated since 1.16: Use {@link Cogl.Snippet} api instead
5118
5124
  */
5119
5125
  set_uniform_float(uniform_location: number, n_components: number, value: number[]): void;
5120
5126
 
@@ -5124,6 +5130,7 @@ export namespace Cogl {
5124
5130
  * @param uniform_location the uniform location retrieved from {@link Program.get_uniform_location}.
5125
5131
  * @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.
5126
5132
  * @param value the new value of the uniform[s].
5133
+ * @deprecated since 1.16: Use {@link Cogl.Snippet} api instead
5127
5134
  */
5128
5135
  set_uniform_int(uniform_location: number, n_components: number, value: number[]): void;
5129
5136
 
@@ -5134,6 +5141,7 @@ export namespace Cogl {
5134
5141
  * @param dimensions The dimensions of the matrix. So for for example pass 2 for a 2x2 matrix or 3 for 3x3.
5135
5142
  * @param transpose Whether to transpose the matrix when setting the uniform.
5136
5143
  * @param value the new value of the uniform.
5144
+ * @deprecated since 1.16: Use {@link Cogl.Snippet} api instead
5137
5145
  */
5138
5146
  set_uniform_matrix(uniform_location: number, dimensions: number, transpose: boolean, value: number[]): void;
5139
5147
  }
@@ -5484,6 +5492,7 @@ export namespace Cogl {
5484
5492
  /**
5485
5493
  * Retrieves the type of a shader
5486
5494
  * @returns {@link Cogl.ShaderType.VERTEX} if the shader is a vertex processor or {@link Cogl.ShaderType.FRAGMENT} if the shader is a fragment processor
5495
+ * @deprecated since 1.16: Use {@link Cogl.Snippet} api
5487
5496
  */
5488
5497
  get_shader_type(): ShaderType;
5489
5498
 
@@ -5491,6 +5500,7 @@ export namespace Cogl {
5491
5500
  * Replaces the current source associated with a shader with a new
5492
5501
  * one.
5493
5502
  * @param source Shader source.
5503
+ * @deprecated since 1.16: Use {@link Cogl.Snippet} api
5494
5504
  */
5495
5505
  source(source: string): void;
5496
5506
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/cogl-16",
3
- "version": "4.2.0",
3
+ "version": "4.4.0",
4
4
  "description": "GJS TypeScript type definitions for Cogl-16",
5
5
  "type": "module",
6
6
  "module": "cogl-16.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-16": "^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-16": "^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
  },