├── .gitignore ├── .ts-for-girrc.js ├── @types └── Gjs │ ├── Atk-1.0.d.ts │ ├── Atk-1.0.js │ ├── GLib-2.0.d.ts │ ├── GLib-2.0.js │ ├── GModule-2.0.d.ts │ ├── GModule-2.0.js │ ├── GObject-2.0.d.ts │ ├── GObject-2.0.js │ ├── Gdk-3.0.d.ts │ ├── Gdk-3.0.js │ ├── GdkPixbuf-2.0.d.ts │ ├── GdkPixbuf-2.0.js │ ├── Gio-2.0.d.ts │ ├── Gio-2.0.js │ ├── Gjs.d.ts │ ├── Gjs.js │ ├── Gtk-3.0.d.ts │ ├── Gtk-3.0.js │ ├── Handy-1.d.ts │ ├── Handy-1.js │ ├── HarfBuzz-0.0.d.ts │ ├── HarfBuzz-0.0.js │ ├── Notify-0.7.d.ts │ ├── Notify-0.7.js │ ├── Pango-1.0.d.ts │ ├── Pango-1.0.js │ ├── cairo-1.0.d.ts │ ├── cairo-1.0.js │ ├── cast.ts │ ├── index.d.ts │ ├── index.js │ ├── xlib-2.0.d.ts │ └── xlib-2.0.js ├── LICENSE ├── README.md ├── dist └── mutter_settings.js ├── install ├── package.json ├── pickawindow@lluo.gitlab.com ├── extension.js ├── metadata.json ├── schemas │ ├── gschemas.compiled │ └── org.gnome.shell.extensions.pickawindow.gschema.xml └── stylesheet.css ├── src ├── main.ts ├── pick_window.ts ├── settings.ts └── window.ts ├── tsconfig.json ├── ui ├── app_row.glade ├── bl_row.glade └── window.glade └── webpack.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | yarn.lock 3 | *.tar -------------------------------------------------------------------------------- /.ts-for-girrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | pretty: false, 3 | print: false, 4 | verbose: true, 5 | environments: ["gjs"], 6 | outdir: "@types", 7 | girDirectories: [ 8 | "/usr/share/gir-1.0", 9 | ], 10 | modules: ["Gtk-3.0", "Handy-1", "Notify-0.7"], 11 | ignore: [], 12 | exportDefault: false, 13 | }; 14 | -------------------------------------------------------------------------------- /@types/Gjs/Atk-1.0.js: -------------------------------------------------------------------------------- 1 | imports.gi.versions.Atk = '1.0'; 2 | module.exports = imports.gi.Atk; 3 | -------------------------------------------------------------------------------- /@types/Gjs/GLib-2.0.js: -------------------------------------------------------------------------------- 1 | imports.gi.versions.GLib = '2.0'; 2 | module.exports = imports.gi.GLib; 3 | -------------------------------------------------------------------------------- /@types/Gjs/GModule-2.0.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * GModule-2.0 3 | */ 4 | 5 | import * as Gjs from './Gjs'; 6 | import * as GLib from './GLib-2.0'; 7 | import * as GObject from './GObject-2.0'; 8 | 9 | export enum ModuleError { 10 | FAILED, 11 | CHECK_FAILED, 12 | } 13 | export enum ModuleFlags { 14 | LAZY, 15 | LOCAL, 16 | MASK, 17 | } 18 | export function module_build_path(directory: string | null, module_name: string): string 19 | export function module_error(): string 20 | export function module_error_quark(): GLib.Quark 21 | export function module_supported(): boolean 22 | export interface ModuleCheckInit { 23 | (module: Module): string 24 | } 25 | export interface ModuleUnload { 26 | (module: Module): void 27 | } 28 | export class Module { 29 | /* Methods of GModule.Module */ 30 | close(): boolean 31 | make_resident(): void 32 | name(): string 33 | symbol(symbol_name: string): [ /* returnType */ boolean, /* symbol */ object | null ] 34 | static name: string 35 | /* Static methods and pseudo-constructors */ 36 | static build_path(directory: string | null, module_name: string): string 37 | static error(): string 38 | static error_quark(): GLib.Quark 39 | static supported(): boolean 40 | } -------------------------------------------------------------------------------- /@types/Gjs/GModule-2.0.js: -------------------------------------------------------------------------------- 1 | imports.gi.versions.GModule = '2.0'; 2 | module.exports = imports.gi.GModule; 3 | -------------------------------------------------------------------------------- /@types/Gjs/GObject-2.0.js: -------------------------------------------------------------------------------- 1 | imports.gi.versions.GObject = '2.0'; 2 | module.exports = imports.gi.GObject; 3 | -------------------------------------------------------------------------------- /@types/Gjs/Gdk-3.0.js: -------------------------------------------------------------------------------- 1 | imports.gi.versions.Gdk = '3.0'; 2 | module.exports = imports.gi.Gdk; 3 | -------------------------------------------------------------------------------- /@types/Gjs/GdkPixbuf-2.0.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * GdkPixbuf-2.0 3 | */ 4 | 5 | import * as Gjs from './Gjs'; 6 | import * as Gio from './Gio-2.0'; 7 | import * as GObject from './GObject-2.0'; 8 | import * as GLib from './GLib-2.0'; 9 | import * as GModule from './GModule-2.0'; 10 | 11 | export enum Colorspace { 12 | RGB, 13 | } 14 | export enum InterpType { 15 | NEAREST, 16 | TILES, 17 | BILINEAR, 18 | HYPER, 19 | } 20 | export enum PixbufAlphaMode { 21 | BILEVEL, 22 | FULL, 23 | } 24 | export enum PixbufError { 25 | CORRUPT_IMAGE, 26 | INSUFFICIENT_MEMORY, 27 | BAD_OPTION, 28 | UNKNOWN_TYPE, 29 | UNSUPPORTED_OPERATION, 30 | FAILED, 31 | INCOMPLETE_ANIMATION, 32 | } 33 | export enum PixbufRotation { 34 | NONE, 35 | COUNTERCLOCKWISE, 36 | UPSIDEDOWN, 37 | CLOCKWISE, 38 | } 39 | export enum PixbufFormatFlags { 40 | WRITABLE, 41 | SCALABLE, 42 | THREADSAFE, 43 | } 44 | export const PIXBUF_MAJOR: number 45 | export const PIXBUF_MICRO: number 46 | export const PIXBUF_MINOR: number 47 | export const PIXBUF_VERSION: string 48 | export function pixbuf_error_quark(): GLib.Quark 49 | export interface PixbufDestroyNotify { 50 | (pixels: Uint8Array): void 51 | } 52 | export interface PixbufModuleFillInfoFunc { 53 | (info: PixbufFormat): void 54 | } 55 | export interface PixbufModuleFillVtableFunc { 56 | (module: PixbufModule): void 57 | } 58 | export interface PixbufModulePreparedFunc { 59 | (pixbuf: Pixbuf, anim: PixbufAnimation): void 60 | } 61 | export interface PixbufModuleSizeFunc { 62 | (width: number, height: number): void 63 | } 64 | export interface PixbufModuleUpdatedFunc { 65 | (pixbuf: Pixbuf, x: number, y: number, width: number, height: number): void 66 | } 67 | export interface PixbufSaveFunc { 68 | (buf: Uint8Array): boolean 69 | } 70 | export interface Pixbuf_ConstructProps extends GObject.Object_ConstructProps { 71 | bits_per_sample?: number 72 | colorspace?: Colorspace 73 | has_alpha?: boolean 74 | height?: number 75 | n_channels?: number 76 | pixel_bytes?: GLib.Bytes 77 | pixels?: object 78 | rowstride?: number 79 | width?: number 80 | } 81 | export class Pixbuf { 82 | /* Fields of GObject.Object */ 83 | g_type_instance: GObject.TypeInstance 84 | /* Methods of GdkPixbuf.Pixbuf */ 85 | add_alpha(substitute_color: boolean, r: number, g: number, b: number): Pixbuf 86 | apply_embedded_orientation(): Pixbuf | null 87 | composite(dest: Pixbuf, dest_x: number, dest_y: number, dest_width: number, dest_height: number, offset_x: number, offset_y: number, scale_x: number, scale_y: number, interp_type: InterpType, overall_alpha: number): void 88 | composite_color(dest: Pixbuf, dest_x: number, dest_y: number, dest_width: number, dest_height: number, offset_x: number, offset_y: number, scale_x: number, scale_y: number, interp_type: InterpType, overall_alpha: number, check_x: number, check_y: number, check_size: number, color1: number, color2: number): void 89 | composite_color_simple(dest_width: number, dest_height: number, interp_type: InterpType, overall_alpha: number, check_size: number, color1: number, color2: number): Pixbuf | null 90 | copy(): Pixbuf | null 91 | copy_area(src_x: number, src_y: number, width: number, height: number, dest_pixbuf: Pixbuf, dest_x: number, dest_y: number): void 92 | copy_options(dest_pixbuf: Pixbuf): boolean 93 | fill(pixel: number): void 94 | flip(horizontal: boolean): Pixbuf | null 95 | get_bits_per_sample(): number 96 | get_byte_length(): number 97 | get_colorspace(): Colorspace 98 | get_has_alpha(): boolean 99 | get_height(): number 100 | get_n_channels(): number 101 | get_option(key: string): string | null 102 | get_options(): GLib.HashTable 103 | get_pixels(): Uint8Array 104 | get_rowstride(): number 105 | get_width(): number 106 | new_subpixbuf(src_x: number, src_y: number, width: number, height: number): Pixbuf 107 | read_pixel_bytes(): GLib.Bytes 108 | read_pixels(): number 109 | remove_option(key: string): boolean 110 | rotate_simple(angle: PixbufRotation): Pixbuf | null 111 | saturate_and_pixelate(dest: Pixbuf, saturation: number, pixelate: boolean): void 112 | save_to_bufferv(type: string, option_keys?: string[] | null, option_values?: string[] | null): [ /* returnType */ boolean, /* buffer */ Uint8Array ] 113 | save_to_callbackv(save_func: PixbufSaveFunc, type: string, option_keys?: string[] | null, option_values?: string[] | null): boolean 114 | save_to_streamv(stream: Gio.OutputStream, type: string, option_keys?: string[] | null, option_values?: string[] | null, cancellable?: Gio.Cancellable | null): boolean 115 | save_to_streamv_async(stream: Gio.OutputStream, type: string, option_keys?: string[] | null, option_values?: string[] | null, cancellable?: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback | null): void 116 | savev(filename: string, type: string, option_keys?: string[] | null, option_values?: string[] | null): boolean 117 | scale(dest: Pixbuf, dest_x: number, dest_y: number, dest_width: number, dest_height: number, offset_x: number, offset_y: number, scale_x: number, scale_y: number, interp_type: InterpType): void 118 | scale_simple(dest_width: number, dest_height: number, interp_type: InterpType): Pixbuf | null 119 | set_option(key: string, value: string): boolean 120 | /* Methods of GObject.Object */ 121 | bind_property(source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags): GObject.Binding 122 | bind_property_full(source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags, transform_to: GObject.Closure, transform_from: GObject.Closure): GObject.Binding 123 | force_floating(): void 124 | freeze_notify(): void 125 | get_data(key: string): object | null 126 | get_property(property_name: string, value: GObject.Value): void 127 | get_qdata(quark: GLib.Quark): object | null 128 | getv(names: string[], values: GObject.Value[]): void 129 | is_floating(): boolean 130 | notify(property_name: string): void 131 | notify_by_pspec(pspec: GObject.ParamSpec): void 132 | ref(): GObject.Object 133 | ref_sink(): GObject.Object 134 | run_dispose(): void 135 | set_data(key: string, data?: object | null): void 136 | set_property(property_name: string, value: GObject.Value): void 137 | steal_data(key: string): object | null 138 | steal_qdata(quark: GLib.Quark): object | null 139 | thaw_notify(): void 140 | unref(): void 141 | watch_closure(closure: GObject.Closure): void 142 | /* Methods of Gio.Icon */ 143 | equal(icon2?: Gio.Icon | null): boolean 144 | serialize(): GLib.Variant | null 145 | to_string(): string | null 146 | /* Methods of Gio.LoadableIcon */ 147 | load(size: number, cancellable?: Gio.Cancellable | null): [ /* returnType */ Gio.InputStream, /* type */ string | null ] 148 | load_async(size: number, cancellable?: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback | null): void 149 | load_finish(res: Gio.AsyncResult): [ /* returnType */ Gio.InputStream, /* type */ string | null ] 150 | /* Virtual methods of GdkPixbuf.Pixbuf */ 151 | vfunc_equal(icon2?: Gio.Icon | null): boolean 152 | vfunc_hash(): number 153 | vfunc_serialize(): GLib.Variant | null 154 | vfunc_load(size: number, cancellable?: Gio.Cancellable | null): [ /* returnType */ Gio.InputStream, /* type */ string | null ] 155 | vfunc_load_async(size: number, cancellable?: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback | null): void 156 | vfunc_load_finish(res: Gio.AsyncResult): [ /* returnType */ Gio.InputStream, /* type */ string | null ] 157 | /* Virtual methods of GObject.Object */ 158 | vfunc_constructed(): void 159 | vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void 160 | vfunc_dispose(): void 161 | vfunc_finalize(): void 162 | vfunc_get_property(property_id: number, value: GObject.Value, pspec: GObject.ParamSpec): void 163 | vfunc_notify(pspec: GObject.ParamSpec): void 164 | vfunc_set_property(property_id: number, value: GObject.Value, pspec: GObject.ParamSpec): void 165 | /* Signals of GObject.Object */ 166 | connect(sigName: "notify", callback: (($obj: Pixbuf, pspec: GObject.ParamSpec) => void)): number 167 | connect_after(sigName: "notify", callback: (($obj: Pixbuf, pspec: GObject.ParamSpec) => void)): number 168 | emit(sigName: "notify", pspec: GObject.ParamSpec): void 169 | connect(sigName: string, callback: any): number 170 | connect_after(sigName: string, callback: any): number 171 | emit(sigName: string, ...args: any[]): void 172 | disconnect(id: number): void 173 | static name: string 174 | constructor (config?: Pixbuf_ConstructProps) 175 | _init (config?: Pixbuf_ConstructProps): void 176 | /* Static methods and pseudo-constructors */ 177 | static new(colorspace: Colorspace, has_alpha: boolean, bits_per_sample: number, width: number, height: number): Pixbuf 178 | static new_from_bytes(data: GLib.Bytes, colorspace: Colorspace, has_alpha: boolean, bits_per_sample: number, width: number, height: number, rowstride: number): Pixbuf 179 | static new_from_data(data: Uint8Array, colorspace: Colorspace, has_alpha: boolean, bits_per_sample: number, width: number, height: number, rowstride: number, destroy_fn?: PixbufDestroyNotify | null): Pixbuf 180 | static new_from_file(filename: string): Pixbuf 181 | static new_from_file_at_scale(filename: string, width: number, height: number, preserve_aspect_ratio: boolean): Pixbuf 182 | static new_from_file_at_size(filename: string, width: number, height: number): Pixbuf 183 | static new_from_inline(data: Uint8Array, copy_pixels: boolean): Pixbuf 184 | static new_from_resource(resource_path: string): Pixbuf 185 | static new_from_resource_at_scale(resource_path: string, width: number, height: number, preserve_aspect_ratio: boolean): Pixbuf 186 | static new_from_stream(stream: Gio.InputStream, cancellable?: Gio.Cancellable | null): Pixbuf 187 | static new_from_stream_at_scale(stream: Gio.InputStream, width: number, height: number, preserve_aspect_ratio: boolean, cancellable?: Gio.Cancellable | null): Pixbuf 188 | static new_from_stream_finish(async_result: Gio.AsyncResult): Pixbuf 189 | static new_from_xpm_data(data: string[]): Pixbuf 190 | static calculate_rowstride(colorspace: Colorspace, has_alpha: boolean, bits_per_sample: number, width: number, height: number): number 191 | static get_file_info(filename: string): [ /* returnType */ PixbufFormat | null, /* width */ number | null, /* height */ number | null ] 192 | static get_file_info_async(filename: string, cancellable?: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback | null): void 193 | static get_file_info_finish(async_result: Gio.AsyncResult): [ /* returnType */ PixbufFormat | null, /* width */ number, /* height */ number ] 194 | static get_formats(): PixbufFormat[] 195 | static init_modules(path: string): boolean 196 | static new_from_stream_async(stream: Gio.InputStream, cancellable?: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback | null): void 197 | static new_from_stream_at_scale_async(stream: Gio.InputStream, width: number, height: number, preserve_aspect_ratio: boolean, cancellable?: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback | null): void 198 | static save_to_stream_finish(async_result: Gio.AsyncResult): boolean 199 | static deserialize(value: GLib.Variant): Gio.Icon | null 200 | static hash(icon: object): number 201 | static new_for_string(str: string): Gio.Icon 202 | static $gtype: GObject.Type 203 | } 204 | export interface PixbufAnimation_ConstructProps extends GObject.Object_ConstructProps { 205 | } 206 | export class PixbufAnimation { 207 | /* Fields of GdkPixbuf.PixbufAnimation */ 208 | parent_instance: GObject.Object 209 | /* Fields of GObject.Object */ 210 | g_type_instance: GObject.TypeInstance 211 | /* Methods of GdkPixbuf.PixbufAnimation */ 212 | get_height(): number 213 | get_iter(start_time?: GLib.TimeVal | null): PixbufAnimationIter 214 | get_static_image(): Pixbuf 215 | get_width(): number 216 | is_static_image(): boolean 217 | /* Methods of GObject.Object */ 218 | bind_property(source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags): GObject.Binding 219 | bind_property_full(source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags, transform_to: GObject.Closure, transform_from: GObject.Closure): GObject.Binding 220 | force_floating(): void 221 | freeze_notify(): void 222 | get_data(key: string): object | null 223 | get_property(property_name: string, value: GObject.Value): void 224 | get_qdata(quark: GLib.Quark): object | null 225 | getv(names: string[], values: GObject.Value[]): void 226 | is_floating(): boolean 227 | notify(property_name: string): void 228 | notify_by_pspec(pspec: GObject.ParamSpec): void 229 | ref(): GObject.Object 230 | ref_sink(): GObject.Object 231 | run_dispose(): void 232 | set_data(key: string, data?: object | null): void 233 | set_property(property_name: string, value: GObject.Value): void 234 | steal_data(key: string): object | null 235 | steal_qdata(quark: GLib.Quark): object | null 236 | thaw_notify(): void 237 | unref(): void 238 | watch_closure(closure: GObject.Closure): void 239 | /* Virtual methods of GdkPixbuf.PixbufAnimation */ 240 | vfunc_get_iter(start_time?: GLib.TimeVal | null): PixbufAnimationIter 241 | vfunc_get_size(width: number, height: number): void 242 | vfunc_get_static_image(): Pixbuf 243 | vfunc_is_static_image(): boolean 244 | /* Virtual methods of GObject.Object */ 245 | vfunc_constructed(): void 246 | vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void 247 | vfunc_dispose(): void 248 | vfunc_finalize(): void 249 | vfunc_get_property(property_id: number, value: GObject.Value, pspec: GObject.ParamSpec): void 250 | vfunc_notify(pspec: GObject.ParamSpec): void 251 | vfunc_set_property(property_id: number, value: GObject.Value, pspec: GObject.ParamSpec): void 252 | /* Signals of GObject.Object */ 253 | connect(sigName: "notify", callback: (($obj: PixbufAnimation, pspec: GObject.ParamSpec) => void)): number 254 | connect_after(sigName: "notify", callback: (($obj: PixbufAnimation, pspec: GObject.ParamSpec) => void)): number 255 | emit(sigName: "notify", pspec: GObject.ParamSpec): void 256 | connect(sigName: string, callback: any): number 257 | connect_after(sigName: string, callback: any): number 258 | emit(sigName: string, ...args: any[]): void 259 | disconnect(id: number): void 260 | static name: string 261 | constructor (config?: PixbufAnimation_ConstructProps) 262 | _init (config?: PixbufAnimation_ConstructProps): void 263 | /* Static methods and pseudo-constructors */ 264 | static new_from_file(filename: string): PixbufAnimation 265 | static new_from_resource(resource_path: string): PixbufAnimation 266 | static new_from_stream(stream: Gio.InputStream, cancellable?: Gio.Cancellable | null): PixbufAnimation 267 | static new_from_stream_finish(async_result: Gio.AsyncResult): PixbufAnimation 268 | static new_from_stream_async(stream: Gio.InputStream, cancellable?: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback | null): void 269 | static $gtype: GObject.Type 270 | } 271 | export interface PixbufAnimationIter_ConstructProps extends GObject.Object_ConstructProps { 272 | } 273 | export class PixbufAnimationIter { 274 | /* Fields of GdkPixbuf.PixbufAnimationIter */ 275 | parent_instance: GObject.Object 276 | /* Fields of GObject.Object */ 277 | g_type_instance: GObject.TypeInstance 278 | /* Methods of GdkPixbuf.PixbufAnimationIter */ 279 | advance(current_time?: GLib.TimeVal | null): boolean 280 | get_delay_time(): number 281 | get_pixbuf(): Pixbuf 282 | on_currently_loading_frame(): boolean 283 | /* Methods of GObject.Object */ 284 | bind_property(source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags): GObject.Binding 285 | bind_property_full(source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags, transform_to: GObject.Closure, transform_from: GObject.Closure): GObject.Binding 286 | force_floating(): void 287 | freeze_notify(): void 288 | get_data(key: string): object | null 289 | get_property(property_name: string, value: GObject.Value): void 290 | get_qdata(quark: GLib.Quark): object | null 291 | getv(names: string[], values: GObject.Value[]): void 292 | is_floating(): boolean 293 | notify(property_name: string): void 294 | notify_by_pspec(pspec: GObject.ParamSpec): void 295 | ref(): GObject.Object 296 | ref_sink(): GObject.Object 297 | run_dispose(): void 298 | set_data(key: string, data?: object | null): void 299 | set_property(property_name: string, value: GObject.Value): void 300 | steal_data(key: string): object | null 301 | steal_qdata(quark: GLib.Quark): object | null 302 | thaw_notify(): void 303 | unref(): void 304 | watch_closure(closure: GObject.Closure): void 305 | /* Virtual methods of GdkPixbuf.PixbufAnimationIter */ 306 | vfunc_advance(current_time?: GLib.TimeVal | null): boolean 307 | vfunc_get_delay_time(): number 308 | vfunc_get_pixbuf(): Pixbuf 309 | vfunc_on_currently_loading_frame(): boolean 310 | /* Virtual methods of GObject.Object */ 311 | vfunc_constructed(): void 312 | vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void 313 | vfunc_dispose(): void 314 | vfunc_finalize(): void 315 | vfunc_get_property(property_id: number, value: GObject.Value, pspec: GObject.ParamSpec): void 316 | vfunc_notify(pspec: GObject.ParamSpec): void 317 | vfunc_set_property(property_id: number, value: GObject.Value, pspec: GObject.ParamSpec): void 318 | /* Signals of GObject.Object */ 319 | connect(sigName: "notify", callback: (($obj: PixbufAnimationIter, pspec: GObject.ParamSpec) => void)): number 320 | connect_after(sigName: "notify", callback: (($obj: PixbufAnimationIter, pspec: GObject.ParamSpec) => void)): number 321 | emit(sigName: "notify", pspec: GObject.ParamSpec): void 322 | connect(sigName: string, callback: any): number 323 | connect_after(sigName: string, callback: any): number 324 | emit(sigName: string, ...args: any[]): void 325 | disconnect(id: number): void 326 | static name: string 327 | constructor (config?: PixbufAnimationIter_ConstructProps) 328 | _init (config?: PixbufAnimationIter_ConstructProps): void 329 | static $gtype: GObject.Type 330 | } 331 | export interface PixbufLoader_ConstructProps extends GObject.Object_ConstructProps { 332 | } 333 | export class PixbufLoader { 334 | /* Fields of GObject.Object */ 335 | g_type_instance: GObject.TypeInstance 336 | /* Methods of GdkPixbuf.PixbufLoader */ 337 | close(): boolean 338 | get_animation(): PixbufAnimation | null 339 | get_format(): PixbufFormat | null 340 | get_pixbuf(): Pixbuf | null 341 | set_size(width: number, height: number): void 342 | write(buf: Uint8Array): boolean 343 | write_bytes(buffer: GLib.Bytes): boolean 344 | /* Methods of GObject.Object */ 345 | bind_property(source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags): GObject.Binding 346 | bind_property_full(source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags, transform_to: GObject.Closure, transform_from: GObject.Closure): GObject.Binding 347 | force_floating(): void 348 | freeze_notify(): void 349 | get_data(key: string): object | null 350 | get_property(property_name: string, value: GObject.Value): void 351 | get_qdata(quark: GLib.Quark): object | null 352 | getv(names: string[], values: GObject.Value[]): void 353 | is_floating(): boolean 354 | notify(property_name: string): void 355 | notify_by_pspec(pspec: GObject.ParamSpec): void 356 | ref(): GObject.Object 357 | ref_sink(): GObject.Object 358 | run_dispose(): void 359 | set_data(key: string, data?: object | null): void 360 | set_property(property_name: string, value: GObject.Value): void 361 | steal_data(key: string): object | null 362 | steal_qdata(quark: GLib.Quark): object | null 363 | thaw_notify(): void 364 | unref(): void 365 | watch_closure(closure: GObject.Closure): void 366 | /* Virtual methods of GdkPixbuf.PixbufLoader */ 367 | vfunc_area_prepared(): void 368 | vfunc_area_updated(x: number, y: number, width: number, height: number): void 369 | vfunc_closed(): void 370 | vfunc_size_prepared(width: number, height: number): void 371 | /* Virtual methods of GObject.Object */ 372 | vfunc_constructed(): void 373 | vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void 374 | vfunc_dispose(): void 375 | vfunc_finalize(): void 376 | vfunc_get_property(property_id: number, value: GObject.Value, pspec: GObject.ParamSpec): void 377 | vfunc_notify(pspec: GObject.ParamSpec): void 378 | vfunc_set_property(property_id: number, value: GObject.Value, pspec: GObject.ParamSpec): void 379 | /* Signals of GdkPixbuf.PixbufLoader */ 380 | connect(sigName: "area-prepared", callback: (($obj: PixbufLoader) => void)): number 381 | connect_after(sigName: "area-prepared", callback: (($obj: PixbufLoader) => void)): number 382 | emit(sigName: "area-prepared"): void 383 | connect(sigName: "area-updated", callback: (($obj: PixbufLoader, x: number, y: number, width: number, height: number) => void)): number 384 | connect_after(sigName: "area-updated", callback: (($obj: PixbufLoader, x: number, y: number, width: number, height: number) => void)): number 385 | emit(sigName: "area-updated", x: number, y: number, width: number, height: number): void 386 | connect(sigName: "closed", callback: (($obj: PixbufLoader) => void)): number 387 | connect_after(sigName: "closed", callback: (($obj: PixbufLoader) => void)): number 388 | emit(sigName: "closed"): void 389 | connect(sigName: "size-prepared", callback: (($obj: PixbufLoader, width: number, height: number) => void)): number 390 | connect_after(sigName: "size-prepared", callback: (($obj: PixbufLoader, width: number, height: number) => void)): number 391 | emit(sigName: "size-prepared", width: number, height: number): void 392 | /* Signals of GObject.Object */ 393 | connect(sigName: "notify", callback: (($obj: PixbufLoader, pspec: GObject.ParamSpec) => void)): number 394 | connect_after(sigName: "notify", callback: (($obj: PixbufLoader, pspec: GObject.ParamSpec) => void)): number 395 | emit(sigName: "notify", pspec: GObject.ParamSpec): void 396 | connect(sigName: string, callback: any): number 397 | connect_after(sigName: string, callback: any): number 398 | emit(sigName: string, ...args: any[]): void 399 | disconnect(id: number): void 400 | static name: string 401 | constructor (config?: PixbufLoader_ConstructProps) 402 | _init (config?: PixbufLoader_ConstructProps): void 403 | /* Static methods and pseudo-constructors */ 404 | static new(): PixbufLoader 405 | static new_with_mime_type(mime_type: string): PixbufLoader 406 | static new_with_type(image_type: string): PixbufLoader 407 | static $gtype: GObject.Type 408 | } 409 | export interface PixbufNonAnim_ConstructProps extends PixbufAnimation_ConstructProps { 410 | } 411 | export class PixbufNonAnim { 412 | /* Fields of GdkPixbuf.PixbufAnimation */ 413 | parent_instance: GObject.Object 414 | /* Fields of GObject.Object */ 415 | g_type_instance: GObject.TypeInstance 416 | /* Methods of GdkPixbuf.PixbufAnimation */ 417 | get_height(): number 418 | get_iter(start_time?: GLib.TimeVal | null): PixbufAnimationIter 419 | get_static_image(): Pixbuf 420 | get_width(): number 421 | is_static_image(): boolean 422 | /* Methods of GObject.Object */ 423 | bind_property(source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags): GObject.Binding 424 | bind_property_full(source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags, transform_to: GObject.Closure, transform_from: GObject.Closure): GObject.Binding 425 | force_floating(): void 426 | freeze_notify(): void 427 | get_data(key: string): object | null 428 | get_property(property_name: string, value: GObject.Value): void 429 | get_qdata(quark: GLib.Quark): object | null 430 | getv(names: string[], values: GObject.Value[]): void 431 | is_floating(): boolean 432 | notify(property_name: string): void 433 | notify_by_pspec(pspec: GObject.ParamSpec): void 434 | ref(): GObject.Object 435 | ref_sink(): GObject.Object 436 | run_dispose(): void 437 | set_data(key: string, data?: object | null): void 438 | set_property(property_name: string, value: GObject.Value): void 439 | steal_data(key: string): object | null 440 | steal_qdata(quark: GLib.Quark): object | null 441 | thaw_notify(): void 442 | unref(): void 443 | watch_closure(closure: GObject.Closure): void 444 | /* Virtual methods of GdkPixbuf.PixbufAnimation */ 445 | vfunc_get_iter(start_time?: GLib.TimeVal | null): PixbufAnimationIter 446 | vfunc_get_size(width: number, height: number): void 447 | vfunc_get_static_image(): Pixbuf 448 | vfunc_is_static_image(): boolean 449 | /* Virtual methods of GObject.Object */ 450 | vfunc_constructed(): void 451 | vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void 452 | vfunc_dispose(): void 453 | vfunc_finalize(): void 454 | vfunc_get_property(property_id: number, value: GObject.Value, pspec: GObject.ParamSpec): void 455 | vfunc_notify(pspec: GObject.ParamSpec): void 456 | vfunc_set_property(property_id: number, value: GObject.Value, pspec: GObject.ParamSpec): void 457 | /* Signals of GObject.Object */ 458 | connect(sigName: "notify", callback: (($obj: PixbufNonAnim, pspec: GObject.ParamSpec) => void)): number 459 | connect_after(sigName: "notify", callback: (($obj: PixbufNonAnim, pspec: GObject.ParamSpec) => void)): number 460 | emit(sigName: "notify", pspec: GObject.ParamSpec): void 461 | connect(sigName: string, callback: any): number 462 | connect_after(sigName: string, callback: any): number 463 | emit(sigName: string, ...args: any[]): void 464 | disconnect(id: number): void 465 | static name: string 466 | constructor (config?: PixbufNonAnim_ConstructProps) 467 | _init (config?: PixbufNonAnim_ConstructProps): void 468 | /* Static methods and pseudo-constructors */ 469 | static new(pixbuf: Pixbuf): PixbufNonAnim 470 | static $gtype: GObject.Type 471 | } 472 | export interface PixbufSimpleAnim_ConstructProps extends PixbufAnimation_ConstructProps { 473 | loop?: boolean 474 | } 475 | export class PixbufSimpleAnim { 476 | /* Properties of GdkPixbuf.PixbufSimpleAnim */ 477 | loop: boolean 478 | /* Fields of GdkPixbuf.PixbufAnimation */ 479 | parent_instance: GObject.Object 480 | /* Fields of GObject.Object */ 481 | g_type_instance: GObject.TypeInstance 482 | /* Methods of GdkPixbuf.PixbufSimpleAnim */ 483 | add_frame(pixbuf: Pixbuf): void 484 | get_loop(): boolean 485 | set_loop(loop: boolean): void 486 | /* Methods of GdkPixbuf.PixbufAnimation */ 487 | get_height(): number 488 | get_iter(start_time?: GLib.TimeVal | null): PixbufAnimationIter 489 | get_static_image(): Pixbuf 490 | get_width(): number 491 | is_static_image(): boolean 492 | /* Methods of GObject.Object */ 493 | bind_property(source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags): GObject.Binding 494 | bind_property_full(source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags, transform_to: GObject.Closure, transform_from: GObject.Closure): GObject.Binding 495 | force_floating(): void 496 | freeze_notify(): void 497 | get_data(key: string): object | null 498 | get_property(property_name: string, value: GObject.Value): void 499 | get_qdata(quark: GLib.Quark): object | null 500 | getv(names: string[], values: GObject.Value[]): void 501 | is_floating(): boolean 502 | notify(property_name: string): void 503 | notify_by_pspec(pspec: GObject.ParamSpec): void 504 | ref(): GObject.Object 505 | ref_sink(): GObject.Object 506 | run_dispose(): void 507 | set_data(key: string, data?: object | null): void 508 | set_property(property_name: string, value: GObject.Value): void 509 | steal_data(key: string): object | null 510 | steal_qdata(quark: GLib.Quark): object | null 511 | thaw_notify(): void 512 | unref(): void 513 | watch_closure(closure: GObject.Closure): void 514 | /* Virtual methods of GdkPixbuf.PixbufAnimation */ 515 | vfunc_get_iter(start_time?: GLib.TimeVal | null): PixbufAnimationIter 516 | vfunc_get_size(width: number, height: number): void 517 | vfunc_get_static_image(): Pixbuf 518 | vfunc_is_static_image(): boolean 519 | /* Virtual methods of GObject.Object */ 520 | vfunc_constructed(): void 521 | vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void 522 | vfunc_dispose(): void 523 | vfunc_finalize(): void 524 | vfunc_get_property(property_id: number, value: GObject.Value, pspec: GObject.ParamSpec): void 525 | vfunc_notify(pspec: GObject.ParamSpec): void 526 | vfunc_set_property(property_id: number, value: GObject.Value, pspec: GObject.ParamSpec): void 527 | /* Signals of GObject.Object */ 528 | connect(sigName: "notify", callback: (($obj: PixbufSimpleAnim, pspec: GObject.ParamSpec) => void)): number 529 | connect_after(sigName: "notify", callback: (($obj: PixbufSimpleAnim, pspec: GObject.ParamSpec) => void)): number 530 | emit(sigName: "notify", pspec: GObject.ParamSpec): void 531 | connect(sigName: "notify::loop", callback: (($obj: PixbufSimpleAnim, pspec: GObject.ParamSpec) => void)): number 532 | connect_after(sigName: "notify::loop", callback: (($obj: PixbufSimpleAnim, pspec: GObject.ParamSpec) => void)): number 533 | connect(sigName: string, callback: any): number 534 | connect_after(sigName: string, callback: any): number 535 | emit(sigName: string, ...args: any[]): void 536 | disconnect(id: number): void 537 | static name: string 538 | constructor (config?: PixbufSimpleAnim_ConstructProps) 539 | _init (config?: PixbufSimpleAnim_ConstructProps): void 540 | /* Static methods and pseudo-constructors */ 541 | static new(width: number, height: number, rate: number): PixbufSimpleAnim 542 | static $gtype: GObject.Type 543 | } 544 | export interface PixbufSimpleAnimIter_ConstructProps extends PixbufAnimationIter_ConstructProps { 545 | } 546 | export class PixbufSimpleAnimIter { 547 | /* Fields of GdkPixbuf.PixbufAnimationIter */ 548 | parent_instance: GObject.Object 549 | /* Fields of GObject.Object */ 550 | g_type_instance: GObject.TypeInstance 551 | /* Methods of GdkPixbuf.PixbufAnimationIter */ 552 | advance(current_time?: GLib.TimeVal | null): boolean 553 | get_delay_time(): number 554 | get_pixbuf(): Pixbuf 555 | on_currently_loading_frame(): boolean 556 | /* Methods of GObject.Object */ 557 | bind_property(source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags): GObject.Binding 558 | bind_property_full(source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags, transform_to: GObject.Closure, transform_from: GObject.Closure): GObject.Binding 559 | force_floating(): void 560 | freeze_notify(): void 561 | get_data(key: string): object | null 562 | get_property(property_name: string, value: GObject.Value): void 563 | get_qdata(quark: GLib.Quark): object | null 564 | getv(names: string[], values: GObject.Value[]): void 565 | is_floating(): boolean 566 | notify(property_name: string): void 567 | notify_by_pspec(pspec: GObject.ParamSpec): void 568 | ref(): GObject.Object 569 | ref_sink(): GObject.Object 570 | run_dispose(): void 571 | set_data(key: string, data?: object | null): void 572 | set_property(property_name: string, value: GObject.Value): void 573 | steal_data(key: string): object | null 574 | steal_qdata(quark: GLib.Quark): object | null 575 | thaw_notify(): void 576 | unref(): void 577 | watch_closure(closure: GObject.Closure): void 578 | /* Virtual methods of GdkPixbuf.PixbufAnimationIter */ 579 | vfunc_advance(current_time?: GLib.TimeVal | null): boolean 580 | vfunc_get_delay_time(): number 581 | vfunc_get_pixbuf(): Pixbuf 582 | vfunc_on_currently_loading_frame(): boolean 583 | /* Virtual methods of GObject.Object */ 584 | vfunc_constructed(): void 585 | vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void 586 | vfunc_dispose(): void 587 | vfunc_finalize(): void 588 | vfunc_get_property(property_id: number, value: GObject.Value, pspec: GObject.ParamSpec): void 589 | vfunc_notify(pspec: GObject.ParamSpec): void 590 | vfunc_set_property(property_id: number, value: GObject.Value, pspec: GObject.ParamSpec): void 591 | /* Signals of GObject.Object */ 592 | connect(sigName: "notify", callback: (($obj: PixbufSimpleAnimIter, pspec: GObject.ParamSpec) => void)): number 593 | connect_after(sigName: "notify", callback: (($obj: PixbufSimpleAnimIter, pspec: GObject.ParamSpec) => void)): number 594 | emit(sigName: "notify", pspec: GObject.ParamSpec): void 595 | connect(sigName: string, callback: any): number 596 | connect_after(sigName: string, callback: any): number 597 | emit(sigName: string, ...args: any[]): void 598 | disconnect(id: number): void 599 | static name: string 600 | constructor (config?: PixbufSimpleAnimIter_ConstructProps) 601 | _init (config?: PixbufSimpleAnimIter_ConstructProps): void 602 | static $gtype: GObject.Type 603 | } 604 | export abstract class PixbufAnimationClass { 605 | /* Fields of GdkPixbuf.PixbufAnimationClass */ 606 | parent_class: GObject.ObjectClass 607 | is_static_image: (animation: PixbufAnimation) => boolean 608 | get_static_image: (animation: PixbufAnimation) => Pixbuf 609 | get_size: (animation: PixbufAnimation, width: number, height: number) => void 610 | get_iter: (animation: PixbufAnimation, start_time?: GLib.TimeVal | null) => PixbufAnimationIter 611 | static name: string 612 | } 613 | export abstract class PixbufAnimationIterClass { 614 | /* Fields of GdkPixbuf.PixbufAnimationIterClass */ 615 | parent_class: GObject.ObjectClass 616 | get_delay_time: (iter: PixbufAnimationIter) => number 617 | get_pixbuf: (iter: PixbufAnimationIter) => Pixbuf 618 | on_currently_loading_frame: (iter: PixbufAnimationIter) => boolean 619 | advance: (iter: PixbufAnimationIter, current_time?: GLib.TimeVal | null) => boolean 620 | static name: string 621 | } 622 | export class PixbufFormat { 623 | /* Fields of GdkPixbuf.PixbufFormat */ 624 | name: string 625 | signature: PixbufModulePattern 626 | domain: string 627 | description: string 628 | mime_types: string[] 629 | extensions: string[] 630 | flags: number 631 | disabled: boolean 632 | license: string 633 | /* Methods of GdkPixbuf.PixbufFormat */ 634 | copy(): PixbufFormat 635 | free(): void 636 | get_description(): string 637 | get_extensions(): string[] 638 | get_license(): string 639 | get_mime_types(): string[] 640 | get_name(): string 641 | is_disabled(): boolean 642 | is_save_option_supported(option_key: string): boolean 643 | is_scalable(): boolean 644 | is_writable(): boolean 645 | set_disabled(disabled: boolean): void 646 | static name: string 647 | } 648 | export abstract class PixbufLoaderClass { 649 | /* Fields of GdkPixbuf.PixbufLoaderClass */ 650 | parent_class: GObject.ObjectClass 651 | size_prepared: (loader: PixbufLoader, width: number, height: number) => void 652 | area_prepared: (loader: PixbufLoader) => void 653 | area_updated: (loader: PixbufLoader, x: number, y: number, width: number, height: number) => void 654 | closed: (loader: PixbufLoader) => void 655 | static name: string 656 | } 657 | export class PixbufModule { 658 | /* Fields of GdkPixbuf.PixbufModule */ 659 | module_name: string 660 | module_path: string 661 | module: GModule.Module 662 | info: PixbufFormat 663 | stop_load: (context: object) => boolean 664 | load_increment: (context: object, buf: number, size: number) => boolean 665 | save: (f: object, pixbuf: Pixbuf, param_keys: string, param_values: string) => boolean 666 | is_save_option_supported: (option_key: string) => boolean 667 | static name: string 668 | } 669 | export class PixbufModulePattern { 670 | /* Fields of GdkPixbuf.PixbufModulePattern */ 671 | prefix: string 672 | mask: string 673 | relevance: number 674 | static name: string 675 | } 676 | export abstract class PixbufSimpleAnimClass { 677 | static name: string 678 | } -------------------------------------------------------------------------------- /@types/Gjs/GdkPixbuf-2.0.js: -------------------------------------------------------------------------------- 1 | imports.gi.versions.GdkPixbuf = '2.0'; 2 | module.exports = imports.gi.GdkPixbuf; 3 | -------------------------------------------------------------------------------- /@types/Gjs/Gio-2.0.js: -------------------------------------------------------------------------------- 1 | imports.gi.versions.Gio = '2.0'; 2 | module.exports = imports.gi.Gio; 3 | -------------------------------------------------------------------------------- /@types/Gjs/Gjs.d.ts: -------------------------------------------------------------------------------- 1 | export namespace byteArray { 2 | export class ByteArray { 3 | constructor(lenOrArray: any) // May be a Uint8Array or any type accepted 4 | // as a single arg by its constructor 5 | toGBytes(): any // GLib.Bytes? 6 | toString(encoding?: string): string 7 | length: number 8 | static get(target: ByteArray, prop: number, receiver?: ByteArray): number 9 | static set(target: ByteArray, prop: number, val: number, receiver?: ByteArray): number 10 | _array: Uint8Array 11 | } 12 | export function fromString(input: string): Uint8Array 13 | export function fromArray(input: number[]): ByteArray // Odd one out for legacy reasons 14 | export function fromGBytes(input: any): Uint8Array 15 | export function toString(x: Uint8Array): string 16 | } 17 | export namespace console { 18 | export function interact(): void 19 | } 20 | export namespace Lang { 21 | // TODO: There is a lot more in Lang 22 | export function Class(props: any): void 23 | } 24 | export namespace gettext { 25 | export enum LocaleCategory { 26 | ALL, COLLATE, CTYPE, MESSAGES, MONETARY, NUMERIC, TIME 27 | } 28 | export function setlocale(category: number, locale: string|null): string 29 | export function textdomain(domainname: string|null): string 30 | export function bindtextdomain(domainname: string, dirname: string|null): string 31 | export function gettext(msgid: string): string 32 | export function dgettext(domainname: string|null, msgid: string): string 33 | export function dcgettext(domainname: string|null, msgid: string, category: number): string 34 | export function ngettext(msgid: string, msgid_plural: string, n: number): string 35 | export function dngettext(domainname: string, msgid: string, msgid_plural: string, n: number): string 36 | export function domain(domainName: string): { 37 | gettext: ((msgid: string) => string), 38 | ngettext: ((msgid: string, msgid_plural: string, n:number) => string), 39 | pgettext: ((context: any, msgid: string) => any) 40 | } 41 | } 42 | export namespace Format { 43 | export function vprintf(str: string, args: string[]): string 44 | export function printf(fmt: string, ...args: any[]): void 45 | // Following docs from gjs/modules/format.js 46 | /** 47 | * This function is intended to extend the String object and provide 48 | * an String.format API for string formatting. 49 | * It has to be set up using String.prototype.format = Format.format; 50 | * Usage: 51 | * "somestring %s %d".format('hello', 5); 52 | * It supports %s, %d, %x and %f, for %f it also support precisions like 53 | * "%.2f".format(1.526). All specifiers can be prefixed with a minimum 54 | * field width, e.g. "%5s".format("foo"). Unless the width is prefixed 55 | * with '0', the formatted string will be padded with spaces. 56 | */ 57 | export function format(fmt: string, ...args: any[]): string 58 | } 59 | export namespace Mainloop { 60 | export function quit(name: string): void 61 | export function idle_source(handler: any, priority: number): any 62 | export function idle_add(handler: any, priority: number): any 63 | export function timeout_source(timeout: any, handler: any, priority: number): any 64 | export function timeout_seconds_source(timeout: any, handler: any, priority: number): any 65 | export function timeout_add(timeout: any, handler: any, priority: number): any 66 | export function timeout_add_seconds(timeout: any, handler: any, priority: number): any 67 | export function source_remove(id: any): any 68 | export function run(name: string): void 69 | } 70 | -------------------------------------------------------------------------------- /@types/Gjs/Gjs.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | byteArray: imports.byteArray, 3 | Lang: imports.lang, 4 | Format: imports.format, 5 | Mainloop: imports.mainloop, 6 | gettext: imports.gettext 7 | } 8 | -------------------------------------------------------------------------------- /@types/Gjs/Gtk-3.0.js: -------------------------------------------------------------------------------- 1 | imports.gi.versions.Gtk = '3.0'; 2 | module.exports = imports.gi.Gtk; 3 | -------------------------------------------------------------------------------- /@types/Gjs/Handy-1.js: -------------------------------------------------------------------------------- 1 | imports.gi.versions.Handy = '1'; 2 | module.exports = imports.gi.Handy; 3 | -------------------------------------------------------------------------------- /@types/Gjs/HarfBuzz-0.0.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * HarfBuzz-0.0 3 | */ 4 | 5 | import * as Gjs from './Gjs'; 6 | import * as GObject from './GObject-2.0'; 7 | import * as GLib from './GLib-2.0'; 8 | 9 | export enum aat_layout_feature_selector_t { 10 | INVALID, 11 | ALL_TYPE_FEATURES_ON, 12 | ALL_TYPE_FEATURES_OFF, 13 | REQUIRED_LIGATURES_ON, 14 | REQUIRED_LIGATURES_OFF, 15 | COMMON_LIGATURES_ON, 16 | COMMON_LIGATURES_OFF, 17 | RARE_LIGATURES_ON, 18 | RARE_LIGATURES_OFF, 19 | LOGOS_ON, 20 | LOGOS_OFF, 21 | REBUS_PICTURES_ON, 22 | REBUS_PICTURES_OFF, 23 | DIPHTHONG_LIGATURES_ON, 24 | DIPHTHONG_LIGATURES_OFF, 25 | SQUARED_LIGATURES_ON, 26 | SQUARED_LIGATURES_OFF, 27 | ABBREV_SQUARED_LIGATURES_ON, 28 | ABBREV_SQUARED_LIGATURES_OFF, 29 | SYMBOL_LIGATURES_ON, 30 | SYMBOL_LIGATURES_OFF, 31 | CONTEXTUAL_LIGATURES_ON, 32 | CONTEXTUAL_LIGATURES_OFF, 33 | HISTORICAL_LIGATURES_ON, 34 | HISTORICAL_LIGATURES_OFF, 35 | UNCONNECTED, 36 | PARTIALLY_CONNECTED, 37 | CURSIVE, 38 | UPPER_AND_LOWER_CASE, 39 | ALL_CAPS, 40 | ALL_LOWER_CASE, 41 | SMALL_CAPS, 42 | INITIAL_CAPS, 43 | INITIAL_CAPS_AND_SMALL_CAPS, 44 | SUBSTITUTE_VERTICAL_FORMS_ON, 45 | SUBSTITUTE_VERTICAL_FORMS_OFF, 46 | LINGUISTIC_REARRANGEMENT_ON, 47 | LINGUISTIC_REARRANGEMENT_OFF, 48 | MONOSPACED_NUMBERS, 49 | PROPORTIONAL_NUMBERS, 50 | THIRD_WIDTH_NUMBERS, 51 | QUARTER_WIDTH_NUMBERS, 52 | WORD_INITIAL_SWASHES_ON, 53 | WORD_INITIAL_SWASHES_OFF, 54 | WORD_FINAL_SWASHES_ON, 55 | WORD_FINAL_SWASHES_OFF, 56 | LINE_INITIAL_SWASHES_ON, 57 | LINE_INITIAL_SWASHES_OFF, 58 | LINE_FINAL_SWASHES_ON, 59 | LINE_FINAL_SWASHES_OFF, 60 | NON_FINAL_SWASHES_ON, 61 | NON_FINAL_SWASHES_OFF, 62 | SHOW_DIACRITICS, 63 | HIDE_DIACRITICS, 64 | DECOMPOSE_DIACRITICS, 65 | NORMAL_POSITION, 66 | SUPERIORS, 67 | INFERIORS, 68 | ORDINALS, 69 | SCIENTIFIC_INFERIORS, 70 | NO_FRACTIONS, 71 | VERTICAL_FRACTIONS, 72 | DIAGONAL_FRACTIONS, 73 | PREVENT_OVERLAP_ON, 74 | PREVENT_OVERLAP_OFF, 75 | HYPHENS_TO_EM_DASH_ON, 76 | HYPHENS_TO_EM_DASH_OFF, 77 | HYPHEN_TO_EN_DASH_ON, 78 | HYPHEN_TO_EN_DASH_OFF, 79 | SLASHED_ZERO_ON, 80 | SLASHED_ZERO_OFF, 81 | FORM_INTERROBANG_ON, 82 | FORM_INTERROBANG_OFF, 83 | SMART_QUOTES_ON, 84 | SMART_QUOTES_OFF, 85 | PERIODS_TO_ELLIPSIS_ON, 86 | PERIODS_TO_ELLIPSIS_OFF, 87 | HYPHEN_TO_MINUS_ON, 88 | HYPHEN_TO_MINUS_OFF, 89 | ASTERISK_TO_MULTIPLY_ON, 90 | ASTERISK_TO_MULTIPLY_OFF, 91 | SLASH_TO_DIVIDE_ON, 92 | SLASH_TO_DIVIDE_OFF, 93 | INEQUALITY_LIGATURES_ON, 94 | INEQUALITY_LIGATURES_OFF, 95 | EXPONENTS_ON, 96 | EXPONENTS_OFF, 97 | MATHEMATICAL_GREEK_ON, 98 | MATHEMATICAL_GREEK_OFF, 99 | NO_ORNAMENTS, 100 | DINGBATS, 101 | PI_CHARACTERS, 102 | FLEURONS, 103 | DECORATIVE_BORDERS, 104 | INTERNATIONAL_SYMBOLS, 105 | MATH_SYMBOLS, 106 | NO_ALTERNATES, 107 | DESIGN_LEVEL1, 108 | DESIGN_LEVEL2, 109 | DESIGN_LEVEL3, 110 | DESIGN_LEVEL4, 111 | DESIGN_LEVEL5, 112 | NO_STYLE_OPTIONS, 113 | DISPLAY_TEXT, 114 | ENGRAVED_TEXT, 115 | ILLUMINATED_CAPS, 116 | TITLING_CAPS, 117 | TALL_CAPS, 118 | TRADITIONAL_CHARACTERS, 119 | SIMPLIFIED_CHARACTERS, 120 | JIS1978_CHARACTERS, 121 | JIS1983_CHARACTERS, 122 | JIS1990_CHARACTERS, 123 | TRADITIONAL_ALT_ONE, 124 | TRADITIONAL_ALT_TWO, 125 | TRADITIONAL_ALT_THREE, 126 | TRADITIONAL_ALT_FOUR, 127 | TRADITIONAL_ALT_FIVE, 128 | EXPERT_CHARACTERS, 129 | JIS2004_CHARACTERS, 130 | HOJO_CHARACTERS, 131 | NLCCHARACTERS, 132 | TRADITIONAL_NAMES_CHARACTERS, 133 | LOWER_CASE_NUMBERS, 134 | UPPER_CASE_NUMBERS, 135 | PROPORTIONAL_TEXT, 136 | MONOSPACED_TEXT, 137 | HALF_WIDTH_TEXT, 138 | THIRD_WIDTH_TEXT, 139 | QUARTER_WIDTH_TEXT, 140 | ALT_PROPORTIONAL_TEXT, 141 | ALT_HALF_WIDTH_TEXT, 142 | NO_TRANSLITERATION, 143 | HANJA_TO_HANGUL, 144 | HIRAGANA_TO_KATAKANA, 145 | KATAKANA_TO_HIRAGANA, 146 | KANA_TO_ROMANIZATION, 147 | ROMANIZATION_TO_HIRAGANA, 148 | ROMANIZATION_TO_KATAKANA, 149 | HANJA_TO_HANGUL_ALT_ONE, 150 | HANJA_TO_HANGUL_ALT_TWO, 151 | HANJA_TO_HANGUL_ALT_THREE, 152 | NO_ANNOTATION, 153 | BOX_ANNOTATION, 154 | ROUNDED_BOX_ANNOTATION, 155 | CIRCLE_ANNOTATION, 156 | INVERTED_CIRCLE_ANNOTATION, 157 | PARENTHESIS_ANNOTATION, 158 | PERIOD_ANNOTATION, 159 | ROMAN_NUMERAL_ANNOTATION, 160 | DIAMOND_ANNOTATION, 161 | INVERTED_BOX_ANNOTATION, 162 | INVERTED_ROUNDED_BOX_ANNOTATION, 163 | FULL_WIDTH_KANA, 164 | PROPORTIONAL_KANA, 165 | FULL_WIDTH_IDEOGRAPHS, 166 | PROPORTIONAL_IDEOGRAPHS, 167 | HALF_WIDTH_IDEOGRAPHS, 168 | CANONICAL_COMPOSITION_ON, 169 | CANONICAL_COMPOSITION_OFF, 170 | COMPATIBILITY_COMPOSITION_ON, 171 | COMPATIBILITY_COMPOSITION_OFF, 172 | TRANSCODING_COMPOSITION_ON, 173 | TRANSCODING_COMPOSITION_OFF, 174 | NO_RUBY_KANA, 175 | RUBY_KANA, 176 | RUBY_KANA_ON, 177 | RUBY_KANA_OFF, 178 | NO_CJK_SYMBOL_ALTERNATIVES, 179 | CJK_SYMBOL_ALT_ONE, 180 | CJK_SYMBOL_ALT_TWO, 181 | CJK_SYMBOL_ALT_THREE, 182 | CJK_SYMBOL_ALT_FOUR, 183 | CJK_SYMBOL_ALT_FIVE, 184 | NO_IDEOGRAPHIC_ALTERNATIVES, 185 | IDEOGRAPHIC_ALT_ONE, 186 | IDEOGRAPHIC_ALT_TWO, 187 | IDEOGRAPHIC_ALT_THREE, 188 | IDEOGRAPHIC_ALT_FOUR, 189 | IDEOGRAPHIC_ALT_FIVE, 190 | CJK_VERTICAL_ROMAN_CENTERED, 191 | CJK_VERTICAL_ROMAN_HBASELINE, 192 | NO_CJK_ITALIC_ROMAN, 193 | CJK_ITALIC_ROMAN, 194 | CJK_ITALIC_ROMAN_ON, 195 | CJK_ITALIC_ROMAN_OFF, 196 | CASE_SENSITIVE_LAYOUT_ON, 197 | CASE_SENSITIVE_LAYOUT_OFF, 198 | CASE_SENSITIVE_SPACING_ON, 199 | CASE_SENSITIVE_SPACING_OFF, 200 | ALTERNATE_HORIZ_KANA_ON, 201 | ALTERNATE_HORIZ_KANA_OFF, 202 | ALTERNATE_VERT_KANA_ON, 203 | ALTERNATE_VERT_KANA_OFF, 204 | NO_STYLISTIC_ALTERNATES, 205 | STYLISTIC_ALT_ONE_ON, 206 | STYLISTIC_ALT_ONE_OFF, 207 | STYLISTIC_ALT_TWO_ON, 208 | STYLISTIC_ALT_TWO_OFF, 209 | STYLISTIC_ALT_THREE_ON, 210 | STYLISTIC_ALT_THREE_OFF, 211 | STYLISTIC_ALT_FOUR_ON, 212 | STYLISTIC_ALT_FOUR_OFF, 213 | STYLISTIC_ALT_FIVE_ON, 214 | STYLISTIC_ALT_FIVE_OFF, 215 | STYLISTIC_ALT_SIX_ON, 216 | STYLISTIC_ALT_SIX_OFF, 217 | STYLISTIC_ALT_SEVEN_ON, 218 | STYLISTIC_ALT_SEVEN_OFF, 219 | STYLISTIC_ALT_EIGHT_ON, 220 | STYLISTIC_ALT_EIGHT_OFF, 221 | STYLISTIC_ALT_NINE_ON, 222 | STYLISTIC_ALT_NINE_OFF, 223 | STYLISTIC_ALT_TEN_ON, 224 | STYLISTIC_ALT_TEN_OFF, 225 | STYLISTIC_ALT_ELEVEN_ON, 226 | STYLISTIC_ALT_ELEVEN_OFF, 227 | STYLISTIC_ALT_TWELVE_ON, 228 | STYLISTIC_ALT_TWELVE_OFF, 229 | STYLISTIC_ALT_THIRTEEN_ON, 230 | STYLISTIC_ALT_THIRTEEN_OFF, 231 | STYLISTIC_ALT_FOURTEEN_ON, 232 | STYLISTIC_ALT_FOURTEEN_OFF, 233 | STYLISTIC_ALT_FIFTEEN_ON, 234 | STYLISTIC_ALT_FIFTEEN_OFF, 235 | STYLISTIC_ALT_SIXTEEN_ON, 236 | STYLISTIC_ALT_SIXTEEN_OFF, 237 | STYLISTIC_ALT_SEVENTEEN_ON, 238 | STYLISTIC_ALT_SEVENTEEN_OFF, 239 | STYLISTIC_ALT_EIGHTEEN_ON, 240 | STYLISTIC_ALT_EIGHTEEN_OFF, 241 | STYLISTIC_ALT_NINETEEN_ON, 242 | STYLISTIC_ALT_NINETEEN_OFF, 243 | STYLISTIC_ALT_TWENTY_ON, 244 | STYLISTIC_ALT_TWENTY_OFF, 245 | CONTEXTUAL_ALTERNATES_ON, 246 | CONTEXTUAL_ALTERNATES_OFF, 247 | SWASH_ALTERNATES_ON, 248 | SWASH_ALTERNATES_OFF, 249 | CONTEXTUAL_SWASH_ALTERNATES_ON, 250 | CONTEXTUAL_SWASH_ALTERNATES_OFF, 251 | DEFAULT_LOWER_CASE, 252 | LOWER_CASE_SMALL_CAPS, 253 | LOWER_CASE_PETITE_CAPS, 254 | DEFAULT_UPPER_CASE, 255 | UPPER_CASE_SMALL_CAPS, 256 | UPPER_CASE_PETITE_CAPS, 257 | HALF_WIDTH_CJK_ROMAN, 258 | PROPORTIONAL_CJK_ROMAN, 259 | DEFAULT_CJK_ROMAN, 260 | FULL_WIDTH_CJK_ROMAN, 261 | } 262 | export enum aat_layout_feature_type_t { 263 | INVALID, 264 | ALL_TYPOGRAPHIC, 265 | LIGATURES, 266 | CURISVE_CONNECTION, 267 | LETTER_CASE, 268 | VERTICAL_SUBSTITUTION, 269 | LINGUISTIC_REARRANGEMENT, 270 | NUMBER_SPACING, 271 | SMART_SWASH_TYPE, 272 | DIACRITICS_TYPE, 273 | VERTICAL_POSITION, 274 | FRACTIONS, 275 | OVERLAPPING_CHARACTERS_TYPE, 276 | TYPOGRAPHIC_EXTRAS, 277 | MATHEMATICAL_EXTRAS, 278 | ORNAMENT_SETS_TYPE, 279 | CHARACTER_ALTERNATIVES, 280 | DESIGN_COMPLEXITY_TYPE, 281 | STYLE_OPTIONS, 282 | CHARACTER_SHAPE, 283 | NUMBER_CASE, 284 | TEXT_SPACING, 285 | TRANSLITERATION, 286 | ANNOTATION_TYPE, 287 | KANA_SPACING_TYPE, 288 | IDEOGRAPHIC_SPACING_TYPE, 289 | UNICODE_DECOMPOSITION_TYPE, 290 | RUBY_KANA, 291 | CJK_SYMBOL_ALTERNATIVES_TYPE, 292 | IDEOGRAPHIC_ALTERNATIVES_TYPE, 293 | CJK_VERTICAL_ROMAN_PLACEMENT_TYPE, 294 | ITALIC_CJK_ROMAN, 295 | CASE_SENSITIVE_LAYOUT, 296 | ALTERNATE_KANA, 297 | STYLISTIC_ALTERNATIVES, 298 | CONTEXTUAL_ALTERNATIVES, 299 | LOWER_CASE, 300 | UPPER_CASE, 301 | LANGUAGE_TAG_TYPE, 302 | CJK_ROMAN_SPACING_TYPE, 303 | } 304 | export enum buffer_cluster_level_t { 305 | MONOTONE_GRAPHEMES, 306 | MONOTONE_CHARACTERS, 307 | CHARACTERS, 308 | DEFAULT, 309 | } 310 | export enum buffer_content_type_t { 311 | INVALID, 312 | UNICODE, 313 | GLYPHS, 314 | } 315 | export enum buffer_serialize_format_t { 316 | TEXT, 317 | JSON, 318 | INVALID, 319 | } 320 | export enum direction_t { 321 | INVALID, 322 | LTR, 323 | RTL, 324 | TTB, 325 | BTT, 326 | } 327 | export enum memory_mode_t { 328 | DUPLICATE, 329 | READONLY, 330 | WRITABLE, 331 | READONLY_MAY_MAKE_WRITABLE, 332 | } 333 | export enum ot_layout_baseline_tag_t { 334 | ROMAN, 335 | HANGING, 336 | IDEO_FACE_BOTTOM_OR_LEFT, 337 | IDEO_FACE_TOP_OR_RIGHT, 338 | IDEO_EMBOX_BOTTOM_OR_LEFT, 339 | IDEO_EMBOX_TOP_OR_RIGHT, 340 | MATH, 341 | } 342 | export enum ot_layout_glyph_class_t { 343 | UNCLASSIFIED, 344 | BASE_GLYPH, 345 | LIGATURE, 346 | MARK, 347 | COMPONENT, 348 | } 349 | export enum ot_math_constant_t { 350 | SCRIPT_PERCENT_SCALE_DOWN, 351 | SCRIPT_SCRIPT_PERCENT_SCALE_DOWN, 352 | DELIMITED_SUB_FORMULA_MIN_HEIGHT, 353 | DISPLAY_OPERATOR_MIN_HEIGHT, 354 | MATH_LEADING, 355 | AXIS_HEIGHT, 356 | ACCENT_BASE_HEIGHT, 357 | FLATTENED_ACCENT_BASE_HEIGHT, 358 | SUBSCRIPT_SHIFT_DOWN, 359 | SUBSCRIPT_TOP_MAX, 360 | SUBSCRIPT_BASELINE_DROP_MIN, 361 | SUPERSCRIPT_SHIFT_UP, 362 | SUPERSCRIPT_SHIFT_UP_CRAMPED, 363 | SUPERSCRIPT_BOTTOM_MIN, 364 | SUPERSCRIPT_BASELINE_DROP_MAX, 365 | SUB_SUPERSCRIPT_GAP_MIN, 366 | SUPERSCRIPT_BOTTOM_MAX_WITH_SUBSCRIPT, 367 | SPACE_AFTER_SCRIPT, 368 | UPPER_LIMIT_GAP_MIN, 369 | UPPER_LIMIT_BASELINE_RISE_MIN, 370 | LOWER_LIMIT_GAP_MIN, 371 | LOWER_LIMIT_BASELINE_DROP_MIN, 372 | STACK_TOP_SHIFT_UP, 373 | STACK_TOP_DISPLAY_STYLE_SHIFT_UP, 374 | STACK_BOTTOM_SHIFT_DOWN, 375 | STACK_BOTTOM_DISPLAY_STYLE_SHIFT_DOWN, 376 | STACK_GAP_MIN, 377 | STACK_DISPLAY_STYLE_GAP_MIN, 378 | STRETCH_STACK_TOP_SHIFT_UP, 379 | STRETCH_STACK_BOTTOM_SHIFT_DOWN, 380 | STRETCH_STACK_GAP_ABOVE_MIN, 381 | STRETCH_STACK_GAP_BELOW_MIN, 382 | FRACTION_NUMERATOR_SHIFT_UP, 383 | FRACTION_NUMERATOR_DISPLAY_STYLE_SHIFT_UP, 384 | FRACTION_DENOMINATOR_SHIFT_DOWN, 385 | FRACTION_DENOMINATOR_DISPLAY_STYLE_SHIFT_DOWN, 386 | FRACTION_NUMERATOR_GAP_MIN, 387 | FRACTION_NUM_DISPLAY_STYLE_GAP_MIN, 388 | FRACTION_RULE_THICKNESS, 389 | FRACTION_DENOMINATOR_GAP_MIN, 390 | FRACTION_DENOM_DISPLAY_STYLE_GAP_MIN, 391 | SKEWED_FRACTION_HORIZONTAL_GAP, 392 | SKEWED_FRACTION_VERTICAL_GAP, 393 | OVERBAR_VERTICAL_GAP, 394 | OVERBAR_RULE_THICKNESS, 395 | OVERBAR_EXTRA_ASCENDER, 396 | UNDERBAR_VERTICAL_GAP, 397 | UNDERBAR_RULE_THICKNESS, 398 | UNDERBAR_EXTRA_DESCENDER, 399 | RADICAL_VERTICAL_GAP, 400 | RADICAL_DISPLAY_STYLE_VERTICAL_GAP, 401 | RADICAL_RULE_THICKNESS, 402 | RADICAL_EXTRA_ASCENDER, 403 | RADICAL_KERN_BEFORE_DEGREE, 404 | RADICAL_KERN_AFTER_DEGREE, 405 | RADICAL_DEGREE_BOTTOM_RAISE_PERCENT, 406 | } 407 | export enum ot_math_kern_t { 408 | TOP_RIGHT, 409 | TOP_LEFT, 410 | BOTTOM_RIGHT, 411 | BOTTOM_LEFT, 412 | } 413 | export enum ot_meta_tag_t { 414 | DESIGN_LANGUAGES, 415 | SUPPORTED_LANGUAGES, 416 | } 417 | export enum ot_metrics_tag_t { 418 | HORIZONTAL_ASCENDER, 419 | HORIZONTAL_DESCENDER, 420 | HORIZONTAL_LINE_GAP, 421 | HORIZONTAL_CLIPPING_ASCENT, 422 | HORIZONTAL_CLIPPING_DESCENT, 423 | VERTICAL_ASCENDER, 424 | VERTICAL_DESCENDER, 425 | VERTICAL_LINE_GAP, 426 | HORIZONTAL_CARET_RISE, 427 | HORIZONTAL_CARET_RUN, 428 | HORIZONTAL_CARET_OFFSET, 429 | VERTICAL_CARET_RISE, 430 | VERTICAL_CARET_RUN, 431 | VERTICAL_CARET_OFFSET, 432 | X_HEIGHT, 433 | CAP_HEIGHT, 434 | SUBSCRIPT_EM_X_SIZE, 435 | SUBSCRIPT_EM_Y_SIZE, 436 | SUBSCRIPT_EM_X_OFFSET, 437 | SUBSCRIPT_EM_Y_OFFSET, 438 | SUPERSCRIPT_EM_X_SIZE, 439 | SUPERSCRIPT_EM_Y_SIZE, 440 | SUPERSCRIPT_EM_X_OFFSET, 441 | SUPERSCRIPT_EM_Y_OFFSET, 442 | STRIKEOUT_SIZE, 443 | STRIKEOUT_OFFSET, 444 | UNDERLINE_SIZE, 445 | UNDERLINE_OFFSET, 446 | } 447 | export enum script_t { 448 | COMMON, 449 | INHERITED, 450 | UNKNOWN, 451 | ARABIC, 452 | ARMENIAN, 453 | BENGALI, 454 | CYRILLIC, 455 | DEVANAGARI, 456 | GEORGIAN, 457 | GREEK, 458 | GUJARATI, 459 | GURMUKHI, 460 | HANGUL, 461 | HAN, 462 | HEBREW, 463 | HIRAGANA, 464 | KANNADA, 465 | KATAKANA, 466 | LAO, 467 | LATIN, 468 | MALAYALAM, 469 | ORIYA, 470 | TAMIL, 471 | TELUGU, 472 | THAI, 473 | TIBETAN, 474 | BOPOMOFO, 475 | BRAILLE, 476 | CANADIAN_SYLLABICS, 477 | CHEROKEE, 478 | ETHIOPIC, 479 | KHMER, 480 | MONGOLIAN, 481 | MYANMAR, 482 | OGHAM, 483 | RUNIC, 484 | SINHALA, 485 | SYRIAC, 486 | THAANA, 487 | YI, 488 | DESERET, 489 | GOTHIC, 490 | OLD_ITALIC, 491 | BUHID, 492 | HANUNOO, 493 | TAGALOG, 494 | TAGBANWA, 495 | CYPRIOT, 496 | LIMBU, 497 | LINEAR_B, 498 | OSMANYA, 499 | SHAVIAN, 500 | TAI_LE, 501 | UGARITIC, 502 | BUGINESE, 503 | COPTIC, 504 | GLAGOLITIC, 505 | KHAROSHTHI, 506 | NEW_TAI_LUE, 507 | OLD_PERSIAN, 508 | SYLOTI_NAGRI, 509 | TIFINAGH, 510 | BALINESE, 511 | CUNEIFORM, 512 | NKO, 513 | PHAGS_PA, 514 | PHOENICIAN, 515 | CARIAN, 516 | CHAM, 517 | KAYAH_LI, 518 | LEPCHA, 519 | LYCIAN, 520 | LYDIAN, 521 | OL_CHIKI, 522 | REJANG, 523 | SAURASHTRA, 524 | SUNDANESE, 525 | VAI, 526 | AVESTAN, 527 | BAMUM, 528 | EGYPTIAN_HIEROGLYPHS, 529 | IMPERIAL_ARAMAIC, 530 | INSCRIPTIONAL_PAHLAVI, 531 | INSCRIPTIONAL_PARTHIAN, 532 | JAVANESE, 533 | KAITHI, 534 | LISU, 535 | MEETEI_MAYEK, 536 | OLD_SOUTH_ARABIAN, 537 | OLD_TURKIC, 538 | SAMARITAN, 539 | TAI_THAM, 540 | TAI_VIET, 541 | BATAK, 542 | BRAHMI, 543 | MANDAIC, 544 | CHAKMA, 545 | MEROITIC_CURSIVE, 546 | MEROITIC_HIEROGLYPHS, 547 | MIAO, 548 | SHARADA, 549 | SORA_SOMPENG, 550 | TAKRI, 551 | BASSA_VAH, 552 | CAUCASIAN_ALBANIAN, 553 | DUPLOYAN, 554 | ELBASAN, 555 | GRANTHA, 556 | KHOJKI, 557 | KHUDAWADI, 558 | LINEAR_A, 559 | MAHAJANI, 560 | MANICHAEAN, 561 | MENDE_KIKAKUI, 562 | MODI, 563 | MRO, 564 | NABATAEAN, 565 | OLD_NORTH_ARABIAN, 566 | OLD_PERMIC, 567 | PAHAWH_HMONG, 568 | PALMYRENE, 569 | PAU_CIN_HAU, 570 | PSALTER_PAHLAVI, 571 | SIDDHAM, 572 | TIRHUTA, 573 | WARANG_CITI, 574 | AHOM, 575 | ANATOLIAN_HIEROGLYPHS, 576 | HATRAN, 577 | MULTANI, 578 | OLD_HUNGARIAN, 579 | SIGNWRITING, 580 | ADLAM, 581 | BHAIKSUKI, 582 | MARCHEN, 583 | OSAGE, 584 | TANGUT, 585 | NEWA, 586 | MASARAM_GONDI, 587 | NUSHU, 588 | SOYOMBO, 589 | ZANABAZAR_SQUARE, 590 | DOGRA, 591 | GUNJALA_GONDI, 592 | HANIFI_ROHINGYA, 593 | MAKASAR, 594 | MEDEFAIDRIN, 595 | OLD_SOGDIAN, 596 | SOGDIAN, 597 | ELYMAIC, 598 | NANDINAGARI, 599 | NYIAKENG_PUACHUE_HMONG, 600 | WANCHO, 601 | CHORASMIAN, 602 | DIVES_AKURU, 603 | KHITAN_SMALL_SCRIPT, 604 | YEZIDI, 605 | CYPRO_MINOAN, 606 | OLD_UYGHUR, 607 | TANGSA, 608 | TOTO, 609 | VITHKUQI, 610 | INVALID, 611 | } 612 | export enum style_tag_t { 613 | ITALIC, 614 | OPTICAL_SIZE, 615 | SLANT_ANGLE, 616 | SLANT_RATIO, 617 | WIDTH, 618 | WEIGHT, 619 | } 620 | export enum unicode_combining_class_t { 621 | NOT_REORDERED, 622 | OVERLAY, 623 | NUKTA, 624 | KANA_VOICING, 625 | VIRAMA, 626 | CCC10, 627 | CCC11, 628 | CCC12, 629 | CCC13, 630 | CCC14, 631 | CCC15, 632 | CCC16, 633 | CCC17, 634 | CCC18, 635 | CCC19, 636 | CCC20, 637 | CCC21, 638 | CCC22, 639 | CCC23, 640 | CCC24, 641 | CCC25, 642 | CCC26, 643 | CCC27, 644 | CCC28, 645 | CCC29, 646 | CCC30, 647 | CCC31, 648 | CCC32, 649 | CCC33, 650 | CCC34, 651 | CCC35, 652 | CCC36, 653 | CCC84, 654 | CCC91, 655 | CCC103, 656 | CCC107, 657 | CCC118, 658 | CCC122, 659 | CCC129, 660 | CCC130, 661 | CCC133, 662 | ATTACHED_BELOW_LEFT, 663 | ATTACHED_BELOW, 664 | ATTACHED_ABOVE, 665 | ATTACHED_ABOVE_RIGHT, 666 | BELOW_LEFT, 667 | BELOW, 668 | BELOW_RIGHT, 669 | LEFT, 670 | RIGHT, 671 | ABOVE_LEFT, 672 | ABOVE, 673 | ABOVE_RIGHT, 674 | DOUBLE_BELOW, 675 | DOUBLE_ABOVE, 676 | IOTA_SUBSCRIPT, 677 | INVALID, 678 | } 679 | export enum unicode_general_category_t { 680 | CONTROL, 681 | FORMAT, 682 | UNASSIGNED, 683 | PRIVATE_USE, 684 | SURROGATE, 685 | LOWERCASE_LETTER, 686 | MODIFIER_LETTER, 687 | OTHER_LETTER, 688 | TITLECASE_LETTER, 689 | UPPERCASE_LETTER, 690 | SPACING_MARK, 691 | ENCLOSING_MARK, 692 | NON_SPACING_MARK, 693 | DECIMAL_NUMBER, 694 | LETTER_NUMBER, 695 | OTHER_NUMBER, 696 | CONNECT_PUNCTUATION, 697 | DASH_PUNCTUATION, 698 | CLOSE_PUNCTUATION, 699 | FINAL_PUNCTUATION, 700 | INITIAL_PUNCTUATION, 701 | OTHER_PUNCTUATION, 702 | OPEN_PUNCTUATION, 703 | CURRENCY_SYMBOL, 704 | MODIFIER_SYMBOL, 705 | MATH_SYMBOL, 706 | OTHER_SYMBOL, 707 | LINE_SEPARATOR, 708 | PARAGRAPH_SEPARATOR, 709 | SPACE_SEPARATOR, 710 | } 711 | export enum buffer_diff_flags_t { 712 | EQUAL, 713 | CONTENT_TYPE_MISMATCH, 714 | LENGTH_MISMATCH, 715 | NOTDEF_PRESENT, 716 | DOTTED_CIRCLE_PRESENT, 717 | CODEPOINT_MISMATCH, 718 | CLUSTER_MISMATCH, 719 | GLYPH_FLAGS_MISMATCH, 720 | POSITION_MISMATCH, 721 | } 722 | export enum buffer_flags_t { 723 | DEFAULT, 724 | BOT, 725 | EOT, 726 | PRESERVE_DEFAULT_IGNORABLES, 727 | REMOVE_DEFAULT_IGNORABLES, 728 | DO_NOT_INSERT_DOTTED_CIRCLE, 729 | } 730 | export enum buffer_serialize_flags_t { 731 | DEFAULT, 732 | NO_CLUSTERS, 733 | NO_POSITIONS, 734 | NO_GLYPH_NAMES, 735 | GLYPH_EXTENTS, 736 | GLYPH_FLAGS, 737 | NO_ADVANCES, 738 | } 739 | export enum glyph_flags_t { 740 | UNSAFE_TO_BREAK, 741 | DEFINED, 742 | } 743 | export enum ot_color_palette_flags_t { 744 | DEFAULT, 745 | USABLE_WITH_LIGHT_BACKGROUND, 746 | USABLE_WITH_DARK_BACKGROUND, 747 | } 748 | export enum ot_math_glyph_part_flags_t { 749 | EXTENDER, 750 | } 751 | export enum ot_var_axis_flags_t { 752 | HIDDEN, 753 | } 754 | export const AAT_LAYOUT_NO_SELECTOR_INDEX: number 755 | export const BUFFER_REPLACEMENT_CODEPOINT_DEFAULT: number 756 | export const FEATURE_GLOBAL_START: number 757 | export const LANGUAGE_INVALID: language_t 758 | export const MAP_VALUE_INVALID: codepoint_t 759 | export const OT_LAYOUT_DEFAULT_LANGUAGE_INDEX: number 760 | export const OT_LAYOUT_NO_FEATURE_INDEX: number 761 | export const OT_LAYOUT_NO_SCRIPT_INDEX: number 762 | export const OT_LAYOUT_NO_VARIATIONS_INDEX: number 763 | export const OT_MAX_TAGS_PER_LANGUAGE: number 764 | export const OT_MAX_TAGS_PER_SCRIPT: number 765 | export const OT_VAR_NO_AXIS_INDEX: number 766 | export const SET_VALUE_INVALID: codepoint_t 767 | export const UNICODE_MAX: number 768 | export const UNICODE_MAX_DECOMPOSITION_LEN: number 769 | export const VERSION_MAJOR: number 770 | export const VERSION_MICRO: number 771 | export const VERSION_MINOR: number 772 | export const VERSION_STRING: string 773 | export function aat_layout_feature_type_get_name_id(face: face_t, feature_type: aat_layout_feature_type_t): ot_name_id_t 774 | export function aat_layout_feature_type_get_selector_infos(face: face_t, feature_type: aat_layout_feature_type_t, start_offset: number): [ /* returnType */ number, /* selectors */ aat_layout_feature_selector_info_t[] | null, /* default_index */ number | null ] 775 | export function aat_layout_get_feature_types(face: face_t, start_offset: number): [ /* returnType */ number, /* features */ aat_layout_feature_type_t[] ] 776 | export function aat_layout_has_positioning(face: face_t): bool_t 777 | export function aat_layout_has_substitution(face: face_t): bool_t 778 | export function aat_layout_has_tracking(face: face_t): bool_t 779 | export function blob_copy_writable_or_fail(blob: blob_t): blob_t 780 | export function blob_create_from_file(file_name: string): blob_t 781 | export function blob_create_from_file_or_fail(file_name: string): blob_t 782 | export function blob_create_sub_blob(parent: blob_t, offset: number, length: number): blob_t 783 | export function blob_get_data(blob: blob_t): string[] 784 | export function blob_get_data_writable(blob: blob_t): string[] 785 | export function blob_get_empty(): blob_t 786 | export function blob_get_length(blob: blob_t): number 787 | export function blob_is_immutable(blob: blob_t): bool_t 788 | export function blob_make_immutable(blob: blob_t): void 789 | export function buffer_add(buffer: buffer_t, codepoint: codepoint_t, cluster: number): void 790 | export function buffer_add_codepoints(buffer: buffer_t, text: codepoint_t[], item_offset: number, item_length: number): void 791 | export function buffer_add_latin1(buffer: buffer_t, text: Uint8Array, item_offset: number, item_length: number): void 792 | export function buffer_add_utf16(buffer: buffer_t, text: number[], item_offset: number, item_length: number): void 793 | export function buffer_add_utf32(buffer: buffer_t, text: number[], item_offset: number, item_length: number): void 794 | export function buffer_add_utf8(buffer: buffer_t, text: Uint8Array, item_offset: number, item_length: number): void 795 | export function buffer_allocation_successful(buffer: buffer_t): bool_t 796 | export function buffer_append(buffer: buffer_t, source: buffer_t, start: number, end: number): void 797 | export function buffer_clear_contents(buffer: buffer_t): void 798 | export function buffer_create(): buffer_t 799 | export function buffer_deserialize_glyphs(buffer: buffer_t, buf: string[], font: font_t | null, format: buffer_serialize_format_t): [ /* returnType */ bool_t, /* end_ptr */ string | null ] 800 | export function buffer_deserialize_unicode(buffer: buffer_t, buf: string[], format: buffer_serialize_format_t): [ /* returnType */ bool_t, /* end_ptr */ string | null ] 801 | export function buffer_diff(buffer: buffer_t, reference: buffer_t, dottedcircle_glyph: codepoint_t, position_fuzz: number): buffer_diff_flags_t 802 | export function buffer_get_cluster_level(buffer: buffer_t): buffer_cluster_level_t 803 | export function buffer_get_content_type(buffer: buffer_t): buffer_content_type_t 804 | export function buffer_get_direction(buffer: buffer_t): direction_t 805 | export function buffer_get_empty(): buffer_t 806 | export function buffer_get_flags(buffer: buffer_t): buffer_flags_t 807 | export function buffer_get_glyph_infos(buffer: buffer_t): glyph_info_t[] 808 | export function buffer_get_glyph_positions(buffer: buffer_t): glyph_position_t[] 809 | export function buffer_get_invisible_glyph(buffer: buffer_t): codepoint_t 810 | export function buffer_get_language(buffer: buffer_t): language_t 811 | export function buffer_get_length(buffer: buffer_t): number 812 | export function buffer_get_not_found_glyph(buffer: buffer_t): codepoint_t 813 | export function buffer_get_replacement_codepoint(buffer: buffer_t): codepoint_t 814 | export function buffer_get_script(buffer: buffer_t): script_t 815 | export function buffer_get_segment_properties(buffer: buffer_t): /* props */ segment_properties_t 816 | export function buffer_get_unicode_funcs(buffer: buffer_t): unicode_funcs_t 817 | export function buffer_guess_segment_properties(buffer: buffer_t): void 818 | export function buffer_has_positions(buffer: buffer_t): bool_t 819 | export function buffer_normalize_glyphs(buffer: buffer_t): void 820 | export function buffer_pre_allocate(buffer: buffer_t, size: number): bool_t 821 | export function buffer_reset(buffer: buffer_t): void 822 | export function buffer_reverse(buffer: buffer_t): void 823 | export function buffer_reverse_clusters(buffer: buffer_t): void 824 | export function buffer_reverse_range(buffer: buffer_t, start: number, end: number): void 825 | export function buffer_serialize(buffer: buffer_t, start: number, end: number, font: font_t | null, format: buffer_serialize_format_t, flags: buffer_serialize_flags_t): [ /* returnType */ number, /* buf */ Uint8Array, /* buf_consumed */ number | null ] 826 | export function buffer_serialize_format_from_string(str: Uint8Array): buffer_serialize_format_t 827 | export function buffer_serialize_format_to_string(format: buffer_serialize_format_t): string 828 | export function buffer_serialize_glyphs(buffer: buffer_t, start: number, end: number, font: font_t | null, format: buffer_serialize_format_t, flags: buffer_serialize_flags_t): [ /* returnType */ number, /* buf */ Uint8Array, /* buf_consumed */ number | null ] 829 | export function buffer_serialize_list_formats(): string[] 830 | export function buffer_serialize_unicode(buffer: buffer_t, start: number, end: number, format: buffer_serialize_format_t, flags: buffer_serialize_flags_t): [ /* returnType */ number, /* buf */ Uint8Array, /* buf_consumed */ number | null ] 831 | export function buffer_set_cluster_level(buffer: buffer_t, cluster_level: buffer_cluster_level_t): void 832 | export function buffer_set_content_type(buffer: buffer_t, content_type: buffer_content_type_t): void 833 | export function buffer_set_direction(buffer: buffer_t, direction: direction_t): void 834 | export function buffer_set_flags(buffer: buffer_t, flags: buffer_flags_t): void 835 | export function buffer_set_invisible_glyph(buffer: buffer_t, invisible: codepoint_t): void 836 | export function buffer_set_language(buffer: buffer_t, language: language_t): void 837 | export function buffer_set_length(buffer: buffer_t, length: number): bool_t 838 | export function buffer_set_message_func(buffer: buffer_t, func: buffer_message_func_t): void 839 | export function buffer_set_not_found_glyph(buffer: buffer_t, not_found: codepoint_t): void 840 | export function buffer_set_replacement_codepoint(buffer: buffer_t, replacement: codepoint_t): void 841 | export function buffer_set_script(buffer: buffer_t, script: script_t): void 842 | export function buffer_set_segment_properties(buffer: buffer_t, props: segment_properties_t): void 843 | export function buffer_set_unicode_funcs(buffer: buffer_t, unicode_funcs: unicode_funcs_t): void 844 | export function color_get_alpha(color: color_t): number 845 | export function color_get_blue(color: color_t): number 846 | export function color_get_green(color: color_t): number 847 | export function color_get_red(color: color_t): number 848 | export function direction_from_string(str: Uint8Array): direction_t 849 | export function direction_to_string(direction: direction_t): string 850 | export function face_builder_add_table(face: face_t, tag: tag_t, blob: blob_t): bool_t 851 | export function face_builder_create(): face_t 852 | export function face_collect_unicodes(face: face_t, out: set_t): void 853 | export function face_collect_variation_selectors(face: face_t, out: set_t): void 854 | export function face_collect_variation_unicodes(face: face_t, variation_selector: codepoint_t, out: set_t): void 855 | export function face_count(blob: blob_t): number 856 | export function face_create(blob: blob_t, index: number): face_t 857 | export function face_create_for_tables(reference_table_func: reference_table_func_t): face_t 858 | export function face_get_empty(): face_t 859 | export function face_get_glyph_count(face: face_t): number 860 | export function face_get_index(face: face_t): number 861 | export function face_get_table_tags(face: face_t, start_offset: number): [ /* returnType */ number, /* table_tags */ tag_t[] ] 862 | export function face_get_upem(face: face_t): number 863 | export function face_is_immutable(face: face_t): bool_t 864 | export function face_make_immutable(face: face_t): void 865 | export function face_reference_blob(face: face_t): blob_t 866 | export function face_reference_table(face: face_t, tag: tag_t): blob_t 867 | export function face_set_glyph_count(face: face_t, glyph_count: number): void 868 | export function face_set_index(face: face_t, index: number): void 869 | export function face_set_upem(face: face_t, upem: number): void 870 | export function feature_from_string(str: Uint8Array): [ /* returnType */ bool_t, /* feature */ feature_t ] 871 | export function feature_to_string(feature: feature_t): /* buf */ string[] 872 | export function font_add_glyph_origin_for_direction(font: font_t, glyph: codepoint_t, direction: direction_t, x: position_t, y: position_t): [ /* x */ position_t, /* y */ position_t ] 873 | export function font_create(face: face_t): font_t 874 | export function font_create_sub_font(parent: font_t): font_t 875 | export function font_funcs_create(): font_funcs_t 876 | export function font_funcs_get_empty(): font_funcs_t 877 | export function font_funcs_is_immutable(ffuncs: font_funcs_t): bool_t 878 | export function font_funcs_make_immutable(ffuncs: font_funcs_t): void 879 | export function font_funcs_set_font_h_extents_func(ffuncs: font_funcs_t, func: font_get_font_h_extents_func_t): void 880 | export function font_funcs_set_font_v_extents_func(ffuncs: font_funcs_t, func: font_get_font_v_extents_func_t): void 881 | export function font_funcs_set_glyph_contour_point_func(ffuncs: font_funcs_t, func: font_get_glyph_contour_point_func_t): void 882 | export function font_funcs_set_glyph_extents_func(ffuncs: font_funcs_t, func: font_get_glyph_extents_func_t): void 883 | export function font_funcs_set_glyph_from_name_func(ffuncs: font_funcs_t, func: font_get_glyph_from_name_func_t): void 884 | export function font_funcs_set_glyph_func(ffuncs: font_funcs_t, func: font_get_glyph_func_t): void 885 | export function font_funcs_set_glyph_h_advance_func(ffuncs: font_funcs_t, func: font_get_glyph_h_advance_func_t): void 886 | export function font_funcs_set_glyph_h_advances_func(ffuncs: font_funcs_t, func: font_get_glyph_h_advances_func_t): void 887 | export function font_funcs_set_glyph_h_kerning_func(ffuncs: font_funcs_t, func: font_get_glyph_h_kerning_func_t): void 888 | export function font_funcs_set_glyph_h_origin_func(ffuncs: font_funcs_t, func: font_get_glyph_h_origin_func_t): void 889 | export function font_funcs_set_glyph_name_func(ffuncs: font_funcs_t, func: font_get_glyph_name_func_t): void 890 | export function font_funcs_set_glyph_v_advance_func(ffuncs: font_funcs_t, func: font_get_glyph_v_advance_func_t): void 891 | export function font_funcs_set_glyph_v_advances_func(ffuncs: font_funcs_t, func: font_get_glyph_v_advances_func_t): void 892 | export function font_funcs_set_glyph_v_kerning_func(ffuncs: font_funcs_t, func: font_get_glyph_v_kerning_func_t): void 893 | export function font_funcs_set_glyph_v_origin_func(ffuncs: font_funcs_t, func: font_get_glyph_v_origin_func_t): void 894 | export function font_funcs_set_nominal_glyph_func(ffuncs: font_funcs_t, func: font_get_nominal_glyph_func_t): void 895 | export function font_funcs_set_nominal_glyphs_func(ffuncs: font_funcs_t, func: font_get_nominal_glyphs_func_t): void 896 | export function font_funcs_set_variation_glyph_func(ffuncs: font_funcs_t, func: font_get_variation_glyph_func_t): void 897 | export function font_get_empty(): font_t 898 | export function font_get_extents_for_direction(font: font_t, direction: direction_t): /* extents */ font_extents_t 899 | export function font_get_face(font: font_t): face_t 900 | export function font_get_glyph(font: font_t, unicode: codepoint_t, variation_selector: codepoint_t): [ /* returnType */ bool_t, /* glyph */ codepoint_t ] 901 | export function font_get_glyph_advance_for_direction(font: font_t, glyph: codepoint_t, direction: direction_t): [ /* x */ position_t, /* y */ position_t ] 902 | export function font_get_glyph_advances_for_direction(font: font_t, direction: direction_t, count: number, first_glyph: codepoint_t, glyph_stride: number): [ /* first_advance */ position_t, /* advance_stride */ number ] 903 | export function font_get_glyph_contour_point(font: font_t, glyph: codepoint_t, point_index: number): [ /* returnType */ bool_t, /* x */ position_t, /* y */ position_t ] 904 | export function font_get_glyph_contour_point_for_origin(font: font_t, glyph: codepoint_t, point_index: number, direction: direction_t): [ /* returnType */ bool_t, /* x */ position_t, /* y */ position_t ] 905 | export function font_get_glyph_extents(font: font_t, glyph: codepoint_t): [ /* returnType */ bool_t, /* extents */ glyph_extents_t ] 906 | export function font_get_glyph_extents_for_origin(font: font_t, glyph: codepoint_t, direction: direction_t): [ /* returnType */ bool_t, /* extents */ glyph_extents_t ] 907 | export function font_get_glyph_from_name(font: font_t, name: string[]): [ /* returnType */ bool_t, /* glyph */ codepoint_t ] 908 | export function font_get_glyph_h_advance(font: font_t, glyph: codepoint_t): position_t 909 | export function font_get_glyph_h_advances(font: font_t, count: number, first_glyph: codepoint_t, glyph_stride: number, advance_stride: number): /* first_advance */ position_t 910 | export function font_get_glyph_h_kerning(font: font_t, left_glyph: codepoint_t, right_glyph: codepoint_t): position_t 911 | export function font_get_glyph_h_origin(font: font_t, glyph: codepoint_t): [ /* returnType */ bool_t, /* x */ position_t, /* y */ position_t ] 912 | export function font_get_glyph_kerning_for_direction(font: font_t, first_glyph: codepoint_t, second_glyph: codepoint_t, direction: direction_t): [ /* x */ position_t, /* y */ position_t ] 913 | export function font_get_glyph_name(font: font_t, glyph: codepoint_t): [ /* returnType */ bool_t, /* name */ string[] ] 914 | export function font_get_glyph_origin_for_direction(font: font_t, glyph: codepoint_t, direction: direction_t): [ /* x */ position_t, /* y */ position_t ] 915 | export function font_get_glyph_v_advance(font: font_t, glyph: codepoint_t): position_t 916 | export function font_get_glyph_v_advances(font: font_t, count: number, first_glyph: codepoint_t, glyph_stride: number): [ /* first_advance */ position_t, /* advance_stride */ number ] 917 | export function font_get_glyph_v_kerning(font: font_t, top_glyph: codepoint_t, bottom_glyph: codepoint_t): position_t 918 | export function font_get_glyph_v_origin(font: font_t, glyph: codepoint_t): [ /* returnType */ bool_t, /* x */ position_t, /* y */ position_t ] 919 | export function font_get_h_extents(font: font_t): [ /* returnType */ bool_t, /* extents */ font_extents_t ] 920 | export function font_get_nominal_glyph(font: font_t, unicode: codepoint_t): [ /* returnType */ bool_t, /* glyph */ codepoint_t ] 921 | export function font_get_nominal_glyphs(font: font_t, count: number, first_unicode: codepoint_t, unicode_stride: number, glyph_stride: number): [ /* returnType */ number, /* first_glyph */ codepoint_t ] 922 | export function font_get_parent(font: font_t): font_t 923 | export function font_get_ppem(font: font_t): [ /* x_ppem */ number, /* y_ppem */ number ] 924 | export function font_get_ptem(font: font_t): number 925 | export function font_get_scale(font: font_t): [ /* x_scale */ number, /* y_scale */ number ] 926 | export function font_get_v_extents(font: font_t): [ /* returnType */ bool_t, /* extents */ font_extents_t ] 927 | export function font_get_var_coords_normalized(font: font_t, length: number): number 928 | export function font_get_variation_glyph(font: font_t, unicode: codepoint_t, variation_selector: codepoint_t): [ /* returnType */ bool_t, /* glyph */ codepoint_t ] 929 | export function font_glyph_from_string(font: font_t, s: Uint8Array): [ /* returnType */ bool_t, /* glyph */ codepoint_t ] 930 | export function font_glyph_to_string(font: font_t, glyph: codepoint_t): /* s */ string[] 931 | export function font_is_immutable(font: font_t): bool_t 932 | export function font_make_immutable(font: font_t): void 933 | export function font_set_face(font: font_t, face: face_t): void 934 | export function font_set_funcs(font: font_t, klass: font_funcs_t): void 935 | export function font_set_funcs_data(font: font_t, font_data?: object | null): void 936 | export function font_set_parent(font: font_t, parent: font_t): void 937 | export function font_set_ppem(font: font_t, x_ppem: number, y_ppem: number): void 938 | export function font_set_ptem(font: font_t, ptem: number): void 939 | export function font_set_scale(font: font_t, x_scale: number, y_scale: number): void 940 | export function font_set_var_coords_design(font: font_t, coords: number[]): void 941 | export function font_set_var_coords_normalized(font: font_t, coords: number[]): void 942 | export function font_set_var_named_instance(font: font_t, instance_index: number): void 943 | export function font_set_variations(font: font_t, variations: variation_t[]): void 944 | export function font_subtract_glyph_origin_for_direction(font: font_t, glyph: codepoint_t, direction: direction_t, x: position_t, y: position_t): [ /* x */ position_t, /* y */ position_t ] 945 | export function ft_font_changed(font: font_t): void 946 | export function ft_font_get_load_flags(font: font_t): number 947 | export function ft_font_set_funcs(font: font_t): void 948 | export function ft_font_set_load_flags(font: font_t, load_flags: number): void 949 | export function ft_font_unlock_face(font: font_t): void 950 | export function glib_blob_create(gbytes: GLib.Bytes): blob_t 951 | export function glib_get_unicode_funcs(): unicode_funcs_t 952 | export function glib_script_from_script(script: script_t): GLib.UnicodeScript 953 | export function glib_script_to_script(script: GLib.UnicodeScript): script_t 954 | export function glyph_info_get_glyph_flags(info: glyph_info_t): glyph_flags_t 955 | export function language_from_string(str: Uint8Array): language_t 956 | export function language_get_default(): language_t 957 | export function language_to_string(language: language_t): string 958 | export function map_allocation_successful(map: map_t): bool_t 959 | export function map_clear(map: map_t): void 960 | export function map_create(): map_t 961 | export function map_del(map: map_t, key: codepoint_t): void 962 | export function map_get(map: map_t, key: codepoint_t): codepoint_t 963 | export function map_get_empty(): map_t 964 | export function map_get_population(map: map_t): number 965 | export function map_has(map: map_t, key: codepoint_t): bool_t 966 | export function map_is_empty(map: map_t): bool_t 967 | export function map_set(map: map_t, key: codepoint_t, value: codepoint_t): void 968 | export function ot_color_glyph_get_layers(face: face_t, glyph: codepoint_t, start_offset: number): [ /* returnType */ number, /* layers */ ot_color_layer_t[] | null ] 969 | export function ot_color_glyph_reference_png(font: font_t, glyph: codepoint_t): blob_t 970 | export function ot_color_glyph_reference_svg(face: face_t, glyph: codepoint_t): blob_t 971 | export function ot_color_has_layers(face: face_t): bool_t 972 | export function ot_color_has_palettes(face: face_t): bool_t 973 | export function ot_color_has_png(face: face_t): bool_t 974 | export function ot_color_has_svg(face: face_t): bool_t 975 | export function ot_color_palette_color_get_name_id(face: face_t, color_index: number): ot_name_id_t 976 | export function ot_color_palette_get_colors(face: face_t, palette_index: number, start_offset: number): [ /* returnType */ number, /* colors */ color_t[] | null ] 977 | export function ot_color_palette_get_count(face: face_t): number 978 | export function ot_color_palette_get_flags(face: face_t, palette_index: number): ot_color_palette_flags_t 979 | export function ot_color_palette_get_name_id(face: face_t, palette_index: number): ot_name_id_t 980 | export function ot_font_set_funcs(font: font_t): void 981 | export function ot_layout_collect_features(face: face_t, table_tag: tag_t, scripts: tag_t, languages: tag_t, features: tag_t): /* feature_indexes */ set_t 982 | export function ot_layout_collect_lookups(face: face_t, table_tag: tag_t, scripts: tag_t, languages: tag_t, features: tag_t): /* lookup_indexes */ set_t 983 | export function ot_layout_feature_get_characters(face: face_t, table_tag: tag_t, feature_index: number, start_offset: number): [ /* returnType */ number, /* characters */ codepoint_t[] ] 984 | export function ot_layout_feature_get_lookups(face: face_t, table_tag: tag_t, feature_index: number, start_offset: number): [ /* returnType */ number, /* lookup_indexes */ number[] ] 985 | export function ot_layout_feature_get_name_ids(face: face_t, table_tag: tag_t, feature_index: number): [ /* returnType */ bool_t, /* label_id */ ot_name_id_t | null, /* tooltip_id */ ot_name_id_t | null, /* sample_id */ ot_name_id_t | null, /* num_named_parameters */ number | null, /* first_param_id */ ot_name_id_t | null ] 986 | export function ot_layout_feature_with_variations_get_lookups(face: face_t, table_tag: tag_t, feature_index: number, variations_index: number, start_offset: number): [ /* returnType */ number, /* lookup_indexes */ number[] ] 987 | export function ot_layout_get_attach_points(face: face_t, glyph: codepoint_t, start_offset: number): [ /* returnType */ number, /* point_array */ number[] ] 988 | export function ot_layout_get_baseline(font: font_t, baseline_tag: ot_layout_baseline_tag_t, direction: direction_t, script_tag: tag_t, language_tag: tag_t): [ /* returnType */ bool_t, /* coord */ position_t ] 989 | export function ot_layout_get_glyph_class(face: face_t, glyph: codepoint_t): ot_layout_glyph_class_t 990 | export function ot_layout_get_glyphs_in_class(face: face_t, klass: ot_layout_glyph_class_t): /* glyphs */ set_t 991 | export function ot_layout_get_ligature_carets(font: font_t, direction: direction_t, glyph: codepoint_t, start_offset: number): [ /* returnType */ number, /* caret_array */ position_t[] ] 992 | export function ot_layout_get_size_params(face: face_t): [ /* returnType */ bool_t, /* design_size */ number, /* subfamily_id */ number, /* subfamily_name_id */ ot_name_id_t, /* range_start */ number, /* range_end */ number ] 993 | export function ot_layout_has_glyph_classes(face: face_t): bool_t 994 | export function ot_layout_has_positioning(face: face_t): bool_t 995 | export function ot_layout_has_substitution(face: face_t): bool_t 996 | export function ot_layout_language_find_feature(face: face_t, table_tag: tag_t, script_index: number, language_index: number, feature_tag: tag_t): [ /* returnType */ bool_t, /* feature_index */ number ] 997 | export function ot_layout_language_get_feature_indexes(face: face_t, table_tag: tag_t, script_index: number, language_index: number, start_offset: number): [ /* returnType */ number, /* feature_indexes */ number[] ] 998 | export function ot_layout_language_get_feature_tags(face: face_t, table_tag: tag_t, script_index: number, language_index: number, start_offset: number): [ /* returnType */ number, /* feature_tags */ tag_t[] ] 999 | export function ot_layout_language_get_required_feature(face: face_t, table_tag: tag_t, script_index: number, language_index: number): [ /* returnType */ bool_t, /* feature_index */ number, /* feature_tag */ tag_t ] 1000 | export function ot_layout_language_get_required_feature_index(face: face_t, table_tag: tag_t, script_index: number, language_index: number): [ /* returnType */ bool_t, /* feature_index */ number ] 1001 | export function ot_layout_lookup_collect_glyphs(face: face_t, table_tag: tag_t, lookup_index: number): [ /* glyphs_before */ set_t, /* glyphs_input */ set_t, /* glyphs_after */ set_t, /* glyphs_output */ set_t ] 1002 | export function ot_layout_lookup_get_glyph_alternates(face: face_t, lookup_index: number, glyph: codepoint_t, start_offset: number): [ /* returnType */ number, /* alternate_glyphs */ codepoint_t[] ] 1003 | export function ot_layout_lookup_substitute_closure(face: face_t, lookup_index: number): /* glyphs */ set_t 1004 | export function ot_layout_lookup_would_substitute(face: face_t, lookup_index: number, glyphs: codepoint_t, glyphs_length: number, zero_context: bool_t): bool_t 1005 | export function ot_layout_lookups_substitute_closure(face: face_t, lookups: set_t): /* glyphs */ set_t 1006 | export function ot_layout_script_find_language(face: face_t, table_tag: tag_t, script_index: number, language_tag: tag_t, language_index: number): bool_t 1007 | export function ot_layout_script_get_language_tags(face: face_t, table_tag: tag_t, script_index: number, start_offset: number): [ /* returnType */ number, /* language_tags */ tag_t[] ] 1008 | export function ot_layout_script_select_language(face: face_t, table_tag: tag_t, script_index: number, language_count: number, language_tags: tag_t): [ /* returnType */ bool_t, /* language_index */ number ] 1009 | export function ot_layout_table_choose_script(face: face_t, table_tag: tag_t, script_tags: tag_t): [ /* returnType */ bool_t, /* script_index */ number, /* chosen_script */ tag_t ] 1010 | export function ot_layout_table_find_feature_variations(face: face_t, table_tag: tag_t, coords: number, num_coords: number): [ /* returnType */ bool_t, /* variations_index */ number ] 1011 | export function ot_layout_table_find_script(face: face_t, table_tag: tag_t, script_tag: tag_t): [ /* returnType */ bool_t, /* script_index */ number ] 1012 | export function ot_layout_table_get_feature_tags(face: face_t, table_tag: tag_t, start_offset: number): [ /* returnType */ number, /* feature_tags */ tag_t[] ] 1013 | export function ot_layout_table_get_lookup_count(face: face_t, table_tag: tag_t): number 1014 | export function ot_layout_table_get_script_tags(face: face_t, table_tag: tag_t, start_offset: number): [ /* returnType */ number, /* script_tags */ tag_t[] ] 1015 | export function ot_layout_table_select_script(face: face_t, table_tag: tag_t, script_count: number, script_tags: tag_t): [ /* returnType */ bool_t, /* script_index */ number | null, /* chosen_script */ tag_t | null ] 1016 | export function ot_math_get_constant(font: font_t, constant: ot_math_constant_t): position_t 1017 | export function ot_math_get_glyph_assembly(font: font_t, glyph: codepoint_t, direction: direction_t, start_offset: number): [ /* returnType */ number, /* parts */ ot_math_glyph_part_t[], /* italics_correction */ position_t ] 1018 | export function ot_math_get_glyph_italics_correction(font: font_t, glyph: codepoint_t): position_t 1019 | export function ot_math_get_glyph_kerning(font: font_t, glyph: codepoint_t, kern: ot_math_kern_t, correction_height: position_t): position_t 1020 | export function ot_math_get_glyph_top_accent_attachment(font: font_t, glyph: codepoint_t): position_t 1021 | export function ot_math_get_glyph_variants(font: font_t, glyph: codepoint_t, direction: direction_t, start_offset: number): [ /* returnType */ number, /* variants */ ot_math_glyph_variant_t[] ] 1022 | export function ot_math_get_min_connector_overlap(font: font_t, direction: direction_t): position_t 1023 | export function ot_math_has_data(face: face_t): bool_t 1024 | export function ot_math_is_glyph_extended_shape(face: face_t, glyph: codepoint_t): bool_t 1025 | export function ot_meta_get_entry_tags(face: face_t, start_offset: number): [ /* returnType */ number, /* entries */ ot_meta_tag_t[] ] 1026 | export function ot_meta_reference_entry(face: face_t, meta_tag: ot_meta_tag_t): blob_t 1027 | export function ot_metrics_get_position(font: font_t, metrics_tag: ot_metrics_tag_t): [ /* returnType */ bool_t, /* position */ position_t | null ] 1028 | export function ot_metrics_get_variation(font: font_t, metrics_tag: ot_metrics_tag_t): number 1029 | export function ot_metrics_get_x_variation(font: font_t, metrics_tag: ot_metrics_tag_t): position_t 1030 | export function ot_metrics_get_y_variation(font: font_t, metrics_tag: ot_metrics_tag_t): position_t 1031 | export function ot_name_get_utf16(face: face_t, name_id: ot_name_id_t, language: language_t): [ /* returnType */ number, /* text */ number[] ] 1032 | export function ot_name_get_utf32(face: face_t, name_id: ot_name_id_t, language: language_t): [ /* returnType */ number, /* text */ number[] ] 1033 | export function ot_name_get_utf8(face: face_t, name_id: ot_name_id_t, language: language_t): [ /* returnType */ number, /* text */ string[] ] 1034 | export function ot_name_list_names(face: face_t): ot_name_entry_t[] 1035 | export function ot_shape_glyphs_closure(font: font_t, buffer: buffer_t, features: feature_t[]): /* glyphs */ set_t 1036 | export function ot_shape_plan_collect_lookups(shape_plan: shape_plan_t, table_tag: tag_t): /* lookup_indexes */ set_t 1037 | export function ot_tag_from_language(language: language_t): tag_t 1038 | export function ot_tag_to_language(tag: tag_t): language_t | null 1039 | export function ot_tag_to_script(tag: tag_t): script_t 1040 | export function ot_tags_from_script(script: script_t, script_tag_1: tag_t, script_tag_2: tag_t): void 1041 | export function ot_tags_from_script_and_language(script: script_t, language: language_t, script_count?: number | null, language_count?: number | null): [ /* script_count */ number | null, /* script_tags */ tag_t | null, /* language_count */ number | null, /* language_tags */ tag_t | null ] 1042 | export function ot_tags_to_script_and_language(script_tag: tag_t, language_tag: tag_t): [ /* script */ script_t | null, /* language */ language_t | null ] 1043 | export function ot_var_find_axis(face: face_t, axis_tag: tag_t, axis_index: number): [ /* returnType */ bool_t, /* axis_info */ ot_var_axis_t ] 1044 | export function ot_var_find_axis_info(face: face_t, axis_tag: tag_t): [ /* returnType */ bool_t, /* axis_info */ ot_var_axis_info_t ] 1045 | export function ot_var_get_axes(face: face_t, start_offset: number): [ /* returnType */ number, /* axes_array */ ot_var_axis_t[] ] 1046 | export function ot_var_get_axis_count(face: face_t): number 1047 | export function ot_var_get_axis_infos(face: face_t, start_offset: number): [ /* returnType */ number, /* axes_array */ ot_var_axis_info_t[] ] 1048 | export function ot_var_get_named_instance_count(face: face_t): number 1049 | export function ot_var_has_data(face: face_t): bool_t 1050 | export function ot_var_named_instance_get_design_coords(face: face_t, instance_index: number): [ /* returnType */ number, /* coords */ number[] ] 1051 | export function ot_var_named_instance_get_postscript_name_id(face: face_t, instance_index: number): ot_name_id_t 1052 | export function ot_var_named_instance_get_subfamily_name_id(face: face_t, instance_index: number): ot_name_id_t 1053 | export function ot_var_normalize_coords(face: face_t, coords_length: number, design_coords: number): /* normalized_coords */ number 1054 | export function ot_var_normalize_variations(face: face_t, variations: variation_t, variations_length: number): /* coords */ number[] 1055 | export function script_from_iso15924_tag(tag: tag_t): script_t 1056 | export function script_from_string(str: Uint8Array): script_t 1057 | export function script_get_horizontal_direction(script: script_t): direction_t 1058 | export function script_to_iso15924_tag(script: script_t): tag_t 1059 | export function segment_properties_equal(a: segment_properties_t, b: segment_properties_t): bool_t 1060 | export function segment_properties_hash(p: segment_properties_t): number 1061 | export function set_add(set: set_t, codepoint: codepoint_t): void 1062 | export function set_add_range(set: set_t, first: codepoint_t, last: codepoint_t): void 1063 | export function set_allocation_successful(set: set_t): bool_t 1064 | export function set_clear(set: set_t): void 1065 | export function set_copy(set: set_t): set_t 1066 | export function set_create(): set_t 1067 | export function set_del(set: set_t, codepoint: codepoint_t): void 1068 | export function set_del_range(set: set_t, first: codepoint_t, last: codepoint_t): void 1069 | export function set_get_empty(): set_t 1070 | export function set_get_max(set: set_t): codepoint_t 1071 | export function set_get_min(set: set_t): codepoint_t 1072 | export function set_get_population(set: set_t): number 1073 | export function set_has(set: set_t, codepoint: codepoint_t): bool_t 1074 | export function set_intersect(set: set_t, other: set_t): void 1075 | export function set_invert(set: set_t): void 1076 | export function set_is_empty(set: set_t): bool_t 1077 | export function set_is_equal(set: set_t, other: set_t): bool_t 1078 | export function set_is_subset(set: set_t, larger_set: set_t): bool_t 1079 | export function set_next(set: set_t, codepoint: codepoint_t): [ /* returnType */ bool_t, /* codepoint */ codepoint_t ] 1080 | export function set_next_range(set: set_t, last: codepoint_t): [ /* returnType */ bool_t, /* first */ codepoint_t, /* last */ codepoint_t ] 1081 | export function set_previous(set: set_t, codepoint: codepoint_t): [ /* returnType */ bool_t, /* codepoint */ codepoint_t ] 1082 | export function set_previous_range(set: set_t, first: codepoint_t): [ /* returnType */ bool_t, /* first */ codepoint_t, /* last */ codepoint_t ] 1083 | export function set_set(set: set_t, other: set_t): void 1084 | export function set_subtract(set: set_t, other: set_t): void 1085 | export function set_symmetric_difference(set: set_t, other: set_t): void 1086 | export function set_union(set: set_t, other: set_t): void 1087 | export function shape(font: font_t, buffer: buffer_t, features: feature_t[] | null): void 1088 | export function shape_full(font: font_t, buffer: buffer_t, features: feature_t[] | null, shaper_list?: string[] | null): bool_t 1089 | export function shape_list_shapers(): string[] 1090 | export function shape_plan_create(face: face_t, props: segment_properties_t, user_features: feature_t[], shaper_list: string[]): shape_plan_t 1091 | export function shape_plan_create2(face: face_t, props: segment_properties_t, user_features: feature_t[], coords: number[], shaper_list: string[]): shape_plan_t 1092 | export function shape_plan_create_cached(face: face_t, props: segment_properties_t, user_features: feature_t[], shaper_list: string[]): shape_plan_t 1093 | export function shape_plan_create_cached2(face: face_t, props: segment_properties_t, user_features: feature_t[], coords: number[], shaper_list: string[]): shape_plan_t 1094 | export function shape_plan_execute(shape_plan: shape_plan_t, font: font_t, buffer: buffer_t, features: feature_t[]): bool_t 1095 | export function shape_plan_get_empty(): shape_plan_t 1096 | export function shape_plan_get_shaper(shape_plan: shape_plan_t): string 1097 | export function style_get_value(font: font_t, style_tag: style_tag_t): number 1098 | export function tag_from_string(str: Uint8Array): tag_t 1099 | export function tag_to_string(tag: tag_t): /* buf */ Uint8Array 1100 | export function unicode_combining_class(ufuncs: unicode_funcs_t, unicode: codepoint_t): unicode_combining_class_t 1101 | export function unicode_compose(ufuncs: unicode_funcs_t, a: codepoint_t, b: codepoint_t): [ /* returnType */ bool_t, /* ab */ codepoint_t ] 1102 | export function unicode_decompose(ufuncs: unicode_funcs_t, ab: codepoint_t): [ /* returnType */ bool_t, /* a */ codepoint_t, /* b */ codepoint_t ] 1103 | export function unicode_decompose_compatibility(ufuncs: unicode_funcs_t, u: codepoint_t): [ /* returnType */ number, /* decomposed */ codepoint_t ] 1104 | export function unicode_eastasian_width(ufuncs: unicode_funcs_t, unicode: codepoint_t): number 1105 | export function unicode_funcs_create(parent?: unicode_funcs_t | null): unicode_funcs_t 1106 | export function unicode_funcs_get_default(): unicode_funcs_t 1107 | export function unicode_funcs_get_empty(): unicode_funcs_t 1108 | export function unicode_funcs_get_parent(ufuncs: unicode_funcs_t): unicode_funcs_t 1109 | export function unicode_funcs_is_immutable(ufuncs: unicode_funcs_t): bool_t 1110 | export function unicode_funcs_make_immutable(ufuncs: unicode_funcs_t): void 1111 | export function unicode_funcs_set_combining_class_func(ufuncs: unicode_funcs_t, func: unicode_combining_class_func_t): void 1112 | export function unicode_funcs_set_compose_func(ufuncs: unicode_funcs_t, func: unicode_compose_func_t): void 1113 | export function unicode_funcs_set_decompose_compatibility_func(ufuncs: unicode_funcs_t, func: unicode_decompose_compatibility_func_t): void 1114 | export function unicode_funcs_set_decompose_func(ufuncs: unicode_funcs_t, func: unicode_decompose_func_t): void 1115 | export function unicode_funcs_set_eastasian_width_func(ufuncs: unicode_funcs_t, func: unicode_eastasian_width_func_t): void 1116 | export function unicode_funcs_set_general_category_func(ufuncs: unicode_funcs_t, func: unicode_general_category_func_t): void 1117 | export function unicode_funcs_set_mirroring_func(ufuncs: unicode_funcs_t, func: unicode_mirroring_func_t): void 1118 | export function unicode_funcs_set_script_func(ufuncs: unicode_funcs_t, func: unicode_script_func_t): void 1119 | export function unicode_general_category(ufuncs: unicode_funcs_t, unicode: codepoint_t): unicode_general_category_t 1120 | export function unicode_mirroring(ufuncs: unicode_funcs_t, unicode: codepoint_t): codepoint_t 1121 | export function unicode_script(ufuncs: unicode_funcs_t, unicode: codepoint_t): script_t 1122 | export function variation_from_string(str: Uint8Array): [ /* returnType */ bool_t, /* variation */ variation_t ] 1123 | export function variation_to_string(variation: variation_t): /* buf */ string[] 1124 | export interface buffer_message_func_t { 1125 | (buffer: buffer_t, font: font_t, message: string): bool_t 1126 | } 1127 | export interface destroy_func_t { 1128 | (): void 1129 | } 1130 | export interface font_get_font_extents_func_t { 1131 | (font: font_t, font_data?: object | null): bool_t 1132 | } 1133 | export interface font_get_glyph_advance_func_t { 1134 | (font: font_t, font_data: object | null, glyph: codepoint_t): position_t 1135 | } 1136 | export interface font_get_glyph_advances_func_t { 1137 | (font: font_t, font_data: object | null, count: number, first_glyph: codepoint_t, glyph_stride: number, advance_stride: number): void 1138 | } 1139 | export interface font_get_glyph_contour_point_func_t { 1140 | (font: font_t, font_data: object | null, glyph: codepoint_t, point_index: number): bool_t 1141 | } 1142 | export interface font_get_glyph_extents_func_t { 1143 | (font: font_t, font_data: object | null, glyph: codepoint_t): bool_t 1144 | } 1145 | export interface font_get_glyph_from_name_func_t { 1146 | (font: font_t, font_data: object | null, name: string[]): bool_t 1147 | } 1148 | export interface font_get_glyph_func_t { 1149 | (font: font_t, font_data: object | null, unicode: codepoint_t, variation_selector: codepoint_t): bool_t 1150 | } 1151 | export interface font_get_glyph_kerning_func_t { 1152 | (font: font_t, font_data: object | null, first_glyph: codepoint_t, second_glyph: codepoint_t): position_t 1153 | } 1154 | export interface font_get_glyph_name_func_t { 1155 | (font: font_t, font_data: object | null, glyph: codepoint_t): bool_t 1156 | } 1157 | export interface font_get_glyph_origin_func_t { 1158 | (font: font_t, font_data: object | null, glyph: codepoint_t): bool_t 1159 | } 1160 | export interface font_get_nominal_glyph_func_t { 1161 | (font: font_t, font_data: object | null, unicode: codepoint_t): bool_t 1162 | } 1163 | export interface font_get_nominal_glyphs_func_t { 1164 | (font: font_t, font_data: object | null, count: number, first_unicode: codepoint_t, unicode_stride: number, glyph_stride: number): number 1165 | } 1166 | export interface font_get_variation_glyph_func_t { 1167 | (font: font_t, font_data: object | null, unicode: codepoint_t, variation_selector: codepoint_t): bool_t 1168 | } 1169 | export interface reference_table_func_t { 1170 | (face: face_t, tag: tag_t): blob_t 1171 | } 1172 | export interface unicode_combining_class_func_t { 1173 | (ufuncs: unicode_funcs_t, unicode: codepoint_t): unicode_combining_class_t 1174 | } 1175 | export interface unicode_compose_func_t { 1176 | (ufuncs: unicode_funcs_t, a: codepoint_t, b: codepoint_t): bool_t 1177 | } 1178 | export interface unicode_decompose_compatibility_func_t { 1179 | (ufuncs: unicode_funcs_t, u: codepoint_t, decomposed: codepoint_t): number 1180 | } 1181 | export interface unicode_decompose_func_t { 1182 | (ufuncs: unicode_funcs_t, ab: codepoint_t): bool_t 1183 | } 1184 | export interface unicode_eastasian_width_func_t { 1185 | (ufuncs: unicode_funcs_t, unicode: codepoint_t): number 1186 | } 1187 | export interface unicode_general_category_func_t { 1188 | (ufuncs: unicode_funcs_t, unicode: codepoint_t): unicode_general_category_t 1189 | } 1190 | export interface unicode_mirroring_func_t { 1191 | (ufuncs: unicode_funcs_t, unicode: codepoint_t): codepoint_t 1192 | } 1193 | export interface unicode_script_func_t { 1194 | (ufuncs: unicode_funcs_t, unicode: codepoint_t): script_t 1195 | } 1196 | export class aat_layout_feature_selector_info_t { 1197 | /* Fields of HarfBuzz.aat_layout_feature_selector_info_t */ 1198 | name_id: ot_name_id_t 1199 | enable: aat_layout_feature_selector_t 1200 | disable: aat_layout_feature_selector_t 1201 | static name: string 1202 | } 1203 | export class blob_t { 1204 | static name: string 1205 | } 1206 | export class buffer_t { 1207 | static name: string 1208 | } 1209 | export class face_t { 1210 | static name: string 1211 | } 1212 | export class feature_t { 1213 | /* Fields of HarfBuzz.feature_t */ 1214 | tag: tag_t 1215 | value: number 1216 | start: number 1217 | end: number 1218 | /* Methods of HarfBuzz.feature_t */ 1219 | _string(): /* buf */ string[] 1220 | static name: string 1221 | } 1222 | export class font_extents_t { 1223 | /* Fields of HarfBuzz.font_extents_t */ 1224 | ascender: position_t 1225 | descender: position_t 1226 | line_gap: position_t 1227 | static name: string 1228 | } 1229 | export class font_funcs_t { 1230 | static name: string 1231 | } 1232 | export class font_t { 1233 | static name: string 1234 | } 1235 | export class glyph_extents_t { 1236 | /* Fields of HarfBuzz.glyph_extents_t */ 1237 | x_bearing: position_t 1238 | y_bearing: position_t 1239 | width: position_t 1240 | height: position_t 1241 | static name: string 1242 | } 1243 | export class glyph_info_t { 1244 | /* Fields of HarfBuzz.glyph_info_t */ 1245 | codepoint: codepoint_t 1246 | cluster: number 1247 | static name: string 1248 | } 1249 | export class glyph_position_t { 1250 | /* Fields of HarfBuzz.glyph_position_t */ 1251 | x_advance: position_t 1252 | y_advance: position_t 1253 | x_offset: position_t 1254 | y_offset: position_t 1255 | static name: string 1256 | } 1257 | export class language_t { 1258 | /* Methods of HarfBuzz.language_t */ 1259 | _string(): string 1260 | static name: string 1261 | } 1262 | export class map_t { 1263 | static name: string 1264 | } 1265 | export class ot_color_layer_t { 1266 | /* Fields of HarfBuzz.ot_color_layer_t */ 1267 | glyph: codepoint_t 1268 | color_index: number 1269 | static name: string 1270 | } 1271 | export class ot_math_glyph_part_t { 1272 | /* Fields of HarfBuzz.ot_math_glyph_part_t */ 1273 | glyph: codepoint_t 1274 | start_connector_length: position_t 1275 | end_connector_length: position_t 1276 | full_advance: position_t 1277 | flags: ot_math_glyph_part_flags_t 1278 | static name: string 1279 | } 1280 | export class ot_math_glyph_variant_t { 1281 | /* Fields of HarfBuzz.ot_math_glyph_variant_t */ 1282 | glyph: codepoint_t 1283 | advance: position_t 1284 | static name: string 1285 | } 1286 | export class ot_name_entry_t { 1287 | /* Fields of HarfBuzz.ot_name_entry_t */ 1288 | name_id: ot_name_id_t 1289 | language: language_t 1290 | static name: string 1291 | } 1292 | export class ot_var_axis_info_t { 1293 | /* Fields of HarfBuzz.ot_var_axis_info_t */ 1294 | axis_index: number 1295 | tag: tag_t 1296 | name_id: ot_name_id_t 1297 | flags: ot_var_axis_flags_t 1298 | min_value: number 1299 | default_value: number 1300 | max_value: number 1301 | static name: string 1302 | } 1303 | export class ot_var_axis_t { 1304 | /* Fields of HarfBuzz.ot_var_axis_t */ 1305 | tag: tag_t 1306 | name_id: ot_name_id_t 1307 | min_value: number 1308 | default_value: number 1309 | max_value: number 1310 | static name: string 1311 | } 1312 | export class segment_properties_t { 1313 | /* Fields of HarfBuzz.segment_properties_t */ 1314 | direction: direction_t 1315 | script: script_t 1316 | language: language_t 1317 | static name: string 1318 | } 1319 | export class set_t { 1320 | static name: string 1321 | } 1322 | export class shape_plan_t { 1323 | static name: string 1324 | } 1325 | export class unicode_funcs_t { 1326 | static name: string 1327 | } 1328 | export class user_data_key_t { 1329 | static name: string 1330 | } 1331 | export class variation_t { 1332 | /* Fields of HarfBuzz.variation_t */ 1333 | tag: tag_t 1334 | value: number 1335 | /* Methods of HarfBuzz.variation_t */ 1336 | _string(): /* buf */ string[] 1337 | static name: string 1338 | } 1339 | export class var_int_t { 1340 | /* Fields of HarfBuzz.var_int_t */ 1341 | u32: number 1342 | i32: number 1343 | u16: number[] 1344 | i16: number[] 1345 | u8: Uint8Array 1346 | i8: Uint8Array 1347 | static name: string 1348 | } 1349 | export type bool_t = number 1350 | export type codepoint_t = number 1351 | export type color_t = number 1352 | export type font_get_font_h_extents_func_t = font_get_font_extents_func_t 1353 | export type font_get_font_v_extents_func_t = font_get_font_extents_func_t 1354 | export type font_get_glyph_h_advance_func_t = font_get_glyph_advance_func_t 1355 | export type font_get_glyph_h_advances_func_t = font_get_glyph_advances_func_t 1356 | export type font_get_glyph_h_kerning_func_t = font_get_glyph_kerning_func_t 1357 | export type font_get_glyph_h_origin_func_t = font_get_glyph_origin_func_t 1358 | export type font_get_glyph_v_advance_func_t = font_get_glyph_advance_func_t 1359 | export type font_get_glyph_v_advances_func_t = font_get_glyph_advances_func_t 1360 | export type font_get_glyph_v_kerning_func_t = font_get_glyph_kerning_func_t 1361 | export type font_get_glyph_v_origin_func_t = font_get_glyph_origin_func_t 1362 | export type mask_t = number 1363 | export type ot_name_id_t = number 1364 | export type position_t = number 1365 | export type tag_t = number -------------------------------------------------------------------------------- /@types/Gjs/HarfBuzz-0.0.js: -------------------------------------------------------------------------------- 1 | imports.gi.versions.HarfBuzz = '0.0'; 2 | module.exports = imports.gi.HarfBuzz; 3 | -------------------------------------------------------------------------------- /@types/Gjs/Notify-0.7.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Notify-0.7 3 | */ 4 | 5 | import * as Gjs from './Gjs'; 6 | import * as GdkPixbuf from './GdkPixbuf-2.0'; 7 | import * as Gio from './Gio-2.0'; 8 | import * as GObject from './GObject-2.0'; 9 | import * as GLib from './GLib-2.0'; 10 | import * as GModule from './GModule-2.0'; 11 | 12 | export enum Urgency { 13 | LOW, 14 | NORMAL, 15 | CRITICAL, 16 | } 17 | export const EXPIRES_DEFAULT: number 18 | export const EXPIRES_NEVER: number 19 | export const VERSION_MAJOR: number 20 | export const VERSION_MICRO: number 21 | export const VERSION_MINOR: number 22 | export function get_app_name(): string 23 | export function get_server_caps(): string[] 24 | export function get_server_info(): [ /* returnType */ boolean, /* ret_name */ string | null, /* ret_vendor */ string | null, /* ret_version */ string | null, /* ret_spec_version */ string | null ] 25 | export function init(app_name: string): boolean 26 | export function is_initted(): boolean 27 | export function set_app_name(app_name: string): void 28 | export function uninit(): void 29 | export interface ActionCallback { 30 | (notification: Notification, action: string): void 31 | } 32 | export interface Notification_ConstructProps extends GObject.Object_ConstructProps { 33 | app_name?: string 34 | body?: string 35 | icon_name?: string 36 | id?: number 37 | summary?: string 38 | } 39 | export class Notification { 40 | /* Properties of Notify.Notification */ 41 | app_name: string 42 | body: string 43 | readonly closed_reason: number 44 | icon_name: string 45 | id: number 46 | summary: string 47 | /* Fields of GObject.Object */ 48 | g_type_instance: GObject.TypeInstance 49 | /* Methods of Notify.Notification */ 50 | add_action(action: string, label: string, callback: ActionCallback): void 51 | clear_actions(): void 52 | clear_hints(): void 53 | close(): boolean 54 | get_closed_reason(): number 55 | set_app_name(app_name: string): void 56 | set_category(category: string): void 57 | set_hint(key: string, value?: GLib.Variant | null): void 58 | set_hint_byte(key: string, value: number): void 59 | set_hint_byte_array(key: string, value: Uint8Array): void 60 | set_hint_double(key: string, value: number): void 61 | set_hint_int32(key: string, value: number): void 62 | set_hint_string(key: string, value: string): void 63 | set_hint_uint32(key: string, value: number): void 64 | set_icon_from_pixbuf(icon: GdkPixbuf.Pixbuf): void 65 | set_image_from_pixbuf(pixbuf: GdkPixbuf.Pixbuf): void 66 | set_timeout(timeout: number): void 67 | set_urgency(urgency: Urgency): void 68 | show(): boolean 69 | update(summary: string, body?: string | null, icon?: string | null): boolean 70 | /* Methods of GObject.Object */ 71 | bind_property(source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags): GObject.Binding 72 | bind_property_full(source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags, transform_to: GObject.Closure, transform_from: GObject.Closure): GObject.Binding 73 | force_floating(): void 74 | freeze_notify(): void 75 | get_data(key: string): object | null 76 | get_property(property_name: string, value: GObject.Value): void 77 | get_qdata(quark: GLib.Quark): object | null 78 | getv(names: string[], values: GObject.Value[]): void 79 | is_floating(): boolean 80 | notify(property_name: string): void 81 | notify_by_pspec(pspec: GObject.ParamSpec): void 82 | ref(): GObject.Object 83 | ref_sink(): GObject.Object 84 | run_dispose(): void 85 | set_data(key: string, data?: object | null): void 86 | set_property(property_name: string, value: GObject.Value): void 87 | steal_data(key: string): object | null 88 | steal_qdata(quark: GLib.Quark): object | null 89 | thaw_notify(): void 90 | unref(): void 91 | watch_closure(closure: GObject.Closure): void 92 | /* Virtual methods of Notify.Notification */ 93 | vfunc_closed(): void 94 | /* Virtual methods of GObject.Object */ 95 | vfunc_constructed(): void 96 | vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void 97 | vfunc_dispose(): void 98 | vfunc_finalize(): void 99 | vfunc_get_property(property_id: number, value: GObject.Value, pspec: GObject.ParamSpec): void 100 | vfunc_notify(pspec: GObject.ParamSpec): void 101 | vfunc_set_property(property_id: number, value: GObject.Value, pspec: GObject.ParamSpec): void 102 | /* Signals of Notify.Notification */ 103 | connect(sigName: "closed", callback: (($obj: Notification) => void)): number 104 | connect_after(sigName: "closed", callback: (($obj: Notification) => void)): number 105 | emit(sigName: "closed"): void 106 | /* Signals of GObject.Object */ 107 | connect(sigName: "notify", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number 108 | connect_after(sigName: "notify", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number 109 | emit(sigName: "notify", pspec: GObject.ParamSpec): void 110 | connect(sigName: "notify::app-name", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number 111 | connect_after(sigName: "notify::app-name", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number 112 | connect(sigName: "notify::body", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number 113 | connect_after(sigName: "notify::body", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number 114 | connect(sigName: "notify::closed-reason", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number 115 | connect_after(sigName: "notify::closed-reason", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number 116 | connect(sigName: "notify::icon-name", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number 117 | connect_after(sigName: "notify::icon-name", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number 118 | connect(sigName: "notify::id", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number 119 | connect_after(sigName: "notify::id", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number 120 | connect(sigName: "notify::summary", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number 121 | connect_after(sigName: "notify::summary", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number 122 | connect(sigName: string, callback: any): number 123 | connect_after(sigName: string, callback: any): number 124 | emit(sigName: string, ...args: any[]): void 125 | disconnect(id: number): void 126 | static name: string 127 | constructor (config?: Notification_ConstructProps) 128 | _init (config?: Notification_ConstructProps): void 129 | /* Static methods and pseudo-constructors */ 130 | static new(summary: string, body?: string | null, icon?: string | null): Notification 131 | static $gtype: GObject.Type 132 | } 133 | export abstract class NotificationClass { 134 | /* Fields of Notify.NotificationClass */ 135 | parent_class: GObject.ObjectClass 136 | closed: (notification: Notification) => void 137 | static name: string 138 | } 139 | export class NotificationPrivate { 140 | static name: string 141 | } -------------------------------------------------------------------------------- /@types/Gjs/Notify-0.7.js: -------------------------------------------------------------------------------- 1 | imports.gi.versions.Notify = '0.7'; 2 | module.exports = imports.gi.Notify; 3 | -------------------------------------------------------------------------------- /@types/Gjs/Pango-1.0.js: -------------------------------------------------------------------------------- 1 | imports.gi.versions.Pango = '1.0'; 2 | module.exports = imports.gi.Pango; 3 | -------------------------------------------------------------------------------- /@types/Gjs/cairo-1.0.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * cairo-1.0 3 | */ 4 | 5 | import * as Gjs from './Gjs'; 6 | import * as GObject from './GObject-2.0'; 7 | 8 | export enum Status { 9 | SUCCESS, 10 | NO_MEMORY, 11 | INVALID_RESTORE, 12 | INVALID_POP_GROUP, 13 | NO_CURRENT_POINT, 14 | INVALID_MATRIX, 15 | INVALID_STATUS, 16 | NULL_POINTER, 17 | INVALID_STRING, 18 | INVALID_PATH_DATA, 19 | READ_ERROR, 20 | WRITE_ERROR, 21 | SURFACE_FINISHED, 22 | SURFACE_TYPE_MISMATCH, 23 | PATTERN_TYPE_MISMATCH, 24 | INVALID_CONTENT, 25 | INVALID_FORMAT, 26 | INVALID_VISUAL, 27 | FILE_NOT_FOUND, 28 | INVALID_DASH, 29 | INVALID_DSC_COMMENT, 30 | INVALID_INDEX, 31 | CLIP_NOT_REPRESENTABLE, 32 | TEMP_FILE_ERROR, 33 | INVALID_STRIDE, 34 | FONT_TYPE_MISMATCH, 35 | USER_FONT_IMMUTABLE, 36 | USER_FONT_ERROR, 37 | NEGATIVE_COUNT, 38 | INVALID_CLUSTERS, 39 | INVALID_SLANT, 40 | INVALID_WEIGHT, 41 | INVALID_SIZE, 42 | USER_FONT_NOT_IMPLEMENTED, 43 | DEVICE_TYPE_MISMATCH, 44 | DEVICE_ERROR, 45 | INVALID_MESH_CONSTRUCTION, 46 | DEVICE_FINISHED, 47 | JBIG2_GLOBAL_MISSING, 48 | } 49 | export enum Content { 50 | COLOR, 51 | ALPHA, 52 | COLOR_ALPHA, 53 | } 54 | export enum Operator { 55 | CLEAR, 56 | SOURCE, 57 | OVER, 58 | IN, 59 | OUT, 60 | ATOP, 61 | DEST, 62 | DEST_OVER, 63 | DEST_IN, 64 | DEST_OUT, 65 | DEST_ATOP, 66 | XOR, 67 | ADD, 68 | SATURATE, 69 | MULTIPLY, 70 | SCREEN, 71 | OVERLAY, 72 | DARKEN, 73 | LIGHTEN, 74 | COLOR_DODGE, 75 | COLOR_BURN, 76 | HARD_LIGHT, 77 | SOFT_LIGHT, 78 | DIFFERENCE, 79 | EXCLUSION, 80 | HSL_HUE, 81 | HSL_SATURATION, 82 | HSL_COLOR, 83 | HSL_LUMINOSITY, 84 | } 85 | export enum Antialias { 86 | DEFAULT, 87 | NONE, 88 | GRAY, 89 | SUBPIXEL, 90 | FAST, 91 | GOOD, 92 | BEST, 93 | } 94 | export enum FillRule { 95 | WINDING, 96 | EVEN_ODD, 97 | } 98 | export enum LineCap { 99 | BUTT, 100 | ROUND, 101 | SQUARE, 102 | } 103 | export enum LineJoin { 104 | MITER, 105 | ROUND, 106 | BEVEL, 107 | } 108 | export enum TextClusterFlags { 109 | BACKWARD, 110 | } 111 | export enum FontSlant { 112 | NORMAL, 113 | ITALIC, 114 | OBLIQUE, 115 | } 116 | export enum FontWeight { 117 | NORMAL, 118 | BOLD, 119 | } 120 | export enum SubpixelOrder { 121 | DEFAULT, 122 | RGB, 123 | BGR, 124 | VRGB, 125 | VBGR, 126 | } 127 | export enum HintStyle { 128 | DEFAULT, 129 | NONE, 130 | SLIGHT, 131 | MEDIUM, 132 | FULL, 133 | } 134 | export enum HintMetrics { 135 | DEFAULT, 136 | OFF, 137 | ON, 138 | } 139 | export enum FontType { 140 | TOY, 141 | FT, 142 | WIN32, 143 | QUARTZ, 144 | USER, 145 | } 146 | export enum PathDataType { 147 | MOVE_TO, 148 | LINE_TO, 149 | CURVE_TO, 150 | CLOSE_PATH, 151 | } 152 | export enum DeviceType { 153 | DRM, 154 | GL, 155 | SCRIPT, 156 | XCB, 157 | XLIB, 158 | XML, 159 | COGL, 160 | WIN32, 161 | INVALID, 162 | } 163 | export enum SurfaceType { 164 | IMAGE, 165 | PDF, 166 | PS, 167 | XLIB, 168 | XCB, 169 | GLITZ, 170 | QUARTZ, 171 | WIN32, 172 | BEOS, 173 | DIRECTFB, 174 | SVG, 175 | OS2, 176 | WIN32_PRINTING, 177 | QUARTZ_IMAGE, 178 | SCRIPT, 179 | QT, 180 | RECORDING, 181 | VG, 182 | GL, 183 | DRM, 184 | TEE, 185 | XML, 186 | SKIA, 187 | SUBSURFACE, 188 | COGL, 189 | } 190 | export enum Format { 191 | INVALID, 192 | ARGB32, 193 | RGB24, 194 | A8, 195 | A1, 196 | RGB16_565, 197 | RGB30, 198 | } 199 | export enum PatternType { 200 | SOLID, 201 | SURFACE, 202 | LINEAR, 203 | RADIAL, 204 | MESH, 205 | RASTER_SOURCE, 206 | } 207 | export enum Extend { 208 | NONE, 209 | REPEAT, 210 | REFLECT, 211 | PAD, 212 | } 213 | export enum Filter { 214 | FAST, 215 | GOOD, 216 | BEST, 217 | NEAREST, 218 | BILINEAR, 219 | GAUSSIAN, 220 | } 221 | export enum RegionOverlap { 222 | IN, 223 | OUT, 224 | PART, 225 | } 226 | export function image_surface_create(): void 227 | export class Context { 228 | static name: string 229 | } 230 | export class Device { 231 | static name: string 232 | } 233 | export class Surface { 234 | static name: string 235 | } 236 | export class Matrix { 237 | static name: string 238 | } 239 | export class Pattern { 240 | static name: string 241 | } 242 | export class Region { 243 | static name: string 244 | } 245 | export class FontOptions { 246 | static name: string 247 | } 248 | export class FontFace { 249 | static name: string 250 | } 251 | export class ScaledFont { 252 | static name: string 253 | } 254 | export class Path { 255 | static name: string 256 | } 257 | export class Rectangle { 258 | /* Fields of cairo.Rectangle */ 259 | x: number 260 | y: number 261 | width: number 262 | height: number 263 | static name: string 264 | } 265 | export class RectangleInt { 266 | /* Fields of cairo.RectangleInt */ 267 | x: number 268 | y: number 269 | width: number 270 | height: number 271 | static name: string 272 | } -------------------------------------------------------------------------------- /@types/Gjs/cairo-1.0.js: -------------------------------------------------------------------------------- 1 | imports.gi.versions.cairo = '1.0'; 2 | module.exports = imports.gi.cairo; 3 | -------------------------------------------------------------------------------- /@types/Gjs/index.d.ts: -------------------------------------------------------------------------------- 1 | import * as Gjs from "./Gjs"; 2 | import * as Gtk30 from "./Gtk-3.0"; 3 | import * as Handy1 from "./Handy-1"; 4 | import * as Notify07 from "./Notify-0.7"; 5 | import * as Xlib20 from "./xlib-2.0"; 6 | import * as Gdk30 from "./Gdk-3.0"; 7 | import * as Atk10 from "./Atk-1.0"; 8 | import * as Cairo10 from "./cairo-1.0"; 9 | import * as Pango10 from "./Pango-1.0"; 10 | import * as Gio20 from "./Gio-2.0"; 11 | import * as GdkPixbuf20 from "./GdkPixbuf-2.0"; 12 | import * as GObject20 from "./GObject-2.0"; 13 | import * as HarfBuzz00 from "./HarfBuzz-0.0"; 14 | import * as GLib20 from "./GLib-2.0"; 15 | import * as GModule20 from "./GModule-2.0"; 16 | 17 | 18 | declare global { 19 | function print(...args: any[]): void; 20 | function printerr(...args: any[]): void 21 | function log(message?: string): void 22 | function logError(exception: any, message?: string): void 23 | const ARGV: string[] 24 | const imports: typeof Gjs & { 25 | [key: string]: any 26 | gi: { 27 | Gtk: typeof Gtk30 28 | Handy: typeof Handy1 29 | Notify: typeof Notify07 30 | xlib: typeof Xlib20 31 | Gdk: typeof Gdk30 32 | Atk: typeof Atk10 33 | cairo: typeof Cairo10 34 | Pango: typeof Pango10 35 | Gio: typeof Gio20 36 | GdkPixbuf: typeof GdkPixbuf20 37 | GObject: typeof GObject20 38 | HarfBuzz: typeof HarfBuzz00 39 | GLib: typeof GLib20 40 | GModule: typeof GModule20 41 | } 42 | versions: { 43 | Gtk: string 44 | Handy: string 45 | Notify: string 46 | xlib: string 47 | Gdk: string 48 | Atk: string 49 | cairo: string 50 | Pango: string 51 | Gio: string 52 | GdkPixbuf: string 53 | GObject: string 54 | HarfBuzz: string 55 | GLib: string 56 | GModule: string 57 | } 58 | searchPath: string[]; 59 | } 60 | } 61 | 62 | export { imports } 63 | -------------------------------------------------------------------------------- /@types/Gjs/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yilozt/mutter-rounded-setting/ed2128af89a94afbe31141fc064a9d1bcbed1e90/@types/Gjs/index.js -------------------------------------------------------------------------------- /@types/Gjs/xlib-2.0.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * xlib-2.0 3 | */ 4 | 5 | import * as Gjs from './Gjs'; 6 | import * as GObject from './GObject-2.0'; 7 | 8 | export function open_display(): void 9 | export class Display { 10 | static name: string 11 | } 12 | export class Screen { 13 | static name: string 14 | } 15 | export class Visual { 16 | static name: string 17 | } 18 | export class XConfigureEvent { 19 | static name: string 20 | } 21 | export class XImage { 22 | static name: string 23 | } 24 | export class XFontStruct { 25 | static name: string 26 | } 27 | export class XTrapezoid { 28 | static name: string 29 | } 30 | export class XVisualInfo { 31 | static name: string 32 | } 33 | export class XWindowAttributes { 34 | static name: string 35 | } 36 | export class XEvent { 37 | static name: string 38 | } 39 | export type Atom = number 40 | export type Colormap = number 41 | export type Cursor = number 42 | export type Drawable = number 43 | export type GC = object 44 | export type KeyCode = number 45 | export type KeySym = number 46 | export type Picture = number 47 | export type Time = number 48 | export type VisualID = number 49 | export type Window = number 50 | export type XID = number 51 | export type Pixmap = number -------------------------------------------------------------------------------- /@types/Gjs/xlib-2.0.js: -------------------------------------------------------------------------------- 1 | imports.gi.versions.xlib = '2.0'; 2 | module.exports = imports.gi.xlib; 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # mutter-rounded-setting 2 | 3 | A simple gui for [mutter_rounded](https://aur.archlinux.org/packages/mutter-rounded/). 4 | the `@types` folder are generated by [ts-for-gjs](https://github.com/sammydre/ts-for-gjs), 5 | for code completion. 6 | 7 | - install dependencies: 8 | 9 | ``` 10 | yarn 11 | ``` 12 | 13 | - package 14 | 15 | ``` 16 | yarn webpack 17 | ``` 18 | 19 | # Install 20 | 21 | ```bash 22 | git clone https://github.com/yilozt/mutter-rounded-setting 23 | cd ./mutter-rounded-setting 24 | ./install 25 | ``` 26 | 27 | You can move `dist/mutter_settings.js` to anywhere if you want. 28 | -------------------------------------------------------------------------------- /dist/mutter_settings.js: -------------------------------------------------------------------------------- 1 | (()=>{var e={271:e=>{imports.gi.versions.GLib="2.0",e.exports=imports.gi.GLib},418:e=>{imports.gi.versions.Gdk="3.0",e.exports=imports.gi.Gdk},597:e=>{imports.gi.versions.Gio="2.0",e.exports=imports.gi.Gio},184:e=>{imports.gi.versions.Gtk="3.0",e.exports=imports.gi.Gtk},357:e=>{imports.gi.versions.Handy="1",e.exports=imports.gi.Handy},7:e=>{imports.gi.versions.Notify="0.7",e.exports=imports.gi.Notify},524:e=>{e.exports='100001100001100001100001TrueTrueTruecenterTrueuser-trash-symbolicAdd Black List ItemTrue1616243012TrueTruecenterTruefind-location-symbolicTrueTrueTrueTop Clippingpadding_top_2Truestartcenter1adj_padding_topTrueBottom Clippingpadding_bottom_2Truestartcenter1adj_padding_bottomTrueLeft Clippingpadding_left_2Truestartcenter1adj_padding_leftTrueRight Clippingpadding_right_2Truestartcenter1adj_padding_right'},481:e=>{e.exports='TrueTrueTruecenterTrueuser-trash-symbolicAdd Black List ItemTrue1616243012TrueTruecenterTruefind-location-symbolicTrueTrue'},728:e=>{e.exports='100221100001100001100001100001100001100001100001100001100001False800600TrueFalseverticalTruestrictFalseTrueSettingTrueFalsestackmutter rounded settingTrueFalseTrueTrueFalseTrueFalseTruenoneTrueRounded in maximizedWindows will enable rounded corners when maximizedrounded_in_maximizedTrueFalsecenterTrueBorder widthradius_scaleTrueleftadj_border_width250TrueBorder brightnessradius_scaleTrueleftadj_border_brightness250TrueFalseTrueFalseTruenoneTrueRounded radiusradius_scaleTrueleftadj_radius250TrueTop Clippingpadding_topTruestartcenter1adj_padding_topTrueBottom Clippingpadding_bottomTruestartcenter1adj_padding_bottomTrueLeft Clippingpadding_leftTruestartcenter1adj_padding_leftTrueRight Clippingpadding_rightTruestartcenter1adj_padding_rightpage1GlobalTrueFor apps in this list, the setting will effect in next openning.TrueTrueFalseFalsenoneAdd Special AppTrueTruelist-add-symbolic8Truepage2BlackListTrueTrueTrueFalseFalsenoneAdd Special AppTrueTruelist-add-symbolic8Truepage3SpecialTrueTrueBlur SettingTrueBlur sigmalblur-sigmalTrueleftadj_blur_sigmal250TrueBlur Brightnessblur-brightnessTrueleftadj_blur_brightness250TrueBlured window opacityblured-window-opacityTrue250leftadj_blured_window_opacityTrueBlured ListFor apps in this list, the setting will effect in next openning.TrueFalseFalsenoneAdd Special AppTrueTruelist-add-symbolic8Truepage4Blur EffectTrueTrueTrueFalsestack'}},t={};function r(p){var o=t[p];if(void 0!==o)return o.exports;var i=t[p]={exports:{}};return e[p](i,i.exports,r),i.exports}(()=>{"use strict";var e,t,p=r(184),o=r(597),i=r(357),n=r(7),a=r(271),l=r(418),c=o.Settings.new("org.gnome.shell.extensions.pickawindow");function s(r){for(var o,i=null===(o=l.Display.get_default())||void 0===o?void 0:o.get_default_screen(),n=p.CssProvider.new(),s="window {\n background: transparent;\n color: black;\n }\n\n label {\n color: white;\n padding: 16px;\n background: #000;\n opacity: 0.7;\n font-size: large;\n }",y=[],d=0;d0&&(t(p),c.set_string("wm-instance",""))}})),e}var y=o.Settings.new("org.gnome.mutter"),d=JSON.parse(y.get_string("clip-edge-padding")),m={"black-list":y.get_strv("black-list"),"blur-list":y.get_strv("blur-list")};function b(e){var t=[];return t[0]=e.left,t[1]=e.right,t[2]=e.top,t[3]=e.bottom,t}function u(e){return{left:e[0],right:e[1],top:e[2],bottom:e[3]}}function g(e){d.global=b(e),y.set_string("clip-edge-padding",JSON.stringify(d))}function _(){return u(d.global)}function h(e,t,r){var p=m[e];return-1==p.indexOf(r)&&(p[p.indexOf(t)]=r,y.set_strv(e,p),!0)}function j(e,t){return h("black-list",e,t)}function v(e,t){return h("blur-list",e,t)}function f(e,t){if(e==t)return!0;if(d.apps[t])return!1;var r=d.apps[e];return d.apps[t]=r,delete d.apps[e],y.set_string("clip-edge-padding",JSON.stringify(d)),!0}function w(e,t){var r=m[e];r.splice(r.indexOf(t),1),y.set_strv(e,r)}function T(e){w("black-list",e)}function k(e){w("blur-list",e)}function x(e){delete d.apps[e],y.set_string("clip-edge-padding",JSON.stringify(d))}function G(e,t){var r=m[e];return-1==r.indexOf(t)&&(r.push(t),y.set_strv(e,r),!0)}function S(e){return G("black-list",e)}function A(e){return G("blur-list",e)}function B(e){return!d.apps[e]&&(d.apps[e]=b(_()),y.set_string("clip-edge-padding",JSON.stringify(d)),!0)}var H=function(){return(H=Object.assign||function(e){for(var t,r=1,p=arguments.length;r0&&(w.text=e,w.text!=h.title&&T())},void e.show_all()})),w.connect("activate",(function(e){e.text!=h.title&&0!=e.text.length&&T()})),j.connect("clicked",(function(){g&&g(h.title),null==l||l.remove(h)})),h}function I(e,t,r){var p=e.get_object("adj_padding_left"),o=e.get_object("adj_padding_right"),i=e.get_object("adj_padding_top"),n=e.get_object("adj_padding_bottom");function a(){r({left:p.value,right:o.value,top:i.value,bottom:n.value})}p.value=t.left,o.value=t.right,n.value=t.bottom,i.value=t.top,n.connect("value-changed",a),i.connect("value-changed",a),p.connect("value-changed",a),o.connect("value-changed",a)}var L=new p.Application({application_id:"org.gnome.SandBox.ImageViewerExample",flags:o.ApplicationFlags.FLAGS_NONE});L.connect("startup",(function(e){i.init(),n.init("mutter rounded setting"),function(){var e="pickawindow@lluo.gitlab.com",t=o.Settings.new("org.gnome.shell"),r=t.get_strv("disabled-extensions"),p=t.get_strv("enabled-extensions");-1!=r.indexOf(e)&&r.splice(r.indexOf(e),1),-1==p.indexOf(e)&&p.push(e),t.set_strv("disabled-extensions",r),t.set_strv("enabled-extensions",p)}()})),L.connect("activate",(function(e){var t=function(e){var t=p.Builder.new_from_string(F,-1),r=t.get_object("window"),i=s(e);return function(e){I(e,_(),g),[{view_id:"adj_border_width",settings:"border-width"},{view_id:"adj_border_brightness",settings:"border-brightness"},{view_id:"adj_radius",settings:"round-corners-radius"},{view_id:"adj_blur_sigmal",settings:"blur-sigmal"},{view_id:"adj_blur_brightness",settings:"blur-brightness"},{view_id:"adj_blured_window_opacity",settings:"blur-window-opacity"}].forEach((function(t){var r=e.get_object(t.view_id);y.bind(t.settings,r,"value",o.SettingsBindFlags.DEFAULT)})),y.bind("rounded-in-maximized",e.get_object("rounded_in_maximized"),"active",o.SettingsBindFlags.DEFAULT)}(t),[{builder:t,list_id:"bl_list",add_btn_id:"add_bl_btn",item_ui:R,init_config:function(){return m["black-list"].map((function(e){return{title:e,expanded:!1}}))},on_name_changed:j,on_del:T,on_add:S},{builder:t,list_id:"app_list",add_btn_id:"add_app_btn",item_ui:P,init_config:function(){return(e=d.apps,Object.keys(e).map((function(t){return{name:t,paddings:u(e[t])}}))).map((function(e){var t=e.name,r=e.paddings;return{title:t,ui:P,paddings:r}}));var e},on_name_changed:f,on_del:x,on_add:B},{builder:t,list_id:"blur_list",add_btn_id:"add_blur_btn",item_ui:R,init_config:function(){return m["blur-list"].map((function(e){return{title:e}}))},on_name_changed:v,on_add:A,on_del:k}].forEach((function(e){return function(e){var t=e.builder,r=e.list_id,p=e.add_btn_id,o=e.on_add,i=e.init_config,n=e.item_ui,a=e.on_del,l=e.on_name_changed,c=t.get_object(r),s=t.get_object(p);i().forEach((function(e){var t=E(H({on_del:a,on_name_changed:l,list:c,ui:n},e));c.insert(t,1)})),s.connect("clicked",(function(){if(o("new_item")){var e=E({title:"new_item",ui:n,list:c,expanded:!0,paddings:"app_list"==r?_():void 0,on_name_changed:l,on_del:a});c.insert(e,1)}}))}(e)})),r.connect("destroy",(function(){i.destroy()})),r}(e);t.set_wmclass("mutter_setting","Mutter Setting"),t.set_application(e),t.show_all()})),L.run(null)})()})(); -------------------------------------------------------------------------------- /install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | uuid=pickawindow@lluo.gitlab.com 4 | schemas_dir=$HOME/.local/share/glib-2.0/schemas/ 5 | extension_dir=$HOME/.local/share/gnome-shell/extensions/$uuid 6 | schemas_name=org.gnome.shell.extensions.pickawindow.gschema.xml 7 | 8 | function red() { 9 | printf "\033[31m%s\033[0m" "$@" 10 | } 11 | 12 | function green() { 13 | printf "\033[32m%s\033[0m" "$@" 14 | } 15 | 16 | function run() { 17 | echo "$(green [run]) $*" 18 | $@ 19 | if [ "$?" != "0" ]; then 20 | echo "$(red [err]) $@" 21 | exit 1 22 | fi 23 | } 24 | 25 | cd $(dirname $0) 26 | 27 | [ -f ${uuid}.shell-extension.zip ] && \ 28 | run rm ${uuid}.shell-extension.zip 29 | 30 | [ -d $extension_dir ] && \ 31 | run rm -r $extension_dir 32 | 33 | run gnome-extensions pack $uuid 34 | run gnome-extensions install --force ${uuid}.shell-extension.zip 35 | run mkdir -p $schemas_dir 36 | run ln -sf $extension_dir/schemas/$schemas_name $schemas_dir 37 | run glib-compile-schemas $schemas_dir 38 | run gsettings set org.gnome.shell disable-user-extensions false 39 | 40 | echo 41 | echo $(green \ 42 | 'Relogin into session and use `gjs dist/mutter_settings.js` to change settings' \ 43 | ) 44 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mutter-rounded-setting", 3 | "version": "0.0.1", 4 | "description": "", 5 | "main": "src/main.ts", 6 | "scripts": { 7 | "build:types": "npm run clear:types && ts-for-gir generate", 8 | "clear:types": "rm -rf ./@types", 9 | "webpack": "webpack", 10 | "package": "npm run webpack && tar cf mutter-settings.tar pickawindow@lluo.gitlab.com dist/mutter_settings.js" 11 | }, 12 | "author": "", 13 | "license": "GPL-2.0", 14 | "devDependencies": { 15 | "ts-loader": "^8.0.4", 16 | "typescript": "^4.0.3", 17 | "webpack": "^5.0.0", 18 | "webpack-cli": "^4.0.0", 19 | "xml-minify-loader": "^0.0.2" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /pickawindow@lluo.gitlab.com/extension.js: -------------------------------------------------------------------------------- 1 | const ExtensionUtils = imports.misc.extensionUtils; 2 | const Me = ExtensionUtils.getCurrentExtension(); 3 | const { Clutter } = imports.gi; 4 | 5 | class Extension { 6 | constructor() {} 7 | 8 | enable() { 9 | this.settings = ExtensionUtils.getSettings( 10 | "org.gnome.shell.extensions.pickawindow" 11 | ); 12 | this.settings.connect("changed", (settings, key) => this.onSettingsChanged(settings, key)); 13 | } 14 | 15 | pickWindow(settings, x, y) { 16 | const actor = global 17 | .get_stage() 18 | .get_actor_at_pos(Clutter.PickMode.ALL, x, y); 19 | 20 | const type_name = actor.toString(); 21 | let result = ""; 22 | 23 | if (type_name.indexOf("MetaSurfaceActor") != -1) { 24 | result = actor.get_parent().get_meta_window().get_wm_class_instance(); 25 | } else if (type_name.indexOf("WindowActor") != -1) { 26 | result = actor.get_meta_window().get_wm_class_instance(); 27 | } 28 | 29 | settings.set_string("wm-instance", result); 30 | log("[pickawindow] : " + result); 31 | } 32 | 33 | onSettingsChanged(settings, key) { 34 | if (key == "pick-position") { 35 | const position = settings.get_value(key).deep_unpack(); 36 | this.pickWindow(settings, position[0], position[1]); 37 | } 38 | } 39 | 40 | disable() {} 41 | } 42 | 43 | function init() { 44 | return new Extension(); 45 | } 46 | -------------------------------------------------------------------------------- /pickawindow@lluo.gitlab.com/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "[Mutter-rounded] Pick A Window", 3 | "description": "used by mutter-rounded: get wm_class_instance of a window", 4 | "uuid": "pickawindow@lluo.gitlab.com", 5 | "shell-version": [ 6 | "40", 7 | "41", 8 | "42" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /pickawindow@lluo.gitlab.com/schemas/gschemas.compiled: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yilozt/mutter-rounded-setting/ed2128af89a94afbe31141fc064a9d1bcbed1e90/pickawindow@lluo.gitlab.com/schemas/gschemas.compiled -------------------------------------------------------------------------------- /pickawindow@lluo.gitlab.com/schemas/org.gnome.shell.extensions.pickawindow.gschema.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | (0, 0) 6 | 7 | 8 | '' 9 | 10 | 11 | -------------------------------------------------------------------------------- /pickawindow@lluo.gitlab.com/stylesheet.css: -------------------------------------------------------------------------------- 1 | /* Add your custom extension styling here */ 2 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import * as Gtk from "../@types/Gjs/Gtk-3.0"; 2 | import * as Gio from "../@types/Gjs/Gio-2.0"; 3 | import * as Hdy from "../@types/Gjs/Handy-1"; 4 | import * as Notify from "../@types/Gjs/Notify-0.7"; 5 | 6 | import { SettingsWin } from "./window"; 7 | 8 | function check_extensions() { 9 | const uuid = "pickawindow@lluo.gitlab.com"; 10 | const settings = Gio.Settings.new("org.gnome.shell"); 11 | const disabled_list = settings.get_strv("disabled-extensions"); 12 | const enabled_list = settings.get_strv("enabled-extensions"); 13 | 14 | // if pick window extension is disabled, enable it 15 | if (disabled_list.indexOf(uuid) != -1) { 16 | disabled_list.splice(disabled_list.indexOf(uuid), 1); 17 | } 18 | if (enabled_list.indexOf(uuid) == -1) { 19 | enabled_list.push(uuid); 20 | } 21 | 22 | settings.set_strv("disabled-extensions", disabled_list); 23 | settings.set_strv("enabled-extensions", enabled_list); 24 | } 25 | 26 | const app = new Gtk.Application({ 27 | application_id: "org.gnome.SandBox.ImageViewerExample", 28 | flags: Gio.ApplicationFlags.FLAGS_NONE, 29 | }); 30 | 31 | app.connect("startup", (_app) => { 32 | Hdy.init(); 33 | Notify.init("mutter rounded setting"); 34 | check_extensions(); 35 | }); 36 | 37 | app.connect("activate", (app) => { 38 | const win = SettingsWin(app); 39 | win.set_wmclass("mutter_setting", "Mutter Setting") 40 | win.set_application(app); 41 | win.show_all(); 42 | }); 43 | 44 | app.run(null); 45 | -------------------------------------------------------------------------------- /src/pick_window.ts: -------------------------------------------------------------------------------- 1 | import * as GLib from "../@types/Gjs/GLib-2.0"; 2 | import * as Gtk from "../@types/Gjs/Gtk-3.0"; 3 | import * as Gdk from "../@types/Gjs/Gdk-3.0"; 4 | import * as Gio from "../@types/Gjs/Gio-2.0"; 5 | 6 | interface PickCb { 7 | (name: string): void; 8 | } 9 | 10 | let win: Gtk.Window; 11 | let cb: PickCb; 12 | const settings = Gio.Settings.new("org.gnome.shell.extensions.pickawindow"); 13 | 14 | function window_wm_class_instance_at_pos(x: number, y: number) { 15 | // @ts-ignore 16 | settings.set_value("pick-position", new GLib.Variant("(ii)", [x, y])); 17 | } 18 | 19 | export function InitPickWindow(app: Gtk.Application): Gtk.Window { 20 | const screen = Gdk.Display.get_default()?.get_default_screen(); 21 | const css_provider = Gtk.CssProvider.new(); 22 | const css = `window { 23 | background: transparent; 24 | color: black; 25 | } 26 | 27 | label { 28 | color: white; 29 | padding: 16px; 30 | background: #000; 31 | opacity: 0.7; 32 | font-size: large; 33 | }`; 34 | const data: number[] = []; 35 | for (let i = 0; i < css.length; i++) data.push(css.charCodeAt(i)); 36 | css_provider.load_from_data(new Uint8Array(data)); 37 | 38 | win = Gtk.Window.new(Gtk.WindowType.POPUP); 39 | win.set_application(app); 40 | const label = Gtk.Label.new("Pick a Window"); 41 | const box = new Gtk.Box(); 42 | win 43 | .get_style_context() 44 | .add_provider(css_provider, Gtk.STYLE_PROVIDER_PRIORITY_SETTINGS); 45 | label 46 | .get_style_context() 47 | .add_provider(css_provider, Gtk.STYLE_PROVIDER_PRIORITY_SETTINGS); 48 | 49 | box.valign = Gtk.Align.CENTER; 50 | box.halign = Gtk.Align.CENTER; 51 | 52 | box.add(label); 53 | win.add(box); 54 | 55 | win.move(0, 0); 56 | win.default_height = (screen?.get_height() || 100) - 1; 57 | win.default_width = (screen?.get_width() || 100) - 1; 58 | 59 | win.set_visual(win.screen.get_rgba_visual()); 60 | 61 | win.add_events(Gdk.EventMask.BUTTON_PRESS_MASK); 62 | win.add_events(Gdk.EventMask.POINTER_MOTION_MASK); 63 | 64 | (win as unknown as Gtk.Widget).connect("button-press-event", (_w, event) => { 65 | //@ts-ignore 66 | const [_, x, y] = event.get_device()?.get_position() || [0, 0, 0]; 67 | 68 | win.hide(); 69 | GLib.timeout_add(0, 200, () => { 70 | window_wm_class_instance_at_pos(x, y); 71 | return false; 72 | }); 73 | }); 74 | (win as unknown as Gtk.Widget).connect( 75 | "motion-notify-event", 76 | (_widget, event: Gdk.Event) => { 77 | const [_, x, y] = event.get_device()?.get_position() || [0, 0, 0]; 78 | label.set_label(`(${x}, ${y})`); 79 | } 80 | ); 81 | settings.connect("changed", (_, key) => { 82 | if (key == "wm-instance") { 83 | const wm_instance = settings.get_string("wm-instance"); 84 | if (wm_instance.length > 0) { 85 | cb(wm_instance); 86 | settings.set_string("wm-instance", ""); 87 | } 88 | } 89 | }); 90 | 91 | return win; 92 | } 93 | 94 | export function RunPickWindow(_cb: PickCb) { 95 | cb = _cb; 96 | win.show_all(); 97 | } 98 | -------------------------------------------------------------------------------- /src/settings.ts: -------------------------------------------------------------------------------- 1 | import * as Gio from "../@types/Gjs/Gio-2.0"; 2 | 3 | const settings = Gio.Settings.new("org.gnome.mutter"); 4 | const PADDINGS = JSON.parse(settings.get_string("clip-edge-padding")); 5 | 6 | const lists = { 7 | "black-list": settings.get_strv("black-list"), 8 | "blur-list": settings.get_strv("blur-list"), 9 | }; 10 | 11 | export interface Paddings { 12 | left: number; 13 | right: number; 14 | top: number; 15 | bottom: number; 16 | } 17 | 18 | interface AppPaddings { 19 | name: string; 20 | paddings: Paddings; 21 | } 22 | 23 | function padding2Arr(p: Paddings): number[] { 24 | const arr: number[] = []; 25 | arr[0] = p.left; 26 | arr[1] = p.right; 27 | arr[2] = p.top; 28 | arr[3] = p.bottom; 29 | return arr; 30 | } 31 | 32 | function arr2Padding(arr: number[]): Paddings { 33 | return { 34 | left: arr[0], 35 | right: arr[1], 36 | top: arr[2], 37 | bottom: arr[3], 38 | }; 39 | } 40 | 41 | export function SetGlobalPadding(p: Paddings) { 42 | PADDINGS["global"] = padding2Arr(p); 43 | settings.set_string("clip-edge-padding", JSON.stringify(PADDINGS)); 44 | } 45 | 46 | export function GetGlobalPadding(): Paddings { 47 | return arr2Padding(PADDINGS["global"]); 48 | } 49 | 50 | export function GetBlackList(): string[] { 51 | return lists["black-list"]; 52 | } 53 | 54 | export function getBlurList(): string[] { 55 | return lists["blur-list"]; 56 | } 57 | 58 | export function GetAppPaddings(): AppPaddings[] { 59 | const apps = PADDINGS["apps"]; 60 | return Object.keys(apps).map((k) => { 61 | return { 62 | name: k, 63 | paddings: arr2Padding(apps[k]), 64 | }; 65 | }); 66 | } 67 | 68 | function change_str_list(key: string, oldstr: string, newstr: string): boolean { 69 | const list = lists[key]; 70 | if (list.indexOf(newstr) != -1) return false; 71 | list[list.indexOf(oldstr)] = newstr; 72 | settings.set_strv(key, list); 73 | return true; 74 | } 75 | 76 | export function ChangeBlackListName(oldstr: string, newstr: string): boolean { 77 | return change_str_list("black-list", oldstr, newstr); 78 | } 79 | 80 | export function ChangeBlurListName(oldstr: string, newstr: string): boolean { 81 | return change_str_list("blur-list", oldstr, newstr); 82 | } 83 | 84 | export function ChangeAppListName(oldstr: string, newstr: string): boolean { 85 | if (oldstr == newstr) return true; 86 | if (PADDINGS["apps"][newstr]) return false; 87 | const arr = PADDINGS["apps"][oldstr]; 88 | PADDINGS["apps"][newstr] = arr; 89 | delete PADDINGS["apps"][oldstr]; 90 | settings.set_string("clip-edge-padding", JSON.stringify(PADDINGS)); 91 | return true; 92 | } 93 | 94 | export function ChangeAppListPadding( 95 | oldstr: string, 96 | newstr: string, 97 | paddings: Paddings 98 | ): boolean { 99 | if (!ChangeAppListName(oldstr, newstr)) return false; 100 | PADDINGS["apps"][newstr] = padding2Arr(paddings); 101 | settings.set_string("clip-edge-padding", JSON.stringify(PADDINGS)); 102 | return true; 103 | } 104 | 105 | function del_list_item(key: string, name: string) { 106 | const list = lists[key]; 107 | list.splice(list.indexOf(name), 1); 108 | settings.set_strv(key, list); 109 | } 110 | 111 | export function DelBlackListItem(name: string) { 112 | del_list_item("black-list", name); 113 | } 114 | 115 | export function DelBlurListItem(name: string) { 116 | del_list_item("blur-list", name); 117 | } 118 | 119 | export function DelAppListItem(name: string) { 120 | delete PADDINGS["apps"][name]; 121 | settings.set_string("clip-edge-padding", JSON.stringify(PADDINGS)); 122 | } 123 | 124 | function add_list_item(key: string, name: string): boolean { 125 | const list = lists[key]; 126 | if (list.indexOf(name) != -1) return false; 127 | list.push(name); 128 | settings.set_strv(key, list); 129 | return true; 130 | } 131 | 132 | export function AddBlackListItem(name: string): boolean { 133 | return add_list_item("black-list", name); 134 | } 135 | 136 | export function AddBlurListItem(name: string): boolean { 137 | return add_list_item("blur-list", name); 138 | } 139 | 140 | export function AddAppListItem(name: string): boolean { 141 | if (PADDINGS["apps"][name]) return false; 142 | PADDINGS["apps"][name] = padding2Arr(GetGlobalPadding()); 143 | settings.set_string("clip-edge-padding", JSON.stringify(PADDINGS)); 144 | return true; 145 | } 146 | 147 | export { settings }; 148 | -------------------------------------------------------------------------------- /src/window.ts: -------------------------------------------------------------------------------- 1 | const blrow_ui = require("../ui/bl_row.glade"); 2 | const approw_ui = require("../ui/app_row.glade"); 3 | const ui = require("../ui/window.glade"); 4 | 5 | import * as Gio from "../@types/Gjs/Gio-2.0"; 6 | import * as Gtk from "../@types/Gjs/Gtk-3.0"; 7 | import * as Hdy from "../@types/Gjs/Handy-1"; 8 | import * as Notify from "../@types/Gjs/Notify-0.7"; 9 | 10 | import { InitPickWindow, RunPickWindow } from "./pick_window"; 11 | import { 12 | AddAppListItem, 13 | AddBlackListItem, 14 | AddBlurListItem, 15 | ChangeAppListName, 16 | ChangeAppListPadding, 17 | ChangeBlackListName, 18 | ChangeBlurListName, 19 | DelAppListItem, 20 | DelBlackListItem, 21 | DelBlurListItem, 22 | GetAppPaddings, 23 | GetBlackList, 24 | getBlurList, 25 | GetGlobalPadding, 26 | Paddings, 27 | SetGlobalPadding, 28 | settings, 29 | } from "./settings"; 30 | 31 | interface PaddingChanged { 32 | (paddings: Paddings): void; 33 | } 34 | 35 | interface InitListFunc { 36 | (): ItemConfig[]; 37 | } 38 | 39 | interface OnNameChanged { 40 | (oldstr: string, newstr: string): boolean; 41 | } 42 | 43 | interface OnDel { 44 | (str: string): void; 45 | } 46 | 47 | interface OnAdd { 48 | (str: string): boolean; 49 | } 50 | 51 | interface ListConfig { 52 | builder: Gtk.Builder; 53 | list_id: string; 54 | add_btn_id: string; 55 | item_ui: string; 56 | init_config: InitListFunc; 57 | on_name_changed: OnNameChanged; 58 | on_del: OnDel; 59 | on_add: OnAdd; 60 | } 61 | 62 | interface ItemConfig { 63 | title?: string; 64 | ui?: string; 65 | list?: Gtk.ListBox; 66 | expanded?: boolean; 67 | paddings?: Paddings; 68 | on_name_changed?: OnNameChanged; 69 | on_del?: OnDel; 70 | } 71 | 72 | function errMsg() { 73 | new Notify.Notification({ 74 | summary: "same program exists in the list", 75 | body: "The Settings will not take effect", 76 | }).show(); 77 | } 78 | 79 | function new_item({ 80 | title = "new_item", 81 | ui = "", 82 | list, 83 | expanded = false, 84 | paddings, 85 | on_name_changed, 86 | on_del, 87 | }: ItemConfig): Gtk.Widget { 88 | const builder = Gtk.Builder.new_from_string(ui, -1); 89 | const row = builder.get_object("row") as Hdy.ExpanderRow; 90 | const del_btn = builder.get_object("del_btn") as Gtk.Button; 91 | const pick_bl_btn = builder.get_object("pick_bl_btn") as Gtk.Button; 92 | const entry = builder.get_object("entry") as Gtk.Entry; 93 | 94 | row.title = title; 95 | entry.text = title; 96 | 97 | if (paddings) { 98 | padding_setting(builder, paddings, (p) => { 99 | if (!ChangeAppListPadding(row.title, entry.text, p)) errMsg(); 100 | else row.title = entry.text; 101 | }); 102 | } 103 | 104 | if (expanded) { 105 | row.expanded = true; 106 | } 107 | 108 | const update_label = () => { 109 | let ok = on_name_changed && on_name_changed(row.title, entry.text); 110 | ok ? (row.title = entry.text) : errMsg(), (entry.text = row.title); 111 | entry.has_focus = true; 112 | }; 113 | 114 | pick_bl_btn.connect("clicked", () => 115 | RunPickWindow((app) => { 116 | log("[pick] " + app); 117 | if (app.length > 0) { 118 | entry.text = app; 119 | if (entry.text != row.title) { 120 | update_label(); 121 | } 122 | } 123 | }) 124 | ); 125 | 126 | entry.connect("activate", (entry) => { 127 | if (entry.text != row.title && entry.text.length != 0) { 128 | update_label(); 129 | } 130 | }); 131 | 132 | del_btn.connect("clicked", () => { 133 | on_del && on_del(row.title); 134 | list?.remove(row); 135 | }); 136 | return row; 137 | } 138 | 139 | function new_list({ 140 | builder, 141 | list_id, 142 | add_btn_id, 143 | on_add, 144 | init_config, 145 | item_ui: ui, 146 | on_del, 147 | on_name_changed, 148 | }: ListConfig) { 149 | const list_widget = builder.get_object(list_id) as Gtk.ListBox; 150 | const add_btn = builder.get_object(add_btn_id) as Gtk.Button; 151 | 152 | init_config().forEach((config) => { 153 | const row = new_item({ 154 | on_del, 155 | on_name_changed, 156 | list: list_widget, 157 | ui, 158 | ...config, 159 | }); 160 | list_widget.insert(row, 1); 161 | }); 162 | 163 | add_btn.connect("clicked", () => { 164 | if (on_add("new_item")) { 165 | const row = new_item({ 166 | title: "new_item", 167 | ui, 168 | list: list_widget, 169 | expanded: true, 170 | paddings: list_id == "app_list" ? GetGlobalPadding() : undefined, 171 | on_name_changed, 172 | on_del, 173 | }); 174 | list_widget.insert(row, 1); 175 | } 176 | }); 177 | } 178 | 179 | function padding_setting( 180 | builder: Gtk.Builder, 181 | paddings: Paddings, 182 | onChanged: PaddingChanged 183 | ) { 184 | const adj_padding_left = builder.get_object( 185 | "adj_padding_left" 186 | ) as Gtk.Adjustment; 187 | const adj_padding_right = builder.get_object( 188 | "adj_padding_right" 189 | ) as Gtk.Adjustment; 190 | const adj_padding_top = builder.get_object( 191 | "adj_padding_top" 192 | ) as Gtk.Adjustment; 193 | const adj_padding_bottom = builder.get_object( 194 | "adj_padding_bottom" 195 | ) as Gtk.Adjustment; 196 | 197 | adj_padding_left.value = paddings.left; 198 | adj_padding_right.value = paddings.right; 199 | adj_padding_bottom.value = paddings.bottom; 200 | adj_padding_top.value = paddings.top; 201 | 202 | function changed() { 203 | onChanged({ 204 | left: adj_padding_left.value, 205 | right: adj_padding_right.value, 206 | top: adj_padding_top.value, 207 | bottom: adj_padding_bottom.value, 208 | }); 209 | } 210 | 211 | adj_padding_bottom.connect("value-changed", changed); 212 | adj_padding_top.connect("value-changed", changed); 213 | adj_padding_left.connect("value-changed", changed); 214 | adj_padding_right.connect("value-changed", changed); 215 | } 216 | 217 | function global_setting(builder: Gtk.Builder) { 218 | padding_setting(builder, GetGlobalPadding(), SetGlobalPadding); 219 | 220 | const values_to_bind = [ 221 | { 222 | view_id: "adj_border_width", 223 | settings: "border-width", 224 | }, 225 | { 226 | view_id: "adj_border_brightness", 227 | settings: "border-brightness", 228 | }, 229 | { 230 | view_id: "adj_radius", 231 | settings: "round-corners-radius", 232 | }, 233 | { 234 | view_id: "adj_blur_sigmal", 235 | settings: "blur-sigmal", 236 | }, 237 | { 238 | view_id: "adj_blur_brightness", 239 | settings: "blur-brightness", 240 | }, 241 | { 242 | view_id: "adj_blured_window_opacity", 243 | settings: "blur-window-opacity", 244 | }, 245 | ]; 246 | 247 | values_to_bind.forEach((v) => { 248 | const adj_radius = builder.get_object(v.view_id) as Gtk.Adjustment; 249 | settings.bind( 250 | v.settings, 251 | adj_radius, 252 | "value", 253 | Gio.SettingsBindFlags.DEFAULT 254 | ); 255 | }); 256 | 257 | settings.bind( 258 | "rounded-in-maximized", 259 | builder.get_object("rounded_in_maximized") as Gtk.Switch, 260 | "active", 261 | Gio.SettingsBindFlags.DEFAULT 262 | ); 263 | } 264 | 265 | export function SettingsWin(app: Gtk.Application): Gtk.Window { 266 | const builder = Gtk.Builder.new_from_string(ui, -1); 267 | const win = builder.get_object("window") as Gtk.Window; 268 | const pick_win = InitPickWindow(app); 269 | 270 | global_setting(builder); 271 | 272 | [ 273 | { 274 | builder, 275 | list_id: "bl_list", 276 | add_btn_id: "add_bl_btn", 277 | item_ui: blrow_ui, 278 | init_config: () => 279 | GetBlackList().map((title) => ({ 280 | title, 281 | expanded: false, 282 | })), 283 | on_name_changed: ChangeBlackListName, 284 | on_del: DelBlackListItem, 285 | on_add: AddBlackListItem, 286 | }, 287 | { 288 | builder, 289 | list_id: "app_list", 290 | add_btn_id: "add_app_btn", 291 | item_ui: approw_ui, 292 | init_config: () => 293 | GetAppPaddings().map(({ name: title, paddings }) => ({ 294 | title, 295 | ui: approw_ui, 296 | paddings, 297 | })), 298 | on_name_changed: ChangeAppListName, 299 | on_del: DelAppListItem, 300 | on_add: AddAppListItem, 301 | }, 302 | { 303 | builder, 304 | list_id: "blur_list", 305 | add_btn_id: "add_blur_btn", 306 | item_ui: blrow_ui, 307 | init_config() { 308 | return getBlurList().map((title) => ({ title })); 309 | }, 310 | on_name_changed: ChangeBlurListName, 311 | on_add: AddBlurListItem, 312 | on_del: DelBlurListItem, 313 | }, 314 | ].forEach((config) => new_list(config)); 315 | 316 | win.connect("destroy", () => { 317 | pick_win.destroy(); 318 | }); 319 | 320 | return win; 321 | } 322 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["ES6"], 4 | "target": "ES5", 5 | "module": "ES6", 6 | "strict": true, 7 | "noImplicitAny": false, 8 | "strictNullChecks": true, 9 | "noImplicitThis": true, 10 | "alwaysStrict": true, 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ui/app_row.glade: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 100 6 | 0 7 | 0 8 | 1 9 | 10 | 11 | 100 12 | 0 13 | 0 14 | 1 15 | 16 | 17 | 100 18 | 0 19 | 0 20 | 1 21 | 22 | 23 | 100 24 | 0 25 | 0 26 | 1 27 | 28 | 29 | 30 | True 31 | True 32 | 33 | 34 | True 35 | center 36 | 41 | 42 | 43 | True 44 | user-trash-symbolic 45 | 46 | 47 | 48 | 49 | 50 | 51 | Add Black List Item 52 | True 53 | 54 | 55 | 16 56 | 16 57 | 24 58 | 30 59 | 12 60 | True 61 | 62 | 63 | True 64 | center 65 | 69 | 70 | 71 | True 72 | find-location-symbolic 73 | 74 | 75 | 76 | 77 | 78 | 79 | True 80 | True 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | True 90 | Top Clipping 91 | padding_top_2 92 | 93 | 94 | True 95 | start 96 | center 97 | 1 98 | adj_padding_top 99 | 100 | 101 | 102 | 103 | 104 | 105 | True 106 | Bottom Clipping 107 | padding_bottom_2 108 | 109 | 110 | True 111 | start 112 | center 113 | 1 114 | adj_padding_bottom 115 | 116 | 117 | 118 | 119 | 120 | 121 | True 122 | Left Clipping 123 | padding_left_2 124 | 125 | 126 | True 127 | start 128 | center 129 | 1 130 | adj_padding_left 131 | 132 | 133 | 134 | 135 | 136 | 137 | True 138 | Right Clipping 139 | padding_right_2 140 | 141 | 142 | True 143 | start 144 | center 145 | 1 146 | adj_padding_right 147 | 148 | 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /ui/bl_row.glade: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | True 7 | True 8 | 9 | 10 | True 11 | center 12 | 17 | 18 | 19 | True 20 | user-trash-symbolic 21 | 22 | 23 | 24 | 25 | 26 | 27 | Add Black List Item 28 | True 29 | 30 | 31 | 16 32 | 16 33 | 24 34 | 30 35 | 12 36 | True 37 | 38 | 39 | True 40 | center 41 | 45 | 46 | 47 | True 48 | find-location-symbolic 49 | 50 | 51 | 52 | 53 | 54 | 55 | True 56 | True 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /ui/window.glade: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 100 6 | 2 7 | 2 8 | 1 9 | 10 | 11 | 100 12 | 0 13 | 0 14 | 1 15 | 16 | 17 | 100 18 | 0 19 | 0 20 | 1 21 | 22 | 23 | 100 24 | 0 25 | 0 26 | 1 27 | 28 | 29 | 100 30 | 0 31 | 0 32 | 1 33 | 34 | 35 | 100 36 | 0 37 | 0 38 | 1 39 | 40 | 41 | 100 42 | 0 43 | 0 44 | 1 45 | 46 | 47 | 48 | 100 49 | 0 50 | 0 51 | 1 52 | 53 | 54 | 100 55 | 0 56 | 0 57 | 1 58 | 59 | 60 | 100 61 | 0 62 | 0 63 | 1 64 | 65 | 66 | 67 | False 68 | 800 69 | 600 70 | 71 | 72 | True 73 | False 74 | vertical 75 | 76 | 77 | True 78 | strict 79 | False 80 | True 81 | Setting 82 | 83 | 84 | True 85 | False 86 | stack 87 | mutter rounded setting 88 | 89 | 90 | 91 | 92 | 93 | 94 | True 95 | False 96 | 97 | 98 | 99 | 100 | 101 | True 102 | 103 | 104 | True 105 | False 106 | 107 | 108 | True 109 | False 110 | True 111 | none 112 | 115 | 116 | 117 | True 118 | Rounded in maximized 119 | Windows will enable rounded corners when maximized 120 | rounded_in_maximized 121 | 122 | 123 | True 124 | False 125 | center 126 | 127 | 128 | 129 | 130 | 131 | 132 | True 133 | Border width 134 | radius_scale 135 | 136 | 137 | True 138 | left 139 | adj_border_width 140 | 250 141 | 142 | 143 | 144 | 145 | 146 | 147 | True 148 | Border brightness 149 | radius_scale 150 | 151 | 152 | True 153 | left 154 | adj_border_brightness 155 | 250 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | True 167 | False 168 | 169 | 170 | True 171 | False 172 | True 173 | none 174 | 177 | 178 | 179 | True 180 | Rounded radius 181 | radius_scale 182 | 183 | 184 | True 185 | left 186 | adj_radius 187 | 250 188 | 189 | 190 | 191 | 192 | 193 | 194 | True 195 | Top Clipping 196 | padding_top 197 | 198 | 199 | True 200 | start 201 | center 202 | 1 203 | adj_padding_top 204 | 205 | 206 | 207 | 208 | 209 | 210 | True 211 | Bottom Clipping 212 | padding_bottom 213 | 214 | 215 | True 216 | start 217 | center 218 | 1 219 | adj_padding_bottom 220 | 221 | 222 | 223 | 224 | 225 | 226 | True 227 | Left Clipping 228 | padding_left 229 | 230 | 231 | True 232 | start 233 | center 234 | 1 235 | adj_padding_left 236 | 237 | 238 | 239 | 240 | 241 | 242 | True 243 | Right Clipping 244 | padding_right 245 | 246 | 247 | True 248 | start 249 | center 250 | 1 251 | adj_padding_right 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | page1 263 | Global 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | True 272 | 273 | 274 | For apps in this list, the setting will effect in next openning. 275 | True 276 | 277 | 278 | True 279 | False 280 | False 281 | none 282 | 285 | 286 | 287 | 288 | Add Special App 289 | True 290 | 291 | 292 | True 293 | 296 | 297 | 298 | list-add-symbolic 299 | 8 300 | True 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | page2 314 | BlackList 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | True 323 | 324 | 325 | True 326 | 327 | 328 | True 329 | False 330 | False 331 | none 332 | 335 | 336 | 337 | 338 | Add Special App 339 | True 340 | 341 | 342 | True 343 | 346 | 347 | 348 | list-add-symbolic 349 | 8 350 | True 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | page3 364 | Special 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | True 373 | 374 | 375 | True 376 | Blur Setting 377 | 378 | 379 | True 380 | Blur sigmal 381 | blur-sigmal 382 | 383 | 384 | True 385 | left 386 | adj_blur_sigmal 387 | 250 388 | 389 | 390 | 391 | 392 | 393 | 394 | True 395 | Blur Brightness 396 | blur-brightness 397 | 398 | 399 | True 400 | left 401 | adj_blur_brightness 402 | 250 403 | 404 | 405 | 406 | 407 | 408 | 409 | True 410 | Blured window opacity 411 | blured-window-opacity 412 | 413 | 414 | True 415 | 250 416 | left 417 | adj_blured_window_opacity 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | True 427 | Blured List 428 | For apps in this list, the setting will effect in next openning. 429 | 430 | 431 | True 432 | False 433 | False 434 | none 435 | 438 | 439 | 440 | 441 | Add Special App 442 | True 443 | 444 | 445 | True 446 | 449 | 450 | 451 | list-add-symbolic 452 | 8 453 | True 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | page4 467 | Blur Effect 468 | 469 | 470 | 471 | 472 | 473 | True 474 | True 475 | 476 | 477 | 478 | 479 | True 480 | False 481 | stack 482 | 483 | 484 | 485 | 486 | 487 | 488 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | mode: 'production', 3 | entry: { 4 | mutter_settings: "./src/main.ts", 5 | }, 6 | output: { 7 | filename: "[name].js", 8 | }, 9 | module: { 10 | rules: [ 11 | { 12 | test: [/\.tsx?$/], 13 | loader: "ts-loader", 14 | exclude: ["/node_modules/"], 15 | }, 16 | { 17 | test: /\.glade$/, 18 | use: [ 19 | { 20 | loader: "xml-minify-loader", 21 | }, 22 | ], 23 | }, 24 | ], 25 | }, 26 | resolve: { 27 | extensions: [".tsx", ".ts", ".js"], 28 | }, 29 | }; 30 | --------------------------------------------------------------------------------