update ags

This commit is contained in:
2023-11-15 16:09:26 +01:00
parent a6292fe031
commit 73e2b949a0
4025 changed files with 3168562 additions and 5715 deletions
+92
View File
@@ -0,0 +1,92 @@
# Atk-1.0
![version](https://img.shields.io/npm/v/@girs/atk-1.0)
![downloads/week](https://img.shields.io/npm/dw/@girs/atk-1.0)
GJS TypeScript type definitions for Atk-1.0, generated from library version 2.50.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
ATK provides the set of accessibility interfaces that are implemented by other toolkits and applications. Using the ATK interfaces, accessibility tools have full access to view and control running applications.
## Install
To use this type definitions, install them with NPM:
```bash
npm install @girs/atk-1.0
```
## Usage
You can import this package into your project like this:
```ts
import Atk from '@girs/atk-1.0';
```
Or if you prefer CommonJS, you can also use this:
```ts
const Atk = require('@girs/atk-1.0');
```
### Ambient Modules
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.
For this you need to include `@girs/atk-1.0` or `@girs/atk-1.0/ambient` in your `tsconfig` or entry point Typescript file:
`index.ts`:
```ts
import '@girs/atk-1.0'
```
`tsconfig.json`:
```json
{
"compilerOptions": {
...
},
"include": ["@girs/atk-1.0"],
...
}
```
Now you can import the ambient module with TypeScript support:
```ts
import Atk from 'gi://Atk?version=1.0';
```
### Global import
You can also import the module with Typescript support using the global `imports.gi` object of GJS.
For this you need to include `@girs/atk-1.0` or `@girs/atk-1.0/import` in your `tsconfig` or entry point Typescript file:
`index.ts`:
```ts
import '@girs/atk-1.0'
```
`tsconfig.json`:
```json
{
"compilerOptions": {
...
},
"include": ["@girs/atk-1.0"],
...
}
```
Now you have also type support for this, too:
```ts
const Atk = imports.gi.Atk;
```
### Bundle
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).
## Other packages
All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
+13
View File
@@ -0,0 +1,13 @@
declare module 'gi://Atk?version=1.0' {
import Atk10 from '@girs/atk-1.0';
export default Atk10;
}
declare module 'gi://Atk' {
import Atk10 from '@girs/atk-1.0';
export default Atk10;
}
+13
View File
@@ -0,0 +1,13 @@
import Atk10 from '@girs/atk-1.0';
declare global {
export interface GjsGiImports {
Atk: typeof Atk10;
}
}
export default GjsGiImports;
+11
View File
@@ -0,0 +1,11 @@
imports.gi.versions.Atk = '1.0'
const Atk = imports.gi.Atk;
module.exports = Atk;
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+10
View File
@@ -0,0 +1,10 @@
// @ts-expect-error
import Atk from 'gi://Atk?version=1.0';
export { Atk };
export default Atk;
@@ -0,0 +1,92 @@
# GObject-2.0
![version](https://img.shields.io/npm/v/@girs/gobject-2.0)
![downloads/week](https://img.shields.io/npm/dw/@girs/gobject-2.0)
GJS TypeScript type definitions for GObject-2.0, generated from library version 2.78.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
GObject provides the object system used for Pango and GTK+.
## Install
To use this type definitions, install them with NPM:
```bash
npm install @girs/gobject-2.0
```
## Usage
You can import this package into your project like this:
```ts
import GObject from '@girs/gobject-2.0';
```
Or if you prefer CommonJS, you can also use this:
```ts
const GObject = require('@girs/gobject-2.0');
```
### Ambient Modules
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.
For this you need to include `@girs/gobject-2.0` or `@girs/gobject-2.0/ambient` in your `tsconfig` or entry point Typescript file:
`index.ts`:
```ts
import '@girs/gobject-2.0'
```
`tsconfig.json`:
```json
{
"compilerOptions": {
...
},
"include": ["@girs/gobject-2.0"],
...
}
```
Now you can import the ambient module with TypeScript support:
```ts
import GObject from 'gi://GObject?version=2.0';
```
### Global import
You can also import the module with Typescript support using the global `imports.gi` object of GJS.
For this you need to include `@girs/gobject-2.0` or `@girs/gobject-2.0/import` in your `tsconfig` or entry point Typescript file:
`index.ts`:
```ts
import '@girs/gobject-2.0'
```
`tsconfig.json`:
```json
{
"compilerOptions": {
...
},
"include": ["@girs/gobject-2.0"],
...
}
```
Now you have also type support for this, too:
```ts
const GObject = imports.gi.GObject;
```
### Bundle
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).
## Other packages
All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
@@ -0,0 +1,13 @@
declare module 'gi://GObject?version=2.0' {
import GObject20 from '@girs/gobject-2.0';
export default GObject20;
}
declare module 'gi://GObject' {
import GObject20 from '@girs/gobject-2.0';
export default GObject20;
}
@@ -0,0 +1,13 @@
import GObject20 from '@girs/gobject-2.0';
declare global {
export interface GjsGiImports {
GObject: typeof GObject20;
}
}
export default GjsGiImports;
@@ -0,0 +1,11 @@
imports.gi.versions.GObject = '2.0'
const GObject = imports.gi.GObject;
module.exports = GObject;
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
// @ts-expect-error
import GObject from 'gi://GObject?version=2.0';
export { GObject };
export default GObject;
@@ -0,0 +1,52 @@
{
"name": "@girs/gobject-2.0",
"version": "2.78.0-3.2.4",
"description": "GJS TypeScript type definitions for GObject-2.0, generated from library version 2.78.0",
"type": "module",
"module": "gobject-2.0.js",
"main": "gobject-2.0.js",
"exports": {
"./ambient": "./gobject-2.0-ambient.d.ts",
"./import": "./gobject-2.0-import.d.ts",
".": {
"import": {
"types": "./gobject-2.0.d.ts",
"default": "./gobject-2.0.js"
},
"require": {
"types": "./gobject-2.0.d.cts",
"default": "./gobject-2.0.cjs"
}
}
},
"scripts": {
"test": "yarn test:esm && yarn test:cjs",
"test:esm": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit gobject-2.0.d.ts",
"test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit gobject-2.0.d.cts"
},
"dependencies": {
"@girs/gjs": "^3.2.4",
"@girs/glib-2.0": "^2.78.0-3.2.4"
},
"devDependencies": {
"typescript": "*"
},
"keywords": [
"Gir",
"TypeScript",
"types",
"GObject-Introspection",
"GJS",
"GObject-2.0"
],
"author": "ts-for-gir",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/gjsify/types.git"
},
"bugs": {
"url": "https://github.com/gjsify/ts-for-gir/issues"
},
"homepage": "https://github.com/gjsify/types/tree/main/gobject-2.0#readme"
}
@@ -0,0 +1,23 @@
{
"compilerOptions": {
// General settings for code interpretation
"target": "ESNext",
"module": "ESNext",
"lib": ["ESNext"],
"types": [],
"experimentalDecorators": true,
"moduleResolution": "node",
"noEmit": true,
"noEmitOnError": false,
"baseUrl": "./",
"rootDir": ".",
// General settings for code generation
"removeComments": false,
"inlineSourceMap": false,
"inlineSources": false,
"newLine": "LF"
},
"include": ["./gobject-2.0.d.ts"]
}
@@ -0,0 +1,7 @@
{
"entryPoints": ["./gobject-2.0.d.ts"],
"readme": "./README.md",
"name": "GObject-2.0",
"tsconfig": "./tsconfig.json"
}
+53
View File
@@ -0,0 +1,53 @@
{
"name": "@girs/atk-1.0",
"version": "2.50.0-3.2.4",
"description": "GJS TypeScript type definitions for Atk-1.0, generated from library version 2.50.0",
"type": "module",
"module": "atk-1.0.js",
"main": "atk-1.0.js",
"exports": {
"./ambient": "./atk-1.0-ambient.d.ts",
"./import": "./atk-1.0-import.d.ts",
".": {
"import": {
"types": "./atk-1.0.d.ts",
"default": "./atk-1.0.js"
},
"require": {
"types": "./atk-1.0.d.cts",
"default": "./atk-1.0.cjs"
}
}
},
"scripts": {
"test": "yarn test:esm && yarn test:cjs",
"test:esm": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit atk-1.0.d.ts",
"test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit atk-1.0.d.cts"
},
"dependencies": {
"@girs/gjs": "^3.2.4",
"@girs/glib-2.0": "^2.78.0-3.2.4",
"@girs/gobject-2.0": "^2.78.0-3.2.4"
},
"devDependencies": {
"typescript": "*"
},
"keywords": [
"Gir",
"TypeScript",
"types",
"GObject-Introspection",
"GJS",
"Atk-1.0"
],
"author": "ts-for-gir",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/gjsify/types.git"
},
"bugs": {
"url": "https://github.com/gjsify/ts-for-gir/issues"
},
"homepage": "https://github.com/gjsify/types/tree/main/atk-1.0#readme"
}
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
// General settings for code interpretation
"target": "ESNext",
"module": "ESNext",
"lib": ["ESNext"],
"types": [],
"experimentalDecorators": true,
"moduleResolution": "node",
"noEmit": true,
"noEmitOnError": false,
"baseUrl": "./",
"rootDir": ".",
// General settings for code generation
"removeComments": false,
"inlineSourceMap": false,
"inlineSources": false,
"newLine": "LF"
},
"include": ["./atk-1.0.d.ts"]
}
+7
View File
@@ -0,0 +1,7 @@
{
"entryPoints": ["./atk-1.0.d.ts"],
"readme": "./README.md",
"name": "Atk-1.0",
"tsconfig": "./tsconfig.json"
}
+92
View File
@@ -0,0 +1,92 @@
# cairo-1.0
![version](https://img.shields.io/npm/v/@girs/cairo-1.0)
![downloads/week](https://img.shields.io/npm/dw/@girs/cairo-1.0)
GJS TypeScript type definitions for cairo-1.0, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
Cairo is a 2D graphics library with support for multiple output devices like the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG.
## Install
To use this type definitions, install them with NPM:
```bash
npm install @girs/cairo-1.0
```
## Usage
You can import this package into your project like this:
```ts
import cairo from '@girs/cairo-1.0';
```
Or if you prefer CommonJS, you can also use this:
```ts
const cairo = require('@girs/cairo-1.0');
```
### Ambient Modules
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.
For this you need to include `@girs/cairo-1.0` or `@girs/cairo-1.0/ambient` in your `tsconfig` or entry point Typescript file:
`index.ts`:
```ts
import '@girs/cairo-1.0'
```
`tsconfig.json`:
```json
{
"compilerOptions": {
...
},
"include": ["@girs/cairo-1.0"],
...
}
```
Now you can import the ambient module with TypeScript support:
```ts
import cairo from 'gi://cairo?version=1.0';
```
### Global import
You can also import the module with Typescript support using the global `imports.gi` object of GJS.
For this you need to include `@girs/cairo-1.0` or `@girs/cairo-1.0/import` in your `tsconfig` or entry point Typescript file:
`index.ts`:
```ts
import '@girs/cairo-1.0'
```
`tsconfig.json`:
```json
{
"compilerOptions": {
...
},
"include": ["@girs/cairo-1.0"],
...
}
```
Now you have also type support for this, too:
```ts
const cairo = imports.gi.cairo;
```
### Bundle
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).
## Other packages
All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
@@ -0,0 +1,13 @@
declare module 'gi://cairo?version=1.0' {
import Cairo10 from '@girs/cairo-1.0';
export default Cairo10;
}
declare module 'gi://cairo' {
import Cairo10 from '@girs/cairo-1.0';
export default Cairo10;
}
@@ -0,0 +1,13 @@
import Cairo10 from '@girs/cairo-1.0';
declare global {
export interface GjsGiImports {
cairo: typeof Cairo10;
}
}
export default GjsGiImports;
+11
View File
@@ -0,0 +1,11 @@
imports.gi.versions.cairo = '1.0'
const cairo = imports.gi.cairo;
module.exports = cairo;
+391
View File
@@ -0,0 +1,391 @@
/*
* Type Definitions for Gjs (https://gjs.guide/)
*
* These type definitions are automatically generated, do not edit them by hand.
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
*/
import './cairo-1.0-ambient.d.ts';
import './cairo-1.0-import.d.ts';
/**
* cairo-1.0
*/
import type GObject from '@girs/gobject-2.0';
import type GLib from '@girs/glib-2.0';
export enum Status {
SUCCESS,
NO_MEMORY,
INVALID_RESTORE,
INVALID_POP_GROUP,
NO_CURRENT_POINT,
INVALID_MATRIX,
INVALID_STATUS,
NULL_POINTER,
INVALID_STRING,
INVALID_PATH_DATA,
READ_ERROR,
WRITE_ERROR,
SURFACE_FINISHED,
SURFACE_TYPE_MISMATCH,
PATTERN_TYPE_MISMATCH,
INVALID_CONTENT,
INVALID_FORMAT,
INVALID_VISUAL,
FILE_NOT_FOUND,
INVALID_DASH,
INVALID_DSC_COMMENT,
INVALID_INDEX,
CLIP_NOT_REPRESENTABLE,
TEMP_FILE_ERROR,
INVALID_STRIDE,
FONT_TYPE_MISMATCH,
USER_FONT_IMMUTABLE,
USER_FONT_ERROR,
NEGATIVE_COUNT,
INVALID_CLUSTERS,
INVALID_SLANT,
INVALID_WEIGHT,
INVALID_SIZE,
USER_FONT_NOT_IMPLEMENTED,
DEVICE_TYPE_MISMATCH,
DEVICE_ERROR,
INVALID_MESH_CONSTRUCTION,
DEVICE_FINISHED,
JBIG2_GLOBAL_MISSING,
}
export enum Content {
COLOR,
ALPHA,
COLOR_ALPHA,
}
export enum Operator {
CLEAR,
SOURCE,
OVER,
IN,
OUT,
ATOP,
DEST,
DEST_OVER,
DEST_IN,
DEST_OUT,
DEST_ATOP,
XOR,
ADD,
SATURATE,
MULTIPLY,
SCREEN,
OVERLAY,
DARKEN,
LIGHTEN,
COLOR_DODGE,
COLOR_BURN,
HARD_LIGHT,
SOFT_LIGHT,
DIFFERENCE,
EXCLUSION,
HSL_HUE,
HSL_SATURATION,
HSL_COLOR,
HSL_LUMINOSITY,
}
export enum Antialias {
DEFAULT,
NONE,
GRAY,
SUBPIXEL,
FAST,
GOOD,
BEST,
}
export enum FillRule {
WINDING,
EVEN_ODD,
}
export enum LineCap {
BUTT,
ROUND,
SQUARE,
}
export enum LineJoin {
MITER,
ROUND,
BEVEL,
}
export enum TextClusterFlags {
BACKWARD,
}
export enum FontSlant {
NORMAL,
ITALIC,
OBLIQUE,
}
export enum FontWeight {
NORMAL,
BOLD,
}
export enum SubpixelOrder {
DEFAULT,
RGB,
BGR,
VRGB,
VBGR,
}
export enum HintStyle {
DEFAULT,
NONE,
SLIGHT,
MEDIUM,
FULL,
}
export enum HintMetrics {
DEFAULT,
OFF,
ON,
}
export enum FontType {
TOY,
FT,
WIN32,
QUARTZ,
USER,
}
export enum PathDataType {
MOVE_TO,
LINE_TO,
CURVE_TO,
CLOSE_PATH,
}
export enum DeviceType {
DRM,
GL,
SCRIPT,
XCB,
XLIB,
XML,
COGL,
WIN32,
INVALID,
}
export enum SurfaceType {
IMAGE,
PDF,
PS,
XLIB,
XCB,
GLITZ,
QUARTZ,
WIN32,
BEOS,
DIRECTFB,
SVG,
OS2,
WIN32_PRINTING,
QUARTZ_IMAGE,
SCRIPT,
QT,
RECORDING,
VG,
GL,
DRM,
TEE,
XML,
SKIA,
SUBSURFACE,
COGL,
}
export enum Format {
INVALID,
ARGB32,
RGB24,
A8,
A1,
RGB16_565,
RGB30,
}
export enum PatternType {
SOLID,
SURFACE,
LINEAR,
RADIAL,
MESH,
RASTER_SOURCE,
}
export enum Extend {
NONE,
REPEAT,
REFLECT,
PAD,
}
export enum Filter {
FAST,
GOOD,
BEST,
NEAREST,
BILINEAR,
GAUSSIAN,
}
export enum RegionOverlap {
IN,
OUT,
PART,
}
export function image_surface_create(): void
// TODO
// See
// - https://gitlab.gnome.org/GNOME/gjs/-/blob/master/installed-tests/js/testCairoModule.js
// - https://gitlab.gnome.org/GNOME/gjs/-/blob/master/installed-tests/js/testCairo.js
// - https://gitlab.gnome.org/GNOME/gjs/-/blob/master/doc/cairo.md
// image_surface_create -> ImageSurface
// Context.constructor(surface: cairo.ImageSurface)
// ...
export interface Context {
}
export class Context {
// Own properties of cairo-1.0.cairo.Context
static name: string
}
export interface Device {
}
export class Device {
// Own properties of cairo-1.0.cairo.Device
static name: string
}
export interface Surface {
}
export class Surface {
// Own properties of cairo-1.0.cairo.Surface
static name: string
}
export interface Matrix {
}
export class Matrix {
// Own properties of cairo-1.0.cairo.Matrix
static name: string
}
export interface Pattern {
}
export class Pattern {
// Own properties of cairo-1.0.cairo.Pattern
static name: string
}
export interface Region {
}
export class Region {
// Own properties of cairo-1.0.cairo.Region
static name: string
}
export interface FontOptions {
}
export class FontOptions {
// Own properties of cairo-1.0.cairo.FontOptions
static name: string
}
export interface FontFace {
}
export class FontFace {
// Own properties of cairo-1.0.cairo.FontFace
static name: string
}
export interface ScaledFont {
}
export class ScaledFont {
// Own properties of cairo-1.0.cairo.ScaledFont
static name: string
}
export interface Path {
}
export class Path {
// Own properties of cairo-1.0.cairo.Path
static name: string
}
export interface Rectangle {
// Own fields of cairo-1.0.cairo.Rectangle
x: number
y: number
width: number
height: number
}
export class Rectangle {
// Own properties of cairo-1.0.cairo.Rectangle
static name: string
}
export interface RectangleInt {
// Own fields of cairo-1.0.cairo.RectangleInt
x: number
y: number
width: number
height: number
}
export class RectangleInt {
// Own properties of cairo-1.0.cairo.RectangleInt
static name: string
}
/**
* Name of the imported GIR library
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
*/
export const __name__: string
/**
* Version of the imported GIR library
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
*/
export const __version__: string
// END
+396
View File
@@ -0,0 +1,396 @@
/*
* Type Definitions for Gjs (https://gjs.guide/)
*
* These type definitions are automatically generated, do not edit them by hand.
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
*/
import './cairo-1.0-ambient.d.ts';
import './cairo-1.0-import.d.ts';
/**
* cairo-1.0
*/
import type GObject from '@girs/gobject-2.0';
import type GLib from '@girs/glib-2.0';
export namespace cairo {
enum Status {
SUCCESS,
NO_MEMORY,
INVALID_RESTORE,
INVALID_POP_GROUP,
NO_CURRENT_POINT,
INVALID_MATRIX,
INVALID_STATUS,
NULL_POINTER,
INVALID_STRING,
INVALID_PATH_DATA,
READ_ERROR,
WRITE_ERROR,
SURFACE_FINISHED,
SURFACE_TYPE_MISMATCH,
PATTERN_TYPE_MISMATCH,
INVALID_CONTENT,
INVALID_FORMAT,
INVALID_VISUAL,
FILE_NOT_FOUND,
INVALID_DASH,
INVALID_DSC_COMMENT,
INVALID_INDEX,
CLIP_NOT_REPRESENTABLE,
TEMP_FILE_ERROR,
INVALID_STRIDE,
FONT_TYPE_MISMATCH,
USER_FONT_IMMUTABLE,
USER_FONT_ERROR,
NEGATIVE_COUNT,
INVALID_CLUSTERS,
INVALID_SLANT,
INVALID_WEIGHT,
INVALID_SIZE,
USER_FONT_NOT_IMPLEMENTED,
DEVICE_TYPE_MISMATCH,
DEVICE_ERROR,
INVALID_MESH_CONSTRUCTION,
DEVICE_FINISHED,
JBIG2_GLOBAL_MISSING,
}
enum Content {
COLOR,
ALPHA,
COLOR_ALPHA,
}
enum Operator {
CLEAR,
SOURCE,
OVER,
IN,
OUT,
ATOP,
DEST,
DEST_OVER,
DEST_IN,
DEST_OUT,
DEST_ATOP,
XOR,
ADD,
SATURATE,
MULTIPLY,
SCREEN,
OVERLAY,
DARKEN,
LIGHTEN,
COLOR_DODGE,
COLOR_BURN,
HARD_LIGHT,
SOFT_LIGHT,
DIFFERENCE,
EXCLUSION,
HSL_HUE,
HSL_SATURATION,
HSL_COLOR,
HSL_LUMINOSITY,
}
enum Antialias {
DEFAULT,
NONE,
GRAY,
SUBPIXEL,
FAST,
GOOD,
BEST,
}
enum FillRule {
WINDING,
EVEN_ODD,
}
enum LineCap {
BUTT,
ROUND,
SQUARE,
}
enum LineJoin {
MITER,
ROUND,
BEVEL,
}
enum TextClusterFlags {
BACKWARD,
}
enum FontSlant {
NORMAL,
ITALIC,
OBLIQUE,
}
enum FontWeight {
NORMAL,
BOLD,
}
enum SubpixelOrder {
DEFAULT,
RGB,
BGR,
VRGB,
VBGR,
}
enum HintStyle {
DEFAULT,
NONE,
SLIGHT,
MEDIUM,
FULL,
}
enum HintMetrics {
DEFAULT,
OFF,
ON,
}
enum FontType {
TOY,
FT,
WIN32,
QUARTZ,
USER,
}
enum PathDataType {
MOVE_TO,
LINE_TO,
CURVE_TO,
CLOSE_PATH,
}
enum DeviceType {
DRM,
GL,
SCRIPT,
XCB,
XLIB,
XML,
COGL,
WIN32,
INVALID,
}
enum SurfaceType {
IMAGE,
PDF,
PS,
XLIB,
XCB,
GLITZ,
QUARTZ,
WIN32,
BEOS,
DIRECTFB,
SVG,
OS2,
WIN32_PRINTING,
QUARTZ_IMAGE,
SCRIPT,
QT,
RECORDING,
VG,
GL,
DRM,
TEE,
XML,
SKIA,
SUBSURFACE,
COGL,
}
enum Format {
INVALID,
ARGB32,
RGB24,
A8,
A1,
RGB16_565,
RGB30,
}
enum PatternType {
SOLID,
SURFACE,
LINEAR,
RADIAL,
MESH,
RASTER_SOURCE,
}
enum Extend {
NONE,
REPEAT,
REFLECT,
PAD,
}
enum Filter {
FAST,
GOOD,
BEST,
NEAREST,
BILINEAR,
GAUSSIAN,
}
enum RegionOverlap {
IN,
OUT,
PART,
}
function image_surface_create(): void
// TODO
// See
// - https://gitlab.gnome.org/GNOME/gjs/-/blob/master/installed-tests/js/testCairoModule.js
// - https://gitlab.gnome.org/GNOME/gjs/-/blob/master/installed-tests/js/testCairo.js
// - https://gitlab.gnome.org/GNOME/gjs/-/blob/master/doc/cairo.md
// image_surface_create -> ImageSurface
// Context.constructor(surface: cairo.ImageSurface)
// ...
interface Context {
}
class Context {
// Own properties of cairo-1.0.cairo.Context
static name: string
}
interface Device {
}
class Device {
// Own properties of cairo-1.0.cairo.Device
static name: string
}
interface Surface {
}
class Surface {
// Own properties of cairo-1.0.cairo.Surface
static name: string
}
interface Matrix {
}
class Matrix {
// Own properties of cairo-1.0.cairo.Matrix
static name: string
}
interface Pattern {
}
class Pattern {
// Own properties of cairo-1.0.cairo.Pattern
static name: string
}
interface Region {
}
class Region {
// Own properties of cairo-1.0.cairo.Region
static name: string
}
interface FontOptions {
}
class FontOptions {
// Own properties of cairo-1.0.cairo.FontOptions
static name: string
}
interface FontFace {
}
class FontFace {
// Own properties of cairo-1.0.cairo.FontFace
static name: string
}
interface ScaledFont {
}
class ScaledFont {
// Own properties of cairo-1.0.cairo.ScaledFont
static name: string
}
interface Path {
}
class Path {
// Own properties of cairo-1.0.cairo.Path
static name: string
}
interface Rectangle {
// Own fields of cairo-1.0.cairo.Rectangle
x: number
y: number
width: number
height: number
}
class Rectangle {
// Own properties of cairo-1.0.cairo.Rectangle
static name: string
}
interface RectangleInt {
// Own fields of cairo-1.0.cairo.RectangleInt
x: number
y: number
width: number
height: number
}
class RectangleInt {
// Own properties of cairo-1.0.cairo.RectangleInt
static name: string
}
/**
* Name of the imported GIR library
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
*/
const __name__: string
/**
* Version of the imported GIR library
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
*/
const __version__: string
}
export default cairo;
// END
+10
View File
@@ -0,0 +1,10 @@
// @ts-expect-error
import cairo from 'gi://cairo?version=1.0';
export { cairo };
export default cairo;
@@ -0,0 +1,92 @@
# GObject-2.0
![version](https://img.shields.io/npm/v/@girs/gobject-2.0)
![downloads/week](https://img.shields.io/npm/dw/@girs/gobject-2.0)
GJS TypeScript type definitions for GObject-2.0, generated from library version 2.78.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
GObject provides the object system used for Pango and GTK+.
## Install
To use this type definitions, install them with NPM:
```bash
npm install @girs/gobject-2.0
```
## Usage
You can import this package into your project like this:
```ts
import GObject from '@girs/gobject-2.0';
```
Or if you prefer CommonJS, you can also use this:
```ts
const GObject = require('@girs/gobject-2.0');
```
### Ambient Modules
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.
For this you need to include `@girs/gobject-2.0` or `@girs/gobject-2.0/ambient` in your `tsconfig` or entry point Typescript file:
`index.ts`:
```ts
import '@girs/gobject-2.0'
```
`tsconfig.json`:
```json
{
"compilerOptions": {
...
},
"include": ["@girs/gobject-2.0"],
...
}
```
Now you can import the ambient module with TypeScript support:
```ts
import GObject from 'gi://GObject?version=2.0';
```
### Global import
You can also import the module with Typescript support using the global `imports.gi` object of GJS.
For this you need to include `@girs/gobject-2.0` or `@girs/gobject-2.0/import` in your `tsconfig` or entry point Typescript file:
`index.ts`:
```ts
import '@girs/gobject-2.0'
```
`tsconfig.json`:
```json
{
"compilerOptions": {
...
},
"include": ["@girs/gobject-2.0"],
...
}
```
Now you have also type support for this, too:
```ts
const GObject = imports.gi.GObject;
```
### Bundle
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).
## Other packages
All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
@@ -0,0 +1,13 @@
declare module 'gi://GObject?version=2.0' {
import GObject20 from '@girs/gobject-2.0';
export default GObject20;
}
declare module 'gi://GObject' {
import GObject20 from '@girs/gobject-2.0';
export default GObject20;
}
@@ -0,0 +1,13 @@
import GObject20 from '@girs/gobject-2.0';
declare global {
export interface GjsGiImports {
GObject: typeof GObject20;
}
}
export default GjsGiImports;
@@ -0,0 +1,11 @@
imports.gi.versions.GObject = '2.0'
const GObject = imports.gi.GObject;
module.exports = GObject;
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
// @ts-expect-error
import GObject from 'gi://GObject?version=2.0';
export { GObject };
export default GObject;
@@ -0,0 +1,52 @@
{
"name": "@girs/gobject-2.0",
"version": "2.78.0-3.2.4",
"description": "GJS TypeScript type definitions for GObject-2.0, generated from library version 2.78.0",
"type": "module",
"module": "gobject-2.0.js",
"main": "gobject-2.0.js",
"exports": {
"./ambient": "./gobject-2.0-ambient.d.ts",
"./import": "./gobject-2.0-import.d.ts",
".": {
"import": {
"types": "./gobject-2.0.d.ts",
"default": "./gobject-2.0.js"
},
"require": {
"types": "./gobject-2.0.d.cts",
"default": "./gobject-2.0.cjs"
}
}
},
"scripts": {
"test": "yarn test:esm && yarn test:cjs",
"test:esm": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit gobject-2.0.d.ts",
"test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit gobject-2.0.d.cts"
},
"dependencies": {
"@girs/gjs": "^3.2.4",
"@girs/glib-2.0": "^2.78.0-3.2.4"
},
"devDependencies": {
"typescript": "*"
},
"keywords": [
"Gir",
"TypeScript",
"types",
"GObject-Introspection",
"GJS",
"GObject-2.0"
],
"author": "ts-for-gir",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/gjsify/types.git"
},
"bugs": {
"url": "https://github.com/gjsify/ts-for-gir/issues"
},
"homepage": "https://github.com/gjsify/types/tree/main/gobject-2.0#readme"
}
@@ -0,0 +1,23 @@
{
"compilerOptions": {
// General settings for code interpretation
"target": "ESNext",
"module": "ESNext",
"lib": ["ESNext"],
"types": [],
"experimentalDecorators": true,
"moduleResolution": "node",
"noEmit": true,
"noEmitOnError": false,
"baseUrl": "./",
"rootDir": ".",
// General settings for code generation
"removeComments": false,
"inlineSourceMap": false,
"inlineSources": false,
"newLine": "LF"
},
"include": ["./gobject-2.0.d.ts"]
}
@@ -0,0 +1,7 @@
{
"entryPoints": ["./gobject-2.0.d.ts"],
"readme": "./README.md",
"name": "GObject-2.0",
"tsconfig": "./tsconfig.json"
}
+53
View File
@@ -0,0 +1,53 @@
{
"name": "@girs/cairo-1.0",
"version": "1.0.0-3.2.4",
"description": "GJS TypeScript type definitions for cairo-1.0, generated from library version 1.0.0",
"type": "module",
"module": "cairo-1.0.js",
"main": "cairo-1.0.js",
"exports": {
"./ambient": "./cairo-1.0-ambient.d.ts",
"./import": "./cairo-1.0-import.d.ts",
".": {
"import": {
"types": "./cairo-1.0.d.ts",
"default": "./cairo-1.0.js"
},
"require": {
"types": "./cairo-1.0.d.cts",
"default": "./cairo-1.0.cjs"
}
}
},
"scripts": {
"test": "yarn test:esm && yarn test:cjs",
"test:esm": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit cairo-1.0.d.ts",
"test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit cairo-1.0.d.cts"
},
"dependencies": {
"@girs/gjs": "^3.2.4",
"@girs/glib-2.0": "^2.78.0-3.2.4",
"@girs/gobject-2.0": "^2.78.0-3.2.4"
},
"devDependencies": {
"typescript": "*"
},
"keywords": [
"Gir",
"TypeScript",
"types",
"GObject-Introspection",
"GJS",
"cairo-1.0"
],
"author": "ts-for-gir",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/gjsify/types.git"
},
"bugs": {
"url": "https://github.com/gjsify/ts-for-gir/issues"
},
"homepage": "https://github.com/gjsify/types/tree/main/cairo-1.0#readme"
}
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
// General settings for code interpretation
"target": "ESNext",
"module": "ESNext",
"lib": ["ESNext"],
"types": [],
"experimentalDecorators": true,
"moduleResolution": "node",
"noEmit": true,
"noEmitOnError": false,
"baseUrl": "./",
"rootDir": ".",
// General settings for code generation
"removeComments": false,
"inlineSourceMap": false,
"inlineSources": false,
"newLine": "LF"
},
"include": ["./cairo-1.0.d.ts"]
}
+7
View File
@@ -0,0 +1,7 @@
{
"entryPoints": ["./cairo-1.0.d.ts"],
"readme": "./README.md",
"name": "cairo-1.0",
"tsconfig": "./tsconfig.json"
}
+92
View File
@@ -0,0 +1,92 @@
# Dbusmenu-0.4
![version](https://img.shields.io/npm/v/@girs/dbusmenu-0.4)
![downloads/week](https://img.shields.io/npm/dw/@girs/dbusmenu-0.4)
GJS TypeScript type definitions for Dbusmenu-0.4, generated from library version 0.4.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
A small little library that was created by pulling out some comon code out of indicator-applet. It passes a menu structure across DBus so that a program can create a menu simply without worrying about how it is displayed on the other side of the bus.
## Install
To use this type definitions, install them with NPM:
```bash
npm install @girs/dbusmenu-0.4
```
## Usage
You can import this package into your project like this:
```ts
import Dbusmenu from '@girs/dbusmenu-0.4';
```
Or if you prefer CommonJS, you can also use this:
```ts
const Dbusmenu = require('@girs/dbusmenu-0.4');
```
### Ambient Modules
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.
For this you need to include `@girs/dbusmenu-0.4` or `@girs/dbusmenu-0.4/ambient` in your `tsconfig` or entry point Typescript file:
`index.ts`:
```ts
import '@girs/dbusmenu-0.4'
```
`tsconfig.json`:
```json
{
"compilerOptions": {
...
},
"include": ["@girs/dbusmenu-0.4"],
...
}
```
Now you can import the ambient module with TypeScript support:
```ts
import Dbusmenu from 'gi://Dbusmenu?version=0.4';
```
### Global import
You can also import the module with Typescript support using the global `imports.gi` object of GJS.
For this you need to include `@girs/dbusmenu-0.4` or `@girs/dbusmenu-0.4/import` in your `tsconfig` or entry point Typescript file:
`index.ts`:
```ts
import '@girs/dbusmenu-0.4'
```
`tsconfig.json`:
```json
{
"compilerOptions": {
...
},
"include": ["@girs/dbusmenu-0.4"],
...
}
```
Now you have also type support for this, too:
```ts
const Dbusmenu = imports.gi.Dbusmenu;
```
### Bundle
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).
## Other packages
All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
@@ -0,0 +1,13 @@
declare module 'gi://Dbusmenu?version=0.4' {
import Dbusmenu04 from '@girs/dbusmenu-0.4';
export default Dbusmenu04;
}
declare module 'gi://Dbusmenu' {
import Dbusmenu04 from '@girs/dbusmenu-0.4';
export default Dbusmenu04;
}
@@ -0,0 +1,13 @@
import Dbusmenu04 from '@girs/dbusmenu-0.4';
declare global {
export interface GjsGiImports {
Dbusmenu: typeof Dbusmenu04;
}
}
export default GjsGiImports;
+11
View File
@@ -0,0 +1,11 @@
imports.gi.versions.Dbusmenu = '0.4'
const Dbusmenu = imports.gi.Dbusmenu;
module.exports = Dbusmenu;
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+10
View File
@@ -0,0 +1,10 @@
// @ts-expect-error
import Dbusmenu from 'gi://Dbusmenu?version=0.4';
export { Dbusmenu };
export default Dbusmenu;
@@ -0,0 +1,92 @@
# GObject-2.0
![version](https://img.shields.io/npm/v/@girs/gobject-2.0)
![downloads/week](https://img.shields.io/npm/dw/@girs/gobject-2.0)
GJS TypeScript type definitions for GObject-2.0, generated from library version 2.78.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
GObject provides the object system used for Pango and GTK+.
## Install
To use this type definitions, install them with NPM:
```bash
npm install @girs/gobject-2.0
```
## Usage
You can import this package into your project like this:
```ts
import GObject from '@girs/gobject-2.0';
```
Or if you prefer CommonJS, you can also use this:
```ts
const GObject = require('@girs/gobject-2.0');
```
### Ambient Modules
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.
For this you need to include `@girs/gobject-2.0` or `@girs/gobject-2.0/ambient` in your `tsconfig` or entry point Typescript file:
`index.ts`:
```ts
import '@girs/gobject-2.0'
```
`tsconfig.json`:
```json
{
"compilerOptions": {
...
},
"include": ["@girs/gobject-2.0"],
...
}
```
Now you can import the ambient module with TypeScript support:
```ts
import GObject from 'gi://GObject?version=2.0';
```
### Global import
You can also import the module with Typescript support using the global `imports.gi` object of GJS.
For this you need to include `@girs/gobject-2.0` or `@girs/gobject-2.0/import` in your `tsconfig` or entry point Typescript file:
`index.ts`:
```ts
import '@girs/gobject-2.0'
```
`tsconfig.json`:
```json
{
"compilerOptions": {
...
},
"include": ["@girs/gobject-2.0"],
...
}
```
Now you have also type support for this, too:
```ts
const GObject = imports.gi.GObject;
```
### Bundle
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).
## Other packages
All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
@@ -0,0 +1,13 @@
declare module 'gi://GObject?version=2.0' {
import GObject20 from '@girs/gobject-2.0';
export default GObject20;
}
declare module 'gi://GObject' {
import GObject20 from '@girs/gobject-2.0';
export default GObject20;
}
@@ -0,0 +1,13 @@
import GObject20 from '@girs/gobject-2.0';
declare global {
export interface GjsGiImports {
GObject: typeof GObject20;
}
}
export default GjsGiImports;
@@ -0,0 +1,11 @@
imports.gi.versions.GObject = '2.0'
const GObject = imports.gi.GObject;
module.exports = GObject;
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
// @ts-expect-error
import GObject from 'gi://GObject?version=2.0';
export { GObject };
export default GObject;
@@ -0,0 +1,52 @@
{
"name": "@girs/gobject-2.0",
"version": "2.78.0-3.2.4",
"description": "GJS TypeScript type definitions for GObject-2.0, generated from library version 2.78.0",
"type": "module",
"module": "gobject-2.0.js",
"main": "gobject-2.0.js",
"exports": {
"./ambient": "./gobject-2.0-ambient.d.ts",
"./import": "./gobject-2.0-import.d.ts",
".": {
"import": {
"types": "./gobject-2.0.d.ts",
"default": "./gobject-2.0.js"
},
"require": {
"types": "./gobject-2.0.d.cts",
"default": "./gobject-2.0.cjs"
}
}
},
"scripts": {
"test": "yarn test:esm && yarn test:cjs",
"test:esm": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit gobject-2.0.d.ts",
"test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit gobject-2.0.d.cts"
},
"dependencies": {
"@girs/gjs": "^3.2.4",
"@girs/glib-2.0": "^2.78.0-3.2.4"
},
"devDependencies": {
"typescript": "*"
},
"keywords": [
"Gir",
"TypeScript",
"types",
"GObject-Introspection",
"GJS",
"GObject-2.0"
],
"author": "ts-for-gir",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/gjsify/types.git"
},
"bugs": {
"url": "https://github.com/gjsify/ts-for-gir/issues"
},
"homepage": "https://github.com/gjsify/types/tree/main/gobject-2.0#readme"
}
@@ -0,0 +1,23 @@
{
"compilerOptions": {
// General settings for code interpretation
"target": "ESNext",
"module": "ESNext",
"lib": ["ESNext"],
"types": [],
"experimentalDecorators": true,
"moduleResolution": "node",
"noEmit": true,
"noEmitOnError": false,
"baseUrl": "./",
"rootDir": ".",
// General settings for code generation
"removeComments": false,
"inlineSourceMap": false,
"inlineSources": false,
"newLine": "LF"
},
"include": ["./gobject-2.0.d.ts"]
}
@@ -0,0 +1,7 @@
{
"entryPoints": ["./gobject-2.0.d.ts"],
"readme": "./README.md",
"name": "GObject-2.0",
"tsconfig": "./tsconfig.json"
}
+53
View File
@@ -0,0 +1,53 @@
{
"name": "@girs/dbusmenu-0.4",
"version": "0.4.0-3.2.4",
"description": "GJS TypeScript type definitions for Dbusmenu-0.4, generated from library version 0.4.0",
"type": "module",
"module": "dbusmenu-0.4.js",
"main": "dbusmenu-0.4.js",
"exports": {
"./ambient": "./dbusmenu-0.4-ambient.d.ts",
"./import": "./dbusmenu-0.4-import.d.ts",
".": {
"import": {
"types": "./dbusmenu-0.4.d.ts",
"default": "./dbusmenu-0.4.js"
},
"require": {
"types": "./dbusmenu-0.4.d.cts",
"default": "./dbusmenu-0.4.cjs"
}
}
},
"scripts": {
"test": "yarn test:esm && yarn test:cjs",
"test:esm": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit dbusmenu-0.4.d.ts",
"test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit dbusmenu-0.4.d.cts"
},
"dependencies": {
"@girs/gjs": "^3.2.4",
"@girs/glib-2.0": "^2.78.0-3.2.4",
"@girs/gobject-2.0": "^2.78.0-3.2.4"
},
"devDependencies": {
"typescript": "*"
},
"keywords": [
"Gir",
"TypeScript",
"types",
"GObject-Introspection",
"GJS",
"Dbusmenu-0.4"
],
"author": "ts-for-gir",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/gjsify/types.git"
},
"bugs": {
"url": "https://github.com/gjsify/ts-for-gir/issues"
},
"homepage": "https://github.com/gjsify/types/tree/main/dbusmenu-0.4#readme"
}
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
// General settings for code interpretation
"target": "ESNext",
"module": "ESNext",
"lib": ["ESNext"],
"types": [],
"experimentalDecorators": true,
"moduleResolution": "node",
"noEmit": true,
"noEmitOnError": false,
"baseUrl": "./",
"rootDir": ".",
// General settings for code generation
"removeComments": false,
"inlineSourceMap": false,
"inlineSources": false,
"newLine": "LF"
},
"include": ["./dbusmenu-0.4.d.ts"]
}
+7
View File
@@ -0,0 +1,7 @@
{
"entryPoints": ["./dbusmenu-0.4.d.ts"],
"readme": "./README.md",
"name": "Dbusmenu-0.4",
"tsconfig": "./tsconfig.json"
}
+92
View File
@@ -0,0 +1,92 @@
# DbusmenuGtk3-0.4
![version](https://img.shields.io/npm/v/@girs/dbusmenugtk3-0.4)
![downloads/week](https://img.shields.io/npm/dw/@girs/dbusmenugtk3-0.4)
GJS TypeScript type definitions for DbusmenuGtk3-0.4, generated from library version 0.4.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
A small little library that was created by pulling out some comon code out of indicator-applet. It passes a menu structure across DBus so that a program can create a menu simply without worrying about how it is displayed on the other side of the bus.
## Install
To use this type definitions, install them with NPM:
```bash
npm install @girs/dbusmenugtk3-0.4
```
## Usage
You can import this package into your project like this:
```ts
import DbusmenuGtk3 from '@girs/dbusmenugtk3-0.4';
```
Or if you prefer CommonJS, you can also use this:
```ts
const DbusmenuGtk3 = require('@girs/dbusmenugtk3-0.4');
```
### Ambient Modules
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.
For this you need to include `@girs/dbusmenugtk3-0.4` or `@girs/dbusmenugtk3-0.4/ambient` in your `tsconfig` or entry point Typescript file:
`index.ts`:
```ts
import '@girs/dbusmenugtk3-0.4'
```
`tsconfig.json`:
```json
{
"compilerOptions": {
...
},
"include": ["@girs/dbusmenugtk3-0.4"],
...
}
```
Now you can import the ambient module with TypeScript support:
```ts
import DbusmenuGtk3 from 'gi://DbusmenuGtk3?version=0.4';
```
### Global import
You can also import the module with Typescript support using the global `imports.gi` object of GJS.
For this you need to include `@girs/dbusmenugtk3-0.4` or `@girs/dbusmenugtk3-0.4/import` in your `tsconfig` or entry point Typescript file:
`index.ts`:
```ts
import '@girs/dbusmenugtk3-0.4'
```
`tsconfig.json`:
```json
{
"compilerOptions": {
...
},
"include": ["@girs/dbusmenugtk3-0.4"],
...
}
```
Now you have also type support for this, too:
```ts
const DbusmenuGtk3 = imports.gi.DbusmenuGtk3;
```
### Bundle
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).
## Other packages
All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
@@ -0,0 +1,13 @@
declare module 'gi://DbusmenuGtk3?version=0.4' {
import DbusmenuGtk304 from '@girs/dbusmenugtk3-0.4';
export default DbusmenuGtk304;
}
declare module 'gi://DbusmenuGtk3' {
import DbusmenuGtk304 from '@girs/dbusmenugtk3-0.4';
export default DbusmenuGtk304;
}
@@ -0,0 +1,13 @@
import DbusmenuGtk304 from '@girs/dbusmenugtk3-0.4';
declare global {
export interface GjsGiImports {
DbusmenuGtk3: typeof DbusmenuGtk304;
}
}
export default GjsGiImports;
@@ -0,0 +1,11 @@
imports.gi.versions.DbusmenuGtk3 = '0.4'
const DbusmenuGtk3 = imports.gi.DbusmenuGtk3;
module.exports = DbusmenuGtk3;
@@ -0,0 +1,689 @@
/*
* Type Definitions for Gjs (https://gjs.guide/)
*
* These type definitions are automatically generated, do not edit them by hand.
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
*/
import './dbusmenugtk3-0.4-ambient.d.ts';
import './dbusmenugtk3-0.4-import.d.ts';
/**
* DbusmenuGtk3-0.4
*/
import type Gtk from '@girs/gtk-3.0';
import type xlib from '@girs/xlib-2.0';
import type Gdk from '@girs/gdk-3.0';
import type cairo from '@girs/cairo-1.0';
import type GObject from '@girs/gobject-2.0';
import type GLib from '@girs/glib-2.0';
import type Pango from '@girs/pango-1.0';
import type HarfBuzz from '@girs/harfbuzz-0.0';
import type freetype2 from '@girs/freetype2-2.0';
import type Gio from '@girs/gio-2.0';
import type GdkPixbuf from '@girs/gdkpixbuf-2.0';
import type GModule from '@girs/gmodule-2.0';
import type Atk from '@girs/atk-1.0';
import type Dbusmenu from '@girs/dbusmenu-0.4';
export const GTK_MENUITEM_H__: number
/**
* The Dbusmenu GTK parser adds cached items on the various
* menu items throughout the tree. Sometimes it can be useful
* to get that cached item to use directly. This function
* will retrieve it for you.
* @param widget A #GtkMenuItem that may have a cached #DbusmenuMenuitem from the parser
* @returns A pointer to the cached item or NULL if it isn't there.
*/
export function gtk_parse_get_cached_item(widget: Gtk.Widget): Dbusmenu.Menuitem
/**
* Goes through the GTK structures and turns them into the appropraite
* Dbusmenu structures along with setting up all the relationships
* between the objects. It also stores the dbusmenu items as a cache
* on the GTK items so that they'll be reused if necissary.
* @param widget A #GtkMenuItem or #GtkMenuShell to turn into a #DbusmenuMenuitem
* @returns A dbusmenu item representing the menu structure
*/
export function gtk_parse_menu_structure(widget: Gtk.Widget): Dbusmenu.Menuitem
/**
* This function looks on the menu item for a property by the
* name of `property`. If one exists it tries to turn it into
* a #GdkPixbuf. It assumes that the property is a base64 encoded
* PNG file like the one created by #dbusmenu_menuite_property_set_image.
* @param menuitem The #DbusmenuMenuitem to look for the property on
* @param property The name of the property to look for.
* @returns A pixbuf or #NULL to signal error.
*/
export function menuitem_property_get_image(menuitem: Dbusmenu.Menuitem, property: string | null): GdkPixbuf.Pixbuf
/**
* This function gets a GTK shortcut as a key and a mask
* for use to set the accelerators.
* @param menuitem The #DbusmenuMenuitem to get the shortcut off
*/
export function menuitem_property_get_shortcut(menuitem: Dbusmenu.Menuitem): [ /* key */ number, /* modifier */ Gdk.ModifierType ]
/**
* This function takes the pixbuf that is stored in `data` and
* turns it into a base64 encoded PNG so that it can be placed
* onto a standard #DbusmenuMenuitem property.
* @param menuitem The #DbusmenuMenuitem to set the property on.
* @param property Name of the property to set.
* @param data The image to place on the property.
* @returns Whether the function was able to set the property or not.
*/
export function menuitem_property_set_image(menuitem: Dbusmenu.Menuitem, property: string | null, data: GdkPixbuf.Pixbuf): boolean
/**
* Takes the modifer described by `key` and `modifier` and places that into
* the format sending across Dbus for shortcuts.
* @param menuitem The #DbusmenuMenuitem to set the shortcut on
* @param key The keycode of the key to send
* @param modifier A bitmask of modifiers used to activate the item
* @returns Whether it was successful at setting the property.
*/
export function menuitem_property_set_shortcut(menuitem: Dbusmenu.Menuitem, key: number, modifier: Gdk.ModifierType): boolean
/**
* Takes the shortcut that is installed on a menu item and calls
* #dbusmenu_menuitem_property_set_shortcut with it. It also sets
* up listeners to watch it change.
* @param menuitem The #DbusmenuMenuitem to set the shortcut on
* @param gmi A menu item to steal the shortcut off of
* @returns Whether it was successful at setting the property.
*/
export function menuitem_property_set_shortcut_menuitem(menuitem: Dbusmenu.Menuitem, gmi: Gtk.MenuItem): boolean
/**
* This function takes a GTK shortcut string as defined in
* #gtk_accelerator_parse and turns that into the information
* required to send it over DBusmenu.
* @param menuitem The #DbusmenuMenuitem to set the shortcut on
* @param shortcut String describing the shortcut
* @returns Whether it was successful at setting the property.
*/
export function menuitem_property_set_shortcut_string(menuitem: Dbusmenu.Menuitem, shortcut: string | null): boolean
export module Client {
// Constructor properties interface
export interface ConstructorProperties extends Dbusmenu.Client.ConstructorProperties {
}
}
export interface Client {
// Owm methods of DbusmenuGtk3-0.4.DbusmenuGtk3.Client
/**
* Gets the accel group for this client.
* @returns Either a valid group or #NULL on error or none set.
*/
get_accel_group(): Gtk.AccelGroup
/**
* This grabs the #GtkMenuItem that is associated with the
* #DbusmenuMenuitem.
* @param item #DbusmenuMenuitem to get associated #GtkMenuItem on.
* @returns The #GtkMenuItem that can be played with.
*/
menuitem_get(item: Dbusmenu.Menuitem): Gtk.MenuItem
/**
* This grabs the submenu associated with the menuitem.
* @param item #DbusmenuMenuitem to get associated #GtkMenu on.
* @returns The #GtkMenu if there is one.
*/
menuitem_get_submenu(item: Dbusmenu.Menuitem): Gtk.Menu
/**
* This function provides some of the basic connectivity for being in
* the GTK world. Things like visibility and sensitivity of the item are
* handled here so that the subclasses don't have to. If you're building
* your on GTK menu item you can use this function to apply those basic
* attributes so that you don't have to deal with them either.
*
* This also handles passing the "activate" signal back to the
* #DbusmenuMenuitem side of thing.
* @param item The #DbusmenuMenuitem to attach the GTK-isms to
* @param gmi A #GtkMenuItem representing the GTK world's view of this menuitem
* @param parent The parent #DbusmenuMenuitem
*/
newitem_base(item: Dbusmenu.Menuitem, gmi: Gtk.MenuItem, parent: Dbusmenu.Menuitem): void
/**
* Sets the acceleration group for the menu items with accelerators
* on this client.
* @param agroup The new acceleration group
*/
set_accel_group(agroup: Gtk.AccelGroup): void
// Class property signals of DbusmenuGtk3-0.4.DbusmenuGtk3.Client
connect(sigName: "notify::dbus-name", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::dbus-name", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::dbus-name", ...args: any[]): void
connect(sigName: "notify::dbus-object", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::dbus-object", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::dbus-object", ...args: any[]): void
connect(sigName: "notify::group-events", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::group-events", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::group-events", ...args: any[]): void
connect(sigName: string, callback: (...args: any[]) => void): number
connect_after(sigName: string, callback: (...args: any[]) => void): number
emit(sigName: string, ...args: any[]): void
disconnect(id: number): void
}
/**
* A subclass of #DbusmenuClient to add functionality with regarding
* building GTK items out of the abstract tree.
* @class
*/
export class Client extends Dbusmenu.Client {
// Own properties of DbusmenuGtk3-0.4.DbusmenuGtk3.Client
static name: string
static $gtype: GObject.GType<Client>
// Constructors of DbusmenuGtk3-0.4.DbusmenuGtk3.Client
constructor(config?: Client.ConstructorProperties)
/**
* Creates a new #DbusmenuGtkClient object and creates a #DbusmenuClient
* that connects across DBus to a #DbusmenuServer.
* @constructor
* @param dbus_name Name of the #DbusmenuServer on DBus
* @param dbus_object Name of the object on the #DbusmenuServer
* @returns A new #DbusmenuGtkClient sync'd with a server
*/
constructor(dbus_name: string | null, dbus_object: string | null)
/**
* Creates a new #DbusmenuGtkClient object and creates a #DbusmenuClient
* that connects across DBus to a #DbusmenuServer.
* @constructor
* @param dbus_name Name of the #DbusmenuServer on DBus
* @param dbus_object Name of the object on the #DbusmenuServer
* @returns A new #DbusmenuGtkClient sync'd with a server
*/
static new(dbus_name: string | null, dbus_object: string | null): Client
// Overloads of new
/**
* This function creates a new client that connects to a specific
* server on DBus. That server is at a specific location sharing
* a known object. The interface is assumed by the code to be
* the DBus menu interface. The newly created client will start
* sending out events as it syncs up with the server.
* @constructor
* @param name The DBus name for the server to connect to
* @param object The object on the server to monitor
* @returns A brand new #DbusmenuClient
*/
static new(name: string | null, object: string | null): Dbusmenu.Client
_init(config?: Client.ConstructorProperties): void
}
export module Menu {
// Constructor properties interface
export interface ConstructorProperties extends Atk.ImplementorIface.ConstructorProperties, Gtk.Buildable.ConstructorProperties, Gtk.Menu.ConstructorProperties {
// Own constructor properties of DbusmenuGtk3-0.4.DbusmenuGtk3.Menu
dbus_name?: string | null
dbus_object?: string | null
}
}
export interface Menu extends Atk.ImplementorIface, Gtk.Buildable {
// Own properties of DbusmenuGtk3-0.4.DbusmenuGtk3.Menu
readonly dbus_name: string | null
readonly dbus_object: string | null
// Own fields of DbusmenuGtk3-0.4.DbusmenuGtk3.Menu
parent: Gtk.Menu & Gtk.Container
priv: MenuPrivate
// Owm methods of DbusmenuGtk3-0.4.DbusmenuGtk3.Menu
/**
* An accessor for the client that this menu is using to
* communicate with the server.
* @returns A valid #DbusmenuGtkClient or NULL on error.
*/
get_client(): Client
// Conflicting methods
/**
* Sets an accelerator path for this menu from which accelerator paths
* for its immediate children, its menu items, can be constructed.
* The main purpose of this function is to spare the programmer the
* inconvenience of having to call gtk_menu_item_set_accel_path() on
* each menu item that should support runtime user changable accelerators.
* Instead, by just calling gtk_menu_set_accel_path() on their parent,
* each menu item of this menu, that contains a label describing its
* purpose, automatically gets an accel path assigned.
*
* For example, a menu containing menu items “New” and “Exit”, will, after
* `gtk_menu_set_accel_path (menu, "<Gnumeric-Sheet>/File");` has been
* called, assign its items the accel paths: `"<Gnumeric-Sheet>/File/New"`
* and `"<Gnumeric-Sheet>/File/Exit"`.
*
* Assigning accel paths to menu items then enables the user to change
* their accelerators at runtime. More details about accelerator paths
* and their default setups can be found at gtk_accel_map_add_entry().
*
* Note that `accel_path` string will be stored in a #GQuark. Therefore,
* if you pass a static string, you can save some memory by interning
* it first with g_intern_static_string().
* @param accel_path a valid accelerator path, or %NULL to unset the path
*/
set_accel_path(accel_path: string | null): void
// Overloads of set_accel_path
/**
* Given an accelerator group, `accel_group,` and an accelerator path,
* `accel_path,` sets up an accelerator in `accel_group` so whenever the
* key binding that is defined for `accel_path` is pressed, `widget`
* will be activated. This removes any accelerators (for any
* accelerator group) installed by previous calls to
* gtk_widget_set_accel_path(). Associating accelerators with
* paths allows them to be modified by the user and the modifications
* to be saved for future use. (See gtk_accel_map_save().)
*
* This function is a low level function that would most likely
* be used by a menu creation system like #GtkUIManager. If you
* use #GtkUIManager, setting up accelerator paths will be done
* automatically.
*
* Even when you you aren’t using #GtkUIManager, if you only want to
* set up accelerators on menu items gtk_menu_item_set_accel_path()
* provides a somewhat more convenient interface.
*
* Note that `accel_path` string will be stored in a #GQuark. Therefore, if you
* pass a static string, you can save some memory by interning it first with
* g_intern_static_string().
* @param accel_path path used to look up the accelerator
* @param accel_group a #GtkAccelGroup.
*/
set_accel_path(accel_path: string | null, accel_group: Gtk.AccelGroup | null): void
/**
* Given an accelerator group, `accel_group,` and an accelerator path,
* `accel_path,` sets up an accelerator in `accel_group` so whenever the
* key binding that is defined for `accel_path` is pressed, `widget`
* will be activated. This removes any accelerators (for any
* accelerator group) installed by previous calls to
* gtk_widget_set_accel_path(). Associating accelerators with
* paths allows them to be modified by the user and the modifications
* to be saved for future use. (See gtk_accel_map_save().)
*
* This function is a low level function that would most likely
* be used by a menu creation system like #GtkUIManager. If you
* use #GtkUIManager, setting up accelerator paths will be done
* automatically.
*
* Even when you you aren’t using #GtkUIManager, if you only want to
* set up accelerators on menu items gtk_menu_item_set_accel_path()
* provides a somewhat more convenient interface.
*
* Note that `accel_path` string will be stored in a #GQuark. Therefore, if you
* pass a static string, you can save some memory by interning it first with
* g_intern_static_string().
* @param accel_path path used to look up the accelerator
* @param accel_group a #GtkAccelGroup.
*/
set_accel_path(accel_path: string | null, accel_group: Gtk.AccelGroup | null): void
/**
* Emits a #GtkWidget::child-notify signal for the
* [child property][child-properties]
* `child_property` on the child.
*
* This is an analogue of g_object_notify() for child properties.
*
* Also see gtk_widget_child_notify().
* @param child the child widget
* @param child_property the name of a child property installed on the class of `container`
*/
child_notify(child: Gtk.Widget, child_property: string | null): void
// Overloads of child_notify
/**
* Emits a #GtkWidget::child-notify signal for the
* [child property][child-properties] `child_property`
* on `widget`.
*
* This is the analogue of g_object_notify() for child properties.
*
* Also see gtk_container_child_notify().
* @param child_property the name of a child property installed on the class of `widget’`s parent
*/
child_notify(child_property: string | null): void
/**
* Emits a #GtkWidget::child-notify signal for the
* [child property][child-properties] `child_property`
* on `widget`.
*
* This is the analogue of g_object_notify() for child properties.
*
* Also see gtk_container_child_notify().
* @param child_property the name of a child property installed on the class of `widget’`s parent
*/
child_notify(child_property: string | null): void
// Class property signals of DbusmenuGtk3-0.4.DbusmenuGtk3.Menu
connect(sigName: "notify::dbus-name", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::dbus-name", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::dbus-name", ...args: any[]): void
connect(sigName: "notify::dbus-object", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::dbus-object", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::dbus-object", ...args: any[]): void
connect(sigName: "notify::accel-group", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::accel-group", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::accel-group", ...args: any[]): void
connect(sigName: "notify::accel-path", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::accel-path", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::accel-path", ...args: any[]): void
connect(sigName: "notify::active", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::active", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::active", ...args: any[]): void
connect(sigName: "notify::anchor-hints", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::anchor-hints", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::anchor-hints", ...args: any[]): void
connect(sigName: "notify::attach-widget", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::attach-widget", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::attach-widget", ...args: any[]): void
connect(sigName: "notify::menu-type-hint", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::menu-type-hint", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::menu-type-hint", ...args: any[]): void
connect(sigName: "notify::monitor", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::monitor", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::monitor", ...args: any[]): void
connect(sigName: "notify::rect-anchor-dx", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::rect-anchor-dx", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::rect-anchor-dx", ...args: any[]): void
connect(sigName: "notify::rect-anchor-dy", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::rect-anchor-dy", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::rect-anchor-dy", ...args: any[]): void
connect(sigName: "notify::reserve-toggle-size", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::reserve-toggle-size", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::reserve-toggle-size", ...args: any[]): void
connect(sigName: "notify::tearoff-state", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::tearoff-state", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::tearoff-state", ...args: any[]): void
connect(sigName: "notify::tearoff-title", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::tearoff-title", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::tearoff-title", ...args: any[]): void
connect(sigName: "notify::take-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::take-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::take-focus", ...args: any[]): void
connect(sigName: "notify::border-width", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::border-width", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::border-width", ...args: any[]): void
connect(sigName: "notify::child", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::child", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::child", ...args: any[]): void
connect(sigName: "notify::resize-mode", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::resize-mode", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::resize-mode", ...args: any[]): void
connect(sigName: "notify::app-paintable", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::app-paintable", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::app-paintable", ...args: any[]): void
connect(sigName: "notify::can-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::can-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::can-default", ...args: any[]): void
connect(sigName: "notify::can-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::can-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::can-focus", ...args: any[]): void
connect(sigName: "notify::composite-child", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::composite-child", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::composite-child", ...args: any[]): void
connect(sigName: "notify::double-buffered", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::double-buffered", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::double-buffered", ...args: any[]): void
connect(sigName: "notify::events", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::events", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::events", ...args: any[]): void
connect(sigName: "notify::expand", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::expand", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::expand", ...args: any[]): void
connect(sigName: "notify::focus-on-click", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::focus-on-click", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::focus-on-click", ...args: any[]): void
connect(sigName: "notify::halign", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::halign", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::halign", ...args: any[]): void
connect(sigName: "notify::has-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::has-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::has-default", ...args: any[]): void
connect(sigName: "notify::has-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::has-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::has-focus", ...args: any[]): void
connect(sigName: "notify::has-tooltip", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::has-tooltip", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::has-tooltip", ...args: any[]): void
connect(sigName: "notify::height-request", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::height-request", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::height-request", ...args: any[]): void
connect(sigName: "notify::hexpand", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::hexpand", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::hexpand", ...args: any[]): void
connect(sigName: "notify::hexpand-set", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::hexpand-set", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::hexpand-set", ...args: any[]): void
connect(sigName: "notify::is-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::is-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::is-focus", ...args: any[]): void
connect(sigName: "notify::margin", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::margin", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::margin", ...args: any[]): void
connect(sigName: "notify::margin-bottom", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::margin-bottom", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::margin-bottom", ...args: any[]): void
connect(sigName: "notify::margin-end", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::margin-end", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::margin-end", ...args: any[]): void
connect(sigName: "notify::margin-left", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::margin-left", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::margin-left", ...args: any[]): void
connect(sigName: "notify::margin-right", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::margin-right", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::margin-right", ...args: any[]): void
connect(sigName: "notify::margin-start", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::margin-start", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::margin-start", ...args: any[]): void
connect(sigName: "notify::margin-top", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::margin-top", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::margin-top", ...args: any[]): void
connect(sigName: "notify::name", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::name", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::name", ...args: any[]): void
connect(sigName: "notify::no-show-all", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::no-show-all", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::no-show-all", ...args: any[]): void
connect(sigName: "notify::opacity", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::opacity", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::opacity", ...args: any[]): void
connect(sigName: "notify::parent", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::parent", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::parent", ...args: any[]): void
connect(sigName: "notify::receives-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::receives-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::receives-default", ...args: any[]): void
connect(sigName: "notify::scale-factor", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::scale-factor", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::scale-factor", ...args: any[]): void
connect(sigName: "notify::sensitive", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::sensitive", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::sensitive", ...args: any[]): void
connect(sigName: "notify::style", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::style", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::style", ...args: any[]): void
connect(sigName: "notify::tooltip-markup", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::tooltip-markup", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::tooltip-markup", ...args: any[]): void
connect(sigName: "notify::tooltip-text", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::tooltip-text", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::tooltip-text", ...args: any[]): void
connect(sigName: "notify::valign", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::valign", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::valign", ...args: any[]): void
connect(sigName: "notify::vexpand", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::vexpand", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::vexpand", ...args: any[]): void
connect(sigName: "notify::vexpand-set", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::vexpand-set", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::vexpand-set", ...args: any[]): void
connect(sigName: "notify::visible", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::visible", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::visible", ...args: any[]): void
connect(sigName: "notify::width-request", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::width-request", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::width-request", ...args: any[]): void
connect(sigName: "notify::window", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::window", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::window", ...args: any[]): void
connect(sigName: string, callback: (...args: any[]) => void): number
connect_after(sigName: string, callback: (...args: any[]) => void): number
emit(sigName: string, ...args: any[]): void
disconnect(id: number): void
}
/**
* A #GtkMenu that is built using an abstract tree built from
* a #DbusmenuGtkClient.
* @class
*/
export class Menu extends Gtk.Menu {
// Own properties of DbusmenuGtk3-0.4.DbusmenuGtk3.Menu
static name: string
static $gtype: GObject.GType<Menu>
// Constructors of DbusmenuGtk3-0.4.DbusmenuGtk3.Menu
constructor(config?: Menu.ConstructorProperties)
/**
* Creates a new #DbusmenuGtkMenu object and creates a #DbusmenuClient
* that connects across DBus to a #DbusmenuServer.
* @constructor
* @param dbus_name Name of the #DbusmenuServer on DBus
* @param dbus_object Name of the object on the #DbusmenuServer
* @returns A new #DbusmenuGtkMenu sync'd with a server
*/
constructor(dbus_name: string | null, dbus_object: string | null)
/**
* Creates a new #DbusmenuGtkMenu object and creates a #DbusmenuClient
* that connects across DBus to a #DbusmenuServer.
* @constructor
* @param dbus_name Name of the #DbusmenuServer on DBus
* @param dbus_object Name of the object on the #DbusmenuServer
* @returns A new #DbusmenuGtkMenu sync'd with a server
*/
static new(dbus_name: string | null, dbus_object: string | null): Menu
// Overloads of new
/**
* Creates a new #GtkMenu
* @constructor
* @returns a new #GtkMenu
*/
static new(): Gtk.Menu
_init(config?: Menu.ConstructorProperties): void
}
export interface ClientClass {
// Own fields of DbusmenuGtk3-0.4.DbusmenuGtk3.ClientClass
/**
* #GtkMenuClass
* @field
*/
parent_class: Dbusmenu.ClientClass
root_changed: (newroot: Dbusmenu.Menuitem) => void
reserved1: () => void
reserved2: () => void
reserved3: () => void
reserved4: () => void
reserved5: () => void
reserved6: () => void
}
/**
* Functions and signal slots for using a #DbusmenuGtkClient
* @record
*/
export abstract class ClientClass {
// Own properties of DbusmenuGtk3-0.4.DbusmenuGtk3.ClientClass
static name: string
}
export interface ClientPrivate {
}
export class ClientPrivate {
// Own properties of DbusmenuGtk3-0.4.DbusmenuGtk3.ClientPrivate
static name: string
}
export interface MenuClass {
// Own fields of DbusmenuGtk3-0.4.DbusmenuGtk3.MenuClass
/**
* #GtkMenuClass
* @field
*/
parent_class: Gtk.MenuClass
reserved1: () => void
reserved2: () => void
reserved3: () => void
reserved4: () => void
reserved5: () => void
reserved6: () => void
}
/**
* All of the subclassable functions and signal slots for a
* #DbusmenuGtkMenu.
* @record
*/
export abstract class MenuClass {
// Own properties of DbusmenuGtk3-0.4.DbusmenuGtk3.MenuClass
static name: string
}
export interface MenuPrivate {
}
export class MenuPrivate {
// Own properties of DbusmenuGtk3-0.4.DbusmenuGtk3.MenuPrivate
static name: string
}
/**
* Name of the imported GIR library
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
*/
export const __name__: string
/**
* Version of the imported GIR library
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
*/
export const __version__: string
// END
@@ -0,0 +1,694 @@
/*
* Type Definitions for Gjs (https://gjs.guide/)
*
* These type definitions are automatically generated, do not edit them by hand.
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
*/
import './dbusmenugtk3-0.4-ambient.d.ts';
import './dbusmenugtk3-0.4-import.d.ts';
/**
* DbusmenuGtk3-0.4
*/
import type Gtk from '@girs/gtk-3.0';
import type xlib from '@girs/xlib-2.0';
import type Gdk from '@girs/gdk-3.0';
import type cairo from '@girs/cairo-1.0';
import type GObject from '@girs/gobject-2.0';
import type GLib from '@girs/glib-2.0';
import type Pango from '@girs/pango-1.0';
import type HarfBuzz from '@girs/harfbuzz-0.0';
import type freetype2 from '@girs/freetype2-2.0';
import type Gio from '@girs/gio-2.0';
import type GdkPixbuf from '@girs/gdkpixbuf-2.0';
import type GModule from '@girs/gmodule-2.0';
import type Atk from '@girs/atk-1.0';
import type Dbusmenu from '@girs/dbusmenu-0.4';
export namespace DbusmenuGtk3 {
const GTK_MENUITEM_H__: number
/**
* The Dbusmenu GTK parser adds cached items on the various
* menu items throughout the tree. Sometimes it can be useful
* to get that cached item to use directly. This function
* will retrieve it for you.
* @param widget A #GtkMenuItem that may have a cached #DbusmenuMenuitem from the parser
* @returns A pointer to the cached item or NULL if it isn't there.
*/
function gtk_parse_get_cached_item(widget: Gtk.Widget): Dbusmenu.Menuitem
/**
* Goes through the GTK structures and turns them into the appropraite
* Dbusmenu structures along with setting up all the relationships
* between the objects. It also stores the dbusmenu items as a cache
* on the GTK items so that they'll be reused if necissary.
* @param widget A #GtkMenuItem or #GtkMenuShell to turn into a #DbusmenuMenuitem
* @returns A dbusmenu item representing the menu structure
*/
function gtk_parse_menu_structure(widget: Gtk.Widget): Dbusmenu.Menuitem
/**
* This function looks on the menu item for a property by the
* name of `property`. If one exists it tries to turn it into
* a #GdkPixbuf. It assumes that the property is a base64 encoded
* PNG file like the one created by #dbusmenu_menuite_property_set_image.
* @param menuitem The #DbusmenuMenuitem to look for the property on
* @param property The name of the property to look for.
* @returns A pixbuf or #NULL to signal error.
*/
function menuitem_property_get_image(menuitem: Dbusmenu.Menuitem, property: string | null): GdkPixbuf.Pixbuf
/**
* This function gets a GTK shortcut as a key and a mask
* for use to set the accelerators.
* @param menuitem The #DbusmenuMenuitem to get the shortcut off
*/
function menuitem_property_get_shortcut(menuitem: Dbusmenu.Menuitem): [ /* key */ number, /* modifier */ Gdk.ModifierType ]
/**
* This function takes the pixbuf that is stored in `data` and
* turns it into a base64 encoded PNG so that it can be placed
* onto a standard #DbusmenuMenuitem property.
* @param menuitem The #DbusmenuMenuitem to set the property on.
* @param property Name of the property to set.
* @param data The image to place on the property.
* @returns Whether the function was able to set the property or not.
*/
function menuitem_property_set_image(menuitem: Dbusmenu.Menuitem, property: string | null, data: GdkPixbuf.Pixbuf): boolean
/**
* Takes the modifer described by `key` and `modifier` and places that into
* the format sending across Dbus for shortcuts.
* @param menuitem The #DbusmenuMenuitem to set the shortcut on
* @param key The keycode of the key to send
* @param modifier A bitmask of modifiers used to activate the item
* @returns Whether it was successful at setting the property.
*/
function menuitem_property_set_shortcut(menuitem: Dbusmenu.Menuitem, key: number, modifier: Gdk.ModifierType): boolean
/**
* Takes the shortcut that is installed on a menu item and calls
* #dbusmenu_menuitem_property_set_shortcut with it. It also sets
* up listeners to watch it change.
* @param menuitem The #DbusmenuMenuitem to set the shortcut on
* @param gmi A menu item to steal the shortcut off of
* @returns Whether it was successful at setting the property.
*/
function menuitem_property_set_shortcut_menuitem(menuitem: Dbusmenu.Menuitem, gmi: Gtk.MenuItem): boolean
/**
* This function takes a GTK shortcut string as defined in
* #gtk_accelerator_parse and turns that into the information
* required to send it over DBusmenu.
* @param menuitem The #DbusmenuMenuitem to set the shortcut on
* @param shortcut String describing the shortcut
* @returns Whether it was successful at setting the property.
*/
function menuitem_property_set_shortcut_string(menuitem: Dbusmenu.Menuitem, shortcut: string | null): boolean
module Client {
// Constructor properties interface
interface ConstructorProperties extends Dbusmenu.Client.ConstructorProperties {
}
}
interface Client {
// Owm methods of DbusmenuGtk3-0.4.DbusmenuGtk3.Client
/**
* Gets the accel group for this client.
* @returns Either a valid group or #NULL on error or none set.
*/
get_accel_group(): Gtk.AccelGroup
/**
* This grabs the #GtkMenuItem that is associated with the
* #DbusmenuMenuitem.
* @param item #DbusmenuMenuitem to get associated #GtkMenuItem on.
* @returns The #GtkMenuItem that can be played with.
*/
menuitem_get(item: Dbusmenu.Menuitem): Gtk.MenuItem
/**
* This grabs the submenu associated with the menuitem.
* @param item #DbusmenuMenuitem to get associated #GtkMenu on.
* @returns The #GtkMenu if there is one.
*/
menuitem_get_submenu(item: Dbusmenu.Menuitem): Gtk.Menu
/**
* This function provides some of the basic connectivity for being in
* the GTK world. Things like visibility and sensitivity of the item are
* handled here so that the subclasses don't have to. If you're building
* your on GTK menu item you can use this function to apply those basic
* attributes so that you don't have to deal with them either.
*
* This also handles passing the "activate" signal back to the
* #DbusmenuMenuitem side of thing.
* @param item The #DbusmenuMenuitem to attach the GTK-isms to
* @param gmi A #GtkMenuItem representing the GTK world's view of this menuitem
* @param parent The parent #DbusmenuMenuitem
*/
newitem_base(item: Dbusmenu.Menuitem, gmi: Gtk.MenuItem, parent: Dbusmenu.Menuitem): void
/**
* Sets the acceleration group for the menu items with accelerators
* on this client.
* @param agroup The new acceleration group
*/
set_accel_group(agroup: Gtk.AccelGroup): void
// Class property signals of DbusmenuGtk3-0.4.DbusmenuGtk3.Client
connect(sigName: "notify::dbus-name", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::dbus-name", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::dbus-name", ...args: any[]): void
connect(sigName: "notify::dbus-object", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::dbus-object", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::dbus-object", ...args: any[]): void
connect(sigName: "notify::group-events", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::group-events", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::group-events", ...args: any[]): void
connect(sigName: string, callback: (...args: any[]) => void): number
connect_after(sigName: string, callback: (...args: any[]) => void): number
emit(sigName: string, ...args: any[]): void
disconnect(id: number): void
}
/**
* A subclass of #DbusmenuClient to add functionality with regarding
* building GTK items out of the abstract tree.
* @class
*/
class Client extends Dbusmenu.Client {
// Own properties of DbusmenuGtk3-0.4.DbusmenuGtk3.Client
static name: string
static $gtype: GObject.GType<Client>
// Constructors of DbusmenuGtk3-0.4.DbusmenuGtk3.Client
constructor(config?: Client.ConstructorProperties)
/**
* Creates a new #DbusmenuGtkClient object and creates a #DbusmenuClient
* that connects across DBus to a #DbusmenuServer.
* @constructor
* @param dbus_name Name of the #DbusmenuServer on DBus
* @param dbus_object Name of the object on the #DbusmenuServer
* @returns A new #DbusmenuGtkClient sync'd with a server
*/
constructor(dbus_name: string | null, dbus_object: string | null)
/**
* Creates a new #DbusmenuGtkClient object and creates a #DbusmenuClient
* that connects across DBus to a #DbusmenuServer.
* @constructor
* @param dbus_name Name of the #DbusmenuServer on DBus
* @param dbus_object Name of the object on the #DbusmenuServer
* @returns A new #DbusmenuGtkClient sync'd with a server
*/
static new(dbus_name: string | null, dbus_object: string | null): Client
// Overloads of new
/**
* This function creates a new client that connects to a specific
* server on DBus. That server is at a specific location sharing
* a known object. The interface is assumed by the code to be
* the DBus menu interface. The newly created client will start
* sending out events as it syncs up with the server.
* @constructor
* @param name The DBus name for the server to connect to
* @param object The object on the server to monitor
* @returns A brand new #DbusmenuClient
*/
static new(name: string | null, object: string | null): Dbusmenu.Client
_init(config?: Client.ConstructorProperties): void
}
module Menu {
// Constructor properties interface
interface ConstructorProperties extends Atk.ImplementorIface.ConstructorProperties, Gtk.Buildable.ConstructorProperties, Gtk.Menu.ConstructorProperties {
// Own constructor properties of DbusmenuGtk3-0.4.DbusmenuGtk3.Menu
dbus_name?: string | null
dbus_object?: string | null
}
}
interface Menu extends Atk.ImplementorIface, Gtk.Buildable {
// Own properties of DbusmenuGtk3-0.4.DbusmenuGtk3.Menu
readonly dbus_name: string | null
readonly dbus_object: string | null
// Own fields of DbusmenuGtk3-0.4.DbusmenuGtk3.Menu
parent: Gtk.Menu & Gtk.Container
priv: MenuPrivate
// Owm methods of DbusmenuGtk3-0.4.DbusmenuGtk3.Menu
/**
* An accessor for the client that this menu is using to
* communicate with the server.
* @returns A valid #DbusmenuGtkClient or NULL on error.
*/
get_client(): Client
// Conflicting methods
/**
* Sets an accelerator path for this menu from which accelerator paths
* for its immediate children, its menu items, can be constructed.
* The main purpose of this function is to spare the programmer the
* inconvenience of having to call gtk_menu_item_set_accel_path() on
* each menu item that should support runtime user changable accelerators.
* Instead, by just calling gtk_menu_set_accel_path() on their parent,
* each menu item of this menu, that contains a label describing its
* purpose, automatically gets an accel path assigned.
*
* For example, a menu containing menu items “New” and “Exit”, will, after
* `gtk_menu_set_accel_path (menu, "<Gnumeric-Sheet>/File");` has been
* called, assign its items the accel paths: `"<Gnumeric-Sheet>/File/New"`
* and `"<Gnumeric-Sheet>/File/Exit"`.
*
* Assigning accel paths to menu items then enables the user to change
* their accelerators at runtime. More details about accelerator paths
* and their default setups can be found at gtk_accel_map_add_entry().
*
* Note that `accel_path` string will be stored in a #GQuark. Therefore,
* if you pass a static string, you can save some memory by interning
* it first with g_intern_static_string().
* @param accel_path a valid accelerator path, or %NULL to unset the path
*/
set_accel_path(accel_path: string | null): void
// Overloads of set_accel_path
/**
* Given an accelerator group, `accel_group,` and an accelerator path,
* `accel_path,` sets up an accelerator in `accel_group` so whenever the
* key binding that is defined for `accel_path` is pressed, `widget`
* will be activated. This removes any accelerators (for any
* accelerator group) installed by previous calls to
* gtk_widget_set_accel_path(). Associating accelerators with
* paths allows them to be modified by the user and the modifications
* to be saved for future use. (See gtk_accel_map_save().)
*
* This function is a low level function that would most likely
* be used by a menu creation system like #GtkUIManager. If you
* use #GtkUIManager, setting up accelerator paths will be done
* automatically.
*
* Even when you you aren’t using #GtkUIManager, if you only want to
* set up accelerators on menu items gtk_menu_item_set_accel_path()
* provides a somewhat more convenient interface.
*
* Note that `accel_path` string will be stored in a #GQuark. Therefore, if you
* pass a static string, you can save some memory by interning it first with
* g_intern_static_string().
* @param accel_path path used to look up the accelerator
* @param accel_group a #GtkAccelGroup.
*/
set_accel_path(accel_path: string | null, accel_group: Gtk.AccelGroup | null): void
/**
* Given an accelerator group, `accel_group,` and an accelerator path,
* `accel_path,` sets up an accelerator in `accel_group` so whenever the
* key binding that is defined for `accel_path` is pressed, `widget`
* will be activated. This removes any accelerators (for any
* accelerator group) installed by previous calls to
* gtk_widget_set_accel_path(). Associating accelerators with
* paths allows them to be modified by the user and the modifications
* to be saved for future use. (See gtk_accel_map_save().)
*
* This function is a low level function that would most likely
* be used by a menu creation system like #GtkUIManager. If you
* use #GtkUIManager, setting up accelerator paths will be done
* automatically.
*
* Even when you you aren’t using #GtkUIManager, if you only want to
* set up accelerators on menu items gtk_menu_item_set_accel_path()
* provides a somewhat more convenient interface.
*
* Note that `accel_path` string will be stored in a #GQuark. Therefore, if you
* pass a static string, you can save some memory by interning it first with
* g_intern_static_string().
* @param accel_path path used to look up the accelerator
* @param accel_group a #GtkAccelGroup.
*/
set_accel_path(accel_path: string | null, accel_group: Gtk.AccelGroup | null): void
/**
* Emits a #GtkWidget::child-notify signal for the
* [child property][child-properties]
* `child_property` on the child.
*
* This is an analogue of g_object_notify() for child properties.
*
* Also see gtk_widget_child_notify().
* @param child the child widget
* @param child_property the name of a child property installed on the class of `container`
*/
child_notify(child: Gtk.Widget, child_property: string | null): void
// Overloads of child_notify
/**
* Emits a #GtkWidget::child-notify signal for the
* [child property][child-properties] `child_property`
* on `widget`.
*
* This is the analogue of g_object_notify() for child properties.
*
* Also see gtk_container_child_notify().
* @param child_property the name of a child property installed on the class of `widget’`s parent
*/
child_notify(child_property: string | null): void
/**
* Emits a #GtkWidget::child-notify signal for the
* [child property][child-properties] `child_property`
* on `widget`.
*
* This is the analogue of g_object_notify() for child properties.
*
* Also see gtk_container_child_notify().
* @param child_property the name of a child property installed on the class of `widget’`s parent
*/
child_notify(child_property: string | null): void
// Class property signals of DbusmenuGtk3-0.4.DbusmenuGtk3.Menu
connect(sigName: "notify::dbus-name", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::dbus-name", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::dbus-name", ...args: any[]): void
connect(sigName: "notify::dbus-object", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::dbus-object", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::dbus-object", ...args: any[]): void
connect(sigName: "notify::accel-group", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::accel-group", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::accel-group", ...args: any[]): void
connect(sigName: "notify::accel-path", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::accel-path", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::accel-path", ...args: any[]): void
connect(sigName: "notify::active", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::active", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::active", ...args: any[]): void
connect(sigName: "notify::anchor-hints", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::anchor-hints", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::anchor-hints", ...args: any[]): void
connect(sigName: "notify::attach-widget", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::attach-widget", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::attach-widget", ...args: any[]): void
connect(sigName: "notify::menu-type-hint", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::menu-type-hint", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::menu-type-hint", ...args: any[]): void
connect(sigName: "notify::monitor", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::monitor", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::monitor", ...args: any[]): void
connect(sigName: "notify::rect-anchor-dx", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::rect-anchor-dx", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::rect-anchor-dx", ...args: any[]): void
connect(sigName: "notify::rect-anchor-dy", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::rect-anchor-dy", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::rect-anchor-dy", ...args: any[]): void
connect(sigName: "notify::reserve-toggle-size", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::reserve-toggle-size", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::reserve-toggle-size", ...args: any[]): void
connect(sigName: "notify::tearoff-state", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::tearoff-state", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::tearoff-state", ...args: any[]): void
connect(sigName: "notify::tearoff-title", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::tearoff-title", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::tearoff-title", ...args: any[]): void
connect(sigName: "notify::take-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::take-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::take-focus", ...args: any[]): void
connect(sigName: "notify::border-width", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::border-width", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::border-width", ...args: any[]): void
connect(sigName: "notify::child", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::child", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::child", ...args: any[]): void
connect(sigName: "notify::resize-mode", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::resize-mode", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::resize-mode", ...args: any[]): void
connect(sigName: "notify::app-paintable", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::app-paintable", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::app-paintable", ...args: any[]): void
connect(sigName: "notify::can-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::can-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::can-default", ...args: any[]): void
connect(sigName: "notify::can-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::can-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::can-focus", ...args: any[]): void
connect(sigName: "notify::composite-child", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::composite-child", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::composite-child", ...args: any[]): void
connect(sigName: "notify::double-buffered", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::double-buffered", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::double-buffered", ...args: any[]): void
connect(sigName: "notify::events", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::events", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::events", ...args: any[]): void
connect(sigName: "notify::expand", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::expand", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::expand", ...args: any[]): void
connect(sigName: "notify::focus-on-click", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::focus-on-click", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::focus-on-click", ...args: any[]): void
connect(sigName: "notify::halign", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::halign", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::halign", ...args: any[]): void
connect(sigName: "notify::has-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::has-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::has-default", ...args: any[]): void
connect(sigName: "notify::has-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::has-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::has-focus", ...args: any[]): void
connect(sigName: "notify::has-tooltip", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::has-tooltip", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::has-tooltip", ...args: any[]): void
connect(sigName: "notify::height-request", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::height-request", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::height-request", ...args: any[]): void
connect(sigName: "notify::hexpand", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::hexpand", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::hexpand", ...args: any[]): void
connect(sigName: "notify::hexpand-set", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::hexpand-set", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::hexpand-set", ...args: any[]): void
connect(sigName: "notify::is-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::is-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::is-focus", ...args: any[]): void
connect(sigName: "notify::margin", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::margin", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::margin", ...args: any[]): void
connect(sigName: "notify::margin-bottom", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::margin-bottom", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::margin-bottom", ...args: any[]): void
connect(sigName: "notify::margin-end", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::margin-end", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::margin-end", ...args: any[]): void
connect(sigName: "notify::margin-left", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::margin-left", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::margin-left", ...args: any[]): void
connect(sigName: "notify::margin-right", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::margin-right", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::margin-right", ...args: any[]): void
connect(sigName: "notify::margin-start", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::margin-start", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::margin-start", ...args: any[]): void
connect(sigName: "notify::margin-top", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::margin-top", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::margin-top", ...args: any[]): void
connect(sigName: "notify::name", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::name", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::name", ...args: any[]): void
connect(sigName: "notify::no-show-all", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::no-show-all", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::no-show-all", ...args: any[]): void
connect(sigName: "notify::opacity", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::opacity", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::opacity", ...args: any[]): void
connect(sigName: "notify::parent", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::parent", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::parent", ...args: any[]): void
connect(sigName: "notify::receives-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::receives-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::receives-default", ...args: any[]): void
connect(sigName: "notify::scale-factor", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::scale-factor", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::scale-factor", ...args: any[]): void
connect(sigName: "notify::sensitive", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::sensitive", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::sensitive", ...args: any[]): void
connect(sigName: "notify::style", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::style", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::style", ...args: any[]): void
connect(sigName: "notify::tooltip-markup", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::tooltip-markup", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::tooltip-markup", ...args: any[]): void
connect(sigName: "notify::tooltip-text", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::tooltip-text", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::tooltip-text", ...args: any[]): void
connect(sigName: "notify::valign", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::valign", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::valign", ...args: any[]): void
connect(sigName: "notify::vexpand", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::vexpand", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::vexpand", ...args: any[]): void
connect(sigName: "notify::vexpand-set", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::vexpand-set", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::vexpand-set", ...args: any[]): void
connect(sigName: "notify::visible", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::visible", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::visible", ...args: any[]): void
connect(sigName: "notify::width-request", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::width-request", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::width-request", ...args: any[]): void
connect(sigName: "notify::window", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
connect_after(sigName: "notify::window", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
emit(sigName: "notify::window", ...args: any[]): void
connect(sigName: string, callback: (...args: any[]) => void): number
connect_after(sigName: string, callback: (...args: any[]) => void): number
emit(sigName: string, ...args: any[]): void
disconnect(id: number): void
}
/**
* A #GtkMenu that is built using an abstract tree built from
* a #DbusmenuGtkClient.
* @class
*/
class Menu extends Gtk.Menu {
// Own properties of DbusmenuGtk3-0.4.DbusmenuGtk3.Menu
static name: string
static $gtype: GObject.GType<Menu>
// Constructors of DbusmenuGtk3-0.4.DbusmenuGtk3.Menu
constructor(config?: Menu.ConstructorProperties)
/**
* Creates a new #DbusmenuGtkMenu object and creates a #DbusmenuClient
* that connects across DBus to a #DbusmenuServer.
* @constructor
* @param dbus_name Name of the #DbusmenuServer on DBus
* @param dbus_object Name of the object on the #DbusmenuServer
* @returns A new #DbusmenuGtkMenu sync'd with a server
*/
constructor(dbus_name: string | null, dbus_object: string | null)
/**
* Creates a new #DbusmenuGtkMenu object and creates a #DbusmenuClient
* that connects across DBus to a #DbusmenuServer.
* @constructor
* @param dbus_name Name of the #DbusmenuServer on DBus
* @param dbus_object Name of the object on the #DbusmenuServer
* @returns A new #DbusmenuGtkMenu sync'd with a server
*/
static new(dbus_name: string | null, dbus_object: string | null): Menu
// Overloads of new
/**
* Creates a new #GtkMenu
* @constructor
* @returns a new #GtkMenu
*/
static new(): Gtk.Menu
_init(config?: Menu.ConstructorProperties): void
}
interface ClientClass {
// Own fields of DbusmenuGtk3-0.4.DbusmenuGtk3.ClientClass
/**
* #GtkMenuClass
* @field
*/
parent_class: Dbusmenu.ClientClass
root_changed: (newroot: Dbusmenu.Menuitem) => void
reserved1: () => void
reserved2: () => void
reserved3: () => void
reserved4: () => void
reserved5: () => void
reserved6: () => void
}
/**
* Functions and signal slots for using a #DbusmenuGtkClient
* @record
*/
abstract class ClientClass {
// Own properties of DbusmenuGtk3-0.4.DbusmenuGtk3.ClientClass
static name: string
}
interface ClientPrivate {
}
class ClientPrivate {
// Own properties of DbusmenuGtk3-0.4.DbusmenuGtk3.ClientPrivate
static name: string
}
interface MenuClass {
// Own fields of DbusmenuGtk3-0.4.DbusmenuGtk3.MenuClass
/**
* #GtkMenuClass
* @field
*/
parent_class: Gtk.MenuClass
reserved1: () => void
reserved2: () => void
reserved3: () => void
reserved4: () => void
reserved5: () => void
reserved6: () => void
}
/**
* All of the subclassable functions and signal slots for a
* #DbusmenuGtkMenu.
* @record
*/
abstract class MenuClass {
// Own properties of DbusmenuGtk3-0.4.DbusmenuGtk3.MenuClass
static name: string
}
interface MenuPrivate {
}
class MenuPrivate {
// Own properties of DbusmenuGtk3-0.4.DbusmenuGtk3.MenuPrivate
static name: string
}
/**
* Name of the imported GIR library
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
*/
const __name__: string
/**
* Version of the imported GIR library
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
*/
const __version__: string
}
export default DbusmenuGtk3;
// END
@@ -0,0 +1,10 @@
// @ts-expect-error
import DbusmenuGtk3 from 'gi://DbusmenuGtk3?version=0.4';
export { DbusmenuGtk3 };
export default DbusmenuGtk3;
@@ -0,0 +1,92 @@
# GObject-2.0
![version](https://img.shields.io/npm/v/@girs/gobject-2.0)
![downloads/week](https://img.shields.io/npm/dw/@girs/gobject-2.0)
GJS TypeScript type definitions for GObject-2.0, generated from library version 2.78.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
GObject provides the object system used for Pango and GTK+.
## Install
To use this type definitions, install them with NPM:
```bash
npm install @girs/gobject-2.0
```
## Usage
You can import this package into your project like this:
```ts
import GObject from '@girs/gobject-2.0';
```
Or if you prefer CommonJS, you can also use this:
```ts
const GObject = require('@girs/gobject-2.0');
```
### Ambient Modules
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.
For this you need to include `@girs/gobject-2.0` or `@girs/gobject-2.0/ambient` in your `tsconfig` or entry point Typescript file:
`index.ts`:
```ts
import '@girs/gobject-2.0'
```
`tsconfig.json`:
```json
{
"compilerOptions": {
...
},
"include": ["@girs/gobject-2.0"],
...
}
```
Now you can import the ambient module with TypeScript support:
```ts
import GObject from 'gi://GObject?version=2.0';
```
### Global import
You can also import the module with Typescript support using the global `imports.gi` object of GJS.
For this you need to include `@girs/gobject-2.0` or `@girs/gobject-2.0/import` in your `tsconfig` or entry point Typescript file:
`index.ts`:
```ts
import '@girs/gobject-2.0'
```
`tsconfig.json`:
```json
{
"compilerOptions": {
...
},
"include": ["@girs/gobject-2.0"],
...
}
```
Now you have also type support for this, too:
```ts
const GObject = imports.gi.GObject;
```
### Bundle
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).
## Other packages
All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
@@ -0,0 +1,13 @@
declare module 'gi://GObject?version=2.0' {
import GObject20 from '@girs/gobject-2.0';
export default GObject20;
}
declare module 'gi://GObject' {
import GObject20 from '@girs/gobject-2.0';
export default GObject20;
}
@@ -0,0 +1,13 @@
import GObject20 from '@girs/gobject-2.0';
declare global {
export interface GjsGiImports {
GObject: typeof GObject20;
}
}
export default GjsGiImports;
@@ -0,0 +1,11 @@
imports.gi.versions.GObject = '2.0'
const GObject = imports.gi.GObject;
module.exports = GObject;
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
// @ts-expect-error
import GObject from 'gi://GObject?version=2.0';
export { GObject };
export default GObject;
@@ -0,0 +1,52 @@
{
"name": "@girs/gobject-2.0",
"version": "2.78.0-3.2.4",
"description": "GJS TypeScript type definitions for GObject-2.0, generated from library version 2.78.0",
"type": "module",
"module": "gobject-2.0.js",
"main": "gobject-2.0.js",
"exports": {
"./ambient": "./gobject-2.0-ambient.d.ts",
"./import": "./gobject-2.0-import.d.ts",
".": {
"import": {
"types": "./gobject-2.0.d.ts",
"default": "./gobject-2.0.js"
},
"require": {
"types": "./gobject-2.0.d.cts",
"default": "./gobject-2.0.cjs"
}
}
},
"scripts": {
"test": "yarn test:esm && yarn test:cjs",
"test:esm": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit gobject-2.0.d.ts",
"test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit gobject-2.0.d.cts"
},
"dependencies": {
"@girs/gjs": "^3.2.4",
"@girs/glib-2.0": "^2.78.0-3.2.4"
},
"devDependencies": {
"typescript": "*"
},
"keywords": [
"Gir",
"TypeScript",
"types",
"GObject-Introspection",
"GJS",
"GObject-2.0"
],
"author": "ts-for-gir",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/gjsify/types.git"
},
"bugs": {
"url": "https://github.com/gjsify/ts-for-gir/issues"
},
"homepage": "https://github.com/gjsify/types/tree/main/gobject-2.0#readme"
}
@@ -0,0 +1,23 @@
{
"compilerOptions": {
// General settings for code interpretation
"target": "ESNext",
"module": "ESNext",
"lib": ["ESNext"],
"types": [],
"experimentalDecorators": true,
"moduleResolution": "node",
"noEmit": true,
"noEmitOnError": false,
"baseUrl": "./",
"rootDir": ".",
// General settings for code generation
"removeComments": false,
"inlineSourceMap": false,
"inlineSources": false,
"newLine": "LF"
},
"include": ["./gobject-2.0.d.ts"]
}
@@ -0,0 +1,7 @@
{
"entryPoints": ["./gobject-2.0.d.ts"],
"readme": "./README.md",
"name": "GObject-2.0",
"tsconfig": "./tsconfig.json"
}
@@ -0,0 +1,92 @@
# Gtk-3.0
![version](https://img.shields.io/npm/v/@girs/gtk-3.0)
![downloads/week](https://img.shields.io/npm/dw/@girs/gtk-3.0)
GJS TypeScript type definitions for Gtk-3.0, generated from library version 3.24.38 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
GTK+ is the primary library used to construct user interfaces in GNOME applications. It provides user interface controls and signal callbacks to control user interfaces.
## Install
To use this type definitions, install them with NPM:
```bash
npm install @girs/gtk-3.0
```
## Usage
You can import this package into your project like this:
```ts
import Gtk from '@girs/gtk-3.0';
```
Or if you prefer CommonJS, you can also use this:
```ts
const Gtk = require('@girs/gtk-3.0');
```
### Ambient Modules
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.
For this you need to include `@girs/gtk-3.0` or `@girs/gtk-3.0/ambient` in your `tsconfig` or entry point Typescript file:
`index.ts`:
```ts
import '@girs/gtk-3.0'
```
`tsconfig.json`:
```json
{
"compilerOptions": {
...
},
"include": ["@girs/gtk-3.0"],
...
}
```
Now you can import the ambient module with TypeScript support:
```ts
import Gtk from 'gi://Gtk?version=3.0';
```
### Global import
You can also import the module with Typescript support using the global `imports.gi` object of GJS.
For this you need to include `@girs/gtk-3.0` or `@girs/gtk-3.0/import` in your `tsconfig` or entry point Typescript file:
`index.ts`:
```ts
import '@girs/gtk-3.0'
```
`tsconfig.json`:
```json
{
"compilerOptions": {
...
},
"include": ["@girs/gtk-3.0"],
...
}
```
Now you have also type support for this, too:
```ts
const Gtk = imports.gi.Gtk;
```
### Bundle
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).
## Other packages
All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
@@ -0,0 +1,9 @@
declare module 'gi://Gtk?version=3.0' {
import Gtk30 from '@girs/gtk-3.0';
export default Gtk30;
}
@@ -0,0 +1,13 @@
import Gtk30 from '@girs/gtk-3.0';
declare global {
export interface GjsGiImports {
Gtk: typeof Gtk30;
}
}
export default GjsGiImports;
@@ -0,0 +1,11 @@
imports.gi.versions.Gtk = '3.0'
const Gtk = imports.gi.Gtk;
module.exports = Gtk;
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
// @ts-expect-error
import Gtk from 'gi://Gtk?version=3.0';
export { Gtk };
export default Gtk;
@@ -0,0 +1,63 @@
{
"name": "@girs/gtk-3.0",
"version": "3.24.38-3.2.4",
"description": "GJS TypeScript type definitions for Gtk-3.0, generated from library version 3.24.38",
"type": "module",
"module": "gtk-3.0.js",
"main": "gtk-3.0.js",
"exports": {
"./ambient": "./gtk-3.0-ambient.d.ts",
"./import": "./gtk-3.0-import.d.ts",
".": {
"import": {
"types": "./gtk-3.0.d.ts",
"default": "./gtk-3.0.js"
},
"require": {
"types": "./gtk-3.0.d.cts",
"default": "./gtk-3.0.cjs"
}
}
},
"scripts": {
"test": "yarn test:esm && yarn test:cjs",
"test:esm": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit gtk-3.0.d.ts",
"test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit gtk-3.0.d.cts"
},
"dependencies": {
"@girs/atk-1.0": "^2.50.0-3.2.4",
"@girs/cairo-1.0": "^1.0.0-3.2.4",
"@girs/freetype2-2.0": "^2.0.0-3.2.4",
"@girs/gdk-3.0": "^3.24.38-3.2.4",
"@girs/gdkpixbuf-2.0": "^2.0.0-3.2.4",
"@girs/gio-2.0": "^2.78.0-3.2.4",
"@girs/gjs": "^3.2.4",
"@girs/glib-2.0": "^2.78.0-3.2.4",
"@girs/gmodule-2.0": "^2.0.0-3.2.4",
"@girs/gobject-2.0": "^2.78.0-3.2.4",
"@girs/harfbuzz-0.0": "^8.2.1-3.2.4",
"@girs/pango-1.0": "^1.51.0-3.2.4",
"@girs/xlib-2.0": "^2.0.0-3.2.4"
},
"devDependencies": {
"typescript": "*"
},
"keywords": [
"Gir",
"TypeScript",
"types",
"GObject-Introspection",
"GJS",
"Gtk-3.0"
],
"author": "ts-for-gir",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/gjsify/types.git"
},
"bugs": {
"url": "https://github.com/gjsify/ts-for-gir/issues"
},
"homepage": "https://github.com/gjsify/types/tree/main/gtk-3.0#readme"
}
@@ -0,0 +1,23 @@
{
"compilerOptions": {
// General settings for code interpretation
"target": "ESNext",
"module": "ESNext",
"lib": ["ESNext"],
"types": [],
"experimentalDecorators": true,
"moduleResolution": "node",
"noEmit": true,
"noEmitOnError": false,
"baseUrl": "./",
"rootDir": ".",
// General settings for code generation
"removeComments": false,
"inlineSourceMap": false,
"inlineSources": false,
"newLine": "LF"
},
"include": ["./gtk-3.0.d.ts"]
}
@@ -0,0 +1,7 @@
{
"entryPoints": ["./gtk-3.0.d.ts"],
"readme": "./README.md",
"name": "Gtk-3.0",
"tsconfig": "./tsconfig.json"
}
+65
View File
@@ -0,0 +1,65 @@
{
"name": "@girs/dbusmenugtk3-0.4",
"version": "0.4.0-3.2.4",
"description": "GJS TypeScript type definitions for DbusmenuGtk3-0.4, generated from library version 0.4.0",
"type": "module",
"module": "dbusmenugtk3-0.4.js",
"main": "dbusmenugtk3-0.4.js",
"exports": {
"./ambient": "./dbusmenugtk3-0.4-ambient.d.ts",
"./import": "./dbusmenugtk3-0.4-import.d.ts",
".": {
"import": {
"types": "./dbusmenugtk3-0.4.d.ts",
"default": "./dbusmenugtk3-0.4.js"
},
"require": {
"types": "./dbusmenugtk3-0.4.d.cts",
"default": "./dbusmenugtk3-0.4.cjs"
}
}
},
"scripts": {
"test": "yarn test:esm && yarn test:cjs",
"test:esm": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit dbusmenugtk3-0.4.d.ts",
"test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit dbusmenugtk3-0.4.d.cts"
},
"dependencies": {
"@girs/atk-1.0": "^2.50.0-3.2.4",
"@girs/cairo-1.0": "^1.0.0-3.2.4",
"@girs/dbusmenu-0.4": "^0.4.0-3.2.4",
"@girs/freetype2-2.0": "^2.0.0-3.2.4",
"@girs/gdk-3.0": "^3.24.38-3.2.4",
"@girs/gdkpixbuf-2.0": "^2.0.0-3.2.4",
"@girs/gio-2.0": "^2.78.0-3.2.4",
"@girs/gjs": "^3.2.4",
"@girs/glib-2.0": "^2.78.0-3.2.4",
"@girs/gmodule-2.0": "^2.0.0-3.2.4",
"@girs/gobject-2.0": "^2.78.0-3.2.4",
"@girs/gtk-3.0": "^3.24.38-3.2.4",
"@girs/harfbuzz-0.0": "^8.2.1-3.2.4",
"@girs/pango-1.0": "^1.51.0-3.2.4",
"@girs/xlib-2.0": "^2.0.0-3.2.4"
},
"devDependencies": {
"typescript": "*"
},
"keywords": [
"Gir",
"TypeScript",
"types",
"GObject-Introspection",
"GJS",
"DbusmenuGtk3-0.4"
],
"author": "ts-for-gir",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/gjsify/types.git"
},
"bugs": {
"url": "https://github.com/gjsify/ts-for-gir/issues"
},
"homepage": "https://github.com/gjsify/types/tree/main/dbusmenugtk3-0.4#readme"
}
@@ -0,0 +1,23 @@
{
"compilerOptions": {
// General settings for code interpretation
"target": "ESNext",
"module": "ESNext",
"lib": ["ESNext"],
"types": [],
"experimentalDecorators": true,
"moduleResolution": "node",
"noEmit": true,
"noEmitOnError": false,
"baseUrl": "./",
"rootDir": ".",
// General settings for code generation
"removeComments": false,
"inlineSourceMap": false,
"inlineSources": false,
"newLine": "LF"
},
"include": ["./dbusmenugtk3-0.4.d.ts"]
}
@@ -0,0 +1,7 @@
{
"entryPoints": ["./dbusmenugtk3-0.4.d.ts"],
"readme": "./README.md",
"name": "DbusmenuGtk3-0.4",
"tsconfig": "./tsconfig.json"
}
+91
View File
@@ -0,0 +1,91 @@
# freetype2-2.0
![version](https://img.shields.io/npm/v/@girs/freetype2-2.0)
![downloads/week](https://img.shields.io/npm/dw/@girs/freetype2-2.0)
GJS TypeScript type definitions for freetype2-2.0, generated from library version 2.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
## Install
To use this type definitions, install them with NPM:
```bash
npm install @girs/freetype2-2.0
```
## Usage
You can import this package into your project like this:
```ts
import freetype2 from '@girs/freetype2-2.0';
```
Or if you prefer CommonJS, you can also use this:
```ts
const freetype2 = require('@girs/freetype2-2.0');
```
### Ambient Modules
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.
For this you need to include `@girs/freetype2-2.0` or `@girs/freetype2-2.0/ambient` in your `tsconfig` or entry point Typescript file:
`index.ts`:
```ts
import '@girs/freetype2-2.0'
```
`tsconfig.json`:
```json
{
"compilerOptions": {
...
},
"include": ["@girs/freetype2-2.0"],
...
}
```
Now you can import the ambient module with TypeScript support:
```ts
import freetype2 from 'gi://freetype2?version=2.0';
```
### Global import
You can also import the module with Typescript support using the global `imports.gi` object of GJS.
For this you need to include `@girs/freetype2-2.0` or `@girs/freetype2-2.0/import` in your `tsconfig` or entry point Typescript file:
`index.ts`:
```ts
import '@girs/freetype2-2.0'
```
`tsconfig.json`:
```json
{
"compilerOptions": {
...
},
"include": ["@girs/freetype2-2.0"],
...
}
```
Now you have also type support for this, too:
```ts
const freetype2 = imports.gi.freetype2;
```
### Bundle
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).
## Other packages
All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
@@ -0,0 +1,13 @@
declare module 'gi://freetype2?version=2.0' {
import Freetype220 from '@girs/freetype2-2.0';
export default Freetype220;
}
declare module 'gi://freetype2' {
import Freetype220 from '@girs/freetype2-2.0';
export default Freetype220;
}
@@ -0,0 +1,13 @@
import Freetype220 from '@girs/freetype2-2.0';
declare global {
export interface GjsGiImports {
freetype2: typeof Freetype220;
}
}
export default GjsGiImports;
@@ -0,0 +1,11 @@
imports.gi.versions.freetype2 = '2.0'
const freetype2 = imports.gi.freetype2;
module.exports = freetype2;
@@ -0,0 +1,58 @@
/*
* Type Definitions for Gjs (https://gjs.guide/)
*
* These type definitions are automatically generated, do not edit them by hand.
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
*/
import './freetype2-2.0-ambient.d.ts';
import './freetype2-2.0-import.d.ts';
/**
* freetype2-2.0
*/
import type GObject from '@girs/gobject-2.0';
export interface Bitmap {
}
export class Bitmap {
// Own properties of freetype2-2.0.freetype2.Bitmap
static name: string
}
export interface Face {
}
export class Face {
// Own properties of freetype2-2.0.freetype2.Face
static name: string
}
export interface Library {
}
export class Library {
// Own properties of freetype2-2.0.freetype2.Library
static name: string
}
export type Int32 = number
/**
* Name of the imported GIR library
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
*/
export const __name__: string
/**
* Version of the imported GIR library
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
*/
export const __version__: string
// END
@@ -0,0 +1,63 @@
/*
* Type Definitions for Gjs (https://gjs.guide/)
*
* These type definitions are automatically generated, do not edit them by hand.
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
*/
import './freetype2-2.0-ambient.d.ts';
import './freetype2-2.0-import.d.ts';
/**
* freetype2-2.0
*/
import type GObject from '@girs/gobject-2.0';
export namespace freetype2 {
interface Bitmap {
}
class Bitmap {
// Own properties of freetype2-2.0.freetype2.Bitmap
static name: string
}
interface Face {
}
class Face {
// Own properties of freetype2-2.0.freetype2.Face
static name: string
}
interface Library {
}
class Library {
// Own properties of freetype2-2.0.freetype2.Library
static name: string
}
type Int32 = number
/**
* Name of the imported GIR library
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
*/
const __name__: string
/**
* Version of the imported GIR library
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
*/
const __version__: string
}
export default freetype2;
// END
@@ -0,0 +1,10 @@
// @ts-expect-error
import freetype2 from 'gi://freetype2?version=2.0';
export { freetype2 };
export default freetype2;
@@ -0,0 +1,92 @@
# GObject-2.0
![version](https://img.shields.io/npm/v/@girs/gobject-2.0)
![downloads/week](https://img.shields.io/npm/dw/@girs/gobject-2.0)
GJS TypeScript type definitions for GObject-2.0, generated from library version 2.78.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
GObject provides the object system used for Pango and GTK+.
## Install
To use this type definitions, install them with NPM:
```bash
npm install @girs/gobject-2.0
```
## Usage
You can import this package into your project like this:
```ts
import GObject from '@girs/gobject-2.0';
```
Or if you prefer CommonJS, you can also use this:
```ts
const GObject = require('@girs/gobject-2.0');
```
### Ambient Modules
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.
For this you need to include `@girs/gobject-2.0` or `@girs/gobject-2.0/ambient` in your `tsconfig` or entry point Typescript file:
`index.ts`:
```ts
import '@girs/gobject-2.0'
```
`tsconfig.json`:
```json
{
"compilerOptions": {
...
},
"include": ["@girs/gobject-2.0"],
...
}
```
Now you can import the ambient module with TypeScript support:
```ts
import GObject from 'gi://GObject?version=2.0';
```
### Global import
You can also import the module with Typescript support using the global `imports.gi` object of GJS.
For this you need to include `@girs/gobject-2.0` or `@girs/gobject-2.0/import` in your `tsconfig` or entry point Typescript file:
`index.ts`:
```ts
import '@girs/gobject-2.0'
```
`tsconfig.json`:
```json
{
"compilerOptions": {
...
},
"include": ["@girs/gobject-2.0"],
...
}
```
Now you have also type support for this, too:
```ts
const GObject = imports.gi.GObject;
```
### Bundle
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).
## Other packages
All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
@@ -0,0 +1,13 @@
declare module 'gi://GObject?version=2.0' {
import GObject20 from '@girs/gobject-2.0';
export default GObject20;
}
declare module 'gi://GObject' {
import GObject20 from '@girs/gobject-2.0';
export default GObject20;
}
@@ -0,0 +1,13 @@
import GObject20 from '@girs/gobject-2.0';
declare global {
export interface GjsGiImports {
GObject: typeof GObject20;
}
}
export default GjsGiImports;

Some files were not shown because too many files have changed in this diff Show More