///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
/**
* Type Definitions for Gjs (https://gjs.guide/)
*
* These type definitions are automatically generated, do not edit them by hand.
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
*
* The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
*/
declare module 'gi://WebKit2WebExtension?version=4.0' {
// Module dependencies
import type Soup from 'gi://Soup?version=2.4';
import type Gio from 'gi://Gio?version=2.0';
import type GObject from 'gi://GObject?version=2.0';
import type GLib from 'gi://GLib?version=2.0';
import type GModule from 'gi://GModule?version=2.0';
import type JavaScriptCore from 'gi://JavaScriptCore?version=4.0';
import type Gtk from 'gi://Gtk?version=3.0';
import type xlib from 'gi://xlib?version=2.0';
import type Gdk from 'gi://Gdk?version=3.0';
import type cairo from 'cairo';
import type Pango from 'gi://Pango?version=1.0';
import type HarfBuzz from 'gi://HarfBuzz?version=0.0';
import type freetype2 from 'gi://freetype2?version=2.0';
import type GdkPixbuf from 'gi://GdkPixbuf?version=2.0';
import type Atk from 'gi://Atk?version=1.0';
export namespace WebKit2WebExtension {
/**
* WebKit2WebExtension-4.0
*/
/**
* Enum values used to denote the various levels of console messages.
*/
/**
* Enum values used to denote the various levels of console messages.
*/
export namespace ConsoleMessageLevel {
export const $gtype: GObject.GType;
}
enum ConsoleMessageLevel {
/**
* Information message.
*/
INFO,
/**
* Log message.
*/
LOG,
/**
* Warning message.
*/
WARNING,
/**
* Error message.
*/
ERROR,
/**
* Debug message.
*/
DEBUG,
}
/**
* Enum values used to denote the various sources of console messages.
*/
/**
* Enum values used to denote the various sources of console messages.
*/
export namespace ConsoleMessageSource {
export const $gtype: GObject.GType;
}
enum ConsoleMessageSource {
/**
* Message produced by JavaScript.
*/
JAVASCRIPT,
/**
* Network messages.
*/
NETWORK,
/**
* Messages produced by console API.
*/
CONSOLE_API,
/**
* Security messages.
*/
SECURITY,
/**
* Other messages.
*/
OTHER,
}
/**
* Enum values used to denote the stock actions for
* #WebKitContextMenuItems
*/
/**
* Enum values used to denote the stock actions for
* #WebKitContextMenuItems
*/
export namespace ContextMenuAction {
export const $gtype: GObject.GType;
}
enum ContextMenuAction {
/**
* No action, used by separator menu items.
*/
NO_ACTION,
/**
* Open current link.
*/
OPEN_LINK,
/**
* Open current link in a new window.
*/
OPEN_LINK_IN_NEW_WINDOW,
/**
* Download link destination.
*/
DOWNLOAD_LINK_TO_DISK,
/**
* Copy link location to the clipboard.
*/
COPY_LINK_TO_CLIPBOARD,
/**
* Open current image in a new window.
*/
OPEN_IMAGE_IN_NEW_WINDOW,
/**
* Download current image.
*/
DOWNLOAD_IMAGE_TO_DISK,
/**
* Copy current image to the clipboard.
*/
COPY_IMAGE_TO_CLIPBOARD,
/**
* Copy current image location to the clipboard.
*/
COPY_IMAGE_URL_TO_CLIPBOARD,
/**
* Open current frame in a new window.
*/
OPEN_FRAME_IN_NEW_WINDOW,
/**
* Load the previous history item.
*/
GO_BACK,
/**
* Load the next history item.
*/
GO_FORWARD,
/**
* Stop any ongoing loading operation.
*/
STOP,
/**
* Reload the contents of current view.
*/
RELOAD,
/**
* Copy current selection the clipboard.
*/
COPY,
/**
* Cut current selection to the clipboard.
*/
CUT,
/**
* Paste clipboard contents.
*/
PASTE,
/**
* Delete current selection.
*/
DELETE,
/**
* Select all text.
*/
SELECT_ALL,
/**
* Input methods menu.
*/
INPUT_METHODS,
/**
* Unicode menu.
*/
UNICODE,
/**
* A proposed replacement for a misspelled word.
*/
SPELLING_GUESS,
/**
* An indicator that spellchecking found no proposed replacements.
*/
NO_GUESSES_FOUND,
/**
* Causes the spellchecker to ignore the word for this session.
*/
IGNORE_SPELLING,
/**
* Causes the spellchecker to add the word to the dictionary.
*/
LEARN_SPELLING,
/**
* Ignore grammar.
*/
IGNORE_GRAMMAR,
/**
* Font options menu.
*/
FONT_MENU,
/**
* Bold.
*/
BOLD,
/**
* Italic.
*/
ITALIC,
/**
* Underline.
*/
UNDERLINE,
/**
* Outline.
*/
OUTLINE,
/**
* Open current element in the inspector.
*/
INSPECT_ELEMENT,
/**
* Open current video element in a new window.
*/
OPEN_VIDEO_IN_NEW_WINDOW,
/**
* Open current audio element in a new window.
*/
OPEN_AUDIO_IN_NEW_WINDOW,
/**
* Copy video link location in to the clipboard.
*/
COPY_VIDEO_LINK_TO_CLIPBOARD,
/**
* Copy audio link location in to the clipboard.
*/
COPY_AUDIO_LINK_TO_CLIPBOARD,
/**
* Enable or disable media controls.
*/
TOGGLE_MEDIA_CONTROLS,
/**
* Enable or disable media loop.
*/
TOGGLE_MEDIA_LOOP,
/**
* Show current video element in fullscreen mode.
*/
ENTER_VIDEO_FULLSCREEN,
/**
* Play current media element.
*/
MEDIA_PLAY,
/**
* Pause current media element.
*/
MEDIA_PAUSE,
/**
* Mute current media element.
*/
MEDIA_MUTE,
/**
* Download video to disk. Since 2.2
*/
DOWNLOAD_VIDEO_TO_DISK,
/**
* Download audio to disk. Since 2.2
*/
DOWNLOAD_AUDIO_TO_DISK,
/**
* Insert an emoji. Since 2.26
*/
INSERT_EMOJI,
/**
* Paste clipboard contents as plain text. Since 2.30
*/
PASTE_AS_PLAIN_TEXT,
/**
* Custom action defined by applications.
*/
CUSTOM,
}
/**
* Used to indicate a particular stage in form submission. See
* #WebKitWebPage::will-submit-form.
*/
/**
* Used to indicate a particular stage in form submission. See
* #WebKitWebPage::will-submit-form.
*/
export namespace FormSubmissionStep {
export const $gtype: GObject.GType;
}
enum FormSubmissionStep {
/**
* indicates the form's
* DOM submit event is about to be emitted.
*/
SEND_DOM_EVENT,
/**
* indicates the form is about
* to be submitted.
*/
COMPLETE,
}
/**
* Enum values used to denote errors happening when sending user messages.
*/
/**
* Enum values used to denote errors happening when sending user messages.
*/
export namespace UserMessageError {
export const $gtype: GObject.GType;
}
enum UserMessageError {
/**
* The message was not handled by the receiver.
*/
USER_MESSAGE_UNHANDLED_MESSAGE,
}
const DOM_CSS_RULE_CHARSET_RULE: number;
const DOM_CSS_RULE_FONT_FACE_RULE: number;
const DOM_CSS_RULE_IMPORT_RULE: number;
const DOM_CSS_RULE_MEDIA_RULE: number;
const DOM_CSS_RULE_PAGE_RULE: number;
const DOM_CSS_RULE_STYLE_RULE: number;
const DOM_CSS_RULE_UNKNOWN_RULE: number;
const DOM_CSS_VALUE_CSS_CUSTOM: number;
const DOM_CSS_VALUE_CSS_INHERIT: number;
const DOM_CSS_VALUE_CSS_PRIMITIVE_VALUE: number;
const DOM_CSS_VALUE_CSS_VALUE_LIST: number;
const DOM_ELEMENT_ALLOW_KEYBOARD_INPUT: number;
const DOM_EVENT_AT_TARGET: number;
const DOM_EVENT_BLUR: number;
const DOM_EVENT_BUBBLING_PHASE: number;
const DOM_EVENT_CAPTURING_PHASE: number;
const DOM_EVENT_CHANGE: number;
const DOM_EVENT_CLICK: number;
const DOM_EVENT_DBLCLICK: number;
const DOM_EVENT_DRAGDROP: number;
const DOM_EVENT_FOCUS: number;
const DOM_EVENT_KEYDOWN: number;
const DOM_EVENT_KEYPRESS: number;
const DOM_EVENT_KEYUP: number;
const DOM_EVENT_MOUSEDOWN: number;
const DOM_EVENT_MOUSEDRAG: number;
const DOM_EVENT_MOUSEMOVE: number;
const DOM_EVENT_MOUSEOUT: number;
const DOM_EVENT_MOUSEOVER: number;
const DOM_EVENT_MOUSEUP: number;
const DOM_EVENT_NONE: number;
const DOM_EVENT_SELECT: number;
const DOM_KEYBOARD_EVENT_KEY_LOCATION_LEFT: number;
const DOM_KEYBOARD_EVENT_KEY_LOCATION_NUMPAD: number;
const DOM_KEYBOARD_EVENT_KEY_LOCATION_RIGHT: number;
const DOM_KEYBOARD_EVENT_KEY_LOCATION_STANDARD: number;
const DOM_NODE_ATTRIBUTE_NODE: number;
const DOM_NODE_CDATA_SECTION_NODE: number;
const DOM_NODE_COMMENT_NODE: number;
const DOM_NODE_DOCUMENT_FRAGMENT_NODE: number;
const DOM_NODE_DOCUMENT_NODE: number;
const DOM_NODE_DOCUMENT_POSITION_CONTAINED_BY: number;
const DOM_NODE_DOCUMENT_POSITION_CONTAINS: number;
const DOM_NODE_DOCUMENT_POSITION_DISCONNECTED: number;
const DOM_NODE_DOCUMENT_POSITION_FOLLOWING: number;
const DOM_NODE_DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
const DOM_NODE_DOCUMENT_POSITION_PRECEDING: number;
const DOM_NODE_DOCUMENT_TYPE_NODE: number;
const DOM_NODE_ELEMENT_NODE: number;
const DOM_NODE_ENTITY_NODE: number;
const DOM_NODE_ENTITY_REFERENCE_NODE: number;
/**
* Accept the node. Use this macro as return value of webkit_dom_node_filter_accept_node()
* implementation to accept the given #WebKitDOMNode
*/
const DOM_NODE_FILTER_ACCEPT: number;
/**
* Reject the node. Use this macro as return value of webkit_dom_node_filter_accept_node()
* implementation to reject the given #WebKitDOMNode. The children of the given node will
* be rejected too.
*/
const DOM_NODE_FILTER_REJECT: number;
/**
* Show all nodes.
*/
const DOM_NODE_FILTER_SHOW_ALL: number;
/**
* Show #WebKitDOMAttr nodes.
*/
const DOM_NODE_FILTER_SHOW_ATTRIBUTE: number;
/**
* Show #WebKitDOMCDataSection nodes.
*/
const DOM_NODE_FILTER_SHOW_CDATA_SECTION: number;
/**
* Show #WebKitDOMComment nodes.
*/
const DOM_NODE_FILTER_SHOW_COMMENT: number;
/**
* Show #WebKitDOMDocument nodes.
*/
const DOM_NODE_FILTER_SHOW_DOCUMENT: number;
/**
* Show #WebKitDOMDocumentFragment nodes.
*/
const DOM_NODE_FILTER_SHOW_DOCUMENT_FRAGMENT: number;
/**
* Show #WebKitDOMDocumentType nodes.
*/
const DOM_NODE_FILTER_SHOW_DOCUMENT_TYPE: number;
/**
* Show #WebKitDOMElement nodes.
*/
const DOM_NODE_FILTER_SHOW_ELEMENT: number;
/**
* Show #WebKitDOMEntity nodes.
*/
const DOM_NODE_FILTER_SHOW_ENTITY: number;
/**
* Show #WebKitDOMEntityReference nodes.
*/
const DOM_NODE_FILTER_SHOW_ENTITY_REFERENCE: number;
/**
* Show #WebKitDOMNotation nodes.
*/
const DOM_NODE_FILTER_SHOW_NOTATION: number;
/**
* Show #WebKitDOMProcessingInstruction nodes.
*/
const DOM_NODE_FILTER_SHOW_PROCESSING_INSTRUCTION: number;
/**
* Show #WebKitDOMText nodes.
*/
const DOM_NODE_FILTER_SHOW_TEXT: number;
/**
* Skip the node. Use this macro as return value of webkit_dom_node_filter_accept_node()
* implementation to skip the given #WebKitDOMNode. The children of the given node will
* not be skipped.
*/
const DOM_NODE_FILTER_SKIP: number;
const DOM_NODE_PROCESSING_INSTRUCTION_NODE: number;
const DOM_NODE_TEXT_NODE: number;
const DOM_RANGE_END_TO_END: number;
const DOM_RANGE_END_TO_START: number;
const DOM_RANGE_NODE_AFTER: number;
const DOM_RANGE_NODE_BEFORE: number;
const DOM_RANGE_NODE_BEFORE_AND_AFTER: number;
const DOM_RANGE_NODE_INSIDE: number;
const DOM_RANGE_START_TO_END: number;
const DOM_RANGE_START_TO_START: number;
const DOM_XPATH_RESULT_ANY_TYPE: number;
const DOM_XPATH_RESULT_ANY_UNORDERED_NODE_TYPE: number;
const DOM_XPATH_RESULT_BOOLEAN_TYPE: number;
const DOM_XPATH_RESULT_FIRST_ORDERED_NODE_TYPE: number;
const DOM_XPATH_RESULT_NUMBER_TYPE: number;
const DOM_XPATH_RESULT_ORDERED_NODE_ITERATOR_TYPE: number;
const DOM_XPATH_RESULT_ORDERED_NODE_SNAPSHOT_TYPE: number;
const DOM_XPATH_RESULT_STRING_TYPE: number;
const DOM_XPATH_RESULT_UNORDERED_NODE_ITERATOR_TYPE: number;
const DOM_XPATH_RESULT_UNORDERED_NODE_SNAPSHOT_TYPE: number;
interface WebExtensionInitializeFunction {
(extension: WebExtension): void;
}
interface WebExtensionInitializeWithUserDataFunction {
(extension: WebExtension, user_data: GLib.Variant): void;
}
/**
* Enum values with flags representing the context of a #WebKitHitTestResult.
*/
/**
* Enum values with flags representing the context of a #WebKitHitTestResult.
*/
export namespace HitTestResultContext {
export const $gtype: GObject.GType;
}
enum HitTestResultContext {
/**
* anywhere in the document.
*/
DOCUMENT,
/**
* a hyperlink element.
*/
LINK,
/**
* an image element.
*/
IMAGE,
/**
* a video or audio element.
*/
MEDIA,
/**
* an editable element
*/
EDITABLE,
/**
* a scrollbar element.
*/
SCROLLBAR,
/**
* a selected element. Since 2.8
*/
SELECTION,
}
namespace ContextMenu {
// Signal signatures
interface SignalSignatures extends GObject.Object.SignalSignatures {}
// Constructor properties interface
interface ConstructorProps extends GObject.Object.ConstructorProps {}
}
/**
* Represents the context menu in a #WebKitWebView.
*
* #WebKitContextMenu represents a context menu containing
* #WebKitContextMenuItems in a #WebKitWebView.
*
* When a #WebKitWebView is about to display the context menu, it
* emits the #WebKitWebView::context-menu signal, which has the
* #WebKitContextMenu as an argument. You can modify it, adding new
* submenus that you can create with webkit_context_menu_new(), adding
* new #WebKitContextMenuItems with
* webkit_context_menu_prepend(), webkit_context_menu_append() or
* webkit_context_menu_insert(), maybe after having removed the
* existing ones with webkit_context_menu_remove_all().
*/
class ContextMenu extends GObject.Object {
static $gtype: GObject.GType;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: ContextMenu.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
static ['new'](): ContextMenu;
static new_with_items(items: ContextMenuItem[]): ContextMenu;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q] ? Q : never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
/**
* Adds `item` at the end of the `menu`.
* @param item the #WebKitContextMenuItem to add
*/
append(item: ContextMenuItem): void;
/**
* Gets the first item in the `menu`.
* @returns the first #WebKitContextMenuItem of @menu, or %NULL if the #WebKitContextMenu is empty.
*/
first(): ContextMenuItem;
/**
* Gets the #GdkEvent that triggered the context menu. This function only returns a valid
* #GdkEvent when called for a #WebKitContextMenu passed to #WebKitWebView::context-menu
* signal; in all other cases, %NULL is returned.
*
* The returned #GdkEvent is expected to be one of the following types:
*
*
* a #GdkEventButton of type %GDK_BUTTON_PRESS when the context menu was triggered with mouse.
*
*
* a #GdkEventKey of type %GDK_KEY_PRESS if the keyboard was used to show the menu.
*
*
* a generic #GdkEvent of type %GDK_NOTHING when the #GtkWidget::popup-menu signal was used to show the context menu.
*
*
* @returns the menu event or %NULL.
*/
get_event(): Gdk.Event;
/**
* Gets the item at the given position in the `menu`.
* @param position the position of the item, counting from 0
* @returns the #WebKitContextMenuItem at position @position in @menu, or %NULL if the position is off the end of the @menu.
*/
get_item_at_position(position: number): ContextMenuItem;
/**
* Returns the item list of `menu`.
* @returns a #GList of #WebKitContextMenuItems
*/
get_items(): ContextMenuItem[];
/**
* Gets the length of the `menu`.
* @returns the number of #WebKitContextMenuItems in @menu
*/
get_n_items(): number;
/**
* Gets the user data of `menu`.
*
* This function can be used from the UI Process to get user data previously set
* from the Web Process with webkit_context_menu_set_user_data().
* @returns the user data of @menu, or %NULL if @menu doesn't have user data
*/
get_user_data(): GLib.Variant;
/**
* Inserts `item` into the `menu` at the given position.
*
* If `position` is negative, or is larger than the number of items
* in the #WebKitContextMenu, the item is added on to the end of
* the `menu`. The first position is 0.
* @param item the #WebKitContextMenuItem to add
* @param position the position to insert the item
*/
insert(item: ContextMenuItem, position: number): void;
/**
* Gets the last item in the `menu`.
* @returns the last #WebKitContextMenuItem of @menu, or %NULL if the #WebKitContextMenu is empty.
*/
last(): ContextMenuItem;
/**
* Moves `item` to the given position in the `menu`.
*
* If `position` is negative, or is larger than the number of items
* in the #WebKitContextMenu, the item is added on to the end of
* the `menu`.
* The first position is 0.
* @param item the #WebKitContextMenuItem to add
* @param position the new position to move the item
*/
move_item(item: ContextMenuItem, position: number): void;
/**
* Adds `item` at the beginning of the `menu`.
* @param item the #WebKitContextMenuItem to add
*/
prepend(item: ContextMenuItem): void;
/**
* Removes `item` from the `menu`.
*
* See also webkit_context_menu_remove_all() to remove all items.
* @param item the #WebKitContextMenuItem to remove
*/
remove(item: ContextMenuItem): void;
/**
* Removes all items of the `menu`.
*/
remove_all(): void;
/**
* Sets user data to `menu`.
*
* This function can be used from a Web Process extension to set user data
* that can be retrieved from the UI Process using webkit_context_menu_get_user_data().
* If the `user_data` #GVariant is floating, it is consumed.
* @param user_data a #GVariant
*/
set_user_data(user_data: GLib.Variant): void;
}
namespace ContextMenuItem {
// Signal signatures
interface SignalSignatures extends GObject.InitiallyUnowned.SignalSignatures {}
// Constructor properties interface
interface ConstructorProps extends GObject.InitiallyUnowned.ConstructorProps {}
}
/**
* One item of a #WebKitContextMenu.
*
* The #WebKitContextMenu is composed of #WebKitContextMenuItems. These items can be created from a #GtkAction, from a
* #WebKitContextMenuAction or from a #WebKitContextMenuAction and a
* label. These #WebKitContextMenuActions denote stock actions
* for the items. You can also create separators and submenus.
*/
class ContextMenuItem extends GObject.InitiallyUnowned {
static $gtype: GObject.GType;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: ContextMenuItem.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
static ['new'](action: Gtk.Action): ContextMenuItem;
static new_from_gaction(action: Gio.Action, label: string, target?: GLib.Variant | null): ContextMenuItem;
static new_from_stock_action(action: ContextMenuAction): ContextMenuItem;
static new_from_stock_action_with_label(action: ContextMenuAction, label: string): ContextMenuItem;
static new_separator(): ContextMenuItem;
static new_with_submenu(label: string, submenu: ContextMenu): ContextMenuItem;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q]
? Q
: never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
/**
* Gets the action associated to `item` as a #GtkAction.
* @returns the #GtkAction associated to the #WebKitContextMenuItem, or %NULL if @item is a separator.
*/
get_action(): Gtk.Action;
/**
* Gets the action associated to `item` as a #GAction.
* @returns the #GAction associated to the #WebKitContextMenuItem, or %NULL if @item is a separator.
*/
get_gaction(): Gio.Action;
/**
* Gets the #WebKitContextMenuAction of `item`.
*
* If the #WebKitContextMenuItem was not
* created for a stock action %WEBKIT_CONTEXT_MENU_ACTION_CUSTOM will be
* returned. If the #WebKitContextMenuItem is a separator %WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION
* will be returned.
* @returns the #WebKitContextMenuAction of @item
*/
get_stock_action(): ContextMenuAction;
/**
* Gets the submenu of `item`.
* @returns the #WebKitContextMenu representing the submenu of @item or %NULL if @item doesn't have a submenu.
*/
get_submenu(): ContextMenu;
/**
* Checks whether `item` is a separator.
* @returns %TRUE is @item is a separator or %FALSE otherwise
*/
is_separator(): boolean;
/**
* Sets or replaces the `item` submenu.
*
* If `submenu` is %NULL the current
* submenu of `item` is removed.
* @param submenu a #WebKitContextMenu
*/
set_submenu(submenu?: ContextMenu | null): void;
}
namespace DOMAttr {
// Signal signatures
interface SignalSignatures extends DOMNode.SignalSignatures {
'notify::local-name': (pspec: GObject.ParamSpec) => void;
'notify::name': (pspec: GObject.ParamSpec) => void;
'notify::namespace-uri': (pspec: GObject.ParamSpec) => void;
'notify::owner-element': (pspec: GObject.ParamSpec) => void;
'notify::prefix': (pspec: GObject.ParamSpec) => void;
'notify::specified': (pspec: GObject.ParamSpec) => void;
'notify::value': (pspec: GObject.ParamSpec) => void;
'notify::base-uri': (pspec: GObject.ParamSpec) => void;
'notify::child-nodes': (pspec: GObject.ParamSpec) => void;
'notify::first-child': (pspec: GObject.ParamSpec) => void;
'notify::last-child': (pspec: GObject.ParamSpec) => void;
'notify::next-sibling': (pspec: GObject.ParamSpec) => void;
'notify::node-name': (pspec: GObject.ParamSpec) => void;
'notify::node-type': (pspec: GObject.ParamSpec) => void;
'notify::node-value': (pspec: GObject.ParamSpec) => void;
'notify::owner-document': (pspec: GObject.ParamSpec) => void;
'notify::parent-element': (pspec: GObject.ParamSpec) => void;
'notify::parent-node': (pspec: GObject.ParamSpec) => void;
'notify::previous-sibling': (pspec: GObject.ParamSpec) => void;
'notify::text-content': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMNode.ConstructorProps, DOMEventTarget.ConstructorProps {
local_name: string;
localName: string;
name: string;
namespace_uri: string;
namespaceUri: string;
owner_element: DOMElement;
ownerElement: DOMElement;
prefix: string;
specified: boolean;
value: string;
}
}
class DOMAttr extends DOMNode implements DOMEventTarget {
static $gtype: GObject.GType;
// Properties
get local_name(): string;
get localName(): string;
get name(): string;
get namespace_uri(): string;
get namespaceUri(): string;
get owner_element(): DOMElement;
get ownerElement(): DOMElement;
get prefix(): string;
get specified(): boolean;
get value(): string;
set value(val: string);
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMAttr.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q] ? Q : never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
get_local_name(): string;
get_name(): string;
get_namespace_uri(): string;
get_owner_element(): DOMElement;
get_prefix(): string;
get_specified(): boolean;
get_value(): string;
set_value(value: string): void;
// Inherited methods
add_event_listener(event_name: string, handler: GObject.Callback, use_capture: boolean): boolean;
// Conflicted with WebKit2WebExtension.DOMEventTarget.add_event_listener
add_event_listener(...args: never[]): any;
dispatch_event(event: DOMEvent): boolean;
remove_event_listener(event_name: string, handler: any | null, use_capture: boolean): boolean;
// Conflicted with WebKit2WebExtension.DOMEventTarget.remove_event_listener
remove_event_listener(...args: never[]): any;
vfunc_add_event_listener(event_name: string, handler: GObject.Closure, use_capture: boolean): boolean;
vfunc_dispatch_event(event: DOMEvent): boolean;
vfunc_remove_event_listener(event_name: string, handler: any | null, use_capture: boolean): boolean;
/**
* Creates a binding between `source_property` on `source` and `target_property`
* on `target`.
*
* Whenever the `source_property` is changed the `target_property` is
* updated using the same value. For instance:
*
*
* ```c
* g_object_bind_property (action, "active", widget, "sensitive", 0);
* ```
*
*
* Will result in the "sensitive" property of the widget #GObject instance to be
* updated with the same value of the "active" property of the action #GObject
* instance.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well.
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. To remove the binding without affecting the
* `source` and the `target` you can just call g_object_unref() on the returned
* #GBinding instance.
*
* Removing the binding by calling g_object_unref() on it must only be done if
* the binding, `source` and `target` are only used from a single thread and it
* is clear that both `source` and `target` outlive the binding. Especially it
* is not safe to rely on this if the binding, `source` or `target` can be
* finalized from different threads. Keep another reference to the binding and
* use g_binding_unbind() instead to be on the safe side.
*
* A #GObject can have multiple bindings.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
): GObject.Binding;
/**
* Complete version of g_object_bind_property().
*
* Creates a binding between `source_property` on `source` and `target_property`
* on `target,` allowing you to set the transformation functions to be used by
* the binding.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well. The `transform_from` function is only used in case
* of bidirectional bindings, otherwise it will be ignored
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. This will release the reference that is
* being held on the #GBinding instance; if you want to hold on to the
* #GBinding instance, you will need to hold a reference to it.
*
* To remove the binding, call g_binding_unbind().
*
* A #GObject can have multiple bindings.
*
* The same `user_data` parameter will be used for both `transform_to`
* and `transform_from` transformation functions; the `notify` function will
* be called once, when the binding is removed. If you need different data
* for each transformation function, please use
* g_object_bind_property_with_closures() instead.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
* @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
* @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property_full(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
transform_to?: GObject.BindingTransformFunc | null,
transform_from?: GObject.BindingTransformFunc | null,
notify?: GLib.DestroyNotify | null,
): GObject.Binding;
// Conflicted with GObject.Object.bind_property_full
bind_property_full(...args: never[]): any;
/**
* This function is intended for #GObject implementations to re-enforce
* a [floating][floating-ref] object reference. Doing this is seldom
* required: all #GInitiallyUnowneds are created with a floating reference
* which usually just needs to be sunken by calling g_object_ref_sink().
*/
force_floating(): void;
/**
* Increases the freeze count on `object`. If the freeze count is
* non-zero, the emission of "notify" signals on `object` is
* stopped. The signals are queued until the freeze count is decreased
* to zero. Duplicate notifications are squashed so that at most one
* #GObject::notify signal is emitted for each property modified while the
* object is frozen.
*
* This is necessary for accessors that modify multiple properties to prevent
* premature notification while the object is still being modified.
*/
freeze_notify(): void;
/**
* Gets a named field from the objects table of associations (see g_object_set_data()).
* @param key name of the key for that association
* @returns the data if found, or %NULL if no such data exists.
*/
get_data(key: string): any | null;
/**
* Gets a property of an object.
*
* The value can be:
* - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
* - a GObject.Value initialized with the expected type of the property
* - a GObject.Value initialized with a type to which the expected type of the property can be transformed
*
* In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
*
* Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
* @param property_name The name of the property to get
* @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
*/
get_property(property_name: string, value: GObject.Value | any): any;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
get_qdata(quark: GLib.Quark): any | null;
/**
* Gets `n_properties` properties for an `object`.
* Obtained properties will be set to `values`. All properties must be valid.
* Warnings will be emitted and undefined behaviour may result if invalid
* properties are passed in.
* @param names the names of each property to get
* @param values the values of each property to get
*/
getv(names: string[], values: (GObject.Value | any)[]): void;
/**
* Checks whether `object` has a [floating][floating-ref] reference.
* @returns %TRUE if @object has a floating reference
*/
is_floating(): boolean;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param property_name the name of a property installed on the class of @object.
*/
notify(property_name: string): void;
/**
* Emits a "notify" signal for the property specified by `pspec` on `object`.
*
* This function omits the property name lookup, hence it is faster than
* g_object_notify().
*
* One way to avoid using g_object_notify() from within the
* class that registered the properties, and using g_object_notify_by_pspec()
* instead, is to store the GParamSpec used with
* g_object_class_install_property() inside a static array, e.g.:
*
*
* ```c
* typedef enum
* {
* PROP_FOO = 1,
* PROP_LAST
* } MyObjectProperty;
*
* static GParamSpec *properties[PROP_LAST];
*
* static void
* my_object_class_init (MyObjectClass *klass)
* {
* properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
* 0, 100,
* 50,
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
* g_object_class_install_property (gobject_class,
* PROP_FOO,
* properties[PROP_FOO]);
* }
* ```
*
*
* and then notify a change on the "foo" property with:
*
*
* ```c
* g_object_notify_by_pspec (self, properties[PROP_FOO]);
* ```
*
* @param pspec the #GParamSpec of a property installed on the class of @object.
*/
notify_by_pspec(pspec: GObject.ParamSpec): void;
/**
* Increases the reference count of `object`.
*
* Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
* of `object` will be propagated to the return type (using the GCC typeof()
* extension), so any casting the caller needs to do on the return type must be
* explicit.
* @returns the same @object
*/
ref(): GObject.Object;
/**
* Increase the reference count of `object,` and possibly remove the
* [floating][floating-ref] reference, if `object` has a floating reference.
*
* In other words, if the object is floating, then this call "assumes
* ownership" of the floating reference, converting it to a normal
* reference by clearing the floating flag while leaving the reference
* count unchanged. If the object is not floating, then this call
* adds a new normal reference increasing the reference count by one.
*
* Since GLib 2.56, the type of `object` will be propagated to the return type
* under the same conditions as for g_object_ref().
* @returns @object
*/
ref_sink(): GObject.Object;
/**
* Releases all references to other objects. This can be used to break
* reference cycles.
*
* This function should only be called from object system implementations.
*/
run_dispose(): void;
/**
* Each object carries around a table of associations from
* strings to pointers. This function lets you set an association.
*
* If the object already had an association with that name,
* the old association will be destroyed.
*
* Internally, the `key` is converted to a #GQuark using g_quark_from_string().
* This means a copy of `key` is kept permanently (even after `object` has been
* finalized) — so it is recommended to only use a small, bounded set of values
* for `key` in your program, to avoid the #GQuark storage growing unbounded.
* @param key name of the key
* @param data data to associate with that key
*/
set_data(key: string, data?: any | null): void;
/**
* Sets a property on an object.
* @param property_name The name of the property to set
* @param value The value to set the property to
*/
set_property(property_name: string, value: GObject.Value | any): void;
/**
* Remove a specified datum from the object's data associations,
* without invoking the association's destroy handler.
* @param key name of the key
* @returns the data if found, or %NULL if no such data exists.
*/
steal_data(key: string): any | null;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata() and removes the `data` from object
* without invoking its destroy() function (if any was
* set).
* Usually, calling this function is only required to update
* user data pointers with a destroy notifier, for example:
*
* ```c
* void
* object_add_to_user_list (GObject *object,
* const gchar *new_string)
* {
* // the quark, naming the object data
* GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
* // retrieve the old string list
* GList *list = g_object_steal_qdata (object, quark_string_list);
*
* // prepend new string
* list = g_list_prepend (list, g_strdup (new_string));
* // this changed 'list', so we need to set it again
* g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
* }
* static void
* free_string_list (gpointer data)
* {
* GList *node, *list = data;
*
* for (node = list; node; node = node->next)
* g_free (node->data);
* g_list_free (list);
* }
* ```
*
* Using g_object_get_qdata() in the above example, instead of
* g_object_steal_qdata() would have left the destroy function set,
* and thus the partial string list would have been freed upon
* g_object_set_qdata_full().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
steal_qdata(quark: GLib.Quark): any | null;
/**
* Reverts the effect of a previous call to
* g_object_freeze_notify(). The freeze count is decreased on `object`
* and when it reaches zero, queued "notify" signals are emitted.
*
* Duplicate notifications for each property are squashed so that at most one
* #GObject::notify signal is emitted for each property, in the reverse order
* in which they have been queued.
*
* It is an error to call this function when the freeze count is zero.
*/
thaw_notify(): void;
/**
* Decreases the reference count of `object`. When its reference count
* drops to 0, the object is finalized (i.e. its memory is freed).
*
* If the pointer to the #GObject may be reused in future (for example, if it is
* an instance variable of another object), it is recommended to clear the
* pointer to %NULL rather than retain a dangling pointer to a potentially
* invalid #GObject instance. Use g_clear_object() for this.
*/
unref(): void;
/**
* This function essentially limits the life time of the `closure` to
* the life time of the object. That is, when the object is finalized,
* the `closure` is invalidated by calling g_closure_invalidate() on
* it, in order to prevent invocations of the closure with a finalized
* (nonexisting) object. Also, g_object_ref() and g_object_unref() are
* added as marshal guards to the `closure,` to ensure that an extra
* reference count is held on `object` during invocation of the
* `closure`. Usually, this function will be called on closures that
* use this `object` as closure data.
* @param closure #GClosure to watch
*/
watch_closure(closure: GObject.Closure): void;
/**
* the `constructed` function is called by g_object_new() as the
* final step of the object creation process. At the point of the call, all
* construction properties have been set on the object. The purpose of this
* call is to allow for object initialisation steps that can only be performed
* after construction properties have been set. `constructed` implementors
* should chain up to the `constructed` call of their parent class to allow it
* to complete its initialisation.
*/
vfunc_constructed(): void;
/**
* emits property change notification for a bunch
* of properties. Overriding `dispatch_properties_changed` should be rarely
* needed.
* @param n_pspecs
* @param pspecs
*/
vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
/**
* the `dispose` function is supposed to drop all references to other
* objects, but keep the instance otherwise intact, so that client method
* invocations still work. It may be run multiple times (due to reference
* loops). Before returning, `dispose` should chain up to the `dispose` method
* of the parent class.
*/
vfunc_dispose(): void;
/**
* instance finalization function, should finish the finalization of
* the instance begun in `dispose` and chain up to the `finalize` method of the
* parent class.
*/
vfunc_finalize(): void;
/**
* the generic getter for all properties of this type. Should be
* overridden for every type with properties.
* @param property_id
* @param value
* @param pspec
*/
vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param pspec
*/
vfunc_notify(pspec: GObject.ParamSpec): void;
/**
* the generic setter for all properties of this type. Should be
* overridden for every type with properties. If implementations of
* `set_property` don't emit property change notification explicitly, this will
* be done implicitly by the type system. However, if the notify signal is
* emitted explicitly, the type system will not emit it a second time.
* @param property_id
* @param value
* @param pspec
*/
vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
* @param id Handler ID of the handler to be disconnected
*/
disconnect(id: number): void;
/**
* Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
* @param properties Object containing the properties to set
*/
set(properties: { [key: string]: any }): void;
/**
* Blocks a handler of an instance so it will not be called during any signal emissions
* @param id Handler ID of the handler to be blocked
*/
block_signal_handler(id: number): void;
/**
* Unblocks a handler so it will be called again during any signal emissions
* @param id Handler ID of the handler to be unblocked
*/
unblock_signal_handler(id: number): void;
/**
* Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
* @param detailedName Name of the signal to stop emission of
*/
stop_emission_by_name(detailedName: string): void;
}
namespace DOMBlob {
// Signal signatures
interface SignalSignatures extends DOMObject.SignalSignatures {
'notify::size': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMObject.ConstructorProps {
size: number;
}
}
class DOMBlob extends DOMObject {
static $gtype: GObject.GType;
// Properties
get size(): number;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMBlob.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q] ? Q : never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
get_size(): number;
}
namespace DOMCDATASection {
// Signal signatures
interface SignalSignatures extends DOMText.SignalSignatures {
'notify::whole-text': (pspec: GObject.ParamSpec) => void;
'notify::data': (pspec: GObject.ParamSpec) => void;
'notify::length': (pspec: GObject.ParamSpec) => void;
'notify::base-uri': (pspec: GObject.ParamSpec) => void;
'notify::child-nodes': (pspec: GObject.ParamSpec) => void;
'notify::first-child': (pspec: GObject.ParamSpec) => void;
'notify::last-child': (pspec: GObject.ParamSpec) => void;
'notify::next-sibling': (pspec: GObject.ParamSpec) => void;
'notify::node-name': (pspec: GObject.ParamSpec) => void;
'notify::node-type': (pspec: GObject.ParamSpec) => void;
'notify::node-value': (pspec: GObject.ParamSpec) => void;
'notify::owner-document': (pspec: GObject.ParamSpec) => void;
'notify::parent-element': (pspec: GObject.ParamSpec) => void;
'notify::parent-node': (pspec: GObject.ParamSpec) => void;
'notify::previous-sibling': (pspec: GObject.ParamSpec) => void;
'notify::text-content': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMText.ConstructorProps, DOMEventTarget.ConstructorProps {}
}
class DOMCDATASection extends DOMText implements DOMEventTarget {
static $gtype: GObject.GType;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMCDATASection.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q]
? Q
: never
): void;
emit(signal: string, ...args: any[]): void;
// Inherited methods
/**
* Creates a binding between `source_property` on `source` and `target_property`
* on `target`.
*
* Whenever the `source_property` is changed the `target_property` is
* updated using the same value. For instance:
*
*
* ```c
* g_object_bind_property (action, "active", widget, "sensitive", 0);
* ```
*
*
* Will result in the "sensitive" property of the widget #GObject instance to be
* updated with the same value of the "active" property of the action #GObject
* instance.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well.
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. To remove the binding without affecting the
* `source` and the `target` you can just call g_object_unref() on the returned
* #GBinding instance.
*
* Removing the binding by calling g_object_unref() on it must only be done if
* the binding, `source` and `target` are only used from a single thread and it
* is clear that both `source` and `target` outlive the binding. Especially it
* is not safe to rely on this if the binding, `source` or `target` can be
* finalized from different threads. Keep another reference to the binding and
* use g_binding_unbind() instead to be on the safe side.
*
* A #GObject can have multiple bindings.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
): GObject.Binding;
/**
* Complete version of g_object_bind_property().
*
* Creates a binding between `source_property` on `source` and `target_property`
* on `target,` allowing you to set the transformation functions to be used by
* the binding.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well. The `transform_from` function is only used in case
* of bidirectional bindings, otherwise it will be ignored
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. This will release the reference that is
* being held on the #GBinding instance; if you want to hold on to the
* #GBinding instance, you will need to hold a reference to it.
*
* To remove the binding, call g_binding_unbind().
*
* A #GObject can have multiple bindings.
*
* The same `user_data` parameter will be used for both `transform_to`
* and `transform_from` transformation functions; the `notify` function will
* be called once, when the binding is removed. If you need different data
* for each transformation function, please use
* g_object_bind_property_with_closures() instead.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
* @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
* @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property_full(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
transform_to?: GObject.BindingTransformFunc | null,
transform_from?: GObject.BindingTransformFunc | null,
notify?: GLib.DestroyNotify | null,
): GObject.Binding;
// Conflicted with GObject.Object.bind_property_full
bind_property_full(...args: never[]): any;
/**
* This function is intended for #GObject implementations to re-enforce
* a [floating][floating-ref] object reference. Doing this is seldom
* required: all #GInitiallyUnowneds are created with a floating reference
* which usually just needs to be sunken by calling g_object_ref_sink().
*/
force_floating(): void;
/**
* Increases the freeze count on `object`. If the freeze count is
* non-zero, the emission of "notify" signals on `object` is
* stopped. The signals are queued until the freeze count is decreased
* to zero. Duplicate notifications are squashed so that at most one
* #GObject::notify signal is emitted for each property modified while the
* object is frozen.
*
* This is necessary for accessors that modify multiple properties to prevent
* premature notification while the object is still being modified.
*/
freeze_notify(): void;
/**
* Gets a named field from the objects table of associations (see g_object_set_data()).
* @param key name of the key for that association
* @returns the data if found, or %NULL if no such data exists.
*/
get_data(key: string): any | null;
// Conflicted with WebKit2WebExtension.DOMCharacterData.get_data
get_data(...args: never[]): any;
/**
* Gets a property of an object.
*
* The value can be:
* - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
* - a GObject.Value initialized with the expected type of the property
* - a GObject.Value initialized with a type to which the expected type of the property can be transformed
*
* In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
*
* Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
* @param property_name The name of the property to get
* @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
*/
get_property(property_name: string, value: GObject.Value | any): any;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
get_qdata(quark: GLib.Quark): any | null;
/**
* Gets `n_properties` properties for an `object`.
* Obtained properties will be set to `values`. All properties must be valid.
* Warnings will be emitted and undefined behaviour may result if invalid
* properties are passed in.
* @param names the names of each property to get
* @param values the values of each property to get
*/
getv(names: string[], values: (GObject.Value | any)[]): void;
/**
* Checks whether `object` has a [floating][floating-ref] reference.
* @returns %TRUE if @object has a floating reference
*/
is_floating(): boolean;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param property_name the name of a property installed on the class of @object.
*/
notify(property_name: string): void;
/**
* Emits a "notify" signal for the property specified by `pspec` on `object`.
*
* This function omits the property name lookup, hence it is faster than
* g_object_notify().
*
* One way to avoid using g_object_notify() from within the
* class that registered the properties, and using g_object_notify_by_pspec()
* instead, is to store the GParamSpec used with
* g_object_class_install_property() inside a static array, e.g.:
*
*
* ```c
* typedef enum
* {
* PROP_FOO = 1,
* PROP_LAST
* } MyObjectProperty;
*
* static GParamSpec *properties[PROP_LAST];
*
* static void
* my_object_class_init (MyObjectClass *klass)
* {
* properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
* 0, 100,
* 50,
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
* g_object_class_install_property (gobject_class,
* PROP_FOO,
* properties[PROP_FOO]);
* }
* ```
*
*
* and then notify a change on the "foo" property with:
*
*
* ```c
* g_object_notify_by_pspec (self, properties[PROP_FOO]);
* ```
*
* @param pspec the #GParamSpec of a property installed on the class of @object.
*/
notify_by_pspec(pspec: GObject.ParamSpec): void;
/**
* Increases the reference count of `object`.
*
* Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
* of `object` will be propagated to the return type (using the GCC typeof()
* extension), so any casting the caller needs to do on the return type must be
* explicit.
* @returns the same @object
*/
ref(): GObject.Object;
/**
* Increase the reference count of `object,` and possibly remove the
* [floating][floating-ref] reference, if `object` has a floating reference.
*
* In other words, if the object is floating, then this call "assumes
* ownership" of the floating reference, converting it to a normal
* reference by clearing the floating flag while leaving the reference
* count unchanged. If the object is not floating, then this call
* adds a new normal reference increasing the reference count by one.
*
* Since GLib 2.56, the type of `object` will be propagated to the return type
* under the same conditions as for g_object_ref().
* @returns @object
*/
ref_sink(): GObject.Object;
/**
* Releases all references to other objects. This can be used to break
* reference cycles.
*
* This function should only be called from object system implementations.
*/
run_dispose(): void;
/**
* Each object carries around a table of associations from
* strings to pointers. This function lets you set an association.
*
* If the object already had an association with that name,
* the old association will be destroyed.
*
* Internally, the `key` is converted to a #GQuark using g_quark_from_string().
* This means a copy of `key` is kept permanently (even after `object` has been
* finalized) — so it is recommended to only use a small, bounded set of values
* for `key` in your program, to avoid the #GQuark storage growing unbounded.
* @param key name of the key
* @param data data to associate with that key
*/
set_data(key: string, data?: any | null): void;
// Conflicted with WebKit2WebExtension.DOMCharacterData.set_data
set_data(...args: never[]): any;
/**
* Sets a property on an object.
* @param property_name The name of the property to set
* @param value The value to set the property to
*/
set_property(property_name: string, value: GObject.Value | any): void;
/**
* Remove a specified datum from the object's data associations,
* without invoking the association's destroy handler.
* @param key name of the key
* @returns the data if found, or %NULL if no such data exists.
*/
steal_data(key: string): any | null;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata() and removes the `data` from object
* without invoking its destroy() function (if any was
* set).
* Usually, calling this function is only required to update
* user data pointers with a destroy notifier, for example:
*
* ```c
* void
* object_add_to_user_list (GObject *object,
* const gchar *new_string)
* {
* // the quark, naming the object data
* GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
* // retrieve the old string list
* GList *list = g_object_steal_qdata (object, quark_string_list);
*
* // prepend new string
* list = g_list_prepend (list, g_strdup (new_string));
* // this changed 'list', so we need to set it again
* g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
* }
* static void
* free_string_list (gpointer data)
* {
* GList *node, *list = data;
*
* for (node = list; node; node = node->next)
* g_free (node->data);
* g_list_free (list);
* }
* ```
*
* Using g_object_get_qdata() in the above example, instead of
* g_object_steal_qdata() would have left the destroy function set,
* and thus the partial string list would have been freed upon
* g_object_set_qdata_full().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
steal_qdata(quark: GLib.Quark): any | null;
/**
* Reverts the effect of a previous call to
* g_object_freeze_notify(). The freeze count is decreased on `object`
* and when it reaches zero, queued "notify" signals are emitted.
*
* Duplicate notifications for each property are squashed so that at most one
* #GObject::notify signal is emitted for each property, in the reverse order
* in which they have been queued.
*
* It is an error to call this function when the freeze count is zero.
*/
thaw_notify(): void;
/**
* Decreases the reference count of `object`. When its reference count
* drops to 0, the object is finalized (i.e. its memory is freed).
*
* If the pointer to the #GObject may be reused in future (for example, if it is
* an instance variable of another object), it is recommended to clear the
* pointer to %NULL rather than retain a dangling pointer to a potentially
* invalid #GObject instance. Use g_clear_object() for this.
*/
unref(): void;
/**
* This function essentially limits the life time of the `closure` to
* the life time of the object. That is, when the object is finalized,
* the `closure` is invalidated by calling g_closure_invalidate() on
* it, in order to prevent invocations of the closure with a finalized
* (nonexisting) object. Also, g_object_ref() and g_object_unref() are
* added as marshal guards to the `closure,` to ensure that an extra
* reference count is held on `object` during invocation of the
* `closure`. Usually, this function will be called on closures that
* use this `object` as closure data.
* @param closure #GClosure to watch
*/
watch_closure(closure: GObject.Closure): void;
/**
* the `constructed` function is called by g_object_new() as the
* final step of the object creation process. At the point of the call, all
* construction properties have been set on the object. The purpose of this
* call is to allow for object initialisation steps that can only be performed
* after construction properties have been set. `constructed` implementors
* should chain up to the `constructed` call of their parent class to allow it
* to complete its initialisation.
*/
vfunc_constructed(): void;
/**
* emits property change notification for a bunch
* of properties. Overriding `dispatch_properties_changed` should be rarely
* needed.
* @param n_pspecs
* @param pspecs
*/
vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
/**
* the `dispose` function is supposed to drop all references to other
* objects, but keep the instance otherwise intact, so that client method
* invocations still work. It may be run multiple times (due to reference
* loops). Before returning, `dispose` should chain up to the `dispose` method
* of the parent class.
*/
vfunc_dispose(): void;
/**
* instance finalization function, should finish the finalization of
* the instance begun in `dispose` and chain up to the `finalize` method of the
* parent class.
*/
vfunc_finalize(): void;
/**
* the generic getter for all properties of this type. Should be
* overridden for every type with properties.
* @param property_id
* @param value
* @param pspec
*/
vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param pspec
*/
vfunc_notify(pspec: GObject.ParamSpec): void;
/**
* the generic setter for all properties of this type. Should be
* overridden for every type with properties. If implementations of
* `set_property` don't emit property change notification explicitly, this will
* be done implicitly by the type system. However, if the notify signal is
* emitted explicitly, the type system will not emit it a second time.
* @param property_id
* @param value
* @param pspec
*/
vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
* @param id Handler ID of the handler to be disconnected
*/
disconnect(id: number): void;
/**
* Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
* @param properties Object containing the properties to set
*/
set(properties: { [key: string]: any }): void;
/**
* Blocks a handler of an instance so it will not be called during any signal emissions
* @param id Handler ID of the handler to be blocked
*/
block_signal_handler(id: number): void;
/**
* Unblocks a handler so it will be called again during any signal emissions
* @param id Handler ID of the handler to be unblocked
*/
unblock_signal_handler(id: number): void;
/**
* Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
* @param detailedName Name of the signal to stop emission of
*/
stop_emission_by_name(detailedName: string): void;
}
namespace DOMCSSRule {
// Signal signatures
interface SignalSignatures extends DOMObject.SignalSignatures {
'notify::css-text': (pspec: GObject.ParamSpec) => void;
'notify::parent-rule': (pspec: GObject.ParamSpec) => void;
'notify::parent-style-sheet': (pspec: GObject.ParamSpec) => void;
'notify::type': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMObject.ConstructorProps {
css_text: string;
cssText: string;
parent_rule: DOMCSSRule;
parentRule: DOMCSSRule;
parent_style_sheet: DOMCSSStyleSheet;
parentStyleSheet: DOMCSSStyleSheet;
type: number;
}
}
class DOMCSSRule extends DOMObject {
static $gtype: GObject.GType;
// Properties
get css_text(): string;
set css_text(val: string);
get cssText(): string;
set cssText(val: string);
get parent_rule(): DOMCSSRule;
get parentRule(): DOMCSSRule;
get parent_style_sheet(): DOMCSSStyleSheet;
get parentStyleSheet(): DOMCSSStyleSheet;
get type(): number;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMCSSRule.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q] ? Q : never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
get_css_text(): string;
get_parent_rule(): DOMCSSRule;
get_parent_style_sheet(): DOMCSSStyleSheet;
get_rule_type(): number;
set_css_text(value: string): void;
}
namespace DOMCSSRuleList {
// Signal signatures
interface SignalSignatures extends DOMObject.SignalSignatures {
'notify::length': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMObject.ConstructorProps {
length: number;
}
}
class DOMCSSRuleList extends DOMObject {
static $gtype: GObject.GType;
// Properties
get length(): number;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMCSSRuleList.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q] ? Q : never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
get_length(): number;
item(index: number): DOMCSSRule;
}
namespace DOMCSSStyleDeclaration {
// Signal signatures
interface SignalSignatures extends DOMObject.SignalSignatures {
'notify::css-text': (pspec: GObject.ParamSpec) => void;
'notify::length': (pspec: GObject.ParamSpec) => void;
'notify::parent-rule': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMObject.ConstructorProps {
css_text: string;
cssText: string;
length: number;
parent_rule: DOMCSSRule;
parentRule: DOMCSSRule;
}
}
class DOMCSSStyleDeclaration extends DOMObject {
static $gtype: GObject.GType;
// Properties
get css_text(): string;
set css_text(val: string);
get cssText(): string;
set cssText(val: string);
get length(): number;
get parent_rule(): DOMCSSRule;
get parentRule(): DOMCSSRule;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMCSSStyleDeclaration.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q]
? Q
: never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
get_css_text(): string;
get_length(): number;
get_parent_rule(): DOMCSSRule;
get_property_priority(propertyName: string): string;
get_property_shorthand(propertyName: string): string;
get_property_value(propertyName: string): string;
is_property_implicit(propertyName: string): boolean;
item(index: number): string;
remove_property(propertyName: string): string;
set_css_text(value: string): void;
set_property(propertyName: string, value: string, priority: string): void;
// Conflicted with GObject.Object.set_property
set_property(...args: never[]): any;
}
namespace DOMCSSStyleSheet {
// Signal signatures
interface SignalSignatures extends DOMStyleSheet.SignalSignatures {
'notify::css-rules': (pspec: GObject.ParamSpec) => void;
'notify::owner-rule': (pspec: GObject.ParamSpec) => void;
'notify::rules': (pspec: GObject.ParamSpec) => void;
'notify::disabled': (pspec: GObject.ParamSpec) => void;
'notify::href': (pspec: GObject.ParamSpec) => void;
'notify::media': (pspec: GObject.ParamSpec) => void;
'notify::owner-node': (pspec: GObject.ParamSpec) => void;
'notify::parent-style-sheet': (pspec: GObject.ParamSpec) => void;
'notify::title': (pspec: GObject.ParamSpec) => void;
'notify::type': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMStyleSheet.ConstructorProps {
css_rules: DOMCSSRuleList;
cssRules: DOMCSSRuleList;
owner_rule: DOMCSSRule;
ownerRule: DOMCSSRule;
rules: DOMCSSRuleList;
}
}
class DOMCSSStyleSheet extends DOMStyleSheet {
static $gtype: GObject.GType;
// Properties
get css_rules(): DOMCSSRuleList;
get cssRules(): DOMCSSRuleList;
get owner_rule(): DOMCSSRule;
get ownerRule(): DOMCSSRule;
get rules(): DOMCSSRuleList;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMCSSStyleSheet.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q]
? Q
: never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
add_rule(selector: string, style: string, index: number): number;
delete_rule(index: number): void;
get_css_rules(): DOMCSSRuleList;
get_owner_rule(): DOMCSSRule;
get_rules(): DOMCSSRuleList;
insert_rule(rule: string, index: number): number;
remove_rule(index: number): void;
}
namespace DOMCSSValue {
// Signal signatures
interface SignalSignatures extends DOMObject.SignalSignatures {
'notify::css-text': (pspec: GObject.ParamSpec) => void;
'notify::css-value-type': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMObject.ConstructorProps {
css_text: string;
cssText: string;
css_value_type: number;
cssValueType: number;
}
}
class DOMCSSValue extends DOMObject {
static $gtype: GObject.GType;
// Properties
get css_text(): string;
set css_text(val: string);
get cssText(): string;
set cssText(val: string);
get css_value_type(): number;
get cssValueType(): number;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMCSSValue.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q] ? Q : never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
get_css_text(): string;
get_css_value_type(): number;
set_css_text(value: string): void;
}
namespace DOMCharacterData {
// Signal signatures
interface SignalSignatures extends DOMNode.SignalSignatures {
'notify::data': (pspec: GObject.ParamSpec) => void;
'notify::length': (pspec: GObject.ParamSpec) => void;
'notify::base-uri': (pspec: GObject.ParamSpec) => void;
'notify::child-nodes': (pspec: GObject.ParamSpec) => void;
'notify::first-child': (pspec: GObject.ParamSpec) => void;
'notify::last-child': (pspec: GObject.ParamSpec) => void;
'notify::next-sibling': (pspec: GObject.ParamSpec) => void;
'notify::node-name': (pspec: GObject.ParamSpec) => void;
'notify::node-type': (pspec: GObject.ParamSpec) => void;
'notify::node-value': (pspec: GObject.ParamSpec) => void;
'notify::owner-document': (pspec: GObject.ParamSpec) => void;
'notify::parent-element': (pspec: GObject.ParamSpec) => void;
'notify::parent-node': (pspec: GObject.ParamSpec) => void;
'notify::previous-sibling': (pspec: GObject.ParamSpec) => void;
'notify::text-content': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMNode.ConstructorProps, DOMEventTarget.ConstructorProps {
data: string;
length: number;
}
}
class DOMCharacterData extends DOMNode implements DOMEventTarget {
static $gtype: GObject.GType;
// Properties
get data(): string;
set data(val: string);
get length(): number;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMCharacterData.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q]
? Q
: never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
append_data(data: string): void;
delete_data(offset: number, length: number): void;
get_data(): string;
// Conflicted with GObject.Object.get_data
get_data(...args: never[]): any;
get_length(): number;
insert_data(offset: number, data: string): void;
replace_data(offset: number, length: number, data: string): void;
set_data(value: string): void;
substring_data(offset: number, length: number): string;
// Inherited methods
add_event_listener(event_name: string, handler: GObject.Callback, use_capture: boolean): boolean;
// Conflicted with WebKit2WebExtension.DOMEventTarget.add_event_listener
add_event_listener(...args: never[]): any;
dispatch_event(event: DOMEvent): boolean;
remove_event_listener(event_name: string, handler: any | null, use_capture: boolean): boolean;
// Conflicted with WebKit2WebExtension.DOMEventTarget.remove_event_listener
remove_event_listener(...args: never[]): any;
vfunc_add_event_listener(event_name: string, handler: GObject.Closure, use_capture: boolean): boolean;
vfunc_dispatch_event(event: DOMEvent): boolean;
vfunc_remove_event_listener(event_name: string, handler: any | null, use_capture: boolean): boolean;
/**
* Creates a binding between `source_property` on `source` and `target_property`
* on `target`.
*
* Whenever the `source_property` is changed the `target_property` is
* updated using the same value. For instance:
*
*
* ```c
* g_object_bind_property (action, "active", widget, "sensitive", 0);
* ```
*
*
* Will result in the "sensitive" property of the widget #GObject instance to be
* updated with the same value of the "active" property of the action #GObject
* instance.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well.
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. To remove the binding without affecting the
* `source` and the `target` you can just call g_object_unref() on the returned
* #GBinding instance.
*
* Removing the binding by calling g_object_unref() on it must only be done if
* the binding, `source` and `target` are only used from a single thread and it
* is clear that both `source` and `target` outlive the binding. Especially it
* is not safe to rely on this if the binding, `source` or `target` can be
* finalized from different threads. Keep another reference to the binding and
* use g_binding_unbind() instead to be on the safe side.
*
* A #GObject can have multiple bindings.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
): GObject.Binding;
/**
* Complete version of g_object_bind_property().
*
* Creates a binding between `source_property` on `source` and `target_property`
* on `target,` allowing you to set the transformation functions to be used by
* the binding.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well. The `transform_from` function is only used in case
* of bidirectional bindings, otherwise it will be ignored
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. This will release the reference that is
* being held on the #GBinding instance; if you want to hold on to the
* #GBinding instance, you will need to hold a reference to it.
*
* To remove the binding, call g_binding_unbind().
*
* A #GObject can have multiple bindings.
*
* The same `user_data` parameter will be used for both `transform_to`
* and `transform_from` transformation functions; the `notify` function will
* be called once, when the binding is removed. If you need different data
* for each transformation function, please use
* g_object_bind_property_with_closures() instead.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
* @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
* @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property_full(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
transform_to?: GObject.BindingTransformFunc | null,
transform_from?: GObject.BindingTransformFunc | null,
notify?: GLib.DestroyNotify | null,
): GObject.Binding;
// Conflicted with GObject.Object.bind_property_full
bind_property_full(...args: never[]): any;
/**
* This function is intended for #GObject implementations to re-enforce
* a [floating][floating-ref] object reference. Doing this is seldom
* required: all #GInitiallyUnowneds are created with a floating reference
* which usually just needs to be sunken by calling g_object_ref_sink().
*/
force_floating(): void;
/**
* Increases the freeze count on `object`. If the freeze count is
* non-zero, the emission of "notify" signals on `object` is
* stopped. The signals are queued until the freeze count is decreased
* to zero. Duplicate notifications are squashed so that at most one
* #GObject::notify signal is emitted for each property modified while the
* object is frozen.
*
* This is necessary for accessors that modify multiple properties to prevent
* premature notification while the object is still being modified.
*/
freeze_notify(): void;
/**
* Gets a property of an object.
*
* The value can be:
* - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
* - a GObject.Value initialized with the expected type of the property
* - a GObject.Value initialized with a type to which the expected type of the property can be transformed
*
* In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
*
* Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
* @param property_name The name of the property to get
* @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
*/
get_property(property_name: string, value: GObject.Value | any): any;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
get_qdata(quark: GLib.Quark): any | null;
/**
* Gets `n_properties` properties for an `object`.
* Obtained properties will be set to `values`. All properties must be valid.
* Warnings will be emitted and undefined behaviour may result if invalid
* properties are passed in.
* @param names the names of each property to get
* @param values the values of each property to get
*/
getv(names: string[], values: (GObject.Value | any)[]): void;
/**
* Checks whether `object` has a [floating][floating-ref] reference.
* @returns %TRUE if @object has a floating reference
*/
is_floating(): boolean;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param property_name the name of a property installed on the class of @object.
*/
notify(property_name: string): void;
/**
* Emits a "notify" signal for the property specified by `pspec` on `object`.
*
* This function omits the property name lookup, hence it is faster than
* g_object_notify().
*
* One way to avoid using g_object_notify() from within the
* class that registered the properties, and using g_object_notify_by_pspec()
* instead, is to store the GParamSpec used with
* g_object_class_install_property() inside a static array, e.g.:
*
*
* ```c
* typedef enum
* {
* PROP_FOO = 1,
* PROP_LAST
* } MyObjectProperty;
*
* static GParamSpec *properties[PROP_LAST];
*
* static void
* my_object_class_init (MyObjectClass *klass)
* {
* properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
* 0, 100,
* 50,
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
* g_object_class_install_property (gobject_class,
* PROP_FOO,
* properties[PROP_FOO]);
* }
* ```
*
*
* and then notify a change on the "foo" property with:
*
*
* ```c
* g_object_notify_by_pspec (self, properties[PROP_FOO]);
* ```
*
* @param pspec the #GParamSpec of a property installed on the class of @object.
*/
notify_by_pspec(pspec: GObject.ParamSpec): void;
/**
* Increases the reference count of `object`.
*
* Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
* of `object` will be propagated to the return type (using the GCC typeof()
* extension), so any casting the caller needs to do on the return type must be
* explicit.
* @returns the same @object
*/
ref(): GObject.Object;
/**
* Increase the reference count of `object,` and possibly remove the
* [floating][floating-ref] reference, if `object` has a floating reference.
*
* In other words, if the object is floating, then this call "assumes
* ownership" of the floating reference, converting it to a normal
* reference by clearing the floating flag while leaving the reference
* count unchanged. If the object is not floating, then this call
* adds a new normal reference increasing the reference count by one.
*
* Since GLib 2.56, the type of `object` will be propagated to the return type
* under the same conditions as for g_object_ref().
* @returns @object
*/
ref_sink(): GObject.Object;
/**
* Releases all references to other objects. This can be used to break
* reference cycles.
*
* This function should only be called from object system implementations.
*/
run_dispose(): void;
/**
* Sets a property on an object.
* @param property_name The name of the property to set
* @param value The value to set the property to
*/
set_property(property_name: string, value: GObject.Value | any): void;
/**
* Remove a specified datum from the object's data associations,
* without invoking the association's destroy handler.
* @param key name of the key
* @returns the data if found, or %NULL if no such data exists.
*/
steal_data(key: string): any | null;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata() and removes the `data` from object
* without invoking its destroy() function (if any was
* set).
* Usually, calling this function is only required to update
* user data pointers with a destroy notifier, for example:
*
* ```c
* void
* object_add_to_user_list (GObject *object,
* const gchar *new_string)
* {
* // the quark, naming the object data
* GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
* // retrieve the old string list
* GList *list = g_object_steal_qdata (object, quark_string_list);
*
* // prepend new string
* list = g_list_prepend (list, g_strdup (new_string));
* // this changed 'list', so we need to set it again
* g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
* }
* static void
* free_string_list (gpointer data)
* {
* GList *node, *list = data;
*
* for (node = list; node; node = node->next)
* g_free (node->data);
* g_list_free (list);
* }
* ```
*
* Using g_object_get_qdata() in the above example, instead of
* g_object_steal_qdata() would have left the destroy function set,
* and thus the partial string list would have been freed upon
* g_object_set_qdata_full().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
steal_qdata(quark: GLib.Quark): any | null;
/**
* Reverts the effect of a previous call to
* g_object_freeze_notify(). The freeze count is decreased on `object`
* and when it reaches zero, queued "notify" signals are emitted.
*
* Duplicate notifications for each property are squashed so that at most one
* #GObject::notify signal is emitted for each property, in the reverse order
* in which they have been queued.
*
* It is an error to call this function when the freeze count is zero.
*/
thaw_notify(): void;
/**
* Decreases the reference count of `object`. When its reference count
* drops to 0, the object is finalized (i.e. its memory is freed).
*
* If the pointer to the #GObject may be reused in future (for example, if it is
* an instance variable of another object), it is recommended to clear the
* pointer to %NULL rather than retain a dangling pointer to a potentially
* invalid #GObject instance. Use g_clear_object() for this.
*/
unref(): void;
/**
* This function essentially limits the life time of the `closure` to
* the life time of the object. That is, when the object is finalized,
* the `closure` is invalidated by calling g_closure_invalidate() on
* it, in order to prevent invocations of the closure with a finalized
* (nonexisting) object. Also, g_object_ref() and g_object_unref() are
* added as marshal guards to the `closure,` to ensure that an extra
* reference count is held on `object` during invocation of the
* `closure`. Usually, this function will be called on closures that
* use this `object` as closure data.
* @param closure #GClosure to watch
*/
watch_closure(closure: GObject.Closure): void;
/**
* the `constructed` function is called by g_object_new() as the
* final step of the object creation process. At the point of the call, all
* construction properties have been set on the object. The purpose of this
* call is to allow for object initialisation steps that can only be performed
* after construction properties have been set. `constructed` implementors
* should chain up to the `constructed` call of their parent class to allow it
* to complete its initialisation.
*/
vfunc_constructed(): void;
/**
* emits property change notification for a bunch
* of properties. Overriding `dispatch_properties_changed` should be rarely
* needed.
* @param n_pspecs
* @param pspecs
*/
vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
/**
* the `dispose` function is supposed to drop all references to other
* objects, but keep the instance otherwise intact, so that client method
* invocations still work. It may be run multiple times (due to reference
* loops). Before returning, `dispose` should chain up to the `dispose` method
* of the parent class.
*/
vfunc_dispose(): void;
/**
* instance finalization function, should finish the finalization of
* the instance begun in `dispose` and chain up to the `finalize` method of the
* parent class.
*/
vfunc_finalize(): void;
/**
* the generic getter for all properties of this type. Should be
* overridden for every type with properties.
* @param property_id
* @param value
* @param pspec
*/
vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param pspec
*/
vfunc_notify(pspec: GObject.ParamSpec): void;
/**
* the generic setter for all properties of this type. Should be
* overridden for every type with properties. If implementations of
* `set_property` don't emit property change notification explicitly, this will
* be done implicitly by the type system. However, if the notify signal is
* emitted explicitly, the type system will not emit it a second time.
* @param property_id
* @param value
* @param pspec
*/
vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
* @param id Handler ID of the handler to be disconnected
*/
disconnect(id: number): void;
/**
* Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
* @param properties Object containing the properties to set
*/
set(properties: { [key: string]: any }): void;
/**
* Blocks a handler of an instance so it will not be called during any signal emissions
* @param id Handler ID of the handler to be blocked
*/
block_signal_handler(id: number): void;
/**
* Unblocks a handler so it will be called again during any signal emissions
* @param id Handler ID of the handler to be unblocked
*/
unblock_signal_handler(id: number): void;
/**
* Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
* @param detailedName Name of the signal to stop emission of
*/
stop_emission_by_name(detailedName: string): void;
}
namespace DOMClientRect {
// Signal signatures
interface SignalSignatures extends DOMObject.SignalSignatures {
'notify::bottom': (pspec: GObject.ParamSpec) => void;
'notify::height': (pspec: GObject.ParamSpec) => void;
'notify::left': (pspec: GObject.ParamSpec) => void;
'notify::right': (pspec: GObject.ParamSpec) => void;
'notify::top': (pspec: GObject.ParamSpec) => void;
'notify::width': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMObject.ConstructorProps {
bottom: number;
height: number;
left: number;
right: number;
top: number;
width: number;
}
}
class DOMClientRect extends DOMObject {
static $gtype: GObject.GType;
// Properties
get bottom(): number;
get height(): number;
get left(): number;
get right(): number;
get top(): number;
get width(): number;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMClientRect.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q] ? Q : never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
/**
* Returns the bottom coordinate of `self,` relative to the viewport.
* @returns A #gfloat
*/
get_bottom(): number;
/**
* Returns the height of `self`.
* @returns A #gfloat
*/
get_height(): number;
/**
* Returns the left coordinate of `self,` relative to the viewport.
* @returns A #gfloat
*/
get_left(): number;
/**
* Returns the right coordinate of `self,` relative to the viewport.
* @returns A #gfloat
*/
get_right(): number;
/**
* Returns the top coordinate of `self,` relative to the viewport.
* @returns A #gfloat
*/
get_top(): number;
/**
* Returns the width of `self`.
* @returns A #gfloat
*/
get_width(): number;
}
namespace DOMClientRectList {
// Signal signatures
interface SignalSignatures extends DOMObject.SignalSignatures {
'notify::length': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMObject.ConstructorProps {
length: number;
}
}
class DOMClientRectList extends DOMObject {
static $gtype: GObject.GType;
// Properties
get length(): number;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMClientRectList.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q]
? Q
: never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
/**
* Returns the number of #WebKitDOMClientRect objects that `self` contains.
* @returns A #gulong
*/
get_length(): number;
/**
* Returns the #WebKitDOMClientRect object that `self` contains at `index`.
* @param index A #gulong
* @returns A #WebKitDOMClientRect
*/
item(index: number): DOMClientRect;
}
namespace DOMComment {
// Signal signatures
interface SignalSignatures extends DOMCharacterData.SignalSignatures {
'notify::data': (pspec: GObject.ParamSpec) => void;
'notify::length': (pspec: GObject.ParamSpec) => void;
'notify::base-uri': (pspec: GObject.ParamSpec) => void;
'notify::child-nodes': (pspec: GObject.ParamSpec) => void;
'notify::first-child': (pspec: GObject.ParamSpec) => void;
'notify::last-child': (pspec: GObject.ParamSpec) => void;
'notify::next-sibling': (pspec: GObject.ParamSpec) => void;
'notify::node-name': (pspec: GObject.ParamSpec) => void;
'notify::node-type': (pspec: GObject.ParamSpec) => void;
'notify::node-value': (pspec: GObject.ParamSpec) => void;
'notify::owner-document': (pspec: GObject.ParamSpec) => void;
'notify::parent-element': (pspec: GObject.ParamSpec) => void;
'notify::parent-node': (pspec: GObject.ParamSpec) => void;
'notify::previous-sibling': (pspec: GObject.ParamSpec) => void;
'notify::text-content': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMCharacterData.ConstructorProps, DOMEventTarget.ConstructorProps {}
}
class DOMComment extends DOMCharacterData implements DOMEventTarget {
static $gtype: GObject.GType;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMComment.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q] ? Q : never
): void;
emit(signal: string, ...args: any[]): void;
// Inherited methods
/**
* Creates a binding between `source_property` on `source` and `target_property`
* on `target`.
*
* Whenever the `source_property` is changed the `target_property` is
* updated using the same value. For instance:
*
*
* ```c
* g_object_bind_property (action, "active", widget, "sensitive", 0);
* ```
*
*
* Will result in the "sensitive" property of the widget #GObject instance to be
* updated with the same value of the "active" property of the action #GObject
* instance.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well.
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. To remove the binding without affecting the
* `source` and the `target` you can just call g_object_unref() on the returned
* #GBinding instance.
*
* Removing the binding by calling g_object_unref() on it must only be done if
* the binding, `source` and `target` are only used from a single thread and it
* is clear that both `source` and `target` outlive the binding. Especially it
* is not safe to rely on this if the binding, `source` or `target` can be
* finalized from different threads. Keep another reference to the binding and
* use g_binding_unbind() instead to be on the safe side.
*
* A #GObject can have multiple bindings.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
): GObject.Binding;
/**
* Complete version of g_object_bind_property().
*
* Creates a binding between `source_property` on `source` and `target_property`
* on `target,` allowing you to set the transformation functions to be used by
* the binding.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well. The `transform_from` function is only used in case
* of bidirectional bindings, otherwise it will be ignored
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. This will release the reference that is
* being held on the #GBinding instance; if you want to hold on to the
* #GBinding instance, you will need to hold a reference to it.
*
* To remove the binding, call g_binding_unbind().
*
* A #GObject can have multiple bindings.
*
* The same `user_data` parameter will be used for both `transform_to`
* and `transform_from` transformation functions; the `notify` function will
* be called once, when the binding is removed. If you need different data
* for each transformation function, please use
* g_object_bind_property_with_closures() instead.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
* @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
* @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property_full(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
transform_to?: GObject.BindingTransformFunc | null,
transform_from?: GObject.BindingTransformFunc | null,
notify?: GLib.DestroyNotify | null,
): GObject.Binding;
// Conflicted with GObject.Object.bind_property_full
bind_property_full(...args: never[]): any;
/**
* This function is intended for #GObject implementations to re-enforce
* a [floating][floating-ref] object reference. Doing this is seldom
* required: all #GInitiallyUnowneds are created with a floating reference
* which usually just needs to be sunken by calling g_object_ref_sink().
*/
force_floating(): void;
/**
* Increases the freeze count on `object`. If the freeze count is
* non-zero, the emission of "notify" signals on `object` is
* stopped. The signals are queued until the freeze count is decreased
* to zero. Duplicate notifications are squashed so that at most one
* #GObject::notify signal is emitted for each property modified while the
* object is frozen.
*
* This is necessary for accessors that modify multiple properties to prevent
* premature notification while the object is still being modified.
*/
freeze_notify(): void;
/**
* Gets a named field from the objects table of associations (see g_object_set_data()).
* @param key name of the key for that association
* @returns the data if found, or %NULL if no such data exists.
*/
get_data(key: string): any | null;
// Conflicted with WebKit2WebExtension.DOMCharacterData.get_data
get_data(...args: never[]): any;
/**
* Gets a property of an object.
*
* The value can be:
* - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
* - a GObject.Value initialized with the expected type of the property
* - a GObject.Value initialized with a type to which the expected type of the property can be transformed
*
* In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
*
* Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
* @param property_name The name of the property to get
* @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
*/
get_property(property_name: string, value: GObject.Value | any): any;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
get_qdata(quark: GLib.Quark): any | null;
/**
* Gets `n_properties` properties for an `object`.
* Obtained properties will be set to `values`. All properties must be valid.
* Warnings will be emitted and undefined behaviour may result if invalid
* properties are passed in.
* @param names the names of each property to get
* @param values the values of each property to get
*/
getv(names: string[], values: (GObject.Value | any)[]): void;
/**
* Checks whether `object` has a [floating][floating-ref] reference.
* @returns %TRUE if @object has a floating reference
*/
is_floating(): boolean;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param property_name the name of a property installed on the class of @object.
*/
notify(property_name: string): void;
/**
* Emits a "notify" signal for the property specified by `pspec` on `object`.
*
* This function omits the property name lookup, hence it is faster than
* g_object_notify().
*
* One way to avoid using g_object_notify() from within the
* class that registered the properties, and using g_object_notify_by_pspec()
* instead, is to store the GParamSpec used with
* g_object_class_install_property() inside a static array, e.g.:
*
*
* ```c
* typedef enum
* {
* PROP_FOO = 1,
* PROP_LAST
* } MyObjectProperty;
*
* static GParamSpec *properties[PROP_LAST];
*
* static void
* my_object_class_init (MyObjectClass *klass)
* {
* properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
* 0, 100,
* 50,
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
* g_object_class_install_property (gobject_class,
* PROP_FOO,
* properties[PROP_FOO]);
* }
* ```
*
*
* and then notify a change on the "foo" property with:
*
*
* ```c
* g_object_notify_by_pspec (self, properties[PROP_FOO]);
* ```
*
* @param pspec the #GParamSpec of a property installed on the class of @object.
*/
notify_by_pspec(pspec: GObject.ParamSpec): void;
/**
* Increases the reference count of `object`.
*
* Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
* of `object` will be propagated to the return type (using the GCC typeof()
* extension), so any casting the caller needs to do on the return type must be
* explicit.
* @returns the same @object
*/
ref(): GObject.Object;
/**
* Increase the reference count of `object,` and possibly remove the
* [floating][floating-ref] reference, if `object` has a floating reference.
*
* In other words, if the object is floating, then this call "assumes
* ownership" of the floating reference, converting it to a normal
* reference by clearing the floating flag while leaving the reference
* count unchanged. If the object is not floating, then this call
* adds a new normal reference increasing the reference count by one.
*
* Since GLib 2.56, the type of `object` will be propagated to the return type
* under the same conditions as for g_object_ref().
* @returns @object
*/
ref_sink(): GObject.Object;
/**
* Releases all references to other objects. This can be used to break
* reference cycles.
*
* This function should only be called from object system implementations.
*/
run_dispose(): void;
/**
* Each object carries around a table of associations from
* strings to pointers. This function lets you set an association.
*
* If the object already had an association with that name,
* the old association will be destroyed.
*
* Internally, the `key` is converted to a #GQuark using g_quark_from_string().
* This means a copy of `key` is kept permanently (even after `object` has been
* finalized) — so it is recommended to only use a small, bounded set of values
* for `key` in your program, to avoid the #GQuark storage growing unbounded.
* @param key name of the key
* @param data data to associate with that key
*/
set_data(key: string, data?: any | null): void;
// Conflicted with WebKit2WebExtension.DOMCharacterData.set_data
set_data(...args: never[]): any;
/**
* Sets a property on an object.
* @param property_name The name of the property to set
* @param value The value to set the property to
*/
set_property(property_name: string, value: GObject.Value | any): void;
/**
* Remove a specified datum from the object's data associations,
* without invoking the association's destroy handler.
* @param key name of the key
* @returns the data if found, or %NULL if no such data exists.
*/
steal_data(key: string): any | null;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata() and removes the `data` from object
* without invoking its destroy() function (if any was
* set).
* Usually, calling this function is only required to update
* user data pointers with a destroy notifier, for example:
*
* ```c
* void
* object_add_to_user_list (GObject *object,
* const gchar *new_string)
* {
* // the quark, naming the object data
* GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
* // retrieve the old string list
* GList *list = g_object_steal_qdata (object, quark_string_list);
*
* // prepend new string
* list = g_list_prepend (list, g_strdup (new_string));
* // this changed 'list', so we need to set it again
* g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
* }
* static void
* free_string_list (gpointer data)
* {
* GList *node, *list = data;
*
* for (node = list; node; node = node->next)
* g_free (node->data);
* g_list_free (list);
* }
* ```
*
* Using g_object_get_qdata() in the above example, instead of
* g_object_steal_qdata() would have left the destroy function set,
* and thus the partial string list would have been freed upon
* g_object_set_qdata_full().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
steal_qdata(quark: GLib.Quark): any | null;
/**
* Reverts the effect of a previous call to
* g_object_freeze_notify(). The freeze count is decreased on `object`
* and when it reaches zero, queued "notify" signals are emitted.
*
* Duplicate notifications for each property are squashed so that at most one
* #GObject::notify signal is emitted for each property, in the reverse order
* in which they have been queued.
*
* It is an error to call this function when the freeze count is zero.
*/
thaw_notify(): void;
/**
* Decreases the reference count of `object`. When its reference count
* drops to 0, the object is finalized (i.e. its memory is freed).
*
* If the pointer to the #GObject may be reused in future (for example, if it is
* an instance variable of another object), it is recommended to clear the
* pointer to %NULL rather than retain a dangling pointer to a potentially
* invalid #GObject instance. Use g_clear_object() for this.
*/
unref(): void;
/**
* This function essentially limits the life time of the `closure` to
* the life time of the object. That is, when the object is finalized,
* the `closure` is invalidated by calling g_closure_invalidate() on
* it, in order to prevent invocations of the closure with a finalized
* (nonexisting) object. Also, g_object_ref() and g_object_unref() are
* added as marshal guards to the `closure,` to ensure that an extra
* reference count is held on `object` during invocation of the
* `closure`. Usually, this function will be called on closures that
* use this `object` as closure data.
* @param closure #GClosure to watch
*/
watch_closure(closure: GObject.Closure): void;
/**
* the `constructed` function is called by g_object_new() as the
* final step of the object creation process. At the point of the call, all
* construction properties have been set on the object. The purpose of this
* call is to allow for object initialisation steps that can only be performed
* after construction properties have been set. `constructed` implementors
* should chain up to the `constructed` call of their parent class to allow it
* to complete its initialisation.
*/
vfunc_constructed(): void;
/**
* emits property change notification for a bunch
* of properties. Overriding `dispatch_properties_changed` should be rarely
* needed.
* @param n_pspecs
* @param pspecs
*/
vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
/**
* the `dispose` function is supposed to drop all references to other
* objects, but keep the instance otherwise intact, so that client method
* invocations still work. It may be run multiple times (due to reference
* loops). Before returning, `dispose` should chain up to the `dispose` method
* of the parent class.
*/
vfunc_dispose(): void;
/**
* instance finalization function, should finish the finalization of
* the instance begun in `dispose` and chain up to the `finalize` method of the
* parent class.
*/
vfunc_finalize(): void;
/**
* the generic getter for all properties of this type. Should be
* overridden for every type with properties.
* @param property_id
* @param value
* @param pspec
*/
vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param pspec
*/
vfunc_notify(pspec: GObject.ParamSpec): void;
/**
* the generic setter for all properties of this type. Should be
* overridden for every type with properties. If implementations of
* `set_property` don't emit property change notification explicitly, this will
* be done implicitly by the type system. However, if the notify signal is
* emitted explicitly, the type system will not emit it a second time.
* @param property_id
* @param value
* @param pspec
*/
vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
* @param id Handler ID of the handler to be disconnected
*/
disconnect(id: number): void;
/**
* Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
* @param properties Object containing the properties to set
*/
set(properties: { [key: string]: any }): void;
/**
* Blocks a handler of an instance so it will not be called during any signal emissions
* @param id Handler ID of the handler to be blocked
*/
block_signal_handler(id: number): void;
/**
* Unblocks a handler so it will be called again during any signal emissions
* @param id Handler ID of the handler to be unblocked
*/
unblock_signal_handler(id: number): void;
/**
* Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
* @param detailedName Name of the signal to stop emission of
*/
stop_emission_by_name(detailedName: string): void;
}
namespace DOMDOMImplementation {
// Signal signatures
interface SignalSignatures extends DOMObject.SignalSignatures {
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMObject.ConstructorProps {}
}
class DOMDOMImplementation extends DOMObject {
static $gtype: GObject.GType;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMDOMImplementation.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q]
? Q
: never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
create_css_style_sheet(title: string, media: string): DOMCSSStyleSheet;
create_document(
namespaceURI: string | null,
qualifiedName: string,
doctype?: DOMDocumentType | null,
): DOMDocument;
create_document_type(qualifiedName: string, publicId: string, systemId: string): DOMDocumentType;
create_html_document(title: string): DOMHTMLDocument;
has_feature(feature: string, version: string): boolean;
}
namespace DOMDOMSelection {
// Signal signatures
interface SignalSignatures extends DOMObject.SignalSignatures {
'notify::anchor-node': (pspec: GObject.ParamSpec) => void;
'notify::anchor-offset': (pspec: GObject.ParamSpec) => void;
'notify::base-node': (pspec: GObject.ParamSpec) => void;
'notify::base-offset': (pspec: GObject.ParamSpec) => void;
'notify::extent-node': (pspec: GObject.ParamSpec) => void;
'notify::extent-offset': (pspec: GObject.ParamSpec) => void;
'notify::focus-node': (pspec: GObject.ParamSpec) => void;
'notify::focus-offset': (pspec: GObject.ParamSpec) => void;
'notify::is-collapsed': (pspec: GObject.ParamSpec) => void;
'notify::range-count': (pspec: GObject.ParamSpec) => void;
'notify::type': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMObject.ConstructorProps {
anchor_node: DOMNode;
anchorNode: DOMNode;
anchor_offset: number;
anchorOffset: number;
base_node: DOMNode;
baseNode: DOMNode;
base_offset: number;
baseOffset: number;
extent_node: DOMNode;
extentNode: DOMNode;
extent_offset: number;
extentOffset: number;
focus_node: DOMNode;
focusNode: DOMNode;
focus_offset: number;
focusOffset: number;
is_collapsed: boolean;
isCollapsed: boolean;
range_count: number;
rangeCount: number;
type: string;
}
}
class DOMDOMSelection extends DOMObject {
static $gtype: GObject.GType;
// Properties
get anchor_node(): DOMNode;
get anchorNode(): DOMNode;
get anchor_offset(): number;
get anchorOffset(): number;
get base_node(): DOMNode;
get baseNode(): DOMNode;
get base_offset(): number;
get baseOffset(): number;
get extent_node(): DOMNode;
get extentNode(): DOMNode;
get extent_offset(): number;
get extentOffset(): number;
get focus_node(): DOMNode;
get focusNode(): DOMNode;
get focus_offset(): number;
get focusOffset(): number;
get is_collapsed(): boolean;
get isCollapsed(): boolean;
get range_count(): number;
get rangeCount(): number;
get type(): string;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMDOMSelection.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q]
? Q
: never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
add_range(range: DOMRange): void;
collapse(node: DOMNode, offset: number): void;
collapse_to_end(): void;
collapse_to_start(): void;
contains_node(node: DOMNode, allowPartial: boolean): boolean;
delete_from_document(): void;
empty(): void;
extend(node: DOMNode, offset: number): void;
get_anchor_node(): DOMNode;
get_anchor_offset(): number;
get_base_node(): DOMNode;
get_base_offset(): number;
get_extent_node(): DOMNode;
get_extent_offset(): number;
get_focus_node(): DOMNode;
get_focus_offset(): number;
get_is_collapsed(): boolean;
get_range_at(index: number): DOMRange;
get_range_count(): number;
get_selection_type(): string;
modify(alter: string, direction: string, granularity: string): void;
remove_all_ranges(): void;
select_all_children(node: DOMNode): void;
set_base_and_extent(baseNode: DOMNode, baseOffset: number, extentNode: DOMNode, extentOffset: number): void;
set_position(node: DOMNode, offset: number): void;
}
namespace DOMDOMTokenList {
// Signal signatures
interface SignalSignatures extends DOMObject.SignalSignatures {
'notify::length': (pspec: GObject.ParamSpec) => void;
'notify::value': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMObject.ConstructorProps {
length: number;
value: string;
}
}
class DOMDOMTokenList extends DOMObject {
static $gtype: GObject.GType;
// Properties
get length(): number;
get value(): string;
set value(val: string);
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMDOMTokenList.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q]
? Q
: never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
contains(token: string): boolean;
get_length(): number;
get_value(): string;
item(index: number): string;
replace(token: string, newToken: string): void;
set_value(value: string): void;
toggle(token: string, force: boolean): boolean;
}
namespace DOMDOMWindow {
// Signal signatures
interface SignalSignatures extends DOMObject.SignalSignatures {
'notify::closed': (pspec: GObject.ParamSpec) => void;
'notify::default-status': (pspec: GObject.ParamSpec) => void;
'notify::device-pixel-ratio': (pspec: GObject.ParamSpec) => void;
'notify::document': (pspec: GObject.ParamSpec) => void;
'notify::frame-element': (pspec: GObject.ParamSpec) => void;
'notify::frames': (pspec: GObject.ParamSpec) => void;
'notify::inner-height': (pspec: GObject.ParamSpec) => void;
'notify::inner-width': (pspec: GObject.ParamSpec) => void;
'notify::length': (pspec: GObject.ParamSpec) => void;
'notify::name': (pspec: GObject.ParamSpec) => void;
'notify::offscreen-buffering': (pspec: GObject.ParamSpec) => void;
'notify::opener': (pspec: GObject.ParamSpec) => void;
'notify::orientation': (pspec: GObject.ParamSpec) => void;
'notify::outer-height': (pspec: GObject.ParamSpec) => void;
'notify::outer-width': (pspec: GObject.ParamSpec) => void;
'notify::page-x-offset': (pspec: GObject.ParamSpec) => void;
'notify::page-xoffset': (pspec: GObject.ParamSpec) => void;
'notify::page-y-offset': (pspec: GObject.ParamSpec) => void;
'notify::page-yoffset': (pspec: GObject.ParamSpec) => void;
'notify::parent': (pspec: GObject.ParamSpec) => void;
'notify::screen-left': (pspec: GObject.ParamSpec) => void;
'notify::screen-top': (pspec: GObject.ParamSpec) => void;
'notify::screen-x': (pspec: GObject.ParamSpec) => void;
'notify::screen-y': (pspec: GObject.ParamSpec) => void;
'notify::scroll-x': (pspec: GObject.ParamSpec) => void;
'notify::scroll-y': (pspec: GObject.ParamSpec) => void;
'notify::self': (pspec: GObject.ParamSpec) => void;
'notify::status': (pspec: GObject.ParamSpec) => void;
'notify::top': (pspec: GObject.ParamSpec) => void;
'notify::window': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMObject.ConstructorProps, DOMEventTarget.ConstructorProps {
closed: boolean;
default_status: string;
defaultStatus: string;
device_pixel_ratio: number;
devicePixelRatio: number;
document: DOMDocument;
frame_element: DOMElement;
frameElement: DOMElement;
frames: DOMDOMWindow;
inner_height: number;
innerHeight: number;
inner_width: number;
innerWidth: number;
length: number;
name: string;
offscreen_buffering: boolean;
offscreenBuffering: boolean;
opener: DOMDOMWindow;
orientation: number;
outer_height: number;
outerHeight: number;
outer_width: number;
outerWidth: number;
page_x_offset: number;
pageXOffset: number;
page_y_offset: number;
pageYOffset: number;
parent: DOMDOMWindow;
screen_left: number;
screenLeft: number;
screen_top: number;
screenTop: number;
screen_x: number;
screenX: number;
screen_y: number;
screenY: number;
scroll_x: number;
scrollX: number;
scroll_y: number;
scrollY: number;
self: DOMDOMWindow;
status: string;
top: DOMDOMWindow;
window: DOMDOMWindow;
}
}
class DOMDOMWindow extends DOMObject implements DOMEventTarget {
static $gtype: GObject.GType;
// Properties
get closed(): boolean;
get default_status(): string;
set default_status(val: string);
get defaultStatus(): string;
set defaultStatus(val: string);
get device_pixel_ratio(): number;
get devicePixelRatio(): number;
get document(): DOMDocument;
get frame_element(): DOMElement;
get frameElement(): DOMElement;
get frames(): DOMDOMWindow;
get inner_height(): number;
get innerHeight(): number;
get inner_width(): number;
get innerWidth(): number;
get length(): number;
get name(): string;
set name(val: string);
get offscreen_buffering(): boolean;
get offscreenBuffering(): boolean;
get opener(): DOMDOMWindow;
get orientation(): number;
get outer_height(): number;
get outerHeight(): number;
get outer_width(): number;
get outerWidth(): number;
get page_x_offset(): number;
get pageXOffset(): number;
get page_y_offset(): number;
get pageYOffset(): number;
get parent(): DOMDOMWindow;
get screen_left(): number;
get screenLeft(): number;
get screen_top(): number;
get screenTop(): number;
get screen_x(): number;
get screenX(): number;
get screen_y(): number;
get screenY(): number;
get scroll_x(): number;
get scrollX(): number;
get scroll_y(): number;
get scrollY(): number;
get self(): DOMDOMWindow;
get status(): string;
set status(val: string);
get top(): DOMDOMWindow;
get window(): DOMDOMWindow;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMDOMWindow.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q] ? Q : never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
alert(message: string): void;
blur(): void;
capture_events(): void;
close(): void;
confirm(message: string): boolean;
find(
string: string,
caseSensitive: boolean,
backwards: boolean,
wrap: boolean,
wholeWord: boolean,
searchInFrames: boolean,
showDialog: boolean,
): boolean;
focus(): void;
get_closed(): boolean;
get_computed_style(element: DOMElement, pseudoElement?: string | null): DOMCSSStyleDeclaration;
get_default_status(): string;
get_device_pixel_ratio(): number;
get_document(): DOMDocument;
get_frame_element(): DOMElement;
get_frames(): DOMDOMWindow;
get_inner_height(): number;
get_inner_width(): number;
get_length(): number;
get_name(): string;
get_offscreen_buffering(): boolean;
get_opener(): DOMDOMWindow;
get_orientation(): number;
get_outer_height(): number;
get_outer_width(): number;
get_page_x_offset(): number;
get_page_y_offset(): number;
get_parent(): DOMDOMWindow;
get_screen_left(): number;
get_screen_top(): number;
get_screen_x(): number;
get_screen_y(): number;
get_scroll_x(): number;
get_scroll_y(): number;
get_selection(): DOMDOMSelection;
get_self(): DOMDOMWindow;
get_status(): string;
get_top(): DOMDOMWindow;
get_window(): DOMDOMWindow;
move_by(x: number, y: number): void;
move_to(x: number, y: number): void;
print(): void;
prompt(message: string, defaultValue: string): string;
release_events(): void;
resize_by(x: number, y: number): void;
resize_to(width: number, height: number): void;
scroll_by(x: number, y: number): void;
scroll_to(x: number, y: number): void;
set_default_status(value: string): void;
set_name(value: string): void;
set_status(value: string): void;
stop(): void;
webkit_message_handlers_post_message(handler: string, message: string): boolean;
// Inherited methods
add_event_listener(event_name: string, handler: GObject.Callback, use_capture: boolean): boolean;
// Conflicted with WebKit2WebExtension.DOMEventTarget.add_event_listener
add_event_listener(...args: never[]): any;
dispatch_event(event: DOMEvent): boolean;
remove_event_listener(event_name: string, handler: any | null, use_capture: boolean): boolean;
// Conflicted with WebKit2WebExtension.DOMEventTarget.remove_event_listener
remove_event_listener(...args: never[]): any;
vfunc_add_event_listener(event_name: string, handler: GObject.Closure, use_capture: boolean): boolean;
vfunc_dispatch_event(event: DOMEvent): boolean;
vfunc_remove_event_listener(event_name: string, handler: any | null, use_capture: boolean): boolean;
/**
* Creates a binding between `source_property` on `source` and `target_property`
* on `target`.
*
* Whenever the `source_property` is changed the `target_property` is
* updated using the same value. For instance:
*
*
* ```c
* g_object_bind_property (action, "active", widget, "sensitive", 0);
* ```
*
*
* Will result in the "sensitive" property of the widget #GObject instance to be
* updated with the same value of the "active" property of the action #GObject
* instance.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well.
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. To remove the binding without affecting the
* `source` and the `target` you can just call g_object_unref() on the returned
* #GBinding instance.
*
* Removing the binding by calling g_object_unref() on it must only be done if
* the binding, `source` and `target` are only used from a single thread and it
* is clear that both `source` and `target` outlive the binding. Especially it
* is not safe to rely on this if the binding, `source` or `target` can be
* finalized from different threads. Keep another reference to the binding and
* use g_binding_unbind() instead to be on the safe side.
*
* A #GObject can have multiple bindings.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
): GObject.Binding;
/**
* Complete version of g_object_bind_property().
*
* Creates a binding between `source_property` on `source` and `target_property`
* on `target,` allowing you to set the transformation functions to be used by
* the binding.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well. The `transform_from` function is only used in case
* of bidirectional bindings, otherwise it will be ignored
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. This will release the reference that is
* being held on the #GBinding instance; if you want to hold on to the
* #GBinding instance, you will need to hold a reference to it.
*
* To remove the binding, call g_binding_unbind().
*
* A #GObject can have multiple bindings.
*
* The same `user_data` parameter will be used for both `transform_to`
* and `transform_from` transformation functions; the `notify` function will
* be called once, when the binding is removed. If you need different data
* for each transformation function, please use
* g_object_bind_property_with_closures() instead.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
* @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
* @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property_full(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
transform_to?: GObject.BindingTransformFunc | null,
transform_from?: GObject.BindingTransformFunc | null,
notify?: GLib.DestroyNotify | null,
): GObject.Binding;
// Conflicted with GObject.Object.bind_property_full
bind_property_full(...args: never[]): any;
/**
* This function is intended for #GObject implementations to re-enforce
* a [floating][floating-ref] object reference. Doing this is seldom
* required: all #GInitiallyUnowneds are created with a floating reference
* which usually just needs to be sunken by calling g_object_ref_sink().
*/
force_floating(): void;
/**
* Increases the freeze count on `object`. If the freeze count is
* non-zero, the emission of "notify" signals on `object` is
* stopped. The signals are queued until the freeze count is decreased
* to zero. Duplicate notifications are squashed so that at most one
* #GObject::notify signal is emitted for each property modified while the
* object is frozen.
*
* This is necessary for accessors that modify multiple properties to prevent
* premature notification while the object is still being modified.
*/
freeze_notify(): void;
/**
* Gets a named field from the objects table of associations (see g_object_set_data()).
* @param key name of the key for that association
* @returns the data if found, or %NULL if no such data exists.
*/
get_data(key: string): any | null;
/**
* Gets a property of an object.
*
* The value can be:
* - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
* - a GObject.Value initialized with the expected type of the property
* - a GObject.Value initialized with a type to which the expected type of the property can be transformed
*
* In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
*
* Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
* @param property_name The name of the property to get
* @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
*/
get_property(property_name: string, value: GObject.Value | any): any;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
get_qdata(quark: GLib.Quark): any | null;
/**
* Gets `n_properties` properties for an `object`.
* Obtained properties will be set to `values`. All properties must be valid.
* Warnings will be emitted and undefined behaviour may result if invalid
* properties are passed in.
* @param names the names of each property to get
* @param values the values of each property to get
*/
getv(names: string[], values: (GObject.Value | any)[]): void;
/**
* Checks whether `object` has a [floating][floating-ref] reference.
* @returns %TRUE if @object has a floating reference
*/
is_floating(): boolean;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param property_name the name of a property installed on the class of @object.
*/
notify(property_name: string): void;
/**
* Emits a "notify" signal for the property specified by `pspec` on `object`.
*
* This function omits the property name lookup, hence it is faster than
* g_object_notify().
*
* One way to avoid using g_object_notify() from within the
* class that registered the properties, and using g_object_notify_by_pspec()
* instead, is to store the GParamSpec used with
* g_object_class_install_property() inside a static array, e.g.:
*
*
* ```c
* typedef enum
* {
* PROP_FOO = 1,
* PROP_LAST
* } MyObjectProperty;
*
* static GParamSpec *properties[PROP_LAST];
*
* static void
* my_object_class_init (MyObjectClass *klass)
* {
* properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
* 0, 100,
* 50,
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
* g_object_class_install_property (gobject_class,
* PROP_FOO,
* properties[PROP_FOO]);
* }
* ```
*
*
* and then notify a change on the "foo" property with:
*
*
* ```c
* g_object_notify_by_pspec (self, properties[PROP_FOO]);
* ```
*
* @param pspec the #GParamSpec of a property installed on the class of @object.
*/
notify_by_pspec(pspec: GObject.ParamSpec): void;
/**
* Increases the reference count of `object`.
*
* Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
* of `object` will be propagated to the return type (using the GCC typeof()
* extension), so any casting the caller needs to do on the return type must be
* explicit.
* @returns the same @object
*/
ref(): GObject.Object;
/**
* Increase the reference count of `object,` and possibly remove the
* [floating][floating-ref] reference, if `object` has a floating reference.
*
* In other words, if the object is floating, then this call "assumes
* ownership" of the floating reference, converting it to a normal
* reference by clearing the floating flag while leaving the reference
* count unchanged. If the object is not floating, then this call
* adds a new normal reference increasing the reference count by one.
*
* Since GLib 2.56, the type of `object` will be propagated to the return type
* under the same conditions as for g_object_ref().
* @returns @object
*/
ref_sink(): GObject.Object;
/**
* Releases all references to other objects. This can be used to break
* reference cycles.
*
* This function should only be called from object system implementations.
*/
run_dispose(): void;
/**
* Each object carries around a table of associations from
* strings to pointers. This function lets you set an association.
*
* If the object already had an association with that name,
* the old association will be destroyed.
*
* Internally, the `key` is converted to a #GQuark using g_quark_from_string().
* This means a copy of `key` is kept permanently (even after `object` has been
* finalized) — so it is recommended to only use a small, bounded set of values
* for `key` in your program, to avoid the #GQuark storage growing unbounded.
* @param key name of the key
* @param data data to associate with that key
*/
set_data(key: string, data?: any | null): void;
/**
* Sets a property on an object.
* @param property_name The name of the property to set
* @param value The value to set the property to
*/
set_property(property_name: string, value: GObject.Value | any): void;
/**
* Remove a specified datum from the object's data associations,
* without invoking the association's destroy handler.
* @param key name of the key
* @returns the data if found, or %NULL if no such data exists.
*/
steal_data(key: string): any | null;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata() and removes the `data` from object
* without invoking its destroy() function (if any was
* set).
* Usually, calling this function is only required to update
* user data pointers with a destroy notifier, for example:
*
* ```c
* void
* object_add_to_user_list (GObject *object,
* const gchar *new_string)
* {
* // the quark, naming the object data
* GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
* // retrieve the old string list
* GList *list = g_object_steal_qdata (object, quark_string_list);
*
* // prepend new string
* list = g_list_prepend (list, g_strdup (new_string));
* // this changed 'list', so we need to set it again
* g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
* }
* static void
* free_string_list (gpointer data)
* {
* GList *node, *list = data;
*
* for (node = list; node; node = node->next)
* g_free (node->data);
* g_list_free (list);
* }
* ```
*
* Using g_object_get_qdata() in the above example, instead of
* g_object_steal_qdata() would have left the destroy function set,
* and thus the partial string list would have been freed upon
* g_object_set_qdata_full().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
steal_qdata(quark: GLib.Quark): any | null;
/**
* Reverts the effect of a previous call to
* g_object_freeze_notify(). The freeze count is decreased on `object`
* and when it reaches zero, queued "notify" signals are emitted.
*
* Duplicate notifications for each property are squashed so that at most one
* #GObject::notify signal is emitted for each property, in the reverse order
* in which they have been queued.
*
* It is an error to call this function when the freeze count is zero.
*/
thaw_notify(): void;
/**
* Decreases the reference count of `object`. When its reference count
* drops to 0, the object is finalized (i.e. its memory is freed).
*
* If the pointer to the #GObject may be reused in future (for example, if it is
* an instance variable of another object), it is recommended to clear the
* pointer to %NULL rather than retain a dangling pointer to a potentially
* invalid #GObject instance. Use g_clear_object() for this.
*/
unref(): void;
/**
* This function essentially limits the life time of the `closure` to
* the life time of the object. That is, when the object is finalized,
* the `closure` is invalidated by calling g_closure_invalidate() on
* it, in order to prevent invocations of the closure with a finalized
* (nonexisting) object. Also, g_object_ref() and g_object_unref() are
* added as marshal guards to the `closure,` to ensure that an extra
* reference count is held on `object` during invocation of the
* `closure`. Usually, this function will be called on closures that
* use this `object` as closure data.
* @param closure #GClosure to watch
*/
watch_closure(closure: GObject.Closure): void;
/**
* the `constructed` function is called by g_object_new() as the
* final step of the object creation process. At the point of the call, all
* construction properties have been set on the object. The purpose of this
* call is to allow for object initialisation steps that can only be performed
* after construction properties have been set. `constructed` implementors
* should chain up to the `constructed` call of their parent class to allow it
* to complete its initialisation.
*/
vfunc_constructed(): void;
/**
* emits property change notification for a bunch
* of properties. Overriding `dispatch_properties_changed` should be rarely
* needed.
* @param n_pspecs
* @param pspecs
*/
vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
/**
* the `dispose` function is supposed to drop all references to other
* objects, but keep the instance otherwise intact, so that client method
* invocations still work. It may be run multiple times (due to reference
* loops). Before returning, `dispose` should chain up to the `dispose` method
* of the parent class.
*/
vfunc_dispose(): void;
/**
* instance finalization function, should finish the finalization of
* the instance begun in `dispose` and chain up to the `finalize` method of the
* parent class.
*/
vfunc_finalize(): void;
/**
* the generic getter for all properties of this type. Should be
* overridden for every type with properties.
* @param property_id
* @param value
* @param pspec
*/
vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param pspec
*/
vfunc_notify(pspec: GObject.ParamSpec): void;
/**
* the generic setter for all properties of this type. Should be
* overridden for every type with properties. If implementations of
* `set_property` don't emit property change notification explicitly, this will
* be done implicitly by the type system. However, if the notify signal is
* emitted explicitly, the type system will not emit it a second time.
* @param property_id
* @param value
* @param pspec
*/
vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
* @param id Handler ID of the handler to be disconnected
*/
disconnect(id: number): void;
/**
* Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
* @param properties Object containing the properties to set
*/
set(properties: { [key: string]: any }): void;
/**
* Blocks a handler of an instance so it will not be called during any signal emissions
* @param id Handler ID of the handler to be blocked
*/
block_signal_handler(id: number): void;
/**
* Unblocks a handler so it will be called again during any signal emissions
* @param id Handler ID of the handler to be unblocked
*/
unblock_signal_handler(id: number): void;
/**
* Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
* @param detailedName Name of the signal to stop emission of
*/
stop_emission_by_name(detailedName: string): void;
}
namespace DOMDocument {
// Signal signatures
interface SignalSignatures extends DOMNode.SignalSignatures {
'notify::active-element': (pspec: GObject.ParamSpec) => void;
'notify::anchors': (pspec: GObject.ParamSpec) => void;
'notify::applets': (pspec: GObject.ParamSpec) => void;
'notify::body': (pspec: GObject.ParamSpec) => void;
'notify::character-set': (pspec: GObject.ParamSpec) => void;
'notify::charset': (pspec: GObject.ParamSpec) => void;
'notify::child-element-count': (pspec: GObject.ParamSpec) => void;
'notify::children': (pspec: GObject.ParamSpec) => void;
'notify::compat-mode': (pspec: GObject.ParamSpec) => void;
'notify::content-type': (pspec: GObject.ParamSpec) => void;
'notify::cookie': (pspec: GObject.ParamSpec) => void;
'notify::current-script': (pspec: GObject.ParamSpec) => void;
'notify::default-view': (pspec: GObject.ParamSpec) => void;
'notify::design-mode': (pspec: GObject.ParamSpec) => void;
'notify::dir': (pspec: GObject.ParamSpec) => void;
'notify::doctype': (pspec: GObject.ParamSpec) => void;
'notify::document-element': (pspec: GObject.ParamSpec) => void;
'notify::document-uri': (pspec: GObject.ParamSpec) => void;
'notify::domain': (pspec: GObject.ParamSpec) => void;
'notify::embeds': (pspec: GObject.ParamSpec) => void;
'notify::first-element-child': (pspec: GObject.ParamSpec) => void;
'notify::forms': (pspec: GObject.ParamSpec) => void;
'notify::head': (pspec: GObject.ParamSpec) => void;
'notify::hidden': (pspec: GObject.ParamSpec) => void;
'notify::images': (pspec: GObject.ParamSpec) => void;
'notify::implementation': (pspec: GObject.ParamSpec) => void;
'notify::input-encoding': (pspec: GObject.ParamSpec) => void;
'notify::last-element-child': (pspec: GObject.ParamSpec) => void;
'notify::last-modified': (pspec: GObject.ParamSpec) => void;
'notify::links': (pspec: GObject.ParamSpec) => void;
'notify::origin': (pspec: GObject.ParamSpec) => void;
'notify::plugins': (pspec: GObject.ParamSpec) => void;
'notify::pointer-lock-element': (pspec: GObject.ParamSpec) => void;
'notify::preferred-stylesheet-set': (pspec: GObject.ParamSpec) => void;
'notify::ready-state': (pspec: GObject.ParamSpec) => void;
'notify::referrer': (pspec: GObject.ParamSpec) => void;
'notify::scripts': (pspec: GObject.ParamSpec) => void;
'notify::scrolling-element': (pspec: GObject.ParamSpec) => void;
'notify::selected-stylesheet-set': (pspec: GObject.ParamSpec) => void;
'notify::style-sheets': (pspec: GObject.ParamSpec) => void;
'notify::title': (pspec: GObject.ParamSpec) => void;
'notify::url': (pspec: GObject.ParamSpec) => void;
'notify::visibility-state': (pspec: GObject.ParamSpec) => void;
'notify::webkit-current-full-screen-element': (pspec: GObject.ParamSpec) => void;
'notify::webkit-full-screen-keyboard-input-allowed': (pspec: GObject.ParamSpec) => void;
'notify::webkit-fullscreen-element': (pspec: GObject.ParamSpec) => void;
'notify::webkit-fullscreen-enabled': (pspec: GObject.ParamSpec) => void;
'notify::webkit-is-full-screen': (pspec: GObject.ParamSpec) => void;
'notify::xml-encoding': (pspec: GObject.ParamSpec) => void;
'notify::xml-standalone': (pspec: GObject.ParamSpec) => void;
'notify::xml-version': (pspec: GObject.ParamSpec) => void;
'notify::base-uri': (pspec: GObject.ParamSpec) => void;
'notify::child-nodes': (pspec: GObject.ParamSpec) => void;
'notify::first-child': (pspec: GObject.ParamSpec) => void;
'notify::last-child': (pspec: GObject.ParamSpec) => void;
'notify::next-sibling': (pspec: GObject.ParamSpec) => void;
'notify::node-name': (pspec: GObject.ParamSpec) => void;
'notify::node-type': (pspec: GObject.ParamSpec) => void;
'notify::node-value': (pspec: GObject.ParamSpec) => void;
'notify::owner-document': (pspec: GObject.ParamSpec) => void;
'notify::parent-element': (pspec: GObject.ParamSpec) => void;
'notify::parent-node': (pspec: GObject.ParamSpec) => void;
'notify::previous-sibling': (pspec: GObject.ParamSpec) => void;
'notify::text-content': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMNode.ConstructorProps, DOMEventTarget.ConstructorProps {
active_element: DOMElement;
activeElement: DOMElement;
anchors: DOMHTMLCollection;
applets: DOMHTMLCollection;
body: DOMHTMLElement;
character_set: string;
characterSet: string;
charset: string;
child_element_count: number;
childElementCount: number;
children: DOMHTMLCollection;
compat_mode: string;
compatMode: string;
content_type: string;
contentType: string;
cookie: string;
current_script: DOMHTMLScriptElement;
currentScript: DOMHTMLScriptElement;
default_view: DOMDOMWindow;
defaultView: DOMDOMWindow;
design_mode: string;
designMode: string;
dir: string;
doctype: DOMDocumentType;
document_element: DOMElement;
documentElement: DOMElement;
document_uri: string;
documentUri: string;
domain: string;
embeds: DOMHTMLCollection;
first_element_child: DOMElement;
firstElementChild: DOMElement;
forms: DOMHTMLCollection;
head: DOMHTMLHeadElement;
hidden: boolean;
images: DOMHTMLCollection;
implementation: DOMDOMImplementation;
input_encoding: string;
inputEncoding: string;
last_element_child: DOMElement;
lastElementChild: DOMElement;
last_modified: string;
lastModified: string;
links: DOMHTMLCollection;
origin: string;
plugins: DOMHTMLCollection;
pointer_lock_element: DOMElement;
pointerLockElement: DOMElement;
preferred_stylesheet_set: string;
preferredStylesheetSet: string;
ready_state: string;
readyState: string;
referrer: string;
scripts: DOMHTMLCollection;
scrolling_element: DOMElement;
scrollingElement: DOMElement;
selected_stylesheet_set: string;
selectedStylesheetSet: string;
style_sheets: DOMStyleSheetList;
styleSheets: DOMStyleSheetList;
title: string;
url: string;
visibility_state: string;
visibilityState: string;
webkit_current_full_screen_element: DOMElement;
webkitCurrentFullScreenElement: DOMElement;
webkit_full_screen_keyboard_input_allowed: boolean;
webkitFullScreenKeyboardInputAllowed: boolean;
webkit_fullscreen_element: DOMElement;
webkitFullscreenElement: DOMElement;
webkit_fullscreen_enabled: boolean;
webkitFullscreenEnabled: boolean;
webkit_is_full_screen: boolean;
webkitIsFullScreen: boolean;
xml_encoding: string;
xmlEncoding: string;
xml_standalone: boolean;
xmlStandalone: boolean;
xml_version: string;
xmlVersion: string;
}
}
class DOMDocument extends DOMNode implements DOMEventTarget {
static $gtype: GObject.GType;
// Properties
get active_element(): DOMElement;
get activeElement(): DOMElement;
get anchors(): DOMHTMLCollection;
get applets(): DOMHTMLCollection;
get body(): DOMHTMLElement;
get character_set(): string;
get characterSet(): string;
get charset(): string;
set charset(val: string);
get child_element_count(): number;
get childElementCount(): number;
get children(): DOMHTMLCollection;
get compat_mode(): string;
get compatMode(): string;
get content_type(): string;
get contentType(): string;
get cookie(): string;
set cookie(val: string);
get current_script(): DOMHTMLScriptElement;
get currentScript(): DOMHTMLScriptElement;
get default_view(): DOMDOMWindow;
get defaultView(): DOMDOMWindow;
get design_mode(): string;
set design_mode(val: string);
get designMode(): string;
set designMode(val: string);
get dir(): string;
set dir(val: string);
get doctype(): DOMDocumentType;
get document_element(): DOMElement;
get documentElement(): DOMElement;
get document_uri(): string;
set document_uri(val: string);
get documentUri(): string;
set documentUri(val: string);
get domain(): string;
get embeds(): DOMHTMLCollection;
get first_element_child(): DOMElement;
get firstElementChild(): DOMElement;
get forms(): DOMHTMLCollection;
get head(): DOMHTMLHeadElement;
get hidden(): boolean;
get images(): DOMHTMLCollection;
get implementation(): DOMDOMImplementation;
get input_encoding(): string;
get inputEncoding(): string;
get last_element_child(): DOMElement;
get lastElementChild(): DOMElement;
get last_modified(): string;
get lastModified(): string;
get links(): DOMHTMLCollection;
get origin(): string;
get plugins(): DOMHTMLCollection;
get pointer_lock_element(): DOMElement;
get pointerLockElement(): DOMElement;
get preferred_stylesheet_set(): string;
get preferredStylesheetSet(): string;
get ready_state(): string;
get readyState(): string;
get referrer(): string;
get scripts(): DOMHTMLCollection;
get scrolling_element(): DOMElement;
get scrollingElement(): DOMElement;
get selected_stylesheet_set(): string;
set selected_stylesheet_set(val: string);
get selectedStylesheetSet(): string;
set selectedStylesheetSet(val: string);
get style_sheets(): DOMStyleSheetList;
get styleSheets(): DOMStyleSheetList;
get title(): string;
set title(val: string);
get url(): string;
get visibility_state(): string;
get visibilityState(): string;
get webkit_current_full_screen_element(): DOMElement;
get webkitCurrentFullScreenElement(): DOMElement;
get webkit_full_screen_keyboard_input_allowed(): boolean;
get webkitFullScreenKeyboardInputAllowed(): boolean;
get webkit_fullscreen_element(): DOMElement;
get webkitFullscreenElement(): DOMElement;
get webkit_fullscreen_enabled(): boolean;
get webkitFullscreenEnabled(): boolean;
get webkit_is_full_screen(): boolean;
get webkitIsFullScreen(): boolean;
get xml_encoding(): string;
get xmlEncoding(): string;
get xml_standalone(): boolean;
set xml_standalone(val: boolean);
get xmlStandalone(): boolean;
set xmlStandalone(val: boolean);
get xml_version(): string;
set xml_version(val: string);
get xmlVersion(): string;
set xmlVersion(val: string);
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMDocument.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q] ? Q : never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
adopt_node(source: DOMNode): DOMNode;
caret_range_from_point(x: number, y: number): DOMRange;
create_attribute(name: string): DOMAttr;
create_attribute_ns(namespaceURI: string | null, qualifiedName: string): DOMAttr;
create_cdata_section(data: string): DOMCDATASection;
create_comment(data: string): DOMComment;
create_css_style_declaration(): DOMCSSStyleDeclaration;
create_document_fragment(): DOMDocumentFragment;
create_element(tagName: string): DOMElement;
create_element_ns(namespaceURI: string | null, qualifiedName: string): DOMElement;
/**
* This function has been removed from the DOM spec and it just returns %NULL.
* @param name A #gchar
* @returns A #WebKitDOMEntityReference
*/
create_entity_reference(name?: string | null): DOMEntityReference;
create_event(eventType: string): DOMEvent;
create_expression(expression: string, resolver: DOMXPathNSResolver): DOMXPathExpression;
create_node_iterator(
root: DOMNode,
whatToShow: number,
filter: DOMNodeFilter | null,
expandEntityReferences: boolean,
): DOMNodeIterator;
create_ns_resolver(nodeResolver: DOMNode): DOMXPathNSResolver;
create_processing_instruction(target: string, data: string): DOMProcessingInstruction;
create_range(): DOMRange;
create_text_node(data: string): DOMText;
create_tree_walker(
root: DOMNode,
whatToShow: number,
filter: DOMNodeFilter | null,
expandEntityReferences: boolean,
): DOMTreeWalker;
element_from_point(x: number, y: number): DOMElement;
evaluate(
expression: string,
contextNode: DOMNode,
resolver: DOMXPathNSResolver | null,
type: number,
inResult?: DOMXPathResult | null,
): DOMXPathResult;
exec_command(command: string, userInterface: boolean, value: string): boolean;
exit_pointer_lock(): void;
get_active_element(): DOMElement;
get_anchors(): DOMHTMLCollection;
get_applets(): DOMHTMLCollection;
get_body(): DOMHTMLElement;
get_character_set(): string;
get_charset(): string;
get_child_element_count(): number;
get_children(): DOMHTMLCollection;
get_compat_mode(): string;
get_content_type(): string;
get_cookie(): string;
get_current_script(): DOMHTMLScriptElement;
get_default_charset(): string;
get_default_view(): DOMDOMWindow;
get_design_mode(): string;
get_dir(): string;
get_doctype(): DOMDocumentType;
get_document_element(): DOMElement;
get_document_uri(): string;
get_domain(): string;
get_element_by_id(elementId: string): DOMElement;
get_elements_by_class_name(class_name: string): DOMNodeList;
get_elements_by_class_name_as_html_collection(classNames: string): DOMHTMLCollection;
get_elements_by_name(elementName: string): DOMNodeList;
get_elements_by_tag_name(tag_name: string): DOMNodeList;
get_elements_by_tag_name_as_html_collection(tagname: string): DOMHTMLCollection;
get_elements_by_tag_name_ns(namespace_uri: string, tag_name: string): DOMNodeList;
get_elements_by_tag_name_ns_as_html_collection(namespaceURI: string, localName: string): DOMHTMLCollection;
get_embeds(): DOMHTMLCollection;
get_first_element_child(): DOMElement;
get_forms(): DOMHTMLCollection;
get_head(): DOMHTMLHeadElement;
get_hidden(): boolean;
get_images(): DOMHTMLCollection;
get_implementation(): DOMDOMImplementation;
get_input_encoding(): string;
get_last_element_child(): DOMElement;
get_last_modified(): string;
get_links(): DOMHTMLCollection;
get_origin(): string;
get_override_style(element: DOMElement, pseudoElement?: string | null): DOMCSSStyleDeclaration;
get_plugins(): DOMHTMLCollection;
get_pointer_lock_element(): DOMElement;
/**
* This function has been removed and does nothing.
* @returns A #gchar
*/
get_preferred_stylesheet_set(): string;
get_ready_state(): string;
get_referrer(): string;
get_scripts(): DOMHTMLCollection;
get_scrolling_element(): DOMElement;
/**
* This function has been removed and does nothing.
* @returns A #gchar
*/
get_selected_stylesheet_set(): string;
get_style_sheets(): DOMStyleSheetList;
get_title(): string;
get_url(): string;
get_visibility_state(): string;
get_webkit_current_fullscreen_element(): DOMElement;
get_webkit_fullscreen_element(): DOMElement;
get_webkit_fullscreen_enabled(): boolean;
get_webkit_fullscreen_keyboard_input_allowed(): boolean;
get_webkit_is_fullscreen(): boolean;
get_xml_encoding(): string;
get_xml_standalone(): boolean;
get_xml_version(): string;
has_focus(): boolean;
import_node(importedNode: DOMNode, deep: boolean): DOMNode;
query_command_enabled(command: string): boolean;
query_command_indeterm(command: string): boolean;
query_command_state(command: string): boolean;
query_command_supported(command: string): boolean;
query_command_value(command: string): string;
query_selector(selectors: string): DOMElement;
query_selector_all(selectors: string): DOMNodeList;
set_body(value: DOMHTMLElement): void;
set_charset(value: string): void;
set_cookie(value: string): void;
set_design_mode(value: string): void;
set_dir(value: string): void;
set_document_uri(value: string): void;
/**
* This function has been removed and does nothing.
* @param value A #gchar
*/
set_selected_stylesheet_set(value: string): void;
set_title(value: string): void;
set_xml_standalone(value: boolean): void;
set_xml_version(value: string): void;
webkit_cancel_fullscreen(): void;
webkit_exit_fullscreen(): void;
// Inherited methods
add_event_listener(event_name: string, handler: GObject.Callback, use_capture: boolean): boolean;
// Conflicted with WebKit2WebExtension.DOMEventTarget.add_event_listener
add_event_listener(...args: never[]): any;
dispatch_event(event: DOMEvent): boolean;
remove_event_listener(event_name: string, handler: any | null, use_capture: boolean): boolean;
// Conflicted with WebKit2WebExtension.DOMEventTarget.remove_event_listener
remove_event_listener(...args: never[]): any;
vfunc_add_event_listener(event_name: string, handler: GObject.Closure, use_capture: boolean): boolean;
vfunc_dispatch_event(event: DOMEvent): boolean;
vfunc_remove_event_listener(event_name: string, handler: any | null, use_capture: boolean): boolean;
/**
* Creates a binding between `source_property` on `source` and `target_property`
* on `target`.
*
* Whenever the `source_property` is changed the `target_property` is
* updated using the same value. For instance:
*
*
* ```c
* g_object_bind_property (action, "active", widget, "sensitive", 0);
* ```
*
*
* Will result in the "sensitive" property of the widget #GObject instance to be
* updated with the same value of the "active" property of the action #GObject
* instance.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well.
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. To remove the binding without affecting the
* `source` and the `target` you can just call g_object_unref() on the returned
* #GBinding instance.
*
* Removing the binding by calling g_object_unref() on it must only be done if
* the binding, `source` and `target` are only used from a single thread and it
* is clear that both `source` and `target` outlive the binding. Especially it
* is not safe to rely on this if the binding, `source` or `target` can be
* finalized from different threads. Keep another reference to the binding and
* use g_binding_unbind() instead to be on the safe side.
*
* A #GObject can have multiple bindings.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
): GObject.Binding;
/**
* Complete version of g_object_bind_property().
*
* Creates a binding between `source_property` on `source` and `target_property`
* on `target,` allowing you to set the transformation functions to be used by
* the binding.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well. The `transform_from` function is only used in case
* of bidirectional bindings, otherwise it will be ignored
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. This will release the reference that is
* being held on the #GBinding instance; if you want to hold on to the
* #GBinding instance, you will need to hold a reference to it.
*
* To remove the binding, call g_binding_unbind().
*
* A #GObject can have multiple bindings.
*
* The same `user_data` parameter will be used for both `transform_to`
* and `transform_from` transformation functions; the `notify` function will
* be called once, when the binding is removed. If you need different data
* for each transformation function, please use
* g_object_bind_property_with_closures() instead.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
* @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
* @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property_full(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
transform_to?: GObject.BindingTransformFunc | null,
transform_from?: GObject.BindingTransformFunc | null,
notify?: GLib.DestroyNotify | null,
): GObject.Binding;
// Conflicted with GObject.Object.bind_property_full
bind_property_full(...args: never[]): any;
/**
* This function is intended for #GObject implementations to re-enforce
* a [floating][floating-ref] object reference. Doing this is seldom
* required: all #GInitiallyUnowneds are created with a floating reference
* which usually just needs to be sunken by calling g_object_ref_sink().
*/
force_floating(): void;
/**
* Increases the freeze count on `object`. If the freeze count is
* non-zero, the emission of "notify" signals on `object` is
* stopped. The signals are queued until the freeze count is decreased
* to zero. Duplicate notifications are squashed so that at most one
* #GObject::notify signal is emitted for each property modified while the
* object is frozen.
*
* This is necessary for accessors that modify multiple properties to prevent
* premature notification while the object is still being modified.
*/
freeze_notify(): void;
/**
* Gets a named field from the objects table of associations (see g_object_set_data()).
* @param key name of the key for that association
* @returns the data if found, or %NULL if no such data exists.
*/
get_data(key: string): any | null;
/**
* Gets a property of an object.
*
* The value can be:
* - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
* - a GObject.Value initialized with the expected type of the property
* - a GObject.Value initialized with a type to which the expected type of the property can be transformed
*
* In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
*
* Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
* @param property_name The name of the property to get
* @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
*/
get_property(property_name: string, value: GObject.Value | any): any;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
get_qdata(quark: GLib.Quark): any | null;
/**
* Gets `n_properties` properties for an `object`.
* Obtained properties will be set to `values`. All properties must be valid.
* Warnings will be emitted and undefined behaviour may result if invalid
* properties are passed in.
* @param names the names of each property to get
* @param values the values of each property to get
*/
getv(names: string[], values: (GObject.Value | any)[]): void;
/**
* Checks whether `object` has a [floating][floating-ref] reference.
* @returns %TRUE if @object has a floating reference
*/
is_floating(): boolean;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param property_name the name of a property installed on the class of @object.
*/
notify(property_name: string): void;
/**
* Emits a "notify" signal for the property specified by `pspec` on `object`.
*
* This function omits the property name lookup, hence it is faster than
* g_object_notify().
*
* One way to avoid using g_object_notify() from within the
* class that registered the properties, and using g_object_notify_by_pspec()
* instead, is to store the GParamSpec used with
* g_object_class_install_property() inside a static array, e.g.:
*
*
* ```c
* typedef enum
* {
* PROP_FOO = 1,
* PROP_LAST
* } MyObjectProperty;
*
* static GParamSpec *properties[PROP_LAST];
*
* static void
* my_object_class_init (MyObjectClass *klass)
* {
* properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
* 0, 100,
* 50,
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
* g_object_class_install_property (gobject_class,
* PROP_FOO,
* properties[PROP_FOO]);
* }
* ```
*
*
* and then notify a change on the "foo" property with:
*
*
* ```c
* g_object_notify_by_pspec (self, properties[PROP_FOO]);
* ```
*
* @param pspec the #GParamSpec of a property installed on the class of @object.
*/
notify_by_pspec(pspec: GObject.ParamSpec): void;
/**
* Increases the reference count of `object`.
*
* Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
* of `object` will be propagated to the return type (using the GCC typeof()
* extension), so any casting the caller needs to do on the return type must be
* explicit.
* @returns the same @object
*/
ref(): GObject.Object;
/**
* Increase the reference count of `object,` and possibly remove the
* [floating][floating-ref] reference, if `object` has a floating reference.
*
* In other words, if the object is floating, then this call "assumes
* ownership" of the floating reference, converting it to a normal
* reference by clearing the floating flag while leaving the reference
* count unchanged. If the object is not floating, then this call
* adds a new normal reference increasing the reference count by one.
*
* Since GLib 2.56, the type of `object` will be propagated to the return type
* under the same conditions as for g_object_ref().
* @returns @object
*/
ref_sink(): GObject.Object;
/**
* Releases all references to other objects. This can be used to break
* reference cycles.
*
* This function should only be called from object system implementations.
*/
run_dispose(): void;
/**
* Each object carries around a table of associations from
* strings to pointers. This function lets you set an association.
*
* If the object already had an association with that name,
* the old association will be destroyed.
*
* Internally, the `key` is converted to a #GQuark using g_quark_from_string().
* This means a copy of `key` is kept permanently (even after `object` has been
* finalized) — so it is recommended to only use a small, bounded set of values
* for `key` in your program, to avoid the #GQuark storage growing unbounded.
* @param key name of the key
* @param data data to associate with that key
*/
set_data(key: string, data?: any | null): void;
/**
* Sets a property on an object.
* @param property_name The name of the property to set
* @param value The value to set the property to
*/
set_property(property_name: string, value: GObject.Value | any): void;
/**
* Remove a specified datum from the object's data associations,
* without invoking the association's destroy handler.
* @param key name of the key
* @returns the data if found, or %NULL if no such data exists.
*/
steal_data(key: string): any | null;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata() and removes the `data` from object
* without invoking its destroy() function (if any was
* set).
* Usually, calling this function is only required to update
* user data pointers with a destroy notifier, for example:
*
* ```c
* void
* object_add_to_user_list (GObject *object,
* const gchar *new_string)
* {
* // the quark, naming the object data
* GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
* // retrieve the old string list
* GList *list = g_object_steal_qdata (object, quark_string_list);
*
* // prepend new string
* list = g_list_prepend (list, g_strdup (new_string));
* // this changed 'list', so we need to set it again
* g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
* }
* static void
* free_string_list (gpointer data)
* {
* GList *node, *list = data;
*
* for (node = list; node; node = node->next)
* g_free (node->data);
* g_list_free (list);
* }
* ```
*
* Using g_object_get_qdata() in the above example, instead of
* g_object_steal_qdata() would have left the destroy function set,
* and thus the partial string list would have been freed upon
* g_object_set_qdata_full().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
steal_qdata(quark: GLib.Quark): any | null;
/**
* Reverts the effect of a previous call to
* g_object_freeze_notify(). The freeze count is decreased on `object`
* and when it reaches zero, queued "notify" signals are emitted.
*
* Duplicate notifications for each property are squashed so that at most one
* #GObject::notify signal is emitted for each property, in the reverse order
* in which they have been queued.
*
* It is an error to call this function when the freeze count is zero.
*/
thaw_notify(): void;
/**
* Decreases the reference count of `object`. When its reference count
* drops to 0, the object is finalized (i.e. its memory is freed).
*
* If the pointer to the #GObject may be reused in future (for example, if it is
* an instance variable of another object), it is recommended to clear the
* pointer to %NULL rather than retain a dangling pointer to a potentially
* invalid #GObject instance. Use g_clear_object() for this.
*/
unref(): void;
/**
* This function essentially limits the life time of the `closure` to
* the life time of the object. That is, when the object is finalized,
* the `closure` is invalidated by calling g_closure_invalidate() on
* it, in order to prevent invocations of the closure with a finalized
* (nonexisting) object. Also, g_object_ref() and g_object_unref() are
* added as marshal guards to the `closure,` to ensure that an extra
* reference count is held on `object` during invocation of the
* `closure`. Usually, this function will be called on closures that
* use this `object` as closure data.
* @param closure #GClosure to watch
*/
watch_closure(closure: GObject.Closure): void;
/**
* the `constructed` function is called by g_object_new() as the
* final step of the object creation process. At the point of the call, all
* construction properties have been set on the object. The purpose of this
* call is to allow for object initialisation steps that can only be performed
* after construction properties have been set. `constructed` implementors
* should chain up to the `constructed` call of their parent class to allow it
* to complete its initialisation.
*/
vfunc_constructed(): void;
/**
* emits property change notification for a bunch
* of properties. Overriding `dispatch_properties_changed` should be rarely
* needed.
* @param n_pspecs
* @param pspecs
*/
vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
/**
* the `dispose` function is supposed to drop all references to other
* objects, but keep the instance otherwise intact, so that client method
* invocations still work. It may be run multiple times (due to reference
* loops). Before returning, `dispose` should chain up to the `dispose` method
* of the parent class.
*/
vfunc_dispose(): void;
/**
* instance finalization function, should finish the finalization of
* the instance begun in `dispose` and chain up to the `finalize` method of the
* parent class.
*/
vfunc_finalize(): void;
/**
* the generic getter for all properties of this type. Should be
* overridden for every type with properties.
* @param property_id
* @param value
* @param pspec
*/
vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param pspec
*/
vfunc_notify(pspec: GObject.ParamSpec): void;
/**
* the generic setter for all properties of this type. Should be
* overridden for every type with properties. If implementations of
* `set_property` don't emit property change notification explicitly, this will
* be done implicitly by the type system. However, if the notify signal is
* emitted explicitly, the type system will not emit it a second time.
* @param property_id
* @param value
* @param pspec
*/
vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
* @param id Handler ID of the handler to be disconnected
*/
disconnect(id: number): void;
/**
* Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
* @param properties Object containing the properties to set
*/
set(properties: { [key: string]: any }): void;
/**
* Blocks a handler of an instance so it will not be called during any signal emissions
* @param id Handler ID of the handler to be blocked
*/
block_signal_handler(id: number): void;
/**
* Unblocks a handler so it will be called again during any signal emissions
* @param id Handler ID of the handler to be unblocked
*/
unblock_signal_handler(id: number): void;
/**
* Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
* @param detailedName Name of the signal to stop emission of
*/
stop_emission_by_name(detailedName: string): void;
}
namespace DOMDocumentFragment {
// Signal signatures
interface SignalSignatures extends DOMNode.SignalSignatures {
'notify::child-element-count': (pspec: GObject.ParamSpec) => void;
'notify::children': (pspec: GObject.ParamSpec) => void;
'notify::first-element-child': (pspec: GObject.ParamSpec) => void;
'notify::last-element-child': (pspec: GObject.ParamSpec) => void;
'notify::base-uri': (pspec: GObject.ParamSpec) => void;
'notify::child-nodes': (pspec: GObject.ParamSpec) => void;
'notify::first-child': (pspec: GObject.ParamSpec) => void;
'notify::last-child': (pspec: GObject.ParamSpec) => void;
'notify::next-sibling': (pspec: GObject.ParamSpec) => void;
'notify::node-name': (pspec: GObject.ParamSpec) => void;
'notify::node-type': (pspec: GObject.ParamSpec) => void;
'notify::node-value': (pspec: GObject.ParamSpec) => void;
'notify::owner-document': (pspec: GObject.ParamSpec) => void;
'notify::parent-element': (pspec: GObject.ParamSpec) => void;
'notify::parent-node': (pspec: GObject.ParamSpec) => void;
'notify::previous-sibling': (pspec: GObject.ParamSpec) => void;
'notify::text-content': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMNode.ConstructorProps, DOMEventTarget.ConstructorProps {
child_element_count: number;
childElementCount: number;
children: DOMHTMLCollection;
first_element_child: DOMElement;
firstElementChild: DOMElement;
last_element_child: DOMElement;
lastElementChild: DOMElement;
}
}
class DOMDocumentFragment extends DOMNode implements DOMEventTarget {
static $gtype: GObject.GType;
// Properties
get child_element_count(): number;
get childElementCount(): number;
get children(): DOMHTMLCollection;
get first_element_child(): DOMElement;
get firstElementChild(): DOMElement;
get last_element_child(): DOMElement;
get lastElementChild(): DOMElement;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMDocumentFragment.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q]
? Q
: never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
get_child_element_count(): number;
get_children(): DOMHTMLCollection;
get_element_by_id(elementId: string): DOMElement;
get_first_element_child(): DOMElement;
get_last_element_child(): DOMElement;
query_selector(selectors: string): DOMElement;
query_selector_all(selectors: string): DOMNodeList;
// Inherited methods
add_event_listener(event_name: string, handler: GObject.Callback, use_capture: boolean): boolean;
// Conflicted with WebKit2WebExtension.DOMEventTarget.add_event_listener
add_event_listener(...args: never[]): any;
dispatch_event(event: DOMEvent): boolean;
remove_event_listener(event_name: string, handler: any | null, use_capture: boolean): boolean;
// Conflicted with WebKit2WebExtension.DOMEventTarget.remove_event_listener
remove_event_listener(...args: never[]): any;
vfunc_add_event_listener(event_name: string, handler: GObject.Closure, use_capture: boolean): boolean;
vfunc_dispatch_event(event: DOMEvent): boolean;
vfunc_remove_event_listener(event_name: string, handler: any | null, use_capture: boolean): boolean;
/**
* Creates a binding between `source_property` on `source` and `target_property`
* on `target`.
*
* Whenever the `source_property` is changed the `target_property` is
* updated using the same value. For instance:
*
*
* ```c
* g_object_bind_property (action, "active", widget, "sensitive", 0);
* ```
*
*
* Will result in the "sensitive" property of the widget #GObject instance to be
* updated with the same value of the "active" property of the action #GObject
* instance.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well.
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. To remove the binding without affecting the
* `source` and the `target` you can just call g_object_unref() on the returned
* #GBinding instance.
*
* Removing the binding by calling g_object_unref() on it must only be done if
* the binding, `source` and `target` are only used from a single thread and it
* is clear that both `source` and `target` outlive the binding. Especially it
* is not safe to rely on this if the binding, `source` or `target` can be
* finalized from different threads. Keep another reference to the binding and
* use g_binding_unbind() instead to be on the safe side.
*
* A #GObject can have multiple bindings.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
): GObject.Binding;
/**
* Complete version of g_object_bind_property().
*
* Creates a binding between `source_property` on `source` and `target_property`
* on `target,` allowing you to set the transformation functions to be used by
* the binding.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well. The `transform_from` function is only used in case
* of bidirectional bindings, otherwise it will be ignored
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. This will release the reference that is
* being held on the #GBinding instance; if you want to hold on to the
* #GBinding instance, you will need to hold a reference to it.
*
* To remove the binding, call g_binding_unbind().
*
* A #GObject can have multiple bindings.
*
* The same `user_data` parameter will be used for both `transform_to`
* and `transform_from` transformation functions; the `notify` function will
* be called once, when the binding is removed. If you need different data
* for each transformation function, please use
* g_object_bind_property_with_closures() instead.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
* @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
* @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property_full(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
transform_to?: GObject.BindingTransformFunc | null,
transform_from?: GObject.BindingTransformFunc | null,
notify?: GLib.DestroyNotify | null,
): GObject.Binding;
// Conflicted with GObject.Object.bind_property_full
bind_property_full(...args: never[]): any;
/**
* This function is intended for #GObject implementations to re-enforce
* a [floating][floating-ref] object reference. Doing this is seldom
* required: all #GInitiallyUnowneds are created with a floating reference
* which usually just needs to be sunken by calling g_object_ref_sink().
*/
force_floating(): void;
/**
* Increases the freeze count on `object`. If the freeze count is
* non-zero, the emission of "notify" signals on `object` is
* stopped. The signals are queued until the freeze count is decreased
* to zero. Duplicate notifications are squashed so that at most one
* #GObject::notify signal is emitted for each property modified while the
* object is frozen.
*
* This is necessary for accessors that modify multiple properties to prevent
* premature notification while the object is still being modified.
*/
freeze_notify(): void;
/**
* Gets a named field from the objects table of associations (see g_object_set_data()).
* @param key name of the key for that association
* @returns the data if found, or %NULL if no such data exists.
*/
get_data(key: string): any | null;
/**
* Gets a property of an object.
*
* The value can be:
* - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
* - a GObject.Value initialized with the expected type of the property
* - a GObject.Value initialized with a type to which the expected type of the property can be transformed
*
* In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
*
* Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
* @param property_name The name of the property to get
* @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
*/
get_property(property_name: string, value: GObject.Value | any): any;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
get_qdata(quark: GLib.Quark): any | null;
/**
* Gets `n_properties` properties for an `object`.
* Obtained properties will be set to `values`. All properties must be valid.
* Warnings will be emitted and undefined behaviour may result if invalid
* properties are passed in.
* @param names the names of each property to get
* @param values the values of each property to get
*/
getv(names: string[], values: (GObject.Value | any)[]): void;
/**
* Checks whether `object` has a [floating][floating-ref] reference.
* @returns %TRUE if @object has a floating reference
*/
is_floating(): boolean;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param property_name the name of a property installed on the class of @object.
*/
notify(property_name: string): void;
/**
* Emits a "notify" signal for the property specified by `pspec` on `object`.
*
* This function omits the property name lookup, hence it is faster than
* g_object_notify().
*
* One way to avoid using g_object_notify() from within the
* class that registered the properties, and using g_object_notify_by_pspec()
* instead, is to store the GParamSpec used with
* g_object_class_install_property() inside a static array, e.g.:
*
*
* ```c
* typedef enum
* {
* PROP_FOO = 1,
* PROP_LAST
* } MyObjectProperty;
*
* static GParamSpec *properties[PROP_LAST];
*
* static void
* my_object_class_init (MyObjectClass *klass)
* {
* properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
* 0, 100,
* 50,
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
* g_object_class_install_property (gobject_class,
* PROP_FOO,
* properties[PROP_FOO]);
* }
* ```
*
*
* and then notify a change on the "foo" property with:
*
*
* ```c
* g_object_notify_by_pspec (self, properties[PROP_FOO]);
* ```
*
* @param pspec the #GParamSpec of a property installed on the class of @object.
*/
notify_by_pspec(pspec: GObject.ParamSpec): void;
/**
* Increases the reference count of `object`.
*
* Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
* of `object` will be propagated to the return type (using the GCC typeof()
* extension), so any casting the caller needs to do on the return type must be
* explicit.
* @returns the same @object
*/
ref(): GObject.Object;
/**
* Increase the reference count of `object,` and possibly remove the
* [floating][floating-ref] reference, if `object` has a floating reference.
*
* In other words, if the object is floating, then this call "assumes
* ownership" of the floating reference, converting it to a normal
* reference by clearing the floating flag while leaving the reference
* count unchanged. If the object is not floating, then this call
* adds a new normal reference increasing the reference count by one.
*
* Since GLib 2.56, the type of `object` will be propagated to the return type
* under the same conditions as for g_object_ref().
* @returns @object
*/
ref_sink(): GObject.Object;
/**
* Releases all references to other objects. This can be used to break
* reference cycles.
*
* This function should only be called from object system implementations.
*/
run_dispose(): void;
/**
* Each object carries around a table of associations from
* strings to pointers. This function lets you set an association.
*
* If the object already had an association with that name,
* the old association will be destroyed.
*
* Internally, the `key` is converted to a #GQuark using g_quark_from_string().
* This means a copy of `key` is kept permanently (even after `object` has been
* finalized) — so it is recommended to only use a small, bounded set of values
* for `key` in your program, to avoid the #GQuark storage growing unbounded.
* @param key name of the key
* @param data data to associate with that key
*/
set_data(key: string, data?: any | null): void;
/**
* Sets a property on an object.
* @param property_name The name of the property to set
* @param value The value to set the property to
*/
set_property(property_name: string, value: GObject.Value | any): void;
/**
* Remove a specified datum from the object's data associations,
* without invoking the association's destroy handler.
* @param key name of the key
* @returns the data if found, or %NULL if no such data exists.
*/
steal_data(key: string): any | null;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata() and removes the `data` from object
* without invoking its destroy() function (if any was
* set).
* Usually, calling this function is only required to update
* user data pointers with a destroy notifier, for example:
*
* ```c
* void
* object_add_to_user_list (GObject *object,
* const gchar *new_string)
* {
* // the quark, naming the object data
* GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
* // retrieve the old string list
* GList *list = g_object_steal_qdata (object, quark_string_list);
*
* // prepend new string
* list = g_list_prepend (list, g_strdup (new_string));
* // this changed 'list', so we need to set it again
* g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
* }
* static void
* free_string_list (gpointer data)
* {
* GList *node, *list = data;
*
* for (node = list; node; node = node->next)
* g_free (node->data);
* g_list_free (list);
* }
* ```
*
* Using g_object_get_qdata() in the above example, instead of
* g_object_steal_qdata() would have left the destroy function set,
* and thus the partial string list would have been freed upon
* g_object_set_qdata_full().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
steal_qdata(quark: GLib.Quark): any | null;
/**
* Reverts the effect of a previous call to
* g_object_freeze_notify(). The freeze count is decreased on `object`
* and when it reaches zero, queued "notify" signals are emitted.
*
* Duplicate notifications for each property are squashed so that at most one
* #GObject::notify signal is emitted for each property, in the reverse order
* in which they have been queued.
*
* It is an error to call this function when the freeze count is zero.
*/
thaw_notify(): void;
/**
* Decreases the reference count of `object`. When its reference count
* drops to 0, the object is finalized (i.e. its memory is freed).
*
* If the pointer to the #GObject may be reused in future (for example, if it is
* an instance variable of another object), it is recommended to clear the
* pointer to %NULL rather than retain a dangling pointer to a potentially
* invalid #GObject instance. Use g_clear_object() for this.
*/
unref(): void;
/**
* This function essentially limits the life time of the `closure` to
* the life time of the object. That is, when the object is finalized,
* the `closure` is invalidated by calling g_closure_invalidate() on
* it, in order to prevent invocations of the closure with a finalized
* (nonexisting) object. Also, g_object_ref() and g_object_unref() are
* added as marshal guards to the `closure,` to ensure that an extra
* reference count is held on `object` during invocation of the
* `closure`. Usually, this function will be called on closures that
* use this `object` as closure data.
* @param closure #GClosure to watch
*/
watch_closure(closure: GObject.Closure): void;
/**
* the `constructed` function is called by g_object_new() as the
* final step of the object creation process. At the point of the call, all
* construction properties have been set on the object. The purpose of this
* call is to allow for object initialisation steps that can only be performed
* after construction properties have been set. `constructed` implementors
* should chain up to the `constructed` call of their parent class to allow it
* to complete its initialisation.
*/
vfunc_constructed(): void;
/**
* emits property change notification for a bunch
* of properties. Overriding `dispatch_properties_changed` should be rarely
* needed.
* @param n_pspecs
* @param pspecs
*/
vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
/**
* the `dispose` function is supposed to drop all references to other
* objects, but keep the instance otherwise intact, so that client method
* invocations still work. It may be run multiple times (due to reference
* loops). Before returning, `dispose` should chain up to the `dispose` method
* of the parent class.
*/
vfunc_dispose(): void;
/**
* instance finalization function, should finish the finalization of
* the instance begun in `dispose` and chain up to the `finalize` method of the
* parent class.
*/
vfunc_finalize(): void;
/**
* the generic getter for all properties of this type. Should be
* overridden for every type with properties.
* @param property_id
* @param value
* @param pspec
*/
vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param pspec
*/
vfunc_notify(pspec: GObject.ParamSpec): void;
/**
* the generic setter for all properties of this type. Should be
* overridden for every type with properties. If implementations of
* `set_property` don't emit property change notification explicitly, this will
* be done implicitly by the type system. However, if the notify signal is
* emitted explicitly, the type system will not emit it a second time.
* @param property_id
* @param value
* @param pspec
*/
vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
* @param id Handler ID of the handler to be disconnected
*/
disconnect(id: number): void;
/**
* Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
* @param properties Object containing the properties to set
*/
set(properties: { [key: string]: any }): void;
/**
* Blocks a handler of an instance so it will not be called during any signal emissions
* @param id Handler ID of the handler to be blocked
*/
block_signal_handler(id: number): void;
/**
* Unblocks a handler so it will be called again during any signal emissions
* @param id Handler ID of the handler to be unblocked
*/
unblock_signal_handler(id: number): void;
/**
* Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
* @param detailedName Name of the signal to stop emission of
*/
stop_emission_by_name(detailedName: string): void;
}
namespace DOMDocumentType {
// Signal signatures
interface SignalSignatures extends DOMNode.SignalSignatures {
'notify::entities': (pspec: GObject.ParamSpec) => void;
'notify::internal-subset': (pspec: GObject.ParamSpec) => void;
'notify::name': (pspec: GObject.ParamSpec) => void;
'notify::notations': (pspec: GObject.ParamSpec) => void;
'notify::public-id': (pspec: GObject.ParamSpec) => void;
'notify::system-id': (pspec: GObject.ParamSpec) => void;
'notify::base-uri': (pspec: GObject.ParamSpec) => void;
'notify::child-nodes': (pspec: GObject.ParamSpec) => void;
'notify::first-child': (pspec: GObject.ParamSpec) => void;
'notify::last-child': (pspec: GObject.ParamSpec) => void;
'notify::next-sibling': (pspec: GObject.ParamSpec) => void;
'notify::node-name': (pspec: GObject.ParamSpec) => void;
'notify::node-type': (pspec: GObject.ParamSpec) => void;
'notify::node-value': (pspec: GObject.ParamSpec) => void;
'notify::owner-document': (pspec: GObject.ParamSpec) => void;
'notify::parent-element': (pspec: GObject.ParamSpec) => void;
'notify::parent-node': (pspec: GObject.ParamSpec) => void;
'notify::previous-sibling': (pspec: GObject.ParamSpec) => void;
'notify::text-content': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMNode.ConstructorProps, DOMEventTarget.ConstructorProps {
entities: DOMNamedNodeMap;
internal_subset: string;
internalSubset: string;
name: string;
notations: DOMNamedNodeMap;
public_id: string;
publicId: string;
system_id: string;
systemId: string;
}
}
class DOMDocumentType extends DOMNode implements DOMEventTarget {
static $gtype: GObject.GType;
// Properties
get entities(): DOMNamedNodeMap;
get internal_subset(): string;
get internalSubset(): string;
get name(): string;
get notations(): DOMNamedNodeMap;
get public_id(): string;
get publicId(): string;
get system_id(): string;
get systemId(): string;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMDocumentType.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q]
? Q
: never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
get_entities(): DOMNamedNodeMap;
get_internal_subset(): string;
get_name(): string;
get_notations(): DOMNamedNodeMap;
get_public_id(): string;
get_system_id(): string;
// Inherited methods
add_event_listener(event_name: string, handler: GObject.Callback, use_capture: boolean): boolean;
// Conflicted with WebKit2WebExtension.DOMEventTarget.add_event_listener
add_event_listener(...args: never[]): any;
dispatch_event(event: DOMEvent): boolean;
remove_event_listener(event_name: string, handler: any | null, use_capture: boolean): boolean;
// Conflicted with WebKit2WebExtension.DOMEventTarget.remove_event_listener
remove_event_listener(...args: never[]): any;
vfunc_add_event_listener(event_name: string, handler: GObject.Closure, use_capture: boolean): boolean;
vfunc_dispatch_event(event: DOMEvent): boolean;
vfunc_remove_event_listener(event_name: string, handler: any | null, use_capture: boolean): boolean;
/**
* Creates a binding between `source_property` on `source` and `target_property`
* on `target`.
*
* Whenever the `source_property` is changed the `target_property` is
* updated using the same value. For instance:
*
*
* ```c
* g_object_bind_property (action, "active", widget, "sensitive", 0);
* ```
*
*
* Will result in the "sensitive" property of the widget #GObject instance to be
* updated with the same value of the "active" property of the action #GObject
* instance.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well.
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. To remove the binding without affecting the
* `source` and the `target` you can just call g_object_unref() on the returned
* #GBinding instance.
*
* Removing the binding by calling g_object_unref() on it must only be done if
* the binding, `source` and `target` are only used from a single thread and it
* is clear that both `source` and `target` outlive the binding. Especially it
* is not safe to rely on this if the binding, `source` or `target` can be
* finalized from different threads. Keep another reference to the binding and
* use g_binding_unbind() instead to be on the safe side.
*
* A #GObject can have multiple bindings.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
): GObject.Binding;
/**
* Complete version of g_object_bind_property().
*
* Creates a binding between `source_property` on `source` and `target_property`
* on `target,` allowing you to set the transformation functions to be used by
* the binding.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well. The `transform_from` function is only used in case
* of bidirectional bindings, otherwise it will be ignored
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. This will release the reference that is
* being held on the #GBinding instance; if you want to hold on to the
* #GBinding instance, you will need to hold a reference to it.
*
* To remove the binding, call g_binding_unbind().
*
* A #GObject can have multiple bindings.
*
* The same `user_data` parameter will be used for both `transform_to`
* and `transform_from` transformation functions; the `notify` function will
* be called once, when the binding is removed. If you need different data
* for each transformation function, please use
* g_object_bind_property_with_closures() instead.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
* @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
* @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property_full(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
transform_to?: GObject.BindingTransformFunc | null,
transform_from?: GObject.BindingTransformFunc | null,
notify?: GLib.DestroyNotify | null,
): GObject.Binding;
// Conflicted with GObject.Object.bind_property_full
bind_property_full(...args: never[]): any;
/**
* This function is intended for #GObject implementations to re-enforce
* a [floating][floating-ref] object reference. Doing this is seldom
* required: all #GInitiallyUnowneds are created with a floating reference
* which usually just needs to be sunken by calling g_object_ref_sink().
*/
force_floating(): void;
/**
* Increases the freeze count on `object`. If the freeze count is
* non-zero, the emission of "notify" signals on `object` is
* stopped. The signals are queued until the freeze count is decreased
* to zero. Duplicate notifications are squashed so that at most one
* #GObject::notify signal is emitted for each property modified while the
* object is frozen.
*
* This is necessary for accessors that modify multiple properties to prevent
* premature notification while the object is still being modified.
*/
freeze_notify(): void;
/**
* Gets a named field from the objects table of associations (see g_object_set_data()).
* @param key name of the key for that association
* @returns the data if found, or %NULL if no such data exists.
*/
get_data(key: string): any | null;
/**
* Gets a property of an object.
*
* The value can be:
* - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
* - a GObject.Value initialized with the expected type of the property
* - a GObject.Value initialized with a type to which the expected type of the property can be transformed
*
* In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
*
* Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
* @param property_name The name of the property to get
* @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
*/
get_property(property_name: string, value: GObject.Value | any): any;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
get_qdata(quark: GLib.Quark): any | null;
/**
* Gets `n_properties` properties for an `object`.
* Obtained properties will be set to `values`. All properties must be valid.
* Warnings will be emitted and undefined behaviour may result if invalid
* properties are passed in.
* @param names the names of each property to get
* @param values the values of each property to get
*/
getv(names: string[], values: (GObject.Value | any)[]): void;
/**
* Checks whether `object` has a [floating][floating-ref] reference.
* @returns %TRUE if @object has a floating reference
*/
is_floating(): boolean;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param property_name the name of a property installed on the class of @object.
*/
notify(property_name: string): void;
/**
* Emits a "notify" signal for the property specified by `pspec` on `object`.
*
* This function omits the property name lookup, hence it is faster than
* g_object_notify().
*
* One way to avoid using g_object_notify() from within the
* class that registered the properties, and using g_object_notify_by_pspec()
* instead, is to store the GParamSpec used with
* g_object_class_install_property() inside a static array, e.g.:
*
*
* ```c
* typedef enum
* {
* PROP_FOO = 1,
* PROP_LAST
* } MyObjectProperty;
*
* static GParamSpec *properties[PROP_LAST];
*
* static void
* my_object_class_init (MyObjectClass *klass)
* {
* properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
* 0, 100,
* 50,
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
* g_object_class_install_property (gobject_class,
* PROP_FOO,
* properties[PROP_FOO]);
* }
* ```
*
*
* and then notify a change on the "foo" property with:
*
*
* ```c
* g_object_notify_by_pspec (self, properties[PROP_FOO]);
* ```
*
* @param pspec the #GParamSpec of a property installed on the class of @object.
*/
notify_by_pspec(pspec: GObject.ParamSpec): void;
/**
* Increases the reference count of `object`.
*
* Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
* of `object` will be propagated to the return type (using the GCC typeof()
* extension), so any casting the caller needs to do on the return type must be
* explicit.
* @returns the same @object
*/
ref(): GObject.Object;
/**
* Increase the reference count of `object,` and possibly remove the
* [floating][floating-ref] reference, if `object` has a floating reference.
*
* In other words, if the object is floating, then this call "assumes
* ownership" of the floating reference, converting it to a normal
* reference by clearing the floating flag while leaving the reference
* count unchanged. If the object is not floating, then this call
* adds a new normal reference increasing the reference count by one.
*
* Since GLib 2.56, the type of `object` will be propagated to the return type
* under the same conditions as for g_object_ref().
* @returns @object
*/
ref_sink(): GObject.Object;
/**
* Releases all references to other objects. This can be used to break
* reference cycles.
*
* This function should only be called from object system implementations.
*/
run_dispose(): void;
/**
* Each object carries around a table of associations from
* strings to pointers. This function lets you set an association.
*
* If the object already had an association with that name,
* the old association will be destroyed.
*
* Internally, the `key` is converted to a #GQuark using g_quark_from_string().
* This means a copy of `key` is kept permanently (even after `object` has been
* finalized) — so it is recommended to only use a small, bounded set of values
* for `key` in your program, to avoid the #GQuark storage growing unbounded.
* @param key name of the key
* @param data data to associate with that key
*/
set_data(key: string, data?: any | null): void;
/**
* Sets a property on an object.
* @param property_name The name of the property to set
* @param value The value to set the property to
*/
set_property(property_name: string, value: GObject.Value | any): void;
/**
* Remove a specified datum from the object's data associations,
* without invoking the association's destroy handler.
* @param key name of the key
* @returns the data if found, or %NULL if no such data exists.
*/
steal_data(key: string): any | null;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata() and removes the `data` from object
* without invoking its destroy() function (if any was
* set).
* Usually, calling this function is only required to update
* user data pointers with a destroy notifier, for example:
*
* ```c
* void
* object_add_to_user_list (GObject *object,
* const gchar *new_string)
* {
* // the quark, naming the object data
* GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
* // retrieve the old string list
* GList *list = g_object_steal_qdata (object, quark_string_list);
*
* // prepend new string
* list = g_list_prepend (list, g_strdup (new_string));
* // this changed 'list', so we need to set it again
* g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
* }
* static void
* free_string_list (gpointer data)
* {
* GList *node, *list = data;
*
* for (node = list; node; node = node->next)
* g_free (node->data);
* g_list_free (list);
* }
* ```
*
* Using g_object_get_qdata() in the above example, instead of
* g_object_steal_qdata() would have left the destroy function set,
* and thus the partial string list would have been freed upon
* g_object_set_qdata_full().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
steal_qdata(quark: GLib.Quark): any | null;
/**
* Reverts the effect of a previous call to
* g_object_freeze_notify(). The freeze count is decreased on `object`
* and when it reaches zero, queued "notify" signals are emitted.
*
* Duplicate notifications for each property are squashed so that at most one
* #GObject::notify signal is emitted for each property, in the reverse order
* in which they have been queued.
*
* It is an error to call this function when the freeze count is zero.
*/
thaw_notify(): void;
/**
* Decreases the reference count of `object`. When its reference count
* drops to 0, the object is finalized (i.e. its memory is freed).
*
* If the pointer to the #GObject may be reused in future (for example, if it is
* an instance variable of another object), it is recommended to clear the
* pointer to %NULL rather than retain a dangling pointer to a potentially
* invalid #GObject instance. Use g_clear_object() for this.
*/
unref(): void;
/**
* This function essentially limits the life time of the `closure` to
* the life time of the object. That is, when the object is finalized,
* the `closure` is invalidated by calling g_closure_invalidate() on
* it, in order to prevent invocations of the closure with a finalized
* (nonexisting) object. Also, g_object_ref() and g_object_unref() are
* added as marshal guards to the `closure,` to ensure that an extra
* reference count is held on `object` during invocation of the
* `closure`. Usually, this function will be called on closures that
* use this `object` as closure data.
* @param closure #GClosure to watch
*/
watch_closure(closure: GObject.Closure): void;
/**
* the `constructed` function is called by g_object_new() as the
* final step of the object creation process. At the point of the call, all
* construction properties have been set on the object. The purpose of this
* call is to allow for object initialisation steps that can only be performed
* after construction properties have been set. `constructed` implementors
* should chain up to the `constructed` call of their parent class to allow it
* to complete its initialisation.
*/
vfunc_constructed(): void;
/**
* emits property change notification for a bunch
* of properties. Overriding `dispatch_properties_changed` should be rarely
* needed.
* @param n_pspecs
* @param pspecs
*/
vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
/**
* the `dispose` function is supposed to drop all references to other
* objects, but keep the instance otherwise intact, so that client method
* invocations still work. It may be run multiple times (due to reference
* loops). Before returning, `dispose` should chain up to the `dispose` method
* of the parent class.
*/
vfunc_dispose(): void;
/**
* instance finalization function, should finish the finalization of
* the instance begun in `dispose` and chain up to the `finalize` method of the
* parent class.
*/
vfunc_finalize(): void;
/**
* the generic getter for all properties of this type. Should be
* overridden for every type with properties.
* @param property_id
* @param value
* @param pspec
*/
vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param pspec
*/
vfunc_notify(pspec: GObject.ParamSpec): void;
/**
* the generic setter for all properties of this type. Should be
* overridden for every type with properties. If implementations of
* `set_property` don't emit property change notification explicitly, this will
* be done implicitly by the type system. However, if the notify signal is
* emitted explicitly, the type system will not emit it a second time.
* @param property_id
* @param value
* @param pspec
*/
vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
* @param id Handler ID of the handler to be disconnected
*/
disconnect(id: number): void;
/**
* Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
* @param properties Object containing the properties to set
*/
set(properties: { [key: string]: any }): void;
/**
* Blocks a handler of an instance so it will not be called during any signal emissions
* @param id Handler ID of the handler to be blocked
*/
block_signal_handler(id: number): void;
/**
* Unblocks a handler so it will be called again during any signal emissions
* @param id Handler ID of the handler to be unblocked
*/
unblock_signal_handler(id: number): void;
/**
* Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
* @param detailedName Name of the signal to stop emission of
*/
stop_emission_by_name(detailedName: string): void;
}
namespace DOMElement {
// Signal signatures
interface SignalSignatures extends DOMNode.SignalSignatures {
'notify::attributes': (pspec: GObject.ParamSpec) => void;
'notify::child-element-count': (pspec: GObject.ParamSpec) => void;
'notify::children': (pspec: GObject.ParamSpec) => void;
'notify::class-list': (pspec: GObject.ParamSpec) => void;
'notify::class-name': (pspec: GObject.ParamSpec) => void;
'notify::client-height': (pspec: GObject.ParamSpec) => void;
'notify::client-left': (pspec: GObject.ParamSpec) => void;
'notify::client-top': (pspec: GObject.ParamSpec) => void;
'notify::client-width': (pspec: GObject.ParamSpec) => void;
'notify::first-element-child': (pspec: GObject.ParamSpec) => void;
'notify::id': (pspec: GObject.ParamSpec) => void;
'notify::inner-html': (pspec: GObject.ParamSpec) => void;
'notify::last-element-child': (pspec: GObject.ParamSpec) => void;
'notify::local-name': (pspec: GObject.ParamSpec) => void;
'notify::namespace-uri': (pspec: GObject.ParamSpec) => void;
'notify::next-element-sibling': (pspec: GObject.ParamSpec) => void;
'notify::offset-height': (pspec: GObject.ParamSpec) => void;
'notify::offset-left': (pspec: GObject.ParamSpec) => void;
'notify::offset-parent': (pspec: GObject.ParamSpec) => void;
'notify::offset-top': (pspec: GObject.ParamSpec) => void;
'notify::offset-width': (pspec: GObject.ParamSpec) => void;
'notify::outer-html': (pspec: GObject.ParamSpec) => void;
'notify::prefix': (pspec: GObject.ParamSpec) => void;
'notify::previous-element-sibling': (pspec: GObject.ParamSpec) => void;
'notify::scroll-height': (pspec: GObject.ParamSpec) => void;
'notify::scroll-left': (pspec: GObject.ParamSpec) => void;
'notify::scroll-top': (pspec: GObject.ParamSpec) => void;
'notify::scroll-width': (pspec: GObject.ParamSpec) => void;
'notify::style': (pspec: GObject.ParamSpec) => void;
'notify::tag-name': (pspec: GObject.ParamSpec) => void;
'notify::webkit-region-overset': (pspec: GObject.ParamSpec) => void;
'notify::base-uri': (pspec: GObject.ParamSpec) => void;
'notify::child-nodes': (pspec: GObject.ParamSpec) => void;
'notify::first-child': (pspec: GObject.ParamSpec) => void;
'notify::last-child': (pspec: GObject.ParamSpec) => void;
'notify::next-sibling': (pspec: GObject.ParamSpec) => void;
'notify::node-name': (pspec: GObject.ParamSpec) => void;
'notify::node-type': (pspec: GObject.ParamSpec) => void;
'notify::node-value': (pspec: GObject.ParamSpec) => void;
'notify::owner-document': (pspec: GObject.ParamSpec) => void;
'notify::parent-element': (pspec: GObject.ParamSpec) => void;
'notify::parent-node': (pspec: GObject.ParamSpec) => void;
'notify::previous-sibling': (pspec: GObject.ParamSpec) => void;
'notify::text-content': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMNode.ConstructorProps, DOMEventTarget.ConstructorProps {
attributes: DOMNamedNodeMap;
child_element_count: number;
childElementCount: number;
children: DOMHTMLCollection;
class_list: DOMDOMTokenList;
classList: DOMDOMTokenList;
class_name: string;
className: string;
client_height: number;
clientHeight: number;
client_left: number;
clientLeft: number;
client_top: number;
clientTop: number;
client_width: number;
clientWidth: number;
first_element_child: DOMElement;
firstElementChild: DOMElement;
id: string;
inner_html: string;
innerHtml: string;
last_element_child: DOMElement;
lastElementChild: DOMElement;
local_name: string;
localName: string;
namespace_uri: string;
namespaceUri: string;
next_element_sibling: DOMElement;
nextElementSibling: DOMElement;
offset_height: number;
offsetHeight: number;
offset_left: number;
offsetLeft: number;
offset_parent: DOMElement;
offsetParent: DOMElement;
offset_top: number;
offsetTop: number;
offset_width: number;
offsetWidth: number;
outer_html: string;
outerHtml: string;
prefix: string;
previous_element_sibling: DOMElement;
previousElementSibling: DOMElement;
scroll_height: number;
scrollHeight: number;
scroll_left: number;
scrollLeft: number;
scroll_top: number;
scrollTop: number;
scroll_width: number;
scrollWidth: number;
style: DOMCSSStyleDeclaration;
tag_name: string;
tagName: string;
webkit_region_overset: string;
webkitRegionOverset: string;
}
}
class DOMElement extends DOMNode implements DOMEventTarget {
static $gtype: GObject.GType;
// Properties
get attributes(): DOMNamedNodeMap;
get child_element_count(): number;
get childElementCount(): number;
get children(): DOMHTMLCollection;
get class_list(): DOMDOMTokenList;
get classList(): DOMDOMTokenList;
get class_name(): string;
set class_name(val: string);
get className(): string;
set className(val: string);
get client_height(): number;
get clientHeight(): number;
get client_left(): number;
get clientLeft(): number;
get client_top(): number;
get clientTop(): number;
get client_width(): number;
get clientWidth(): number;
get first_element_child(): DOMElement;
get firstElementChild(): DOMElement;
get id(): string;
set id(val: string);
get inner_html(): string;
set inner_html(val: string);
get innerHtml(): string;
set innerHtml(val: string);
get last_element_child(): DOMElement;
get lastElementChild(): DOMElement;
get local_name(): string;
get localName(): string;
get namespace_uri(): string;
get namespaceUri(): string;
get next_element_sibling(): DOMElement;
get nextElementSibling(): DOMElement;
get offset_height(): number;
get offsetHeight(): number;
get offset_left(): number;
get offsetLeft(): number;
get offset_parent(): DOMElement;
get offsetParent(): DOMElement;
get offset_top(): number;
get offsetTop(): number;
get offset_width(): number;
get offsetWidth(): number;
get outer_html(): string;
set outer_html(val: string);
get outerHtml(): string;
set outerHtml(val: string);
get prefix(): string;
get previous_element_sibling(): DOMElement;
get previousElementSibling(): DOMElement;
get scroll_height(): number;
get scrollHeight(): number;
get scroll_left(): number;
set scroll_left(val: number);
get scrollLeft(): number;
set scrollLeft(val: number);
get scroll_top(): number;
set scroll_top(val: number);
get scrollTop(): number;
set scrollTop(val: number);
get scroll_width(): number;
get scrollWidth(): number;
get style(): DOMCSSStyleDeclaration;
get tag_name(): string;
get tagName(): string;
get webkit_region_overset(): string;
get webkitRegionOverset(): string;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMElement.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q] ? Q : never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
blur(): void;
closest(selectors: string): DOMElement;
focus(): void;
get_attribute(name: string): string;
get_attribute_node(name: string): DOMAttr;
get_attribute_node_ns(namespaceURI: string, localName: string): DOMAttr;
get_attribute_ns(namespaceURI: string, localName: string): string;
get_attributes(): DOMNamedNodeMap;
/**
* Returns a #WebKitDOMClientRect representing the size and position of `self`
* relative to the viewport.
* @returns A #WebKitDOMClientRect
*/
get_bounding_client_rect(): DOMClientRect;
get_child_element_count(): number;
get_children(): DOMHTMLCollection;
get_class_list(): DOMDOMTokenList;
get_class_name(): string;
get_client_height(): number;
get_client_left(): number;
/**
* Returns a collection of #WebKitDOMClientRect objects, each of which describe
* the size and position of a CSS border box relative to the viewport.
* @returns A #WebKitDOMClientRectList
*/
get_client_rects(): DOMClientRectList;
get_client_top(): number;
get_client_width(): number;
get_elements_by_class_name(class_name: string): DOMNodeList;
get_elements_by_class_name_as_html_collection(name: string): DOMHTMLCollection;
get_elements_by_tag_name(tag_name: string): DOMNodeList;
get_elements_by_tag_name_as_html_collection(name: string): DOMHTMLCollection;
get_elements_by_tag_name_ns(namespace_uri: string, tag_name: string): DOMNodeList;
get_elements_by_tag_name_ns_as_html_collection(namespaceURI: string, localName: string): DOMHTMLCollection;
get_first_element_child(): DOMElement;
get_id(): string;
get_inner_html(): string;
get_last_element_child(): DOMElement;
get_local_name(): string;
get_namespace_uri(): string;
get_next_element_sibling(): DOMElement;
get_offset_height(): number;
get_offset_left(): number;
get_offset_parent(): DOMElement;
get_offset_top(): number;
get_offset_width(): number;
get_outer_html(): string;
get_prefix(): string;
get_previous_element_sibling(): DOMElement;
get_scroll_height(): number;
get_scroll_left(): number;
get_scroll_top(): number;
get_scroll_width(): number;
get_style(): DOMCSSStyleDeclaration;
get_tag_name(): string;
/**
* CSS Regions support has been removed. This function does nothing.
* @returns %NULL
*/
get_webkit_region_overset(): string;
has_attribute(name: string): boolean;
has_attribute_ns(namespaceURI: string, localName: string): boolean;
has_attributes(): boolean;
/**
* Get whether the element is an HTML input element that has been filled automatically.
* @returns whether @element has been filled automatically.
*/
html_input_element_get_auto_filled(): boolean;
/**
* Get whether `element` is an HTML text input element that has been edited by a user action.
* @returns whether @element has been edited by a user action.
*/
html_input_element_is_user_edited(): boolean;
/**
* Set whether the element is an HTML input element that has been filled automatically.
* If `element` is not an HTML input element this function does nothing.
* @param auto_filled value to set
*/
html_input_element_set_auto_filled(auto_filled: boolean): void;
/**
* Set the value of an HTML input element as if it had been edited by
* the user, triggering a change event. If `element` is not an HTML input
* element this function does nothing.
* @param value the text to set
*/
html_input_element_set_editing_value(value: string): void;
insert_adjacent_element(where: string, element: DOMElement): DOMElement;
insert_adjacent_html(where: string, html: string): void;
insert_adjacent_text(where: string, text: string): void;
matches(selectors: string): boolean;
query_selector(selectors: string): DOMElement;
query_selector_all(selectors: string): DOMNodeList;
remove(): void;
remove_attribute(name: string): void;
remove_attribute_node(oldAttr: DOMAttr): DOMAttr;
remove_attribute_ns(namespaceURI: string, localName: string): void;
request_pointer_lock(): void;
scroll_by_lines(lines: number): void;
scroll_by_pages(pages: number): void;
scroll_into_view(alignWithTop: boolean): void;
scroll_into_view_if_needed(centerIfNeeded: boolean): void;
set_attribute(name: string, value: string): void;
set_attribute_node(newAttr: DOMAttr): DOMAttr;
set_attribute_node_ns(newAttr: DOMAttr): DOMAttr;
set_attribute_ns(namespaceURI: string | null, qualifiedName: string, value: string): void;
set_class_name(value: string): void;
set_id(value: string): void;
set_inner_html(value: string): void;
set_outer_html(value: string): void;
set_scroll_left(value: number): void;
set_scroll_top(value: number): void;
webkit_matches_selector(selectors: string): boolean;
webkit_request_fullscreen(): void;
// Inherited methods
add_event_listener(event_name: string, handler: GObject.Callback, use_capture: boolean): boolean;
// Conflicted with WebKit2WebExtension.DOMEventTarget.add_event_listener
add_event_listener(...args: never[]): any;
dispatch_event(event: DOMEvent): boolean;
remove_event_listener(event_name: string, handler: any | null, use_capture: boolean): boolean;
// Conflicted with WebKit2WebExtension.DOMEventTarget.remove_event_listener
remove_event_listener(...args: never[]): any;
vfunc_add_event_listener(event_name: string, handler: GObject.Closure, use_capture: boolean): boolean;
vfunc_dispatch_event(event: DOMEvent): boolean;
vfunc_remove_event_listener(event_name: string, handler: any | null, use_capture: boolean): boolean;
/**
* Creates a binding between `source_property` on `source` and `target_property`
* on `target`.
*
* Whenever the `source_property` is changed the `target_property` is
* updated using the same value. For instance:
*
*
* ```c
* g_object_bind_property (action, "active", widget, "sensitive", 0);
* ```
*
*
* Will result in the "sensitive" property of the widget #GObject instance to be
* updated with the same value of the "active" property of the action #GObject
* instance.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well.
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. To remove the binding without affecting the
* `source` and the `target` you can just call g_object_unref() on the returned
* #GBinding instance.
*
* Removing the binding by calling g_object_unref() on it must only be done if
* the binding, `source` and `target` are only used from a single thread and it
* is clear that both `source` and `target` outlive the binding. Especially it
* is not safe to rely on this if the binding, `source` or `target` can be
* finalized from different threads. Keep another reference to the binding and
* use g_binding_unbind() instead to be on the safe side.
*
* A #GObject can have multiple bindings.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
): GObject.Binding;
/**
* Complete version of g_object_bind_property().
*
* Creates a binding between `source_property` on `source` and `target_property`
* on `target,` allowing you to set the transformation functions to be used by
* the binding.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well. The `transform_from` function is only used in case
* of bidirectional bindings, otherwise it will be ignored
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. This will release the reference that is
* being held on the #GBinding instance; if you want to hold on to the
* #GBinding instance, you will need to hold a reference to it.
*
* To remove the binding, call g_binding_unbind().
*
* A #GObject can have multiple bindings.
*
* The same `user_data` parameter will be used for both `transform_to`
* and `transform_from` transformation functions; the `notify` function will
* be called once, when the binding is removed. If you need different data
* for each transformation function, please use
* g_object_bind_property_with_closures() instead.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
* @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
* @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property_full(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
transform_to?: GObject.BindingTransformFunc | null,
transform_from?: GObject.BindingTransformFunc | null,
notify?: GLib.DestroyNotify | null,
): GObject.Binding;
// Conflicted with GObject.Object.bind_property_full
bind_property_full(...args: never[]): any;
/**
* This function is intended for #GObject implementations to re-enforce
* a [floating][floating-ref] object reference. Doing this is seldom
* required: all #GInitiallyUnowneds are created with a floating reference
* which usually just needs to be sunken by calling g_object_ref_sink().
*/
force_floating(): void;
/**
* Increases the freeze count on `object`. If the freeze count is
* non-zero, the emission of "notify" signals on `object` is
* stopped. The signals are queued until the freeze count is decreased
* to zero. Duplicate notifications are squashed so that at most one
* #GObject::notify signal is emitted for each property modified while the
* object is frozen.
*
* This is necessary for accessors that modify multiple properties to prevent
* premature notification while the object is still being modified.
*/
freeze_notify(): void;
/**
* Gets a named field from the objects table of associations (see g_object_set_data()).
* @param key name of the key for that association
* @returns the data if found, or %NULL if no such data exists.
*/
get_data(key: string): any | null;
/**
* Gets a property of an object.
*
* The value can be:
* - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
* - a GObject.Value initialized with the expected type of the property
* - a GObject.Value initialized with a type to which the expected type of the property can be transformed
*
* In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
*
* Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
* @param property_name The name of the property to get
* @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
*/
get_property(property_name: string, value: GObject.Value | any): any;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
get_qdata(quark: GLib.Quark): any | null;
/**
* Gets `n_properties` properties for an `object`.
* Obtained properties will be set to `values`. All properties must be valid.
* Warnings will be emitted and undefined behaviour may result if invalid
* properties are passed in.
* @param names the names of each property to get
* @param values the values of each property to get
*/
getv(names: string[], values: (GObject.Value | any)[]): void;
/**
* Checks whether `object` has a [floating][floating-ref] reference.
* @returns %TRUE if @object has a floating reference
*/
is_floating(): boolean;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param property_name the name of a property installed on the class of @object.
*/
notify(property_name: string): void;
/**
* Emits a "notify" signal for the property specified by `pspec` on `object`.
*
* This function omits the property name lookup, hence it is faster than
* g_object_notify().
*
* One way to avoid using g_object_notify() from within the
* class that registered the properties, and using g_object_notify_by_pspec()
* instead, is to store the GParamSpec used with
* g_object_class_install_property() inside a static array, e.g.:
*
*
* ```c
* typedef enum
* {
* PROP_FOO = 1,
* PROP_LAST
* } MyObjectProperty;
*
* static GParamSpec *properties[PROP_LAST];
*
* static void
* my_object_class_init (MyObjectClass *klass)
* {
* properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
* 0, 100,
* 50,
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
* g_object_class_install_property (gobject_class,
* PROP_FOO,
* properties[PROP_FOO]);
* }
* ```
*
*
* and then notify a change on the "foo" property with:
*
*
* ```c
* g_object_notify_by_pspec (self, properties[PROP_FOO]);
* ```
*
* @param pspec the #GParamSpec of a property installed on the class of @object.
*/
notify_by_pspec(pspec: GObject.ParamSpec): void;
/**
* Increases the reference count of `object`.
*
* Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
* of `object` will be propagated to the return type (using the GCC typeof()
* extension), so any casting the caller needs to do on the return type must be
* explicit.
* @returns the same @object
*/
ref(): GObject.Object;
/**
* Increase the reference count of `object,` and possibly remove the
* [floating][floating-ref] reference, if `object` has a floating reference.
*
* In other words, if the object is floating, then this call "assumes
* ownership" of the floating reference, converting it to a normal
* reference by clearing the floating flag while leaving the reference
* count unchanged. If the object is not floating, then this call
* adds a new normal reference increasing the reference count by one.
*
* Since GLib 2.56, the type of `object` will be propagated to the return type
* under the same conditions as for g_object_ref().
* @returns @object
*/
ref_sink(): GObject.Object;
/**
* Releases all references to other objects. This can be used to break
* reference cycles.
*
* This function should only be called from object system implementations.
*/
run_dispose(): void;
/**
* Each object carries around a table of associations from
* strings to pointers. This function lets you set an association.
*
* If the object already had an association with that name,
* the old association will be destroyed.
*
* Internally, the `key` is converted to a #GQuark using g_quark_from_string().
* This means a copy of `key` is kept permanently (even after `object` has been
* finalized) — so it is recommended to only use a small, bounded set of values
* for `key` in your program, to avoid the #GQuark storage growing unbounded.
* @param key name of the key
* @param data data to associate with that key
*/
set_data(key: string, data?: any | null): void;
/**
* Sets a property on an object.
* @param property_name The name of the property to set
* @param value The value to set the property to
*/
set_property(property_name: string, value: GObject.Value | any): void;
/**
* Remove a specified datum from the object's data associations,
* without invoking the association's destroy handler.
* @param key name of the key
* @returns the data if found, or %NULL if no such data exists.
*/
steal_data(key: string): any | null;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata() and removes the `data` from object
* without invoking its destroy() function (if any was
* set).
* Usually, calling this function is only required to update
* user data pointers with a destroy notifier, for example:
*
* ```c
* void
* object_add_to_user_list (GObject *object,
* const gchar *new_string)
* {
* // the quark, naming the object data
* GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
* // retrieve the old string list
* GList *list = g_object_steal_qdata (object, quark_string_list);
*
* // prepend new string
* list = g_list_prepend (list, g_strdup (new_string));
* // this changed 'list', so we need to set it again
* g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
* }
* static void
* free_string_list (gpointer data)
* {
* GList *node, *list = data;
*
* for (node = list; node; node = node->next)
* g_free (node->data);
* g_list_free (list);
* }
* ```
*
* Using g_object_get_qdata() in the above example, instead of
* g_object_steal_qdata() would have left the destroy function set,
* and thus the partial string list would have been freed upon
* g_object_set_qdata_full().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
steal_qdata(quark: GLib.Quark): any | null;
/**
* Reverts the effect of a previous call to
* g_object_freeze_notify(). The freeze count is decreased on `object`
* and when it reaches zero, queued "notify" signals are emitted.
*
* Duplicate notifications for each property are squashed so that at most one
* #GObject::notify signal is emitted for each property, in the reverse order
* in which they have been queued.
*
* It is an error to call this function when the freeze count is zero.
*/
thaw_notify(): void;
/**
* Decreases the reference count of `object`. When its reference count
* drops to 0, the object is finalized (i.e. its memory is freed).
*
* If the pointer to the #GObject may be reused in future (for example, if it is
* an instance variable of another object), it is recommended to clear the
* pointer to %NULL rather than retain a dangling pointer to a potentially
* invalid #GObject instance. Use g_clear_object() for this.
*/
unref(): void;
/**
* This function essentially limits the life time of the `closure` to
* the life time of the object. That is, when the object is finalized,
* the `closure` is invalidated by calling g_closure_invalidate() on
* it, in order to prevent invocations of the closure with a finalized
* (nonexisting) object. Also, g_object_ref() and g_object_unref() are
* added as marshal guards to the `closure,` to ensure that an extra
* reference count is held on `object` during invocation of the
* `closure`. Usually, this function will be called on closures that
* use this `object` as closure data.
* @param closure #GClosure to watch
*/
watch_closure(closure: GObject.Closure): void;
/**
* the `constructed` function is called by g_object_new() as the
* final step of the object creation process. At the point of the call, all
* construction properties have been set on the object. The purpose of this
* call is to allow for object initialisation steps that can only be performed
* after construction properties have been set. `constructed` implementors
* should chain up to the `constructed` call of their parent class to allow it
* to complete its initialisation.
*/
vfunc_constructed(): void;
/**
* emits property change notification for a bunch
* of properties. Overriding `dispatch_properties_changed` should be rarely
* needed.
* @param n_pspecs
* @param pspecs
*/
vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
/**
* the `dispose` function is supposed to drop all references to other
* objects, but keep the instance otherwise intact, so that client method
* invocations still work. It may be run multiple times (due to reference
* loops). Before returning, `dispose` should chain up to the `dispose` method
* of the parent class.
*/
vfunc_dispose(): void;
/**
* instance finalization function, should finish the finalization of
* the instance begun in `dispose` and chain up to the `finalize` method of the
* parent class.
*/
vfunc_finalize(): void;
/**
* the generic getter for all properties of this type. Should be
* overridden for every type with properties.
* @param property_id
* @param value
* @param pspec
*/
vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param pspec
*/
vfunc_notify(pspec: GObject.ParamSpec): void;
/**
* the generic setter for all properties of this type. Should be
* overridden for every type with properties. If implementations of
* `set_property` don't emit property change notification explicitly, this will
* be done implicitly by the type system. However, if the notify signal is
* emitted explicitly, the type system will not emit it a second time.
* @param property_id
* @param value
* @param pspec
*/
vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
* @param id Handler ID of the handler to be disconnected
*/
disconnect(id: number): void;
/**
* Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
* @param properties Object containing the properties to set
*/
set(properties: { [key: string]: any }): void;
/**
* Blocks a handler of an instance so it will not be called during any signal emissions
* @param id Handler ID of the handler to be blocked
*/
block_signal_handler(id: number): void;
/**
* Unblocks a handler so it will be called again during any signal emissions
* @param id Handler ID of the handler to be unblocked
*/
unblock_signal_handler(id: number): void;
/**
* Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
* @param detailedName Name of the signal to stop emission of
*/
stop_emission_by_name(detailedName: string): void;
}
namespace DOMEntityReference {
// Signal signatures
interface SignalSignatures extends DOMNode.SignalSignatures {
'notify::base-uri': (pspec: GObject.ParamSpec) => void;
'notify::child-nodes': (pspec: GObject.ParamSpec) => void;
'notify::first-child': (pspec: GObject.ParamSpec) => void;
'notify::last-child': (pspec: GObject.ParamSpec) => void;
'notify::next-sibling': (pspec: GObject.ParamSpec) => void;
'notify::node-name': (pspec: GObject.ParamSpec) => void;
'notify::node-type': (pspec: GObject.ParamSpec) => void;
'notify::node-value': (pspec: GObject.ParamSpec) => void;
'notify::owner-document': (pspec: GObject.ParamSpec) => void;
'notify::parent-element': (pspec: GObject.ParamSpec) => void;
'notify::parent-node': (pspec: GObject.ParamSpec) => void;
'notify::previous-sibling': (pspec: GObject.ParamSpec) => void;
'notify::text-content': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMNode.ConstructorProps, DOMEventTarget.ConstructorProps {}
}
class DOMEntityReference extends DOMNode implements DOMEventTarget {
static $gtype: GObject.GType;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMEntityReference.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q]
? Q
: never
): void;
emit(signal: string, ...args: any[]): void;
// Inherited methods
add_event_listener(event_name: string, handler: GObject.Callback, use_capture: boolean): boolean;
// Conflicted with WebKit2WebExtension.DOMEventTarget.add_event_listener
add_event_listener(...args: never[]): any;
dispatch_event(event: DOMEvent): boolean;
remove_event_listener(event_name: string, handler: any | null, use_capture: boolean): boolean;
// Conflicted with WebKit2WebExtension.DOMEventTarget.remove_event_listener
remove_event_listener(...args: never[]): any;
vfunc_add_event_listener(event_name: string, handler: GObject.Closure, use_capture: boolean): boolean;
vfunc_dispatch_event(event: DOMEvent): boolean;
vfunc_remove_event_listener(event_name: string, handler: any | null, use_capture: boolean): boolean;
/**
* Creates a binding between `source_property` on `source` and `target_property`
* on `target`.
*
* Whenever the `source_property` is changed the `target_property` is
* updated using the same value. For instance:
*
*
* ```c
* g_object_bind_property (action, "active", widget, "sensitive", 0);
* ```
*
*
* Will result in the "sensitive" property of the widget #GObject instance to be
* updated with the same value of the "active" property of the action #GObject
* instance.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well.
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. To remove the binding without affecting the
* `source` and the `target` you can just call g_object_unref() on the returned
* #GBinding instance.
*
* Removing the binding by calling g_object_unref() on it must only be done if
* the binding, `source` and `target` are only used from a single thread and it
* is clear that both `source` and `target` outlive the binding. Especially it
* is not safe to rely on this if the binding, `source` or `target` can be
* finalized from different threads. Keep another reference to the binding and
* use g_binding_unbind() instead to be on the safe side.
*
* A #GObject can have multiple bindings.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
): GObject.Binding;
/**
* Complete version of g_object_bind_property().
*
* Creates a binding between `source_property` on `source` and `target_property`
* on `target,` allowing you to set the transformation functions to be used by
* the binding.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well. The `transform_from` function is only used in case
* of bidirectional bindings, otherwise it will be ignored
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. This will release the reference that is
* being held on the #GBinding instance; if you want to hold on to the
* #GBinding instance, you will need to hold a reference to it.
*
* To remove the binding, call g_binding_unbind().
*
* A #GObject can have multiple bindings.
*
* The same `user_data` parameter will be used for both `transform_to`
* and `transform_from` transformation functions; the `notify` function will
* be called once, when the binding is removed. If you need different data
* for each transformation function, please use
* g_object_bind_property_with_closures() instead.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
* @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
* @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property_full(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
transform_to?: GObject.BindingTransformFunc | null,
transform_from?: GObject.BindingTransformFunc | null,
notify?: GLib.DestroyNotify | null,
): GObject.Binding;
// Conflicted with GObject.Object.bind_property_full
bind_property_full(...args: never[]): any;
/**
* This function is intended for #GObject implementations to re-enforce
* a [floating][floating-ref] object reference. Doing this is seldom
* required: all #GInitiallyUnowneds are created with a floating reference
* which usually just needs to be sunken by calling g_object_ref_sink().
*/
force_floating(): void;
/**
* Increases the freeze count on `object`. If the freeze count is
* non-zero, the emission of "notify" signals on `object` is
* stopped. The signals are queued until the freeze count is decreased
* to zero. Duplicate notifications are squashed so that at most one
* #GObject::notify signal is emitted for each property modified while the
* object is frozen.
*
* This is necessary for accessors that modify multiple properties to prevent
* premature notification while the object is still being modified.
*/
freeze_notify(): void;
/**
* Gets a named field from the objects table of associations (see g_object_set_data()).
* @param key name of the key for that association
* @returns the data if found, or %NULL if no such data exists.
*/
get_data(key: string): any | null;
/**
* Gets a property of an object.
*
* The value can be:
* - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
* - a GObject.Value initialized with the expected type of the property
* - a GObject.Value initialized with a type to which the expected type of the property can be transformed
*
* In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
*
* Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
* @param property_name The name of the property to get
* @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
*/
get_property(property_name: string, value: GObject.Value | any): any;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
get_qdata(quark: GLib.Quark): any | null;
/**
* Gets `n_properties` properties for an `object`.
* Obtained properties will be set to `values`. All properties must be valid.
* Warnings will be emitted and undefined behaviour may result if invalid
* properties are passed in.
* @param names the names of each property to get
* @param values the values of each property to get
*/
getv(names: string[], values: (GObject.Value | any)[]): void;
/**
* Checks whether `object` has a [floating][floating-ref] reference.
* @returns %TRUE if @object has a floating reference
*/
is_floating(): boolean;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param property_name the name of a property installed on the class of @object.
*/
notify(property_name: string): void;
/**
* Emits a "notify" signal for the property specified by `pspec` on `object`.
*
* This function omits the property name lookup, hence it is faster than
* g_object_notify().
*
* One way to avoid using g_object_notify() from within the
* class that registered the properties, and using g_object_notify_by_pspec()
* instead, is to store the GParamSpec used with
* g_object_class_install_property() inside a static array, e.g.:
*
*
* ```c
* typedef enum
* {
* PROP_FOO = 1,
* PROP_LAST
* } MyObjectProperty;
*
* static GParamSpec *properties[PROP_LAST];
*
* static void
* my_object_class_init (MyObjectClass *klass)
* {
* properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
* 0, 100,
* 50,
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
* g_object_class_install_property (gobject_class,
* PROP_FOO,
* properties[PROP_FOO]);
* }
* ```
*
*
* and then notify a change on the "foo" property with:
*
*
* ```c
* g_object_notify_by_pspec (self, properties[PROP_FOO]);
* ```
*
* @param pspec the #GParamSpec of a property installed on the class of @object.
*/
notify_by_pspec(pspec: GObject.ParamSpec): void;
/**
* Increases the reference count of `object`.
*
* Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
* of `object` will be propagated to the return type (using the GCC typeof()
* extension), so any casting the caller needs to do on the return type must be
* explicit.
* @returns the same @object
*/
ref(): GObject.Object;
/**
* Increase the reference count of `object,` and possibly remove the
* [floating][floating-ref] reference, if `object` has a floating reference.
*
* In other words, if the object is floating, then this call "assumes
* ownership" of the floating reference, converting it to a normal
* reference by clearing the floating flag while leaving the reference
* count unchanged. If the object is not floating, then this call
* adds a new normal reference increasing the reference count by one.
*
* Since GLib 2.56, the type of `object` will be propagated to the return type
* under the same conditions as for g_object_ref().
* @returns @object
*/
ref_sink(): GObject.Object;
/**
* Releases all references to other objects. This can be used to break
* reference cycles.
*
* This function should only be called from object system implementations.
*/
run_dispose(): void;
/**
* Each object carries around a table of associations from
* strings to pointers. This function lets you set an association.
*
* If the object already had an association with that name,
* the old association will be destroyed.
*
* Internally, the `key` is converted to a #GQuark using g_quark_from_string().
* This means a copy of `key` is kept permanently (even after `object` has been
* finalized) — so it is recommended to only use a small, bounded set of values
* for `key` in your program, to avoid the #GQuark storage growing unbounded.
* @param key name of the key
* @param data data to associate with that key
*/
set_data(key: string, data?: any | null): void;
/**
* Sets a property on an object.
* @param property_name The name of the property to set
* @param value The value to set the property to
*/
set_property(property_name: string, value: GObject.Value | any): void;
/**
* Remove a specified datum from the object's data associations,
* without invoking the association's destroy handler.
* @param key name of the key
* @returns the data if found, or %NULL if no such data exists.
*/
steal_data(key: string): any | null;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata() and removes the `data` from object
* without invoking its destroy() function (if any was
* set).
* Usually, calling this function is only required to update
* user data pointers with a destroy notifier, for example:
*
* ```c
* void
* object_add_to_user_list (GObject *object,
* const gchar *new_string)
* {
* // the quark, naming the object data
* GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
* // retrieve the old string list
* GList *list = g_object_steal_qdata (object, quark_string_list);
*
* // prepend new string
* list = g_list_prepend (list, g_strdup (new_string));
* // this changed 'list', so we need to set it again
* g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
* }
* static void
* free_string_list (gpointer data)
* {
* GList *node, *list = data;
*
* for (node = list; node; node = node->next)
* g_free (node->data);
* g_list_free (list);
* }
* ```
*
* Using g_object_get_qdata() in the above example, instead of
* g_object_steal_qdata() would have left the destroy function set,
* and thus the partial string list would have been freed upon
* g_object_set_qdata_full().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
steal_qdata(quark: GLib.Quark): any | null;
/**
* Reverts the effect of a previous call to
* g_object_freeze_notify(). The freeze count is decreased on `object`
* and when it reaches zero, queued "notify" signals are emitted.
*
* Duplicate notifications for each property are squashed so that at most one
* #GObject::notify signal is emitted for each property, in the reverse order
* in which they have been queued.
*
* It is an error to call this function when the freeze count is zero.
*/
thaw_notify(): void;
/**
* Decreases the reference count of `object`. When its reference count
* drops to 0, the object is finalized (i.e. its memory is freed).
*
* If the pointer to the #GObject may be reused in future (for example, if it is
* an instance variable of another object), it is recommended to clear the
* pointer to %NULL rather than retain a dangling pointer to a potentially
* invalid #GObject instance. Use g_clear_object() for this.
*/
unref(): void;
/**
* This function essentially limits the life time of the `closure` to
* the life time of the object. That is, when the object is finalized,
* the `closure` is invalidated by calling g_closure_invalidate() on
* it, in order to prevent invocations of the closure with a finalized
* (nonexisting) object. Also, g_object_ref() and g_object_unref() are
* added as marshal guards to the `closure,` to ensure that an extra
* reference count is held on `object` during invocation of the
* `closure`. Usually, this function will be called on closures that
* use this `object` as closure data.
* @param closure #GClosure to watch
*/
watch_closure(closure: GObject.Closure): void;
/**
* the `constructed` function is called by g_object_new() as the
* final step of the object creation process. At the point of the call, all
* construction properties have been set on the object. The purpose of this
* call is to allow for object initialisation steps that can only be performed
* after construction properties have been set. `constructed` implementors
* should chain up to the `constructed` call of their parent class to allow it
* to complete its initialisation.
*/
vfunc_constructed(): void;
/**
* emits property change notification for a bunch
* of properties. Overriding `dispatch_properties_changed` should be rarely
* needed.
* @param n_pspecs
* @param pspecs
*/
vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
/**
* the `dispose` function is supposed to drop all references to other
* objects, but keep the instance otherwise intact, so that client method
* invocations still work. It may be run multiple times (due to reference
* loops). Before returning, `dispose` should chain up to the `dispose` method
* of the parent class.
*/
vfunc_dispose(): void;
/**
* instance finalization function, should finish the finalization of
* the instance begun in `dispose` and chain up to the `finalize` method of the
* parent class.
*/
vfunc_finalize(): void;
/**
* the generic getter for all properties of this type. Should be
* overridden for every type with properties.
* @param property_id
* @param value
* @param pspec
*/
vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param pspec
*/
vfunc_notify(pspec: GObject.ParamSpec): void;
/**
* the generic setter for all properties of this type. Should be
* overridden for every type with properties. If implementations of
* `set_property` don't emit property change notification explicitly, this will
* be done implicitly by the type system. However, if the notify signal is
* emitted explicitly, the type system will not emit it a second time.
* @param property_id
* @param value
* @param pspec
*/
vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
* @param id Handler ID of the handler to be disconnected
*/
disconnect(id: number): void;
/**
* Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
* @param properties Object containing the properties to set
*/
set(properties: { [key: string]: any }): void;
/**
* Blocks a handler of an instance so it will not be called during any signal emissions
* @param id Handler ID of the handler to be blocked
*/
block_signal_handler(id: number): void;
/**
* Unblocks a handler so it will be called again during any signal emissions
* @param id Handler ID of the handler to be unblocked
*/
unblock_signal_handler(id: number): void;
/**
* Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
* @param detailedName Name of the signal to stop emission of
*/
stop_emission_by_name(detailedName: string): void;
}
namespace DOMEvent {
// Signal signatures
interface SignalSignatures extends DOMObject.SignalSignatures {
'notify::bubbles': (pspec: GObject.ParamSpec) => void;
'notify::cancel-bubble': (pspec: GObject.ParamSpec) => void;
'notify::cancelable': (pspec: GObject.ParamSpec) => void;
'notify::current-target': (pspec: GObject.ParamSpec) => void;
'notify::event-phase': (pspec: GObject.ParamSpec) => void;
'notify::return-value': (pspec: GObject.ParamSpec) => void;
'notify::src-element': (pspec: GObject.ParamSpec) => void;
'notify::target': (pspec: GObject.ParamSpec) => void;
'notify::time-stamp': (pspec: GObject.ParamSpec) => void;
'notify::type': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMObject.ConstructorProps {
bubbles: boolean;
cancel_bubble: boolean;
cancelBubble: boolean;
cancelable: boolean;
current_target: DOMEventTarget;
currentTarget: DOMEventTarget;
event_phase: number;
eventPhase: number;
return_value: boolean;
returnValue: boolean;
src_element: DOMEventTarget;
srcElement: DOMEventTarget;
target: DOMEventTarget;
time_stamp: number;
timeStamp: number;
type: string;
}
}
class DOMEvent extends DOMObject {
static $gtype: GObject.GType;
// Properties
get bubbles(): boolean;
get cancel_bubble(): boolean;
set cancel_bubble(val: boolean);
get cancelBubble(): boolean;
set cancelBubble(val: boolean);
get cancelable(): boolean;
get current_target(): DOMEventTarget;
get currentTarget(): DOMEventTarget;
get event_phase(): number;
get eventPhase(): number;
get return_value(): boolean;
set return_value(val: boolean);
get returnValue(): boolean;
set returnValue(val: boolean);
get src_element(): DOMEventTarget;
get srcElement(): DOMEventTarget;
get target(): DOMEventTarget;
get time_stamp(): number;
get timeStamp(): number;
get type(): string;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMEvent.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q] ? Q : never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
get_bubbles(): boolean;
get_cancel_bubble(): boolean;
get_cancelable(): boolean;
get_current_target(): DOMEventTarget;
get_event_phase(): number;
get_event_type(): string;
get_return_value(): boolean;
get_src_element(): DOMEventTarget;
get_target(): DOMEventTarget;
get_time_stamp(): number;
init_event(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void;
prevent_default(): void;
set_cancel_bubble(value: boolean): void;
set_return_value(value: boolean): void;
stop_propagation(): void;
}
namespace DOMFile {
// Signal signatures
interface SignalSignatures extends DOMBlob.SignalSignatures {
'notify::name': (pspec: GObject.ParamSpec) => void;
'notify::size': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMBlob.ConstructorProps {
name: string;
}
}
class DOMFile extends DOMBlob {
static $gtype: GObject.GType;
// Properties
get name(): string;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMFile.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q] ? Q : never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
get_name(): string;
}
namespace DOMFileList {
// Signal signatures
interface SignalSignatures extends DOMObject.SignalSignatures {
'notify::length': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMObject.ConstructorProps {
length: number;
}
}
class DOMFileList extends DOMObject {
static $gtype: GObject.GType;
// Properties
get length(): number;
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMFileList.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q] ? Q : never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
get_length(): number;
item(index: number): DOMFile;
}
namespace DOMHTMLAnchorElement {
// Signal signatures
interface SignalSignatures extends DOMHTMLElement.SignalSignatures {
'notify::charset': (pspec: GObject.ParamSpec) => void;
'notify::coords': (pspec: GObject.ParamSpec) => void;
'notify::hash': (pspec: GObject.ParamSpec) => void;
'notify::host': (pspec: GObject.ParamSpec) => void;
'notify::hostname': (pspec: GObject.ParamSpec) => void;
'notify::href': (pspec: GObject.ParamSpec) => void;
'notify::hreflang': (pspec: GObject.ParamSpec) => void;
'notify::name': (pspec: GObject.ParamSpec) => void;
'notify::pathname': (pspec: GObject.ParamSpec) => void;
'notify::port': (pspec: GObject.ParamSpec) => void;
'notify::protocol': (pspec: GObject.ParamSpec) => void;
'notify::rel': (pspec: GObject.ParamSpec) => void;
'notify::rev': (pspec: GObject.ParamSpec) => void;
'notify::search': (pspec: GObject.ParamSpec) => void;
'notify::shape': (pspec: GObject.ParamSpec) => void;
'notify::target': (pspec: GObject.ParamSpec) => void;
'notify::text': (pspec: GObject.ParamSpec) => void;
'notify::type': (pspec: GObject.ParamSpec) => void;
'notify::access-key': (pspec: GObject.ParamSpec) => void;
'notify::content-editable': (pspec: GObject.ParamSpec) => void;
'notify::dir': (pspec: GObject.ParamSpec) => void;
'notify::draggable': (pspec: GObject.ParamSpec) => void;
'notify::hidden': (pspec: GObject.ParamSpec) => void;
'notify::inner-text': (pspec: GObject.ParamSpec) => void;
'notify::is-content-editable': (pspec: GObject.ParamSpec) => void;
'notify::lang': (pspec: GObject.ParamSpec) => void;
'notify::outer-text': (pspec: GObject.ParamSpec) => void;
'notify::spellcheck': (pspec: GObject.ParamSpec) => void;
'notify::tab-index': (pspec: GObject.ParamSpec) => void;
'notify::title': (pspec: GObject.ParamSpec) => void;
'notify::translate': (pspec: GObject.ParamSpec) => void;
'notify::webkitdropzone': (pspec: GObject.ParamSpec) => void;
'notify::attributes': (pspec: GObject.ParamSpec) => void;
'notify::child-element-count': (pspec: GObject.ParamSpec) => void;
'notify::children': (pspec: GObject.ParamSpec) => void;
'notify::class-list': (pspec: GObject.ParamSpec) => void;
'notify::class-name': (pspec: GObject.ParamSpec) => void;
'notify::client-height': (pspec: GObject.ParamSpec) => void;
'notify::client-left': (pspec: GObject.ParamSpec) => void;
'notify::client-top': (pspec: GObject.ParamSpec) => void;
'notify::client-width': (pspec: GObject.ParamSpec) => void;
'notify::first-element-child': (pspec: GObject.ParamSpec) => void;
'notify::id': (pspec: GObject.ParamSpec) => void;
'notify::inner-html': (pspec: GObject.ParamSpec) => void;
'notify::last-element-child': (pspec: GObject.ParamSpec) => void;
'notify::local-name': (pspec: GObject.ParamSpec) => void;
'notify::namespace-uri': (pspec: GObject.ParamSpec) => void;
'notify::next-element-sibling': (pspec: GObject.ParamSpec) => void;
'notify::offset-height': (pspec: GObject.ParamSpec) => void;
'notify::offset-left': (pspec: GObject.ParamSpec) => void;
'notify::offset-parent': (pspec: GObject.ParamSpec) => void;
'notify::offset-top': (pspec: GObject.ParamSpec) => void;
'notify::offset-width': (pspec: GObject.ParamSpec) => void;
'notify::outer-html': (pspec: GObject.ParamSpec) => void;
'notify::prefix': (pspec: GObject.ParamSpec) => void;
'notify::previous-element-sibling': (pspec: GObject.ParamSpec) => void;
'notify::scroll-height': (pspec: GObject.ParamSpec) => void;
'notify::scroll-left': (pspec: GObject.ParamSpec) => void;
'notify::scroll-top': (pspec: GObject.ParamSpec) => void;
'notify::scroll-width': (pspec: GObject.ParamSpec) => void;
'notify::style': (pspec: GObject.ParamSpec) => void;
'notify::tag-name': (pspec: GObject.ParamSpec) => void;
'notify::webkit-region-overset': (pspec: GObject.ParamSpec) => void;
'notify::base-uri': (pspec: GObject.ParamSpec) => void;
'notify::child-nodes': (pspec: GObject.ParamSpec) => void;
'notify::first-child': (pspec: GObject.ParamSpec) => void;
'notify::last-child': (pspec: GObject.ParamSpec) => void;
'notify::next-sibling': (pspec: GObject.ParamSpec) => void;
'notify::node-name': (pspec: GObject.ParamSpec) => void;
'notify::node-type': (pspec: GObject.ParamSpec) => void;
'notify::node-value': (pspec: GObject.ParamSpec) => void;
'notify::owner-document': (pspec: GObject.ParamSpec) => void;
'notify::parent-element': (pspec: GObject.ParamSpec) => void;
'notify::parent-node': (pspec: GObject.ParamSpec) => void;
'notify::previous-sibling': (pspec: GObject.ParamSpec) => void;
'notify::text-content': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMHTMLElement.ConstructorProps, DOMEventTarget.ConstructorProps {
charset: string;
coords: string;
hash: string;
host: string;
hostname: string;
href: string;
hreflang: string;
name: string;
pathname: string;
port: string;
protocol: string;
rel: string;
rev: string;
search: string;
shape: string;
target: string;
text: string;
type: string;
}
}
class DOMHTMLAnchorElement extends DOMHTMLElement implements DOMEventTarget {
static $gtype: GObject.GType;
// Properties
get charset(): string;
set charset(val: string);
get coords(): string;
set coords(val: string);
get hash(): string;
set hash(val: string);
get host(): string;
set host(val: string);
get hostname(): string;
set hostname(val: string);
get href(): string;
set href(val: string);
get hreflang(): string;
set hreflang(val: string);
get name(): string;
set name(val: string);
get pathname(): string;
set pathname(val: string);
get port(): string;
set port(val: string);
get protocol(): string;
set protocol(val: string);
get rel(): string;
set rel(val: string);
get rev(): string;
set rev(val: string);
get search(): string;
set search(val: string);
get shape(): string;
set shape(val: string);
get target(): string;
set target(val: string);
get text(): string;
set text(val: string);
get type(): string;
set type(val: string);
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMHTMLAnchorElement.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q]
? Q
: never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
get_charset(): string;
get_coords(): string;
get_hash(): string;
get_host(): string;
get_hostname(): string;
get_href(): string;
get_hreflang(): string;
get_name(): string;
get_pathname(): string;
get_port(): string;
get_protocol(): string;
get_rel(): string;
get_rev(): string;
get_search(): string;
get_shape(): string;
get_target(): string;
get_text(): string;
get_type_attr(): string;
set_charset(value: string): void;
set_coords(value: string): void;
set_hash(value: string): void;
set_host(value: string): void;
set_hostname(value: string): void;
set_href(value: string): void;
set_hreflang(value: string): void;
set_name(value: string): void;
set_pathname(value: string): void;
set_port(value: string): void;
set_protocol(value: string): void;
set_rel(value: string): void;
set_rev(value: string): void;
set_search(value: string): void;
set_shape(value: string): void;
set_target(value: string): void;
set_text(value: string): void;
set_type_attr(value: string): void;
// Inherited methods
/**
* Creates a binding between `source_property` on `source` and `target_property`
* on `target`.
*
* Whenever the `source_property` is changed the `target_property` is
* updated using the same value. For instance:
*
*
* ```c
* g_object_bind_property (action, "active", widget, "sensitive", 0);
* ```
*
*
* Will result in the "sensitive" property of the widget #GObject instance to be
* updated with the same value of the "active" property of the action #GObject
* instance.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well.
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. To remove the binding without affecting the
* `source` and the `target` you can just call g_object_unref() on the returned
* #GBinding instance.
*
* Removing the binding by calling g_object_unref() on it must only be done if
* the binding, `source` and `target` are only used from a single thread and it
* is clear that both `source` and `target` outlive the binding. Especially it
* is not safe to rely on this if the binding, `source` or `target` can be
* finalized from different threads. Keep another reference to the binding and
* use g_binding_unbind() instead to be on the safe side.
*
* A #GObject can have multiple bindings.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
): GObject.Binding;
/**
* Complete version of g_object_bind_property().
*
* Creates a binding between `source_property` on `source` and `target_property`
* on `target,` allowing you to set the transformation functions to be used by
* the binding.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well. The `transform_from` function is only used in case
* of bidirectional bindings, otherwise it will be ignored
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. This will release the reference that is
* being held on the #GBinding instance; if you want to hold on to the
* #GBinding instance, you will need to hold a reference to it.
*
* To remove the binding, call g_binding_unbind().
*
* A #GObject can have multiple bindings.
*
* The same `user_data` parameter will be used for both `transform_to`
* and `transform_from` transformation functions; the `notify` function will
* be called once, when the binding is removed. If you need different data
* for each transformation function, please use
* g_object_bind_property_with_closures() instead.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
* @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
* @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property_full(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
transform_to?: GObject.BindingTransformFunc | null,
transform_from?: GObject.BindingTransformFunc | null,
notify?: GLib.DestroyNotify | null,
): GObject.Binding;
// Conflicted with GObject.Object.bind_property_full
bind_property_full(...args: never[]): any;
/**
* This function is intended for #GObject implementations to re-enforce
* a [floating][floating-ref] object reference. Doing this is seldom
* required: all #GInitiallyUnowneds are created with a floating reference
* which usually just needs to be sunken by calling g_object_ref_sink().
*/
force_floating(): void;
/**
* Increases the freeze count on `object`. If the freeze count is
* non-zero, the emission of "notify" signals on `object` is
* stopped. The signals are queued until the freeze count is decreased
* to zero. Duplicate notifications are squashed so that at most one
* #GObject::notify signal is emitted for each property modified while the
* object is frozen.
*
* This is necessary for accessors that modify multiple properties to prevent
* premature notification while the object is still being modified.
*/
freeze_notify(): void;
/**
* Gets a named field from the objects table of associations (see g_object_set_data()).
* @param key name of the key for that association
* @returns the data if found, or %NULL if no such data exists.
*/
get_data(key: string): any | null;
/**
* Gets a property of an object.
*
* The value can be:
* - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
* - a GObject.Value initialized with the expected type of the property
* - a GObject.Value initialized with a type to which the expected type of the property can be transformed
*
* In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
*
* Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
* @param property_name The name of the property to get
* @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
*/
get_property(property_name: string, value: GObject.Value | any): any;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
get_qdata(quark: GLib.Quark): any | null;
/**
* Gets `n_properties` properties for an `object`.
* Obtained properties will be set to `values`. All properties must be valid.
* Warnings will be emitted and undefined behaviour may result if invalid
* properties are passed in.
* @param names the names of each property to get
* @param values the values of each property to get
*/
getv(names: string[], values: (GObject.Value | any)[]): void;
/**
* Checks whether `object` has a [floating][floating-ref] reference.
* @returns %TRUE if @object has a floating reference
*/
is_floating(): boolean;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param property_name the name of a property installed on the class of @object.
*/
notify(property_name: string): void;
/**
* Emits a "notify" signal for the property specified by `pspec` on `object`.
*
* This function omits the property name lookup, hence it is faster than
* g_object_notify().
*
* One way to avoid using g_object_notify() from within the
* class that registered the properties, and using g_object_notify_by_pspec()
* instead, is to store the GParamSpec used with
* g_object_class_install_property() inside a static array, e.g.:
*
*
* ```c
* typedef enum
* {
* PROP_FOO = 1,
* PROP_LAST
* } MyObjectProperty;
*
* static GParamSpec *properties[PROP_LAST];
*
* static void
* my_object_class_init (MyObjectClass *klass)
* {
* properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
* 0, 100,
* 50,
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
* g_object_class_install_property (gobject_class,
* PROP_FOO,
* properties[PROP_FOO]);
* }
* ```
*
*
* and then notify a change on the "foo" property with:
*
*
* ```c
* g_object_notify_by_pspec (self, properties[PROP_FOO]);
* ```
*
* @param pspec the #GParamSpec of a property installed on the class of @object.
*/
notify_by_pspec(pspec: GObject.ParamSpec): void;
/**
* Increases the reference count of `object`.
*
* Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
* of `object` will be propagated to the return type (using the GCC typeof()
* extension), so any casting the caller needs to do on the return type must be
* explicit.
* @returns the same @object
*/
ref(): GObject.Object;
/**
* Increase the reference count of `object,` and possibly remove the
* [floating][floating-ref] reference, if `object` has a floating reference.
*
* In other words, if the object is floating, then this call "assumes
* ownership" of the floating reference, converting it to a normal
* reference by clearing the floating flag while leaving the reference
* count unchanged. If the object is not floating, then this call
* adds a new normal reference increasing the reference count by one.
*
* Since GLib 2.56, the type of `object` will be propagated to the return type
* under the same conditions as for g_object_ref().
* @returns @object
*/
ref_sink(): GObject.Object;
/**
* Releases all references to other objects. This can be used to break
* reference cycles.
*
* This function should only be called from object system implementations.
*/
run_dispose(): void;
/**
* Each object carries around a table of associations from
* strings to pointers. This function lets you set an association.
*
* If the object already had an association with that name,
* the old association will be destroyed.
*
* Internally, the `key` is converted to a #GQuark using g_quark_from_string().
* This means a copy of `key` is kept permanently (even after `object` has been
* finalized) — so it is recommended to only use a small, bounded set of values
* for `key` in your program, to avoid the #GQuark storage growing unbounded.
* @param key name of the key
* @param data data to associate with that key
*/
set_data(key: string, data?: any | null): void;
/**
* Sets a property on an object.
* @param property_name The name of the property to set
* @param value The value to set the property to
*/
set_property(property_name: string, value: GObject.Value | any): void;
/**
* Remove a specified datum from the object's data associations,
* without invoking the association's destroy handler.
* @param key name of the key
* @returns the data if found, or %NULL if no such data exists.
*/
steal_data(key: string): any | null;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata() and removes the `data` from object
* without invoking its destroy() function (if any was
* set).
* Usually, calling this function is only required to update
* user data pointers with a destroy notifier, for example:
*
* ```c
* void
* object_add_to_user_list (GObject *object,
* const gchar *new_string)
* {
* // the quark, naming the object data
* GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
* // retrieve the old string list
* GList *list = g_object_steal_qdata (object, quark_string_list);
*
* // prepend new string
* list = g_list_prepend (list, g_strdup (new_string));
* // this changed 'list', so we need to set it again
* g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
* }
* static void
* free_string_list (gpointer data)
* {
* GList *node, *list = data;
*
* for (node = list; node; node = node->next)
* g_free (node->data);
* g_list_free (list);
* }
* ```
*
* Using g_object_get_qdata() in the above example, instead of
* g_object_steal_qdata() would have left the destroy function set,
* and thus the partial string list would have been freed upon
* g_object_set_qdata_full().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
steal_qdata(quark: GLib.Quark): any | null;
/**
* Reverts the effect of a previous call to
* g_object_freeze_notify(). The freeze count is decreased on `object`
* and when it reaches zero, queued "notify" signals are emitted.
*
* Duplicate notifications for each property are squashed so that at most one
* #GObject::notify signal is emitted for each property, in the reverse order
* in which they have been queued.
*
* It is an error to call this function when the freeze count is zero.
*/
thaw_notify(): void;
/**
* Decreases the reference count of `object`. When its reference count
* drops to 0, the object is finalized (i.e. its memory is freed).
*
* If the pointer to the #GObject may be reused in future (for example, if it is
* an instance variable of another object), it is recommended to clear the
* pointer to %NULL rather than retain a dangling pointer to a potentially
* invalid #GObject instance. Use g_clear_object() for this.
*/
unref(): void;
/**
* This function essentially limits the life time of the `closure` to
* the life time of the object. That is, when the object is finalized,
* the `closure` is invalidated by calling g_closure_invalidate() on
* it, in order to prevent invocations of the closure with a finalized
* (nonexisting) object. Also, g_object_ref() and g_object_unref() are
* added as marshal guards to the `closure,` to ensure that an extra
* reference count is held on `object` during invocation of the
* `closure`. Usually, this function will be called on closures that
* use this `object` as closure data.
* @param closure #GClosure to watch
*/
watch_closure(closure: GObject.Closure): void;
/**
* the `constructed` function is called by g_object_new() as the
* final step of the object creation process. At the point of the call, all
* construction properties have been set on the object. The purpose of this
* call is to allow for object initialisation steps that can only be performed
* after construction properties have been set. `constructed` implementors
* should chain up to the `constructed` call of their parent class to allow it
* to complete its initialisation.
*/
vfunc_constructed(): void;
/**
* emits property change notification for a bunch
* of properties. Overriding `dispatch_properties_changed` should be rarely
* needed.
* @param n_pspecs
* @param pspecs
*/
vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
/**
* the `dispose` function is supposed to drop all references to other
* objects, but keep the instance otherwise intact, so that client method
* invocations still work. It may be run multiple times (due to reference
* loops). Before returning, `dispose` should chain up to the `dispose` method
* of the parent class.
*/
vfunc_dispose(): void;
/**
* instance finalization function, should finish the finalization of
* the instance begun in `dispose` and chain up to the `finalize` method of the
* parent class.
*/
vfunc_finalize(): void;
/**
* the generic getter for all properties of this type. Should be
* overridden for every type with properties.
* @param property_id
* @param value
* @param pspec
*/
vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param pspec
*/
vfunc_notify(pspec: GObject.ParamSpec): void;
/**
* the generic setter for all properties of this type. Should be
* overridden for every type with properties. If implementations of
* `set_property` don't emit property change notification explicitly, this will
* be done implicitly by the type system. However, if the notify signal is
* emitted explicitly, the type system will not emit it a second time.
* @param property_id
* @param value
* @param pspec
*/
vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
* @param id Handler ID of the handler to be disconnected
*/
disconnect(id: number): void;
/**
* Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
* @param properties Object containing the properties to set
*/
set(properties: { [key: string]: any }): void;
/**
* Blocks a handler of an instance so it will not be called during any signal emissions
* @param id Handler ID of the handler to be blocked
*/
block_signal_handler(id: number): void;
/**
* Unblocks a handler so it will be called again during any signal emissions
* @param id Handler ID of the handler to be unblocked
*/
unblock_signal_handler(id: number): void;
/**
* Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
* @param detailedName Name of the signal to stop emission of
*/
stop_emission_by_name(detailedName: string): void;
}
namespace DOMHTMLAppletElement {
// Signal signatures
interface SignalSignatures extends DOMHTMLElement.SignalSignatures {
'notify::align': (pspec: GObject.ParamSpec) => void;
'notify::alt': (pspec: GObject.ParamSpec) => void;
'notify::archive': (pspec: GObject.ParamSpec) => void;
'notify::code': (pspec: GObject.ParamSpec) => void;
'notify::code-base': (pspec: GObject.ParamSpec) => void;
'notify::height': (pspec: GObject.ParamSpec) => void;
'notify::hspace': (pspec: GObject.ParamSpec) => void;
'notify::name': (pspec: GObject.ParamSpec) => void;
'notify::object': (pspec: GObject.ParamSpec) => void;
'notify::vspace': (pspec: GObject.ParamSpec) => void;
'notify::width': (pspec: GObject.ParamSpec) => void;
'notify::access-key': (pspec: GObject.ParamSpec) => void;
'notify::content-editable': (pspec: GObject.ParamSpec) => void;
'notify::dir': (pspec: GObject.ParamSpec) => void;
'notify::draggable': (pspec: GObject.ParamSpec) => void;
'notify::hidden': (pspec: GObject.ParamSpec) => void;
'notify::inner-text': (pspec: GObject.ParamSpec) => void;
'notify::is-content-editable': (pspec: GObject.ParamSpec) => void;
'notify::lang': (pspec: GObject.ParamSpec) => void;
'notify::outer-text': (pspec: GObject.ParamSpec) => void;
'notify::spellcheck': (pspec: GObject.ParamSpec) => void;
'notify::tab-index': (pspec: GObject.ParamSpec) => void;
'notify::title': (pspec: GObject.ParamSpec) => void;
'notify::translate': (pspec: GObject.ParamSpec) => void;
'notify::webkitdropzone': (pspec: GObject.ParamSpec) => void;
'notify::attributes': (pspec: GObject.ParamSpec) => void;
'notify::child-element-count': (pspec: GObject.ParamSpec) => void;
'notify::children': (pspec: GObject.ParamSpec) => void;
'notify::class-list': (pspec: GObject.ParamSpec) => void;
'notify::class-name': (pspec: GObject.ParamSpec) => void;
'notify::client-height': (pspec: GObject.ParamSpec) => void;
'notify::client-left': (pspec: GObject.ParamSpec) => void;
'notify::client-top': (pspec: GObject.ParamSpec) => void;
'notify::client-width': (pspec: GObject.ParamSpec) => void;
'notify::first-element-child': (pspec: GObject.ParamSpec) => void;
'notify::id': (pspec: GObject.ParamSpec) => void;
'notify::inner-html': (pspec: GObject.ParamSpec) => void;
'notify::last-element-child': (pspec: GObject.ParamSpec) => void;
'notify::local-name': (pspec: GObject.ParamSpec) => void;
'notify::namespace-uri': (pspec: GObject.ParamSpec) => void;
'notify::next-element-sibling': (pspec: GObject.ParamSpec) => void;
'notify::offset-height': (pspec: GObject.ParamSpec) => void;
'notify::offset-left': (pspec: GObject.ParamSpec) => void;
'notify::offset-parent': (pspec: GObject.ParamSpec) => void;
'notify::offset-top': (pspec: GObject.ParamSpec) => void;
'notify::offset-width': (pspec: GObject.ParamSpec) => void;
'notify::outer-html': (pspec: GObject.ParamSpec) => void;
'notify::prefix': (pspec: GObject.ParamSpec) => void;
'notify::previous-element-sibling': (pspec: GObject.ParamSpec) => void;
'notify::scroll-height': (pspec: GObject.ParamSpec) => void;
'notify::scroll-left': (pspec: GObject.ParamSpec) => void;
'notify::scroll-top': (pspec: GObject.ParamSpec) => void;
'notify::scroll-width': (pspec: GObject.ParamSpec) => void;
'notify::style': (pspec: GObject.ParamSpec) => void;
'notify::tag-name': (pspec: GObject.ParamSpec) => void;
'notify::webkit-region-overset': (pspec: GObject.ParamSpec) => void;
'notify::base-uri': (pspec: GObject.ParamSpec) => void;
'notify::child-nodes': (pspec: GObject.ParamSpec) => void;
'notify::first-child': (pspec: GObject.ParamSpec) => void;
'notify::last-child': (pspec: GObject.ParamSpec) => void;
'notify::next-sibling': (pspec: GObject.ParamSpec) => void;
'notify::node-name': (pspec: GObject.ParamSpec) => void;
'notify::node-type': (pspec: GObject.ParamSpec) => void;
'notify::node-value': (pspec: GObject.ParamSpec) => void;
'notify::owner-document': (pspec: GObject.ParamSpec) => void;
'notify::parent-element': (pspec: GObject.ParamSpec) => void;
'notify::parent-node': (pspec: GObject.ParamSpec) => void;
'notify::previous-sibling': (pspec: GObject.ParamSpec) => void;
'notify::text-content': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMHTMLElement.ConstructorProps, DOMEventTarget.ConstructorProps {
align: string;
alt: string;
archive: string;
code: string;
code_base: string;
codeBase: string;
height: string;
hspace: number;
name: string;
object: string;
vspace: number;
width: string;
}
}
class DOMHTMLAppletElement extends DOMHTMLElement implements DOMEventTarget {
static $gtype: GObject.GType;
// Properties
get align(): string;
set align(val: string);
get alt(): string;
set alt(val: string);
get archive(): string;
set archive(val: string);
get code(): string;
set code(val: string);
get code_base(): string;
set code_base(val: string);
get codeBase(): string;
set codeBase(val: string);
get height(): string;
set height(val: string);
get hspace(): number;
set hspace(val: number);
get name(): string;
set name(val: string);
get object(): string;
set object(val: string);
get vspace(): number;
set vspace(val: number);
get width(): string;
set width(val: string);
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMHTMLAppletElement.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q]
? Q
: never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
get_align(): string;
get_alt(): string;
get_archive(): string;
get_code(): string;
get_code_base(): string;
get_height(): string;
get_hspace(): number;
get_name(): string;
get_object(): string;
get_vspace(): number;
get_width(): string;
set_align(value: string): void;
set_alt(value: string): void;
set_archive(value: string): void;
set_code(value: string): void;
set_code_base(value: string): void;
set_height(value: string): void;
set_hspace(value: number): void;
set_name(value: string): void;
set_object(value: string): void;
set_vspace(value: number): void;
set_width(value: string): void;
// Inherited methods
/**
* Creates a binding between `source_property` on `source` and `target_property`
* on `target`.
*
* Whenever the `source_property` is changed the `target_property` is
* updated using the same value. For instance:
*
*
* ```c
* g_object_bind_property (action, "active", widget, "sensitive", 0);
* ```
*
*
* Will result in the "sensitive" property of the widget #GObject instance to be
* updated with the same value of the "active" property of the action #GObject
* instance.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well.
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. To remove the binding without affecting the
* `source` and the `target` you can just call g_object_unref() on the returned
* #GBinding instance.
*
* Removing the binding by calling g_object_unref() on it must only be done if
* the binding, `source` and `target` are only used from a single thread and it
* is clear that both `source` and `target` outlive the binding. Especially it
* is not safe to rely on this if the binding, `source` or `target` can be
* finalized from different threads. Keep another reference to the binding and
* use g_binding_unbind() instead to be on the safe side.
*
* A #GObject can have multiple bindings.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
): GObject.Binding;
/**
* Complete version of g_object_bind_property().
*
* Creates a binding between `source_property` on `source` and `target_property`
* on `target,` allowing you to set the transformation functions to be used by
* the binding.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well. The `transform_from` function is only used in case
* of bidirectional bindings, otherwise it will be ignored
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. This will release the reference that is
* being held on the #GBinding instance; if you want to hold on to the
* #GBinding instance, you will need to hold a reference to it.
*
* To remove the binding, call g_binding_unbind().
*
* A #GObject can have multiple bindings.
*
* The same `user_data` parameter will be used for both `transform_to`
* and `transform_from` transformation functions; the `notify` function will
* be called once, when the binding is removed. If you need different data
* for each transformation function, please use
* g_object_bind_property_with_closures() instead.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
* @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
* @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property_full(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
transform_to?: GObject.BindingTransformFunc | null,
transform_from?: GObject.BindingTransformFunc | null,
notify?: GLib.DestroyNotify | null,
): GObject.Binding;
// Conflicted with GObject.Object.bind_property_full
bind_property_full(...args: never[]): any;
/**
* This function is intended for #GObject implementations to re-enforce
* a [floating][floating-ref] object reference. Doing this is seldom
* required: all #GInitiallyUnowneds are created with a floating reference
* which usually just needs to be sunken by calling g_object_ref_sink().
*/
force_floating(): void;
/**
* Increases the freeze count on `object`. If the freeze count is
* non-zero, the emission of "notify" signals on `object` is
* stopped. The signals are queued until the freeze count is decreased
* to zero. Duplicate notifications are squashed so that at most one
* #GObject::notify signal is emitted for each property modified while the
* object is frozen.
*
* This is necessary for accessors that modify multiple properties to prevent
* premature notification while the object is still being modified.
*/
freeze_notify(): void;
/**
* Gets a named field from the objects table of associations (see g_object_set_data()).
* @param key name of the key for that association
* @returns the data if found, or %NULL if no such data exists.
*/
get_data(key: string): any | null;
/**
* Gets a property of an object.
*
* The value can be:
* - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
* - a GObject.Value initialized with the expected type of the property
* - a GObject.Value initialized with a type to which the expected type of the property can be transformed
*
* In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
*
* Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
* @param property_name The name of the property to get
* @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
*/
get_property(property_name: string, value: GObject.Value | any): any;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
get_qdata(quark: GLib.Quark): any | null;
/**
* Gets `n_properties` properties for an `object`.
* Obtained properties will be set to `values`. All properties must be valid.
* Warnings will be emitted and undefined behaviour may result if invalid
* properties are passed in.
* @param names the names of each property to get
* @param values the values of each property to get
*/
getv(names: string[], values: (GObject.Value | any)[]): void;
/**
* Checks whether `object` has a [floating][floating-ref] reference.
* @returns %TRUE if @object has a floating reference
*/
is_floating(): boolean;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param property_name the name of a property installed on the class of @object.
*/
notify(property_name: string): void;
/**
* Emits a "notify" signal for the property specified by `pspec` on `object`.
*
* This function omits the property name lookup, hence it is faster than
* g_object_notify().
*
* One way to avoid using g_object_notify() from within the
* class that registered the properties, and using g_object_notify_by_pspec()
* instead, is to store the GParamSpec used with
* g_object_class_install_property() inside a static array, e.g.:
*
*
* ```c
* typedef enum
* {
* PROP_FOO = 1,
* PROP_LAST
* } MyObjectProperty;
*
* static GParamSpec *properties[PROP_LAST];
*
* static void
* my_object_class_init (MyObjectClass *klass)
* {
* properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
* 0, 100,
* 50,
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
* g_object_class_install_property (gobject_class,
* PROP_FOO,
* properties[PROP_FOO]);
* }
* ```
*
*
* and then notify a change on the "foo" property with:
*
*
* ```c
* g_object_notify_by_pspec (self, properties[PROP_FOO]);
* ```
*
* @param pspec the #GParamSpec of a property installed on the class of @object.
*/
notify_by_pspec(pspec: GObject.ParamSpec): void;
/**
* Increases the reference count of `object`.
*
* Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
* of `object` will be propagated to the return type (using the GCC typeof()
* extension), so any casting the caller needs to do on the return type must be
* explicit.
* @returns the same @object
*/
ref(): GObject.Object;
/**
* Increase the reference count of `object,` and possibly remove the
* [floating][floating-ref] reference, if `object` has a floating reference.
*
* In other words, if the object is floating, then this call "assumes
* ownership" of the floating reference, converting it to a normal
* reference by clearing the floating flag while leaving the reference
* count unchanged. If the object is not floating, then this call
* adds a new normal reference increasing the reference count by one.
*
* Since GLib 2.56, the type of `object` will be propagated to the return type
* under the same conditions as for g_object_ref().
* @returns @object
*/
ref_sink(): GObject.Object;
/**
* Releases all references to other objects. This can be used to break
* reference cycles.
*
* This function should only be called from object system implementations.
*/
run_dispose(): void;
/**
* Each object carries around a table of associations from
* strings to pointers. This function lets you set an association.
*
* If the object already had an association with that name,
* the old association will be destroyed.
*
* Internally, the `key` is converted to a #GQuark using g_quark_from_string().
* This means a copy of `key` is kept permanently (even after `object` has been
* finalized) — so it is recommended to only use a small, bounded set of values
* for `key` in your program, to avoid the #GQuark storage growing unbounded.
* @param key name of the key
* @param data data to associate with that key
*/
set_data(key: string, data?: any | null): void;
/**
* Sets a property on an object.
* @param property_name The name of the property to set
* @param value The value to set the property to
*/
set_property(property_name: string, value: GObject.Value | any): void;
/**
* Remove a specified datum from the object's data associations,
* without invoking the association's destroy handler.
* @param key name of the key
* @returns the data if found, or %NULL if no such data exists.
*/
steal_data(key: string): any | null;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata() and removes the `data` from object
* without invoking its destroy() function (if any was
* set).
* Usually, calling this function is only required to update
* user data pointers with a destroy notifier, for example:
*
* ```c
* void
* object_add_to_user_list (GObject *object,
* const gchar *new_string)
* {
* // the quark, naming the object data
* GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
* // retrieve the old string list
* GList *list = g_object_steal_qdata (object, quark_string_list);
*
* // prepend new string
* list = g_list_prepend (list, g_strdup (new_string));
* // this changed 'list', so we need to set it again
* g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
* }
* static void
* free_string_list (gpointer data)
* {
* GList *node, *list = data;
*
* for (node = list; node; node = node->next)
* g_free (node->data);
* g_list_free (list);
* }
* ```
*
* Using g_object_get_qdata() in the above example, instead of
* g_object_steal_qdata() would have left the destroy function set,
* and thus the partial string list would have been freed upon
* g_object_set_qdata_full().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
steal_qdata(quark: GLib.Quark): any | null;
/**
* Reverts the effect of a previous call to
* g_object_freeze_notify(). The freeze count is decreased on `object`
* and when it reaches zero, queued "notify" signals are emitted.
*
* Duplicate notifications for each property are squashed so that at most one
* #GObject::notify signal is emitted for each property, in the reverse order
* in which they have been queued.
*
* It is an error to call this function when the freeze count is zero.
*/
thaw_notify(): void;
/**
* Decreases the reference count of `object`. When its reference count
* drops to 0, the object is finalized (i.e. its memory is freed).
*
* If the pointer to the #GObject may be reused in future (for example, if it is
* an instance variable of another object), it is recommended to clear the
* pointer to %NULL rather than retain a dangling pointer to a potentially
* invalid #GObject instance. Use g_clear_object() for this.
*/
unref(): void;
/**
* This function essentially limits the life time of the `closure` to
* the life time of the object. That is, when the object is finalized,
* the `closure` is invalidated by calling g_closure_invalidate() on
* it, in order to prevent invocations of the closure with a finalized
* (nonexisting) object. Also, g_object_ref() and g_object_unref() are
* added as marshal guards to the `closure,` to ensure that an extra
* reference count is held on `object` during invocation of the
* `closure`. Usually, this function will be called on closures that
* use this `object` as closure data.
* @param closure #GClosure to watch
*/
watch_closure(closure: GObject.Closure): void;
/**
* the `constructed` function is called by g_object_new() as the
* final step of the object creation process. At the point of the call, all
* construction properties have been set on the object. The purpose of this
* call is to allow for object initialisation steps that can only be performed
* after construction properties have been set. `constructed` implementors
* should chain up to the `constructed` call of their parent class to allow it
* to complete its initialisation.
*/
vfunc_constructed(): void;
/**
* emits property change notification for a bunch
* of properties. Overriding `dispatch_properties_changed` should be rarely
* needed.
* @param n_pspecs
* @param pspecs
*/
vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
/**
* the `dispose` function is supposed to drop all references to other
* objects, but keep the instance otherwise intact, so that client method
* invocations still work. It may be run multiple times (due to reference
* loops). Before returning, `dispose` should chain up to the `dispose` method
* of the parent class.
*/
vfunc_dispose(): void;
/**
* instance finalization function, should finish the finalization of
* the instance begun in `dispose` and chain up to the `finalize` method of the
* parent class.
*/
vfunc_finalize(): void;
/**
* the generic getter for all properties of this type. Should be
* overridden for every type with properties.
* @param property_id
* @param value
* @param pspec
*/
vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param pspec
*/
vfunc_notify(pspec: GObject.ParamSpec): void;
/**
* the generic setter for all properties of this type. Should be
* overridden for every type with properties. If implementations of
* `set_property` don't emit property change notification explicitly, this will
* be done implicitly by the type system. However, if the notify signal is
* emitted explicitly, the type system will not emit it a second time.
* @param property_id
* @param value
* @param pspec
*/
vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
* @param id Handler ID of the handler to be disconnected
*/
disconnect(id: number): void;
/**
* Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
* @param properties Object containing the properties to set
*/
set(properties: { [key: string]: any }): void;
/**
* Blocks a handler of an instance so it will not be called during any signal emissions
* @param id Handler ID of the handler to be blocked
*/
block_signal_handler(id: number): void;
/**
* Unblocks a handler so it will be called again during any signal emissions
* @param id Handler ID of the handler to be unblocked
*/
unblock_signal_handler(id: number): void;
/**
* Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
* @param detailedName Name of the signal to stop emission of
*/
stop_emission_by_name(detailedName: string): void;
}
namespace DOMHTMLAreaElement {
// Signal signatures
interface SignalSignatures extends DOMHTMLElement.SignalSignatures {
'notify::alt': (pspec: GObject.ParamSpec) => void;
'notify::coords': (pspec: GObject.ParamSpec) => void;
'notify::hash': (pspec: GObject.ParamSpec) => void;
'notify::host': (pspec: GObject.ParamSpec) => void;
'notify::hostname': (pspec: GObject.ParamSpec) => void;
'notify::href': (pspec: GObject.ParamSpec) => void;
'notify::no-href': (pspec: GObject.ParamSpec) => void;
'notify::pathname': (pspec: GObject.ParamSpec) => void;
'notify::port': (pspec: GObject.ParamSpec) => void;
'notify::protocol': (pspec: GObject.ParamSpec) => void;
'notify::search': (pspec: GObject.ParamSpec) => void;
'notify::shape': (pspec: GObject.ParamSpec) => void;
'notify::target': (pspec: GObject.ParamSpec) => void;
'notify::access-key': (pspec: GObject.ParamSpec) => void;
'notify::content-editable': (pspec: GObject.ParamSpec) => void;
'notify::dir': (pspec: GObject.ParamSpec) => void;
'notify::draggable': (pspec: GObject.ParamSpec) => void;
'notify::hidden': (pspec: GObject.ParamSpec) => void;
'notify::inner-text': (pspec: GObject.ParamSpec) => void;
'notify::is-content-editable': (pspec: GObject.ParamSpec) => void;
'notify::lang': (pspec: GObject.ParamSpec) => void;
'notify::outer-text': (pspec: GObject.ParamSpec) => void;
'notify::spellcheck': (pspec: GObject.ParamSpec) => void;
'notify::tab-index': (pspec: GObject.ParamSpec) => void;
'notify::title': (pspec: GObject.ParamSpec) => void;
'notify::translate': (pspec: GObject.ParamSpec) => void;
'notify::webkitdropzone': (pspec: GObject.ParamSpec) => void;
'notify::attributes': (pspec: GObject.ParamSpec) => void;
'notify::child-element-count': (pspec: GObject.ParamSpec) => void;
'notify::children': (pspec: GObject.ParamSpec) => void;
'notify::class-list': (pspec: GObject.ParamSpec) => void;
'notify::class-name': (pspec: GObject.ParamSpec) => void;
'notify::client-height': (pspec: GObject.ParamSpec) => void;
'notify::client-left': (pspec: GObject.ParamSpec) => void;
'notify::client-top': (pspec: GObject.ParamSpec) => void;
'notify::client-width': (pspec: GObject.ParamSpec) => void;
'notify::first-element-child': (pspec: GObject.ParamSpec) => void;
'notify::id': (pspec: GObject.ParamSpec) => void;
'notify::inner-html': (pspec: GObject.ParamSpec) => void;
'notify::last-element-child': (pspec: GObject.ParamSpec) => void;
'notify::local-name': (pspec: GObject.ParamSpec) => void;
'notify::namespace-uri': (pspec: GObject.ParamSpec) => void;
'notify::next-element-sibling': (pspec: GObject.ParamSpec) => void;
'notify::offset-height': (pspec: GObject.ParamSpec) => void;
'notify::offset-left': (pspec: GObject.ParamSpec) => void;
'notify::offset-parent': (pspec: GObject.ParamSpec) => void;
'notify::offset-top': (pspec: GObject.ParamSpec) => void;
'notify::offset-width': (pspec: GObject.ParamSpec) => void;
'notify::outer-html': (pspec: GObject.ParamSpec) => void;
'notify::prefix': (pspec: GObject.ParamSpec) => void;
'notify::previous-element-sibling': (pspec: GObject.ParamSpec) => void;
'notify::scroll-height': (pspec: GObject.ParamSpec) => void;
'notify::scroll-left': (pspec: GObject.ParamSpec) => void;
'notify::scroll-top': (pspec: GObject.ParamSpec) => void;
'notify::scroll-width': (pspec: GObject.ParamSpec) => void;
'notify::style': (pspec: GObject.ParamSpec) => void;
'notify::tag-name': (pspec: GObject.ParamSpec) => void;
'notify::webkit-region-overset': (pspec: GObject.ParamSpec) => void;
'notify::base-uri': (pspec: GObject.ParamSpec) => void;
'notify::child-nodes': (pspec: GObject.ParamSpec) => void;
'notify::first-child': (pspec: GObject.ParamSpec) => void;
'notify::last-child': (pspec: GObject.ParamSpec) => void;
'notify::next-sibling': (pspec: GObject.ParamSpec) => void;
'notify::node-name': (pspec: GObject.ParamSpec) => void;
'notify::node-type': (pspec: GObject.ParamSpec) => void;
'notify::node-value': (pspec: GObject.ParamSpec) => void;
'notify::owner-document': (pspec: GObject.ParamSpec) => void;
'notify::parent-element': (pspec: GObject.ParamSpec) => void;
'notify::parent-node': (pspec: GObject.ParamSpec) => void;
'notify::previous-sibling': (pspec: GObject.ParamSpec) => void;
'notify::text-content': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMHTMLElement.ConstructorProps, DOMEventTarget.ConstructorProps {
alt: string;
coords: string;
hash: string;
host: string;
hostname: string;
href: string;
no_href: boolean;
noHref: boolean;
pathname: string;
port: string;
protocol: string;
search: string;
shape: string;
target: string;
}
}
class DOMHTMLAreaElement extends DOMHTMLElement implements DOMEventTarget {
static $gtype: GObject.GType;
// Properties
get alt(): string;
set alt(val: string);
get coords(): string;
set coords(val: string);
get hash(): string;
set hash(val: string);
get host(): string;
set host(val: string);
get hostname(): string;
set hostname(val: string);
get href(): string;
set href(val: string);
get no_href(): boolean;
set no_href(val: boolean);
get noHref(): boolean;
set noHref(val: boolean);
get pathname(): string;
set pathname(val: string);
get port(): string;
set port(val: string);
get protocol(): string;
set protocol(val: string);
get search(): string;
set search(val: string);
get shape(): string;
set shape(val: string);
get target(): string;
set target(val: string);
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMHTMLAreaElement.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q]
? Q
: never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
get_alt(): string;
get_coords(): string;
get_hash(): string;
get_host(): string;
get_hostname(): string;
get_href(): string;
get_no_href(): boolean;
get_pathname(): string;
get_port(): string;
get_protocol(): string;
get_search(): string;
get_shape(): string;
get_target(): string;
set_alt(value: string): void;
set_coords(value: string): void;
set_hash(value: string): void;
set_host(value: string): void;
set_hostname(value: string): void;
set_href(value: string): void;
set_no_href(value: boolean): void;
set_pathname(value: string): void;
set_port(value: string): void;
set_protocol(value: string): void;
set_search(value: string): void;
set_shape(value: string): void;
set_target(value: string): void;
// Inherited methods
/**
* Creates a binding between `source_property` on `source` and `target_property`
* on `target`.
*
* Whenever the `source_property` is changed the `target_property` is
* updated using the same value. For instance:
*
*
* ```c
* g_object_bind_property (action, "active", widget, "sensitive", 0);
* ```
*
*
* Will result in the "sensitive" property of the widget #GObject instance to be
* updated with the same value of the "active" property of the action #GObject
* instance.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well.
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. To remove the binding without affecting the
* `source` and the `target` you can just call g_object_unref() on the returned
* #GBinding instance.
*
* Removing the binding by calling g_object_unref() on it must only be done if
* the binding, `source` and `target` are only used from a single thread and it
* is clear that both `source` and `target` outlive the binding. Especially it
* is not safe to rely on this if the binding, `source` or `target` can be
* finalized from different threads. Keep another reference to the binding and
* use g_binding_unbind() instead to be on the safe side.
*
* A #GObject can have multiple bindings.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
): GObject.Binding;
/**
* Complete version of g_object_bind_property().
*
* Creates a binding between `source_property` on `source` and `target_property`
* on `target,` allowing you to set the transformation functions to be used by
* the binding.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well. The `transform_from` function is only used in case
* of bidirectional bindings, otherwise it will be ignored
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. This will release the reference that is
* being held on the #GBinding instance; if you want to hold on to the
* #GBinding instance, you will need to hold a reference to it.
*
* To remove the binding, call g_binding_unbind().
*
* A #GObject can have multiple bindings.
*
* The same `user_data` parameter will be used for both `transform_to`
* and `transform_from` transformation functions; the `notify` function will
* be called once, when the binding is removed. If you need different data
* for each transformation function, please use
* g_object_bind_property_with_closures() instead.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
* @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
* @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property_full(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
transform_to?: GObject.BindingTransformFunc | null,
transform_from?: GObject.BindingTransformFunc | null,
notify?: GLib.DestroyNotify | null,
): GObject.Binding;
// Conflicted with GObject.Object.bind_property_full
bind_property_full(...args: never[]): any;
/**
* This function is intended for #GObject implementations to re-enforce
* a [floating][floating-ref] object reference. Doing this is seldom
* required: all #GInitiallyUnowneds are created with a floating reference
* which usually just needs to be sunken by calling g_object_ref_sink().
*/
force_floating(): void;
/**
* Increases the freeze count on `object`. If the freeze count is
* non-zero, the emission of "notify" signals on `object` is
* stopped. The signals are queued until the freeze count is decreased
* to zero. Duplicate notifications are squashed so that at most one
* #GObject::notify signal is emitted for each property modified while the
* object is frozen.
*
* This is necessary for accessors that modify multiple properties to prevent
* premature notification while the object is still being modified.
*/
freeze_notify(): void;
/**
* Gets a named field from the objects table of associations (see g_object_set_data()).
* @param key name of the key for that association
* @returns the data if found, or %NULL if no such data exists.
*/
get_data(key: string): any | null;
/**
* Gets a property of an object.
*
* The value can be:
* - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
* - a GObject.Value initialized with the expected type of the property
* - a GObject.Value initialized with a type to which the expected type of the property can be transformed
*
* In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
*
* Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
* @param property_name The name of the property to get
* @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
*/
get_property(property_name: string, value: GObject.Value | any): any;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
get_qdata(quark: GLib.Quark): any | null;
/**
* Gets `n_properties` properties for an `object`.
* Obtained properties will be set to `values`. All properties must be valid.
* Warnings will be emitted and undefined behaviour may result if invalid
* properties are passed in.
* @param names the names of each property to get
* @param values the values of each property to get
*/
getv(names: string[], values: (GObject.Value | any)[]): void;
/**
* Checks whether `object` has a [floating][floating-ref] reference.
* @returns %TRUE if @object has a floating reference
*/
is_floating(): boolean;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param property_name the name of a property installed on the class of @object.
*/
notify(property_name: string): void;
/**
* Emits a "notify" signal for the property specified by `pspec` on `object`.
*
* This function omits the property name lookup, hence it is faster than
* g_object_notify().
*
* One way to avoid using g_object_notify() from within the
* class that registered the properties, and using g_object_notify_by_pspec()
* instead, is to store the GParamSpec used with
* g_object_class_install_property() inside a static array, e.g.:
*
*
* ```c
* typedef enum
* {
* PROP_FOO = 1,
* PROP_LAST
* } MyObjectProperty;
*
* static GParamSpec *properties[PROP_LAST];
*
* static void
* my_object_class_init (MyObjectClass *klass)
* {
* properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
* 0, 100,
* 50,
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
* g_object_class_install_property (gobject_class,
* PROP_FOO,
* properties[PROP_FOO]);
* }
* ```
*
*
* and then notify a change on the "foo" property with:
*
*
* ```c
* g_object_notify_by_pspec (self, properties[PROP_FOO]);
* ```
*
* @param pspec the #GParamSpec of a property installed on the class of @object.
*/
notify_by_pspec(pspec: GObject.ParamSpec): void;
/**
* Increases the reference count of `object`.
*
* Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
* of `object` will be propagated to the return type (using the GCC typeof()
* extension), so any casting the caller needs to do on the return type must be
* explicit.
* @returns the same @object
*/
ref(): GObject.Object;
/**
* Increase the reference count of `object,` and possibly remove the
* [floating][floating-ref] reference, if `object` has a floating reference.
*
* In other words, if the object is floating, then this call "assumes
* ownership" of the floating reference, converting it to a normal
* reference by clearing the floating flag while leaving the reference
* count unchanged. If the object is not floating, then this call
* adds a new normal reference increasing the reference count by one.
*
* Since GLib 2.56, the type of `object` will be propagated to the return type
* under the same conditions as for g_object_ref().
* @returns @object
*/
ref_sink(): GObject.Object;
/**
* Releases all references to other objects. This can be used to break
* reference cycles.
*
* This function should only be called from object system implementations.
*/
run_dispose(): void;
/**
* Each object carries around a table of associations from
* strings to pointers. This function lets you set an association.
*
* If the object already had an association with that name,
* the old association will be destroyed.
*
* Internally, the `key` is converted to a #GQuark using g_quark_from_string().
* This means a copy of `key` is kept permanently (even after `object` has been
* finalized) — so it is recommended to only use a small, bounded set of values
* for `key` in your program, to avoid the #GQuark storage growing unbounded.
* @param key name of the key
* @param data data to associate with that key
*/
set_data(key: string, data?: any | null): void;
/**
* Sets a property on an object.
* @param property_name The name of the property to set
* @param value The value to set the property to
*/
set_property(property_name: string, value: GObject.Value | any): void;
/**
* Remove a specified datum from the object's data associations,
* without invoking the association's destroy handler.
* @param key name of the key
* @returns the data if found, or %NULL if no such data exists.
*/
steal_data(key: string): any | null;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata() and removes the `data` from object
* without invoking its destroy() function (if any was
* set).
* Usually, calling this function is only required to update
* user data pointers with a destroy notifier, for example:
*
* ```c
* void
* object_add_to_user_list (GObject *object,
* const gchar *new_string)
* {
* // the quark, naming the object data
* GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
* // retrieve the old string list
* GList *list = g_object_steal_qdata (object, quark_string_list);
*
* // prepend new string
* list = g_list_prepend (list, g_strdup (new_string));
* // this changed 'list', so we need to set it again
* g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
* }
* static void
* free_string_list (gpointer data)
* {
* GList *node, *list = data;
*
* for (node = list; node; node = node->next)
* g_free (node->data);
* g_list_free (list);
* }
* ```
*
* Using g_object_get_qdata() in the above example, instead of
* g_object_steal_qdata() would have left the destroy function set,
* and thus the partial string list would have been freed upon
* g_object_set_qdata_full().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
steal_qdata(quark: GLib.Quark): any | null;
/**
* Reverts the effect of a previous call to
* g_object_freeze_notify(). The freeze count is decreased on `object`
* and when it reaches zero, queued "notify" signals are emitted.
*
* Duplicate notifications for each property are squashed so that at most one
* #GObject::notify signal is emitted for each property, in the reverse order
* in which they have been queued.
*
* It is an error to call this function when the freeze count is zero.
*/
thaw_notify(): void;
/**
* Decreases the reference count of `object`. When its reference count
* drops to 0, the object is finalized (i.e. its memory is freed).
*
* If the pointer to the #GObject may be reused in future (for example, if it is
* an instance variable of another object), it is recommended to clear the
* pointer to %NULL rather than retain a dangling pointer to a potentially
* invalid #GObject instance. Use g_clear_object() for this.
*/
unref(): void;
/**
* This function essentially limits the life time of the `closure` to
* the life time of the object. That is, when the object is finalized,
* the `closure` is invalidated by calling g_closure_invalidate() on
* it, in order to prevent invocations of the closure with a finalized
* (nonexisting) object. Also, g_object_ref() and g_object_unref() are
* added as marshal guards to the `closure,` to ensure that an extra
* reference count is held on `object` during invocation of the
* `closure`. Usually, this function will be called on closures that
* use this `object` as closure data.
* @param closure #GClosure to watch
*/
watch_closure(closure: GObject.Closure): void;
/**
* the `constructed` function is called by g_object_new() as the
* final step of the object creation process. At the point of the call, all
* construction properties have been set on the object. The purpose of this
* call is to allow for object initialisation steps that can only be performed
* after construction properties have been set. `constructed` implementors
* should chain up to the `constructed` call of their parent class to allow it
* to complete its initialisation.
*/
vfunc_constructed(): void;
/**
* emits property change notification for a bunch
* of properties. Overriding `dispatch_properties_changed` should be rarely
* needed.
* @param n_pspecs
* @param pspecs
*/
vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
/**
* the `dispose` function is supposed to drop all references to other
* objects, but keep the instance otherwise intact, so that client method
* invocations still work. It may be run multiple times (due to reference
* loops). Before returning, `dispose` should chain up to the `dispose` method
* of the parent class.
*/
vfunc_dispose(): void;
/**
* instance finalization function, should finish the finalization of
* the instance begun in `dispose` and chain up to the `finalize` method of the
* parent class.
*/
vfunc_finalize(): void;
/**
* the generic getter for all properties of this type. Should be
* overridden for every type with properties.
* @param property_id
* @param value
* @param pspec
*/
vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param pspec
*/
vfunc_notify(pspec: GObject.ParamSpec): void;
/**
* the generic setter for all properties of this type. Should be
* overridden for every type with properties. If implementations of
* `set_property` don't emit property change notification explicitly, this will
* be done implicitly by the type system. However, if the notify signal is
* emitted explicitly, the type system will not emit it a second time.
* @param property_id
* @param value
* @param pspec
*/
vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
* @param id Handler ID of the handler to be disconnected
*/
disconnect(id: number): void;
/**
* Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
* @param properties Object containing the properties to set
*/
set(properties: { [key: string]: any }): void;
/**
* Blocks a handler of an instance so it will not be called during any signal emissions
* @param id Handler ID of the handler to be blocked
*/
block_signal_handler(id: number): void;
/**
* Unblocks a handler so it will be called again during any signal emissions
* @param id Handler ID of the handler to be unblocked
*/
unblock_signal_handler(id: number): void;
/**
* Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
* @param detailedName Name of the signal to stop emission of
*/
stop_emission_by_name(detailedName: string): void;
}
namespace DOMHTMLBRElement {
// Signal signatures
interface SignalSignatures extends DOMHTMLElement.SignalSignatures {
'notify::clear': (pspec: GObject.ParamSpec) => void;
'notify::access-key': (pspec: GObject.ParamSpec) => void;
'notify::content-editable': (pspec: GObject.ParamSpec) => void;
'notify::dir': (pspec: GObject.ParamSpec) => void;
'notify::draggable': (pspec: GObject.ParamSpec) => void;
'notify::hidden': (pspec: GObject.ParamSpec) => void;
'notify::inner-text': (pspec: GObject.ParamSpec) => void;
'notify::is-content-editable': (pspec: GObject.ParamSpec) => void;
'notify::lang': (pspec: GObject.ParamSpec) => void;
'notify::outer-text': (pspec: GObject.ParamSpec) => void;
'notify::spellcheck': (pspec: GObject.ParamSpec) => void;
'notify::tab-index': (pspec: GObject.ParamSpec) => void;
'notify::title': (pspec: GObject.ParamSpec) => void;
'notify::translate': (pspec: GObject.ParamSpec) => void;
'notify::webkitdropzone': (pspec: GObject.ParamSpec) => void;
'notify::attributes': (pspec: GObject.ParamSpec) => void;
'notify::child-element-count': (pspec: GObject.ParamSpec) => void;
'notify::children': (pspec: GObject.ParamSpec) => void;
'notify::class-list': (pspec: GObject.ParamSpec) => void;
'notify::class-name': (pspec: GObject.ParamSpec) => void;
'notify::client-height': (pspec: GObject.ParamSpec) => void;
'notify::client-left': (pspec: GObject.ParamSpec) => void;
'notify::client-top': (pspec: GObject.ParamSpec) => void;
'notify::client-width': (pspec: GObject.ParamSpec) => void;
'notify::first-element-child': (pspec: GObject.ParamSpec) => void;
'notify::id': (pspec: GObject.ParamSpec) => void;
'notify::inner-html': (pspec: GObject.ParamSpec) => void;
'notify::last-element-child': (pspec: GObject.ParamSpec) => void;
'notify::local-name': (pspec: GObject.ParamSpec) => void;
'notify::namespace-uri': (pspec: GObject.ParamSpec) => void;
'notify::next-element-sibling': (pspec: GObject.ParamSpec) => void;
'notify::offset-height': (pspec: GObject.ParamSpec) => void;
'notify::offset-left': (pspec: GObject.ParamSpec) => void;
'notify::offset-parent': (pspec: GObject.ParamSpec) => void;
'notify::offset-top': (pspec: GObject.ParamSpec) => void;
'notify::offset-width': (pspec: GObject.ParamSpec) => void;
'notify::outer-html': (pspec: GObject.ParamSpec) => void;
'notify::prefix': (pspec: GObject.ParamSpec) => void;
'notify::previous-element-sibling': (pspec: GObject.ParamSpec) => void;
'notify::scroll-height': (pspec: GObject.ParamSpec) => void;
'notify::scroll-left': (pspec: GObject.ParamSpec) => void;
'notify::scroll-top': (pspec: GObject.ParamSpec) => void;
'notify::scroll-width': (pspec: GObject.ParamSpec) => void;
'notify::style': (pspec: GObject.ParamSpec) => void;
'notify::tag-name': (pspec: GObject.ParamSpec) => void;
'notify::webkit-region-overset': (pspec: GObject.ParamSpec) => void;
'notify::base-uri': (pspec: GObject.ParamSpec) => void;
'notify::child-nodes': (pspec: GObject.ParamSpec) => void;
'notify::first-child': (pspec: GObject.ParamSpec) => void;
'notify::last-child': (pspec: GObject.ParamSpec) => void;
'notify::next-sibling': (pspec: GObject.ParamSpec) => void;
'notify::node-name': (pspec: GObject.ParamSpec) => void;
'notify::node-type': (pspec: GObject.ParamSpec) => void;
'notify::node-value': (pspec: GObject.ParamSpec) => void;
'notify::owner-document': (pspec: GObject.ParamSpec) => void;
'notify::parent-element': (pspec: GObject.ParamSpec) => void;
'notify::parent-node': (pspec: GObject.ParamSpec) => void;
'notify::previous-sibling': (pspec: GObject.ParamSpec) => void;
'notify::text-content': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMHTMLElement.ConstructorProps, DOMEventTarget.ConstructorProps {
clear: string;
}
}
class DOMHTMLBRElement extends DOMHTMLElement implements DOMEventTarget {
static $gtype: GObject.GType;
// Properties
get clear(): string;
set clear(val: string);
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMHTMLBRElement.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q]
? Q
: never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
get_clear(): string;
set_clear(value: string): void;
// Inherited methods
/**
* Creates a binding between `source_property` on `source` and `target_property`
* on `target`.
*
* Whenever the `source_property` is changed the `target_property` is
* updated using the same value. For instance:
*
*
* ```c
* g_object_bind_property (action, "active", widget, "sensitive", 0);
* ```
*
*
* Will result in the "sensitive" property of the widget #GObject instance to be
* updated with the same value of the "active" property of the action #GObject
* instance.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well.
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. To remove the binding without affecting the
* `source` and the `target` you can just call g_object_unref() on the returned
* #GBinding instance.
*
* Removing the binding by calling g_object_unref() on it must only be done if
* the binding, `source` and `target` are only used from a single thread and it
* is clear that both `source` and `target` outlive the binding. Especially it
* is not safe to rely on this if the binding, `source` or `target` can be
* finalized from different threads. Keep another reference to the binding and
* use g_binding_unbind() instead to be on the safe side.
*
* A #GObject can have multiple bindings.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
): GObject.Binding;
/**
* Complete version of g_object_bind_property().
*
* Creates a binding between `source_property` on `source` and `target_property`
* on `target,` allowing you to set the transformation functions to be used by
* the binding.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well. The `transform_from` function is only used in case
* of bidirectional bindings, otherwise it will be ignored
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. This will release the reference that is
* being held on the #GBinding instance; if you want to hold on to the
* #GBinding instance, you will need to hold a reference to it.
*
* To remove the binding, call g_binding_unbind().
*
* A #GObject can have multiple bindings.
*
* The same `user_data` parameter will be used for both `transform_to`
* and `transform_from` transformation functions; the `notify` function will
* be called once, when the binding is removed. If you need different data
* for each transformation function, please use
* g_object_bind_property_with_closures() instead.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
* @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
* @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property_full(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
transform_to?: GObject.BindingTransformFunc | null,
transform_from?: GObject.BindingTransformFunc | null,
notify?: GLib.DestroyNotify | null,
): GObject.Binding;
// Conflicted with GObject.Object.bind_property_full
bind_property_full(...args: never[]): any;
/**
* This function is intended for #GObject implementations to re-enforce
* a [floating][floating-ref] object reference. Doing this is seldom
* required: all #GInitiallyUnowneds are created with a floating reference
* which usually just needs to be sunken by calling g_object_ref_sink().
*/
force_floating(): void;
/**
* Increases the freeze count on `object`. If the freeze count is
* non-zero, the emission of "notify" signals on `object` is
* stopped. The signals are queued until the freeze count is decreased
* to zero. Duplicate notifications are squashed so that at most one
* #GObject::notify signal is emitted for each property modified while the
* object is frozen.
*
* This is necessary for accessors that modify multiple properties to prevent
* premature notification while the object is still being modified.
*/
freeze_notify(): void;
/**
* Gets a named field from the objects table of associations (see g_object_set_data()).
* @param key name of the key for that association
* @returns the data if found, or %NULL if no such data exists.
*/
get_data(key: string): any | null;
/**
* Gets a property of an object.
*
* The value can be:
* - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
* - a GObject.Value initialized with the expected type of the property
* - a GObject.Value initialized with a type to which the expected type of the property can be transformed
*
* In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
*
* Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
* @param property_name The name of the property to get
* @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
*/
get_property(property_name: string, value: GObject.Value | any): any;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
get_qdata(quark: GLib.Quark): any | null;
/**
* Gets `n_properties` properties for an `object`.
* Obtained properties will be set to `values`. All properties must be valid.
* Warnings will be emitted and undefined behaviour may result if invalid
* properties are passed in.
* @param names the names of each property to get
* @param values the values of each property to get
*/
getv(names: string[], values: (GObject.Value | any)[]): void;
/**
* Checks whether `object` has a [floating][floating-ref] reference.
* @returns %TRUE if @object has a floating reference
*/
is_floating(): boolean;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param property_name the name of a property installed on the class of @object.
*/
notify(property_name: string): void;
/**
* Emits a "notify" signal for the property specified by `pspec` on `object`.
*
* This function omits the property name lookup, hence it is faster than
* g_object_notify().
*
* One way to avoid using g_object_notify() from within the
* class that registered the properties, and using g_object_notify_by_pspec()
* instead, is to store the GParamSpec used with
* g_object_class_install_property() inside a static array, e.g.:
*
*
* ```c
* typedef enum
* {
* PROP_FOO = 1,
* PROP_LAST
* } MyObjectProperty;
*
* static GParamSpec *properties[PROP_LAST];
*
* static void
* my_object_class_init (MyObjectClass *klass)
* {
* properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
* 0, 100,
* 50,
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
* g_object_class_install_property (gobject_class,
* PROP_FOO,
* properties[PROP_FOO]);
* }
* ```
*
*
* and then notify a change on the "foo" property with:
*
*
* ```c
* g_object_notify_by_pspec (self, properties[PROP_FOO]);
* ```
*
* @param pspec the #GParamSpec of a property installed on the class of @object.
*/
notify_by_pspec(pspec: GObject.ParamSpec): void;
/**
* Increases the reference count of `object`.
*
* Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
* of `object` will be propagated to the return type (using the GCC typeof()
* extension), so any casting the caller needs to do on the return type must be
* explicit.
* @returns the same @object
*/
ref(): GObject.Object;
/**
* Increase the reference count of `object,` and possibly remove the
* [floating][floating-ref] reference, if `object` has a floating reference.
*
* In other words, if the object is floating, then this call "assumes
* ownership" of the floating reference, converting it to a normal
* reference by clearing the floating flag while leaving the reference
* count unchanged. If the object is not floating, then this call
* adds a new normal reference increasing the reference count by one.
*
* Since GLib 2.56, the type of `object` will be propagated to the return type
* under the same conditions as for g_object_ref().
* @returns @object
*/
ref_sink(): GObject.Object;
/**
* Releases all references to other objects. This can be used to break
* reference cycles.
*
* This function should only be called from object system implementations.
*/
run_dispose(): void;
/**
* Each object carries around a table of associations from
* strings to pointers. This function lets you set an association.
*
* If the object already had an association with that name,
* the old association will be destroyed.
*
* Internally, the `key` is converted to a #GQuark using g_quark_from_string().
* This means a copy of `key` is kept permanently (even after `object` has been
* finalized) — so it is recommended to only use a small, bounded set of values
* for `key` in your program, to avoid the #GQuark storage growing unbounded.
* @param key name of the key
* @param data data to associate with that key
*/
set_data(key: string, data?: any | null): void;
/**
* Sets a property on an object.
* @param property_name The name of the property to set
* @param value The value to set the property to
*/
set_property(property_name: string, value: GObject.Value | any): void;
/**
* Remove a specified datum from the object's data associations,
* without invoking the association's destroy handler.
* @param key name of the key
* @returns the data if found, or %NULL if no such data exists.
*/
steal_data(key: string): any | null;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata() and removes the `data` from object
* without invoking its destroy() function (if any was
* set).
* Usually, calling this function is only required to update
* user data pointers with a destroy notifier, for example:
*
* ```c
* void
* object_add_to_user_list (GObject *object,
* const gchar *new_string)
* {
* // the quark, naming the object data
* GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
* // retrieve the old string list
* GList *list = g_object_steal_qdata (object, quark_string_list);
*
* // prepend new string
* list = g_list_prepend (list, g_strdup (new_string));
* // this changed 'list', so we need to set it again
* g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
* }
* static void
* free_string_list (gpointer data)
* {
* GList *node, *list = data;
*
* for (node = list; node; node = node->next)
* g_free (node->data);
* g_list_free (list);
* }
* ```
*
* Using g_object_get_qdata() in the above example, instead of
* g_object_steal_qdata() would have left the destroy function set,
* and thus the partial string list would have been freed upon
* g_object_set_qdata_full().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
steal_qdata(quark: GLib.Quark): any | null;
/**
* Reverts the effect of a previous call to
* g_object_freeze_notify(). The freeze count is decreased on `object`
* and when it reaches zero, queued "notify" signals are emitted.
*
* Duplicate notifications for each property are squashed so that at most one
* #GObject::notify signal is emitted for each property, in the reverse order
* in which they have been queued.
*
* It is an error to call this function when the freeze count is zero.
*/
thaw_notify(): void;
/**
* Decreases the reference count of `object`. When its reference count
* drops to 0, the object is finalized (i.e. its memory is freed).
*
* If the pointer to the #GObject may be reused in future (for example, if it is
* an instance variable of another object), it is recommended to clear the
* pointer to %NULL rather than retain a dangling pointer to a potentially
* invalid #GObject instance. Use g_clear_object() for this.
*/
unref(): void;
/**
* This function essentially limits the life time of the `closure` to
* the life time of the object. That is, when the object is finalized,
* the `closure` is invalidated by calling g_closure_invalidate() on
* it, in order to prevent invocations of the closure with a finalized
* (nonexisting) object. Also, g_object_ref() and g_object_unref() are
* added as marshal guards to the `closure,` to ensure that an extra
* reference count is held on `object` during invocation of the
* `closure`. Usually, this function will be called on closures that
* use this `object` as closure data.
* @param closure #GClosure to watch
*/
watch_closure(closure: GObject.Closure): void;
/**
* the `constructed` function is called by g_object_new() as the
* final step of the object creation process. At the point of the call, all
* construction properties have been set on the object. The purpose of this
* call is to allow for object initialisation steps that can only be performed
* after construction properties have been set. `constructed` implementors
* should chain up to the `constructed` call of their parent class to allow it
* to complete its initialisation.
*/
vfunc_constructed(): void;
/**
* emits property change notification for a bunch
* of properties. Overriding `dispatch_properties_changed` should be rarely
* needed.
* @param n_pspecs
* @param pspecs
*/
vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
/**
* the `dispose` function is supposed to drop all references to other
* objects, but keep the instance otherwise intact, so that client method
* invocations still work. It may be run multiple times (due to reference
* loops). Before returning, `dispose` should chain up to the `dispose` method
* of the parent class.
*/
vfunc_dispose(): void;
/**
* instance finalization function, should finish the finalization of
* the instance begun in `dispose` and chain up to the `finalize` method of the
* parent class.
*/
vfunc_finalize(): void;
/**
* the generic getter for all properties of this type. Should be
* overridden for every type with properties.
* @param property_id
* @param value
* @param pspec
*/
vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param pspec
*/
vfunc_notify(pspec: GObject.ParamSpec): void;
/**
* the generic setter for all properties of this type. Should be
* overridden for every type with properties. If implementations of
* `set_property` don't emit property change notification explicitly, this will
* be done implicitly by the type system. However, if the notify signal is
* emitted explicitly, the type system will not emit it a second time.
* @param property_id
* @param value
* @param pspec
*/
vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
* @param id Handler ID of the handler to be disconnected
*/
disconnect(id: number): void;
/**
* Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
* @param properties Object containing the properties to set
*/
set(properties: { [key: string]: any }): void;
/**
* Blocks a handler of an instance so it will not be called during any signal emissions
* @param id Handler ID of the handler to be blocked
*/
block_signal_handler(id: number): void;
/**
* Unblocks a handler so it will be called again during any signal emissions
* @param id Handler ID of the handler to be unblocked
*/
unblock_signal_handler(id: number): void;
/**
* Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
* @param detailedName Name of the signal to stop emission of
*/
stop_emission_by_name(detailedName: string): void;
}
namespace DOMHTMLBaseElement {
// Signal signatures
interface SignalSignatures extends DOMHTMLElement.SignalSignatures {
'notify::href': (pspec: GObject.ParamSpec) => void;
'notify::target': (pspec: GObject.ParamSpec) => void;
'notify::access-key': (pspec: GObject.ParamSpec) => void;
'notify::content-editable': (pspec: GObject.ParamSpec) => void;
'notify::dir': (pspec: GObject.ParamSpec) => void;
'notify::draggable': (pspec: GObject.ParamSpec) => void;
'notify::hidden': (pspec: GObject.ParamSpec) => void;
'notify::inner-text': (pspec: GObject.ParamSpec) => void;
'notify::is-content-editable': (pspec: GObject.ParamSpec) => void;
'notify::lang': (pspec: GObject.ParamSpec) => void;
'notify::outer-text': (pspec: GObject.ParamSpec) => void;
'notify::spellcheck': (pspec: GObject.ParamSpec) => void;
'notify::tab-index': (pspec: GObject.ParamSpec) => void;
'notify::title': (pspec: GObject.ParamSpec) => void;
'notify::translate': (pspec: GObject.ParamSpec) => void;
'notify::webkitdropzone': (pspec: GObject.ParamSpec) => void;
'notify::attributes': (pspec: GObject.ParamSpec) => void;
'notify::child-element-count': (pspec: GObject.ParamSpec) => void;
'notify::children': (pspec: GObject.ParamSpec) => void;
'notify::class-list': (pspec: GObject.ParamSpec) => void;
'notify::class-name': (pspec: GObject.ParamSpec) => void;
'notify::client-height': (pspec: GObject.ParamSpec) => void;
'notify::client-left': (pspec: GObject.ParamSpec) => void;
'notify::client-top': (pspec: GObject.ParamSpec) => void;
'notify::client-width': (pspec: GObject.ParamSpec) => void;
'notify::first-element-child': (pspec: GObject.ParamSpec) => void;
'notify::id': (pspec: GObject.ParamSpec) => void;
'notify::inner-html': (pspec: GObject.ParamSpec) => void;
'notify::last-element-child': (pspec: GObject.ParamSpec) => void;
'notify::local-name': (pspec: GObject.ParamSpec) => void;
'notify::namespace-uri': (pspec: GObject.ParamSpec) => void;
'notify::next-element-sibling': (pspec: GObject.ParamSpec) => void;
'notify::offset-height': (pspec: GObject.ParamSpec) => void;
'notify::offset-left': (pspec: GObject.ParamSpec) => void;
'notify::offset-parent': (pspec: GObject.ParamSpec) => void;
'notify::offset-top': (pspec: GObject.ParamSpec) => void;
'notify::offset-width': (pspec: GObject.ParamSpec) => void;
'notify::outer-html': (pspec: GObject.ParamSpec) => void;
'notify::prefix': (pspec: GObject.ParamSpec) => void;
'notify::previous-element-sibling': (pspec: GObject.ParamSpec) => void;
'notify::scroll-height': (pspec: GObject.ParamSpec) => void;
'notify::scroll-left': (pspec: GObject.ParamSpec) => void;
'notify::scroll-top': (pspec: GObject.ParamSpec) => void;
'notify::scroll-width': (pspec: GObject.ParamSpec) => void;
'notify::style': (pspec: GObject.ParamSpec) => void;
'notify::tag-name': (pspec: GObject.ParamSpec) => void;
'notify::webkit-region-overset': (pspec: GObject.ParamSpec) => void;
'notify::base-uri': (pspec: GObject.ParamSpec) => void;
'notify::child-nodes': (pspec: GObject.ParamSpec) => void;
'notify::first-child': (pspec: GObject.ParamSpec) => void;
'notify::last-child': (pspec: GObject.ParamSpec) => void;
'notify::next-sibling': (pspec: GObject.ParamSpec) => void;
'notify::node-name': (pspec: GObject.ParamSpec) => void;
'notify::node-type': (pspec: GObject.ParamSpec) => void;
'notify::node-value': (pspec: GObject.ParamSpec) => void;
'notify::owner-document': (pspec: GObject.ParamSpec) => void;
'notify::parent-element': (pspec: GObject.ParamSpec) => void;
'notify::parent-node': (pspec: GObject.ParamSpec) => void;
'notify::previous-sibling': (pspec: GObject.ParamSpec) => void;
'notify::text-content': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMHTMLElement.ConstructorProps, DOMEventTarget.ConstructorProps {
href: string;
target: string;
}
}
class DOMHTMLBaseElement extends DOMHTMLElement implements DOMEventTarget {
static $gtype: GObject.GType;
// Properties
get href(): string;
set href(val: string);
get target(): string;
set target(val: string);
/**
* Compile-time signal type information.
*
* This instance property is generated only for TypeScript type checking.
* It is not defined at runtime and should not be accessed in JS code.
* @internal
*/
$signals: DOMHTMLBaseElement.SignalSignatures;
// Constructors
constructor(properties?: Partial, ...args: any[]);
_init(...args: any[]): void;
// Signals
connect(
signal: K,
callback: GObject.SignalCallback,
): number;
connect(signal: string, callback: (...args: any[]) => any): number;
connect_after(
signal: K,
callback: GObject.SignalCallback,
): number;
connect_after(signal: string, callback: (...args: any[]) => any): number;
emit(
signal: K,
...args: GObject.GjsParameters extends [any, ...infer Q]
? Q
: never
): void;
emit(signal: string, ...args: any[]): void;
// Methods
get_href(): string;
get_target(): string;
set_href(value: string): void;
set_target(value: string): void;
// Inherited methods
/**
* Creates a binding between `source_property` on `source` and `target_property`
* on `target`.
*
* Whenever the `source_property` is changed the `target_property` is
* updated using the same value. For instance:
*
*
* ```c
* g_object_bind_property (action, "active", widget, "sensitive", 0);
* ```
*
*
* Will result in the "sensitive" property of the widget #GObject instance to be
* updated with the same value of the "active" property of the action #GObject
* instance.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well.
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. To remove the binding without affecting the
* `source` and the `target` you can just call g_object_unref() on the returned
* #GBinding instance.
*
* Removing the binding by calling g_object_unref() on it must only be done if
* the binding, `source` and `target` are only used from a single thread and it
* is clear that both `source` and `target` outlive the binding. Especially it
* is not safe to rely on this if the binding, `source` or `target` can be
* finalized from different threads. Keep another reference to the binding and
* use g_binding_unbind() instead to be on the safe side.
*
* A #GObject can have multiple bindings.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
): GObject.Binding;
/**
* Complete version of g_object_bind_property().
*
* Creates a binding between `source_property` on `source` and `target_property`
* on `target,` allowing you to set the transformation functions to be used by
* the binding.
*
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
* if `target_property` on `target` changes then the `source_property` on `source`
* will be updated as well. The `transform_from` function is only used in case
* of bidirectional bindings, otherwise it will be ignored
*
* The binding will automatically be removed when either the `source` or the
* `target` instances are finalized. This will release the reference that is
* being held on the #GBinding instance; if you want to hold on to the
* #GBinding instance, you will need to hold a reference to it.
*
* To remove the binding, call g_binding_unbind().
*
* A #GObject can have multiple bindings.
*
* The same `user_data` parameter will be used for both `transform_to`
* and `transform_from` transformation functions; the `notify` function will
* be called once, when the binding is removed. If you need different data
* for each transformation function, please use
* g_object_bind_property_with_closures() instead.
* @param source_property the property on @source to bind
* @param target the target #GObject
* @param target_property the property on @target to bind
* @param flags flags to pass to #GBinding
* @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
* @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
* @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
*/
bind_property_full(
source_property: string,
target: GObject.Object,
target_property: string,
flags: GObject.BindingFlags | null,
transform_to?: GObject.BindingTransformFunc | null,
transform_from?: GObject.BindingTransformFunc | null,
notify?: GLib.DestroyNotify | null,
): GObject.Binding;
// Conflicted with GObject.Object.bind_property_full
bind_property_full(...args: never[]): any;
/**
* This function is intended for #GObject implementations to re-enforce
* a [floating][floating-ref] object reference. Doing this is seldom
* required: all #GInitiallyUnowneds are created with a floating reference
* which usually just needs to be sunken by calling g_object_ref_sink().
*/
force_floating(): void;
/**
* Increases the freeze count on `object`. If the freeze count is
* non-zero, the emission of "notify" signals on `object` is
* stopped. The signals are queued until the freeze count is decreased
* to zero. Duplicate notifications are squashed so that at most one
* #GObject::notify signal is emitted for each property modified while the
* object is frozen.
*
* This is necessary for accessors that modify multiple properties to prevent
* premature notification while the object is still being modified.
*/
freeze_notify(): void;
/**
* Gets a named field from the objects table of associations (see g_object_set_data()).
* @param key name of the key for that association
* @returns the data if found, or %NULL if no such data exists.
*/
get_data(key: string): any | null;
/**
* Gets a property of an object.
*
* The value can be:
* - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
* - a GObject.Value initialized with the expected type of the property
* - a GObject.Value initialized with a type to which the expected type of the property can be transformed
*
* In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
*
* Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
* @param property_name The name of the property to get
* @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
*/
get_property(property_name: string, value: GObject.Value | any): any;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
get_qdata(quark: GLib.Quark): any | null;
/**
* Gets `n_properties` properties for an `object`.
* Obtained properties will be set to `values`. All properties must be valid.
* Warnings will be emitted and undefined behaviour may result if invalid
* properties are passed in.
* @param names the names of each property to get
* @param values the values of each property to get
*/
getv(names: string[], values: (GObject.Value | any)[]): void;
/**
* Checks whether `object` has a [floating][floating-ref] reference.
* @returns %TRUE if @object has a floating reference
*/
is_floating(): boolean;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param property_name the name of a property installed on the class of @object.
*/
notify(property_name: string): void;
/**
* Emits a "notify" signal for the property specified by `pspec` on `object`.
*
* This function omits the property name lookup, hence it is faster than
* g_object_notify().
*
* One way to avoid using g_object_notify() from within the
* class that registered the properties, and using g_object_notify_by_pspec()
* instead, is to store the GParamSpec used with
* g_object_class_install_property() inside a static array, e.g.:
*
*
* ```c
* typedef enum
* {
* PROP_FOO = 1,
* PROP_LAST
* } MyObjectProperty;
*
* static GParamSpec *properties[PROP_LAST];
*
* static void
* my_object_class_init (MyObjectClass *klass)
* {
* properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
* 0, 100,
* 50,
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
* g_object_class_install_property (gobject_class,
* PROP_FOO,
* properties[PROP_FOO]);
* }
* ```
*
*
* and then notify a change on the "foo" property with:
*
*
* ```c
* g_object_notify_by_pspec (self, properties[PROP_FOO]);
* ```
*
* @param pspec the #GParamSpec of a property installed on the class of @object.
*/
notify_by_pspec(pspec: GObject.ParamSpec): void;
/**
* Increases the reference count of `object`.
*
* Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
* of `object` will be propagated to the return type (using the GCC typeof()
* extension), so any casting the caller needs to do on the return type must be
* explicit.
* @returns the same @object
*/
ref(): GObject.Object;
/**
* Increase the reference count of `object,` and possibly remove the
* [floating][floating-ref] reference, if `object` has a floating reference.
*
* In other words, if the object is floating, then this call "assumes
* ownership" of the floating reference, converting it to a normal
* reference by clearing the floating flag while leaving the reference
* count unchanged. If the object is not floating, then this call
* adds a new normal reference increasing the reference count by one.
*
* Since GLib 2.56, the type of `object` will be propagated to the return type
* under the same conditions as for g_object_ref().
* @returns @object
*/
ref_sink(): GObject.Object;
/**
* Releases all references to other objects. This can be used to break
* reference cycles.
*
* This function should only be called from object system implementations.
*/
run_dispose(): void;
/**
* Each object carries around a table of associations from
* strings to pointers. This function lets you set an association.
*
* If the object already had an association with that name,
* the old association will be destroyed.
*
* Internally, the `key` is converted to a #GQuark using g_quark_from_string().
* This means a copy of `key` is kept permanently (even after `object` has been
* finalized) — so it is recommended to only use a small, bounded set of values
* for `key` in your program, to avoid the #GQuark storage growing unbounded.
* @param key name of the key
* @param data data to associate with that key
*/
set_data(key: string, data?: any | null): void;
/**
* Sets a property on an object.
* @param property_name The name of the property to set
* @param value The value to set the property to
*/
set_property(property_name: string, value: GObject.Value | any): void;
/**
* Remove a specified datum from the object's data associations,
* without invoking the association's destroy handler.
* @param key name of the key
* @returns the data if found, or %NULL if no such data exists.
*/
steal_data(key: string): any | null;
/**
* This function gets back user data pointers stored via
* g_object_set_qdata() and removes the `data` from object
* without invoking its destroy() function (if any was
* set).
* Usually, calling this function is only required to update
* user data pointers with a destroy notifier, for example:
*
* ```c
* void
* object_add_to_user_list (GObject *object,
* const gchar *new_string)
* {
* // the quark, naming the object data
* GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
* // retrieve the old string list
* GList *list = g_object_steal_qdata (object, quark_string_list);
*
* // prepend new string
* list = g_list_prepend (list, g_strdup (new_string));
* // this changed 'list', so we need to set it again
* g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
* }
* static void
* free_string_list (gpointer data)
* {
* GList *node, *list = data;
*
* for (node = list; node; node = node->next)
* g_free (node->data);
* g_list_free (list);
* }
* ```
*
* Using g_object_get_qdata() in the above example, instead of
* g_object_steal_qdata() would have left the destroy function set,
* and thus the partial string list would have been freed upon
* g_object_set_qdata_full().
* @param quark A #GQuark, naming the user data pointer
* @returns The user data pointer set, or %NULL
*/
steal_qdata(quark: GLib.Quark): any | null;
/**
* Reverts the effect of a previous call to
* g_object_freeze_notify(). The freeze count is decreased on `object`
* and when it reaches zero, queued "notify" signals are emitted.
*
* Duplicate notifications for each property are squashed so that at most one
* #GObject::notify signal is emitted for each property, in the reverse order
* in which they have been queued.
*
* It is an error to call this function when the freeze count is zero.
*/
thaw_notify(): void;
/**
* Decreases the reference count of `object`. When its reference count
* drops to 0, the object is finalized (i.e. its memory is freed).
*
* If the pointer to the #GObject may be reused in future (for example, if it is
* an instance variable of another object), it is recommended to clear the
* pointer to %NULL rather than retain a dangling pointer to a potentially
* invalid #GObject instance. Use g_clear_object() for this.
*/
unref(): void;
/**
* This function essentially limits the life time of the `closure` to
* the life time of the object. That is, when the object is finalized,
* the `closure` is invalidated by calling g_closure_invalidate() on
* it, in order to prevent invocations of the closure with a finalized
* (nonexisting) object. Also, g_object_ref() and g_object_unref() are
* added as marshal guards to the `closure,` to ensure that an extra
* reference count is held on `object` during invocation of the
* `closure`. Usually, this function will be called on closures that
* use this `object` as closure data.
* @param closure #GClosure to watch
*/
watch_closure(closure: GObject.Closure): void;
/**
* the `constructed` function is called by g_object_new() as the
* final step of the object creation process. At the point of the call, all
* construction properties have been set on the object. The purpose of this
* call is to allow for object initialisation steps that can only be performed
* after construction properties have been set. `constructed` implementors
* should chain up to the `constructed` call of their parent class to allow it
* to complete its initialisation.
*/
vfunc_constructed(): void;
/**
* emits property change notification for a bunch
* of properties. Overriding `dispatch_properties_changed` should be rarely
* needed.
* @param n_pspecs
* @param pspecs
*/
vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
/**
* the `dispose` function is supposed to drop all references to other
* objects, but keep the instance otherwise intact, so that client method
* invocations still work. It may be run multiple times (due to reference
* loops). Before returning, `dispose` should chain up to the `dispose` method
* of the parent class.
*/
vfunc_dispose(): void;
/**
* instance finalization function, should finish the finalization of
* the instance begun in `dispose` and chain up to the `finalize` method of the
* parent class.
*/
vfunc_finalize(): void;
/**
* the generic getter for all properties of this type. Should be
* overridden for every type with properties.
* @param property_id
* @param value
* @param pspec
*/
vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Emits a "notify" signal for the property `property_name` on `object`.
*
* When possible, eg. when signaling a property change from within the class
* that registered the property, you should use g_object_notify_by_pspec()
* instead.
*
* Note that emission of the notify signal may be blocked with
* g_object_freeze_notify(). In this case, the signal emissions are queued
* and will be emitted (in reverse order) when g_object_thaw_notify() is
* called.
* @param pspec
*/
vfunc_notify(pspec: GObject.ParamSpec): void;
/**
* the generic setter for all properties of this type. Should be
* overridden for every type with properties. If implementations of
* `set_property` don't emit property change notification explicitly, this will
* be done implicitly by the type system. However, if the notify signal is
* emitted explicitly, the type system will not emit it a second time.
* @param property_id
* @param value
* @param pspec
*/
vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
/**
* Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
* @param id Handler ID of the handler to be disconnected
*/
disconnect(id: number): void;
/**
* Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
* @param properties Object containing the properties to set
*/
set(properties: { [key: string]: any }): void;
/**
* Blocks a handler of an instance so it will not be called during any signal emissions
* @param id Handler ID of the handler to be blocked
*/
block_signal_handler(id: number): void;
/**
* Unblocks a handler so it will be called again during any signal emissions
* @param id Handler ID of the handler to be unblocked
*/
unblock_signal_handler(id: number): void;
/**
* Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
* @param detailedName Name of the signal to stop emission of
*/
stop_emission_by_name(detailedName: string): void;
}
namespace DOMHTMLBaseFontElement {
// Signal signatures
interface SignalSignatures extends DOMHTMLElement.SignalSignatures {
'notify::access-key': (pspec: GObject.ParamSpec) => void;
'notify::content-editable': (pspec: GObject.ParamSpec) => void;
'notify::dir': (pspec: GObject.ParamSpec) => void;
'notify::draggable': (pspec: GObject.ParamSpec) => void;
'notify::hidden': (pspec: GObject.ParamSpec) => void;
'notify::inner-text': (pspec: GObject.ParamSpec) => void;
'notify::is-content-editable': (pspec: GObject.ParamSpec) => void;
'notify::lang': (pspec: GObject.ParamSpec) => void;
'notify::outer-text': (pspec: GObject.ParamSpec) => void;
'notify::spellcheck': (pspec: GObject.ParamSpec) => void;
'notify::tab-index': (pspec: GObject.ParamSpec) => void;
'notify::title': (pspec: GObject.ParamSpec) => void;
'notify::translate': (pspec: GObject.ParamSpec) => void;
'notify::webkitdropzone': (pspec: GObject.ParamSpec) => void;
'notify::attributes': (pspec: GObject.ParamSpec) => void;
'notify::child-element-count': (pspec: GObject.ParamSpec) => void;
'notify::children': (pspec: GObject.ParamSpec) => void;
'notify::class-list': (pspec: GObject.ParamSpec) => void;
'notify::class-name': (pspec: GObject.ParamSpec) => void;
'notify::client-height': (pspec: GObject.ParamSpec) => void;
'notify::client-left': (pspec: GObject.ParamSpec) => void;
'notify::client-top': (pspec: GObject.ParamSpec) => void;
'notify::client-width': (pspec: GObject.ParamSpec) => void;
'notify::first-element-child': (pspec: GObject.ParamSpec) => void;
'notify::id': (pspec: GObject.ParamSpec) => void;
'notify::inner-html': (pspec: GObject.ParamSpec) => void;
'notify::last-element-child': (pspec: GObject.ParamSpec) => void;
'notify::local-name': (pspec: GObject.ParamSpec) => void;
'notify::namespace-uri': (pspec: GObject.ParamSpec) => void;
'notify::next-element-sibling': (pspec: GObject.ParamSpec) => void;
'notify::offset-height': (pspec: GObject.ParamSpec) => void;
'notify::offset-left': (pspec: GObject.ParamSpec) => void;
'notify::offset-parent': (pspec: GObject.ParamSpec) => void;
'notify::offset-top': (pspec: GObject.ParamSpec) => void;
'notify::offset-width': (pspec: GObject.ParamSpec) => void;
'notify::outer-html': (pspec: GObject.ParamSpec) => void;
'notify::prefix': (pspec: GObject.ParamSpec) => void;
'notify::previous-element-sibling': (pspec: GObject.ParamSpec) => void;
'notify::scroll-height': (pspec: GObject.ParamSpec) => void;
'notify::scroll-left': (pspec: GObject.ParamSpec) => void;
'notify::scroll-top': (pspec: GObject.ParamSpec) => void;
'notify::scroll-width': (pspec: GObject.ParamSpec) => void;
'notify::style': (pspec: GObject.ParamSpec) => void;
'notify::tag-name': (pspec: GObject.ParamSpec) => void;
'notify::webkit-region-overset': (pspec: GObject.ParamSpec) => void;
'notify::base-uri': (pspec: GObject.ParamSpec) => void;
'notify::child-nodes': (pspec: GObject.ParamSpec) => void;
'notify::first-child': (pspec: GObject.ParamSpec) => void;
'notify::last-child': (pspec: GObject.ParamSpec) => void;
'notify::next-sibling': (pspec: GObject.ParamSpec) => void;
'notify::node-name': (pspec: GObject.ParamSpec) => void;
'notify::node-type': (pspec: GObject.ParamSpec) => void;
'notify::node-value': (pspec: GObject.ParamSpec) => void;
'notify::owner-document': (pspec: GObject.ParamSpec) => void;
'notify::parent-element': (pspec: GObject.ParamSpec) => void;
'notify::parent-node': (pspec: GObject.ParamSpec) => void;
'notify::previous-sibling': (pspec: GObject.ParamSpec) => void;
'notify::text-content': (pspec: GObject.ParamSpec) => void;
'notify::core-object': (pspec: GObject.ParamSpec) => void;
}
// Constructor properties interface
interface ConstructorProps extends DOMHTMLElement.ConstructorProps, DOMEventTarget.ConstructorProps {}
}
class DOMHTMLBaseFontElement extends DOMHTMLElement implements DOMEventTarget {
static $gtype: GObject.GType