diff --git a/.gitignore b/.gitignore index 8f66827a0f..97359d29b9 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ debian/files debian/tmp/ obj-x86_64-linux-gnu *.pyc +node_modules/ diff --git a/gir/Atk-1.0.d.ts b/gir/Atk-1.0.d.ts new file mode 100644 index 0000000000..576946458e --- /dev/null +++ b/gir/Atk-1.0.d.ts @@ -0,0 +1,5884 @@ +/** Generated with https://github.com/Gr3q/GIR2TS - If possible do not modify. */ +declare namespace imports.gi.Atk { + /** This construct is only for enabling class multi-inheritance, + * use {@link GObjectAccessible} instead. + */ + interface IGObjectAccessible { + /** + * Gets the GObject for which #obj is the accessible object. + * @returns a #GObject which is the object for which #obj is + * the accessible object + */ + get_object(): GObject.Object; + } + + type GObjectAccessibleInitOptionsMixin = ObjectInitOptions + export interface GObjectAccessibleInitOptions extends GObjectAccessibleInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link GObjectAccessible} instead. + */ + type GObjectAccessibleMixin = IGObjectAccessible & Object; + + /** + * This object class is derived from AtkObject. It can be used as a + * basis for implementing accessible objects for GObjects which are + * not derived from GtkWidget. One example of its use is in providing + * an accessible object for GnomeCanvasItem in the GAIL library. + */ + interface GObjectAccessible extends GObjectAccessibleMixin {} + + class GObjectAccessible { + public constructor(options?: Partial); + /** + * Gets the accessible object for the specified #obj. + * @param obj a #GObject + * @returns a {@link Object} which is the accessible object for + * the #obj + */ + public static for_object(obj: GObject.Object): Object; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Hyperlink} instead. + */ + interface IHyperlink { + readonly end_index: number; + readonly number_of_anchors: number; + /** + * @deprecated + * Please use ATK_STATE_FOCUSABLE for all links, and + * ATK_STATE_FOCUSED for focused links. + * + * Selected link + */ + readonly selected_link: boolean; + readonly start_index: number; + /** + * Gets the index with the hypertext document at which this link ends. + * @returns the index with the hypertext document at which this link ends + */ + get_end_index(): number; + /** + * Gets the number of anchors associated with this hyperlink. + * @returns the number of anchors associated with this hyperlink + */ + get_n_anchors(): number; + /** + * Returns the item associated with this hyperlinks nth anchor. + * For instance, the returned {@link Object} will implement #AtkText + * if #link_ is a text hyperlink, #AtkImage if #link_ is an image + * hyperlink etc. + * + * Multiple anchors are primarily used by client-side image maps. + * @param i a (zero-index) integer specifying the desired anchor + * @returns an {@link Object} associated with this hyperlinks + * i-th anchor + */ + get_object(i: number): Object; + /** + * Gets the index with the hypertext document at which this link begins. + * @returns the index with the hypertext document at which this link begins + */ + get_start_index(): number; + /** + * Get a the URI associated with the anchor specified + * by #i of #link_. + * + * Multiple anchors are primarily used by client-side image maps. + * @param i a (zero-index) integer specifying the desired anchor + * @returns a string specifying the URI + */ + get_uri(i: number): string; + /** + * Indicates whether the link currently displays some or all of its + * content inline. Ordinary HTML links will usually return + * %FALSE, but an inline <src> HTML element will return + * %TRUE. + * @returns whether or not this link displays its content inline. + */ + is_inline(): boolean; + /** + * @deprecated + * Please use ATK_STATE_FOCUSABLE for all links, + * and ATK_STATE_FOCUSED for focused links. + * + * Determines whether this AtkHyperlink is selected + * @returns True if the AtkHyperlink is selected, False otherwise + */ + is_selected_link(): boolean; + /** + * Since the document that a link is associated with may have changed + * this method returns %TRUE if the link is still valid (with + * respect to the document it references) and %FALSE otherwise. + * @returns whether or not this link is still valid + */ + is_valid(): boolean; + /** + * The signal link-activated is emitted when a link is activated. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "link-activated", callback: (owner: this) => void): number; + + connect(signal: "notify::end-index", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::number-of-anchors", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::selected-link", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::start-index", callback: (owner: this, ...args: any) => void): number; + + } + + type HyperlinkInitOptionsMixin = GObject.ObjectInitOptions & ActionInitOptions + export interface HyperlinkInitOptions extends HyperlinkInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Hyperlink} instead. + */ + type HyperlinkMixin = IHyperlink & GObject.Object & Action; + + /** + * An ATK object which encapsulates a link or set of links (for + * instance in the case of client-side image maps) in a hypertext + * document. It may implement the AtkAction interface. AtkHyperlink + * may also be used to refer to inline embedded content, since it + * allows specification of a start and end offset within the host + * AtkHypertext object. + */ + interface Hyperlink extends HyperlinkMixin {} + + class Hyperlink { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Misc} instead. + */ + interface IMisc { + /** + * @deprecated + * Since 2.12. + * + * Take the thread mutex for the GUI toolkit, + * if one exists. + * (This method is implemented by the toolkit ATK implementation layer; + * for instance, for GTK+, GAIL implements this via GDK_THREADS_ENTER). + */ + threads_enter(): void; + /** + * @deprecated + * Since 2.12. + * + * Release the thread mutex for the GUI toolkit, + * if one exists. This method, and atk_misc_threads_enter, + * are needed in some situations by threaded application code which + * services ATK requests, since fulfilling ATK requests often + * requires calling into the GUI toolkit. If a long-running or + * potentially blocking call takes place inside such a block, it should + * be bracketed by atk_misc_threads_leave/atk_misc_threads_enter calls. + * (This method is implemented by the toolkit ATK implementation layer; + * for instance, for GTK+, GAIL implements this via GDK_THREADS_LEAVE). + */ + threads_leave(): void; + } + + type MiscInitOptionsMixin = GObject.ObjectInitOptions + export interface MiscInitOptions extends MiscInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Misc} instead. + */ + type MiscMixin = IMisc & GObject.Object; + + /** + * A set of utility functions for thread locking. This interface and + * all his related methods are deprecated since 2.12. + */ + interface Misc extends MiscMixin {} + + class Misc { + public constructor(options?: Partial); + /** + * @deprecated + * Since 2.12. + * + * Obtain the singleton instance of AtkMisc for this application. + * @returns The singleton instance of AtkMisc for this application. + */ + public static get_instance(): Misc; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link NoOpObject} instead. + */ + interface INoOpObject { + + } + + type NoOpObjectInitOptionsMixin = ObjectInitOptions & ActionInitOptions & ComponentInitOptions & DocumentInitOptions & EditableTextInitOptions & HypertextInitOptions & ImageInitOptions & SelectionInitOptions & TableInitOptions & TableCellInitOptions & TextInitOptions & ValueInitOptions & WindowInitOptions + export interface NoOpObjectInitOptions extends NoOpObjectInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link NoOpObject} instead. + */ + type NoOpObjectMixin = INoOpObject & Object & Action & Component & Document & EditableText & Hypertext & Image & Selection & Table & TableCell & Text & Value & Window; + + /** + * An AtkNoOpObject is an AtkObject which purports to implement all + * ATK interfaces. It is the type of AtkObject which is created if an + * accessible object is requested for an object type for which no + * factory type is specified. + */ + // interface NoOpObject extends NoOpObjectMixin {} + + class NoOpObject { + public constructor(options?: Partial); + /** + * Provides a default (non-functioning stub) {@link Object}. + * Application maintainers should not use this method. + * @param obj a #GObject + * @returns a default (non-functioning stub) {@link Object} + */ + public static new(obj: GObject.Object): Object; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link NoOpObjectFactory} instead. + */ + interface INoOpObjectFactory { + + } + + type NoOpObjectFactoryInitOptionsMixin = ObjectFactoryInitOptions + export interface NoOpObjectFactoryInitOptions extends NoOpObjectFactoryInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link NoOpObjectFactory} instead. + */ + type NoOpObjectFactoryMixin = INoOpObjectFactory & ObjectFactory; + + /** + * The AtkObjectFactory which creates an AtkNoOpObject. An instance of + * this is created by an AtkRegistry if no factory type has not been + * specified to create an accessible object of a particular type. + */ + interface NoOpObjectFactory extends NoOpObjectFactoryMixin {} + + class NoOpObjectFactory { + public constructor(options?: Partial); + /** + * Creates an instance of an {@link ObjectFactory} which generates primitive + * (non-functioning) #AtkObjects. + * @returns an instance of an {@link ObjectFactory} + */ + public static new(): ObjectFactory; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Object} instead. + */ + interface IObject { + readonly accessible_component_layer: number; + readonly accessible_component_mdi_zorder: number; + accessible_description: string; + readonly accessible_hypertext_nlinks: number; + accessible_name: string; + accessible_parent: Object; + accessible_role: Role; + /** + * @deprecated + * Since 1.3. Use table-caption-object instead. + * + * Table caption. + */ + accessible_table_caption: string; + accessible_table_caption_object: Object; + /** + * @deprecated + * Since 2.12. Use {@link Atk.Table.get_column_description} + * and atk_table_set_column_description() instead. + * + * Accessible table column description. + */ + accessible_table_column_description: string; + /** + * @deprecated + * Since 2.12. Use {@link Atk.Table.get_column_header} and + * atk_table_set_column_header() instead. + * + * Accessible table column header. + */ + accessible_table_column_header: Object; + /** + * @deprecated + * Since 2.12. Use {@link Atk.Table.get_row_description} and + * atk_table_set_row_description() instead. + * + * Accessible table row description. + */ + accessible_table_row_description: string; + /** + * @deprecated + * Since 2.12. Use {@link Atk.Table.get_row_header} and + * atk_table_set_row_header() instead. + * + * Accessible table row header. + */ + accessible_table_row_header: Object; + accessible_table_summary: Object; + /** + * @deprecated + * Since 2.12. Use {@link Atk.Value.get_value_and_text} to get + * the value, and value-changed signal to be notified on their value + * changes. + * + * Numeric value of this object, in case being and AtkValue. + */ + accessible_value: number; + readonly description: string; + readonly name: string; + // readonly accessible_parent: Object; + readonly role: Role; + readonly relation_set: RelationSet; + readonly layer: Layer; + /** + * Adds a relationship of the specified type with the specified target. + * @param relationship The {@link RelationType} of the relation + * @param target The {@link Object} which is to be the target of the relation. + * @returns TRUE if the relationship is added. + */ + add_relationship(relationship: RelationType, target: Object): boolean; + /** + * @deprecated + * Connect directly to {@link Object.property_change} or + * the relevant #GObject::notify signal for each desired property. + * + * Calls #handler on property changes. + * @param handler a function to be called when a property changes its value + * @returns a #guint which is the handler id used in + * {@link Atk.Object.remove_property_change_handler} + */ + connect_property_change_handler(handler: PropertyChangeHandler): number; + /** + * Gets the accessible id of the accessible. + * @returns a character string representing the accessible id of the object, or + * NULL if no such string was set. + */ + get_accessible_id(): string; + /** + * Get a list of properties applied to this object as a whole, as an {@link AttributeSet} consisting of + * name-value pairs. As such these attributes may be considered weakly-typed properties or annotations, + * as distinct from strongly-typed object data available via other get/set methods. + * Not all objects have explicit "name-value pair" #AtkAttributeSet properties. + * @returns an {@link AttributeSet} consisting of all + * explicit properties/annotations applied to the object, or an empty + * set if the object has no name-value pair attributes assigned to + * it. This #atkattributeset should be freed by a call to + * {@link Atk.attribute.set_free}. + */ + get_attributes(): AttributeSet; + /** + * Gets the accessible description of the accessible. + * @returns a character string representing the accessible description + * of the accessible. + */ + // get_description(): string; + /** + * Gets the 0-based index of this accessible in its parent; returns -1 if the + * accessible does not have an accessible parent. + * @returns an integer which is the index of the accessible in its parent + */ + get_index_in_parent(): number; + /** + * @deprecated + * Use atk_component_get_layer instead. + * + * Gets the layer of the accessible. + * @returns an {@link Layer} which is the layer of the accessible + */ + get_layer(): Layer; + /** + * @deprecated + * Use atk_component_get_mdi_zorder instead. + * + * Gets the zorder of the accessible. The value G_MININT will be returned + * if the layer of the accessible is not ATK_LAYER_MDI. + * @returns a gint which is the zorder of the accessible, i.e. the depth at + * which the component is shown in relation to other components in the same + * container. + */ + get_mdi_zorder(): number; + /** + * Gets the number of accessible children of the accessible. + * @returns an integer representing the number of accessible children + * of the accessible. + */ + get_n_accessible_children(): number; + /** + * Gets the accessible name of the accessible. + * @returns a character string representing the accessible name of the object. + */ + get_name(): string; + /** + * Gets a UTF-8 string indicating the POSIX-style LC_MESSAGES locale + * of #accessible. + * @returns a UTF-8 string indicating the POSIX-style LC_MESSAGES + * locale of #accessible. + */ + get_object_locale(): string; + /** + * Gets the accessible parent of the accessible. By default this is + * the one assigned with {@link Atk.Object.set_parent}, but it is assumed + * that ATK implementors have ways to get the parent of the object + * without the need of assigning it manually with + * atk_object_set_parent(), and will return it with this method. + * + * If you are only interested on the parent assigned with + * atk_object_set_parent(), use atk_object_peek_parent(). + * @returns an {@link Object} representing the accessible + * parent of the accessible + */ + get_parent(): Object; + /** + * Gets the role of the accessible. + * @returns an {@link Role} which is the role of the accessible + */ + get_role(): Role; + /** + * This function is called when implementing subclasses of {@link Object}. + * It does initialization required for the new object. It is intended + * that this function should called only in the {@link ....new} functions used + * to create an instance of a subclass of #AtkObject + * @param data a #gpointer which identifies the object for which the AtkObject was created. + */ + initialize(data?: any | null): void; + /** + * Emits a state-change signal for the specified state. + * + * Note that as a general rule when the state of an existing object changes, + * emitting a notification is expected. + * @param state an {@link State} whose state is changed + * @param value a gboolean which indicates whether the state is being set on or off + */ + notify_state_change(state: State, value: boolean): void; + /** + * Gets the accessible parent of the accessible, if it has been + * manually assigned with atk_object_set_parent. Otherwise, this + * function returns %NULL. + * + * This method is intended as an utility for ATK implementors, and not + * to be exposed to accessible tools. See {@link Atk.Object.get_parent} for + * further reference. + * @returns an {@link Object} representing the accessible + * parent of the accessible if assigned + */ + peek_parent(): Object; + /** + * Gets a reference to the specified accessible child of the object. + * The accessible children are 0-based so the first accessible child is + * at index 0, the second at index 1 and so on. + * @param i a gint representing the position of the child, starting from 0 + * @returns an {@link Object} representing the specified + * accessible child of the accessible. + */ + ref_accessible_child(i: number): Object; + /** + * Gets the {@link RelationSet} associated with the object. + * @returns an {@link RelationSet} representing the relation set + * of the object. + */ + ref_relation_set(): RelationSet; + /** + * Gets a reference to the state set of the accessible; the caller must + * unreference it when it is no longer needed. + * @returns a reference to an {@link StateSet} which is the state + * set of the accessible + */ + ref_state_set(): StateSet; + /** + * @deprecated + * See {@link Atk.Object.connect_property_change_handler} + * + * Removes a property change handler. + * @param handler_id a guint which identifies the handler to be removed. + */ + remove_property_change_handler(handler_id: number): void; + /** + * Removes a relationship of the specified type with the specified target. + * @param relationship The {@link RelationType} of the relation + * @param target The {@link Object} which is the target of the relation to be removed. + * @returns TRUE if the relationship is removed. + */ + remove_relationship(relationship: RelationType, target: Object): boolean; + /** + * Sets the accessible ID of the accessible. This is not meant to be presented + * to the user, but to be an ID which is stable over application development. + * Typically, this is the gtkbuilder ID. Such an ID will be available for + * instance to identify a given well-known accessible object for tailored screen + * reading, or for automatic regression testing. + * @param name a character string to be set as the accessible id + */ + set_accessible_id(name: string): void; + /** + * Sets the accessible description of the accessible. You can't set + * the description to NULL. This is reserved for the initial value. In + * this aspect NULL is similar to ATK_ROLE_UNKNOWN. If you want to set + * the name to a empty value you can use "". + * @param description a character string to be set as the accessible description + */ + set_description(description: string): void; + /** + * Sets the accessible name of the accessible. You can't set the name + * to NULL. This is reserved for the initial value. In this aspect + * NULL is similar to ATK_ROLE_UNKNOWN. If you want to set the name to + * a empty value you can use "". + * @param name a character string to be set as the accessible name + */ + set_name(name: string): void; + /** + * Sets the accessible parent of the accessible. #parent can be NULL. + * @param parent an {@link Object} to be set as the accessible parent + */ + set_parent(parent: Object): void; + /** + * Sets the role of the accessible. + * @param role an {@link Role} to be set as the role + */ + set_role(role: Role): void; + /** + * The "active-descendant-changed" signal is emitted by an object + * which has the state ATK_STATE_MANAGES_DESCENDANTS when the focus + * object in the object changes. For instance, a table will emit the + * signal when the cell in the table which has focus changes. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - arg1: the newly focused object. + * + * @returns Callback ID + */ + connect(signal: "active-descendant-changed", callback: (owner: this, arg1: Object) => void): number; + /** + * The signal "children-changed" is emitted when a child is added or + * removed form an object. It supports two details: "add" and + * "remove" + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - arg1: The index of the added or removed child. The value can be + * -1. This is used if the value is not known by the implementor + * when the child is added/removed or irrelevant. + * - arg2: A gpointer to the child AtkObject which was added or + * removed. If the child was removed, it is possible that it is not + * available for the implementor. In that case this pointer can be + * NULL. + * + * @returns Callback ID + */ + connect(signal: "children-changed", callback: (owner: this, arg1: number, arg2: Object) => void): number; + /** + * The signal "focus-event" is emitted when an object gained or lost + * focus. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - arg1: a boolean value which indicates whether the object gained + * or lost focus. + * + * @returns Callback ID + */ + connect(signal: "focus-event", callback: (owner: this, arg1: boolean) => void): number; + /** + * The signal "property-change" is emitted when an object's property + * value changes. #arg1 contains an {@link PropertyValues} with the name + * and the new value of the property whose value has changed. Note + * that, as with GObject notify, getting this signal does not + * guarantee that the value of the property has actually changed; it + * may also be emitted when the setter of the property is called to + * reinstate the previous value. + * + * Toolkit implementor note: ATK implementors should use + * {@link GObject.Object.notify} to emit property-changed + * notifications. #AtkObject::property-changed is needed by the + * implementation of atk_add_global_event_listener() because GObject + * notify doesn't support emission hooks. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - arg1: an {@link PropertyValues} containing the new + * value of the property which changed. + * + * @returns Callback ID + */ + connect(signal: "property-change", callback: (owner: this, arg1: PropertyValues) => void): number; + /** + * The "state-change" signal is emitted when an object's state + * changes. The detail value identifies the state type which has + * changed. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - arg1: The name of the state which has changed + * - arg2: A boolean which indicates whether the state has been set or unset. + * + * @returns Callback ID + */ + connect(signal: "state-change", callback: (owner: this, arg1: string, arg2: boolean) => void): number; + /** + * The "visible-data-changed" signal is emitted when the visual + * appearance of the object changed. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "visible-data-changed", callback: (owner: this) => void): number; + + connect(signal: "notify::accessible-component-layer", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::accessible-component-mdi-zorder", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::accessible-description", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::accessible-hypertext-nlinks", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::accessible-name", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::accessible-parent", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::accessible-role", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::accessible-table-caption", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::accessible-table-caption-object", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::accessible-table-column-description", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::accessible-table-column-header", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::accessible-table-row-description", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::accessible-table-row-header", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::accessible-table-summary", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::accessible-value", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::description", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::name", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::accessible_parent", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::role", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::relation_set", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::layer", callback: (owner: this, ...args: any) => void): number; + + } + + type ObjectInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface ObjectInitOptions extends ObjectInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Object} instead. + */ + type ObjectMixin = IObject & GObject.Object; + + /** + * This class is the primary class for accessibility support via the + * Accessibility ToolKit (ATK). Objects which are instances of + * {@link Object} (or instances of AtkObject-derived types) are queried + * for properties which relate basic (and generic) properties of a UI + * component such as name and description. Instances of #AtkObject + * may also be queried as to whether they implement other ATK + * interfaces (e.g. #AtkAction, #AtkComponent, etc.), as appropriate + * to the role which a given UI component plays in a user interface. + * + * All UI components in an application which provide useful + * information or services to the user must provide corresponding + * #AtkObject instances on request (in GTK+, for instance, usually on + * a call to #gtk_widget_get_accessible ()), either via ATK support + * built into the toolkit for the widget class or ancestor class, or + * in the case of custom widgets, if the inherited #AtkObject + * implementation is insufficient, via instances of a new #AtkObject + * subclass. + * + * See also: #AtkObjectFactory, #AtkRegistry. (GTK+ users see also + * #GtkAccessible). + */ + interface Object extends ObjectMixin {} + + class Object { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link ObjectFactory} instead. + */ + interface IObjectFactory { + /** + * Provides an {@link Object} that implements an accessibility interface + * on behalf of #obj + * @param obj a #GObject + * @returns an {@link Object} that implements an accessibility + * interface on behalf of #obj + */ + create_accessible(obj: GObject.Object): Object; + /** + * Gets the GType of the accessible which is created by the factory. + * @returns the type of the accessible which is created by the #factory. + * The value G_TYPE_INVALID is returned if no type if found. + */ + get_accessible_type(): GObject.Type; + /** + * Inform #factory that it is no longer being used to create + * accessibles. When called, #factory may need to inform + * {@link Objects} which it has created that they need to be re-instantiated. + * Note: primarily used for runtime replacement of #AtkObjectFactorys + * in object registries. + */ + invalidate(): void; + } + + type ObjectFactoryInitOptionsMixin = GObject.ObjectInitOptions + export interface ObjectFactoryInitOptions extends ObjectFactoryInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link ObjectFactory} instead. + */ + type ObjectFactoryMixin = IObjectFactory & GObject.Object; + + /** + * This class is the base object class for a factory used to create an + * accessible object for a specific GType. The function + * {@link Atk.Registry.set_factory_type} is normally called to store in the + * registry the factory type to be used to create an accessible of a + * particular GType. + */ + interface ObjectFactory extends ObjectFactoryMixin {} + + class ObjectFactory { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Plug} instead. + */ + interface IPlug { + /** + * Gets the unique ID of an {@link Plug} object, which can be used to + * embed inside of an #AtkSocket using {@link Atk.Socket.embed}. + * + * Internally, this calls a class function that should be registered + * by the IPC layer (usually at-spi2-atk). The implementor of an + * #AtkPlug object should call this function (after atk-bridge is + * loaded) and pass the value to the process implementing the + * #AtkSocket, so it could embed the plug. + * @returns the unique ID for the plug + */ + get_id(): string; + /** + * Sets #child as accessible child of #plug and #plug as accessible parent of + * #child. #child can be NULL. + * + * In some cases, one can not use the AtkPlug type directly as accessible + * object for the toplevel widget of the application. For instance in the gtk + * case, GtkPlugAccessible can not inherit both from GtkWindowAccessible and + * from AtkPlug. In such a case, one can create, in addition to the standard + * accessible object for the toplevel widget, an AtkPlug object, and make the + * former the child of the latter by calling {@link Atk.Plug.set_child}. + * @param child an {@link Object} to be set as accessible child of #plug. + */ + set_child(child: Object): void; + } + + type PlugInitOptionsMixin = ObjectInitOptions & ComponentInitOptions + export interface PlugInitOptions extends PlugInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Plug} instead. + */ + type PlugMixin = IPlug & Object & Component; + + /** + * See {@link Socket} + */ + interface Plug extends PlugMixin {} + + class Plug { + public constructor(options?: Partial); + /** + * Creates a new {@link Plug} instance. + * @returns the newly created {@link Plug} + */ + public static new(): Object; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Registry} instead. + */ + interface IRegistry { + readonly factory_type_registry: any[]; + readonly factory_singleton_cache: any[]; + /** + * Gets an {@link ObjectFactory} appropriate for creating #AtkObjects + * appropriate for #type. + * @param type a #GType with which to look up the associated {@link ObjectFactory} + * @returns an {@link ObjectFactory} appropriate for creating + * #AtkObjects appropriate for #type. + */ + get_factory(type: GObject.Type): ObjectFactory; + /** + * Provides a #GType indicating the {@link ObjectFactory} subclass + * associated with #type. + * @param type a #GType with which to look up the associated {@link ObjectFactory} + * subclass + * @returns a #GType associated with type #type + */ + get_factory_type(type: GObject.Type): GObject.Type; + /** + * Associate an {@link ObjectFactory} subclass with a #GType. Note: + * The associated #factory_type will thereafter be responsible for + * the creation of new #AtkObject implementations for instances + * appropriate for #type. + * @param type an {@link Object} type + * @param factory_type an {@link ObjectFactory} type to associate with #type. Must + * implement AtkObject appropriate for #type. + */ + set_factory_type(type: GObject.Type, factory_type: GObject.Type): void; + connect(signal: "notify::factory_type_registry", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::factory_singleton_cache", callback: (owner: this, ...args: any) => void): number; + + } + + type RegistryInitOptionsMixin = GObject.ObjectInitOptions + export interface RegistryInitOptions extends RegistryInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Registry} instead. + */ + type RegistryMixin = IRegistry & GObject.Object; + + /** + * The AtkRegistry is normally used to create appropriate ATK "peers" + * for user interface components. Application developers usually need + * only interact with the AtkRegistry by associating appropriate ATK + * implementation classes with GObject classes via the + * atk_registry_set_factory_type call, passing the appropriate GType + * for application custom widget classes. + */ + interface Registry extends RegistryMixin {} + + class Registry { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Relation} instead. + */ + interface IRelation { + relation_type: RelationType; + target: GObject.ValueArray; + // readonly target: any[]; + readonly relationship: RelationType; + /** + * Adds the specified AtkObject to the target for the relation, if it is + * not already present. See also {@link Atk.Object.add_relationship}. + * @param target an {@link Object} + */ + add_target(target: Object): void; + /** + * Gets the type of #relation + * @returns the type of #relation + */ + get_relation_type(): RelationType; + /** + * Gets the target list of #relation + * @returns the target list of #relation + */ + get_target(): Object[]; + /** + * Remove the specified AtkObject from the target for the relation. + * @param target an {@link Object} + * @returns TRUE if the removal is successful. + */ + remove_target(target: Object): boolean; + connect(signal: "notify::relation-type", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::target", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::target", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::relationship", callback: (owner: this, ...args: any) => void): number; + + } + + type RelationInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface RelationInitOptions extends RelationInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Relation} instead. + */ + type RelationMixin = IRelation & GObject.Object; + + /** + * An AtkRelation describes a relation between an object and one or + * more other objects. The actual relations that an object has with + * other objects are defined as an AtkRelationSet, which is a set of + * AtkRelations. + */ + interface Relation extends RelationMixin {} + + class Relation { + public constructor(options?: Partial); + /** + * Create a new relation for the specified key and the specified list + * of targets. See also {@link Atk.Object.add_relationship}. + * @param targets an array of pointers to + * {@link Objects} + * @param relationship an {@link RelationType} with which to create the new + * #AtkRelation + * @returns a pointer to a new {@link Relation} + */ + public static new(targets: Object[], relationship: RelationType): Relation; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link RelationSet} instead. + */ + interface IRelationSet { + readonly relations: any[]; + /** + * Add a new relation to the current relation set if it is not already + * present. + * This function ref's the AtkRelation so the caller of this function + * should unref it to ensure that it will be destroyed when the AtkRelationSet + * is destroyed. + * @param relation an {@link Relation} + */ + add(relation: Relation): void; + /** + * Add a new relation of the specified type with the specified target to + * the current relation set if the relation set does not contain a relation + * of that type. If it is does contain a relation of that typea the target + * is added to the relation. + * @param relationship an {@link RelationType} + * @param target an {@link Object} + */ + add_relation_by_type(relationship: RelationType, target: Object): void; + /** + * Determines whether the relation set contains a relation that matches the + * specified type. + * @param relationship an {@link RelationType} + * @returns %TRUE if #relationship is the relationship type of a relation + * in #set, %FALSE otherwise + */ + contains(relationship: RelationType): boolean; + /** + * Determines whether the relation set contains a relation that + * matches the specified pair formed by type #relationship and object + * #target. + * @param relationship an {@link RelationType} + * @param target an {@link Object} + * @returns %TRUE if #set contains a relation with the relationship + * type #relationship with an object #target, %FALSE otherwise + */ + contains_target(relationship: RelationType, target: Object): boolean; + /** + * Determines the number of relations in a relation set. + * @returns an integer representing the number of relations in the set. + */ + get_n_relations(): number; + /** + * Determines the relation at the specified position in the relation set. + * @param i a gint representing a position in the set, starting from 0. + * @returns a {@link Relation}, which is the relation at + * position i in the set. + */ + get_relation(i: number): Relation; + /** + * Finds a relation that matches the specified type. + * @param relationship an {@link RelationType} + * @returns an {@link Relation}, which is a relation matching the + * specified type. + */ + get_relation_by_type(relationship: RelationType): Relation; + /** + * Removes a relation from the relation set. + * This function unref's the {@link Relation} so it will be deleted unless there + * is another reference to it. + * @param relation an {@link Relation} + */ + remove(relation: Relation): void; + connect(signal: "notify::relations", callback: (owner: this, ...args: any) => void): number; + + } + + type RelationSetInitOptionsMixin = GObject.ObjectInitOptions + export interface RelationSetInitOptions extends RelationSetInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link RelationSet} instead. + */ + type RelationSetMixin = IRelationSet & GObject.Object; + + /** + * The AtkRelationSet held by an object establishes its relationships + * with objects beyond the normal "parent/child" hierarchical + * relationships that all user interface objects have. + * AtkRelationSets establish whether objects are labelled or + * controlled by other components, share group membership with other + * components (for instance within a radio-button group), or share + * content which "flows" between them, among other types of possible + * relationships. + */ + interface RelationSet extends RelationSetMixin {} + + class RelationSet { + public constructor(options?: Partial); + /** + * Creates a new empty relation set. + * @returns a new {@link RelationSet} + */ + public static new(): RelationSet; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Socket} instead. + */ + interface ISocket { + /** + * Embeds the children of an {@link Plug} as the children of the + * #AtkSocket. The plug may be in the same process or in a different + * process. + * + * The class item used by this function should be filled in by the IPC + * layer (usually at-spi2-atk). The implementor of the AtkSocket + * should call this function and pass the id for the plug as returned + * by {@link Atk.Plug.get_id}. It is the responsibility of the application + * to pass the plug id on to the process implementing the #AtkSocket + * as needed. + * @param plug_id the ID of an {@link Plug} + */ + embed(plug_id: string): void; + /** + * Determines whether or not the socket has an embedded plug. + * @returns TRUE if a plug is embedded in the socket + */ + is_occupied(): boolean; + } + + type SocketInitOptionsMixin = ObjectInitOptions & ComponentInitOptions + export interface SocketInitOptions extends SocketInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Socket} instead. + */ + type SocketMixin = ISocket & Object & Component; + + /** + * Together with {@link Plug}, #AtkSocket provides the ability to embed + * accessibles from one process into another in a fashion that is + * transparent to assistive technologies. #AtkSocket works as the + * container of #AtkPlug, embedding it using the method + * {@link Atk.Socket.embed}. Any accessible contained in the #AtkPlug will + * appear to the assistive technologies as being inside the + * application that created the #AtkSocket. + * + * The communication between a #AtkSocket and a #AtkPlug is done by + * the IPC layer of the accessibility framework, normally implemented + * by the D-Bus based implementation of AT-SPI (at-spi2). If that is + * the case, at-spi-atk2 is the responsible to implement the abstract + * methods atk_plug_get_id() and atk_socket_embed(), so an ATK + * implementor shouldn't reimplement them. The process that contains + * the #AtkPlug is responsible to send the ID returned by + * atk_plug_id() to the process that contains the #AtkSocket, so it + * could call the method atk_socket_embed() in order to embed it. + * + * For the same reasons, an implementor doesn't need to implement + * atk_object_get_n_accessible_children() and + * atk_object_ref_accessible_child(). All the logic related to those + * functions will be implemented by the IPC layer. + */ + interface Socket extends SocketMixin {} + + class Socket { + public constructor(options?: Partial); + /** + * Creates a new {@link Socket}. + * @returns the newly created {@link Socket} instance + */ + public static new(): Object; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link StateSet} instead. + */ + interface IStateSet { + /** + * Adds the state of the specified type to the state set if it is not already + * present. + * + * Note that because an {@link StateSet} is a read-only object, this method should + * be used to add a state to a newly-created set which will then be returned by + * #atk_object_ref_state_set. It should not be used to modify the existing state + * of an object. See also #atk_object_notify_state_change. + * @param type an {@link StateType} + * @returns %TRUE if the state for #type is not already in #set. + */ + add_state(type: StateType): boolean; + /** + * Adds the states of the specified types to the state set. + * + * Note that because an {@link StateSet} is a read-only object, this method should + * be used to add states to a newly-created set which will then be returned by + * #atk_object_ref_state_set. It should not be used to modify the existing state + * of an object. See also #atk_object_notify_state_change. + * @param types an array of {@link StateType} + */ + add_states(types: StateType[]): void; + /** + * Constructs the intersection of the two sets, returning %NULL if the + * intersection is empty. + * @param compare_set another {@link StateSet} + * @returns a new {@link StateSet} which is the intersection of + * the two sets. + */ + and_sets(compare_set: StateSet): StateSet; + /** + * Removes all states from the state set. + */ + clear_states(): void; + /** + * Checks whether the state for the specified type is in the specified set. + * @param type an {@link StateType} + * @returns %TRUE if #type is the state type is in #set. + */ + contains_state(type: StateType): boolean; + /** + * Checks whether the states for all the specified types are in the + * specified set. + * @param types an array of {@link StateType} + * @returns %TRUE if all the states for #type are in #set. + */ + contains_states(types: StateType[]): boolean; + /** + * Checks whether the state set is empty, i.e. has no states set. + * @returns %TRUE if #set has no states set, otherwise %FALSE + */ + is_empty(): boolean; + /** + * Constructs the union of the two sets. + * @param compare_set another {@link StateSet} + * @returns a new {@link StateSet} which is + * the union of the two sets, returning %NULL is empty. + */ + or_sets(compare_set: StateSet): StateSet | null; + /** + * Removes the state for the specified type from the state set. + * + * Note that because an {@link StateSet} is a read-only object, this method should + * be used to remove a state to a newly-created set which will then be returned + * by #atk_object_ref_state_set. It should not be used to modify the existing + * state of an object. See also #atk_object_notify_state_change. + * @param type an {@link Type} + * @returns %TRUE if #type was the state type is in #set. + */ + remove_state(type: StateType): boolean; + /** + * Constructs the exclusive-or of the two sets, returning %NULL is empty. + * The set returned by this operation contains the states in exactly + * one of the two sets. + * @param compare_set another {@link StateSet} + * @returns a new {@link StateSet} which contains the states + * which are in exactly one of the two sets. + */ + xor_sets(compare_set: StateSet): StateSet; + } + + type StateSetInitOptionsMixin = GObject.ObjectInitOptions + export interface StateSetInitOptions extends StateSetInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link StateSet} instead. + */ + type StateSetMixin = IStateSet & GObject.Object; + + /** + * An AtkStateSet is a read-only representation of the full set of {@link States} + * that apply to an object at a given time. This set is not meant to be + * modified, but rather created when {@link #atk.object_ref_state_set} is called. + */ + interface StateSet extends StateSetMixin {} + + class StateSet { + public constructor(options?: Partial); + /** + * Creates a new empty state set. + * @returns a new {@link StateSet} + */ + public static new(): StateSet; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Util} instead. + */ + interface IUtil { + + } + + type UtilInitOptionsMixin = GObject.ObjectInitOptions + export interface UtilInitOptions extends UtilInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Util} instead. + */ + type UtilMixin = IUtil & GObject.Object; + + /** + * A set of ATK utility functions which are used to support event + * registration of various types, and obtaining the 'root' accessible + * of a process and information about the current ATK implementation + * and toolkit version. + */ + interface Util extends UtilMixin {} + + class Util { + public constructor(options?: Partial); + } + + export interface ActionIfaceInitOptions {} + /** + * The {@link Action} interface should be supported by any object that can + * perform one or more actions. The interface provides the standard + * mechanism for an assistive technology to determine what those actions + * are as well as tell the object to perform them. Any object that can + * be manipulated should support this interface. + */ + interface ActionIface {} + class ActionIface { + public constructor(options?: Partial); + public do_action: {(action: Action, i: number): boolean;}; + public get_n_actions: {(action: Action): number;}; + public get_description: {(action: Action, i: number): string | null;}; + public get_name: {(action: Action, i: number): string | null;}; + public get_keybinding: {(action: Action, i: number): string | null;}; + public set_description: {(action: Action, i: number, desc: string): boolean;}; + public get_localized_name: {(action: Action, i: number): string | null;}; + } + + export interface AttributeInitOptions {} + /** + * AtkAttribute is a string name/value pair representing a generic + * attribute. This can be used to expose additional information from + * an accessible object as a whole (see {@link Atk.Object.get_attributes}) + * or an document (see atk_document_get_attributes()). In the case of + * text attributes (see atk_text_get_default_attributes()), + * {@link TextAttribute} enum defines all the possible text attribute + * names. You can use atk_text_attribute_get_name() to get the string + * name from the enum value. See also atk_text_attribute_for_name() + * and atk_text_attribute_get_value() for more information. + * + * A string name/value pair representing a generic attribute. + */ + interface Attribute {} + class Attribute { + public constructor(options?: Partial); + /** + * Frees the memory used by an {@link AttributeSet}, including all its + * #AtkAttributes. + * @param attrib_set The {@link AttributeSet} to free + */ + public static set_free(attrib_set: AttributeSet): void; + /** + * The attribute name. + */ + public name: string; + /** + * the value of the attribute, represented as a string. + */ + public value: string; + } + + export interface ComponentIfaceInitOptions {} + /** + * The AtkComponent interface should be supported by any object that is + * rendered on the screen. The interface provides the standard mechanism + * for an assistive technology to determine and set the graphical + * representation of an object. + */ + interface ComponentIface {} + class ComponentIface { + public constructor(options?: Partial); + public add_focus_handler: {(component: Component, handler: FocusHandler): number;}; + public contains: {(component: Component, x: number, y: number, coord_type: CoordType): boolean;}; + public ref_accessible_at_point: {(component: Component, x: number, y: number, coord_type: CoordType): Object | null;}; + public get_extents: {(component: Component, coord_type: CoordType): [ x: number | null, y: number | null, width: number | null, height: number | null ];}; + public get_position: {(component: Component, coord_type: CoordType): [ x: number | null, y: number | null ];}; + public get_size: {(component: Component): [ width: number | null, height: number | null ];}; + public grab_focus: {(component: Component): boolean;}; + public remove_focus_handler: {(component: Component, handler_id: number): void;}; + public set_extents: {(component: Component, x: number, y: number, width: number, height: number, coord_type: CoordType): boolean;}; + public set_position: {(component: Component, x: number, y: number, coord_type: CoordType): boolean;}; + public set_size: {(component: Component, width: number, height: number): boolean;}; + public get_layer: {(component: Component): Layer;}; + public get_mdi_zorder: {(component: Component): number;}; + public bounds_changed: {(component: Component, bounds: Rectangle): void;}; + public get_alpha: {(component: Component): number;}; + public scroll_to: {(component: Component, type: ScrollType): boolean;}; + public scroll_to_point: {(component: Component, coords: CoordType, x: number, y: number): boolean;}; + } + + export interface DocumentIfaceInitOptions {} + interface DocumentIface {} + class DocumentIface { + public constructor(options?: Partial); + public get_document_type: {(document: Document): string;}; + public get_document: {(document: Document): any | null;}; + public get_document_locale: {(document: Document): string;}; + public get_document_attributes: {(document: Document): AttributeSet;}; + public get_document_attribute_value: {(document: Document, attribute_name: string): string | null;}; + public set_document_attribute: {(document: Document, attribute_name: string, attribute_value: string): boolean;}; + public get_current_page_number: {(document: Document): number;}; + public get_page_count: {(document: Document): number;}; + } + + export interface EditableTextIfaceInitOptions {} + interface EditableTextIface {} + class EditableTextIface { + public constructor(options?: Partial); + public readonly parent_interface: GObject.TypeInterface; + public set_run_attributes: {(text: EditableText, attrib_set: AttributeSet, start_offset: number, end_offset: number): boolean;}; + public set_text_contents: {(text: EditableText, string: string): void;}; + public insert_text: {(text: EditableText, string: string, length: number, position: number): void;}; + public copy_text: {(text: EditableText, start_pos: number, end_pos: number): void;}; + public cut_text: {(text: EditableText, start_pos: number, end_pos: number): void;}; + public delete_text: {(text: EditableText, start_pos: number, end_pos: number): void;}; + public paste_text: {(text: EditableText, position: number): void;}; + } + + export interface HyperlinkImplIfaceInitOptions {} + interface HyperlinkImplIface {} + class HyperlinkImplIface { + public constructor(options?: Partial); + public get_hyperlink: {(impl: HyperlinkImpl): Hyperlink;}; + } + + export interface HypertextIfaceInitOptions {} + interface HypertextIface {} + class HypertextIface { + public constructor(options?: Partial); + public get_link: {(hypertext: Hypertext, link_index: number): Hyperlink;}; + public get_n_links: {(hypertext: Hypertext): number;}; + public get_link_index: {(hypertext: Hypertext, char_index: number): number;}; + public link_selected: {(hypertext: Hypertext, link_index: number): void;}; + } + + export interface ImageIfaceInitOptions {} + interface ImageIface {} + class ImageIface { + public constructor(options?: Partial); + public get_image_position: {(image: Image, coord_type: CoordType): [ x: number | null, y: number | null ];}; + public get_image_description: {(image: Image): string;}; + public get_image_size: {(image: Image): [ width: number | null, height: number | null ];}; + public set_image_description: {(image: Image, description: string): boolean;}; + public get_image_locale: {(image: Image): string | null;}; + } + + export interface ImplementorInitOptions {} + interface Implementor {} + class Implementor { + public constructor(options?: Partial); + /** + * Gets a reference to an object's {@link Object} implementation, if + * the object implements #AtkObjectIface + * @returns a reference to an object's {@link Object} + * implementation + */ + public ref_accessible(): Object; + } + + export interface KeyEventStructInitOptions {} + /** + * Encapsulates information about a key event. + */ + interface KeyEventStruct {} + class KeyEventStruct { + public constructor(options?: Partial); + /** + * An AtkKeyEventType, generally one of ATK_KEY_EVENT_PRESS or ATK_KEY_EVENT_RELEASE + */ + public type: number; + /** + * A bitmask representing the state of the modifier keys immediately after the event takes place. + * The meaning of the bits is currently defined to match the bitmask used by GDK in + * GdkEventType.state, see + * http://developer.gnome.org/doc/API/2.0/gdk/gdk-Event-Structures.html#GdkEventKey + */ + public state: number; + /** + * A guint representing a keysym value corresponding to those used by GDK and X11: see + * /usr/X11/include/keysymdef.h. + */ + public keyval: number; + /** + * The length of member #string. + */ + public length: number; + /** + * A string containing one of the following: either a string approximating the text that would + * result from this keypress, if the key is a control or graphic character, or a symbolic name for this keypress. + * Alphanumeric and printable keys will have the symbolic key name in this string member, for instance "A". "0", + * "semicolon", "aacute". Keypad keys have the prefix "KP". + */ + public string: string; + /** + * The raw hardware code that generated the key event. This field is raraly useful. + */ + public keycode: number; + /** + * A timestamp in milliseconds indicating when the event occurred. + * These timestamps are relative to a starting point which should be considered arbitrary, + * and only used to compare the dispatch times of events to one another. + */ + public timestamp: number; + } + + export interface PropertyValuesInitOptions {} + /** + * Note: #old_value field of {@link PropertyValues} will not contain a + * valid value. This is a field defined with the purpose of contain + * the previous value of the property, but is not used anymore. + */ + interface PropertyValues {} + class PropertyValues { + public constructor(options?: Partial); + /** + * The name of the ATK property which has changed. + */ + public property_name: string; + /** + * NULL. This field is not used anymore. + */ + public old_value: GObject.Value; + /** + * The new value of the named property. + */ + public new_value: GObject.Value; + } + + export interface RangeInitOptions {} + /** + * {@link Range} are used on #AtkValue, in order to represent the full + * range of a given component (for example an slider or a range + * control), or to define each individual subrange this full range is + * splitted if available. See #AtkValue documentation for further + * details. + */ + interface Range {} + class Range { + public constructor(options?: Partial); + /** + * Creates a new {@link Range}. + * @param lower_limit inferior limit for this range + * @param upper_limit superior limit for this range + * @param description human readable description of this range. + * @returns a new {@link Range} + */ + public static new(lower_limit: number, upper_limit: number, description: string): Range; + /** + * Returns a new {@link Range} that is a exact copy of #src + * @returns a new {@link Range} copy of #src + */ + public copy(): Range; + /** + * Free #range + */ + public free(): void; + /** + * Returns the human readable description of #range + * @returns the human-readable description of #range + */ + public get_description(): string; + /** + * Returns the lower limit of #range + * @returns the lower limit of #range + */ + public get_lower_limit(): number; + /** + * Returns the upper limit of #range + * @returns the upper limit of #range + */ + public get_upper_limit(): number; + } + + export interface RectangleInitOptions {} + /** + * A data structure for holding a rectangle. Those coordinates are + * relative to the component top-level parent. + */ + interface Rectangle {} + class Rectangle { + public constructor(options?: Partial); + /** + * X coordinate of the left side of the rectangle. + */ + public x: number; + /** + * Y coordinate of the top side of the rectangle. + */ + public y: number; + /** + * width of the rectangle. + */ + public width: number; + /** + * height of the rectangle. + */ + public height: number; + } + + export interface SelectionIfaceInitOptions {} + interface SelectionIface {} + class SelectionIface { + public constructor(options?: Partial); + public add_selection: {(selection: Selection, i: number): boolean;}; + public clear_selection: {(selection: Selection): boolean;}; + public ref_selection: {(selection: Selection, i: number): Object | null;}; + public get_selection_count: {(selection: Selection): number;}; + public is_child_selected: {(selection: Selection, i: number): boolean;}; + public remove_selection: {(selection: Selection, i: number): boolean;}; + public select_all_selection: {(selection: Selection): boolean;}; + public selection_changed: {(selection: Selection): void;}; + } + + export interface StreamableContentIfaceInitOptions {} + interface StreamableContentIface {} + class StreamableContentIface { + public constructor(options?: Partial); + public readonly pad1: Function; + public readonly pad2: Function; + public readonly pad3: Function; + public get_n_mime_types: {(streamable: StreamableContent): number;}; + public get_mime_type: {(streamable: StreamableContent, i: number): string;}; + public get_stream: {(streamable: StreamableContent, mime_type: string): GLib.IOChannel;}; + public get_uri: {(streamable: StreamableContent, mime_type: string): string | null;}; + } + + export interface TableCellIfaceInitOptions {} + /** + * AtkTableCell is an interface for cells inside an {@link Table}. + */ + interface TableCellIface {} + class TableCellIface { + public constructor(options?: Partial); + public get_column_span: {(cell: TableCell): number;}; + public get_column_header_cells: {(cell: TableCell): Object[];}; + public get_position: {(cell: TableCell): [ boolean, number, number ];}; + public get_row_span: {(cell: TableCell): number;}; + public get_row_header_cells: {(cell: TableCell): Object[];}; + public get_row_column_span: {(cell: TableCell): [ boolean, number, number, number, number ];}; + public get_table: {(cell: TableCell): Object;}; + } + + export interface TableIfaceInitOptions {} + interface TableIface {} + class TableIface { + public constructor(options?: Partial); + public ref_at: {(table: Table, row: number, column: number): Object;}; + public get_index_at: {(table: Table, row: number, column: number): number;}; + public get_column_at_index: {(table: Table, index_: number): number;}; + public get_row_at_index: {(table: Table, index_: number): number;}; + public get_n_columns: {(table: Table): number;}; + public get_n_rows: {(table: Table): number;}; + public get_column_extent_at: {(table: Table, row: number, column: number): number;}; + public get_row_extent_at: {(table: Table, row: number, column: number): number;}; + public get_caption: {(table: Table): Object | null;}; + public get_column_description: {(table: Table, column: number): string;}; + public get_column_header: {(table: Table, column: number): Object | null;}; + public get_row_description: {(table: Table, row: number): string | null;}; + public get_row_header: {(table: Table, row: number): Object | null;}; + public get_summary: {(table: Table): Object;}; + public set_caption: {(table: Table, caption: Object): void;}; + public set_column_description: {(table: Table, column: number, description: string): void;}; + public set_column_header: {(table: Table, column: number, header: Object): void;}; + public set_row_description: {(table: Table, row: number, description: string): void;}; + public set_row_header: {(table: Table, row: number, header: Object): void;}; + public set_summary: {(table: Table, accessible: Object): void;}; + public get_selected_columns: {(table: Table, selected: number): number;}; + public get_selected_rows: {(table: Table, selected: number): number;}; + public is_column_selected: {(table: Table, column: number): boolean;}; + public is_row_selected: {(table: Table, row: number): boolean;}; + public is_selected: {(table: Table, row: number, column: number): boolean;}; + public add_row_selection: {(table: Table, row: number): boolean;}; + public remove_row_selection: {(table: Table, row: number): boolean;}; + public add_column_selection: {(table: Table, column: number): boolean;}; + public remove_column_selection: {(table: Table, column: number): boolean;}; + public row_inserted: {(table: Table, row: number, num_inserted: number): void;}; + public column_inserted: {(table: Table, column: number, num_inserted: number): void;}; + public row_deleted: {(table: Table, row: number, num_deleted: number): void;}; + public column_deleted: {(table: Table, column: number, num_deleted: number): void;}; + public row_reordered: {(table: Table): void;}; + public column_reordered: {(table: Table): void;}; + public model_changed: {(table: Table): void;}; + } + + export interface TextIfaceInitOptions {} + interface TextIface {} + class TextIface { + public constructor(options?: Partial); + public get_text: {(text: Text, start_offset: number, end_offset: number): string;}; + public get_text_after_offset: {(text: Text, offset: number, boundary_type: TextBoundary): [ string, number, number ];}; + public get_text_at_offset: {(text: Text, offset: number, boundary_type: TextBoundary): [ string, number, number ];}; + public get_character_at_offset: {(text: Text, offset: number): string;}; + public get_text_before_offset: {(text: Text, offset: number, boundary_type: TextBoundary): [ string, number, number ];}; + public get_caret_offset: {(text: Text): number;}; + public get_run_attributes: {(text: Text, offset: number): [ AttributeSet, number, number ];}; + public get_default_attributes: {(text: Text): AttributeSet;}; + public get_character_extents: {(text: Text, offset: number, coords: CoordType): [ x: number | null, y: number | null, width: number | null, height: number | null ];}; + public get_character_count: {(text: Text): number;}; + public get_offset_at_point: {(text: Text, x: number, y: number, coords: CoordType): number;}; + public get_n_selections: {(text: Text): number;}; + public get_selection: {(text: Text, selection_num: number): [ string, number, number ];}; + public add_selection: {(text: Text, start_offset: number, end_offset: number): boolean;}; + public remove_selection: {(text: Text, selection_num: number): boolean;}; + public set_selection: {(text: Text, selection_num: number, start_offset: number, end_offset: number): boolean;}; + public set_caret_offset: {(text: Text, offset: number): boolean;}; + public text_changed: {(text: Text, position: number, length: number): void;}; + public text_caret_moved: {(text: Text, location: number): void;}; + public text_selection_changed: {(text: Text): void;}; + public text_attributes_changed: {(text: Text): void;}; + public get_range_extents: {(text: Text, start_offset: number, end_offset: number, coord_type: CoordType): TextRectangle;}; + public get_bounded_ranges: {(text: Text, rect: TextRectangle, coord_type: CoordType, x_clip_type: TextClipType, y_clip_type: TextClipType): TextRange[];}; + public get_string_at_offset: {(text: Text, offset: number, granularity: TextGranularity): [ string | null, number, number ];}; + public scroll_substring_to: {(text: Text, start_offset: number, end_offset: number, type: ScrollType): boolean;}; + public scroll_substring_to_point: {(text: Text, start_offset: number, end_offset: number, coords: CoordType, x: number, y: number): boolean;}; + } + + export interface TextRangeInitOptions {} + /** + * A structure used to describe a text range. + */ + interface TextRange {} + class TextRange { + public constructor(options?: Partial); + /** + * A rectangle giving the bounds of the text range + */ + public bounds: TextRectangle; + /** + * The start offset of a AtkTextRange + */ + public start_offset: number; + /** + * The end offset of a AtkTextRange + */ + public end_offset: number; + /** + * The text in the text range + */ + public content: string; + } + + export interface TextRectangleInitOptions {} + /** + * A structure used to store a rectangle used by AtkText. + */ + interface TextRectangle {} + class TextRectangle { + public constructor(options?: Partial); + /** + * The horizontal coordinate of a rectangle + */ + public x: number; + /** + * The vertical coordinate of a rectangle + */ + public y: number; + /** + * The width of a rectangle + */ + public width: number; + /** + * The height of a rectangle + */ + public height: number; + } + + export interface ValueIfaceInitOptions {} + interface ValueIface {} + class ValueIface { + public constructor(options?: Partial); + public get_current_value: {(obj: Value): GObject.Value;}; + public get_maximum_value: {(obj: Value): GObject.Value;}; + public get_minimum_value: {(obj: Value): GObject.Value;}; + public set_current_value: {(obj: Value, value: GObject.Value): boolean;}; + public get_minimum_increment: {(obj: Value): GObject.Value;}; + public get_value_and_text: {(obj: Value): [ value: number, text: string | null ];}; + public get_range: {(obj: Value): Range | null;}; + public get_increment: {(obj: Value): number;}; + public get_sub_ranges: {(obj: Value): Range[];}; + public set_value: {(obj: Value, new_value: number): void;}; + } + + export interface WindowIfaceInitOptions {} + interface WindowIface {} + class WindowIface { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Action} instead. + */ + interface IAction { + /** + * Perform the specified action on the object. + * @param i the action index corresponding to the action to be performed + * @returns %TRUE if success, %FALSE otherwise + */ + // do_action(i: number): boolean; + /** + * Returns a description of the specified action of the object. + * @param i the action index corresponding to the action to be performed + * @returns a description string, or %NULL if #action does + * not implement this interface. + */ + // get_description(i: number): string | null; + /** + * Gets the keybinding which can be used to activate this action, if one + * exists. The string returned should contain localized, human-readable, + * key sequences as they would appear when displayed on screen. It must + * be in the format "mnemonic;sequence;shortcut". + * + * - The mnemonic key activates the object if it is presently enabled onscreen. + * This typically corresponds to the underlined letter within the widget. + * Example: "n" in a traditional "New..." menu item or the "a" in "Apply" for + * a button. + * - The sequence is the full list of keys which invoke the action even if the + * relevant element is not currently shown on screen. For instance, for a menu + * item the sequence is the keybindings used to open the parent menus before + * invoking. The sequence string is colon-delimited. Example: "Alt+F:N" in a + * traditional "New..." menu item. + * - The shortcut, if it exists, will invoke the same action without showing + * the component or its enclosing menus or dialogs. Example: "Ctrl+N" in a + * traditional "New..." menu item. + * + * Example: For a traditional "New..." menu item, the expected return value + * would be: "N;Alt+F:N;Ctrl+N" for the English locale and "N;Alt+D:N;Strg+N" + * for the German locale. If, hypothetically, this menu item lacked a mnemonic, + * it would be represented by ";;Ctrl+N" and ";;Strg+N" respectively. + * @param i the action index corresponding to the action to be performed + * @returns the keybinding which can be used to activate + * this action, or %NULL if there is no keybinding for this action. + */ + // get_keybinding(i: number): string | null; + /** + * Returns the localized name of the specified action of the object. + * @param i the action index corresponding to the action to be performed + * @returns a name string, or %NULL if #action does not + * implement this interface. + */ + // get_localized_name(i: number): string | null; + /** + * Gets the number of accessible actions available on the object. + * If there are more than one, the first one is considered the + * "default" action of the object. + * @returns a the number of actions, or 0 if #action does not + * implement this interface. + */ + // get_n_actions(): number; + /** + * Returns a non-localized string naming the specified action of the + * object. This name is generally not descriptive of the end result + * of the action, but instead names the 'interaction type' which the + * object supports. By convention, the above strings should be used to + * represent the actions which correspond to the common point-and-click + * interaction techniques of the same name: i.e. + * "click", "press", "release", "drag", "drop", "popup", etc. + * The "popup" action should be used to pop up a context menu for the + * object, if one exists. + * + * For technical reasons, some toolkits cannot guarantee that the + * reported action is actually 'bound' to a nontrivial user event; + * i.e. the result of some actions via {@link Atk.Action.do_action} may be + * NIL. + * @param i the action index corresponding to the action to be performed + * @returns a name string, or %NULL if #action does not + * implement this interface. + */ + // get_name(i: number): string | null; + /** + * Sets a description of the specified action of the object. + * @param i the action index corresponding to the action to be performed + * @param desc the description to be assigned to this action + * @returns a gboolean representing if the description was successfully set; + */ + // set_description(i: number, desc: string): boolean; + } + + type ActionInitOptionsMixin = {}; + export interface ActionInitOptions extends ActionInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Action} instead. + */ + type ActionMixin = IAction; + + /** + * {@link Action} should be implemented by instances of #AtkObject classes + * with which the user can interact directly, i.e. buttons, + * checkboxes, scrollbars, e.g. components which are not "passive" + * providers of UI information. + * + * Exceptions: when the user interaction is already covered by another + * appropriate interface such as #AtkEditableText (insert/delete text, + * etc.) or #AtkValue (set value) then these actions should not be + * exposed by #AtkAction as well. + * + * Though most UI interactions on components should be invocable via + * keyboard as well as mouse, there will generally be a close mapping + * between "mouse actions" that are possible on a component and the + * AtkActions. Where mouse and keyboard actions are redundant in + * effect, #AtkAction should expose only one action rather than + * exposing redundant actions if possible. By convention we have been + * using "mouse centric" terminology for #AtkAction names. + */ + interface Action extends ActionMixin {} + + class Action { + public constructor(options?: Partial); + } + + + + /** This construct is only for enabling class multi-inheritance, + * use {@link Component} instead. + */ + interface IComponent { + /** + * @deprecated + * If you need to track when an object gains or + * lose the focus, use the {@link Object.state_change} "focused" notification instead. + * + * Add the specified handler to the set of functions to be called + * when this object receives focus events (in or out). If the handler is + * already added it is not added again + * @param handler The {@link FocusHandler} to be attached to #component + * @returns a handler id which can be used in {@link Atk.Component.remove_focus_handler} + * or zero if the handler was already added. + */ + add_focus_handler(handler: FocusHandler): number; + /** + * Checks whether the specified point is within the extent of the #component. + * + * Toolkit implementor note: ATK provides a default implementation for + * this virtual method. In general there are little reason to + * re-implement it. + * @param x x coordinate + * @param y y coordinate + * @param coord_type specifies whether the coordinates are relative to the screen + * or to the components top level window + * @returns %TRUE or %FALSE indicating whether the specified point is within + * the extent of the #component or not + */ + contains(x: number, y: number, coord_type: CoordType): boolean; + /** + * Returns the alpha value (i.e. the opacity) for this + * #component, on a scale from 0 (fully transparent) to 1.0 + * (fully opaque). + * @returns An alpha value from 0 to 1.0, inclusive. + */ + get_alpha(): number; + /** + * Gets the rectangle which gives the extent of the #component. + * + * If the extent can not be obtained (e.g. a non-embedded plug or missing + * support), all of x, y, width, height are set to -1. + * @param coord_type specifies whether the coordinates are relative to the screen + * or to the components top level window + * @returns address of #gint to put x coordinate + * + * address of #gint to put y coordinate + * + * address of #gint to put width + * + * address of #gint to put height + */ + get_extents(coord_type: CoordType): [ x: number | null, y: number | null, width: number | null, height: number | null ]; + /** + * Gets the layer of the component. + * @returns an {@link Layer} which is the layer of the component + */ + get_layer(): Layer; + /** + * Gets the zorder of the component. The value G_MININT will be returned + * if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW. + * @returns a gint which is the zorder of the component, i.e. the depth at + * which the component is shown in relation to other components in the same + * container. + */ + get_mdi_zorder(): number; + /** + * @deprecated + * Since 2.12. Use {@link Atk.Component.get_extents} instead. + * + * Gets the position of #component in the form of + * a point specifying #component's top-left corner. + * + * If the position can not be obtained (e.g. a non-embedded plug or missing + * support), x and y are set to -1. + * @param coord_type specifies whether the coordinates are relative to the screen + * or to the components top level window + * @returns address of #gint to put x coordinate position + * + * address of #gint to put y coordinate position + */ + // get_position(coord_type: CoordType): [ x: number | null, y: number | null ]; + /** + * @deprecated + * Since 2.12. Use {@link Atk.Component.get_extents} instead. + * + * Gets the size of the #component in terms of width and height. + * + * If the size can not be obtained (e.g. a non-embedded plug or missing + * support), width and height are set to -1. + * @returns address of #gint to put width of #component + * + * address of #gint to put height of #component + */ + get_size(): [ width: number | null, height: number | null ]; + /** + * Grabs focus for this #component. + * @returns %TRUE if successful, %FALSE otherwise. + */ + // grab_focus(): boolean; + /** + * Gets a reference to the accessible child, if one exists, at the + * coordinate point specified by #x and #y. + * @param x x coordinate + * @param y y coordinate + * @param coord_type specifies whether the coordinates are relative to the screen + * or to the components top level window + * @returns a reference to the accessible + * child, if one exists + */ + ref_accessible_at_point(x: number, y: number, coord_type: CoordType): Object | null; + /** + * @deprecated + * If you need to track when an object gains or + * lose the focus, use the {@link Object.state_change} "focused" notification instead. + * + * Remove the handler specified by #handler_id from the list of + * functions to be executed when this object receives focus events + * (in or out). + * @param handler_id the handler id of the focus handler to be removed + * from #component + */ + remove_focus_handler(handler_id: number): void; + /** + * Makes #component visible on the screen by scrolling all necessary parents. + * + * Contrary to atk_component_set_position, this does not actually move + * #component in its parent, this only makes the parents scroll so that the + * object shows up on the screen, given its current position within the parents. + * @param type specify where the object should be made visible. + * @returns whether scrolling was successful. + */ + scroll_to(type: ScrollType): boolean; + /** + * Move the top-left of #component to a given position of the screen by + * scrolling all necessary parents. + * @param coords specify whether coordinates are relative to the screen or to the + * parent object. + * @param x x-position where to scroll to + * @param y y-position where to scroll to + * @returns whether scrolling was successful. + */ + scroll_to_point(coords: CoordType, x: number, y: number): boolean; + /** + * Sets the extents of #component. + * @param x x coordinate + * @param y y coordinate + * @param width width to set for #component + * @param height height to set for #component + * @param coord_type specifies whether the coordinates are relative to the screen + * or to the components top level window + * @returns %TRUE or %FALSE whether the extents were set or not + */ + set_extents(x: number, y: number, width: number, height: number, coord_type: CoordType): boolean; + /** + * Sets the position of #component. + * + * Contrary to atk_component_scroll_to, this does not trigger any scrolling, + * this just moves #component in its parent. + * @param x x coordinate + * @param y y coordinate + * @param coord_type specifies whether the coordinates are relative to the screen + * or to the component's top level window + * @returns %TRUE or %FALSE whether or not the position was set or not + */ + set_position(x: number, y: number, coord_type: CoordType): boolean; + /** + * Set the size of the #component in terms of width and height. + * @param width width to set for #component + * @param height height to set for #component + * @returns %TRUE or %FALSE whether the size was set or not + */ + set_size(width: number, height: number): boolean; + /** + * The 'bounds-changed" signal is emitted when the bposition or + * size of the component changes. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - arg1: The AtkRectangle giving the new position and size. + * + * @returns Callback ID + */ + connect(signal: "bounds-changed", callback: (owner: this, arg1: Rectangle) => void): number; + + } + + type ComponentInitOptionsMixin = {}; + export interface ComponentInitOptions extends ComponentInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Component} instead. + */ + type ComponentMixin = IComponent; + + /** + * {@link Component} should be implemented by most if not all UI elements + * with an actual on-screen presence, i.e. components which can be + * said to have a screen-coordinate bounding box. Virtually all + * widgets will need to have #AtkComponent implementations provided + * for their corresponding #AtkObject class. In short, only UI + * elements which are *not* GUI elements will omit this ATK interface. + * + * A possible exception might be textual information with a + * transparent background, in which case text glyph bounding box + * information is provided by #AtkText. + */ + interface Component extends ComponentMixin {} + + class Component { + public constructor(options?: Partial); + } + + + + /** This construct is only for enabling class multi-inheritance, + * use {@link Document} instead. + */ + interface IDocument { + /** + * Retrieves the value of the given #attribute_name inside #document. + * @param attribute_name a character string representing the name of the attribute + * whose value is being queried. + * @returns a string value associated with the named + * attribute for this document, or %NULL if a value for + * #attribute_name has not been specified for this document. + */ + get_attribute_value(attribute_name: string): string | null; + /** + * Gets an AtkAttributeSet which describes document-wide + * attributes as name-value pairs. + * @returns An AtkAttributeSet containing the explicitly + * set name-value-pair attributes associated with this document + * as a whole. + */ + get_attributes(): AttributeSet; + /** + * Retrieves the current page number inside #document. + * @returns the current page number inside #document, or -1 if + * not implemented, not know by the implementor, or irrelevant. + */ + get_current_page_number(): number; + /** + * @deprecated + * Since 2.12. #document is already a representation of + * the document. Use it directly, or one of its children, as an + * instance of the DOM. + * + * Gets a %gpointer that points to an instance of the DOM. It is + * up to the caller to check atk_document_get_type to determine + * how to cast this pointer. + * @returns a %gpointer that points to an instance of the DOM. + */ + get_document(): any | null; + /** + * @deprecated + * Since 2.12. Please use {@link Atk.Document.get_attributes} to + * ask for the document type if it applies. + * + * Gets a string indicating the document type. + * @returns a string indicating the document type + */ + get_document_type(): string; + /** + * @deprecated + * Please use {@link Atk.Object.get_object_locale} instead. + * + * Gets a UTF-8 string indicating the POSIX-style LC_MESSAGES locale + * of the content of this document instance. Individual + * text substrings or images within this document may have + * a different locale, see atk_text_get_attributes and + * atk_image_get_image_locale. + * @returns a UTF-8 string indicating the POSIX-style LC_MESSAGES + * locale of the document content as a whole, or NULL if + * the document content does not specify a locale. + */ + get_locale(): string; + /** + * Retrieves the total number of pages inside #document. + * @returns total page count of #document, or -1 if not implemented, + * not know by the implementor or irrelevant. + */ + get_page_count(): number; + /** + * Sets the value for the given #attribute_name inside #document. + * @param attribute_name a character string representing the name of the attribute + * whose value is being set. + * @param attribute_value a string value to be associated with #attribute_name. + * @returns %TRUE if #attribute_value is successfully associated + * with #attribute_name for this #document, and %FALSE if if the + * document does not allow the attribute to be modified + */ + set_attribute_value(attribute_name: string, attribute_value: string): boolean; + /** + * The 'load-complete' signal is emitted when a pending load of + * a static document has completed. This signal is to be + * expected by ATK clients if and when AtkDocument implementors + * expose ATK_STATE_BUSY. If the state of an AtkObject which + * implements AtkDocument does not include ATK_STATE_BUSY, it + * should be safe for clients to assume that the AtkDocument's + * static contents are fully loaded into the container. + * (Dynamic document contents should be exposed via other + * signals.) + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "load-complete", callback: (owner: this) => void): number; + /** + * The 'load-stopped' signal is emitted when a pending load of + * document contents is cancelled, paused, or otherwise + * interrupted by the user or application logic. It should not + * however be emitted while waiting for a resource (for instance + * while blocking on a file or network read) unless a + * user-significant timeout has occurred. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "load-stopped", callback: (owner: this) => void): number; + /** + * The 'page-changed' signal is emitted when the current page of + * a document changes, e.g. pressing page up/down in a document + * viewer. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - page_number: the new page number. If this value is unknown + * or not applicable, -1 should be provided. + * + * @returns Callback ID + */ + connect(signal: "page-changed", callback: (owner: this, page_number: number) => void): number; + /** + * The 'reload' signal is emitted when the contents of a + * document is refreshed from its source. Once 'reload' has + * been emitted, a matching 'load-complete' or 'load-stopped' + * signal should follow, which clients may await before + * interrogating ATK for the latest document content. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "reload", callback: (owner: this) => void): number; + + } + + type DocumentInitOptionsMixin = {}; + export interface DocumentInitOptions extends DocumentInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Document} instead. + */ + type DocumentMixin = IDocument; + + /** + * The AtkDocument interface should be supported by any object whose + * content is a representation or view of a document. The AtkDocument + * interface should appear on the toplevel container for the document + * content; however AtkDocument instances may be nested (i.e. an + * AtkDocument may be a descendant of another AtkDocument) in those + * cases where one document contains "embedded content" which can + * reasonably be considered a document in its own right. + */ + interface Document extends DocumentMixin {} + + class Document { + public constructor(options?: Partial); + } + + + + /** This construct is only for enabling class multi-inheritance, + * use {@link EditableText} instead. + */ + interface IEditableText { + /** + * Copy text from #start_pos up to, but not including #end_pos + * to the clipboard. + * @param start_pos start position + * @param end_pos end position + */ + copy_text(start_pos: number, end_pos: number): void; + /** + * Copy text from #start_pos up to, but not including #end_pos + * to the clipboard and then delete from the widget. + * @param start_pos start position + * @param end_pos end position + */ + cut_text(start_pos: number, end_pos: number): void; + /** + * Delete text #start_pos up to, but not including #end_pos. + * @param start_pos start position + * @param end_pos end position + */ + delete_text(start_pos: number, end_pos: number): void; + /** + * Insert text at a given position. + * @param string the text to insert + * @param length the length of text to insert, in bytes + * @param position The caller initializes this to + * the position at which to insert the text. After the call it + * points at the position after the newly inserted text. + */ + insert_text(string: string, length: number, position: number): void; + /** + * Paste text from clipboard to specified #position. + * @param position position to paste + */ + paste_text(position: number): void; + /** + * Sets the attributes for a specified range. See the ATK_ATTRIBUTE + * macros (such as #ATK_ATTRIBUTE_LEFT_MARGIN) for examples of attributes + * that can be set. Note that other attributes that do not have corresponding + * ATK_ATTRIBUTE macros may also be set for certain text widgets. + * @param attrib_set an {@link AttributeSet} + * @param start_offset start of range in which to set attributes + * @param end_offset end of range in which to set attributes + * @returns %TRUE if attributes successfully set for the specified + * range, otherwise %FALSE + */ + set_run_attributes(attrib_set: AttributeSet, start_offset: number, end_offset: number): boolean; + /** + * Set text contents of #text. + * @param string string to set for text contents of #text + */ + set_text_contents(string: string): void; + } + + type EditableTextInitOptionsMixin = {}; + export interface EditableTextInitOptions extends EditableTextInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link EditableText} instead. + */ + type EditableTextMixin = IEditableText; + + /** + * {@link EditableText} should be implemented by UI components which + * contain text which the user can edit, via the #AtkObject + * corresponding to that component (see #AtkObject). + * + * #AtkEditableText is a subclass of #AtkText, and as such, an object + * which implements #AtkEditableText is by definition an #AtkText + * implementor as well. + * + * See also: #AtkText + */ + interface EditableText extends EditableTextMixin {} + + class EditableText { + public constructor(options?: Partial); + } + + + + /** This construct is only for enabling class multi-inheritance, + * use {@link HyperlinkImpl} instead. + */ + interface IHyperlinkImpl { + /** + * Gets the hyperlink associated with this object. + * @returns an AtkHyperlink object which points to this + * implementing AtkObject. + */ + get_hyperlink(): Hyperlink; + } + + type HyperlinkImplInitOptionsMixin = {}; + export interface HyperlinkImplInitOptions extends HyperlinkImplInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link HyperlinkImpl} instead. + */ + type HyperlinkImplMixin = IHyperlinkImpl; + + /** + * AtkHyperlinkImpl allows AtkObjects to refer to their associated + * AtkHyperlink instance, if one exists. AtkHyperlinkImpl differs + * from AtkHyperlink in that AtkHyperlinkImpl is an interface, whereas + * AtkHyperlink is a object type. The AtkHyperlinkImpl interface + * allows a client to query an AtkObject for the availability of an + * associated AtkHyperlink instance, and obtain that instance. It is + * thus particularly useful in cases where embedded content or inline + * content within a text object is present, since the embedding text + * object implements AtkHypertext and the inline/embedded objects are + * exposed as children which implement AtkHyperlinkImpl, in addition + * to their being obtainable via AtkHypertext:getLink followed by + * AtkHyperlink:getObject. + * + * The AtkHyperlinkImpl interface should be supported by objects + * exposed within the hierarchy as children of an AtkHypertext + * container which correspond to "links" or embedded content within + * the text. HTML anchors are not, for instance, normally exposed + * this way, but embedded images and components which appear inline in + * the content of a text object are. The AtkHyperlinkIface interface + * allows a means of determining which children are hyperlinks in this + * sense of the word, and for obtaining their corresponding + * AtkHyperlink object, from which the embedding range, URI, etc. can + * be obtained. + * + * To some extent this interface exists because, for historical + * reasons, AtkHyperlink was defined as an object type, not an + * interface. Thus, in order to interact with AtkObjects via + * AtkHyperlink semantics, a new interface was required. + */ + interface HyperlinkImpl extends HyperlinkImplMixin {} + + class HyperlinkImpl { + public constructor(options?: Partial); + } + + + + /** This construct is only for enabling class multi-inheritance, + * use {@link Hypertext} instead. + */ + interface IHypertext { + /** + * Gets the link in this hypertext document at index + * #link_index + * @param link_index an integer specifying the desired link + * @returns the link in this hypertext document at + * index #link_index + */ + get_link(link_index: number): Hyperlink; + /** + * Gets the index into the array of hyperlinks that is associated with + * the character specified by #char_index. + * @param char_index a character index + * @returns an index into the array of hyperlinks in #hypertext, + * or -1 if there is no hyperlink associated with this character. + */ + get_link_index(char_index: number): number; + /** + * Gets the number of links within this hypertext document. + * @returns the number of links within this hypertext document + */ + get_n_links(): number; + /** + * The "link-selected" signal is emitted by an AtkHyperText + * object when one of the hyperlinks associated with the object + * is selected. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - arg1: the index of the hyperlink which is selected + * + * @returns Callback ID + */ + connect(signal: "link-selected", callback: (owner: this, arg1: number) => void): number; + + } + + type HypertextInitOptionsMixin = {}; + export interface HypertextInitOptions extends HypertextInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Hypertext} instead. + */ + type HypertextMixin = IHypertext; + + /** + * An interface used for objects which implement linking between + * multiple resource or content locations, or multiple 'markers' + * within a single document. A Hypertext instance is associated with + * one or more Hyperlinks, which are associated with particular + * offsets within the Hypertext's included content. While this + * interface is derived from Text, there is no requirement that + * Hypertext instances have textual content; they may implement Image + * as well, and Hyperlinks need not have non-zero text offsets. + */ + interface Hypertext extends HypertextMixin {} + + class Hypertext { + public constructor(options?: Partial); + } + + + + /** This construct is only for enabling class multi-inheritance, + * use {@link Image} instead. + */ + interface IImage { + /** + * Get a textual description of this image. + * @returns a string representing the image description + */ + get_image_description(): string; + /** + * Retrieves the locale identifier associated to the {@link Image}. + * @returns a string corresponding to the POSIX + * `LC_MESSAGES` locale used by the image description, or + * %NULL if the image does not specify a locale. + */ + get_image_locale(): string | null; + /** + * Gets the position of the image in the form of a point specifying the + * images top-left corner. + * + * If the position can not be obtained (e.g. missing support), x and y are set + * to -1. + * @param coord_type specifies whether the coordinates are relative to the screen + * or to the components top level window + * @returns address of #gint to put x coordinate position; otherwise, -1 if value cannot be obtained. + * + * address of #gint to put y coordinate position; otherwise, -1 if value cannot be obtained. + */ + get_image_position(coord_type: CoordType): [ x: number | null, y: number | null ]; + /** + * Get the width and height in pixels for the specified image. + * The values of #width and #height are returned as -1 if the + * values cannot be obtained (for instance, if the object is not onscreen). + * + * If the size can not be obtained (e.g. missing support), x and y are set + * to -1. + * @returns filled with the image width, or -1 if the value cannot be obtained. + * + * filled with the image height, or -1 if the value cannot be obtained. + */ + get_image_size(): [ width: number | null, height: number | null ]; + /** + * Sets the textual description for this image. + * @param description a string description to set for #image + * @returns boolean TRUE, or FALSE if operation could + * not be completed. + */ + set_image_description(description: string): boolean; + } + + type ImageInitOptionsMixin = {}; + export interface ImageInitOptions extends ImageInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Image} instead. + */ + type ImageMixin = IImage; + + /** + * {@link Image} should be implemented by #AtkObject subtypes on behalf of + * components which display image/pixmap information onscreen, and + * which provide information (other than just widget borders, etc.) + * via that image content. For instance, icons, buttons with icons, + * toolbar elements, and image viewing panes typically should + * implement #AtkImage. + * + * #AtkImage primarily provides two types of information: coordinate + * information (useful for screen review mode of screenreaders, and + * for use by onscreen magnifiers), and descriptive information. The + * descriptive information is provided for alternative, text-only + * presentation of the most significant information present in the + * image. + */ + interface Image extends ImageMixin {} + + class Image { + public constructor(options?: Partial); + } + + + + /** This construct is only for enabling class multi-inheritance, + * use {@link ImplementorIface} instead. + */ + interface IImplementorIface { + + } + + type ImplementorIfaceInitOptionsMixin = {}; + export interface ImplementorIfaceInitOptions extends ImplementorIfaceInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link ImplementorIface} instead. + */ + type ImplementorIfaceMixin = IImplementorIface; + + /** + * The AtkImplementor interface is implemented by objects for which + * AtkObject peers may be obtained via calls to + * iface->(ref_accessible)(implementor); + */ + interface ImplementorIface extends ImplementorIfaceMixin {} + + class ImplementorIface { + public constructor(options?: Partial); + } + + + + /** This construct is only for enabling class multi-inheritance, + * use {@link Selection} instead. + */ + interface ISelection { + /** + * Adds the specified accessible child of the object to the + * object's selection. + * @param i a #gint specifying the child index. + * @returns TRUE if success, FALSE otherwise. + */ + add_selection(i: number): boolean; + /** + * Clears the selection in the object so that no children in the object + * are selected. + * @returns TRUE if success, FALSE otherwise. + */ + clear_selection(): boolean; + /** + * Gets the number of accessible children currently selected. + * Note: callers should not rely on %NULL or on a zero value for + * indication of whether AtkSelectionIface is implemented, they should + * use type checking/interface checking macros or the + * {@link Atk.get_accessible_value} convenience method. + * @returns a gint representing the number of items selected, or 0 + * if #selection does not implement this interface. + */ + get_selection_count(): number; + /** + * Determines if the current child of this object is selected + * Note: callers should not rely on %NULL or on a zero value for + * indication of whether AtkSelectionIface is implemented, they should + * use type checking/interface checking macros or the + * {@link Atk.get_accessible_value} convenience method. + * @param i a #gint specifying the child index. + * @returns a gboolean representing the specified child is selected, or 0 + * if #selection does not implement this interface. + */ + is_child_selected(i: number): boolean; + /** + * Gets a reference to the accessible object representing the specified + * selected child of the object. + * Note: callers should not rely on %NULL or on a zero value for + * indication of whether AtkSelectionIface is implemented, they should + * use type checking/interface checking macros or the + * {@link Atk.get_accessible_value} convenience method. + * @param i a #gint specifying the index in the selection set. (e.g. the + * ith selection as opposed to the ith child). + * @returns an {@link Object} representing the + * selected accessible, or %NULL if #selection does not implement this + * interface. + */ + ref_selection(i: number): Object | null; + /** + * Removes the specified child of the object from the object's selection. + * @param i a #gint specifying the index in the selection set. (e.g. the + * ith selection as opposed to the ith child). + * @returns TRUE if success, FALSE otherwise. + */ + remove_selection(i: number): boolean; + /** + * Causes every child of the object to be selected if the object + * supports multiple selections. + * @returns TRUE if success, FALSE otherwise. + */ + select_all_selection(): boolean; + /** + * The "selection-changed" signal is emitted by an object which + * implements AtkSelection interface when the selection changes. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "selection-changed", callback: (owner: this) => void): number; + + } + + type SelectionInitOptionsMixin = {}; + export interface SelectionInitOptions extends SelectionInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Selection} instead. + */ + type SelectionMixin = ISelection; + + /** + * {@link Selection} should be implemented by UI components with children + * which are exposed by #atk_object_ref_child and + * #atk_object_get_n_children, if the use of the parent UI component + * ordinarily involves selection of one or more of the objects + * corresponding to those #AtkObject children - for example, + * selectable lists. + * + * Note that other types of "selection" (for instance text selection) + * are accomplished a other ATK interfaces - #AtkSelection is limited + * to the selection/deselection of children. + */ + interface Selection extends SelectionMixin {} + + class Selection { + public constructor(options?: Partial); + } + + + + /** This construct is only for enabling class multi-inheritance, + * use {@link StreamableContent} instead. + */ + interface IStreamableContent { + /** + * Gets the character string of the specified mime type. The first mime + * type is at position 0, the second at position 1, and so on. + * @param i a gint representing the position of the mime type starting from 0 + * @returns a gchar* representing the specified mime type; the caller + * should not free the character string. + */ + get_mime_type(i: number): string; + /** + * Gets the number of mime types supported by this object. + * @returns a gint which is the number of mime types supported by the object. + */ + get_n_mime_types(): number; + /** + * Gets the content in the specified mime type. + * @param mime_type a gchar* representing the mime type + * @returns A #GIOChannel which contains the content in the + * specified mime type. + */ + get_stream(mime_type: string): GLib.IOChannel; + /** + * Get a string representing a URI in IETF standard format + * (see http://www.ietf.org/rfc/rfc2396.txt) from which the object's content + * may be streamed in the specified mime-type, if one is available. + * If mime_type is NULL, the URI for the default (and possibly only) mime-type is + * returned. + * + * Note that it is possible for get_uri to return NULL but for + * get_stream to work nonetheless, since not all GIOChannels connect to URIs. + * @param mime_type a gchar* representing the mime type, or NULL to request a URI + * for the default mime type. + * @returns Returns a string representing a URI, or %NULL + * if no corresponding URI can be constructed. + */ + get_uri(mime_type: string): string | null; + } + + type StreamableContentInitOptionsMixin = {}; + export interface StreamableContentInitOptions extends StreamableContentInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link StreamableContent} instead. + */ + type StreamableContentMixin = IStreamableContent; + + /** + * An interface whereby an object allows its backing content to be + * streamed to clients. Typical implementors would be images or + * icons, HTML content, or multimedia display/rendering widgets. + * + * Negotiation of content type is allowed. Clients may examine the + * backing data and transform, convert, or parse the content in order + * to present it in an alternate form to end-users. + * + * The AtkStreamableContent interface is particularly useful for + * saving, printing, or post-processing entire documents, or for + * persisting alternate views of a document. If document content + * itself is being serialized, stored, or converted, then use of the + * AtkStreamableContent interface can help address performance + * issues. Unlike most ATK interfaces, this interface is not strongly + * tied to the current user-agent view of the a particular document, + * but may in some cases give access to the underlying model data. + */ + interface StreamableContent extends StreamableContentMixin {} + + class StreamableContent { + public constructor(options?: Partial); + } + + + + /** This construct is only for enabling class multi-inheritance, + * use {@link Table} instead. + */ + interface ITable { + /** + * Adds the specified #column to the selection. + * @param column a #gint representing a column in #table + * @returns a gboolean representing if the column was successfully added to + * the selection, or 0 if value does not implement this interface. + */ + add_column_selection(column: number): boolean; + /** + * Adds the specified #row to the selection. + * @param row a #gint representing a row in #table + * @returns a gboolean representing if row was successfully added to selection, + * or 0 if value does not implement this interface. + */ + add_row_selection(row: number): boolean; + /** + * Gets the caption for the #table. + * @returns a AtkObject* representing the + * table caption, or %NULL if value does not implement this interface. + */ + get_caption(): Object | null; + /** + * @deprecated + * Since 2.12. + * + * Gets a #gint representing the column at the specified #index_. + * @param index_ a #gint representing an index in #table + * @returns a gint representing the column at the specified index, + * or -1 if the table does not implement this method. + */ + get_column_at_index(index_: number): number; + /** + * Gets the description text of the specified #column in the table + * @param column a #gint representing a column in #table + * @returns a gchar* representing the column description, or %NULL + * if value does not implement this interface. + */ + get_column_description(column: number): string; + /** + * Gets the number of columns occupied by the accessible object + * at the specified #row and #column in the #table. + * @param row a #gint representing a row in #table + * @param column a #gint representing a column in #table + * @returns a gint representing the column extent at specified position, or 0 + * if value does not implement this interface. + */ + get_column_extent_at(row: number, column: number): number; + /** + * Gets the column header of a specified column in an accessible table. + * @param column a #gint representing a column in the table + * @returns a AtkObject* representing the + * specified column header, or %NULL if value does not implement this + * interface. + */ + get_column_header(column: number): Object | null; + /** + * @deprecated + * Since 2.12. Use {@link Atk.Table.ref_at} in order to get the + * accessible that represents the cell at (#row, #column) + * + * Gets a #gint representing the index at the specified #row and + * #column. + * @param row a #gint representing a row in #table + * @param column a #gint representing a column in #table + * @returns a #gint representing the index at specified position. + * The value -1 is returned if the object at row,column is not a child + * of table or table does not implement this interface. + */ + get_index_at(row: number, column: number): number; + /** + * Gets the number of columns in the table. + * @returns a gint representing the number of columns, or 0 + * if value does not implement this interface. + */ + get_n_columns(): number; + /** + * Gets the number of rows in the table. + * @returns a gint representing the number of rows, or 0 + * if value does not implement this interface. + */ + get_n_rows(): number; + /** + * @deprecated + * since 2.12. + * + * Gets a #gint representing the row at the specified #index_. + * @param index_ a #gint representing an index in #table + * @returns a gint representing the row at the specified index, + * or -1 if the table does not implement this method. + */ + get_row_at_index(index_: number): number; + /** + * Gets the description text of the specified row in the table + * @param row a #gint representing a row in #table + * @returns a gchar* representing the row description, or + * %NULL if value does not implement this interface. + */ + get_row_description(row: number): string | null; + /** + * Gets the number of rows occupied by the accessible object + * at a specified #row and #column in the #table. + * @param row a #gint representing a row in #table + * @param column a #gint representing a column in #table + * @returns a gint representing the row extent at specified position, or 0 + * if value does not implement this interface. + */ + get_row_extent_at(row: number, column: number): number; + /** + * Gets the row header of a specified row in an accessible table. + * @param row a #gint representing a row in the table + * @returns a AtkObject* representing the + * specified row header, or %NULL if value does not implement this + * interface. + */ + get_row_header(row: number): Object | null; + /** + * Gets the selected columns of the table by initializing **selected with + * the selected column numbers. This array should be freed by the caller. + * @param selected a #gint** that is to contain the selected columns numbers + * @returns a gint representing the number of selected columns, + * or %0 if value does not implement this interface. + */ + get_selected_columns(selected: number): number; + /** + * Gets the selected rows of the table by initializing **selected with + * the selected row numbers. This array should be freed by the caller. + * @param selected a #gint** that is to contain the selected row numbers + * @returns a gint representing the number of selected rows, + * or zero if value does not implement this interface. + */ + get_selected_rows(selected: number): number; + /** + * Gets the summary description of the table. + * @returns a AtkObject* representing a summary description + * of the table, or zero if value does not implement this interface. + */ + get_summary(): Object; + /** + * Gets a boolean value indicating whether the specified #column + * is selected + * @param column a #gint representing a column in #table + * @returns a gboolean representing if the column is selected, or 0 + * if value does not implement this interface. + */ + is_column_selected(column: number): boolean; + /** + * Gets a boolean value indicating whether the specified #row + * is selected + * @param row a #gint representing a row in #table + * @returns a gboolean representing if the row is selected, or 0 + * if value does not implement this interface. + */ + is_row_selected(row: number): boolean; + /** + * Gets a boolean value indicating whether the accessible object + * at the specified #row and #column is selected + * @param row a #gint representing a row in #table + * @param column a #gint representing a column in #table + * @returns a gboolean representing if the cell is selected, or 0 + * if value does not implement this interface. + */ + is_selected(row: number, column: number): boolean; + /** + * Get a reference to the table cell at #row, #column. This cell + * should implement the interface {@link TableCell} + * @param row a #gint representing a row in #table + * @param column a #gint representing a column in #table + * @returns an {@link Object} representing the referred + * to accessible + */ + ref_at(row: number, column: number): Object; + /** + * Adds the specified #column to the selection. + * @param column a #gint representing a column in #table + * @returns a gboolean representing if the column was successfully removed from + * the selection, or 0 if value does not implement this interface. + */ + remove_column_selection(column: number): boolean; + /** + * Removes the specified #row from the selection. + * @param row a #gint representing a row in #table + * @returns a gboolean representing if the row was successfully removed from + * the selection, or 0 if value does not implement this interface. + */ + remove_row_selection(row: number): boolean; + /** + * Sets the caption for the table. + * @param caption a {@link Object} representing the caption to set for #table + */ + set_caption(caption: Object): void; + /** + * Sets the description text for the specified #column of the #table. + * @param column a #gint representing a column in #table + * @param description a #gchar representing the description text + * to set for the specified #column of the #table + */ + set_column_description(column: number, description: string): void; + /** + * Sets the specified column header to #header. + * @param column a #gint representing a column in #table + * @param header an {@link Table} + */ + set_column_header(column: number, header: Object): void; + /** + * Sets the description text for the specified #row of #table. + * @param row a #gint representing a row in #table + * @param description a #gchar representing the description text + * to set for the specified #row of #table + */ + set_row_description(row: number, description: string): void; + /** + * Sets the specified row header to #header. + * @param row a #gint representing a row in #table + * @param header an {@link Table} + */ + set_row_header(row: number, header: Object): void; + /** + * Sets the summary description of the table. + * @param accessible an {@link Object} representing the summary description + * to set for #table + */ + set_summary(accessible: Object): void; + /** + * The "column-deleted" signal is emitted by an object which + * implements the AtkTable interface when a column is deleted. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - arg1: The index of the first column deleted. + * - arg2: The number of columns deleted. + * + * @returns Callback ID + */ + connect(signal: "column-deleted", callback: (owner: this, arg1: number, arg2: number) => void): number; + /** + * The "column-inserted" signal is emitted by an object which + * implements the AtkTable interface when a column is inserted. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - arg1: The index of the column inserted. + * - arg2: The number of colums inserted. + * + * @returns Callback ID + */ + connect(signal: "column-inserted", callback: (owner: this, arg1: number, arg2: number) => void): number; + /** + * The "column-reordered" signal is emitted by an object which + * implements the AtkTable interface when the columns are + * reordered. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "column-reordered", callback: (owner: this) => void): number; + /** + * The "model-changed" signal is emitted by an object which + * implements the AtkTable interface when the model displayed by + * the table changes. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "model-changed", callback: (owner: this) => void): number; + /** + * The "row-deleted" signal is emitted by an object which + * implements the AtkTable interface when a row is deleted. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - arg1: The index of the first row deleted. + * - arg2: The number of rows deleted. + * + * @returns Callback ID + */ + connect(signal: "row-deleted", callback: (owner: this, arg1: number, arg2: number) => void): number; + /** + * The "row-inserted" signal is emitted by an object which + * implements the AtkTable interface when a row is inserted. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - arg1: The index of the first row inserted. + * - arg2: The number of rows inserted. + * + * @returns Callback ID + */ + connect(signal: "row-inserted", callback: (owner: this, arg1: number, arg2: number) => void): number; + /** + * The "row-reordered" signal is emitted by an object which + * implements the AtkTable interface when the rows are + * reordered. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "row-reordered", callback: (owner: this) => void): number; + + } + + type TableInitOptionsMixin = {}; + export interface TableInitOptions extends TableInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Table} instead. + */ + type TableMixin = ITable; + + /** + * {@link Table} should be implemented by components which present + * elements ordered via rows and columns. It may also be used to + * present tree-structured information if the nodes of the trees can + * be said to contain multiple "columns". Individual elements of an + * #AtkTable are typically referred to as "cells". Those cells should + * implement the interface #AtkTableCell, but #Atk doesn't require + * them to be direct children of the current #AtkTable. They can be + * grand-children, grand-grand-children etc. #AtkTable provides the + * API needed to get a individual cell based on the row and column + * numbers. + * + * Children of #AtkTable are frequently "lightweight" objects, that + * is, they may not have backing widgets in the host UI toolkit. They + * are therefore often transient. + * + * Since tables are often very complex, #AtkTable includes provision + * for offering simplified summary information, as well as row and + * column headers and captions. Headers and captions are #AtkObjects + * which may implement other interfaces (#AtkText, #AtkImage, etc.) as + * appropriate. #AtkTable summaries may themselves be (simplified) + * #AtkTables, etc. + * + * Note for implementors: in the past, #AtkTable required that all the + * cells should be direct children of #AtkTable, and provided some + * index based methods to request the cells. The practice showed that + * that forcing made #AtkTable implementation complex, and hard to + * expose other kind of children, like rows or captions. Right now, + * index-based methods are deprecated. + */ + interface Table extends TableMixin {} + + class Table { + public constructor(options?: Partial); + } + + + + /** This construct is only for enabling class multi-inheritance, + * use {@link TableCell} instead. + */ + interface ITableCell { + /** + * Returns the column headers as an array of cell accessibles. + * @returns a GPtrArray of AtkObjects + * representing the column header cells. + */ + get_column_header_cells(): Object[]; + /** + * Returns the number of columns occupied by this cell accessible. + * @returns a gint representing the number of columns occupied by this cell, + * or 0 if the cell does not implement this method. + */ + get_column_span(): number; + /** + * Retrieves the tabular position of this cell. + * @returns TRUE if successful; FALSE otherwise. + * + * the row of the given cell. + * + * the column of the given cell. + */ + get_position(): [ boolean, number, number ]; + /** + * Gets the row and column indexes and span of this cell accessible. + * + * Note: If the object does not implement this function, then, by default, atk + * will implement this function by calling get_row_span and get_column_span + * on the object. + * @returns TRUE if successful; FALSE otherwise. + * + * the row index of the given cell. + * + * the column index of the given cell. + * + * the number of rows occupied by this cell. + * + * the number of columns occupied by this cell. + */ + get_row_column_span(): [ boolean, number, number, number, number ]; + /** + * Returns the row headers as an array of cell accessibles. + * @returns a GPtrArray of AtkObjects + * representing the row header cells. + */ + get_row_header_cells(): Object[]; + /** + * Returns the number of rows occupied by this cell accessible. + * @returns a gint representing the number of rows occupied by this cell, + * or 0 if the cell does not implement this method. + */ + get_row_span(): number; + /** + * Returns a reference to the accessible of the containing table. + * @returns the atk object for the containing table. + */ + get_table(): Object; + } + + type TableCellInitOptionsMixin = {}; + export interface TableCellInitOptions extends TableCellInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link TableCell} instead. + */ + type TableCellMixin = ITableCell; + + /** + * Being {@link Table} a component which present elements ordered via rows + * and columns, an #AtkTableCell is the interface which each of those + * elements, so "cells" should implement. + * + * See also #AtkTable. + */ + interface TableCell extends TableCellMixin {} + + class TableCell { + public constructor(options?: Partial); + } + + + + /** This construct is only for enabling class multi-inheritance, + * use {@link Text} instead. + */ + interface IText { + /** + * Adds a selection bounded by the specified offsets. + * @param start_offset the starting character offset of the selected region + * @param end_offset the offset of the first character after the selected region. + * @returns %TRUE if successful, %FALSE otherwise + */ + add_selection(start_offset: number, end_offset: number): boolean; + /** + * Get the ranges of text in the specified bounding box. + * @param rect An AtkTextRectangle giving the dimensions of the bounding box. + * @param coord_type Specify whether coordinates are relative to the screen or widget window. + * @param x_clip_type Specify the horizontal clip type. + * @param y_clip_type Specify the vertical clip type. + * @returns Array of AtkTextRange. The last + * element of the array returned by this function will be NULL. + */ + get_bounded_ranges(rect: TextRectangle, coord_type: CoordType, x_clip_type: TextClipType, y_clip_type: TextClipType): TextRange[]; + /** + * Gets the offset of the position of the caret (cursor). + * @returns the character offset of the position of the caret or -1 if + * the caret is not located inside the element or in the case of + * any other failure. + */ + get_caret_offset(): number; + /** + * Gets the specified text. + * @param offset a character offset within #text + * @returns the character at #offset or 0 in the case of failure. + */ + get_character_at_offset(offset: number): string; + /** + * Gets the character count. + * @returns the number of characters or -1 in case of failure. + */ + get_character_count(): number; + /** + * If the extent can not be obtained (e.g. missing support), all of x, y, width, + * height are set to -1. + * + * Get the bounding box containing the glyph representing the character at + * a particular text offset. + * @param offset The offset of the text character for which bounding information is required. + * @param coords specify whether coordinates are relative to the screen or widget window + * @returns Pointer for the x coordinate of the bounding box + * + * Pointer for the y coordinate of the bounding box + * + * Pointer for the width of the bounding box + * + * Pointer for the height of the bounding box + */ + get_character_extents(offset: number, coords: CoordType): [ x: number | null, y: number | null, width: number | null, height: number | null ]; + /** + * Creates an {@link AttributeSet} which consists of the default values of + * attributes for the text. See the enum AtkTextAttribute for types of text + * attributes that can be returned. Note that other attributes may also be + * returned. + * @returns an {@link AttributeSet} which contains the default text + * attributes for this #AtkText. This #AtkAttributeSet should be freed by + * a call to {@link Atk.attribute.set_free}. + */ + get_default_attributes(): AttributeSet; + /** + * Gets the number of selected regions. + * @returns The number of selected regions, or -1 in the case of failure. + */ + get_n_selections(): number; + /** + * Gets the offset of the character located at coordinates #x and #y. #x and #y + * are interpreted as being relative to the screen or this widget's window + * depending on #coords. + * @param x screen x-position of character + * @param y screen y-position of character + * @param coords specify whether coordinates are relative to the screen or + * widget window + * @returns the offset to the character which is located at the specified + * #x and #y coordinates of -1 in case of failure. + */ + get_offset_at_point(x: number, y: number, coords: CoordType): number; + /** + * Get the bounding box for text within the specified range. + * + * If the extents can not be obtained (e.g. or missing support), the rectangle + * fields are set to -1. + * @param start_offset The offset of the first text character for which boundary + * information is required. + * @param end_offset The offset of the text character after the last character + * for which boundary information is required. + * @param coord_type Specify whether coordinates are relative to the screen or widget window. + * @returns A pointer to a AtkTextRectangle which is filled in by this function. + */ + get_range_extents(start_offset: number, end_offset: number, coord_type: CoordType): TextRectangle; + /** + * Creates an {@link AttributeSet} which consists of the attributes explicitly + * set at the position #offset in the text. #start_offset and #end_offset are + * set to the start and end of the range around #offset where the attributes are + * invariant. Note that #end_offset is the offset of the first character + * after the range. See the enum AtkTextAttribute for types of text + * attributes that can be returned. Note that other attributes may also be + * returned. + * @param offset the character offset at which to get the attributes, -1 means the offset of + * the character to be inserted at the caret location. + * @returns an {@link AttributeSet} which contains the attributes + * explicitly set at #offset. This #AtkAttributeSet should be freed by + * a call to {@link Atk.attribute.set_free}. + * + * the address to put the start offset of the range + * + * the address to put the end offset of the range + */ + get_run_attributes(offset: number): [ AttributeSet, number, number ]; + /** + * Gets the text from the specified selection. + * @param selection_num The selection number. The selected regions are + * assigned numbers that correspond to how far the region is from the + * start of the text. The selected region closest to the beginning + * of the text region is assigned the number 0, etc. Note that adding, + * moving or deleting a selected region can change the numbering. + * @returns a newly allocated string containing the selected text. Use {@link GObject.free} + * to free the returned string. + * + * passes back the starting character offset of the selected region + * + * passes back the ending character offset (offset immediately past) + * of the selected region + */ + get_selection(selection_num: number): [ string, number, number ]; + /** + * Gets a portion of the text exposed through an {@link Text} according to a given #offset + * and a specific #granularity, along with the start and end offsets defining the + * boundaries of such a portion of text. + * + * If #granularity is ATK_TEXT_GRANULARITY_CHAR the character at the + * offset is returned. + * + * If #granularity is ATK_TEXT_GRANULARITY_WORD the returned string + * is from the word start at or before the offset to the word start after + * the offset. + * + * The returned string will contain the word at the offset if the offset + * is inside a word and will contain the word before the offset if the + * offset is not inside a word. + * + * If #granularity is ATK_TEXT_GRANULARITY_SENTENCE the returned string + * is from the sentence start at or before the offset to the sentence + * start after the offset. + * + * The returned string will contain the sentence at the offset if the offset + * is inside a sentence and will contain the sentence before the offset + * if the offset is not inside a sentence. + * + * If #granularity is ATK_TEXT_GRANULARITY_LINE the returned string + * is from the line start at or before the offset to the line + * start after the offset. + * + * If #granularity is ATK_TEXT_GRANULARITY_PARAGRAPH the returned string + * is from the start of the paragraph at or before the offset to the start + * of the following paragraph after the offset. + * @param offset position + * @param granularity An {@link TextGranularity} + * @returns a newly allocated string containing the text at + * the #offset bounded by the specified #granularity. Use {@link GObject.free} + * to free the returned string. Returns %NULL if the offset is invalid + * or no implementation is available. + * + * the starting character offset of the returned string, or -1 + * in the case of error (e.g. invalid offset, not implemented) + * + * the offset of the first character after the returned string, + * or -1 in the case of error (e.g. invalid offset, not implemented) + */ + get_string_at_offset(offset: number, granularity: TextGranularity): [ string | null, number, number ]; + /** + * Gets the specified text. + * @param start_offset a starting character offset within #text + * @param end_offset an ending character offset within #text, or -1 for the end of the string. + * @returns a newly allocated string containing the text from #start_offset up + * to, but not including #end_offset. Use {@link GObject.free} to free the returned + * string. + */ + get_text(start_offset: number, end_offset: number): string; + /** + * @deprecated + * Please use {@link Atk.Text.get_string_at_offset} instead. + * + * Gets the specified text. + * @param offset position + * @param boundary_type An {@link TextBoundary} + * @returns a newly allocated string containing the text after #offset bounded + * by the specified #boundary_type. Use {@link GObject.free} to free the returned + * string. + * + * the starting character offset of the returned string + * + * the offset of the first character after the + * returned substring + */ + get_text_after_offset(offset: number, boundary_type: TextBoundary): [ string, number, number ]; + /** + * @deprecated + * This method is deprecated since ATK version + * 2.9.4. Please use {@link Atk.Text.get_string_at_offset} instead. + * + * Gets the specified text. + * + * If the boundary_type if ATK_TEXT_BOUNDARY_CHAR the character at the + * offset is returned. + * + * If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned string + * is from the word start at or before the offset to the word start after + * the offset. + * + * The returned string will contain the word at the offset if the offset + * is inside a word and will contain the word before the offset if the + * offset is not inside a word. + * + * If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returned + * string is from the sentence start at or before the offset to the sentence + * start after the offset. + * + * The returned string will contain the sentence at the offset if the offset + * is inside a sentence and will contain the sentence before the offset + * if the offset is not inside a sentence. + * + * If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returned + * string is from the line start at or before the offset to the line + * start after the offset. + * @param offset position + * @param boundary_type An {@link TextBoundary} + * @returns a newly allocated string containing the text at #offset bounded + * by the specified #boundary_type. Use {@link GObject.free} to free the returned + * string. + * + * the starting character offset of the returned string + * + * the offset of the first character after the + * returned substring + */ + get_text_at_offset(offset: number, boundary_type: TextBoundary): [ string, number, number ]; + /** + * @deprecated + * Please use {@link Atk.Text.get_string_at_offset} instead. + * + * Gets the specified text. + * @param offset position + * @param boundary_type An {@link TextBoundary} + * @returns a newly allocated string containing the text before #offset bounded + * by the specified #boundary_type. Use {@link GObject.free} to free the returned + * string. + * + * the starting character offset of the returned string + * + * the offset of the first character after the + * returned substring + */ + get_text_before_offset(offset: number, boundary_type: TextBoundary): [ string, number, number ]; + /** + * Removes the specified selection. + * @param selection_num The selection number. The selected regions are + * assigned numbers that correspond to how far the region is from the + * start of the text. The selected region closest to the beginning + * of the text region is assigned the number 0, etc. Note that adding, + * moving or deleting a selected region can change the numbering. + * @returns %TRUE if successful, %FALSE otherwise + */ + remove_selection(selection_num: number): boolean; + /** + * Makes a substring of #text visible on the screen by scrolling all necessary parents. + * @param start_offset start offset in the #text + * @param end_offset end offset in the #text, or -1 for the end of the text. + * @param type specify where the object should be made visible. + * @returns whether scrolling was successful. + */ + scroll_substring_to(start_offset: number, end_offset: number, type: ScrollType): boolean; + /** + * Move the top-left of a substring of #text to a given position of the screen + * by scrolling all necessary parents. + * @param start_offset start offset in the #text + * @param end_offset end offset in the #text, or -1 for the end of the text. + * @param coords specify whether coordinates are relative to the screen or to the + * parent object. + * @param x x-position where to scroll to + * @param y y-position where to scroll to + * @returns whether scrolling was successful. + */ + scroll_substring_to_point(start_offset: number, end_offset: number, coords: CoordType, x: number, y: number): boolean; + /** + * Sets the caret (cursor) position to the specified #offset. + * + * In the case of rich-text content, this method should either grab focus + * or move the sequential focus navigation starting point (if the application + * supports this concept) as if the user had clicked on the new caret position. + * Typically, this means that the target of this operation is the node containing + * the new caret position or one of its ancestors. In other words, after this + * method is called, if the user advances focus, it should move to the first + * focusable node following the new caret position. + * + * Calling this method should also scroll the application viewport in a way + * that matches the behavior of the application's typical caret motion or tab + * navigation as closely as possible. This also means that if the application's + * caret motion or focus navigation does not trigger a scroll operation, this + * method should not trigger one either. If the application does not have a caret + * motion or focus navigation operation, this method should try to scroll the new + * caret position into view while minimizing unnecessary scroll motion. + * @param offset the character offset of the new caret position + * @returns %TRUE if successful, %FALSE otherwise. + */ + set_caret_offset(offset: number): boolean; + /** + * Changes the start and end offset of the specified selection. + * @param selection_num The selection number. The selected regions are + * assigned numbers that correspond to how far the region is from the + * start of the text. The selected region closest to the beginning + * of the text region is assigned the number 0, etc. Note that adding, + * moving or deleting a selected region can change the numbering. + * @param start_offset the new starting character offset of the selection + * @param end_offset the new end position of (e.g. offset immediately past) + * the selection + * @returns %TRUE if successful, %FALSE otherwise + */ + set_selection(selection_num: number, start_offset: number, end_offset: number): boolean; + /** + * The "text-attributes-changed" signal is emitted when the text + * attributes of the text of an object which implements AtkText + * changes. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "text-attributes-changed", callback: (owner: this) => void): number; + /** + * The "text-caret-moved" signal is emitted when the caret + * position of the text of an object which implements AtkText + * changes. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - arg1: The new position of the text caret. + * + * @returns Callback ID + */ + connect(signal: "text-caret-moved", callback: (owner: this, arg1: number) => void): number; + /** + * The "text-changed" signal is emitted when the text of the + * object which implements the AtkText interface changes, This + * signal will have a detail which is either "insert" or + * "delete" which identifies whether the text change was an + * insertion or a deletion. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - arg1: The position (character offset) of the insertion or deletion. + * - arg2: The length (in characters) of text inserted or deleted. + * + * @returns Callback ID + */ + connect(signal: "text-changed", callback: (owner: this, arg1: number, arg2: number) => void): number; + /** + * The "text-insert" signal is emitted when a new text is + * inserted. If the signal was not triggered by the user + * (e.g. typing or pasting text), the "system" detail should be + * included. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - arg1: The position (character offset) of the insertion. + * - arg2: The length (in characters) of text inserted. + * - arg3: The new text inserted + * + * @returns Callback ID + */ + connect(signal: "text-insert", callback: (owner: this, arg1: number, arg2: number, arg3: string) => void): number; + /** + * The "text-remove" signal is emitted when a new text is + * removed. If the signal was not triggered by the user + * (e.g. typing or pasting text), the "system" detail should be + * included. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - arg1: The position (character offset) of the removal. + * - arg2: The length (in characters) of text removed. + * - arg3: The old text removed + * + * @returns Callback ID + */ + connect(signal: "text-remove", callback: (owner: this, arg1: number, arg2: number, arg3: string) => void): number; + /** + * The "text-selection-changed" signal is emitted when the + * selected text of an object which implements AtkText changes. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "text-selection-changed", callback: (owner: this) => void): number; + + } + + type TextInitOptionsMixin = {}; + export interface TextInitOptions extends TextInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Text} instead. + */ + type TextMixin = IText; + + /** + * {@link Text} should be implemented by #AtkObjects on behalf of widgets + * that have text content which is either attributed or otherwise + * non-trivial. #AtkObjects whose text content is simple, + * unattributed, and very brief may expose that content via + * #atk_object_get_name instead; however if the text is editable, + * multi-line, typically longer than three or four words, attributed, + * selectable, or if the object already uses the 'name' ATK property + * for other information, the #AtkText interface should be used to + * expose the text content. In the case of editable text content, + * #AtkEditableText (a subtype of the #AtkText interface) should be + * implemented instead. + * + * #AtkText provides not only traversal facilities and change + * notification for text content, but also caret tracking and glyph + * bounding box calculations. Note that the text strings are exposed + * as UTF-8, and are therefore potentially multi-byte, and + * caret-to-byte offset mapping makes no assumptions about the + * character length; also bounding box glyph-to-offset mapping may be + * complex for languages which use ligatures. + */ + interface Text extends TextMixin {} + + class Text { + public constructor(options?: Partial); + /** + * Frees the memory associated with an array of AtkTextRange. It is assumed + * that the array was returned by the function atk_text_get_bounded_ranges + * and is NULL terminated. + * @param ranges A pointer to an array of {@link TextRange} which is + * to be freed. + */ + public static free_ranges(ranges: TextRange[]): void; + } + + + + /** This construct is only for enabling class multi-inheritance, + * use {@link Value} instead. + */ + interface IValue { + /** + * @deprecated + * Since 2.12. Use {@link Atk.Value.get_value_and_text} + * instead. + * + * Gets the value of this object. + * @returns a #GValue representing the current accessible value + */ + get_current_value(): GObject.Value; + /** + * Gets the minimum increment by which the value of this object may be + * changed. If zero, the minimum increment is undefined, which may + * mean that it is limited only by the floating point precision of the + * platform. + * @returns the minimum increment by which the value of this + * object may be changed. zero if undefined. + */ + get_increment(): number; + /** + * @deprecated + * Since 2.12. Use {@link Atk.Value.get_range} instead. + * + * Gets the maximum value of this object. + * @returns a #GValue representing the maximum accessible value + */ + get_maximum_value(): GObject.Value; + /** + * @deprecated + * Since 2.12. Use {@link Atk.Value.get_increment} instead. + * + * Gets the minimum increment by which the value of this object may be changed. If zero, + * the minimum increment is undefined, which may mean that it is limited only by the + * floating point precision of the platform. + * @returns a #GValue representing the minimum increment by which the accessible value may be changed + */ + get_minimum_increment(): GObject.Value; + /** + * @deprecated + * Since 2.12. Use {@link Atk.Value.get_range} instead. + * + * Gets the minimum value of this object. + * @returns a #GValue representing the minimum accessible value + */ + get_minimum_value(): GObject.Value; + /** + * Gets the range of this object. + * @returns a newly allocated {@link Range} + * that represents the minimum, maximum and descriptor (if available) + * of #obj. NULL if that range is not defined. + */ + get_range(): Range | null; + /** + * Gets the list of subranges defined for this object. See {@link Value} + * introduction for examples of subranges and when to expose them. + * @returns an #GSList of + * {@link Range} which each of the subranges defined for this object. Free + * the returns list with {@link GObject.slist_free}. + */ + get_sub_ranges(): Range[]; + /** + * Gets the current value and the human readable text alternative of + * #obj. #text is a newly created string, that must be freed by the + * caller. Can be NULL if no descriptor is available. + * @returns address of #gdouble to put the current value of #obj + * + * address of #gchar to put the human + * readable text alternative for #value + */ + get_value_and_text(): [ value: number, text: string | null ]; + /** + * @deprecated + * Since 2.12. Use {@link Atk.Value.set_value} instead. + * + * Sets the value of this object. + * @param value a #GValue which is the desired new accessible value. + * @returns %TRUE if new value is successfully set, %FALSE otherwise. + */ + set_current_value(value: GObject.Value): boolean; + /** + * Sets the value of this object. + * + * This method is intended to provide a way to change the value of the + * object. In any case, it is possible that the value can't be + * modified (ie: a read-only component). If the value changes due this + * call, it is possible that the text could change, and will trigger + * an {@link Value.value_changed} signal emission. + * + * Note for implementors: the deprecated {@link Atk.Value.set_current_value} + * method returned TRUE or FALSE depending if the value was assigned + * or not. In the practice several implementors were not able to + * decide it, and returned TRUE in any case. For that reason it is not + * required anymore to return if the value was properly assigned or + * not. + * @param new_value a double which is the desired new accessible value. + */ + set_value(new_value: number): void; + /** + * The 'value-changed' signal is emitted when the current value + * that represent the object changes. #value is the numerical + * representation of this new value. #text is the human + * readable text alternative of #value, and can be NULL if it is + * not available. Note that if there is a textual description + * associated with the new numeric value, that description + * should be included regardless of whether or not it has also + * changed. + * + * Example: a password meter whose value changes as the user + * types their new password. Appropiate value text would be + * "weak", "acceptable" and "strong". + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - value: the new value in a numerical form. + * - text: human readable text alternative (also called + * description) of this object. NULL if not available. + * + * @returns Callback ID + */ + connect(signal: "value-changed", callback: (owner: this, value: number, text: string) => void): number; + + } + + type ValueInitOptionsMixin = {}; + export interface ValueInitOptions extends ValueInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Value} instead. + */ + type ValueMixin = IValue; + + /** + * {@link Value} should be implemented for components which either display + * a value from a bounded range, or which allow the user to specify a + * value from a bounded range, or both. For instance, most sliders and + * range controls, as well as dials, should have #AtkObject + * representations which implement #AtkValue on the component's + * behalf. #AtKValues may be read-only, in which case attempts to + * alter the value return would fail. + * + * + * On the subject of current value text + * + * In addition to providing the current value, implementors can + * optionally provide an end-user-consumable textual description + * associated with this value. This description should be included + * when the numeric value fails to convey the full, on-screen + * representation seen by users. + * + * + * + * Password strength + * A password strength meter whose value changes as the user types + * their new password. Red is used for values less than 4.0, yellow + * for values between 4.0 and 7.0, and green for values greater than + * 7.0. In this instance, value text should be provided by the + * implementor. Appropriate value text would be "weak", "acceptable," + * and "strong" respectively. + * + * + * A level bar whose value changes to reflect the battery charge. The + * color remains the same regardless of the charge and there is no + * on-screen text reflecting the fullness of the battery. In this + * case, because the position within the bar is the only indication + * the user has of the current charge, value text should not be + * provided by the implementor. + * + * + * Implementor Notes + * + * Implementors should bear in mind that assistive technologies will + * likely prefer the value text provided over the numeric value when + * presenting a widget's value. As a result, strings not intended for + * end users should not be exposed in the value text, and strings + * which are exposed should be localized. In the case of widgets which + * display value text on screen, for instance through a separate label + * in close proximity to the value-displaying widget, it is still + * expected that implementors will expose the value text using the + * above API. + * + * + * + * #AtkValue should NOT be implemented for widgets whose displayed + * value is not reflective of a meaningful amount. For instance, a + * progress pulse indicator whose value alternates between 0.0 and 1.0 + * to indicate that some process is still taking place should not + * implement #AtkValue because the current value does not reflect + * progress towards completion. + * + * + * + * + * + * On the subject of ranges + * + * In addition to providing the minimum and maximum values, + * implementors can optionally provide details about subranges + * associated with the widget. These details should be provided by the + * implementor when both of the following are communicated visually to + * the end user: + * + * + * The existence of distinct ranges such as "weak", + * "acceptable", and "strong" indicated by color, bar tick marks, + * and/or on-screen text. + * Where the current value stands within a given subrange, + * for instance illustrating progression from very "weak" towards + * nearly "acceptable" through changes in shade and/or position on + * the bar within the "weak" subrange. + * + * + * If both of the above do not apply to the widget, it should be + * sufficient to expose the numeric value, along with the value text + * if appropriate, to make the widget accessible. + * + * + * + * Implementor Notes + * + * If providing subrange details is deemed necessary, all possible + * values of the widget are expected to fall within one of the + * subranges defined by the implementor. + * + * + * + * + * + * On the subject of localization of end-user-consumable text + * values + * + * Because value text and subrange descriptors are human-consumable, + * implementors are expected to provide localized strings which can be + * directly presented to end users via their assistive technology. In + * order to simplify this for implementors, implementors can use + * {@link Atk.value.type_get_localized_name} with the following + * already-localized constants for commonly-needed values can be used: + * + * + * + * ATK_VALUE_VERY_WEAK + * ATK_VALUE_WEAK + * ATK_VALUE_ACCEPTABLE + * ATK_VALUE_STRONG + * ATK_VALUE_VERY_STRONG + * ATK_VALUE_VERY_LOW + * ATK_VALUE_LOW + * ATK_VALUE_MEDIUM + * ATK_VALUE_HIGH + * ATK_VALUE_VERY_HIGH + * ATK_VALUE_VERY_BAD + * ATK_VALUE_BAD + * ATK_VALUE_GOOD + * ATK_VALUE_VERY_GOOD + * ATK_VALUE_BEST + * ATK_VALUE_SUBSUBOPTIMAL + * ATK_VALUE_SUBOPTIMAL + * ATK_VALUE_OPTIMAL + * + * + * Proposals for additional constants, along with their use cases, + * should be submitted to the GNOME Accessibility Team. + * + * + * + * + * On the subject of changes + * + * Note that if there is a textual description associated with the new + * numeric value, that description should be included regardless of + * whether or not it has also changed. + * + * + */ + interface Value extends ValueMixin {} + + class Value { + public constructor(options?: Partial); + } + + + + /** This construct is only for enabling class multi-inheritance, + * use {@link Window} instead. + */ + interface IWindow { + + /** + * The signal {@link Window.activate} is emitted when a window + * becomes the active window of the application or session. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "activate", callback: (owner: this) => void): number; + /** + * The signal {@link Window.create} is emitted when a new window + * is created. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "create", callback: (owner: this) => void): number; + /** + * The signal {@link Window.deactivate} is emitted when a window is + * no longer the active window of the application or session. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "deactivate", callback: (owner: this) => void): number; + /** + * The signal {@link Window.destroy} is emitted when a window is + * destroyed. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "destroy", callback: (owner: this) => void): number; + /** + * The signal {@link Window.maximize} is emitted when a window + * is maximized. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "maximize", callback: (owner: this) => void): number; + /** + * The signal {@link Window.minimize} is emitted when a window + * is minimized. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "minimize", callback: (owner: this) => void): number; + /** + * The signal {@link Window.move} is emitted when a window + * is moved. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "move", callback: (owner: this) => void): number; + /** + * The signal {@link Window.resize} is emitted when a window + * is resized. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "resize", callback: (owner: this) => void): number; + /** + * The signal {@link Window.restore} is emitted when a window + * is restored. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "restore", callback: (owner: this) => void): number; + + } + + type WindowInitOptionsMixin = {}; + export interface WindowInitOptions extends WindowInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Window} instead. + */ + type WindowMixin = IWindow; + + /** + * {@link Window} should be implemented by the UI elements that represent + * a top-level window, such as the main window of an application or + * dialog. + */ + interface Window extends WindowMixin {} + + class Window { + public constructor(options?: Partial); + } + + + + /** + * Specifies how xy coordinates are to be interpreted. Used by functions such + * as {@link Atk.Component.get_position} and atk_text_get_character_extents() + */ + enum CoordType { + /** + * specifies xy coordinates relative to the screen + */ + SCREEN = 0, + /** + * specifies xy coordinates relative to the widget's + * top-level window + */ + WINDOW = 1, + /** + * specifies xy coordinates relative to the widget's + * immediate parent. Since: 2.30 + */ + PARENT = 2 + } + + /** + * Specifies the type of a keyboard evemt. + */ + enum KeyEventType { + /** + * specifies a key press event + */ + PRESS = 0, + /** + * specifies a key release event + */ + RELEASE = 1, + /** + * Not a valid value; specifies end of enumeration + */ + LAST_DEFINED = 2 + } + + /** + * Describes the layer of a component + * + * These enumerated "layer values" are used when determining which UI + * rendering layer a component is drawn into, which can help in making + * determinations of when components occlude one another. + */ + enum Layer { + /** + * The object does not have a layer + */ + INVALID = 0, + /** + * This layer is reserved for the desktop background + */ + BACKGROUND = 1, + /** + * This layer is used for Canvas components + */ + CANVAS = 2, + /** + * This layer is normally used for components + */ + WIDGET = 3, + /** + * This layer is used for layered components + */ + MDI = 4, + /** + * This layer is used for popup components, such as menus + */ + POPUP = 5, + /** + * This layer is reserved for future use. + */ + OVERLAY = 6, + /** + * This layer is used for toplevel windows. + */ + WINDOW = 7 + } + + /** + * Describes the type of the relation + */ + enum RelationType { + /** + * Not used, represens "no relationship" or an error condition. + */ + NULL = 0, + /** + * Indicates an object controlled by one or more target objects. + */ + CONTROLLED_BY = 1, + /** + * Indicates an object is an controller for one or more target objects. + */ + CONTROLLER_FOR = 2, + /** + * Indicates an object is a label for one or more target objects. + */ + LABEL_FOR = 3, + /** + * Indicates an object is labelled by one or more target objects. + */ + LABELLED_BY = 4, + /** + * Indicates an object is a member of a group of one or more target objects. + */ + MEMBER_OF = 5, + /** + * Indicates an object is a cell in a treetable which is displayed because a cell in the same column is expanded and identifies that cell. + */ + NODE_CHILD_OF = 6, + /** + * Indicates that the object has content that flows logically to another + * AtkObject in a sequential way, (for instance text-flow). + */ + FLOWS_TO = 7, + /** + * Indicates that the object has content that flows logically from + * another AtkObject in a sequential way, (for instance text-flow). + */ + FLOWS_FROM = 8, + /** + * Indicates a subwindow attached to a component but otherwise has no connection in the UI heirarchy to that component. + */ + SUBWINDOW_OF = 9, + /** + * Indicates that the object visually embeds + * another object's content, i.e. this object's content flows around + * another's content. + */ + EMBEDS = 10, + /** + * Reciprocal of %ATK_RELATION_EMBEDS, indicates that + * this object's content is visualy embedded in another object. + */ + EMBEDDED_BY = 11, + /** + * Indicates that an object is a popup for another object. + */ + POPUP_FOR = 12, + /** + * Indicates that an object is a parent window of another object. + */ + PARENT_WINDOW_OF = 13, + /** + * Reciprocal of %ATK_RELATION_DESCRIPTION_FOR. Indicates that one + * or more target objects provide descriptive information about this object. This relation + * type is most appropriate for information that is not essential as its presentation may + * be user-configurable and/or limited to an on-demand mechanism such as an assistive + * technology command. For brief, essential information such as can be found in a widget's + * on-screen label, use %ATK_RELATION_LABELLED_BY. For an on-screen error message, use + * %ATK_RELATION_ERROR_MESSAGE. For lengthy extended descriptive information contained in + * an on-screen object, consider using %ATK_RELATION_DETAILS as assistive technologies may + * provide a means for the user to navigate to objects containing detailed descriptions so + * that their content can be more closely reviewed. + */ + DESCRIBED_BY = 14, + /** + * Reciprocal of %ATK_RELATION_DESCRIBED_BY. Indicates that this + * object provides descriptive information about the target object(s). See also + * %ATK_RELATION_DETAILS_FOR and %ATK_RELATION_ERROR_FOR. + */ + DESCRIPTION_FOR = 15, + /** + * Indicates an object is a cell in a treetable and is expanded to display other cells in the same column. + */ + NODE_PARENT_OF = 16, + /** + * Reciprocal of %ATK_RELATION_DETAILS_FOR. Indicates that this object + * has a detailed or extended description, the contents of which can be found in the target + * object(s). This relation type is most appropriate for information that is sufficiently + * lengthy as to make navigation to the container of that information desirable. For less + * verbose information suitable for announcement only, see %ATK_RELATION_DESCRIBED_BY. If + * the detailed information describes an error condition, %ATK_RELATION_ERROR_FOR should be + * used instead. #Since: ATK-2.26. + */ + DETAILS = 17, + /** + * Reciprocal of %ATK_RELATION_DETAILS. Indicates that this object + * provides a detailed or extended description about the target object(s). See also + * %ATK_RELATION_DESCRIPTION_FOR and %ATK_RELATION_ERROR_FOR. #Since: ATK-2.26. + */ + DETAILS_FOR = 18, + /** + * Reciprocal of %ATK_RELATION_ERROR_FOR. Indicates that this object + * has one or more errors, the nature of which is described in the contents of the target + * object(s). Objects that have this relation type should also contain %ATK_STATE_INVALID_ENTRY + * in their {@link StateSet}. #Since: ATK-2.26. + */ + ERROR_MESSAGE = 19, + /** + * Reciprocal of %ATK_RELATION_ERROR_MESSAGE. Indicates that this object + * contains an error message describing an invalid condition in the target object(s). #Since: + * ATK_2.26. + */ + ERROR_FOR = 20, + /** + * Not used, this value indicates the end of the enumeration. + */ + LAST_DEFINED = 21 + } + + /** + * Describes the role of an object + * + * These are the built-in enumerated roles that UI components can have + * in ATK. Other roles may be added at runtime, so an AtkRole >= + * %ATK_ROLE_LAST_DEFINED is not necessarily an error. + */ + enum Role { + /** + * Invalid role + */ + INVALID = 0, + /** + * A label which represents an accelerator + */ + ACCELERATOR_LABEL = 1, + /** + * An object which is an alert to the user. Assistive Technologies typically respond to ATK_ROLE_ALERT by reading the entire onscreen contents of containers advertising this role. Should be used for warning dialogs, etc. + */ + ALERT = 2, + /** + * An object which is an animated image + */ + ANIMATION = 3, + /** + * An arrow in one of the four cardinal directions + */ + ARROW = 4, + /** + * An object that displays a calendar and allows the user to select a date + */ + CALENDAR = 5, + /** + * An object that can be drawn into and is used to trap events + */ + CANVAS = 6, + /** + * A choice that can be checked or unchecked and provides a separate indicator for the current state + */ + CHECK_BOX = 7, + /** + * A menu item with a check box + */ + CHECK_MENU_ITEM = 8, + /** + * A specialized dialog that lets the user choose a color + */ + COLOR_CHOOSER = 9, + /** + * The header for a column of data + */ + COLUMN_HEADER = 10, + /** + * A collapsible list of choices the user can select from + */ + COMBO_BOX = 11, + /** + * An object whose purpose is to allow a user to edit a date + */ + DATE_EDITOR = 12, + /** + * An inconifed internal frame within a DESKTOP_PANE + */ + DESKTOP_ICON = 13, + /** + * A pane that supports internal frames and iconified versions of those internal frames + */ + DESKTOP_FRAME = 14, + /** + * An object whose purpose is to allow a user to set a value + */ + DIAL = 15, + /** + * A top level window with title bar and a border + */ + DIALOG = 16, + /** + * A pane that allows the user to navigate through and select the contents of a directory + */ + DIRECTORY_PANE = 17, + /** + * An object used for drawing custom user interface elements + */ + DRAWING_AREA = 18, + /** + * A specialized dialog that lets the user choose a file + */ + FILE_CHOOSER = 19, + /** + * A object that fills up space in a user interface + */ + FILLER = 20, + /** + * A specialized dialog that lets the user choose a font + */ + FONT_CHOOSER = 21, + /** + * A top level window with a title bar, border, menubar, etc. + */ + FRAME = 22, + /** + * A pane that is guaranteed to be painted on top of all panes beneath it + */ + GLASS_PANE = 23, + /** + * A document container for HTML, whose children represent the document content + */ + HTML_CONTAINER = 24, + /** + * A small fixed size picture, typically used to decorate components + */ + ICON = 25, + /** + * An object whose primary purpose is to display an image + */ + IMAGE = 26, + /** + * A frame-like object that is clipped by a desktop pane + */ + INTERNAL_FRAME = 27, + /** + * An object used to present an icon or short string in an interface + */ + LABEL = 28, + /** + * A specialized pane that allows its children to be drawn in layers, providing a form of stacking order + */ + LAYERED_PANE = 29, + /** + * An object that presents a list of objects to the user and allows the user to select one or more of them + */ + LIST = 30, + /** + * An object that represents an element of a list + */ + LIST_ITEM = 31, + /** + * An object usually found inside a menu bar that contains a list of actions the user can choose from + */ + MENU = 32, + /** + * An object usually drawn at the top of the primary dialog box of an application that contains a list of menus the user can choose from + */ + MENU_BAR = 33, + /** + * An object usually contained in a menu that presents an action the user can choose + */ + MENU_ITEM = 34, + /** + * A specialized pane whose primary use is inside a DIALOG + */ + OPTION_PANE = 35, + /** + * An object that is a child of a page tab list + */ + PAGE_TAB = 36, + /** + * An object that presents a series of panels (or page tabs), one at a time, through some mechanism provided by the object + */ + PAGE_TAB_LIST = 37, + /** + * A generic container that is often used to group objects + */ + PANEL = 38, + /** + * A text object uses for passwords, or other places where the text content is not shown visibly to the user + */ + PASSWORD_TEXT = 39, + /** + * A temporary window that is usually used to offer the user a list of choices, and then hides when the user selects one of those choices + */ + POPUP_MENU = 40, + /** + * An object used to indicate how much of a task has been completed + */ + PROGRESS_BAR = 41, + /** + * An object the user can manipulate to tell the application to do something + */ + PUSH_BUTTON = 42, + /** + * A specialized check box that will cause other radio buttons in the same group to become unchecked when this one is checked + */ + RADIO_BUTTON = 43, + /** + * A check menu item which belongs to a group. At each instant exactly one of the radio menu items from a group is selected + */ + RADIO_MENU_ITEM = 44, + /** + * A specialized pane that has a glass pane and a layered pane as its children + */ + ROOT_PANE = 45, + /** + * The header for a row of data + */ + ROW_HEADER = 46, + /** + * An object usually used to allow a user to incrementally view a large amount of data. + */ + SCROLL_BAR = 47, + /** + * An object that allows a user to incrementally view a large amount of information + */ + SCROLL_PANE = 48, + /** + * An object usually contained in a menu to provide a visible and logical separation of the contents in a menu + */ + SEPARATOR = 49, + /** + * An object that allows the user to select from a bounded range + */ + SLIDER = 50, + /** + * A specialized panel that presents two other panels at the same time + */ + SPLIT_PANE = 51, + /** + * An object used to get an integer or floating point number from the user + */ + SPIN_BUTTON = 52, + /** + * An object which reports messages of minor importance to the user + */ + STATUSBAR = 53, + /** + * An object used to represent information in terms of rows and columns + */ + TABLE = 54, + /** + * A cell in a table + */ + TABLE_CELL = 55, + /** + * The header for a column of a table + */ + TABLE_COLUMN_HEADER = 56, + /** + * The header for a row of a table + */ + TABLE_ROW_HEADER = 57, + /** + * A menu item used to tear off and reattach its menu + */ + TEAR_OFF_MENU_ITEM = 58, + /** + * An object that represents an accessible terminal. (Since: 0.6) + */ + TERMINAL = 59, + /** + * An interactive widget that supports multiple lines of text and + * optionally accepts user input, but whose purpose is not to solicit user input. + * Thus ATK_ROLE_TEXT is appropriate for the text view in a plain text editor + * but inappropriate for an input field in a dialog box or web form. For widgets + * whose purpose is to solicit input from the user, see ATK_ROLE_ENTRY and + * ATK_ROLE_PASSWORD_TEXT. For generic objects which display a brief amount of + * textual information, see ATK_ROLE_STATIC. + */ + TEXT = 60, + /** + * A specialized push button that can be checked or unchecked, but does not provide a separate indicator for the current state + */ + TOGGLE_BUTTON = 61, + /** + * A bar or palette usually composed of push buttons or toggle buttons + */ + TOOL_BAR = 62, + /** + * An object that provides information about another object + */ + TOOL_TIP = 63, + /** + * An object used to represent hierarchical information to the user + */ + TREE = 64, + /** + * An object capable of expanding and collapsing rows as well as showing multiple columns of data. (Since: 0.7) + */ + TREE_TABLE = 65, + /** + * The object contains some Accessible information, but its role is not known + */ + UNKNOWN = 66, + /** + * An object usually used in a scroll pane + */ + VIEWPORT = 67, + /** + * A top level window with no title or border. + */ + WINDOW = 68, + /** + * An object that serves as a document header. (Since: 1.1.1) + */ + HEADER = 69, + /** + * An object that serves as a document footer. (Since: 1.1.1) + */ + FOOTER = 70, + /** + * An object which is contains a paragraph of text content. (Since: 1.1.1) + */ + PARAGRAPH = 71, + /** + * An object which describes margins and tab stops, etc. for text objects which it controls (should have CONTROLLER_FOR relation to such). (Since: 1.1.1) + */ + RULER = 72, + /** + * The object is an application object, which may contain #ATK_ROLE_FRAME objects or other types of accessibles. The root accessible of any application's ATK hierarchy should have ATK_ROLE_APPLICATION. (Since: 1.1.4) + */ + APPLICATION = 73, + /** + * The object is a dialog or list containing items for insertion into an entry widget, for instance a list of words for completion of a text entry. (Since: 1.3) + */ + AUTOCOMPLETE = 74, + /** + * The object is an editable text object in a toolbar. (Since: 1.5) + */ + EDIT_BAR = 75, + /** + * The object is an embedded container within a document or panel. This role is a grouping "hint" indicating that the contained objects share a context. (Since: 1.7.2) + */ + EMBEDDED = 76, + /** + * The object is a component whose textual content may be entered or modified by the user, provided #ATK_STATE_EDITABLE is present. (Since: 1.11) + */ + ENTRY = 77, + /** + * The object is a graphical depiction of quantitative data. It may contain multiple subelements whose attributes and/or description may be queried to obtain both the quantitative data and information about how the data is being presented. The LABELLED_BY relation is particularly important in interpreting objects of this type, as is the accessible-description property. (Since: 1.11) + */ + CHART = 78, + /** + * The object contains descriptive information, usually textual, about another user interface element such as a table, chart, or image. (Since: 1.11) + */ + CAPTION = 79, + /** + * The object is a visual frame or container which contains a view of document content. Document frames may occur within another Document instance, in which case the second document may be said to be embedded in the containing instance. HTML frames are often ROLE_DOCUMENT_FRAME. Either this object, or a singleton descendant, should implement the Document interface. (Since: 1.11) + */ + DOCUMENT_FRAME = 80, + /** + * The object serves as a heading for content which follows it in a document. The 'heading level' of the heading, if availabe, may be obtained by querying the object's attributes. + */ + HEADING = 81, + /** + * The object is a containing instance which encapsulates a page of information. #ATK_ROLE_PAGE is used in documents and content which support a paginated navigation model. (Since: 1.11) + */ + PAGE = 82, + /** + * The object is a containing instance of document content which constitutes a particular 'logical' section of the document. The type of content within a section, and the nature of the section division itself, may be obtained by querying the object's attributes. Sections may be nested. (Since: 1.11) + */ + SECTION = 83, + /** + * The object is redundant with another object in the hierarchy, and is exposed for purely technical reasons. Objects of this role should normally be ignored by clients. (Since: 1.11) + */ + REDUNDANT_OBJECT = 84, + /** + * The object is a container for form controls, for instance as part of a + * web form or user-input form within a document. This role is primarily a tag/convenience for + * clients when navigating complex documents, it is not expected that ordinary GUI containers will + * always have ATK_ROLE_FORM. (Since: 1.12.0) + */ + FORM = 85, + /** + * The object is a hypertext anchor, i.e. a "link" in a + * hypertext document. Such objects are distinct from 'inline' + * content which may also use the Hypertext/Hyperlink interfaces + * to indicate the range/location within a text object where + * an inline or embedded object lies. (Since: 1.12.1) + */ + LINK = 86, + /** + * The object is a window or similar viewport + * which is used to allow composition or input of a 'complex character', + * in other words it is an "input method window." (Since: 1.12.1) + */ + INPUT_METHOD_WINDOW = 87, + /** + * A row in a table. (Since: 2.1.0) + */ + TABLE_ROW = 88, + /** + * An object that represents an element of a tree. (Since: 2.1.0) + */ + TREE_ITEM = 89, + /** + * A document frame which contains a spreadsheet. (Since: 2.1.0) + */ + DOCUMENT_SPREADSHEET = 90, + /** + * A document frame which contains a presentation or slide content. (Since: 2.1.0) + */ + DOCUMENT_PRESENTATION = 91, + /** + * A document frame which contains textual content, such as found in a word processing application. (Since: 2.1.0) + */ + DOCUMENT_TEXT = 92, + /** + * A document frame which contains HTML or other markup suitable for display in a web browser. (Since: 2.1.0) + */ + DOCUMENT_WEB = 93, + /** + * A document frame which contains email content to be displayed or composed either in plain text or HTML. (Since: 2.1.0) + */ + DOCUMENT_EMAIL = 94, + /** + * An object found within a document and designed to present a comment, note, or other annotation. In some cases, this object might not be visible until activated. (Since: 2.1.0) + */ + COMMENT = 95, + /** + * A non-collapsible list of choices the user can select from. (Since: 2.1.0) + */ + LIST_BOX = 96, + /** + * A group of related widgets. This group typically has a label. (Since: 2.1.0) + */ + GROUPING = 97, + /** + * An image map object. Usually a graphic with multiple hotspots, where each hotspot can be activated resulting in the loading of another document or section of a document. (Since: 2.1.0) + */ + IMAGE_MAP = 98, + /** + * A transitory object designed to present a message to the user, typically at the desktop level rather than inside a particular application. (Since: 2.1.0) + */ + NOTIFICATION = 99, + /** + * An object designed to present a message to the user within an existing window. (Since: 2.1.0) + */ + INFO_BAR = 100, + /** + * A bar that serves as a level indicator to, for instance, show the strength of a password or the state of a battery. (Since: 2.7.3) + */ + LEVEL_BAR = 101, + /** + * A bar that serves as the title of a window or a + * dialog. (Since: 2.12) + */ + TITLE_BAR = 102, + /** + * An object which contains a text section + * that is quoted from another source. (Since: 2.12) + */ + BLOCK_QUOTE = 103, + /** + * An object which represents an audio element. (Since: 2.12) + */ + AUDIO = 104, + /** + * An object which represents a video element. (Since: 2.12) + */ + VIDEO = 105, + /** + * A definition of a term or concept. (Since: 2.12) + */ + DEFINITION = 106, + /** + * A section of a page that consists of a + * composition that forms an independent part of a document, page, or + * site. Examples: A blog entry, a news story, a forum post. (Since: 2.12) + */ + ARTICLE = 107, + /** + * A region of a web page intended as a + * navigational landmark. This is designed to allow Assistive + * Technologies to provide quick navigation among key regions within a + * document. (Since: 2.12) + */ + LANDMARK = 108, + /** + * A text widget or container holding log content, such + * as chat history and error logs. In this role there is a + * relationship between the arrival of new items in the log and the + * reading order. The log contains a meaningful sequence and new + * information is added only to the end of the log, not at arbitrary + * points. (Since: 2.12) + */ + LOG = 109, + /** + * A container where non-essential information + * changes frequently. Common usages of marquee include stock tickers + * and ad banners. The primary difference between a marquee and a log + * is that logs usually have a meaningful order or sequence of + * important content changes. (Since: 2.12) + */ + MARQUEE = 110, + /** + * A text widget or container that holds a mathematical + * expression. (Since: 2.12) + */ + MATH = 111, + /** + * A widget whose purpose is to display a rating, + * such as the number of stars associated with a song in a media + * player. Objects of this role should also implement + * AtkValue. (Since: 2.12) + */ + RATING = 112, + /** + * An object containing a numerical counter which + * indicates an amount of elapsed time from a start point, or the time + * remaining until an end point. (Since: 2.12) + */ + TIMER = 113, + /** + * An object that represents a list of + * term-value groups. A term-value group represents a individual + * description and consist of one or more names + * (ATK_ROLE_DESCRIPTION_TERM) followed by one or more values + * (ATK_ROLE_DESCRIPTION_VALUE). For each list, there should not be + * more than one group with the same term name. (Since: 2.12) + */ + DESCRIPTION_LIST = 114, + /** + * An object that represents a term or phrase + * with a corresponding definition. (Since: 2.12) + */ + DESCRIPTION_TERM = 115, + /** + * An object that represents the + * description, definition or value of a term. (Since: 2.12) + */ + DESCRIPTION_VALUE = 116, + /** + * A generic non-container object whose purpose is to display a + * brief amount of information to the user and whose role is known by the + * implementor but lacks semantic value for the user. Examples in which + * %ATK_ROLE_STATIC is appropriate include the message displayed in a message box + * and an image used as an alternative means to display text. %ATK_ROLE_STATIC + * should not be applied to widgets which are traditionally interactive, objects + * which display a significant amount of content, or any object which has an + * accessible relation pointing to another object. Implementors should expose the + * displayed information through the accessible name of the object. If doing so seems + * inappropriate, it may indicate that a different role should be used. For + * labels which describe another widget, see %ATK_ROLE_LABEL. For text views, see + * %ATK_ROLE_TEXT. For generic containers, see %ATK_ROLE_PANEL. For objects whose + * role is not known by the implementor, see %ATK_ROLE_UNKNOWN. (Since: 2.16) + */ + STATIC = 117, + /** + * An object that represents a mathematical fraction. + * (Since: 2.16) + */ + MATH_FRACTION = 118, + /** + * An object that represents a mathematical expression + * displayed with a radical. (Since: 2.16) + */ + MATH_ROOT = 119, + /** + * An object that contains text that is displayed as a + * subscript. (Since: 2.16) + */ + SUBSCRIPT = 120, + /** + * An object that contains text that is displayed as a + * superscript. (Since: 2.16) + */ + SUPERSCRIPT = 121, + /** + * An object that contains the text of a footnote. (Since: 2.26) + */ + FOOTNOTE = 122, + /** + * Content previously deleted or proposed to be + * deleted, e.g. in revision history or a content view providing suggestions + * from reviewers. (Since: 2.34) + */ + CONTENT_DELETION = 123, + /** + * Content previously inserted or proposed to be + * inserted, e.g. in revision history or a content view providing suggestions + * from reviewers. (Since: 2.34) + */ + CONTENT_INSERTION = 124, + /** + * A run of content that is marked or highlighted, such as for + * reference purposes, or to call it out as having a special purpose. If the + * marked content has an associated section in the document elaborating on the + * reason for the mark, then %ATK_RELATION_DETAILS should be used on the mark + * to point to that associated section. In addition, the reciprocal relation + * %ATK_RELATION_DETAILS_FOR should be used on the associated content section + * to point back to the mark. (Since: 2.36) + */ + MARK = 125, + /** + * A container for content that is called out as a proposed + * change from the current version of the document, such as by a reviewer of the + * content. This role should include either %ATK_ROLE_CONTENT_DELETION and/or + * %ATK_ROLE_CONTENT_INSERTION children, in any order, to indicate what the + * actual change is. (Since: 2.36) + */ + SUGGESTION = 126, + /** + * not a valid role, used for finding end of the enumeration + */ + LAST_DEFINED = 127 + } + + /** + * Specifies where an object should be placed on the screen when using scroll_to. + */ + enum ScrollType { + /** + * Scroll the object vertically and horizontally to bring + * its top left corner to the top left corner of the window. + */ + TOP_LEFT = 0, + /** + * Scroll the object vertically and horizontally to + * bring its bottom right corner to the bottom right corner of the window. + */ + BOTTOM_RIGHT = 1, + /** + * Scroll the object vertically to bring its top edge to + * the top edge of the window. + */ + TOP_EDGE = 2, + /** + * Scroll the object vertically to bring its bottom + * edge to the bottom edge of the window. + */ + BOTTOM_EDGE = 3, + /** + * Scroll the object vertically and horizontally to bring + * its left edge to the left edge of the window. + */ + LEFT_EDGE = 4, + /** + * Scroll the object vertically and horizontally to + * bring its right edge to the right edge of the window. + */ + RIGHT_EDGE = 5, + /** + * Scroll the object vertically and horizontally so that + * as much as possible of the object becomes visible. The exact placement is + * determined by the application. + */ + ANYWHERE = 6 + } + + /** + * The possible types of states of an object + */ + enum StateType { + /** + * Indicates an invalid state - probably an error condition. + */ + INVALID = 0, + /** + * Indicates a window is currently the active window, or an object is the active subelement within a container or table. ATK_STATE_ACTIVE should not be used for objects which have ATK_STATE_FOCUSABLE or ATK_STATE_SELECTABLE: Those objects should use ATK_STATE_FOCUSED and ATK_STATE_SELECTED respectively. ATK_STATE_ACTIVE is a means to indicate that an object which is not focusable and not selectable is the currently-active item within its parent container. + */ + ACTIVE = 1, + /** + * Indicates that the object is 'armed', i.e. will be activated by if a pointer button-release event occurs within its bounds. Buttons often enter this state when a pointer click occurs within their bounds, as a precursor to activation. ATK_STATE_ARMED has been deprecated since ATK-2.16 and should not be used in newly-written code. + */ + ARMED = 2, + /** + * Indicates the current object is busy, i.e. onscreen representation is in the process of changing, or the object is temporarily unavailable for interaction due to activity already in progress. This state may be used by implementors of Document to indicate that content loading is underway. It also may indicate other 'pending' conditions; clients may wish to interrogate this object when the ATK_STATE_BUSY flag is removed. + */ + BUSY = 3, + /** + * Indicates this object is currently checked, for instance a checkbox is 'non-empty'. + */ + CHECKED = 4, + /** + * Indicates that this object no longer has a valid backing widget (for instance, if its peer object has been destroyed) + */ + DEFUNCT = 5, + /** + * Indicates that this object can contain text, and that the + * user can change the textual contents of this object by editing those contents + * directly. For an object which is expected to be editable due to its type, but + * which cannot be edited due to the application or platform preventing the user + * from doing so, that object's {@link StateSet} should lack ATK_STATE_EDITABLE and + * should contain ATK_STATE_READ_ONLY. + */ + EDITABLE = 6, + /** + * Indicates that this object is enabled, i.e. that it currently reflects some application state. Objects that are "greyed out" may lack this state, and may lack the STATE_SENSITIVE if direct user interaction cannot cause them to acquire STATE_ENABLED. See also: ATK_STATE_SENSITIVE + */ + ENABLED = 7, + /** + * Indicates this object allows progressive disclosure of its children + */ + EXPANDABLE = 8, + /** + * Indicates this object its expanded - see ATK_STATE_EXPANDABLE above + */ + EXPANDED = 9, + /** + * Indicates this object can accept keyboard focus, which means all events resulting from typing on the keyboard will normally be passed to it when it has focus + */ + FOCUSABLE = 10, + /** + * Indicates this object currently has the keyboard focus + */ + FOCUSED = 11, + /** + * Indicates the orientation of this object is horizontal; used, for instance, by objects of ATK_ROLE_SCROLL_BAR. For objects where vertical/horizontal orientation is especially meaningful. + */ + HORIZONTAL = 12, + /** + * Indicates this object is minimized and is represented only by an icon + */ + ICONIFIED = 13, + /** + * Indicates something must be done with this object before the user can interact with an object in a different window + */ + MODAL = 14, + /** + * Indicates this (text) object can contain multiple lines of text + */ + MULTI_LINE = 15, + /** + * Indicates this object allows more than one of its children to be selected at the same time, or in the case of text objects, that the object supports non-contiguous text selections. + */ + MULTISELECTABLE = 16, + /** + * Indicates this object paints every pixel within its rectangular region. + */ + OPAQUE = 17, + /** + * Indicates this object is currently pressed. + */ + PRESSED = 18, + /** + * Indicates the size of this object is not fixed + */ + RESIZABLE = 19, + /** + * Indicates this object is the child of an object that allows its children to be selected and that this child is one of those children that can be selected + */ + SELECTABLE = 20, + /** + * Indicates this object is the child of an object that allows its children to be selected and that this child is one of those children that has been selected + */ + SELECTED = 21, + /** + * Indicates this object is sensitive, e.g. to user interaction. + * STATE_SENSITIVE usually accompanies STATE_ENABLED for user-actionable controls, + * but may be found in the absence of STATE_ENABLED if the current visible state of the + * control is "disconnected" from the application state. In such cases, direct user interaction + * can often result in the object gaining STATE_SENSITIVE, for instance if a user makes + * an explicit selection using an object whose current state is ambiguous or undefined. + * #see STATE_ENABLED, STATE_INDETERMINATE. + */ + SENSITIVE = 22, + /** + * Indicates this object, the object's parent, the object's parent's parent, and so on, + * are all 'shown' to the end-user, i.e. subject to "exposure" if blocking or obscuring objects do not interpose + * between this object and the top of the window stack. + */ + SHOWING = 23, + /** + * Indicates this (text) object can contain only a single line of text + */ + SINGLE_LINE = 24, + /** + * Indicates that the information returned for this object may no longer be + * synchronized with the application state. This is implied if the object has STATE_TRANSIENT, + * and can also occur towards the end of the object peer's lifecycle. It can also be used to indicate that + * the index associated with this object has changed since the user accessed the object (in lieu of + * "index-in-parent-changed" events). + */ + STALE = 25, + /** + * Indicates this object is transient, i.e. a snapshot which may not emit events when its + * state changes. Data from objects with ATK_STATE_TRANSIENT should not be cached, since there may be no + * notification given when the cached data becomes obsolete. + */ + TRANSIENT = 26, + /** + * Indicates the orientation of this object is vertical + */ + VERTICAL = 27, + /** + * Indicates this object is visible, e.g. has been explicitly marked for exposure to the user. + * **note**: %ATK_STATE_VISIBLE is no guarantee that the object is actually unobscured on the screen, only + * that it is 'potentially' visible, barring obstruction, being scrolled or clipped out of the + * field of view, or having an ancestor container that has not yet made visible. + * A widget is potentially onscreen if it has both %ATK_STATE_VISIBLE and %ATK_STATE_SHOWING. + * The absence of %ATK_STATE_VISIBLE and %ATK_STATE_SHOWING is semantically equivalent to saying + * that an object is 'hidden'. See also %ATK_STATE_TRUNCATED, which applies if an object with + * %ATK_STATE_VISIBLE and %ATK_STATE_SHOWING set lies within a viewport which means that its + * contents are clipped, e.g. a truncated spreadsheet cell or + * an image within a scrolling viewport. Mostly useful for screen-review and magnification + * algorithms. + */ + VISIBLE = 28, + /** + * Indicates that "active-descendant-changed" event + * is sent when children become 'active' (i.e. are selected or navigated to onscreen). + * Used to prevent need to enumerate all children in very large containers, like tables. + * The presence of STATE_MANAGES_DESCENDANTS is an indication to the client. + * that the children should not, and need not, be enumerated by the client. + * Objects implementing this state are expected to provide relevant state + * notifications to listening clients, for instance notifications of visibility + * changes and activation of their contained child objects, without the client + * having previously requested references to those children. + */ + MANAGES_DESCENDANTS = 29, + /** + * Indicates that the value, or some other quantifiable + * property, of this AtkObject cannot be fully determined. In the case of a large + * data set in which the total number of items in that set is unknown (e.g. 1 of + * 999+), implementors should expose the currently-known set size (999) along + * with this state. In the case of a check box, this state should be used to + * indicate that the check box is a tri-state check box which is currently + * neither checked nor unchecked. + */ + INDETERMINATE = 30, + /** + * Indicates that an object is truncated, e.g. a text value in a speradsheet cell. + */ + TRUNCATED = 31, + /** + * Indicates that explicit user interaction with an object is required by the user interface, e.g. a required field in a "web-form" interface. + */ + REQUIRED = 32, + /** + * Indicates that the object has encountered an error condition due to failure of input validation. For instance, a form control may acquire this state in response to invalid or malformed user input. + */ + INVALID_ENTRY = 33, + /** + * Indicates that the object in question implements some form of ¨typeahead¨ or + * pre-selection behavior whereby entering the first character of one or more sub-elements + * causes those elements to scroll into view or become selected. Subsequent character input + * may narrow the selection further as long as one or more sub-elements match the string. + * This state is normally only useful and encountered on objects that implement Selection. + * In some cases the typeahead behavior may result in full or partial ¨completion¨ of + * the data in the input field, in which case these input events may trigger text-changed + * events from the AtkText interface. This state supplants #ATK_ROLE_AUTOCOMPLETE. + */ + SUPPORTS_AUTOCOMPLETION = 34, + /** + * Indicates that the object in question supports text selection. It should only be exposed on objects which implement the Text interface, in order to distinguish this state from #ATK_STATE_SELECTABLE, which infers that the object in question is a selectable child of an object which implements Selection. While similar, text selection and subelement selection are distinct operations. + */ + SELECTABLE_TEXT = 35, + /** + * Indicates that the object is the "default" active component, i.e. the object which is activated by an end-user press of the "Enter" or "Return" key. Typically a "close" or "submit" button. + */ + DEFAULT = 36, + /** + * Indicates that the object changes its appearance dynamically as an inherent part of its presentation. This state may come and go if an object is only temporarily animated on the way to a 'final' onscreen presentation. + * **note**: some applications, notably content viewers, may not be able to detect + * all kinds of animated content. Therefore the absence of this state should not + * be taken as definitive evidence that the object's visual representation is + * static; this state is advisory. + */ + ANIMATED = 37, + /** + * Indicates that the object (typically a hyperlink) has already been 'activated', and/or its backing data has already been downloaded, rendered, or otherwise "visited". + */ + VISITED = 38, + /** + * Indicates this object has the potential to be + * checked, such as a checkbox or toggle-able table cell. #Since: + * ATK-2.12 + */ + CHECKABLE = 39, + /** + * Indicates that the object has a popup context + * menu or sub-level menu which may or may not be showing. This means + * that activation renders conditional content. Note that ordinary + * tooltips are not considered popups in this context. #Since: ATK-2.12 + */ + HAS_POPUP = 40, + /** + * Indicates this object has a tooltip. #Since: ATK-2.16 + */ + HAS_TOOLTIP = 41, + /** + * Indicates that a widget which is ENABLED and SENSITIVE + * has a value which can be read, but not modified, by the user. Note that this + * state should only be applied to widget types whose value is normally directly + * user modifiable, such as check boxes, radio buttons, spin buttons, text input + * fields, and combo boxes, as a means to convey that the expected interaction + * with that widget is not possible. When the expected interaction with a + * widget does not include modification by the user, as is the case with + * labels and containers, ATK_STATE_READ_ONLY should not be applied. See also + * ATK_STATE_EDITABLE. #Since: ATK-2-16 + */ + READ_ONLY = 42, + /** + * Not a valid state, used for finding end of enumeration + */ + LAST_DEFINED = 43 + } + + /** + * Describes the text attributes supported + */ + enum TextAttribute { + /** + * Invalid attribute, like bad spelling or grammar. + */ + INVALID = 0, + /** + * The pixel width of the left margin + */ + LEFT_MARGIN = 1, + /** + * The pixel width of the right margin + */ + RIGHT_MARGIN = 2, + /** + * The number of pixels that the text is indented + */ + INDENT = 3, + /** + * Either "true" or "false" indicating whether text is visible or not + */ + INVISIBLE = 4, + /** + * Either "true" or "false" indicating whether text is editable or not + */ + EDITABLE = 5, + /** + * Pixels of blank space to leave above each newline-terminated line. + */ + PIXELS_ABOVE_LINES = 6, + /** + * Pixels of blank space to leave below each newline-terminated line. + */ + PIXELS_BELOW_LINES = 7, + /** + * Pixels of blank space to leave between wrapped lines inside the same newline-terminated line (paragraph). + */ + PIXELS_INSIDE_WRAP = 8, + /** + * "true" or "false" whether to make the background color for each character the height of the highest font used on the current line, or the height of the font used for the current character. + */ + BG_FULL_HEIGHT = 9, + /** + * Number of pixels that the characters are risen above the baseline. See also ATK_TEXT_ATTR_TEXT_POSITION. + */ + RISE = 10, + /** + * "none", "single", "double", "low", or "error" + */ + UNDERLINE = 11, + /** + * "true" or "false" whether the text is strikethrough + */ + STRIKETHROUGH = 12, + /** + * The size of the characters in points. eg: 10 + */ + SIZE = 13, + /** + * The scale of the characters. The value is a string representation of a double + */ + SCALE = 14, + /** + * The weight of the characters. + */ + WEIGHT = 15, + /** + * The language used + */ + LANGUAGE = 16, + /** + * The font family name + */ + FAMILY_NAME = 17, + /** + * The background color. The value is an RGB value of the format "%u,%u,%u" + */ + BG_COLOR = 18, + /** + * The foreground color. The value is an RGB value of the format "%u,%u,%u" + */ + FG_COLOR = 19, + /** + * "true" if a #GdkBitmap is set for stippling the background color. + */ + BG_STIPPLE = 20, + /** + * "true" if a #GdkBitmap is set for stippling the foreground color. + */ + FG_STIPPLE = 21, + /** + * The wrap mode of the text, if any. Values are "none", "char", "word", or "word_char". + */ + WRAP_MODE = 22, + /** + * The direction of the text, if set. Values are "none", "ltr" or "rtl" + */ + DIRECTION = 23, + /** + * The justification of the text, if set. Values are "left", "right", "center" or "fill" + */ + JUSTIFICATION = 24, + /** + * The stretch of the text, if set. Values are "ultra_condensed", "extra_condensed", "condensed", "semi_condensed", "normal", "semi_expanded", "expanded", "extra_expanded" or "ultra_expanded" + */ + STRETCH = 25, + /** + * The capitalization variant of the text, if set. Values are "normal" or "small_caps" + */ + VARIANT = 26, + /** + * The slant style of the text, if set. Values are "normal", "oblique" or "italic" + */ + STYLE = 27, + /** + * The vertical position with respect to the baseline. Values are "baseline", "super", or "sub". Note that a super or sub text attribute refers to position with respect to the baseline of the prior character. + */ + TEXT_POSITION = 28, + /** + * not a valid text attribute, used for finding end of enumeration + */ + LAST_DEFINED = 29 + } + + /** + * Text boundary types used for specifying boundaries for regions of text. + * This enumeration is deprecated since 2.9.4 and should not be used. Use + * AtkTextGranularity with #atk_text_get_string_at_offset instead. + */ + enum TextBoundary { + /** + * Boundary is the boundary between characters + * (including non-printing characters) + */ + CHAR = 0, + /** + * Boundary is the start (i.e. first character) of a word. + */ + WORD_START = 1, + /** + * Boundary is the end (i.e. last + * character) of a word. + */ + WORD_END = 2, + /** + * Boundary is the first character in a sentence. + */ + SENTENCE_START = 3, + /** + * Boundary is the last (terminal) + * character in a sentence; in languages which use "sentence stop" + * punctuation such as English, the boundary is thus the '.', '?', or + * similar terminal punctuation character. + */ + SENTENCE_END = 4, + /** + * Boundary is the initial character of the content or a + * character immediately following a newline, linefeed, or return character. + */ + LINE_START = 5, + /** + * Boundary is the linefeed, or return + * character. + */ + LINE_END = 6 + } + + /** + * Describes the type of clipping required. + */ + enum TextClipType { + /** + * No clipping to be done + */ + NONE = 0, + /** + * Text clipped by min coordinate is omitted + */ + MIN = 1, + /** + * Text clipped by max coordinate is omitted + */ + MAX = 2, + /** + * Only text fully within mix/max bound is retained + */ + BOTH = 3 + } + + /** + * Text granularity types used for specifying the granularity of the region of + * text we are interested in. + */ + enum TextGranularity { + /** + * Granularity is defined by the boundaries between characters + * (including non-printing characters) + */ + CHAR = 0, + /** + * Granularity is defined by the boundaries of a word, + * starting at the beginning of the current word and finishing at the beginning of + * the following one, if present. + */ + WORD = 1, + /** + * Granularity is defined by the boundaries of a sentence, + * starting at the beginning of the current sentence and finishing at the beginning of + * the following one, if present. + */ + SENTENCE = 2, + /** + * Granularity is defined by the boundaries of a line, + * starting at the beginning of the current line and finishing at the beginning of + * the following one, if present. + */ + LINE = 3, + /** + * Granularity is defined by the boundaries of a paragraph, + * starting at the beginning of the current paragraph and finishing at the beginning of + * the following one, if present. + */ + PARAGRAPH = 4 + } + + /** + * Default types for a given value. Those are defined in order to + * easily get localized strings to describe a given value or a given + * subrange, using {@link Atk.value.type_get_localized_name}. + */ + enum ValueType { + VERY_WEAK = 0, + WEAK = 1, + ACCEPTABLE = 2, + STRONG = 3, + VERY_STRONG = 4, + VERY_LOW = 5, + LOW = 6, + MEDIUM = 7, + HIGH = 8, + VERY_HIGH = 9, + VERY_BAD = 10, + BAD = 11, + GOOD = 12, + VERY_GOOD = 13, + BEST = 14, + LAST_DEFINED = 15 + } + + /** + * Describes the type of link + */ + enum HyperlinkStateFlags { + /** + * Link is inline + */ + INLINE = 1 + } + + /** + * A function which is called when an object emits a matching event, + * as used in #atk_add_focus_tracker. + * Currently the only events for which object-specific handlers are + * supported are events of type "focus:". Most clients of ATK will prefer to + * attach signal handlers for the various ATK signals instead. + * + * see atk_add_focus_tracker. + */ + interface EventListener { + /** + * A function which is called when an object emits a matching event, + * as used in #atk_add_focus_tracker. + * Currently the only events for which object-specific handlers are + * supported are events of type "focus:". Most clients of ATK will prefer to + * attach signal handlers for the various ATK signals instead. + * + * see atk_add_focus_tracker. + * @param obj An {@link Object} instance for whom the callback will be called when + * the specified event (e.g. 'focus:') takes place. + */ + (obj: Object): void; + } + + /** + * An {@link EventListenerInit} function is a special function that is + * called in order to initialize the per-object event registration system + * used by #AtkEventListener, if any preparation is required. + * + * see atk_focus_tracker_init. + */ + interface EventListenerInit { + /** + * An {@link EventListenerInit} function is a special function that is + * called in order to initialize the per-object event registration system + * used by #AtkEventListener, if any preparation is required. + * + * see atk_focus_tracker_init. + */ + (): void; + } + + /** + * The type of callback function used for + * {@link Atk.Component.add_focus_handler} and + * atk_component_remove_focus_handler() + */ + interface FocusHandler { + /** + * @deprecated + * Deprecated with {@link Atk.Component.add_focus_handler} + * and atk_component_remove_focus_handler(). See those + * methods for more information. + * + * The type of callback function used for + * {@link Atk.Component.add_focus_handler} and + * atk_component_remove_focus_handler() + * @param object the {@link Object} that receives/lose the focus + * @param focus_in TRUE if the object receives the focus + */ + (object: Object, focus_in: boolean): void; + } + + /** + * An AtkFunction is a function definition used for padding which has + * been added to class and interface structures to allow for expansion + * in the future. + */ + interface Function { + /** + * An AtkFunction is a function definition used for padding which has + * been added to class and interface structures to allow for expansion + * in the future. + * @returns not used + */ + (): boolean; + } + + /** + * An {@link KeySnoopFunc} is a type of callback which is called whenever a key event occurs, + * if registered via atk_add_key_event_listener. It allows for pre-emptive + * interception of key events via the return code as described below. + */ + interface KeySnoopFunc { + /** + * An {@link KeySnoopFunc} is a type of callback which is called whenever a key event occurs, + * if registered via atk_add_key_event_listener. It allows for pre-emptive + * interception of key events via the return code as described below. + * @param event an AtkKeyEventStruct containing information about the key event for which + * notification is being given. + * @returns TRUE (nonzero) if the event emission should be stopped and the event + * discarded without being passed to the normal GUI recipient; FALSE (zero) if the + * event dispatch to the client application should proceed as normal. + * + * see atk_add_key_event_listener. + */ + (event: KeyEventStruct): number; + } + + /** + * An AtkPropertyChangeHandler is a function which is executed when an + * AtkObject's property changes value. It is specified in a call to + * {@link Atk.Object.connect_property_change_handler}. + */ + interface PropertyChangeHandler { + /** + * @deprecated + * Since 2.12. + * + * An AtkPropertyChangeHandler is a function which is executed when an + * AtkObject's property changes value. It is specified in a call to + * {@link Atk.Object.connect_property_change_handler}. + * @param obj atkobject which property changes + * @param vals values changed + */ + (obj: Object, vals: PropertyValues): void; + } + + /** + * This is a singly-linked list (a #GSList) of {@link Attribute}. It is + * used by {@link Atk.Text.get_run_attributes}, + * atk_text_get_default_attributes(), + * atk_editable_text_set_run_attributes(), + * atk_document_get_attributes() and atk_object_get_attributes() + */ + type AttributeSet = GLib.SList; + + type State = number; + + /** + * Adds the specified function to the list of functions to be called + * when an object receives focus. + * @param focus_tracker Function to be added to the list of functions to be called + * when an object receives focus. + * @returns added focus tracker id, or 0 on failure. + */ + function add_focus_tracker(focus_tracker: EventListener): number; + /** + * Adds the specified function to the list of functions to be called + * when an ATK event of type event_type occurs. + * + * The format of event_type is the following: + * "ATK:<atk_type>:<atk_event>:<atk_event_detail> + * + * Where "ATK" works as the namespace, <atk_interface> is the name of + * the ATK type (interface or object), <atk_event> is the name of the + * signal defined on that interface and <atk_event_detail> is the + * gsignal detail of that signal. You can find more info about gsignal + * details here: + * http://developer.gnome.org/gobject/stable/gobject-Signals.html + * + * The first three parameters are mandatory. The last one is optional. + * + * For example: + * ATK:AtkObject:state-change + * ATK:AtkText:text-selection-changed + * ATK:AtkText:text-insert:system + * + * Toolkit implementor note: ATK provides a default implementation for + * this virtual method. ATK implementors are discouraged from + * reimplementing this method. + * + * Toolkit implementor note: this method is not intended to be used by + * ATK implementors but by ATK consumers. + * + * ATK consumers note: as this method adds a listener for a given ATK + * type, that type should be already registered on the GType system + * before calling this method. A simple way to do that is creating an + * instance of {@link NoOpObject}. This class implements all ATK + * interfaces, so creating the instance will register all ATK types as + * a collateral effect. + * @param listener the listener to notify + * @param event_type the type of event for which notification is requested + * @returns added event listener id, or 0 on failure. + */ + function add_global_event_listener(listener: GObject.SignalEmissionHook, event_type: string): number; + /** + * Adds the specified function to the list of functions to be called + * when a key event occurs. The #data element will be passed to the + * {@link KeySnoopFunc} (#listener) as the #func_data param, on notification. + * @param listener the listener to notify + * @returns added event listener id, or 0 on failure. + */ + function add_key_event_listener(listener: KeySnoopFunc): number; + /** + * Frees the memory used by an {@link AttributeSet}, including all its + * #AtkAttributes. + * @param attrib_set The {@link AttributeSet} to free + */ + function attribute_set_free(attrib_set: AttributeSet): void; + /** + * Specifies the function to be called for focus tracker initialization. + * This function should be called by an implementation of the + * ATK interface if any specific work needs to be done to enable + * focus tracking. + * @param init Function to be called for focus tracker initialization + */ + function focus_tracker_init(init: EventListenerInit): void; + /** + * Cause the focus tracker functions which have been specified to be + * executed for the object. + * @param object an {@link Object} + */ + function focus_tracker_notify(object: Object): void; + /** + * Returns the binary age as passed to libtool when building the ATK + * library the process is running against. + * @returns the binary age of the ATK library + */ + function get_binary_age(): number; + /** + * Gets a default implementation of the {@link ObjectFactory}/type + * registry. + * Note: For most toolkit maintainers, this will be the correct + * registry for registering new #AtkObject factories. Following + * a call to this function, maintainers may call {@link Atk.Registry.set_factory_type} + * to associate an #AtkObjectFactory subclass with the GType of objects + * for whom accessibility information will be provided. + * @returns a default implementation of the + * {@link ObjectFactory}/type registry + */ + function get_default_registry(): Registry; + /** + * Gets the currently focused object. + * @returns the currently focused object for the current + * application + */ + function get_focus_object(): Object; + /** + * Returns the interface age as passed to libtool when building the + * ATK library the process is running against. + * @returns the interface age of the ATK library + */ + function get_interface_age(): number; + /** + * Returns the major version number of the ATK library. (e.g. in ATK + * version 2.7.4 this is 2.) + * + * This function is in the library, so it represents the ATK library + * your code is running against. In contrast, the #ATK_MAJOR_VERSION + * macro represents the major version of the ATK headers you have + * included when compiling your code. + * @returns the major version number of the ATK library + */ + function get_major_version(): number; + /** + * Returns the micro version number of the ATK library. (e.g. in ATK + * version 2.7.4 this is 4.) + * + * This function is in the library, so it represents the ATK library + * your code is are running against. In contrast, the + * #ATK_MICRO_VERSION macro represents the micro version of the ATK + * headers you have included when compiling your code. + * @returns the micro version number of the ATK library + */ + function get_micro_version(): number; + /** + * Returns the minor version number of the ATK library. (e.g. in ATK + * version 2.7.4 this is 7.) + * + * This function is in the library, so it represents the ATK library + * your code is are running against. In contrast, the + * #ATK_MINOR_VERSION macro represents the minor version of the ATK + * headers you have included when compiling your code. + * @returns the minor version number of the ATK library + */ + function get_minor_version(): number; + /** + * Gets the root accessible container for the current application. + * @returns the root accessible container for the current + * application + */ + function get_root(): Object; + /** + * Gets name string for the GUI toolkit implementing ATK for this application. + * @returns name string for the GUI toolkit implementing ATK for this application + */ + function get_toolkit_name(): string; + /** + * Gets version string for the GUI toolkit implementing ATK for this application. + * @returns version string for the GUI toolkit implementing ATK for this application + */ + function get_toolkit_version(): string; + /** + * Gets the current version for ATK. + * @returns version string for ATK + */ + function get_version(): string; + /** + * Get the {@link RelationType} type corresponding to a relation name. + * @param name a string which is the (non-localized) name of an ATK relation type. + * @returns the {@link RelationType} enumerated type corresponding to the specified name, + * or #ATK_RELATION_NULL if no matching relation type is found. + */ + function relation_type_for_name(name: string): RelationType; + /** + * Gets the description string describing the {@link RelationType} #type. + * @param type The {@link RelationType} whose name is required + * @returns the string describing the AtkRelationType + */ + function relation_type_get_name(type: RelationType): string; + /** + * Associate #name with a new {@link RelationType} + * @param name a name string + * @returns an {@link RelationType} associated with #name + */ + function relation_type_register(name: string): RelationType; + /** + * Removes the specified focus tracker from the list of functions + * to be called when any object receives focus. + * @param tracker_id the id of the focus tracker to remove + */ + function remove_focus_tracker(tracker_id: number): void; + /** + * #listener_id is the value returned by #atk_add_global_event_listener + * when you registered that event listener. + * + * Toolkit implementor note: ATK provides a default implementation for + * this virtual method. ATK implementors are discouraged from + * reimplementing this method. + * + * Toolkit implementor note: this method is not intended to be used by + * ATK implementors but by ATK consumers. + * + * Removes the specified event listener + * @param listener_id the id of the event listener to remove + */ + function remove_global_event_listener(listener_id: number): void; + /** + * #listener_id is the value returned by #atk_add_key_event_listener + * when you registered that event listener. + * + * Removes the specified event listener. + * @param listener_id the id of the event listener to remove + */ + function remove_key_event_listener(listener_id: number): void; + /** + * Get the {@link Role} type corresponding to a rolew name. + * @param name a string which is the (non-localized) name of an ATK role. + * @returns the {@link Role} enumerated type corresponding to the specified name, + * or #ATK_ROLE_INVALID if no matching role is found. + */ + function role_for_name(name: string): Role; + /** + * Gets the localized description string describing the {@link Role} #role. + * @param role The {@link Role} whose localized name is required + * @returns the localized string describing the AtkRole + */ + function role_get_localized_name(role: Role): string; + /** + * Gets the description string describing the {@link Role} #role. + * @param role The {@link Role} whose name is required + * @returns the string describing the AtkRole + */ + function role_get_name(role: Role): string; + /** + * Registers the role specified by #name. #name must be a meaningful + * name. So it should not be empty, or consisting on whitespaces. + * @param name a character string describing the new role. + * @returns an {@link Role} for the new role if added + * properly. ATK_ROLE_INVALID in case of error. + */ + function role_register(name: string): Role; + /** + * Gets the {@link StateType} corresponding to the description string #name. + * @param name a character string state name + * @returns an {@link StateType} corresponding to #name + */ + function state_type_for_name(name: string): StateType; + /** + * Gets the description string describing the {@link StateType} #type. + * @param type The {@link StateType} whose name is required + * @returns the string describing the AtkStateType + */ + function state_type_get_name(type: StateType): string; + /** + * Register a new object state. + * @param name a character string describing the new state. + * @returns an {@link State} value for the new state. + */ + function state_type_register(name: string): StateType; + /** + * Get the {@link TextAttribute} type corresponding to a text attribute name. + * @param name a string which is the (non-localized) name of an ATK text attribute. + * @returns the {@link TextAttribute} enumerated type corresponding to the specified + * name, or #ATK_TEXT_ATTRIBUTE_INVALID if no matching text attribute + * is found. + */ + function text_attribute_for_name(name: string): TextAttribute; + /** + * Gets the name corresponding to the {@link TextAttribute} + * @param attr The {@link TextAttribute} whose name is required + * @returns a string containing the name; this string should not be freed + */ + function text_attribute_get_name(attr: TextAttribute): string; + /** + * Gets the value for the index of the {@link TextAttribute} + * @param attr The {@link TextAttribute} for which a value is required + * @param index_ The index of the required value + * @returns a string containing the value; this string + * should not be freed; %NULL is returned if there are no values + * maintained for the attr value. + */ + function text_attribute_get_value(attr: TextAttribute, index_: number): string | null; + /** + * Associate #name with a new {@link TextAttribute} + * @param name a name string + * @returns an {@link TextAttribute} associated with #name + */ + function text_attribute_register(name: string): TextAttribute; + /** + * Frees the memory associated with an array of AtkTextRange. It is assumed + * that the array was returned by the function atk_text_get_bounded_ranges + * and is NULL terminated. + * @param ranges A pointer to an array of {@link TextRange} which is + * to be freed. + */ + function text_free_ranges(ranges: TextRange[]): void; + /** + * Gets the localized description string describing the {@link ValueType} #value_type. + * @param value_type The {@link ValueType} whose localized name is required + * @returns the localized string describing the {@link ValueType} + */ + function value_type_get_localized_name(value_type: ValueType): string; + /** + * Gets the description string describing the {@link ValueType} #value_type. + * @param value_type The {@link ValueType} whose name is required + * @returns the string describing the {@link ValueType} + */ + function value_type_get_name(value_type: ValueType): string; + /** + * Like {@link Atk.get.binary_age}, but from the headers used at + * application compile time, rather than from the library linked + * against at application run time. + * @returns Like {@link Atk.get.binary_age}, but from the headers used at + * application compile time, rather than from the library linked + * against at application run time. + */ + const BINARY_AGE: number; + + /** + * Like {@link Atk.get.interface_age}, but from the headers used at + * application compile time, rather than from the library linked + * against at application run time. + * @returns Like {@link Atk.get.interface_age}, but from the headers used at + * application compile time, rather than from the library linked + * against at application run time. + */ + const INTERFACE_AGE: number; + + /** + * Like {@link Atk.get.major_version}, but from the headers used at + * application compile time, rather than from the library linked + * against at application run time. + * @returns Like {@link Atk.get.major_version}, but from the headers used at + * application compile time, rather than from the library linked + * against at application run time. + */ + const MAJOR_VERSION: number; + + /** + * Like {@link Atk.get.micro_version}, but from the headers used at + * application compile time, rather than from the library linked + * against at application run time. + * @returns Like {@link Atk.get.micro_version}, but from the headers used at + * application compile time, rather than from the library linked + * against at application run time. + */ + const MICRO_VERSION: number; + + /** + * Like {@link Atk.get.minor_version}, but from the headers used at + * application compile time, rather than from the library linked + * against at application run time. + * @returns Like {@link Atk.get.minor_version}, but from the headers used at + * application compile time, rather than from the library linked + * against at application run time. + */ + const MINOR_VERSION: number; + + /** + * A macro that should be defined by the user prior to including + * the atk/atk.h header. + * The definition should be one of the predefined ATK version + * macros: %ATK_VERSION_2_12, %ATK_VERSION_2_14,... + * + * This macro defines the earliest version of ATK that the package is + * required to be able to compile against. + * + * If the compiler is configured to warn about the use of deprecated + * functions, then using functions that were deprecated in version + * %ATK_VERSION_MIN_REQUIRED or earlier will cause warnings (but + * using functions deprecated in later releases will not). + * @returns A macro that should be defined by the user prior to including + * the atk/atk.h header. + * The definition should be one of the predefined ATK version + * macros: %ATK_VERSION_2_12, %ATK_VERSION_2_14,... + * + * This macro defines the earliest version of ATK that the package is + * required to be able to compile against. + * + * If the compiler is configured to warn about the use of deprecated + * functions, then using functions that were deprecated in version + * %ATK_VERSION_MIN_REQUIRED or earlier will cause warnings (but + * using functions deprecated in later releases will not). + */ + const VERSION_MIN_REQUIRED: number; + +} \ No newline at end of file diff --git a/gir/CDesktopEnums-3.0.d.ts b/gir/CDesktopEnums-3.0.d.ts new file mode 100644 index 0000000000..993ebde6a8 --- /dev/null +++ b/gir/CDesktopEnums-3.0.d.ts @@ -0,0 +1,171 @@ +/** Generated with https://github.com/Gr3q/GIR2TS - If possible do not modify. */ +declare namespace imports.gi.CDesktopEnums { + enum BackgroundShading { + SOLID = 0, + VERTICAL = 1, + HORIZONTAL = 2 + } + + enum BackgroundStyle { + NONE = 0, + WALLPAPER = 1, + CENTERED = 2, + SCALED = 3, + STRETCHED = 4, + ZOOM = 5, + SPANNED = 6 + } + + enum FocusMode { + CLICK = 0, + SLOPPY = 1, + MOUSE = 2 + } + + enum FocusNewWindows { + SMART = 0, + STRICT = 1 + } + + enum MagnifierLensShape { + NONE = 0, + SQUARE = 1, + HORIZONTAL = 2, + VERTICAL = 3 + } + + enum MagnifierMouseTrackingMode { + NONE = 0, + CENTERED = 1, + PROPORTIONAL = 2, + PUSH = 3 + } + + enum MagnifierScreenPosition { + NONE = 0, + FULL_SCREEN = 1, + TOP_HALF = 2, + BOTTOM_HALF = 3, + LEFT_HALF = 4, + RIGHT_HALF = 5 + } + + enum MediaKeyType { + MUTE = 0, + MUTE_QUIET = 1, + VOLUME_UP = 2, + VOLUME_UP_QUIET = 3, + VOLUME_DOWN = 4, + VOLUME_DOWN_QUIET = 5, + MIC_MUTE = 6, + EJECT = 7, + MEDIA = 8, + PLAY = 9, + PAUSE = 10, + STOP = 11, + PREVIOUS = 12, + NEXT = 13, + REWIND = 14, + FORWARD = 15, + REPEAT = 16, + RANDOM = 17, + SCREENSHOT = 18, + SCREENSHOT_CLIP = 19, + SEPARATOR = 20, + WINDOW_SCREENSHOT = 21, + WINDOW_SCREENSHOT_CLIP = 22, + AREA_SCREENSHOT = 23, + AREA_SCREENSHOT_CLIP = 24, + TOUCHPAD = 25, + TOUCHPAD_ON = 26, + TOUCHPAD_OFF = 27, + LOGOUT = 28, + SHUTDOWN = 29, + HOME = 30, + CALCULATOR = 31, + SEARCH = 32, + EMAIL = 33, + SCREENSAVER = 34, + HELP = 35, + TERMINAL = 36, + WWW = 37, + VIDEO_OUT = 38, + ROTATE_VIDEO = 39, + ROTATE_VIDEO_LOCK = 40, + SCREENREADER = 41, + ON_SCREEN_KEYBOARD = 42, + INCREASE_TEXT = 43, + DECREASE_TEXT = 44, + TOGGLE_CONTRAST = 45, + SUSPEND = 46, + HIBERNATE = 47, + SCREEN_BRIGHTNESS_UP = 48, + SCREEN_BRIGHTNESS_DOWN = 49, + KEYBOARD_BRIGHTNESS_UP = 50, + KEYBOARD_BRIGHTNESS_DOWN = 51, + KEYBOARD_BRIGHTNESS_TOGGLE = 52, + BATTERY = 53, + LAST = 54 + } + + enum MouseDwellDirection { + LEFT = 0, + RIGHT = 1, + UP = 2, + DOWN = 3 + } + + enum MouseDwellMode { + WINDOW = 0, + GESTURE = 1 + } + + enum ProxyMode { + NONE = 0, + MANUAL = 1, + AUTO = 2 + } + + enum ScreensaverMode { + BLANK_ONLY = 0, + RANDOM = 1, + SINGLE = 2 + } + + enum TitlebarAction { + TOGGLE_SHADE = 0, + TOGGLE_MAXIMIZE = 1, + TOGGLE_MAXIMIZE_HORIZONTALLY = 2, + TOGGLE_MAXIMIZE_VERTICALLY = 3, + TOGGLE_STUCK = 4, + TOGGLE_ABOVE = 5, + MINIMIZE = 6, + NONE = 7, + LOWER = 8, + MENU = 9 + } + + enum TitlebarScrollAction { + SHADE = 10, + OPACITY = 11, + NONE = 12 + } + + enum ToolbarIconSize { + SMALL = 0, + LARGE = 1 + } + + enum ToolbarStyle { + BOTH = 0, + BOTH_HORIZ = 1, + ICONS = 2, + TEXT = 3 + } + + enum VisualBellType { + FULLSCREEN_FLASH = 0, + FRAME_FLASH = 1 + } + +} \ No newline at end of file diff --git a/gir/CMenu-3.0.d.ts b/gir/CMenu-3.0.d.ts new file mode 100644 index 0000000000..2aeb3263dc --- /dev/null +++ b/gir/CMenu-3.0.d.ts @@ -0,0 +1,447 @@ +/** Generated with https://github.com/Gr3q/GIR2TS - If possible do not modify. */ +declare namespace imports.gi.CMenu { + /** This construct is only for enabling class multi-inheritance, + * use {@link DesktopAppInfo} instead. + */ + interface IDesktopAppInfo { + /** + * Gets the user-visible display name of the "additional application + * action" specified by #action_name. + * + * This corresponds to the "Name" key within the keyfile group for the + * action. + * @param action_name the name of the action as from + * {@link CMenu.DesktopAppInfo.list_actions} + * @returns the locale-specific action name + */ + get_action_name(action_name: string): string; + /** + * Looks up a boolean value in the keyfile backing #info. + * + * The #key is looked up in the "Desktop Entry" group. + * @param key the key to look up + * @returns the boolean value, or %FALSE if the key + * is not found + */ + get_boolean(key: string): boolean; + /** + * Gets the categories from the desktop file. + * @returns The unparsed Categories key from the desktop file; + * i.e. no attempt is made to split it by ';' or validate it. + */ + get_categories(): string; + /** + * When #info was created from a known filename, return it. In some + * situations such as the #GMenuDesktopAppInfo returned from + * {@link CMenu.DesktopAppInfo.new_from_keyfile}, this function will return %NULL. + * @returns The full path to the file for #info, + * or %NULL if not known. + */ + get_filename(): string; + /** + * This function looks up the "X-Flatpak" key of the [Desktop Entry] group, + * which contains the Flatpak App ID + * @returns the flatpak app id or %NULL + */ + get_flatpak_app_id(): string | null; + /** + * Gets the generic name from the destkop file. + * @returns The value of the GenericName key + */ + get_generic_name(): string; + get_is_flatpak(): boolean; + /** + * A desktop file is hidden if the Hidden key in it is + * set to True. + * @returns %TRUE if hidden, %FALSE otherwise. + */ + get_is_hidden(): boolean; + /** + * Gets the keywords from the desktop file. + * @returns The value of the Keywords key + */ + get_keywords(): string[]; + /** + * Looks up a localized string value in the keyfile backing #info + * translated to the current locale. + * + * The #key is looked up in the "Desktop Entry" group. + * @param key the key to look up + * @returns a newly allocated string, or %NULL if the key + * is not found + */ + get_locale_string(key: string): string | null; + /** + * Gets the value of the NoDisplay key, which helps determine if the + * application info should be shown in menus. See + * #G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY and {@link Gio.AppInfo.should_show}. + * @returns The value of the NoDisplay key + */ + get_nodisplay(): boolean; + /** + * Checks if the application info should be shown in menus that list available + * applications for a specific name of the desktop, based on the + * `OnlyShowIn` and `NotShowIn` keys. + * + * #desktop_env should typically be given as %NULL, in which case the + * `XDG_CURRENT_DESKTOP` environment variable is consulted. If you want + * to override the default mechanism then you may specify #desktop_env, + * but this is not recommended. + * + * Note that {@link Gio.AppInfo.should_show} for #info will include this check (with + * %NULL for #desktop_env) as well as additional checks. + * @param desktop_env a string specifying a desktop name + * @returns %TRUE if the #info should be shown in #desktop_env according to the + * `OnlyShowIn` and `NotShowIn` keys, %FALSE + * otherwise. + */ + get_show_in(desktop_env?: string | null): boolean; + /** + * Retrieves the StartupWMClass field from #info. This represents the + * WM_CLASS property of the main window of the application, if launched + * through #info. + * + * Note: The returned value contain the suffix ":flatpak" if #info specifies a flatpak app + * and if the desktop file has a StartupWMClass + * @returns the startup WM class, or %NULL if none is set + * in the desktop file. + */ + get_startup_wm_class(): string; + /** + * Looks up a string value in the keyfile backing #info. + * + * The #key is looked up in the "Desktop Entry" group. + * @param key the key to look up + * @returns a newly allocated string, or %NULL if the key + * is not found + */ + get_string(key: string): string; + /** + * Returns whether #key exists in the "Desktop Entry" group + * of the keyfile backing #info. + * @param key the key to look up + * @returns %TRUE if the #key exists + */ + has_key(key: string): boolean; + /** + * Activates the named application action. + * + * You may only call this function on action names that were + * returned from {@link Gio.DesktopAppInfo.list_actions}. + * + * Note that if the main entry of the desktop file indicates that the + * application supports startup notification, and #launch_context is + * non-%NULL, then startup notification will be used when activating the + * action (and as such, invocation of the action on the receiving side + * must signal the end of startup notification when it is completed). + * This is the expected behaviour of applications declaring additional + * actions, as per the desktop file specification. + * + * As with g_app_info_launch() there is no way to detect failures that + * occur while using this function. + * @param action_name the name of the action as from + * {@link Gio.DesktopAppInfo.list_actions} + * @param launch_context a #GAppLaunchContext + */ + launch_action(action_name: string, launch_context?: Gio.AppLaunchContext | null): void; + /** + * This function performs the equivalent of {@link Gio.AppInfo.launch_uris}, + * but is intended primarily for operating system components that + * launch applications. Ordinary applications should use + * g_app_info_launch_uris(). + * + * If the application is launched via GSpawn, then #spawn_flags, #user_setup + * and #user_setup_data are used for the call to g_spawn_async(). + * Additionally, #pid_callback (with #pid_callback_data) will be called to + * inform about the PID of the created process. See g_spawn_async_with_pipes() + * for information on certain parameter conditions that can enable an + * optimized posix_spawn() codepath to be used. + * + * If application launching occurs via some other mechanism (eg: D-Bus + * activation) then #spawn_flags, #user_setup, #user_setup_data, + * #pid_callback and #pid_callback_data are ignored. + * @param uris List of URIs + * @param launch_context a #GAppLaunchContext + * @param spawn_flags #GSpawnFlags, used for each process + * @returns %TRUE on successful launch, %FALSE otherwise. + */ + launch_uris_as_manager(uris: string[], launch_context: Gio.AppLaunchContext | null, spawn_flags: GLib.SpawnFlags): boolean; + /** + * Returns the list of "additional application actions" supported on the + * desktop file, as per the desktop file specification. + * + * As per the specification, this is the list of actions that are + * explicitly listed in the "Actions" key of the [Desktop Entry] group. + * @returns a list of strings, always non-%NULL + */ + list_actions(): string[]; + } + + type DesktopAppInfoInitOptionsMixin = GObject.ObjectInitOptions & Gio.AppInfoInitOptions + export interface DesktopAppInfoInitOptions extends DesktopAppInfoInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link DesktopAppInfo} instead. + */ + type DesktopAppInfoMixin = IDesktopAppInfo & GObject.Object & Gio.AppInfo; + + interface DesktopAppInfo extends DesktopAppInfoMixin {} + + class DesktopAppInfo { + public constructor(options?: Partial); + /** + * This is currently unused in Cinnamon and does not make sense here + * because the desktop id as used here is not necessarily unique + * @param desktop_id the desktop file id + * @returns %NULL + */ + public static new(desktop_id: string): DesktopAppInfo | null; + /** + * Creates a new #GMenuDesktopAppInfo. + * @param filename the path of a desktop file, in the GLib + * filename encoding + * @returns a new #GMenuDesktopAppInfo or %NULL on error. + */ + public static new_from_filename(filename: string): DesktopAppInfo | null; + /** + * Creates a new #GMenuDesktopAppInfo. + * @param key_file an opened #GKeyFile + * @returns a new #GMenuDesktopAppInfo or %NULL on error. + */ + public static new_from_keyfile(key_file: GLib.KeyFile): DesktopAppInfo | null; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Tree} instead. + */ + interface ITree { + /** + * Flags controlling the content of the menu. + */ + flags: TreeFlags; + /** + * The name of the menu file; must be a basename or a relative path. The file + * will be looked up in $XDG_CONFIG_DIRS/menus/. See the Desktop Menu + * specification. + */ + menu_basename: string; + /** + * The full path of the menu file. If set, GMenuTree:menu-basename will get + * ignored. + */ + menu_path: string; + /** + * This function is only available if the tree has been loaded via + * {@link CMenu.Tree.load_sync} or a variant thereof. + * @returns The absolute and canonicalized path to the loaded menu file + */ + get_canonical_menu_path(): string; + get_directory_from_path(path: string): TreeDirectory; + /** + * Look up the entry corresponding to the given "desktop file id". + * @param id a desktop file ID + * @returns A newly referenced #GMenuTreeEntry, or %NULL if none + */ + get_entry_by_id(id: string): TreeEntry; + /** + * Get the root directory; you must have loaded the tree first (at + * least once) via {@link CMenu.Tree.load_sync} or a variant thereof. + * @returns Root of the tree + */ + get_root_directory(): TreeDirectory; + /** + * Synchronously load the menu contents. This function + * performs a significant amount of blocking I/O if the + * tree has not been loaded yet. + * @returns %TRUE on success, %FALSE on error + */ + load_sync(): boolean; + connect(signal: "changed", callback: (owner: this) => void): number; + + connect(signal: "notify::flags", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::menu-basename", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::menu-path", callback: (owner: this, ...args: any) => void): number; + + } + + type TreeInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface TreeInitOptions extends TreeInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Tree} instead. + */ + type TreeMixin = ITree & GObject.Object; + + interface Tree extends TreeMixin {} + + class Tree { + public constructor(options?: Partial); + public static new(menu_basename: string, flags: TreeFlags): Tree; + public static new_for_path(menu_path: string, flags: TreeFlags): Tree; + public static item_ref(item?: any | null): any | null; + public static item_unref(item?: any | null): void; + } + + export interface TreeAliasInitOptions {} + interface TreeAlias {} + class TreeAlias { + public constructor(options?: Partial); + public get_aliased_directory(): TreeDirectory; + public get_aliased_entry(): TreeEntry; + public get_aliased_item_type(): TreeItemType; + public get_directory(): TreeDirectory; + public get_parent(): TreeDirectory; + /** + * Grab the tree associated with a #GMenuTreeAlias. + * @returns The #GMenuTree + */ + public get_tree(): Tree; + } + + export interface TreeDirectoryInitOptions {} + interface TreeDirectory {} + class TreeDirectory { + public constructor(options?: Partial); + public get_comment(): string; + public get_desktop_file_path(): string; + public get_generic_name(): string; + /** + * Gets the icon for the directory. + * @returns The #GIcon for this directory + */ + public get_icon(): Gio.Icon; + public get_is_nodisplay(): boolean; + public get_menu_id(): string; + public get_name(): string; + public get_parent(): TreeDirectory; + /** + * Grab the tree associated with a #GMenuTreeItem. + * @returns The #GMenuTree + */ + public get_tree(): Tree; + public iter(): TreeIter; + public make_path(entry: TreeEntry): string; + } + + export interface TreeEntryInitOptions {} + interface TreeEntry {} + class TreeEntry { + public constructor(options?: Partial); + public get_app_info(): DesktopAppInfo; + public get_desktop_file_id(): string; + public get_desktop_file_path(): string; + public get_is_excluded(): boolean; + public get_is_flatpak(): boolean; + public get_is_nodisplay_recurse(): boolean; + public get_is_unallocated(): boolean; + public get_parent(): TreeDirectory; + /** + * Grab the tree associated with a #GMenuTreeEntry. + * @returns The #GMenuTree + */ + public get_tree(): Tree; + } + + export interface TreeHeaderInitOptions {} + interface TreeHeader {} + class TreeHeader { + public constructor(options?: Partial); + public get_directory(): TreeDirectory; + public get_parent(): TreeDirectory; + /** + * Grab the tree associated with a #GMenuTreeHeader. + * @returns The #GMenuTree + */ + public get_tree(): Tree; + } + + export interface TreeIterInitOptions {} + interface TreeIter {} + class TreeIter { + public constructor(options?: Partial); + /** + * This method may only be called if {@link CMenu.TreeIter.next} + * returned GMENU_TREE_ITEM_ALIAS. + * @returns An alias + */ + public get_alias(): TreeAlias; + /** + * This method may only be called if {@link CMenu.TreeIter.next} + * returned GMENU_TREE_ITEM_DIRECTORY. + * @returns A directory + */ + public get_directory(): TreeDirectory; + /** + * This method may only be called if {@link CMenu.TreeIter.next} + * returned GMENU_TREE_ITEM_ENTRY. + * @returns An entry + */ + public get_entry(): TreeEntry; + /** + * This method may only be called if {@link CMenu.TreeIter.next} + * returned GMENU_TREE_ITEM_HEADER. + * @returns A header + */ + public get_header(): TreeHeader; + /** + * This method may only be called if {@link CMenu.TreeIter.next} + * returned #GMENU_TREE_ITEM_SEPARATOR. + * @returns A separator + */ + public get_separator(): TreeSeparator; + /** + * Change the iterator to the next item, and return its type. If + * there are no more items, %GMENU_TREE_ITEM_INVALID is returned. + * @returns The type of the next item that can be retrived from the iterator + */ + public next(): TreeItemType; + /** + * Increment the reference count of #iter + * @returns + */ + public ref(): TreeIter; + /** + * Decrement the reference count of #iter + */ + public unref(): void; + } + + export interface TreeSeparatorInitOptions {} + interface TreeSeparator {} + class TreeSeparator { + public constructor(options?: Partial); + public get_parent(): TreeDirectory; + /** + * Grab the tree associated with a #GMenuTreeSeparator. + * @returns The #GMenuTree + */ + public get_tree(): Tree; + } + + enum TreeItemType { + INVALID = 0, + DIRECTORY = 1, + ENTRY = 2, + SEPARATOR = 3, + HEADER = 4, + ALIAS = 5 + } + + enum TreeFlags { + NONE = 0, + INCLUDE_EXCLUDED = 1, + SHOW_EMPTY = 256, + INCLUDE_NODISPLAY = 2, + SHOW_ALL_SEPARATORS = 512, + SORT_DISPLAY_NAME = 65536, + INCLUDE_UNALLOCATED = 4 + } + + const DESKTOPAPPINFO_FLATPAK_SUFFIX: string; + +} \ No newline at end of file diff --git a/gir/Cally-1.0.d.ts b/gir/Cally-1.0.d.ts new file mode 100644 index 0000000000..31def35f09 --- /dev/null +++ b/gir/Cally-1.0.d.ts @@ -0,0 +1,353 @@ +/** Generated with https://github.com/Gr3q/GIR2TS - If possible do not modify. */ +declare namespace imports.gi.Cally { + /** This construct is only for enabling class multi-inheritance, + * use {@link Actor} instead. + */ + interface IActor { + /** + * Adds a new action to be accessed with the #AtkAction interface. + * @param action_name the action name + * @param action_description the action description + * @param action_keybinding the action keybinding + * @param action_func the callback of the action, to be executed with do_action + * @returns added action id, or -1 if failure + */ + add_action(action_name: string, action_description: string, action_keybinding: string, action_func: ActionFunc): number; + /** + * Adds a new action to be accessed with the #AtkAction interface. + * @param action_name the action name + * @param action_description the action description + * @param action_keybinding the action keybinding + * @param callback the callback of the action + * @param notify function to be called when removing the action + * @returns added action id, or -1 if failure + */ + add_action_full(action_name: string, action_description: string, action_keybinding: string, callback: ActionCallback, notify: GLib.DestroyNotify): number; + /** + * Removes a action, using the #action_id returned by {@link Cally.Actor.add_action} + * @param action_id the action id + * @returns %TRUE if the operation was succesful, %FALSE otherwise + */ + remove_action(action_id: number): boolean; + /** + * Removes an action, using the #action_name used when the action was added + * with {@link Cally.Actor.add_action} + * @param action_name the name of the action to remove + * @returns %TRUE if the operation was succesful, %FALSE otherwise + */ + remove_action_by_name(action_name: string): boolean; + } + + type ActorInitOptionsMixin = Atk.GObjectAccessibleInitOptions & Atk.ActionInitOptions & Atk.ComponentInitOptions + export interface ActorInitOptions extends ActorInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Actor} instead. + */ + type ActorMixin = IActor & Atk.GObjectAccessible & Atk.Action & Atk.Component; + + /** + * The CallyActor structure contains only private + * data and should be accessed using the provided API + */ + interface Actor extends ActorMixin {} + + class Actor { + public constructor(options?: Partial); + /** + * Creates a new {@link Actor} for the given #actor + * @param actor a #ClutterActor + * @returns the newly created #AtkObject + */ + public static new(actor: Clutter.Actor): Atk.Object; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Clone} instead. + */ + interface IClone { + + } + + type CloneInitOptionsMixin = ActorInitOptions & Atk.ActionInitOptions & Atk.ComponentInitOptions + export interface CloneInitOptions extends CloneInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Clone} instead. + */ + type CloneMixin = IClone & Actor & Atk.Action & Atk.Component; + + /** + * The CallyClone structure contains only private + * data and should be accessed using the provided API + */ + interface Clone extends CloneMixin {} + + class Clone { + public constructor(options?: Partial); + /** + * Creates a new {@link Clone} for the given #actor. #actor must be a + * #ClutterClone. + * @param actor a #ClutterActor + * @returns the newly created #AtkObject + */ + public static new(actor: Clutter.Actor): Atk.Object; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Group} instead. + */ + interface IGroup { + + } + + type GroupInitOptionsMixin = ActorInitOptions & Atk.ActionInitOptions & Atk.ComponentInitOptions + export interface GroupInitOptions extends GroupInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Group} instead. + */ + type GroupMixin = IGroup & Actor & Atk.Action & Atk.Component; + + /** + * The CallyGroup structure contains only + * private data and should be accessed using the provided API + */ + interface Group extends GroupMixin {} + + class Group { + public constructor(options?: Partial); + /** + * Creates a {@link Group} for #actor + * @param actor a #ClutterGroup + * @returns the newly created {@link Group} + */ + public static new(actor: Clutter.Actor): Atk.Object; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Rectangle} instead. + */ + interface IRectangle { + + } + + type RectangleInitOptionsMixin = ActorInitOptions & Atk.ActionInitOptions & Atk.ComponentInitOptions + export interface RectangleInitOptions extends RectangleInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Rectangle} instead. + */ + type RectangleMixin = IRectangle & Actor & Atk.Action & Atk.Component; + + /** + * The CallyRectangle structure contains only private + * data and should be accessed using the provided API + */ + interface Rectangle extends RectangleMixin {} + + class Rectangle { + public constructor(options?: Partial); + /** + * Creates a new {@link Rectangle} for the given #actor. #actor must be + * a #ClutterRectangle. + * @param actor a #ClutterActor + * @returns the newly created #AtkObject + */ + public static new(actor: Clutter.Actor): Atk.Object; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Root} instead. + */ + interface IRoot { + + } + + type RootInitOptionsMixin = Atk.GObjectAccessibleInitOptions + export interface RootInitOptions extends RootInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Root} instead. + */ + type RootMixin = IRoot & Atk.GObjectAccessible; + + /** + * The CallyRoot structure contains only private + * data and should be accessed using the provided API + */ + interface Root extends RootMixin {} + + class Root { + public constructor(options?: Partial); + /** + * Creates a new {@link Root} object. + * @returns the newly created #AtkObject + */ + public static new(): Atk.Object; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Stage} instead. + */ + interface IStage { + + } + + type StageInitOptionsMixin = GroupInitOptions & Atk.ActionInitOptions & Atk.ComponentInitOptions & Atk.WindowInitOptions + export interface StageInitOptions extends StageInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Stage} instead. + */ + type StageMixin = IStage & Group & Atk.Action & Atk.Component & Atk.Window; + + /** + * The CallyStage structure contains only + * private data and should be accessed using the provided API + */ + interface Stage extends StageMixin {} + + class Stage { + public constructor(options?: Partial); + /** + * Creates a new {@link Stage} for the given #actor. #actor should be a + * #ClutterStage. + * @param actor a #ClutterActor + * @returns the newly created #AtkObject + */ + public static new(actor: Clutter.Actor): Atk.Object; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Text} instead. + */ + interface IText { + + } + + type TextInitOptionsMixin = ActorInitOptions & Atk.ActionInitOptions & Atk.ComponentInitOptions & Atk.EditableTextInitOptions & Atk.TextInitOptions + export interface TextInitOptions extends TextInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Text} instead. + */ + type TextMixin = IText & Actor & Atk.Action & Atk.Component & Atk.EditableText & Atk.Text; + + /** + * The CallyText structure contains only private + * data and should be accessed using the provided API + */ + interface Text extends TextMixin {} + + class Text { + public constructor(options?: Partial); + /** + * Creates a new {@link Text} for the given #actor. #actor must be a + * #ClutterText. + * @param actor a #ClutterActor + * @returns the newly created #AtkObject + */ + public static new(actor: Clutter.Actor): Atk.Object; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Texture} instead. + */ + interface ITexture { + + } + + type TextureInitOptionsMixin = ActorInitOptions & Atk.ActionInitOptions & Atk.ComponentInitOptions + export interface TextureInitOptions extends TextureInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Texture} instead. + */ + type TextureMixin = ITexture & Actor & Atk.Action & Atk.Component; + + /** + * The CallyTexture structure contains only + * private data and should be accessed using the provided API + */ + interface Texture extends TextureMixin {} + + class Texture { + public constructor(options?: Partial); + /** + * Creates a new {@link Texture} for the given #actor. #actor must be + * a #ClutterTexture. + * @param actor a #ClutterActor + * @returns the newly created #AtkObject + */ + public static new(actor: Clutter.Actor): Atk.Object; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Util} instead. + */ + interface IUtil { + + } + + type UtilInitOptionsMixin = Atk.UtilInitOptions + export interface UtilInitOptions extends UtilInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Util} instead. + */ + type UtilMixin = IUtil & Atk.Util; + + /** + * The CallyUtil structure contains only + * private data and should be accessed using the provided API + */ + interface Util extends UtilMixin {} + + class Util { + public constructor(options?: Partial); + } + + /** + * Action function, to be used on #AtkAction implementations as + * an individual action. Unlike {@link ActionFunc}, this function + * uses the #user_data argument passed to {@link Cally.Actor.add_action_full}. + */ + interface ActionCallback { + /** + * Action function, to be used on #AtkAction implementations as + * an individual action. Unlike {@link ActionFunc}, this function + * uses the #user_data argument passed to {@link Cally.Actor.add_action_full}. + * @param cally_actor a {@link Actor} + */ + (cally_actor: Actor): void; + } + + /** + * Action function, to be used on #AtkAction implementations as a individual + * action + */ + interface ActionFunc { + /** + * Action function, to be used on #AtkAction implementations as a individual + * action + * @param cally_actor a {@link Actor} + */ + (cally_actor: Actor): void; + } + + /** + * Initializes the accessibility support. + * @returns %TRUE if accessibility support has been correctly + * initialized. + */ + function accessibility_init(): boolean; + + /** + * Returns if the accessibility support using cally is enabled. + * @returns %TRUE if accessibility support has been correctly + * initialized. + */ + function get_cally_initialized(): boolean; + +} \ No newline at end of file diff --git a/gir/Caribou-1.0.d.ts b/gir/Caribou-1.0.d.ts new file mode 100644 index 0000000000..3429cd10b2 --- /dev/null +++ b/gir/Caribou-1.0.d.ts @@ -0,0 +1,597 @@ +/** Generated with https://github.com/Gr3q/GIR2TS - If possible do not modify. */ +declare namespace imports.gi.Caribou { + /** This construct is only for enabling class multi-inheritance, + * use {@link DisplayAdapter} instead. + */ + interface IDisplayAdapter { + display: Gdk.Display; + keyval_press(keyval: number): void; + keyval_release(keyval: number): void; + mod_lock(mask: number): void; + mod_unlock(mask: number): void; + mod_latch(mask: number): void; + mod_unlatch(mask: number): void; + get_current_group(): [ number, string, string ]; + get_groups(): [ string[], string[] ]; + register_key_func(keyval: number, func?: Caribou.KeyButtonCallback | null): void; + register_button_func(button: number, func?: Caribou.KeyButtonCallback | null): void; + get_display(): Gdk.Display; + connect(signal: "modifiers-changed", callback: (owner: this, modifiers: number) => void): number; + connect(signal: "group-changed", callback: (owner: this, gid: number, group: string, variant: string) => void): number; + connect(signal: "config-changed", callback: (owner: this) => void): number; + + connect(signal: "notify::display", callback: (owner: this, ...args: any) => void): number; + + } + + type DisplayAdapterInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface DisplayAdapterInitOptions extends DisplayAdapterInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link DisplayAdapter} instead. + */ + type DisplayAdapterMixin = IDisplayAdapter & GObject.Object; + + interface DisplayAdapter extends DisplayAdapterMixin {} + + class DisplayAdapter { + public constructor(options?: Partial); + public static set_default(adapter: Caribou.DisplayAdapter): boolean; + public static get_default(): Caribou.DisplayAdapter; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link NullAdapter} instead. + */ + interface INullAdapter { + + } + + type NullAdapterInitOptionsMixin = Caribou.DisplayAdapterInitOptions + export interface NullAdapterInitOptions extends NullAdapterInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link NullAdapter} instead. + */ + type NullAdapterMixin = INullAdapter & Caribou.DisplayAdapter; + + interface NullAdapter extends NullAdapterMixin {} + + class NullAdapter { + public constructor(options?: Partial); + public static new(): Caribou.NullAdapter; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link XAdapter} instead. + */ + interface IXAdapter { + + } + + type XAdapterInitOptionsMixin = Caribou.DisplayAdapterInitOptions + export interface XAdapterInitOptions extends XAdapterInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link XAdapter} instead. + */ + type XAdapterMixin = IXAdapter & Caribou.DisplayAdapter; + + interface XAdapter extends XAdapterMixin {} + + class XAdapter { + public constructor(options?: Partial); + public static new(): Caribou.XAdapter; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link KeyboardModel} instead. + */ + interface IKeyboardModel { + active_group: string; + keyboard_type: string; + keyboard_file: string; + get_groups(): [ string[], number ]; + get_group(group_name: string): Caribou.GroupModel; + get_active_group(): string; + get_keyboard_type(): string; + get_keyboard_file(): string; + connect(signal: "group-added", callback: (owner: this, name: string) => void): number; + connect(signal: "group-removed", callback: (owner: this, name: string) => void): number; + + connect(signal: "notify::active-group", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::keyboard-type", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::keyboard-file", callback: (owner: this, ...args: any) => void): number; + + } + + type KeyboardModelInitOptionsMixin = GObject.ObjectInitOptions & Caribou.IKeyboardObjectInitOptions & + Pick; + + export interface KeyboardModelInitOptions extends KeyboardModelInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link KeyboardModel} instead. + */ + type KeyboardModelMixin = IKeyboardModel & GObject.Object & Caribou.IKeyboardObject; + + interface KeyboardModel extends KeyboardModelMixin {} + + class KeyboardModel { + public constructor(options?: Partial); + public static new(): Caribou.KeyboardModel; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link KeyboardService} instead. + */ + interface IKeyboardService { + set_cursor_location(x: number, y: number, w: number, h: number): void; + set_entry_location(x: number, y: number, w: number, h: number): void; + show(timestamp: number): void; + hide(timestamp: number): void; + register_keyboard(name: string): void; + name_lost(name: string): void; + } + + type KeyboardServiceInitOptionsMixin = GObject.ObjectInitOptions + export interface KeyboardServiceInitOptions extends KeyboardServiceInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link KeyboardService} instead. + */ + type KeyboardServiceMixin = IKeyboardService & GObject.Object; + + interface KeyboardService extends KeyboardServiceMixin {} + + class KeyboardService { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link GroupModel} instead. + */ + interface IGroupModel { + active_level: string; + readonly group: string; + readonly variant: string; + get_levels(): [ string[], number ]; + get_level(level_name: string): Caribou.LevelModel; + get_active_level(): string; + connect(signal: "notify::active-level", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::group", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::variant", callback: (owner: this, ...args: any) => void): number; + + } + + type GroupModelInitOptionsMixin = GObject.ObjectInitOptions & Caribou.IKeyboardObjectInitOptions & + Pick; + + export interface GroupModelInitOptions extends GroupModelInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link GroupModel} instead. + */ + type GroupModelMixin = IGroupModel & GObject.Object & Caribou.IKeyboardObject; + + interface GroupModel extends GroupModelMixin {} + + class GroupModel { + public constructor(options?: Partial); + public static new(group: string, variant: string): Caribou.GroupModel; + public static create_group_name(group: string, variant: string): string; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link LevelModel} instead. + */ + interface ILevelModel { + mode: string; + get_rows(): [ Caribou.RowModel[], number ]; + get_mode(): string; + connect(signal: "level-toggled", callback: (owner: this, new_level: string) => void): number; + + connect(signal: "notify::mode", callback: (owner: this, ...args: any) => void): number; + + } + + type LevelModelInitOptionsMixin = Caribou.ScannableGroupInitOptions & Caribou.IKeyboardObjectInitOptions & + Pick; + + export interface LevelModelInitOptions extends LevelModelInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link LevelModel} instead. + */ + type LevelModelMixin = ILevelModel & Caribou.ScannableGroup & Caribou.IKeyboardObject; + + interface LevelModel extends LevelModelMixin {} + + class LevelModel { + public constructor(options?: Partial); + public static new(mode: string): Caribou.LevelModel; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link RowModel} instead. + */ + interface IRowModel { + get_columns(): [ Caribou.ColumnModel[], number ]; + } + + type RowModelInitOptionsMixin = Caribou.ScannableGroupInitOptions & Caribou.IScannableItemInitOptions & Caribou.IKeyboardObjectInitOptions + export interface RowModelInitOptions extends RowModelInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link RowModel} instead. + */ + type RowModelMixin = IRowModel & Caribou.ScannableGroup & Caribou.IScannableItem & Caribou.IKeyboardObject; + + interface RowModel extends RowModelMixin {} + + class RowModel { + public constructor(options?: Partial); + public static new(): Caribou.RowModel; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link KeyModel} instead. + */ + interface IKeyModel { + align: string; + width: number; + toggle: string; + repeatable: boolean; + is_modifier: boolean; + show_subkeys: boolean; + name: string; + keyval: number; + text: string; + label: string; + readonly modifier_state: Caribou.ModifierState; + press(): void; + release(): void; + get_extended_keys(): [ Caribou.KeyModel[], number ]; + activate(): void; + get_align(): string; + set_align(value: string): void; + get_width(): number; + set_width(value: number): void; + get_toggle(): string; + set_toggle(value: string): void; + get_repeatable(): boolean; + set_repeatable(value: boolean): void; + get_is_modifier(): boolean; + set_is_modifier(value: boolean): void; + get_show_subkeys(): boolean; + get_name(): string; + get_keyval(): number; + get_text(): string | null; + get_label(): string; + set_label(value: string): void; + connect(signal: "key-hold-end", callback: (owner: this) => void): number; + connect(signal: "key-hold", callback: (owner: this) => void): number; + + connect(signal: "notify::align", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::width", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::toggle", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::repeatable", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::is-modifier", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::show-subkeys", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::name", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::keyval", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::text", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::label", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::modifier_state", callback: (owner: this, ...args: any) => void): number; + + } + + type KeyModelInitOptionsMixin = GObject.ObjectInitOptions & Caribou.IScannableItemInitOptions & Caribou.IKeyboardObjectInitOptions & + Pick; + + export interface KeyModelInitOptions extends KeyModelInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link KeyModel} instead. + */ + type KeyModelMixin = IKeyModel & GObject.Object & Caribou.IScannableItem & Caribou.IKeyboardObject; + + interface KeyModel extends KeyModelMixin {} + + class KeyModel { + public constructor(options?: Partial); + public static new(name: string, text?: string | null): Caribou.KeyModel; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link ColumnModel} instead. + */ + interface IColumnModel { + get_key(index: number): Caribou.KeyModel; + first_key(): Caribou.KeyModel; + } + + type ColumnModelInitOptionsMixin = Caribou.ScannableGroupInitOptions & Caribou.IScannableItemInitOptions & Caribou.IKeyboardObjectInitOptions + export interface ColumnModelInitOptions extends ColumnModelInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link ColumnModel} instead. + */ + type ColumnModelMixin = IColumnModel & Caribou.ScannableGroup & Caribou.IScannableItem & Caribou.IKeyboardObject; + + interface ColumnModel extends ColumnModelMixin {} + + class ColumnModel { + public constructor(options?: Partial); + public static new(): Caribou.ColumnModel; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Scanner} instead. + */ + interface IScanner { + bind_settings: boolean; + scan_grouping: number; + scan_enabled: boolean; + step_time: number; + switch_device: string; + keyboard_key: string; + mouse_button: number; + scan_cycles: number; + autorestart: boolean; + inverse_scanning: boolean; + set_keyboard(keyboard: Caribou.KeyboardModel): void; + reset(): void; + get_bind_settings(): boolean; + get_scan_grouping(): number; + set_scan_grouping(value: number): void; + get_scan_enabled(): boolean; + set_scan_enabled(value: boolean): void; + get_step_time(): number; + set_step_time(value: number): void; + get_switch_device(): string; + set_switch_device(value: string): void; + get_keyboard_key(): string; + set_keyboard_key(value: string): void; + get_mouse_button(): number; + set_mouse_button(value: number): void; + get_scan_cycles(): number; + set_scan_cycles(value: number): void; + get_autorestart(): boolean; + set_autorestart(value: boolean): void; + get_inverse_scanning(): boolean; + set_inverse_scanning(value: boolean): void; + connect(signal: "notify::bind-settings", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::scan-grouping", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::scan-enabled", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::step-time", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::switch-device", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::keyboard-key", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::mouse-button", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::scan-cycles", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::autorestart", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::inverse-scanning", callback: (owner: this, ...args: any) => void): number; + + } + + type ScannerInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface ScannerInitOptions extends ScannerInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Scanner} instead. + */ + type ScannerMixin = IScanner & GObject.Object; + + interface Scanner extends ScannerMixin {} + + class Scanner { + public constructor(options?: Partial); + public static new(): Caribou.Scanner; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link ScannableGroup} instead. + */ + interface IScannableGroup { + get_scan_children(): [ Caribou.IScannableItem[], number ]; + child_select(): Caribou.IScannableItem | null; + } + + type ScannableGroupInitOptionsMixin = GObject.ObjectInitOptions & Caribou.IScannableGroupInitOptions + export interface ScannableGroupInitOptions extends ScannableGroupInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link ScannableGroup} instead. + */ + type ScannableGroupMixin = IScannableGroup & GObject.Object & Caribou.IScannableGroup; + + interface ScannableGroup extends ScannableGroupMixin {} + + class ScannableGroup { + public constructor(options?: Partial); + } + + export interface IScannableItemIfaceInitOptions {} + interface IScannableItemIface {} + class IScannableItemIface { + public constructor(options?: Partial); + public readonly parent_iface: GObject.TypeInterface; + public get_scan_stepping: {(self: Caribou.IScannableItem): boolean;}; + public set_scan_stepping: {(self: Caribou.IScannableItem, value: boolean): void;}; + public get_scan_selected: {(self: Caribou.IScannableItem): boolean;}; + public set_scan_selected: {(self: Caribou.IScannableItem, value: boolean): void;}; + } + + export interface IScannableGroupIfaceInitOptions {} + interface IScannableGroupIface {} + class IScannableGroupIface { + public constructor(options?: Partial); + public readonly parent_iface: GObject.TypeInterface; + public child_select: {(self: Caribou.IScannableGroup): Caribou.IScannableItem | null;}; + public scan_reset: {(self: Caribou.IScannableGroup): void;}; + public get_scan_children: {(self: Caribou.IScannableGroup): [ Caribou.IScannableItem[], number ];}; + public child_step: {(self: Caribou.IScannableGroup, cycles: number): Caribou.IScannableItem | null;}; + public get_step_path: {(self: Caribou.IScannableGroup): [ Caribou.IScannableItem[], number ];}; + public get_selected_path: {(self: Caribou.IScannableGroup): [ Caribou.IScannableItem[], number ];}; + public get_scan_grouping: {(self: Caribou.IScannableGroup): Caribou.ScanGrouping;}; + public set_scan_grouping: {(self: Caribou.IScannableGroup, value: Caribou.ScanGrouping): void;}; + } + + export interface IKeyboardObjectIfaceInitOptions {} + interface IKeyboardObjectIface {} + class IKeyboardObjectIface { + public constructor(options?: Partial); + public readonly parent_iface: GObject.TypeInterface; + public get_children: {(self: Caribou.IKeyboardObject): [ Caribou.IKeyboardObject[], number ];}; + public get_keys: {(self: Caribou.IKeyboardObject): [ Caribou.KeyModel[], number ];}; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link IScannableItem} instead. + */ + interface IIScannableItem { + scan_stepping: boolean; + scan_selected: boolean; + get_scan_stepping(): boolean; + set_scan_stepping(value: boolean): void; + get_scan_selected(): boolean; + set_scan_selected(value: boolean): void; + connect(signal: "notify::scan-stepping", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::scan-selected", callback: (owner: this, ...args: any) => void): number; + + } + + type IScannableItemInitOptionsMixin = Pick; + + export interface IScannableItemInitOptions extends IScannableItemInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link IScannableItem} instead. + */ + type IScannableItemMixin = IIScannableItem; + + interface IScannableItem extends IScannableItemMixin {} + + class IScannableItem { + public constructor(options?: Partial); + } + + + + /** This construct is only for enabling class multi-inheritance, + * use {@link IScannableGroup} instead. + */ + interface IIScannableGroup { + scan_grouping: Caribou.ScanGrouping; + child_select(): Caribou.IScannableItem | null; + scan_reset(): void; + get_scan_children(): [ Caribou.IScannableItem[], number ]; + child_step(cycles: number): Caribou.IScannableItem | null; + get_step_path(): [ Caribou.IScannableItem[], number ]; + get_selected_path(): [ Caribou.IScannableItem[], number ]; + get_scan_grouping(): Caribou.ScanGrouping; + set_scan_grouping(value: Caribou.ScanGrouping): void; + connect(signal: "selected-item-changed", callback: (owner: this, selected_item: Caribou.IScannableItem | null) => void): number; + connect(signal: "step-item-changed", callback: (owner: this, step_item: Caribou.IScannableItem | null) => void): number; + connect(signal: "scan-cleared", callback: (owner: this) => void): number; + + connect(signal: "notify::scan-grouping", callback: (owner: this, ...args: any) => void): number; + + } + + type IScannableGroupInitOptionsMixin = Pick; + + export interface IScannableGroupInitOptions extends IScannableGroupInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link IScannableGroup} instead. + */ + type IScannableGroupMixin = IIScannableGroup; + + interface IScannableGroup extends IScannableGroupMixin {} + + class IScannableGroup { + public constructor(options?: Partial); + } + + + + /** This construct is only for enabling class multi-inheritance, + * use {@link IKeyboardObject} instead. + */ + interface IIKeyboardObject { + get_children(): [ Caribou.IKeyboardObject[], number ]; + get_keys(): [ Caribou.KeyModel[], number ]; + connect(signal: "key-clicked", callback: (owner: this, key: Caribou.KeyModel) => void): number; + connect(signal: "key-pressed", callback: (owner: this, key: Caribou.KeyModel) => void): number; + connect(signal: "key-released", callback: (owner: this, key: Caribou.KeyModel) => void): number; + + } + + type IKeyboardObjectInitOptionsMixin = {}; + export interface IKeyboardObjectInitOptions extends IKeyboardObjectInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link IKeyboardObject} instead. + */ + type IKeyboardObjectMixin = IIKeyboardObject; + + interface IKeyboardObject extends IKeyboardObjectMixin {} + + class IKeyboardObject { + public constructor(options?: Partial); + } + + + + enum ModifierState { + NONE = 0, + LATCHED = 1, + LOCKED = 2 + } + + enum ScanGrouping { + NONE = 0, + SUBGROUPS = 1, + ROWS = 2, + LINEAR = 3 + } + + interface KeyButtonCallback { + (keybuttoncode: number, pressed: boolean): void; + } + +} \ No newline at end of file diff --git a/gir/Cinnamon-0.1.d.ts b/gir/Cinnamon-0.1.d.ts new file mode 100644 index 0000000000..2567a90669 --- /dev/null +++ b/gir/Cinnamon-0.1.d.ts @@ -0,0 +1,2019 @@ +/** Generated with https://github.com/Gr3q/GIR2TS - If possible do not modify. */ +declare namespace imports.gi.Cinnamon { + /** This construct is only for enabling class multi-inheritance, + * use {@link App} instead. + */ + interface IApp { + /** + * The high-level state of the application, effectively whether it's + * running or not, or transitioning between those states. + */ + readonly state: AppState; + /** + * Like {@link Cinnamon.App.activate_full}, but using the default workspace and + * event timestamp. + */ + activate(): void; + /** + * Perform an appropriate default action for operating on this application, + * dependent on its current state. For example, if the application is not + * currently running, launch it. If it is running, activate the most + * recently used NORMAL window (or if that window has a transient, the most + * recently used transient for that window). + * @param workspace launch on this workspace, or -1 for default. Ignored if + * activating an existing window + * @param timestamp Event timestamp + */ + activate_full(workspace: number, timestamp: number): void; + /** + * Bring all windows for the given app to the foreground, + * but ensure that #window is on top. If #window is %NULL, + * the window with the most recent user time for the app + * will be used. + * + * This function has no effect if #app is not currently running. + * @param window Window to be focused + * @param timestamp Event timestamp + */ + activate_window(window: Meta.Window | null, timestamp: number): void; + /** + * Returns %TRUE if the app supports opening a new window through + * {@link Cinnamon.App.open_new_window} (ie, if calling that function will + * result in actually opening a new window and not something else, + * like presenting the most recently active one) + * @returns + */ + can_open_new_window(): boolean; + /** + * Look up the icon for this application, and create a #ClutterActor + * for it at the given size. + * @param size + * @returns A floating #ClutterActor + */ + create_icon_texture(size: number): Clutter.Actor; + /** + * Look up the icon for this application, and create a #ClutterTexture + * for it at the given size. If for_window is NULL, it bases the icon + * off the most-recently-used window for the app, otherwise it attempts to + * use for_window for determining the icon. + * @param size the size of the icon to create + * @param for_window Optional - the backing MetaWindow to look up for. + * @returns A floating #ClutterActor + */ + create_icon_texture_for_window(size: number, for_window?: Meta.Window | null): Clutter.Actor; + get_app_info(): CMenu.DesktopAppInfo; + get_description(): string; + get_flatpak_app_id(): string; + get_id(): string; + get_is_flatpak(): boolean; + get_keywords(): string; + get_n_windows(): number; + get_name(): string; + get_nodisplay(): boolean; + get_pids(): number[]; + get_state(): AppState; + get_tree_entry(): CMenu.TreeEntry; + /** + * Get the toplevel, interesting windows which are associated with this + * application. The returned list will be sorted first by whether + * they're on the active workspace, then by whether they're visible, + * and finally by the time the user last interacted with them. + * @returns List of windows + */ + get_windows(): Meta.Window[]; + is_on_workspace(workspace: Meta.Workspace): boolean; + /** + * A window backed application is one which represents just an open + * window, i.e. there's no .desktop file association, so we don't know + * how to launch it again. + * @returns + */ + is_window_backed(): boolean; + launch(timestamp: number, uris: string[], workspace: number): [ boolean, string ]; + /** + * Launch an application using the dedicated gpu (if available) + * @param timestamp Event timestamp, or 0 for current event timestamp + * @param uris List of uris to pass to application + * @param workspace Start on this workspace, or -1 for default + * @returns + * + * Returned startup notification ID, or %NULL if none + */ + launch_offloaded(timestamp: number, uris: string[], workspace: number): [ boolean, string ]; + /** + * Request that the application create a new window. + * @param workspace open on this workspace, or -1 for default + */ + open_new_window(workspace: number): void; + /** + * Initiate an asynchronous request to quit this application. + * The application may interact with the user, and the user + * might cancel the quit request from the application UI. + * + * This operation may not be supported for all applications. + * @returns %TRUE if a quit request is supported for this application + */ + request_quit(): boolean; + connect(signal: "windows-changed", callback: (owner: this) => void): number; + + connect(signal: "notify::state", callback: (owner: this, ...args: any) => void): number; + + } + + type AppInitOptionsMixin = GObject.ObjectInitOptions + export interface AppInitOptions extends AppInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link App} instead. + */ + type AppMixin = IApp & GObject.Object; + + interface App extends AppMixin {} + + class App { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link AppSystem} instead. + */ + interface IAppSystem { + get_all(): App[]; + /** + * Returns the set of applications which currently have at least one + * open window in the given context. + * @returns Active applications + */ + get_running(): App[]; + get_tree(): CMenu.Tree; + /** + * Find a {@link App} corresponding to an id. + * @param id + * @returns The {@link App} for id, or %NULL if none + */ + lookup_app(id: string): App; + /** + * Find a valid application whose .desktop file, without the extension + * and properly canonicalized, matches #wmclass. + * @param wmclass A WM_CLASS value + * @returns A {@link App} for #wmclass + */ + lookup_desktop_wmclass(wmclass?: string | null): App; + /** + * Find a {@link App} corresponding to a flatpak app id. + * @param app_id + * @returns The {@link App} for app_id, or %NULL if none + */ + lookup_flatpak_app_id(app_id: string): App; + /** + * Find a valid application whose .desktop file contains a + * StartupWMClass entry matching #wmclass. + * @param wmclass A WM_CLASS value + * @returns A {@link App} for #wmclass + */ + lookup_startup_wmclass(wmclass?: string | null): App; + connect(signal: "app-state-changed", callback: (owner: this, object: App) => void): number; + connect(signal: "installed-changed", callback: (owner: this) => void): number; + + } + + type AppSystemInitOptionsMixin = GObject.ObjectInitOptions + export interface AppSystemInitOptions extends AppSystemInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link AppSystem} instead. + */ + type AppSystemMixin = IAppSystem & GObject.Object; + + interface AppSystem extends AppSystemMixin {} + + class AppSystem { + public constructor(options?: Partial); + public static get_default(): AppSystem; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link CalendarServerProxy} instead. + */ + interface ICalendarServerProxy { + + } + + type CalendarServerProxyInitOptionsMixin = Gio.DBusProxyInitOptions & CalendarServerInitOptions & Gio.AsyncInitableInitOptions & Gio.DBusInterfaceInitOptions & Gio.InitableInitOptions + export interface CalendarServerProxyInitOptions extends CalendarServerProxyInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link CalendarServerProxy} instead. + */ + type CalendarServerProxyMixin = ICalendarServerProxy & Gio.DBusProxy & CalendarServer & Gio.AsyncInitable & Gio.DBusInterface & Gio.Initable; + + /** + * The {@link CalendarServerProxy} structure contains only private data and should only be accessed using the provided API. + */ + interface CalendarServerProxy extends CalendarServerProxyMixin {} + + class CalendarServerProxy { + public constructor(options?: Partial); + /** + * Finishes an operation started with {@link Cinnamon.CalendarServerProxy.new}. + * @param res The #GAsyncResult obtained from the #GAsyncReadyCallback passed to {@link Cinnamon.CalendarServerProxy.new}. + * @returns The constructed proxy object or %NULL if #error is set. + */ + public static new_finish(res: Gio.AsyncResult): CalendarServerProxy; + /** + * Finishes an operation started with {@link Cinnamon.CalendarServerProxy.new_for_bus}. + * @param res The #GAsyncResult obtained from the #GAsyncReadyCallback passed to {@link Cinnamon.CalendarServerProxy.new_for_bus}. + * @returns The constructed proxy object or %NULL if #error is set. + */ + public static new_for_bus_finish(res: Gio.AsyncResult): CalendarServerProxy; + /** + * Like {@link Cinnamon.CalendarServerProxy.new_sync} but takes a #GBusType instead of a #GDBusConnection. + * + * The calling thread is blocked until a reply is received. + * + * See cinnamon_calendar_server_proxy_new_for_bus() for the asynchronous version of this constructor. + * @param bus_type A #GBusType. + * @param flags Flags from the #GDBusProxyFlags enumeration. + * @param name A bus name (well-known or unique). + * @param object_path An object path. + * @param cancellable A #GCancellable or %NULL. + * @returns The constructed proxy object or %NULL if #error is set. + */ + public static new_for_bus_sync(bus_type: Gio.BusType, flags: Gio.DBusProxyFlags, name: string, object_path: string, cancellable?: Gio.Cancellable | null): CalendarServerProxy; + /** + * Synchronously creates a proxy for the D-Bus interface org.cinnamon.CalendarServer. See {@link Glib.dbus_proxy_new_sync} for more details. + * + * The calling thread is blocked until a reply is received. + * + * See cinnamon_calendar_server_proxy_new() for the asynchronous version of this constructor. + * @param connection A #GDBusConnection. + * @param flags Flags from the #GDBusProxyFlags enumeration. + * @param name A bus name (well-known or unique) or %NULL if #connection is not a message bus connection. + * @param object_path An object path. + * @param cancellable A #GCancellable or %NULL. + * @returns The constructed proxy object or %NULL if #error is set. + */ + public static new_sync(connection: Gio.DBusConnection, flags: Gio.DBusProxyFlags, name: string | null, object_path: string, cancellable?: Gio.Cancellable | null): CalendarServerProxy; + /** + * Asynchronously creates a proxy for the D-Bus interface org.cinnamon.CalendarServer. See {@link Glib.dbus_proxy_new} for more details. + * + * When the operation is finished, #callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). + * You can then call cinnamon_calendar_server_proxy_new_finish() to get the result of the operation. + * + * See cinnamon_calendar_server_proxy_new_sync() for the synchronous, blocking version of this constructor. + * @param connection A #GDBusConnection. + * @param flags Flags from the #GDBusProxyFlags enumeration. + * @param name A bus name (well-known or unique) or %NULL if #connection is not a message bus connection. + * @param object_path An object path. + * @param cancellable A #GCancellable or %NULL. + * @param callback A #GAsyncReadyCallback to call when the request is satisfied. + */ + public static new(connection: Gio.DBusConnection, flags: Gio.DBusProxyFlags, name: string | null, object_path: string, cancellable?: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback | null): void; + /** + * Like {@link Cinnamon.CalendarServerProxy.new} but takes a #GBusType instead of a #GDBusConnection. + * + * When the operation is finished, #callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). + * You can then call cinnamon_calendar_server_proxy_new_for_bus_finish() to get the result of the operation. + * + * See cinnamon_calendar_server_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. + * @param bus_type A #GBusType. + * @param flags Flags from the #GDBusProxyFlags enumeration. + * @param name A bus name (well-known or unique). + * @param object_path An object path. + * @param cancellable A #GCancellable or %NULL. + * @param callback A #GAsyncReadyCallback to call when the request is satisfied. + */ + public static new_for_bus(bus_type: Gio.BusType, flags: Gio.DBusProxyFlags, name: string, object_path: string, cancellable?: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback | null): void; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link CalendarServerSkeleton} instead. + */ + interface ICalendarServerSkeleton { + + } + + type CalendarServerSkeletonInitOptionsMixin = Gio.DBusInterfaceSkeletonInitOptions & CalendarServerInitOptions & Gio.DBusInterfaceInitOptions + export interface CalendarServerSkeletonInitOptions extends CalendarServerSkeletonInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link CalendarServerSkeleton} instead. + */ + type CalendarServerSkeletonMixin = ICalendarServerSkeleton & Gio.DBusInterfaceSkeleton & CalendarServer & Gio.DBusInterface; + + /** + * The {@link CalendarServerSkeleton} structure contains only private data and should only be accessed using the provided API. + */ + interface CalendarServerSkeleton extends CalendarServerSkeletonMixin {} + + class CalendarServerSkeleton { + public constructor(options?: Partial); + /** + * Creates a skeleton object for the D-Bus interface org.cinnamon.CalendarServer. + * @returns The skeleton object. + */ + public static new(): CalendarServerSkeleton; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link DocSystem} instead. + */ + interface IDocSystem { + /** + * Returns the currently cached set of recent files. Recent files are read initially + * from the underlying #GtkRecentManager, and updated when it changes. + * This function does not perform I/O. + * @returns Cached recent file infos + */ + get_all(): Gtk.RecentInfo[]; + connect(signal: "changed", callback: (owner: this) => void): number; + + } + + type DocSystemInitOptionsMixin = GObject.ObjectInitOptions + export interface DocSystemInitOptions extends DocSystemInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link DocSystem} instead. + */ + type DocSystemMixin = IDocSystem & GObject.Object; + + interface DocSystem extends DocSystemMixin {} + + class DocSystem { + public constructor(options?: Partial); + public static get_default(): DocSystem; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link EmbeddedWindow} instead. + */ + interface IEmbeddedWindow { + + } + + type EmbeddedWindowInitOptionsMixin = Gtk.WindowInitOptions & Atk.ImplementorIfaceInitOptions & Gtk.BuildableInitOptions + export interface EmbeddedWindowInitOptions extends EmbeddedWindowInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link EmbeddedWindow} instead. + */ + type EmbeddedWindowMixin = IEmbeddedWindow & Gtk.Window & Atk.ImplementorIface & Gtk.Buildable; + + interface EmbeddedWindow extends EmbeddedWindowMixin {} + + class EmbeddedWindow { + public constructor(options?: Partial); + public static new(): Gtk.Widget; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link GLSLQuad} instead. + */ + interface IGLSLQuad { + /** + * Adds a GLSL snippet to the pipeline used for drawing the actor texture. + * See #CoglSnippet for details. + * + * This is only valid inside the a call to the {@link Build.pipeline} virtual + * function. + * @param hook where to insert the code + * @param declarations GLSL declarations + * @param code GLSL code + * @param is_replace wheter Cogl code should be replaced by the custom shader + */ + add_glsl_snippet(hook: SnippetHook, declarations: string, code: string, is_replace: boolean): void; + get_uniform_location(name: string): number; + set_uniform_float(uniform: number, n_components: number, value: number[]): void; + } + + type GLSLQuadInitOptionsMixin = Clutter.ActorInitOptions & Atk.ImplementorIfaceInitOptions & Clutter.AnimatableInitOptions & Clutter.ContainerInitOptions & Clutter.ScriptableInitOptions + export interface GLSLQuadInitOptions extends GLSLQuadInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link GLSLQuad} instead. + */ + type GLSLQuadMixin = IGLSLQuad & Clutter.Actor & Atk.ImplementorIface & Clutter.Animatable & Clutter.Container & Clutter.Scriptable; + + interface GLSLQuad extends GLSLQuadMixin {} + + class GLSLQuad { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link GenericContainer} instead. + */ + interface IGenericContainer { + get_n_skip_paint(): number; + /** + * Gets whether or not #actor is skipped when painting. + * @param child Child #ClutterActor + * @returns %TRUE or %FALSE + */ + get_skip_paint(child: Clutter.Actor): boolean; + /** + * Set whether or not we should skip painting #actor. Workaround for + * lack of gjs ability to override _paint vfunc. + * @param child Child #ClutterActor + * @param skip %TRUE if we should skip painting + */ + set_skip_paint(child: Clutter.Actor, skip: boolean): void; + /** + * Emitted when #self is allocated, after chaining up to the parent + * allocate method. + * + * Note that #box is #self's content box (qv + * {@link St.ThemeNode.get_content_box}), NOT its allocation. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - box: #self's content box + * - flags: the allocation flags. + * + * @returns Callback ID + */ + connect(signal: "allocate", callback: (owner: this, box: Clutter.ActorBox, flags: Clutter.AllocationFlags) => void): number; + /** + * Emitted when {@link Clutter.Actor.get_preferred_height} is called + * on #self. You should fill in the fields of #alloc with the + * your minimum and natural heights. {@link GenericContainer} + * will deal with taking its borders and padding into account + * for you. + * + * #alloc's fields are initialized to 0, so unless you have a fixed + * height specified (via #ClutterActor:height or CSS), you must + * connect to this signal and fill in the values. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - for_width: as in {@link Clutter.Actor.get_preferred_height} + * - alloc: a {@link GenericContainerAllocation} to be filled in + * + * @returns Callback ID + */ + connect(signal: "get-preferred-height", callback: (owner: this, for_width: number, alloc: GenericContainerAllocation) => void): number; + /** + * Emitted when {@link Clutter.Actor.get_preferred_width} is called + * on #self. You should fill in the fields of #alloc with the + * your minimum and natural widths. {@link GenericContainer} + * will deal with taking its borders and padding into account + * for you. + * + * #alloc's fields are initialized to 0, so unless you have a fixed + * width specified (via #ClutterActor:width or CSS), you must + * connect to this signal and fill in the values. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - for_height: as in {@link Clutter.Actor.get_preferred_width} + * - alloc: a {@link GenericContainerAllocation} to be filled in + * + * @returns Callback ID + */ + connect(signal: "get-preferred-width", callback: (owner: this, for_height: number, alloc: GenericContainerAllocation) => void): number; + + } + + type GenericContainerInitOptionsMixin = St.WidgetInitOptions & Atk.ImplementorIfaceInitOptions & Clutter.AnimatableInitOptions & Clutter.ContainerInitOptions & Clutter.ScriptableInitOptions + export interface GenericContainerInitOptions extends GenericContainerInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link GenericContainer} instead. + */ + type GenericContainerMixin = IGenericContainer & St.Widget & Atk.ImplementorIface & Clutter.Animatable & Clutter.Container & Clutter.Scriptable; + + interface GenericContainer extends GenericContainerMixin {} + + class GenericContainer { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Global} instead. + */ + interface IGlobal { + readonly background_actor: Clutter.Actor; + readonly bottom_window_group: Gtk.WindowGroup; + readonly datadir: string; + readonly desklet_container: Clutter.Actor; + readonly display: Meta.Display; + readonly focus_manager: St.FocusManager; + readonly gdk_screen: Gdk.Screen; + readonly imagedir: string; + readonly overlay_group: Clutter.Actor; + readonly screen: Screen; + readonly screen_height: number; + readonly screen_width: number; + session_running: boolean; + readonly settings: Gio.Settings; + readonly stage: Clutter.Stage; + stage_input_mode: StageInputMode; + readonly top_window_group: Gtk.WindowGroup; + readonly ui_scale: number; + readonly userdatadir: string; + readonly window_group: Gtk.WindowGroup; + readonly window_manager: WM; + readonly workspace_manager: Meta.WorkspaceManager; + /** + * Request mb megabytes allocated. This is just for debugging. + * @param mb How many mb to leak + */ + alloc_leak(mb: number): void; + /** + * Grabs the keyboard and mouse to the stage window. The stage will + * receive all keyboard and mouse events until {@link Cinnamon.Global.end_modal} + * is called. This is used to implement "modes" for the shell, such as the + * overview mode or the "looking glass" debug overlay, that block + * application and normal key shortcuts. + * @param timestamp + * @param options + * @returns %TRUE if we succesfully entered the mode. %FALSE if we couldn't + * enter the mode. Failure may occur because an application has the pointer + * or keyboard grabbed, because Mutter is in a mode itself like moving a + * window or alt-Tab window selection, or because {@link Cinnamon.Global.begin_modal} + * was previouly called. + */ + begin_modal(timestamp: number, options: Meta.ModalOptions): boolean; + /** + * Marks that we are currently doing work. This is used to to track + * whether we are busy for the purposes of {@link Cinnamon.Global.run_at_leisure}. + * A count is kept and cinnamon_global_end_work() must be called exactly + * as many times as cinnamon_global_begin_work(). + */ + begin_work(): void; + /** + * Create a #GAppLaunchContext set up with the correct timestamp, and + * targeted to activate on the current workspace. + * @returns A new #GAppLaunchContext + */ + create_app_launch_context(): Gio.AppLaunchContext; + create_pointer_barrier(x1: number, y1: number, x2: number, y2: number, directions: number): number; + destroy_pointer_barrier(barrier: number): void; + /** + * Prints out the gjs stack + */ + dump_gjs_stack(): void; + /** + * Undoes the effect of {@link Cinnamon.Global.begin_modal}. + * @param timestamp + */ + end_modal(timestamp: number): void; + /** + * Marks the end of work that we started with {@link Cinnamon.Global.begin_work}. + * If no other work is ongoing and functions have been added with + * cinnamon_global_run_at_leisure(), they will be run at the next + * opportunity. + */ + end_work(): void; + get_current_time(): number; + get_display(): Meta.Display; + get_gdk_screen(): Gdk.Screen; + get_md5_for_string(string: string): string; + get_pid(): number; + /** + * Gets the pointer coordinates and current modifier key state. + * This is a wrapper around {@link Gdk.Display.get_pointer} that strips + * out any un-declared modifier flags, to make gjs happy; see + * https://bugzilla.gnome.org/show_bug.cgi?id=597292. + * @returns the X coordinate of the pointer, in global coordinates + * + * the Y coordinate of the pointer, in global coordinates + * + * the current set of modifier keys that are pressed down + */ + get_pointer(): [ x: number, y: number, mods: Clutter.ModifierType ]; + get_screen(): Screen; + /** + * Get the global GSettings instance. + * @returns The GSettings object + */ + get_settings(): Gio.Settings; + get_stage(): Clutter.Stage; + /** + * Gets the list of #MetaWindowActor for the plugin's screen + * @returns the list of windows + */ + get_window_actors(): GLib.List; + /** + * Show a system error notification. Use this function + * when a user-initiated action results in a non-fatal problem + * from causes that may not be under system control. For + * example, an application crash. + * @param msg Error message + * @param details Error details + */ + notify_error(msg: string, details: string): void; + /** + * Restart the current process. + */ + real_restart(): void; + /** + * Initiates the shutdown sequence. + */ + reexec_self(): void; + /** + * Schedules a function to be called the next time Cinnamon is idle. + * Idle means here no animations, no redrawing, and no ongoing background + * work. Since there is currently no way to hook into the Clutter master + * clock and know when is running, the implementation here is somewhat + * approximation. Animations done through Cinnamon's Tweener module will + * be handled properly, but other animations may be detected as terminating + * early if they can be drawn fast enough so that the event loop goes idle + * between frames. + * + * The intent of this function is for performance measurement runs + * where a number of actions should be run serially and each action is + * timed individually. Using this function for other purposes will + * interfere with the ability to use it for performance measurement so + * should be avoided. + * @param func function to call at leisure + */ + run_at_leisure(func: LeisureFunction): void; + /** + * Crashes Cinnamon by causing a segfault + */ + segfault(): void; + /** + * Set the cursor on the stage window. + * @param type the type of the cursor + */ + set_cursor(type: Cursor): void; + /** + * Sets the pointer coordinates. + * This is a wrapper around {@link Gdk.Device.warp}. + * @param x the X coordinate of the pointer, in global coordinates + * @param y the Y coordinate of the pointer, in global coordinates + */ + set_pointer(x: number, y: number): void; + /** + * Sets the input mode of the stage; when #mode is + * %CINNAMON_STAGE_INPUT_MODE_NONREACTIVE, then the stage does not absorb + * any clicks, but just passes them through to underlying windows. + * When it is %CINNAMON_STAGE_INPUT_MODE_NORMAL, then the stage accepts + * clicks in the region defined by + * {@link Cinnamon.Global.set_stage_input_region} but passes through clicks + * outside that region. When it is %CINNAMON_STAGE_INPUT_MODE_FULLSCREEN, + * the stage absorbs all input. + * + * When the input mode is %CINNAMON_STAGE_INPUT_MODE_FOCUSED, the pointer + * is handled as with %CINNAMON_STAGE_INPUT_MODE_NORMAL, but additionally + * the stage window has the keyboard focus. If the stage loses the + * focus (eg, because the user clicked into a window) the input mode + * will revert to %CINNAMON_STAGE_INPUT_MODE_NORMAL. + * + * Note that whenever a muffin-internal Gtk widget has a pointer grab, + * Cinnamon behaves as though it was in + * %CINNAMON_STAGE_INPUT_MODE_NONREACTIVE, to ensure that the widget gets + * any clicks it is expecting. + * @param mode the stage input mode + */ + set_stage_input_mode(mode: StageInputMode): void; + /** + * Sets the area of the stage that is responsive to mouse clicks when + * the stage mode is %CINNAMON_STAGE_INPUT_MODE_NORMAL (but does not change the + * current stage mode). + * @param rectangles a list of #MetaRectangle + * describing the input region. + */ + set_stage_input_region(rectangles: Meta.Rectangle[]): void; + /** + * Ensures that clutter is aware of the current pointer position, + * causing enter and leave events to be emitted if the pointer moved + * behind our back (ie, during a pointer grab). + */ + sync_pointer(): void; + /** + * Unset the cursor on the stage window. + */ + unset_cursor(): void; + connect(signal: "notify-error", callback: (owner: this, object: string, p0: string) => void): number; + connect(signal: "scale-changed", callback: (owner: this) => void): number; + connect(signal: "shutdown", callback: (owner: this) => void): number; + + connect(signal: "notify::background-actor", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::bottom-window-group", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::datadir", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::desklet-container", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::display", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::focus-manager", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::gdk-screen", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::imagedir", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::overlay-group", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::screen", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::screen-height", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::screen-width", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::session-running", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::settings", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::stage", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::stage-input-mode", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::top-window-group", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::ui-scale", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::userdatadir", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::window-group", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::window-manager", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::workspace-manager", callback: (owner: this, ...args: any) => void): number; + + } + + type GlobalInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface GlobalInitOptions extends GlobalInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Global} instead. + */ + type GlobalMixin = IGlobal & GObject.Object; + + interface Global extends GlobalMixin {} + + class Global { + public constructor(options?: Partial); + /** + * Gets the singleton global object that represents the desktop. + * @returns the singleton global object + */ + public static get(): Global; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link GtkEmbed} instead. + */ + interface IGtkEmbed { + window: EmbeddedWindow; + + connect(signal: "notify::window", callback: (owner: this, ...args: any) => void): number; + + } + + type GtkEmbedInitOptionsMixin = Clutter.CloneInitOptions & Atk.ImplementorIfaceInitOptions & Clutter.AnimatableInitOptions & Clutter.ContainerInitOptions & Clutter.ScriptableInitOptions & + Pick; + + export interface GtkEmbedInitOptions extends GtkEmbedInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link GtkEmbed} instead. + */ + type GtkEmbedMixin = IGtkEmbed & Clutter.Clone & Atk.ImplementorIface & Clutter.Animatable & Clutter.Container & Clutter.Scriptable; + + interface GtkEmbed extends GtkEmbedMixin {} + + class GtkEmbed { + public constructor(options?: Partial); + public static new(window: EmbeddedWindow): Clutter.Actor; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link PerfLog} instead. + */ + interface IPerfLog { + /** + * Adds a function that will be called before statistics are recorded. + * The function would typically compute one or more statistics values + * and call a function such as {@link Cinnamon.PerfLog.update_statistic_i} + * to update the value that will be recorded. + * @param callback function to call before recording statistics + */ + add_statistics_callback(callback: PerfStatisticsCallback): void; + /** + * Calls all the update functions added with + * {@link Cinnamon.PerfLog.add_statistics_callback} and then records events + * for all statistics, followed by a perf.statisticsCollected event. + */ + collect_statistics(): void; + /** + * Defines a performance event for later recording. + * @param name name of the event. This should of the form + * '.', for example + * 'clutter.stagePaintDone'. + * @param description human readable description of the event. + * @param signature signature defining the arguments that event takes. + * This is a string of type characters, using the same characters + * as D-Bus or GVariant. Only a very limited number of signatures + * are supported: , '', 's', 'i', and 'x'. This mean respectively: + * no arguments, one string, one 32-bit integer, and one 64-bit + * integer. + */ + define_event(name: string, description: string, signature: string): void; + /** + * Defines a statistic. A statistic is a numeric value that is stored + * by the performance log and recorded periodically or when + * {@link Cinnamon.PerfLog.collect_statistics} is called explicitly. + * + * Code that defines a statistic should update it by calling + * the update function for the particular data type of the statistic, + * such as cinnamon_perf_log_update_statistic_i(). This can be done + * at any time, but would normally done inside a function registered + * with cinnamon_perf_log_add_statistics_callback(). These functions + * are called immediately before statistics are recorded. + * @param name name of the statistic and of the corresponding event. + * This should follow the same guidelines as for {@link Cinnamon.PerfLog.define_event} + * @param description human readable description of the statistic. + * @param signature The type of the data stored for statistic. Must + * currently be 'i' or 'x'. + */ + define_statistic(name: string, description: string, signature: string): void; + /** + * Dump the definition of currently defined events and statistics, formatted + * as JSON, to the specified output stream. The JSON output is an array, + * with each element being a dictionary of the form: + * + * { name: , + * description: , [, ... ] ']'. + * @param out output stream into which to write the event log + * @returns %TRUE if the dump succeeded. %FALSE if an IO error occurred + */ + dump_log(out: Gio.OutputStream): boolean; + /** + * Records a performance event with no arguments. + * @param name name of the event + */ + event(name: string): void; + /** + * Records a performance event with one 32-bit integer argument. + * @param name name of the event + * @param arg the argument + */ + event_i(name: string, arg: number): void; + /** + * Records a performance event with one string argument. + * @param name name of the event + * @param arg the argument + */ + event_s(name: string, arg: string): void; + /** + * Records a performance event with one 64-bit integer argument. + * @param name name of the event + * @param arg the argument + */ + event_x(name: string, arg: number): void; + /** + * Replays the log by calling the given function for each event + * in the log. + * @param replay_function function to call for each event in the log + */ + replay(replay_function: PerfReplayFunction): void; + /** + * Sets whether events are currently being recorded. + * @param enabled whether to record events + */ + set_enabled(enabled: boolean): void; + /** + * Updates the current value of an 32-bit integer statistic. + * @param name name of the statistic + * @param value new value for the statistic + */ + update_statistic_i(name: string, value: number): void; + /** + * Updates the current value of an 64-bit integer statistic. + * @param name name of the statistic + * @param value new value for the statistic + */ + update_statistic_x(name: string, value: number): void; + } + + type PerfLogInitOptionsMixin = GObject.ObjectInitOptions + export interface PerfLogInitOptions extends PerfLogInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link PerfLog} instead. + */ + type PerfLogMixin = IPerfLog & GObject.Object; + + interface PerfLog extends PerfLogMixin {} + + class PerfLog { + public constructor(options?: Partial); + /** + * Gets the global singleton performance log. This is initially disabled + * and must be explicitly enabled with {@link Cinnamon.PerfLog.set_enabled}. + * @returns the global singleton performance log + */ + public static get_default(): PerfLog; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Recorder} instead. + */ + interface IRecorder { + draw_cursor: boolean; + file_template: string; + framerate: number; + pipeline: string; + stage: Clutter.Stage; + /** + * Stops recording. It's possible to call {@link Cinnamon.Recorder.record} + * again to reopen a new recording stream, but unless change the + * recording filename, this may result in the old recording being + * overwritten. + */ + close(): void; + /** + * Determine if recording is currently in progress. (The recorder + * is not paused or closed.) + * @returns %TRUE if the recorder is currently recording. + */ + is_recording(): boolean; + /** + * Starts recording, Starting the recording may fail if the output file + * cannot be opened, or if the output stream cannot be created + * for other reasons. In that case a warning is printed to + * stderr. There is no way currently to get details on how + * recording failed to start. + * + * An extra reference count is added to the recorder if recording + * is succesfully started; the recording object will not be freed + * until recording is stopped even if the creator no longer holds + * a reference. Recording is automatically stopped if the stage + * is destroyed. + * @returns %TRUE if recording was succesfully started + * + * actual filename used for recording + */ + record(): [ boolean, string | null ]; + set_area(x: number, y: number, width: number, height: number): void; + set_draw_cursor(draw_cursor: boolean): void; + /** + * Sets the filename that will be used when creating output + * files. This is only used if the configured pipeline has an + * unconnected source pad (as the default pipeline does). If + * the pipeline is complete, then the filename is unused. The + * provided string is used as a template.It can contain + * the following escapes: + * + * %d: The current date as YYYYYMMDD + * %%: A literal percent + * + * The default value is 'cinnamon-%d%u-%c.ogg'. + * @param file_template the filename template to use for output files, + * or %NULL for the defalt value. + */ + set_file_template(file_template: string): void; + /** + * Sets the number of frames per second we try to record. Less frames + * will be recorded when the screen doesn't need to be redrawn this + * quickly. (This value will also be set as the framerate for the + * GStreamer pipeline; whether that has an effect on the resulting + * video will depend on the details of the pipeline and the codec. The + * default encoding to webm format doesn't pay attention to the pipeline + * framerate.) + * + * The default value is 30. + * @param framerate Framerate used for resulting video in frames-per-second. + */ + set_framerate(framerate: number): void; + /** + * Sets the GStreamer pipeline used to encode recordings. + * It follows the syntax used for gst-launch. The pipeline + * should have an unconnected sink pad where the recorded + * video is recorded. It will normally have a unconnected + * source pad; output from that pad will be written into the + * output file. (See {@link Cinnamon.Recorder.set_file_template}.) However + * the pipeline can also take care of its own output - this + * might be used to send the output to an icecast server + * via shout2send or similar. + * + * The default value is 'vp8enc min_quantizer=13 max_quantizer=13 cpu-used=5 deadline=1000000 threads=%T ! queue ! webmmux' + * @param pipeline the GStreamer pipeline used to encode recordings + * or %NULL for the default value. + */ + set_pipeline(pipeline?: string | null): void; + connect(signal: "notify::draw-cursor", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::file-template", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::framerate", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::pipeline", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::stage", callback: (owner: this, ...args: any) => void): number; + + } + + type RecorderInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface RecorderInitOptions extends RecorderInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Recorder} instead. + */ + type RecorderMixin = IRecorder & GObject.Object; + + interface Recorder extends RecorderMixin {} + + class Recorder { + public constructor(options?: Partial); + /** + * Create a new {@link Recorder} to record movies of a #ClutterStage + * @param stage The #ClutterStage + * @returns The newly created {@link Recorder} object + */ + public static new(stage: Clutter.Stage): Recorder; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Screen} instead. + */ + interface IScreen { + display: Meta.Display; + readonly n_workspaces: number; + /** + * Append a new workspace to the screen and (optionally) switch to that + * screen. + * @param activate %TRUE if the workspace should be switched to after creation + * @param timestamp if switching to a new workspace, timestamp to be used when + * focusing a window on the new workspace. (Doesn't hurt to pass a valid + * timestamp when available even if not switching workspaces.) + * @returns the newly appended workspace. + */ + append_new_workspace(activate: boolean, timestamp: number): Meta.Workspace; + get_active_workspace(): Meta.Workspace; + get_active_workspace_index(): number; + /** + * Gets the index of the monitor that currently has the mouse pointer. + * @returns a monitor index + */ + get_current_monitor(): number; + /** + * Retrieve the display associated with screen. + * @returns Display + */ + get_display(): Meta.Display; + /** + * Stores the location and size of the indicated monitor in #geometry. + * @param monitor the monitor number + * @returns location to store the monitor geometry + */ + get_monitor_geometry(monitor: number): Meta.Rectangle; + /** + * Determines whether there is a fullscreen window obscuring the specified + * monitor. If there is a fullscreen window, the desktop environment will + * typically hide any controls that might obscure the fullscreen window. + * + * You can get notification when this changes by connecting to + * CinnamonScreen::in-fullscreen-changed. + * @param monitor the monitor number + * @returns %TRUE if there is a fullscreen window covering the specified monitor. + */ + get_monitor_in_fullscreen(monitor: number): boolean; + get_monitor_index_for_rect(rect: Meta.Rectangle): number; + /** + * Gets the #MetaWindow pointed by the mouse + * @param not_this_one window to be excluded + * @returns the #MetaWindow pointed by the mouse + * %NULL when window not found + */ + get_mouse_window(not_this_one?: Meta.Window | null): Meta.Window; + /** + * Gets the number of monitors that are joined together to form #screen. + * @returns the number of monitors + */ + get_n_monitors(): number; + get_n_workspaces(): number; + /** + * Gets the index of the primary monitor on this #screen. + * @returns a monitor index + */ + get_primary_monitor(): number; + /** + * Retrieve the size of the screen. + * @returns The width of the screen + * + * The height of the screen + */ + get_size(): [ width: number, height: number ]; + /** + * Gets the workspace object for one of a screen's workspaces given the workspace + * index. It's valid to call this function with an out-of-range index and it + * will robustly return %NULL. + * @param index index of one of the screen's workspaces + * @returns the workspace object with specified index, or %NULL + * if the index is out of range. + */ + get_workspace_by_index(index: number): Meta.Workspace; + get_workspaces(): Meta.Workspace[]; + get_xwindow_for_window(window: Meta.Window): number; + /** + * Explicitly set the layout of workspaces. Once this has been called, the contents of the + * _NET_DESKTOP_LAYOUT property on the root window are completely ignored. + * @param starting_corner the corner at which the first workspace is found + * @param vertical_layout if %TRUE the workspaces are laid out in columns rather than rows + * @param n_rows number of rows of workspaces, or -1 to determine the number of rows from + * #n_columns and the total number of workspaces + * @param n_columns number of columns of workspaces, or -1 to determine the number of columns from + * #n_rows and the total number of workspaces + */ + override_workspace_layout(starting_corner: Meta.DisplayCorner, vertical_layout: boolean, n_rows: number, n_columns: number): void; + remove_workspace(workspace: Meta.Workspace, timestamp: number): void; + show_desktop(timestamp: number): void; + toggle_desktop(timestamp: number): void; + unshow_desktop(): void; + connect(signal: "in-fullscreen-changed", callback: (owner: this) => void): number; + connect(signal: "monitors-changed", callback: (owner: this) => void): number; + connect(signal: "restacked", callback: (owner: this) => void): number; + connect(signal: "window-added", callback: (owner: this, object: Meta.Window, p0: number) => void): number; + connect(signal: "window-entered-monitor", callback: (owner: this, object: number, p0: Meta.Window) => void): number; + connect(signal: "window-left-monitor", callback: (owner: this, object: number, p0: Meta.Window) => void): number; + connect(signal: "window-monitor-changed", callback: (owner: this, object: Meta.Window, p0: number) => void): number; + connect(signal: "window-removed", callback: (owner: this, object: Meta.Window) => void): number; + connect(signal: "window-skip-taskbar-changed", callback: (owner: this, object: Meta.Window) => void): number; + connect(signal: "window-workspace-changed", callback: (owner: this, object: Meta.Window, p0: Meta.Workspace) => void): number; + connect(signal: "workareas-changed", callback: (owner: this) => void): number; + connect(signal: "workspace-added", callback: (owner: this, object: number) => void): number; + connect(signal: "workspace-removed", callback: (owner: this, object: number) => void): number; + connect(signal: "workspace-switched", callback: (owner: this, object: number, p0: number, p1: Meta.MotionDirection) => void): number; + + connect(signal: "notify::display", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::n-workspaces", callback: (owner: this, ...args: any) => void): number; + + } + + type ScreenInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface ScreenInitOptions extends ScreenInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Screen} instead. + */ + type ScreenMixin = IScreen & GObject.Object; + + interface Screen extends ScreenMixin {} + + class Screen { + public constructor(options?: Partial); + public static new(display: Meta.Display): Screen; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Screenshot} instead. + */ + interface IScreenshot { + /** + * Takes a screenshot of the whole screen + * in #filename as png image. + * @param include_cursor Whether to include the cursor or not + * @param filename The filename for the screenshot + * @param callback function to call returning success or failure + * of the async grabbing + */ + screenshot(include_cursor: boolean, filename: string, callback: ScreenshotCallback): void; + /** + * Takes a screenshot of the passed in area and saves it + * in #filename as png image. + * @param include_cursor + * @param x The X coordinate of the area + * @param y The Y coordinate of the area + * @param width The width of the area + * @param height The height of the area + * @param filename The filename for the screenshot + * @param callback function to call returning success or failure + * of the async grabbing + */ + screenshot_area(include_cursor: boolean, x: number, y: number, width: number, height: number, filename: string, callback: ScreenshotCallback): void; + /** + * Takes a screenshot of the focused window (optionally omitting the frame) + * in #filename as png image. + * @param include_frame Whether to include the frame or not + * @param include_cursor Whether to include the cursor or not + * @param filename The filename for the screenshot + * @param callback function to call returning success or failure + * of the async grabbing + */ + screenshot_window(include_frame: boolean, include_cursor: boolean, filename: string, callback: ScreenshotCallback): void; + } + + type ScreenshotInitOptionsMixin = GObject.ObjectInitOptions + export interface ScreenshotInitOptions extends ScreenshotInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Screenshot} instead. + */ + type ScreenshotMixin = IScreenshot & GObject.Object; + + interface Screenshot extends ScreenshotMixin {} + + class Screenshot { + public constructor(options?: Partial); + public static new(): Screenshot; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Slicer} instead. + */ + interface ISlicer { + + } + + type SlicerInitOptionsMixin = St.BinInitOptions & Atk.ImplementorIfaceInitOptions & Clutter.AnimatableInitOptions & Clutter.ContainerInitOptions & Clutter.ScriptableInitOptions + export interface SlicerInitOptions extends SlicerInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Slicer} instead. + */ + type SlicerMixin = ISlicer & St.Bin & Atk.ImplementorIface & Clutter.Animatable & Clutter.Container & Clutter.Scriptable; + + interface Slicer extends SlicerMixin {} + + class Slicer { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Stack} instead. + */ + interface IStack { + + } + + type StackInitOptionsMixin = St.WidgetInitOptions & Atk.ImplementorIfaceInitOptions & Clutter.AnimatableInitOptions & Clutter.ContainerInitOptions & Clutter.ScriptableInitOptions + export interface StackInitOptions extends StackInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Stack} instead. + */ + type StackMixin = IStack & St.Widget & Atk.ImplementorIface & Clutter.Animatable & Clutter.Container & Clutter.Scriptable; + + interface Stack extends StackMixin {} + + class Stack { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link TrayIcon} instead. + */ + interface ITrayIcon { + readonly pid: number; + readonly title: string; + readonly wm_class: string; + /** + * Converts a ClutterEvent into an XEvent. + * @param event_type a #ClutterEventType + * @param event the #ClutterEvent + * @returns Whether to continue the event chain. + */ + handle_event(event_type: Clutter.EventType, event: Clutter.Event): boolean; + connect(signal: "notify::pid", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::title", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::wm-class", callback: (owner: this, ...args: any) => void): number; + + } + + type TrayIconInitOptionsMixin = GtkEmbedInitOptions & Atk.ImplementorIfaceInitOptions & Clutter.AnimatableInitOptions & Clutter.ContainerInitOptions & Clutter.ScriptableInitOptions + export interface TrayIconInitOptions extends TrayIconInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link TrayIcon} instead. + */ + type TrayIconMixin = ITrayIcon & GtkEmbed & Atk.ImplementorIface & Clutter.Animatable & Clutter.Container & Clutter.Scriptable; + + interface TrayIcon extends TrayIconMixin {} + + class TrayIcon { + public constructor(options?: Partial); + public static new(window: EmbeddedWindow): Clutter.Actor; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link TrayManager} instead. + */ + interface ITrayManager { + bg_color: Clutter.Color; + manage_screen(theme_widget: St.Widget): void; + redisplay(): void; + set_orientation(orientation: Clutter.Orientation): void; + unmanage_screen(): void; + connect(signal: "tray-icon-added", callback: (owner: this, object: Clutter.Actor) => void): number; + connect(signal: "tray-icon-removed", callback: (owner: this, object: Clutter.Actor) => void): number; + + connect(signal: "notify::bg-color", callback: (owner: this, ...args: any) => void): number; + + } + + type TrayManagerInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface TrayManagerInitOptions extends TrayManagerInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link TrayManager} instead. + */ + type TrayManagerMixin = ITrayManager & GObject.Object; + + interface TrayManager extends TrayManagerMixin {} + + class TrayManager { + public constructor(options?: Partial); + public static new(): TrayManager; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link WM} instead. + */ + interface IWM { + /** + * The plugin must call this after the user responded to the confirmation dialog. + * @param ok if the new configuration was OK + */ + complete_display_change(ok: boolean): void; + /** + * The plugin must call this when it has completed a window destroy effect. + * @param actor the MetaWindowActor actor + */ + completed_destroy(actor: Meta.WindowActor): void; + /** + * The plugin must call this when it has completed a window map effect. + * @param actor the MetaWindowActor actor + */ + completed_map(actor: Meta.WindowActor): void; + /** + * The plugin must call this when it has completed a window minimize effect. + * @param actor the MetaWindowActor actor + */ + completed_minimize(actor: Meta.WindowActor): void; + completed_size_change(actor: Meta.WindowActor): void; + /** + * The plugin must call this when it has finished switching the + * workspace. + */ + completed_switch_workspace(): void; + /** + * The plugin must call this when it has completed a window unminimize effect. + * @param actor the MetaWindowActor actor + */ + completed_unminimize(actor: Meta.WindowActor): void; + connect(signal: "confirm-display-change", callback: (owner: this) => void): number; + /** + * Creates a close dialog for the given window. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - window: The window to create the dialog for + * - returns The close dialog instance. + * + * @returns Callback ID + */ + connect(signal: "create-close-dialog", callback: (owner: this, window: Meta.Window) => Meta.CloseDialog): number; + /** + * Creates an inhibit shortcuts dialog for the given window. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - window: The window to create the dialog for + * - returns The inhibit shortcuts dialog instance. + * + * @returns Callback ID + */ + connect(signal: "create-inhibit-shortcuts-dialog", callback: (owner: this, window: Meta.Window) => Meta.InhibitShortcutsDialog): number; + connect(signal: "destroy", callback: (owner: this, object: Meta.WindowActor) => void): number; + connect(signal: "filter-keybinding", callback: (owner: this, object: Meta.KeyBinding) => boolean): number; + connect(signal: "hide-tile-preview", callback: (owner: this) => void): number; + connect(signal: "kill-switch-workspace", callback: (owner: this) => void): number; + connect(signal: "kill-window-effects", callback: (owner: this, object: Meta.WindowActor) => void): number; + connect(signal: "map", callback: (owner: this, object: Meta.WindowActor) => void): number; + connect(signal: "minimize", callback: (owner: this, object: Meta.WindowActor) => void): number; + connect(signal: "show-tile-preview", callback: (owner: this, object: Meta.Window, p0: Meta.Rectangle, p1: number) => void): number; + connect(signal: "show-window-menu", callback: (owner: this, object: Meta.Window, p0: number, p1: Meta.Rectangle) => void): number; + connect(signal: "size-change", callback: (owner: this, object: Meta.WindowActor, p0: Meta.SizeChange, p1: Meta.Rectangle, p2: Meta.Rectangle) => void): number; + connect(signal: "size-changed", callback: (owner: this, object: Meta.WindowActor) => void): number; + connect(signal: "switch-workspace", callback: (owner: this, object: number, p0: number, p1: number) => void): number; + connect(signal: "switch-workspace-complete", callback: (owner: this) => void): number; + connect(signal: "unminimize", callback: (owner: this, object: Meta.WindowActor) => void): number; + + } + + type WMInitOptionsMixin = GObject.ObjectInitOptions + export interface WMInitOptions extends WMInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link WM} instead. + */ + type WMMixin = IWM & GObject.Object; + + interface WM extends WMMixin {} + + class WM { + public constructor(options?: Partial); + /** + * Creates a new window management interface by hooking into #plugin. + * @param plugin the #MetaPlugin + * @returns the new window-management interface + */ + public static new(plugin: Meta.Plugin): WM; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link WindowTracker} instead. + */ + interface IWindowTracker { + readonly focus_app: App; + /** + * #self; A {@link AppSystem} + * Look up the application corresponding to a process. + * @param pid A Unix process identifier + * @returns A {@link App}, or %NULL if none + */ + get_app_from_pid(pid: number): App; + get_startup_sequences(): Meta.StartupSequence[]; + get_window_app(metawin: Meta.Window): App; + /** + * The CinnamonWindowTracker associates certain kinds of windows with + * applications; however, others we don't want to + * appear in places where we want to give a list of windows + * for an application, such as the alt-tab dialog. + * + * An example of a window we don't want to show is the root + * desktop window. We skip all override-redirect types, and also + * exclude other window types like tooltip explicitly, though generally + * most of these should be override-redirect. + * @param window a #MetaWindow + * @returns %TRUE if a window is "interesting" + */ + is_window_interesting(window: Meta.Window): boolean; + connect(signal: "startup-sequence-changed", callback: (owner: this, object: Meta.StartupSequence) => void): number; + connect(signal: "window-app-changed", callback: (owner: this, object: Meta.Window) => void): number; + + connect(signal: "notify::focus-app", callback: (owner: this, ...args: any) => void): number; + + } + + type WindowTrackerInitOptionsMixin = GObject.ObjectInitOptions + export interface WindowTrackerInitOptions extends WindowTrackerInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link WindowTracker} instead. + */ + type WindowTrackerMixin = IWindowTracker & GObject.Object; + + interface WindowTracker extends WindowTrackerMixin {} + + class WindowTracker { + public constructor(options?: Partial); + public static get_default(): WindowTracker; + } + + export interface CalendarServerIfaceInitOptions {} + /** + * Virtual table for the D-Bus interface org.cinnamon.CalendarServer. + */ + interface CalendarServerIface {} + class CalendarServerIface { + public constructor(options?: Partial); + /** + * The parent interface. + */ + public readonly parent_iface: GObject.TypeInterface; + public handle_exit: {(object: CalendarServer, invocation: Gio.DBusMethodInvocation): boolean;}; + public handle_set_time_range: {(object: CalendarServer, invocation: Gio.DBusMethodInvocation, arg_since: number, arg_until: number, arg_force_reload: boolean): boolean;}; + public get_since: {(object: CalendarServer): number;}; + public get_status: {(object: CalendarServer): number;}; + public get_until: {(object: CalendarServer): number;}; + public client_disappeared: {(object: CalendarServer, arg_source_uid: string): void;}; + public events_added_or_updated: {(object: CalendarServer, arg_events: GLib.Variant): void;}; + public events_removed: {(object: CalendarServer, arg_ids: string): void;}; + } + + export interface GenericContainerAllocationInitOptions {} + interface GenericContainerAllocation {} + class GenericContainerAllocation { + public constructor(options?: Partial); + public min_size: number; + public natural_size: number; + public readonly _refcount: number; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link CalendarServer} instead. + */ + interface ICalendarServer { + /** + * Represents the D-Bus property "Since". + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + since: number; + /** + * Represents the D-Bus property "Status". + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + status: number; + /** + * Represents the D-Bus property "Until". + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + until: number; + /** + * Asynchronously invokes the Exit() D-Bus method on #proxy. + * When the operation is finished, #callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). + * You can then call cinnamon_calendar_server_call_exit_finish() to get the result of the operation. + * + * See cinnamon_calendar_server_call_exit_sync() for the synchronous, blocking version of this method. + * @param cancellable A #GCancellable or %NULL. + * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + */ + call_exit(cancellable?: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback | null): void; + /** + * Finishes an operation started with {@link Cinnamon.CalendarServer.call_exit}. + * @param res The #GAsyncResult obtained from the #GAsyncReadyCallback passed to {@link Cinnamon.CalendarServer.call_exit}. + * @returns %TRUE if the call succeeded, %FALSE if #error is set. + */ + call_exit_finish(res: Gio.AsyncResult): boolean; + /** + * Synchronously invokes the Exit() D-Bus method on #proxy. The calling thread is blocked until a reply is received. + * + * See cinnamon_calendar_server_call_exit() for the asynchronous version of this method. + * @param cancellable A #GCancellable or %NULL. + * @returns %TRUE if the call succeeded, %FALSE if #error is set. + */ + call_exit_sync(cancellable?: Gio.Cancellable | null): boolean; + /** + * Asynchronously invokes the SetTimeRange() D-Bus method on #proxy. + * When the operation is finished, #callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). + * You can then call cinnamon_calendar_server_call_set_time_range_finish() to get the result of the operation. + * + * See cinnamon_calendar_server_call_set_time_range_sync() for the synchronous, blocking version of this method. + * @param arg_since Argument to pass with the method invocation. + * @param arg_until Argument to pass with the method invocation. + * @param arg_force_reload Argument to pass with the method invocation. + * @param cancellable A #GCancellable or %NULL. + * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + */ + call_set_time_range(arg_since: number, arg_until: number, arg_force_reload: boolean, cancellable?: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback | null): void; + /** + * Finishes an operation started with {@link Cinnamon.CalendarServer.call_set_time_range}. + * @param res The #GAsyncResult obtained from the #GAsyncReadyCallback passed to {@link Cinnamon.CalendarServer.call_set_time_range}. + * @returns %TRUE if the call succeeded, %FALSE if #error is set. + */ + call_set_time_range_finish(res: Gio.AsyncResult): boolean; + /** + * Synchronously invokes the SetTimeRange() D-Bus method on #proxy. The calling thread is blocked until a reply is received. + * + * See cinnamon_calendar_server_call_set_time_range() for the asynchronous version of this method. + * @param arg_since Argument to pass with the method invocation. + * @param arg_until Argument to pass with the method invocation. + * @param arg_force_reload Argument to pass with the method invocation. + * @param cancellable A #GCancellable or %NULL. + * @returns %TRUE if the call succeeded, %FALSE if #error is set. + */ + call_set_time_range_sync(arg_since: number, arg_until: number, arg_force_reload: boolean, cancellable?: Gio.Cancellable | null): boolean; + /** + * Helper function used in service implementations to finish handling invocations of the Exit() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free #invocation, you cannot use it afterwards. + * @param invocation A #GDBusMethodInvocation. + */ + complete_exit(invocation: Gio.DBusMethodInvocation): void; + /** + * Helper function used in service implementations to finish handling invocations of the SetTimeRange() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free #invocation, you cannot use it afterwards. + * @param invocation A #GDBusMethodInvocation. + */ + complete_set_time_range(invocation: Gio.DBusMethodInvocation): void; + /** + * Emits the "ClientDisappeared" D-Bus signal. + * @param arg_source_uid Argument to pass with the signal. + */ + emit_client_disappeared(arg_source_uid: string): void; + /** + * Emits the "EventsAddedOrUpdated" D-Bus signal. + * @param arg_events Argument to pass with the signal. + */ + emit_events_added_or_updated(arg_events: GLib.Variant): void; + /** + * Emits the "EventsRemoved" D-Bus signal. + * @param arg_ids Argument to pass with the signal. + */ + emit_events_removed(arg_ids: string): void; + /** + * Gets the value of the "Since" D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * @returns The property value. + */ + get_since(): number; + /** + * Gets the value of the "Status" D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * @returns The property value. + */ + get_status(): number; + /** + * Gets the value of the "Until" D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * @returns The property value. + */ + get_until(): number; + /** + * Sets the "Since" D-Bus property to #value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + * @param value The value to set. + */ + set_since(value: number): void; + /** + * Sets the "Status" D-Bus property to #value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + * @param value The value to set. + */ + set_status(value: number): void; + /** + * Sets the "Until" D-Bus property to #value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + * @param value The value to set. + */ + set_until(value: number): void; + /** + * On the client-side, this signal is emitted whenever the D-Bus signal "ClientDisappeared" is received. + * + * On the service-side, this signal can be used with e.g. {@link Glib.signal_emit_by_name} to make the object emit the D-Bus signal. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - arg_source_uid: Argument. + * + * @returns Callback ID + */ + connect(signal: "client-disappeared", callback: (owner: this, arg_source_uid: string) => void): number; + /** + * On the client-side, this signal is emitted whenever the D-Bus signal "EventsAddedOrUpdated" is received. + * + * On the service-side, this signal can be used with e.g. {@link Glib.signal_emit_by_name} to make the object emit the D-Bus signal. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - arg_events: Argument. + * + * @returns Callback ID + */ + connect(signal: "events-added-or-updated", callback: (owner: this, arg_events: GLib.Variant) => void): number; + /** + * On the client-side, this signal is emitted whenever the D-Bus signal "EventsRemoved" is received. + * + * On the service-side, this signal can be used with e.g. {@link Glib.signal_emit_by_name} to make the object emit the D-Bus signal. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - arg_ids: Argument. + * + * @returns Callback ID + */ + connect(signal: "events-removed", callback: (owner: this, arg_ids: string) => void): number; + /** + * Signal emitted when a remote caller is invoking the Exit() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to #invocation and eventually call cinnamon_calendar_server_complete_exit() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - invocation: A #GDBusMethodInvocation. + * - returns %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run. + * + * @returns Callback ID + */ + connect(signal: "handle-exit", callback: (owner: this, invocation: Gio.DBusMethodInvocation) => boolean): number; + /** + * Signal emitted when a remote caller is invoking the SetTimeRange() D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to #invocation and eventually call cinnamon_calendar_server_complete_set_time_range() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - invocation: A #GDBusMethodInvocation. + * - arg_since: Argument passed by remote caller. + * - arg_until: Argument passed by remote caller. + * - arg_force_reload: Argument passed by remote caller. + * - returns %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run. + * + * @returns Callback ID + */ + connect(signal: "handle-set-time-range", callback: (owner: this, invocation: Gio.DBusMethodInvocation, arg_since: number, arg_until: number, arg_force_reload: boolean) => boolean): number; + + connect(signal: "notify::since", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::status", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::until", callback: (owner: this, ...args: any) => void): number; + + } + + type CalendarServerInitOptionsMixin = Pick; + + export interface CalendarServerInitOptions extends CalendarServerInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link CalendarServer} instead. + */ + type CalendarServerMixin = ICalendarServer; + + /** + * Abstract interface type for the D-Bus interface org.cinnamon.CalendarServer. + */ + interface CalendarServer extends CalendarServerMixin {} + + class CalendarServer { + public constructor(options?: Partial); + /** + * Gets a machine-readable description of the org.cinnamon.CalendarServer D-Bus interface. + * @returns A #GDBusInterfaceInfo. Do not free. + */ + public static interface_info(): Gio.DBusInterfaceInfo; + /** + * Overrides all #GObject properties in the {@link CalendarServer} interface for a concrete class. + * The properties are overridden in the order they are defined. + * @param klass The class structure for a #GObject derived class. + * @param property_id_begin The property id to assign to the first overridden property. + * @returns The last property id. + */ + public static override_properties(klass: any, property_id_begin: number): number; + } + + + + enum AppState { + STOPPED = 0, + STARTING = 1, + RUNNING = 2 + } + + enum Cursor { + DND_IN_DRAG = 0, + DND_UNSUPPORTED_TARGET = 1, + DND_MOVE = 2, + DND_COPY = 3, + POINTING_HAND = 4, + RESIZE_BOTTOM = 5, + RESIZE_TOP = 6, + RESIZE_LEFT = 7, + RESIZE_RIGHT = 8, + RESIZE_BOTTOM_RIGHT = 9, + RESIZE_BOTTOM_LEFT = 10, + RESIZE_TOP_RIGHT = 11, + RESIZE_TOP_LEFT = 12, + CROSSHAIR = 13, + TEXT = 14 + } + + /** + * Temporary hack to work around Cogl not exporting CoglSnippetHook in + * the 1.0 API. Don't use. + */ + enum SnippetHook { + VERTEX = 0, + VERTEX_TRANSFORM = 1, + FRAGMENT = 2048, + TEXTURE_COORD_TRANSFORM = 4096, + LAYER_FRAGMENT = 6144, + TEXTURE_LOOKUP = 6145 + } + + enum StageInputMode { + NONREACTIVE = 0, + NORMAL = 1, + FOCUSED = 2, + FULLSCREEN = 3 + } + + /** + * Controls in which Cinnamon states an action (like keybindings and gestures) + * should be handled. + */ + enum ActionMode { + /** + * block action + */ + NONE = 0, + /** + * allow action when in window mode, + * e.g. when the focus is in an application window + */ + NORMAL = 1, + /** + * allow action while the overview + * is active + */ + OVERVIEW = 2, + /** + * allow action when the screen + * is locked, e.g. when the screen shield is shown + */ + LOCK_SCREEN = 4, + /** + * allow action in the unlock + * dialog + */ + UNLOCK_SCREEN = 8, + /** + * allow action in the login screen + */ + LOGIN_SCREEN = 16, + /** + * allow action when a system modal + * dialog (e.g. authentification or session dialogs) is open + */ + SYSTEM_MODAL = 32, + /** + * allow action in looking glass + */ + LOOKING_GLASS = 64, + /** + * allow action while a shell menu is open + */ + POPUP = 128, + /** + * always allow action + */ + ALL = -1 + } + + /** + * Callback type for {@link Cinnamon.get.file_contents_utf8} + */ + interface FileContentsCallback { + /** + * Callback type for {@link Cinnamon.get.file_contents_utf8} + * @param utf8_contents The contents of the file + */ + (utf8_contents: string): void; + } + + interface LeisureFunction { + (data?: any | null): void; + } + + interface PerfReplayFunction { + (time: number, name: string, signature: string, arg: GObject.Value): void; + } + + interface PerfStatisticsCallback { + (perf_log: PerfLog, data?: any | null): void; + } + + interface ScreenshotCallback { + (screenshot: Screenshot, success: boolean, screenshot_area: cairo.RectangleInt): void; + } + + /** + * Using {@link G.BREAKPOINT}, interrupt the current process. This is useful + * in conjunction with a debugger such as gdb. + */ + function breakpoint(): void; + /** + * Gets a machine-readable description of the org.cinnamon.CalendarServer D-Bus interface. + * @returns A #GDBusInterfaceInfo. Do not free. + */ + function calendar_server_interface_info(): Gio.DBusInterfaceInfo; + /** + * Overrides all #GObject properties in the {@link CalendarServer} interface for a concrete class. + * The properties are overridden in the order they are defined. + * @param klass The class structure for a #GObject derived class. + * @param property_id_begin The property id to assign to the first overridden property. + * @returns The last property id. + */ + function calendar_server_override_properties(klass: any, property_id_begin: number): number; + /** + * Gets the current state of the event (the set of modifier keys that + * are pressed down). Thhis is a wrapper around + * {@link Clutter.event.get_state} that strips out any un-declared modifier + * flags, to make gjs happy; see + * https://bugzilla.gnome.org/show_bug.cgi?id=597292. + * @param event a #ClutterEvent + * @returns the state from the event + */ + function get_event_state(event: Clutter.Event): Clutter.ModifierType; + /** + * Asynchronously load the contents of a file as a NUL terminated + * string, validating it as UTF-8. Embedded NUL characters count as + * invalid content. + * @param path UTF-8 encoded filename path + * @param callback The callback to call when finished + */ + function get_file_contents_utf8(path: string, callback: FileContentsCallback): void; + /** + * Synchronously load the contents of a file as a NUL terminated + * string, validating it as UTF-8. Embedded NUL characters count as + * invalid content. + * @param path UTF-8 encoded filename path + * @returns File contents + */ + function get_file_contents_utf8_sync(path: string): string; + /** + * Performs a check to see if on-demand mode for discrete graphics + * is supported. + * @returns %TRUE if supported. + */ + function get_gpu_offload_supported(): boolean; + function parse_search_provider(data: string): [ boolean, string, string, string[], string ]; + /** + * Set a double uniform on a ClutterShaderEffect. + * + * The problem here is that JavaScript doesn't have more than + * one number type, and gjs tries to automatically guess what + * type we want to set a GValue to. If the number is "1.0" or + * something, it will use an integer, which will cause errors + * in GLSL. + * @param effect The #ClutterShaderEffect + * @param name The name of the uniform + * @param value The value to set it to. + */ + function shader_effect_set_double_uniform(effect: Clutter.ShaderEffect, name: string, value: number): void; + function util_composite_capture_images(captures: Clutter.Capture, n_captures: number, x: number, y: number, target_width: number, target_height: number, target_scale: number): cairo.Surface; + /** + * Formats a date for the current locale. This should be + * used instead of the Spidermonkey Date.toLocaleFormat() + * extension because Date.toLocaleFormat() is buggy for + * Unicode format strings: + * https://bugzilla.mozilla.org/show_bug.cgi?id=508783 + * @param format a strftime-style string format, as parsed by + * {@link Glib.date_time_format} + * @param time_ms milliseconds since 1970-01-01 00:00:00 UTC; the + * value returned by Date.getTime() + * @returns the formatted date. If the date is + * outside of the range of a GDateTime (which contains + * any plausible dates we actually care about), will + * return an empty string. + */ + function util_format_date(format: string, time_ms: number): string; + function util_get_content_for_window_actor(window_actor: Meta.WindowActor, window_rect: Meta.Rectangle): Clutter.Content | null; + /** + * Look up the icon that should be associated with a given URI. Handles + * various special GNOME-internal cases like x-nautilus-search, etc. + * @param text_uri A URI + * @returns A new #GIcon + */ + function util_get_icon_for_uri(text_uri: string): Gio.Icon; + function util_get_label_for_uri(text_uri: string): string; + /** + * This function is similar to a combination of {@link Clutter.Actor.get_transformed_position}, + * and clutter_actor_get_transformed_size(), but unlike + * clutter_actor_get_transformed_size(), it always returns a transform + * of the current allocation, while clutter_actor_get_transformed_size() returns + * bad values (the transform of the requested size) if a relayout has been + * queued. + * + * This function is more convenient to use than + * clutter_actor_get_abs_allocation_vertices() if no transformation is in effect + * and also works around limitations in the GJS binding of arrays. + * @param actor a #ClutterActor + * @returns location to store returned box in stage coordinates + */ + function util_get_transformed_allocation(actor: Clutter.Actor): Clutter.ActorBox; + /** + * Gets the first week day for the current locale, expressed as a + * number in the range 0..6, representing week days from Sunday to + * Saturday. + * @returns A number representing the first week day for the current + * locale + */ + function util_get_week_start(): number; + /** + * If #hidden is %TRUE, hide #actor from pick even with a mode of + * %CLUTTER_PICK_ALL; if #hidden is %FALSE, unhide #actor. + * @param actor A #ClutterActor + * @param hidden Whether #actor should be hidden from pick + */ + function util_set_hidden_from_pick(actor: Clutter.Actor, hidden: boolean): void; + /** + * Write a string to a GOutputStream as binary data. This is a + * workaround for the lack of proper binary strings in GJS. + * @param stream a #GOutputStream + * @param message a #SoupMessage + */ + function write_soup_message_to_stream(stream: Gio.OutputStream, message: Soup.Message): void; + /** + * Write a string to a GOutputStream as UTF-8. This is a workaround + * for not having binary buffers in GJS. + * @param stream a #GOutputStream + * @param str a UTF-8 string to write to #stream + * @returns %TRUE if write succeeded + */ + function write_string_to_stream(stream: Gio.OutputStream, str: string): boolean; +} \ No newline at end of file diff --git a/gir/CinnamonDesktop-3.0.d.ts b/gir/CinnamonDesktop-3.0.d.ts new file mode 100644 index 0000000000..2783645cb0 --- /dev/null +++ b/gir/CinnamonDesktop-3.0.d.ts @@ -0,0 +1,999 @@ +/** Generated with https://github.com/Gr3q/GIR2TS - If possible do not modify. */ +declare namespace imports.gi.CinnamonDesktop { + /** This construct is only for enabling class multi-inheritance, + * use {@link BG} instead. + */ + interface IBG { + changes_with_time(): boolean; + create_and_set_gtk_image(image: Gtk.Image, width: number, height: number): void; + create_and_set_surface_as_root(root_window: Gdk.Window, screen: Gdk.Screen): void; + /** + * Creates a thumbnail for a certain frame, where 'frame' is somewhat + * vaguely defined as 'suitable point to show while single-stepping + * through the slideshow'. + * @param factory + * @param screen + * @param dest_width + * @param dest_height + * @param frame_num + * @returns the newly created thumbnail or + * or NULL if frame_num is out of bounds. + */ + create_frame_thumbnail(factory: DesktopThumbnailFactory, screen: Gdk.Screen, dest_width: number, dest_height: number, frame_num: number): GdkPixbuf.Pixbuf; + /** + * Create a surface that can be set as background for #window. If #is_root is + * TRUE, the surface created will be created by a temporary X server connection + * so that if someone calls XKillClient on it, it won't affect the application + * who created it. + * @param window + * @param width + * @param height + * @param root + * @returns %NULL on error (e.g. out of X connections) + */ + create_surface(window: Gdk.Window, width: number, height: number, root: boolean): cairo.Surface; + create_thumbnail(factory: DesktopThumbnailFactory, screen: Gdk.Screen, dest_width: number, dest_height: number): GdkPixbuf.Pixbuf; + draw(dest: GdkPixbuf.Pixbuf, screen: Gdk.Screen, is_root: boolean): void; + get_color(type: CDesktopEnums.BackgroundShading, primary: Gdk.Color, secondary: Gdk.Color): void; + get_filename(): string; + get_image_size(factory: DesktopThumbnailFactory, best_width: number, best_height: number, width: number, height: number): boolean; + get_placement(): CDesktopEnums.BackgroundStyle; + has_multiple_sizes(): boolean; + is_dark(dest_width: number, dest_height: number): boolean; + load_from_preferences(settings: Gio.Settings): void; + save_to_preferences(settings: Gio.Settings): void; + set_color(type: CDesktopEnums.BackgroundShading, primary: Gdk.Color, secondary: Gdk.Color): void; + set_filename(filename: string): void; + set_placement(placement: CDesktopEnums.BackgroundStyle): void; + connect(signal: "changed", callback: (owner: this) => void): number; + connect(signal: "transitioned", callback: (owner: this) => void): number; + + } + + type BGInitOptionsMixin = GObject.ObjectInitOptions + export interface BGInitOptions extends BGInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link BG} instead. + */ + type BGMixin = IBG & GObject.Object; + + interface BG extends BGMixin {} + + class BG { + public constructor(options?: Partial); + public static new(): BG; + /** + * This function queries the _XROOTPMAP_ID property from + * the root window associated with #screen to determine + * the current root window background pixmap and returns + * a copy of it. If the _XROOTPMAP_ID is not set, then + * a black surface is returned. + * @param screen a #GdkScreen + * @returns a #cairo_surface_t if successful or %NULL + */ + public static get_surface_from_root(screen: Gdk.Screen): cairo.Surface; + public static set_accountsservice_background(background: string): void; + /** + * Set the root pixmap, and properties pointing to it. We + * do this atomically with a server grab to make sure that + * we won't leak the pixmap if somebody else it setting + * it at the same time. (This assumes that they follow the + * same conventions we do). #surface should come from a call + * to {@link Gnome.bg_create_surface}. + * @param screen the #GdkScreen to change root background on + * @param surface the #cairo_surface_t to set root background from. + * Must be an xlib surface backing a pixmap. + */ + public static set_surface_as_root(screen: Gdk.Screen, surface: cairo.Surface): void; + /** + * Set the root pixmap, and properties pointing to it. + * This function differs from {@link Gnome.bg_set_surface_as_root} + * in that it adds a subtle crossfade animation from the + * current root pixmap to the new one. + * @param screen the #GdkScreen to change root background on + * @param surface the cairo xlib surface to set root background from + * @returns a #GnomeBGCrossfade object + */ + public static set_surface_as_root_with_crossfade(screen: Gdk.Screen, surface: cairo.Surface): BGCrossfade; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link BGCrossfade} instead. + */ + interface IBGCrossfade { + /** + * When a crossfade is running, this is height of the fading + * surface. + */ + height: number; + /** + * When a crossfade is running, this is width of the fading + * surface. + */ + width: number; + readonly parent_object: GObject.Object; + /** + * This function reveals whether or not #fade is currently + * running on a window. See {@link Gnome.bg_crossfade_start} for + * information on how to initiate a crossfade. + * @returns %TRUE if fading, or %FALSE if not fading + */ + is_started(): boolean; + /** + * Before initiating a crossfade with {@link Gnome.bg_crossfade_start} + * a start and end surface have to be set. This function sets + * the surface shown at the end of the crossfade effect. + * @param surface The cairo surface to fade to + * @returns %TRUE if successful, or %FALSE if the surface + * could not be copied. + */ + set_end_surface(surface: cairo.Surface): boolean; + /** + * Before initiating a crossfade with {@link Gnome.bg_crossfade_start} + * a start and end surface have to be set. This function sets + * the surface shown at the beginning of the crossfade effect. + * @param surface The cairo surface to fade from + * @returns %TRUE if successful, or %FALSE if the surface + * could not be copied. + */ + set_start_surface(surface: cairo.Surface): boolean; + /** + * This function initiates a quick crossfade between two surfaces on + * the background of #window. Before initiating the crossfade both + * {@link Gnome.bg_crossfade_start} and gnome_bg_crossfade_end() need to + * be called. If animations are disabled, the crossfade is skipped, + * and the window background is set immediately to the end surface. + * @param window The #GdkWindow to draw crossfade on + */ + start(window: Gdk.Window): void; + /** + * This function stops any in progress crossfades that may be + * happening. It's harmless to call this function if #fade is + * already stopped. + */ + stop(): void; + /** + * When a crossfade finishes, #window will have a copy + * of the end surface as its background, and this signal will + * get emitted. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - window: the #GdkWindow the crossfade happend on. + * + * @returns Callback ID + */ + connect(signal: "finished", callback: (owner: this, window: GObject.Object) => void): number; + + connect(signal: "notify::height", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::width", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::parent_object", callback: (owner: this, ...args: any) => void): number; + + } + + type BGCrossfadeInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface BGCrossfadeInitOptions extends BGCrossfadeInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link BGCrossfade} instead. + */ + type BGCrossfadeMixin = IBGCrossfade & GObject.Object; + + interface BGCrossfade extends BGCrossfadeMixin {} + + class BGCrossfade { + public constructor(options?: Partial); + /** + * Creates a new object to manage crossfading a + * window background between two #cairo_surface_ts. + * @param width The width of the crossfading window + * @param height The height of the crossfading window + * @returns the new #GnomeBGCrossfade + */ + public static new(width: number, height: number): BGCrossfade; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link DesktopThumbnailFactory} instead. + */ + interface IDesktopThumbnailFactory { + /** + * Returns TRUE if this GnomeIconFactory can (at least try) to thumbnail + * this file. Thumbnails or files with failed thumbnails won't be thumbnailed. + * + * Usage of this function is threadsafe. + * @param uri the uri of a file + * @param mime_type the mime type of the file + * @param mtime the mtime of the file + * @returns TRUE if the file can be thumbnailed. + */ + can_thumbnail(uri: string, mime_type: string, mtime: number): boolean; + /** + * Creates a failed thumbnail for the file so that we don't try + * to re-thumbnail the file later. + * + * Usage of this function is threadsafe. + * @param uri the uri of a file + * @param mtime the modification time of the file + */ + create_failed_thumbnail(uri: string, mtime: number): void; + /** + * Tries to generate a thumbnail for the specified file. If it succeeds + * it returns a pixbuf that can be used as a thumbnail. + * + * Usage of this function is threadsafe. + * @param uri the uri of a file + * @param mime_type the mime type of the file + * @returns thumbnail pixbuf if thumbnailing succeeded, %NULL otherwise. + */ + generate_thumbnail(uri: string, mime_type: string): GdkPixbuf.Pixbuf; + /** + * Tries to locate an failed thumbnail for the file specified. Writing + * and looking for failed thumbnails is important to avoid to try to + * thumbnail e.g. broken images several times. + * + * Usage of this function is threadsafe. + * @param uri the uri of a file + * @param mtime the mtime of the file + * @returns TRUE if there is a failed thumbnail for the file. + */ + has_valid_failed_thumbnail(uri: string, mtime: number): boolean; + /** + * Tries to locate an existing thumbnail for the file specified. + * + * Usage of this function is threadsafe. + * @param uri the uri of a file + * @param mtime the mtime of the file + * @returns The absolute path of the thumbnail, or %NULL if none exist. + */ + lookup(uri: string, mtime: number): string; + /** + * Saves #thumbnail at the right place. If the save fails a + * failed thumbnail is written. + * + * Usage of this function is threadsafe. + * @param thumbnail the thumbnail as a pixbuf + * @param uri the uri of a file + * @param original_mtime the modification time of the original file + */ + save_thumbnail(thumbnail: GdkPixbuf.Pixbuf, uri: string, original_mtime: number): void; + } + + type DesktopThumbnailFactoryInitOptionsMixin = GObject.ObjectInitOptions + export interface DesktopThumbnailFactoryInitOptions extends DesktopThumbnailFactoryInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link DesktopThumbnailFactory} instead. + */ + type DesktopThumbnailFactoryMixin = IDesktopThumbnailFactory & GObject.Object; + + interface DesktopThumbnailFactory extends DesktopThumbnailFactoryMixin {} + + class DesktopThumbnailFactory { + public constructor(options?: Partial); + /** + * Creates a new #GnomeDesktopThumbnailFactory. + * + * This function must be called on the main thread. + * @param size The thumbnail size to use + * @returns a new #GnomeDesktopThumbnailFactory + */ + public static new(size: DesktopThumbnailSize): DesktopThumbnailFactory; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link PnpIds} instead. + */ + interface IPnpIds { + /** + * Find the full manufacturer name for the given PNP ID. + * @param pnp_id the PNP ID to look for + * @returns a new string representing the manufacturer name, + * or %NULL when not found. + */ + get_pnp_id(pnp_id: string): string; + } + + type PnpIdsInitOptionsMixin = GObject.ObjectInitOptions + export interface PnpIdsInitOptions extends PnpIdsInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link PnpIds} instead. + */ + type PnpIdsMixin = IPnpIds & GObject.Object; + + interface PnpIds extends PnpIdsMixin {} + + class PnpIds { + public constructor(options?: Partial); + /** + * Returns a reference to a #GnomePnpIds object, or creates + * a new one if none have been created. + * @returns a #GnomePnpIds object. + */ + public static new(): PnpIds; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link RRConfig} instead. + */ + interface IRRConfig { + applicable(screen: RRScreen): boolean; + apply_with_time(screen: RRScreen, timestamp: number): boolean; + ensure_primary(): boolean; + equal(config2: RRConfig): boolean; + get_auto_scale(): boolean; + get_base_scale(): number; + get_clone(): boolean; + get_outputs(): RROutputInfo[]; + load_current(): boolean; + load_filename(filename: string): boolean; + match(config2: RRConfig): boolean; + sanitize(): void; + save(): boolean; + set_auto_scale(auto_scale: boolean): void; + set_base_scale(base_scale: number): void; + set_clone(clone: boolean): void; + } + + type RRConfigInitOptionsMixin = GObject.ObjectInitOptions + export interface RRConfigInitOptions extends RRConfigInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link RRConfig} instead. + */ + type RRConfigMixin = IRRConfig & GObject.Object; + + interface RRConfig extends RRConfigMixin {} + + class RRConfig { + public constructor(options?: Partial); + public static new_current(screen: RRScreen): RRConfig; + public static new_stored(screen: RRScreen): RRConfig; + public static apply_from_filename_with_time(screen: RRScreen, filename: string, timestamp: number): boolean; + public static get_backup_filename(): string; + public static get_intended_filename(): string; + public static get_legacy_filename(): string; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link RRLabeler} instead. + */ + interface IRRLabeler { + /** + * Get the color used for the label on a given output (monitor). + * @param output Output device (i.e. monitor) to query + * @returns Color of selected monitor. + */ + get_rgba_for_output(output: RROutputInfo): Gdk.RGBA; + /** + * Hide ouput labels. + */ + hide(): void; + /** + * Show the labels. + */ + show(): void; + } + + type RRLabelerInitOptionsMixin = GObject.ObjectInitOptions + export interface RRLabelerInitOptions extends RRLabelerInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link RRLabeler} instead. + */ + type RRLabelerMixin = IRRLabeler & GObject.Object; + + interface RRLabeler extends RRLabelerMixin {} + + class RRLabeler { + public constructor(options?: Partial); + /** + * Create a GUI element that will display colored labels on each connected monitor. + * This is useful when users are required to identify which monitor is which, e.g. for + * for configuring multiple monitors. + * The labels will be shown by default, use gnome_rr_labeler_hide to hide them. + * @param config Configuration of the screens to label + * @returns A new #GnomeRRLabeler + */ + public static new(config: RRConfig): RRLabeler; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link RROutputInfo} instead. + */ + interface IRROutputInfo { + get_aspect_ratio(): number; + get_display_name(): string; + get_flags(doublescan: boolean, interlaced: boolean, vsync: boolean): void; + get_geometry(): [ x: number | null, y: number | null, width: number | null, height: number | null ]; + get_name(): string; + get_preferred_height(): number; + get_preferred_width(): number; + get_primary(): boolean; + get_product(): number; + get_refresh_rate(): number; + get_refresh_rate_f(): number; + get_rotation(): RRRotation; + get_scale(): number; + get_serial(): number; + get_vendor(): string[]; + is_active(): boolean; + is_connected(): boolean; + set_active(active: boolean): void; + set_flags(doublescan: boolean, interlaced: boolean, vsync: boolean): void; + set_geometry(x: number, y: number, width: number, height: number): void; + set_primary(primary: boolean): void; + set_refresh_rate(rate: number): void; + set_refresh_rate_f(rate: number): void; + set_rotation(rotation: RRRotation): void; + set_scale(scale: number): void; + } + + type RROutputInfoInitOptionsMixin = GObject.ObjectInitOptions + export interface RROutputInfoInitOptions extends RROutputInfoInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link RROutputInfo} instead. + */ + type RROutputInfoMixin = IRROutputInfo & GObject.Object; + + interface RROutputInfo extends RROutputInfoMixin {} + + class RROutputInfo { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link RRScreen} instead. + */ + interface IRRScreen { + gdk_screen: Gdk.Screen; + calculate_best_global_scale(index: number): number; + calculate_supported_scales(width: number, height: number, n_supported_scales: number): number; + create_clone_modes(): RRMode; + get_crtc_by_id(id: number): RRCrtc; + get_dpms_mode(mode: RRDpmsMode): boolean; + get_global_scale(): number; + get_global_scale_setting(): number; + get_output_by_id(id: number): RROutput; + get_output_by_name(name: string): RROutput; + /** + * Get the ranges of the screen + * @returns the minimum width + * + * the maximum width + * + * the minimum height + * + * the maximum height + */ + get_ranges(): [ min_width: number, max_width: number, min_height: number, max_height: number ]; + /** + * Queries the two timestamps that the X RANDR extension maintains. The X + * server will prevent change requests for stale configurations, those whose + * timestamp is not equal to that of the latest request for configuration. The + * X server will also prevent change requests that have an older timestamp to + * the latest change request. + * @returns Location in which to store the timestamp at which the RANDR configuration was last changed + * + * Location in which to store the timestamp at which the RANDR configuration was last obtained + */ + get_timestamps(): [ change_timestamp_ret: number, config_timestamp_ret: number ]; + get_use_upscaling(): boolean; + /** + * List available XRandR clone modes + * @returns + */ + list_clone_modes(): RRMode[]; + /** + * List all CRTCs + * @returns + */ + list_crtcs(): RRCrtc[]; + /** + * List available XRandR modes + * @returns + */ + list_modes(): RRMode[]; + /** + * List all outputs + * @returns + */ + list_outputs(): RROutput[]; + /** + * Refreshes the screen configuration, and calls the screen's callback if it + * exists and if the screen's configuration changed. + * @returns TRUE if the screen's configuration changed; otherwise, the + * function returns FALSE and a NULL error if the configuration didn't change, + * or FALSE and a non-NULL error if there was an error while refreshing the + * configuration. + */ + refresh(): boolean; + /** + * This method also disables the DPMS timeouts. + * @param mode + * @returns + */ + set_dpms_mode(mode: RRDpmsMode): boolean; + set_global_scale_setting(scale_factor: number): void; + set_primary_output(output: RROutput): void; + set_size(width: number, height: number, mm_width: number, mm_height: number): void; + connect(signal: "changed", callback: (owner: this) => void): number; + /** + * This signal is emitted when a display device is connected to a + * port, or a port is hotplugged with an active output. The latter + * can happen if a laptop is docked, and the dock provides a new + * active output. + * + * The #output value is not a #GObject. The returned #output value can + * only assume to be valid during the emission of the signal (i.e. within + * your signal handler only), as it may change later when the #screen + * is modified due to an event from the X server, or due to another + * place in the application modifying the #screen and the #output. + * Therefore, deal with changes to the #output right in your signal + * handler, instead of keeping the #output reference for an async or + * idle function. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - output: the #GnomeRROutput that was connected + * + * @returns Callback ID + */ + connect(signal: "output-connected", callback: (owner: this, output: any | null) => void): number; + /** + * This signal is emitted when a display device is disconnected from + * a port, or a port output is hot-unplugged. The latter can happen + * if a laptop is undocked, and the dock provided the output. + * + * The #output value is not a #GObject. The returned #output value can + * only assume to be valid during the emission of the signal (i.e. within + * your signal handler only), as it may change later when the #screen + * is modified due to an event from the X server, or due to another + * place in the application modifying the #screen and the #output. + * Therefore, deal with changes to the #output right in your signal + * handler, instead of keeping the #output reference for an async or + * idle function. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - output: the #GnomeRROutput that was disconnected + * + * @returns Callback ID + */ + connect(signal: "output-disconnected", callback: (owner: this, output: any | null) => void): number; + + connect(signal: "notify::gdk-screen", callback: (owner: this, ...args: any) => void): number; + + } + + type RRScreenInitOptionsMixin = GObject.ObjectInitOptions & Gio.InitableInitOptions & + Pick; + + export interface RRScreenInitOptions extends RRScreenInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link RRScreen} instead. + */ + type RRScreenMixin = IRRScreen & GObject.Object & Gio.Initable; + + interface RRScreen extends RRScreenMixin {} + + class RRScreen { + public constructor(options?: Partial); + /** + * Creates a unique #GnomeRRScreen instance for the specified #screen. + * @param screen the #GdkScreen on which to operate + * @returns a unique #GnomeRRScreen instance, specific to the #screen, or NULL + * if this could not be created, for instance if the driver does not support + * Xrandr 1.2. Each #GdkScreen thus has a single instance of #GnomeRRScreen. + */ + public static new(screen: Gdk.Screen): RRScreen; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link WallClock} instead. + */ + interface IWallClock { + /** + * A formatted string representing the current clock display. + */ + readonly clock: string; + /** + * If not NULL, the wall clock will format the time/date according to + * this format string. If the format string is invalid, the default string + * will be used instead. + */ + format_string: string; + readonly parent_object: GObject.Object; + /** + * Returns a formatted date and time based on either default format + * settings, or via a custom-set format string. + * + * The returned string should be ready to be set on a label. + * @returns The formatted date/time string. + */ + get_clock(): string; + /** + * Returns a formatted date and time based on the provided format string. + * The returned string should be ready to be set on a label. + * @param format_string + * @returns The formatted date/time string, or NULL + * if there was a problem with the format string. + */ + get_clock_for_format(format_string: string): string; + /** + * Returns the current date-only format based on current locale + * defaults and clock settings. + * @returns The default date format string. + */ + get_default_date_format(): string; + /** + * Returns the current time-only format based on current locale + * defaults and clock settings. + * @returns The default time format string. + */ + get_default_time_format(): string; + /** + * Sets the wall clock to use the provided format string for any + * subsequent updates. Passing NULL will un-set any custom format, + * and rely on a default locale format. + * + * Any invalid format string passed will cause it to be ignored, + * and the default locale format used instead. + * @param format_string + * @returns Whether or not the format string was valid and accepted. + */ + set_format_string(format_string?: string | null): boolean; + connect(signal: "notify::clock", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::format-string", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::parent_object", callback: (owner: this, ...args: any) => void): number; + + } + + type WallClockInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface WallClockInitOptions extends WallClockInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link WallClock} instead. + */ + type WallClockMixin = IWallClock & GObject.Object; + + interface WallClock extends WallClockMixin {} + + class WallClock { + public constructor(options?: Partial); + /** + * Returns a new GnomeWallClock instance + * @returns A pointer to a new GnomeWallClock instance. + */ + public static new(): WallClock; + /** + * Returns the translation of the format string according to + * the LC_TIME locale. + * @param gettext_domain + * @param format_string + * @returns The translated format string. + */ + public static lctime_format(gettext_domain?: string | null, format_string?: string | null): string; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link XkbInfo} instead. + */ + interface IXkbInfo { + readonly parent_object: GObject.Object; + description_for_option(group_id: string, id: string): string; + /** + * Returns a list of all layout identifiers we know about. + * @returns the list + * of layout names. The caller takes ownership of the #GList but not + * of the strings themselves, those are internally allocated and must + * not be modified. + */ + get_all_layouts(): string[]; + /** + * Returns a list of all option group identifiers we know about. + * @returns the list + * of option group ids. The caller takes ownership of the #GList but + * not of the strings themselves, those are internally allocated and + * must not be modified. + */ + get_all_option_groups(): string[]; + /** + * Retrieves information about a layout. Both #display_name and + * #short_name are suitable to show in UIs and might be localized if + * translations are available. + * + * Some layouts don't provide a short name (2 or 3 letters) or don't + * specify a XKB variant, in those cases #short_name or #xkb_variant + * are empty strings, i.e. "". + * + * If the given layout doesn't exist the return value is %FALSE and + * all the (out) parameters are set to %NULL. + * @param id layout's identifier about which to retrieve the info + * @returns %TRUE if the layout exists or %FALSE otherwise. + * + * location to store + * the layout's display name, or %NULL + * + * location to store + * the layout's short name, or %NULL + * + * location to store + * the layout's XKB name, or %NULL + * + * location to store + * the layout's XKB variant, or %NULL + */ + get_layout_info(id: string): [ boolean, string | null, string | null, string | null, string | null ]; + /** + * Retrieves the layout that better fits #language. It also fetches + * information about that layout like {@link Gnome.xkb_info_get_layout_info}. + * + * If a layout can't be found the return value is %FALSE and all the + * (out) parameters are set to %NULL. + * @param language an ISO 639 code + * @returns %TRUE if a layout exists or %FALSE otherwise. + * + * location to store the + * layout's indentifier, or %NULL + * + * location to store + * the layout's display name, or %NULL + * + * location to store + * the layout's short name, or %NULL + * + * location to store + * the layout's XKB name, or %NULL + * + * location to store + * the layout's XKB variant, or %NULL + */ + get_layout_info_for_language(language: string): [ boolean, string | null, string | null, string | null, string | null, string | null ]; + /** + * Returns a list of all option identifiers we know about for group + * #group_id. + * @param group_id group's identifier about which to retrieve the options + * @returns the list + * of option ids. The caller takes ownership of the #GList but not of + * the strings themselves, those are internally allocated and must not + * be modified. + */ + get_options_for_group(group_id: string): string[]; + connect(signal: "notify::parent_object", callback: (owner: this, ...args: any) => void): number; + + } + + type XkbInfoInitOptionsMixin = GObject.ObjectInitOptions + export interface XkbInfoInitOptions extends XkbInfoInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link XkbInfo} instead. + */ + type XkbInfoMixin = IXkbInfo & GObject.Object; + + interface XkbInfo extends XkbInfoMixin {} + + class XkbInfo { + public constructor(options?: Partial); + public static new(): XkbInfo; + /** + * Frees an #XkbRF_VarDefsRec instance allocated by + * {@link Gnome.xkb_info_get_var_defs}. + * @param var_defs #XkbRF_VarDefsRec instance to free + */ + public static free_var_defs(var_defs: any): void; + /** + * Gets both the XKB rules file path and the current XKB parameters in + * use by the X server. + * @returns location to store the rules file + * path. Use {@link GObject.free} when it's no longer needed + * + * location to store a + * #XkbRF_VarDefsRec pointer. Use gnome_xkb_info_free_var_defs() to + * free it + */ + public static get_var_defs(): [ rules: string, var_defs: any ]; + } + + export interface RRCrtcInitOptions {} + interface RRCrtc {} + class RRCrtc { + public constructor(options?: Partial); + public can_drive_output(output: RROutput): boolean; + public get_current_mode(): RRMode; + public get_current_rotation(): RRRotation; + public get_gamma(size: number, red: number, green: number, blue: number): boolean; + public get_id(): number; + public get_position(x: number, y: number): void; + public get_rotations(): RRRotation; + public get_scale(): number; + public set_config_with_time(timestamp: number, x: number, y: number, mode: RRMode, rotation: RRRotation, outputs: RROutput, n_outputs: number, scale: number, global_scale: number): boolean; + public set_gamma(size: number, red: number, green: number, blue: number): void; + public supports_rotation(rotation: RRRotation): boolean; + } + + export interface RRModeInitOptions {} + interface RRMode {} + class RRMode { + public constructor(options?: Partial); + public get_flags(doublescan: boolean, interlaced: boolean, vsync: boolean): void; + public get_freq(): number; + public get_freq_f(): number; + public get_height(): number; + public get_id(): number; + public get_width(): number; + } + + export interface RROutputInitOptions {} + interface RROutput {} + class RROutput { + public constructor(options?: Partial); + public can_clone(clone: RROutput): boolean; + public get_backlight(): number; + public get_backlight_max(): number; + public get_backlight_min(): number; + public get_connector_type(): string; + public get_crtc(): RRCrtc; + public get_current_mode(): RRMode; + public get_edid_data(size: number): number; + public get_height_mm(): number; + public get_id(): number; + public get_ids_from_edid(vendor: string, product: number, serial: number): boolean; + public get_is_primary(): boolean; + public get_name(): string; + public get_position(x: number, y: number): void; + public get_possible_crtcs(): RRCrtc; + public get_preferred_mode(): RRMode; + public get_size_inches(): number; + public get_width_mm(): number; + public is_connected(): boolean; + public is_laptop(): boolean; + public list_modes(): RRMode; + public set_backlight(value: number): boolean; + public supports_mode(mode: RRMode): boolean; + } + + enum DesktopThumbnailSize { + NORMAL = 0, + LARGE = 1 + } + + enum RRDpmsMode { + ON = 0, + STANDBY = 1, + SUSPEND = 2, + OFF = 3, + DISABLED = 4, + UNKNOWN = 5 + } + + enum RRError { + UNKNOWN = 0, + NO_RANDR_EXTENSION = 1, + RANDR_ERROR = 2, + BOUNDS_ERROR = 3, + CRTC_ASSIGNMENT = 4, + NO_MATCHING_CONFIG = 5, + NO_DPMS_EXTENSION = 6 + } + + enum RRRotation { + ROTATION_NEXT = 0, + ROTATION_0 = 1, + ROTATION_90 = 2, + ROTATION_180 = 4, + ROTATION_270 = 8, + REFLECT_X = 16, + REFLECT_Y = 32 + } + + interface InstallerClientCallback { + (success: boolean): void; + } + + /** + * Returns the GSettings key string of the + * given media key type. + * @param type The CDesktopMediaKeyType + * @returns the string corresponding to the + * provided media key type or %NULL + */ + function desktop_get_media_key_string(type: number): string; + /** + * Makes a best effort to retrieve the currently logged-in user's passwd + * struct (containing uid, gid, home, etc...) based on the process uid + * and various environment variables. + * @returns the passwd struct corresponding to the + * session user (or, as a last resort, the user returned by getuid()) + */ + function desktop_get_session_user_pwent(): any | null; + /** + * Prepends a terminal (either the one configured as default in + * the user's GNOME setup, or one of the common xterm emulators) to the passed + * in vector, modifying it in the process. The vector should be allocated with + * #g_malloc, as this will #g_free the original vector. Also all elements must + * have been allocated separately. That is the standard glib/GNOME way of + * doing vectors however. If the integer that #argc points to is negative, the + * size will first be computed. Also note that passing in pointers to a vector + * that is empty, will just create a new vector for you. + * @param argc a pointer to the vector size + * @param argv a pointer to the vector + */ + function desktop_prepend_terminal_to_vector(argc: number, argv: string): void; + function desktop_thumbnail_cache_check_permissions(factory: DesktopThumbnailFactory, quick: boolean): boolean; + function desktop_thumbnail_cache_fix_permissions(): void; + /** + * Returns whether the thumbnail has the correct uri embedded in the + * Thumb::URI option in the png. + * @param pixbuf an loaded thumbnail pixbuf + * @param uri a uri + * @returns TRUE if the thumbnail is for #uri + */ + function desktop_thumbnail_has_uri(pixbuf: GdkPixbuf.Pixbuf, uri: string): boolean; + /** + * Returns whether the thumbnail has the correct uri and mtime embedded in the + * png options. + * @param pixbuf an loaded thumbnail #GdkPixbuf + * @param uri a uri + * @param mtime the mtime + * @returns TRUE if the thumbnail has the right #uri and #mtime + */ + function desktop_thumbnail_is_valid(pixbuf: GdkPixbuf.Pixbuf, uri: string, mtime: number): boolean; + /** + * Calculates the MD5 checksum of the uri. This can be useful + * if you want to manually handle thumbnail files. + * @param uri an uri + * @returns A string with the MD5 digest of the uri string. + */ + function desktop_thumbnail_md5(uri: string): string; + /** + * Returns the filename that a thumbnail of size #size for #uri would have. + * @param uri an uri + * @param size a thumbnail size + * @returns an absolute filename + */ + function desktop_thumbnail_path_for_uri(uri: string, size: DesktopThumbnailSize): string; + /** + * Scales the pixbuf to the desired size. This function + * is a lot faster than gdk-pixbuf when scaling down by + * large amounts. + * @param pixbuf a #GdkPixbuf + * @param dest_width the desired new width + * @param dest_height the desired new height + * @returns a scaled pixbuf + */ + function desktop_thumbnail_scale_down_pixbuf(pixbuf: GdkPixbuf.Pixbuf, dest_width: number, dest_height: number): GdkPixbuf.Pixbuf; + /** + * Uses packagekit to check if provided package names are installed. + * @param packages a null-terminated array of package names + * @param callback the callback to run for the result + */ + function installer_check_for_packages(packages: string[], callback: InstallerClientCallback): void; + /** + * Uses packagekit to install the provided list of packages. + * @param packages a null-terminated array of package names + * @param callback the callback to run for the result + */ + function installer_install_packages(packages: string[], callback: InstallerClientCallback): void; + /** + * Returns the #GQuark that will be used for #GError values returned by the + * GnomeRR API. + * @returns a #GQuark used to identify errors coming from the GnomeRR API. + */ + function rr_error_quark(): GLib.Quark; + const RR_CONNECTOR_TYPE_PANEL: string; + +} \ No newline at end of file diff --git a/gir/Clutter-1.0.d.ts b/gir/Clutter-1.0.d.ts new file mode 100644 index 0000000000..631fa98318 --- /dev/null +++ b/gir/Clutter-1.0.d.ts @@ -0,0 +1,33694 @@ +/** Generated with https://github.com/Gr3q/GIR2TS - If possible do not modify. */ +declare namespace imports.gi.Clutter { + /** This construct is only for enabling class multi-inheritance, + * use {@link Action} instead. + */ + interface IAction { + + } + + type ActionInitOptionsMixin = ActorMetaInitOptions + export interface ActionInitOptions extends ActionInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Action} instead. + */ + type ActionMixin = IAction & ActorMeta; + + /** + * The {@link Action} structure contains only private data and + * should be accessed using the provided API. + */ + interface Action extends ActionMixin {} + + class Action { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Actor} instead. + */ + interface IActor { + /** + * The allocation for the actor, in pixels + * + * This is property is read-only, but you might monitor it to know when an + * actor moves or resizes + */ + readonly allocation: ActorBox; + /** + * @deprecated + * Use {@link Actor.pivot_point} instead + * + * The anchor point expressed as a {@link Gravity} + * + * It is highly recommended not to use #ClutterActor:anchor-x, + * #ClutterActor:anchor-y, and #ClutterActor:anchor-gravity in newly + * written code; the anchor point adds an additional translation that + * will affect the actor's relative position with regards to its + * parent, as well as the position of its children. This change needs + * to always be taken into account when positioning the actor. It is + * recommended to use the #ClutterActor:pivot-point property instead, + * as it will affect only the transformations. + */ + anchor_gravity: Gravity; + /** + * @deprecated + * Use {@link Actor.pivot_point} instead + * + * The X coordinate of an actor's anchor point, relative to + * the actor coordinate space, in pixels. + * + * It is highly recommended not to use {@link Actor.anchor_x}, + * #ClutterActor:anchor-y, and #ClutterActor:anchor-gravity in newly + * written code; the anchor point adds an additional translation that + * will affect the actor's relative position with regards to its + * parent, as well as the position of its children. This change needs + * to always be taken into account when positioning the actor. It is + * recommended to use the #ClutterActor:pivot-point property instead, + * as it will affect only the transformations. + */ + anchor_x: number; + /** + * @deprecated + * Use {@link Actor.pivot_point} instead + * + * The Y coordinate of an actor's anchor point, relative to + * the actor coordinate space, in pixels + * + * It is highly recommended not to use {@link Actor.anchor_x}, + * #ClutterActor:anchor-y, and #ClutterActor:anchor-gravity in newly + * written code; the anchor point adds an additional translation that + * will affect the actor's relative position with regards to its + * parent, as well as the position of its children. This change needs + * to always be taken into account when positioning the actor. It is + * recommended to use the #ClutterActor:pivot-point property instead, + * as it will affect only the transformations. + */ + anchor_y: number; + /** + * Paints a solid fill of the actor's allocation using the specified + * color. + * + * The {@link Actor.background_color} property is animatable. + */ + background_color: Color; + /** + * Whether the {@link Actor.background_color} property has been set. + */ + readonly background_color_set: boolean; + /** + * Applies a transformation matrix on each child of an actor. + * + * Setting this property with a {@link Matrix} will set the + * #ClutterActor:child-transform-set property to %TRUE as a side effect; + * setting this property with %NULL will set the + * #ClutterActor:child-transform-set property to %FALSE. + * + * The #ClutterActor:child-transform property is animatable. + */ + child_transform: Matrix; + /** + * Whether the {@link Actor.child_transform} property is set. + */ + readonly child_transform_set: boolean; + /** + * @deprecated + * Use {@link Actor.clip_rect} instead. + * + * The visible region of the actor, in actor-relative coordinates + */ + clip: Geometry; + /** + * The visible region of the actor, in actor-relative coordinates, + * expressed as a {@link Rect}. + * + * Setting this property to %NULL will unset the existing clip. + * + * Setting this property will change the #ClutterActor:has-clip + * property as a side effect. + */ + clip_rect: Rect; + /** + * Whether the clip region should track the allocated area + * of the actor. + * + * This property is ignored if a clip area has been explicitly + * set using {@link Clutter.Actor.set_clip}. + */ + clip_to_allocation: boolean; + /** + * The {@link Content} implementation that controls the content + * of the actor. + */ + content: Content; + /** + * The bounding box for the {@link Content} used by the actor. + * + * The value of this property is controlled by the #ClutterActor:allocation + * and #ClutterActor:content-gravity properties of #ClutterActor. + * + * The bounding box for the content is guaranteed to never exceed the + * allocation's of the actor. + */ + readonly content_box: ActorBox; + /** + * The alignment that should be honoured by the {@link Content} + * set with the #ClutterActor:content property. + * + * Changing the value of this property will change the bounding box of + * the content; you can use the #ClutterActor:content-box property to + * get the position and size of the content within the actor's + * allocation. + * + * This property is meaningful only for #ClutterContent implementations + * that have a preferred size, and if the preferred size is smaller than + * the actor's allocation. + * + * The #ClutterActor:content-gravity property is animatable. + */ + content_gravity: ContentGravity; + /** + * The repeat policy for the actor's {@link Actor.content}. + */ + content_repeat: ContentRepeat; + /** + * @deprecated + * Use {@link Actor.z_position} instead. + * + * The position of the actor on the Z axis. + * + * The {@link Actor.depth} property is relative to the parent's + * modelview matrix. + * + * Setting this property will call {@link #ClutterContainerIface.sort.depth_order} + * which is usually a no-op, and it's most likely not what you want. + * + * The #ClutterActor:depth property is animatable. + */ + depth: number; + /** + * The actor's first child. + */ + readonly first_child: Actor; + /** + * This flag controls whether the {@link Actor.fixed_x} and + * #ClutterActor:fixed-y properties are used + */ + fixed_position_set: boolean; + /** + * The fixed X position of the actor in pixels. + * + * Writing this property sets {@link Actor.fixed_position_set} + * property as well, as a side effect + */ + fixed_x: number; + /** + * The fixed Y position of the actor in pixels. + * + * Writing this property sets the {@link Actor.fixed_position_set} + * property as well, as a side effect + */ + fixed_y: number; + /** + * Whether the actor has the {@link Actor.clip} property set or not + */ + // readonly has_clip: boolean; + /** + * Whether the actor contains the pointer of a {@link InputDevice} + * or not. + */ + // readonly has_pointer: boolean; + /** + * Height of the actor (in pixels). If written, forces the minimum and + * natural size request of the actor to the given height. If read, returns + * the allocated height if available, otherwise the height request. + * + * The {@link Actor.height} property is animatable. + */ + height: number; + /** + * The actor's last child. + */ + readonly last_child: Actor; + /** + * A delegate object for controlling the layout of the children of + * an actor. + */ + layout_manager: LayoutManager; + magnification_filter: ScalingFilter; + /** + * Whether the actor is mapped (will be painted when the stage + * to which it belongs is mapped) + */ + readonly mapped: boolean; + /** + * The margin (in pixels) from the bottom of the actor. + * + * This property adds a margin to the actor's preferred size; the margin + * will be automatically taken into account when allocating the actor. + * + * The {@link Actor.margin_bottom} property is animatable. + */ + margin_bottom: number; + /** + * The margin (in pixels) from the left of the actor. + * + * This property adds a margin to the actor's preferred size; the margin + * will be automatically taken into account when allocating the actor. + * + * The {@link Actor.margin_left} property is animatable. + */ + margin_left: number; + /** + * The margin (in pixels) from the right of the actor. + * + * This property adds a margin to the actor's preferred size; the margin + * will be automatically taken into account when allocating the actor. + * + * The {@link Actor.margin_right} property is animatable. + */ + margin_right: number; + /** + * The margin (in pixels) from the top of the actor. + * + * This property adds a margin to the actor's preferred size; the margin + * will be automatically taken into account when allocating the actor. + * + * The {@link Actor.margin_top} property is animatable. + */ + margin_top: number; + /** + * A forced minimum height request for the actor, in pixels + * + * Writing this property sets the {@link Actor.min_height_set} property + * as well, as a side effect. This property overrides the usual height + * request of the actor. + */ + min_height: number; + /** + * This flag controls whether the {@link Actor.min_height} property + * is used + */ + min_height_set: boolean; + /** + * A forced minimum width request for the actor, in pixels + * + * Writing this property sets the {@link Actor.min_width_set} property + * as well, as a side effect. + * + * This property overrides the usual width request of the actor. + */ + min_width: number; + /** + * This flag controls whether the {@link Actor.min_width} property + * is used + */ + min_width_set: boolean; + minification_filter: ScalingFilter; + /** + * The name of the actor + */ + name: string; + /** + * A forced natural height request for the actor, in pixels + * + * Writing this property sets the {@link Actor.natural_height_set} + * property as well, as a side effect. This property overrides the + * usual height request of the actor + */ + natural_height: number; + /** + * This flag controls whether the {@link Actor.natural_height} property + * is used + */ + natural_height_set: boolean; + /** + * A forced natural width request for the actor, in pixels + * + * Writing this property sets the {@link Actor.natural_width_set} + * property as well, as a side effect. This property overrides the + * usual width request of the actor + */ + natural_width: number; + /** + * This flag controls whether the {@link Actor.natural_width} property + * is used + */ + natural_width_set: boolean; + /** + * Determines the conditions in which the actor will be redirected + * to an offscreen framebuffer while being painted. For example this + * can be used to cache an actor in a framebuffer or for improved + * handling of transparent actors. See + * {@link Clutter.Actor.set_offscreen_redirect} for details. + */ + offscreen_redirect: OffscreenRedirect; + /** + * Opacity of an actor, between 0 (fully transparent) and + * 255 (fully opaque) + * + * The {@link Actor.opacity} property is animatable. + */ + opacity: number; + /** + * The point around which the scaling and rotation transformations occur. + * + * The pivot point is expressed in normalized coordinates space, with (0, 0) + * being the top left corner of the actor and (1, 1) the bottom right corner + * of the actor. + * + * The default pivot point is located at (0, 0). + * + * The {@link Actor.pivot_point} property is animatable. + */ + pivot_point: Point; + /** + * The Z component of the {@link Actor.pivot_point}, expressed as a value + * along the Z axis. + * + * The #ClutterActor:pivot-point-z property is animatable. + */ + pivot_point_z: number; + /** + * The position of the origin of the actor. + * + * This property is a shorthand for setting and getting the + * {@link Actor.x} and #ClutterActor:y properties at the same + * time. + * + * The #ClutterActor:position property is animatable. + */ + position: Point; + /** + * Whether the actor is reactive to events or not + * + * Only reactive actors will emit event-related signals + */ + reactive: boolean; + /** + * Whether the actor has been realized + */ + readonly realized: boolean; + /** + * Request mode for the {@link Actor}. The request mode determines the + * type of geometry management used by the actor, either height for width + * (the default) or width for height. + * + * For actors implementing height for width, the parent container should get + * the preferred width first, and then the preferred height for that width. + * + * For actors implementing width for height, the parent container should get + * the preferred height first, and then the preferred width for that height. + * + * For instance: + * + * |[ + * ClutterRequestMode mode; + * gfloat natural_width, min_width; + * gfloat natural_height, min_height; + * + * mode = clutter_actor_get_request_mode (child); + * if (mode == CLUTTER_REQUEST_HEIGHT_FOR_WIDTH) + * { + * clutter_actor_get_preferred_width (child, -1, + * &min_width, + * &natural_width); + * clutter_actor_get_preferred_height (child, natural_width, + * &min_height, + * &natural_height); + * } + * else if (mode == CLUTTER_REQUEST_WIDTH_FOR_HEIGHT) + * { + * clutter_actor_get_preferred_height (child, -1, + * &min_height, + * &natural_height); + * clutter_actor_get_preferred_width (child, natural_height, + * &min_width, + * &natural_width); + * } + * else if (mode == CLUTTER_REQUEST_CONTENT_SIZE) + * { + * ClutterContent *content = clutter_actor_get_content (child); + * + * min_width, min_height = 0; + * natural_width = natural_height = 0; + * + * if (content != NULL) + * clutter_content_get_preferred_size (content, &natural_width, &natural_height); + * } + * ]| + * + * will retrieve the minimum and natural width and height depending on the + * preferred request mode of the #ClutterActor "child". + * + * The {@link Clutter.Actor.get_preferred_size} function will implement this + * check for you. + */ + request_mode: RequestMode; + /** + * The rotation angle on the X axis. + * + * The {@link Actor.rotation_angle_x} property is animatable. + */ + rotation_angle_x: number; + /** + * The rotation angle on the Y axis + * + * The {@link Actor.rotation_angle_y} property is animatable. + */ + rotation_angle_y: number; + /** + * The rotation angle on the Z axis + * + * The {@link Actor.rotation_angle_z} property is animatable. + */ + rotation_angle_z: number; + /** + * @deprecated + * Use {@link Actor.pivot_point} instead + * + * The rotation center on the X axis. + */ + rotation_center_x: Vertex; + /** + * @deprecated + * Use {@link Actor.pivot_point} instead + * + * The rotation center on the Y axis. + */ + rotation_center_y: Vertex; + /** + * @deprecated + * Use {@link Actor.pivot_point} instead + * + * The rotation center on the Z axis. + */ + rotation_center_z: Vertex; + /** + * @deprecated + * Use {@link Actor.pivot_point} instead + * + * The rotation center on the Z axis expressed as a {@link Gravity}. + */ + rotation_center_z_gravity: Gravity; + /** + * @deprecated + * Use {@link Actor.pivot_point} instead + * + * The horizontal center point for scaling + */ + scale_center_x: number; + /** + * @deprecated + * Use {@link Actor.pivot_point} instead + * + * The vertical center point for scaling + */ + scale_center_y: number; + /** + * @deprecated + * Use {@link Actor.pivot_point} instead + * + * The center point for scaling expressed as a {@link Gravity} + */ + scale_gravity: Gravity; + /** + * The horizontal scale of the actor. + * + * The {@link Actor.scale_x} property is animatable. + */ + scale_x: number; + /** + * The vertical scale of the actor. + * + * The {@link Actor.scale_y} property is animatable. + */ + scale_y: number; + /** + * The scale factor of the actor along the Z axis. + * + * The {@link Actor.scale_y} property is animatable. + */ + scale_z: number; + /** + * If %TRUE, the actor is automatically shown when parented. + * + * Calling {@link Clutter.Actor.hide} on an actor which has not been + * parented will set this property to %FALSE as a side effect. + */ + show_on_set_parent: boolean; + /** + * The size of the actor. + * + * This property is a shorthand for setting and getting the + * {@link Actor.width} and #ClutterActor:height at the same time. + * + * The #ClutterActor:size property is animatable. + */ + size: Size; + /** + * The direction of the text inside a {@link Actor}. + */ + text_direction: TextDirection; + /** + * Overrides the transformations of a {@link Actor} with a custom + * matrix. + * + * The matrix specified by the #ClutterActor:transform property is + * applied to the actor and its children relative to the actor's + * #ClutterActor:allocation and #ClutterActor:pivot-point. + * + * Application code should rarely need to use this function directly. + * + * Setting this property with a #ClutterMatrix will set the + * #ClutterActor:transform-set property to %TRUE as a side effect; + * setting this property with %NULL will set the + * #ClutterActor:transform-set property to %FALSE. + * + * The #ClutterActor:transform property is animatable. + */ + transform: Matrix; + /** + * Whether the {@link Actor.transform} property is set. + */ + readonly transform_set: boolean; + /** + * An additional translation applied along the X axis, relative + * to the actor's {@link Actor.pivot_point}. + * + * The #ClutterActor:translation-x property is animatable. + */ + translation_x: number; + /** + * An additional translation applied along the Y axis, relative + * to the actor's {@link Actor.pivot_point}. + * + * The #ClutterActor:translation-y property is animatable. + */ + translation_y: number; + /** + * An additional translation applied along the Z axis, relative + * to the actor's {@link Actor.pivot_point}. + * + * The #ClutterActor:translation-z property is animatable. + */ + translation_z: number; + /** + * Whether the actor is set to be visible or not + * + * See also {@link Actor.mapped} + */ + visible: boolean; + /** + * Width of the actor (in pixels). If written, forces the minimum and + * natural size request of the actor to the given width. If read, returns + * the allocated width if available, otherwise the width request. + * + * The {@link Actor.width} property is animatable. + */ + width: number; + /** + * X coordinate of the actor in pixels. If written, forces a fixed + * position for the actor. If read, returns the fixed position if any, + * otherwise the allocation if available, otherwise 0. + * + * The {@link Actor.x} property is animatable. + */ + x: number; + /** + * The alignment of an actor on the X axis, if the actor has been given + * extra space for its allocation. See also the {@link Actor.x_expand} + * property. + */ + x_align: ActorAlign | St.Align; + /** + * Whether a layout manager should assign more space to the actor on + * the X axis. + */ + x_expand: boolean; + /** + * Y coordinate of the actor in pixels. If written, forces a fixed + * position for the actor. If read, returns the fixed position if + * any, otherwise the allocation if available, otherwise 0. + * + * The {@link Actor.y} property is animatable. + */ + y: number; + /** + * The alignment of an actor on the Y axis, if the actor has been given + * extra space for its allocation. + */ + y_align: ActorAlign | St.Align; + /** + * Whether a layout manager should assign more space to the actor on + * the Y axis. + */ + y_expand: boolean; + /** + * The actor's position on the Z axis, relative to the parent's + * transformations. + * + * Positive values will bring the actor's position nearer to the user, + * whereas negative values will bring the actor's position farther from + * the user. + * + * The {@link Actor.z_position} does not affect the paint or allocation + * order. + * + * The #ClutterActor:z-position property is animatable. + */ + z_position: number; + /** + * {@link ActorFlags} + */ + readonly flags: number; + /** + * Adds #action to the list of actions applied to #self + * + * A {@link Action} can only belong to one actor at a time + * + * The #ClutterActor will hold a reference on #action until either + * {@link Clutter.Actor.remove_action} or clutter_actor_clear_actions() + * is called + * @param action a {@link Action} + */ + add_action(action: Action): void; + /** + * A convenience function for setting the name of a {@link Action} + * while adding it to the list of actions applied to #self + * + * This function is the logical equivalent of: + * + * |[ + * clutter_actor_meta_set_name (CLUTTER_ACTOR_META (action), name); + * clutter_actor_add_action (self, action); + * ]| + * @param name the name to set on the action + * @param action a {@link Action} + */ + add_action_with_name(name: string, action: Action): void; + /** + * Adds #child to the children of #self. + * + * This function will acquire a reference on #child that will only + * be released when calling {@link Clutter.Actor.remove_child}. + * + * This function will take into consideration the {@link Actor.depth} + * of #child, and will keep the list of children sorted. + * + * This function will emit the #ClutterContainer::actor-added signal + * on #self. + * @param child a {@link Actor} + */ + add_child(child: Actor): void; + /** + * Adds #constraint to the list of {@link Constraint}s applied + * to #self + * + * The #ClutterActor will hold a reference on the #constraint until + * either {@link Clutter.Actor.remove_constraint} or + * clutter_actor_clear_constraints() is called. + * @param constraint a {@link Constraint} + */ + add_constraint(constraint: Constraint): void; + /** + * A convenience function for setting the name of a {@link Constraint} + * while adding it to the list of constraints applied to #self + * + * This function is the logical equivalent of: + * + * |[ + * clutter_actor_meta_set_name (CLUTTER_ACTOR_META (constraint), name); + * clutter_actor_add_constraint (self, constraint); + * ]| + * @param name the name to set on the constraint + * @param constraint a {@link Constraint} + */ + add_constraint_with_name(name: string, constraint: Constraint): void; + /** + * Adds #effect to the list of {@link Effect}s applied to #self + * + * The #ClutterActor will hold a reference on the #effect until either + * {@link Clutter.Actor.remove_effect} or clutter_actor_clear_effects() is + * called. + * + * Note that as #ClutterEffect is initially unowned, + * clutter_actor_add_effect() will sink any floating reference on #effect. + * @param effect a {@link Effect} + */ + add_effect(effect: Effect): void; + /** + * A convenience function for setting the name of a {@link Effect} + * while adding it to the list of effects applied to #self. + * + * Note that as #ClutterEffect is initially unowned, + * {@link Clutter.Actor.add_effect_with_name} will sink any floating + * reference on #effect. + * + * This function is the logical equivalent of: + * + * |[ + * clutter_actor_meta_set_name (CLUTTER_ACTOR_META (effect), name); + * clutter_actor_add_effect (self, effect); + * ]| + * @param name the name to set on the effect + * @param effect a {@link Effect} + */ + add_effect_with_name(name: string, effect: Effect): void; + /** + * Adds a #transition to the {@link Actor}'s list of animations. + * + * The #name string is a per-actor unique identifier of the #transition: only + * one #ClutterTransition can be associated to the specified #name. + * + * The #transition will be started once added. + * + * This function will take a reference on the #transition. + * + * This function is usually called implicitly when modifying an animatable + * property. + * @param name the name of the transition to add + * @param transition the {@link Transition} to add + */ + add_transition(name: string, transition: Transition): void; + /** + * Assigns the size of a {@link Actor} from the given #box. + * + * This function should only be called on the children of an actor when + * overriding the #ClutterActorClass.allocate() virtual function. + * + * This function will adjust the stored allocation to take into account + * the alignment flags set in the #ClutterActor:x-align and + * #ClutterActor:y-align properties, as well as the margin values set in + * the #ClutterActor:margin-top, #ClutterActor:margin-right, + * #ClutterActor:margin-bottom, and #ClutterActor:margin-left properties. + * + * This function will respect the easing state of the #ClutterActor and + * interpolate between the current allocation and the new one if the + * easing state duration is a positive value. + * + * Actors can know from their allocation box whether they have moved + * with respect to their parent actor. The #flags parameter describes + * additional information about the allocation, for instance whether + * the parent has moved with respect to the stage, for example because + * a grandparent's origin has moved. + * @param box new allocation of the actor, in parent-relative coordinates + * @param flags flags that control the allocation + */ + allocate(box: ActorBox, flags?: AllocationFlags): void; + /** + * Allocates #self by taking into consideration the available allocation + * area; an alignment factor on either axis; and whether the actor should + * fill the allocation on either axis. + * + * The #box should contain the available allocation width and height; + * if the x1 and y1 members of {@link ActorBox} are not set to 0, the + * allocation will be offset by their value. + * + * This function takes into consideration the geometry request specified by + * the #ClutterActor:request-mode property, and the text direction. + * + * This function is useful for fluid layout managers using legacy alignment + * flags. Newly written layout managers should use the #ClutterActor:x-align + * and #ClutterActor:y-align properties, instead, and just call + * {@link Clutter.Actor.allocate} inside their #ClutterActorClass.allocate() + * implementation. + * @param box a {@link ActorBox}, containing the available width and height + * @param x_align the horizontal alignment, between 0 and 1 + * @param y_align the vertical alignment, between 0 and 1 + * @param x_fill whether the actor should fill horizontally + * @param y_fill whether the actor should fill vertically + * @param flags allocation flags to be passed to {@link Clutter.Actor.allocate} + */ + allocate_align_fill(box: ActorBox, x_align: number, y_align: number, x_fill: boolean, y_fill: boolean, flags: AllocationFlags): void; + /** + * Allocates #self taking into account the {@link Actor}'s + * preferred size, but limiting it to the maximum available width + * and height provided. + * + * This function will do the right thing when dealing with the + * actor's request mode. + * + * The implementation of this function is equivalent to: + * + * |[ + * if (request_mode == CLUTTER_REQUEST_HEIGHT_FOR_WIDTH) + * { + * clutter_actor_get_preferred_width (self, available_height, + * &min_width, + * &natural_width); + * width = CLAMP (natural_width, min_width, available_width); + * + * clutter_actor_get_preferred_height (self, width, + * &min_height, + * &natural_height); + * height = CLAMP (natural_height, min_height, available_height); + * } + * else if (request_mode == CLUTTER_REQUEST_WIDTH_FOR_HEIGHT) + * { + * clutter_actor_get_preferred_height (self, available_width, + * &min_height, + * &natural_height); + * height = CLAMP (natural_height, min_height, available_height); + * + * clutter_actor_get_preferred_width (self, height, + * &min_width, + * &natural_width); + * width = CLAMP (natural_width, min_width, available_width); + * } + * else if (request_mode == CLUTTER_REQUEST_CONTENT_SIZE) + * { + * clutter_content_get_preferred_size (content, &natural_width, &natural_height); + * + * width = CLAMP (natural_width, 0, available_width); + * height = CLAMP (natural_height, 0, available_height); + * } + * + * box.x1 = x; box.y1 = y; + * box.x2 = box.x1 + available_width; + * box.y2 = box.y1 + available_height; + * clutter_actor_allocate (self, &box, flags); + * ]| + * + * This function can be used by fluid layout managers to allocate + * an actor's preferred size without making it bigger than the area + * available for the container. + * @param x the actor's X coordinate + * @param y the actor's Y coordinate + * @param available_width the maximum available width, or -1 to use the + * actor's natural width + * @param available_height the maximum available height, or -1 to use the + * actor's natural height + * @param flags flags controlling the allocation + */ + allocate_available_size(x: number, y: number, available_width: number, available_height: number, flags: AllocationFlags): void; + /** + * Allocates the natural size of #self. + * + * This function is a utility call for {@link Actor} implementations + * that allocates the actor's preferred natural size. It can be used + * by fixed layout managers (like #ClutterGroup or so called + * 'composite actors') inside the ClutterActor::allocate + * implementation to give each child exactly how much space it + * requires, regardless of the size of the parent. + * + * This function is not meant to be used by applications. It is also + * not meant to be used outside the implementation of the + * #ClutterActorClass.allocate virtual function. + * @param flags flags controlling the allocation + */ + allocate_preferred_size(flags: AllocationFlags): void; + /** + * @deprecated + * Use the implicit transition for animatable properties + * in {@link Actor} instead. See {@link Clutter.Actor.save_easing_state}, + * clutter_actor_set_easing_mode(), clutter_actor_set_easing_duration(), + * clutter_actor_set_easing_delay(), and clutter_actor_restore_easing_state(). + * + * Animates the given list of properties of #actor between the current + * value for each property and a new final value. The animation has a + * definite duration and a speed given by the #mode. + * + * For example, this: + * + * |[ + * clutter_actor_animate (rectangle, CLUTTER_LINEAR, 250, + * "width", 100.0, + * "height", 100.0, + * NULL); + * ]| + * + * will make width and height properties of the {@link Actor} "rectangle" + * grow linearly between the current value and 100 pixels, in 250 milliseconds. + * + * The animation #mode is a logical id, either from the #ClutterAnimationMode + * enumeration of from {@link Clutter.Alpha.register_func}. + * + * All the properties specified will be animated between the current value + * and the final value. If a property should be set at the beginning of + * the animation but not updated during the animation, it should be prefixed + * by the "fixed::" string, for instance: + * + * |[ + * clutter_actor_animate (actor, CLUTTER_EASE_IN_SINE, 100, + * "rotation-angle-z", 360.0, + * "fixed::rotation-center-z", ¢er, + * NULL); + * ]| + * + * Will animate the "rotation-angle-z" property between the current value + * and 360 degrees, and set the "rotation-center-z" property to the fixed + * value of the #ClutterVertex "center". + * + * This function will implicitly create a #ClutterAnimation object which + * will be assigned to the #actor and will be returned to the developer + * to control the animation or to know when the animation has been + * completed. + * + * If a name argument starts with "signal::", "signal-after::", + * "signal-swapped::" or "signal-swapped-after::" the two following arguments + * are used as callback function and data for a signal handler installed on + * the #ClutterAnimation object for the specified signal name, for instance: + * + * |[ + * static void + * on_animation_completed (ClutterAnimation *animation, + * ClutterActor *actor) + * { + * clutter_actor_hide (actor); + * } + * + * clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 100, + * "opacity", 0, + * "signal::completed", on_animation_completed, actor, + * NULL); + * ]| + * + * or, to automatically destroy an actor at the end of the animation: + * + * |[ + * clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 100, + * "opacity", 0, + * "signal-swapped-after::completed", + * clutter_actor_destroy, + * actor, + * NULL); + * ]| + * + * The "signal::" modifier is the equivalent of using g_signal_connect(); + * the "signal-after::" modifier is the equivalent of using + * g_signal_connect_after() or g_signal_connect_data() with the + * %G_CONNECT_AFTER; the "signal-swapped::" modifier is the equivalent + * of using g_signal_connect_swapped() or g_signal_connect_data() with the + * %G_CONNECT_SWAPPED flah; finally, the "signal-swapped-after::" modifier + * is the equivalent of using g_signal_connect_data() with both the + * %G_CONNECT_AFTER and %G_CONNECT_SWAPPED flags. The clutter_actor_animate() + * function will not keep track of multiple connections to the same signal, + * so it is your responsability to avoid them when calling + * clutter_actor_animate() multiple times on the same actor. + * + * Calling this function on an actor that is already being animated + * will cause the current animation to change with the new final values, + * the new easing mode and the new duration - that is, this code: + * + * |[ + * clutter_actor_animate (actor, CLUTTER_LINEAR, 250, + * "width", 100.0, + * "height", 100.0, + * NULL); + * clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 500, + * "x", 100.0, + * "y", 100.0, + * "width", 200.0, + * NULL); + * ]| + * + * is the equivalent of: + * + * |[ + * clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 500, + * "x", 100.0, + * "y", 100.0, + * "width", 200.0, + * "height", 100.0, + * NULL); + * ]| + * + * Unless the animation is looping, the #ClutterAnimation created by + * clutter_actor_animate() will become invalid as soon as it is + * complete. + * + * Since the created #ClutterAnimation instance attached to #actor + * is guaranteed to be valid throughout the #ClutterAnimation::completed + * signal emission chain, you will not be able to create a new animation + * using clutter_actor_animate() on the same #actor from within the + * #ClutterAnimation::completed signal handler unless you use + * g_signal_connect_after() to connect the callback function, for instance: + * + * |[ + * static void + * on_animation_completed (ClutterAnimation *animation, + * ClutterActor *actor) + * { + * clutter_actor_animate (actor, CLUTTER_EASE_OUT_CUBIC, 250, + * "x", 500.0, + * "y", 500.0, + * NULL); + * } + * + * ... + * animation = clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 250, + * "x", 100.0, + * "y", 100.0, + * NULL); + * g_signal_connect (animation, "completed", + * G_CALLBACK (on_animation_completed), + * actor); + * ... + * ]| + * @param mode an animation mode logical id + * @param duration duration of the animation, in milliseconds + * @param first_property_name the name of a property + * @returns a {@link Animation} object. The object is + * owned by the #ClutterActor and should not be unreferenced with + * {@link GObject.Object.unref} + */ + animate(mode: number, duration: number, first_property_name: string): Animation; + /** + * @deprecated + * Use the implicit transition for animatable properties + * in {@link Actor} instead. See {@link Clutter.Actor.save_easing_state}, + * clutter_actor_set_easing_mode(), clutter_actor_set_easing_duration(), + * clutter_actor_set_easing_delay(), and clutter_actor_restore_easing_state(). + * + * Animates the given list of properties of #actor between the current + * value for each property and a new final value. The animation has a + * definite behaviour given by the passed #alpha. + * + * See {@link Clutter.Actor.animate} for further details. + * + * This function is useful if you want to use an existing {@link Alpha} + * to animate #actor. + * @param alpha a {@link Alpha} + * @param first_property_name the name of a property + * @returns a {@link Animation} object. The object is owned by the + * #ClutterActor and should not be unreferenced with {@link GObject.Object.unref} + */ + animate_with_alpha(alpha: Alpha, first_property_name: string): Animation; + /** + * @deprecated + * Use the implicit transition for animatable properties + * in {@link Actor} instead. See {@link Clutter.Actor.save_easing_state}, + * clutter_actor_set_easing_mode(), clutter_actor_set_easing_duration(), + * clutter_actor_set_easing_delay(), and clutter_actor_restore_easing_state(). + * + * Animates the given list of properties of #actor between the current + * value for each property and a new final value. The animation has a + * definite behaviour given by the passed #alpha. + * + * See {@link Clutter.Actor.animate} for further details. + * + * This function is useful if you want to use an existing {@link Alpha} + * to animate #actor. + * + * This is the vector-based variant of clutter_actor_animate_with_alpha(), + * useful for language bindings. + * + * Unlike clutter_actor_animate_with_alpha(), this function will + * not allow you to specify "signal::" names and callbacks. + * @param alpha a {@link Alpha} + * @param n_properties number of property names and values + * @param properties a vector + * containing the property names to set + * @param values a vector containing the + * property values to set + * @returns a {@link Animation} object. The object is owned by the + * #ClutterActor and should not be unreferenced with {@link GObject.Object.unref} + */ + animate_with_alphav(alpha: Alpha, n_properties: number, properties: string[], values: GObject.Value[]): Animation; + /** + * @deprecated + * Use the implicit transition for animatable properties + * in {@link Actor} instead. See {@link Clutter.Actor.save_easing_state}, + * clutter_actor_set_easing_mode(), clutter_actor_set_easing_duration(), + * clutter_actor_set_easing_delay(), and clutter_actor_restore_easing_state(). + * + * Animates the given list of properties of #actor between the current + * value for each property and a new final value. The animation has a + * definite duration given by #timeline and a speed given by the #mode. + * + * See {@link Clutter.Actor.animate} for further details. + * + * This function is useful if you want to use an existing timeline + * to animate #actor. + * @param mode an animation mode logical id + * @param timeline a {@link Timeline} + * @param first_property_name the name of a property + * @returns a {@link Animation} object. The object is + * owned by the #ClutterActor and should not be unreferenced with + * {@link GObject.Object.unref} + */ + animate_with_timeline(mode: number, timeline: Timeline, first_property_name: string): Animation; + /** + * @deprecated + * Use the implicit transition for animatable properties + * in {@link Actor} instead. See {@link Clutter.Actor.save_easing_state}, + * clutter_actor_set_easing_mode(), clutter_actor_set_easing_duration(), + * clutter_actor_set_easing_delay(), and clutter_actor_restore_easing_state(). + * + * Animates the given list of properties of #actor between the current + * value for each property and a new final value. The animation has a + * definite duration given by #timeline and a speed given by the #mode. + * + * See {@link Clutter.Actor.animate} for further details. + * + * This function is useful if you want to use an existing timeline + * to animate #actor. + * + * This is the vector-based variant of clutter_actor_animate_with_timeline(), + * useful for language bindings. + * + * Unlike clutter_actor_animate_with_timeline(), this function + * will not allow you to specify "signal::" names and callbacks. + * @param mode an animation mode logical id + * @param timeline a {@link Timeline} + * @param n_properties number of property names and values + * @param properties a vector + * containing the property names to set + * @param values a vector containing the + * property values to set + * @returns a {@link Animation} object. The object is + * owned by the #ClutterActor and should not be unreferenced with + * {@link GObject.Object.unref} + */ + animate_with_timelinev(mode: number, timeline: Timeline, n_properties: number, properties: string[], values: GObject.Value[]): Animation; + /** + * @deprecated + * Use the implicit transition for animatable properties + * in {@link Actor} instead. See {@link Clutter.Actor.save_easing_state}, + * clutter_actor_set_easing_mode(), clutter_actor_set_easing_duration(), + * clutter_actor_set_easing_delay(), and clutter_actor_restore_easing_state(). + * + * Animates the given list of properties of #actor between the current + * value for each property and a new final value. The animation has a + * definite duration and a speed given by the #mode. + * + * This is the vector-based variant of {@link Clutter.Actor.animate}, useful + * for language bindings. + * + * Unlike clutter_actor_animate(), this function will not + * allow you to specify "signal::" names and callbacks. + * @param mode an animation mode logical id + * @param duration duration of the animation, in milliseconds + * @param n_properties number of property names and values + * @param properties a vector + * containing the property names to set + * @param values a vector containing the + * property values to set + * @returns a {@link Animation} object. The object is + * owned by the #ClutterActor and should not be unreferenced with + * {@link GObject.Object.unref} + */ + animatev(mode: number, duration: number, n_properties: number, properties: string[], values: GObject.Value[]): Animation; + /** + * Transforms #point in coordinates relative to the actor into + * ancestor-relative coordinates using the relevant transform + * stack (i.e. scale, rotation, etc). + * + * If #ancestor is %NULL the ancestor will be the {@link Stage}. In + * this case, the coordinates returned will be the coordinates on + * the stage before the projection is applied. This is different from + * the behaviour of {@link Clutter.Actor.apply_transform_to_point}. + * @param ancestor A {@link Actor} ancestor, or %NULL to use the + * default #ClutterStage + * @param point A point as {@link Vertex} + * @returns The translated {@link Vertex} + */ + apply_relative_transform_to_point(ancestor: Actor | null, point: Vertex): Vertex; + /** + * Transforms #point in coordinates relative to the actor + * into screen-relative coordinates with the current actor + * transformation (i.e. scale, rotation, etc) + * @param point A point as {@link Vertex} + * @returns The translated {@link Vertex} + */ + apply_transform_to_point(point: Vertex): Vertex; + /** + * Binds a #GListModel to a {@link Actor}. + * + * If the #ClutterActor was already bound to a #GListModel, the previous + * binding is destroyed. + * + * The existing children of #ClutterActor are destroyed when setting a + * model, and new children are created and added, representing the contents + * of the #model. The #ClutterActor is updated whenever the #model changes. + * If #model is %NULL, the #ClutterActor is left empty. + * + * When a #ClutterActor is bound to a model, adding and removing children + * directly is undefined behaviour. + * @param model a #GListModel + * @param create_child_func a function that creates {@link Actor} instances + * from the contents of the #model + * @param notify function called when unsetting the #model + */ + bind_model(model: Gio.ListModel | null, create_child_func: ActorCreateChildFunc, notify: GLib.DestroyNotify): void; + /** + * Binds a #GListModel to a {@link Actor}. + * + * Unlike {@link Clutter.Actor.bind_model}, this function automatically creates + * a child #ClutterActor of type #child_type, and binds properties on the + * items inside the #model to the corresponding properties on the child, + * for instance: + * + * |[ + * clutter_actor_bind_model_with_properties (actor, model, + * MY_TYPE_CHILD_VIEW, + * "label", "text", G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE, + * "icon", "image", G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE, + * "selected", "selected", G_BINDING_BIDIRECTIONAL, + * "active", "active", G_BINDING_BIDIRECTIONAL, + * NULL); + * ]| + * + * is the equivalent of calling clutter_actor_bind_model() with a + * #ClutterActorCreateChildFunc of: + * + * |[ + * ClutterActor *res = g_object_new (MY_TYPE_CHILD_VIEW, NULL); + * + * g_object_bind_property (item, "label", res, "text", G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE); + * g_object_bind_property (item, "icon", res, "image", G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE); + * g_object_bind_property (item, "selected", res, "selected", G_BINDING_BIDIRECTIONAL); + * g_object_bind_property (item, "active", res, "active", G_BINDING_BIDIRECTIONAL); + * + * return res; + * ]| + * + * If the #ClutterActor was already bound to a #GListModel, the previous + * binding is destroyed. + * + * When a #ClutterActor is bound to a model, adding and removing children + * directly is undefined behaviour. + * + * See also: clutter_actor_bind_model() + * @param model a #GListModel + * @param child_type the type of {@link Actor} to use when creating + * children mapping to items inside the #model + * @param first_model_property the first property of #model to bind + */ + bind_model_with_properties(model: Gio.ListModel, child_type: GObject.Type, first_model_property: string): void; + /** + * Clears the list of actions applied to #self + */ + clear_actions(): void; + /** + * Clears the list of constraints applied to #self + */ + clear_constraints(): void; + /** + * Clears the list of effects applied to #self + */ + clear_effects(): void; + /** + * Determines if #descendant is contained inside #self (either as an + * immediate child, or as a deeper descendant). If #self and + * #descendant point to the same actor then it will also return %TRUE. + * @param descendant A {@link Actor}, possibly contained in #self + * @returns whether #descendent is contained within #self + */ + contains(descendant: Actor): boolean; + /** + * Run the next stage of the paint sequence. This function should only + * be called within the implementation of the ‘run’ virtual of a + * {@link Effect}. It will cause the run method of the next effect to + * be applied, or it will paint the actual actor if the current effect + * is the last effect in the chain. + */ + continue_paint(): void; + /** + * Creates a #PangoContext for the given actor. The #PangoContext + * is already configured using the appropriate font map, resolution + * and font options. + * + * See also {@link Clutter.Actor.get_pango_context}. + * @returns the newly created #PangoContext. + * Use {@link GObject.Object.unref} on the returned value to deallocate its + * resources + */ + create_pango_context(): Pango.Context; + /** + * Creates a new #PangoLayout from the same #PangoContext used + * by the {@link Actor}. The #PangoLayout is already configured + * with the font map, resolution and font options, and the + * given #text. + * + * If you want to keep around a #PangoLayout created by this + * function you will have to connect to the #ClutterBackend::font-changed + * and #ClutterBackend::resolution-changed signals, and call + * {@link Pango.Layout.context_changed} in response to them. + * @param text the text to set on the #PangoLayout, or %NULL + * @returns the newly created #PangoLayout. + * Use {@link GObject.Object.unref} when done + */ + create_pango_layout(text: string | null): Pango.Layout; + /** + * Destroys an actor. When an actor is destroyed, it will break any + * references it holds to other objects. If the actor is inside a + * container, the actor will be removed. + * + * When you destroy a container, its children will be destroyed as well. + * + * Note: you cannot destroy the {@link Stage} returned by + * {@link Clutter.Stage.get_default}. + */ + destroy(): void; + /** + * Destroys all children of #self. + * + * This function releases the reference added by inserting a child + * actor in the list of children of #self, and ensures that the + * {@link Actor.destroy} signal is emitted on each child of the + * actor. + * + * By default, #ClutterActor will emit the #ClutterActor::destroy signal + * when its reference count drops to 0; the default handler of the + * #ClutterActor::destroy signal will destroy all the children of an + * actor. This function ensures that all children are destroyed, instead + * of just removed from #self, unlike {@link Clutter.Actor.remove_all_children} + * which will merely release the reference and remove each child. + * + * Unless you acquired an additional reference on each child of #self + * prior to calling clutter_actor_remove_all_children() and want to reuse + * the actors, you should use clutter_actor_destroy_all_children() in + * order to make sure that children are destroyed and signal handlers + * are disconnected even in cases where circular references prevent this + * from automatically happening through reference counting alone. + */ + destroy_all_children(): void; + /** + * @deprecated + * Use the implicit transition for animatable properties + * in {@link Actor} instead, and {@link Clutter.Actor.remove_transition} to + * remove the transition. + * + * Detaches the {@link Animation} used by #actor, if {@link Clutter.Actor.animate} + * has been called on #actor. + * + * Once the animation has been detached, it loses a reference. If it was + * the only reference then the #ClutterAnimation becomes invalid. + * + * The #ClutterAnimation::completed signal will not be emitted. + */ + detach_animation(): void; + /** + * This function is used to emit an event on the main stage. + * You should rarely need to use this function, except for + * synthetising events. + * @param event a {@link Event} + * @param capture %TRUE if event in in capture phase, %FALSE otherwise. + * @returns the return value from the signal emission: %TRUE + * if the actor handled the event, or %FALSE if the event was + * not handled + */ + event(event: Event, capture: boolean): boolean; + /** + * Calculates the transformed screen coordinates of the four corners of + * the actor; the returned vertices relate to the {@link ActorBox} + * coordinates as follows: + * + * - v[0] contains (x1, y1) + * - v[1] contains (x2, y1) + * - v[2] contains (x1, y2) + * - v[3] contains (x2, y2) + * @returns Pointer to a location of an array + * of 4 {@link Vertex} where to store the result. + */ + get_abs_allocation_vertices(): Vertex[]; + /** + * Returns the accessible object that describes the actor to an + * assistive technology. + * + * If no class-specific #AtkObject implementation is available for the + * actor instance in question, it will inherit an #AtkObject + * implementation from the first ancestor class for which such an + * implementation is defined. + * + * The documentation of the ATK + * library contains more information about accessible objects and + * their uses. + * @returns the #AtkObject associated with #actor + */ + get_accessible(): Atk.Object; + /** + * Retrieves the {@link Action} with the given name in the list + * of actions applied to #self + * @param name the name of the action to retrieve + * @returns a {@link Action} for the given + * name, or %NULL. The returned #ClutterAction is owned by the + * actor and it should not be unreferenced directly + */ + get_action(name: string): Action; + /** + * Retrieves the list of actions applied to #self + * @returns a copy + * of the list of {@link Action}s. The contents of the list are + * owned by the #ClutterActor. Use {@link GObject.list_free} to free the resources + * allocated by the returned #GList + */ + get_actions(): Action[]; + /** + * Gets the layout box an actor has been assigned. The allocation can + * only be assumed valid inside a paint() method; anywhere else, it + * may be out-of-date. + * + * An allocation does not incorporate the actor's scale or anchor point; + * those transformations do not affect layout, only rendering. + * + * Do not call any of the clutter_actor_get_allocation_*() family + * of functions inside the implementation of the get_preferred_width() + * or get_preferred_height() virtual functions. + * @returns the function fills this in with the actor's allocation + */ + get_allocation_box(): ActorBox; + /** + * @deprecated + * Use {@link Clutter.Actor.get_allocation_box} instead. + * + * Gets the layout box an actor has been assigned. The allocation can + * only be assumed valid inside a paint() method; anywhere else, it + * may be out-of-date. + * + * An allocation does not incorporate the actor's scale or anchor point; + * those transformations do not affect layout, only rendering. + * + * The returned rectangle is in pixels. + * @returns allocation geometry in pixels + */ + get_allocation_geometry(): Geometry; + /** + * Calculates the transformed coordinates of the four corners of the + * actor in the plane of #ancestor. The returned vertices relate to + * the {@link ActorBox} coordinates as follows: + * + * - #verts[0] contains (x1, y1) + * - #verts[1] contains (x2, y1) + * - #verts[2] contains (x1, y2) + * - #verts[3] contains (x2, y2) + * + * If #ancestor is %NULL the ancestor will be the #ClutterStage. In + * this case, the coordinates returned will be the coordinates on + * the stage before the projection is applied. This is different from + * the behaviour of {@link Clutter.Actor.get_abs_allocation_vertices}. + * @param ancestor A {@link Actor} to calculate the vertices + * against, or %NULL to use the #ClutterStage + * @returns return + * location for an array of 4 {@link Vertex} in which to store the result + */ + get_allocation_vertices(ancestor: Actor | null): Vertex[]; + /** + * @deprecated + * Use {@link Actor.pivot_point} instead + * + * Gets the current anchor point of the #actor in pixels. + * @returns return location for the X coordinate of the anchor point + * + * return location for the Y coordinate of the anchor point + */ + get_anchor_point(): [ anchor_x: number, anchor_y: number ]; + /** + * @deprecated + * Use {@link Actor.pivot_point} instead. + * + * Retrieves the anchor position expressed as a {@link Gravity}. If + * the anchor point was specified using pixels or units this will + * return %CLUTTER_GRAVITY_NONE. + * @returns the {@link Gravity} used by the anchor point + */ + get_anchor_point_gravity(): Gravity; + /** + * @deprecated + * Use the implicit transition for animatable properties + * in {@link Actor} instead, and {@link Clutter.Actor.get_transition} to retrieve + * the transition. + * + * Retrieves the {@link Animation} used by #actor, if {@link Clutter.Actor.animate} + * has been called on #actor. + * @returns a {@link Animation}, or %NULL + */ + get_animation(): Animation; + /** + * Retrieves the color set using {@link Clutter.Actor.set_background_color}. + * @returns return location for a {@link Color} + */ + get_background_color(): Color; + /** + * Retrieves the actor at the given #index_ inside the list of + * children of #self. + * @param index_ the position in the list of children + * @returns a pointer to a {@link Actor}, or %NULL + */ + get_child_at_index(index_: number): T; + /** + * Retrieves the child transformation matrix set using + * {@link Clutter.Actor.set_child_transform}; if none is currently set, + * the #transform matrix will be initialized to the identity matrix. + * @returns a {@link Matrix} + */ + get_child_transform(): Matrix; + /** + * Retrieves the list of children of #self. + * @returns A newly + * allocated #GList of {@link Actor}s. Use {@link GObject.list_free} when + * done. + */ + get_children(): T; + /** + * Gets the clip area for #self, if any is set. + * @returns return location for the X offset of + * the clip rectangle, or %NULL + * + * return location for the Y offset of + * the clip rectangle, or %NULL + * + * return location for the width of + * the clip rectangle, or %NULL + * + * return location for the height of + * the clip rectangle, or %NULL + */ + get_clip(): [ xoff: number | null, yoff: number | null, width: number | null, height: number | null ]; + /** + * Retrieves the value set using {@link Clutter.Actor.set_clip_to_allocation} + * @returns %TRUE if the {@link Actor} is clipped to its allocation + */ + get_clip_to_allocation(): boolean; + /** + * Retrieves the {@link Constraint} with the given name in the list + * of constraints applied to #self + * @param name the name of the constraint to retrieve + * @returns a {@link Constraint} for the given + * name, or %NULL. The returned #ClutterConstraint is owned by the + * actor and it should not be unreferenced directly + */ + get_constraint(name: string): Constraint; + /** + * Retrieves the list of constraints applied to #self + * @returns a copy + * of the list of {@link Constraint}s. The contents of the list are + * owned by the #ClutterActor. Use {@link GObject.list_free} to free the resources + * allocated by the returned #GList + */ + get_constraints(): Constraint[]; + /** + * Retrieves the contents of #self. + * @returns a pointer to the {@link Content} instance, + * or %NULL if none was set + */ + get_content(): Content; + /** + * Retrieves the bounding box for the {@link Content} of #self. + * + * The bounding box is relative to the actor's allocation. + * + * If no #ClutterContent is set for #self, or if #self has not been + * allocated yet, then the result is undefined. + * + * The content box is guaranteed to be, at most, as big as the allocation + * of the #ClutterActor. + * + * If the #ClutterContent used by the actor has a preferred size, then + * it is possible to modify the content box by using the + * #ClutterActor:content-gravity property. + * @returns the return location for the bounding + * box for the {@link Content} + */ + get_content_box(): ActorBox; + /** + * Retrieves the content gravity as set using + * {@link Clutter.Actor.set_content_gravity}. + * @returns the content gravity + */ + get_content_gravity(): ContentGravity; + /** + * Retrieves the repeat policy for a {@link Actor} set by + * {@link Clutter.Actor.set_content_repeat}. + * @returns the content repeat policy + */ + get_content_repeat(): ContentRepeat; + /** + * Retrieves the values set using {@link Clutter.Actor.set_content_scaling_filters}. + * @returns return location for the minification + * filter, or %NULL + * + * return location for the magnification + * filter, or %NULL + */ + get_content_scaling_filters(): [ min_filter: ScalingFilter | null, mag_filter: ScalingFilter | null ]; + /** + * Retrieves the default paint volume for #self. + * + * This function provides the same {@link PaintVolume} that would be + * computed by the default implementation inside #ClutterActor of the + * {@link #ClutterActorClass.get.paint_volume} virtual function. + * + * This function should only be used by #ClutterActor subclasses that + * cannot chain up to the parent implementation when computing their + * paint volume. + * @returns a pointer to the default + * {@link PaintVolume}, relative to the #ClutterActor, or %NULL if + * the actor could not compute a valid paint volume. The returned value + * is not guaranteed to be stable across multiple frames, so if you + * want to retain it, you will need to copy it using + * {@link Clutter.PaintVolume.copy}. + */ + get_default_paint_volume(): PaintVolume; + /** + * @deprecated + * Use {@link Clutter.Actor.get_z_position} instead. + * + * Retrieves the depth of #self. + * @returns the depth of the actor + */ + get_depth(): number; + /** + * Retrieves the delay that should be applied when tweening animatable + * properties. + * @returns a delay, in milliseconds + */ + get_easing_delay(): number; + /** + * Retrieves the duration of the tweening for animatable + * properties of #self for the current easing state. + * @returns the duration of the tweening, in milliseconds + */ + get_easing_duration(): number; + /** + * Retrieves the easing mode for the tweening of animatable properties + * of #self for the current easing state. + * @returns an easing mode + */ + get_easing_mode(): AnimationMode; + /** + * Retrieves the {@link Effect} with the given name in the list + * of effects applied to #self + * @param name the name of the effect to retrieve + * @returns a {@link Effect} for the given + * name, or %NULL. The returned #ClutterEffect is owned by the + * actor and it should not be unreferenced directly + */ + get_effect(name: string): Effect; + /** + * Retrieves the {@link Effect}s applied on #self, if any + * @returns a list + * of {@link Effect}s, or %NULL. The elements of the returned + * list are owned by Clutter and they should not be freed. You should + * free the returned list using {@link GObject.list_free} when done + */ + get_effects(): Effect[]; + /** + * Retrieves the first child of #self. + * + * The returned pointer is only valid until the scene graph changes; it + * is not safe to modify the list of children of #self while iterating + * it. + * @returns a pointer to a {@link Actor}, or %NULL + */ + get_first_child(): Actor; + /** + * Checks whether an actor has a fixed position set (and will thus be + * unaffected by any layout manager). + * @returns %TRUE if the fixed position is set on the actor + */ + get_fixed_position_set(): boolean; + /** + * Retrieves the flags set on #self + * @returns a bitwise or of {@link ActorFlags} or 0 + */ + get_flags(): ActorFlags; + /** + * @deprecated + * Use {@link Clutter.Actor.get_position} and + * clutter_actor_get_size(), or clutter_actor_get_allocation_geometry() + * instead. + * + * Gets the size and position of an actor relative to its parent + * actor. This is the same as calling {@link Clutter.Actor.get_position} and + * clutter_actor_get_size(). It tries to "do what you mean" and get the + * requested size and position if the actor's allocation is invalid. + * @returns A location to store actors {@link Geometry} + */ + get_geometry(): Geometry; + /** + * @deprecated + * The id is not used any longer, and this function + * always returns 0. + * + * Retrieves the unique id for #self. + * @returns Globally unique value for this object instance. + */ + get_gid(): number; + /** + * Retrieves the height of a {@link Actor}. + * + * If the actor has a valid allocation, this function will return the + * height of the allocated area given to the actor. + * + * If the actor does not have a valid allocation, this function will + * return the actor's natural height, that is the preferred height of + * the actor. + * + * If you care whether you get the preferred height or the height that + * has been assigned to the actor, you should probably call a different + * function like {@link Clutter.Actor.get_allocation_box} to retrieve the + * allocated size or clutter_actor_get_preferred_height() to retrieve the + * preferred height. + * + * If an actor has a fixed height, for instance a height that has been + * assigned using clutter_actor_set_height(), the height returned will + * be the same value. + * @returns the height of the actor, in pixels + */ + get_height(): number; + /** + * Retrieves the last child of #self. + * + * The returned pointer is only valid until the scene graph changes; it + * is not safe to modify the list of children of #self while iterating + * it. + * @returns a pointer to a {@link Actor}, or %NULL + */ + get_last_child(): Actor; + /** + * Retrieves the {@link LayoutManager} used by #self. + * @returns a pointer to the {@link LayoutManager}, + * or %NULL + */ + get_layout_manager(): LayoutManager; + /** + * Retrieves all the components of the margin of a {@link Actor}. + * @returns return location for a {@link Margin} + */ + get_margin(): Margin; + /** + * Retrieves the bottom margin of a {@link Actor}. + * @returns the bottom margin + */ + get_margin_bottom(): number; + /** + * Retrieves the left margin of a {@link Actor}. + * @returns the left margin + */ + get_margin_left(): number; + /** + * Retrieves the right margin of a {@link Actor}. + * @returns the right margin + */ + get_margin_right(): number; + /** + * Retrieves the top margin of a {@link Actor}. + * @returns the top margin + */ + get_margin_top(): number; + /** + * Retrieves the number of children of #self. + * @returns the number of children of an actor + */ + get_n_children(): number; + /** + * Retrieves the name of #self. + * @returns the name of the actor, or %NULL. The returned string is + * owned by the actor and should not be modified or freed. + */ + get_name(): string; + /** + * Retrieves the sibling of #self that comes after it in the list + * of children of #self's parent. + * + * The returned pointer is only valid until the scene graph changes; it + * is not safe to modify the list of children of #self while iterating + * it. + * @returns a pointer to a {@link Actor}, or %NULL + */ + get_next_sibling(): Actor; + /** + * Retrieves whether to redirect the actor to an offscreen buffer, as + * set by {@link Clutter.Actor.set_offscreen_redirect}. + * @returns the value of the offscreen-redirect property of the actor + */ + get_offscreen_redirect(): OffscreenRedirect; + /** + * Retrieves the opacity value of an actor, as set by + * {@link Clutter.Actor.set_opacity}. + * + * For retrieving the absolute opacity of the actor inside a paint + * virtual function, see clutter_actor_get_paint_opacity(). + * @returns the opacity of the actor + */ + get_opacity(): number; + /** + * Retrieves the paint volume of the passed {@link Actor}, and + * transforms it into a 2D bounding box in stage coordinates. + * + * This function is useful to determine the on screen area occupied by + * the actor. The box is only an approximation and may often be + * considerably larger due to the optimizations used to calculate the + * box. The box is never smaller though, so it can reliably be used + * for culling. + * + * There are times when a 2D paint box can't be determined, e.g. + * because the actor isn't yet parented under a stage or because + * the actor is unable to determine a paint volume. + * @returns %TRUE if a 2D paint box could be determined, else + * %FALSE. + * + * return location for a {@link ActorBox} + */ + get_paint_box(): [ boolean, ActorBox ]; + /** + * Retrieves the absolute opacity of the actor, as it appears on the stage. + * + * This function traverses the hierarchy chain and composites the opacity of + * the actor with that of its parents. + * + * This function is intended for subclasses to use in the paint virtual + * function, to paint themselves with the correct opacity. + * @returns The actor opacity value. + */ + get_paint_opacity(): number; + /** + * Retrieves the 'paint' visibility of an actor recursively checking for non + * visible parents. + * + * This is by definition the same as %CLUTTER_ACTOR_IS_MAPPED. + * @returns %TRUE if the actor is visibile and will be painted. + */ + get_paint_visibility(): boolean; + /** + * Retrieves the paint volume of the passed {@link Actor}, or %NULL + * when a paint volume can't be determined. + * + * The paint volume is defined as the 3D space occupied by an actor + * when being painted. + * + * This function will call the {@link #ClutterActorClass.get.paint_volume} + * virtual function of the #ClutterActor class. Sub-classes of #ClutterActor + * should not usually care about overriding the default implementation, + * unless they are, for instance: painting outside their allocation, or + * actors with a depth factor (not in terms of #ClutterActor:depth but real + * 3D depth). + * + * Note: 2D actors overriding #ClutterActorClass.get_paint_volume() + * should ensure that their volume has a depth of 0. (This will be true + * as long as you don't call clutter_paint_volume_set_depth().) + * @returns a pointer to a {@link PaintVolume}, + * or %NULL if no volume could be determined. The returned pointer + * is not guaranteed to be valid across multiple frames; if you want + * to keep it, you will need to copy it using {@link Clutter.PaintVolume.copy}. + */ + get_paint_volume(): PaintVolume; + /** + * Retrieves the #PangoContext for #self. The actor's #PangoContext + * is already configured using the appropriate font map, resolution + * and font options. + * + * Unlike {@link Clutter.Actor.create_pango_context}, this context is owend + * by the {@link Actor} and it will be updated each time the options + * stored by the #ClutterBackend change. + * + * You can use the returned #PangoContext to create a #PangoLayout + * and render text using cogl_pango_render_layout() to reuse the + * glyphs cache also used by Clutter. + * @returns the #PangoContext for a {@link Actor}. + * The returned #PangoContext is owned by the actor and should not be + * unreferenced by the application code + */ + get_pango_context(): Pango.Context; + /** + * Retrieves the parent of #self. + * @returns The {@link Actor} parent, or %NULL + * if no parent is set + */ + get_parent(): Actor; + /** + * Retrieves the coordinates of the {@link Actor.pivot_point}. + * @returns return location for the normalized X + * coordinate of the pivot point, or %NULL + * + * return location for the normalized Y + * coordinate of the pivot point, or %NULL + */ + get_pivot_point(): [ pivot_x: number | null, pivot_y: number | null ]; + /** + * Retrieves the Z component of the {@link Actor.pivot_point}. + * @returns + */ + get_pivot_point_z(): number; + /** + * This function tries to "do what you mean" and tell you where the + * actor is, prior to any transformations. Retrieves the fixed + * position of an actor in pixels, if one has been set; otherwise, if + * the allocation is valid, returns the actor's allocated position; + * otherwise, returns 0,0. + * + * The returned position is in pixels. + * @returns return location for the X coordinate, or %NULL + * + * return location for the Y coordinate, or %NULL + */ + get_position(): [ x: number | null, y: number | null ]; + /** + * Computes the requested minimum and natural heights for an actor, + * or if they are already computed, returns the cached values. + * + * An actor may not get its request - depending on the layout + * manager that's in effect. + * + * A request should not incorporate the actor's scale or anchor point; + * those transformations do not affect layout, only rendering. + * @param for_width available width to assume in computing desired height, + * or a negative value to indicate that no width is defined + * @returns return location for minimum height, + * or %NULL + * + * return location for natural + * height, or %NULL + */ + get_preferred_height(for_width: number): [ min_height_p: number | null, natural_height_p: number | null ]; + /** + * Computes the preferred minimum and natural size of an actor, taking into + * account the actor's geometry management (either height-for-width + * or width-for-height). + * + * The width and height used to compute the preferred height and preferred + * width are the actor's natural ones. + * + * If you need to control the height for the preferred width, or the width for + * the preferred height, you should use {@link Clutter.Actor.get_preferred_width} + * and clutter_actor_get_preferred_height(), and check the actor's preferred + * geometry management using the {@link Actor.request_mode} property. + * @returns return location for the minimum + * width, or %NULL + * + * return location for the minimum + * height, or %NULL + * + * return location for the natural + * width, or %NULL + * + * return location for the natural + * height, or %NULL + */ + get_preferred_size(): [ min_width_p: number | null, min_height_p: number | null, natural_width_p: number | null, natural_height_p: number | null ]; + /** + * Computes the requested minimum and natural widths for an actor, + * optionally depending on the specified height, or if they are + * already computed, returns the cached values. + * + * An actor may not get its request - depending on the layout + * manager that's in effect. + * + * A request should not incorporate the actor's scale or anchor point; + * those transformations do not affect layout, only rendering. + * @param for_height available height when computing the preferred width, + * or a negative value to indicate that no height is defined + * @returns return location for minimum width, + * or %NULL + * + * return location for the natural + * width, or %NULL + */ + get_preferred_width(for_height: number): [ min_width_p: number | null, natural_width_p: number | null ]; + /** + * Retrieves the sibling of #self that comes before it in the list + * of children of #self's parent. + * + * The returned pointer is only valid until the scene graph changes; it + * is not safe to modify the list of children of #self while iterating + * it. + * @returns a pointer to a {@link Actor}, or %NULL + */ + get_previous_sibling(): Actor; + /** + * Checks whether #actor is marked as reactive. + * @returns %TRUE if the actor is reactive + */ + get_reactive(): boolean; + /** + * Retrieves the geometry request mode of #self + * @returns the request mode for the actor + */ + get_request_mode(): RequestMode; + /** + * @deprecated + * Use {@link Clutter.Actor.get_rotation_angle} and + * clutter_actor_get_pivot_point() instead. + * + * Retrieves the angle and center of rotation on the given axis, + * set using {@link Clutter.Actor.set_rotation}. + * @param axis the axis of rotation + * @returns the angle of rotation + * + * return value for the X coordinate of the center of rotation + * + * return value for the Y coordinate of the center of rotation + * + * return value for the Z coordinate of the center of rotation + */ + get_rotation(axis: RotateAxis): [ number, number, number, number ]; + /** + * Retrieves the angle of rotation set by {@link Clutter.Actor.set_rotation_angle}. + * @param axis the axis of the rotation + * @returns the angle of rotation, in degrees + */ + get_rotation_angle(axis: RotateAxis): number; + /** + * Retrieves an actors scale factors. + * @returns Location to store horizonal + * scale factor, or %NULL. + * + * Location to store vertical + * scale factor, or %NULL. + */ + get_scale(): [ scale_x: number | null, scale_y: number | null ]; + /** + * @deprecated + * Use {@link Clutter.Actor.get_pivot_point} instead. + * + * Retrieves the scale center coordinate in pixels relative to the top + * left corner of the actor. If the scale center was specified using a + * {@link Gravity} this will calculate the pixel offset using the + * current size of the actor. + * @returns Location to store the X position + * of the scale center, or %NULL. + * + * Location to store the Y position + * of the scale center, or %NULL. + */ + get_scale_center(): [ center_x: number | null, center_y: number | null ]; + /** + * @deprecated + * Use {@link Clutter.Actor.get_pivot_point} instead. + * + * Retrieves the scale center as a compass direction. If the scale + * center was specified in pixels or units this will return + * %CLUTTER_GRAVITY_NONE. + * @returns the scale gravity + */ + get_scale_gravity(): Gravity; + /** + * Retrieves the scaling factor along the Z axis, as set using + * {@link Clutter.Actor.set_scale_z}. + * @returns the scaling factor along the Z axis + */ + get_scale_z(): number; + /** + * @deprecated + * Use {@link Clutter.Actor.get_effect} instead. + * + * Queries the currently set {@link Shader} on #self. + * @returns The currently set {@link Shader} + * or %NULL if no shader is set. + */ + get_shader(): Shader; + /** + * This function tries to "do what you mean" and return + * the size an actor will have. If the actor has a valid + * allocation, the allocation will be returned; otherwise, + * the actors natural size request will be returned. + * + * If you care whether you get the request vs. the allocation, you + * should probably call a different function like + * {@link Clutter.Actor.get_allocation_box} or + * clutter_actor_get_preferred_width(). + * @returns return location for the width, or %NULL. + * + * return location for the height, or %NULL. + */ + get_size(): [ width: number | null, height: number | null ]; + /** + * Retrieves the {@link Stage} where #actor is contained. + * @returns the stage + * containing the actor, or %NULL + */ + get_stage(): Stage; + /** + * Retrieves the value set using {@link Clutter.Actor.set_text_direction} + * + * If no text direction has been previously set, the default text + * direction, as returned by clutter_get_default_text_direction(), will + * be returned instead + * @returns the {@link TextDirection} for the actor + */ + get_text_direction(): TextDirection; + /** + * Retrieves the current transformation matrix of a {@link Actor}. + * @returns a {@link Matrix} + */ + get_transform(): Matrix; + /** + * @deprecated + * Use {@link Clutter.Actor.get_transform} instead + * + * Retrieves the transformations applied to #self relative to its + * parent. + * @returns the return location for a {@link Matrix} + */ + get_transformation_matrix(): Matrix; + /** + * Retrieves the 3D paint volume of an actor like + * {@link Clutter.Actor.get_paint_volume} does (Please refer to the + * documentation of clutter_actor_get_paint_volume() for more + * details.) and it additionally transforms the paint volume into the + * coordinate space of #relative_to_ancestor. (Or the stage if %NULL + * is passed for #relative_to_ancestor) + * + * This can be used by containers that base their paint volume on + * the volume of their children. Such containers can query the + * transformed paint volume of all of its children and union them + * together using clutter_paint_volume_union(). + * @param relative_to_ancestor A {@link Actor} that is an ancestor of #self + * (or %NULL for the stage) + * @returns a pointer to a {@link PaintVolume}, + * or %NULL if no volume could be determined. The returned pointer is + * not guaranteed to be valid across multiple frames; if you wish to + * keep it, you will have to copy it using {@link Clutter.PaintVolume.copy}. + */ + get_transformed_paint_volume(relative_to_ancestor: Actor): PaintVolume; + /** + * Gets the absolute position of an actor, in pixels relative to the stage. + * @returns return location for the X coordinate, or %NULL + * + * return location for the Y coordinate, or %NULL + */ + get_transformed_position(): [ x: number | null, y: number | null ]; + /** + * Gets the absolute size of an actor in pixels, taking into account the + * scaling factors. + * + * If the actor has a valid allocation, the allocated size will be used. + * If the actor has not a valid allocation then the preferred size will + * be transformed and returned. + * + * If you want the transformed allocation, see + * {@link Clutter.Actor.get_abs_allocation_vertices} instead. + * + * When the actor (or one of its ancestors) is rotated around the + * X or Y axis, it no longer appears as on the stage as a rectangle, but + * as a generic quadrangle; in that case this function returns the size + * of the smallest rectangle that encapsulates the entire quad. Please + * note that in this case no assumptions can be made about the relative + * position of this envelope to the absolute position of the actor, as + * returned by clutter_actor_get_transformed_position(); if you need this + * information, you need to use clutter_actor_get_abs_allocation_vertices() + * to get the coords of the actual quadrangle. + * @returns return location for the width, or %NULL + * + * return location for the height, or %NULL + */ + get_transformed_size(): [ width: number | null, height: number | null ]; + /** + * Retrieves the {@link Transition} of a #ClutterActor by using the + * transition #name. + * + * Transitions created for animatable properties use the name of the + * property itself, for instance the code below: + * + * |[ + * clutter_actor_set_easing_duration (actor, 1000); + * clutter_actor_set_rotation (actor, CLUTTER_Y_AXIS, 360.0, x, y, z); + * + * transition = clutter_actor_get_transition (actor, "rotation-angle-y"); + * g_signal_connect (transition, "stopped", + * G_CALLBACK (on_transition_stopped), + * actor); + * ]| + * + * will call the `on_transition_stopped` callback when the transition + * is finished. + * + * If you just want to get notifications of the completion of a transition, + * you should use the #ClutterActor::transition-stopped signal, using the + * transition name as the signal detail. + * @param name the name of the transition + * @returns a {@link Transition}, or %NULL is none + * was found to match the passed name; the returned instance is owned + * by Clutter and it should not be freed + */ + get_transition(name: string): Transition; + /** + * Retrieves the translation set using {@link Clutter.Actor.set_translation}. + * @returns return location for the X component + * of the translation, or %NULL + * + * return location for the Y component + * of the translation, or %NULL + * + * return location for the Z component + * of the translation, or %NULL + */ + get_translation(): [ translate_x: number | null, translate_y: number | null, translate_z: number | null ]; + /** + * Retrieves the width of a {@link Actor}. + * + * If the actor has a valid allocation, this function will return the + * width of the allocated area given to the actor. + * + * If the actor does not have a valid allocation, this function will + * return the actor's natural width, that is the preferred width of + * the actor. + * + * If you care whether you get the preferred width or the width that + * has been assigned to the actor, you should probably call a different + * function like {@link Clutter.Actor.get_allocation_box} to retrieve the + * allocated size or clutter_actor_get_preferred_width() to retrieve the + * preferred width. + * + * If an actor has a fixed width, for instance a width that has been + * assigned using clutter_actor_set_width(), the width returned will + * be the same value. + * @returns the width of the actor, in pixels + */ + get_width(): number; + /** + * Retrieves the X coordinate of a {@link Actor}. + * + * This function tries to "do what you mean", by returning the + * correct value depending on the actor's state. + * + * If the actor has a valid allocation, this function will return + * the X coordinate of the origin of the allocation box. + * + * If the actor has any fixed coordinate set using {@link Clutter.Actor.set_x}, + * clutter_actor_set_position() or clutter_actor_set_geometry(), this + * function will return that coordinate. + * + * If both the allocation and a fixed position are missing, this function + * will return 0. + * @returns the X coordinate, in pixels, ignoring any + * transformation (i.e. scaling, rotation) + */ + get_x(): number; + /** + * Retrieves the horizontal alignment policy set using + * {@link Clutter.Actor.set_x_align}. + * @returns the horizontal alignment policy. + */ + get_x_align(): ActorAlign; + /** + * Retrieves the value set with {@link Clutter.Actor.set_x_expand}. + * + * See also: clutter_actor_needs_expand() + * @returns %TRUE if the actor has been set to expand + */ + get_x_expand(): boolean; + /** + * Retrieves the Y coordinate of a {@link Actor}. + * + * This function tries to "do what you mean", by returning the + * correct value depending on the actor's state. + * + * If the actor has a valid allocation, this function will return + * the Y coordinate of the origin of the allocation box. + * + * If the actor has any fixed coordinate set using {@link Clutter.Actor.set_y}, + * clutter_actor_set_position() or clutter_actor_set_geometry(), this + * function will return that coordinate. + * + * If both the allocation and a fixed position are missing, this function + * will return 0. + * @returns the Y coordinate, in pixels, ignoring any + * transformation (i.e. scaling, rotation) + */ + get_y(): number; + /** + * Retrieves the vertical alignment policy set using + * {@link Clutter.Actor.set_y_align}. + * @returns the vertical alignment policy. + */ + get_y_align(): ActorAlign; + /** + * Retrieves the value set with {@link Clutter.Actor.set_y_expand}. + * + * See also: clutter_actor_needs_expand() + * @returns %TRUE if the actor has been set to expand + */ + get_y_expand(): boolean; + /** + * Retrieves the actor's position on the Z axis. + * @returns the position on the Z axis. + */ + get_z_position(): number; + /** + * @deprecated + * Use the {@link Actor.pivot_point} instead of + * a #ClutterGravity + * + * Retrieves the center for the rotation around the Z axis as a + * compass direction. If the center was specified in pixels or units + * this will return %CLUTTER_GRAVITY_NONE. + * @returns the Z rotation center + */ + get_z_rotation_gravity(): Gravity; + /** + * Sets the key focus of the {@link Stage} including #self + * to this #ClutterActor. + */ + grab_key_focus(): void; + /** + * Returns whether the actor has any actions applied. + * @returns %TRUE if the actor has any actions, + * %FALSE otherwise + */ + has_actions(): boolean; + /** + * Checks if the actor has an up-to-date allocation assigned to + * it. This means that the actor should have an allocation: it's + * visible and has a parent. It also means that there is no + * outstanding relayout request in progress for the actor or its + * children (There might be other outstanding layout requests in + * progress that will cause the actor to get a new allocation + * when the stage is laid out, however). + * + * If this function returns %FALSE, then the actor will normally + * be allocated before it is next drawn on the screen. + * @returns %TRUE if the actor has an up-to-date allocation + */ + has_allocation(): boolean; + /** + * Determines whether the actor has a clip area set or not. + * @returns %TRUE if the actor has a clip area set. + */ + has_clip(): boolean; + /** + * Returns whether the actor has any constraints applied. + * @returns %TRUE if the actor has any constraints, + * %FALSE otherwise + */ + has_constraints(): boolean; + /** + * Returns whether the actor has any effects applied. + * @returns %TRUE if the actor has any effects, + * %FALSE otherwise + */ + has_effects(): boolean; + /** + * Checks whether #self is the {@link Actor} that has key focus + * @returns %TRUE if the actor has key focus, and %FALSE otherwise + */ + has_key_focus(): boolean; + /** + * Asks the actor's implementation whether it may contain overlapping + * primitives. + * + * For example; Clutter may use this to determine whether the painting + * should be redirected to an offscreen buffer to correctly implement + * the opacity property. + * + * Custom actors can override the default response by implementing the + * {@link {@link ActorClass}.has.overlaps} virtual function. See + * clutter_actor_set_offscreen_redirect() for more information. + * @returns %TRUE if the actor may have overlapping primitives, and + * %FALSE otherwise + */ + has_overlaps(): boolean; + /** + * Checks whether an actor contains the pointer of a + * {@link InputDevice} + * @returns %TRUE if the actor contains the pointer, and + * %FALSE otherwise + */ + has_pointer(): boolean; + /** + * Flags an actor to be hidden. A hidden actor will not be + * rendered on the stage. + * + * Actors are visible by default. + * + * If this function is called on an actor without a parent, the + * {@link Actor.show_on_set_parent} property will be set to %FALSE + * as a side-effect. + */ + hide(): void; + /** + * @deprecated + * Using {@link Clutter.Actor.hide} on the actor will + * prevent its children from being painted as well. + * + * Calls {@link Clutter.Actor.hide} on all child actors (if any). + */ + hide_all(): void; + /** + * Inserts #child into the list of children of #self, above another + * child of #self or, if #sibling is %NULL, above all the children + * of #self. + * + * This function will acquire a reference on #child that will only + * be released when calling {@link Clutter.Actor.remove_child}. + * + * This function will not take into consideration the {@link Actor.depth} + * of #child. + * + * This function will emit the #ClutterContainer::actor-added signal + * on #self. + * @param child a {@link Actor} + * @param sibling a child of #self, or %NULL + */ + insert_child_above(child: Actor, sibling: Actor | null): void; + /** + * Inserts #child into the list of children of #self, using the + * given #index_. If #index_ is greater than the number of children + * in #self, or is less than 0, then the new child is added at the end. + * + * This function will acquire a reference on #child that will only + * be released when calling {@link Clutter.Actor.remove_child}. + * + * This function will not take into consideration the {@link Actor.depth} + * of #child. + * + * This function will emit the #ClutterContainer::actor-added signal + * on #self. + * @param child a {@link Actor} + * @param index_ the index + */ + insert_child_at_index(child: Actor, index_: number): void; + /** + * Inserts #child into the list of children of #self, below another + * child of #self or, if #sibling is %NULL, below all the children + * of #self. + * + * This function will acquire a reference on #child that will only + * be released when calling {@link Clutter.Actor.remove_child}. + * + * This function will not take into consideration the {@link Actor.depth} + * of #child. + * + * This function will emit the #ClutterContainer::actor-added signal + * on #self. + * @param child a {@link Actor} + * @param sibling a child of #self, or %NULL + */ + insert_child_below(child: Actor, sibling: Actor | null): void; + /** + * Checks whether #self is being currently painted by a {@link Clone} + * + * This function is useful only inside the ::paint virtual function + * implementations or within handlers for the #ClutterActor::paint + * signal + * + * This function should not be used by applications + * @returns %TRUE if the {@link Actor} is currently being painted + * by a #ClutterClone, and %FALSE otherwise + */ + is_in_clone_paint(): boolean; + /** + * Checks whether a {@link Actor} has been set as mapped. + * + * See also %CLUTTER_ACTOR_IS_MAPPED and #ClutterActor:mapped + * @returns %TRUE if the actor is mapped + */ + is_mapped(): boolean; + /** + * Checks whether a {@link Actor} is realized. + * + * See also %CLUTTER_ACTOR_IS_REALIZED and #ClutterActor:realized. + * @returns %TRUE if the actor is realized + */ + is_realized(): boolean; + /** + * Checks whether any rotation is applied to the actor. + * @returns %TRUE if the actor is rotated. + */ + is_rotated(): boolean; + /** + * Checks whether the actor is scaled in either dimension. + * @returns %TRUE if the actor is scaled. + */ + is_scaled(): boolean; + /** + * Checks whether an actor is marked as visible. + * + * See also %CLUTTER_ACTOR_IS_VISIBLE and {@link Actor.visible}. + * @returns %TRUE if the actor visible + */ + is_visible(): boolean; + /** + * @deprecated + * Use {@link Clutter.Actor.set_child_below_sibling} instead. + * + * Puts #self below #above. + * + * Both actors must have the same parent, and the parent must implement + * the {@link Container} interface. + * + * This function calls {@link Clutter.Container.lower_child} internally. + * @param above A {@link Actor} to lower below + */ + lower(above: Actor | null): void; + /** + * @deprecated + * Use {@link Clutter.Actor.set_child_below_sibling} with + * a %NULL sibling, instead. + * + * Lowers #self to the bottom. + * + * This function calls {@link Clutter.Actor.lower} internally. + */ + lower_bottom(): void; + /** + * Sets the %CLUTTER_ACTOR_MAPPED flag on the actor and possibly maps + * and realizes its children if they are visible. Does nothing if the + * actor is not visible. + * + * Calling this function is strongly disencouraged: the default + * implementation of {@link ActorClass}.map() will map all the children + * of an actor when mapping its parent. + * + * When overriding map, it is mandatory to chain up to the parent + * implementation. + */ + map(): void; + /** + * @deprecated + * Use {@link Actor.pivot_point} and + * {@link Clutter.Actor.set_translation} instead. + * + * Sets an anchor point for the actor, and adjusts the actor postion so that + * the relative position of the actor toward its parent remains the same. + * @param anchor_x X coordinate of the anchor point + * @param anchor_y Y coordinate of the anchor point + */ + move_anchor_point(anchor_x: number, anchor_y: number): void; + /** + * @deprecated + * Use {@link Actor.pivot_point} and + * {@link Clutter.Actor.set_translation} instead. + * + * Sets an anchor point on the actor based on the given gravity, adjusting the + * actor postion so that its relative position within its parent remains + * unchanged. + * + * Since version 1.0 the anchor point will be stored as a gravity so + * that if the actor changes size then the anchor point will move. For + * example, if you set the anchor point to %CLUTTER_GRAVITY_SOUTH_EAST + * and later double the size of the actor, the anchor point will move + * to the bottom right. + * @param gravity {@link Gravity}. + */ + move_anchor_point_from_gravity(gravity: Gravity): void; + /** + * Moves an actor by the specified distance relative to its current + * position in pixels. + * + * This function modifies the fixed position of an actor and thus removes + * it from any layout management. Another way to move an actor is with an + * anchor point, see {@link Clutter.Actor.set_anchor_point}, or with an additional + * translation, using clutter_actor_set_translation(). + * @param dx Distance to move Actor on X axis. + * @param dy Distance to move Actor on Y axis. + */ + move_by(dx: number, dy: number): void; + /** + * Checks whether an actor, or any of its children, is set to expand + * horizontally or vertically. + * + * This function should only be called by layout managers that can + * assign extra space to their children. + * + * If you want to know whether the actor was explicitly set to expand, + * use {@link Clutter.Actor.get_x_expand} or clutter_actor_get_y_expand(). + * @param orientation the direction of expansion + * @returns %TRUE if the actor should expand + */ + needs_expand(orientation: Orientation): boolean; + /** + * Renders the actor to display. + * + * This function should not be called directly by applications. + * Call {@link Clutter.Actor.queue_redraw} to queue paints, instead. + * + * This function is context-aware, and will either cause a + * regular paint or a pick paint. + * + * This function will emit the {@link Actor.paint} signal or + * the #ClutterActor::pick signal, depending on the context. + * + * This function does not paint the actor if the actor is set to 0, + * unless it is performing a pick paint. + */ + paint(): void; + /** + * @deprecated + * All children of an actor are accessible through + * the {@link Actor} API. This function is only useful for legacy + * containers overriding the default implementation of the + * #ClutterContainer interface. + * + * Disables the effects of {@link Clutter.Actor.push_internal}. + */ + pop_internal(): void; + /** + * @deprecated + * All children of an actor are accessible through + * the {@link Actor} API, and #ClutterActor implements the + * #ClutterContainer interface, so this function is only useful + * for legacy containers overriding the default implementation. + * + * Should be used by actors implementing the {@link Container} and with + * internal children added through {@link Clutter.Actor.set_parent}, for instance: + * + * |[ + * static void + * my_actor_init (MyActor *self) + * { + * self->priv = my_actor_get_instance_private (self); + * + * clutter_actor_push_internal (CLUTTER_ACTOR (self)); + * + * // calling clutter_actor_set_parent() now will result in + * // the internal flag being set on a child of MyActor + * + * // internal child - a background texture + * self->priv->background_tex = clutter_texture_new (); + * clutter_actor_set_parent (self->priv->background_tex, + * CLUTTER_ACTOR (self)); + * + * // internal child - a label + * self->priv->label = clutter_text_new (); + * clutter_actor_set_parent (self->priv->label, + * CLUTTER_ACTOR (self)); + * + * clutter_actor_pop_internal (CLUTTER_ACTOR (self)); + * + * // calling clutter_actor_set_parent() now will not result in + * // the internal flag being set on a child of MyActor + * } + * ]| + * + * This function will be used by Clutter to toggle an "internal child" + * flag whenever clutter_actor_set_parent() is called; internal children + * are handled differently by Clutter, specifically when destroying their + * parent. + * + * Call clutter_actor_pop_internal() when you finished adding internal + * children. + * + * Nested calls to clutter_actor_push_internal() are allowed, but each + * one must by followed by a clutter_actor_pop_internal() call. + */ + push_internal(): void; + /** + * Queues up a redraw of an actor and any children. The redraw occurs + * once the main loop becomes idle (after the current batch of events + * has been processed, roughly). + * + * Applications rarely need to call this, as redraws are handled + * automatically by modification functions. + * + * This function will not do anything if #self is not visible, or + * if the actor is inside an invisible part of the scenegraph. + * + * Also be aware that painting is a NOP for actors with an opacity of + * 0 + * + * When you are implementing a custom actor you must queue a redraw + * whenever some private state changes that will affect painting or + * picking of your actor. + */ + queue_redraw(): void; + /** + * Queues a redraw on #self limited to a specific, actor-relative + * rectangular area. + * + * If #clip is %NULL this function is equivalent to + * {@link Clutter.Actor.queue_redraw}. + * @param clip a rectangular clip region, or %NULL + */ + queue_redraw_with_clip(clip: cairo.RectangleInt | null): void; + /** + * Indicates that the actor's size request or other layout-affecting + * properties may have changed. This function is used inside {@link Actor} + * subclass implementations, not by applications directly. + * + * Queueing a new layout automatically queues a redraw as well. + */ + queue_relayout(): void; + /** + * @deprecated + * Use {@link Clutter.Actor.set_child_above_sibling} instead. + * + * Puts #self above #below. + * + * Both actors must have the same parent, and the parent must implement + * the {@link Container} interface + * + * This function calls {@link Clutter.Container.raise_child} internally. + * @param below A {@link Actor} to raise above. + */ + raise(below: Actor | null): void; + /** + * @deprecated + * Use {@link Clutter.Actor.set_child_above_sibling} with + * a %NULL sibling, instead. + * + * Raises #self to the top. + * + * This function calls {@link Clutter.Actor.raise} internally. + */ + raise_top(): void; + /** + * @deprecated + * Actors are automatically realized, and nothing + * requires explicit realization. + * + * Realization informs the actor that it is attached to a stage. It + * can use this to allocate resources if it wanted to delay allocation + * until it would be rendered. However it is perfectly acceptable for + * an actor to create resources before being realized because Clutter + * only ever has a single rendering context so that actor is free to + * be moved from one stage to another. + * + * This function does nothing if the actor is already realized. + * + * Because a realized actor must have realized parent actors, calling + * {@link Clutter.Actor.realize} will also realize all parents of the actor. + * + * This function does not realize child actors, except in the special + * case that realizing the stage, when the stage is visible, will + * suddenly map (and thus realize) the children of the stage. + */ + realize(): void; + /** + * Removes #action from the list of actions applied to #self + * + * The reference held by #self on the {@link Action} will be released + * @param action a {@link Action} + */ + remove_action(action: Action): void; + /** + * Removes the {@link Action} with the given name from the list + * of actions applied to #self + * @param name the name of the action to remove + */ + remove_action_by_name(name: string): void; + /** + * Removes all children of #self. + * + * This function releases the reference added by inserting a child actor + * in the list of children of #self. + * + * If the reference count of a child drops to zero, the child will be + * destroyed. If you want to ensure the destruction of all the children + * of #self, use {@link Clutter.Actor.destroy_all_children}. + */ + remove_all_children(): void; + /** + * Removes all transitions associated to #self. + */ + remove_all_transitions(): void; + /** + * Removes #child from the children of #self. + * + * This function will release the reference added by + * {@link Clutter.Actor.add_child}, so if you want to keep using #child + * you will have to acquire a referenced on it before calling this + * function. + * + * This function will emit the {@link Container.actor_removed} + * signal on #self. + * @param child a {@link Actor} + */ + remove_child(child: Actor): void; + /** + * Removes clip area from #self. + */ + remove_clip(): void; + /** + * Removes #constraint from the list of constraints applied to #self + * + * The reference held by #self on the {@link Constraint} will be released + * @param constraint a {@link Constraint} + */ + remove_constraint(constraint: Constraint): void; + /** + * Removes the {@link Constraint} with the given name from the list + * of constraints applied to #self + * @param name the name of the constraint to remove + */ + remove_constraint_by_name(name: string): void; + /** + * Removes #effect from the list of effects applied to #self + * + * The reference held by #self on the {@link Effect} will be released + * @param effect a {@link Effect} + */ + remove_effect(effect: Effect): void; + /** + * Removes the {@link Effect} with the given name from the list + * of effects applied to #self + * @param name the name of the effect to remove + */ + remove_effect_by_name(name: string): void; + /** + * Removes the transition stored inside a {@link Actor} using #name + * identifier. + * + * If the transition is currently in progress, it will be stopped. + * + * This function releases the reference acquired when the transition + * was added to the #ClutterActor. + * @param name the name of the transition to remove + */ + remove_transition(name: string): void; + /** + * @deprecated + * Use {@link Clutter.Actor.remove_child} and + * clutter_actor_add_child() instead; remember to take a reference on + * the actor being removed before calling clutter_actor_remove_child() + * to avoid the reference count dropping to zero and the actor being + * destroyed. + * + * Resets the parent actor of #self. + * + * This function is logically equivalent to calling {@link Clutter.Actor.unparent} + * and clutter_actor_set_parent(), but more efficiently implemented, as it + * ensures the child is not finalized when unparented, and emits the + * {@link Actor.parent_set} signal only once. + * + * In reality, calling this function is less useful than it sounds, as some + * application code may rely on changes in the intermediate state between + * removal and addition of the actor from its old parent to the #new_parent. + * Thus, it is strongly encouraged to avoid using this function in application + * code. + * @param new_parent the new {@link Actor} parent + */ + reparent(new_parent: Actor): void; + /** + * Replaces #old_child with #new_child in the list of children of #self. + * @param old_child the child of #self to replace + * @param new_child the {@link Actor} to replace #old_child + */ + replace_child(old_child: Actor, new_child: Actor): void; + /** + * Restores the easing state as it was prior to a call to + * {@link Clutter.Actor.save_easing_state}. + */ + restore_easing_state(): void; + /** + * Saves the current easing state for animatable properties, and creates + * a new state with the default values for easing mode and duration. + * + * New transitions created after calling this function will inherit the + * duration, easing mode, and delay of the new easing state; this also + * applies to transitions modified in flight. + */ + save_easing_state(): void; + /** + * Stores the allocation of #self as defined by #box. + * + * This function can only be called from within the implementation of + * the {@link ActorClass}.allocate() virtual function. + * + * The allocation should have been adjusted to take into account constraints, + * alignment, and margin properties. If you are implementing a #ClutterActor + * subclass that provides its own layout management policy for its children + * instead of using a #ClutterLayoutManager delegate, you should not call + * this function on the children of #self; instead, you should call + * clutter_actor_allocate(), which will adjust the allocation box for + * you. + * + * This function should only be used by subclasses of #ClutterActor + * that wish to store their allocation but cannot chain up to the + * parent's implementation; the default implementation of the + * #ClutterActorClass.allocate() virtual function will call this + * function. + * + * It is important to note that, while chaining up was the recommended + * behaviour for #ClutterActor subclasses prior to the introduction of + * this function, it is recommended to call clutter_actor_set_allocation() + * instead. + * + * If the #ClutterActor is using a #ClutterLayoutManager delegate object + * to handle the allocation of its children, this function will call + * the clutter_layout_manager_allocate() function only if the + * %CLUTTER_DELEGATE_LAYOUT flag is set on #flags, otherwise it is + * expected that the subclass will call clutter_layout_manager_allocate() + * by itself. For instance, the following code: + * + * |[ + * static void + * my_actor_allocate (ClutterActor *actor, + * const ClutterActorBox *allocation, + * ClutterAllocationFlags flags) + * { + * ClutterActorBox new_alloc; + * ClutterAllocationFlags new_flags; + * + * adjust_allocation (allocation, &new_alloc); + * + * new_flags = flags | CLUTTER_DELEGATE_LAYOUT; + * + * // this will use the layout manager set on the actor + * clutter_actor_set_allocation (actor, &new_alloc, new_flags); + * } + * ]| + * + * is equivalent to this: + * + * |[ + * static void + * my_actor_allocate (ClutterActor *actor, + * const ClutterActorBox *allocation, + * ClutterAllocationFlags flags) + * { + * ClutterLayoutManager *layout; + * ClutterActorBox new_alloc; + * + * adjust_allocation (allocation, &new_alloc); + * + * clutter_actor_set_allocation (actor, &new_alloc, flags); + * + * layout = clutter_actor_get_layout_manager (actor); + * clutter_layout_manager_allocate (layout, + * CLUTTER_CONTAINER (actor), + * &new_alloc, + * flags); + * } + * ]| + * @param box a {@link ActorBox} + * @param flags allocation flags + */ + set_allocation(box: ActorBox, flags: AllocationFlags): void; + /** + * @deprecated + * Use {@link Actor.pivot_point} instead. + * + * Sets an anchor point for #self. The anchor point is a point in the + * coordinate space of an actor to which the actor position within its + * parent is relative; the default is (0, 0), i.e. the top-left corner + * of the actor. + * @param anchor_x X coordinate of the anchor point + * @param anchor_y Y coordinate of the anchor point + */ + set_anchor_point(anchor_x: number, anchor_y: number): void; + /** + * @deprecated + * Use {@link Actor.pivot_point} and + * {@link Clutter.Actor.set_translation} instead. E.g. For %CLUTTER_GRAVITY_CENTER set + * pivot_point to (0.5,0.5) and the translation to (width/2,height/2). + * + * Sets an anchor point on the actor, based on the given gravity (this is a + * convenience function wrapping {@link Clutter.Actor.set_anchor_point}). + * + * Since version 1.0 the anchor point will be stored as a gravity so + * that if the actor changes size then the anchor point will move. For + * example, if you set the anchor point to %CLUTTER_GRAVITY_SOUTH_EAST + * and later double the size of the actor, the anchor point will move + * to the bottom right. + * @param gravity {@link Gravity}. + */ + set_anchor_point_from_gravity(gravity: Gravity): void; + /** + * Sets the background color of a {@link Actor}. + * + * The background color will be used to cover the whole allocation of the + * actor. The default background color of an actor is transparent. + * + * To check whether an actor has a background color, you can use the + * #ClutterActor:background-color-set actor property. + * + * The #ClutterActor:background-color property is animatable. + * @param color a {@link Color}, or %NULL to unset a previously + * set color + */ + set_background_color(color: Color | null): void; + /** + * Sets #child to be above #sibling in the list of children of #self. + * + * If #sibling is %NULL, #child will be the new last child of #self. + * + * This function is logically equivalent to removing #child and using + * {@link Clutter.Actor.insert_child_above}, but it will not emit signals + * or change state on #child. + * @param child a {@link Actor} child of #self + * @param sibling a {@link Actor} child of #self, or %NULL + */ + set_child_above_sibling(child: Actor, sibling: Actor | null): void; + /** + * Changes the index of #child in the list of children of #self. + * + * This function is logically equivalent to removing #child and + * calling {@link Clutter.Actor.insert_child_at_index}, but it will not + * emit signals or change state on #child. + * @param child a {@link Actor} child of #self + * @param index_ the new index for #child + */ + set_child_at_index(child: Actor, index_: number): void; + /** + * Sets #child to be below #sibling in the list of children of #self. + * + * If #sibling is %NULL, #child will be the new first child of #self. + * + * This function is logically equivalent to removing #self and using + * {@link Clutter.Actor.insert_child_below}, but it will not emit signals + * or change state on #child. + * @param child a {@link Actor} child of #self + * @param sibling a {@link Actor} child of #self, or %NULL + */ + set_child_below_sibling(child: Actor, sibling: Actor | null): void; + /** + * Sets the transformation matrix to be applied to all the children + * of #self prior to their own transformations. The default child + * transformation is the identity matrix. + * + * If #transform is %NULL, the child transform will be unset. + * + * The {@link Actor.child_transform} property is animatable. + * @param transform a {@link Matrix}, or %NULL + */ + set_child_transform(transform: Matrix | null): void; + /** + * Sets clip area for #self. The clip area is always computed from the + * upper left corner of the actor, even if the anchor point is set + * otherwise. + * @param xoff X offset of the clip rectangle + * @param yoff Y offset of the clip rectangle + * @param width Width of the clip rectangle + * @param height Height of the clip rectangle + */ + set_clip(xoff: number, yoff: number, width: number, height: number): void; + /** + * Sets whether #self should be clipped to the same size as its + * allocation + * @param clip_set %TRUE to apply a clip tracking the allocation + */ + set_clip_to_allocation(clip_set: boolean): void; + /** + * Sets the contents of a {@link Actor}. + * @param content a {@link Content}, or %NULL + */ + set_content(content: Content | null): void; + /** + * Sets the gravity of the {@link Content} used by #self. + * + * See the description of the #ClutterActor:content-gravity property for + * more information. + * + * The #ClutterActor:content-gravity property is animatable. + * @param gravity the {@link ContentGravity} + */ + set_content_gravity(gravity: ContentGravity): void; + /** + * Sets the policy for repeating the {@link Actor.content} of a + * #ClutterActor. The behaviour is deferred to the #ClutterContent + * implementation. + * @param repeat the repeat policy + */ + set_content_repeat(repeat: ContentRepeat): void; + /** + * Sets the minification and magnification filter to be applied when + * scaling the {@link Actor.content} of a #ClutterActor. + * + * The #ClutterActor:minification-filter will be used when reducing + * the size of the content; the #ClutterActor:magnification-filter + * will be used when increasing the size of the content. + * @param min_filter the minification filter for the content + * @param mag_filter the magnification filter for the content + */ + set_content_scaling_filters(min_filter: ScalingFilter, mag_filter: ScalingFilter): void; + /** + * @deprecated + * Use {@link Clutter.Actor.set_z_position} instead. + * + * Sets the Z coordinate of #self to #depth. + * + * The unit used by #depth is dependant on the perspective setup. See + * also {@link Clutter.Stage.set_perspective}. + * @param depth Z co-ord + */ + set_depth(depth: number): void; + /** + * Sets the delay that should be applied before tweening animatable + * properties. + * @param msecs the delay before the start of the tweening, in milliseconds + */ + set_easing_delay(msecs: number): void; + /** + * Sets the duration of the tweening for animatable properties + * of #self for the current easing state. + * @param msecs the duration of the easing, or %NULL + */ + set_easing_duration(msecs: number): void; + /** + * Sets the easing mode for the tweening of animatable properties + * of #self. + * @param mode an easing mode, excluding %CLUTTER_CUSTOM_MODE + */ + set_easing_mode(mode: AnimationMode): void; + /** + * Sets whether an actor has a fixed position set (and will thus be + * unaffected by any layout manager). + * @param is_set whether to use fixed position + */ + set_fixed_position_set(is_set: boolean): void; + /** + * Sets #flags on #self + * + * This function will emit notifications for the changed properties + * @param flags the flags to set + */ + set_flags(flags: ActorFlags): void; + /** + * @deprecated + * Use {@link Clutter.Actor.set_position} and + * clutter_actor_set_size() instead. + * + * Sets the actor's fixed position and forces its minimum and natural + * size, in pixels. This means the untransformed actor will have the + * given geometry. This is the same as calling {@link Clutter.Actor.set_position} + * and clutter_actor_set_size(). + * @param geometry A {@link Geometry} + */ + set_geometry(geometry: Geometry): void; + /** + * Forces a height on an actor, causing the actor's preferred width + * and height (if any) to be ignored. + * + * If #height is -1 the actor will use its preferred height instead of + * overriding it, i.e. you can "unset" the height with -1. + * + * This function sets both the minimum and natural size of the actor. + * @param height Requested new height for the actor, in pixels, or -1 + */ + set_height(height: number): void; + /** + * Sets the {@link LayoutManager} delegate object that will be used to + * lay out the children of #self. + * + * The #ClutterActor will take a reference on the passed #manager which + * will be released either when the layout manager is removed, or when + * the actor is destroyed. + * @param manager a {@link LayoutManager}, or %NULL to unset it + */ + set_layout_manager(manager: LayoutManager | null): void; + /** + * Sets all the components of the margin of a {@link Actor}. + * @param margin a {@link Margin} + */ + set_margin(margin: Margin): void; + /** + * Sets the margin from the bottom of a {@link Actor}. + * + * The #ClutterActor:margin-bottom property is animatable. + * @param margin the bottom margin + */ + set_margin_bottom(margin: number): void; + /** + * Sets the margin from the left of a {@link Actor}. + * + * The #ClutterActor:margin-left property is animatable. + * @param margin the left margin + */ + set_margin_left(margin: number): void; + /** + * Sets the margin from the right of a {@link Actor}. + * + * The #ClutterActor:margin-right property is animatable. + * @param margin the right margin + */ + set_margin_right(margin: number): void; + /** + * Sets the margin from the top of a {@link Actor}. + * + * The #ClutterActor:margin-top property is animatable. + * @param margin the top margin + */ + set_margin_top(margin: number): void; + /** + * Sets the given name to #self. The name can be used to identify + * a {@link Actor}. + * @param name Textual tag to apply to actor + */ + set_name(name: string): void; + /** + * Defines the circumstances where the actor should be redirected into + * an offscreen image. The offscreen image is used to flatten the + * actor into a single image while painting for two main reasons. + * Firstly, when the actor is painted a second time without any of its + * contents changing it can simply repaint the cached image without + * descending further down the actor hierarchy. Secondly, it will make + * the opacity look correct even if there are overlapping primitives + * in the actor. + * + * Caching the actor could in some cases be a performance win and in + * some cases be a performance lose so it is important to determine + * which value is right for an actor before modifying this value. For + * example, there is never any reason to flatten an actor that is just + * a single texture (such as a {@link Texture}) because it is + * effectively already cached in an image so the offscreen would be + * redundant. Also if the actor contains primitives that are far apart + * with a large transparent area in the middle (such as a large + * CluterGroup with a small actor in the top left and a small actor in + * the bottom right) then the cached image will contain the entire + * image of the large area and the paint will waste time blending all + * of the transparent pixels in the middle. + * + * The default method of implementing opacity on a container simply + * forwards on the opacity to all of the children. If the children are + * overlapping then it will appear as if they are two separate glassy + * objects and there will be a break in the color where they + * overlap. By redirecting to an offscreen buffer it will be as if the + * two opaque objects are combined into one and then made transparent + * which is usually what is expected. + * + * The image below demonstrates the difference between redirecting and + * not. The image shows two Clutter groups, each containing a red and + * a green rectangle which overlap. The opacity on the group is set to + * 128 (which is 50%). When the offscreen redirect is not used, the + * red rectangle can be seen through the blue rectangle as if the two + * rectangles were separately transparent. When the redirect is used + * the group as a whole is transparent instead so the red rectangle is + * not visible where they overlap. + * + *
+ * Sample of using an offscreen redirect for transparency + * + *
+ * + * The default value for this property is 0, so we effectively will + * never redirect an actor offscreen by default. This means that there + * are times that transparent actors may look glassy as described + * above. The reason this is the default is because there is a + * performance trade off between quality and performance here. In many + * cases the default form of glassy opacity looks good enough, but if + * it's not you will need to set the + * %CLUTTER_OFFSCREEN_REDIRECT_AUTOMATIC_FOR_OPACITY flag to enable + * redirection for opacity. + * + * Custom actors that don't contain any overlapping primitives are + * recommended to override the {@link Has.overlaps} virtual to return %FALSE + * for maximum efficiency. + * @param redirect New offscreen redirect flags for the actor. + */ + set_offscreen_redirect(redirect: OffscreenRedirect): void; + /** + * Sets the actor's opacity, with zero being completely transparent and + * 255 (0xff) being fully opaque. + * + * The {@link Actor.opacity} property is animatable. + * @param opacity New opacity value for the actor. + */ + set_opacity(opacity: number): void; + /** + * @deprecated + * Use {@link Clutter.Actor.add_child} instead. + * + * Sets the parent of #self to #parent. + * + * This function will result in #parent acquiring a reference on #self, + * eventually by sinking its floating reference first. The reference + * will be released by {@link Clutter.Actor.unparent}. + * + * This function should only be called by legacy {@link Actor}s + * implementing the #ClutterContainer interface. + * @param parent A new {@link Actor} parent + */ + set_parent(parent: Actor): void; + /** + * Sets the position of the {@link Actor.pivot_point} around which the + * scaling and rotation transformations occur. + * + * The pivot point's coordinates are in normalized space, with the (0, 0) + * point being the top left corner of the actor, and the (1, 1) point being + * the bottom right corner. + * @param pivot_x the normalized X coordinate of the pivot point + * @param pivot_y the normalized Y coordinate of the pivot point + */ + set_pivot_point(pivot_x: number, pivot_y: number): void; + /** + * Sets the component on the Z axis of the {@link Actor.pivot_point} around + * which the scaling and rotation transformations occur. + * + * The #pivot_z value is expressed as a distance along the Z axis. + * @param pivot_z the Z coordinate of the actor's pivot point + */ + set_pivot_point_z(pivot_z: number): void; + /** + * Sets the actor's fixed position in pixels relative to any parent + * actor. + * + * If a layout manager is in use, this position will override the + * layout manager and force a fixed position. + * @param x New left position of actor in pixels. + * @param y New top position of actor in pixels. + */ + set_position(x: number, y: number): void; + /** + * Sets #actor as reactive. Reactive actors will receive events. + * @param reactive whether the actor should be reactive to events + */ + set_reactive(reactive: boolean): void; + /** + * Sets the geometry request mode of #self. + * + * The #mode determines the order for invoking + * {@link Clutter.Actor.get_preferred_width} and + * clutter_actor_get_preferred_height() + * @param mode the request mode + */ + set_request_mode(mode: RequestMode): void; + /** + * @deprecated + * Use {@link Clutter.Actor.set_rotation_angle} and + * clutter_actor_set_pivot_point() instead. + * + * Sets the rotation angle of #self around the given axis. + * + * The rotation center coordinates used depend on the value of #axis: + * + * - %CLUTTER_X_AXIS requires #y and #z + * - %CLUTTER_Y_AXIS requires #x and #z + * - %CLUTTER_Z_AXIS requires #x and #y + * + * The rotation coordinates are relative to the anchor point of the + * actor, set using {@link Clutter.Actor.set_anchor_point}. If no anchor + * point is set, the upper left corner is assumed as the origin. + * @param axis the axis of rotation + * @param angle the angle of rotation + * @param x X coordinate of the rotation center + * @param y Y coordinate of the rotation center + * @param z Z coordinate of the rotation center + */ + set_rotation(axis: RotateAxis, angle: number, x: number, y: number, z: number): void; + /** + * Sets the #angle of rotation of a {@link Actor} on the given #axis. + * + * This function is a convenience for setting the rotation properties + * #ClutterActor:rotation-angle-x, #ClutterActor:rotation-angle-y, + * and #ClutterActor:rotation-angle-z. + * + * The center of rotation is established by the #ClutterActor:pivot-point + * property. + * @param axis the axis to set the angle one + * @param angle the angle of rotation, in degrees + */ + set_rotation_angle(axis: RotateAxis, angle: number): void; + /** + * Scales an actor with the given factors. + * + * The scale transformation is relative the the {@link Actor.pivot_point}. + * + * The #ClutterActor:scale-x and #ClutterActor:scale-y properties are + * animatable. + * @param scale_x double factor to scale actor by horizontally. + * @param scale_y double factor to scale actor by vertically. + */ + set_scale(scale_x: number, scale_y: number): void; + /** + * @deprecated + * Use {@link Clutter.Actor.set_pivot_point} to control + * the scale center + * + * Scales an actor with the given factors around the given center + * point. The center point is specified in pixels relative to the + * anchor point (usually the top left corner of the actor). + * + * The {@link Actor.scale_x} and #ClutterActor:scale-y properties + * are animatable. + * @param scale_x double factor to scale actor by horizontally. + * @param scale_y double factor to scale actor by vertically. + * @param center_x X coordinate of the center of the scaling + * @param center_y Y coordinate of the center of the scaling + */ + set_scale_full(scale_x: number, scale_y: number, center_x: number, center_y: number): void; + /** + * @deprecated + * Use {@link Clutter.Actor.set_pivot_point} to set the + * scale center using normalized coordinates instead. + * + * Scales an actor with the given factors around the given + * center point. The center point is specified as one of the compass + * directions in {@link Gravity}. For example, setting it to north + * will cause the top of the actor to remain unchanged and the rest of + * the actor to expand left, right and downwards. + * + * The #ClutterActor:scale-x and #ClutterActor:scale-y properties are + * animatable. + * @param scale_x double factor to scale actor by horizontally. + * @param scale_y double factor to scale actor by vertically. + * @param gravity the location of the scale center expressed as a compass + * direction. + */ + set_scale_with_gravity(scale_x: number, scale_y: number, gravity: Gravity): void; + /** + * Scales an actor on the Z axis by the given #scale_z factor. + * + * The scale transformation is relative the the {@link Actor.pivot_point}. + * + * The #ClutterActor:scale-z property is animatable. + * @param scale_z the scaling factor along the Z axis + */ + set_scale_z(scale_z: number): void; + /** + * @deprecated + * Use {@link ShaderEffect} and + * {@link Clutter.Actor.add_effect} instead. + * + * Sets the {@link Shader} to be used when rendering #self. + * + * If #shader is %NULL this function will unset any currently set shader + * for the actor. + * + * Any #ClutterEffect applied to #self will take the precedence + * over the #ClutterShader set using this function. + * @param shader a {@link Shader} or %NULL to unset the shader. + * @returns %TRUE if the shader was successfully applied + * or removed + */ + set_shader(shader: Shader | null): boolean; + /** + * @deprecated + * Use {@link Clutter.ShaderEffect.set_uniform_value} instead + * + * Sets the value for a named parameter of the shader applied + * to #actor. + * @param param the name of the parameter + * @param value the value of the parameter + */ + set_shader_param(param: string, value: GObject.Value): void; + /** + * @deprecated + * Use {@link Clutter.ShaderEffect.set_uniform} instead + * + * Sets the value for a named float parameter of the shader applied + * to #actor. + * @param param the name of the parameter + * @param value the value of the parameter + */ + set_shader_param_float(param: string, value: number): void; + /** + * @deprecated + * Use {@link Clutter.ShaderEffect.set_uniform} instead + * + * Sets the value for a named int parameter of the shader applied to + * #actor. + * @param param the name of the parameter + * @param value the value of the parameter + */ + set_shader_param_int(param: string, value: number): void; + /** + * Sets the actor's size request in pixels. This overrides any + * "normal" size request the actor would have. For example + * a text actor might normally request the size of the text; + * this function would force a specific size instead. + * + * If #width and/or #height are -1 the actor will use its + * "normal" size request instead of overriding it, i.e. + * you can "unset" the size with -1. + * + * This function sets or unsets both the minimum and natural size. + * @param width New width of actor in pixels, or -1 + * @param height New height of actor in pixels, or -1 + */ + set_size(width: number, height: number): void; + /** + * Sets the {@link TextDirection} for an actor + * + * The passed text direction must not be %CLUTTER_TEXT_DIRECTION_DEFAULT + * + * If #self implements #ClutterContainer then this function will recurse + * inside all the children of #self (including the internal ones). + * + * Composite actors not implementing #ClutterContainer, or actors requiring + * special handling when the text direction changes, should connect to + * the #GObject::notify signal for the #ClutterActor:text-direction property + * @param text_dir the text direction for #self + */ + set_text_direction(text_dir: TextDirection): void; + /** + * Overrides the transformations of a {@link Actor} with a custom + * matrix, which will be applied relative to the origin of the + * actor's allocation and to the actor's pivot point. + * + * The #ClutterActor:transform property is animatable. + * @param transform a {@link Matrix}, or %NULL to + * unset a custom transformation + */ + set_transform(transform: Matrix | null): void; + /** + * Sets an additional translation transformation on a {@link Actor}, + * relative to the #ClutterActor:pivot-point. + * @param translate_x the translation along the X axis + * @param translate_y the translation along the Y axis + * @param translate_z the translation along the Z axis + */ + set_translation(translate_x: number, translate_y: number, translate_z: number): void; + /** + * Forces a width on an actor, causing the actor's preferred width + * and height (if any) to be ignored. + * + * If #width is -1 the actor will use its preferred width request + * instead of overriding it, i.e. you can "unset" the width with -1. + * + * This function sets both the minimum and natural size of the actor. + * @param width Requested new width for the actor, in pixels, or -1 + */ + set_width(width: number): void; + /** + * Sets the actor's X coordinate, relative to its parent, in pixels. + * + * Overrides any layout manager and forces a fixed position for + * the actor. + * + * The {@link Actor.x} property is animatable. + * @param x the actor's position on the X axis + */ + set_x(x: number): void; + /** + * Sets the horizontal alignment policy of a {@link Actor}, in case the + * actor received extra horizontal space. + * + * See also the #ClutterActor:x-align property. + * @param x_align the horizontal alignment policy + */ + set_x_align(x_align: ActorAlign): void; + /** + * Sets whether a {@link Actor} should expand horizontally; this means + * that layout manager should allocate extra space for the actor, if + * possible. + * + * Setting an actor to expand will also make all its parent expand, so + * that it's possible to build an actor tree and only set this flag on + * its leaves and not on every single actor. + * @param expand whether the actor should expand horizontally + */ + set_x_expand(expand: boolean): void; + /** + * Sets the actor's Y coordinate, relative to its parent, in pixels.# + * + * Overrides any layout manager and forces a fixed position for + * the actor. + * + * The {@link Actor.y} property is animatable. + * @param y the actor's position on the Y axis + */ + set_y(y: number): void; + /** + * Sets the vertical alignment policy of a {@link Actor}, in case the + * actor received extra vertical space. + * + * See also the #ClutterActor:y-align property. + * @param y_align the vertical alignment policy + */ + set_y_align(y_align: ActorAlign): void; + /** + * Sets whether a {@link Actor} should expand horizontally; this means + * that layout manager should allocate extra space for the actor, if + * possible. + * + * Setting an actor to expand will also make all its parent expand, so + * that it's possible to build an actor tree and only set this flag on + * its leaves and not on every single actor. + * @param expand whether the actor should expand vertically + */ + set_y_expand(expand: boolean): void; + /** + * Sets the actor's position on the Z axis. + * + * See {@link Actor.z_position}. + * @param z_position the position on the Z axis + */ + set_z_position(z_position: number): void; + /** + * @deprecated + * Use {@link Clutter.Actor.set_rotation_angle} and + * clutter_actor_set_pivot_point() instead. + * + * Sets the rotation angle of #self around the Z axis using the center + * point specified as a compass point. For example to rotate such that + * the center of the actor remains static you can use + * %CLUTTER_GRAVITY_CENTER. If the actor changes size the center point + * will move accordingly. + * @param angle the angle of rotation + * @param gravity the center point of the rotation + */ + set_z_rotation_from_gravity(angle: number, gravity: Gravity): void; + /** + * Should be called inside the implementation of the + * {@link Actor.pick} virtual function in order to check whether + * the actor should paint itself in pick mode or not. + * + * This function should never be called directly by applications. + * @returns %TRUE if the actor should paint its silhouette, + * %FALSE otherwise + */ + should_pick_paint(): boolean; + /** + * Flags an actor to be displayed. An actor that isn't shown will not + * be rendered on the stage. + * + * Actors are visible by default. + * + * If this function is called on an actor without a parent, the + * {@link Actor.show_on_set_parent} will be set to %TRUE as a side + * effect. + */ + show(): void; + /** + * @deprecated + * Actors are visible by default + * + * Calls {@link Clutter.Actor.show} on all children of an actor (if any). + */ + show_all(): void; + /** + * This function translates screen coordinates (#x, #y) to + * coordinates relative to the actor. For example, it can be used to translate + * screen events from global screen coordinates into actor-local coordinates. + * + * The conversion can fail, notably if the transform stack results in the + * actor being projected on the screen as a mere line. + * + * The conversion should not be expected to be pixel-perfect due to the + * nature of the operation. In general the error grows when the skewing + * of the actor rectangle on screen increases. + * + * This function can be computationally intensive. + * + * This function only works when the allocation is up-to-date, i.e. inside of + * the {@link ActorClass}.paint() implementation + * @param x x screen coordinate of the point to unproject + * @param y y screen coordinate of the point to unproject + * @returns %TRUE if conversion was successful. + * + * return location for the unprojected x coordinance + * + * return location for the unprojected y coordinance + */ + transform_stage_point(x: number, y: number): [ boolean, number, number ]; + /** + * Unsets the %CLUTTER_ACTOR_MAPPED flag on the actor and possibly + * unmaps its children if they were mapped. + * + * Calling this function is not encouraged: the default {@link Actor} + * implementation of #ClutterActorClass.unmap() will also unmap any + * eventual children by default when their parent is unmapped. + * + * When overriding #ClutterActorClass.unmap(), it is mandatory to + * chain up to the parent implementation. + * + * It is important to note that the implementation of the + * #ClutterActorClass.unmap() virtual function may be called after + * the #ClutterActorClass.destroy() or the #GObjectClass.dispose() + * implementation, but it is guaranteed to be called before the + * #GObjectClass.finalize() implementation. + */ + unmap(): void; + /** + * @deprecated + * Use {@link Clutter.Actor.remove_child} instead. + * + * Removes the parent of #self. + * + * This will cause the parent of #self to release the reference + * acquired when calling {@link Clutter.Actor.set_parent}, so if you + * want to keep #self you will have to acquire a reference of + * your own, through g_object_ref(). + * + * This function should only be called by legacy {@link Actor}s + * implementing the #ClutterContainer interface. + */ + unparent(): void; + /** + * @deprecated + * Actors are automatically unrealized, and nothing + * requires explicit realization. + * + * Unrealization informs the actor that it may be being destroyed or + * moved to another stage. The actor may want to destroy any + * underlying graphics resources at this point. However it is + * perfectly acceptable for it to retain the resources until the actor + * is destroyed because Clutter only ever uses a single rendering + * context and all of the graphics resources are valid on any stage. + * + * Because mapped actors must be realized, actors may not be + * unrealized if they are mapped. This function hides the actor to be + * sure it isn't mapped, an application-visible side effect that you + * may not be expecting. + * + * This function should not be called by application code. + * + * This function should not really be in the public API, because + * there isn't a good reason to call it. ClutterActor will already + * unrealize things for you when it's important to do so. + * + * If you were using {@link Clutter.Actor.unrealize} in a dispose + * implementation, then don't, just chain up to ClutterActor's + * dispose. + * + * If you were using clutter_actor_unrealize() to implement + * unrealizing children of your container, then don't, ClutterActor + * will already take care of that. + */ + unrealize(): void; + /** + * Unsets #flags on #self + * + * This function will emit notifications for the changed properties + * @param flags the flags to unset + */ + unset_flags(flags: ActorFlags): void; + /** + * The ::allocation-changed signal is emitted when the + * {@link Actor.allocation} property changes. Usually, application + * code should just use the notifications for the :allocation property + * but if you want to track the allocation flags as well, for instance + * to know whether the absolute origin of #actor changed, then you might + * want use this signal instead. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - box: a {@link ActorBox} with the new allocation + * - flags: #ClutterAllocationFlags for the allocation + * + * @returns Callback ID + */ + connect(signal: "allocation-changed", callback: (owner: this, box: ActorBox, flags: AllocationFlags) => void): number; + /** + * The ::button-press-event signal is emitted each time a mouse button + * is pressed on #actor. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - event: a {@link ButtonEvent} + * - returns %TRUE if the event has been handled by the actor, + * or %FALSE to continue the emission. + * + * @returns Callback ID + */ + connect(signal: "button-press-event", callback: (owner: this, event: ButtonEvent) => boolean): number; + /** + * The ::button-release-event signal is emitted each time a mouse button + * is released on #actor. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - event: a {@link ButtonEvent} + * - returns %TRUE if the event has been handled by the actor, + * or %FALSE to continue the emission. + * + * @returns Callback ID + */ + connect(signal: "button-release-event", callback: (owner: this, event: ButtonEvent) => boolean): number; + /** + * The ::captured-event signal is emitted when an event is captured + * by Clutter. This signal will be emitted starting from the top-level + * container (the {@link Stage}) to the actor which received the event + * going down the hierarchy. This signal can be used to intercept every + * event before the specialized events (like + * ClutterActor::button-press-event or ::key-released-event) are + * emitted. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - event: a {@link Event} + * - returns %TRUE if the event has been handled by the actor, + * or %FALSE to continue the emission. + * + * @returns Callback ID + */ + connect(signal: "captured-event", callback: (owner: this, event: Event) => boolean): number; + /** + * The ::destroy signal notifies that all references held on the + * actor which emitted it should be released. + * + * The ::destroy signal should be used by all holders of a reference + * on #actor. + * + * This signal might result in the finalization of the {@link Actor} + * if all references are released. + * + * Composite actors and actors implementing the #ClutterContainer + * interface should override the default implementation of the + * class handler of this signal and call {@link Clutter.Actor.destroy} on + * their children. When overriding the default class handler, it is + * required to chain up to the parent's implementation. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "destroy", callback: (owner: this) => void): number; + /** + * The ::enter-event signal is emitted when the pointer enters the #actor + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - event: a {@link CrossingEvent} + * - returns %TRUE if the event has been handled by the actor, + * or %FALSE to continue the emission. + * + * @returns Callback ID + */ + connect(signal: "enter-event", callback: (owner: this, event: CrossingEvent) => boolean): number; + /** + * The ::event signal is emitted each time an event is received + * by the #actor. This signal will be emitted on every actor, + * following the hierarchy chain, until it reaches the top-level + * container (the {@link Stage}). + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - event: a {@link Event} + * - returns %TRUE if the event has been handled by the actor, + * or %FALSE to continue the emission. + * + * @returns Callback ID + */ + connect(signal: "event", callback: (owner: this, event: Event) => boolean): number; + /** + * The ::hide signal is emitted when an actor is no longer rendered + * on the stage. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "hide", callback: (owner: this) => void): number; + /** + * The ::key-focus-in signal is emitted when #actor receives key focus. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "key-focus-in", callback: (owner: this) => void): number; + /** + * The ::key-focus-out signal is emitted when #actor loses key focus. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "key-focus-out", callback: (owner: this) => void): number; + /** + * The ::key-press-event signal is emitted each time a keyboard button + * is pressed while #actor has key focus (see {@link Clutter.Stage.set_key_focus}). + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - event: a {@link KeyEvent} + * - returns %TRUE if the event has been handled by the actor, + * or %FALSE to continue the emission. + * + * @returns Callback ID + */ + connect(signal: "key-press-event", callback: (owner: this, event: KeyEvent) => boolean): number; + /** + * The ::key-release-event signal is emitted each time a keyboard button + * is released while #actor has key focus (see + * {@link Clutter.Stage.set_key_focus}). + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - event: a {@link KeyEvent} + * - returns %TRUE if the event has been handled by the actor, + * or %FALSE to continue the emission. + * + * @returns Callback ID + */ + connect(signal: "key-release-event", callback: (owner: this, event: KeyEvent) => boolean): number; + /** + * The ::leave-event signal is emitted when the pointer leaves the #actor. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - event: a {@link CrossingEvent} + * - returns %TRUE if the event has been handled by the actor, + * or %FALSE to continue the emission. + * + * @returns Callback ID + */ + connect(signal: "leave-event", callback: (owner: this, event: CrossingEvent) => boolean): number; + /** + * The ::motion-event signal is emitted each time the mouse pointer is + * moved over #actor. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - event: a {@link MotionEvent} + * - returns %TRUE if the event has been handled by the actor, + * or %FALSE to continue the emission. + * + * @returns Callback ID + */ + connect(signal: "motion-event", callback: (owner: this, event: MotionEvent) => boolean): number; + /** + * The ::paint signal is emitted each time an actor is being painted. + * + * Subclasses of {@link Actor} should override the #ClutterActorClass.paint + * virtual function paint themselves in that function. + * + * It is strongly discouraged to connect a signal handler to + * the #ClutterActor::paint signal; if you want to change the paint + * sequence of an existing #ClutterActor instance, either create a new + * #ClutterActor class and override the #ClutterActorClass.paint virtual + * function, or use a #ClutterEffect. The #ClutterActor::paint signal + * will be removed in a future version of Clutter. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "paint", callback: (owner: this) => void): number; + /** + * This signal is emitted when the parent of the actor changes. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - old_parent: the previous parent of the actor, or %NULL + * + * @returns Callback ID + */ + connect(signal: "parent-set", callback: (owner: this, old_parent: Actor | null) => void): number; + /** + * The ::pick signal is emitted each time an actor is being painted + * in "pick mode". The pick mode is used to identify the actor during + * the event handling phase, or by {@link Clutter.Stage.get_actor_at_pos}. + * The actor should paint its shape using the passed #pick_color. + * + * Subclasses of {@link Actor} should override the class signal handler + * and paint themselves in that function. + * + * It is possible to connect a handler to the ::pick signal in order + * to set up some custom aspect of a paint in pick mode. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - color: the {@link Color} to be used when picking + * + * @returns Callback ID + */ + connect(signal: "pick", callback: (owner: this, color: Color) => void): number; + /** + * The ::queue_redraw signal is emitted when {@link Clutter.Actor.queue_redraw} + * is called on #origin. + * + * The default implementation for {@link Actor} chains up to the + * parent actor and queues a redraw on the parent, thus "bubbling" + * the redraw queue up through the actor graph. The default + * implementation for #ClutterStage queues a clutter_stage_ensure_redraw() + * in a main loop idle handler. + * + * Note that the #origin actor may be the stage, or a container; it + * does not have to be a leaf node in the actor graph. + * + * Toolkits embedding a #ClutterStage which require a redraw and + * relayout cycle can stop the emission of this signal using the + * GSignal API, redraw the UI and then call clutter_stage_ensure_redraw() + * themselves, like: + * + * |[ + * static void + * on_redraw_complete (gpointer data) + * { + * ClutterStage *stage = data; + * + * // execute the Clutter drawing pipeline + * clutter_stage_ensure_redraw (stage); + * } + * + * static void + * on_stage_queue_redraw (ClutterStage *stage) + * { + * // this prevents the default handler to run + * g_signal_stop_emission_by_name (stage, "queue-redraw"); + * + * // queue a redraw with the host toolkit and call + * // a function when the redraw has been completed + * queue_a_redraw (G_CALLBACK (on_redraw_complete), stage); + * } + * ]| + * + * Note: This signal is emitted before the Clutter paint + * pipeline is executed. If you want to know when the pipeline has + * been completed you should use clutter_threads_add_repaint_func() + * or clutter_threads_add_repaint_func_full(). + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - origin: the actor which initiated the redraw request + * + * @returns Callback ID + */ + connect(signal: "queue-redraw", callback: (owner: this, origin: Actor) => void): number; + /** + * The ::queue_layout signal is emitted when {@link Clutter.Actor.queue_relayout} + * is called on an actor. + * + * The default implementation for {@link Actor} chains up to the + * parent actor and queues a relayout on the parent, thus "bubbling" + * the relayout queue up through the actor graph. + * + * The main purpose of this signal is to allow relayout to be propagated + * properly in the presence of #ClutterClone actors. Applications will + * not normally need to connect to this signal. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "queue-relayout", callback: (owner: this) => void): number; + /** + * The ::realize signal is emitted each time an actor is being + * realized. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "realize", callback: (owner: this) => void): number; + /** + * The ::scroll-event signal is emitted each time the mouse is + * scrolled on #actor + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - event: a {@link ScrollEvent} + * - returns %TRUE if the event has been handled by the actor, + * or %FALSE to continue the emission. + * + * @returns Callback ID + */ + connect(signal: "scroll-event", callback: (owner: this, event: ScrollEvent) => boolean): number; + /** + * The ::show signal is emitted when an actor is visible and + * rendered on the stage. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "show", callback: (owner: this) => void): number; + /** + * The ::touch-event signal is emitted each time a touch + * begin/end/update/cancel event. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - event: a {@link Event} + * - returns %CLUTTER_EVENT_STOP if the event has been handled by + * the actor, or %CLUTTER_EVENT_PROPAGATE to continue the emission. + * + * @returns Callback ID + */ + connect(signal: "touch-event", callback: (owner: this, event: Event) => boolean): number; + /** + * The ::transition-stopped signal is emitted once a transition + * is stopped; a transition is stopped once it reached its total + * duration (including eventual repeats), it has been stopped + * using {@link Clutter.Timeline.stop}, or it has been removed from the + * transitions applied on #actor, using clutter_actor_remove_transition(). + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - name: the name of the transition + * - is_finished: whether the transition was finished, or stopped + * + * @returns Callback ID + */ + connect(signal: "transition-stopped", callback: (owner: this, name: string, is_finished: boolean) => void): number; + /** + * The ::transitions-completed signal is emitted once all transitions + * involving #actor are complete. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "transitions-completed", callback: (owner: this) => void): number; + /** + * The ::unrealize signal is emitted each time an actor is being + * unrealized. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "unrealize", callback: (owner: this) => void): number; + + connect(signal: "notify::allocation", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::anchor-gravity", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::anchor-x", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::anchor-y", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::background-color", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::background-color-set", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::child-transform", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::child-transform-set", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::clip", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::clip-rect", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::clip-to-allocation", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::content", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::content-box", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::content-gravity", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::content-repeat", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::depth", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::first-child", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::fixed-position-set", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::fixed-x", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::fixed-y", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::has-clip", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::has-pointer", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::height", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::last-child", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::layout-manager", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::magnification-filter", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::mapped", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::margin-bottom", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::margin-left", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::margin-right", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::margin-top", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::min-height", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::min-height-set", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::min-width", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::min-width-set", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::minification-filter", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::name", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::natural-height", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::natural-height-set", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::natural-width", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::natural-width-set", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::offscreen-redirect", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::opacity", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::pivot-point", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::pivot-point-z", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::position", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::reactive", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::realized", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::request-mode", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::rotation-angle-x", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::rotation-angle-y", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::rotation-angle-z", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::rotation-center-x", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::rotation-center-y", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::rotation-center-z", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::rotation-center-z-gravity", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::scale-center-x", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::scale-center-y", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::scale-gravity", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::scale-x", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::scale-y", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::scale-z", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::show-on-set-parent", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::size", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::text-direction", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::transform", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::transform-set", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::translation-x", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::translation-y", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::translation-z", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::visible", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::width", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::x", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::x-align", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::x-expand", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::y", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::y-align", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::y-expand", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::z-position", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::flags", callback: (owner: this, ...args: any) => void): number; + + } + + type ActorInitOptionsMixin = GObject.InitiallyUnownedInitOptions & Atk.ImplementorIfaceInitOptions & AnimatableInitOptions & ContainerInitOptions & ScriptableInitOptions & + Pick; + + export interface ActorInitOptions extends ActorInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Actor} instead. + */ + type ActorMixin = IActor & GObject.InitiallyUnowned & Atk.ImplementorIface & Animatable & Container & Scriptable; + + /** + * Base class for actors. + */ + interface Actor extends ActorMixin {} + + class Actor { + public constructor(options?: Partial); + /** + * Creates a new {@link Actor}. + * + * A newly created actor has a floating reference, which will be sunk + * when it is added to another actor. + * @returns the newly created {@link Actor} + */ + public static new(): Actor; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link ActorMeta} instead. + */ + interface IActorMeta { + /** + * The {@link Actor} attached to the #ClutterActorMeta instance + */ + readonly actor: Actor; + /** + * Whether or not the {@link ActorMeta} is enabled + */ + enabled: boolean; + /** + * The unique name to access the {@link ActorMeta} + */ + name: string; + /** + * Retrieves a pointer to the {@link Actor} that owns #meta + * @returns a pointer to a {@link Actor} or %NULL + */ + get_actor(): Actor; + /** + * Retrieves whether #meta is enabled + * @returns %TRUE if the {@link ActorMeta} instance is enabled + */ + get_enabled(): boolean; + /** + * Retrieves the name set using {@link Clutter.ActorMeta.set_name} + * @returns the name of the {@link ActorMeta} + * instance, or %NULL if none was set. The returned string is owned + * by the #ClutterActorMeta instance and it should not be modified + * or freed + */ + get_name(): string; + /** + * Sets whether #meta should be enabled or not + * @param is_enabled whether #meta is enabled + */ + set_enabled(is_enabled: boolean): void; + /** + * Sets the name of #meta + * + * The name can be used to identify the {@link ActorMeta} instance + * @param name the name of #meta + */ + set_name(name: string): void; + connect(signal: "notify::actor", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::enabled", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::name", callback: (owner: this, ...args: any) => void): number; + + } + + type ActorMetaInitOptionsMixin = GObject.InitiallyUnownedInitOptions & + Pick; + + export interface ActorMetaInitOptions extends ActorMetaInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link ActorMeta} instead. + */ + type ActorMetaMixin = IActorMeta & GObject.InitiallyUnowned; + + /** + * The {@link ActorMeta} structure contains only + * private data and should be accessed using the provided API + */ + interface ActorMeta extends ActorMetaMixin {} + + class ActorMeta { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link AlignConstraint} instead. + */ + interface IAlignConstraint { + /** + * The axis to be used to compute the alignment + */ + align_axis: AlignAxis; + /** + * The alignment factor, as a normalized value between 0.0 and 1.0 + * + * The factor depends on the {@link AlignConstraint.align_axis} property: + * with an align-axis value of %CLUTTER_ALIGN_X_AXIS, 0.0 means left and + * 1.0 means right; with a value of %CLUTTER_ALIGN_Y_AXIS, 0.0 means top + * and 1.0 means bottom. + */ + factor: number; + /** + * The {@link Actor} used as the source for the alignment. + * + * The #ClutterActor must not be a child or a grandchild of the actor + * using the constraint. + */ + source: Actor; + /** + * Retrieves the value set using {@link Clutter.AlignConstraint.set_align_axis} + * @returns the alignment axis + */ + get_align_axis(): AlignAxis; + /** + * Retrieves the factor set using {@link Clutter.AlignConstraint.set_factor} + * @returns the alignment factor + */ + get_factor(): number; + /** + * Retrieves the source of the alignment + * @returns the {@link Actor} used as the source + * of the alignment + */ + get_source(): Actor; + /** + * Sets the axis to which the alignment refers to + * @param axis the axis to which the alignment refers to + */ + set_align_axis(axis: AlignAxis): void; + /** + * Sets the alignment factor of the constraint + * + * The factor depends on the {@link AlignConstraint.align_axis} property + * and it is a value between 0.0 (meaning left, when + * #ClutterAlignConstraint:align-axis is set to %CLUTTER_ALIGN_X_AXIS; or + * meaning top, when #ClutterAlignConstraint:align-axis is set to + * %CLUTTER_ALIGN_Y_AXIS) and 1.0 (meaning right, when + * #ClutterAlignConstraint:align-axis is set to %CLUTTER_ALIGN_X_AXIS; or + * meaning bottom, when #ClutterAlignConstraint:align-axis is set to + * %CLUTTER_ALIGN_Y_AXIS). A value of 0.5 aligns in the middle in either + * cases + * @param factor the alignment factor, between 0.0 and 1.0 + */ + set_factor(factor: number): void; + /** + * Sets the source of the alignment constraint + * @param source a {@link Actor}, or %NULL to unset the source + */ + set_source(source: Actor | null): void; + connect(signal: "notify::align-axis", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::factor", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::source", callback: (owner: this, ...args: any) => void): number; + + } + + type AlignConstraintInitOptionsMixin = ConstraintInitOptions & + Pick; + + export interface AlignConstraintInitOptions extends AlignConstraintInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link AlignConstraint} instead. + */ + type AlignConstraintMixin = IAlignConstraint & Constraint; + + /** + * {@link AlignConstraint} is an opaque structure + * whose members cannot be directly accesses + */ + interface AlignConstraint extends AlignConstraintMixin {} + + class AlignConstraint { + public constructor(options?: Partial); + /** + * Creates a new constraint, aligning a {@link Actor}'s position with + * regards of the size of the actor to #source, with the given + * alignment #factor + * @param source the {@link Actor} to use as the source of the + * alignment, or %NULL + * @param axis the axis to be used to compute the alignment + * @param factor the alignment factor, between 0.0 and 1.0 + * @returns the newly created {@link AlignConstraint} + */ + public static new(source: Actor | null, axis: AlignAxis, factor: number): Constraint; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Alpha} instead. + */ + interface IAlpha { + /** + * @deprecated + * Use {@link Timeline.new_frame} and + * {@link Clutter.Timeline.get_progress} instead + * + * The alpha value as computed by the alpha function. The linear + * interval is 0.0 to 1.0, but the Alpha allows overshooting by + * one unit in each direction, so the valid interval is -1.0 to 2.0. + */ + readonly alpha: number; + /** + * @deprecated + * Use {@link Timeline.progress_mode} + * + * The progress function logical id - either a value from the + * {@link AnimationMode} enumeration or a value returned by + * {@link Clutter.Alpha.register_func}. + * + * If %CLUTTER_CUSTOM_MODE is used then the function set using + * clutter_alpha_set_closure() or clutter_alpha_set_func() + * will be used. + */ + mode: number; + /** + * A {@link Timeline} instance used to drive the alpha function. + */ + timeline: Timeline; + /** + * @deprecated + * Use {@link Clutter.Timeline.get_progress} + * + * Query the current alpha value. + * @returns The current alpha value for the alpha + */ + get_alpha(): number; + /** + * @deprecated + * Use {@link Timeline} instead + * + * Retrieves the {@link AnimationMode} used by #alpha. + * @returns the animation mode + */ + get_mode(): number; + /** + * @deprecated + * Use {@link Timeline} directlry + * + * Gets the {@link Timeline} bound to #alpha. + * @returns a {@link Timeline} instance + */ + get_timeline(): Timeline; + /** + * @deprecated + * Use {@link Clutter.Timeline.set_progress_func} + * + * Sets the #GClosure used to compute the alpha value at each + * frame of the {@link Timeline} bound to #alpha. + * @param closure A #GClosure + */ + set_closure(closure: GObject.Closure): void; + /** + * @deprecated + * Use {@link Clutter.Timeline.set_progress_func} + * + * Sets the {@link AlphaFunc} function used to compute + * the alpha value at each frame of the #ClutterTimeline + * bound to #alpha. + * + * This function will not register #func as a global alpha function. + * @param func A {@link AlphaFunc} + * @param data user data to be passed to the alpha function, or %NULL + * @param destroy notify function used when disposing the alpha function + */ + set_func(func: AlphaFunc, data: any | null, destroy: GLib.DestroyNotify): void; + /** + * @deprecated + * Use {@link Timeline} and + * {@link Clutter.Timeline.set_progress_mode} instead + * + * Sets the progress function of #alpha using the symbolic value + * of #mode, as taken by the {@link AnimationMode} enumeration or + * using the value returned by {@link Clutter.Alpha.register_func}. + * @param mode a {@link AnimationMode} + */ + set_mode(mode: number): void; + /** + * @deprecated + * Use {@link Timeline} directly + * + * Binds #alpha to #timeline. + * @param timeline A {@link Timeline} + */ + set_timeline(timeline: Timeline): void; + connect(signal: "notify::alpha", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::mode", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::timeline", callback: (owner: this, ...args: any) => void): number; + + } + + type AlphaInitOptionsMixin = GObject.InitiallyUnownedInitOptions & ScriptableInitOptions & + Pick; + + export interface AlphaInitOptions extends AlphaInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Alpha} instead. + */ + type AlphaMixin = IAlpha & GObject.InitiallyUnowned & Scriptable; + + /** + * {@link Alpha} combines a #ClutterTimeline and a function. + * The contents of the #ClutterAlpha structure are private and should + * only be accessed using the provided API. + */ + interface Alpha extends AlphaMixin {} + + class Alpha { + public constructor(options?: Partial); + /** + * @deprecated + * Use {@link Timeline} instead + * + * Creates a new {@link Alpha} instance. You must set a function + * to compute the alpha value using {@link Clutter.Alpha.set_func} and + * bind a #ClutterTimeline object to the #ClutterAlpha instance + * using clutter_alpha_set_timeline(). + * + * You should use the newly created #ClutterAlpha instance inside + * a #ClutterBehaviour object. + * @returns the newly created empty {@link Alpha} instance. + */ + public static new(): Alpha; + /** + * @deprecated + * Use {@link Timeline} instead + * + * Creates a new {@link Alpha} instance and sets the timeline + * and animation mode. + * + * See also {@link Clutter.Alpha.set_timeline} and clutter_alpha_set_mode(). + * @param timeline {@link Timeline} timeline + * @param mode animation mode + * @returns the newly created {@link Alpha} + */ + public static new_full(timeline: Timeline, mode: number): Alpha; + /** + * @deprecated + * Use {@link Timeline} instead + * + * Creates a new {@link Alpha} instances and sets the timeline + * and the alpha function. + * + * This function will not register #func as a global alpha function. + * + * See also {@link Clutter.Alpha.set_timeline} and clutter_alpha_set_func(). + * @param timeline a {@link Timeline} + * @param func a {@link AlphaFunc} + * @param data data to pass to the function, or %NULL + * @param destroy function to call when removing the alpha function, or %NULL + * @returns the newly created {@link Alpha} + */ + public static new_with_func(timeline: Timeline, func: AlphaFunc, data: any | null, destroy: GLib.DestroyNotify): Alpha; + /** + * @deprecated + * There is no direct replacement for this + * function. Use {@link Clutter.Timeline.set_progress_func} on each + * specific {@link Timeline} instance + * + * #GClosure variant of {@link Clutter.Alpha.register_func}. + * + * Registers a global alpha function and returns its logical id + * to be used by clutter_alpha_set_mode() or by {@link Animation}. + * + * The logical id is always greater than %CLUTTER_ANIMATION_LAST. + * @param closure a #GClosure + * @returns the logical id of the alpha function + */ + public static register_closure(closure: GObject.Closure): number; + /** + * @deprecated + * There is no direct replacement for this + * function. Use {@link Clutter.Timeline.set_progress_func} on each + * specific {@link Timeline} instance + * + * Registers a global alpha function and returns its logical id + * to be used by {@link Clutter.Alpha.set_mode} or by {@link Animation}. + * + * The logical id is always greater than %CLUTTER_ANIMATION_LAST. + * @param func a {@link AlphaFunc} + * @param data user data to pass to #func, or %NULL + * @returns the logical id of the alpha function + */ + public static register_func(func: AlphaFunc, data: any | null): number; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Animation} instead. + */ + interface IAnimation { + /** + * @deprecated + * Use the {@link Animation.timeline} property and + * the #ClutterTimeline:progress-mode property instead. + * + * The {@link Alpha} used by the animation. + */ + alpha: Alpha; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * The duration of the animation, expressed in milliseconds. + */ + duration: number; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * Whether the animation should loop. + */ + loop: boolean; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * The animation mode, either a value from {@link AnimationMode} + * or a value returned by {@link Clutter.Alpha.register_func}. The + * default value is %CLUTTER_LINEAR. + */ + mode: number; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * The #GObject to which the animation applies. + */ + object: GObject.Object; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * The {@link Timeline} used by the animation. + */ + timeline: Timeline; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * Adds a single property with name #property_name to the + * animation #animation. For more information about animations, + * see {@link Clutter.Actor.animate}. + * + * This method returns the animation primarily to make chained + * calls convenient in language bindings. + * @param property_name the property to control + * @param _final The final value of the property + * @returns The animation itself. + */ + bind(property_name: string, _final: GObject.Value): Animation; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * Binds #interval to the #property_name of the #GObject + * attached to #animation. The {@link Animation} will take + * ownership of the passed #ClutterInterval. For more information + * about animations, see {@link Clutter.Actor.animate}. + * + * If you need to update the interval instance use + * clutter_animation_update_interval() instead. + * @param property_name the property to control + * @param interval a {@link Interval} + * @returns The animation itself. + */ + bind_interval(property_name: string, interval: Interval): Animation; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * Emits the ::completed signal on #animation + * + * When using this function with a {@link Animation} created + * by the {@link Clutter.Actor.animate} family of functions, #animation + * will be unreferenced and it will not be valid anymore, + * unless g_object_ref() was called before calling this function + * or unless a reference was taken inside a handler for the + * #ClutterAnimation::completed signal + */ + completed(): void; + /** + * @deprecated + * Use {@link Clutter.Animation.get_timeline} and + * clutter_timeline_get_progress_mode() instead. + * + * Retrieves the {@link Alpha} used by #animation. + * @returns the alpha object used by the animation + */ + get_alpha(): Alpha; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * Retrieves the duration of #animation, in milliseconds. + * @returns the duration of the animation + */ + get_duration(): number; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * Retrieves the {@link Interval} associated to #property_name + * inside #animation. + * @param property_name name of the property + * @returns a {@link Interval} or %NULL if no + * property with the same name was found. The returned interval is + * owned by the #ClutterAnimation and should not be unreferenced + */ + get_interval(property_name: string): Interval; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * Retrieves whether #animation is looping. + * @returns %TRUE if the animation is looping + */ + get_loop(): boolean; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * Retrieves the animation mode of #animation, as set by + * {@link Clutter.Animation.set_mode}. + * @returns the mode for the animation + */ + get_mode(): number; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * Retrieves the #GObject attached to #animation. + * @returns a #GObject + */ + get_object(): GObject.Object; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * Retrieves the {@link Timeline} used by #animation + * @returns the timeline used by the animation + */ + get_timeline(): Timeline; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * Checks whether #animation is controlling #property_name. + * @param property_name name of the property + * @returns %TRUE if the property is animated by the + * {@link Animation}, %FALSE otherwise + */ + has_property(property_name: string): boolean; + /** + * @deprecated + * Use {@link Clutter.Animation.get_timeline} and + * clutter_timeline_set_progress_mode() instead. + * + * Sets #alpha as the {@link Alpha} used by #animation. + * + * If #alpha is not %NULL, the #ClutterAnimation will take ownership + * of the #ClutterAlpha instance. + * @param alpha a {@link Alpha}, or %NULL to unset the current #ClutterAlpha + */ + set_alpha(alpha: Alpha): void; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * Sets the duration of #animation in milliseconds. + * + * This function will set {@link Animation.alpha} and + * #ClutterAnimation:timeline if needed. + * @param msecs the duration in milliseconds + */ + set_duration(msecs: number): void; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * Sets whether #animation should loop over itself once finished. + * + * A looping {@link Animation} will not emit the #ClutterAnimation::completed + * signal when finished. + * + * This function will set #ClutterAnimation:alpha and + * #ClutterAnimation:timeline if needed. + * @param loop %TRUE if the animation should loop + */ + set_loop(loop: boolean): void; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * Sets the animation #mode of #animation. The animation #mode is + * a logical id, either coming from the {@link AnimationMode} enumeration + * or the return value of {@link Clutter.Alpha.register_func}. + * + * This function will also set #ClutterAnimation:alpha if needed. + * @param mode an animation mode logical id + */ + set_mode(mode: number): void; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * Attaches #animation to #object. The {@link Animation} will take a + * reference on #object. + * @param object a #GObject + */ + set_object(object: GObject.Object): void; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * Sets the {@link Timeline} used by #animation. + * + * This function will take a reference on the passed #timeline. + * @param timeline a {@link Timeline}, or %NULL to unset the + * current #ClutterTimeline + */ + set_timeline(timeline: Timeline | null): void; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * Removes #property_name from the list of animated properties. + * @param property_name name of the property + */ + unbind_property(property_name: string): void; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * Updates the #final value of the interval for #property_name + * @param property_name name of the property + * @param _final The final value of the property + * @returns The animation itself. + */ + update(property_name: string, _final: GObject.Value): Animation; + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * Changes the #interval for #property_name. The {@link Animation} + * will take ownership of the passed #ClutterInterval. + * @param property_name name of the property + * @param interval a {@link Interval} + */ + update_interval(property_name: string, interval: Interval): void; + /** + * The ::completed signal is emitted once the animation has + * been completed. + * + * The #animation instance is guaranteed to be valid for the entire + * duration of the signal emission chain. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "completed", callback: (owner: this) => void): number; + /** + * The ::started signal is emitted once the animation has been + * started + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "started", callback: (owner: this) => void): number; + + connect(signal: "notify::alpha", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::duration", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::loop", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::mode", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::object", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::timeline", callback: (owner: this, ...args: any) => void): number; + + } + + type AnimationInitOptionsMixin = GObject.ObjectInitOptions & ScriptableInitOptions & + Pick; + + export interface AnimationInitOptions extends AnimationInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Animation} instead. + */ + type AnimationMixin = IAnimation & GObject.Object & Scriptable; + + /** + * The {@link Animation} structure contains only private data and should + * be accessed using the provided functions. + */ + interface Animation extends AnimationMixin {} + + class Animation { + public constructor(options?: Partial); + /** + * @deprecated + * Use {@link PropertyTransition} instead + * + * Creates a new {@link Animation} instance. You should set the + * #GObject to be animated using {@link Clutter.Animation.set_object}, + * set the duration with clutter_animation_set_duration() and the + * easing mode using clutter_animation_set_mode(). + * + * Use clutter_animation_bind() or clutter_animation_bind_interval() + * to define the properties to be animated. The interval and the + * animated properties can be updated at runtime. + * + * The clutter_actor_animate() and relative family of functions provide + * an easy way to animate a #ClutterActor and automatically manage the + * lifetime of a #ClutterAnimation instance, so you should consider using + * those functions instead of manually creating an animation. + * @returns the newly created {@link Animation}. Use {@link GObject.Object.unref} + * to release the associated resources + */ + public static new(): Animation; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Animator} instead. + */ + interface IAnimator { + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * The duration of the {@link Timeline} used by the #ClutterAnimator + * to drive the animation + */ + duration: number; + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * The {@link Timeline} used by the #ClutterAnimator to drive the + * animation + */ + timeline: Timeline; + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * Compute the value for a managed property at a given progress. + * + * If the property is an ease-in property, the current value of the property + * on the object will be used as the starting point for computation. + * @param object a #GObject + * @param property_name the name of the property on object to check + * @param progress a value between 0.0 and 1.0 + * @param value an initialized value to store the computed result + * @returns %TRUE if the computation yields has a value, otherwise (when + * an error occurs or the progress is before any of the keys) %FALSE is + * returned and the #GValue is left untouched + */ + compute_value(object: GObject.Object, property_name: string, progress: number, value: GObject.Value): boolean; + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * Retrieves the current duration of an animator + * @returns the duration of the animation, in milliseconds + */ + get_duration(): number; + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * Returns a list of pointers to opaque structures with accessor functions + * that describe the keys added to an animator. + * @param object a #GObject to search for, or %NULL for all objects + * @param property_name a specific property name to query for, + * or %NULL for all properties + * @param progress a specific progress to search for, or a negative value for all + * progresses + * @returns a + * list of {@link AnimatorKey}s; the contents of the list are owned + * by the #ClutterAnimator, but you should free the returned list when done, + * using {@link GObject.list_free} + */ + get_keys(object: GObject.Object | null, property_name: string | null, progress: number): AnimatorKey[]; + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * Get the timeline hooked up for driving the {@link Animator} + * @returns the {@link Timeline} that drives the animator + */ + get_timeline(): Timeline; + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * Checks if a property value is to be eased into the animation. + * @param object a #GObject + * @param property_name the name of a property on object + * @returns %TRUE if the property is eased in + */ + property_get_ease_in(object: GObject.Object, property_name: string): boolean; + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * Get the interpolation used by animator for a property on a particular + * object. + * @param object a #GObject + * @param property_name the name of a property on object + * @returns a ClutterInterpolation value. + */ + property_get_interpolation(object: GObject.Object, property_name: string): Interpolation; + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * Sets whether a property value is to be eased into the animation. + * @param object a #GObject + * @param property_name the name of a property on object + * @param ease_in we are going to be easing in this property + */ + property_set_ease_in(object: GObject.Object, property_name: string, ease_in: boolean): void; + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * Set the interpolation method to use, %CLUTTER_INTERPOLATION_LINEAR causes + * the values to linearly change between the values, and + * %CLUTTER_INTERPOLATION_CUBIC causes the values to smoothly change between + * the values. + * @param object a #GObject + * @param property_name the name of a property on object + * @param interpolation the {@link Interpolation} to use + */ + property_set_interpolation(object: GObject.Object, property_name: string, interpolation: Interpolation): void; + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * Removes all keys matching the conditions specificed in the arguments. + * @param object a #GObject to search for, or %NULL for all + * @param property_name a specific property name to query for, + * or %NULL for all + * @param progress a specific progress to search for or a negative value + * for all + */ + remove_key(object: GObject.Object | null, property_name: string | null, progress: number): void; + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * Adds multiple keys to a {@link Animator}, specifying the value a given + * property should have at a given progress of the animation. The mode + * specified is the mode used when going to this key from the previous key of + * the #property_name + * + * If a given (object, property, progress) tuple already exist the mode and + * value will be replaced with the new values. + * @param first_object a #GObject + * @param first_property_name the property to specify a key for + * @param first_mode the id of the alpha function to use + * @param first_progress at which stage of the animation this value applies; the + * range is a normalized floating point value between 0 and 1 + */ + set(first_object: any | null, first_property_name: string, first_mode: number, first_progress: number): void; + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * Runs the timeline of the {@link Animator} with a duration in msecs + * as specified. + * @param duration milliseconds a run of the animator should last. + */ + set_duration(duration: number): void; + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * Sets a single key in the {@link Animator} for the #property_name of + * #object at #progress. + * + * See also: {@link Clutter.Animator.set} + * @param object a #GObject + * @param property_name the property to specify a key for + * @param mode the id of the alpha function to use + * @param progress the normalized range at which stage of the animation this + * value applies + * @param value the value property_name should have at progress. + * @returns The animator instance + */ + set_key(object: GObject.Object, property_name: string, mode: number, progress: number, value: GObject.Value): Animator; + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * Sets an external timeline that will be used for driving the animation + * @param timeline a {@link Timeline} + */ + set_timeline(timeline: Timeline): void; + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * Start the ClutterAnimator, this is a thin wrapper that rewinds + * and starts the animators current timeline. + * @returns the {@link Timeline} that drives + * the animator. The returned timeline is owned by the #ClutterAnimator + * and it should not be unreferenced + */ + start(): Timeline; + connect(signal: "notify::duration", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::timeline", callback: (owner: this, ...args: any) => void): number; + + } + + type AnimatorInitOptionsMixin = GObject.ObjectInitOptions & ScriptableInitOptions & + Pick; + + export interface AnimatorInitOptions extends AnimatorInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Animator} instead. + */ + type AnimatorMixin = IAnimator & GObject.Object & Scriptable; + + /** + * The {@link Animator} structure contains only private data and + * should be accessed using the provided API + */ + interface Animator extends AnimatorMixin {} + + class Animator { + public constructor(options?: Partial); + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * Creates a new {@link Animator} instance + * @returns a new {@link Animator}. + */ + public static new(): Animator; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Backend} instead. + */ + interface IBackend { + /** + * @deprecated + * Use {@link Settings.double_click_distance} instead + * + * Retrieves the distance used to verify a double click event + * @returns a distance, in pixels. + */ + get_double_click_distance(): number; + /** + * @deprecated + * Use {@link Settings.double_click_time} instead + * + * Gets the maximum time between two button press events, as set + * by {@link Clutter.Backend.set_double_click_time}. + * @returns a time in milliseconds + */ + get_double_click_time(): number; + /** + * @deprecated + * Use {@link Settings.font_name} instead + * + * Retrieves the default font name as set by + * {@link Clutter.Backend.set_font_name}. + * @returns the font name for the backend. The returned string is + * owned by the {@link Backend} and should never be modified or freed + */ + get_font_name(): string; + /** + * Retrieves the font options for #backend. + * @returns the font options of the {@link Backend}. + * The returned #cairo_font_options_t is owned by the backend and should + * not be modified or freed + */ + get_font_options(): cairo.FontOptions; + /** + * Gets the resolution for font handling on the screen. + * + * The resolution is a scale factor between points specified in a + * #PangoFontDescription and cairo units. The default value is 96.0, + * meaning that a 10 point font will be 13 units + * high (10 * 96. / 72. = 13.3). + * + * Clutter will set the resolution using the current backend when + * initializing; the resolution is also stored in the + * {@link Settings.font_dpi} property. + * @returns the current resolution, or -1 if no resolution + * has been set. + */ + get_resolution(): number; + /** + * @deprecated + * Use {@link Settings.double_click_distance} instead + * + * Sets the maximum distance used to verify a double click event. + * @param distance a distance, in pixels + */ + set_double_click_distance(distance: number): void; + /** + * @deprecated + * Use {@link Settings.double_click_time} instead + * + * Sets the maximum time between two button press events, used to + * verify whether it's a double click event or not. + * @param msec milliseconds between two button press events + */ + set_double_click_time(msec: number): void; + /** + * @deprecated + * Use {@link Settings.font_name} instead + * + * Sets the default font to be used by Clutter. The #font_name string + * must either be %NULL, which means that the font name from the + * default {@link Backend} will be used; or be something that can + * be parsed by the {@link Pango.font.description_from_string} function. + * @param font_name the name of the font + */ + set_font_name(font_name: string): void; + /** + * Sets the new font options for #backend. The {@link Backend} will + * copy the #cairo_font_options_t. + * + * If #options is %NULL, the first following call to + * {@link Clutter.Backend.get_font_options} will return the default font + * options for #backend. + * + * This function is intended for actors creating a Pango layout + * using the PangoCairo API. + * @param options Cairo font options for the backend, or %NULL + */ + set_font_options(options: cairo.FontOptions): void; + /** + * @deprecated + * Use {@link Settings.font_dpi} instead + * + * Sets the resolution for font handling on the screen. This is a + * scale factor between points specified in a #PangoFontDescription + * and cairo units. The default value is 96, meaning that a 10 point + * font will be 13 units high. (10 * 96. / 72. = 13.3). + * + * Applications should never need to call this function. + * @param dpi the resolution in "dots per inch" (Physical inches aren't + * actually involved; the terminology is conventional). + */ + set_resolution(dpi: number): void; + /** + * The ::font-changed signal is emitted each time the font options + * have been changed through {@link Settings}. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "font-changed", callback: (owner: this) => void): number; + /** + * The ::resolution-changed signal is emitted each time the font + * resolutions has been changed through {@link Settings}. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "resolution-changed", callback: (owner: this) => void): number; + /** + * The ::settings-changed signal is emitted each time the {@link Settings} + * properties have been changed. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "settings-changed", callback: (owner: this) => void): number; + + } + + type BackendInitOptionsMixin = GObject.ObjectInitOptions + export interface BackendInitOptions extends BackendInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Backend} instead. + */ + type BackendMixin = IBackend & GObject.Object; + + /** + * {@link Backend} is an opaque structure whose + * members cannot be directly accessed. + */ + interface Backend extends BackendMixin {} + + class Backend { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Behaviour} instead. + */ + interface IBehaviour { + /** + * The {@link Alpha} object used to drive this behaviour. A #ClutterAlpha + * object binds a #ClutterTimeline and a function which computes a value + * (the "alpha") depending on the time. Each time the alpha value changes + * the alpha-notify virtual function is called. + */ + alpha: Alpha; + /** + * Calls #func for every actor driven by #behave. + * @param func a function called for each actor + * @param data optional data to be passed to the function, or %NULL + */ + actors_foreach(func: BehaviourForeachFunc, data: any | null): void; + /** + * Applies #behave to #actor. This function adds a reference on + * the actor. + * @param actor a {@link Actor} + */ + apply(actor: Actor): void; + /** + * Retrieves all the actors to which #behave applies. It is not recommended + * for derived classes to use this in there alpha notify method but use + * #clutter_behaviour_actors_foreach as it avoids alot of needless allocations. + * @returns a list of + * actors. You should free the returned list with {@link GObject.slist_free} when + * finished using it. + */ + get_actors(): Actor[]; + /** + * Retrieves the {@link Alpha} object bound to #behave. + * @returns a {@link Alpha} object, or %NULL if no alpha + * object has been bound to this behaviour. + */ + get_alpha(): Alpha; + /** + * Gets the number of actors this behaviour is applied too. + * @returns The number of applied actors + */ + get_n_actors(): number; + /** + * Gets an actor the behaviour was applied to referenced by index num. + * @param index_ the index of an actor this behaviour is applied too. + * @returns A Clutter actor or NULL if #index_ is invalid. + */ + get_nth_actor(index_: number): Actor; + /** + * Check if #behave applied to #actor. + * @param actor a {@link Actor} + * @returns TRUE if actor has behaviour. FALSE otherwise. + */ + is_applied(actor: Actor): boolean; + /** + * Removes #actor from the list of {@link Actor}s to which + * #behave applies. This function removes a reference on the actor. + * @param actor a {@link Actor} + */ + remove(actor: Actor): void; + /** + * Removes every actor from the list that #behave holds. + */ + remove_all(): void; + /** + * Binds #alpha to a {@link Behaviour}. The #ClutterAlpha object + * is what makes a behaviour work: for each tick of the timeline + * used by #ClutterAlpha a new value of the alpha parameter is + * computed by the alpha function; the value should be used by + * the #ClutterBehaviour to update one or more properties of the + * actors to which the behaviour applies. + * + * If #alpha is not %NULL, the #ClutterBehaviour will take ownership + * of the #ClutterAlpha instance. + * @param alpha a {@link Alpha} or %NULL to unset a previously set alpha + */ + set_alpha(alpha: Alpha): void; + /** + * The ::apply signal is emitted each time the behaviour is applied + * to an actor. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the actor the behaviour was applied to. + * + * @returns Callback ID + */ + connect(signal: "applied", callback: (owner: this, actor: Actor) => void): number; + /** + * The ::removed signal is emitted each time a behaviour is not applied + * to an actor anymore. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the removed actor + * + * @returns Callback ID + */ + connect(signal: "removed", callback: (owner: this, actor: Actor) => void): number; + + connect(signal: "notify::alpha", callback: (owner: this, ...args: any) => void): number; + + } + + type BehaviourInitOptionsMixin = GObject.ObjectInitOptions & ScriptableInitOptions & + Pick; + + export interface BehaviourInitOptions extends BehaviourInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Behaviour} instead. + */ + type BehaviourMixin = IBehaviour & GObject.Object & Scriptable; + + /** + * {@link Behaviour_struct} contains only private data and should + * be accessed with the functions below. + */ + interface Behaviour extends BehaviourMixin {} + + class Behaviour { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link BehaviourDepth} instead. + */ + interface IBehaviourDepth { + /** + * End depth level to apply to the actors. + */ + depth_end: number; + /** + * Start depth level to apply to the actors. + */ + depth_start: number; + /** + * Gets the boundaries of the #behaviour + * @returns return location for the initial depth value, or %NULL + * + * return location for the final depth value, or %NULL + */ + get_bounds(): [ depth_start: number, depth_end: number ]; + /** + * Sets the boundaries of the #behaviour. + * @param depth_start initial value of the depth + * @param depth_end final value of the depth + */ + set_bounds(depth_start: number, depth_end: number): void; + connect(signal: "notify::depth-end", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::depth-start", callback: (owner: this, ...args: any) => void): number; + + } + + type BehaviourDepthInitOptionsMixin = BehaviourInitOptions & ScriptableInitOptions & + Pick; + + export interface BehaviourDepthInitOptions extends BehaviourDepthInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link BehaviourDepth} instead. + */ + type BehaviourDepthMixin = IBehaviourDepth & Behaviour & Scriptable; + + /** + * The {@link BehaviourDepth} structure contains only private data + * and should be accessed using the provided API + */ + interface BehaviourDepth extends BehaviourDepthMixin {} + + class BehaviourDepth { + public constructor(options?: Partial); + /** + * Creates a new {@link BehaviourDepth} which can be used to control + * the ClutterActor:depth property of a set of #ClutterActors. + * + * If #alpha is not %NULL, the #ClutterBehaviour will take ownership + * of the #ClutterAlpha instance. In the case when #alpha is %NULL, + * it can be set later with {@link Clutter.Behaviour.set_alpha}. + * @param alpha a {@link Alpha} instance, or %NULL + * @param depth_start initial value of the depth + * @param depth_end final value of the depth + * @returns the newly created behaviour + */ + public static new(alpha: Alpha | null, depth_start: number, depth_end: number): Behaviour; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link BehaviourEllipse} instead. + */ + interface IBehaviourEllipse { + /** + * The final angle to where the rotation should end. + */ + angle_end: number; + /** + * The initial angle from where the rotation should start. + */ + angle_start: number; + /** + * The tilt angle for the rotation around center in X axis + */ + angle_tilt_x: number; + /** + * The tilt angle for the rotation around center in Y axis + */ + angle_tilt_y: number; + /** + * The tilt angle for the rotation on the Z axis + */ + angle_tilt_z: number; + /** + * The center of the ellipse. + */ + center: Knot; + /** + * The direction of the rotation. + */ + direction: RotateDirection; + /** + * Height of the ellipse, in pixels + */ + height: number; + /** + * Width of the ellipse, in pixels + */ + width: number; + /** + * Gets the at which movements ends. + * @returns angle in degrees + */ + get_angle_end(): number; + /** + * Gets the angle at which movements starts. + * @returns angle in degrees + */ + get_angle_start(): number; + /** + * Gets the tilt of the ellipse around the center in the given axis. + * @param axis a {@link RotateAxis} + * @returns angle in degrees. + */ + get_angle_tilt(axis: RotateAxis): number; + /** + * Gets the center of the elliptical path path. + * @returns return location for the X coordinate of the center, or %NULL + * + * return location for the Y coordinate of the center, or %NULL + */ + get_center(): [ x: number, y: number ]; + /** + * Retrieves the {@link RotateDirection} used by the ellipse behaviour. + * @returns the rotation direction + */ + get_direction(): RotateDirection; + /** + * Gets the height of the elliptical path. + * @returns the height of the path + */ + get_height(): number; + /** + * Gets the tilt of the ellipse around the center in Y axis. + * @returns return location for tilt angle on the X axis, or %NULL. + * + * return location for tilt angle on the Y axis, or %NULL. + * + * return location for tilt angle on the Z axis, or %NULL. + */ + get_tilt(): [ angle_tilt_x: number, angle_tilt_y: number, angle_tilt_z: number ]; + /** + * Gets the width of the elliptical path. + * @returns the width of the path + */ + get_width(): number; + /** + * Sets the angle at which movement ends; angles >= 360 degress get clamped + * to the canonical interval <0, 360). + * @param angle_end angle at which movement ends in degrees, between 0 and 360. + */ + set_angle_end(angle_end: number): void; + /** + * Sets the angle at which movement starts; angles >= 360 degress get clamped + * to the canonical interval <0, 360). + * @param angle_start angle at which movement starts in degrees, between 0 and 360. + */ + set_angle_start(angle_start: number): void; + /** + * Sets the angle at which the ellipse should be tilted around it's center. + * @param axis a {@link RotateAxis} + * @param angle_tilt tilt of the elipse around the center in the given axis in + * degrees. + */ + set_angle_tilt(axis: RotateAxis, angle_tilt: number): void; + /** + * Sets the center of the elliptical path to the point represented by knot. + * @param x x coordinace of centre + * @param y y coordinace of centre + */ + set_center(x: number, y: number): void; + /** + * Sets the rotation direction used by the ellipse behaviour. + * @param direction the rotation direction + */ + set_direction(direction: RotateDirection): void; + /** + * Sets the height of the elliptical path. + * @param height height of the ellipse + */ + set_height(height: number): void; + /** + * Sets the angles at which the ellipse should be tilted around it's center. + * @param angle_tilt_x tilt of the elipse around the center in X axis in degrees. + * @param angle_tilt_y tilt of the elipse around the center in Y axis in degrees. + * @param angle_tilt_z tilt of the elipse around the center in Z axis in degrees. + */ + set_tilt(angle_tilt_x: number, angle_tilt_y: number, angle_tilt_z: number): void; + /** + * Sets the width of the elliptical path. + * @param width width of the ellipse + */ + set_width(width: number): void; + connect(signal: "notify::angle-end", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::angle-start", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::angle-tilt-x", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::angle-tilt-y", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::angle-tilt-z", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::center", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::direction", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::height", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::width", callback: (owner: this, ...args: any) => void): number; + + } + + type BehaviourEllipseInitOptionsMixin = BehaviourInitOptions & ScriptableInitOptions & + Pick; + + export interface BehaviourEllipseInitOptions extends BehaviourEllipseInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link BehaviourEllipse} instead. + */ + type BehaviourEllipseMixin = IBehaviourEllipse & Behaviour & Scriptable; + + /** + * The {@link BehaviourEllipse} struct contains only private data + * and should be accessed using the provided API + */ + interface BehaviourEllipse extends BehaviourEllipseMixin {} + + class BehaviourEllipse { + public constructor(options?: Partial); + /** + * Creates a behaviour that drives actors along an elliptical path with + * given center, width and height; the movement starts at #start + * degrees (with 0 corresponding to 12 o'clock) and ends at #end + * degrees. Angles greated than 360 degrees get clamped to the canonical + * interval <0, 360); if #start is equal to #end, the behaviour will + * rotate by exacly 360 degrees. + * + * If #alpha is not %NULL, the {@link Behaviour} will take ownership + * of the #ClutterAlpha instance. In the case when #alpha is %NULL, + * it can be set later with {@link Clutter.Behaviour.set_alpha}. + * @param alpha a {@link Alpha} instance, or %NULL + * @param x x coordinace of the center + * @param y y coordiance of the center + * @param width width of the ellipse + * @param height height of the ellipse + * @param direction {@link RotateDirection} of rotation + * @param start angle in degrees at which movement starts, between 0 and 360 + * @param end angle in degrees at which movement ends, between 0 and 360 + * @returns the newly created {@link BehaviourEllipse} + */ + public static new(alpha: Alpha | null, x: number, y: number, width: number, height: number, direction: RotateDirection, start: number, end: number): Behaviour; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link BehaviourOpacity} instead. + */ + interface IBehaviourOpacity { + /** + * Final opacity level of the behaviour. + */ + opacity_end: number; + /** + * Initial opacity level of the behaviour. + */ + opacity_start: number; + /** + * Gets the initial and final levels of the opacity applied by #behaviour + * on each actor it controls. + * @returns return location for the minimum level of opacity, or %NULL + * + * return location for the maximum level of opacity, or %NULL + */ + get_bounds(): [ opacity_start: number, opacity_end: number ]; + /** + * Sets the initial and final levels of the opacity applied by #behaviour + * on each actor it controls. + * @param opacity_start minimum level of opacity + * @param opacity_end maximum level of opacity + */ + set_bounds(opacity_start: number, opacity_end: number): void; + connect(signal: "notify::opacity-end", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::opacity-start", callback: (owner: this, ...args: any) => void): number; + + } + + type BehaviourOpacityInitOptionsMixin = BehaviourInitOptions & ScriptableInitOptions & + Pick; + + export interface BehaviourOpacityInitOptions extends BehaviourOpacityInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link BehaviourOpacity} instead. + */ + type BehaviourOpacityMixin = IBehaviourOpacity & Behaviour & Scriptable; + + /** + * The {@link BehaviourOpacity} structure contains only private data and + * should be accessed using the provided API + */ + interface BehaviourOpacity extends BehaviourOpacityMixin {} + + class BehaviourOpacity { + public constructor(options?: Partial); + /** + * Creates a new {@link BehaviourOpacity} object, driven by #alpha + * which controls the opacity property of every actor, making it + * change in the interval between #opacity_start and #opacity_end. + * + * If #alpha is not %NULL, the #ClutterBehaviour will take ownership + * of the #ClutterAlpha instance. In the case when #alpha is %NULL, + * it can be set later with {@link Clutter.Behaviour.set_alpha}. + * @param alpha a {@link Alpha} instance, or %NULL + * @param opacity_start minimum level of opacity + * @param opacity_end maximum level of opacity + * @returns the newly created {@link BehaviourOpacity} + */ + public static new(alpha: Alpha | null, opacity_start: number, opacity_end: number): Behaviour; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link BehaviourPath} instead. + */ + interface IBehaviourPath { + path: Path; + /** + * Get the current path of the behaviour + * @returns the path + */ + get_path(): Path; + /** + * Change the path that the actors will follow. This will take the + * floating reference on the {@link Path} so you do not need to unref + * it. + * @param path the new path to follow + */ + set_path(path: Path): void; + /** + * This signal is emitted each time a node defined inside the path + * is reached. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - knot_num: the index of the {@link Knot} reached + * + * @returns Callback ID + */ + connect(signal: "knot-reached", callback: (owner: this, knot_num: number) => void): number; + + connect(signal: "notify::path", callback: (owner: this, ...args: any) => void): number; + + } + + type BehaviourPathInitOptionsMixin = BehaviourInitOptions & ScriptableInitOptions & + Pick; + + export interface BehaviourPathInitOptions extends BehaviourPathInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link BehaviourPath} instead. + */ + type BehaviourPathMixin = IBehaviourPath & Behaviour & Scriptable; + + /** + * The {@link BehaviourPath} structure contains only private data + * and should be accessed using the provided API + */ + interface BehaviourPath extends BehaviourPathMixin {} + + class BehaviourPath { + public constructor(options?: Partial); + /** + * Creates a new path behaviour. You can use this behaviour to drive + * actors along the nodes of a path, described by #path. + * + * This will claim the floating reference on the {@link Path} so you + * do not need to unref if it. + * + * If #alpha is not %NULL, the #ClutterBehaviour will take ownership + * of the #ClutterAlpha instance. In the case when #alpha is %NULL, + * it can be set later with {@link Clutter.Behaviour.set_alpha}. + * @param alpha a {@link Alpha} instance, or %NULL + * @param path a {@link Path} or %NULL for an empty path + * @returns a {@link Behaviour} + */ + public static new(alpha: Alpha | null, path: Path): Behaviour; + /** + * Creates a new path behaviour using the path described by #desc. See + * {@link Clutter.Path.add_string} for a description of the format. + * + * If #alpha is not %NULL, the {@link Behaviour} will take ownership + * of the #ClutterAlpha instance. In the case when #alpha is %NULL, + * it can be set later with clutter_behaviour_set_alpha(). + * @param alpha a {@link Alpha} instance, or %NULL + * @param desc a string description of the path + * @returns a {@link Behaviour} + */ + public static new_with_description(alpha: Alpha | null, desc: string): Behaviour; + /** + * Creates a new path behaviour that will make the actors visit all of + * the given knots in order with straight lines in between. + * + * A path will be created where the first knot is used in a + * %CLUTTER_PATH_MOVE_TO and the subsequent knots are used in + * %CLUTTER_PATH_LINE_TOs. + * + * If #alpha is not %NULL, the {@link Behaviour} will take ownership + * of the #ClutterAlpha instance. In the case when #alpha is %NULL, + * it can be set later with {@link Clutter.Behaviour.set_alpha}. + * @param alpha a {@link Alpha} instance, or %NULL + * @param knots an array of {@link Knot}s + * @param n_knots number of entries in #knots + * @returns a {@link Behaviour} + */ + public static new_with_knots(alpha: Alpha | null, knots: Knot[], n_knots: number): Behaviour; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link BehaviourRotate} instead. + */ + interface IBehaviourRotate { + /** + * The final angle to where the rotation should end. + */ + angle_end: number; + /** + * The initial angle from whence the rotation should start. + */ + angle_start: number; + /** + * The axis of rotation. + */ + axis: RotateAxis; + /** + * The x center of rotation. + */ + center_x: number; + /** + * The y center of rotation. + */ + center_y: number; + /** + * The z center of rotation. + */ + center_z: number; + /** + * The direction of the rotation. + */ + direction: RotateDirection; + /** + * Retrieves the {@link RotateAxis} used by the rotate behaviour. + * @returns the rotation axis + */ + get_axis(): RotateAxis; + /** + * Retrieves the rotation boundaries of the rotate behaviour. + * @returns return value for the initial angle + * + * return value for the final angle + */ + get_bounds(): [ angle_start: number, angle_end: number ]; + /** + * Retrieves the center of rotation set using + * {@link Clutter.BehaviourRotate.set_center}. + * @returns return location for the X center of rotation + * + * return location for the Y center of rotation + * + * return location for the Z center of rotation + */ + get_center(): [ x: number, y: number, z: number ]; + /** + * Retrieves the {@link RotateDirection} used by the rotate behaviour. + * @returns the rotation direction + */ + get_direction(): RotateDirection; + /** + * Sets the axis used by the rotate behaviour. + * @param axis a {@link RotateAxis} + */ + set_axis(axis: RotateAxis): void; + /** + * Sets the initial and final angles of a rotation behaviour; angles >= 360 + * degrees get clamped to the canonical interval <0, 360). + * @param angle_start initial angle in degrees, between 0 and 360. + * @param angle_end final angle in degrees, between 0 and 360. + */ + set_bounds(angle_start: number, angle_end: number): void; + /** + * Sets the center of rotation. The coordinates are relative to the plane + * normal to the rotation axis set with {@link Clutter.BehaviourRotate.set_axis}. + * @param x X axis center of rotation + * @param y Y axis center of rotation + * @param z Z axis center of rotation + */ + set_center(x: number, y: number, z: number): void; + /** + * Sets the rotation direction used by the rotate behaviour. + * @param direction the rotation direction + */ + set_direction(direction: RotateDirection): void; + connect(signal: "notify::angle-end", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::angle-start", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::axis", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::center-x", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::center-y", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::center-z", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::direction", callback: (owner: this, ...args: any) => void): number; + + } + + type BehaviourRotateInitOptionsMixin = BehaviourInitOptions & ScriptableInitOptions & + Pick; + + export interface BehaviourRotateInitOptions extends BehaviourRotateInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link BehaviourRotate} instead. + */ + type BehaviourRotateMixin = IBehaviourRotate & Behaviour & Scriptable; + + /** + * The {@link BehaviourRotate} struct contains only private data and + * should be accessed using the provided API + */ + interface BehaviourRotate extends BehaviourRotateMixin {} + + class BehaviourRotate { + public constructor(options?: Partial); + /** + * Creates a new {@link BehaviourRotate}. This behaviour will rotate actors + * bound to it on #axis, following #direction, between #angle_start and + * #angle_end. Angles >= 360 degrees will be clamped to the canonical interval + * <0, 360), if angle_start == angle_end, the behaviour will carry out a + * single rotation of 360 degrees. + * + * If #alpha is not %NULL, the #ClutterBehaviour will take ownership + * of the #ClutterAlpha instance. In the case when #alpha is %NULL, + * it can be set later with {@link Clutter.Behaviour.set_alpha}. + * @param alpha a {@link Alpha} instance, or %NULL + * @param axis the rotation axis + * @param direction the rotation direction + * @param angle_start the starting angle in degrees, between 0 and 360. + * @param angle_end the final angle in degrees, between 0 and 360. + * @returns the newly created {@link BehaviourRotate}. + */ + public static new(alpha: Alpha | null, axis: RotateAxis, direction: RotateDirection, angle_start: number, angle_end: number): Behaviour; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link BehaviourScale} instead. + */ + interface IBehaviourScale { + /** + * The final scaling factor on the X axis for the actors. + */ + x_scale_end: number; + /** + * The initial scaling factor on the X axis for the actors. + */ + x_scale_start: number; + /** + * The final scaling factor on the Y axis for the actors. + */ + y_scale_end: number; + /** + * The initial scaling factor on the Y axis for the actors. + */ + y_scale_start: number; + /** + * Retrieves the bounds used by scale behaviour. + * @returns return location for the initial scale factor on the X + * axis, or %NULL + * + * return location for the initial scale factor on the Y + * axis, or %NULL + * + * return location for the final scale factor on the X axis, + * or %NULL + * + * return location for the final scale factor on the Y axis, + * or %NULL + */ + get_bounds(): [ x_scale_start: number, y_scale_start: number, x_scale_end: number, y_scale_end: number ]; + /** + * Sets the bounds used by scale behaviour. + * @param x_scale_start initial scale factor on the X axis + * @param y_scale_start initial scale factor on the Y axis + * @param x_scale_end final scale factor on the X axis + * @param y_scale_end final scale factor on the Y axis + */ + set_bounds(x_scale_start: number, y_scale_start: number, x_scale_end: number, y_scale_end: number): void; + connect(signal: "notify::x-scale-end", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::x-scale-start", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::y-scale-end", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::y-scale-start", callback: (owner: this, ...args: any) => void): number; + + } + + type BehaviourScaleInitOptionsMixin = BehaviourInitOptions & ScriptableInitOptions & + Pick; + + export interface BehaviourScaleInitOptions extends BehaviourScaleInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link BehaviourScale} instead. + */ + type BehaviourScaleMixin = IBehaviourScale & Behaviour & Scriptable; + + /** + * The {@link BehaviourScale} struct contains only private data and + * should be accessed using the provided API + */ + interface BehaviourScale extends BehaviourScaleMixin {} + + class BehaviourScale { + public constructor(options?: Partial); + /** + * Creates a new {@link BehaviourScale} instance. + * + * If #alpha is not %NULL, the #ClutterBehaviour will take ownership + * of the #ClutterAlpha instance. In the case when #alpha is %NULL, + * it can be set later with {@link Clutter.Behaviour.set_alpha}. + * @param alpha a {@link Alpha} instance, or %NULL + * @param x_scale_start initial scale factor on the X axis + * @param y_scale_start initial scale factor on the Y axis + * @param x_scale_end final scale factor on the X axis + * @param y_scale_end final scale factor on the Y axis + * @returns the newly created {@link BehaviourScale} + */ + public static new(alpha: Alpha | null, x_scale_start: number, y_scale_start: number, x_scale_end: number, y_scale_end: number): Behaviour; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link BinLayout} instead. + */ + interface IBinLayout { + /** + * @deprecated + * Use the {@link Actor.x_expand} and the + * #ClutterActor:x-align properties on #ClutterActor instead. + * + * The default horizontal alignment policy for actors managed + * by the {@link BinLayout} + */ + x_align: BinAlignment; + /** + * @deprecated + * Use the {@link Actor.y_expand} and the + * #ClutterActor:y-align properties on #ClutterActor instead. + * + * The default vertical alignment policy for actors managed + * by the {@link BinLayout} + */ + y_align: BinAlignment; + /** + * @deprecated + * Use {@link Clutter.Actor.add_child} instead. + * + * Adds a {@link Actor} to the container using #self and + * sets the alignment policies for it + * + * This function is equivalent to {@link Clutter.Container.add_actor} + * and clutter_layout_manager_child_set_property() but it does not + * require a pointer to the #ClutterContainer associated to the + * #ClutterBinLayout + * @param child a {@link Actor} + * @param x_align horizontal alignment policy for #child + * @param y_align vertical alignment policy for #child + */ + add(child: Actor, x_align: BinAlignment, y_align: BinAlignment): void; + /** + * @deprecated + * Use the {@link Actor.x_align} and the + * #ClutterActor:y-align properties of #ClutterActor instead. + * + * Retrieves the horizontal and vertical alignment policies for + * a child of #self + * + * If #child is %NULL the default alignment policies will be returned + * instead + * @param child a child of #container + * @returns return location for the horizontal + * alignment policy + * + * return location for the vertical + * alignment policy + */ + get_alignment(child: Actor | null): [ x_align: BinAlignment | null, y_align: BinAlignment | null ]; + /** + * @deprecated + * Use the {@link Actor.x_align} and + * #ClutterActor:y-align properties of #ClutterActor instead. + * + * Sets the horizontal and vertical alignment policies to be applied + * to a #child of #self + * + * If #child is %NULL then the #x_align and #y_align values will + * be set as the default alignment policies + * @param child a child of #container + * @param x_align the horizontal alignment policy to be used for the #child + * inside #container + * @param y_align the vertical aligment policy to be used on the #child + * inside #container + */ + set_alignment(child: Actor | null, x_align: BinAlignment, y_align: BinAlignment): void; + connect(signal: "notify::x-align", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::y-align", callback: (owner: this, ...args: any) => void): number; + + } + + type BinLayoutInitOptionsMixin = LayoutManagerInitOptions & + Pick; + + export interface BinLayoutInitOptions extends BinLayoutInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link BinLayout} instead. + */ + type BinLayoutMixin = IBinLayout & LayoutManager; + + /** + * The {@link BinLayout} structure contains only private data + * and should be accessed using the provided API + */ + interface BinLayout extends BinLayoutMixin {} + + class BinLayout { + public constructor(options?: Partial); + /** + * Creates a new {@link BinLayout} layout manager + * @param x_align the default alignment policy to be used on the + * horizontal axis + * @param y_align the default alignment policy to be used on the + * vertical axis + * @returns the newly created layout manager + */ + public static new(x_align: BinAlignment, y_align: BinAlignment): LayoutManager; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link BindConstraint} instead. + */ + interface IBindConstraint { + /** + * The coordinate to be bound + */ + coordinate: BindCoordinate; + /** + * The offset, in pixels, to be applied to the binding + */ + offset: number; + /** + * The {@link Actor} used as the source for the binding. + * + * The #ClutterActor must not be contained inside the actor associated + * to the constraint. + */ + source: Actor; + /** + * Retrieves the bound coordinate of the constraint + * @returns the bound coordinate + */ + get_coordinate(): BindCoordinate; + /** + * Retrieves the offset set using {@link Clutter.BindConstraint.set_offset} + * @returns the offset, in pixels + */ + get_offset(): number; + /** + * Retrieves the {@link Actor} set using {@link Clutter.BindConstraint.set_source} + * @returns a pointer to the source actor + */ + get_source(): Actor; + /** + * Sets the coordinate to bind in the constraint + * @param coordinate the coordinate to bind + */ + set_coordinate(coordinate: BindCoordinate): void; + /** + * Sets the offset to be applied to the constraint + * @param offset the offset to apply, in pixels + */ + set_offset(offset: number): void; + /** + * Sets the source {@link Actor} for the constraint + * @param source a {@link Actor}, or %NULL to unset the source + */ + set_source(source: Actor | null): void; + connect(signal: "notify::coordinate", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::offset", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::source", callback: (owner: this, ...args: any) => void): number; + + } + + type BindConstraintInitOptionsMixin = ConstraintInitOptions & + Pick; + + export interface BindConstraintInitOptions extends BindConstraintInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link BindConstraint} instead. + */ + type BindConstraintMixin = IBindConstraint & Constraint; + + /** + * {@link BindConstraint} is an opaque structure + * whose members cannot be directly accessed + */ + interface BindConstraint extends BindConstraintMixin {} + + class BindConstraint { + public constructor(options?: Partial); + /** + * Creates a new constraint, binding a {@link Actor}'s position to + * the given #coordinate of the position of #source + * @param source the {@link Actor} to use as the source of + * the binding, or %NULL + * @param coordinate the coordinate to bind + * @param offset the offset to apply to the binding, in pixels + * @returns the newly created {@link BindConstraint} + */ + public static new(source: Actor | null, coordinate: BindCoordinate, offset: number): Constraint; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link BindingPool} instead. + */ + interface IBindingPool { + /** + * The unique name of the {@link BindingPool}. + */ + name: string; + /** + * Activates the callback associated to the action that is + * bound to the #key_val and #modifiers pair. + * + * The callback has the following signature: + * + * |[ + * void (* callback) (GObject *gobject, + * const gchar *action_name, + * guint key_val, + * ClutterModifierType modifiers, + * gpointer user_data); + * ]| + * + * Where the #GObject instance is #gobject and the user data + * is the one passed when installing the action with + * {@link Clutter.BindingPool.install_action}. + * + * If the action bound to the #key_val, #modifiers pair has been + * blocked using clutter_binding_pool_block_action(), the callback + * will not be invoked, and this function will return %FALSE. + * @param key_val the key symbol + * @param modifiers bitmask for the modifiers + * @param gobject a #GObject + * @returns %TRUE if an action was found and was activated + */ + activate(key_val: number, modifiers: ModifierType, gobject: GObject.Object): boolean; + /** + * Blocks all the actions with name #action_name inside #pool. + * @param action_name an action name + */ + block_action(action_name: string): void; + /** + * Retrieves the name of the action matching the given key symbol + * and modifiers bitmask. + * @param key_val a key symbol + * @param modifiers a bitmask for the modifiers + * @returns the name of the action, if found, or %NULL. The + * returned string is owned by the binding pool and should never + * be modified or freed + */ + find_action(key_val: number, modifiers: ModifierType): string; + /** + * Installs a new action inside a {@link BindingPool}. The action + * is bound to #key_val and #modifiers. + * + * The same action name can be used for multiple #key_val, #modifiers + * pairs. + * + * When an action has been activated using {@link Clutter.BindingPool.activate} + * the passed #callback will be invoked (with #data). + * + * Actions can be blocked with clutter_binding_pool_block_action() + * and then unblocked using clutter_binding_pool_unblock_action(). + * @param action_name the name of the action + * @param key_val key symbol + * @param modifiers bitmask of modifiers + * @param callback function to be called + * when the action is activated + * @param data data to be passed to #callback + * @param notify function to be called when the action is removed + * from the pool + */ + install_action(action_name: string, key_val: number, modifiers: ModifierType, callback: BindingActionFunc, data: any | null, notify: GLib.DestroyNotify): void; + /** + * A #GClosure variant of {@link Clutter.BindingPool.install_action}. + * + * Installs a new action inside a {@link BindingPool}. The action + * is bound to #key_val and #modifiers. + * + * The same action name can be used for multiple #key_val, #modifiers + * pairs. + * + * When an action has been activated using clutter_binding_pool_activate() + * the passed #closure will be invoked. + * + * Actions can be blocked with clutter_binding_pool_block_action() + * and then unblocked using clutter_binding_pool_unblock_action(). + * @param action_name the name of the action + * @param key_val key symbol + * @param modifiers bitmask of modifiers + * @param closure a #GClosure + */ + install_closure(action_name: string, key_val: number, modifiers: ModifierType, closure: GObject.Closure): void; + /** + * Allows overriding the action for #key_val and #modifiers inside a + * {@link BindingPool}. See {@link Clutter.BindingPool.install_action}. + * + * When an action has been activated using clutter_binding_pool_activate() + * the passed #callback will be invoked (with #data). + * + * Actions can be blocked with clutter_binding_pool_block_action() + * and then unblocked using clutter_binding_pool_unblock_action(). + * @param key_val key symbol + * @param modifiers bitmask of modifiers + * @param callback function to be called when the action is activated + * @param data data to be passed to #callback + * @param notify function to be called when the action is removed + * from the pool + */ + override_action(key_val: number, modifiers: ModifierType, callback: BindingActionFunc, data: any | null, notify: GLib.DestroyNotify): void; + /** + * A #GClosure variant of {@link Clutter.BindingPool.override_action}. + * + * Allows overriding the action for #key_val and #modifiers inside a + * {@link BindingPool}. See clutter_binding_pool_install_closure(). + * + * When an action has been activated using clutter_binding_pool_activate() + * the passed #callback will be invoked (with #data). + * + * Actions can be blocked with clutter_binding_pool_block_action() + * and then unblocked using clutter_binding_pool_unblock_action(). + * @param key_val key symbol + * @param modifiers bitmask of modifiers + * @param closure a #GClosure + */ + override_closure(key_val: number, modifiers: ModifierType, closure: GObject.Closure): void; + /** + * Removes the action matching the given #key_val, #modifiers pair, + * if any exists. + * @param key_val a key symbol + * @param modifiers a bitmask for the modifiers + */ + remove_action(key_val: number, modifiers: ModifierType): void; + /** + * Unblockes all the actions with name #action_name inside #pool. + * + * Unblocking an action does not cause the callback bound to it to + * be invoked in case {@link Clutter.BindingPool.activate} was called on + * an action previously blocked with clutter_binding_pool_block_action(). + * @param action_name an action name + */ + unblock_action(action_name: string): void; + connect(signal: "notify::name", callback: (owner: this, ...args: any) => void): number; + + } + + type BindingPoolInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface BindingPoolInitOptions extends BindingPoolInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link BindingPool} instead. + */ + type BindingPoolMixin = IBindingPool & GObject.Object; + + /** + * Container of key bindings. The {@link BindingPool} struct is + * private. + */ + interface BindingPool extends BindingPoolMixin {} + + class BindingPool { + public constructor(options?: Partial); + /** + * Creates a new {@link BindingPool} that can be used to store + * key bindings for an actor. The #name must be a unique identifier + * for the binding pool, so that {@link Clutter.BindingPool.find} will + * be able to return the correct binding pool. + * @param name the name of the binding pool + * @returns the newly created binding pool with the given + * name. Use {@link GObject.Object.unref} when done. + */ + public static new(name: string): BindingPool; + /** + * Finds the {@link BindingPool} with #name. + * @param name the name of the binding pool to find + * @returns a pointer to the {@link BindingPool}, or %NULL + */ + public static find(name: string): BindingPool; + /** + * Retrieves the {@link BindingPool} for the given #GObject class + * and, eventually, creates it. This function is a wrapper around + * {@link Clutter.BindingPool.new} and uses the class type name as the + * unique name for the binding pool. + * + * Calling this function multiple times will return the same + * #ClutterBindingPool. + * + * A binding pool for a class can also be retrieved using + * clutter_binding_pool_find() with the class type name: + * + * |[ + * pool = clutter_binding_pool_find (G_OBJECT_TYPE_NAME (instance)); + * ]| + * @param klass a #GObjectClass pointer + * @returns the binding pool for the given class. + * The returned {@link BindingPool} is owned by Clutter and should not + * be freed directly + */ + public static get_for_class(klass: any | null): BindingPool; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link BlurEffect} instead. + */ + interface IBlurEffect { + + } + + type BlurEffectInitOptionsMixin = OffscreenEffectInitOptions + export interface BlurEffectInitOptions extends BlurEffectInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link BlurEffect} instead. + */ + type BlurEffectMixin = IBlurEffect & OffscreenEffect; + + /** + * {@link BlurEffect} is an opaque structure + * whose members cannot be accessed directly + */ + interface BlurEffect extends BlurEffectMixin {} + + class BlurEffect { + public constructor(options?: Partial); + /** + * Creates a new {@link BlurEffect} to be used with + * {@link Clutter.Actor.add_effect} + * @returns the newly created {@link BlurEffect} or %NULL + */ + public static new(): Effect; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Box} instead. + */ + interface IBox { + /** + * @deprecated + * Use the {@link Actor.background_color} property + * + * The color to be used to paint the background of the + * {@link Box}. Setting this property will set the + * #ClutterBox:color-set property as a side effect + * + * This property sets the #ClutterActor:background-color property + * internally. + */ + color: Color; + /** + * @deprecated + * Use the {@link Actor.background_color_set} property + * + * Whether the {@link Box.color} property has been set. + * + * This property reads the #ClutterActor:background-color-set property + * internally. + */ + color_set: boolean; + /** + * @deprecated + * Use {@link Clutter.Actor.get_background_color} instead. + * + * Retrieves the background color of #box + * + * If the {@link Box.color_set} property is set to %FALSE the + * returned #ClutterColor is undefined + * @returns return location for a {@link Color} + */ + get_color(): Color; + /** + * @deprecated + * Use {@link Clutter.Actor.get_layout_manager} instead. + * + * Retrieves the {@link LayoutManager} instance used by #box + * @returns a {@link LayoutManager}. The returned + * #ClutterLayoutManager is owned by the #ClutterBox and it should not + * be unreferenced + */ + get_layout_manager(): LayoutManager; + /** + * @deprecated + * Use {@link Clutter.Actor.add_child} instead. To set + * specific layout properties, use clutter_layout_manager_child_set() + * + * Adds #actor to #box and sets layout properties at the same time, + * if the {@link LayoutManager} used by #box has them + * + * This function is a wrapper around {@link Clutter.Container.add_actor} + * and clutter_layout_manager_child_set() + * + * Language bindings should use the vector-based clutter_box_packv() + * variant instead + * @param actor a {@link Actor} + * @param first_property the name of the first property to set, or %NULL + */ + pack(actor: Actor, first_property: string): void; + /** + * @deprecated + * Use {@link Clutter.Actor.insert_child_above} instead. + * To set specific layout properties, use clutter_layout_manager_child_set() + * + * Adds #actor to #box, placing it after #sibling, and sets layout + * properties at the same time, if the {@link LayoutManager} used by + * #box supports them + * + * If #sibling is %NULL then #actor is placed at the end of the + * list of children, to be allocated and painted after every other child + * + * This function is a wrapper around {@link Clutter.Container.add_actor}, + * clutter_container_raise_child() and clutter_layout_manager_child_set() + * @param actor a {@link Actor} + * @param sibling a {@link Actor} or %NULL + * @param first_property the name of the first property to set, or %NULL + */ + pack_after(actor: Actor, sibling: Actor | null, first_property: string): void; + /** + * @deprecated + * Use {@link Clutter.Actor.insert_child_at_index} instead. + * To set specific layout properties, use clutter_layout_manager_child_set() + * + * Adds #actor to #box, placing it at #position, and sets layout + * properties at the same time, if the {@link LayoutManager} used by + * #box supports them + * + * If #position is a negative number, or is larger than the number of + * children of #box, the new child is added at the end of the list of + * children + * @param actor a {@link Actor} + * @param position the position to insert the #actor at + * @param first_property the name of the first property to set, or %NULL + */ + pack_at(actor: Actor, position: number, first_property: string): void; + /** + * @deprecated + * Use {@link Clutter.Actor.insert_child_below} instead. + * To set specific layout properties, use clutter_layout_manager_child_set() + * + * Adds #actor to #box, placing it before #sibling, and sets layout + * properties at the same time, if the {@link LayoutManager} used by + * #box supports them + * + * If #sibling is %NULL then #actor is placed at the beginning of the + * list of children, to be allocated and painted below every other child + * + * This function is a wrapper around {@link Clutter.Container.add_actor}, + * clutter_container_lower_child() and clutter_layout_manager_child_set() + * @param actor a {@link Actor} + * @param sibling a {@link Actor} or %NULL + * @param first_property the name of the first property to set, or %NULL + */ + pack_before(actor: Actor, sibling: Actor | null, first_property: string): void; + /** + * @deprecated + * Use {@link Clutter.Actor.add_child} instead. To set + * specific layout properties, use clutter_layout_manager_child_set() + * + * Vector-based variant of {@link Clutter.Box.pack}, intended for language + * bindings to use + * @param actor a {@link Actor} + * @param n_properties the number of properties to set + * @param properties a vector + * containing the property names to set + * @param values a vector containing the property + * values to set + */ + packv(actor: Actor, n_properties: number, properties: string[], values: GObject.Value[]): void; + /** + * @deprecated + * Use {@link Clutter.Actor.set_background_color} instead. + * + * Sets (or unsets) the background color for #box + * @param color the background color, or %NULL to unset + */ + set_color(color: Color | null): void; + /** + * @deprecated + * Use {@link Clutter.Actor.set_layout_manager} instead. + * + * Sets the {@link LayoutManager} for #box + * + * A #ClutterLayoutManager is a delegate object that controls the + * layout of the children of #box + * @param manager a {@link LayoutManager} + */ + set_layout_manager(manager: LayoutManager): void; + connect(signal: "notify::color", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::color-set", callback: (owner: this, ...args: any) => void): number; + + } + + type BoxInitOptionsMixin = ActorInitOptions & Atk.ImplementorIfaceInitOptions & AnimatableInitOptions & ContainerInitOptions & ScriptableInitOptions & + Pick; + + export interface BoxInitOptions extends BoxInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Box} instead. + */ + type BoxMixin = IBox & Actor & Atk.ImplementorIface & Animatable & Container & Scriptable; + + /** + * The {@link Box} structure contains only private data and should + * be accessed using the provided API + */ + interface Box extends BoxMixin {} + + class Box { + public constructor(options?: Partial); + /** + * @deprecated + * Use {@link Clutter.Actor.new} instead. + * + * Creates a new {@link Box}. The children of the box will be layed + * out by the passed #manager + * @param manager a {@link LayoutManager} + * @returns the newly created {@link Box} actor + */ + public static new(manager: LayoutManager): Actor; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link BoxLayout} instead. + */ + interface IBoxLayout { + /** + * @deprecated + * The {@link BoxLayout} will honour the easing state of + * the children when allocating them. + * + * The duration of the animations, in case {@link BoxLayout.use_animations} + * is set to %TRUE. + * + * The duration is expressed in milliseconds. + */ + easing_duration: number; + /** + * @deprecated + * The {@link BoxLayout} will honour the easing state of + * the children when allocating them. + * + * The easing mode for the animations, in case + * {@link BoxLayout.use_animations} is set to %TRUE. + * + * The easing mode has the same semantics of #ClutterAnimation:mode: it can + * either be a value from the #ClutterAnimationMode enumeration, like + * %CLUTTER_EASE_OUT_CUBIC, or a logical id as returned by + * {@link Clutter.Alpha.register_func}. + * + * The default value is %CLUTTER_EASE_OUT_CUBIC. + */ + easing_mode: number; + /** + * Whether the {@link BoxLayout} should arrange its children + * homogeneously, i.e. all children get the same size + */ + homogeneous: boolean; + /** + * The orientation of the {@link BoxLayout}, either horizontal + * or vertical + */ + orientation: Orientation; + /** + * Whether the {@link BoxLayout} should pack items at the start + * or append them at the end + */ + pack_start: boolean; + /** + * The spacing between children of the {@link BoxLayout}, in pixels + */ + spacing: number; + /** + * @deprecated + * {@link BoxLayout} will honour the easing state + * of the children when allocating them. + * + * Whether the {@link BoxLayout} should animate changes in the + * layout, overriding the easing state of the children. + */ + use_animations: boolean; + /** + * @deprecated + * Use {@link BoxLayout.orientation} instead. + * + * Whether the {@link BoxLayout} should arrange its children + * alongside the Y axis, instead of alongside the X axis + */ + vertical: boolean; + /** + * @deprecated + * {@link BoxLayout} will honour #ClutterActor's + * #ClutterActor:x-align and #ClutterActor:y-align properies + * + * Retrieves the horizontal and vertical alignment policies for #actor + * as set using {@link Clutter.BoxLayout.pack} or clutter_box_layout_set_alignment() + * @param actor a {@link Actor} child of #layout + * @returns return location for the horizontal alignment policy + * + * return location for the vertical alignment policy + */ + get_alignment(actor: Actor): [ x_align: BoxAlignment, y_align: BoxAlignment ]; + /** + * Retrieves the duration set using {@link Clutter.BoxLayout.set_easing_duration} + * @returns the duration of the animations, in milliseconds + */ + get_easing_duration(): number; + /** + * Retrieves the easing mode set using {@link Clutter.BoxLayout.set_easing_mode} + * @returns an easing mode + */ + get_easing_mode(): number; + /** + * @deprecated + * {@link BoxLayout} will honour #ClutterActor's + * #ClutterActor:x-expand and #ClutterActor:y-expand properies + * + * Retrieves whether #actor should expand inside #layout + * @param actor a {@link Actor} child of #layout + * @returns %TRUE if the {@link Actor} should expand, %FALSE otherwise + */ + get_expand(actor: Actor): boolean; + /** + * @deprecated + * {@link BoxLayout} will honour #ClutterActor's + * #ClutterActor:x-align and #ClutterActor:y-align properies + * + * Retrieves the horizontal and vertical fill policies for #actor + * as set using {@link Clutter.BoxLayout.pack} or clutter_box_layout_set_fill() + * @param actor a {@link Actor} child of #layout + * @returns return location for the horizontal fill policy + * + * return location for the vertical fill policy + */ + get_fill(actor: Actor): [ x_fill: boolean, y_fill: boolean ]; + /** + * Retrieves if the children sizes are allocated homogeneously. + * @returns %TRUE if the {@link BoxLayout} is arranging its children + * homogeneously, and %FALSE otherwise + */ + get_homogeneous(): boolean; + /** + * Retrieves the orientation of the #layout. + * @returns the orientation of the layout + */ + get_orientation(): Orientation; + /** + * Retrieves the value set using {@link Clutter.BoxLayout.set_pack_start} + * @returns %TRUE if the {@link BoxLayout} should pack children + * at the beginning of the layout, and %FALSE otherwise + */ + get_pack_start(): boolean; + /** + * Retrieves the spacing set using {@link Clutter.BoxLayout.set_spacing} + * @returns the spacing between children of the {@link BoxLayout} + */ + get_spacing(): number; + /** + * Retrieves whether #layout should animate changes in the layout properties. + * @returns %TRUE if the animations should be used, %FALSE otherwise + */ + get_use_animations(): boolean; + /** + * @deprecated + * Use {@link Clutter.BoxLayout.get_orientation} instead + * + * Retrieves the orientation of the #layout as set using the + * {@link Clutter.BoxLayout.set_vertical} function + * @returns %TRUE if the {@link BoxLayout} is arranging its children + * vertically, and %FALSE otherwise + */ + get_vertical(): boolean; + /** + * @deprecated + * {@link BoxLayout} honours #ClutterActor's + * align and expand properties. The preferred way is adding + * the #actor with {@link Clutter.Actor.add_child} and setting + * #ClutterActor:x-align, #ClutterActor:y-align, + * #ClutterActor:x-expand and #ClutterActor:y-expand + * + * Packs #actor inside the {@link Container} associated to #layout + * and sets the layout properties + * @param actor a {@link Actor} + * @param expand whether the #actor should expand + * @param x_fill whether the #actor should fill horizontally + * @param y_fill whether the #actor should fill vertically + * @param x_align the horizontal alignment policy for #actor + * @param y_align the vertical alignment policy for #actor + */ + pack(actor: Actor, expand: boolean, x_fill: boolean, y_fill: boolean, x_align: BoxAlignment, y_align: BoxAlignment): void; + /** + * @deprecated + * {@link BoxLayout} will honour #ClutterActor's + * #ClutterActor:x-align and #ClutterActor:y-align properies + * + * Sets the horizontal and vertical alignment policies for #actor + * inside #layout + * @param actor a {@link Actor} child of #layout + * @param x_align Horizontal alignment policy for #actor + * @param y_align Vertical alignment policy for #actor + */ + set_alignment(actor: Actor, x_align: BoxAlignment, y_align: BoxAlignment): void; + /** + * @deprecated + * The layout manager will honour the easing state + * of the children when allocating them. + * + * Sets the duration of the animations used by #layout when animating changes + * in the layout properties. + * @param msecs the duration of the animations, in milliseconds + */ + set_easing_duration(msecs: number): void; + /** + * @deprecated + * The layout manager will honour the easing state + * of the children when allocating them. + * + * Sets the easing mode to be used by #layout when animating changes in layout + * properties. + * @param mode an easing mode, either from {@link AnimationMode} or a logical id + * from {@link Clutter.Alpha.register_func} + */ + set_easing_mode(mode: number): void; + /** + * @deprecated + * {@link BoxLayout} will honour #ClutterActor's + * #ClutterActor:x-expand and #ClutterActor:y-expand properies + * + * Sets whether #actor should expand inside #layout + * @param actor a {@link Actor} child of #layout + * @param expand whether #actor should expand + */ + set_expand(actor: Actor, expand: boolean): void; + /** + * @deprecated + * {@link BoxLayout} will honour #ClutterActor's + * #ClutterActor:x-align and #ClutterActor:y-align properies + * + * Sets the horizontal and vertical fill policies for #actor + * inside #layout + * @param actor a {@link Actor} child of #layout + * @param x_fill whether #actor should fill horizontally the allocated space + * @param y_fill whether #actor should fill vertically the allocated space + */ + set_fill(actor: Actor, x_fill: boolean, y_fill: boolean): void; + /** + * Sets whether the size of #layout children should be + * homogeneous + * @param homogeneous %TRUE if the layout should be homogeneous + */ + set_homogeneous(homogeneous: boolean): void; + /** + * Sets the orientation of the {@link BoxLayout} layout manager. + * @param orientation the orientation of the {@link BoxLayout} + */ + set_orientation(orientation: Orientation): void; + /** + * Sets whether children of #layout should be layed out by appending + * them or by prepending them + * @param pack_start %TRUE if the #layout should pack children at the + * beginning of the layout + */ + set_pack_start(pack_start: boolean): void; + /** + * Sets the spacing between children of #layout + * @param spacing the spacing between children of the layout, in pixels + */ + set_spacing(spacing: number): void; + /** + * @deprecated + * The layout manager will honour the easing state + * of the children when allocating them. + * + * Sets whether #layout should animate changes in the layout properties + * + * The duration of the animations is controlled by + * {@link Clutter.BoxLayout.set_easing_duration}; the easing mode to be used + * by the animations is controlled by clutter_box_layout_set_easing_mode(). + * + * Enabling animations will override the easing state of each child + * of the actor using #layout, and will use the {@link BoxLayout.easing_mode} + * and #ClutterBoxLayout:easing-duration properties instead. + * @param animate %TRUE if the #layout should use animations + */ + set_use_animations(animate: boolean): void; + /** + * @deprecated + * Use {@link Clutter.BoxLayout.set_orientation} instead. + * + * Sets whether #layout should arrange its children vertically alongside + * the Y axis, instead of horizontally alongside the X axis + * @param vertical %TRUE if the layout should be vertical + */ + set_vertical(vertical: boolean): void; + connect(signal: "notify::easing-duration", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::easing-mode", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::homogeneous", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::orientation", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::pack-start", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::spacing", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::use-animations", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::vertical", callback: (owner: this, ...args: any) => void): number; + + } + + type BoxLayoutInitOptionsMixin = LayoutManagerInitOptions & + Pick; + + export interface BoxLayoutInitOptions extends BoxLayoutInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link BoxLayout} instead. + */ + type BoxLayoutMixin = IBoxLayout & LayoutManager; + + /** + * The {@link BoxLayout} structure contains only private data + * and should be accessed using the provided API + */ + interface BoxLayout extends BoxLayoutMixin {} + + class BoxLayout { + public constructor(options?: Partial); + /** + * Creates a new {@link BoxLayout} layout manager + * @returns the newly created {@link BoxLayout} + */ + public static new(): LayoutManager; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link BrightnessContrastEffect} instead. + */ + interface IBrightnessContrastEffect { + /** + * The brightness change to apply to the effect. + * + * This property uses a {@link Color} to represent the changes to each + * color channel. The range is [ 0, 255 ], with 127 as the value used + * to indicate no change; values smaller than 127 indicate a decrease + * in brightness, and values larger than 127 indicate an increase in + * brightness. + */ + brightness: Color; + /** + * The contrast change to apply to the effect. + * + * This property uses a {@link Color} to represent the changes to each + * color channel. The range is [ 0, 255 ], with 127 as the value used + * to indicate no change; values smaller than 127 indicate a decrease + * in contrast, and values larger than 127 indicate an increase in + * contrast. + */ + contrast: Color; + /** + * Retrieves the change in brightness used by #effect. + * @returns return location for red component of the + * change in brightness + * + * return location for green component of the + * change in brightness + * + * return location for blue component of the + * change in brightness + */ + get_brightness(): [ red: number | null, green: number | null, blue: number | null ]; + /** + * Retrieves the contrast value used by #effect. + * @returns return location for red component of the + * change in contrast + * + * return location for green component of the + * change in contrast + * + * return location for blue component of the + * change in contrast + */ + get_contrast(): [ red: number | null, green: number | null, blue: number | null ]; + /** + * The range of #brightness is [-1.0, 1.0], where 0.0 designates no change; + * a value below 0.0 indicates a decrease in brightness; and a value + * above 0.0 indicates an increase of brightness. + * @param brightness the brightness change for all three components (r, g, b) + */ + set_brightness(brightness: number): void; + /** + * The range for each component is [-1.0, 1.0] where 0.0 designates no change, + * values below 0.0 mean a decrease in brightness, and values above indicate + * an increase. + * @param red red component of the change in brightness + * @param green green component of the change in brightness + * @param blue blue component of the change in brightness + */ + set_brightness_full(red: number, green: number, blue: number): void; + /** + * The range for #contrast is [-1.0, 1.0], where 0.0 designates no change; + * a value below 0.0 indicates a decrease in contrast; and a value above + * 0.0 indicates an increase. + * @param contrast contrast change for all three channels + */ + set_contrast(contrast: number): void; + /** + * The range for each component is [-1.0, 1.0] where 0.0 designates no change, + * values below 0.0 mean a decrease in contrast, and values above indicate + * an increase. + * @param red red component of the change in contrast + * @param green green component of the change in contrast + * @param blue blue component of the change in contrast + */ + set_contrast_full(red: number, green: number, blue: number): void; + connect(signal: "notify::brightness", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::contrast", callback: (owner: this, ...args: any) => void): number; + + } + + type BrightnessContrastEffectInitOptionsMixin = OffscreenEffectInitOptions & + Pick; + + export interface BrightnessContrastEffectInitOptions extends BrightnessContrastEffectInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link BrightnessContrastEffect} instead. + */ + type BrightnessContrastEffectMixin = IBrightnessContrastEffect & OffscreenEffect; + + /** + * {@link BrightnessContrastEffect} is an opaque structure + * whose members cannot be directly accessed + */ + interface BrightnessContrastEffect extends BrightnessContrastEffectMixin {} + + class BrightnessContrastEffect { + public constructor(options?: Partial); + /** + * Creates a new {@link BrightnessContrastEffect} to be used with + * {@link Clutter.Actor.add_effect} + * @returns the newly created + * {@link BrightnessContrastEffect} or %NULL. Use {@link GObject.Object.unref} when + * done. + */ + public static new(): Effect; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link CairoTexture} instead. + */ + interface ICairoTexture { + /** + * Controls whether the {@link CairoTexture} should automatically + * resize the Cairo surface whenever the actor's allocation changes. + * If :auto-resize is set to %TRUE the surface contents will also + * be invalidated automatically. + */ + auto_resize: boolean; + /** + * The height of the Cairo surface used by the {@link CairoTexture} + * actor, in pixels. + */ + surface_height: number; + /** + * The width of the Cairo surface used by the {@link CairoTexture} + * actor, in pixels. + */ + surface_width: number; + /** + * @deprecated + * Use {@link Canvas} instead + * + * Clears #self's internal drawing surface, so that the next upload + * will replace the previous contents of the {@link CairoTexture} + * rather than adding to it. + * + * Calling this function from within a #ClutterCairoTexture::draw + * signal handler will clear the invalidated area. + */ + clear(): void; + /** + * @deprecated + * Use the {@link CairoTexture.draw} signal and + * the {@link Clutter.CairoTexture.invalidate} function to obtain a + * Cairo context for 2D drawing. + * + * Creates a new Cairo context for the #cairo texture. It is + * similar to using {@link Clutter.CairoTexture.create_region} with #x_offset + * and #y_offset of 0, #width equal to the #cairo texture surface width + * and #height equal to the #cairo texture surface height. + * + * Do not call this function within the paint virtual + * function or from a callback to the {@link Actor.paint} + * signal. + * @returns a newly created Cairo context. Use {@link Cairo.destroy} + * to upload the contents of the context when done drawing + */ + create(): cairo.Context; + /** + * @deprecated + * Use the {@link CairoTexture.draw} signal and + * {@link Clutter.CairoTexture.invalidate_rectangle} to obtain a + * clipped Cairo context for 2D drawing. + * + * Creates a new Cairo context that will updat the region defined + * by #x_offset, #y_offset, #width and #height. + * + * Do not call this function within the paint virtual + * function or from a callback to the {@link Actor.paint} + * signal. + * @param x_offset offset of the region on the X axis + * @param y_offset offset of the region on the Y axis + * @param width width of the region, or -1 for the full surface width + * @param height height of the region, or -1 for the full surface height + * @returns a newly created Cairo context. Use {@link Cairo.destroy} + * to upload the contents of the context when done drawing + */ + create_region(x_offset: number, y_offset: number, width: number, height: number): cairo.Context; + /** + * @deprecated + * Use {@link Canvas} instead + * + * Retrieves the value set using {@link Clutter.CairoTexture.set_auto_resize}. + * @returns %TRUE if the {@link CairoTexture} should track the + * allocation, and %FALSE otherwise + */ + get_auto_resize(): boolean; + /** + * @deprecated + * Use {@link Canvas} instead + * + * Retrieves the surface width and height for #self. + * @returns return location for the surface width, or %NULL + * + * return location for the surface height, or %NULL + */ + get_surface_size(): [ width: number, height: number ]; + /** + * @deprecated + * Use {@link Canvas} instead + * + * Invalidates the whole surface of a {@link CairoTexture}. + * + * This function will cause the #ClutterCairoTexture::draw signal + * to be emitted. + * + * See also: {@link Clutter.CairoTexture.invalidate_rectangle} + */ + invalidate(): void; + /** + * @deprecated + * Use {@link Canvas} instead + * + * Invalidates a rectangular region of a {@link CairoTexture}. + * + * The invalidation will cause the #ClutterCairoTexture::draw signal + * to be emitted. + * + * See also: {@link Clutter.CairoTexture.invalidate} + * @param rect a rectangle with the area to invalida, + * or %NULL to perform an unbounded invalidation + */ + invalidate_rectangle(rect: cairo.RectangleInt | null): void; + /** + * @deprecated + * Use {@link Canvas} instead + * + * Sets whether the {@link CairoTexture} should ensure that the + * backing Cairo surface used matches the allocation assigned to + * the actor. If the allocation changes, the contents of the + * #ClutterCairoTexture will also be invalidated automatically. + * @param value %TRUE if the {@link CairoTexture} should bind the surface + * size to the allocation + */ + set_auto_resize(value: boolean): void; + /** + * @deprecated + * Use {@link Canvas} instead + * + * Resizes the Cairo surface used by #self to #width and #height. + * + * This function will not invalidate the contents of the Cairo + * texture: you will have to explicitly call either + * {@link Clutter.CairoTexture.invalidate_rectangle} or + * clutter_cairo_texture_invalidate(). + * @param width the new width of the surface + * @param height the new height of the surface + */ + set_surface_size(width: number, height: number): void; + /** + * The ::create-surface signal is emitted when a {@link CairoTexture} + * news its surface (re)created, which happens either when the Cairo + * context is created with {@link Clutter.CairoTexture.create} or + * clutter_cairo_texture_create_region(), or when the surface is resized + * through clutter_cairo_texture_set_surface_size(). + * + * The first signal handler that returns a non-%NULL, valid surface will + * stop any further signal emission, and the returned surface will be + * the one used. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - width: the width of the surface to create + * - height: the height of the surface to create + * - returns the newly created #cairo_surface_t for the texture + * + * @returns Callback ID + */ + connect(signal: "create-surface", callback: (owner: this, width: number, height: number) => cairo.Surface): number; + /** + * The ::draw signal is emitted each time a {@link CairoTexture} has + * been invalidated. + * + * The passed Cairo context passed will be clipped to the invalidated + * area. + * + * It is safe to connect multiple callbacks to this signals; the state + * of the Cairo context passed to each callback is automatically saved + * and restored, so it's not necessary to call {@link Cairo.save} and + * cairo_restore(). + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - cr: the Cairo context to use to draw + * - returns %TRUE if the signal emission should stop, and %FALSE + * to continue + * + * @returns Callback ID + */ + connect(signal: "draw", callback: (owner: this, cr: cairo.Context) => boolean): number; + + connect(signal: "notify::auto-resize", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::surface-height", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::surface-width", callback: (owner: this, ...args: any) => void): number; + + } + + type CairoTextureInitOptionsMixin = TextureInitOptions & Atk.ImplementorIfaceInitOptions & AnimatableInitOptions & ContainerInitOptions & ScriptableInitOptions & + Pick; + + export interface CairoTextureInitOptions extends CairoTextureInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link CairoTexture} instead. + */ + type CairoTextureMixin = ICairoTexture & Texture & Atk.ImplementorIface & Animatable & Container & Scriptable; + + /** + * The {@link CairoTexture} struct contains only private data. + */ + interface CairoTexture extends CairoTextureMixin {} + + class CairoTexture { + public constructor(options?: Partial); + /** + * @deprecated + * Use {@link Canvas} instead + * + * Creates a new {@link CairoTexture} actor, with a surface of #width by + * #height pixels. + * @param width the width of the surface + * @param height the height of the surface + * @returns the newly created {@link CairoTexture} actor + */ + public static new(width: number, height: number): Actor; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Canvas} instead. + */ + interface ICanvas { + /** + * The height of the canvas. + */ + height: number; + /** + * The scaling factor to be applied to the Cairo surface used for + * drawing. + * + * If {@link Canvas.scale_factor} is set to a negative value, the + * value of the #ClutterSettings:window-scaling-factor property is + * used instead. + * + * Use #ClutterCanvas:scale-factor-set to check if the scale factor + * is set. + */ + scale_factor: number; + /** + * Whether the {@link Canvas.scale_factor} property is set. + * + * If the #ClutterCanvas:scale-factor-set property is %FALSE + * then #ClutterCanvas will use the #ClutterSettings:window-scaling-factor + * property. + */ + readonly scale_factor_set: boolean; + /** + * The width of the canvas. + */ + width: number; + /** + * Retrieves the scaling factor of #canvas, as set using + * {@link Clutter.Canvas.set_scale_factor}. + * @returns the scaling factor, or -1 if the #canvas + * uses the default from {@link Settings} + */ + get_scale_factor(): number; + /** + * Sets the scaling factor for the Cairo surface used by #canvas. + * + * This function should rarely be used. + * + * The default scaling factor of a {@link Canvas} content uses the + * #ClutterSettings:window-scaling-factor property, which is set by + * the windowing system. By using this function it is possible to + * override that setting. + * + * Changing the scale factor will invalidate the #canvas. + * @param scale the scale factor, or -1 for the default + */ + set_scale_factor(scale: number): void; + /** + * Sets the size of the #canvas, and invalidates the content. + * + * This function will cause the #canvas to be invalidated only + * if the size of the canvas surface has changed. + * + * If you want to invalidate the contents of the #canvas when setting + * the size, you can use the return value of the function to conditionally + * call {@link Clutter.Content.invalidate}: + * + * |[ + * if (!clutter_canvas_set_size (canvas, width, height)) + * clutter_content_invalidate (CLUTTER_CONTENT (canvas)); + * ]| + * @param width the width of the canvas, in pixels + * @param height the height of the canvas, in pixels + * @returns this function returns %TRUE if the size change + * caused a content invalidation, and %FALSE otherwise + */ + set_size(width: number, height: number): boolean; + /** + * The {@link Canvas.draw} signal is emitted each time a canvas is + * invalidated. + * + * It is safe to connect multiple handlers to this signal: each + * handler invocation will be automatically protected by {@link Cairo.save} + * and cairo_restore() pairs. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - cr: the Cairo context used to draw + * - width: the width of the #canvas + * - height: the height of the #canvas + * - returns %TRUE if the signal emission should stop, and + * %FALSE otherwise + * + * @returns Callback ID + */ + connect(signal: "draw", callback: (owner: this, cr: cairo.Context, width: number, height: number) => boolean): number; + + connect(signal: "notify::height", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::scale-factor", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::scale-factor-set", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::width", callback: (owner: this, ...args: any) => void): number; + + } + + type CanvasInitOptionsMixin = GObject.ObjectInitOptions & ContentInitOptions & + Pick; + + export interface CanvasInitOptions extends CanvasInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Canvas} instead. + */ + type CanvasMixin = ICanvas & GObject.Object & Content; + + /** + * The {@link Canvas} structure contains + * private data and should only be accessed using the provided + * API. + */ + interface Canvas extends CanvasMixin {} + + class Canvas { + public constructor(options?: Partial); + /** + * Creates a new instance of {@link Canvas}. + * + * You should call {@link Clutter.Canvas.set_size} to set the size of the canvas. + * + * You should call clutter_content_invalidate() every time you wish to + * draw the contents of the canvas. + * @returns The newly allocated instance of + * {@link Canvas}. Use {@link GObject.Object.unref} when done. + */ + public static new(): Content; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link ChildMeta} instead. + */ + interface IChildMeta { + /** + * The {@link Actor} being wrapped by this #ClutterChildMeta + */ + actor: Actor; + /** + * The {@link Container} that created this #ClutterChildMeta. + */ + container: Container; + /** + * the container handling this data + */ + // readonly container: Container; + /** + * the actor wrapped by this data + */ + // readonly actor: Actor; + /** + * Retrieves the actor wrapped by #data + * @returns a {@link Actor} + */ + get_actor(): Actor; + /** + * Retrieves the container using #data + * @returns a {@link Container} + */ + get_container(): Container; + connect(signal: "notify::actor", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::container", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::container", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::actor", callback: (owner: this, ...args: any) => void): number; + + } + + type ChildMetaInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface ChildMetaInitOptions extends ChildMetaInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link ChildMeta} instead. + */ + type ChildMetaMixin = IChildMeta & GObject.Object; + + /** + * Base interface for container specific state for child actors. A child + * data is meant to be used when you need to keep track of information + * about each individual child added to a container. + * + * In order to use it you should create your own subclass of + * {@link ChildMeta} and set the #ClutterContainerIface child_meta_type + * interface member to your subclass type, like: + * + * |[ + * static void + * my_container_iface_init (ClutterContainerIface *iface) + * { + * // set the rest of the #ClutterContainer vtable + * + * container_iface->child_meta_type = MY_TYPE_CHILD_META; + * } + * ]| + * + * This will automatically create a #ClutterChildMeta of type + * `MY_TYPE_CHILD_META` for every actor that is added to the container. + * + * The child data for an actor can be retrieved using the + * {@link Clutter.Container.get_child_meta} function. + * + * The properties of the data and your subclass can be manipulated with + * clutter_container_child_set() and clutter_container_child_get() which + * act like g_object_set() and g_object_get(). + * + * You can provide hooks for your own storage as well as control the + * instantiation by overriding the #ClutterContainerIface virtual functions + * #ClutterContainerIface.create_child_meta(), #ClutterContainerIface.destroy_child_meta(), + * and #ClutterContainerIface.get_child_meta(). + */ + interface ChildMeta extends ChildMetaMixin {} + + class ChildMeta { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link ClickAction} instead. + */ + interface IClickAction { + /** + * Whether the clickable actor has the pointer grabbed + */ + readonly held: boolean; + /** + * The minimum duration of a press for it to be recognized as a long + * press gesture, in milliseconds. + * + * A value of -1 will make the {@link ClickAction} use the value of + * the #ClutterSettings:long-press-duration property. + */ + long_press_duration: number; + /** + * The maximum allowed distance that can be covered (on both axes) before + * a long press gesture is cancelled, in pixels. + * + * A value of -1 will make the {@link ClickAction} use the value of + * the #ClutterSettings:dnd-drag-threshold property. + */ + long_press_threshold: number; + /** + * Whether the clickable actor should be in "pressed" state + */ + readonly pressed: boolean; + /** + * Retrieves the button that was pressed. + * @returns the button value + */ + get_button(): number; + /** + * Retrieves the screen coordinates of the button press. + * @returns return location for the X coordinate, or %NULL + * + * return location for the Y coordinate, or %NULL + */ + get_coords(): [ press_x: number, press_y: number ]; + /** + * Retrieves the modifier state of the click action. + * @returns the modifier state parameter, or 0 + */ + get_state(): ModifierType; + /** + * Emulates a release of the pointer button, which ungrabs the pointer + * and unsets the {@link ClickAction.pressed} state. + * + * This function will also cancel the long press gesture if one was + * initiated. + * + * This function is useful to break a grab, for instance after a certain + * amount of time has passed. + */ + release(): void; + /** + * The ::clicked signal is emitted when the {@link Actor} to which + * a #ClutterClickAction has been applied should respond to a + * pointer button press and release events + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} attached to the #action + * + * @returns Callback ID + */ + connect(signal: "clicked", callback: (owner: this, actor: Actor) => void): number; + /** + * The ::long-press signal is emitted during the long press gesture + * handling. + * + * This signal can be emitted multiple times with different states. + * + * The %CLUTTER_LONG_PRESS_QUERY state will be emitted on button presses, + * and its return value will determine whether the long press handling + * should be initiated. If the signal handlers will return %TRUE, the + * %CLUTTER_LONG_PRESS_QUERY state will be followed either by a signal + * emission with the %CLUTTER_LONG_PRESS_ACTIVATE state if the long press + * constraints were respected, or by a signal emission with the + * %CLUTTER_LONG_PRESS_CANCEL state if the long press was cancelled. + * + * It is possible to forcibly cancel a long press detection using + * {@link Clutter.ClickAction.release}. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} attached to the #action + * - state: the long press state + * - returns Only the %CLUTTER_LONG_PRESS_QUERY state uses the + * returned value of the handler; other states will ignore it + * + * @returns Callback ID + */ + connect(signal: "long-press", callback: (owner: this, actor: Actor, state: LongPressState) => boolean): number; + + connect(signal: "notify::held", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::long-press-duration", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::long-press-threshold", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::pressed", callback: (owner: this, ...args: any) => void): number; + + } + + type ClickActionInitOptionsMixin = ActionInitOptions & + Pick; + + export interface ClickActionInitOptions extends ClickActionInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link ClickAction} instead. + */ + type ClickActionMixin = IClickAction & Action; + + /** + * The {@link ClickAction} structure contains + * only private data and should be accessed using the provided API + */ + interface ClickAction extends ClickActionMixin {} + + class ClickAction { + public constructor(options?: Partial); + /** + * Creates a new {@link ClickAction} instance + * @returns the newly created {@link ClickAction} + */ + public static new(): Action; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link ClipNode} instead. + */ + interface IClipNode { + + } + + type ClipNodeInitOptionsMixin = PaintNodeInitOptions + export interface ClipNodeInitOptions extends ClipNodeInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link ClipNode} instead. + */ + type ClipNodeMixin = IClipNode & PaintNode; + + /** + * The {@link TextNode} structure is an opaque + * type whose members cannot be directly accessed. + */ + interface ClipNode extends ClipNodeMixin {} + + class ClipNode { + public constructor(options?: Partial); + /** + * Creates a new {@link PaintNode} that will clip its child + * nodes to the 2D regions added to it. + * @returns the newly created {@link PaintNode}. + * Use {@link Clutter.PaintNode.unref} when done. + */ + public static new(): PaintNode; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Clone} instead. + */ + interface IClone { + /** + * This property specifies the source actor being cloned. + */ + source: Actor; + /** + * Retrieves the source {@link Actor} being cloned by #self. + * @returns the actor source for the clone + */ + get_source(): Actor; + /** + * Sets #source as the source actor to be cloned by #self. + * @param source a {@link Actor}, or %NULL + */ + set_source(source: Actor | null): void; + connect(signal: "notify::source", callback: (owner: this, ...args: any) => void): number; + + } + + type CloneInitOptionsMixin = ActorInitOptions & Atk.ImplementorIfaceInitOptions & AnimatableInitOptions & ContainerInitOptions & ScriptableInitOptions & + Pick; + + export interface CloneInitOptions extends CloneInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Clone} instead. + */ + type CloneMixin = IClone & Actor & Atk.ImplementorIface & Animatable & Container & Scriptable; + + /** + * The {@link Clone} structure contains only private data + * and should be accessed using the provided API + */ + interface Clone extends CloneMixin {} + + class Clone { + public constructor(options?: Partial); + /** + * Creates a new {@link Actor} which clones #source/ + * @param source a {@link Actor}, or %NULL + * @returns the newly created {@link Clone} + */ + public static new(source: Actor): Actor; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link ColorNode} instead. + */ + interface IColorNode { + + } + + type ColorNodeInitOptionsMixin = PipelineNodeInitOptions + export interface ColorNodeInitOptions extends ColorNodeInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link ColorNode} instead. + */ + type ColorNodeMixin = IColorNode & PipelineNode; + + /** + * The {@link TextNode} structure is an opaque + * type whose members cannot be directly accessed. + */ + interface ColorNode extends ColorNodeMixin {} + + class ColorNode { + public constructor(options?: Partial); + /** + * Creates a new {@link PaintNode} that will paint a solid color + * fill using #color. + * @param color the color to paint, or %NULL + * @returns the newly created {@link PaintNode}. Use + * {@link Clutter.PaintNode.unref} when done + */ + public static new(color: Color | null): PaintNode; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link ColorizeEffect} instead. + */ + interface IColorizeEffect { + /** + * The tint to apply to the actor + */ + tint: Color; + /** + * Retrieves the tint used by #effect + * @returns return location for the color used + */ + get_tint(): Color; + /** + * Sets the tint to be used when colorizing + * @param tint the color to be used + */ + set_tint(tint: Color): void; + connect(signal: "notify::tint", callback: (owner: this, ...args: any) => void): number; + + } + + type ColorizeEffectInitOptionsMixin = OffscreenEffectInitOptions & + Pick; + + export interface ColorizeEffectInitOptions extends ColorizeEffectInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link ColorizeEffect} instead. + */ + type ColorizeEffectMixin = IColorizeEffect & OffscreenEffect; + + /** + * {@link ColorizeEffect} is an opaque structure + * whose members cannot be directly accessed + */ + interface ColorizeEffect extends ColorizeEffectMixin {} + + class ColorizeEffect { + public constructor(options?: Partial); + /** + * Creates a new {@link ColorizeEffect} to be used with + * {@link Clutter.Actor.add_effect} + * @param tint the color to be used + * @returns the newly created {@link ColorizeEffect} or %NULL + */ + public static new(tint: Color): Effect; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Constraint} instead. + */ + interface IConstraint { + + } + + type ConstraintInitOptionsMixin = ActorMetaInitOptions + export interface ConstraintInitOptions extends ConstraintInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Constraint} instead. + */ + type ConstraintMixin = IConstraint & ActorMeta; + + /** + * The {@link Constraint} structure contains only + * private data and should be accessed using the provided API + */ + interface Constraint extends ConstraintMixin {} + + class Constraint { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link DeformEffect} instead. + */ + interface IDeformEffect { + /** + * A material to be used when painting the back of the actor + * to which this effect has been applied + * + * By default, no material will be used + */ + back_material: any; + /** + * The number of horizontal tiles. The bigger the number, the + * smaller the tiles + */ + x_tiles: number; + /** + * The number of vertical tiles. The bigger the number, the + * smaller the tiles + */ + y_tiles: number; + /** + * Retrieves the handle to the back face material used by #effect + * @returns a handle for the material, or %NULL. + * The returned material is owned by the {@link DeformEffect} and it + * should not be freed directly + */ + get_back_material(): Cogl.Handle; + /** + * Retrieves the number of horizontal and vertical tiles used to sub-divide + * the actor's geometry during the effect + * @returns return location for the number of horizontal tiles, + * or %NULL + * + * return location for the number of vertical tiles, + * or %NULL + */ + get_n_tiles(): [ x_tiles: number, y_tiles: number ]; + /** + * Invalidates the #effect's vertices and, if it is associated + * to an actor, it will queue a redraw + */ + invalidate(): void; + /** + * Sets the material that should be used when drawing the back face + * of the actor during a deformation + * + * The {@link DeformEffect} will take a reference on the material's + * handle + * @param material a handle to a Cogl material + */ + set_back_material(material: Cogl.Handle | null): void; + /** + * Sets the number of horizontal and vertical tiles to be used + * when applying the effect + * + * More tiles allow a finer grained deformation at the expenses + * of computation + * @param x_tiles number of horizontal tiles + * @param y_tiles number of vertical tiles + */ + set_n_tiles(x_tiles: number, y_tiles: number): void; + connect(signal: "notify::back-material", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::x-tiles", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::y-tiles", callback: (owner: this, ...args: any) => void): number; + + } + + type DeformEffectInitOptionsMixin = OffscreenEffectInitOptions & + Pick; + + export interface DeformEffectInitOptions extends DeformEffectInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link DeformEffect} instead. + */ + type DeformEffectMixin = IDeformEffect & OffscreenEffect; + + /** + * The {@link DeformEffect} structure contains + * only private data and should be accessed using the provided API + */ + interface DeformEffect extends DeformEffectMixin {} + + class DeformEffect { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link DesaturateEffect} instead. + */ + interface IDesaturateEffect { + /** + * The desaturation factor, between 0.0 (no desaturation) and 1.0 (full + * desaturation). + */ + factor: number; + /** + * Retrieves the desaturation factor of #effect + * @returns the desaturation factor + */ + get_factor(): number; + /** + * Sets the desaturation factor for #effect, with 0.0 being "do not desaturate" + * and 1.0 being "fully desaturate" + * @param factor the desaturation factor, between 0.0 and 1.0 + */ + set_factor(factor: number): void; + connect(signal: "notify::factor", callback: (owner: this, ...args: any) => void): number; + + } + + type DesaturateEffectInitOptionsMixin = OffscreenEffectInitOptions & + Pick; + + export interface DesaturateEffectInitOptions extends DesaturateEffectInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link DesaturateEffect} instead. + */ + type DesaturateEffectMixin = IDesaturateEffect & OffscreenEffect; + + /** + * {@link DesaturateEffect} is an opaque structure + * whose members cannot be directly accessed + */ + interface DesaturateEffect extends DesaturateEffectMixin {} + + class DesaturateEffect { + public constructor(options?: Partial); + /** + * Creates a new {@link DesaturateEffect} to be used with + * {@link Clutter.Actor.add_effect} + * @param factor the desaturation factor, between 0.0 and 1.0 + * @returns the newly created {@link DesaturateEffect} or %NULL + */ + public static new(factor: number): Effect; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link DeviceManager} instead. + */ + interface IDeviceManager { + backend: Backend; + /** + * Retrieves the core {@link InputDevice} of type #device_type + * + * Core devices are devices created automatically by the default + * Clutter backend + * @param device_type the type of the core device + * @returns a {@link InputDevice} or %NULL. The + * returned device is owned by the #ClutterDeviceManager and should + * not be modified or freed + */ + get_core_device(device_type: InputDeviceType): InputDevice; + /** + * Retrieves the {@link InputDevice} with the given #device_id + * @param device_id the integer id of a device + * @returns a {@link InputDevice} or %NULL. The + * returned device is owned by the #ClutterDeviceManager and should + * never be modified or freed + */ + get_device(device_id: number): InputDevice; + /** + * Lists all currently registered input devices + * @returns + * a newly allocated list of {@link InputDevice} objects. Use + * {@link GObject.slist_free} to deallocate it when done + */ + list_devices(): InputDevice[]; + /** + * Lists all currently registered input devices + * @returns + * a pointer to the internal list of {@link InputDevice} objects. The + * returned list is owned by the #ClutterDeviceManager and should never + * be modified or freed + */ + peek_devices(): InputDevice[]; + /** + * The ::device-added signal is emitted each time a device has been + * added to the {@link DeviceManager} + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - device: the newly added {@link InputDevice} + * + * @returns Callback ID + */ + connect(signal: "device-added", callback: (owner: this, device: InputDevice) => void): number; + /** + * The ::device-removed signal is emitted each time a device has been + * removed from the {@link DeviceManager} + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - device: the removed {@link InputDevice} + * + * @returns Callback ID + */ + connect(signal: "device-removed", callback: (owner: this, device: InputDevice) => void): number; + + connect(signal: "notify::backend", callback: (owner: this, ...args: any) => void): number; + + } + + type DeviceManagerInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface DeviceManagerInitOptions extends DeviceManagerInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link DeviceManager} instead. + */ + type DeviceManagerMixin = IDeviceManager & GObject.Object; + + /** + * The {@link DeviceManager} structure contains only private data + */ + interface DeviceManager extends DeviceManagerMixin {} + + class DeviceManager { + public constructor(options?: Partial); + /** + * Retrieves the device manager singleton + * @returns the {@link DeviceManager} singleton. + * The returned instance is owned by Clutter and it should not be + * modified or freed + */ + public static get_default(): DeviceManager; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link DragAction} instead. + */ + interface IDragAction { + /** + * Constains the dragging action (or in particular, the resulting + * actor position) to the specified {@link Rect}, in parent's + * coordinates. + */ + drag_area: Rect; + /** + * Whether the {@link DragAction.drag_area} property has been set. + */ + readonly drag_area_set: boolean; + /** + * Constraints the dragging action to the specified axis + */ + drag_axis: DragAxis; + /** + * The {@link Actor} that is effectively being dragged + * + * A #ClutterDragAction will, be default, use the #ClutterActor that + * has been attached to the action; it is possible to create a + * separate #ClutterActor and use it instead. + * + * Setting this property has no effect on the #ClutterActor argument + * passed to the #ClutterDragAction signals + */ + drag_handle: Actor; + /** + * The horizontal threshold, in pixels, that the cursor must travel + * in order to begin a drag action. + * + * When set to a positive value, {@link DragAction} will only emit + * #ClutterDragAction::drag-begin if the pointer has moved + * horizontally at least of the given amount of pixels since + * the button press event. + * + * When set to -1, #ClutterDragAction will use the default threshold + * stored in the #ClutterSettings:dnd-drag-threshold property of + * #ClutterSettings. + * + * When read, this property will always return a valid drag + * threshold, either as set or the default one. + */ + x_drag_threshold: number; + /** + * The vertical threshold, in pixels, that the cursor must travel + * in order to begin a drag action. + * + * When set to a positive value, {@link DragAction} will only emit + * #ClutterDragAction::drag-begin if the pointer has moved + * vertically at least of the given amount of pixels since + * the button press event. + * + * When set to -1, #ClutterDragAction will use the value stored + * in the #ClutterSettings:dnd-drag-threshold property of + * #ClutterSettings. + * + * When read, this property will always return a valid drag + * threshold, either as set or the default one. + */ + y_drag_threshold: number; + /** + * Retrieves the "drag area" associated with #action, that + * is a {@link Rect} that constrains the actor movements, + * in parents coordinates. + * @returns %TRUE if the actor is actually constrained (and thus + * #drag_area is valid), %FALSE otherwise + * + * a {@link Rect} to be filled + */ + get_drag_area(): [ boolean, Rect ]; + /** + * Retrieves the axis constraint set by {@link Clutter.DragAction.set_drag_axis} + * @returns the axis constraint + */ + get_drag_axis(): DragAxis; + /** + * Retrieves the drag handle set by {@link Clutter.DragAction.set_drag_handle} + * @returns a {@link Actor}, used as the drag + * handle, or %NULL if none was set + */ + get_drag_handle(): Actor; + /** + * Retrieves the values set by {@link Clutter.DragAction.set_drag_threshold}. + * + * If the {@link DragAction.x_drag_threshold} property or the + * #ClutterDragAction:y-drag-threshold property have been set to -1 then + * this function will return the default drag threshold value as stored + * by the #ClutterSettings:dnd-drag-threshold property of #ClutterSettings. + * @returns return location for the horizontal drag + * threshold value, in pixels + * + * return location for the vertical drag + * threshold value, in pixels + */ + get_drag_threshold(): [ x_threshold: number, y_threshold: number ]; + /** + * Retrieves the coordinates, in stage space, of the latest motion + * event during the dragging + * @returns return location for the latest motion + * event's X coordinate + * + * return location for the latest motion + * event's Y coordinate + */ + get_motion_coords(): [ motion_x: number, motion_y: number ]; + /** + * Retrieves the coordinates, in stage space, of the press event + * that started the dragging + * @returns return location for the press event's X coordinate + * + * return location for the press event's Y coordinate + */ + get_press_coords(): [ press_x: number, press_y: number ]; + /** + * Sets #drag_area to constrain the dragging of the actor associated + * with #action, so that it position is always within #drag_area, expressed + * in parent's coordinates. + * If #drag_area is %NULL, the actor is not constrained. + * @param drag_area a {@link Rect} + */ + set_drag_area(drag_area: Rect | null): void; + /** + * Restricts the dragging action to a specific axis + * @param axis the axis to constraint the dragging to + */ + set_drag_axis(axis: DragAxis): void; + /** + * Sets the actor to be used as the drag handle. + * @param handle a {@link Actor}, or %NULL to unset + */ + set_drag_handle(handle: Actor | null): void; + /** + * Sets the horizontal and vertical drag thresholds that must be + * cleared by the pointer before #action can begin the dragging. + * + * If #x_threshold or #y_threshold are set to -1 then the default + * drag threshold stored in the {@link Settings.dnd_drag_threshold} + * property of #ClutterSettings will be used. + * @param x_threshold a distance on the horizontal axis, in pixels, or + * -1 to use the default drag threshold from {@link Settings} + * @param y_threshold a distance on the vertical axis, in pixels, or + * -1 to use the default drag threshold from {@link Settings} + */ + set_drag_threshold(x_threshold: number, y_threshold: number): void; + /** + * The ::drag-begin signal is emitted when the {@link DragAction} + * starts the dragging + * + * The emission of this signal can be delayed by using the + * #ClutterDragAction:x-drag-threshold and + * #ClutterDragAction:y-drag-threshold properties + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} attached to the action + * - event_x: the X coordinate (in stage space) of the press event + * - event_y: the Y coordinate (in stage space) of the press event + * - modifiers: the modifiers of the press event + * + * @returns Callback ID + */ + connect(signal: "drag-begin", callback: (owner: this, actor: Actor, event_x: number, event_y: number, modifiers: ModifierType) => void): number; + /** + * The ::drag-end signal is emitted at the end of the dragging, + * when the pointer button's is released + * + * This signal is emitted if and only if the {@link DragAction.drag_begin} + * signal has been emitted first + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} attached to the action + * - event_x: the X coordinate (in stage space) of the release event + * - event_y: the Y coordinate (in stage space) of the release event + * - modifiers: the modifiers of the release event + * + * @returns Callback ID + */ + connect(signal: "drag-end", callback: (owner: this, actor: Actor, event_x: number, event_y: number, modifiers: ModifierType) => void): number; + /** + * The ::drag-motion signal is emitted for each motion event after + * the {@link DragAction.drag_begin} signal has been emitted. + * + * The components of the distance between the press event and the + * latest motion event are computed in the actor's coordinate space, + * to take into account eventual transformations. If you want the + * stage coordinates of the latest motion event you can use + * {@link Clutter.DragAction.get_motion_coords}. + * + * The default handler of the signal will call clutter_actor_move_by() + * either on #actor or, if set, of #ClutterDragAction:drag-handle using + * the #delta_x and #delta_y components of the dragging motion. If you + * want to override the default behaviour, you can connect to the + * #ClutterDragAction::drag-progress signal and return %FALSE from the + * handler. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} attached to the action + * - delta_x: the X component of the distance between the press event + * that began the dragging and the current position of the pointer, + * as of the latest motion event + * - delta_y: the Y component of the distance between the press event + * that began the dragging and the current position of the pointer, + * as of the latest motion event + * + * @returns Callback ID + */ + connect(signal: "drag-motion", callback: (owner: this, actor: Actor, delta_x: number, delta_y: number) => void): number; + /** + * The ::drag-progress signal is emitted for each motion event after + * the {@link DragAction.drag_begin} signal has been emitted. + * + * The components of the distance between the press event and the + * latest motion event are computed in the actor's coordinate space, + * to take into account eventual transformations. If you want the + * stage coordinates of the latest motion event you can use + * {@link Clutter.DragAction.get_motion_coords}. + * + * The default handler will emit #ClutterDragAction::drag-motion, + * if #ClutterDragAction::drag-progress emission returns %TRUE. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} attached to the action + * - delta_x: the X component of the distance between the press event + * that began the dragging and the current position of the pointer, + * as of the latest motion event + * - delta_y: the Y component of the distance between the press event + * that began the dragging and the current position of the pointer, + * as of the latest motion event + * - returns %TRUE if the drag should continue, and %FALSE + * if it should be stopped. + * + * @returns Callback ID + */ + connect(signal: "drag-progress", callback: (owner: this, actor: Actor, delta_x: number, delta_y: number) => boolean): number; + + connect(signal: "notify::drag-area", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::drag-area-set", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::drag-axis", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::drag-handle", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::x-drag-threshold", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::y-drag-threshold", callback: (owner: this, ...args: any) => void): number; + + } + + type DragActionInitOptionsMixin = ActionInitOptions & + Pick; + + export interface DragActionInitOptions extends DragActionInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link DragAction} instead. + */ + type DragActionMixin = IDragAction & Action; + + /** + * The {@link DragAction} structure contains only + * private data and should be accessed using the provided API + */ + interface DragAction extends DragActionMixin {} + + class DragAction { + public constructor(options?: Partial); + /** + * Creates a new {@link DragAction} instance + * @returns the newly created {@link DragAction} + */ + public static new(): Action; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link DropAction} instead. + */ + interface IDropAction { + + /** + * The ::can-drop signal is emitted when the dragged actor is dropped + * on #actor. The return value of the ::can-drop signal will determine + * whether or not the {@link DropAction.drop} signal is going to be + * emitted on #action. + * + * The default implementation of #ClutterDropAction returns %TRUE for + * this signal. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} attached to the #action + * - event_x: the X coordinate (in stage space) of the drop event + * - event_y: the Y coordinate (in stage space) of the drop event + * - returns %TRUE if the drop is accepted, and %FALSE otherwise + * + * @returns Callback ID + */ + connect(signal: "can-drop", callback: (owner: this, actor: Actor, event_x: number, event_y: number) => boolean): number; + /** + * The ::drop signal is emitted when the dragged actor is dropped + * on #actor. This signal is only emitted if at least an handler of + * {@link DropAction.can_drop} returns %TRUE. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} attached to the #action + * - event_x: the X coordinate (in stage space) of the drop event + * - event_y: the Y coordinate (in stage space) of the drop event + * + * @returns Callback ID + */ + connect(signal: "drop", callback: (owner: this, actor: Actor, event_x: number, event_y: number) => void): number; + /** + * The ::drop-cancel signal is emitted when the drop is refused + * by an emission of the {@link DropAction.can_drop} signal. + * + * After the ::drop-cancel signal is fired the active drag is + * terminated. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} attached to the #action + * - event_x: the X coordinate (in stage space) of the drop event + * - event_y: the Y coordinate (in stage space) of the drop event + * + * @returns Callback ID + */ + connect(signal: "drop-cancel", callback: (owner: this, actor: Actor, event_x: number, event_y: number) => void): number; + /** + * The ::over-in signal is emitted when the dragged actor crosses + * into #actor. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} attached to the #action + * + * @returns Callback ID + */ + connect(signal: "over-in", callback: (owner: this, actor: Actor) => void): number; + /** + * The ::over-out signal is emitted when the dragged actor crosses + * outside #actor. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} attached to the #action + * + * @returns Callback ID + */ + connect(signal: "over-out", callback: (owner: this, actor: Actor) => void): number; + + } + + type DropActionInitOptionsMixin = ActionInitOptions + export interface DropActionInitOptions extends DropActionInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link DropAction} instead. + */ + type DropActionMixin = IDropAction & Action; + + /** + * The {@link DropAction} structure contains only + * private data and should be accessed using the provided API. + */ + interface DropAction extends DropActionMixin {} + + class DropAction { + public constructor(options?: Partial); + /** + * Creates a new {@link DropAction}. + * + * Use {@link Clutter.Actor.add_action} to add the action to a #ClutterActor. + * @returns the newly created {@link DropAction} + */ + public static new(): Action; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Effect} instead. + */ + interface IEffect { + /** + * Queues a repaint of the effect. The effect can detect when the ‘paint’ + * method is called as a result of this function because it will not + * have the %CLUTTER_EFFECT_PAINT_ACTOR_DIRTY flag set. In that case the + * effect is free to assume that the actor has not changed its + * appearance since the last time it was painted so it doesn't need to + * call {@link Clutter.Actor.continue_paint} if it can draw a cached + * image. This is mostly intended for effects that are using a + * %CoglOffscreen to redirect the actor (such as + * %ClutterOffscreenEffect). In that case the effect can save a bit of + * rendering time by painting the cached texture without causing the + * entire actor to be painted. + * + * This function can be used by effects that have their own animatable + * parameters. For example, an effect which adds a varying degree of a + * red tint to an actor by redirecting it through a CoglOffscreen + * might have a property to specify the level of tint. When this value + * changes, the underlying actor doesn't need to be redrawn so the + * effect can call clutter_effect_queue_repaint() to make sure the + * effect is repainted. + * + * Note however that modifying the position of the parent of an actor + * may change the appearance of the actor because its transformation + * matrix would change. In this case a redraw wouldn't be queued on + * the actor itself so the %CLUTTER_EFFECT_PAINT_ACTOR_DIRTY would still + * not be set. The effect can detect this case by keeping track of the + * last modelview matrix that was used to render the actor and + * veryifying that it remains the same in the next paint. + * + * Any other effects that are layered on top of the passed in effect + * will still be passed the %CLUTTER_EFFECT_PAINT_ACTOR_DIRTY flag. If + * anything queues a redraw on the actor without specifying an effect + * or with an effect that is lower in the chain of effects than this + * one then that will override this call. In that case this effect + * will instead be called with the %CLUTTER_EFFECT_PAINT_ACTOR_DIRTY + * flag set. + */ + queue_repaint(): void; + } + + type EffectInitOptionsMixin = ActorMetaInitOptions + export interface EffectInitOptions extends EffectInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Effect} instead. + */ + type EffectMixin = IEffect & ActorMeta; + + /** + * The {@link Effect} structure contains only private data and should + * be accessed using the provided API + */ + interface Effect extends EffectMixin {} + + class Effect { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link FixedLayout} instead. + */ + interface IFixedLayout { + + } + + type FixedLayoutInitOptionsMixin = LayoutManagerInitOptions + export interface FixedLayoutInitOptions extends FixedLayoutInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link FixedLayout} instead. + */ + type FixedLayoutMixin = IFixedLayout & LayoutManager; + + /** + * The {@link FixedLayout} structure contains only private data and + * it should be accessed using the provided API + */ + interface FixedLayout extends FixedLayoutMixin {} + + class FixedLayout { + public constructor(options?: Partial); + /** + * Creates a new {@link FixedLayout} + * @returns the newly created {@link FixedLayout} + */ + public static new(): LayoutManager; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link FlowLayout} instead. + */ + interface IFlowLayout { + /** + * The spacing between columns, in pixels; the value of this + * property is honoured by horizontal non-overflowing layouts + * and by vertical overflowing layouts + */ + column_spacing: number; + /** + * Whether each child inside the {@link FlowLayout} should receive + * the same allocation + */ + homogeneous: boolean; + /** + * Maximum width for each column in the layout, in pixels. If + * set to -1 the width will be the maximum child width + */ + max_column_width: number; + /** + * Maximum height for each row in the layout, in pixels. If + * set to -1 the width will be the maximum child height + */ + max_row_height: number; + /** + * Minimum width for each column in the layout, in pixels + */ + min_column_width: number; + /** + * Minimum height for each row in the layout, in pixels + */ + min_row_height: number; + /** + * The orientation of the {@link FlowLayout}. The children + * of the layout will be layed out following the orientation. + * + * This property also controls the overflowing directions + */ + orientation: FlowOrientation; + /** + * The spacing between rows, in pixels; the value of this + * property is honoured by vertical non-overflowing layouts and + * by horizontal overflowing layouts + */ + row_spacing: number; + /** + * Whether the {@link FlowLayout} should arrange its children + * on a grid + */ + snap_to_grid: boolean; + /** + * Retrieves the spacing between columns + * @returns the spacing between columns of the {@link FlowLayout}, + * in pixels + */ + get_column_spacing(): number; + /** + * Retrieves the minimum and maximum column widths + * @returns return location for the minimum column width, or %NULL + * + * return location for the maximum column width, or %NULL + */ + get_column_width(): [ min_width: number, max_width: number ]; + /** + * Retrieves whether the #layout is homogeneous + * @returns %TRUE if the {@link FlowLayout} is homogeneous + */ + get_homogeneous(): boolean; + /** + * Retrieves the orientation of the #layout + * @returns the orientation of the {@link FlowLayout} + */ + get_orientation(): FlowOrientation; + /** + * Retrieves the minimum and maximum row heights + * @returns return location for the minimum row height, or %NULL + * + * return location for the maximum row height, or %NULL + */ + get_row_height(): [ min_height: number, max_height: number ]; + /** + * Retrieves the spacing between rows + * @returns the spacing between rows of the {@link FlowLayout}, + * in pixels + */ + get_row_spacing(): number; + /** + * Retrieves the value of {@link FlowLayout.snap_to_grid} property + * @returns %TRUE if the #layout is placing its children on a grid + */ + get_snap_to_grid(): boolean; + /** + * Sets the space between columns, in pixels + * @param spacing the space between columns + */ + set_column_spacing(spacing: number): void; + /** + * Sets the minimum and maximum widths that a column can have + * @param min_width minimum width of a column + * @param max_width maximum width of a column + */ + set_column_width(min_width: number, max_width: number): void; + /** + * Sets whether the #layout should allocate the same space for + * each child + * @param homogeneous whether the layout should be homogeneous or not + */ + set_homogeneous(homogeneous: boolean): void; + /** + * Sets the orientation of the flow layout + * + * The orientation controls the direction used to allocate + * the children: either horizontally or vertically. The + * orientation also controls the direction of the overflowing + * @param orientation the orientation of the layout + */ + set_orientation(orientation: FlowOrientation): void; + /** + * Sets the minimum and maximum heights that a row can have + * @param min_height the minimum height of a row + * @param max_height the maximum height of a row + */ + set_row_height(min_height: number, max_height: number): void; + /** + * Sets the spacing between rows, in pixels + * @param spacing the space between rows + */ + set_row_spacing(spacing: number): void; + /** + * Whether the #layout should place its children on a grid. + * @param snap_to_grid %TRUE if #layout should place its children on a grid + */ + set_snap_to_grid(snap_to_grid: boolean): void; + connect(signal: "notify::column-spacing", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::homogeneous", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::max-column-width", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::max-row-height", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::min-column-width", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::min-row-height", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::orientation", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::row-spacing", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::snap-to-grid", callback: (owner: this, ...args: any) => void): number; + + } + + type FlowLayoutInitOptionsMixin = LayoutManagerInitOptions & + Pick; + + export interface FlowLayoutInitOptions extends FlowLayoutInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link FlowLayout} instead. + */ + type FlowLayoutMixin = IFlowLayout & LayoutManager; + + /** + * The {@link FlowLayout} structure contains only private data + * and should be accessed using the provided API + */ + interface FlowLayout extends FlowLayoutMixin {} + + class FlowLayout { + public constructor(options?: Partial); + /** + * Creates a new {@link FlowLayout} with the given #orientation + * @param orientation the orientation of the flow layout + * @returns the newly created {@link FlowLayout} + */ + public static new(orientation: FlowOrientation): LayoutManager; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link GestureAction} instead. + */ + interface IGestureAction { + /** + * Number of touch points to trigger a gesture action. + */ + n_touch_points: number; + /** + * The horizontal trigger distance to be used by the action to either + * emit the {@link GestureAction.gesture_begin} signal or to emit + * the #ClutterGestureAction::gesture-cancel signal. + * + * A negative value will be interpreted as the default drag threshold. + */ + threshold_trigger_distance_x: number; + /** + * The vertical trigger distance to be used by the action to either + * emit the {@link GestureAction.gesture_begin} signal or to emit + * the #ClutterGestureAction::gesture-cancel signal. + * + * A negative value will be interpreted as the default drag threshold. + */ + threshold_trigger_distance_y: number; + /** + * The trigger edge to be used by the action to either emit the + * {@link GestureAction.gesture_begin} signal or to emit the + * #ClutterGestureAction::gesture-cancel signal. + */ + threshold_trigger_edge: GestureTriggerEdge; + /** + * Cancel a {@link GestureAction} before it begins + */ + cancel(): void; + /** + * Retrieves the {@link InputDevice} of a touch point. + * @param point the touch point index, with 0 being the first touch + * point received by the action + * @returns the {@link InputDevice} of a touch point. + */ + get_device(point: number): InputDevice; + /** + * Retrieves a reference to the last {@link Event} for a touch point. Call + * {@link Clutter.Event.copy} if you need to store the reference somewhere. + * @param point index of a point currently active + * @returns the last {@link Event} for a touch point. + */ + get_last_event(point: number): Event; + /** + * Retrieves the coordinates, in stage space, of the latest motion + * event during the dragging. + * @param point the touch point index, with 0 being the first touch + * point received by the action + * @returns return location for the latest motion + * event's X coordinate + * + * return location for the latest motion + * event's Y coordinate + */ + get_motion_coords(point: number): [ motion_x: number | null, motion_y: number | null ]; + /** + * Retrieves the incremental delta since the last motion event + * during the dragging. + * @param point the touch point index, with 0 being the first touch + * point received by the action + * @returns the distance since last motion event + * + * return location for the X axis + * component of the incremental motion delta + * + * return location for the Y axis + * component of the incremental motion delta + */ + get_motion_delta(point: number): [ number, number | null, number | null ]; + /** + * Retrieves the number of points currently active. + * @returns the number of points currently active. + */ + get_n_current_points(): number; + /** + * Retrieves the number of requested points to trigger the gesture. + * @returns the number of points to trigger the gesture. + */ + get_n_touch_points(): number; + /** + * Retrieves the coordinates, in stage space, of the press event + * that started the dragging for a specific touch point. + * @param point the touch point index, with 0 being the first touch + * point received by the action + * @returns return location for the press + * event's X coordinate + * + * return location for the press + * event's Y coordinate + */ + get_press_coords(point: number): [ press_x: number | null, press_y: number | null ]; + /** + * Retrieves the coordinates, in stage space, where the touch point was + * last released. + * @param point the touch point index, with 0 being the first touch + * point received by the action + * @returns return location for the X coordinate of + * the last release + * + * return location for the Y coordinate of + * the last release + */ + get_release_coords(point: number): [ release_x: number | null, release_y: number | null ]; + /** + * Retrieves the {@link EventSequence} of a touch point. + * @param point index of a point currently active + * @returns the {@link EventSequence} of a touch point. + */ + get_sequence(point: number): EventSequence; + /** + * Retrieves the threshold trigger distance of the gesture #action, + * as set using {@link Clutter.GestureAction.set_threshold_trigger_distance}. + * @returns The return location for the horizontal distance, or %NULL + * + * The return location for the vertical distance, or %NULL + */ + get_threshold_trigger_distance(): [ x: number | null, y: number | null ]; + /** + * Retrieves the edge trigger of the gesture #action, as set using + * {@link Clutter.GestureAction.set_threshold_trigger_edge}. + * @returns the edge trigger + */ + get_threshold_trigger_edge(): GestureTriggerEdge; + /** + * @deprecated + * Use {@link Clutter.GestureAction.get_threshold_trigger_edge} instead. + * + * Retrieves the edge trigger of the gesture #action, as set using + * {@link Clutter.GestureAction.set_threshold_trigger_edge}. + * @returns the edge trigger + */ + get_threshold_trigger_egde(): GestureTriggerEdge; + /** + * Retrieves the velocity, in stage pixels per millisecond, of the + * latest motion event during the dragging. + * @param point the touch point index, with 0 being the first touch + * point received by the action + * @returns + * + * return location for the latest motion + * event's X velocity + * + * return location for the latest motion + * event's Y velocity + */ + get_velocity(point: number): [ number, number | null, number | null ]; + /** + * Sets the number of points needed to trigger the gesture. + * @param nb_points a number of points + */ + set_n_touch_points(nb_points: number): void; + /** + * Sets the threshold trigger distance for the gesture drag threshold, if any. + * + * This function should only be called by sub-classes of + * {@link GestureAction} during their construction phase. + * @param x the distance on the horizontal axis + * @param y the distance on the vertical axis + */ + set_threshold_trigger_distance(x: number, y: number): void; + /** + * Sets the edge trigger for the gesture drag threshold, if any. + * + * This function should only be called by sub-classes of + * {@link GestureAction} during their construction phase. + * @param edge the %ClutterGestureTriggerEdge + */ + set_threshold_trigger_edge(edge: GestureTriggerEdge): void; + /** + * The ::gesture_begin signal is emitted when the {@link Actor} to which + * a #ClutterGestureAction has been applied starts receiving a gesture. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} attached to the #action + * - returns %TRUE if the gesture should start, and %FALSE if + * the gesture should be ignored. + * + * @returns Callback ID + */ + connect(signal: "gesture-begin", callback: (owner: this, actor: Actor) => boolean): number; + /** + * The ::gesture-cancel signal is emitted when the ongoing gesture gets + * cancelled from the {@link GestureAction.gesture_progress} signal handler. + * + * This signal is emitted if and only if the #ClutterGestureAction::gesture-begin + * signal has been emitted first. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} attached to the #action + * + * @returns Callback ID + */ + connect(signal: "gesture-cancel", callback: (owner: this, actor: Actor) => void): number; + /** + * The ::gesture-end signal is emitted at the end of the gesture gesture, + * when the pointer's button is released + * + * This signal is emitted if and only if the {@link GestureAction.gesture_begin} + * signal has been emitted first. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} attached to the #action + * + * @returns Callback ID + */ + connect(signal: "gesture-end", callback: (owner: this, actor: Actor) => void): number; + /** + * The ::gesture-progress signal is emitted for each motion event after + * the {@link GestureAction.gesture_begin} signal has been emitted. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} attached to the #action + * - returns %TRUE if the gesture should continue, and %FALSE if + * the gesture should be cancelled. + * + * @returns Callback ID + */ + connect(signal: "gesture-progress", callback: (owner: this, actor: Actor) => boolean): number; + + connect(signal: "notify::n-touch-points", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::threshold-trigger-distance-x", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::threshold-trigger-distance-y", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::threshold-trigger-edge", callback: (owner: this, ...args: any) => void): number; + + } + + type GestureActionInitOptionsMixin = ActionInitOptions & + Pick; + + export interface GestureActionInitOptions extends GestureActionInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link GestureAction} instead. + */ + type GestureActionMixin = IGestureAction & Action; + + /** + * The {@link GestureAction} structure contains + * only private data and should be accessed using the provided API + */ + interface GestureAction extends GestureActionMixin {} + + class GestureAction { + public constructor(options?: Partial); + /** + * Creates a new {@link GestureAction} instance. + * @returns the newly created {@link GestureAction} + */ + public static new(): Action; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link GridLayout} instead. + */ + interface IGridLayout { + /** + * Whether all columns of the layout should have the same width + */ + column_homogeneous: boolean; + /** + * The amount of space in pixels between two consecutive columns + */ + column_spacing: number; + /** + * The orientation of the layout, either horizontal or vertical + */ + orientation: Orientation; + /** + * Whether all rows of the layout should have the same height + */ + row_homogeneous: boolean; + /** + * The amount of space in pixels between two consecutive rows + */ + row_spacing: number; + /** + * Adds a widget to the grid. + * + * The position of #child is determined by #left and #top. The + * number of 'cells' that #child will occupy is determined by + * #width and #height. + * @param child the {@link Actor} to add + * @param left the column number to attach the left side of #child to + * @param top the row number to attach the top side of #child to + * @param width the number of columns that #child will span + * @param height the number of rows that #child will span + */ + attach(child: Actor, left: number, top: number, width: number, height: number): void; + /** + * Adds a actor to the grid. + * + * The actor is placed next to #sibling, on the side determined by + * #side. When #sibling is %NULL, the actor is placed in row (for + * left or right placement) or column 0 (for top or bottom placement), + * at the end indicated by #side. + * + * Attaching widgets labeled [1], [2], [3] with #sibling == %NULL and + * #side == %CLUTTER_GRID_POSITION_LEFT yields a layout of [3][2][1]. + * @param child the actor to add + * @param sibling the child of #layout that #child will be placed + * next to, or %NULL to place #child at the beginning or end + * @param side the side of #sibling that #child is positioned next to + * @param width the number of columns that #child will span + * @param height the number of rows that #child will span + */ + attach_next_to(child: Actor, sibling: Actor | null, side: GridPosition, width: number, height: number): void; + /** + * Gets the child of #layout whose area covers the grid + * cell whose upper left corner is at #left, #top. + * @param left the left edge of the cell + * @param top the top edge of the cell + * @returns the child at the given position, or %NULL + */ + get_child_at(left: number, top: number): Actor; + /** + * Returns whether all columns of #layout have the same width. + * @returns whether all columns of #layout have the same width. + */ + get_column_homogeneous(): boolean; + /** + * Retrieves the spacing set using {@link Clutter.GridLayout.set_column_spacing} + * @returns the spacing between coluns of #layout + */ + get_column_spacing(): number; + /** + * Retrieves the orientation of the #layout. + * @returns the orientation of the layout + */ + get_orientation(): Orientation; + /** + * Returns whether all rows of #layout have the same height. + * @returns whether all rows of #layout have the same height. + */ + get_row_homogeneous(): boolean; + /** + * Retrieves the spacing set using {@link Clutter.GridLayout.set_row_spacing} + * @returns the spacing between rows of #layout + */ + get_row_spacing(): number; + /** + * Inserts a column at the specified position. + * + * Children which are attached at or to the right of this position + * are moved one column to the right. Children which span across this + * position are grown to span the new column. + * @param position the position to insert the column at + */ + insert_column(position: number): void; + /** + * Inserts a row or column at the specified position. + * + * The new row or column is placed next to #sibling, on the side + * determined by #side. If #side is %CLUTTER_GRID_POSITION_LEFT or + * %CLUTTER_GRID_POSITION_BOTTOM, a row is inserted. If #side is + * %CLUTTER_GRID_POSITION_LEFT of %CLUTTER_GRID_POSITION_RIGHT, + * a column is inserted. + * @param sibling the child of #layout that the new row or column will be + * placed next to + * @param side the side of #sibling that #child is positioned next to + */ + insert_next_to(sibling: Actor, side: GridPosition): void; + /** + * Inserts a row at the specified position. + * + * Children which are attached at or below this position + * are moved one row down. Children which span across this + * position are grown to span the new row. + * @param position the position to insert the row at + */ + insert_row(position: number): void; + /** + * Sets whether all columns of #layout will have the same width. + * @param homogeneous %TRUE to make columns homogeneous + */ + set_column_homogeneous(homogeneous: boolean): void; + /** + * Sets the spacing between columns of #layout + * @param spacing the spacing between columns of the layout, in pixels + */ + set_column_spacing(spacing: number): void; + /** + * Sets the orientation of the #layout. + * + * {@link GridLayout} uses the orientation as a hint when adding + * children to the #ClutterActor using it as a layout manager via + * {@link Clutter.Actor.add_child}; changing this value will not have + * any effect on children that are already part of the layout. + * @param orientation the orientation of the {@link GridLayout} + */ + set_orientation(orientation: Orientation): void; + /** + * Sets whether all rows of #layout will have the same height. + * @param homogeneous %TRUE to make rows homogeneous + */ + set_row_homogeneous(homogeneous: boolean): void; + /** + * Sets the spacing between rows of #layout + * @param spacing the spacing between rows of the layout, in pixels + */ + set_row_spacing(spacing: number): void; + connect(signal: "notify::column-homogeneous", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::column-spacing", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::orientation", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::row-homogeneous", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::row-spacing", callback: (owner: this, ...args: any) => void): number; + + } + + type GridLayoutInitOptionsMixin = LayoutManagerInitOptions & + Pick; + + export interface GridLayoutInitOptions extends GridLayoutInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link GridLayout} instead. + */ + type GridLayoutMixin = IGridLayout & LayoutManager; + + /** + * The {@link GridLayout} structure contains only private data + * and should be accessed using the provided API + */ + interface GridLayout extends GridLayoutMixin {} + + class GridLayout { + public constructor(options?: Partial); + /** + * Creates a new {@link GridLayout} + * @returns the new {@link GridLayout} + */ + public static new(): LayoutManager; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Group} instead. + */ + interface IGroup { + /** + * @deprecated + * Use {@link Clutter.Actor.get_n_children} instead. + * + * Gets the number of actors held in the group. + * @returns The number of child actors held in the group. + */ + get_n_children(): number; + /** + * @deprecated + * Use {@link Clutter.Actor.get_child_at_index} instead. + * + * Gets a groups child held at #index_ in stack. + * @param index_ the position of the requested actor. + * @returns A Clutter actor, or %NULL if + * #index_ is invalid. + */ + get_nth_child(index_: number): Actor; + /** + * @deprecated + * Use {@link Clutter.Actor.remove_all_children} instead. + * + * Removes all children actors from the {@link Group}. + */ + remove_all(): void; + } + + type GroupInitOptionsMixin = ActorInitOptions & Atk.ImplementorIfaceInitOptions & AnimatableInitOptions & ContainerInitOptions & ScriptableInitOptions + export interface GroupInitOptions extends GroupInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Group} instead. + */ + type GroupMixin = IGroup & Actor & Atk.ImplementorIface & Animatable & Container & Scriptable; + + /** + * The {@link Group} structure contains only private data + * and should be accessed using the provided API + */ + interface Group extends GroupMixin {} + + class Group { + public constructor(options?: Partial); + /** + * @deprecated + * Use {@link Clutter.Actor.new} instead. + * + * Create a new {@link Group}. + * @returns the newly created {@link Group} actor + */ + public static new(): Actor; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Image} instead. + */ + interface IImage { + /** + * Sets the image data to be display by #image, using #rect to indicate + * the position and size of the image data to be set. + * + * If the #image does not have any image data set when this function is + * called, a new texture will be created with the size of the width and + * height of the rectangle, i.e. calling this function on a newly created + * {@link Image} will be the equivalent of calling {@link Clutter.Image.set_data}. + * + * If the image data was successfully loaded, the #image will be invalidated. + * + * In case of error, the #error value will be set, and this function will + * return %FALSE. + * + * The image data is copied in texture memory. + * @param data the image data, as an array of bytes + * @param pixel_format the Cogl pixel format of the image data + * @param rect a rectangle indicating the area that should be set + * @param row_stride the length of each row inside #data + * @returns %TRUE if the image data was successfully loaded, + * and %FALSE otherwise. + */ + set_area(data: number[], pixel_format: Cogl.PixelFormat, rect: cairo.RectangleInt, row_stride: number): boolean; + /** + * Sets the image data stored inside a #GBytes to be displayed by #image. + * + * If the image data was successfully loaded, the #image will be invalidated. + * + * In case of error, the #error value will be set, and this function will + * return %FALSE. + * + * The image data contained inside the #GBytes is copied in texture memory, + * and no additional reference is acquired on the #data. + * @param data the image data, as a #GBytes + * @param pixel_format the Cogl pixel format of the image data + * @param width the width of the image data + * @param height the height of the image data + * @param row_stride the length of each row inside #data + * @returns %TRUE if the image data was successfully loaded, + * and %FALSE otherwise. + */ + set_bytes(data: GLib.Bytes, pixel_format: Cogl.PixelFormat, width: number, height: number, row_stride: number): boolean; + /** + * Sets the image data to be displayed by #image. + * + * If the image data was successfully loaded, the #image will be invalidated. + * + * In case of error, the #error value will be set, and this function will + * return %FALSE. + * + * The image data is copied in texture memory. + * + * The image data is expected to be a linear array of RGBA or RGB pixel data; + * how to retrieve that data is left to platform specific image loaders. For + * instance, if you use the GdkPixbuf library: + * + * |[ + * ClutterContent *image = clutter_image_new (); + * + * GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file (filename, NULL); + * + * clutter_image_set_data (CLUTTER_IMAGE (image), + * gdk_pixbuf_get_pixels (pixbuf), + * gdk_pixbuf_get_has_alpha (pixbuf) + * ? COGL_PIXEL_FORMAT_RGBA_8888 + * : COGL_PIXEL_FORMAT_RGB_888, + * gdk_pixbuf_get_width (pixbuf), + * gdk_pixbuf_get_height (pixbuf), + * gdk_pixbuf_get_rowstride (pixbuf), + * &error); + * + * g_object_unref (pixbuf); + * ]| + * @param data the image data, as an array of bytes + * @param pixel_format the Cogl pixel format of the image data + * @param width the width of the image data + * @param height the height of the image data + * @param row_stride the length of each row inside #data + * @returns %TRUE if the image data was successfully loaded, + * and %FALSE otherwise. + */ + set_data(data: number[], pixel_format: Cogl.PixelFormat, width: number, height: number, row_stride: number): boolean; + } + + type ImageInitOptionsMixin = GObject.ObjectInitOptions & ContentInitOptions + export interface ImageInitOptions extends ImageInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Image} instead. + */ + type ImageMixin = IImage & GObject.Object & Content; + + /** + * The {@link Image} structure contains + * private data and should only be accessed using the provided + * API. + */ + interface Image extends ImageMixin {} + + class Image { + public constructor(options?: Partial); + /** + * Creates a new {@link Image} instance. + * @returns the newly created {@link Image} instance. + * Use {@link GObject.Object.unref} when done. + */ + public static new(): Content; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link InputDevice} instead. + */ + interface IInputDevice { + /** + * The {@link Backend} that created the device. + */ + backend: Backend; + /** + * The {@link DeviceManager} instance which owns the device + */ + device_manager: DeviceManager; + device_mode: InputMode; + /** + * The type of the device + */ + device_type: InputDeviceType; + /** + * Whether the device is enabled. + * + * A device with the {@link InputDevice.device_mode} property set + * to %CLUTTER_INPUT_MODE_MASTER cannot be disabled. + * + * A device must be enabled in order to receive events from it. + */ + enabled: boolean; + /** + * Whether the device has an on screen cursor following its movement. + */ + has_cursor: boolean; + /** + * The unique identifier of the device + */ + id: number; + /** + * The number of axes of the device. + */ + readonly n_axes: number; + /** + * The name of the device + */ + name: string; + /** + * Product ID of this device. + */ + product_id: string; + /** + * Vendor ID of this device. + */ + vendor_id: string; + /** + * Retrieves a pointer to the {@link InputDevice} that has been + * associated to #device. + * + * If the #ClutterInputDevice:device-mode property of #device is + * set to %CLUTTER_INPUT_MODE_MASTER, this function will return + * %NULL. + * @returns a {@link InputDevice}, or %NULL + */ + get_associated_device(): InputDevice; + /** + * Retrieves the type of axis on #device at the given index. + * @param index_ the index of the axis + * @returns the axis type + */ + get_axis(index_: number): InputAxis; + /** + * Extracts the value of the given #axis of a {@link InputDevice} from + * an array of axis values. + * + * An example of typical usage for this function is: + * + * |[ + * ClutterInputDevice *device = clutter_event_get_device (event); + * gdouble *axes = clutter_event_get_axes (event, NULL); + * gdouble pressure_value = 0; + * + * clutter_input_device_get_axis_value (device, axes, + * CLUTTER_INPUT_AXIS_PRESSURE, + * &pressure_value); + * ]| + * @param axes an array of axes values, typically + * coming from {@link Clutter.event.get_axes} + * @param axis the axis to extract + * @returns %TRUE if the value was set, and %FALSE otherwise + * + * return location for the axis value + */ + get_axis_value(axes: number[], axis: InputAxis): [ boolean, number ]; + /** + * Retrieves the latest coordinates of a pointer or touch point of + * #device. + * @param sequence a {@link EventSequence}, or %NULL if + * the device is not touch-based + * @returns %FALSE if the device's sequence hasn't been found, + * and %TRUE otherwise. + * + * return location for the pointer + * or touch point + */ + get_coords(sequence: EventSequence | null): [ boolean, Point ]; + /** + * @deprecated + * Use {@link Clutter.InputDevice.get_coords} instead. + * + * Retrieves the latest coordinates of the pointer of #device + * @returns return location for the X coordinate + * + * return location for the Y coordinate + */ + get_device_coords(): [ x: number, y: number ]; + /** + * Retrieves the unique identifier of #device + * @returns the identifier of the device + */ + get_device_id(): number; + /** + * Retrieves the {@link InputMode} of #device. + * @returns the device mode + */ + get_device_mode(): InputMode; + /** + * Retrieves the name of the #device + * @returns the name of the device, or %NULL. The returned string + * is owned by the {@link InputDevice} and should never be modified + * or freed + */ + get_device_name(): string; + /** + * Retrieves the type of #device + * @returns the type of the device + */ + get_device_type(): InputDeviceType; + /** + * Retrieves whether #device is enabled. + * @returns %TRUE if the device is enabled + */ + get_enabled(): boolean; + /** + * Retrieves a pointer to the {@link Actor} currently grabbing all + * the events coming from #device. + * @returns a {@link Actor}, or %NULL + */ + get_grabbed_actor(): Actor; + /** + * Retrieves whether #device has a pointer that follows the + * device motion. + * @returns %TRUE if the device has a cursor + */ + get_has_cursor(): boolean; + /** + * Retrieves the key set using {@link Clutter.InputDevice.set_key} + * @param index_ the index of the key + * @returns %TRUE if a key was set at the given index + * + * return location for the keyval at #index_ + * + * return location for the modifiers at #index_ + */ + get_key(index_: number): [ boolean, number, ModifierType ]; + /** + * Retrieves the current modifiers state of the device, as seen + * by the last event Clutter processed. + * @returns the last known modifier state + */ + get_modifier_state(): ModifierType; + /** + * Retrieves the number of axes available on #device. + * @returns the number of axes on the device + */ + get_n_axes(): number; + /** + * Retrieves the number of keys registered for #device. + * @returns the number of registered keys + */ + get_n_keys(): number; + /** + * Retrieves the {@link Actor} underneath the pointer of #device + * @returns a pointer to the {@link Actor} or %NULL + */ + get_pointer_actor(): Actor; + /** + * Retrieves the {@link Stage} underneath the pointer of #device + * @returns a pointer to the {@link Stage} or %NULL + */ + get_pointer_stage(): Stage; + /** + * Gets the product ID of this device. + * @returns the product ID + */ + get_product_id(): string; + /** + * Retrieves the slave devices attached to #device. + * @returns a + * list of {@link InputDevice}, or %NULL. The contents of the list are + * owned by the device. Use {@link GObject.list_free} when done + */ + get_slave_devices(): InputDevice[]; + /** + * Gets the vendor ID of this device. + * @returns the vendor ID + */ + get_vendor_id(): string; + /** + * Acquires a grab on #actor for the given #device. + * + * Any event coming from #device will be delivered to #actor, bypassing + * the usual event delivery mechanism, until the grab is released by + * calling {@link Clutter.InputDevice.ungrab}. + * + * The grab is client-side: even if the windowing system used by the Clutter + * backend has the concept of "device grabs", Clutter will not use them. + * + * Only {@link InputDevice} of types %CLUTTER_POINTER_DEVICE and + * %CLUTTER_KEYBOARD_DEVICE can hold a grab. + * @param actor a {@link Actor} + */ + grab(actor: Actor): void; + /** + * Translates a hardware keycode from a {@link KeyEvent} to the + * equivalent evdev keycode. Note that depending on the input backend + * used by Clutter this function can fail if there is no obvious + * mapping between the key codes. The hardware keycode can be taken + * from the #ClutterKeyEvent.hardware_keycode member of #ClutterKeyEvent. + * @param hardware_keycode The hardware keycode from a {@link KeyEvent} + * @param evdev_keycode The return location for the evdev keycode + * @returns %TRUE if the conversion succeeded, %FALSE otherwise. + */ + keycode_to_evdev(hardware_keycode: number, evdev_keycode: number): boolean; + /** + * Retrieves a pointer to the {@link Actor} currently grabbing the + * touch events coming from #device given the #sequence. + * @param sequence a {@link EventSequence} + * @returns a {@link Actor}, or %NULL + */ + sequence_get_grabbed_actor(sequence: EventSequence): Actor; + /** + * Acquires a grab on #actor for the given #device and the given touch + * #sequence. + * + * Any touch event coming from #device and from #sequence will be + * delivered to #actor, bypassing the usual event delivery mechanism, + * until the grab is released by calling + * {@link Clutter.InputDevice.sequence_ungrab}. + * + * The grab is client-side: even if the windowing system used by the Clutter + * backend has the concept of "device grabs", Clutter will not use them. + * @param sequence a {@link EventSequence} + * @param actor a {@link Actor} + */ + sequence_grab(sequence: EventSequence, actor: Actor): void; + /** + * Releases the grab on the #device for the given #sequence, if one is + * in place. + * @param sequence a {@link EventSequence} + */ + sequence_ungrab(sequence: EventSequence): void; + /** + * Enables or disables a {@link InputDevice}. + * + * Only devices with a #ClutterInputDevice:device-mode property set + * to %CLUTTER_INPUT_MODE_SLAVE or %CLUTTER_INPUT_MODE_FLOATING can + * be disabled. + * @param enabled %TRUE to enable the #device + */ + set_enabled(enabled: boolean): void; + /** + * Sets the keyval and modifiers at the given #index_ for #device. + * + * Clutter will use the keyval and modifiers set when filling out + * an event coming from the same input device. + * @param index_ the index of the key + * @param keyval the keyval + * @param modifiers a bitmask of modifiers + */ + set_key(index_: number, keyval: number, modifiers: ModifierType): void; + /** + * Releases the grab on the #device, if one is in place. + */ + ungrab(): void; + /** + * Forcibly updates the state of the #device using a {@link Event} + * + * This function should never be used by applications: it is meant + * for integration with embedding toolkits, like clutter-gtk + * + * Embedding toolkits that disable the event collection inside Clutter + * need to use this function to update the state of input devices depending + * on a #ClutterEvent that they are going to submit to the event handling code + * in Clutter though {@link Clutter.do.event}. Since the input devices hold the state + * that is going to be used to fill in fields like the #ClutterButtonEvent + * click count, or to emit synthesized events like %CLUTTER_ENTER and + * %CLUTTER_LEAVE, it is necessary for embedding toolkits to also be + * responsible of updating the input device state. + * + * For instance, this might be the code to translate an embedding toolkit + * native motion notification into a Clutter #ClutterMotionEvent and ask + * Clutter to process it: + * + * |[ + * ClutterEvent c_event; + * + * translate_native_event_to_clutter (native_event, &c_event); + * + * clutter_do_event (&c_event); + * ]| + * + * Before letting clutter_do_event() process the event, it is necessary to call + * clutter_input_device_update_from_event(): + * + * |[ + * ClutterEvent c_event; + * ClutterDeviceManager *manager; + * ClutterInputDevice *device; + * + * translate_native_event_to_clutter (native_event, &c_event); + * + * // get the device manager + * manager = clutter_device_manager_get_default (); + * + * // use the default Core Pointer that Clutter backends register by default + * device = clutter_device_manager_get_core_device (manager, %CLUTTER_POINTER_DEVICE); + * + * // update the state of the input device + * clutter_input_device_update_from_event (device, &c_event, FALSE); + * + * clutter_do_event (&c_event); + * ]| + * + * The #update_stage boolean argument should be used when the input device + * enters and leaves a #ClutterStage; it will use the #ClutterStage field + * of the passed #event to update the stage associated to the input device. + * @param event a {@link Event} + * @param update_stage whether to update the {@link Stage} of the #device + * using the stage of the event + */ + update_from_event(event: Event, update_stage: boolean): void; + connect(signal: "notify::backend", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::device-manager", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::device-mode", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::device-type", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::enabled", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::has-cursor", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::id", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::n-axes", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::name", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::product-id", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::vendor-id", callback: (owner: this, ...args: any) => void): number; + + } + + type InputDeviceInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface InputDeviceInitOptions extends InputDeviceInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link InputDevice} instead. + */ + type InputDeviceMixin = IInputDevice & GObject.Object; + + /** + * Generic representation of an input device. The actual contents of this + * structure depend on the backend used. + */ + interface InputDevice extends InputDeviceMixin {} + + class InputDevice { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Interval} instead. + */ + interface IInterval { + /** + * The final value of the interval. + */ + final: GObject.Value; + /** + * The initial value of the interval. + */ + initial: GObject.Value; + /** + * The type of the values in the interval. + */ + value_type: GObject.Type; + /** + * Creates a copy of #interval. + * @returns the newly created {@link Interval} + */ + clone(): Interval; + /** + * Computes the value between the #interval boundaries given the + * progress #factor + * + * Unlike {@link Clutter.Interval.compute_value}, this function will + * return a const pointer to the computed value + * + * You should use this function if you immediately pass the computed + * value to another function that makes a copy of it, like + * g_object_set_property() + * @param factor the progress factor, between 0 and 1 + * @returns a pointer to the computed value, + * or %NULL if the computation was not successfull + */ + compute(factor: number): GObject.Value; + /** + * Computes the value between the #interval boundaries given the + * progress #factor and copies it into #value. + * @param factor the progress factor, between 0 and 1 + * @returns %TRUE if the operation was successful + * + * return location for an initialized #GValue + */ + compute_value(factor: number): [ boolean, GObject.Value ]; + /** + * Retrieves the final value of #interval and copies + * it into #value. + * + * The passed #GValue must be initialized to the value held by + * the {@link Interval}. + * @returns a #GValue + */ + get_final_value(): GObject.Value; + /** + * Retrieves the initial value of #interval and copies + * it into #value. + * + * The passed #GValue must be initialized to the value held by + * the {@link Interval}. + * @returns a #GValue + */ + get_initial_value(): GObject.Value; + /** + * Variable arguments wrapper for {@link Clutter.Interval.get_initial_value} + * and clutter_interval_get_final_value() that avoids using the + * #GValue arguments: + * + * |[ + * gint a = 0, b = 0; + * clutter_interval_get_interval (interval, &a, &b); + * ]| + * + * This function is meant for the convenience of the C API; bindings + * should reimplement this function using the #GValue-based API. + */ + get_interval(): void; + /** + * Retrieves the #GType of the values inside #interval. + * @returns the type of the value, or G_TYPE_INVALID + */ + get_value_type(): GObject.Type; + /** + * Checks if the #interval has a valid initial and final values. + * @returns %TRUE if the {@link Interval} has an initial and + * final values, and %FALSE otherwise + */ + is_valid(): boolean; + /** + * Gets the pointer to the final value of #interval + * @returns the final value of the interval. + * The value is owned by the {@link Interval} and it should not be + * modified or freed + */ + peek_final_value(): GObject.Value; + /** + * Gets the pointer to the initial value of #interval + * @returns the initial value of the interval. + * The value is owned by the {@link Interval} and it should not be + * modified or freed + */ + peek_initial_value(): GObject.Value; + /** + * Variadic arguments version of {@link Clutter.Interval.set_final_value}. + * + * This function is meant as a convenience for the C API. + * + * Language bindings should use clutter_interval_set_final_value() instead. + */ + set_final(): void; + /** + * Sets the final value of #interval to #value. The value is + * copied inside the {@link Interval}. + * @param value a #GValue + */ + set_final_value(value: GObject.Value): void; + /** + * Variadic arguments version of {@link Clutter.Interval.set_initial_value}. + * + * This function is meant as a convenience for the C API. + * + * Language bindings should use clutter_interval_set_initial_value() + * instead. + */ + set_initial(): void; + /** + * Sets the initial value of #interval to #value. The value is copied + * inside the {@link Interval}. + * @param value a #GValue + */ + set_initial_value(value: GObject.Value): void; + /** + * Variable arguments wrapper for {@link Clutter.Interval.set_initial_value} + * and clutter_interval_set_final_value() that avoids using the + * #GValue arguments: + * + * |[ + * clutter_interval_set_interval (interval, 0, 50); + * clutter_interval_set_interval (interval, 1.0, 0.0); + * clutter_interval_set_interval (interval, FALSE, TRUE); + * ]| + * + * This function is meant for the convenience of the C API; bindings + * should reimplement this function using the #GValue-based API. + */ + set_interval(): void; + /** + * Validates the initial and final values of #interval against + * a #GParamSpec. + * @param pspec a #GParamSpec + * @returns %TRUE if the {@link Interval} is valid, %FALSE otherwise + */ + validate(pspec: GObject.ParamSpec): boolean; + connect(signal: "notify::final", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::initial", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::value-type", callback: (owner: this, ...args: any) => void): number; + + } + + type IntervalInitOptionsMixin = GObject.InitiallyUnownedInitOptions & ScriptableInitOptions & + Pick; + + export interface IntervalInitOptions extends IntervalInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Interval} instead. + */ + type IntervalMixin = IInterval & GObject.InitiallyUnowned & Scriptable; + + /** + * The {@link Interval} structure contains only private data and should + * be accessed using the provided functions. + */ + interface Interval extends IntervalMixin {} + + class Interval { + public constructor(options?: Partial); + /** + * Creates a new {@link Interval} holding values of type #gtype. + * + * This function avoids using a #GValue for the initial and final values + * of the interval: + * + * |[ + * interval = clutter_interval_new (G_TYPE_FLOAT, 0.0, 1.0); + * interval = clutter_interval_new (G_TYPE_BOOLEAN, FALSE, TRUE); + * interval = clutter_interval_new (G_TYPE_INT, 0, 360); + * ]| + * @param gtype the type of the values in the interval + * @returns the newly created {@link Interval} + */ + public static new(gtype: GObject.Type): Interval; + /** + * Creates a new {@link Interval} of type #gtype, between #initial + * and #final. + * + * This function is useful for language bindings. + * @param gtype the type of the values in the interval + * @param initial a #GValue holding the initial value of the interval + * @param _final a #GValue holding the final value of the interval + * @returns the newly created {@link Interval} + */ + public static new_with_values(gtype: GObject.Type, initial: GObject.Value | null, _final: GObject.Value | null): Interval; + /** + * Sets the progress function for a given #value_type, like: + * + * |[ + * clutter_interval_register_progress_func (MY_TYPE_FOO, + * my_foo_progress); + * ]| + * + * Whenever a {@link Interval} instance using the default + * #ClutterInterval::compute_value implementation is set as an + * interval between two #GValue of type #value_type, it will call + * #func to establish the value depending on the given progress, + * for instance: + * + * |[ + * static gboolean + * my_int_progress (const GValue *a, + * const GValue *b, + * gdouble progress, + * GValue *retval) + * { + * gint ia = g_value_get_int (a); + * gint ib = g_value_get_int (b); + * gint res = factor * (ib - ia) + ia; + * + * g_value_set_int (retval, res); + * + * return TRUE; + * } + * + * clutter_interval_register_progress_func (G_TYPE_INT, my_int_progress); + * ]| + * + * To unset a previously set progress function of a #GType, pass %NULL + * for #func. + * @param value_type a #GType + * @param func a {@link ProgressFunc}, or %NULL to unset a previously + * set progress function + */ + public static register_progress_func(value_type: GObject.Type, func: ProgressFunc): void; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link KeyframeTransition} instead. + */ + interface IKeyframeTransition { + /** + * Removes all key frames from #transition. + */ + clear(): void; + /** + * Retrieves the details of the key frame at #index_ inside #transition. + * + * The #transition must already have key frames set, and #index_ must be + * smaller than the number of key frames. + * @param index_ the index of the key frame + * @returns return location for the key, or %NULL + * + * return location for the easing mode, or %NULL + * + * a #GValue initialized with the type of + * the values + */ + get_key_frame(index_: number): [ key: number | null, mode: AnimationMode | null, value: GObject.Value ]; + /** + * Retrieves the number of key frames inside #transition. + * @returns the number of key frames + */ + get_n_key_frames(): number; + /** + * Sets the key frames of the #transition. + * + * This variadic arguments function is a convenience for C developers; + * language bindings should use {@link Clutter.KeyframeTransition.set_key_frames}, + * clutter_keyframe_transition_set_modes(), and + * clutter_keyframe_transition_set_values() instead. + * @param gtype the type of the values to use for the key frames + * @param n_key_frames the number of key frames between the initial + * and final values + */ + set(gtype: GObject.Type, n_key_frames: number): void; + /** + * Sets the details of the key frame at #index_ inside #transition. + * + * The #transition must already have a key frame at #index_, and #index_ + * must be smaller than the number of key frames inside #transition. + * @param index_ the index of the key frame + * @param key the key of the key frame + * @param mode the easing mode of the key frame + * @param value a #GValue containing the value of the key frame + */ + set_key_frame(index_: number, key: number, mode: AnimationMode, value: GObject.Value): void; + /** + * Sets the keys for each key frame inside #transition. + * + * If #transition does not hold any key frame, #n_key_frames key frames + * will be created; if #transition already has key frames, #key_frames must + * have at least as many elements as the number of key frames. + * @param n_key_frames the number of values + * @param key_frames an array of keys between 0.0 + * and 1.0, one for each key frame + */ + set_key_frames(n_key_frames: number, key_frames: number[]): void; + /** + * Sets the easing modes for each key frame inside #transition. + * + * If #transition does not hold any key frame, #n_modes key frames will + * be created; if #transition already has key frames, #modes must have + * at least as many elements as the number of key frames. + * @param n_modes the number of easing modes + * @param modes an array of easing modes, one for + * each key frame + */ + set_modes(n_modes: number, modes: AnimationMode[]): void; + /** + * Sets the values for each key frame inside #transition. + * + * If #transition does not hold any key frame, #n_values key frames will + * be created; if #transition already has key frames, #values must have + * at least as many elements as the number of key frames. + * @param n_values the number of values + * @param values an array of values, one for each + * key frame + */ + set_values(n_values: number, values: GObject.Value[]): void; + } + + type KeyframeTransitionInitOptionsMixin = PropertyTransitionInitOptions & ScriptableInitOptions + export interface KeyframeTransitionInitOptions extends KeyframeTransitionInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link KeyframeTransition} instead. + */ + type KeyframeTransitionMixin = IKeyframeTransition & PropertyTransition & Scriptable; + + /** + * The `ClutterKeyframeTransition` structure contains only private + * data and should be accessed using the provided API. + */ + interface KeyframeTransition extends KeyframeTransitionMixin {} + + class KeyframeTransition { + public constructor(options?: Partial); + /** + * Creates a new {@link KeyframeTransition} for #property_name. + * @param property_name the property to animate + * @returns the newly allocated + * {@link KeyframeTransition} instance. Use {@link GObject.Object.unref} when + * done to free its resources. + */ + public static new(property_name: string): Transition; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link LayoutManager} instead. + */ + interface ILayoutManager { + /** + * Allocates the children of #container given an area + * + * See also {@link Clutter.Actor.allocate} + * @param container the {@link Container} using #manager + * @param allocation the {@link ActorBox} containing the allocated area + * of #container + * @param flags the allocation flags + */ + allocate(container: Container, allocation: ActorBox, flags: AllocationFlags): void; + /** + * Begins an animation of #duration milliseconds, using the provided + * easing #mode + * + * The easing mode can be specified either as a {@link AnimationMode} + * or as a logical id returned by {@link Clutter.Alpha.register_func} + * + * The result of this function depends on the #manager implementation + * @param duration the duration of the animation, in milliseconds + * @param mode the easing mode of the animation + * @returns The {@link Alpha} created by the + * layout manager; the returned instance is owned by the layout + * manager and should not be unreferenced + */ + begin_animation(duration: number, mode: number): Alpha; + /** + * Retrieves the values for a list of properties out of the + * {@link LayoutMeta} created by #manager and attached to the + * child of a #container + * @param container a {@link Container} using #manager + * @param actor a {@link Actor} child of #container + * @param first_property the name of the first property + */ + child_get(container: Container, actor: Actor, first_property: string): void; + /** + * Gets a property on the {@link LayoutMeta} created by #manager and + * attached to a child of #container + * + * The #GValue must already be initialized to the type of the property + * and has to be unset with {@link GObject.Value.unset} after extracting the real + * value out of it + * @param container a {@link Container} using #manager + * @param actor a {@link Actor} child of #container + * @param property_name the name of the property to get + * @param value a #GValue with the value of the property to get + */ + child_get_property(container: Container, actor: Actor, property_name: string, value: GObject.Value): void; + /** + * Sets a list of properties and their values on the {@link LayoutMeta} + * associated by #manager to a child of #container + * + * Languages bindings should use {@link Clutter.LayoutManager.child_set_property} + * instead + * @param container a {@link Container} using #manager + * @param actor a {@link Actor} child of #container + * @param first_property the first property name + */ + child_set(container: Container, actor: Actor, first_property: string): void; + /** + * Sets a property on the {@link LayoutMeta} created by #manager and + * attached to a child of #container + * @param container a {@link Container} using #manager + * @param actor a {@link Actor} child of #container + * @param property_name the name of the property to set + * @param value a #GValue with the value of the property to set + */ + child_set_property(container: Container, actor: Actor, property_name: string, value: GObject.Value): void; + /** + * Ends an animation started by {@link Clutter.LayoutManager.begin_animation} + * + * The result of this call depends on the #manager implementation + */ + end_animation(): void; + /** + * Retrieves the #GParamSpec for the layout property #name inside + * the {@link LayoutMeta} sub-class used by #manager + * @param name the name of the property + * @returns a #GParamSpec describing the property, + * or %NULL if no property with that name exists. The returned + * #GParamSpec is owned by the layout manager and should not be + * modified or freed + */ + find_child_property(name: string): GObject.ParamSpec; + /** + * Retrieves the progress of the animation, if one has been started by + * {@link Clutter.LayoutManager.begin_animation} + * + * The returned value has the same semantics of the {@link Alpha.alpha} + * value + * @returns the progress of the animation + */ + get_animation_progress(): number; + /** + * Retrieves the {@link LayoutMeta} that the layout #manager associated + * to the #actor child of #container, eventually by creating one if the + * #ClutterLayoutManager supports layout properties + * @param container a {@link Container} using #manager + * @param actor a {@link Actor} child of #container + * @returns a {@link LayoutMeta}, or %NULL if the + * #ClutterLayoutManager does not have layout properties. The returned + * layout meta instance is owned by the #ClutterLayoutManager and it + * should not be unreferenced + */ + get_child_meta(container: Container, actor: Actor): LayoutMeta; + /** + * Computes the minimum and natural heights of the #container according + * to #manager. + * + * See also {@link Clutter.Actor.get_preferred_height} + * @param container the {@link Container} using #manager + * @param for_width the width for which the height should be computed, or -1 + * @returns return location for the minimum height + * of the layout, or %NULL + * + * return location for the natural height + * of the layout, or %NULL + */ + get_preferred_height(container: Container, for_width: number): [ min_height_p: number | null, nat_height_p: number | null ]; + /** + * Computes the minimum and natural widths of the #container according + * to #manager. + * + * See also {@link Clutter.Actor.get_preferred_width} + * @param container the {@link Container} using #manager + * @param for_height the height for which the width should be computed, or -1 + * @returns return location for the minimum width + * of the layout, or %NULL + * + * return location for the natural width + * of the layout, or %NULL + */ + get_preferred_width(container: Container, for_height: number): [ min_width_p: number | null, nat_width_p: number | null ]; + /** + * Emits the {@link LayoutManager.layout_changed} signal on #manager + * + * This function should only be called by implementations of the + * #ClutterLayoutManager class + */ + layout_changed(): void; + /** + * Retrieves all the #GParamSpecs for the layout properties + * stored inside the {@link LayoutMeta} sub-class used by #manager + * @returns the newly-allocated, + * %NULL-terminated array of #GParamSpecs. Use {@link GObject.free} to free the + * resources allocated for the array + * + * return location for the number of returned + * #GParamSpecs + */ + list_child_properties(): [ GObject.ParamSpec[], number ]; + /** + * If the {@link LayoutManager} sub-class allows it, allow + * adding a weak reference of the #container using #manager + * from within the layout manager + * + * The layout manager should not increase the reference + * count of the #container + * @param container a {@link Container} using #manager + */ + set_container(container: Container | null): void; + /** + * The ::layout-changed signal is emitted each time a layout manager + * has been changed. Every {@link Actor} using the #manager instance + * as a layout manager should connect a handler to the ::layout-changed + * signal and queue a relayout on themselves: + * + * |[ + * static void layout_changed (ClutterLayoutManager *manager, + * ClutterActor *self) + * { + * clutter_actor_queue_relayout (self); + * } + * ... + * self->manager = g_object_ref_sink (manager); + * g_signal_connect (self->manager, "layout-changed", + * G_CALLBACK (layout_changed), + * self); + * ]| + * + * Sub-classes of #ClutterLayoutManager that implement a layout that + * can be controlled or changed using parameters should emit the + * ::layout-changed signal whenever one of the parameters changes, + * by using {@link Clutter.LayoutManager.layout_changed}. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "layout-changed", callback: (owner: this) => void): number; + + } + + type LayoutManagerInitOptionsMixin = GObject.InitiallyUnownedInitOptions + export interface LayoutManagerInitOptions extends LayoutManagerInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link LayoutManager} instead. + */ + type LayoutManagerMixin = ILayoutManager & GObject.InitiallyUnowned; + + /** + * The {@link LayoutManager} structure contains only private data + * and should be accessed using the provided API + */ + interface LayoutManager extends LayoutManagerMixin {} + + class LayoutManager { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link LayoutMeta} instead. + */ + interface ILayoutMeta { + /** + * The {@link LayoutManager} that created this #ClutterLayoutMeta. + */ + manager: LayoutManager; + /** + * the layout manager handling this data + */ + // readonly manager: LayoutManager; + /** + * Retrieves the actor wrapped by #data + * @returns a {@link LayoutManager} + */ + get_manager(): LayoutManager; + connect(signal: "notify::manager", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::manager", callback: (owner: this, ...args: any) => void): number; + + } + + type LayoutMetaInitOptionsMixin = ChildMetaInitOptions & + Pick; + + export interface LayoutMetaInitOptions extends LayoutMetaInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link LayoutMeta} instead. + */ + type LayoutMetaMixin = ILayoutMeta & ChildMeta; + + /** + * Sub-class of {@link ChildMeta} specific for layout managers + * + * A #ClutterLayoutManager sub-class should create a #ClutterLayoutMeta + * instance by overriding the {@link #ClutterLayoutManager::create.child_meta} + * virtual function + */ + interface LayoutMeta extends LayoutMetaMixin {} + + class LayoutMeta { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link ListModel} instead. + */ + interface IListModel { + + } + + type ListModelInitOptionsMixin = ModelInitOptions & ScriptableInitOptions + export interface ListModelInitOptions extends ListModelInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link ListModel} instead. + */ + type ListModelMixin = IListModel & Model & Scriptable; + + /** + * The {@link ListModel} struct contains only private data. + */ + interface ListModel extends ListModelMixin {} + + class ListModel { + public constructor(options?: Partial); + /** + * @deprecated + * Use #GListStore instead + * + * Creates a new default model with #n_columns columns with the types + * and names passed in. + * + * For example: + * + * + * model = clutter_list_model_new (3, + * G_TYPE_INT, "Score", + * G_TYPE_STRING, "Team", + * GDK_TYPE_PIXBUF, "Logo"); + * + * + * will create a new {@link Model} with three columns of type int, + * string and #GdkPixbuf respectively. + * + * Note that the name of the column can be set to %NULL, in which case + * the canonical name of the type held by the column will be used as + * the title. + * @param n_columns number of columns in the model + * @returns a new {@link ListModel} + */ + public static new(n_columns: number): Model; + /** + * @deprecated + * Use #GListStore instead + * + * Non-vararg version of {@link Clutter.ListModel.new}. This function is + * useful for language bindings. + * @param n_columns number of columns in the model + * @param types an array of #GType types for the columns, from first to last + * @param names an array of names for the columns, from first to last + * @returns a new default {@link Model} + */ + public static newv(n_columns: number, types: GObject.Type[], names: string[]): Model; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Model} instead. + */ + interface IModel { + /** + * @deprecated + * Use #GListModel instead + * + * Whether the {@link Model} has a filter set + * + * This property is set to %TRUE if a filter function has been + * set using {@link Clutter.Model.set_filter} + */ + readonly filter_set: boolean; + /** + * @deprecated + * Use #GListModel instead + * + * Creates and appends a new row to the {@link Model}, setting the + * row values upon creation. For example, to append a new row where + * column 0 is type %G_TYPE_INT and column 1 is of type %G_TYPE_STRING: + * + * + * ClutterModel *model; + * model = clutter_model_default_new (2, + * G_TYPE_INT, "Score", + * G_TYPE_STRING, "Team"); + * clutter_model_append (model, 0, 42, 1, "Team #1", -1); + * + */ + append(): void; + /** + * @deprecated + * Use #GListModel instead + * + * Creates and appends a new row to the {@link Model}, setting the row + * values for the given #columns upon creation. + * @param n_columns the number of columns and values + * @param columns a vector with the columns to set + * @param values a vector with the values + */ + appendv(n_columns: number, columns: number[], values: GObject.Value[]): void; + /** + * @deprecated + * Use #GListModel instead + * + * Checks whether the row pointer by #iter should be filtered or not using + * the filtering function set on #model. + * + * This function should be used only by subclasses of {@link Model}. + * @param iter the row to filter + * @returns %TRUE if the row should be displayed, + * %FALSE otherwise + */ + filter_iter(iter: ModelIter): boolean; + /** + * @deprecated + * Use #GListModel instead + * + * Checks whether #row should be filtered or not using the + * filtering function set on #model. + * + * This function should be used only by subclasses of {@link Model}. + * @param row the row to filter + * @returns %TRUE if the row should be displayed, + * %FALSE otherwise + */ + filter_row(row: number): boolean; + /** + * @deprecated + * Use #GListModel instead + * + * Calls #func for each row in the model. + * @param func a {@link ModelForeachFunc} + */ + foreach(func: ModelForeachFunc): void; + /** + * @deprecated + * Use #GListModel instead + * + * Retrieves the name of the #column + * @param column the column number + * @returns the name of the column. The model holds the returned + * string, and it should not be modified or freed + */ + get_column_name(column: number): string; + /** + * @deprecated + * Use #GListModel instead + * + * Retrieves the type of the #column. + * @param column the column number + * @returns the type of the column. + */ + get_column_type(column: number): GObject.Type; + /** + * @deprecated + * Use #GListModel instead + * + * Returns whether the #model has a filter in place, set + * using {@link Clutter.Model.set_filter} + * @returns %TRUE if a filter is set + */ + get_filter_set(): boolean; + /** + * @deprecated + * Use #GListModel instead + * + * Retrieves a {@link ModelIter} representing the first non-filtered + * row in #model. + * @returns A new {@link ModelIter}. + * Call {@link GObject.Object.unref} when done using it + */ + get_first_iter(): ModelIter; + /** + * @deprecated + * Use #GListModel instead + * + * Retrieves a {@link ModelIter} representing the row at the given index. + * + * If a filter function has been set using {@link Clutter.Model.set_filter} + * then the #model implementation will return the first non filtered + * row. + * @param row position of the row to retrieve + * @returns A new {@link ModelIter}, or %NULL if #row was + * out of bounds. When done using the iterator object, call {@link GObject.Object.unref} + * to deallocate its resources + */ + get_iter_at_row(row: number): ModelIter; + /** + * @deprecated + * Use #GListModel instead + * + * Retrieves a {@link ModelIter} representing the last non-filtered + * row in #model. + * @returns A new {@link ModelIter}. + * Call {@link GObject.Object.unref} when done using it + */ + get_last_iter(): ModelIter; + /** + * @deprecated + * Use #GListModel instead + * + * Retrieves the number of columns inside #model. + * @returns the number of columns + */ + get_n_columns(): number; + /** + * @deprecated + * Use #GListModel instead + * + * Retrieves the number of rows inside #model, eventually taking + * into account any filtering function set using {@link Clutter.Model.set_filter}. + * @returns The length of the #model. If there is a filter set, then + * the length of the filtered #model is returned. + */ + get_n_rows(): number; + /** + * @deprecated + * Use #GListModel instead + * + * Retrieves the number of column used for sorting the #model. + * @returns a column number, or -1 if the model is not sorted + */ + get_sorting_column(): number; + /** + * @deprecated + * Use #GListModel instead + * + * Inserts a new row to the {@link Model} at #row, setting the row + * values upon creation. For example, to insert a new row at index 100, + * where column 0 is type %G_TYPE_INT and column 1 is of type + * %G_TYPE_STRING: + * + * + * ClutterModel *model; + * model = clutter_model_default_new (2, + * G_TYPE_INT, "Score", + * G_TYPE_STRING, "Team"); + * clutter_model_insert (model, 3, 0, 42, 1, "Team #1", -1); + * + * @param row the position to insert the new row + */ + insert(row: number): void; + /** + * @deprecated + * Use #GListModel instead + * + * Sets the data in the cell specified by #iter and #column. The type of + * #value must be convertable to the type of the column. If the row does + * not exist then it is created. + * @param row position of the row to modify + * @param column column to modify + * @param value new value for the cell + */ + insert_value(row: number, column: number, value: GObject.Value): void; + /** + * @deprecated + * Use #GListModel instead + * + * Inserts data at #row into the {@link Model}, setting the row + * values for the given #columns upon creation. + * @param row row index + * @param n_columns the number of columns and values to set + * @param columns a vector containing the columns to set + * @param values a vector containing the values for the cells + */ + insertv(row: number, n_columns: number, columns: number[], values: GObject.Value[]): void; + /** + * @deprecated + * Use #GListModel instead + * + * Creates and prepends a new row to the {@link Model}, setting the row + * values upon creation. For example, to prepend a new row where column 0 + * is type %G_TYPE_INT and column 1 is of type %G_TYPE_STRING: + * + * + * ClutterModel *model; + * model = clutter_model_default_new (2, + * G_TYPE_INT, "Score", + * G_TYPE_STRING, "Team"); + * clutter_model_prepend (model, 0, 42, 1, "Team #1", -1); + * + */ + prepend(): void; + /** + * @deprecated + * Use #GListModel instead + * + * Creates and prepends a new row to the {@link Model}, setting the row + * values for the given #columns upon creation. + * @param n_columns the number of columns and values to set + * @param columns a vector containing the columns to set + * @param values a vector containing the values for the cells + */ + prependv(n_columns: number, columns: number[], values: GObject.Value[]): void; + /** + * @deprecated + * Use #GListModel instead + * + * Removes the row at the given position from the model. + * @param row position of row to remove + */ + remove(row: number): void; + /** + * @deprecated + * Use #GListModel instead + * + * Force a resort on the #model. This function should only be + * used by subclasses of {@link Model}. + */ + resort(): void; + /** + * @deprecated + * Use #GListModel instead + * + * Filters the #model using the given filtering function. + * @param func a {@link ModelFilterFunc}, or #NULL + * @param notify destroy notifier of #user_data, or #NULL + */ + set_filter(func: ModelFilterFunc | null, notify: GLib.DestroyNotify): void; + /** + * @deprecated + * Use #GListModel instead + * + * Assigns a name to the columns of a {@link Model}. + * + * This function is meant primarily for #GObjects that inherit from + * #ClutterModel, and should only be used when contructing a #ClutterModel. + * It will not work after the initial creation of the #ClutterModel. + * @param n_columns the number of column names + * @param names an array of strings + */ + set_names(n_columns: number, names: string[]): void; + /** + * @deprecated + * Use #GListModel instead + * + * Sorts #model using the given sorting function. + * @param column the column to sort on + * @param func a {@link ModelSortFunc}, or #NULL + * @param notify destroy notifier of #user_data, or #NULL + */ + set_sort(column: number, func: ModelSortFunc | null, notify: GLib.DestroyNotify): void; + /** + * @deprecated + * Use #GListModel instead + * + * Sets the model to sort by #column. If #column is a negative value + * the sorting column will be unset. + * @param column the column of the #model to sort, or -1 + */ + set_sorting_column(column: number): void; + /** + * @deprecated + * Use #GListModel instead + * + * Sets the types of the columns inside a {@link Model}. + * + * This function is meant primarily for #GObjects that inherit from + * #ClutterModel, and should only be used when contructing a #ClutterModel. + * It will not work after the initial creation of the #ClutterModel. + * @param n_columns number of columns for the model + * @param types an array of #GType types + */ + set_types(n_columns: number, types: GObject.Type[]): void; + /** + * The ::filter-changed signal is emitted when a new filter has been applied + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "filter-changed", callback: (owner: this) => void): number; + /** + * The ::row-added signal is emitted when a new row has been added. + * The data on the row has already been set when the ::row-added signal + * has been emitted. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - iter: a {@link ModelIter} pointing to the new row + * + * @returns Callback ID + */ + connect(signal: "row-added", callback: (owner: this, iter: ModelIter) => void): number; + /** + * The ::row-removed signal is emitted when a row has been changed. + * The data on the row has already been updated when the ::row-changed + * signal has been emitted. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - iter: a {@link ModelIter} pointing to the changed row + * + * @returns Callback ID + */ + connect(signal: "row-changed", callback: (owner: this, iter: ModelIter) => void): number; + /** + * The ::row-removed signal is emitted when a row has been removed. + * The data on the row pointed by the passed iterator is still valid + * when the ::row-removed signal has been emitted. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - iter: a {@link ModelIter} pointing to the removed row + * + * @returns Callback ID + */ + connect(signal: "row-removed", callback: (owner: this, iter: ModelIter) => void): number; + /** + * The ::sort-changed signal is emitted after the model has been sorted + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "sort-changed", callback: (owner: this) => void): number; + + connect(signal: "notify::filter-set", callback: (owner: this, ...args: any) => void): number; + + } + + type ModelInitOptionsMixin = GObject.ObjectInitOptions & ScriptableInitOptions + export interface ModelInitOptions extends ModelInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Model} instead. + */ + type ModelMixin = IModel & GObject.Object & Scriptable; + + /** + * Base class for list models. The {@link Model} structure contains + * only private data and should be manipulated using the provided + * API. + */ + interface Model extends ModelMixin {} + + class Model { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link ModelIter} instead. + */ + interface IModelIter { + /** + * @deprecated + * Use #GListModel instead + * + * A reference to the {@link Model} that this iter belongs to. + */ + model: Model; + /** + * @deprecated + * Use #GListModel instead + * + * The row number to which this iter points to. + */ + row: number; + /** + * @deprecated + * Use #GListModel instead + * + * Copies the passed iterator. + * @returns a copy of the iterator, or %NULL + */ + copy(): ModelIter; + /** + * @deprecated + * Use #GListModel instead + * + * Gets the value of one or more cells in the row referenced by #iter. The + * variable argument list should contain integer column numbers, each column + * column number followed by a place to store the value being retrieved. The + * list is terminated by a -1. + * + * For example, to get a value from column 0 with type %G_TYPE_STRING use: + * + * clutter_model_iter_get (iter, 0, &place_string_here, -1); + * + * + * where place_string_here is a gchar* to be filled with the string. If + * appropriate, the returned values have to be freed or unreferenced. + */ + get(): void; + /** + * @deprecated + * Use #GListModel instead + * + * Retrieves a pointer to the {@link Model} that this iter is part of. + * @returns a pointer to a {@link Model}. + */ + get_model(): Model; + /** + * @deprecated + * Use #GListModel instead + * + * Retrieves the position of the row that the #iter points to. + * @returns the position of the #iter in the model + */ + get_row(): number; + /** + * @deprecated + * Use #GListModel instead + * + * See {@link Clutter.ModelIter.get}. This version takes a va_list for language + * bindings. + * @param args a list of column/return location pairs, terminated by -1 + */ + get_valist(args: any[]): void; + /** + * @deprecated + * Use #GListModel instead + * + * Sets an initializes #value to that at #column. When done with #value, + * {@link GObject.Value.unset} needs to be called to free any allocated memory. + * @param column column number to retrieve the value from + * @returns an empty #GValue to set + */ + get_value(column: number): GObject.Value; + /** + * @deprecated + * Use #GListModel instead + * + * Gets whether the current iterator is at the beginning of the model + * to which it belongs. + * @returns #TRUE if #iter is the first iter in the filtered model + */ + is_first(): boolean; + /** + * @deprecated + * Use #GListModel instead + * + * Gets whether the iterator is at the end of the model to which it + * belongs. + * @returns #TRUE if #iter is the last iter in the filtered model. + */ + is_last(): boolean; + /** + * @deprecated + * Use #GListModel instead + * + * Updates the #iter to point at the next position in the model. + * The model implementation should take into account the presence of + * a filter function. + * @returns The passed iterator, updated to point at the next + * row in the model. + */ + next(): ModelIter; + /** + * @deprecated + * Use #GListModel instead + * + * Sets the #iter to point at the previous position in the model. + * The model implementation should take into account the presence of + * a filter function. + * @returns The passed iterator, updated to point at the previous + * row in the model. + */ + prev(): ModelIter; + /** + * @deprecated + * Use #GListModel instead + * + * Sets the value of one or more cells in the row referenced by #iter. The + * variable argument list should contain integer column numbers, each column + * column number followed by the value to be set. The list is terminated by a + * -1. + * + * For example, to set column 0 with type %G_TYPE_STRING, use: + * + * clutter_model_iter_set (iter, 0, "foo", -1); + * + */ + set(): void; + /** + * @deprecated + * Use #GListModel instead + * + * See {@link Clutter.ModelIter.set}; this version takes a va_list for language + * bindings. + * @param args va_list of column/value pairs, terminiated by -1 + */ + set_valist(args: any[]): void; + /** + * @deprecated + * Use #GListModel instead + * + * Sets the data in the cell specified by #iter and #column. The type of + * #value must be convertable to the type of the column. + * @param column column number to retrieve the value from + * @param value new value for the cell + */ + set_value(column: number, value: GObject.Value): void; + connect(signal: "notify::model", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::row", callback: (owner: this, ...args: any) => void): number; + + } + + type ModelIterInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface ModelIterInitOptions extends ModelIterInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link ModelIter} instead. + */ + type ModelIterMixin = IModelIter & GObject.Object; + + /** + * Base class for list models iters. The {@link ModelIter} structure + * contains only private data and should be manipulated using the + * provided API. + */ + interface ModelIter extends ModelIterMixin {} + + class ModelIter { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link OffscreenEffect} instead. + */ + interface IOffscreenEffect { + /** + * Calls the {@link Create.texture} virtual function of the #effect + * @param width the minimum width of the target texture + * @param height the minimum height of the target texture + * @returns a handle to a Cogl texture, or + * %COGL_INVALID_HANDLE. The returned handle has its reference + * count increased. + */ + create_texture(width: number, height: number): Cogl.Handle; + /** + * Retrieves the material used as a render target for the offscreen + * buffer created by #effect + * + * You should only use the returned #CoglMaterial when painting. The + * returned material might change between different frames. + * @returns a #CoglMaterial or %NULL. The + * returned material is owned by Clutter and it should not be + * modified or freed + */ + get_target(): Cogl.Material; + /** + * Retrieves the origin and size of the offscreen buffer used by #effect to + * paint the actor to which it has been applied. + * + * This function should only be called by {@link OffscreenEffect} + * implementations, from within the {@link #ClutterOffscreenEffectClass.paint.target} + * virtual function. + * @returns %TRUE if the offscreen buffer has a valid rectangle, + * and %FALSE otherwise + * + * return location for the target area + */ + get_target_rect(): [ boolean, Rect ]; + /** + * @deprecated + * Use {@link Clutter.OffscreenEffect.get_target_rect} instead + * + * Retrieves the size of the offscreen buffer used by #effect to + * paint the actor to which it has been applied. + * + * This function should only be called by {@link OffscreenEffect} + * implementations, from within the {@link #ClutterOffscreenEffectClass.paint.target} + * virtual function. + * @returns %TRUE if the offscreen buffer has a valid size, + * and %FALSE otherwise + * + * return location for the target width, or %NULL + * + * return location for the target height, or %NULL + */ + get_target_size(): [ boolean, number, number ]; + /** + * Retrieves the texture used as a render target for the offscreen + * buffer created by #effect + * + * You should only use the returned texture when painting. The texture + * may change after ClutterEffect::pre_paint is called so the effect + * implementation should update any references to the texture after + * chaining-up to the parent's pre_paint implementation. This can be + * used instead of {@link Clutter.OffscreenEffect.get_target} when the + * effect subclass wants to paint using its own material. + * @returns a #CoglHandle or %COGL_INVALID_HANDLE. The + * returned texture is owned by Clutter and it should not be + * modified or freed + */ + get_texture(): Cogl.Handle; + /** + * Calls the {@link Paint.target} virtual function of the #effect + */ + paint_target(): void; + } + + type OffscreenEffectInitOptionsMixin = EffectInitOptions + export interface OffscreenEffectInitOptions extends OffscreenEffectInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link OffscreenEffect} instead. + */ + type OffscreenEffectMixin = IOffscreenEffect & Effect; + + /** + * The {@link OffscreenEffect} structure contains only private data + * and should be accessed using the provided API + */ + interface OffscreenEffect extends OffscreenEffectMixin {} + + class OffscreenEffect { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link PageTurnEffect} instead. + */ + interface IPageTurnEffect { + /** + * The angle of the page rotation, in degrees, between 0.0 and 360.0 + */ + angle: number; + /** + * The period of the page turn, between 0.0 (no curling) and + * 1.0 (fully curled) + */ + period: number; + /** + * The radius of the page curl, in pixels + */ + radius: number; + /** + * Retrieves the value set using {@link Clutter.PageTurnEffect.get_angle} + * @returns the angle of the page curling + */ + get_angle(): number; + /** + * Retrieves the value set using {@link Clutter.PageTurnEffect.get_period} + * @returns the period of the page curling + */ + get_period(): number; + /** + * Retrieves the value set using {@link Clutter.PageTurnEffect.set_radius} + * @returns the radius of the page curling + */ + get_radius(): number; + /** + * Sets the angle of the page curling, in degrees + * @param angle the angle of the page curl, in degrees + */ + set_angle(angle: number): void; + /** + * Sets the period of the page curling, between 0.0 (no curling) + * and 1.0 (fully curled) + * @param period the period of the page curl, between 0.0 and 1.0 + */ + set_period(period: number): void; + /** + * Sets the radius of the page curling + * @param radius the radius of the page curling, in pixels + */ + set_radius(radius: number): void; + connect(signal: "notify::angle", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::period", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::radius", callback: (owner: this, ...args: any) => void): number; + + } + + type PageTurnEffectInitOptionsMixin = DeformEffectInitOptions & + Pick; + + export interface PageTurnEffectInitOptions extends PageTurnEffectInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link PageTurnEffect} instead. + */ + type PageTurnEffectMixin = IPageTurnEffect & DeformEffect; + + /** + * {@link PageTurnEffect} is an opaque structure + * whose members can only be accessed using the provided API + */ + interface PageTurnEffect extends PageTurnEffectMixin {} + + class PageTurnEffect { + public constructor(options?: Partial); + /** + * Creates a new {@link PageTurnEffect} instance with the given parameters + * @param period the period of the page curl, between 0.0 and 1.0 + * @param angle the angle of the page curl, between 0.0 and 360.0 + * @param radius the radius of the page curl, in pixels + * @returns the newly created {@link PageTurnEffect} + */ + public static new(period: number, angle: number, radius: number): Effect; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link PaintNode} instead. + */ + interface IPaintNode { + /** + * Adds #child to the list of children of #node. + * + * This function will acquire a reference on #child. + * @param child the child {@link PaintNode} to add + */ + add_child(child: PaintNode): void; + /** + * Adds a rectangle region to the #node, as described by the + * passed #rect. + * @param rect a {@link ActorBox} + */ + add_rectangle(rect: ActorBox): void; + /** + * Adds a rectangle region to the #node, with texture coordinates. + * @param rect a {@link ActorBox} + * @param x_1 the left X coordinate of the texture + * @param y_1 the top Y coordinate of the texture + * @param x_2 the right X coordinate of the texture + * @param y_2 the bottom Y coordinate of the texture + */ + add_texture_rectangle(rect: ActorBox, x_1: number, y_1: number, x_2: number, y_2: number): void; + /** + * Acquires a reference on #node. + * @returns the {@link PaintNode} + */ + ref(): PaintNode; + /** + * Sets a user-readable #name for #node. + * + * The #name will be used for debugging purposes. + * + * The #node will copy the passed string. + * @param name a string annotating the #node + */ + set_name(name: string): void; + /** + * Releases a reference on #node. + */ + unref(): void; + } + + type PaintNodeInitOptionsMixin = {}; + export interface PaintNodeInitOptions extends PaintNodeInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link PaintNode} instead. + */ + type PaintNodeMixin = IPaintNode; + + /** + * The `ClutterPaintNode` structure contains only private data + * and it should be accessed using the provided API. + */ + interface PaintNode extends PaintNodeMixin {} + + class PaintNode { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link PanAction} instead. + */ + interface IPanAction { + /** + * The initial acceleration factor + * + * The kinetic momentum measured at the time of releasing the pointer will + * be multiplied by the factor specified by this property before being used + * to generate interpolated ::pan events. + */ + acceleration_factor: number; + /** + * The rate at which the interpolated panning will decelerate in + * + * {@link PanAction} will emit interpolated ::pan events with decreasing + * scroll deltas, using the rate specified by this property. + */ + deceleration: number; + /** + * Whether interpolated events emission is enabled. + */ + interpolate: boolean; + /** + * Constraints the panning action to the specified axis + */ + pan_axis: PanAxis; + /** + * Retrieves the initial acceleration factor for interpolated ::pan events. + * @returns The initial acceleration factor for interpolated events. + */ + get_acceleration_factor(): number; + /** + * Retrieves the delta, in stage space, dependent on the current state + * of the {@link PanAction}, and respecting the constraint specified by the + * #ClutterPanAction:pan-axis property. + * @param point the touch point index, with 0 being the first touch + * point received by the action + * @returns the distance since last motion event + * + * return location for the X delta + * + * return location for the Y delta + */ + get_constrained_motion_delta(point: number): [ number, number | null, number | null ]; + /** + * Retrieves the deceleration rate of interpolated ::pan events. + * @returns The deceleration rate of the interpolated events. + */ + get_deceleration(): number; + /** + * Checks if the action should emit ::pan events even after releasing + * the pointer during a panning gesture, to emulate some kind of + * kinetic inertia. + * @returns %TRUE if interpolated events emission is active. + */ + get_interpolate(): boolean; + /** + * Retrieves the coordinates, in stage space, of the latest interpolated + * event, analogous to {@link Clutter.GestureAction.get_motion_coords}. + * @returns return location for the latest + * interpolated event's X coordinate + * + * return location for the latest + * interpolated event's Y coordinate + */ + get_interpolated_coords(): [ interpolated_x: number | null, interpolated_y: number | null ]; + /** + * Retrieves the delta, in stage space, since the latest interpolated + * event, analogous to {@link Clutter.GestureAction.get_motion_delta}. + * @returns the distance since the latest interpolated event + * + * return location for the X delta since + * the latest interpolated event + * + * return location for the Y delta since + * the latest interpolated event + */ + get_interpolated_delta(): [ number, number | null, number | null ]; + /** + * Retrieves the coordinates, in stage space, dependent on the current state + * of the {@link PanAction}. If it is inactive, both fields will be + * set to 0. If it is panning by user action, the values will be equivalent + * to those returned by {@link Clutter.GestureAction.get_motion_coords}. + * If it is interpolating with some form of kinetic scrolling, the values + * will be equivalent to those returned by + * clutter_pan_action_get_interpolated_coords(). This is a convenience + * method designed to be used in replacement "pan" signal handlers. + * @param point the touch point index, with 0 being the first touch + * point received by the action + * @returns return location for the X coordinate + * + * return location for the Y coordinate + */ + get_motion_coords(point: number): [ motion_x: number | null, motion_y: number | null ]; + /** + * Retrieves the delta, in stage space, dependent on the current state + * of the {@link PanAction}. If it is inactive, both fields will be + * set to 0. If it is panning by user action, the values will be equivalent + * to those returned by {@link Clutter.GestureAction.get_motion_delta}. + * If it is interpolating with some form of kinetic scrolling, the values + * will be equivalent to those returned by + * clutter_pan_action_get_interpolated_delta(). This is a convenience + * method designed to be used in replacement "pan" signal handlers. + * @param point the touch point index, with 0 being the first touch + * point received by the action + * @returns + * + * return location for the X delta + * + * return location for the Y delta + */ + get_motion_delta(point: number): [ number, number | null, number | null ]; + /** + * Retrieves the axis constraint set by {@link Clutter.PanAction.set_pan_axis} + * @returns the axis constraint + */ + get_pan_axis(): PanAxis; + /** + * Factor applied to the momentum velocity at the time of releasing the + * pointer when generating interpolated ::pan events. + * @param factor The acceleration factor + */ + set_acceleration_factor(factor: number): void; + /** + * Sets the deceleration rate of the interpolated ::pan events generated + * after a pan gesture. This is approximately the value that the momentum + * at the time of releasing the pointer is divided by every 60th of a second. + * @param rate The deceleration rate + */ + set_deceleration(rate: number): void; + /** + * Sets whether the action should emit interpolated ::pan events + * after the drag has ended, to emulate the gesture kinetic inertia. + * @param should_interpolate whether to enable interpolated pan events + */ + set_interpolate(should_interpolate: boolean): void; + /** + * Restricts the panning action to a specific axis + * @param axis the axis to constraint the panning to + */ + set_pan_axis(axis: PanAxis): void; + /** + * The ::pan signal is emitted to keep track of the motion during + * a pan gesture. #is_interpolated is set to %TRUE during the + * interpolation phase of the pan, after the drag has ended and + * the :interpolate property was set to %TRUE. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} attached to the #action + * - is_interpolated: if the event is the result of interpolating + * the motion velocity at the end of the drag + * - returns %TRUE if the pan should continue, and %FALSE if + * the pan should be cancelled. + * + * @returns Callback ID + */ + connect(signal: "pan", callback: (owner: this, actor: Actor, is_interpolated: boolean) => boolean): number; + /** + * The ::pan-stopped signal is emitted at the end of the interpolation + * phase of the pan action, only when :interpolate is set to %TRUE. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} attached to the #action + * + * @returns Callback ID + */ + connect(signal: "pan-stopped", callback: (owner: this, actor: Actor) => void): number; + + connect(signal: "notify::acceleration-factor", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::deceleration", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::interpolate", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::pan-axis", callback: (owner: this, ...args: any) => void): number; + + } + + type PanActionInitOptionsMixin = GestureActionInitOptions & + Pick; + + export interface PanActionInitOptions extends PanActionInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link PanAction} instead. + */ + type PanActionMixin = IPanAction & GestureAction; + + /** + * The {@link PanAction} structure contains + * only private data and should be accessed using the provided API + */ + interface PanAction extends PanActionMixin {} + + class PanAction { + public constructor(options?: Partial); + /** + * Creates a new {@link PanAction} instance + * @returns the newly created {@link PanAction} + */ + public static new(): Action; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link ParamSpecColor} instead. + */ + interface IParamSpecColor { + /** + * default color value + */ + readonly default_value: Color; + + connect(signal: "notify::default_value", callback: (owner: this, ...args: any) => void): number; + + } + + type ParamSpecColorInitOptionsMixin = GObject.ParamSpecInitOptions + export interface ParamSpecColorInitOptions extends ParamSpecColorInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link ParamSpecColor} instead. + */ + type ParamSpecColorMixin = IParamSpecColor & GObject.ParamSpec; + + /** + * A #GParamSpec subclass for defining properties holding + * a {@link Color}. + */ + interface ParamSpecColor extends ParamSpecColorMixin {} + + class ParamSpecColor { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link ParamSpecFixed} instead. + */ + interface IParamSpecFixed { + /** + * lower boundary + */ + readonly minimum: Cogl.Fixed; + /** + * higher boundary + */ + readonly maximum: Cogl.Fixed; + /** + * default value + */ + readonly default_value: Cogl.Fixed; + + connect(signal: "notify::minimum", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::maximum", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::default_value", callback: (owner: this, ...args: any) => void): number; + + } + + type ParamSpecFixedInitOptionsMixin = GObject.ParamSpecInitOptions + export interface ParamSpecFixedInitOptions extends ParamSpecFixedInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link ParamSpecFixed} instead. + */ + type ParamSpecFixedMixin = IParamSpecFixed & GObject.ParamSpec; + + /** + * #GParamSpec subclass for fixed point based properties + */ + interface ParamSpecFixed extends ParamSpecFixedMixin {} + + class ParamSpecFixed { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link ParamSpecUnit} instead. + */ + interface IParamSpecUnit { + + } + + type ParamSpecUnitInitOptionsMixin = GObject.ParamSpecInitOptions + export interface ParamSpecUnitInitOptions extends ParamSpecUnitInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link ParamSpecUnit} instead. + */ + type ParamSpecUnitMixin = IParamSpecUnit & GObject.ParamSpec; + + interface ParamSpecUnit extends ParamSpecUnitMixin {} + + class ParamSpecUnit { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Path} instead. + */ + interface IPath { + description: string; + readonly length: number; + /** + * Add the nodes of the Cairo path to the end of #path. + * @param cpath a Cairo path + */ + add_cairo_path(cpath: cairo.Path): void; + /** + * Adds a %CLUTTER_PATH_CLOSE type node to the path. This creates a + * straight line from the last node to the last %CLUTTER_PATH_MOVE_TO + * type node. + */ + add_close(): void; + /** + * Adds a %CLUTTER_PATH_CURVE_TO type node to the path. This causes + * the actor to follow a bezier from the last node to (#x_3, #y_3) using + * (#x_1, #y_1) and (#x_2,#y_2) as control points. + * @param x_1 the x coordinate of the first control point + * @param y_1 the y coordinate of the first control point + * @param x_2 the x coordinate of the second control point + * @param y_2 the y coordinate of the second control point + * @param x_3 the x coordinate of the third control point + * @param y_3 the y coordinate of the third control point + */ + add_curve_to(x_1: number, y_1: number, x_2: number, y_2: number, x_3: number, y_3: number): void; + /** + * Adds a %CLUTTER_PATH_LINE_TO type node to the path. This causes the + * actor to move to the new coordinates in a straight line. + * @param x the x coordinate + * @param y the y coordinate + */ + add_line_to(x: number, y: number): void; + /** + * Adds a %CLUTTER_PATH_MOVE_TO type node to the path. This is usually + * used as the first node in a path. It can also be used in the middle + * of the path to cause the actor to jump to the new coordinate. + * @param x the x coordinate + * @param y the y coordinate + */ + add_move_to(x: number, y: number): void; + /** + * Adds #node to the end of the path. + * @param node a {@link PathNode} + */ + add_node(node: PathNode): void; + /** + * Same as {@link Clutter.Path.add_curve_to} except the coordinates are + * relative to the previous node. + * @param x_1 the x coordinate of the first control point + * @param y_1 the y coordinate of the first control point + * @param x_2 the x coordinate of the second control point + * @param y_2 the y coordinate of the second control point + * @param x_3 the x coordinate of the third control point + * @param y_3 the y coordinate of the third control point + */ + add_rel_curve_to(x_1: number, y_1: number, x_2: number, y_2: number, x_3: number, y_3: number): void; + /** + * Same as {@link Clutter.Path.add_line_to} except the coordinates are + * relative to the previous node. + * @param x the x coordinate + * @param y the y coordinate + */ + add_rel_line_to(x: number, y: number): void; + /** + * Same as {@link Clutter.Path.add_move_to} except the coordinates are + * relative to the previous node. + * @param x the x coordinate + * @param y the y coordinate + */ + add_rel_move_to(x: number, y: number): void; + /** + * Adds new nodes to the end of the path as described in #str. The + * format is a subset of the SVG path format. Each node is represented + * by a letter and is followed by zero, one or three pairs of + * coordinates. The coordinates can be separated by spaces or a + * comma. The types are: + * + * - `M`: Adds a %CLUTTER_PATH_MOVE_TO node. Takes one pair of coordinates. + * - `L`: Adds a %CLUTTER_PATH_LINE_TO node. Takes one pair of coordinates. + * - `C`: Adds a %CLUTTER_PATH_CURVE_TO node. Takes three pairs of coordinates. + * - `z`: Adds a %CLUTTER_PATH_CLOSE node. No coordinates are needed. + * + * The M, L and C commands can also be specified in lower case which + * means the coordinates are relative to the previous node. + * + * For example, to move an actor in a 100 by 100 pixel square centered + * on the point 300,300 you could use the following path: + * + * |[ + * M 250,350 l 0 -100 L 350,250 l 0 100 z + * ]| + * + * If the path description isn't valid %FALSE will be returned and no + * nodes will be added. + * @param str a string describing the new nodes + * @returns %TRUE is the path description was valid or %FALSE + * otherwise. + */ + add_string(str: string): boolean; + /** + * Removes all nodes from the path. + */ + clear(): void; + /** + * Calls a function for each node of the path. + * @param callback the function to call with each node + */ + foreach(callback: PathCallback): void; + /** + * Returns a newly allocated string describing the path in the same + * format as used by {@link Clutter.Path.add_string}. + * @returns a string description of the path. Free with {@link GObject.free}. + */ + get_description(): string; + /** + * Retrieves an approximation of the total length of the path. + * @returns the length of the path. + */ + get_length(): number; + /** + * Retrieves the number of nodes in the path. + * @returns the number of nodes. + */ + get_n_nodes(): number; + /** + * Retrieves the node of the path indexed by #index. + * @param index_ the node number to retrieve + * @returns a location to store a copy of the node + */ + get_node(index_: number): PathNode; + /** + * Returns a #GSList of {@link PathNode}s. The list should be + * freed with {@link GObject.slist_free}. The nodes are owned by the path and + * should not be freed. Altering the path may cause the nodes in the + * list to become invalid so you should copy them if you want to keep + * the list. + * @returns a + * list of nodes in the path. + */ + get_nodes(): PathNode[]; + /** + * The value in #progress represents a position along the path where + * 0.0 is the beginning and 1.0 is the end of the path. An + * interpolated position is then stored in #position. + * @param progress a position along the path as a fraction of its length + * @returns index of the node used to calculate the position. + * + * location to store the position + */ + get_position(progress: number): [ number, Knot ]; + /** + * Inserts #node into the path before the node at the given offset. If + * #index_ is negative it will append the node to the end of the path. + * @param index_ offset of where to insert the node + * @param node the node to insert + */ + insert_node(index_: number, node: PathNode): void; + /** + * Removes the node at the given offset from the path. + * @param index_ index of the node to remove + */ + remove_node(index_: number): void; + /** + * Replaces the node at offset #index_ with #node. + * @param index_ index to the existing node + * @param node the replacement node + */ + replace_node(index_: number, node: PathNode): void; + /** + * Replaces all of the nodes in the path with nodes described by + * #str. See {@link Clutter.Path.add_string} for details of the format. + * + * If the string is invalid then %FALSE is returned and the path is + * unaltered. + * @param str a string describing the path + * @returns %TRUE is the path was valid, %FALSE otherwise. + */ + set_description(str: string): boolean; + /** + * Add the nodes of the ClutterPath to the path in the Cairo context. + * @param cr a Cairo context + */ + to_cairo_path(cr: cairo.Context): void; + connect(signal: "notify::description", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::length", callback: (owner: this, ...args: any) => void): number; + + } + + type PathInitOptionsMixin = GObject.InitiallyUnownedInitOptions & + Pick; + + export interface PathInitOptions extends PathInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Path} instead. + */ + type PathMixin = IPath & GObject.InitiallyUnowned; + + /** + * The {@link Path} struct contains only private data and should + * be accessed with the functions below. + */ + interface Path extends PathMixin {} + + class Path { + public constructor(options?: Partial); + /** + * Creates a new {@link Path} instance with no nodes. + * + * The object has a floating reference so if you add it to a + * #ClutterBehaviourPath then you do not need to unref it. + * @returns the newly created {@link Path} + */ + public static new(): Path; + /** + * Creates a new {@link Path} instance with the nodes described in + * #desc. See {@link Clutter.Path.add_string} for details of the format of + * the string. + * + * The object has a floating reference so if you add it to a + * #ClutterBehaviourPath then you do not need to unref it. + * @param desc a string describing the path + * @returns the newly created {@link Path} + */ + public static new_with_description(desc: string): Path; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link PathConstraint} instead. + */ + interface IPathConstraint { + /** + * The offset along the {@link PathConstraint.path}, between -1.0 and 2.0. + */ + offset: number; + /** + * The {@link Path} used to constrain the position of an actor. + */ + path: Path; + /** + * Retrieves the offset along the {@link Path} used by #constraint. + * @returns the offset + */ + get_offset(): number; + /** + * Retrieves a pointer to the {@link Path} used by #constraint. + * @returns the {@link Path} used by the + * #ClutterPathConstraint, or %NULL. The returned #ClutterPath is owned + * by the constraint and it should not be unreferenced + */ + get_path(): Path; + /** + * Sets the offset along the {@link Path} used by #constraint. + * @param offset the offset along the path + */ + set_offset(offset: number): void; + /** + * Sets the #path to be followed by the {@link PathConstraint}. + * + * The #constraint will take ownership of the #ClutterPath passed to this + * function. + * @param path a {@link Path} + */ + set_path(path: Path | null): void; + /** + * The ::node-reached signal is emitted each time a + * {@link PathConstraint.offset} value results in the actor + * passing a #ClutterPathNode + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} using the #constraint + * - index: the index of the node that has been reached + * + * @returns Callback ID + */ + connect(signal: "node-reached", callback: (owner: this, actor: Actor, index: number) => void): number; + + connect(signal: "notify::offset", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::path", callback: (owner: this, ...args: any) => void): number; + + } + + type PathConstraintInitOptionsMixin = ConstraintInitOptions & + Pick; + + export interface PathConstraintInitOptions extends PathConstraintInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link PathConstraint} instead. + */ + type PathConstraintMixin = IPathConstraint & Constraint; + + /** + * {@link PathConstraint} is an opaque structure + * whose members cannot be directly accessed + */ + interface PathConstraint extends PathConstraintMixin {} + + class PathConstraint { + public constructor(options?: Partial); + /** + * Creates a new {@link PathConstraint} with the given #path and #offset + * @param path a {@link Path}, or %NULL + * @param offset the offset along the {@link Path} + * @returns the newly created {@link PathConstraint} + */ + public static new(path: Path | null, offset: number): Constraint; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link PipelineNode} instead. + */ + interface IPipelineNode { + + } + + type PipelineNodeInitOptionsMixin = PaintNodeInitOptions + export interface PipelineNodeInitOptions extends PipelineNodeInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link PipelineNode} instead. + */ + type PipelineNodeMixin = IPipelineNode & PaintNode; + + /** + * The {@link TextNode} structure is an opaque + * type whose members cannot be directly accessed. + */ + interface PipelineNode extends PipelineNodeMixin {} + + class PipelineNode { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link PropertyTransition} instead. + */ + interface IPropertyTransition { + /** + * The name of the property of a {@link Animatable} to animate. + */ + property_name: string; + /** + * Retrieves the value of the {@link PropertyTransition.property_name} + * property. + * @returns the name of the property being animated, or %NULL if + * none is set. The returned string is owned by the #transition and + * it should not be freed. + */ + get_property_name(): string; + /** + * Sets the {@link PropertyTransition.property_name} property of #transition. + * @param property_name a property name + */ + set_property_name(property_name: string | null): void; + connect(signal: "notify::property-name", callback: (owner: this, ...args: any) => void): number; + + } + + type PropertyTransitionInitOptionsMixin = TransitionInitOptions & ScriptableInitOptions & + Pick; + + export interface PropertyTransitionInitOptions extends PropertyTransitionInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link PropertyTransition} instead. + */ + type PropertyTransitionMixin = IPropertyTransition & Transition & Scriptable; + + /** + * The {@link PropertyTransition} structure contains + * private data and should only be accessed using the provided API. + */ + interface PropertyTransition extends PropertyTransitionMixin {} + + class PropertyTransition { + public constructor(options?: Partial); + /** + * Creates a new {@link PropertyTransition}. + * @param property_name a property of #animatable, or %NULL + * @returns the newly created {@link PropertyTransition}. + * Use {@link GObject.Object.unref} when done + */ + public static new(property_name: string | null): Transition; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Rectangle} instead. + */ + interface IRectangle { + /** + * The color of the border of the rectangle. + */ + border_color: Color; + /** + * The width of the border of the rectangle, in pixels. + */ + border_width: number; + /** + * The color of the rectangle. + */ + color: Color; + /** + * Whether the {@link Rectangle} should be displayed with a border. + */ + has_border: boolean; + /** + * @deprecated + * Use {@link Actor} and a #ClutterCanvas to draw + * the border with Cairo + * + * Gets the color of the border used by #rectangle and places + * it into #color. + * @returns return location for a {@link Color} + */ + get_border_color(): Color; + /** + * @deprecated + * Use {@link Actor} and a #ClutterCanvas content + * to draw the border using Cairo + * + * Gets the width (in pixels) of the border used by #rectangle + * @returns the border's width + */ + get_border_width(): number; + /** + * @deprecated + * Use {@link Actor} and {@link Clutter.Actor.get_background_color} + * instead + * + * Retrieves the color of #rectangle. + * @returns return location for a {@link Color} + */ + get_color(): Color; + /** + * @deprecated + * Use {@link Actor} and a #ClutterCanvas to draw + * the border with Cairo + * + * Sets the color of the border used by #rectangle using #color + * @param color the color of the border + */ + set_border_color(color: Color): void; + /** + * @deprecated + * Use {@link Actor} and a #ClutterCanvas content + * to draw the border using Cairo + * + * Sets the width (in pixel) of the border used by #rectangle. + * A #width of 0 will unset the border. + * @param width the width of the border + */ + set_border_width(width: number): void; + /** + * @deprecated + * Use {@link Actor} and {@link Clutter.Actor.set_background_color} + * instead + * + * Sets the color of #rectangle. + * @param color a {@link Color} + */ + set_color(color: Color): void; + connect(signal: "notify::border-color", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::border-width", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::color", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::has-border", callback: (owner: this, ...args: any) => void): number; + + } + + type RectangleInitOptionsMixin = ActorInitOptions & Atk.ImplementorIfaceInitOptions & AnimatableInitOptions & ContainerInitOptions & ScriptableInitOptions & + Pick; + + export interface RectangleInitOptions extends RectangleInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Rectangle} instead. + */ + type RectangleMixin = IRectangle & Actor & Atk.ImplementorIface & Animatable & Container & Scriptable; + + /** + * The {@link Rectangle} structure contains only private data + * and should be accessed using the provided API + */ + interface Rectangle extends RectangleMixin {} + + class Rectangle { + public constructor(options?: Partial); + /** + * @deprecated + * Use {@link Clutter.Actor.new} instead + * + * Creates a new {@link Actor} with a rectangular shape. + * @returns a new {@link Rectangle} + */ + public static new(): Actor; + /** + * @deprecated + * Use {@link Clutter.Actor.new} and + * clutter_actor_set_background_color() instead + * + * Creates a new {@link Actor} with a rectangular shape + * and of the given #color. + * @param color a {@link Color} + * @returns a new {@link Rectangle} + */ + public static new_with_color(color: Color): Actor; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link RotateAction} instead. + */ + interface IRotateAction { + + /** + * The ::rotate signal is emitted when a rotate gesture is + * recognized on the attached actor and when the gesture is + * cancelled (in this case with an angle value of 0). + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} attached to the #action + * - angle: the difference of angle of rotation between the initial + * rotation and the current rotation + * - returns %TRUE if the rotation should continue, and %FALSE if + * the rotation should be cancelled. + * + * @returns Callback ID + */ + connect(signal: "rotate", callback: (owner: this, actor: Actor, angle: number) => boolean): number; + + } + + type RotateActionInitOptionsMixin = GestureActionInitOptions + export interface RotateActionInitOptions extends RotateActionInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link RotateAction} instead. + */ + type RotateActionMixin = IRotateAction & GestureAction; + + /** + * The {@link RotateAction} structure contains + * only private data and should be accessed using the provided API + */ + interface RotateAction extends RotateActionMixin {} + + class RotateAction { + public constructor(options?: Partial); + /** + * Creates a new {@link RotateAction} instance + * @returns the newly created {@link RotateAction} + */ + public static new(): Action; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Score} instead. + */ + interface IScore { + /** + * Whether the {@link Score} should restart once finished. + */ + loop: boolean; + /** + * Appends a timeline to another one existing in the score; the newly + * appended timeline will be started when #parent is complete. + * + * If #parent is %NULL, the new {@link Timeline} will be started when + * {@link Clutter.Score.start} is called. + * + * #ClutterScore will take a reference on #timeline. + * @param parent a {@link Timeline} in the score, or %NULL + * @param timeline a {@link Timeline} + * @returns the id of the {@link Timeline} inside the score, or + * 0 on failure. The returned id can be used with {@link Clutter.Score.remove} + * or clutter_score_get_timeline(). + */ + append(parent: Timeline | null, timeline: Timeline): number; + /** + * Appends #timeline at the given #marker_name on the #parent + * {@link Timeline}. + * + * If you want to append #timeline at the end of #parent, use + * {@link Clutter.Score.append}. + * + * The #ClutterScore will take a reference on #timeline. + * @param parent the parent {@link Timeline} + * @param marker_name the name of the marker to use + * @param timeline the {@link Timeline} to append + * @returns the id of the {@link Timeline} inside the score, or + * 0 on failure. The returned id can be used with {@link Clutter.Score.remove} + * or clutter_score_get_timeline(). + */ + append_at_marker(parent: Timeline, marker_name: string, timeline: Timeline): number; + /** + * Gets whether #score is looping + * @returns %TRUE if the score is looping + */ + get_loop(): boolean; + /** + * Retrieves the {@link Timeline} for #id_ inside #score. + * @param id_ the id of the timeline + * @returns the requested timeline, or %NULL. This + * function does not increase the reference count on the returned + * {@link Timeline} + */ + get_timeline(id_: number): Timeline; + /** + * Query state of a {@link Score} instance. + * @returns %TRUE if score is currently playing + */ + is_playing(): boolean; + /** + * Retrieves a list of all the {@link Timelines} managed by #score. + * @returns a + * #GSList containing all the timelines in the score. This function does + * not increase the reference count of the returned timelines. Use + * {@link GObject.slist_free} on the returned list to deallocate its resources. + */ + list_timelines(): Timeline[]; + /** + * Pauses a playing score #score. + */ + pause(): void; + /** + * Removes the {@link Timeline} with the given id inside #score. If + * the timeline has other timelines attached to it, those are removed + * as well. + * @param id_ the id of the timeline to remove + */ + remove(id_: number): void; + /** + * Removes all the timelines inside #score. + */ + remove_all(): void; + /** + * Rewinds a {@link Score} to its initial state. + */ + rewind(): void; + /** + * Sets whether #score should loop. A looping {@link Score} will start + * from its initial state after the ::complete signal has been fired. + * @param loop %TRUE for enable looping + */ + set_loop(loop: boolean): void; + /** + * Starts the score. + */ + start(): void; + /** + * Stops and rewinds a playing {@link Score} instance. + */ + stop(): void; + /** + * The ::completed signal is emitted each time a {@link Score} terminates. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "completed", callback: (owner: this) => void): number; + /** + * The ::paused signal is emitted each time a {@link Score} + * is paused. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "paused", callback: (owner: this) => void): number; + /** + * The ::started signal is emitted each time a {@link Score} starts playing. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "started", callback: (owner: this) => void): number; + /** + * The ::timeline-completed signal is emitted each time a timeline + * inside a {@link Score} terminates. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - timeline: the completed timeline + * + * @returns Callback ID + */ + connect(signal: "timeline-completed", callback: (owner: this, timeline: Timeline) => void): number; + /** + * The ::timeline-started signal is emitted each time a new timeline + * inside a {@link Score} starts playing. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - timeline: the current timeline + * + * @returns Callback ID + */ + connect(signal: "timeline-started", callback: (owner: this, timeline: Timeline) => void): number; + + connect(signal: "notify::loop", callback: (owner: this, ...args: any) => void): number; + + } + + type ScoreInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface ScoreInitOptions extends ScoreInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Score} instead. + */ + type ScoreMixin = IScore & GObject.Object; + + /** + * The {@link Score} structure contains only private data + * and should be accessed using the provided API + */ + interface Score extends ScoreMixin {} + + class Score { + public constructor(options?: Partial); + /** + * Creates a new {@link Score}. A #ClutterScore is an object that can + * hold multiple #ClutterTimelines in a sequential order. + * @returns the newly created {@link Score}. Use {@link GObject.Object.unref} + * when done. + */ + public static new(): Score; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Script} instead. + */ + interface IScript { + /** + * The path of the currently parsed file. If {@link Script.filename_set} + * is %FALSE then the value of this property is undefined. + */ + readonly filename: string; + /** + * Whether the {@link Script.filename} property is set. If this property + * is %TRUE then the currently parsed data comes from a file, and the + * file name is stored inside the #ClutterScript:filename property. + */ + readonly filename_set: boolean; + /** + * The translation domain, used to localize strings marked as translatable + * inside a UI definition. + * + * If {@link Script.translation_domain} is set to %NULL, #ClutterScript + * will use gettext(), otherwise g_dgettext() will be used. + */ + translation_domain: string; + /** + * Adds #paths to the list of search paths held by #script. + * + * The search paths are used by {@link Clutter.Script.lookup_filename}, which + * can be used to define search paths for the textures source file name + * or other custom, file-based properties. + * @param paths an array of strings containing + * different search paths + * @param n_paths the length of the passed array + */ + add_search_paths(paths: string[], n_paths: number): void; + /** + * Associates a {@link State} to the #ClutterScript instance using the given + * name. + * + * The #ClutterScript instance will use #state to resolve target states when + * connecting signal handlers. + * + * The #ClutterScript instance will take a reference on the #ClutterState + * passed to this function. + * @param name a name for the #state, or %NULL to + * set the default {@link State} + * @param state a {@link State} + */ + add_states(name: string | null, state: State): void; + /** + * Connects all the signals defined into a UI definition file to their + * handlers. + * + * This method invokes {@link Clutter.Script.connect_signals_full} internally + * and uses #GModule's introspective features (by opening the current + * module's scope) to look at the application's symbol table. + * + * Note that this function will not work if #GModule is not supported by + * the platform Clutter is running on. + */ + connect_signals(): void; + /** + * Connects all the signals defined into a UI definition file to their + * handlers. + * + * This function allows to control how the signal handlers are + * going to be connected to their respective signals. It is meant + * primarily for language bindings to allow resolving the function + * names using the native API, but it can also be used on platforms + * that do not support GModule. + * + * Applications should use {@link Clutter.Script.connect_signals}. + * @param func signal connection function + */ + connect_signals_full(func: ScriptConnectFunc): void; + /** + * Ensure that every object defined inside #script is correctly + * constructed. You should rarely need to use this function. + */ + ensure_objects(): void; + /** + * Retrieves the object bound to #name. This function does not increment + * the reference count of the returned object. + * @param name the name of the object to retrieve + * @returns the named object, or %NULL if no object + * with the given name was available + */ + get_object(name: string): GObject.Object; + /** + * Retrieves a list of objects for the given names. After #script, object + * names/return location pairs should be listed, with a %NULL pointer + * ending the list, like: + * + * |[ + * GObject *my_label, *a_button, *main_timeline; + * + * clutter_script_get_objects (script, + * "my-label", &my_label, + * "a-button", &a_button, + * "main-timeline", &main_timeline, + * NULL); + * ]| + * + * Note: This function does not increment the reference count of the + * returned objects. + * @param first_name the name of the first object to retrieve + * @returns the number of objects returned. + */ + get_objects(first_name: string): number; + /** + * Retrieves the {@link State} for the given #state_name. + * + * If #name is %NULL, this function will return the default + * #ClutterState instance. + * @param name the name of the {@link State}, or %NULL + * @returns a pointer to the {@link State} for the + * given name. The #ClutterState is owned by the #ClutterScript instance + * and it should not be unreferenced + */ + get_states(name: string | null): State; + /** + * Retrieves the translation domain set using + * {@link Clutter.Script.set_translation_domain}. + * @returns the translation domain, if any is set, + * or %NULL + */ + get_translation_domain(): string; + /** + * Looks up a type by name, using the virtual function that + * {@link Script} has for that purpose. This function should + * rarely be used. + * @param type_name name of the type to look up + * @returns the type for the requested type name, or + * %G_TYPE_INVALID if not corresponding type was found. + */ + get_type_from_name(type_name: string): GObject.Type; + /** + * Retrieves all the objects created by #script. + * + * Note: this function does not increment the reference count of the + * objects it returns. + * @returns a list + * of #GObjects, or %NULL. The objects are owned by the + * {@link Script} instance. Use {@link GObject.list_free} on the returned list when + * done. + */ + list_objects(): GObject.Object[]; + /** + * Loads the definitions from #data into #script and merges with + * the currently loaded ones, if any. + * @param data a buffer containing the definitions + * @param length the length of the buffer, or -1 if #data is a NUL-terminated + * buffer + * @returns on error, zero is returned and #error is set + * accordingly. On success, the merge id for the UI definitions is + * returned. You can use the merge id with {@link Clutter.Script.unmerge_objects}. + */ + load_from_data(data: string, length: number): number; + /** + * Loads the definitions from #filename into #script and merges with + * the currently loaded ones, if any. + * @param filename the full path to the definition file + * @returns on error, zero is returned and #error is set + * accordingly. On success, the merge id for the UI definitions is + * returned. You can use the merge id with {@link Clutter.Script.unmerge_objects}. + */ + load_from_file(filename: string): number; + /** + * Loads the definitions from a resource file into #script and merges with + * the currently loaded ones, if any. + * @param resource_path the resource path of the file to parse + * @returns on error, zero is returned and #error is set + * accordingly. On success, the merge id for the UI definitions is + * returned. You can use the merge id with {@link Clutter.Script.unmerge_objects}. + */ + load_from_resource(resource_path: string): number; + /** + * Looks up #filename inside the search paths of #script. If #filename + * is found, its full path will be returned . + * @param filename the name of the file to lookup + * @returns the full path of #filename or %NULL if no path was + * found. + */ + lookup_filename(filename: string): string; + /** + * Sets the translation domain for #script. + * @param domain the translation domain, or %NULL + */ + set_translation_domain(domain: string | null): void; + /** + * Unmerges the objects identified by #merge_id. + * @param merge_id merge id returned when loading a UI definition + */ + unmerge_objects(merge_id: number): void; + connect(signal: "notify::filename", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::filename-set", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::translation-domain", callback: (owner: this, ...args: any) => void): number; + + } + + type ScriptInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface ScriptInitOptions extends ScriptInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Script} instead. + */ + type ScriptMixin = IScript & GObject.Object; + + /** + * The {@link Script} structure contains only private data + * and should be accessed using the provided API + */ + interface Script extends ScriptMixin {} + + class Script { + public constructor(options?: Partial); + /** + * Creates a new {@link Script} instance. #ClutterScript can be used + * to load objects definitions for scenegraph elements, like actors, + * or behavioural elements, like behaviours and timelines. The + * definitions must be encoded using the JavaScript Object Notation (JSON) + * language. + * @returns the newly created {@link Script} instance. Use + * {@link GObject.Object.unref} when done. + */ + public static new(): Script; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link ScrollActor} instead. + */ + interface IScrollActor { + /** + * The scrollin direction. + */ + scroll_mode: ScrollMode; + /** + * Retrieves the {@link ScrollActor.scroll_mode} property + * @returns the scrolling mode + */ + get_scroll_mode(): ScrollMode; + /** + * Scrolls the contents of #actor so that #point is the new origin + * of the visible area. + * + * The coordinates of #point must be relative to the #actor. + * + * This function will use the currently set easing state of the #actor + * to transition from the current scroll origin to the new one. + * @param point a {@link Point} + */ + scroll_to_point(point: Point): void; + /** + * Scrolls #actor so that #rect is in the visible portion. + * @param rect a {@link Rect} + */ + scroll_to_rect(rect: Rect): void; + /** + * Sets the {@link ScrollActor.scroll_mode} property. + * @param mode a {@link ScrollMode} + */ + set_scroll_mode(mode: ScrollMode): void; + connect(signal: "notify::scroll-mode", callback: (owner: this, ...args: any) => void): number; + + } + + type ScrollActorInitOptionsMixin = ActorInitOptions & Atk.ImplementorIfaceInitOptions & AnimatableInitOptions & ContainerInitOptions & ScriptableInitOptions & + Pick; + + export interface ScrollActorInitOptions extends ScrollActorInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link ScrollActor} instead. + */ + type ScrollActorMixin = IScrollActor & Actor & Atk.ImplementorIface & Animatable & Container & Scriptable; + + /** + * The {@link ScrollActor} structure contains only + * private data, and should be accessed using the provided API. + */ + interface ScrollActor extends ScrollActorMixin {} + + class ScrollActor { + public constructor(options?: Partial); + /** + * Creates a new {@link ScrollActor}. + * @returns The newly created {@link ScrollActor} + * instance. + */ + public static new(): Actor; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Settings} instead. + */ + interface ISettings { + /** + * The default distance that the cursor of a pointer device + * should travel before a drag operation should start. + */ + dnd_drag_threshold: number; + /** + * The maximum distance, in pixels, between button-press events that + * determines whether or not to increase the click count by 1. + */ + double_click_distance: number; + /** + * The time, in milliseconds, that should elapse between button-press + * events in order to increase the click count by 1. + */ + double_click_time: number; + /** + * Whether or not to use antialiasing when rendering text; a value + * of 1 enables it unconditionally; a value of 0 disables it + * unconditionally; and -1 will use the system's default. + */ + font_antialias: number; + /** + * The DPI used when rendering text, as a value of 1024 * dots/inch. + * + * If set to -1, the system's default will be used instead + */ + font_dpi: number; + /** + * The style of the hinting used when rendering text. Valid values + * are: + * + * - hintnone + * - hintslight + * - hintmedium + * - hintfull + */ + font_hint_style: string; + /** + * Whether or not to use hinting when rendering text; a value of 1 + * unconditionally enables it; a value of 0 unconditionally disables + * it; and a value of -1 will use the system's default. + */ + font_hinting: number; + /** + * The default font name that should be used by text actors, as + * a string that can be passed to {@link Pango.font.description_from_string}. + */ + font_name: string; + /** + * The type of sub-pixel antialiasing used when rendering text. Valid + * values are: + * + * - none + * - rgb + * - bgr + * - vrgb + * - vbgr + */ + font_subpixel_order: string; + /** + * Sets the minimum duration for a press to be recognized as a long press + * gesture. The duration is expressed in milliseconds. + * + * See also {@link ClickAction.long_press_duration}. + */ + long_press_duration: number; + password_hint_time: number; + window_scaling_factor: number; + + connect(signal: "notify::dnd-drag-threshold", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::double-click-distance", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::double-click-time", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::font-antialias", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::font-dpi", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::font-hint-style", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::font-hinting", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::font-name", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::font-subpixel-order", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::long-press-duration", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::password-hint-time", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::window-scaling-factor", callback: (owner: this, ...args: any) => void): number; + + } + + type SettingsInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface SettingsInitOptions extends SettingsInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Settings} instead. + */ + type SettingsMixin = ISettings & GObject.Object; + + /** + * `ClutterSettings` is an opaque structure whose + * members cannot be directly accessed. + */ + interface Settings extends SettingsMixin {} + + class Settings { + public constructor(options?: Partial); + /** + * Retrieves the singleton instance of {@link Settings} + * @returns the instance of {@link Settings}. The + * returned object is owned by Clutter and it should not be unreferenced + * directly + */ + public static get_default(): Settings; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Shader} instead. + */ + interface IShader { + /** + * @deprecated + * Use {@link ShaderEffect} instead. + * + * Whether the shader is compiled and linked, ready for use + * in the GL context. + */ + readonly compiled: boolean; + /** + * @deprecated + * Use {@link ShaderEffect} instead. + * + * Whether the shader is currently used in the GL rendering pipeline. + */ + enabled: boolean; + /** + * @deprecated + * Use {@link ShaderEffect} instead. + * + * GLSL source code for the fragment shader part of the shader program. + */ + fragment_source: string; + /** + * @deprecated + * Use {@link ShaderEffect} instead. + * + * GLSL source code for the vertex shader part of the shader + * program, if any + */ + vertex_source: string; + /** + * @deprecated + * Use {@link ShaderEffect} instead. + * + * Compiles and links GLSL sources set for vertex and fragment shaders for + * a {@link Shader}. If the compilation fails and a #GError return location is + * provided the error will contain the errors from the compiler, if any. + * @returns returns TRUE if the shader was succesfully compiled. + */ + compile(): boolean; + /** + * @deprecated + * Use {@link ShaderEffect} instead. + * + * Retrieves the underlying #CoglHandle for the fragment shader. + * @returns A #CoglHandle for the fragment + * shader, or %NULL. The handle is owned by the {@link Shader} + * and it should not be unreferenced + */ + get_cogl_fragment_shader(): Cogl.Handle; + /** + * @deprecated + * Use {@link ShaderEffect} instead. + * + * Retrieves the underlying #CoglHandle for the shader program. + * @returns A #CoglHandle for the shader program, + * or %NULL. The handle is owned by the {@link Shader} and it should + * not be unreferenced + */ + get_cogl_program(): Cogl.Handle; + /** + * @deprecated + * Use {@link ShaderEffect} instead. + * + * Retrieves the underlying #CoglHandle for the vertex shader. + * @returns A #CoglHandle for the vertex + * shader, or %NULL. The handle is owned by the {@link Shader} + * and it should not be unreferenced + */ + get_cogl_vertex_shader(): Cogl.Handle; + /** + * @deprecated + * Use {@link ShaderEffect} instead. + * + * Query the current GLSL fragment source set on #shader. + * @returns the source of the fragment shader for this + * ClutterShader object or %NULL. The returned string is owned by the + * shader object and should never be modified or freed + */ + get_fragment_source(): string; + /** + * @deprecated + * Use {@link ShaderEffect} instead. + * + * Checks whether #shader is enabled. + * @returns %TRUE if the shader is enabled. + */ + get_is_enabled(): boolean; + /** + * @deprecated + * Use {@link ShaderEffect} instead. + * + * Query the current GLSL vertex source set on #shader. + * @returns the source of the vertex shader for this + * ClutterShader object or %NULL. The returned string is owned by the + * shader object and should never be modified or freed + */ + get_vertex_source(): string; + /** + * @deprecated + * Use {@link ShaderEffect} instead. + * + * Checks whether #shader is is currently compiled, linked and bound + * to the GL context. + * @returns %TRUE if the shader is compiled, linked and ready for use. + */ + is_compiled(): boolean; + /** + * @deprecated + * Use {@link ShaderEffect} instead. + * + * Frees up any GL context resources held by the shader. + */ + release(): void; + /** + * @deprecated + * Use {@link ShaderEffect} instead. + * + * Sets the GLSL source code to be used by a {@link Shader} for the fragment + * program. + * @param data GLSL source code. + * @param length length of source buffer (currently ignored) + */ + set_fragment_source(data: string, length: number): void; + /** + * @deprecated + * Use {@link ShaderEffect} instead. + * + * Enables a shader. This function will attempt to compile and link + * the shader, if it isn't already. + * + * When #enabled is %FALSE the default state of the GL pipeline will be + * used instead. + * @param enabled The new state of the shader. + */ + set_is_enabled(enabled: boolean): void; + /** + * @deprecated + * Use {@link ShaderEffect} instead. + * + * Sets a user configurable variable in the GLSL shader programs attached to + * a {@link Shader}. + * @param name name of uniform in GLSL shader program to set. + * @param value a {@link ShaderFloat}, #ClutterShaderInt or #ClutterShaderMatrix + * #GValue. + */ + set_uniform(name: string, value: GObject.Value): void; + /** + * @deprecated + * Use {@link ShaderEffect} instead. + * + * Sets the GLSL source code to be used by a {@link Shader} for the vertex + * program. + * @param data GLSL source code. + * @param length length of source buffer (currently ignored) + */ + set_vertex_source(data: string, length: number): void; + connect(signal: "notify::compiled", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::enabled", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::fragment-source", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::vertex-source", callback: (owner: this, ...args: any) => void): number; + + } + + type ShaderInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface ShaderInitOptions extends ShaderInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Shader} instead. + */ + type ShaderMixin = IShader & GObject.Object; + + /** + * The {@link Shader} structure contains only private data + * and should be accessed using the provided API + */ + interface Shader extends ShaderMixin {} + + class Shader { + public constructor(options?: Partial); + /** + * @deprecated + * Use {@link ShaderEffect} instead. + * + * Create a new {@link Shader} instance. + * @returns a new {@link Shader}. + */ + public static new(): Shader; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link ShaderEffect} instead. + */ + interface IShaderEffect { + /** + * Retrieves a pointer to the program's handle + * @returns a pointer to the program's handle, + * or %COGL_INVALID_HANDLE + */ + get_program(): Cogl.Handle; + /** + * Retrieves a pointer to the shader's handle + * @returns a pointer to the shader's handle, + * or %COGL_INVALID_HANDLE + */ + get_shader(): Cogl.Handle; + /** + * Sets the source of the GLSL shader used by #effect + * + * This function should only be called by implementations of + * the {@link ShaderEffect} class, and not by application code. + * + * This function can only be called once; subsequent calls will + * yield no result. + * @param source the source of a GLSL shader + * @returns %TRUE if the source was set + */ + set_shader_source(source: string): boolean; + /** + * Sets a list of values as the payload for the uniform #name inside + * the shader effect + * + * The #gtype must be one of: %G_TYPE_INT, for 1 or more integer values; + * %G_TYPE_FLOAT, for 1 or more floating point values; + * %CLUTTER_TYPE_SHADER_INT, for a pointer to an array of integer values; + * %CLUTTER_TYPE_SHADER_FLOAT, for a pointer to an array of floating point + * values; and %CLUTTER_TYPE_SHADER_MATRIX, for a pointer to an array of + * floating point values mapping a matrix + * + * The number of values interepreted is defined by the #n_value + * argument, and by the #gtype argument. For instance, a uniform named + * "sampler0" and containing a single integer value is set using: + * + * |[ + * clutter_shader_effect_set_uniform (effect, "sampler0", + * G_TYPE_INT, 1, + * 0); + * ]| + * + * While a uniform named "components" and containing a 3-elements vector + * of floating point values (a "vec3") can be set using: + * + * |[ + * gfloat component_r, component_g, component_b; + * + * clutter_shader_effect_set_uniform (effect, "components", + * G_TYPE_FLOAT, 3, + * component_r, + * component_g, + * component_b); + * ]| + * + * or can be set using: + * + * |[ + * gfloat component_vec[3]; + * + * clutter_shader_effect_set_uniform (effect, "components", + * CLUTTER_TYPE_SHADER_FLOAT, 3, + * component_vec); + * ]| + * + * Finally, a uniform named "map" and containing a matrix can be set using: + * + * |[ + * clutter_shader_effect_set_uniform (effect, "map", + * CLUTTER_TYPE_SHADER_MATRIX, 1, + * cogl_matrix_get_array (&matrix)); + * ]| + * @param name the name of the uniform to set + * @param gtype the type of the uniform to set + * @param n_values the number of values + */ + set_uniform(name: string, gtype: GObject.Type, n_values: number): void; + /** + * Sets #value as the payload for the uniform #name inside the shader + * effect + * + * The #GType of the #value must be one of: %G_TYPE_INT, for a single + * integer value; %G_TYPE_FLOAT, for a single floating point value; + * %CLUTTER_TYPE_SHADER_INT, for an array of integer values; + * %CLUTTER_TYPE_SHADER_FLOAT, for an array of floating point values; + * and %CLUTTER_TYPE_SHADER_MATRIX, for a matrix of floating point + * values. It also accepts %G_TYPE_DOUBLE for compatibility with other + * languages than C. + * @param name the name of the uniform to set + * @param value a #GValue with the value of the uniform to set + */ + set_uniform_value(name: string, value: GObject.Value): void; + } + + type ShaderEffectInitOptionsMixin = OffscreenEffectInitOptions + export interface ShaderEffectInitOptions extends ShaderEffectInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link ShaderEffect} instead. + */ + type ShaderEffectMixin = IShaderEffect & OffscreenEffect; + + /** + * The {@link ShaderEffect} structure contains + * only private data and should be accessed using the provided API + */ + interface ShaderEffect extends ShaderEffectMixin {} + + class ShaderEffect { + public constructor(options?: Partial); + /** + * Creates a new {@link ShaderEffect}, to be applied to an actor using + * {@link Clutter.Actor.add_effect}. + * + * The effect will be empty until clutter_shader_effect_set_shader_source() + * is called. + * @param shader_type the type of the shader, either %CLUTTER_FRAGMENT_SHADER, + * or %CLUTTER_VERTEX_SHADER + * @returns the newly created {@link ShaderEffect}. + * Use {@link GObject.Object.unref} when done. + */ + public static new(shader_type: ShaderType): Effect; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link ShaderFloat} instead. + */ + interface IShaderFloat { + + } + + type ShaderFloatInitOptionsMixin = {}; + export interface ShaderFloatInitOptions extends ShaderFloatInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link ShaderFloat} instead. + */ + type ShaderFloatMixin = IShaderFloat; + + interface ShaderFloat extends ShaderFloatMixin {} + + class ShaderFloat { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link ShaderInt} instead. + */ + interface IShaderInt { + + } + + type ShaderIntInitOptionsMixin = {}; + export interface ShaderIntInitOptions extends ShaderIntInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link ShaderInt} instead. + */ + type ShaderIntMixin = IShaderInt; + + interface ShaderInt extends ShaderIntMixin {} + + class ShaderInt { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link ShaderMatrix} instead. + */ + interface IShaderMatrix { + + } + + type ShaderMatrixInitOptionsMixin = {}; + export interface ShaderMatrixInitOptions extends ShaderMatrixInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link ShaderMatrix} instead. + */ + type ShaderMatrixMixin = IShaderMatrix; + + interface ShaderMatrix extends ShaderMatrixMixin {} + + class ShaderMatrix { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link SnapConstraint} instead. + */ + interface ISnapConstraint { + /** + * The edge of the {@link Actor} that should be snapped + */ + from_edge: SnapEdge; + /** + * The offset, in pixels, between {@link SnapConstraint.from_edge} + * and #ClutterSnapConstraint:to-edge + */ + offset: number; + /** + * The {@link Actor} used as the source for the constraint + */ + source: Actor; + /** + * The edge of the {@link SnapConstraint.source} that should be snapped + */ + to_edge: SnapEdge; + /** + * Retrieves the edges used by the #constraint + * @returns return location for the actor's edge, or %NULL + * + * return location for the source's edge, or %NULL + */ + get_edges(): [ from_edge: SnapEdge, to_edge: SnapEdge ]; + /** + * Retrieves the offset set using {@link Clutter.SnapConstraint.set_offset} + * @returns the offset, in pixels + */ + get_offset(): number; + /** + * Retrieves the {@link Actor} set using {@link Clutter.SnapConstraint.set_source} + * @returns a pointer to the source actor + */ + get_source(): Actor; + /** + * Sets the edges to be used by the #constraint + * + * The #from_edge is the edge on the {@link Actor} to which #constraint + * has been added. The #to_edge is the edge of the #ClutterActor inside + * the #ClutterSnapConstraint:source property. + * @param from_edge the edge on the actor + * @param to_edge the edge on the source + */ + set_edges(from_edge: SnapEdge, to_edge: SnapEdge): void; + /** + * Sets the offset to be applied to the constraint + * @param offset the offset to apply, in pixels + */ + set_offset(offset: number): void; + /** + * Sets the source {@link Actor} for the constraint + * @param source a {@link Actor}, or %NULL to unset the source + */ + set_source(source: Actor | null): void; + connect(signal: "notify::from-edge", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::offset", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::source", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::to-edge", callback: (owner: this, ...args: any) => void): number; + + } + + type SnapConstraintInitOptionsMixin = ConstraintInitOptions & + Pick; + + export interface SnapConstraintInitOptions extends SnapConstraintInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link SnapConstraint} instead. + */ + type SnapConstraintMixin = ISnapConstraint & Constraint; + + /** + * {@link SnapConstraint} is an opaque structure + * whose members cannot be directly accesses + */ + interface SnapConstraint extends SnapConstraintMixin {} + + class SnapConstraint { + public constructor(options?: Partial); + /** + * Creates a new {@link SnapConstraint} that will snap a #ClutterActor + * to the #edge of #source, with the given #offset. + * @param source the {@link Actor} to use as the source of + * the constraint, or %NULL + * @param from_edge the edge of the actor to use in the constraint + * @param to_edge the edge of #source to use in the constraint + * @param offset the offset to apply to the constraint, in pixels + * @returns the newly created {@link SnapConstraint} + */ + public static new(source: Actor | null, from_edge: SnapEdge, to_edge: SnapEdge, offset: number): Constraint; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Stage} instead. + */ + interface IStage { + /** + * Whether the {@link Stage} should accept key focus when shown. + */ + accept_focus: boolean; + /** + * @deprecated + * Use the {@link Actor.background_color} property of + * #ClutterActor instead. + * + * The background color of the main stage. + */ + color: Color; + /** + * Whether the mouse pointer should be visible + */ + cursor_visible: boolean; + /** + * @deprecated + * This property does not do anything. + * + * The settings for the GL "fog", used only if {@link Stage.use_fog} + * is set to %TRUE + */ + fog: Fog; + readonly fullscreen_set: boolean; + /** + * The {@link Actor} that will receive key events from the underlying + * windowing system. + * + * If %NULL, the #ClutterStage will receive the events. + */ + key_focus: Actor; + /** + * Whether or not the {@link Stage} should clear its contents + * before each paint cycle. + * + * See {@link Clutter.Stage.set_no_clear_hint} for further information. + */ + no_clear_hint: boolean; + /** + * @deprecated + * This property does not do anything. + * + * Whether the stage should be rendered in an offscreen buffer. + */ + offscreen: boolean; + /** + * The parameters used for the perspective projection from 3D + * coordinates to 2D + */ + perspective: Perspective; + /** + * The stage's title - usually displayed in stage windows title decorations. + */ + title: string; + /** + * Whether the {@link Stage} should honour the alpha component of the + * #ClutterStage:color property when painting. If Clutter is run under + * a compositing manager this will result in the stage being blended + * with the underlying window(s) + */ + use_alpha: boolean; + /** + * @deprecated + * This property does not do anything. + * + * Whether the stage should use a linear GL "fog" in creating the + * depth-cueing effect, to enhance the perception of depth by fading + * actors farther from the viewpoint. + */ + use_fog: boolean; + /** + * Whether the stage is resizable via user interaction. + */ + user_resizable: boolean; + /** + * This function essentially makes sure the right GL context is + * current for the passed stage. It is not intended to + * be used by applications. + */ + ensure_current(): void; + /** + * Ensures that #stage is redrawn + * + * This function should not be called by applications: it is + * used when embedding a {@link Stage} into a toolkit with + * another windowing system, like GTK+. + */ + ensure_redraw(): void; + /** + * Ensures that the GL viewport is updated with the current + * stage window size. + * + * This function will queue a redraw of #stage. + * + * This function should not be called by applications; it is used + * when embedding a {@link Stage} into a toolkit with another + * windowing system, like GTK+. + */ + ensure_viewport(): void; + /** + * This function is used to emit an event on the main stage. + * + * You should rarely need to use this function, except for + * synthetised events. + * @param event a {@link Event} + * @returns the return value from the signal emission + */ + event(event: Event): boolean; + /** + * Retrieves the value set with {@link Clutter.Stage.set_accept_focus}. + * @returns %TRUE if the {@link Stage} should accept focus, and %FALSE + * otherwise + */ + get_accept_focus(): boolean; + /** + * Checks the scene at the coordinates #x and #y and returns a pointer + * to the {@link Actor} at those coordinates. + * + * By using #pick_mode it is possible to control which actors will be + * painted and thus available. + * @param pick_mode how the scene graph should be painted + * @param x X coordinate to check + * @param y Y coordinate to check + * @returns the actor at the specified coordinates, + * if any + */ + get_actor_at_pos(pick_mode: PickMode, x: number, y: number): Actor; + /** + * @deprecated + * Use {@link Clutter.Actor.get_background_color} instead. + * + * Retrieves the stage color. + * @returns return location for a {@link Color} + */ + get_color(): Color; + /** + * @deprecated + * This function will always return the default + * values of {@link Fog} + * + * Retrieves the current depth cueing settings from the stage. + * @returns return location for a {@link Fog} structure + */ + get_fog(): Fog; + /** + * Retrieves whether the stage is full screen or not + * @returns %TRUE if the stage is full screen + */ + get_fullscreen(): boolean; + /** + * Retrieves the actor that is currently under key focus. + * @returns the actor with key focus, or the stage + */ + get_key_focus(): Actor; + /** + * Retrieves the minimum size for a stage window as set using + * {@link Clutter.Stage.set_minimum_size}. + * + * The returned size may not correspond to the actual minimum size and + * it is specific to the {@link Stage} implementation inside the + * Clutter backend + * @returns return location for the minimum width, in pixels, + * or %NULL + * + * return location for the minimum height, in pixels, + * or %NULL + */ + get_minimum_size(): [ width: number, height: number ]; + /** + * Retrieves the value set using {@link Clutter.Stage.set_motion_events_enabled}. + * @returns %TRUE if the per-actor motion event delivery is enabled + * and %FALSE otherwise + */ + get_motion_events_enabled(): boolean; + /** + * Retrieves the hint set with {@link Clutter.Stage.set_no_clear_hint} + * @returns %TRUE if the stage should not clear itself on every paint + * cycle, and %FALSE otherwise + */ + get_no_clear_hint(): boolean; + /** + * Retrieves the stage perspective. + * @returns return location for a + * {@link Perspective} + */ + get_perspective(): Perspective | null; + /** + * Gets the bounds of the current redraw for #stage in stage pixel + * coordinates. E.g., if only a single actor has queued a redraw then + * Clutter may redraw the stage with a clip so that it doesn't have to + * paint every pixel in the stage. This function would then return the + * bounds of that clip. An application can use this information to + * avoid some extra work if it knows that some regions of the stage + * aren't going to be painted. This should only be called while the + * stage is being painted. If there is no current redraw clip then + * this function will set #clip to the full extents of the stage. + * @returns Return location for the clip bounds + */ + get_redraw_clip_bounds(): cairo.RectangleInt; + /** + * Retrieves the value set with {@link Clutter.Stage.set_throttle_motion_events} + * @returns %TRUE if the motion events are being throttled, + * and %FALSE otherwise + */ + get_throttle_motion_events(): boolean; + /** + * Gets the stage title. + * @returns pointer to the title string for the stage. The + * returned string is owned by the actor and should not + * be modified or freed. + */ + get_title(): string; + /** + * Retrieves the value set using {@link Clutter.Stage.set_use_alpha} + * @returns %TRUE if the stage should honour the opacity and the + * alpha channel of the stage color + */ + get_use_alpha(): boolean; + /** + * @deprecated + * This function will always return %FALSE + * + * Gets whether the depth cueing effect is enabled on #stage. + * @returns %TRUE if the depth cueing effect is enabled + */ + get_use_fog(): boolean; + /** + * Retrieves the value set with {@link Clutter.Stage.set_user_resizable}. + * @returns %TRUE if the stage is resizable by the user. + */ + get_user_resizable(): boolean; + /** + * Makes the cursor invisible on the stage window + */ + hide_cursor(): void; + /** + * @deprecated + * Track the stage pointer inside your application + * code, or use {@link Clutter.Actor.get_stage} to retrieve the stage for + * a given actor. + * + * Checks if #stage is the default stage, or an instance created using + * {@link Clutter.Stage.new} but internally using the same implementation. + * @returns %TRUE if the passed stage is the default one + */ + is_default(): boolean; + /** + * @deprecated + * Use {@link Clutter.Actor.queue_redraw} instead. + * + * Queues a redraw for the passed stage. + * + * Applications should call {@link Clutter.Actor.queue_redraw} and not + * this function. + */ + queue_redraw(): void; + /** + * Makes a screenshot of the stage in RGBA 8bit data, returns a + * linear buffer with #width * 4 as rowstride. + * + * The alpha data contained in the returned buffer is driver-dependent, + * and not guaranteed to hold any sensible value. + * @param x x coordinate of the first pixel that is read from stage + * @param y y coordinate of the first pixel that is read from stage + * @param width Width dimention of pixels to be read, or -1 for the + * entire stage width + * @param height Height dimention of pixels to be read, or -1 for the + * entire stage height + * @returns a pointer to newly allocated memory with the buffer + * or %NULL if the read failed. Use {@link GObject.free} on the returned data + * to release the resources it has allocated. + */ + read_pixels(x: number, y: number, width: number, height: number): number[]; + /** + * Sets whether the #stage should accept the key focus when shown. + * + * This function should be called before showing #stage using + * {@link Clutter.Actor.show}. + * @param accept_focus %TRUE to accept focus on show + */ + set_accept_focus(accept_focus: boolean): void; + /** + * @deprecated + * Use {@link Clutter.Actor.set_background_color} instead. + * + * Sets the stage color. + * @param color A {@link Color} + */ + set_color(color: Color): void; + /** + * @deprecated + * Fog settings are ignored. + * + * Sets the fog (also known as "depth cueing") settings for the #stage. + * + * A {@link Stage} will only use a linear fog progression, which + * depends solely on the distance from the viewer. The {@link Cogl.set.fog} + * function in COGL exposes more of the underlying implementation, + * and allows changing the for progression function. It can be directly + * used by disabling the #ClutterStage:use-fog property and connecting + * a signal handler to the #ClutterActor::paint signal on the #stage, + * like: + * + * |[ + * clutter_stage_set_use_fog (stage, FALSE); + * g_signal_connect (stage, "paint", G_CALLBACK (on_stage_paint), NULL); + * ]| + * + * The paint signal handler will call cogl_set_fog() with the + * desired settings: + * + * |[ + * static void + * on_stage_paint (ClutterActor *actor) + * { + * ClutterColor stage_color = { 0, }; + * CoglColor fog_color = { 0, }; + * + * // set the fog color to the stage background color + * clutter_stage_get_color (CLUTTER_STAGE (actor), &stage_color); + * cogl_color_init_from_4ub (&fog_color, + * stage_color.red, + * stage_color.green, + * stage_color.blue, + * stage_color.alpha); + * + * // enable fog // + * cogl_set_fog (&fog_color, + * COGL_FOG_MODE_EXPONENTIAL, // mode + * 0.5, // density + * 5.0, 30.0); // z_near and z_far + * } + * ]| + * + * The fogging functions only work correctly when the visible actors use + * unmultiplied alpha colors. By default Cogl will premultiply textures and + * cogl_set_source_color() will premultiply colors, so unless you explicitly + * load your textures requesting an unmultiplied internal format and use + * cogl_material_set_color() you can only use fogging with fully opaque actors. + * Support for premultiplied colors will improve in the future when we can + * depend on fragment shaders. + * @param fog a {@link Fog} structure + */ + set_fog(fog: Fog): void; + /** + * Asks to place the stage window in the fullscreen or unfullscreen + * states. + * + * ( Note that you shouldn't assume the window is definitely full screen + * afterward, because other entities (e.g. the user or window manager) + * could unfullscreen it again, and not all window managers honor + * requests to fullscreen windows. + * + * If you want to receive notification of the fullscreen state you + * should either use the {@link Stage.fullscreen} and + * #ClutterStage::unfullscreen signals, or use the notify signal + * for the #ClutterStage:fullscreen-set property + * @param fullscreen %TRUE to to set the stage fullscreen + */ + set_fullscreen(fullscreen: boolean): void; + /** + * Sets the key focus on #actor. An actor with key focus will receive + * all the key events. If #actor is %NULL, the stage will receive + * focus. + * @param actor the actor to set key focus to, or %NULL + */ + set_key_focus(actor: Actor | null): void; + /** + * Sets the minimum size for a stage window, if the default backend + * uses {@link Stage} inside a window + * + * This is a convenience function, and it is equivalent to setting the + * #ClutterActor:min-width and #ClutterActor:min-height on #stage + * + * If the current size of #stage is smaller than the minimum size, the + * #stage will be resized to the new #width and #height + * + * This function has no effect if #stage is fullscreen + * @param width width, in pixels + * @param height height, in pixels + */ + set_minimum_size(width: number, height: number): void; + /** + * Sets whether per-actor motion events (and relative crossing + * events) should be disabled or not. + * + * The default is %TRUE. + * + * If #enable is %FALSE the following signals will not be emitted + * by the actors children of #stage: + * + * - {@link Actor.motion_event} + * - #ClutterActor::enter-event + * - #ClutterActor::leave-event + * + * The events will still be delivered to the #ClutterStage. + * + * The main side effect of this function is that disabling the motion + * events will disable picking to detect the #ClutterActor underneath + * the pointer for each motion event. This is useful, for instance, + * when dragging a #ClutterActor across the #stage: the actor underneath + * the pointer is not going to change, so it's meaningless to perform + * a pick. + * @param enabled %TRUE to enable the motion events delivery, and %FALSE + * otherwise + */ + set_motion_events_enabled(enabled: boolean): void; + /** + * Sets whether the #stage should clear itself at the beginning + * of each paint cycle or not. + * + * Clearing the {@link Stage} can be a costly operation, especially + * if the stage is always covered - for instance, in a full-screen + * video player or in a game with a background texture. + * + * This setting is a hint; Clutter might discard this hint + * depending on its internal state. + * + * If parts of the stage are visible and you disable clearing you + * might end up with visual artifacts while painting the contents of + * the stage. + * @param no_clear %TRUE if the #stage should not clear itself on every + * repaint cycle + */ + set_no_clear_hint(no_clear: boolean): void; + /** + * Sets the stage perspective. Using this function is not recommended + * because it will disable Clutter's attempts to generate an + * appropriate perspective based on the size of the stage. + * @param perspective A {@link Perspective} + */ + set_perspective(perspective: Perspective): void; + /** + * Sets whether motion events received between redraws should + * be throttled or not. If motion events are throttled, those + * events received by the windowing system between redraws will + * be compressed so that only the last event will be propagated + * to the #stage and its actors. + * + * This function should only be used if you want to have all + * the motion events delivered to your application code. + * @param throttle %TRUE to throttle motion events + */ + set_throttle_motion_events(throttle: boolean): void; + /** + * Sets the stage title. + * @param title A utf8 string for the stage windows title. + */ + set_title(title: string): void; + /** + * Sets whether the #stage should honour the {@link Actor.opacity} and + * the alpha channel of the #ClutterStage:color + * @param use_alpha whether the stage should honour the opacity or the + * alpha channel of the stage color + */ + set_use_alpha(use_alpha: boolean): void; + /** + * @deprecated + * Calling this function produces no visible effect + * + * Sets whether the depth cueing effect on the stage should be enabled + * or not. + * + * Depth cueing is a 3D effect that makes actors farther away from the + * viewing point less opaque, by fading them with the stage color. + * + * The parameters of the GL fog used can be changed using the + * {@link Clutter.Stage.set_fog} function. + * @param fog %TRUE for enabling the depth cueing effect + */ + set_use_fog(fog: boolean): void; + /** + * Sets if the stage is resizable by user interaction (e.g. via + * window manager controls) + * @param resizable whether the stage should be user resizable. + */ + set_user_resizable(resizable: boolean): void; + /** + * Shows the cursor on the stage window + */ + show_cursor(): void; + /** + * The ::activate signal is emitted when the stage receives key focus + * from the underlying window system. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "activate", callback: (owner: this) => void): number; + /** + * The ::after-paint signal is emitted after the stage is painted, + * but before the results are displayed on the screen. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "after-paint", callback: (owner: this) => void): number; + /** + * The ::deactivate signal is emitted when the stage loses key focus + * from the underlying window system. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "deactivate", callback: (owner: this) => void): number; + /** + * The ::delete-event signal is emitted when the user closes a + * {@link Stage} window using the window controls. + * + * Clutter by default will call {@link Clutter.main.quit} if #stage is + * the default stage, and clutter_actor_destroy() for any other + * stage. + * + * It is possible to override the default behaviour by connecting + * a new handler and returning %TRUE there. + * + * This signal is emitted only on Clutter backends that + * embed #ClutterStage in native windows. It is not emitted for + * backends that use a static frame buffer. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - event: a {@link Event} of type %CLUTTER_DELETE + * - returns + * + * @returns Callback ID + */ + connect(signal: "delete-event", callback: (owner: this, event: Event) => boolean): number; + /** + * The ::fullscreen signal is emitted when the stage is made fullscreen. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "fullscreen", callback: (owner: this) => void): number; + /** + * The ::unfullscreen signal is emitted when the stage leaves a fullscreen + * state. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "unfullscreen", callback: (owner: this) => void): number; + + connect(signal: "notify::accept-focus", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::color", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::cursor-visible", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::fog", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::fullscreen-set", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::key-focus", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::no-clear-hint", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::offscreen", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::perspective", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::title", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::use-alpha", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::use-fog", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::user-resizable", callback: (owner: this, ...args: any) => void): number; + + } + + type StageInitOptionsMixin = GroupInitOptions & Atk.ImplementorIfaceInitOptions & AnimatableInitOptions & ContainerInitOptions & ScriptableInitOptions & + Pick; + + export interface StageInitOptions extends StageInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Stage} instead. + */ + type StageMixin = IStage & Group & Atk.ImplementorIface & Animatable & Container & Scriptable; + + /** + * The {@link Stage} structure contains only private data + * and should be accessed using the provided API + */ + interface Stage extends StageMixin {} + + class Stage { + public constructor(options?: Partial); + /** + * Creates a new, non-default stage. A non-default stage is a new + * top-level actor which can be used as another container. It works + * exactly like the default stage, but while {@link Clutter.Stage.get_default} + * will always return the same instance, you will have to keep a pointer + * to any {@link Stage} returned by clutter_stage_new(). + * + * The ability to support multiple stages depends on the current + * backend. Use clutter_feature_available() and + * %CLUTTER_FEATURE_STAGE_MULTIPLE to check at runtime whether a + * backend supports multiple stages. + * @returns a new stage, or %NULL if the default backend does + * not support multiple stages. Use {@link Clutter.Actor.destroy} to + * programmatically close the returned stage. + */ + public static new(): Actor; + /** + * @deprecated + * Use {@link Clutter.Stage.new} instead. + * + * Retrieves a {@link Stage} singleton. + * + * This function is not as useful as it sounds, and will most likely + * by deprecated in the future. Application code should only create + * a #ClutterStage instance using {@link Clutter.Stage.new}, and manage the + * lifetime of the stage manually. + * + * The default stage singleton has a platform-specific behaviour: on + * platforms without the %CLUTTER_FEATURE_STAGE_MULTIPLE feature flag + * set, the first #ClutterStage instance will also be set to be the + * default stage instance, and this function will always return a + * pointer to it. + * + * On platforms with the %CLUTTER_FEATURE_STAGE_MULTIPLE feature flag + * set, the default stage will be created by the first call to this + * function, and every following call will return the same pointer to + * it. + * @returns the main + * {@link Stage}. You should never destroy or unref the returned + * actor. + */ + public static get_default(): Stage; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link StageManager} instead. + */ + interface IStageManager { + /** + * The default stage used by Clutter. + */ + readonly default_stage: Stage; + /** + * Returns the default {@link Stage}. + * @returns the default stage. The returned object + * is owned by Clutter and you should never reference or unreference it + */ + get_default_stage(): Stage; + /** + * Lists all currently used stages. + * @returns a newly + * allocated list of {@link Stage} objects. Use {@link GObject.slist_free} to + * deallocate it when done. + */ + list_stages(): Stage[]; + /** + * Lists all currently used stages. + * @returns a pointer + * to the internal list of {@link Stage} objects. The returned list + * is owned by the #ClutterStageManager and should never be modified + * or freed + */ + peek_stages(): Stage[]; + /** + * @deprecated + * Calling this function has no effect + * + * Sets #stage as the default stage. + * @param stage a {@link Stage} + */ + set_default_stage(stage: Stage): void; + /** + * The ::stage-added signal is emitted each time a new {@link Stage} + * has been added to the stage manager. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - stage: the added stage + * + * @returns Callback ID + */ + connect(signal: "stage-added", callback: (owner: this, stage: Stage) => void): number; + /** + * The ::stage-removed signal is emitted each time a {@link Stage} + * has been removed from the stage manager. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - stage: the removed stage + * + * @returns Callback ID + */ + connect(signal: "stage-removed", callback: (owner: this, stage: Stage) => void): number; + + connect(signal: "notify::default-stage", callback: (owner: this, ...args: any) => void): number; + + } + + type StageManagerInitOptionsMixin = GObject.ObjectInitOptions + export interface StageManagerInitOptions extends StageManagerInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link StageManager} instead. + */ + type StageManagerMixin = IStageManager & GObject.Object; + + /** + * The {@link StageManager} structure is private. + */ + interface StageManager extends StageManagerMixin {} + + class StageManager { + public constructor(options?: Partial); + /** + * Returns the default {@link StageManager}. + * @returns the default stage manager instance. The returned + * object is owned by Clutter and you should not reference or unreference it. + */ + public static get_default(): StageManager; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link State} instead. + */ + interface IState { + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Default duration used if an duration has not been specified for a specific + * source/target state pair. The values is in milliseconds. + */ + duration: number; + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * The currently set target state, setting it causes the + * state machine to transition to the new state, use + * {@link Clutter.State.warp_to_state} to change state without + * a transition. + */ + state: string; + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Retrieves the {@link Animator} that is being used for transitioning + * between the two states, if any has been set + * @param source_state_name the name of a source state + * @param target_state_name the name of a target state + * @returns a {@link Animator} instance, or %NULL + */ + get_animator(source_state_name: string, target_state_name: string): Animator; + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Queries the duration used for transitions between a source and + * target state pair + * + * The semantics for the query are the same as the semantics used for + * setting the duration with {@link Clutter.State.set_duration} + * @param source_state_name the name of the source state to + * get the duration of, or %NULL + * @param target_state_name the name of the source state to + * get the duration of, or %NULL + * @returns the duration, in milliseconds + */ + get_duration(source_state_name: string | null, target_state_name: string | null): number; + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Returns a list of pointers to opaque structures with accessor functions + * that describe the keys added to an animator. + * @param source_state_name the source transition name to query, + * or %NULL for all source states + * @param target_state_name the target transition name to query, + * or %NULL for all target states + * @param object the specific object instance to list keys for, + * or %NULL for all managed objects + * @param property_name the property name to search for, or %NULL + * for all properties. + * @returns a + * newly allocated #GList of {@link StateKey}s. The contents of + * the returned list are owned by the #ClutterState and should not be + * modified or freed. Use {@link GObject.list_free} to free the resources allocated + * by the returned list when done using it + */ + get_keys(source_state_name: string | null, target_state_name: string | null, object: GObject.Object | null, property_name: string | null): StateKey[]; + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Queries the currently set target state. + * + * During a transition this function will return the target of the transition. + * + * This function is useful when called from handlers of the + * {@link State.completed} signal. + * @returns a string containing the target state. The returned string + * is owned by the {@link State} and should not be modified or freed + */ + get_state(): string; + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Gets a list of all the state names managed by this {@link State}. + * @returns a newly allocated + * #GList of state names. The contents of the returned #GList are owned + * by the {@link State} and should not be modified or freed. Use + * {@link GObject.list_free} to free the resources allocated by the returned list when + * done using it + */ + get_states(): string[]; + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Gets the timeline driving the {@link State} + * @returns the {@link Timeline} that drives + * the state change animations. The returned timeline is owned + * by the #ClutterState and it should not be unreferenced directly + */ + get_timeline(): Timeline; + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Removes all keys matching the search criteria passed in arguments. + * @param source_state_name the source state name to query, + * or %NULL for all source states + * @param target_state_name the target state name to query, + * or %NULL for all target states + * @param object the specific object instance to list keys for, + * or %NULL for all managed objects + * @param property_name the property name to search for, + * or %NULL for all properties. + */ + remove_key(source_state_name: string | null, target_state_name: string | null, object: GObject.Object | null, property_name: string | null): void; + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Adds multiple keys to a named state of a {@link State} instance, specifying + * the easing mode and value a given property of an object should have at a + * given progress of the animation. + * + * The mode specified is the easing mode used when going to from the previous + * key to the specified key. + * + * For instance, the code below: + * + * |[ + * clutter_state_set (state, NULL, "hover", + * button, "opacity", CLUTTER_LINEAR, 255, + * button, "scale-x", CLUTTER_EASE_OUT_CUBIC, 1.2, + * button, "scale-y", CLUTTER_EASE_OUT_CUBIC, 1.2, + * NULL); + * ]| + * + * will create a transition from any state (a #source_state_name or NULL is + * treated as a wildcard) and a state named "hover"; the + * button object will have the #ClutterActor:opacity + * property animated to a value of 255 using %CLUTTER_LINEAR as the animation + * mode, and the #ClutterActor:scale-x and #ClutterActor:scale-y properties + * animated to a value of 1.2 using %CLUTTER_EASE_OUT_CUBIC as the animation + * mode. To change the state (and start the transition) you can use the + * {@link Clutter.State.set_state} function: + * + * |[ + * clutter_state_set_state (state, "hover"); + * ]| + * + * If a given object, state_name, property tuple already exist in the + * #ClutterState instance, then the mode and value will be replaced with + * the new specified values. + * + * If a property name is prefixed with "delayed::" two additional + * arguments per key are expected: a value relative to the full state time + * to pause before transitioning and a similar value to pause after + * transitioning, e.g.: + * + * |[ + * clutter_state_set (state, "hover", "toggled", + * button, "delayed::scale-x", CLUTTER_LINEAR, 1.0, 0.2, 0.2, + * button, "delayed::scale-y", CLUTTER_LINEAR, 1.0, 0.2, 0.2, + * NULL); + * ]| + * + * will pause for 20% of the duration of the transition before animating, + * and 20% of the duration after animating. + * @param source_state_name the name of the source state keys are being added for + * @param target_state_name the name of the target state keys are being added for + * @param first_object a #GObject + * @param first_property_name a property of #first_object to specify a key for + * @param first_mode the id of the alpha function to use + */ + set(source_state_name: string | null, target_state_name: string, first_object: any | null, first_property_name: string, first_mode: number): void; + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Specifies a {@link Animator} to be used when transitioning between + * the two named states. + * + * The #animator allows specifying a transition between the state that is + * more elaborate than the basic transitions allowed by the tweening of + * properties defined in the #ClutterState keys. + * + * If #animator is %NULL it will unset an existing animator. + * + * #ClutterState will take a reference on the passed #animator, if any + * @param source_state_name the name of a source state + * @param target_state_name the name of a target state + * @param animator a {@link Animator} instance, or %NULL to + * unset an existing #ClutterAnimator + */ + set_animator(source_state_name: string, target_state_name: string, animator: Animator | null): void; + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Sets the duration of a transition. + * + * If both state names are %NULL the default duration for #state is set. + * + * If only #target_state_name is specified, the passed #duration becomes + * the default duration for transitions to the target state. + * + * If both states names are specified, the passed #duration only applies + * to the specified transition. + * @param source_state_name the name of the source state, or %NULL + * @param target_state_name the name of the target state, or %NULL + * @param duration the duration of the transition, in milliseconds + */ + set_duration(source_state_name: string | null, target_state_name: string | null, duration: number): void; + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Sets one specific end key for a state name, #object, #property_name + * combination. + * @param source_state_name the source transition to specify + * transition for, or %NULL to specify the default fallback when a + * more specific source state doesn't exist. + * @param target_state_name the name of the transition to set a key value for. + * @param object the #GObject to set a key for + * @param property_name the property to set a key for + * @param mode the id of the alpha function to use + * @param value the value for property_name of object in state_name + * @param pre_delay relative time of the transition to be idle in the beginning + * of the transition + * @param post_delay relative time of the transition to be idle in the end of + * the transition + * @returns the {@link State} instance, allowing + * chaining of multiple calls + */ + set_key(source_state_name: string | null, target_state_name: string, object: GObject.Object, property_name: string, mode: number, value: GObject.Value, pre_delay: number, post_delay: number): State; + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Change the current state of {@link State} to #target_state_name. + * + * The state will animate during its transition, see + * #clutter_state_warp_to_state for animation-free state switching. + * + * Setting a %NULL state will stop the current animation and unset + * the current state, but keys will be left intact. + * @param target_state_name the state to transition to + * @returns the {@link Timeline} that drives the + * state transition. The returned timeline is owned by the #ClutterState + * and it should not be unreferenced + */ + set_state(target_state_name: string): Timeline; + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Change to the specified target state immediately with no animation. + * + * See {@link Clutter.State.set_state}. + * @param target_state_name the state to transition to + * @returns the {@link Timeline} that drives the + * state transition. The returned timeline is owned by the #ClutterState + * and it should not be unreferenced + */ + warp_to_state(target_state_name: string): Timeline; + /** + * The ::completed signal is emitted when a {@link State} reaches + * the target state specified by {@link Clutter.State.set_state} or + * clutter_state_warp_to_state(). + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "completed", callback: (owner: this) => void): number; + + connect(signal: "notify::duration", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::state", callback: (owner: this, ...args: any) => void): number; + + } + + type StateInitOptionsMixin = GObject.ObjectInitOptions & ScriptableInitOptions & + Pick; + + export interface StateInitOptions extends StateInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link State} instead. + */ + type StateMixin = IState & GObject.Object & Scriptable; + + /** + * The {@link State} structure contains only + * private data and should be accessed using the provided API + */ + interface State extends StateMixin {} + + class State { + public constructor(options?: Partial); + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Creates a new {@link State} + * @returns the newly create {@link State} instance + */ + public static new(): State; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link SwipeAction} instead. + */ + interface ISwipeAction { + + /** + * The ::swept signal is emitted when a swipe gesture is recognized on the + * attached actor. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} attached to the #action + * - direction: the main direction of the swipe gesture + * + * @returns Callback ID + */ + connect(signal: "swept", callback: (owner: this, actor: Actor, direction: SwipeDirection) => void): number; + /** + * The ::swipe signal is emitted when a swipe gesture is recognized on the + * attached actor. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} attached to the #action + * - direction: the main direction of the swipe gesture + * - returns %TRUE if the swipe should continue, and %FALSE if + * the swipe should be cancelled. + * + * @returns Callback ID + */ + connect(signal: "swipe", callback: (owner: this, actor: Actor, direction: SwipeDirection) => boolean): number; + + } + + type SwipeActionInitOptionsMixin = GestureActionInitOptions + export interface SwipeActionInitOptions extends SwipeActionInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link SwipeAction} instead. + */ + type SwipeActionMixin = ISwipeAction & GestureAction; + + /** + * The {@link SwipeAction} structure contains + * only private data and should be accessed using the provided API + */ + interface SwipeAction extends SwipeActionMixin {} + + class SwipeAction { + public constructor(options?: Partial); + /** + * Creates a new {@link SwipeAction} instance + * @returns the newly created {@link SwipeAction} + */ + public static new(): Action; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link TableLayout} instead. + */ + interface ITableLayout { + /** + * @deprecated + * Use {@link GridLayout.column_spacing} instead + * + * The spacing between columns of the {@link TableLayout}, in pixels + */ + column_spacing: number; + /** + * @deprecated + * {@link TableLayout} will honour the easing state + * of the children when allocating them + * + * The duration of the animations, in case {@link TableLayout.use_animations} + * is set to %TRUE. + * + * The duration is expressed in milliseconds. + */ + easing_duration: number; + /** + * @deprecated + * {@link TableLayout} will honour the easing state + * of the children when allocating them + * + * The easing mode for the animations, in case + * {@link TableLayout.use_animations} is set to %TRUE. + * + * The easing mode has the same semantics of #ClutterAnimation:mode: it can + * either be a value from the #ClutterAnimationMode enumeration, like + * %CLUTTER_EASE_OUT_CUBIC, or a logical id as returned by + * {@link Clutter.Alpha.register_func}. + * + * The default value is %CLUTTER_EASE_OUT_CUBIC. + */ + easing_mode: number; + /** + * @deprecated + * Use {@link GridLayout.row_spacing} instead + * + * The spacing between rows of the {@link TableLayout}, in pixels + */ + row_spacing: number; + /** + * @deprecated + * {@link TableLayout} will honour the easing state + * of the children when allocating them + * + * Whether the {@link TableLayout} should animate changes in the + * layout properties. + * + * By default, #ClutterTableLayout will honour the easing state of + * the children when allocating them. Setting this property to + * %TRUE will override the easing state with the layout manager's + * #ClutterTableLayout:easing-mode and #ClutterTableLayout:easing-duration + * properties. + */ + use_animations: boolean; + /** + * @deprecated + * Use {@link Clutter.Actor.get_x_align} and + * clutter_actor_get_y_align() instead. + * + * Retrieves the horizontal and vertical alignment policies for #actor + * as set using {@link Clutter.TableLayout.pack} or + * clutter_table_layout_set_alignment(). + * @param actor a {@link Actor} child of #layout + * @returns return location for the horizontal alignment policy + * + * return location for the vertical alignment policy + */ + get_alignment(actor: Actor): [ x_align: TableAlignment, y_align: TableAlignment ]; + /** + * @deprecated + * No direct replacement is available + * + * Retrieve the current number of columns in #layout + * @returns the number of columns + */ + get_column_count(): number; + /** + * @deprecated + * Use {@link GridLayout.column_spacing} + * + * Retrieves the spacing set using {@link Clutter.TableLayout.set_column_spacing} + * @returns the spacing between columns of the {@link TableLayout} + */ + get_column_spacing(): number; + /** + * @deprecated + * {@link TableLayout} will honour the easing state + * of the children when allocating them. See {@link Clutter.Actor.set_easing_mode} + * and clutter_actor_set_easing_duration(). + * + * Retrieves the duration set using {@link Clutter.TableLayout.set_easing_duration} + * @returns the duration of the animations, in milliseconds + */ + get_easing_duration(): number; + /** + * @deprecated + * {@link TableLayout} will honour the easing state + * of the children when allocating them. See {@link Clutter.Actor.set_easing_mode} + * and clutter_actor_set_easing_duration(). + * + * Retrieves the easing mode set using {@link Clutter.TableLayout.set_easing_mode} + * @returns an easing mode + */ + get_easing_mode(): number; + /** + * @deprecated + * Use {@link Clutter.Actor.get_x_expand} and + * clutter_actor_get_y_expand() instead. + * + * Retrieves the horizontal and vertical expand policies for #actor + * as set using {@link Clutter.TableLayout.pack} or clutter_table_layout_set_expand() + * @param actor a {@link Actor} child of #layout + * @returns return location for the horizontal expand policy + * + * return location for the vertical expand policy + */ + get_expand(actor: Actor): [ x_expand: boolean, y_expand: boolean ]; + /** + * @deprecated + * Use {@link Clutter.Actor.get_x_align} and + * clutter_actor_get_y_align() instead. + * + * Retrieves the horizontal and vertical fill policies for #actor + * as set using {@link Clutter.TableLayout.pack} or clutter_table_layout_set_fill() + * @param actor a {@link Actor} child of #layout + * @returns return location for the horizontal fill policy + * + * return location for the vertical fill policy + */ + get_fill(actor: Actor): [ x_fill: boolean, y_fill: boolean ]; + /** + * @deprecated + * No direct replacement is available + * + * Retrieve the current number rows in the #layout + * @returns the number of rows + */ + get_row_count(): number; + /** + * @deprecated + * Use {@link GridLayout.row_spacing} instead + * + * Retrieves the spacing set using {@link Clutter.TableLayout.set_row_spacing} + * @returns the spacing between rows of the {@link TableLayout} + */ + get_row_spacing(): number; + /** + * @deprecated + * Use the `width` and `height` layout properties + * of {@link GridLayout} instead + * + * Retrieves the row and column span for #actor as set using + * {@link Clutter.TableLayout.pack} or clutter_table_layout_set_span() + * @param actor a {@link Actor} child of #layout + * @returns return location for the col span + * + * return location for the row span + */ + get_span(actor: Actor): [ column_span: number, row_span: number ]; + /** + * @deprecated + * {@link TableLayout} will honour the easing state + * of the children when allocating them. See {@link Clutter.Actor.set_easing_mode} + * and clutter_actor_set_easing_duration(). + * + * Retrieves whether #layout should animate changes in the layout properties + * + * Since {@link Clutter.TableLayout.set_use_animations} + * @returns %TRUE if the animations should be used, %FALSE otherwise + */ + get_use_animations(): boolean; + /** + * @deprecated + * Use {@link Clutter.GridLayout.attach} instead + * + * Packs #actor inside the {@link Container} associated to #layout + * at the given row and column. + * @param actor a {@link Actor} + * @param column the column the #actor should be put, or -1 to append + * @param row the row the #actor should be put, or -1 to append + */ + pack(actor: Actor, column: number, row: number): void; + /** + * @deprecated + * Use {@link Clutter.Actor.set_x_align} and + * clutter_actor_set_y_align() instead. + * + * Sets the horizontal and vertical alignment policies for #actor + * inside #layout + * @param actor a {@link Actor} child of #layout + * @param x_align Horizontal alignment policy for #actor + * @param y_align Vertical alignment policy for #actor + */ + set_alignment(actor: Actor, x_align: TableAlignment, y_align: TableAlignment): void; + /** + * @deprecated + * Use {@link GridLayout.column_spacing} instead + * + * Sets the spacing between columns of #layout + * @param spacing the spacing between columns of the layout, in pixels + */ + set_column_spacing(spacing: number): void; + /** + * @deprecated + * {@link TableLayout} will honour the easing state + * of the children when allocating them. See {@link Clutter.Actor.set_easing_mode} + * and clutter_actor_set_easing_duration(). + * + * Sets the duration of the animations used by #layout when animating changes + * in the layout properties + * + * Use {@link Clutter.TableLayout.set_use_animations} to enable and disable the + * animations + * @param msecs the duration of the animations, in milliseconds + */ + set_easing_duration(msecs: number): void; + /** + * @deprecated + * {@link TableLayout} will honour the easing state + * of the children when allocating them. See {@link Clutter.Actor.set_easing_mode} + * and clutter_actor_set_easing_duration(). + * + * Sets the easing mode to be used by #layout when animating changes in layout + * properties + * + * Use {@link Clutter.TableLayout.set_use_animations} to enable and disable the + * animations + * @param mode an easing mode, either from {@link AnimationMode} or a logical id + * from {@link Clutter.Alpha.register_func} + */ + set_easing_mode(mode: number): void; + /** + * @deprecated + * Use {@link Clutter.Actor.set_x_expand} or + * clutter_actor_set_y_expand() instead. + * + * Sets the horizontal and vertical expand policies for #actor + * inside #layout + * @param actor a {@link Actor} child of #layout + * @param x_expand whether #actor should allocate extra space horizontally + * @param y_expand whether #actor should allocate extra space vertically + */ + set_expand(actor: Actor, x_expand: boolean, y_expand: boolean): void; + /** + * @deprecated + * Use {@link Clutter.Actor.set_x_align} and + * clutter_actor_set_y_align() instead. + * + * Sets the horizontal and vertical fill policies for #actor + * inside #layout + * @param actor a {@link Actor} child of #layout + * @param x_fill whether #actor should fill horizontally the allocated space + * @param y_fill whether #actor should fill vertically the allocated space + */ + set_fill(actor: Actor, x_fill: boolean, y_fill: boolean): void; + /** + * @deprecated + * Use {@link GridLayout.row_spacing} instead + * + * Sets the spacing between rows of #layout + * @param spacing the spacing between rows of the layout, in pixels + */ + set_row_spacing(spacing: number): void; + /** + * @deprecated + * Use the `width` and `height` layout properties + * of {@link GridLayout} instead + * + * Sets the row and column span for #actor + * inside #layout + * @param actor a {@link Actor} child of #layout + * @param column_span Column span for #actor + * @param row_span Row span for #actor + */ + set_span(actor: Actor, column_span: number, row_span: number): void; + /** + * @deprecated + * {@link TableLayout} will honour the easing state + * of the children when allocating them. See {@link Clutter.Actor.set_easing_mode} + * and clutter_actor_set_easing_duration(). + * + * Sets whether #layout should animate changes in the layout properties + * + * The duration of the animations is controlled by + * {@link Clutter.TableLayout.set_easing_duration}; the easing mode to be used + * by the animations is controlled by clutter_table_layout_set_easing_mode() + * @param animate %TRUE if the #layout should use animations + */ + set_use_animations(animate: boolean): void; + connect(signal: "notify::column-spacing", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::easing-duration", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::easing-mode", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::row-spacing", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::use-animations", callback: (owner: this, ...args: any) => void): number; + + } + + type TableLayoutInitOptionsMixin = LayoutManagerInitOptions & + Pick; + + export interface TableLayoutInitOptions extends TableLayoutInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link TableLayout} instead. + */ + type TableLayoutMixin = ITableLayout & LayoutManager; + + /** + * The {@link TableLayout} structure contains only private data + * and should be accessed using the provided API + */ + interface TableLayout extends TableLayoutMixin {} + + class TableLayout { + public constructor(options?: Partial); + /** + * @deprecated + * Use {@link GridLayout} instead + * + * Creates a new {@link TableLayout} layout manager + * @returns the newly created {@link TableLayout} + */ + public static new(): LayoutManager; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link TapAction} instead. + */ + interface ITapAction { + + /** + * The ::tap signal is emitted when the tap gesture is complete. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} attached to the #action + * + * @returns Callback ID + */ + connect(signal: "tap", callback: (owner: this, actor: Actor) => void): number; + + } + + type TapActionInitOptionsMixin = GestureActionInitOptions + export interface TapActionInitOptions extends TapActionInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link TapAction} instead. + */ + type TapActionMixin = ITapAction & GestureAction; + + /** + * The {@link TapAction} structure contains + * only private data and should be accessed using the provided API + */ + interface TapAction extends TapActionMixin {} + + class TapAction { + public constructor(options?: Partial); + /** + * Creates a new {@link TapAction} instance + * @returns the newly created {@link TapAction} + */ + public static new(): Action; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Text} instead. + */ + interface IText { + /** + * Toggles whether return invokes the activate signal or not. + */ + activatable: boolean; + /** + * A list of #PangoStyleAttributes to be applied to the + * contents of the {@link Text} actor. + */ + attributes: Pango.AttrList; + /** + * The buffer which stores the text for this {@link Text}. + * + * If set to %NULL, a default buffer will be created. + */ + buffer: TextBuffer; + /** + * The color used to render the text. + */ + color: Color; + /** + * The color of the cursor. + */ + cursor_color: Color; + /** + * Will be set to %TRUE if {@link Text.cursor_color} has been set. + */ + readonly cursor_color_set: boolean; + /** + * The current input cursor position. -1 is taken to be the end of the text + */ + cursor_position: number; + /** + * The size of the cursor, in pixels. If set to -1 the size used will + * be the default cursor size of 2 pixels. + */ + cursor_size: number; + /** + * Whether the input cursor is visible or not. + * + * The cursor will only be visible if this property and either + * the {@link Text.editable} or the #ClutterText:selectable properties + * are set to %TRUE. + */ + cursor_visible: boolean; + /** + * Whether key events delivered to the actor causes editing. + */ + editable: boolean; + /** + * The preferred place to ellipsize the contents of the {@link Text} actor + */ + ellipsize: Pango.EllipsizeMode; + /** + * The #PangoFontDescription that should be used by the {@link Text} + * + * If you have a string describing the font then you should look at + * #ClutterText:font-name instead + */ + font_description: Pango.FontDescription; + /** + * The font to be used by the {@link Text}, as a string + * that can be parsed by {@link Pango.font.description_from_string}. + * + * If set to %NULL, the default system font will be used instead. + */ + font_name: string; + /** + * Whether the contents of the {@link Text} should be justified + * on both margins. + */ + justify: boolean; + /** + * The preferred alignment for the text. This property controls + * the alignment of multi-line paragraphs. + */ + line_alignment: Pango.Alignment; + /** + * Whether to wrap the lines of {@link Text.text} if the contents + * exceed the available allocation. The wrapping strategy is + * controlled by the #ClutterText:line-wrap-mode property. + */ + line_wrap: boolean; + /** + * If {@link Text.line_wrap} is set to %TRUE, this property will + * control how the text is wrapped. + */ + line_wrap_mode: Pango.WrapMode; + /** + * The maximum length of the contents of the {@link Text} actor. + */ + max_length: number; + /** + * If non-zero, the character that should be used in place of + * the actual text in a password text actor. + */ + password_char: number; + /** + * @deprecated + * Use ClutterText:cursor-position instead. + * + * The current input cursor position. -1 is taken to be the end of the text + */ + position: number; + /** + * Whether it is possible to select text, either using the pointer + * or the keyboard. + * + * This property depends on the {@link Actor.reactive} property being + * set to %TRUE. + */ + selectable: boolean; + /** + * The color of selected text. + */ + selected_text_color: Color; + /** + * Will be set to %TRUE if {@link Text.selected_text_color} has been set. + */ + readonly selected_text_color_set: boolean; + /** + * The current input cursor position. -1 is taken to be the end of the text + */ + selection_bound: number; + /** + * The color of the selection. + */ + selection_color: Color; + /** + * Will be set to %TRUE if {@link Text.selection_color} has been set. + */ + readonly selection_color_set: boolean; + /** + * Whether the {@link Text} actor should be in single line mode + * or not. A single line #ClutterText actor will only contain a + * single line of text, scrolling it in case its length is bigger + * than the allocated size. + * + * Setting this property will also set the #ClutterText:activatable + * property as a side-effect. + * + * The #ClutterText:single-line-mode property is used only if the + * #ClutterText:editable property is set to %TRUE. + */ + single_line_mode: boolean; + /** + * The text to render inside the actor. + */ + text: string; + /** + * Whether the text includes Pango markup. + * + * For more informations about the Pango markup format, see + * {@link Pango.Layout.set_markup} in the Pango documentation. + * + * It is not possible to round-trip this property between + * %TRUE and %FALSE. Once a string with markup has been set on + * a {@link Text} actor with :use-markup set to %TRUE, the markup + * is stripped from the string. + */ + use_markup: boolean; + /** + * Emits the {@link Text.activate} signal, if #self has been set + * as activatable using {@link Clutter.Text.set_activatable}. + * + * This function can be used to emit the ::activate signal inside + * a #ClutterActor::captured-event or #ClutterActor::key-press-event + * signal handlers before the default signal handler for the + * #ClutterText is invoked. + * @returns %TRUE if the ::activate signal has been emitted, + * and %FALSE otherwise + */ + activate(): boolean; + /** + * Retrieves the position of the character at the given coordinates. + * @param x the X coordinate, relative to the actor + * @param y the Y coordinate, relative to the actor + * @returns the position of the character + */ + coords_to_position(x: number, y: number): number; + /** + * Deletes #n_chars inside a {@link Text} actor, starting from the + * current cursor position. + * + * Somewhat awkwardly, the cursor position is decremented by the same + * number of characters you've deleted. + * @param n_chars the number of characters to delete + */ + delete_chars(n_chars: number): void; + /** + * Deletes the currently selected text + * + * This function is only useful in subclasses of {@link Text} + * @returns %TRUE if text was deleted or if the text actor + * is empty, and %FALSE otherwise + */ + delete_selection(): boolean; + /** + * Deletes the text inside a {@link Text} actor between #start_pos + * and #end_pos. + * + * The starting and ending positions are expressed in characters, + * not in bytes. + * @param start_pos starting position + * @param end_pos ending position + */ + delete_text(start_pos: number, end_pos: number): void; + /** + * Retrieves whether a {@link Text} is activatable or not. + * @returns %TRUE if the actor is activatable + */ + get_activatable(): boolean; + /** + * Gets the attribute list that was set on the {@link Text} actor + * {@link Clutter.Text.set_attributes}, if any. + * @returns the attribute list, or %NULL if none was set. The + * returned value is owned by the {@link Text} and should not be unreferenced. + */ + get_attributes(): Pango.AttrList; + /** + * Get the {@link TextBuffer} object which holds the text for + * this widget. + * @returns A #GtkEntryBuffer object. + */ + get_buffer(): TextBuffer; + /** + * Retrieves the contents of the {@link Text} actor between + * #start_pos and #end_pos, but not including #end_pos. + * + * The positions are specified in characters, not in bytes. + * @param start_pos start of text, in characters + * @param end_pos end of text, in characters + * @returns a newly allocated string with the contents of + * the text actor between the specified positions. Use {@link GObject.free} + * to free the resources when done + */ + get_chars(start_pos: number, end_pos: number): string; + /** + * Retrieves the text color as set by {@link Clutter.Text.set_color}. + * @returns return location for a {@link Color} + */ + get_color(): Color; + /** + * Retrieves the color of the cursor of a {@link Text} actor. + * @returns return location for a {@link Color} + */ + get_cursor_color(): Color; + /** + * Retrieves the cursor position. + * @returns the cursor position, in characters + */ + get_cursor_position(): number; + /** + * Retrieves the rectangle that contains the cursor. + * + * The coordinates of the rectangle's origin are in actor-relative + * coordinates. + * @returns return location of a {@link Rect} + */ + get_cursor_rect(): Rect; + /** + * Retrieves the size of the cursor of a {@link Text} actor. + * @returns the size of the cursor, in pixels + */ + get_cursor_size(): number; + /** + * Retrieves whether the cursor of a {@link Text} actor is visible. + * @returns %TRUE if the cursor is visible + */ + get_cursor_visible(): boolean; + /** + * Retrieves whether a {@link Text} is editable or not. + * @returns %TRUE if the actor is editable + */ + get_editable(): boolean; + /** + * Returns the ellipsizing position of a {@link Text} actor, as + * set by {@link Clutter.Text.set_ellipsize}. + * @returns #PangoEllipsizeMode + */ + get_ellipsize(): Pango.EllipsizeMode; + /** + * Retrieves the #PangoFontDescription used by #self + * @returns a #PangoFontDescription. The returned value is owned + * by the {@link Text} actor and it should not be modified or freed + */ + get_font_description(): Pango.FontDescription; + /** + * Retrieves the font name as set by {@link Clutter.Text.set_font_name}. + * @returns a string containing the font name. The returned + * string is owned by the {@link Text} actor and should not be + * modified or freed + */ + get_font_name(): string; + /** + * Retrieves whether the {@link Text} actor should justify its contents + * on both margins. + * @returns %TRUE if the text should be justified + */ + get_justify(): boolean; + /** + * Retrieves the current #PangoLayout used by a {@link Text} actor. + * @returns a #PangoLayout. The returned object is owned by + * the {@link Text} actor and should not be modified or freed + */ + get_layout(): Pango.Layout; + /** + * Obtains the coordinates where the {@link Text} will draw the #PangoLayout + * representing the text. + * @returns location to store X offset of layout, or %NULL + * + * location to store Y offset of layout, or %NULL + */ + get_layout_offsets(): [ x: number, y: number ]; + /** + * Retrieves the alignment of a {@link Text}, as set by + * {@link Clutter.Text.set_line_alignment}. + * @returns a #PangoAlignment + */ + get_line_alignment(): Pango.Alignment; + /** + * Retrieves the value set using {@link Clutter.Text.set_line_wrap}. + * @returns %TRUE if the {@link Text} actor should wrap + * its contents + */ + get_line_wrap(): boolean; + /** + * Retrieves the line wrap mode used by the {@link Text} actor. + * + * See clutter_text_set_line_wrap_mode (). + * @returns the wrap mode used by the {@link Text} + */ + get_line_wrap_mode(): Pango.WrapMode; + /** + * Gets the maximum length of text that can be set into a text actor. + * + * See {@link Clutter.Text.set_max_length}. + * @returns the maximum number of characters. + */ + get_max_length(): number; + /** + * Retrieves the character to use in place of the actual text + * as set by {@link Clutter.Text.set_password_char}. + * @returns a Unicode character or 0 if the password + * character is not set + */ + get_password_char(): string; + /** + * Retrieves whether a {@link Text} is selectable or not. + * @returns %TRUE if the actor is selectable + */ + get_selectable(): boolean; + /** + * Retrieves the color of selected text of a {@link Text} actor. + * @returns return location for a {@link Color} + */ + get_selected_text_color(): Color; + /** + * Retrieves the currently selected text. + * @returns a newly allocated string containing the currently + * selected text, or %NULL. Use {@link GObject.free} to free the returned + * string. + */ + get_selection(): string; + /** + * Retrieves the other end of the selection of a {@link Text} actor, + * in characters from the current cursor position. + * @returns the position of the other end of the selection + */ + get_selection_bound(): number; + /** + * Retrieves the color of the selection of a {@link Text} actor. + * @returns return location for a {@link Color} + */ + get_selection_color(): Color; + /** + * Retrieves whether the {@link Text} actor is in single line mode. + * @returns %TRUE if the {@link Text} actor is in single line mode + */ + get_single_line_mode(): boolean; + /** + * Retrieves a pointer to the current contents of a {@link Text} + * actor. + * + * If you need a copy of the contents for manipulating, either + * use {@link GObject.strdup} on the returned string, or use: + * + * |[ + * copy = clutter_text_get_chars (text, 0, -1); + * ]| + * + * Which will return a newly allocated string. + * + * If the #ClutterText actor is empty, this function will return + * an empty string, and not %NULL. + * @returns the contents of the actor. The returned + * string is owned by the {@link Text} actor and should never be modified + * or freed + */ + get_text(): string; + /** + * Retrieves whether the contents of the {@link Text} actor should be + * parsed for the Pango text markup. + * @returns %TRUE if the contents will be parsed for markup + */ + get_use_markup(): boolean; + /** + * Inserts #text into a {@link Actor} at the given position. + * + * If #position is a negative number, the text will be appended + * at the end of the current contents of the #ClutterText. + * + * The position is expressed in characters, not in bytes. + * @param text the text to be inserted + * @param position the position of the insertion, or -1 + */ + insert_text(text: string, position: number): void; + /** + * Inserts #wc at the current cursor position of a + * {@link Text} actor. + * @param wc a Unicode character + */ + insert_unichar(wc: string): void; + /** + * Retrieves the coordinates of the given #position. + * @param position position in characters + * @returns %TRUE if the conversion was successful + * + * return location for the X coordinate, or %NULL + * + * return location for the Y coordinate, or %NULL + * + * return location for the line height, or %NULL + */ + position_to_coords(position: number): [ boolean, number, number, number ]; + /** + * Sets whether a {@link Text} actor should be activatable. + * + * An activatable #ClutterText actor will emit the #ClutterText::activate + * signal whenever the 'Enter' (or 'Return') key is pressed; if it is not + * activatable, a new line will be appended to the current content. + * + * An activatable #ClutterText must also be set as editable using + * {@link Clutter.Text.set_editable}. + * @param activatable whether the {@link Text} actor should be activatable + */ + set_activatable(activatable: boolean): void; + /** + * Sets the attributes list that are going to be applied to the + * {@link Text} contents. + * + * The #ClutterText actor will take a reference on the #PangoAttrList + * passed to this function. + * @param attrs a #PangoAttrList or %NULL to unset the attributes + */ + set_attributes(attrs: Pango.AttrList | null): void; + /** + * Set the {@link TextBuffer} object which holds the text for + * this widget. + * @param buffer a {@link TextBuffer} + */ + set_buffer(buffer: TextBuffer): void; + /** + * Sets the color of the contents of a {@link Text} actor. + * + * The overall opacity of the #ClutterText actor will be the + * result of the alpha value of #color and the composited + * opacity of the actor itself on the scenegraph, as returned + * by {@link Clutter.Actor.get_paint_opacity}. + * @param color a {@link Color} + */ + set_color(color: Color): void; + /** + * Sets the color of the cursor of a {@link Text} actor. + * + * If #color is %NULL, the cursor color will be the same as the + * text color. + * @param color the color of the cursor, or %NULL to unset it + */ + set_cursor_color(color: Color | null): void; + /** + * Sets the cursor of a {@link Text} actor at #position. + * + * The position is expressed in characters, not in bytes. + * @param position the new cursor position, in characters + */ + set_cursor_position(position: number): void; + /** + * Sets the size of the cursor of a {@link Text}. The cursor + * will only be visible if the #ClutterText:cursor-visible property + * is set to %TRUE. + * @param size the size of the cursor, in pixels, or -1 to use the + * default value + */ + set_cursor_size(size: number): void; + /** + * Sets whether the cursor of a {@link Text} actor should be + * visible or not. + * + * The color of the cursor will be the same as the text color + * unless {@link Clutter.Text.set_cursor_color} has been called. + * + * The size of the cursor can be set using clutter_text_set_cursor_size(). + * + * The position of the cursor can be changed programmatically using + * clutter_text_set_cursor_position(). + * @param cursor_visible whether the cursor should be visible + */ + set_cursor_visible(cursor_visible: boolean): void; + /** + * Sets whether the {@link Text} actor should be editable. + * + * An editable #ClutterText with key focus set using + * {@link Clutter.Actor.grab_key_focus} or clutter_stage_set_key_focus() + * will receive key events and will update its contents accordingly. + * @param editable whether the {@link Text} should be editable + */ + set_editable(editable: boolean): void; + /** + * Sets the mode used to ellipsize (add an ellipsis: "...") to the + * text if there is not enough space to render the entire contents + * of a {@link Text} actor + * @param mode a #PangoEllipsizeMode + */ + set_ellipsize(mode: Pango.EllipsizeMode): void; + /** + * Sets #font_desc as the font description for a {@link Text} + * + * The #PangoFontDescription is copied by the #ClutterText actor + * so you can safely call {@link Pango.FontDescription.free} on it after + * calling this function. + * @param font_desc a #PangoFontDescription + */ + set_font_description(font_desc: Pango.FontDescription): void; + /** + * Sets the font used by a {@link Text}. The #font_name string + * must either be %NULL, which means that the font name from the + * default #ClutterBackend will be used; or be something that can + * be parsed by the {@link Pango.font.description_from_string} function, + * like: + * + * |[ + * // Set the font to the system's Sans, 10 points + * clutter_text_set_font_name (text, "Sans 10"); + * + * // Set the font to the system's Serif, 16 pixels + * clutter_text_set_font_name (text, "Serif 16px"); + * + * // Set the font to Helvetica, 10 points + * clutter_text_set_font_name (text, "Helvetica 10"); + * ]| + * @param font_name a font name, or %NULL to set the default font name + */ + set_font_name(font_name: string | null): void; + /** + * Sets whether the text of the {@link Text} actor should be justified + * on both margins. This setting is ignored if Clutter is compiled + * against Pango < 1.18. + * @param justify whether the text should be justified + */ + set_justify(justify: boolean): void; + /** + * Sets the way that the lines of a wrapped label are aligned with + * respect to each other. This does not affect the overall alignment + * of the label within its allocated or specified width. + * + * To align a {@link Text} actor you should add it to a container + * that supports alignment, or use the anchor point. + * @param alignment A #PangoAlignment + */ + set_line_alignment(alignment: Pango.Alignment): void; + /** + * Sets whether the contents of a {@link Text} actor should wrap, + * if they don't fit the size assigned to the actor. + * @param line_wrap whether the contents should wrap + */ + set_line_wrap(line_wrap: boolean): void; + /** + * If line wrapping is enabled (see {@link Clutter.Text.set_line_wrap}) this + * function controls how the line wrapping is performed. The default is + * %PANGO_WRAP_WORD which means wrap on word boundaries. + * @param wrap_mode the line wrapping mode + */ + set_line_wrap_mode(wrap_mode: Pango.WrapMode): void; + /** + * Sets #markup as the contents of a {@link Text}. + * + * This is a convenience function for setting a string containing + * Pango markup, and it is logically equivalent to: + * + * |[ + * /* the order is important */ + * clutter_text_set_text (CLUTTER_TEXT (actor), markup); + * clutter_text_set_use_markup (CLUTTER_TEXT (actor), TRUE); + * ]| + * @param markup a string containing Pango markup. + * Passing %NULL is the same as passing "" (the empty string) + */ + set_markup(markup: string | null): void; + /** + * Sets the maximum allowed length of the contents of the actor. If the + * current contents are longer than the given length, then they will be + * truncated to fit. + * @param max the maximum number of characters allowed in the text actor; 0 + * to disable or -1 to set the length of the current string + */ + set_max_length(max: number): void; + /** + * Sets the character to use in place of the actual text in a + * password text actor. + * + * If #wc is 0 the text will be displayed as it is entered in the + * {@link Text} actor. + * @param wc a Unicode character, or 0 to unset the password character + */ + set_password_char(wc: string): void; + /** + * Sets, or unsets, the pre-edit string. This function is useful + * for input methods to display a string (with eventual specific + * Pango attributes) before it is entered inside the {@link Text} + * buffer. + * + * The preedit string and attributes are ignored if the #ClutterText + * actor is not editable. + * + * This function should not be used by applications + * @param preedit_str the pre-edit string, or %NULL to unset it + * @param preedit_attrs the pre-edit string attributes + * @param cursor_pos the cursor position for the pre-edit string + */ + set_preedit_string(preedit_str: string | null, preedit_attrs: Pango.AttrList | null, cursor_pos: number): void; + /** + * Sets whether a {@link Text} actor should be selectable. + * + * A selectable #ClutterText will allow selecting its contents using + * the pointer or the keyboard. + * @param selectable whether the {@link Text} actor should be selectable + */ + set_selectable(selectable: boolean): void; + /** + * Sets the selected text color of a {@link Text} actor. + * + * If #color is %NULL, the selected text color will be the same as the + * selection color, which then falls back to cursor, and then text color. + * @param color the selected text color, or %NULL to unset it + */ + set_selected_text_color(color: Color | null): void; + /** + * Selects the region of text between #start_pos and #end_pos. + * + * This function changes the position of the cursor to match + * #start_pos and the selection bound to match #end_pos. + * @param start_pos start of the selection, in characters + * @param end_pos end of the selection, in characters + */ + set_selection(start_pos: number, end_pos: number): void; + /** + * Sets the other end of the selection, starting from the current + * cursor position. + * + * If #selection_bound is -1, the selection unset. + * @param selection_bound the position of the end of the selection, in characters + */ + set_selection_bound(selection_bound: number): void; + /** + * Sets the color of the selection of a {@link Text} actor. + * + * If #color is %NULL, the selection color will be the same as the + * cursor color, or if no cursor color is set either then it will be + * the same as the text color. + * @param color the color of the selection, or %NULL to unset it + */ + set_selection_color(color: Color | null): void; + /** + * Sets whether a {@link Text} actor should be in single line mode + * or not. Only editable #ClutterTexts can be in single line + * mode. + * + * A text actor in single line mode will not wrap text and will clip + * the visible area to the predefined size. The contents of the + * text actor will scroll to display the end of the text if its length + * is bigger than the allocated width. + * + * When setting the single line mode the #ClutterText:activatable + * property is also set as a side effect. Instead of entering a new + * line character, the text actor will emit the #ClutterText::activate + * signal. + * @param single_line whether to enable single line mode + */ + set_single_line_mode(single_line: boolean): void; + /** + * Sets the contents of a {@link Text} actor. + * + * If the #ClutterText:use-markup property was set to %TRUE it + * will be reset to %FALSE as a side effect. If you want to + * maintain the #ClutterText:use-markup you should use the + * {@link Clutter.Text.set_markup} function instead + * @param text the text to set. Passing %NULL is the same + * as passing "" (the empty string) + */ + set_text(text: string | null): void; + /** + * Sets whether the contents of the {@link Text} actor contains markup + * in Pango's text markup language. + * + * Setting #ClutterText:use-markup on an editable #ClutterText will + * not have any effect except hiding the markup. + * + * See also #ClutterText:use-markup. + * @param setting %TRUE if the text should be parsed for markup. + */ + set_use_markup(setting: boolean): void; + /** + * The ::activate signal is emitted each time the actor is 'activated' + * by the user, normally by pressing the 'Enter' key. The signal is + * emitted only if {@link Text.activatable} is set to %TRUE. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "activate", callback: (owner: this) => void): number; + /** + * The ::cursor-changed signal is emitted whenever the cursor + * position or size changes. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "cursor-changed", callback: (owner: this) => void): number; + /** + * The ::cursor-event signal is emitted whenever the cursor position + * changes inside a {@link Text} actor. Inside #geometry it is stored + * the current position and size of the cursor, relative to the actor + * itself. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - geometry: the coordinates of the cursor + * + * @returns Callback ID + */ + connect(signal: "cursor-event", callback: (owner: this, geometry: Geometry) => void): number; + /** + * This signal is emitted when text is deleted from the actor by + * the user. It is emitted before #self text changes. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - start_pos: the starting position + * - end_pos: the end position + * + * @returns Callback ID + */ + connect(signal: "delete-text", callback: (owner: this, start_pos: number, end_pos: number) => void): number; + /** + * This signal is emitted when text is inserted into the actor by + * the user. It is emitted before #self text changes. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - new_text: the new text to insert + * - new_text_length: the length of the new text, in bytes, or -1 if + * new_text is nul-terminated + * - position: the position, in characters, at which to insert the + * new text. this is an in-out parameter. After the signal + * emission is finished, it should point after the newly + * inserted text. + * + * @returns Callback ID + */ + connect(signal: "insert-text", callback: (owner: this, new_text: string, new_text_length: number, position: any | null) => void): number; + /** + * The ::text-changed signal is emitted after #actor's text changes + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "text-changed", callback: (owner: this) => void): number; + + connect(signal: "notify::activatable", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::attributes", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::buffer", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::color", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::cursor-color", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::cursor-color-set", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::cursor-position", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::cursor-size", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::cursor-visible", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::editable", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::ellipsize", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::font-description", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::font-name", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::justify", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::line-alignment", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::line-wrap", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::line-wrap-mode", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::max-length", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::password-char", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::position", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::selectable", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::selected-text-color", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::selected-text-color-set", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::selection-bound", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::selection-color", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::selection-color-set", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::single-line-mode", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::text", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::use-markup", callback: (owner: this, ...args: any) => void): number; + + } + + type TextInitOptionsMixin = ActorInitOptions & Atk.ImplementorIfaceInitOptions & AnimatableInitOptions & ContainerInitOptions & ScriptableInitOptions & + Pick; + + export interface TextInitOptions extends TextInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Text} instead. + */ + type TextMixin = IText & Actor & Atk.ImplementorIface & Animatable & Container & Scriptable; + + /** + * The {@link Text} struct contains only private data. + */ + interface Text extends TextMixin {} + + class Text { + public constructor(options?: Partial); + /** + * Creates a new {@link Text} actor. This actor can be used to + * display and edit text. + * @returns the newly created {@link Text} actor + */ + public static new(): Text; + /** + * Creates a new {@link Text} actor, using #font_name as the font + * description; #text will be used to set the contents of the actor; + * and #color will be used as the color to render #text. + * + * This function is equivalent to calling {@link Clutter.Text.new}, + * clutter_text_set_font_name(), clutter_text_set_text() and + * clutter_text_set_color(). + * @param font_name a string with a font description + * @param text the contents of the actor + * @param color the color to be used to render #text + * @returns the newly created {@link Text} actor + */ + public static new_full(font_name: string, text: string, color: Color): Text; + /** + * Creates a new entry with the specified text buffer. + * @param buffer The buffer to use for the new {@link Text}. + * @returns a new {@link Text} + */ + public static new_with_buffer(buffer: TextBuffer): Text; + /** + * Creates a new {@link Text} actor, using #font_name as the font + * description; #text will be used to set the contents of the actor. + * + * This function is equivalent to calling {@link Clutter.Text.new}, + * clutter_text_set_font_name(), and clutter_text_set_text(). + * @param font_name a string with a font description + * @param text the contents of the actor + * @returns the newly created {@link Text} actor + */ + public static new_with_text(font_name: string | null, text: string): Text; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link TextBuffer} instead. + */ + interface ITextBuffer { + /** + * The length (in characters) of the text in buffer. + */ + readonly length: number; + /** + * The maximum length (in characters) of the text in the buffer. + */ + max_length: number; + /** + * The contents of the buffer. + */ + readonly text: string; + /** + * Deletes a sequence of characters from the buffer. #n_chars characters are + * deleted starting at #position. If #n_chars is negative, then all characters + * until the end of the text are deleted. + * + * If #position or #n_chars are out of bounds, then they are coerced to sane + * values. + * + * Note that the positions are specified in characters, not bytes. + * @param position position at which to delete text + * @param n_chars number of characters to delete + * @returns The number of characters deleted. + */ + delete_text(position: number, n_chars: number): number; + /** + * Emits the {@link TextBuffer.deleted_text} signal on #buffer. + * + * Used when subclassing #ClutterTextBuffer + * @param position position at which text was deleted + * @param n_chars number of characters deleted + */ + emit_deleted_text(position: number, n_chars: number): void; + /** + * Emits the {@link TextBuffer.inserted_text} signal on #buffer. + * + * Used when subclassing #ClutterTextBuffer + * @param position position at which text was inserted + * @param chars text that was inserted + * @param n_chars number of characters inserted + */ + emit_inserted_text(position: number, chars: string, n_chars: number): void; + /** + * Retrieves the length in bytes of the buffer. + * See {@link Clutter.TextBuffer.get_length}. + * @returns The byte length of the buffer. + */ + get_bytes(): number; + /** + * Retrieves the length in characters of the buffer. + * @returns The number of characters in the buffer. + */ + get_length(): number; + /** + * Retrieves the maximum allowed length of the text in + * #buffer. See {@link Clutter.TextBuffer.set_max_length}. + * @returns the maximum allowed number of characters + * in {@link TextBuffer}, or 0 if there is no maximum. + */ + get_max_length(): number; + /** + * Retrieves the contents of the buffer. + * + * The memory pointer returned by this call will not change + * unless this object emits a signal, or is finalized. + * @returns a pointer to the contents of the widget as a + * string. This string points to internally allocated + * storage in the buffer and must not be freed, modified or + * stored. + */ + get_text(): string; + /** + * Inserts #n_chars characters of #chars into the contents of the + * buffer, at position #position. + * + * If #n_chars is negative, then characters from chars will be inserted + * until a null-terminator is found. If #position or #n_chars are out of + * bounds, or the maximum buffer text length is exceeded, then they are + * coerced to sane values. + * + * Note that the position and length are in characters, not in bytes. + * @param position the position at which to insert text. + * @param chars the text to insert into the buffer. + * @param n_chars the length of the text in characters, or -1 + * @returns The number of characters actually inserted. + */ + insert_text(position: number, chars: string, n_chars: number): number; + /** + * Sets the maximum allowed length of the contents of the buffer. If + * the current contents are longer than the given length, then they + * will be truncated to fit. + * @param max_length the maximum length of the entry buffer, or 0 for no maximum. + * (other than the maximum length of entries.) The value passed in will + * be clamped to the range [ 0, %CLUTTER_TEXT_BUFFER_MAX_SIZE ]. + */ + set_max_length(max_length: number): void; + /** + * Sets the text in the buffer. + * + * This is roughly equivalent to calling {@link Clutter.TextBuffer.delete_text} + * and clutter_text_buffer_insert_text(). + * + * Note that #n_chars is in characters, not in bytes. + * @param chars the new text + * @param n_chars the number of characters in #text, or -1 + */ + set_text(chars: string, n_chars: number): void; + /** + * This signal is emitted after text is deleted from the buffer. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - position: the position the text was deleted at. + * - n_chars: The number of characters that were deleted. + * + * @returns Callback ID + */ + connect(signal: "deleted-text", callback: (owner: this, position: number, n_chars: number) => void): number; + /** + * This signal is emitted after text is inserted into the buffer. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - position: the position the text was inserted at. + * - chars: The text that was inserted. + * - n_chars: The number of characters that were inserted. + * + * @returns Callback ID + */ + connect(signal: "inserted-text", callback: (owner: this, position: number, chars: string, n_chars: number) => void): number; + + connect(signal: "notify::length", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::max-length", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::text", callback: (owner: this, ...args: any) => void): number; + + } + + type TextBufferInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface TextBufferInitOptions extends TextBufferInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link TextBuffer} instead. + */ + type TextBufferMixin = ITextBuffer & GObject.Object; + + /** + * The {@link TextBuffer} structure contains private + * data and it should only be accessed using the provided API. + */ + interface TextBuffer extends TextBufferMixin {} + + class TextBuffer { + public constructor(options?: Partial); + /** + * Create a new ClutterTextBuffer object. + * @returns A new ClutterTextBuffer object. + */ + public static new(): TextBuffer; + /** + * Create a new ClutterTextBuffer object with some text. + * @param text initial buffer text + * @param text_len initial buffer text length, or -1 for null-terminated. + * @returns A new ClutterTextBuffer object. + */ + public static new_with_text(text: string | null, text_len: number): TextBuffer; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link TextNode} instead. + */ + interface ITextNode { + + } + + type TextNodeInitOptionsMixin = PaintNodeInitOptions + export interface TextNodeInitOptions extends TextNodeInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link TextNode} instead. + */ + type TextNodeMixin = ITextNode & PaintNode; + + /** + * The {@link TextNode} structure is an opaque + * type whose members cannot be directly accessed. + */ + interface TextNode extends TextNodeMixin {} + + class TextNode { + public constructor(options?: Partial); + /** + * Creates a new {@link PaintNode} that will paint a #PangoLayout + * with the given color. + * + * This function takes a reference on the passed #layout, so it + * is safe to call {@link GObject.Object.unref} after it returns. + * @param layout a #PangoLayout, or %NULL + * @param color the color used to paint the layout, + * or %NULL + * @returns the newly created {@link PaintNode}. + * Use {@link Clutter.PaintNode.unref} when done + */ + public static new(layout: Pango.Layout | null, color: Color | null): PaintNode; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Texture} instead. + */ + interface ITexture { + cogl_material: any; + cogl_texture: any; + disable_slicing: boolean; + /** + * @deprecated + * Use {@link Image} and platform-specific image loading + * API, like GdkPixbuf + * + * The path of the file containing the image data to be displayed by + * the texture. + * + * This property is unset when using the {@link Clutter.Texture.set_from_*_data} + * family of functions. + */ + filename: string; + filter_quality: TextureQuality; + keep_aspect_ratio: boolean; + pick_with_alpha: boolean; + readonly pixel_format: Cogl.PixelFormat; + repeat_x: boolean; + repeat_y: boolean; + sync_size: boolean; + readonly tile_waste: number; + /** + * @deprecated + * Use {@link Image} and {@link Clutter.Content.get_preferred_size} + * instead + * + * Gets the size in pixels of the untransformed underlying image + * @returns return location for the width, or %NULL + * + * return location for the height, or %NULL + */ + get_base_size(): [ width: number, height: number ]; + /** + * @deprecated + * No replacement is available; it's not advisable + * to modify the Cogl pipeline of an actor. Use a {@link Content} + * implementation and modify the pipeline during the paint sequence + * + * Returns a handle to the underlying COGL material used for drawing + * the actor. + * @returns a handle for a #CoglMaterial. The + * material is owned by the {@link Texture} and it should not be + * unreferenced + */ + get_cogl_material(): Cogl.Handle; + /** + * @deprecated + * No replacement available; it's not advisable to + * modify the Cogl pipeline of an actor. Use a {@link Content} + * implementation and set up the pipeline during the paint sequence + * instead. + * + * Retrieves the handle to the underlying COGL texture used for drawing + * the actor. No extra reference is taken so if you need to keep the + * handle then you should call {@link Cogl.handle.ref} on it. + * + * The texture handle returned is the first layer of the material + * handle used by the {@link Texture}. If you need to access the other + * layers you should use clutter_texture_get_cogl_material() instead + * and use the #CoglMaterial API. + * @returns a #CoglHandle for the texture. The returned + * handle is owned by the {@link Texture} and it should not be unreferenced + */ + get_cogl_texture(): Cogl.Handle; + /** + * @deprecated + * Use {@link Image} and {@link Clutter.Actor.get_content_scaling_filters} + * instead + * + * Gets the filter quality used when scaling a texture. + * @returns The filter quality value. + */ + get_filter_quality(): TextureQuality; + /** + * @deprecated + * Use {@link Image} and {@link Clutter.Actor.get_content_gravity} + * instead + * + * Retrieves the value set using {@link Clutter.Texture.set_keep_aspect_ratio} + * @returns %TRUE if the {@link Texture} should maintain the + * aspect ratio of the underlying image + */ + get_keep_aspect_ratio(): boolean; + /** + * @deprecated + * There is no direct replacement for this function + * + * Retrieves the value set using {@link Clutter.Texture.set_load_async} + * @returns %TRUE if the {@link Texture} should load the data from + * disk asynchronously + */ + get_load_async(): boolean; + /** + * @deprecated + * There is no direct replacement for this function + * + * Retrieves the value set by {@link Clutter.Texture.set_load_data_async} + * @returns %TRUE if the {@link Texture} should load the image + * data from a file asynchronously + */ + get_load_data_async(): boolean; + /** + * @deprecated + * No replacement is available + * + * Gets the maximum waste that will be used when creating a texture or + * -1 if slicing is disabled. + * @returns The maximum waste or -1 if the texture waste is + * unlimited. + */ + get_max_tile_waste(): number; + /** + * @deprecated + * There is no direct replacement for this function + * + * Retrieves the value set by {@link Clutter.Texture.set_load_data_async} + * @returns %TRUE if the {@link Texture} should define its shape + * using the alpha channel when picking. + */ + get_pick_with_alpha(): boolean; + /** + * @deprecated + * There is no direct replacement for this function + * + * Retrieves the pixel format used by #texture. This is + * equivalent to: + * + * |[ + * handle = clutter_texture_get_pixel_format (texture); + * + * if (handle != COGL_INVALID_HANDLE) + * format = cogl_texture_get_format (handle); + * ]| + * @returns a #CoglPixelFormat value + */ + get_pixel_format(): Cogl.PixelFormat; + /** + * @deprecated + * Use {@link Image} and {@link Clutter.Actor.get_content_repeat} + * instead + * + * Retrieves the horizontal and vertical repeat values set + * using {@link Clutter.Texture.set_repeat} + * @returns return location for the horizontal repeat + * + * return location for the vertical repeat + */ + get_repeat(): [ repeat_x: boolean, repeat_y: boolean ]; + /** + * @deprecated + * There is no direct replacement + * + * Retrieves the value set with {@link Clutter.Texture.set_sync_size} + * @returns %TRUE if the {@link Texture} should have the same + * preferred size of the underlying image data + */ + get_sync_size(): boolean; + /** + * @deprecated + * Use {@link Image} and {@link Clutter.Image.set_area} instead + * + * Updates a sub-region of the pixel data in a {@link Texture}. + * @param data Image data in RGB type colorspace. + * @param has_alpha Set to TRUE if image data has an alpha channel. + * @param x X coordinate of upper left corner of region to update. + * @param y Y coordinate of upper left corner of region to update. + * @param width Width in pixels of region to update. + * @param height Height in pixels of region to update. + * @param rowstride Distance in bytes between row starts on source buffer. + * @param bpp bytes per pixel (Currently only 3 and 4 supported, + * depending on #has_alpha) + * @param flags {@link TextureFlags} + * @returns %TRUE on success, %FALSE on failure. + */ + set_area_from_rgb_data(data: number[], has_alpha: boolean, x: number, y: number, width: number, height: number, rowstride: number, bpp: number, flags: TextureFlags): boolean; + /** + * @deprecated + * No replacement is available; it's not advisable + * to modify the Cogl pipeline of an actor. Use a {@link Content} + * implementation and modify the pipeline during the paint sequence + * + * Replaces the underlying Cogl material drawn by this actor with + * #cogl_material. A reference to the material is taken so if the + * handle is no longer needed it should be deref'd with + * cogl_handle_unref. Texture data is attached to the material so + * calling this function also replaces the Cogl + * texture. {@link Texture} requires that the material have a texture + * layer so you should set one on the material before calling this + * function. + * @param cogl_material A CoglHandle for a material + */ + set_cogl_material(cogl_material: Cogl.Handle): void; + /** + * @deprecated + * No replacement available; it's not advisable to + * modify the Cogl pipeline of an actor. Use a {@link Content} + * implementation and set up the pipeline during the paint sequence + * instead. + * + * Replaces the underlying COGL texture drawn by this actor with + * #cogl_tex. A reference to the texture is taken so if the handle is + * no longer needed it should be deref'd with cogl_handle_unref. + * @param cogl_tex A CoglHandle for a texture + */ + set_cogl_texture(cogl_tex: Cogl.Handle): void; + /** + * @deprecated + * Use {@link Image} and {@link Clutter.Actor.set_content_scaling_filters} + * instead + * + * Sets the filter quality when scaling a texture. The quality is an + * enumeration currently the following values are supported: + * %CLUTTER_TEXTURE_QUALITY_LOW which is fast but only uses nearest neighbour + * interpolation. %CLUTTER_TEXTURE_QUALITY_MEDIUM which is computationally a + * bit more expensive (bilinear interpolation), and + * %CLUTTER_TEXTURE_QUALITY_HIGH which uses extra texture memory resources to + * improve scaled down rendering as well (by using mipmaps). The default value + * is %CLUTTER_TEXTURE_QUALITY_MEDIUM. + * @param filter_quality new filter quality value + */ + set_filter_quality(filter_quality: TextureQuality): void; + /** + * @deprecated + * Use {@link Image} and platform-specific image + * loading API, like GdkPixbuf, instead + * + * Sets the {@link Texture} image data from an image file. In case of + * failure, %FALSE is returned and #error is set. + * + * If #ClutterTexture:load-async is set to %TRUE, this function + * will return as soon as possible, and the actual image loading + * from disk will be performed asynchronously. #ClutterTexture::size-change + * will be emitten when the size of the texture is available and + * #ClutterTexture::load-finished will be emitted when the image has been + * loaded or if an error occurred. + * @param filename The filename of the image in GLib file name encoding + * @returns %TRUE if the image was successfully loaded and set + */ + set_from_file(filename: string): boolean; + /** + * @deprecated + * Use {@link Image} and {@link Clutter.Image.set_data} instead + * + * Sets {@link Texture} image data. + * @param data image data in RGBA type colorspace. + * @param has_alpha set to %TRUE if image data has an alpha channel. + * @param width width in pixels of image data. + * @param height height in pixels of image data + * @param rowstride distance in bytes between row starts. + * @param bpp bytes per pixel (currently only 3 and 4 supported, depending + * on the value of #has_alpha) + * @param flags {@link TextureFlags} + * @returns %TRUE on success, %FALSE on failure. + */ + set_from_rgb_data(data: number[], has_alpha: boolean, width: number, height: number, rowstride: number, bpp: number, flags: TextureFlags): boolean; + /** + * @deprecated + * Use a custom {@link Content} implementation and + * set up the Cogl pipeline using a #ClutterPipelineNode with a + * fragment shader instead. + * + * Sets a {@link Texture} from YUV image data. If an error occurred, + * %FALSE is returned and #error is set. + * + * The YUV support depends on the driver; the format supported by the + * few drivers exposing this capability are not really useful. + * + * The proper way to convert image data in any YUV colorspace to any + * RGB colorspace is to use a fragment shader associated with the + * #ClutterTexture material. + * @param data Image data in YUV type colorspace. + * @param width Width in pixels of image data. + * @param height Height in pixels of image data + * @param flags {@link TextureFlags} + * @returns %TRUE if the texture was successfully updated + */ + set_from_yuv_data(data: number[], width: number, height: number, flags: TextureFlags): boolean; + /** + * @deprecated + * Use {@link Image} and {@link Clutter.Actor.set_content_gravity} + * with %CLUTTER_CONTENT_GRAVITY_RESIZE_ASPECT instead + * + * Sets whether #texture should have a preferred size maintaining + * the aspect ratio of the underlying image + * @param keep_aspect %TRUE to maintain aspect ratio + */ + set_keep_aspect_ratio(keep_aspect: boolean): void; + /** + * @deprecated + * There is no direct replacement for this function. + * Use {@link Image} and platform-specific API for loading image data + * asynchronously, like GdkPixbuf + * + * Sets whether #texture should use a worker thread to load the data + * from disk asynchronously. Setting #load_async to %TRUE will make + * {@link Clutter.Texture.set_from_file} return immediately. + * + * See the {@link Texture.load_async} property documentation, and + * clutter_texture_set_load_data_async(). + * @param load_async %TRUE if the texture should asynchronously load data + * from a filename + */ + set_load_async(load_async: boolean): void; + /** + * @deprecated + * There is no direct replacement for this function. + * Use {@link Image} and platform-specific API for loading image data + * asynchronously, like GdkPixbuf + * + * Sets whether #texture should use a worker thread to load the data + * from disk asynchronously. Setting #load_async to %TRUE will make + * {@link Clutter.Texture.set_from_file} block until the {@link Texture} has + * determined the width and height of the image data. + * + * See the #ClutterTexture:load-async property documentation, and + * clutter_texture_set_load_async(). + * @param load_async %TRUE if the texture should asynchronously load data + * from a filename + */ + set_load_data_async(load_async: boolean): void; + /** + * @deprecated + * There is no direct replacement for this function + * + * Sets whether #texture should have it's shape defined by the alpha + * channel when picking. + * + * Be aware that this is a bit more costly than the default picking + * due to the texture lookup, extra test against the alpha value and + * the fact that it will also interrupt the batching of geometry done + * internally. + * + * Also there is currently no control over the threshold used to + * determine what value of alpha is considered pickable, and so only + * fully opaque parts of the texture will react to picking. + * @param pick_with_alpha %TRUE if the alpha channel should affect the + * picking shape + */ + set_pick_with_alpha(pick_with_alpha: boolean): void; + /** + * @deprecated + * Use {@link Image} and {@link Clutter.Actor.set_content_repeat} + * instead + * + * Sets whether the #texture should repeat horizontally or + * vertically when the actor size is bigger than the image size + * @param repeat_x %TRUE if the texture should repeat horizontally + * @param repeat_y %TRUE if the texture should repeat vertically + */ + set_repeat(repeat_x: boolean, repeat_y: boolean): void; + /** + * @deprecated + * No replacement is available. A {@link Actor} using + * #ClutterImage with a %CLUTTER_REQUEST_CONTENT_SIZE request mode + * will automatically bind the preferred size of the content to the + * preferred size of the actor + * + * Sets whether #texture should have the same preferred size as the + * underlying image data. + * @param sync_size %TRUE if the texture should have the same size of the + * underlying image data + */ + set_sync_size(sync_size: boolean): void; + /** + * The ::load-finished signal is emitted when a texture load has + * completed. If there was an error during loading, #error will + * be set, otherwise it will be %NULL + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - error: A set error, or %NULL + * + * @returns Callback ID + */ + connect(signal: "load-finished", callback: (owner: this, error: GLib.Error) => void): number; + /** + * The ::pixbuf-change signal is emitted each time the pixbuf + * used by #texture changes. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "pixbuf-change", callback: (owner: this) => void): number; + /** + * The ::size-change signal is emitted each time the size of the + * pixbuf used by #texture changes. The new size is given as + * argument to the callback. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - width: the width of the new texture + * - height: the height of the new texture + * + * @returns Callback ID + */ + connect(signal: "size-change", callback: (owner: this, width: number, height: number) => void): number; + + connect(signal: "notify::cogl-material", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::cogl-texture", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::disable-slicing", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::filename", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::filter-quality", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::keep-aspect-ratio", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::pick-with-alpha", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::pixel-format", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::repeat-x", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::repeat-y", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::sync-size", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::tile-waste", callback: (owner: this, ...args: any) => void): number; + + } + + type TextureInitOptionsMixin = ActorInitOptions & Atk.ImplementorIfaceInitOptions & AnimatableInitOptions & ContainerInitOptions & ScriptableInitOptions & + Pick; + + export interface TextureInitOptions extends TextureInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Texture} instead. + */ + type TextureMixin = ITexture & Actor & Atk.ImplementorIface & Animatable & Container & Scriptable; + + /** + * The {@link Texture} structure contains only private data + * and should be accessed using the provided API + */ + interface Texture extends TextureMixin {} + + class Texture { + public constructor(options?: Partial); + /** + * @deprecated + * Use {@link Image} instead + * + * Creates a new empty {@link Texture} object. + * @returns A newly created {@link Texture} object. + */ + public static new(): Actor; + /** + * @deprecated + * Use the {@link OffscreenEffect} and #ClutterShaderEffect + * directly on the intended #ClutterActor to replace the functionality of + * this function. + * + * Creates a new {@link Texture} object with its source a prexisting + * actor (and associated children). The textures content will contain + * 'live' redirected output of the actors scene. + * + * Note this function is intented as a utility call for uniformly applying + * shaders to groups and other potential visual effects. It requires that + * the %CLUTTER_FEATURE_OFFSCREEN feature is supported by the current backend + * and the target system. + * + * Some tips on usage: + * + * - The source actor must be visible + * - The source actor must have a parent in order for it to be + * allocated a size from the layouting mechanism. If the source + * actor does not have a parent when this function is called then + * the ClutterTexture will adopt it and allocate it at its + * preferred size. Using this you can clone an actor that is + * otherwise not displayed. Because of this feature if you do + * intend to display the source actor then you must make sure that + * the actor is parented before calling + * {@link Clutter.Texture.new_from_actor} or that you unparent it before + * adding it to a container. + * - When getting the image for the clone texture, Clutter + * will attempt to render the source actor exactly as it would + * appear if it was rendered on screen. The source actor's parent + * transformations are taken into account. Therefore if your + * source actor is rotated along the X or Y axes so that it has + * some depth, the texture will appear differently depending on + * the on-screen location of the source actor. While painting the + * source actor, Clutter will set up a temporary asymmetric + * perspective matrix as the projection matrix so that the source + * actor will be projected as if a small section of the screen was + * being viewed. Before version 0.8.2, an orthogonal identity + * projection was used which meant that the source actor would be + * clipped if any part of it was not on the zero Z-plane. + * - Avoid reparenting the source with the created texture. + * - A group can be padded with a transparent rectangle as to + * provide a border to contents for shader output (blurring text + * for example). + * - The texture will automatically resize to contain a further + * transformed source. However, this involves overhead and can be + * avoided by placing the source actor in a bounding group + * sized large enough to contain any child tranformations. + * - Uploading pixel data to the texture (e.g by using + * clutter_texture_set_from_file()) will destroy the offscreen texture + * data and end redirection. + * - cogl_texture_get_data() with the handle returned by + * clutter_texture_get_cogl_texture() can be used to read the + * offscreen texture pixels into a pixbuf. + * @param actor A source {@link Actor} + * @returns A newly created {@link Texture} object, or %NULL on failure. + */ + public static new_from_actor(actor: Actor): Actor; + /** + * @deprecated + * No direct replacement is available. Use {@link Image} + * and platform-specific image loading API, like GdkPixbuf, instead + * + * Creates a new ClutterTexture actor to display the image contained a + * file. If the image failed to load then NULL is returned and #error + * is set. + * @param filename The name of an image file to load. + * @returns A newly created {@link Texture} object or NULL on + * error. + */ + public static new_from_file(filename: string): Actor; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link TextureNode} instead. + */ + interface ITextureNode { + + } + + type TextureNodeInitOptionsMixin = PipelineNodeInitOptions + export interface TextureNodeInitOptions extends TextureNodeInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link TextureNode} instead. + */ + type TextureNodeMixin = ITextureNode & PipelineNode; + + /** + * The {@link TextNode} structure is an opaque + * type whose members cannot be directly accessed. + */ + interface TextureNode extends TextureNodeMixin {} + + class TextureNode { + public constructor(options?: Partial); + /** + * Creates a new {@link PaintNode} that will paint the passed #texture. + * + * This function will take a reference on #texture, so it is safe to + * call {@link Cogl.object_unref} on #texture when it returns. + * + * The #color must not be pre-multiplied with its #ClutterColor.alpha + * channel value; if #color is %NULL, a fully opaque white color will + * be used for blending. + * @param texture a #CoglTexture + * @param color a {@link Color} used for blending, or %NULL + * @param min_filter the minification filter for the texture + * @param mag_filter the magnification filter for the texture + * @returns the newly created {@link PaintNode}. + * Use {@link Clutter.PaintNode.unref} when done + */ + public static new(texture: Cogl.Texture, color: Color | null, min_filter: ScalingFilter, mag_filter: ScalingFilter): PaintNode; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Timeline} instead. + */ + interface ITimeline { + /** + * If the direction of the timeline should be automatically reversed + * when reaching the end. + */ + auto_reverse: boolean; + /** + * A delay, in milliseconds, that should be observed by the + * timeline before actually starting. + */ + delay: number; + /** + * The direction of the timeline, either %CLUTTER_TIMELINE_FORWARD or + * %CLUTTER_TIMELINE_BACKWARD. + */ + direction: TimelineDirection; + /** + * Duration of the timeline in milliseconds, depending on the + * ClutterTimeline:fps value. + */ + duration: number; + /** + * @deprecated + * Use the {@link Timeline.repeat_count} property instead. + * + * Whether the timeline should automatically rewind and restart. + * + * As a side effect, setting this property to %TRUE will set the + * {@link Timeline.repeat_count} property to -1, while setting this + * property to %FALSE will set the #ClutterTimeline:repeat-count + * property to 0. + */ + loop: boolean; + /** + * Controls the way a {@link Timeline} computes the normalized progress. + */ + progress_mode: AnimationMode; + /** + * Defines how many times the timeline should repeat. + * + * If the repeat count is 0, the timeline does not repeat. + * + * If the repeat count is set to -1, the timeline will repeat until it is + * stopped. + */ + repeat_count: number; + /** + * Adds a named marker that will be hit when the timeline has reached + * the specified #progress. + * + * Markers are unique string identifiers for a given position on the + * timeline. Once #timeline reaches the given #progress of its duration, + * if will emit a ::marker-reached signal for each marker attached to + * that particular point. + * + * A marker can be removed with {@link Clutter.Timeline.remove_marker}. The + * timeline can be advanced to a marker using + * clutter_timeline_advance_to_marker(). + * + * See also: clutter_timeline_add_marker_at_time() + * @param marker_name the unique name for this marker + * @param progress the normalized value of the position of the martke + */ + add_marker(marker_name: string, progress: number): void; + /** + * Adds a named marker that will be hit when the timeline has been + * running for #msecs milliseconds. + * + * Markers are unique string identifiers for a given position on the + * timeline. Once #timeline reaches the given #msecs, it will emit + * a ::marker-reached signal for each marker attached to that position. + * + * A marker can be removed with {@link Clutter.Timeline.remove_marker}. The + * timeline can be advanced to a marker using + * clutter_timeline_advance_to_marker(). + * + * See also: clutter_timeline_add_marker() + * @param marker_name the unique name for this marker + * @param msecs position of the marker in milliseconds + */ + add_marker_at_time(marker_name: string, msecs: number): void; + /** + * Advance timeline to the requested point. The point is given as a + * time in milliseconds since the timeline started. + * + * The #timeline will not emit the {@link Timeline.new_frame} + * signal for the given time. The first ::new-frame signal after the call to + * {@link Clutter.Timeline.advance} will be emit the skipped markers. + * @param msecs Time to advance to + */ + advance(msecs: number): void; + /** + * Advances #timeline to the time of the given #marker_name. + * + * Like {@link Clutter.Timeline.advance}, this function will not + * emit the {@link Timeline.new_frame} for the time where #marker_name + * is set, nor it will emit #ClutterTimeline::marker-reached for + * #marker_name. + * @param marker_name the name of the marker + */ + advance_to_marker(marker_name: string): void; + /** + * @deprecated + * Use {@link Clutter.Timeline.new} or g_object_new() + * instead + * + * Create a new {@link Timeline} instance which has property values + * matching that of supplied timeline. The cloned timeline will not + * be started and will not be positioned to the current position of + * the original #timeline: you will have to start it with + * {@link Clutter.Timeline.start}. + * + * The only cloned properties are: + * + * - #ClutterTimeline:duration + * - #ClutterTimeline:loop + * - #ClutterTimeline:delay + * - #ClutterTimeline:direction + * @returns a new {@link Timeline}, cloned + * from #timeline + */ + clone(): Timeline; + /** + * Retrieves the value set by {@link Clutter.Timeline.set_auto_reverse}. + * @returns %TRUE if the timeline should automatically reverse, and + * %FALSE otherwise + */ + get_auto_reverse(): boolean; + /** + * Retrieves the control points for the cubic bezier progress mode. + * @returns %TRUE if the #timeline is using a cubic bezier progress + * more, and %FALSE otherwise + * + * return location for the first control + * point of the cubic bezier, or %NULL + * + * return location for the second control + * point of the cubic bezier, or %NULL + */ + get_cubic_bezier_progress(): [ boolean, Point, Point ]; + /** + * Retrieves the current repeat for a timeline. + * + * Repeats start at 0. + * @returns the current repeat + */ + get_current_repeat(): number; + /** + * Retrieves the delay set using {@link Clutter.Timeline.set_delay}. + * @returns the delay in milliseconds. + */ + get_delay(): number; + /** + * Retrieves the amount of time elapsed since the last + * ClutterTimeline::new-frame signal. + * + * This function is only useful inside handlers for the ::new-frame + * signal, and its behaviour is undefined if the timeline is not + * playing. + * @returns the amount of time in milliseconds elapsed since the + * last frame + */ + get_delta(): number; + /** + * Retrieves the direction of the timeline set with + * {@link Clutter.Timeline.set_direction}. + * @returns the direction of the timeline + */ + get_direction(): TimelineDirection; + /** + * Retrieves the duration of a {@link Timeline} in milliseconds. + * See {@link Clutter.Timeline.set_duration}. + * @returns the duration of the timeline, in milliseconds. + */ + get_duration(): number; + /** + * Retrieves the full duration of the #timeline, taking into account the + * current value of the {@link Timeline.repeat_count} property. + * + * If the #ClutterTimeline:repeat-count property is set to -1, this function + * will return %G_MAXINT64. + * + * The returned value is to be considered a hint, and it's only valid + * as long as the #timeline hasn't been changed. + * @returns the full duration of the {@link Timeline} + */ + get_duration_hint(): number; + /** + * Request the current time position of the timeline. + * @returns current elapsed time in milliseconds. + */ + get_elapsed_time(): number; + /** + * @deprecated + * Use {@link Clutter.Timeline.get_repeat_count} instead. + * + * Gets whether #timeline is looping + * @returns %TRUE if the timeline is looping + */ + get_loop(): boolean; + /** + * The position of the timeline in a normalized [-1, 2] interval. + * + * The return value of this function is determined by the progress + * mode set using {@link Clutter.Timeline.set_progress_mode}, or by the + * progress function set using clutter_timeline_set_progress_func(). + * @returns the normalized current position in the timeline. + */ + get_progress(): number; + /** + * Retrieves the progress mode set using {@link Clutter.Timeline.set_progress_mode} + * or clutter_timeline_set_progress_func(). + * @returns a {@link AnimationMode} + */ + get_progress_mode(): AnimationMode; + /** + * Retrieves the number set using {@link Clutter.Timeline.set_repeat_count}. + * @returns the number of repeats + */ + get_repeat_count(): number; + /** + * Retrieves the parameters of the step progress mode used by #timeline. + * @returns %TRUE if the #timeline is using a step progress + * mode, and %FALSE otherwise + * + * return location for the number of steps, or %NULL + * + * return location for the value change policy, + * or %NULL + */ + get_step_progress(): [ boolean, number, StepMode ]; + /** + * Checks whether #timeline has a marker set with the given name. + * @param marker_name the name of the marker + * @returns %TRUE if the marker was found + */ + has_marker(marker_name: string): boolean; + /** + * Queries state of a {@link Timeline}. + * @returns %TRUE if timeline is currently playing + */ + is_playing(): boolean; + /** + * Retrieves the list of markers at time #msecs. If #msecs is a + * negative integer, all the markers attached to #timeline will be + * returned. + * @param msecs the time to check, or -1 + * @returns + * a newly allocated, %NULL terminated string array containing the names + * of the markers. Use {@link GObject.strfreev} when done. + * + * the number of markers returned + */ + list_markers(msecs: number): [ string[], number ]; + /** + * Pauses the {@link Timeline} on current frame + */ + pause(): void; + /** + * Removes #marker_name, if found, from #timeline. + * @param marker_name the name of the marker to remove + */ + remove_marker(marker_name: string): void; + /** + * Rewinds {@link Timeline} to the first frame if its direction is + * %CLUTTER_TIMELINE_FORWARD and the last frame if it is + * %CLUTTER_TIMELINE_BACKWARD. + */ + rewind(): void; + /** + * Sets whether #timeline should reverse the direction after the + * emission of the {@link Timeline.completed} signal. + * + * Setting the #ClutterTimeline:auto-reverse property to %TRUE is the + * equivalent of connecting a callback to the #ClutterTimeline::completed + * signal and changing the direction of the timeline from that callback; + * for instance, this code: + * + * |[ + * static void + * reverse_timeline (ClutterTimeline *timeline) + * { + * ClutterTimelineDirection dir = clutter_timeline_get_direction (timeline); + * + * if (dir == CLUTTER_TIMELINE_FORWARD) + * dir = CLUTTER_TIMELINE_BACKWARD; + * else + * dir = CLUTTER_TIMELINE_FORWARD; + * + * clutter_timeline_set_direction (timeline, dir); + * } + * ... + * timeline = clutter_timeline_new (1000); + * clutter_timeline_set_repeat_count (timeline, -1); + * g_signal_connect (timeline, "completed", + * G_CALLBACK (reverse_timeline), + * NULL); + * ]| + * + * can be effectively replaced by: + * + * |[ + * timeline = clutter_timeline_new (1000); + * clutter_timeline_set_repeat_count (timeline, -1); + * clutter_timeline_set_auto_reverse (timeline); + * ]| + * @param reverse %TRUE if the #timeline should reverse the direction + */ + set_auto_reverse(reverse: boolean): void; + /** + * Sets the {@link Timeline.progress_mode} of #timeline + * to %CLUTTER_CUBIC_BEZIER, and sets the two control + * points for the cubic bezier. + * + * The cubic bezier curve is between (0, 0) and (1, 1). The X coordinate + * of the two control points must be in the [ 0, 1 ] range, while the + * Y coordinate of the two control points can exceed this range. + * @param c_1 the first control point for the cubic bezier + * @param c_2 the second control point for the cubic bezier + */ + set_cubic_bezier_progress(c_1: Point, c_2: Point): void; + /** + * Sets the delay, in milliseconds, before #timeline should start. + * @param msecs delay in milliseconds + */ + set_delay(msecs: number): void; + /** + * Sets the direction of #timeline, either %CLUTTER_TIMELINE_FORWARD or + * %CLUTTER_TIMELINE_BACKWARD. + * @param direction the direction of the timeline + */ + set_direction(direction: TimelineDirection): void; + /** + * Sets the duration of the timeline, in milliseconds. The speed + * of the timeline depends on the ClutterTimeline:fps setting. + * @param msecs duration of the timeline in milliseconds + */ + set_duration(msecs: number): void; + /** + * @deprecated + * Use {@link Clutter.Timeline.set_repeat_count} instead. + * + * Sets whether #timeline should loop. + * + * This function is equivalent to calling {@link Clutter.Timeline.set_repeat_count} + * with -1 if #loop is %TRUE, and with 0 if #loop is %FALSE. + * @param loop %TRUE for enable looping + */ + set_loop(loop: boolean): void; + /** + * Sets a custom progress function for #timeline. The progress function will + * be called by {@link Clutter.Timeline.get_progress} and will be used to compute + * the progress value based on the elapsed time and the total duration of the + * timeline. + * + * If #func is not %NULL, the {@link Timeline.progress_mode} property will + * be set to %CLUTTER_CUSTOM_MODE. + * + * If #func is %NULL, any previously set progress function will be unset, and + * the #ClutterTimeline:progress-mode property will be set to %CLUTTER_LINEAR. + * @param func a progress function, or %NULL + * @param data data to pass to #func + * @param notify a function to be called when the progress function is removed + * or the timeline is disposed + */ + set_progress_func(func: TimelineProgressFunc | null, data: any | null, notify: GLib.DestroyNotify): void; + /** + * Sets the progress function using a value from the {@link AnimationMode} + * enumeration. The #mode cannot be %CLUTTER_CUSTOM_MODE or bigger than + * %CLUTTER_ANIMATION_LAST. + * @param mode the progress mode, as a {@link AnimationMode} + */ + set_progress_mode(mode: AnimationMode): void; + /** + * Sets the number of times the #timeline should repeat. + * + * If #count is 0, the timeline never repeats. + * + * If #count is -1, the timeline will always repeat until + * it's stopped. + * @param count the number of times the timeline should repeat + */ + set_repeat_count(count: number): void; + /** + * Sets the {@link Timeline.progress_mode} of the #timeline to %CLUTTER_STEPS + * and provides the parameters of the step function. + * @param n_steps the number of steps + * @param step_mode whether the change should happen at the start + * or at the end of the step + */ + set_step_progress(n_steps: number, step_mode: StepMode): void; + /** + * Advance timeline by the requested time in milliseconds + * @param msecs Amount of time to skip + */ + skip(msecs: number): void; + /** + * Starts the {@link Timeline} playing. + */ + start(): void; + /** + * Stops the {@link Timeline} and moves to frame 0 + */ + stop(): void; + /** + * The {@link Timeline.completed} signal is emitted when the timeline's + * elapsed time reaches the value of the #ClutterTimeline:duration + * property. + * + * This signal will be emitted even if the #ClutterTimeline is set to be + * repeating. + * + * If you want to get notification on whether the #ClutterTimeline has + * been stopped or has finished its run, including its eventual repeats, + * you should use the #ClutterTimeline::stopped signal instead. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "completed", callback: (owner: this) => void): number; + /** + * The ::marker-reached signal is emitted each time a timeline + * reaches a marker set with + * {@link Clutter.Timeline.add_marker_at_time}. This signal is detailed + * with the name of the marker as well, so it is possible to connect + * a callback to the ::marker-reached signal for a specific marker + * with: + * + * + * clutter_timeline_add_marker_at_time (timeline, "foo", 500); + * clutter_timeline_add_marker_at_time (timeline, "bar", 750); + * + * g_signal_connect (timeline, "marker-reached", + * G_CALLBACK (each_marker_reached), NULL); + * g_signal_connect (timeline, "marker-reached::foo", + * G_CALLBACK (foo_marker_reached), NULL); + * g_signal_connect (timeline, "marker-reached::bar", + * G_CALLBACK (bar_marker_reached), NULL); + * + * + * In the example, the first callback will be invoked for both + * the "foo" and "bar" marker, while the second and third callbacks + * will be invoked for the "foo" or "bar" markers, respectively. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - marker_name: the name of the marker reached + * - msecs: the elapsed time + * + * @returns Callback ID + */ + connect(signal: "marker-reached", callback: (owner: this, marker_name: string, msecs: number) => void): number; + /** + * The ::new-frame signal is emitted for each timeline running + * timeline before a new frame is drawn to give animations a chance + * to update the scene. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - msecs: the elapsed time between 0 and duration + * + * @returns Callback ID + */ + connect(signal: "new-frame", callback: (owner: this, msecs: number) => void): number; + /** + * The ::paused signal is emitted when {@link Clutter.Timeline.pause} is invoked. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "paused", callback: (owner: this) => void): number; + /** + * The ::started signal is emitted when the timeline starts its run. + * This might be as soon as {@link Clutter.Timeline.start} is invoked or + * after the delay set in the ClutterTimeline:delay property has + * expired. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "started", callback: (owner: this) => void): number; + /** + * The {@link Timeline.stopped} signal is emitted when the timeline + * has been stopped, either because {@link Clutter.Timeline.stop} has been + * called, or because it has been exhausted. + * + * This is different from the #ClutterTimeline::completed signal, + * which gets emitted after every repeat finishes. + * + * If the #ClutterTimeline has is marked as infinitely repeating, + * this signal will never be emitted. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - is_finished: %TRUE if the signal was emitted at the end of the + * timeline. + * + * @returns Callback ID + */ + connect(signal: "stopped", callback: (owner: this, is_finished: boolean) => void): number; + + connect(signal: "notify::auto-reverse", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::delay", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::direction", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::duration", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::loop", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::progress-mode", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::repeat-count", callback: (owner: this, ...args: any) => void): number; + + } + + type TimelineInitOptionsMixin = GObject.ObjectInitOptions & ScriptableInitOptions & + Pick; + + export interface TimelineInitOptions extends TimelineInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Timeline} instead. + */ + type TimelineMixin = ITimeline & GObject.Object & Scriptable; + + /** + * The {@link Timeline} structure contains only private data + * and should be accessed using the provided API + */ + interface Timeline extends TimelineMixin {} + + class Timeline { + public constructor(options?: Partial); + /** + * Creates a new {@link Timeline} with a duration of #msecs. + * @param msecs Duration of the timeline in milliseconds + * @returns the newly created {@link Timeline} instance. Use + * {@link GObject.Object.unref} when done using it + */ + public static new(msecs: number): Timeline; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Transition} instead. + */ + interface ITransition { + /** + * The {@link Animatable} instance currently being animated. + */ + animatable: Animatable; + /** + * The {@link Interval} used to describe the initial and final states + * of the transition. + */ + interval: Interval; + /** + * Whether the {@link Transition} should be automatically detached + * from the #ClutterTransition:animatable instance whenever the + * #ClutterTimeline::stopped signal is emitted. + * + * The #ClutterTransition:remove-on-complete property takes into + * account the value of the #ClutterTimeline:repeat-count property, + * and it only detaches the transition if the transition is not + * repeating. + */ + remove_on_complete: boolean; + /** + * Retrieves the {@link Animatable} set using {@link Clutter.Transition.set_animatable}. + * @returns a {@link Animatable}, or %NULL; the returned + * animatable is owned by the #ClutterTransition, and it should not be freed + * directly. + */ + get_animatable(): Animatable; + /** + * Retrieves the interval set using {@link Clutter.Transition.set_interval} + * @returns a {@link Interval}, or %NULL; the returned + * interval is owned by the #ClutterTransition and it should not be freed + * directly + */ + get_interval(): Interval; + /** + * Retrieves the value of the {@link Transition.remove_on_complete} property. + * @returns %TRUE if the #transition should be detached when complete, + * and %FALSE otherwise + */ + get_remove_on_complete(): boolean; + /** + * Sets the {@link Transition.animatable} property. + * + * The #transition will acquire a reference to the #animatable instance, + * and will call the #ClutterTransitionClass.attached() virtual function. + * + * If an existing #ClutterAnimatable is attached to #transition, the + * reference will be released, and the #ClutterTransitionClass.detached() + * virtual function will be called. + * @param animatable a {@link Animatable}, or %NULL + */ + set_animatable(animatable: Animatable | null): void; + /** + * Sets the initial value of the transition. + * + * This is a convenience function that will either create the + * {@link Interval} used by #transition, or will update it if + * the #ClutterTransition:interval is already set. + * + * If #transition already has a #ClutterTransition:interval set, + * then #value must hold the same type, or a transformable type, + * as the interval's #ClutterInterval:value-type property. + * + * This is a convenience function for the C API; language bindings + * should use {@link Clutter.Transition.set_from_value} instead. + * @param value_type the type of the value to set + */ + set_from(value_type: GObject.Type): void; + /** + * Sets the initial value of the transition. + * + * This is a convenience function that will either create the + * {@link Interval} used by #transition, or will update it if + * the #ClutterTransition:interval is already set. + * + * This function will copy the contents of #value, so it is + * safe to call {@link GObject.Value.unset} after it returns. + * + * If #transition already has a #ClutterTransition:interval set, + * then #value must hold the same type, or a transformable type, + * as the interval's #ClutterInterval:value-type property. + * + * This function is meant to be used by language bindings. + * @param value a #GValue with the initial value of the transition + */ + set_from_value(value: GObject.Value): void; + /** + * Sets the {@link Transition.interval} property using #interval. + * + * The #transition will acquire a reference on the #interval, sinking + * the floating flag on it if necessary. + * @param interval a {@link Interval}, or %NULL + */ + set_interval(interval: Interval | null): void; + /** + * Sets whether #transition should be detached from the {@link Animatable} + * set using {@link Clutter.Transition.set_animatable} when the + * #ClutterTimeline::completed signal is emitted. + * @param remove_complete whether to detach #transition when complete + */ + set_remove_on_complete(remove_complete: boolean): void; + /** + * Sets the final value of the transition. + * + * This is a convenience function that will either create the + * {@link Interval} used by #transition, or will update it if + * the #ClutterTransition:interval is already set. + * + * If #transition already has a #ClutterTransition:interval set, + * then #value must hold the same type, or a transformable type, + * as the interval's #ClutterInterval:value-type property. + * + * This is a convenience function for the C API; language bindings + * should use {@link Clutter.Transition.set_to_value} instead. + * @param value_type the type of the value to set + */ + set_to(value_type: GObject.Type): void; + /** + * Sets the final value of the transition. + * + * This is a convenience function that will either create the + * {@link Interval} used by #transition, or will update it if + * the #ClutterTransition:interval is already set. + * + * This function will copy the contents of #value, so it is + * safe to call {@link GObject.Value.unset} after it returns. + * + * If #transition already has a #ClutterTransition:interval set, + * then #value must hold the same type, or a transformable type, + * as the interval's #ClutterInterval:value-type property. + * + * This function is meant to be used by language bindings. + * @param value a #GValue with the final value of the transition + */ + set_to_value(value: GObject.Value): void; + connect(signal: "notify::animatable", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::interval", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::remove-on-complete", callback: (owner: this, ...args: any) => void): number; + + } + + type TransitionInitOptionsMixin = TimelineInitOptions & ScriptableInitOptions & + Pick; + + export interface TransitionInitOptions extends TransitionInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Transition} instead. + */ + type TransitionMixin = ITransition & Timeline & Scriptable; + + /** + * The {@link Transition} structure contains private + * data and should only be accessed using the provided API. + */ + interface Transition extends TransitionMixin {} + + class Transition { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link TransitionGroup} instead. + */ + interface ITransitionGroup { + /** + * Adds #transition to #group. + * + * This function acquires a reference on #transition that will be released + * when calling {@link Clutter.TransitionGroup.remove_transition}. + * @param transition a {@link Transition} + */ + add_transition(transition: Transition): void; + /** + * Removes all transitions from #group. + * + * This function releases the reference acquired when calling + * {@link Clutter.TransitionGroup.add_transition}. + */ + remove_all(): void; + /** + * Removes #transition from #group. + * + * This function releases the reference acquired on #transition when + * calling {@link Clutter.TransitionGroup.add_transition}. + * @param transition a {@link Transition} + */ + remove_transition(transition: Transition): void; + } + + type TransitionGroupInitOptionsMixin = TransitionInitOptions & ScriptableInitOptions + export interface TransitionGroupInitOptions extends TransitionGroupInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link TransitionGroup} instead. + */ + type TransitionGroupMixin = ITransitionGroup & Transition & Scriptable; + + /** + * The {@link TransitionGroup} structure contains + * private data and should only be accessed using the provided API. + */ + interface TransitionGroup extends TransitionGroupMixin {} + + class TransitionGroup { + public constructor(options?: Partial); + /** + * Creates a new {@link TransitionGroup} instance. + * @returns the newly created {@link TransitionGroup}. Use + * {@link GObject.Object.unref} when done to deallocate the resources it + * uses + */ + public static new(): Transition; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link ZoomAction} instead. + */ + interface IZoomAction { + /** + * Constraints the zooming action to the specified axis + */ + zoom_axis: ZoomAxis; + /** + * Retrieves the focal point of the current zoom + * @returns a {@link Point} + */ + get_focal_point(): Point; + /** + * Retrieves the focal point relative to the actor's coordinates of + * the current zoom + * @returns a {@link Point} + */ + get_transformed_focal_point(): Point; + /** + * Retrieves the axis constraint set by {@link Clutter.ZoomAction.set_zoom_axis} + * @returns the axis constraint + */ + get_zoom_axis(): ZoomAxis; + /** + * Restricts the zooming action to a specific axis + * @param axis the axis to constraint the zooming to + */ + set_zoom_axis(axis: ZoomAxis): void; + /** + * The ::zoom signal is emitted for each series of touch events that + * change the distance and focal point between the touch points. + * + * The default handler of the signal will call + * {@link Clutter.Actor.set_scale} on #actor using the ratio of the first + * distance between the touch points and the current distance. To + * override the default behaviour, connect to this signal and return + * %FALSE. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the {@link Actor} attached to the action + * - focal_point: the focal point of the zoom + * - factor: the initial distance between the 2 touch points + * - returns %TRUE if the zoom should continue, and %FALSE if + * the zoom should be cancelled. + * + * @returns Callback ID + */ + connect(signal: "zoom", callback: (owner: this, actor: Actor, focal_point: Point, factor: number) => boolean): number; + + connect(signal: "notify::zoom-axis", callback: (owner: this, ...args: any) => void): number; + + } + + type ZoomActionInitOptionsMixin = GestureActionInitOptions & + Pick; + + export interface ZoomActionInitOptions extends ZoomActionInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link ZoomAction} instead. + */ + type ZoomActionMixin = IZoomAction & GestureAction; + + /** + * The {@link ZoomAction} structure contains only + * private data and should be accessed using the provided API + */ + interface ZoomAction extends ZoomActionMixin {} + + class ZoomAction { + public constructor(options?: Partial); + /** + * Creates a new {@link ZoomAction} instance + * @returns the newly created {@link ZoomAction} + */ + public static new(): Action; + } + + export interface ActorBoxInitOptions {} + /** + * Bounding box of an actor. The coordinates of the top left and right bottom + * corners of an actor. The coordinates of the two points are expressed in + * pixels with sub-pixel precision + */ + interface ActorBox {} + class ActorBox { + public constructor(options?: Partial); + /** + * Allocates a new {@link ActorBox} using the passed coordinates + * for the top left and bottom right points. + * + * This function is the logical equivalent of: + * + * |[ + * clutter_actor_box_init (clutter_actor_box_alloc (), + * x_1, y_1, + * x_2, y_2); + * ]| + * @param x_1 X coordinate of the top left point + * @param y_1 Y coordinate of the top left point + * @param x_2 X coordinate of the bottom right point + * @param y_2 Y coordinate of the bottom right point + * @returns the newly allocated {@link ActorBox}. + * Use {@link Clutter.ActorBox.free} to free the resources + */ + public static new(x_1: number, y_1: number, x_2: number, y_2: number): ActorBox; + /** + * Allocates a new {@link ActorBox}. + * @returns the newly allocated {@link ActorBox}. + * Use {@link Clutter.ActorBox.free} to free its resources + */ + public static alloc(): ActorBox; + /** + * X coordinate of the top left corner + */ + public x1: number; + /** + * Y coordinate of the top left corner + */ + public y1: number; + /** + * X coordinate of the bottom right corner + */ + public x2: number; + /** + * Y coordinate of the bottom right corner + */ + public y2: number; + /** + * Clamps the components of #box to the nearest integer + */ + public clamp_to_pixel(): void; + /** + * Checks whether a point with #x, #y coordinates is contained + * withing #box + * @param x X coordinate of the point + * @param y Y coordinate of the point + * @returns %TRUE if the point is contained by the {@link ActorBox} + */ + public contains(x: number, y: number): boolean; + /** + * Copies #box + * @returns a newly allocated copy of {@link ActorBox}. Use + * {@link Clutter.ActorBox.free} to free the allocated resources + */ + public copy(): ActorBox; + /** + * Checks #box_a and #box_b for equality + * @param box_b a {@link ActorBox} + * @returns %TRUE if the passed {@link ActorBox} are equal + */ + public equal(box_b: ActorBox): boolean; + /** + * Frees a {@link ActorBox} allocated using {@link Clutter.ActorBox.new} + * or clutter_actor_box_copy() + */ + public free(): void; + /** + * Calculates the bounding box represented by the four vertices; for details + * of the vertex array see {@link Clutter.Actor.get_abs_allocation_vertices}. + * @param verts array of four {@link Vertex} + */ + public from_vertices(verts: Vertex[]): void; + /** + * Retrieves the area of #box + * @returns the area of a {@link ActorBox}, in pixels + */ + public get_area(): number; + /** + * Retrieves the height of the #box + * @returns the height of the box + */ + public get_height(): number; + /** + * Retrieves the origin of #box + * @returns return location for the X coordinate, or %NULL + * + * return location for the Y coordinate, or %NULL + */ + public get_origin(): [ x: number | null, y: number | null ]; + /** + * Retrieves the size of #box + * @returns return location for the width, or %NULL + * + * return location for the height, or %NULL + */ + public get_size(): [ width: number | null, height: number | null ]; + /** + * Retrieves the width of the #box + * @returns the width of the box + */ + public get_width(): number; + /** + * Retrieves the X coordinate of the origin of #box + * @returns the X coordinate of the origin + */ + public get_x(): number; + /** + * Retrieves the Y coordinate of the origin of #box + * @returns the Y coordinate of the origin + */ + public get_y(): number; + /** + * Initializes #box with the given coordinates. + * @param x_1 X coordinate of the top left point + * @param y_1 Y coordinate of the top left point + * @param x_2 X coordinate of the bottom right point + * @param y_2 Y coordinate of the bottom right point + * @returns the initialized {@link ActorBox} + */ + public init(x_1: number, y_1: number, x_2: number, y_2: number): ActorBox; + /** + * Initializes #box with the given origin and size. + * @param x X coordinate of the origin + * @param y Y coordinate of the origin + * @param width width of the box + * @param height height of the box + */ + public init_rect(x: number, y: number, width: number, height: number): void; + /** + * Interpolates between #initial and #final {@link ActorBox}es + * using #progress + * @param _final the final {@link ActorBox} + * @param progress the interpolation progress + * @returns return location for the interpolation + */ + public interpolate(_final: ActorBox, progress: number): ActorBox; + /** + * Changes the origin of #box, maintaining the size of the {@link ActorBox}. + * @param x the X coordinate of the new origin + * @param y the Y coordinate of the new origin + */ + public set_origin(x: number, y: number): void; + /** + * Sets the size of #box, maintaining the origin of the {@link ActorBox}. + * @param width the new width + * @param height the new height + */ + public set_size(width: number, height: number): void; + /** + * Unions the two boxes #a and #b and stores the result in #result. + * @param b the second {@link ActorBox} + * @returns the {@link ActorBox} representing a union + * of #a and #b + */ + public union(b: ActorBox): ActorBox; + } + + export interface ActorIterInitOptions {} + /** + * An iterator structure that allows to efficiently iterate over a + * section of the scene graph. + * + * The contents of the {@link ActorIter} structure + * are private and should only be accessed using the provided API. + */ + interface ActorIter {} + class ActorIter { + public constructor(options?: Partial); + public readonly dummy1: any; + public readonly dummy2: any; + public readonly dummy3: any; + public readonly dummy4: number; + public readonly dummy5: any; + /** + * Safely destroys the {@link Actor} currently pointer to by the iterator + * from its parent. + * + * This function can only be called after {@link Clutter.ActorIter.next} or + * clutter_actor_iter_prev() returned %TRUE, and cannot be called more + * than once for the same actor. + * + * This function will call clutter_actor_destroy() internally. + */ + public destroy(): void; + /** + * Initializes a {@link ActorIter}, which can then be used to iterate + * efficiently over a section of the scene graph, and associates it + * with #root. + * + * Modifying the scene graph section that contains #root will invalidate + * the iterator. + * + * |[ + * ClutterActorIter iter; + * ClutterActor *child; + * + * clutter_actor_iter_init (&iter, container); + * while (clutter_actor_iter_next (&iter, &child)) + * { + * // do something with child + * } + * ]| + * @param root a {@link Actor} + */ + public init(root: Actor): void; + /** + * Checks whether a {@link ActorIter} is still valid. + * + * An iterator is considered valid if it has been initialized, and + * if the #ClutterActor that it refers to hasn't been modified after + * the initialization. + * @returns %TRUE if the iterator is valid, and %FALSE otherwise + */ + public is_valid(): boolean; + /** + * Advances the #iter and retrieves the next child of the root {@link Actor} + * that was used to initialize the #ClutterActorIterator. + * + * If the iterator can advance, this function returns %TRUE and sets the + * #child argument. + * + * If the iterator cannot advance, this function returns %FALSE, and + * the contents of #child are undefined. + * @returns %TRUE if the iterator could advance, and %FALSE otherwise. + * + * return location for a {@link Actor} + */ + public next(): [ boolean, Actor ]; + /** + * Advances the #iter and retrieves the previous child of the root + * {@link Actor} that was used to initialize the #ClutterActorIterator. + * + * If the iterator can advance, this function returns %TRUE and sets the + * #child argument. + * + * If the iterator cannot advance, this function returns %FALSE, and + * the contents of #child are undefined. + * @returns %TRUE if the iterator could advance, and %FALSE otherwise. + * + * return location for a {@link Actor} + */ + public prev(): [ boolean, Actor ]; + /** + * Safely removes the {@link Actor} currently pointer to by the iterator + * from its parent. + * + * This function can only be called after {@link Clutter.ActorIter.next} or + * clutter_actor_iter_prev() returned %TRUE, and cannot be called more + * than once for the same actor. + * + * This function will call clutter_actor_remove_child() internally. + */ + public remove(): void; + } + + export interface AnimatableIfaceInitOptions {} + /** + * Base interface for #GObjects that can be animated by a + * a {@link Animation}. + */ + interface AnimatableIface {} + class AnimatableIface { + public constructor(options?: Partial); + public readonly parent_iface: GObject.TypeInterface; + public animate_property: {(animatable: Animatable, animation: Animation, property_name: string, initial_value: GObject.Value, final_value: GObject.Value, progress: number, value: GObject.Value): boolean;}; + public find_property: {(animatable: Animatable, property_name: string): GObject.ParamSpec;}; + public get_initial_state: {(animatable: Animatable, property_name: string, value: GObject.Value): void;}; + public set_final_state: {(animatable: Animatable, property_name: string, value: GObject.Value): void;}; + public interpolate_value: {(animatable: Animatable, property_name: string, interval: Interval, progress: number): [ boolean, GObject.Value ];}; + } + + export interface AnimatorKeyInitOptions {} + /** + * A key frame inside a {@link Animator} + */ + interface AnimatorKey {} + class AnimatorKey { + public constructor(options?: Partial); + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * Retrieves the mode of a {@link Animator} key, for the first key of a + * property for an object this represents the whether the animation is + * open ended and or curved for the remainding keys for the property it + * represents the easing mode. + * @returns the mode of a {@link AnimatorKey} + */ + public get_mode(): number; + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * Retrieves the object a key applies to. + * @returns the object an animator_key exist for. + */ + public get_object(): GObject.Object; + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * Retrieves the progress of an clutter_animator_key + * @returns the progress defined for a {@link Animator} key. + */ + public get_progress(): number; + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * Retrieves the name of the property a key applies to. + * @returns the name of the property an animator_key exist for. + */ + public get_property_name(): string; + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * Retrieves the #GType of the property a key applies to + * + * You can use this type to initialize the #GValue to pass to + * {@link Clutter.AnimatorKey.get_value} + * @returns the #GType of the property + */ + public get_property_type(): GObject.Type; + /** + * @deprecated + * Use {@link KeyframeTransition} instead + * + * Retrieves a copy of the value for a {@link AnimatorKey}. + * + * The passed in #GValue needs to be already initialized for the value + * type of the key or to a type that allow transformation from the value + * type of the key. + * + * Use {@link GObject.Value.unset} when done. + * @param value a #GValue initialized with the correct type for the animator key + * @returns %TRUE if the passed #GValue was successfully set, and + * %FALSE otherwise + */ + public get_value(value: GObject.Value): boolean; + } + + export interface AnyEventInitOptions {} + /** + * Common members for a {@link Event} + */ + interface AnyEvent {} + class AnyEvent { + public constructor(options?: Partial); + /** + * event type + */ + // public type: EventType; + /** + * event time + */ + public time: number; + /** + * event flags + */ + public flags: EventFlags; + public stage: Stage; + /** + * event source actor + */ + public source: Actor; + } + + export interface ButtonEventInitOptions {} + /** + * Button event. + * + * The event coordinates are relative to the stage that received the + * event, and can be transformed into actor-relative coordinates by + * using {@link Clutter.Actor.transform_stage_point}. + */ + interface ButtonEvent {} + class ButtonEvent { + public constructor(options?: Partial); + /** + * event type + */ + // public type: EventType; + /** + * event time + */ + public time: number; + /** + * event flags + */ + public flags: EventFlags; + /** + * event source stage + */ + public stage: Stage; + /** + * event source actor + */ + public source: Actor; + /** + * event X coordinate, relative to the stage + */ + public x: number; + /** + * event Y coordinate, relative to the stage + */ + public y: number; + /** + * button modifiers + */ + public modifier_state: ModifierType; + /** + * event button + */ + public button: number; + /** + * number of button presses within the default time + * and radius + */ + public click_count: number; + /** + * reserved for future use + */ + public axes: number; + /** + * the device that originated the event. If you want the physical + * device the event originated from, use {@link Clutter.event.get_source_device} + */ + public device: InputDevice; + } + + export interface ColorInitOptions {} + /** + * Color representation. + */ + interface Color {} + class Color { + public constructor(options?: Partial); + /** + * Allocates a new, transparent black {@link Color}. + * @returns the newly allocated {@link Color}; use + * {@link Clutter.Color.free} to free its resources + */ + public static alloc(): Color; + /** + * Creates a new {@link Color} with the given values. + * + * This function is the equivalent of: + * + * |[ + * clutter_color_init (clutter_color_alloc (), red, green, blue, alpha); + * ]| + * @param red red component of the color, between 0 and 255 + * @param green green component of the color, between 0 and 255 + * @param blue blue component of the color, between 0 and 255 + * @param alpha alpha component of the color, between 0 and 255 + * @returns the newly allocated color. + * Use {@link Clutter.Color.free} when done + */ + public static new(red: number, green: number, blue: number, alpha: number): Color; + /** + * Converts a color expressed in HLS (hue, luminance and saturation) + * values into a {@link Color}. + * @param hue hue value, in the 0 .. 360 range + * @param luminance luminance value, in the 0 .. 1 range + * @param saturation saturation value, in the 0 .. 1 range + * @returns return location for a {@link Color} + */ + public static from_hls(hue: number, luminance: number, saturation: number): Color; + /** + * Converts #pixel from the packed representation of a four 8 bit channel + * color to a {@link Color}. + * @param pixel a 32 bit packed integer containing a color + * @returns return location for a {@link Color} + */ + public static from_pixel(pixel: number): Color; + /** + * Parses a string definition of a color, filling the {@link Color}.red, + * #ClutterColor.green, #ClutterColor.blue and #ClutterColor.alpha fields + * of #color. + * + * The #color is not allocated. + * + * The format of #str can be either one of: + * + * - a standard name (as taken from the X11 rgb.txt file) + * - an hexadecimal value in the form: `#rgb`, `#rrggbb`, `#rgba`, or `#rrggbbaa` + * - a RGB color in the form: `rgb(r, g, b)` + * - a RGB color in the form: `rgba(r, g, b, a)` + * - a HSL color in the form: `hsl(h, s, l)` + * -a HSL color in the form: `hsla(h, s, l, a)` + * + * where 'r', 'g', 'b' and 'a' are (respectively) the red, green, blue color + * intensities and the opacity. The 'h', 's' and 'l' are (respectively) the + * hue, saturation and luminance values. + * + * In the rgb() and rgba() formats, the 'r', 'g', and 'b' values are either + * integers between 0 and 255, or percentage values in the range between 0% + * and 100%; the percentages require the '%' character. The 'a' value, if + * specified, can only be a floating point value between 0.0 and 1.0. + * + * In the hls() and hlsa() formats, the 'h' value (hue) is an angle between + * 0 and 360.0 degrees; the 'l' and 's' values (luminance and saturation) are + * percentage values in the range between 0% and 100%. The 'a' value, if specified, + * can only be a floating point value between 0.0 and 1.0. + * + * Whitespace inside the definitions is ignored; no leading whitespace + * is allowed. + * + * If the alpha component is not specified then it is assumed to be set to + * be fully opaque. + * @param str a string specifiying a color + * @returns %TRUE if parsing succeeded, and %FALSE otherwise + * + * return location for a {@link Color} + */ + public static from_string(str: string): [ boolean, Color ]; + /** + * Retrieves a static color for the given #color name + * + * Static colors are created by Clutter and are guaranteed to always be + * available and valid + * @param color the named global color + * @returns a pointer to a static color; the returned pointer + * is owned by Clutter and it should never be modified or freed + */ + public static get_static(color: StaticColor): Color; + /** + * red component, between 0 and 255 + */ + public red: number; + /** + * green component, between 0 and 255 + */ + public green: number; + /** + * blue component, between 0 and 255 + */ + public blue: number; + /** + * alpha component, between 0 and 255 + */ + public alpha: number; + /** + * Adds #a to #b and saves the resulting color inside #result. + * + * The alpha channel of #result is set as as the maximum value + * between the alpha channels of #a and #b. + * @param b a {@link Color} + * @returns return location for the result + */ + public add(b: Color): Color; + /** + * Makes a copy of the color structure. The result must be + * freed using {@link Clutter.Color.free}. + * @returns an allocated copy of #color. + */ + public copy(): Color; + /** + * Darkens #color by a fixed amount, and saves the changed color + * in #result. + * @returns return location for the darker color + */ + public darken(): Color; + /** + * Compares two {@link Color}s and checks if they are the same. + * + * This function can be passed to {@link GObject.hash_table_new} as the #key_equal_func + * parameter, when using #ClutterColors as keys in a #GHashTable. + * @param v2 a {@link Color} + * @returns %TRUE if the two colors are the same. + */ + public equal(v2: Color): boolean; + /** + * Frees a color structure created with {@link Clutter.Color.copy}. + */ + public free(): void; + /** + * Converts a {@link Color} to a hash value. + * + * This function can be passed to {@link GObject.hash_table_new} as the #hash_func + * parameter, when using #ClutterColors as keys in a #GHashTable. + * @returns a hash value corresponding to the color + */ + public hash(): number; + /** + * Initializes #color with the given values. + * @param red red component of the color, between 0 and 255 + * @param green green component of the color, between 0 and 255 + * @param blue blue component of the color, between 0 and 255 + * @param alpha alpha component of the color, between 0 and 255 + * @returns the initialized {@link Color} + */ + public init(red: number, green: number, blue: number, alpha: number): Color; + /** + * Interpolates between #initial and #final {@link Color}s + * using #progress + * @param _final the final {@link Color} + * @param progress the interpolation progress + * @returns return location for the interpolation + */ + public interpolate(_final: Color, progress: number): Color; + /** + * Lightens #color by a fixed amount, and saves the changed color + * in #result. + * @returns return location for the lighter color + */ + public lighten(): Color; + /** + * Shades #color by #factor and saves the modified color into #result. + * @param factor the shade factor to apply + * @returns return location for the shaded color + */ + public shade(factor: number): Color; + /** + * Subtracts #b from #a and saves the resulting color inside #result. + * + * This function assumes that the components of #a are greater than the + * components of #b; the result is, otherwise, undefined. + * + * The alpha channel of #result is set as the minimum value + * between the alpha channels of #a and #b. + * @param b a {@link Color} + * @returns return location for the result + */ + public subtract(b: Color): Color; + /** + * Converts #color to the HLS format. + * + * The #hue value is in the 0 .. 360 range. The #luminance and + * #saturation values are in the 0 .. 1 range. + * @returns return location for the hue value or %NULL + * + * return location for the luminance value or %NULL + * + * return location for the saturation value or %NULL + */ + public to_hls(): [ hue: number, luminance: number, saturation: number ]; + /** + * Converts #color into a packed 32 bit integer, containing + * all the four 8 bit channels used by {@link Color}. + * @returns a packed color + */ + public to_pixel(): number; + /** + * Returns a textual specification of #color in the hexadecimal form + * #rrggbbaa, where r, + * g, b and a are + * hexadecimal digits representing the red, green, blue and alpha components + * respectively. + * @returns a newly-allocated text string + */ + public to_string(): string; + } + + export interface ContainerIfaceInitOptions {} + /** + * Base interface for container actors. The #add, #remove and #foreach + * virtual functions must be provided by any implementation; the other + * virtual functions are optional. + */ + interface ContainerIface {} + class ContainerIface { + public constructor(options?: Partial); + public readonly g_iface: GObject.TypeInterface; + /** + * The GType used for storing auxiliary information about + * each of the containers children. + */ + public readonly child_meta_type: GObject.Type; + public add: {(container: Container, actor: Actor): void;}; + public remove: {(container: Container, actor: Actor): void;}; + public foreach: {(container: Container, callback: Callback): void;}; + public foreach_with_internals: {(container: Container, callback: Callback): void;}; + public raise: {(container: Container, actor: Actor, sibling: Actor | null): void;}; + public lower: {(container: Container, actor: Actor, sibling: Actor | null): void;}; + public sort_depth_order: {(container: Container): void;}; + public create_child_meta: {(container: Container, actor: Actor): void;}; + public destroy_child_meta: {(container: Container, actor: Actor): void;}; + public get_child_meta: {(container: Container, actor: Actor): ChildMeta;}; + public actor_added: {(container: Container, actor: Actor): void;}; + public actor_removed: {(container: Container, actor: Actor): void;}; + public child_notify: {(container: Container, child: Actor, pspec: GObject.ParamSpec): void;}; + } + + export interface ContentIfaceInitOptions {} + /** + * The {@link ContentIface} structure contains only + * private data. + */ + interface ContentIface {} + class ContentIface { + public constructor(options?: Partial); + public readonly g_iface: GObject.TypeInterface; + public get_preferred_size: {(content: Content): [ boolean, number, number ];}; + public paint_content: {(content: Content, actor: Actor, node: PaintNode): void;}; + public attached: {(content: Content, actor: Actor): void;}; + public detached: {(content: Content, actor: Actor): void;}; + public invalidate: {(content: Content): void;}; + } + + export interface CrossingEventInitOptions {} + /** + * Event for the movement of the pointer across different actors + */ + interface CrossingEvent {} + class CrossingEvent { + public constructor(options?: Partial); + /** + * event type + */ + // public type: EventType; + /** + * event time + */ + public time: number; + /** + * event flags + */ + public flags: EventFlags; + /** + * event source stage + */ + public stage: Stage; + /** + * event source actor + */ + public source: Actor; + /** + * event X coordinate + */ + public x: number; + /** + * event Y coordinate + */ + public y: number; + /** + * the device that originated the event. If you want the physical + * device the event originated from, use {@link Clutter.event.get_source_device} + */ + public device: InputDevice; + /** + * actor related to the crossing + */ + public related: Actor; + } + + export interface EventSequenceInitOptions {} + /** + * The {@link EventSequence} structure is an opaque + * type used to denote the event sequence of a touch event. + */ + interface EventSequence {} + class EventSequence { + public constructor(options?: Partial); + } + + export interface FogInitOptions {} + /** + * Fog settings used to create the depth cueing effect. + */ + interface Fog {} + class Fog { + public constructor(options?: Partial); + /** + * starting distance from the viewer to the near clipping + * plane (always positive) + */ + public z_near: number; + /** + * final distance from the viewer to the far clipping + * plane (always positive) + */ + public z_far: number; + } + + export interface GeometryInitOptions {} + /** + * The rectangle containing an actor's bounding box, measured in pixels. + * + * You should not use {@link Geometry}, or operate on its fields + * directly; you should use #cairo_rectangle_int_t or #ClutterRect if you + * need a rectangle type, depending on the precision required. + */ + interface Geometry {} + class Geometry { + public constructor(options?: Partial); + /** + * X coordinate of the top left corner of an actor + */ + public x: number; + /** + * Y coordinate of the top left corner of an actor + */ + public y: number; + /** + * width of an actor + */ + public width: number; + /** + * height of an actor + */ + public height: number; + /** + * @deprecated + * Use {@link Rect} and {@link Clutter.Rect.intersection} + * + * Determines if #geometry0 and geometry1 intersect returning %TRUE if + * they do else %FALSE. + * @param geometry1 The second geometry to test + * @returns %TRUE of #geometry0 and geometry1 intersect else + * %FALSE. + */ + public intersects(geometry1: Geometry): boolean; + /** + * @deprecated + * Use {@link Rect} and {@link Clutter.Rect.union} + * + * Find the union of two rectangles represented as {@link Geometry}. + * @param geometry_b another {@link Geometry} + * @returns location to store the result + */ + public union(geometry_b: Geometry): Geometry; + } + + export interface KeyEventInitOptions {} + /** + * Key event + */ + interface KeyEvent {} + class KeyEvent { + public constructor(options?: Partial); + /** + * event type + */ + // public type: EventType; + /** + * event time + */ + public time: number; + /** + * event flags + */ + public flags: EventFlags; + /** + * event source stage + */ + public stage: Stage; + /** + * event source actor + */ + public source: Actor; + /** + * key modifiers + */ + public modifier_state: ModifierType; + /** + * raw key value + */ + public keyval: number; + /** + * raw hardware key value + */ + public hardware_keycode: number; + /** + * Unicode representation + */ + public unicode_value: string; + /** + * the device that originated the event. If you want the physical + * device the event originated from, use {@link Clutter.event.get_source_device} + */ + public device: InputDevice; + } + + export interface KnotInitOptions {} + /** + * Point in a path behaviour. + */ + interface Knot {} + class Knot { + public constructor(options?: Partial); + /** + * X coordinate of the knot + */ + public x: number; + /** + * Y coordinate of the knot + */ + public y: number; + /** + * Makes an allocated copy of a knot. + * @returns the copied knot. + */ + public copy(): Knot; + /** + * Compares to knot and checks if the point to the same location. + * @param knot_b Second knot + * @returns %TRUE if the knots point to the same location. + */ + public equal(knot_b: Knot): boolean; + /** + * Frees the memory of an allocated knot. + */ + public free(): void; + } + + export interface MarginInitOptions {} + /** + * A representation of the components of a margin. + */ + interface Margin {} + class Margin { + public constructor(options?: Partial); + /** + * Creates a new {@link Margin}. + * @returns a newly allocated {@link Margin}. Use + * {@link Clutter.Margin.free} to free the resources associated with it when + * done. + */ + public static new(): Margin; + /** + * the margin from the left + */ + public left: number; + /** + * the margin from the right + */ + public right: number; + /** + * the margin from the top + */ + public top: number; + /** + * the margin from the bottom + */ + public bottom: number; + /** + * Creates a new {@link Margin} and copies the contents of #margin_ into + * the newly created structure. + * @returns a copy of the {@link Margin}. + */ + public copy(): Margin; + /** + * Frees the resources allocated by {@link Clutter.Margin.new} and + * clutter_margin_copy(). + */ + public free(): void; + } + + export interface MatrixInitOptions {} + /** + * A type representing a 4x4 matrix. + * + * It is identicaly to #CoglMatrix. + */ + interface Matrix {} + class Matrix { + public constructor(options?: Partial); + /** + * Allocates enough memory to hold a {@link Matrix}. + * @returns the newly allocated {@link Matrix} + */ + public static alloc(): Matrix; + /** + * Frees the memory allocated by {@link Clutter.matrix.alloc}. + */ + public free(): void; + /** + * Initializes #matrix with the contents of a C array of floating point + * values. + * @param values a C array of 16 floating point values, + * representing a 4x4 matrix, with column-major order + * @returns the initialzed {@link Matrix} + */ + public init_from_array(values: number[]): Matrix; + /** + * Initializes the {@link Matrix} #a with the contents of the + * #ClutterMatrix #b. + * @param b the {@link Matrix} to copy + * @returns the initialized {@link Matrix} + */ + public init_from_matrix(b: Matrix): Matrix; + /** + * Initializes #matrix with the identity matrix, i.e.: + * + * |[ + * .xx = 1.0, .xy = 0.0, .xz = 0.0, .xw = 0.0 + * .yx = 0.0, .yy = 1.0, .yz = 0.0, .yw = 0.0 + * .zx = 0.0, .zy = 0.0, .zz = 1.0, .zw = 0.0 + * .wx = 0.0, .wy = 0.0, .wz = 0.0, .ww = 1.0 + * ]| + * @returns the initialized {@link Matrix} + */ + public init_identity(): Matrix; + } + + export interface MediaIfaceInitOptions {} + /** + * Interface vtable for {@link Media} implementations + */ + interface MediaIface {} + class MediaIface { + public constructor(options?: Partial); + public readonly base_iface: GObject.TypeInterface; + public eos: {(media: Media): void;}; + public error: {(media: Media, error: GLib.Error): void;}; + } + + export interface MotionEventInitOptions {} + /** + * Event for the pointer motion + */ + interface MotionEvent {} + class MotionEvent { + public constructor(options?: Partial); + /** + * event type + */ + // public type: EventType; + /** + * event time + */ + public time: number; + /** + * event flags + */ + public flags: EventFlags; + /** + * event source stage + */ + public stage: Stage; + /** + * event source actor + */ + public source: Actor; + /** + * event X coordinate + */ + public x: number; + /** + * event Y coordinate + */ + public y: number; + /** + * button modifiers + */ + public modifier_state: ModifierType; + /** + * reserved for future use + */ + public axes: number; + /** + * the device that originated the event. If you want the physical + * device the event originated from, use {@link Clutter.event.get_source_device} + */ + public device: InputDevice; + } + + export interface PaintVolumeInitOptions {} + /** + * {@link PaintVolume} is an opaque structure + * whose members cannot be directly accessed. + * + * A #ClutterPaintVolume represents an + * a bounding volume whose internal representation isn't defined but + * can be set and queried in terms of an axis aligned bounding box. + * + * A #ClutterPaintVolume for a #ClutterActor + * is defined to be relative from the current actor modelview matrix. + * + * Other internal representation and methods for describing the + * bounding volume may be added in the future. + */ + interface PaintVolume {} + class PaintVolume { + public constructor(options?: Partial); + /** + * Copies #pv into a new {@link PaintVolume} + * @returns a newly allocated copy of a {@link PaintVolume} + */ + public copy(): PaintVolume; + /** + * Frees the resources allocated by #pv + */ + public free(): void; + /** + * Retrieves the depth of the volume's, axis aligned, bounding box. + * + * In other words; this takes into account what actor's coordinate + * space #pv belongs too and conceptually fits an axis aligned box + * around the volume. It returns the size of that bounding box as + * measured along the z-axis. + * + * If, for example, {@link Clutter.Actor.get_transformed_paint_volume} + * is used to transform a 2D child actor that is 100px wide, 100px + * high and 0px deep into container coordinates then the depth might + * not simply be 0px if the child actor has a 3D rotation applied to + * it. + * + * Remember: if clutter_actor_get_transformed_paint_volume() is + * used then the transformed volume will be defined relative to the + * container actor and in container coordinates a 2D child actor + * can have a 3D bounding volume. + * + * There are no accuracy guarantees for the reported depth, + * except that it must always be greater than, or equal to, the actor's + * depth. This is because actors may report simple, loose fitting paint + * volumes for efficiency. + * @returns the depth, in units of #pv's local coordinate system. + */ + public get_depth(): number; + /** + * Retrieves the height of the volume's, axis aligned, bounding box. + * + * In other words; this takes into account what actor's coordinate + * space #pv belongs too and conceptually fits an axis aligned box + * around the volume. It returns the size of that bounding box as + * measured along the y-axis. + * + * If, for example, {@link Clutter.Actor.get_transformed_paint_volume} + * is used to transform a 2D child actor that is 100px wide, 100px + * high and 0px deep into container coordinates then the height might + * not simply be 100px if the child actor has a 3D rotation applied to + * it. + * + * Remember: if clutter_actor_get_transformed_paint_volume() is + * used then a transformed child volume will be defined relative to the + * ancestor container actor and so a 2D child actor + * can have a 3D bounding volume. + * + * There are no accuracy guarantees for the reported height, + * except that it must always be greater than, or equal to, the actor's + * height. This is because actors may report simple, loose fitting paint + * volumes for efficiency. + * @returns the height, in units of #pv's local coordinate system. + */ + public get_height(): number; + /** + * Retrieves the origin of the {@link PaintVolume}. + * @returns the return location for a {@link Vertex} + */ + public get_origin(): Vertex; + /** + * Retrieves the width of the volume's, axis aligned, bounding box. + * + * In other words; this takes into account what actor's coordinate + * space #pv belongs too and conceptually fits an axis aligned box + * around the volume. It returns the size of that bounding box as + * measured along the x-axis. + * + * If, for example, {@link Clutter.Actor.get_transformed_paint_volume} + * is used to transform a 2D child actor that is 100px wide, 100px + * high and 0px deep into container coordinates then the width might + * not simply be 100px if the child actor has a 3D rotation applied to + * it. + * + * Remember: if clutter_actor_get_transformed_paint_volume() is + * used then a transformed child volume will be defined relative to the + * ancestor container actor and so a 2D child actor can have a 3D + * bounding volume. + * + * There are no accuracy guarantees for the reported width, + * except that it must always be greater than, or equal to, the + * actor's width. This is because actors may report simple, loose + * fitting paint volumes for efficiency. + * @returns the width, in units of #pv's local coordinate system. + */ + public get_width(): number; + /** + * Sets the depth of the paint volume. The depth is measured along + * the z axis in the actor coordinates that #pv is associated with. + * @param depth the depth of the paint volume, in pixels + */ + public set_depth(depth: number): void; + /** + * Sets the {@link PaintVolume} from the allocation of #actor. + * + * This function should be used when overriding the + * {@link #ClutterActorClass.get.paint_volume} by #ClutterActor sub-classes + * that do not paint outside their allocation. + * + * A typical example is: + * + * |[ + * static gboolean + * my_actor_get_paint_volume (ClutterActor *self, + * ClutterPaintVolume *volume) + * { + * return clutter_paint_volume_set_from_allocation (volume, self); + * } + * ]| + * @param actor a {@link Actor} + * @returns %TRUE if the paint volume was successfully set, and %FALSE + * otherwise + */ + public set_from_allocation(actor: Actor): boolean; + /** + * Sets the height of the paint volume. The height is measured along + * the y axis in the actor coordinates that #pv is associated with. + * @param height the height of the paint volume, in pixels + */ + public set_height(height: number): void; + /** + * Sets the origin of the paint volume. + * + * The origin is defined as the X, Y and Z coordinates of the top-left + * corner of an actor's paint volume, in actor coordinates. + * + * The default is origin is assumed at: (0, 0, 0) + * @param origin a {@link Vertex} + */ + public set_origin(origin: Vertex): void; + /** + * Sets the width of the paint volume. The width is measured along + * the x axis in the actor coordinates that #pv is associated with. + * @param width the width of the paint volume, in pixels + */ + public set_width(width: number): void; + /** + * Updates the geometry of #pv to encompass #pv and #another_pv. + * + * There are no guarantees about how precisely the two volumes + * will be unioned. + * @param another_pv A second {@link PaintVolume} to union with #pv + */ + public union(another_pv: PaintVolume): void; + /** + * Unions the 2D region represented by #box to a {@link PaintVolume}. + * + * This function is similar to {@link Clutter.PaintVolume.union}, but it is + * specific for 2D regions. + * @param box a {@link ActorBox} to union to #pv + */ + public union_box(box: ActorBox): void; + } + + export interface ParamSpecUnitsInitOptions {} + /** + * #GParamSpec subclass for unit based properties. + */ + interface ParamSpecUnits {} + class ParamSpecUnits { + public constructor(options?: Partial); + /** + * default type + */ + public default_type: UnitType; + /** + * default value + */ + public default_value: number; + /** + * lower boundary + */ + public minimum: number; + /** + * higher boundary + */ + public maximum: number; + } + + export interface PathNodeInitOptions {} + /** + * Represents a single node of a {@link Path}. + * + * Some of the coordinates in #points may be unused for some node + * types. %CLUTTER_PATH_MOVE_TO and %CLUTTER_PATH_LINE_TO use only one + * pair of coordinates, %CLUTTER_PATH_CURVE_TO uses all three and + * %CLUTTER_PATH_CLOSE uses none. + */ + interface PathNode {} + class PathNode { + public constructor(options?: Partial); + /** + * the node's type + */ + public type: PathNodeType; + /** + * the coordinates of the node + */ + public points: Knot[]; + /** + * Makes an allocated copy of a node. + * @returns the copied node. + */ + public copy(): PathNode; + /** + * Compares two nodes and checks if they are the same type with the + * same coordinates. + * @param node_b Second node + * @returns %TRUE if the nodes are the same. + */ + public equal(node_b: PathNode): boolean; + /** + * Frees the memory of an allocated node. + */ + public free(): void; + } + + export interface PerspectiveInitOptions {} + /** + * Stage perspective definition. {@link Perspective} is only used by + * the fixed point version of {@link Clutter.Stage.set_perspective}. + */ + interface Perspective {} + class Perspective { + public constructor(options?: Partial); + /** + * the field of view angle, in degrees, in the y direction + */ + public fovy: number; + /** + * the aspect ratio that determines the field of view in the x + * direction. The aspect ratio is the ratio of x (width) to y (height) + */ + public aspect: number; + /** + * the distance from the viewer to the near clipping + * plane (always positive) + */ + public z_near: number; + /** + * the distance from the viewer to the far clipping + * plane (always positive) + */ + public z_far: number; + } + + export interface PointInitOptions {} + /** + * A point in 2D space. + */ + interface Point {} + class Point { + public constructor(options?: Partial); + /** + * Allocates a new {@link Point}. + * @returns the newly allocated {@link Point}. + * Use {@link Clutter.Point.free} to free its resources. + */ + public static alloc(): Point; + /** + * A point centered at (0, 0). + * + * The returned value can be used as a guard. + * @returns a point centered in (0, 0); the returned {@link Point} + * is owned by Clutter and it should not be modified or freed. + */ + public static zero(): Point; + /** + * X coordinate, in pixels + */ + public x: number; + /** + * Y coordinate, in pixels + */ + public y: number; + /** + * Creates a new {@link Point} with the same coordinates of #point. + * @returns a newly allocated {@link Point}. + * Use {@link Clutter.Point.free} to free its resources. + */ + public copy(): Point; + /** + * Computes the distance between two {@link Point}. + * @param b a {@link Point} + * @returns the distance between the points. + * + * return location for the horizontal + * distance between the points + * + * return location for the vertical + * distance between the points + */ + public distance(b: Point): [ number, number | null, number | null ]; + /** + * Compares two {@link Point} for equality. + * @param b the second {@link Point} to compare + * @returns %TRUE if the {@link Points} are equal + */ + public equals(b: Point): boolean; + /** + * Frees the resources allocated for #point. + */ + public free(): void; + /** + * Initializes #point with the given coordinates. + * @param x the X coordinate of the point + * @param y the Y coordinate of the point + * @returns the initialized {@link Point} + */ + public init(x: number, y: number): Point; + } + + export interface RectInitOptions {} + /** + * The location and size of a rectangle. + * + * The width and height of a {@link Rect} can be negative; Clutter considers + * a rectangle with an origin of [ 0.0, 0.0 ] and a size of [ 10.0, 10.0 ] to + * be equivalent to a rectangle with origin of [ 10.0, 10.0 ] and size of + * [ -10.0, -10.0 ]. + * + * Application code can normalize rectangles using {@link Clutter.Rect.normalize}: + * this function will ensure that the width and height of a #ClutterRect are + * positive values. All functions taking a #ClutterRect as an argument will + * implicitly normalize it before computing eventual results. For this reason + * it is safer to access the contents of a #ClutterRect by using the provided + * API at all times, instead of directly accessing the structure members. + */ + interface Rect {} + class Rect { + public constructor(options?: Partial); + /** + * Creates a new, empty {@link Rect}. + * + * You can use {@link Clutter.Rect.init} to initialize the returned rectangle, + * for instance: + * + * |[ + * rect = clutter_rect_init (clutter_rect_alloc (), x, y, width, height); + * ]| + * @returns the newly allocated {@link Rect}. + * Use {@link Clutter.Rect.free} to free its resources + */ + public static alloc(): Rect; + /** + * A {@link Rect} with #ClutterRect.origin set at (0, 0) and a size + * of 0. + * + * The returned value can be used as a guard. + * @returns a rectangle with origin in (0, 0) and a size of 0. + * The returned {@link Rect} is owned by Clutter and it should not + * be modified or freed. + */ + public static zero(): Rect; + /** + * the origin of the rectangle + */ + public origin: Point; + /** + * the size of the rectangle + */ + public size: Size; + /** + * Rounds the origin of #rect downwards to the nearest integer, and rounds + * the size of #rect upwards to the nearest integer, so that #rect is + * updated to the smallest rectangle capable of fully containing the + * original, fractional rectangle. + */ + public clamp_to_pixel(): void; + /** + * Checks whether #point is contained by #rect, after normalizing the + * rectangle. + * @param point the point to check + * @returns %TRUE if the #point is contained by #rect. + */ + public contains_point(point: Point): boolean; + /** + * Checks whether #a contains #b. + * + * The first rectangle contains the second if the union of the + * two {@link Rect} is equal to the first rectangle. + * @param b a {@link Rect} + * @returns %TRUE if the first rectangle contains the second. + */ + public contains_rect(b: Rect): boolean; + /** + * Copies #rect into a new {@link Rect} instance. + * @returns the newly allocate copy of #rect. + * Use {@link Clutter.Rect.free} to free the associated resources + */ + public copy(): Rect; + /** + * Checks whether #a and #b are equals. + * + * This function will normalize both #a and #b before comparing + * their origin and size. + * @param b a {@link Rect} + * @returns %TRUE if the rectangles match in origin and size. + */ + public equals(b: Rect): boolean; + /** + * Frees the resources allocated by #rect. + */ + public free(): void; + /** + * Retrieves the center of #rect, after normalizing the rectangle, + * and updates #center with the correct coordinates. + * @returns a {@link Point} + */ + public get_center(): Point; + /** + * Retrieves the height of #rect. + * @returns the height of the rectangle + */ + public get_height(): number; + /** + * Retrieves the width of #rect. + * @returns the width of the rectangle + */ + public get_width(): number; + /** + * Retrieves the X coordinate of the origin of #rect. + * @returns the X coordinate of the origin of the rectangle + */ + public get_x(): number; + /** + * Retrieves the Y coordinate of the origin of #rect. + * @returns the Y coordinate of the origin of the rectangle + */ + public get_y(): number; + /** + * Initializes a {@link Rect} with the given origin and size. + * @param x X coordinate of the origin + * @param y Y coordinate of the origin + * @param width width of the rectangle + * @param height height of the rectangle + * @returns the updated rectangle + */ + public init(x: number, y: number, width: number, height: number): Rect; + /** + * Normalizes the #rect and offsets its origin by the #d_x and #d_y values; + * the size is adjusted by (2 * #d_x, 2 * #d_y). + * + * If #d_x and #d_y are positive the size of the rectangle is decreased; if + * the values are negative, the size of the rectangle is increased. + * + * If the resulting rectangle has a negative width or height, the size is + * set to 0. + * @param d_x an horizontal value; a positive #d_x will create an inset rectangle, + * and a negative value will create a larger rectangle + * @param d_y a vertical value; a positive #d_x will create an inset rectangle, + * and a negative value will create a larger rectangle + */ + public inset(d_x: number, d_y: number): void; + /** + * Computes the intersection of #a and #b, and places it in #res, if #res + * is not %NULL. + * + * This function will normalize both #a and #b prior to computing their + * intersection. + * + * This function can be used to simply check if the intersection of #a and #b + * is not empty, by using %NULL for #res. + * @param b a {@link Rect} + * @returns %TRUE if the intersection of #a and #b is not empty + * + * a {@link Rect}, or %NULL + */ + public intersection(b: Rect): [ boolean, Rect | null ]; + /** + * Normalizes a {@link Rect}. + * + * A #ClutterRect is defined by the area covered by its size; this means + * that a #ClutterRect with #ClutterRect.origin in [ 0, 0 ] and a + * #ClutterRect.size of [ 10, 10 ] is equivalent to a #ClutterRect with + * #ClutterRect.origin in [ 10, 10 ] and a #ClutterRect.size of [ -10, -10 ]. + * + * This function is useful to ensure that a rectangle has positive width + * and height; it will modify the passed #rect and normalize its size. + * @returns + */ + public normalize(): Rect; + /** + * Offsets the origin of #rect by the given values, after normalizing + * the rectangle. + * @param d_x the horizontal offset value + * @param d_y the vertical offset value + */ + public offset(d_x: number, d_y: number): void; + /** + * Computes the smallest possible rectangle capable of fully containing + * both #a and #b, and places it into #res. + * + * This function will normalize both #a and #b prior to computing their + * union. + * @param b a {@link Rect} + * @returns a {@link Rect} + */ + public union(b: Rect): Rect; + } + + export interface ScriptableIfaceInitOptions {} + /** + * Interface for implementing "scriptable" objects. An object implementing + * this interface can override the parsing and properties setting sequence + * when loading a UI definition data with {@link Script} + */ + interface ScriptableIface {} + class ScriptableIface { + public constructor(options?: Partial); + public readonly g_iface: GObject.TypeInterface; + public set_id: {(scriptable: Scriptable, id_: string): void;}; + public get_id: {(scriptable: Scriptable): string;}; + // public parse_custom_node: {(scriptable: Scriptable, script: Script, value: GObject.Value, name: string, node: Json.Node): boolean;}; + public set_custom_property: {(scriptable: Scriptable, script: Script, name: string, value: GObject.Value): void;}; + } + + export interface ScrollEventInitOptions {} + /** + * Scroll wheel (or similar device) event + */ + interface ScrollEvent {} + class ScrollEvent { + public constructor(options?: Partial); + /** + * event type + */ + // public type: EventType; + /** + * event time + */ + public time: number; + /** + * event flags + */ + public flags: EventFlags; + /** + * event source stage + */ + public stage: Stage; + /** + * event source actor + */ + public source: Actor; + /** + * event X coordinate + */ + public x: number; + /** + * event Y coordinate + */ + public y: number; + /** + * direction of the scrolling + */ + public direction: ScrollDirection; + /** + * button modifiers + */ + public modifier_state: ModifierType; + /** + * reserved for future use + */ + public axes: number; + /** + * the device that originated the event. If you want the physical + * device the event originated from, use {@link Clutter.event.get_source_device} + */ + public device: InputDevice; + /** + * the source of scroll events. This field is available since 1.26 + */ + public scroll_source: ScrollSource; + /** + * the axes that were stopped in this event. This field is available since 1.26 + */ + public finish_flags: ScrollFinishFlags; + } + + export interface SizeInitOptions {} + /** + * A size, in 2D space. + */ + interface Size {} + class Size { + public constructor(options?: Partial); + /** + * Allocates a new {@link Size}. + * @returns the newly allocated {@link Size}. + * Use {@link Clutter.Size.free} to free its resources. + */ + public static alloc(): Size; + /** + * the width, in pixels + */ + public width: number; + /** + * the height, in pixels + */ + public height: number; + /** + * Creates a new {@link Size} and duplicates #size. + * @returns the newly allocated {@link Size}. + * Use {@link Clutter.Size.free} to free its resources. + */ + public copy(): Size; + /** + * Compares two {@link Size} for equality. + * @param b a {@link Size} to compare + * @returns %TRUE if the two {@link Size} are equal + */ + public equals(b: Size): boolean; + /** + * Frees the resources allocated for #size. + */ + public free(): void; + /** + * Initializes a {@link Size} with the given dimensions. + * @param width the width + * @param height the height + * @returns the initialized {@link Size} + */ + public init(width: number, height: number): Size; + } + + export interface StageStateEventInitOptions {} + /** + * Event signalling a change in the {@link Stage} state. + */ + interface StageStateEvent {} + class StageStateEvent { + public constructor(options?: Partial); + /** + * event type + */ + // public type: EventType; + /** + * event time + */ + public time: number; + /** + * event flags + */ + public flags: EventFlags; + /** + * event source stage + */ + public stage: Stage; + /** + * event source actor (unused) + */ + public source: Actor; + /** + * bitwise OR of the changed flags + */ + public changed_mask: StageState; + /** + * bitwise OR of the current state flags + */ + public new_state: StageState; + } + + export interface StateKeyInitOptions {} + /** + * {@link StateKey} is an opaque structure whose + * members cannot be accessed directly + */ + interface StateKey {} + class StateKey { + public constructor(options?: Partial); + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Retrieves the easing mode used for #state_key. + * @returns the mode of a {@link StateKey} + */ + public get_mode(): number; + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Retrieves the object instance this {@link StateKey} applies to. + * @returns the object this state key applies to. + */ + public get_object(): GObject.Object; + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Retrieves the duration of the pause after transitioning is complete + * as a fraction of the total transition time. + * @returns the post delay, used after doing the transition. + */ + public get_post_delay(): number; + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Retrieves the pause before transitioning starts as a fraction of + * the total transition time. + * @returns the pre delay used before starting the transition. + */ + public get_pre_delay(): number; + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Retrieves the name of the property this {@link StateKey} applies to + * @returns the name of the property. The returned string is owned + * by the {@link StateKey} and should never be modified or freed + */ + public get_property_name(): string; + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Retrieves the #GType of the property a key applies to + * + * You can use this type to initialize the #GValue to pass to + * {@link Clutter.StateKey.get_value} + * @returns the #GType of the property + */ + public get_property_type(): GObject.Type; + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Retrieves the name of the source state of the #state_key + * @returns the name of the source state for this key, or %NULL + * if this is the generic state key for the given property when + * transitioning to the target state. The returned string is owned + * by the {@link StateKey} and should never be modified or freed + */ + public get_source_state_name(): string; + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Get the name of the source state this {@link StateKey} contains, + * or NULL if this is the generic state key for the given property + * when transitioning to the target state. + * @returns the name of the source state for this key, or NULL if + * the key is generic + */ + public get_target_state_name(): string; + /** + * @deprecated + * Use {@link KeyframeTransition} and + * #ClutterTransitionGroup instead + * + * Retrieves a copy of the value for a {@link StateKey}. + * + * The #GValue needs to be already initialized for the value type + * of the property or to a type that allow transformation from the value + * type of the key. + * + * Use {@link GObject.Value.unset} when done. + * @param value a #GValue initialized with the correct type for the #state_key + * @returns %TRUE if the value was successfully retrieved, + * and %FALSE otherwise + */ + public get_value(value: GObject.Value): boolean; + } + + export interface TimeoutPoolInitOptions {} + /** + * {@link TimeoutPool} is an opaque structure + * whose members cannot be directly accessed. + */ + interface TimeoutPool {} + class TimeoutPool { + public constructor(options?: Partial); + /** + * @deprecated + * There is no direct replacement for this API + * + * Creates a new timeout pool source. A timeout pool should be used when + * multiple timeout functions, running at the same priority, are needed and + * the {@link GObject.timeout_add} API might lead to starvation of the time slice of + * the main loop. A timeout pool allocates a single time slice of the main + * loop and runs every timeout function inside it. The timeout pool is + * always sorted, so that the extraction of the next timeout function is + * a constant time operation. + * @param priority the priority of the timeout pool. Typically this will + * be #G_PRIORITY_DEFAULT + * @returns the newly created {@link TimeoutPool}. The created pool + * is owned by the GLib default context and will be automatically + * destroyed when the context is destroyed. It is possible to force + * the destruction of the timeout pool using {@link GObject.source_destroy} + */ + public static new(priority: number): TimeoutPool; + /** + * @deprecated + * There is no direct replacement for this API + * + * Sets a function to be called at regular intervals, and puts it inside + * the #pool. The function is repeatedly called until it returns %FALSE, + * at which point the timeout is automatically destroyed and the function + * won't be called again. If #notify is not %NULL, the #notify function + * will be called. The first call to #func will be at the end of #interval. + * + * Since Clutter 0.8 this will try to compensate for delays. For + * example, if #func takes half the interval time to execute then the + * function will be called again half the interval time after it + * finished. Before version 0.8 it would not fire until a full + * interval after the function completes so the delay between calls + * would be #interval * 1.5. This function does not however try to + * invoke the function multiple times to catch up missing frames if + * #func takes more than #interval ms to execute. + * @param fps the time between calls to the function, in frames per second + * @param func function to call + * @param data data to pass to the function, or %NULL + * @param notify function to call when the timeout is removed, or %NULL + * @returns the ID (greater than 0) of the timeout inside the pool. + * Use {@link Clutter.TimeoutPool.remove} to stop the timeout. + */ + public add(fps: number, func: GLib.SourceFunc, data: any | null, notify: GLib.DestroyNotify): number; + /** + * @deprecated + * There is no direct replacement for this API + * + * Removes a timeout function with #id_ from the timeout pool. The id + * is the same returned when adding a function to the timeout pool with + * {@link Clutter.TimeoutPool.add}. + * @param id_ the id of the timeout to remove + */ + public remove(id_: number): void; + } + + export interface TouchEventInitOptions {} + /** + * Used for touch events. + * + * The #type field will be one of %CLUTTER_TOUCH_BEGIN, %CLUTTER_TOUCH_END, + * %CLUTTER_TOUCH_UPDATE, or %CLUTTER_TOUCH_CANCEL. + * + * Touch events are grouped into sequences; each touch sequence will begin + * with a %CLUTTER_TOUCH_BEGIN event, progress with %CLUTTER_TOUCH_UPDATE + * events, and end either with a %CLUTTER_TOUCH_END event or with a + * %CLUTTER_TOUCH_CANCEL event. + * + * With multi-touch capable devices there can be multiple event sequence + * running at the same time. + */ + interface TouchEvent {} + class TouchEvent { + public constructor(options?: Partial); + /** + * event type + */ + // public type: EventType; + /** + * event time + */ + public time: number; + /** + * event flags + */ + public flags: EventFlags; + /** + * event source stage + */ + public stage: Stage; + /** + * event source actor (unused) + */ + public source: Actor; + /** + * the X coordinate of the pointer, relative to the stage + */ + public x: number; + /** + * the Y coordinate of the pointer, relative to the stage + */ + public y: number; + /** + * the event sequence that this event belongs to + */ + public sequence: EventSequence; + /** + * a bit-mask representing the state + * of modifier keys (e.g. Control, Shift, and Alt) and the pointer + * buttons. See {@link ModifierType} + */ + public modifier_state: ModifierType; + /** + * reserved + */ + public axes: number; + /** + * the device that originated the event. If you want the physical + * device the event originated from, use {@link Clutter.event.get_source_device} + */ + public device: InputDevice; + } + + export interface TouchpadPinchEventInitOptions {} + /** + * Used for touchpad pinch gesture events. The current state of the + * gesture will be determined by the #phase field. + * + * Each event with phase %CLUTTER_TOUCHPAD_GESTURE_PHASE_BEGIN + * will report a #scale of 1.0, all later phases in the gesture + * report the current scale relative to the initial 1.0 value + * (eg. 0.5 being half the size, 2.0 twice as big). + */ + interface TouchpadPinchEvent {} + class TouchpadPinchEvent { + public constructor(options?: Partial); + /** + * event type + */ + // public type: EventType; + /** + * event time + */ + public time: number; + /** + * event flags + */ + public flags: EventFlags; + /** + * event source stage + */ + public stage: Stage; + /** + * event source actor (unused) + */ + public source: Actor; + /** + * the current phase of the gesture + */ + public phase: TouchpadGesturePhase; + /** + * the X coordinate of the pointer, relative to the stage + */ + public x: number; + /** + * the Y coordinate of the pointer, relative to the stage + */ + public y: number; + /** + * movement delta of the pinch focal point in the X axis + */ + public dx: number; + /** + * movement delta of the pinch focal point in the Y axis + */ + public dy: number; + /** + * angle delta in degrees, clockwise rotations are + * represented by positive deltas + */ + public angle_delta: number; + /** + * the current scale + */ + public scale: number; + } + + export interface TouchpadSwipeEventInitOptions {} + /** + * Used for touchpad swipe gesture events. The current state of the + * gesture will be determined by the #phase field. + */ + interface TouchpadSwipeEvent {} + class TouchpadSwipeEvent { + public constructor(options?: Partial); + /** + * event type + */ + // public type: EventType; + /** + * event time + */ + public time: number; + /** + * event flags + */ + public flags: EventFlags; + /** + * event source stage + */ + public stage: Stage; + /** + * event source actor (unused) + */ + public source: Actor; + /** + * the current phase of the gesture + */ + public phase: TouchpadGesturePhase; + /** + * the number of fingers triggering the swipe + */ + public n_fingers: number; + /** + * the X coordinate of the pointer, relative to the stage + */ + public x: number; + /** + * the Y coordinate of the pointer, relative to the stage + */ + public y: number; + /** + * movement delta of the pinch focal point in the X axis + */ + public dx: number; + /** + * movement delta of the pinch focal point in the Y axis + */ + public dy: number; + } + + export interface UnitsInitOptions {} + /** + * An opaque structure, to be used to store sizing and positioning + * values along with their unit. + */ + interface Units {} + class Units { + public constructor(options?: Partial); + /** + * Stores a value in centimeters inside #units + * @param cm centimeters + * @returns a {@link Units} + */ + public static from_cm(cm: number): Units; + /** + * Stores a value in em inside #units, using the default font + * name as returned by {@link Clutter.Backend.get_font_name} + * @param em em + * @returns a {@link Units} + */ + public static from_em(em: number): Units; + /** + * Stores a value in em inside #units using #font_name + * @param font_name the font name and size + * @param em em + * @returns a {@link Units} + */ + public static from_em_for_font(font_name: string | null, em: number): Units; + /** + * Stores a value in millimiters inside #units + * @param mm millimeters + * @returns a {@link Units} + */ + public static from_mm(mm: number): Units; + /** + * Stores a value in pixels inside #units + * @param px pixels + * @returns a {@link Units} + */ + public static from_pixels(px: number): Units; + /** + * Stores a value in typographic points inside #units + * @param pt typographic points + * @returns a {@link Units} + */ + public static from_pt(pt: number): Units; + /** + * Parses a value and updates #units with it + * + * A {@link Units} expressed in string should match: + * + * |[ + * units: wsp* unit-value wsp* unit-name? wsp* + * unit-value: number + * unit-name: 'px' | 'pt' | 'mm' | 'em' | 'cm' + * number: digit+ + * | digit* sep digit+ + * sep: '.' | ',' + * digit: '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' + * wsp: (#0x20 | #0x9 | #0xA | #0xB | #0xC | #0xD)+ + * ]| + * + * For instance, these are valid strings: + * + * |[ + * 10 px + * 5.1 em + * 24 pt + * 12.6 mm + * .3 cm + * ]| + * + * While these are not: + * + * |[ + * 42 cats + * omg!1!ponies + * ]| + * + * If no unit is specified, pixels are assumed. + * @param str the string to convert + * @returns %TRUE if the string was successfully parsed, + * and %FALSE otherwise + * + * a {@link Units} + */ + public static from_string(str: string): [ boolean, Units ]; + public readonly unit_type: UnitType; + public readonly value: number; + public readonly pixels: number; + public readonly pixels_set: number; + public readonly serial: number; + public readonly __padding_1: number; + public readonly __padding_2: number; + /** + * Copies #units + * @returns the newly created copy of a + * {@link Units} structure. Use {@link Clutter.Units.free} to free + * the allocated resources + */ + public copy(): Units; + /** + * Frees the resources allocated by #units + * + * You should only call this function on a {@link Units} + * created using {@link Clutter.Units.copy} + */ + public free(): void; + /** + * Retrieves the unit type of the value stored inside #units + * @returns a unit type + */ + public get_unit_type(): UnitType; + /** + * Retrieves the value stored inside #units + * @returns the value stored inside a {@link Units} + */ + public get_unit_value(): number; + /** + * Converts a value in {@link Units} to pixels + * @returns the value in pixels + */ + public to_pixels(): number; + /** + * Converts #units into a string + * + * See {@link Clutter.units.from_string} for the units syntax and for + * examples of output + * + * Fractional values are truncated to the second decimal + * position for em, mm and cm, and to the first decimal position for + * typographic points. Pixels are integers. + * @returns a newly allocated string containing the encoded + * {@link Units} value. Use {@link GObject.free} to free the string + */ + public to_string(): string; + } + + export interface VertexInitOptions {} + /** + * A point in 3D space, expressed in pixels + */ + interface Vertex {} + class Vertex { + public constructor(options?: Partial); + /** + * Allocates a new, empty {@link Vertex}. + * @returns the newly allocated {@link Vertex}. + * Use {@link Clutter.Vertex.free} to free its resources + */ + public static alloc(): Vertex; + /** + * Creates a new {@link Vertex} for the point in 3D space + * identified by the 3 coordinates #x, #y, #z. + * + * This function is the logical equivalent of: + * + * |[ + * clutter_vertex_init (clutter_vertex_alloc (), x, y, z); + * ]| + * @param x X coordinate + * @param y Y coordinate + * @param z Z coordinate + * @returns the newly allocated {@link Vertex}. + * Use {@link Clutter.Vertex.free} to free the resources + */ + public static new(x: number, y: number, z: number): Vertex; + /** + * X coordinate of the vertex + */ + public x: number; + /** + * Y coordinate of the vertex + */ + public y: number; + /** + * Z coordinate of the vertex + */ + public z: number; + /** + * Copies #vertex + * @returns a newly allocated copy of {@link Vertex}. + * Use {@link Clutter.Vertex.free} to free the allocated resources + */ + public copy(): Vertex; + /** + * Compares #vertex_a and #vertex_b for equality + * @param vertex_b a {@link Vertex} + * @returns %TRUE if the passed {@link Vertex} are equal + */ + public equal(vertex_b: Vertex): boolean; + /** + * Frees a {@link Vertex} allocated using {@link Clutter.Vertex.alloc} or + * clutter_vertex_copy(). + */ + public free(): void; + /** + * Initializes #vertex with the given coordinates. + * @param x X coordinate + * @param y Y coordinate + * @param z Z coordinate + * @returns the initialized {@link Vertex} + */ + public init(x: number, y: number, z: number): Vertex; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Animatable} instead. + */ + interface IAnimatable { + /** + * @deprecated + * Use {@link Clutter.Animatable.interpolate_value} + * instead + * + * Calls the {@link Animate.property} virtual function for #animatable. + * + * The #initial_value and #final_value #GValues must contain + * the same type; #value must have been initialized to the same + * type of #initial_value and #final_value. + * + * All implementation of the {@link Animatable} interface must + * implement this function. + * @param animation a {@link Animation} + * @param property_name the name of the animated property + * @param initial_value the initial value of the animation interval + * @param final_value the final value of the animation interval + * @param progress the progress factor + * @param value return location for the animation value + * @returns %TRUE if the value has been validated and can + * be applied to the {@link Animatable}, and %FALSE otherwise + */ + animate_property(animation: Animation, property_name: string, initial_value: GObject.Value, final_value: GObject.Value, progress: number, value: GObject.Value): boolean; + /** + * Finds the #GParamSpec for #property_name + * @param property_name the name of the animatable property to find + * @returns The #GParamSpec for the given property + * or %NULL + */ + find_property(property_name: string): GObject.ParamSpec; + /** + * Retrieves the current state of #property_name and sets #value with it + * @param property_name the name of the animatable property to retrieve + * @param value a #GValue initialized to the type of the property to retrieve + */ + get_initial_state(property_name: string, value: GObject.Value): void; + /** + * Asks a {@link Animatable} implementation to interpolate a + * a named property between the initial and final values of + * a #ClutterInterval, using #progress as the interpolation + * value, and store the result inside #value. + * + * This function should be used for every property animation + * involving #ClutterAnimatables. + * + * This function replaces {@link Clutter.Animatable.animate_property}. + * @param property_name the name of the property to interpolate + * @param interval a {@link Interval} with the animation range + * @param progress the progress to use to interpolate between the + * initial and final values of the #interval + * @returns %TRUE if the interpolation was successful, + * and %FALSE otherwise + * + * return location for an initialized #GValue + * using the same type of the #interval + */ + interpolate_value(property_name: string, interval: Interval, progress: number): [ boolean, GObject.Value ]; + /** + * Sets the current state of #property_name to #value + * @param property_name the name of the animatable property to set + * @param value the value of the animatable property to set + */ + set_final_state(property_name: string, value: GObject.Value): void; + } + + type AnimatableInitOptionsMixin = {}; + export interface AnimatableInitOptions extends AnimatableInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Animatable} instead. + */ + type AnimatableMixin = IAnimatable; + + /** + * {@link Animatable} is an opaque structure whose members cannot be directly + * accessed + */ + interface Animatable extends AnimatableMixin {} + + class Animatable { + public constructor(options?: Partial); + } + + + + /** This construct is only for enabling class multi-inheritance, + * use {@link Container} instead. + */ + interface IContainer { + /** + * @deprecated + * Use {@link Clutter.Actor.add_child} instead. + * + * Adds a list of {@link Actor}s to #container. Each time and + * actor is added, the "actor-added" signal is emitted. Each actor should + * be parented to #container, which takes a reference on the actor. You + * cannot add a #ClutterActor to more than one #ClutterContainer. + * + * This function will call #ClutterContainerIface.add(), which is a + * deprecated virtual function. The default implementation will + * call clutter_actor_add_child(). + * @param first_actor the first {@link Actor} to add + */ + add(first_actor: Actor): void; + /** + * @deprecated + * Use {@link Clutter.Actor.add_child} instead. + * + * Adds a {@link Actor} to #container. This function will emit the + * "actor-added" signal. The actor should be parented to + * #container. You cannot add a #ClutterActor to more than one + * #ClutterContainer. + * + * This function will call #ClutterContainerIface.add(), which is a + * deprecated virtual function. The default implementation will + * call clutter_actor_add_child(). + * @param actor the first {@link Actor} to add + */ + add_actor(actor: Actor): void; + /** + * @deprecated + * Use {@link Clutter.Actor.add_child} instead. + * + * Alternative va_list version of {@link Clutter.Container.add}. + * + * This function will call {@link ContainerIface}.add(), which is a + * deprecated virtual function. The default implementation will + * call clutter_actor_add_child(). + * @param first_actor the first {@link Actor} to add + * @param var_args list of actors to add, followed by %NULL + */ + add_valist(first_actor: Actor, var_args: any[]): void; + /** + * Gets #container specific properties of an actor. + * + * In general, a copy is made of the property contents and the caller is + * responsible for freeing the memory in the appropriate manner for the type, for + * instance by calling {@link GObject.free} or g_object_unref(). + * @param actor a {@link Actor} that is a child of #container. + * @param first_prop name of the first property to be set. + */ + child_get(actor: Actor, first_prop: string): void; + /** + * Gets a container specific property of a child of #container, In general, + * a copy is made of the property contents and the caller is responsible for + * freeing the memory by calling {@link GObject.Value.unset}. + * + * Note that clutter_container_child_set_property() is really intended for + * language bindings, clutter_container_child_set() is much more convenient + * for C programming. + * @param child a {@link Actor} that is a child of #container. + * @param property the name of the property to set. + * @param value the value. + */ + child_get_property(child: Actor, property: string, value: GObject.Value): void; + /** + * Calls the {@link {@link ContainerIface}.child.notify} virtual function + * of #ClutterContainer. The default implementation will emit the + * #ClutterContainer::child-notify signal. + * @param child a {@link Actor} + * @param pspec a #GParamSpec + */ + child_notify(child: Actor, pspec: GObject.ParamSpec): void; + /** + * Sets container specific properties on the child of a container. + * @param actor a {@link Actor} that is a child of #container. + * @param first_prop name of the first property to be set. + */ + child_set(actor: Actor, first_prop: string): void; + /** + * Sets a container-specific property on a child of #container. + * @param child a {@link Actor} that is a child of #container. + * @param property the name of the property to set. + * @param value the value. + */ + child_set_property(child: Actor, property: string, value: GObject.Value): void; + /** + * Creates the {@link ChildMeta} wrapping #actor inside the + * #container, if the #ClutterContainerIface::child_meta_type + * class member is not set to %G_TYPE_INVALID. + * + * This function is only useful when adding a #ClutterActor to + * a #ClutterContainer implementation outside of the + * #ClutterContainer::add() virtual function implementation. + * + * Applications should not call this function. + * @param actor a {@link Actor} + */ + create_child_meta(actor: Actor): void; + /** + * Destroys the {@link ChildMeta} wrapping #actor inside the + * #container, if any. + * + * This function is only useful when removing a #ClutterActor to + * a #ClutterContainer implementation outside of the + * #ClutterContainer::add() virtual function implementation. + * + * Applications should not call this function. + * @param actor a {@link Actor} + */ + destroy_child_meta(actor: Actor): void; + /** + * Finds a child actor of a container by its name. Search recurses + * into any child container. + * @param child_name the name of the requested child. + * @returns The child actor with the requested name, + * or %NULL if no actor with that name was found. + */ + find_child_by_name(child_name: string): Actor; + /** + * @deprecated + * Use {@link Clutter.Actor.get_first_child} or + * clutter_actor_get_last_child() to retrieve the beginning of + * the list of children, and clutter_actor_get_next_sibling() + * and clutter_actor_get_previous_sibling() to iterate over it; + * alternatively, use the {@link ActorIter} API. + * + * Calls #callback for each child of #container that was added + * by the application (with {@link Clutter.Container.add_actor}). Does + * not iterate over "internal" children that are part of the + * container's own implementation, if any. + * + * This function calls the {@link ContainerIface}.foreach() + * virtual function, which has been deprecated. + * @param callback a function to be called for each child + */ + foreach(callback: Callback): void; + /** + * @deprecated + * See {@link Clutter.Container.foreach}. + * + * Calls #callback for each child of #container, including "internal" + * children built in to the container itself that were never added + * by the application. + * + * This function calls the {@link {@link ContainerIface}.foreach.with_internals} + * virtual function, which has been deprecated. + * @param callback a function to be called for each child + */ + foreach_with_internals(callback: Callback): void; + /** + * Retrieves the {@link ChildMeta} which contains the data about the + * #container specific state for #actor. + * @param actor a {@link Actor} that is a child of #container. + * @returns the {@link ChildMeta} for the #actor child + * of #container or %NULL if the specifiec actor does not exist or the + * container is not configured to provide #ClutterChildMetas + */ + get_child_meta(actor: Actor): ChildMeta; + /** + * @deprecated + * Use {@link Clutter.Actor.get_children} instead. + * + * Retrieves all the children of #container. + * @returns a list + * of {@link Actor}s. Use {@link GObject.list_free} on the returned + * list when done. + */ + get_children(): Actor[]; + /** + * @deprecated + * Use {@link Clutter.Actor.set_child_below_sibling} instead. + * + * Lowers #actor to #sibling level, in the depth ordering. + * + * This function calls the {@link ContainerIface}.lower() virtual function, + * which has been deprecated. The default implementation will call + * clutter_actor_set_child_below_sibling(). + * @param actor the actor to raise + * @param sibling the sibling to lower to, or %NULL to lower + * to the bottom + */ + lower_child(actor: Actor, sibling: Actor | null): void; + /** + * @deprecated + * Use {@link Clutter.Actor.set_child_above_sibling} instead. + * + * Raises #actor to #sibling level, in the depth ordering. + * + * This function calls the {@link ContainerIface}.raise() virtual function, + * which has been deprecated. The default implementation will call + * clutter_actor_set_child_above_sibling(). + * @param actor the actor to raise + * @param sibling the sibling to raise to, or %NULL to raise + * to the top + */ + raise_child(actor: Actor, sibling: Actor | null): void; + /** + * @deprecated + * Use {@link Clutter.Actor.remove_child} instead. + * + * Removes a %NULL terminated list of {@link Actor}s from + * #container. Each actor should be unparented, so if you want to keep it + * around you must hold a reference to it yourself, using {@link GObject.Object.ref}. + * Each time an actor is removed, the "actor-removed" signal is + * emitted by #container. + * + * This function will call #ClutterContainerIface.remove(), which is a + * deprecated virtual function. The default implementation will call + * clutter_actor_remove_child(). + * @param first_actor first {@link Actor} to remove + */ + remove(first_actor: Actor): void; + /** + * @deprecated + * Use {@link Clutter.Actor.remove_child} instead. + * + * Removes #actor from #container. The actor should be unparented, so + * if you want to keep it around you must hold a reference to it + * yourself, using {@link GObject.Object.ref}. When the actor has been removed, + * the "actor-removed" signal is emitted by #container. + * + * This function will call {@link ContainerIface}.remove(), which is a + * deprecated virtual function. The default implementation will call + * clutter_actor_remove_child(). + * @param actor a {@link Actor} + */ + remove_actor(actor: Actor): void; + /** + * @deprecated + * Use {@link Clutter.Actor.remove_child} instead. + * + * Alternative va_list version of {@link Clutter.Container.remove}. + * + * This function will call {@link ContainerIface}.remove(), which is a + * deprecated virtual function. The default implementation will call + * clutter_actor_remove_child(). + * @param first_actor the first {@link Actor} to add + * @param var_args list of actors to remove, followed by %NULL + */ + remove_valist(first_actor: Actor, var_args: any[]): void; + /** + * @deprecated + * The {@link {@link ContainerIface}.sort.depth_order} virtual + * function should not be used any more; the default implementation in + * #ClutterContainer does not do anything. + * + * Sorts a container's children using their depth. This function should not + * be normally used by applications. + */ + sort_depth_order(): void; + /** + * The ::actor-added signal is emitted each time an actor + * has been added to #container. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the new child that has been added to #container + * + * @returns Callback ID + */ + connect(signal: "actor-added", callback: (owner: this, actor: Actor) => void): number; + /** + * The ::actor-removed signal is emitted each time an actor + * is removed from #container. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the child that has been removed from #container + * + * @returns Callback ID + */ + connect(signal: "actor-removed", callback: (owner: this, actor: Actor) => void): number; + /** + * The ::child-notify signal is emitted each time a property is + * being set through the {@link Clutter.Container.child_set} and + * clutter_container_child_set_property() calls. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: the child that has had a property set + * - pspec: the #GParamSpec of the property set + * + * @returns Callback ID + */ + connect(signal: "child-notify", callback: (owner: this, actor: Actor, pspec: GObject.ParamSpec) => void): number; + + } + + type ContainerInitOptionsMixin = {}; + export interface ContainerInitOptions extends ContainerInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Container} instead. + */ + type ContainerMixin = IContainer; + + /** + * {@link Container} is an opaque structure whose members cannot be directly + * accessed + */ + interface Container extends ContainerMixin {} + + class Container { + public constructor(options?: Partial); + /** + * Looks up the #GParamSpec for a child property of #klass. + * @param klass a #GObjectClass implementing the {@link Container} interface. + * @param property_name a property name. + * @returns The #GParamSpec for the property or %NULL + * if no such property exist. + */ + public static class_find_child_property(klass: GObject.Object, property_name: string): GObject.ParamSpec; + /** + * Returns an array of #GParamSpec for all child properties. + * @param klass a #GObjectClass implementing the {@link Container} interface. + * @returns an array + * of #GParamSpecs which should be freed after use. + * + * return location for length of returned array. + */ + public static class_list_child_properties(klass: GObject.Object): [ GObject.ParamSpec[], number ]; + } + + + + /** This construct is only for enabling class multi-inheritance, + * use {@link Content} instead. + */ + interface IContent { + /** + * Retrieves the natural size of the #content, if any. + * + * The natural size of a {@link Content} is defined as the size the content + * would have regardless of the allocation of the actor that is painting it, + * for instance the size of an image data. + * @returns %TRUE if the content has a preferred size, and %FALSE + * otherwise + * + * return location for the natural width of the content + * + * return location for the natural height of the content + */ + get_preferred_size(): [ boolean, number, number ]; + /** + * Invalidates a {@link Content}. + * + * This function should be called by #ClutterContent implementations when + * they change the way a the content should be painted regardless of the + * actor state. + */ + invalidate(): void; + /** + * This signal is emitted each time a {@link Content} implementation is + * assigned to a #ClutterActor. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: a {@link Actor} + * + * @returns Callback ID + */ + connect(signal: "attached", callback: (owner: this, actor: Actor) => void): number; + /** + * This signal is emitted each time a {@link Content} implementation is + * removed from a #ClutterActor. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - actor: a {@link Actor} + * + * @returns Callback ID + */ + connect(signal: "detached", callback: (owner: this, actor: Actor) => void): number; + + } + + type ContentInitOptionsMixin = {}; + export interface ContentInitOptions extends ContentInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Content} instead. + */ + type ContentMixin = IContent; + + /** + * The {@link Content} structure is an opaque type + * whose members cannot be acccessed directly. + */ + interface Content extends ContentMixin {} + + class Content { + public constructor(options?: Partial); + } + + + + /** This construct is only for enabling class multi-inheritance, + * use {@link Media} instead. + */ + interface IMedia { + /** + * The volume of the audio, as a normalized value between + * 0.0 and 1.0. + */ + audio_volume: number; + /** + * The fill level of the buffer for the current stream, + * as a value between 0.0 and 1.0. + */ + readonly buffer_fill: number; + /** + * Whether the current stream is seekable. + */ + readonly can_seek: boolean; + /** + * The duration of the current stream, in seconds + */ + readonly duration: number; + /** + * Whether the {@link Media} actor is playing. + */ + playing: boolean; + /** + * The current progress of the playback, as a normalized + * value between 0.0 and 1.0. + */ + progress: number; + /** + * The font used to display subtitles. The font description has to + * follow the same grammar as the one recognized by + * {@link Pango.font.description_from_string}. + */ + subtitle_font_name: string; + /** + * The location of a subtitle file, expressed as a valid URI. + */ + subtitle_uri: string; + /** + * The location of a media file, expressed as a valid URI. + */ + uri: string; + /** + * Retrieves the playback volume of #media. + * @returns The playback volume between 0.0 and 1.0 + */ + get_audio_volume(): number; + /** + * Retrieves the amount of the stream that is buffered. + * @returns the fill level, between 0.0 and 1.0 + */ + get_buffer_fill(): number; + /** + * Retrieves whether #media is seekable or not. + * @returns %TRUE if #media can seek, %FALSE otherwise. + */ + get_can_seek(): boolean; + /** + * Retrieves the duration of the media stream that #media represents. + * @returns the duration of the media stream, in seconds + */ + get_duration(): number; + /** + * Retrieves the playing status of #media. + * @returns %TRUE if playing, %FALSE if stopped. + */ + get_playing(): boolean; + /** + * Retrieves the playback progress of #media. + * @returns the playback progress, between 0.0 and 1.0 + */ + get_progress(): number; + /** + * Retrieves the font name currently used. + * @returns a string containing the font name. Use {@link GObject.free} + * to free the returned string + */ + get_subtitle_font_name(): string; + /** + * Retrieves the URI of the subtitle file in use. + * @returns the URI of the subtitle file. Use {@link GObject.free} + * to free the returned string + */ + get_subtitle_uri(): string; + /** + * Retrieves the URI from #media. + * @returns the URI of the media stream. Use {@link GObject.free} + * to free the returned string + */ + get_uri(): string; + /** + * Sets the playback volume of #media to #volume. + * @param volume the volume as a double between 0.0 and 1.0 + */ + set_audio_volume(volume: number): void; + /** + * Sets the source of #media using a file path. + * @param filename A filename + */ + set_filename(filename: string): void; + /** + * Starts or stops playing of #media. + * + * The implementation might be asynchronous, so the way to know whether + * the actual playing state of the #media is to use the #GObject::notify + * signal on the {@link Media.playing} property and then retrieve the + * current state with {@link Clutter.Media.get_playing}. ClutterGstVideoTexture + * in clutter-gst is an example of such an asynchronous implementation. + * @param playing %TRUE to start playing + */ + set_playing(playing: boolean): void; + /** + * Sets the playback progress of #media. The #progress is + * a normalized value between 0.0 (begin) and 1.0 (end). + * @param progress the progress of the playback, between 0.0 and 1.0 + */ + set_progress(progress: number): void; + /** + * Sets the font used by the subtitle renderer. The #font_name string must be + * either %NULL, which means that the default font name of the underlying + * implementation will be used; or must follow the grammar recognized by + * {@link Pango.font.description_from_string} like: + * + * |[ + * clutter_media_set_subtitle_font_name (media, "Sans 24pt"); + * ]| + * @param font_name a font name, or %NULL to set the default font name + */ + set_subtitle_font_name(font_name: string): void; + /** + * Sets the location of a subtitle file to display while playing #media. + * @param uri the URI of a subtitle file + */ + set_subtitle_uri(uri: string): void; + /** + * Sets the URI of #media to #uri. + * @param uri the URI of the media stream + */ + set_uri(uri: string): void; + /** + * The ::eos signal is emitted each time the media stream ends. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * + * @returns Callback ID + */ + connect(signal: "eos", callback: (owner: this) => void): number; + /** + * The ::error signal is emitted each time an error occurred. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - error: the #GError + * + * @returns Callback ID + */ + connect(signal: "error", callback: (owner: this, error: GLib.Error) => void): number; + + connect(signal: "notify::audio-volume", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::buffer-fill", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::can-seek", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::duration", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::playing", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::progress", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::subtitle-font-name", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::subtitle-uri", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::uri", callback: (owner: this, ...args: any) => void): number; + + } + + type MediaInitOptionsMixin = Pick; + + export interface MediaInitOptions extends MediaInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Media} instead. + */ + type MediaMixin = IMedia; + + /** + * {@link Media} is an opaque structure whose members cannot be directly + * accessed + */ + interface Media extends MediaMixin {} + + class Media { + public constructor(options?: Partial); + } + + + + /** This construct is only for enabling class multi-inheritance, + * use {@link Scriptable} instead. + */ + interface IScriptable { + /** + * Retrieves the id of #scriptable set using {@link Clutter.Scriptable.set_id}. + * @returns the id of the object. The returned string is owned by + * the scriptable object and should never be modified of freed + */ + get_id(): string; + /** + * Parses the passed JSON node. The implementation must set the type + * of the passed #GValue pointer using {@link GObject.Value.init}. + * @param script the {@link Script} creating the scriptable instance + * @param value the generic value to be set + * @param name the name of the node + * @param node the JSON node to be parsed + * @returns %TRUE if the node was successfully parsed, %FALSE otherwise. + */ + // parse_custom_node(script: Script, value: GObject.Value, name: string, node: Json.Node): boolean; + /** + * Overrides the common properties setting. The underlying virtual + * function should be used when implementing custom properties. + * @param script the {@link Script} creating the scriptable instance + * @param name the name of the property + * @param value the value of the property + */ + set_custom_property(script: Script, name: string, value: GObject.Value): void; + /** + * Sets #id_ as the unique Clutter script it for this instance of + * {@link ScriptableIface}. + * + * This name can be used by user interface designer applications to + * define a unique name for an object constructable using the UI + * definition language parsed by #ClutterScript. + * @param id_ the {@link Script} id of the object + */ + set_id(id_: string): void; + } + + type ScriptableInitOptionsMixin = {}; + export interface ScriptableInitOptions extends ScriptableInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Scriptable} instead. + */ + type ScriptableMixin = IScriptable; + + /** + * {@link Scriptable} is an opaque structure whose members cannot be directly + * accessed + */ + interface Scriptable extends ScriptableMixin {} + + class Scriptable { + public constructor(options?: Partial); + } + + + + /** + * Controls how a {@link Actor} should align itself inside the extra space + * assigned to it during the allocation. + * + * Alignment only matters if the allocated space given to an actor is + * bigger than its natural size; for example, when the #ClutterActor:x-expand + * or the #ClutterActor:y-expand properties of #ClutterActor are set to %TRUE. + */ + enum ActorAlign { + /** + * Stretch to cover the whole allocated space + */ + FILL = 0, + /** + * Snap to left or top side, leaving space + * to the right or bottom. For horizontal layouts, in right-to-left + * locales this should be reversed. + */ + START = 1, + /** + * Center the actor inside the allocation + */ + CENTER = 2, + /** + * Snap to right or bottom side, leaving space + * to the left or top. For horizontal layouts, in right-to-left locales + * this should be reversed. + */ + END = 3 + } + + /** + * Specifies the axis on which {@link AlignConstraint} should maintain + * the alignment. + */ + enum AlignAxis { + /** + * Maintain the alignment on the X axis + */ + X_AXIS = 0, + /** + * Maintain the alignment on the Y axis + */ + Y_AXIS = 1, + /** + * Maintain the alignment on both the X and Y axis + */ + BOTH = 2 + } + + /** + * The animation modes used by {@link Alpha} and #ClutterAnimation. This + * enumeration can be expanded in later versions of Clutter. + * + *
+ * Easing modes provided by Clutter + * + *
+ * + * Every global alpha function registered using {@link Clutter.Alpha.register_func} + * or clutter_alpha_register_closure() will have a logical id greater than + * %CLUTTER_ANIMATION_LAST. + */ + enum AnimationMode { + /** + * custom progress function + */ + CUSTOM_MODE = 0, + /** + * linear tweening + */ + LINEAR = 1, + /** + * quadratic tweening + */ + EASE_IN_QUAD = 2, + /** + * quadratic tweening, inverse of + * %CLUTTER_EASE_IN_QUAD + */ + EASE_OUT_QUAD = 3, + /** + * quadratic tweening, combininig + * %CLUTTER_EASE_IN_QUAD and %CLUTTER_EASE_OUT_QUAD + */ + EASE_IN_OUT_QUAD = 4, + /** + * cubic tweening + */ + EASE_IN_CUBIC = 5, + /** + * cubic tweening, invers of + * %CLUTTER_EASE_IN_CUBIC + */ + EASE_OUT_CUBIC = 6, + /** + * cubic tweening, combining + * %CLUTTER_EASE_IN_CUBIC and %CLUTTER_EASE_OUT_CUBIC + */ + EASE_IN_OUT_CUBIC = 7, + /** + * quartic tweening + */ + EASE_IN_QUART = 8, + /** + * quartic tweening, inverse of + * %CLUTTER_EASE_IN_QUART + */ + EASE_OUT_QUART = 9, + /** + * quartic tweening, combining + * %CLUTTER_EASE_IN_QUART and %CLUTTER_EASE_OUT_QUART + */ + EASE_IN_OUT_QUART = 10, + /** + * quintic tweening + */ + EASE_IN_QUINT = 11, + /** + * quintic tweening, inverse of + * %CLUTTER_EASE_IN_QUINT + */ + EASE_OUT_QUINT = 12, + /** + * fifth power tweening, combining + * %CLUTTER_EASE_IN_QUINT and %CLUTTER_EASE_OUT_QUINT + */ + EASE_IN_OUT_QUINT = 13, + /** + * sinusoidal tweening + */ + EASE_IN_SINE = 14, + /** + * sinusoidal tweening, inverse of + * %CLUTTER_EASE_IN_SINE + */ + EASE_OUT_SINE = 15, + /** + * sine wave tweening, combining + * %CLUTTER_EASE_IN_SINE and %CLUTTER_EASE_OUT_SINE + */ + EASE_IN_OUT_SINE = 16, + /** + * exponential tweening + */ + EASE_IN_EXPO = 17, + /** + * exponential tweening, inverse of + * %CLUTTER_EASE_IN_EXPO + */ + EASE_OUT_EXPO = 18, + /** + * exponential tweening, combining + * %CLUTTER_EASE_IN_EXPO and %CLUTTER_EASE_OUT_EXPO + */ + EASE_IN_OUT_EXPO = 19, + /** + * circular tweening + */ + EASE_IN_CIRC = 20, + /** + * circular tweening, inverse of + * %CLUTTER_EASE_IN_CIRC + */ + EASE_OUT_CIRC = 21, + /** + * circular tweening, combining + * %CLUTTER_EASE_IN_CIRC and %CLUTTER_EASE_OUT_CIRC + */ + EASE_IN_OUT_CIRC = 22, + /** + * elastic tweening, with offshoot on start + */ + EASE_IN_ELASTIC = 23, + /** + * elastic tweening, with offshoot on end + */ + EASE_OUT_ELASTIC = 24, + /** + * elastic tweening with offshoot on both ends + */ + EASE_IN_OUT_ELASTIC = 25, + /** + * overshooting cubic tweening, with + * backtracking on start + */ + EASE_IN_BACK = 26, + /** + * overshooting cubic tweening, with + * backtracking on end + */ + EASE_OUT_BACK = 27, + /** + * overshooting cubic tweening, with + * backtracking on both ends + */ + EASE_IN_OUT_BACK = 28, + /** + * exponentially decaying parabolic (bounce) + * tweening, with bounce on start + */ + EASE_IN_BOUNCE = 29, + /** + * exponentially decaying parabolic (bounce) + * tweening, with bounce on end + */ + EASE_OUT_BOUNCE = 30, + /** + * exponentially decaying parabolic (bounce) + * tweening, with bounce on both ends + */ + EASE_IN_OUT_BOUNCE = 31, + /** + * parametrized step function; see {@link Clutter.Timeline.set_step_progress} + * for further details. (Since 1.12) + */ + STEPS = 32, + /** + * equivalent to %CLUTTER_STEPS with a number of steps + * equal to 1, and a step mode of %CLUTTER_STEP_MODE_START. (Since 1.12) + */ + STEP_START = 33, + /** + * equivalent to %CLUTTER_STEPS with a number of steps + * equal to 1, and a step mode of %CLUTTER_STEP_MODE_END. (Since 1.12) + */ + STEP_END = 34, + /** + * cubic bezier between (0, 0) and (1, 1) with two + * control points; see {@link Clutter.Timeline.set_cubic_bezier_progress}. (Since 1.12) + */ + CUBIC_BEZIER = 35, + /** + * equivalent to %CLUTTER_CUBIC_BEZIER with control points + * in (0.25, 0.1) and (0.25, 1.0). (Since 1.12) + */ + EASE = 36, + /** + * equivalent to %CLUTTER_CUBIC_BEZIER with control points + * in (0.42, 0) and (1.0, 1.0). (Since 1.12) + */ + EASE_IN = 37, + /** + * equivalent to %CLUTTER_CUBIC_BEZIER with control points + * in (0, 0) and (0.58, 1.0). (Since 1.12) + */ + EASE_OUT = 38, + /** + * equivalent to %CLUTTER_CUBIC_BEZIER with control points + * in (0.42, 0) and (0.58, 1.0). (Since 1.12) + */ + EASE_IN_OUT = 39, + /** + * last animation mode, used as a guard for + * registered global alpha functions + */ + ANIMATION_LAST = 40 + } + + /** + * The alignment policies available on each axis for {@link BinLayout} + */ + enum BinAlignment { + /** + * Fixed position alignment; the + * {@link BinLayout} will honour the fixed position provided + * by the actors themselves when allocating them + */ + FIXED = 0, + /** + * Fill the allocation size + */ + FILL = 1, + /** + * Position the actors at the top + * or left side of the container, depending on the axis + */ + START = 2, + /** + * Position the actors at the bottom + * or right side of the container, depending on the axis + */ + END = 3, + /** + * Position the actors at the + * center of the container, depending on the axis + */ + CENTER = 4 + } + + /** + * Specifies which property should be used in a binding + */ + enum BindCoordinate { + /** + * Bind the X coordinate + */ + X = 0, + /** + * Bind the Y coordinate + */ + Y = 1, + /** + * Bind the width + */ + WIDTH = 2, + /** + * Bind the height + */ + HEIGHT = 3, + /** + * Equivalent to to %CLUTTER_BIND_X and + * %CLUTTER_BIND_Y (added in Clutter 1.6) + */ + POSITION = 4, + /** + * Equivalent to %CLUTTER_BIND_WIDTH and + * %CLUTTER_BIND_HEIGHT (added in Clutter 1.6) + */ + SIZE = 5, + /** + * Equivalent to %CLUTTER_BIND_POSITION and + * %CLUTTER_BIND_SIZE (added in Clutter 1.10) + */ + ALL = 6 + } + + /** + * The alignment policies available on each axis of the {@link BoxLayout} + */ + enum BoxAlignment { + /** + * Align the child to the top or to + * to the left, depending on the used axis + */ + START = 0, + /** + * Align the child to the bottom or to + * the right, depending on the used axis + */ + END = 1, + /** + * Align the child to the center + */ + CENTER = 2 + } + + /** + * Controls the alignment of the {@link Content} inside a #ClutterActor. + */ + enum ContentGravity { + /** + * Align the content to the top left corner + */ + TOP_LEFT = 0, + /** + * Align the content to the top edge + */ + TOP = 1, + /** + * Align the content to the top right corner + */ + TOP_RIGHT = 2, + /** + * Align the content to the left edge + */ + LEFT = 3, + /** + * Align the content to the center + */ + CENTER = 4, + /** + * Align the content to the right edge + */ + RIGHT = 5, + /** + * Align the content to the bottom left corner + */ + BOTTOM_LEFT = 6, + /** + * Align the content to the bottom edge + */ + BOTTOM = 7, + /** + * Align the content to the bottom right corner + */ + BOTTOM_RIGHT = 8, + /** + * Resize the content to fill the allocation + */ + RESIZE_FILL = 9, + /** + * Resize the content to remain within the + * allocation, while maintaining the aspect ratio + */ + RESIZE_ASPECT = 10 + } + + /** + * The axis of the constraint that should be applied on the + * dragging action + */ + enum DragAxis { + /** + * No constraint + */ + AXIS_NONE = 0, + /** + * Set a constraint on the X axis + */ + X_AXIS = 1, + /** + * Set a constraint on the Y axis + */ + Y_AXIS = 2 + } + + /** + * Types of events. + */ + enum EventType { + /** + * Empty event + */ + NOTHING = 0, + /** + * Key press event + */ + KEY_PRESS = 1, + /** + * Key release event + */ + KEY_RELEASE = 2, + /** + * Pointer motion event + */ + MOTION = 3, + /** + * Actor enter event + */ + ENTER = 4, + /** + * Actor leave event + */ + LEAVE = 5, + /** + * Pointer button press event + */ + BUTTON_PRESS = 6, + /** + * Pointer button release event + */ + BUTTON_RELEASE = 7, + /** + * Pointer scroll event + */ + SCROLL = 8, + /** + * Stage state change event + */ + STAGE_STATE = 9, + /** + * Destroy notification event + */ + DESTROY_NOTIFY = 10, + /** + * Client message event + */ + CLIENT_MESSAGE = 11, + /** + * Stage delete event + */ + DELETE = 12, + /** + * A new touch event sequence has started; + * event added in 1.10 + */ + TOUCH_BEGIN = 13, + /** + * A touch event sequence has been updated; + * event added in 1.10 + */ + TOUCH_UPDATE = 14, + /** + * A touch event sequence has finished; + * event added in 1.10 + */ + TOUCH_END = 15, + /** + * A touch event sequence has been canceled; + * event added in 1.10 + */ + TOUCH_CANCEL = 16, + /** + * A pinch gesture event, the current state is + * determined by its phase field; event added in 1.24 + */ + TOUCHPAD_PINCH = 17, + /** + * A swipe gesture event, the current state is + * determined by its phase field; event added in 1.24 + */ + TOUCHPAD_SWIPE = 18, + /** + * Marks the end of the {@link EventType} enumeration; + * added in 1.10 + */ + EVENT_LAST = 19 + } + + /** + * The direction of the arrangement of the children inside + * a {@link FlowLayout} + */ + enum FlowOrientation { + /** + * Arrange the children of the flow layout + * horizontally first + */ + HORIZONTAL = 0, + /** + * Arrange the children of the flow layout + * vertically first + */ + VERTICAL = 1 + } + + /** + * Enum passed to the {@link Clutter.GestureAction.set_threshold_trigger_edge} + * function. + */ + enum GestureTriggerEdge { + /** + * Tell {@link GestureAction} that + * the gesture must begin immediately and there's no drag limit that + * will cause its cancellation; + */ + NONE = 0, + /** + * Tell {@link GestureAction} that + * it needs to wait until the drag threshold has been exceeded before + * considering that the gesture has begun; + */ + AFTER = 1, + /** + * Tell {@link GestureAction} that + * the gesture must begin immediately and that it must be cancelled + * once the drag exceed the configured threshold. + */ + BEFORE = 2 + } + + /** + * Gravity of the scaling operations. When a gravity different than + * %CLUTTER_GRAVITY_NONE is used, an actor is scaled keeping the position + * of the specified portion at the same coordinates. + */ + enum Gravity { + /** + * Do not apply any gravity + */ + NONE = 0, + /** + * Scale from topmost downwards + */ + NORTH = 1, + /** + * Scale from the top right corner + */ + NORTH_EAST = 2, + /** + * Scale from the right side + */ + EAST = 3, + /** + * Scale from the bottom right corner + */ + SOUTH_EAST = 4, + /** + * Scale from the bottom upwards + */ + SOUTH = 5, + /** + * Scale from the bottom left corner + */ + SOUTH_WEST = 6, + /** + * Scale from the left side + */ + WEST = 7, + /** + * Scale from the top left corner + */ + NORTH_WEST = 8, + /** + * Scale from the center. + */ + CENTER = 9 + } + + /** + * Grid position modes. + */ + enum GridPosition { + /** + * left position + */ + LEFT = 0, + /** + * right position + */ + RIGHT = 1, + /** + * top position + */ + TOP = 2, + /** + * bottom position + */ + BOTTOM = 3 + } + + /** + * Error enumeration for {@link Image}. + */ + enum ImageError { + /** + * Invalid data passed to the + * {@link Clutter.Image.set_data} function. + */ + DATA = 0 + } + + /** + * Error conditions returned by clutter_init() and clutter_init_with_args(). + */ + enum InitError { + /** + * Initialisation successful + */ + SUCCESS = 1, + /** + * Unknown error + */ + ERROR_UNKNOWN = 0, + /** + * Thread initialisation failed + */ + ERROR_THREADS = -1, + /** + * Backend initialisation failed + */ + ERROR_BACKEND = -2, + /** + * Internal error + */ + ERROR_INTERNAL = -3 + } + + /** + * The type of axes Clutter recognizes on a {@link InputDevice} + */ + enum InputAxis { + /** + * Unused axis + */ + IGNORE = 0, + /** + * The position on the X axis + */ + X = 1, + /** + * The position of the Y axis + */ + Y = 2, + /** + * The pressure information + */ + PRESSURE = 3, + /** + * The tilt on the X axis + */ + XTILT = 4, + /** + * The tile on the Y axis + */ + YTILT = 5, + /** + * A wheel + */ + WHEEL = 6, + /** + * Distance (Since 1.12) + */ + DISTANCE = 7, + /** + * Last value of the enumeration; this value is + * useful when iterating over the enumeration values (Since 1.12) + */ + LAST = 8 + } + + /** + * The types of input devices available. + * + * The {@link InputDeviceType} enumeration can be extended at later + * date; not every platform supports every input device type. + */ + enum InputDeviceType { + /** + * A pointer device + */ + POINTER_DEVICE = 0, + /** + * A keyboard device + */ + KEYBOARD_DEVICE = 1, + /** + * A generic extension device + */ + EXTENSION_DEVICE = 2, + /** + * A joystick device + */ + JOYSTICK_DEVICE = 3, + /** + * A tablet device + */ + TABLET_DEVICE = 4, + /** + * A touchpad device + */ + TOUCHPAD_DEVICE = 5, + /** + * A touch screen device + */ + TOUCHSCREEN_DEVICE = 6, + /** + * A pen device + */ + PEN_DEVICE = 7, + /** + * An eraser device + */ + ERASER_DEVICE = 8, + /** + * A cursor device + */ + CURSOR_DEVICE = 9, + /** + * The number of device types + */ + N_DEVICE_TYPES = 10 + } + + /** + * The mode for input devices available. + */ + enum InputMode { + /** + * A master, virtual device + */ + MASTER = 0, + /** + * A slave, physical device, attached to + * a master device + */ + SLAVE = 1, + /** + * A slave, physical device, not attached + * to a master device + */ + FLOATING = 2 + } + + /** + * The mode of interpolation between key frames + */ + enum Interpolation { + /** + * linear interpolation + */ + LINEAR = 0, + /** + * cubic interpolation + */ + CUBIC = 1 + } + + /** + * The states for the {@link ClickAction.long_press} signal. + */ + enum LongPressState { + /** + * Queries the action whether it supports + * long presses + */ + QUERY = 0, + /** + * Activates the action on a long press + */ + ACTIVATE = 1, + /** + * The long press was cancelled + */ + CANCEL = 2 + } + + /** + * Represents the orientation of actors or layout managers. + */ + enum Orientation { + /** + * An horizontal orientation + */ + HORIZONTAL = 0, + /** + * A vertical orientation + */ + VERTICAL = 1 + } + + /** + * The axis of the constraint that should be applied on the + * panning action + */ + enum PanAxis { + /** + * No constraint + */ + AXIS_NONE = 0, + /** + * Set a constraint on the X axis + */ + X_AXIS = 1, + /** + * Set a constraint on the Y axis + */ + Y_AXIS = 2, + /** + * Constrain panning automatically based on initial + * movement (available since 1.24) + */ + AXIS_AUTO = 3 + } + + /** + * Types of nodes in a {@link Path}. + */ + enum PathNodeType { + /** + * jump to the given position + */ + MOVE_TO = 0, + /** + * create a line from the last node to the + * given position + */ + LINE_TO = 1, + /** + * bezier curve using the last position and + * three control points. + */ + CURVE_TO = 2, + /** + * create a line from the last node to the last + * %CLUTTER_PATH_MOVE_TO node. + */ + CLOSE = 3, + /** + * same as %CLUTTER_PATH_MOVE_TO but with + * coordinates relative to the last node. + */ + REL_MOVE_TO = 32, + /** + * same as %CLUTTER_PATH_LINE_TO but with + * coordinates relative to the last node. + */ + REL_LINE_TO = 33, + /** + * same as %CLUTTER_PATH_CURVE_TO but with + * coordinates relative to the last node. + */ + REL_CURVE_TO = 34 + } + + /** + * Controls the paint cycle of the scene graph when in pick mode + */ + enum PickMode { + /** + * Do not paint any actor + */ + NONE = 0, + /** + * Paint only the reactive actors + */ + REACTIVE = 1, + /** + * Paint all actors + */ + ALL = 2 + } + + /** + * Specifies the type of requests for a {@link Actor}. + */ + enum RequestMode { + /** + * Height for width requests + */ + HEIGHT_FOR_WIDTH = 0, + /** + * Width for height requests + */ + WIDTH_FOR_HEIGHT = 1, + /** + * Use the preferred size of the + * {@link Content}, if it has any (available since 1.22) + */ + CONTENT_SIZE = 2 + } + + /** + * Axis of a rotation. + */ + enum RotateAxis { + /** + * Rotate around the X axis + */ + X_AXIS = 0, + /** + * Rotate around the Y axis + */ + Y_AXIS = 1, + /** + * Rotate around the Z axis + */ + Z_AXIS = 2 + } + + /** + * Direction of a rotation. + */ + enum RotateDirection { + /** + * Clockwise rotation + */ + CW = 0, + /** + * Counter-clockwise rotation + */ + CCW = 1 + } + + /** + * The scaling filters to be used with the {@link Actor.minification_filter} + * and #ClutterActor:magnification-filter properties. + */ + enum ScalingFilter { + /** + * Linear interpolation filter + */ + LINEAR = 0, + /** + * Nearest neighbor interpolation filter + */ + NEAREST = 1, + /** + * Trilinear minification filter, with + * mipmap generation; this filter linearly interpolates on every axis, + * as well as between mipmap levels. + */ + TRILINEAR = 2 + } + + /** + * {@link Script} error enumeration. + */ + enum ScriptError { + /** + * Type function not found + * or invalid + */ + TYPE_FUNCTION = 0, + /** + * Property not found or invalid + */ + PROPERTY = 1, + /** + * Invalid value + */ + VALUE = 2 + } + + /** + * Direction of a pointer scroll event. + * + * The %CLUTTER_SCROLL_SMOOTH value implies that the {@link ScrollEvent} + * has precise scrolling delta information. + */ + enum ScrollDirection { + /** + * Scroll up + */ + UP = 0, + /** + * Scroll down + */ + DOWN = 1, + /** + * Scroll left + */ + LEFT = 2, + /** + * Scroll right + */ + RIGHT = 3, + /** + * Precise scrolling delta (available in 1.10) + */ + SMOOTH = 4 + } + + /** + * The scroll source determines the source of the scroll event. Keep in mind + * that the source device {@link InputDeviceType} is not enough to infer + * the scroll source. + */ + enum ScrollSource { + /** + * Source of scroll events is unknown. + */ + UNKNOWN = 0, + /** + * The scroll event is originated by a mouse wheel. + */ + WHEEL = 1, + /** + * The scroll event is originated by one or more + * fingers on the device (eg. touchpads). + */ + FINGER = 2, + /** + * The scroll event is originated by the + * motion of some device (eg. a scroll button is set). + */ + CONTINUOUS = 3 + } + + /** + * {@link Shader} error enumeration + */ + enum ShaderError { + /** + * No ASM shaders support + */ + NO_ASM = 0, + /** + * No GLSL shaders support + */ + NO_GLSL = 1, + /** + * Compilation error + */ + COMPILE = 2 + } + + /** + * The type of GLSL shader program + */ + enum ShaderType { + /** + * a vertex shader + */ + VERTEX_SHADER = 0, + /** + * a fragment shader + */ + FRAGMENT_SHADER = 1 + } + + /** + * The edge to snap + */ + enum SnapEdge { + /** + * the top edge + */ + TOP = 0, + /** + * the right edge + */ + RIGHT = 1, + /** + * the bottom edge + */ + BOTTOM = 2, + /** + * the left edge + */ + LEFT = 3 + } + + /** + * Named colors, for accessing global colors defined by Clutter + */ + enum StaticColor { + /** + * White color (ffffffff) + */ + WHITE = 0, + /** + * Black color (000000ff) + */ + BLACK = 1, + /** + * Red color (ff0000ff) + */ + RED = 2, + /** + * Dark red color (800000ff) + */ + DARK_RED = 3, + /** + * Green color (00ff00ff) + */ + GREEN = 4, + /** + * Dark green color (008000ff) + */ + DARK_GREEN = 5, + /** + * Blue color (0000ffff) + */ + BLUE = 6, + /** + * Dark blue color (000080ff) + */ + DARK_BLUE = 7, + /** + * Cyan color (00ffffff) + */ + CYAN = 8, + /** + * Dark cyan color (008080ff) + */ + DARK_CYAN = 9, + /** + * Magenta color (ff00ffff) + */ + MAGENTA = 10, + /** + * Dark magenta color (800080ff) + */ + DARK_MAGENTA = 11, + /** + * Yellow color (ffff00ff) + */ + YELLOW = 12, + /** + * Dark yellow color (808000ff) + */ + DARK_YELLOW = 13, + /** + * Gray color (a0a0a4ff) + */ + GRAY = 14, + /** + * Dark Gray color (808080ff) + */ + DARK_GRAY = 15, + /** + * Light gray color (c0c0c0ff) + */ + LIGHT_GRAY = 16, + /** + * Butter color (edd400ff) + */ + BUTTER = 17, + /** + * Light butter color (fce94fff) + */ + BUTTER_LIGHT = 18, + /** + * Dark butter color (c4a000ff) + */ + BUTTER_DARK = 19, + /** + * Orange color (f57900ff) + */ + ORANGE = 20, + /** + * Light orange color (fcaf3fff) + */ + ORANGE_LIGHT = 21, + /** + * Dark orange color (ce5c00ff) + */ + ORANGE_DARK = 22, + /** + * Chocolate color (c17d11ff) + */ + CHOCOLATE = 23, + /** + * Light chocolate color (e9b96eff) + */ + CHOCOLATE_LIGHT = 24, + /** + * Dark chocolate color (8f5902ff) + */ + CHOCOLATE_DARK = 25, + /** + * Chameleon color (73d216ff) + */ + CHAMELEON = 26, + /** + * Light chameleon color (8ae234ff) + */ + CHAMELEON_LIGHT = 27, + /** + * Dark chameleon color (4e9a06ff) + */ + CHAMELEON_DARK = 28, + /** + * Sky color (3465a4ff) + */ + SKY_BLUE = 29, + /** + * Light sky color (729fcfff) + */ + SKY_BLUE_LIGHT = 30, + /** + * Dark sky color (204a87ff) + */ + SKY_BLUE_DARK = 31, + /** + * Plum color (75507bff) + */ + PLUM = 32, + /** + * Light plum color (ad7fa8ff) + */ + PLUM_LIGHT = 33, + /** + * Dark plum color (5c3566ff) + */ + PLUM_DARK = 34, + /** + * Scarlet red color (cc0000ff) + */ + SCARLET_RED = 35, + /** + * Light scarlet red color (ef2929ff) + */ + SCARLET_RED_LIGHT = 36, + /** + * Dark scarlet red color (a40000ff) + */ + SCARLET_RED_DARK = 37, + /** + * Aluminium, first variant (eeeeecff) + */ + ALUMINIUM_1 = 38, + /** + * Aluminium, second variant (d3d7cfff) + */ + ALUMINIUM_2 = 39, + /** + * Aluminium, third variant (babdb6ff) + */ + ALUMINIUM_3 = 40, + /** + * Aluminium, fourth variant (888a85ff) + */ + ALUMINIUM_4 = 41, + /** + * Aluminium, fifth variant (555753ff) + */ + ALUMINIUM_5 = 42, + /** + * Aluminium, sixth variant (2e3436ff) + */ + ALUMINIUM_6 = 43, + /** + * Transparent color (00000000) + */ + TRANSPARENT = 44 + } + + /** + * Change the value transition of a step function. + * + * See {@link Clutter.Timeline.set_step_progress}. + */ + enum StepMode { + /** + * The change in the value of a + * %CLUTTER_STEP progress mode should occur at the start of + * the transition + */ + START = 0, + /** + * The change in the value of a + * %CLUTTER_STEP progress mode should occur at the end of + * the transition + */ + END = 1 + } + + /** + * The alignment policies available on each axis of the {@link TableLayout} + */ + enum TableAlignment { + /** + * Align the child to the top or to the + * left of a cell in the table, depending on the axis + */ + START = 0, + /** + * Align the child to the center of + * a cell in the table + */ + CENTER = 1, + /** + * Align the child to the bottom or to the + * right of a cell in the table, depending on the axis + */ + END = 2 + } + + /** + * The text direction to be used by {@link Actor}s + */ + enum TextDirection { + /** + * Use the default setting, as returned + * by {@link Clutter.get.default_text_direction} + */ + DEFAULT = 0, + /** + * Use left-to-right text direction + */ + LTR = 1, + /** + * Use right-to-left text direction + */ + RTL = 2 + } + + /** + * Error enumeration for {@link Texture} + */ + enum TextureError { + /** + * OOM condition + */ + OUT_OF_MEMORY = 0, + /** + * YUV operation attempted but no YUV support + * found + */ + NO_YUV = 1, + /** + * The requested format for + * clutter_texture_set_from_rgb_data or + * clutter_texture_set_from_yuv_data is unsupported. + */ + BAD_FORMAT = 2 + } + + /** + * Enumaration controlling the texture quality. + */ + enum TextureQuality { + /** + * fastest rendering will use nearest neighbour + * interpolation when rendering. good setting. + */ + LOW = 0, + /** + * higher quality rendering without using + * extra resources. + */ + MEDIUM = 1, + /** + * render the texture with the best quality + * available using extra memory. + */ + HIGH = 2 + } + + /** + * The direction of a {@link Timeline} + */ + enum TimelineDirection { + /** + * forward direction for a timeline + */ + FORWARD = 0, + /** + * backward direction for a timeline + */ + BACKWARD = 1 + } + + /** + * The phase of a touchpad gesture event. All gestures are guaranteed to + * begin with an event of type %CLUTTER_TOUCHPAD_GESTURE_PHASE_BEGIN, + * followed by a number of %CLUTTER_TOUCHPAD_GESTURE_PHASE_UPDATE (possibly 0). + * + * A finished gesture may have 2 possible outcomes, an event with phase + * %CLUTTER_TOUCHPAD_GESTURE_PHASE_END will be emitted when the gesture is + * considered successful, this should be used as the hint to perform any + * permanent changes. + * + * Cancelled gestures may be so for a variety of reasons, due to hardware, + * or due to the gesture recognition layers hinting the gesture did not + * finish resolutely (eg. a 3rd finger being added during a pinch gesture). + * In these cases, the last event with report the phase + * %CLUTTER_TOUCHPAD_GESTURE_PHASE_CANCEL, this should be used as a hint + * to undo any visible/permanent changes that were done throughout the + * progress of the gesture. + * + * See also {@link TouchpadPinchEvent} and #ClutterTouchpadPinchEvent. + */ + enum TouchpadGesturePhase { + /** + * The gesture has begun. + */ + BEGIN = 0, + /** + * The gesture has been updated. + */ + UPDATE = 1, + /** + * The gesture was finished, changes + * should be permanently applied. + */ + END = 2, + /** + * The gesture was cancelled, all + * changes should be undone. + */ + CANCEL = 3 + } + + /** + * The type of unit in which a value is expressed + * + * This enumeration might be expanded at later date + */ + enum UnitType { + /** + * Unit expressed in pixels (with subpixel precision) + */ + PIXEL = 0, + /** + * Unit expressed in em + */ + EM = 1, + /** + * Unit expressed in millimeters + */ + MM = 2, + /** + * Unit expressed in points + */ + POINT = 3, + /** + * Unit expressed in centimeters + */ + CM = 4 + } + + /** + * The axis of the constraint that should be applied by the + * zooming action. + */ + enum ZoomAxis { + /** + * Scale only on the X axis + */ + X_AXIS = 0, + /** + * Scale only on the Y axis + */ + Y_AXIS = 1, + /** + * Scale on both axis + */ + BOTH = 2 + } + + /** + * Flags used to signal the state of an actor. + */ + enum ActorFlags { + /** + * the actor will be painted (is visible, and inside + * a toplevel, and all parents visible) + */ + MAPPED = 2, + /** + * the resources associated to the actor have been + * allocated + */ + REALIZED = 4, + /** + * the actor 'reacts' to mouse events emmitting event + * signals + */ + REACTIVE = 8, + /** + * the actor has been shown by the application program + */ + VISIBLE = 16, + /** + * the actor provides an explicit layout management + * policy for its children; this flag will prevent Clutter from automatic + * queueing of relayout and will defer all layouting to the actor itself + */ + NO_LAYOUT = 32 + } + + /** + * Flags passed to the {@link ActorClass}.allocate() virtual function + * and to the clutter_actor_allocate() function. + */ + enum AllocationFlags { + /** + * No flag set + */ + ALLOCATION_NONE = 0, + /** + * Whether the absolute origin of the + * actor has changed; this implies that any ancestor of the actor has + * been moved. + */ + ABSOLUTE_ORIGIN_CHANGED = 2, + /** + * Whether the allocation should be delegated + * to the {@link LayoutManager} instance stored inside the + * #ClutterActor:layout-manager property of #ClutterActor. This flag + * should only be used if you are subclassing #ClutterActor and + * overriding the #ClutterActorClass.allocate() virtual function, but + * you wish to use the default implementation of the virtual function + * inside #ClutterActor. Added in Clutter 1.10. + */ + DELEGATE_LAYOUT = 4 + } + + /** + * Content repeat modes. + */ + enum ContentRepeat { + /** + * No repeat + */ + NONE = 0, + /** + * Repeat the content on the X axis + */ + X_AXIS = 1, + /** + * Repeat the content on the Y axis + */ + Y_AXIS = 2, + /** + * Repeat the content on both axis + */ + BOTH = 3 + } + + /** + * Flags passed to the ‘paint’ or ‘pick’ method of {@link Effect}. + */ + enum EffectPaintFlags { + /** + * The actor or one of its children + * has queued a redraw before this paint. This implies that the effect + * should call {@link Clutter.Actor.continue_paint} to chain to the next + * effect and can not cache any results from a previous paint. + */ + ACTOR_DIRTY = 1 + } + + /** + * Flags for the {@link Event} + */ + enum EventFlags { + /** + * No flag set + */ + NONE = 0, + /** + * Synthetic event + */ + FLAG_SYNTHETIC = 1 + } + + /** + * Runtime flags indicating specific features available via Clutter window + * system and graphics backend. + */ + enum FeatureFlags { + /** + * Set if NPOTS textures supported. + */ + TEXTURE_NPOT = 4, + /** + * Set if vblank syncing supported. + */ + SYNC_TO_VBLANK = 8, + /** + * Set if YUV based textures supported. + */ + TEXTURE_YUV = 16, + /** + * Set if texture pixels can be read. + */ + TEXTURE_READ_PIXELS = 32, + /** + * Set if stage size if fixed (i.e framebuffer) + */ + STAGE_STATIC = 64, + /** + * Set if stage is able to be user resized. + */ + STAGE_USER_RESIZE = 128, + /** + * Set if stage has a graphical cursor. + */ + STAGE_CURSOR = 256, + /** + * Set if the backend supports GLSL shaders. + */ + SHADERS_GLSL = 512, + /** + * Set if the backend supports offscreen rendering. + */ + OFFSCREEN = 1024, + /** + * Set if multiple stages are supported. + */ + STAGE_MULTIPLE = 2048, + /** + * Set if the GLX_INTEL_swap_event is supported. + */ + SWAP_EVENTS = 4096 + } + + /** + * Runtime flags to change the font quality. To be used with + * {@link Clutter.set.font_flags}. + */ + enum FontFlags { + /** + * Set to use mipmaps for the glyph cache textures. + */ + MIPMAPPING = 1, + /** + * Set to enable hinting on the glyphs. + */ + HINTING = 2 + } + + /** + * Masks applied to a {@link Event} by modifiers. + * + * Note that Clutter may add internal values to events which include + * reserved values such as %CLUTTER_MODIFIER_RESERVED_13_MASK. Your code + * should preserve and ignore them. You can use %CLUTTER_MODIFIER_MASK to + * remove all reserved values. + */ + enum ModifierType { + /** + * Mask applied by the Shift key + */ + SHIFT_MASK = 1, + /** + * Mask applied by the Caps Lock key + */ + LOCK_MASK = 2, + /** + * Mask applied by the Control key + */ + CONTROL_MASK = 4, + /** + * Mask applied by the first Mod key + */ + MOD1_MASK = 8, + /** + * Mask applied by the second Mod key + */ + MOD2_MASK = 16, + /** + * Mask applied by the third Mod key + */ + MOD3_MASK = 32, + /** + * Mask applied by the fourth Mod key + */ + MOD4_MASK = 64, + /** + * Mask applied by the fifth Mod key + */ + MOD5_MASK = 128, + /** + * Mask applied by the first pointer button + */ + BUTTON1_MASK = 256, + /** + * Mask applied by the second pointer button + */ + BUTTON2_MASK = 512, + /** + * Mask applied by the third pointer button + */ + BUTTON3_MASK = 1024, + /** + * Mask applied by the fourth pointer button + */ + BUTTON4_MASK = 2048, + /** + * Mask applied by the fifth pointer button + */ + BUTTON5_MASK = 4096, + MODIFIER_RESERVED_13_MASK = 8192, + MODIFIER_RESERVED_14_MASK = 16384, + MODIFIER_RESERVED_15_MASK = 32768, + MODIFIER_RESERVED_16_MASK = 65536, + MODIFIER_RESERVED_17_MASK = 131072, + MODIFIER_RESERVED_18_MASK = 262144, + MODIFIER_RESERVED_19_MASK = 524288, + MODIFIER_RESERVED_20_MASK = 1048576, + MODIFIER_RESERVED_21_MASK = 2097152, + MODIFIER_RESERVED_22_MASK = 4194304, + MODIFIER_RESERVED_23_MASK = 8388608, + MODIFIER_RESERVED_24_MASK = 16777216, + MODIFIER_RESERVED_25_MASK = 33554432, + /** + * Mask applied by the Super key + */ + SUPER_MASK = 67108864, + /** + * Mask applied by the Hyper key + */ + HYPER_MASK = 134217728, + /** + * Mask applied by the Meta key + */ + META_MASK = 268435456, + MODIFIER_RESERVED_29_MASK = 536870912, + /** + * Mask applied during release + */ + RELEASE_MASK = 1073741824, + /** + * A mask covering all modifier types + */ + MODIFIER_MASK = 1543512063 + } + + /** + * Possible flags to pass to {@link Clutter.Actor.set_offscreen_redirect}. + */ + enum OffscreenRedirect { + /** + * Only redirect + * the actor if it is semi-transparent and its {@link Has.overlaps} + * virtual returns %TRUE. This is the default. + */ + AUTOMATIC_FOR_OPACITY = 1, + /** + * Always redirect the actor to an + * offscreen buffer even if it is fully opaque. + */ + ALWAYS = 2 + } + + /** + * Flags to pass to {@link Clutter.threads.add_repaint_func_full}. + */ + enum RepaintFlags { + /** + * Run the repaint function prior to + * painting the stages + */ + PRE_PAINT = 1, + /** + * Run the repaint function after + * painting the stages + */ + POST_PAINT = 2, + /** + * Ensure that a new frame + * is queued after adding the repaint function + */ + QUEUE_REDRAW_ON_ADD = 4 + } + + /** + * Flags used to notify the axes that were stopped in a {@link ScrollEvent}. + * These can be used to trigger post-scroll effects like kinetic scrolling. + */ + enum ScrollFinishFlags { + /** + * no axis was stopped. + */ + NONE = 0, + /** + * The horizontal axis stopped. + */ + HORIZONTAL = 1, + /** + * The vertical axis stopped. + */ + VERTICAL = 2 + } + + /** + * Scroll modes. + */ + enum ScrollMode { + /** + * Ignore scrolling + */ + NONE = 0, + /** + * Scroll only horizontally + */ + HORIZONTALLY = 1, + /** + * Scroll only vertically + */ + VERTICALLY = 2, + /** + * Scroll in both directions + */ + BOTH = 3 + } + + /** + * Stage state masks, used by the {@link Event} of type %CLUTTER_STAGE_STATE. + */ + enum StageState { + /** + * Fullscreen mask + */ + FULLSCREEN = 2, + /** + * Offscreen mask (deprecated) + */ + OFFSCREEN = 4, + /** + * Activated mask + */ + ACTIVATED = 8 + } + + /** + * The main direction of the swipe gesture + */ + enum SwipeDirection { + /** + * Upwards swipe gesture + */ + UP = 1, + /** + * Downwards swipe gesture + */ + DOWN = 2, + /** + * Leftwards swipe gesture + */ + LEFT = 4, + /** + * Rightwards swipe gesture + */ + RIGHT = 8 + } + + /** + * Flags for {@link Clutter.Texture.set_from_rgb_data} and + * clutter_texture_set_from_yuv_data(). + */ + enum TextureFlags { + /** + * No flags + */ + NONE = 0, + /** + * Unused flag + */ + RGB_FLAG_BGR = 2, + /** + * Unused flag + */ + RGB_FLAG_PREMULT = 4, + /** + * Unused flag + */ + YUV_FLAG_YUV2 = 8 + } + + /** + * Creates a {@link Actor} using the #item in the model. + * + * The usual way to implement this function is to create a #ClutterActor + * instance and then bind the #GObject properties to the actor properties + * of interest, using {@link GObject.Object.bind_property}. This way, when the #item + * in the #GListModel changes, the #ClutterActor changes as well. + */ + interface ActorCreateChildFunc { + /** + * Creates a {@link Actor} using the #item in the model. + * + * The usual way to implement this function is to create a #ClutterActor + * instance and then bind the #GObject properties to the actor properties + * of interest, using {@link GObject.Object.bind_property}. This way, when the #item + * in the #GListModel changes, the #ClutterActor changes as well. + * @param item the item in the model + * @returns The newly created child {@link Actor} + */ + (item: GObject.Object): Actor; + } + + /** + * A function returning a value depending on the position of + * the {@link Timeline} bound to #alpha. + */ + interface AlphaFunc { + /** + * @deprecated + * Use {@link TimelineProgressFunc} instead. + * + * A function returning a value depending on the position of + * the {@link Timeline} bound to #alpha. + * @param alpha a {@link Alpha} + * @returns a floating point value + */ + (alpha: Alpha): number; + } + + /** + * This function is passed to {@link Clutter.Behaviour.actors_foreach} and + * will be called for each actor driven by #behaviour. + */ + interface BehaviourForeachFunc { + /** + * This function is passed to {@link Clutter.Behaviour.actors_foreach} and + * will be called for each actor driven by #behaviour. + * @param behaviour the {@link Behaviour} + * @param actor an actor driven by #behaviour + * @param data optional data passed to the function + */ + (behaviour: Behaviour, actor: Actor, data: any | null): void; + } + + /** + * The prototype for the callback function registered with + * {@link Clutter.BindingPool.install_action} and invoked by + * clutter_binding_pool_activate(). + */ + interface BindingActionFunc { + /** + * The prototype for the callback function registered with + * {@link Clutter.BindingPool.install_action} and invoked by + * clutter_binding_pool_activate(). + * @param gobject a #GObject + * @param action_name the name of the action + * @param key_val the key symbol + * @param modifiers bitmask of the modifier flags + * @returns the function should return %TRUE if the key + * binding has been handled, and return %FALSE otherwise + */ + (gobject: GObject.Object, action_name: string, key_val: number, modifiers: ModifierType): boolean; + } + + /** + * Generic callback + */ + interface Callback { + /** + * Generic callback + * @param actor a {@link Actor} + * @param data user data + */ + (actor: Actor, data: any | null): void; + } + + /** + * A function pointer type used by event filters that are added with + * {@link Clutter.event.add_filter}. + */ + interface EventFilterFunc { + /** + * A function pointer type used by event filters that are added with + * {@link Clutter.event.add_filter}. + * @param event the event that is going to be emitted + * @returns %CLUTTER_EVENT_STOP to indicate that the event + * has been handled or %CLUTTER_EVENT_PROPAGATE otherwise. + * Returning %CLUTTER_EVENT_STOP skips any further filter + * functions and prevents the signal emission for the event. + */ + (event: Event): boolean; + } + + /** + * Filters the content of a row in the model. + */ + interface ModelFilterFunc { + /** + * @deprecated + * Implement filters using a custom #GListModel instead + * + * Filters the content of a row in the model. + * @param model a {@link Model} + * @param iter the iterator for the row + * @returns If the row should be displayed, return %TRUE + */ + (model: Model, iter: ModelIter): boolean; + } + + /** + * Iterates on the content of a row in the model + */ + interface ModelForeachFunc { + /** + * @deprecated + * Use #GListModel + * + * Iterates on the content of a row in the model + * @param model a {@link Model} + * @param iter the iterator for the row + * @returns %TRUE if the iteration should continue, %FALSE otherwise + */ + (model: Model, iter: ModelIter): boolean; + } + + /** + * Compares the content of two rows in the model. + */ + interface ModelSortFunc { + /** + * @deprecated + * Implement sorting using a custom #GListModel instead + * + * Compares the content of two rows in the model. + * @param model a {@link Model} + * @param a a #GValue representing the contents of the row + * @param b a #GValue representing the contents of the second row + * @returns a positive integer if #a is after #b, a negative integer if + * #a is before #b, or 0 if the rows are the same + */ + (model: Model, a: GObject.Value, b: GObject.Value): number; + } + + /** + * This function is passed to {@link Clutter.Path.foreach} and will be + * called for each node contained in the path. + */ + interface PathCallback { + /** + * This function is passed to {@link Clutter.Path.foreach} and will be + * called for each node contained in the path. + * @param node the node + * @param data optional data passed to the function + */ + (node: PathNode, data: any | null): void; + } + + /** + * Prototype of the progress function used to compute the value + * between the two ends #a and #b of an interval depending on + * the value of #progress. + * + * The #GValue in #retval is already initialized with the same + * type as #a and #b. + * + * This function will be called by {@link Interval} if the + * type of the values of the interval was registered using + * {@link Clutter.Interval.register_progress_func}. + */ + interface ProgressFunc { + /** + * Prototype of the progress function used to compute the value + * between the two ends #a and #b of an interval depending on + * the value of #progress. + * + * The #GValue in #retval is already initialized with the same + * type as #a and #b. + * + * This function will be called by {@link Interval} if the + * type of the values of the interval was registered using + * {@link Clutter.Interval.register_progress_func}. + * @param a the initial value of an interval + * @param b the final value of an interval + * @param progress the progress factor, between 0 and 1 + * @param retval the value used to store the progress + * @returns %TRUE if the function successfully computed + * the value and stored it inside #retval + */ + (a: GObject.Value, b: GObject.Value, progress: number, retval: GObject.Value): boolean; + } + + /** + * This is the signature of a function used to connect signals. It is used + * by the {@link Clutter.Script.connect_signals_full} function. It is mainly + * intended for interpreted language bindings, but could be useful where the + * programmer wants more control over the signal connection process. + */ + interface ScriptConnectFunc { + /** + * This is the signature of a function used to connect signals. It is used + * by the {@link Clutter.Script.connect_signals_full} function. It is mainly + * intended for interpreted language bindings, but could be useful where the + * programmer wants more control over the signal connection process. + * @param script a {@link Script} + * @param object the object to connect + * @param signal_name the name of the signal + * @param handler_name the name of the signal handler + * @param connect_object the object to connect the signal to, or %NULL + * @param flags signal connection flags + */ + (script: Script, object: GObject.Object, signal_name: string, handler_name: string, connect_object: GObject.Object, flags: GObject.ConnectFlags): void; + } + + /** + * A function for defining a custom progress. + */ + interface TimelineProgressFunc { + /** + * A function for defining a custom progress. + * @param timeline a {@link Timeline} + * @param elapsed the elapsed time, in milliseconds + * @param total the total duration of the timeline, in milliseconds, + * @returns the progress, as a floating point value between -1.0 and 2.0. + */ + (timeline: Timeline, elapsed: number, total: number): number; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Event} instead. + */ + interface IEvent { + /** + * Copies #event. + * @returns A newly allocated {@link Event} + */ + copy(): Event; + /** + * Frees all resources used by #event. + */ + free(): void; + /** + * Retrieves the angle relative from #source to #target. + * + * The direction of the angle is from the position X axis towards + * the positive Y axis. + * @param target a {@link Event} + * @returns the angle between two {@link Event} + */ + get_angle(target: Event): number; + /** + * Retrieves the array of axes values attached to the event. + * @returns an array of axis values + * + * return location for the number of axes returned + */ + get_axes(): [ number, number ]; + /** + * Retrieves the button number of #event + * @returns the button number + */ + get_button(): number; + /** + * Retrieves the number of clicks of #event + * @returns the click count + */ + get_click_count(): number; + /** + * Retrieves the coordinates of #event and puts them into #x and #y. + * @returns return location for the X coordinate, or %NULL + * + * return location for the Y coordinate, or %NULL + */ + get_coords(): [ x: number, y: number ]; + /** + * Retrieves the {@link InputDevice} for the event. + * If you want the physical device the event originated from, use + * {@link Clutter.event.get_source_device}. + * + * The #ClutterInputDevice structure is completely opaque and should + * be cast to the platform-specific implementation. + * @returns the {@link InputDevice} or %NULL. The + * returned device is owned by the #ClutterEvent and it should not + * be unreferenced + */ + get_device(): InputDevice; + /** + * Retrieves the events device id if set. + * @returns A unique identifier for the device or -1 if the event has + * no specific device set. + */ + get_device_id(): number; + /** + * Retrieves the type of the device for #event + * @returns the {@link InputDeviceType} for the device, if + * any is set + */ + get_device_type(): InputDeviceType; + /** + * Retrieves the distance between two events, a #source and a #target. + * @param target a {@link Event} + * @returns the distance between two {@link Event} + */ + get_distance(target: Event): number; + /** + * Retrieves the {@link EventSequence} of #event. + * @returns the event sequence, or %NULL + */ + get_event_sequence(): EventSequence; + /** + * Retrieves the {@link EventFlags} of #event + * @returns the event flags + */ + get_flags(): EventFlags; + /** + * Returns the gesture motion deltas relative to the current pointer + * position. + * @returns the displacement relative to the pointer + * position in the X axis, or %NULL + * + * the displacement relative to the pointer + * position in the Y axis, or %NULL + */ + get_gesture_motion_delta(): [ dx: number | null, dy: number | null ]; + /** + * Returns the phase of the event, See {@link TouchpadGesturePhase}. + * @returns the phase of the gesture event. + */ + get_gesture_phase(): TouchpadGesturePhase; + /** + * Returns the angle delta reported by this specific event. + * @returns The angle delta relative to the previous event. + */ + get_gesture_pinch_angle_delta(): number; + /** + * Returns the current scale as reported by #event, 1.0 being the original + * distance at the time the corresponding event with phase + * %CLUTTER_TOUCHPAD_GESTURE_PHASE_BEGIN is received. + * is received. + * @returns the current pinch gesture scale + */ + get_gesture_pinch_scale(): number; + /** + * Returns the number of fingers that is triggering the touchpad gesture. + * @returns the number of fingers swiping. + */ + get_gesture_swipe_finger_count(): number; + /** + * Retrieves the keycode of the key that caused #event + * @returns The keycode representing the key + */ + get_key_code(): number; + /** + * Retrieves the key symbol of #event + * @returns the key symbol representing the key + */ + get_key_symbol(): number; + /** + * Retrieves the unicode value for the key that caused #keyev. + * @returns The unicode value representing the key + */ + get_key_unicode(): string; + /** + * Retrieves the event coordinates as a {@link Point}. + * @param position a {@link Point} + */ + get_position(position: Point): void; + /** + * Retrieves the related actor of a crossing event. + * @returns the related {@link Actor}, or %NULL + */ + get_related(): Actor; + /** + * Retrieves the precise scrolling information of #event. + * + * The #event has to have a {@link ScrollEvent}.direction value + * of %CLUTTER_SCROLL_SMOOTH. + * @returns return location for the delta on the horizontal axis + * + * return location for the delta on the vertical axis + */ + get_scroll_delta(): [ dx: number, dy: number ]; + /** + * Retrieves the direction of the scrolling of #event + * @returns the scrolling direction + */ + get_scroll_direction(): ScrollDirection; + /** + * Returns the {@link ScrollFinishFlags} of an scroll event. Those + * can be used to determine whether post-scroll effects like kinetic + * scrolling should be applied. + * @returns The scroll finish flags + */ + get_scroll_finish_flags(): ScrollFinishFlags; + /** + * Returns the {@link ScrollSource} that applies to an scroll event. + * @returns The source of scroll events + */ + get_scroll_source(): ScrollSource; + /** + * Retrieves the source {@link Actor} the event originated from, or + * NULL if the event has no source. + * @returns a {@link Actor} + */ + get_source(): Actor; + /** + * Retrieves the hardware device that originated the event. + * + * If you need the virtual device, use {@link Clutter.event.get_device}. + * + * If no hardware device originated this event, this function will + * return the same device as clutter_event_get_device(). + * @returns a pointer to a {@link InputDevice} + * or %NULL + */ + get_source_device(): InputDevice; + /** + * Retrieves the source {@link Stage} the event originated for, or + * %NULL if the event has no stage. + * @returns a {@link Stage} + */ + get_stage(): Stage; + /** + * Retrieves the modifier state of the event. In case the window system + * supports reporting latched and locked modifiers, this function returns + * the effective state. + * @returns the modifier state parameter, or 0 + */ + get_state(): ModifierType; + /** + * Retrieves the decomposition of the keyboard state into button, base, + * latched, locked and effective. This can be used to transmit to other + * applications, for example when implementing a wayland compositor. + * @returns the pressed buttons as a mask + * + * the regular pressed modifier keys + * + * the latched modifier keys (currently released but still valid for one key press/release) + * + * the locked modifier keys (valid until the lock key is pressed and released again) + * + * the logical OR of all the state bits above + */ + get_state_full(): [ button_state: ModifierType | null, base_state: ModifierType | null, latched_state: ModifierType | null, locked_state: ModifierType | null, effective_state: ModifierType | null ]; + /** + * Retrieves the time of the event. + * @returns the time of the event, or %CLUTTER_CURRENT_TIME + */ + get_time(): number; + /** + * Checks whether #event has the Control modifier mask set. + * @returns %TRUE if the event has the Control modifier mask set + */ + has_control_modifier(): boolean; + /** + * Checks whether #event has the Shift modifier mask set. + * @returns %TRUE if the event has the Shift modifier mask set + */ + has_shift_modifier(): boolean; + /** + * Checks whether a pointer #event has been generated by the windowing + * system. The returned value can be used to distinguish between events + * synthesized by the windowing system itself (as opposed by Clutter). + * @returns %TRUE if the event is pointer emulated + */ + is_pointer_emulated(): boolean; + /** + * Puts a copy of the event on the back of the event queue. The event will + * have the %CLUTTER_EVENT_FLAG_SYNTHETIC flag set. If the source is set + * event signals will be emitted for this source and capture/bubbling for + * its ancestors. If the source is not set it will be generated by picking + * or use the actor that currently has keyboard focus + */ + put(): void; + /** + * Sets the button number of #event + * @param button the button number + */ + set_button(button: number): void; + /** + * Sets the coordinates of the #event. + * @param x the X coordinate of the event + * @param y the Y coordinate of the event + */ + set_coords(x: number, y: number): void; + /** + * Sets the device for #event. + * @param device a {@link InputDevice}, or %NULL + */ + set_device(device: InputDevice | null): void; + /** + * Sets the {@link EventFlags} of #event + * @param flags a binary OR of {@link EventFlags} values + */ + set_flags(flags: EventFlags): void; + /** + * Sets the keycode of the #event. + * @param key_code the keycode representing the key + */ + set_key_code(key_code: number): void; + /** + * Sets the key symbol of #event. + * @param key_sym the key symbol representing the key + */ + set_key_symbol(key_sym: number): void; + /** + * Sets the Unicode value of #event. + * @param key_unicode the Unicode value representing the key + */ + set_key_unicode(key_unicode: string): void; + /** + * Sets the related actor of a crossing event + * @param actor a {@link Actor} or %NULL + */ + set_related(actor: Actor | null): void; + /** + * Sets the precise scrolling information of #event. + * @param dx delta on the horizontal axis + * @param dy delta on the vertical axis + */ + set_scroll_delta(dx: number, dy: number): void; + /** + * Sets the direction of the scrolling of #event + * @param direction the scrolling direction + */ + set_scroll_direction(direction: ScrollDirection): void; + /** + * Sets the source {@link Actor} of #event. + * @param actor a {@link Actor}, or %NULL + */ + set_source(actor: Actor | null): void; + /** + * Sets the source {@link InputDevice} for #event. + * + * The #ClutterEvent must have been created using {@link Clutter.Event.new}. + * @param device a {@link InputDevice} + */ + set_source_device(device: InputDevice | null): void; + /** + * Sets the source {@link Stage} of the event. + * @param stage a {@link Stage}, or %NULL + */ + set_stage(stage: Stage | null): void; + /** + * Sets the modifier state of the event. + * @param state the modifier state to set + */ + set_state(state: ModifierType): void; + /** + * Sets the time of the event. + * @param time_ the time of the event + */ + set_time(time_: number): void; + /** + * Retrieves the type of the event. + * @returns a {@link EventType} + */ + type(): EventType; + } + + type EventInitOptionsMixin = {}; + export interface EventInitOptions extends EventInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Event} instead. + */ + type EventMixin = IEvent; + + /** + * Generic event wrapper. + */ + interface Event extends EventMixin {} + + class Event { + public constructor(options?: Partial); + /** + * Creates a new {@link Event} of the specified type. + * @param type The type of event. + * @returns A newly allocated {@link Event}. + */ + public static new(type: EventType): Event; + /** + * Adds a function which will be called for all events that Clutter + * processes. The function will be called before any signals are + * emitted for the event and it will take precedence over any grabs. + * @param stage The {@link Stage} to capture events for + * @param func The callback function which will be passed all events. + * @param notify A #GDestroyNotify + * @returns an identifier for the event filter, to be used + * with {@link Clutter.event.remove_filter}. + */ + public static add_filter(stage: Stage | null, func: EventFilterFunc, notify: GLib.DestroyNotify): number; + /** + * Pops an event off the event queue. Applications should not need to call + * this. + * @returns A {@link Event} or NULL if queue empty + */ + public static get(): Event; + /** + * Returns a pointer to the first event from the event queue but + * does not remove it. + * @returns A {@link Event} or NULL if queue empty. + */ + public static peek(): Event; + /** + * Removes an event filter that was previously added with + * {@link Clutter.event.add_filter}. + * @param id The ID of the event filter, as returned from {@link Clutter.event.add_filter} + */ + public static remove_filter(id: number): void; + } + + + /** + * Allocates a new {@link ActorBox}. + * @returns the newly allocated {@link ActorBox}. + * Use {@link Clutter.ActorBox.free} to free its resources + */ + function actor_box_alloc(): ActorBox; + + function base_init(): void; + + /** + * Utility function to clear a Cairo context. + * @param cr a Cairo context + */ + function cairo_clear(cr: cairo.Context): void; + + /** + * Utility function for setting the source color of #cr using + * a {@link Color}. This function is the equivalent of: + * + * |[ + * cairo_set_source_rgba (cr, + * color->red / 255.0, + * color->green / 255.0, + * color->blue / 255.0, + * color->alpha / 255.0); + * ]| + * @param cr a Cairo context + * @param color a {@link Color} + */ + function cairo_set_source_color(cr: cairo.Context, color: Color): void; + + /** + * Run-time version check, to check the version the Clutter library + * that an application is currently linked against + * + * This is the run-time equivalent of the compile-time %CLUTTER_CHECK_VERSION + * pre-processor macro + * @param major major version, like 1 in 1.2.3 + * @param minor minor version, like 2 in 1.2.3 + * @param micro micro version, like 3 in 1.2.3 + * @returns %TRUE if the version of the Clutter library is + * greater than (#major, #minor, #micro), and %FALSE otherwise + */ + function check_version(major: number, minor: number, micro: number): boolean; + + /** + * Checks the run-time name of the Clutter windowing system backend, using + * the symbolic macros like %CLUTTER_WINDOWING_WIN32 or + * %CLUTTER_WINDOWING_X11. + * + * This function should be used in conjuction with the compile-time macros + * inside applications and libraries that are using the platform-specific + * windowing system API, to ensure that they are running on the correct + * windowing system; for instance: + * + * |[ + * #ifdef CLUTTER_WINDOWING_X11 + * if (clutter_check_windowing_backend (CLUTTER_WINDOWING_X11)) + * { + * // it is safe to use the clutter_x11_* API + * } + * else + * #endif + * #ifdef CLUTTER_WINDOWING_WIN32 + * if (clutter_check_windowing_backend (CLUTTER_WINDOWING_WIN32)) + * { + * // it is safe to use the clutter_win32_* API + * } + * else + * #endif + * g_error ("Unknown Clutter backend."); + * ]| + * @param backend_type the name of the backend to check + * @returns %TRUE if the current Clutter windowing system backend is + * the one checked, and %FALSE otherwise + */ + function check_windowing_backend(backend_type: string): boolean; + + /** + * Clears the internal cache of glyphs used by the Pango + * renderer. This will free up some memory and GL texture + * resources. The cache will be automatically refilled as more text is + * drawn. + */ + function clear_glyph_cache(): void; + + /** + * Converts a color expressed in HLS (hue, luminance and saturation) + * values into a {@link Color}. + * @param hue hue value, in the 0 .. 360 range + * @param luminance luminance value, in the 0 .. 1 range + * @param saturation saturation value, in the 0 .. 1 range + * @returns return location for a {@link Color} + */ + function color_from_hls(hue: number, luminance: number, saturation: number): Color; + + /** + * Converts #pixel from the packed representation of a four 8 bit channel + * color to a {@link Color}. + * @param pixel a 32 bit packed integer containing a color + * @returns return location for a {@link Color} + */ + function color_from_pixel(pixel: number): Color; + + /** + * Parses a string definition of a color, filling the {@link Color}.red, + * #ClutterColor.green, #ClutterColor.blue and #ClutterColor.alpha fields + * of #color. + * + * The #color is not allocated. + * + * The format of #str can be either one of: + * + * - a standard name (as taken from the X11 rgb.txt file) + * - an hexadecimal value in the form: `#rgb`, `#rrggbb`, `#rgba`, or `#rrggbbaa` + * - a RGB color in the form: `rgb(r, g, b)` + * - a RGB color in the form: `rgba(r, g, b, a)` + * - a HSL color in the form: `hsl(h, s, l)` + * -a HSL color in the form: `hsla(h, s, l, a)` + * + * where 'r', 'g', 'b' and 'a' are (respectively) the red, green, blue color + * intensities and the opacity. The 'h', 's' and 'l' are (respectively) the + * hue, saturation and luminance values. + * + * In the rgb() and rgba() formats, the 'r', 'g', and 'b' values are either + * integers between 0 and 255, or percentage values in the range between 0% + * and 100%; the percentages require the '%' character. The 'a' value, if + * specified, can only be a floating point value between 0.0 and 1.0. + * + * In the hls() and hlsa() formats, the 'h' value (hue) is an angle between + * 0 and 360.0 degrees; the 'l' and 's' values (luminance and saturation) are + * percentage values in the range between 0% and 100%. The 'a' value, if specified, + * can only be a floating point value between 0.0 and 1.0. + * + * Whitespace inside the definitions is ignored; no leading whitespace + * is allowed. + * + * If the alpha component is not specified then it is assumed to be set to + * be fully opaque. + * @param str a string specifiying a color + * @returns %TRUE if parsing succeeded, and %FALSE otherwise + * + * return location for a {@link Color} + */ + function color_from_string(str: string): [ boolean, Color ]; + + /** + * Retrieves a static color for the given #color name + * + * Static colors are created by Clutter and are guaranteed to always be + * available and valid + * @param color the named global color + * @returns a pointer to a static color; the returned pointer + * is owned by Clutter and it should never be modified or freed + */ + function color_get_static(color: StaticColor): Color; + + /** + * Looks up the #GParamSpec for a child property of #klass. + * @param klass a #GObjectClass implementing the {@link Container} interface. + * @param property_name a property name. + * @returns The #GParamSpec for the property or %NULL + * if no such property exist. + */ + function container_class_find_child_property(klass: GObject.Object, property_name: string): GObject.ParamSpec; + + /** + * Returns an array of #GParamSpec for all child properties. + * @param klass a #GObjectClass implementing the {@link Container} interface. + * @returns an array + * of #GParamSpecs which should be freed after use. + * + * return location for length of returned array. + */ + function container_class_list_child_properties(klass: GObject.Object): [ GObject.ParamSpec[], number ]; + + /** + * Disable loading the accessibility support. It has the same effect + * as setting the environment variable + * CLUTTER_DISABLE_ACCESSIBILITY. For the same reason, this method + * should be called before clutter_init(). + */ + function disable_accessibility(): void; + + /** + * Processes an event. + * + * The #event must be a valid {@link Event} and have a #ClutterStage + * associated to it. + * + * This function is only useful when embedding Clutter inside another + * toolkit, and it should never be called by applications. + * @param event a {@link Event}. + */ + function do_event(event: Event): void; + + /** + * Adds a function which will be called for all events that Clutter + * processes. The function will be called before any signals are + * emitted for the event and it will take precedence over any grabs. + * @param stage The {@link Stage} to capture events for + * @param func The callback function which will be passed all events. + * @param notify A #GDestroyNotify + * @returns an identifier for the event filter, to be used + * with {@link Clutter.event.remove_filter}. + */ + function event_add_filter(stage: Stage | null, func: EventFilterFunc, notify: GLib.DestroyNotify): number; + + /** + * Pops an event off the event queue. Applications should not need to call + * this. + * @returns A {@link Event} or NULL if queue empty + */ + function event_get(): Event; + + /** + * Returns a pointer to the first event from the event queue but + * does not remove it. + * @returns A {@link Event} or NULL if queue empty. + */ + function event_peek(): Event; + + /** + * Removes an event filter that was previously added with + * {@link Clutter.event.add_filter}. + * @param id The ID of the event filter, as returned from {@link Clutter.event.add_filter} + */ + function event_remove_filter(id: number): void; + + /** + * Checks if events are pending in the event queue. + * @returns TRUE if there are pending events, FALSE otherwise. + */ + function events_pending(): boolean; + + /** + * Checks whether #feature is available. #feature can be a logical + * OR of {@link FeatureFlags}. + * @param feature a {@link FeatureFlags} + * @returns %TRUE if a feature is available + */ + function feature_available(feature: FeatureFlags): boolean; + + /** + * Returns all the supported features. + * @returns a logical OR of all the supported features. + */ + function feature_get_all(): FeatureFlags; + + /** + * Simple wrapper around {@link Clutter.frame.source_add_full}. + * @param fps the number of times per second to call the function + * @param func function to call + * @param data data to pass to the function + * @returns the ID (greater than 0) of the event source. + */ + function frame_source_add(fps: number, func: GLib.SourceFunc, data: any | null): number; + + /** + * Sets a function to be called at regular intervals with the given + * priority. The function is called repeatedly until it returns + * %FALSE, at which point the timeout is automatically destroyed and + * the function will not be called again. The #notify function is + * called when the timeout is destroyed. The first call to the + * function will be at the end of the first #interval. + * + * This function is similar to {@link GObject.timeout_add_full} except that it + * will try to compensate for delays. For example, if #func takes half + * the interval time to execute then the function will be called again + * half the interval time after it finished. In contrast + * g_timeout_add_full() would not fire until a full interval after the + * function completes so the delay between calls would be 1.0 / #fps * + * 1.5. This function does not however try to invoke the function + * multiple times to catch up missing frames if #func takes more than + * #interval ms to execute. + * @param priority the priority of the frame source. Typically this will be in the + * range between %G_PRIORITY_DEFAULT and %G_PRIORITY_HIGH. + * @param fps the number of times per second to call the function + * @param func function to call + * @param data data to pass to the function + * @param notify function to call when the timeout source is removed + * @returns the ID (greater than 0) of the event source. + */ + function frame_source_add_full(priority: number, fps: number, func: GLib.SourceFunc, data: any | null, notify: GLib.DestroyNotify): number; + + /** + * Returns whether Clutter has accessibility support enabled. As + * least, a value of TRUE means that there are a proper AtkUtil + * implementation available + * @returns %TRUE if Clutter has accessibility support enabled + */ + function get_accessibility_enabled(): boolean; + + /** + * Retrieves the {@link Actor} with #id_. + * @param id_ a {@link Actor} unique id. + * @returns the actor with the passed id or %NULL. + * The returned actor does not have its reference count increased. + */ + function get_actor_by_gid(id_: number): Actor; + + /** + * If an event is currently being processed, return that event. + * This function is intended to be used to access event state + * that might not be exposed by higher-level widgets. For + * example, to get the key modifier state from a Button 'clicked' + * event. + * @returns The current ClutterEvent, or %NULL if none + */ + function get_current_event(): Event; + + /** + * Retrieves the timestamp of the last event, if there is an + * event or if the event has a timestamp. + * @returns the event timestamp, or %CLUTTER_CURRENT_TIME + */ + function get_current_event_time(): number; + + /** + * Check if Clutter has debugging enabled. + * @returns %FALSE + */ + function get_debug_enabled(): boolean; + + /** + * Retrieves the default {@link Backend} used by Clutter. The + * #ClutterBackend holds backend-specific configuration options. + * @returns the default backend. You should + * not ref or unref the returned object. Applications should rarely + * need to use this. + */ + function get_default_backend(): Backend; + + /** + * Retrieves the default frame rate. See {@link Clutter.set.default_frame_rate}. + * @returns the default frame rate + */ + function get_default_frame_rate(): number; + + /** + * Retrieves the default direction for the text. The text direction is + * determined by the locale and/or by the `CLUTTER_TEXT_DIRECTION` + * environment variable. + * + * The default text direction can be overridden on a per-actor basis by using + * {@link Clutter.Actor.set_text_direction}. + * @returns the default text direction + */ + function get_default_text_direction(): TextDirection; + + /** + * Gets the current font flags for rendering text. See + * {@link Clutter.set.font_flags}. + * @returns The font flags + */ + function get_font_flags(): FontFlags; + + /** + * Retrieves the #PangoFontMap instance used by Clutter. + * You can use the global font map object with the COGL + * Pango API. + * @returns the #PangoFontMap instance. The returned + * value is owned by Clutter and it should never be unreferenced. + */ + function get_font_map(): Pango.FontMap; + + /** + * Retrieves the {@link InputDevice} from its #id_. This is a convenience + * wrapper for {@link Clutter.DeviceManager.get_device} and it is functionally + * equivalent to: + * + * |[ + * ClutterDeviceManager *manager; + * ClutterInputDevice *device; + * + * manager = clutter_device_manager_get_default (); + * device = clutter_device_manager_get_device (manager, id); + * ]| + * @param id_ the unique id for a device + * @returns a {@link InputDevice}, or %NULL + */ + function get_input_device_for_id(id_: number): InputDevice; + + /** + * Queries the current keyboard grab of clutter. + * @returns the actor currently holding the keyboard grab, or NULL if there is no grab. + */ + function get_keyboard_grab(): Actor; + + /** + * Gets whether the per-actor motion events are enabled. + * @returns %TRUE if the motion events are enabled + */ + function get_motion_events_enabled(): boolean; + + /** + * Returns a #GOptionGroup for the command line arguments recognized + * by Clutter. You should add this group to your #GOptionContext with + * {@link GObject.option_context_add_group}, if you are using g_option_context_parse() + * to parse your commandline arguments. + * + * Calling g_option_context_parse() with Clutter's #GOptionGroup will result + * in Clutter's initialization. That is, the following code: + * + * |[ + * g_option_context_set_main_group (context, clutter_get_option_group ()); + * res = g_option_context_parse (context, &argc, &argc, NULL); + * ]| + * + * is functionally equivalent to: + * + * |[ + * clutter_init (&argc, &argv); + * ]| + * + * After g_option_context_parse() on a #GOptionContext containing the + * Clutter #GOptionGroup has returned %TRUE, Clutter is guaranteed to be + * initialized. + * @returns a #GOptionGroup for the commandline arguments + * recognized by Clutter + */ + function get_option_group(): GLib.OptionGroup; + + /** + * Returns a #GOptionGroup for the command line arguments recognized + * by Clutter. You should add this group to your #GOptionContext with + * {@link GObject.option_context_add_group}, if you are using g_option_context_parse() + * to parse your commandline arguments. + * + * Unlike clutter_get_option_group(), calling g_option_context_parse() with + * the #GOptionGroup returned by this function requires a subsequent explicit + * call to clutter_init(); use this function when needing to set foreign + * display connection with clutter_x11_set_display(), or with + * `gtk_clutter_init()`. + * @returns a #GOptionGroup for the commandline arguments + * recognized by Clutter + */ + function get_option_group_without_init(): GLib.OptionGroup; + + /** + * Queries the current pointer grab of clutter. + * @returns the actor currently holding the pointer grab, or NULL if there is no grab. + */ + function get_pointer_grab(): Actor; + + /** + * Retrieves the Clutter script id, if any. + * @param gobject a #GObject + * @returns the script id, or %NULL if #object was not defined inside + * a UI definition file. The returned string is owned by the object and + * should never be modified or freed. + */ + function get_script_id(gobject: GObject.Object): string; + + /** + * Returns whether Clutter should print out the frames per second on the + * console. You can enable this setting either using the + * CLUTTER_SHOW_FPS environment variable or passing + * the --clutter-show-fps command line argument. * + * @returns %TRUE if Clutter should show the FPS. + */ + function get_show_fps(): boolean; + + /** + * Returns the approximate number of microseconds passed since Clutter was + * intialised. + * + * This function shdould not be used by application code. + * + * The output of this function depends on whether Clutter was configured to + * enable its debugging code paths, so it's less useful than intended. + * + * Since Clutter 1.10, this function is an alias to {@link GObject.get_monotonic_time} + * if Clutter was configured to enable the debugging code paths. + * @returns Number of microseconds since clutter_init() was called, or + * zero if Clutter was not configured with debugging code paths. + */ + function get_timestamp(): number; + + /** + * Grabs keyboard events, after the grab is done keyboard + * events ({@link Actor.key_press_event} and #ClutterActor::key-release-event) + * are delivered to this actor directly. The source set in the event will be + * the actor that would have received the event if the keyboard grab was not + * in effect. + * + * Like pointer grabs, keyboard grabs should only be used as a last + * resource. + * + * See also {@link Clutter.Stage.set_key_focus} and clutter_actor_grab_key_focus() + * to perform a "soft" key grab and assign key focus to a specific actor. + * @param actor a {@link Actor} + */ + function grab_keyboard(actor: Actor): void; + + /** + * Grabs pointer events, after the grab is done all pointer related events + * (press, motion, release, enter, leave and scroll) are delivered to this + * actor directly without passing through both capture and bubble phases of + * the event delivery chain. The source set in the event will be the actor + * that would have received the event if the pointer grab was not in effect. + * + * Grabs completely override the entire event delivery chain + * done by Clutter. Pointer grabs should only be used as a last resource; + * using the {@link Actor.captured_event} signal should always be the + * preferred way to intercept event delivery to reactive actors. + * + * This function should rarely be used. + * + * If a grab is required, you are strongly encouraged to use a specific + * input device by calling {@link Clutter.InputDevice.grab}. + * @param actor a {@link Actor} + */ + function grab_pointer(actor: Actor): void; + + /** + * Grabs all the pointer events coming from the device #id for #actor. + * + * If #id is -1 then this function is equivalent to {@link Clutter.grab.pointer}. + * @param actor a {@link Actor} + * @param id_ a device id, or -1 + */ + function grab_pointer_for_device(actor: Actor, id_: number): void; + + function image_error_quark(): GLib.Quark; + + /** + * Initialises everything needed to operate with Clutter and parses some + * standard command line options; #argc and #argv are adjusted accordingly + * so your own code will never see those standard arguments. + * + * It is safe to call this function multiple times. + * + * This function will not abort in case of errors during + * initialization; clutter_init() will print out the error message on + * stderr, and will return an error code. It is up to the application + * code to handle this case. If you need to display the error message + * yourself, you can use clutter_init_with_args(), which takes a #GError + * pointer. + * + * If this function fails, and returns an error code, any subsequent + * Clutter API will have undefined behaviour - including segmentation + * faults and assertion failures. Make sure to handle the returned + * {@link InitError} enumeration value. + * @returns a {@link InitError} value + */ + function init(): InitError; + + function init_error_quark(): GLib.Quark; + + /** + * This function does the same work as clutter_init(). Additionally, + * it allows you to add your own command line options, and it + * automatically generates nicely formatted + * output. Note that your program will be terminated after writing + * out the help output. Also note that, in case of error, the + * error message will be placed inside #error instead of being + * printed on the display. + * + * Just like clutter_init(), if this function returns an error code then + * any subsequent call to any other Clutter API will result in undefined + * behaviour - including segmentation faults. + * @param parameter_string a string which is displayed in the + * first line of output, after + * programname [OPTION...] + * @param entries a %NULL terminated array of + * #GOptionEntrys describing the options of your program + * @param translation_domain a translation domain to use for + * translating the output for the options in + * #entries with gettext(), or %NULL + * @returns %CLUTTER_INIT_SUCCESS if Clutter has been successfully + * initialised, or other values or {@link InitError} in case of + * error. + */ + function init_with_args(parameter_string: string | null, entries: GLib.OptionEntry[] | null, translation_domain: string | null): InitError; + + /** + * Converts #keyval from a Clutter key symbol to the corresponding + * ISO10646 (Unicode) character. + * @param keyval a key symbol + * @returns a Unicode character, or 0 if there is no corresponding + * character. + */ + function keysym_to_unicode(keyval: number): number; + + /** + * Starts the Clutter mainloop. + */ + function main(): void; + + /** + * Retrieves the depth of the Clutter mainloop. + * @returns The level of the mainloop. + */ + function main_level(): number; + + /** + * Terminates the Clutter mainloop. + */ + function main_quit(): void; + + /** + * Allocates enough memory to hold a {@link Matrix}. + * @returns the newly allocated {@link Matrix} + */ + function matrix_alloc(): Matrix; + + /** + * Creates a #GParamSpec for properties using {@link Color}. + * @param name name of the property + * @param nick short name + * @param blurb description (can be translatable) + * @param default_value default value + * @param flags flags for the param spec + * @returns the newly created #GParamSpec + */ + function param_spec_color(name: string, nick: string, blurb: string, default_value: Color, flags: GObject.ParamFlags): GObject.ParamSpec; + + /** + * Creates a #GParamSpec for properties using #CoglFixed values + * @param name name of the property + * @param nick short name + * @param blurb description (can be translatable) + * @param minimum lower boundary + * @param maximum higher boundary + * @param default_value default value + * @param flags flags for the param spec + * @returns the newly created #GParamSpec + */ + function param_spec_fixed(name: string, nick: string, blurb: string, minimum: Cogl.Fixed, maximum: Cogl.Fixed, default_value: Cogl.Fixed, flags: GObject.ParamFlags): GObject.ParamSpec; + + /** + * Creates a #GParamSpec for properties using {@link Units}. + * @param name name of the property + * @param nick short name + * @param blurb description (can be translatable) + * @param default_type the default type for the {@link Units} + * @param minimum lower boundary + * @param maximum higher boundary + * @param default_value default value + * @param flags flags for the param spec + * @returns the newly created #GParamSpec + */ + function param_spec_units(name: string, nick: string, blurb: string, default_type: UnitType, minimum: number, maximum: number, default_value: number, flags: GObject.ParamFlags): GObject.ParamSpec; + + /** + * A point centered at (0, 0). + * + * The returned value can be used as a guard. + * @returns a point centered in (0, 0); the returned {@link Point} + * is owned by Clutter and it should not be modified or freed. + */ + function point_zero(): Point; + + /** + * A {@link Rect} with #ClutterRect.origin set at (0, 0) and a size + * of 0. + * + * The returned value can be used as a guard. + * @returns a rectangle with origin in (0, 0) and a size of 0. + * The returned {@link Rect} is owned by Clutter and it should not + * be modified or freed. + */ + function rect_zero(): Rect; + + /** + * Forces a redraw of the entire stage. Applications should never use this + * function, but queue a redraw using {@link Clutter.Actor.queue_redraw}. + * + * This function should only be used by libraries integrating Clutter from + * within another toolkit. + * @param stage + */ + function redraw(stage: Stage): void; + + function script_error_quark(): GLib.Quark; + + /** + * Sets the default frame rate. This frame rate will be used to limit + * the number of frames drawn if Clutter is not able to synchronize + * with the vertical refresh rate of the display. When synchronization + * is possible, this value is ignored. + * @param frames_per_sec the new default frame rate + */ + function set_default_frame_rate(frames_per_sec: number): void; + + /** + * Sets the font quality options for subsequent text rendering + * operations. + * + * Using mipmapped textures will improve the quality for scaled down + * text but will use more texture memory. + * + * Enabling hinting improves text quality for static text but may + * introduce some artifacts if the text is animated. + * @param flags The new flags + */ + function set_font_flags(flags: FontFlags): void; + + /** + * Sets whether per-actor motion events should be enabled or not on + * all {@link Stage}s managed by Clutter. + * + * If #enable is %FALSE the following events will not work: + * + * - ClutterActor::motion-event, except on the #ClutterStage + * - ClutterActor::enter-event + * - ClutterActor::leave-event + * @param enable %TRUE to enable per-actor motion events + */ + function set_motion_events_enabled(enable: boolean): void; + + /** + * Restricts Clutter to only use the specified backend or list of backends. + * + * You can use one of the `CLUTTER_WINDOWING_*` symbols, e.g. + * + * |[ + * clutter_set_windowing_backend (CLUTTER_WINDOWING_X11); + * ]| + * + * Will force Clutter to use the X11 windowing and input backend, and terminate + * if the X11 backend could not be initialized successfully. + * + * Since Clutter 1.26, you can also use a comma-separated list of windowing + * system backends to provide a fallback in case backends are not available or + * enabled, e.g.: + * + * |[ + * clutter_set_windowing_backend ("gdk,wayland,x11"); + * ]| + * + * Will make Clutter test for the GDK, Wayland, and X11 backends in that order. + * + * You can use the `*` special value to ask Clutter to use the internally + * defined list of backends. For instance: + * + * |[ + * clutter_set_windowing_backend ("x11,wayland,*"); + * ]| + * + * Will make Clutter test the X11 and Wayland backends, and then fall back + * to the internal list of available backends. + * + * This function must be called before the first API call to Clutter, including + * {@link Clutter.get_option_context} + * @param backend_type a comma separated list of windowing backends + */ + function set_windowing_backend(backend_type: string): void; + + function shader_error_quark(): GLib.Quark; + + /** + * Adds a test unit to the Clutter test environment. + * + * See also: {@link GObject.test_add} + * @param test_path unique path for identifying the test + * @param test_func function containing the test + */ + function test_add(test_path: string, test_func: GLib.TestFunc): void; + + /** + * Adds a test unit to the Clutter test environment. + * + * See also: {@link GObject.test_add_data_func} + * @param test_path unique path for identifying the test + * @param test_func function containing the test + * @param test_data data to pass to the test function + */ + function test_add_data(test_path: string, test_func: GLib.TestDataFunc, test_data: any | null): void; + + /** + * Adds a test unit to the Clutter test environment. + * + * See also: {@link GObject.test_add_data_func_full} + * @param test_path unique path for identifying the test + * @param test_func function containing the test + * @param test_data data to pass to the test function + * @param test_notify function called when the test function ends + */ + function test_add_data_full(test_path: string, test_func: GLib.TestDataFunc, test_data: any | null, test_notify: GLib.DestroyNotify): void; + + /** + * Checks the given coordinates of the #stage and compares the + * actor found there with the given #actor. + * @param stage a {@link Stage} + * @param point coordinates to check + * @param actor the expected actor at the given coordinates + * @returns %TRUE if the actor at the given coordinates matches + * + * actor at the coordinates + */ + function test_check_actor_at_point(stage: Actor, point: Point, actor: Actor): [ boolean, Actor | null ]; + + /** + * Checks the color at the given coordinates on #stage, and matches + * it with the red, green, and blue channels of #color. The alpha + * component of #color and #result is ignored. + * @param stage a {@link Stage} + * @param point coordinates to check + * @param color expected color + * @returns %TRUE if the colors match + * + * color at the given coordinates + */ + function test_check_color_at_point(stage: Actor, point: Point, color: Color): [ boolean, Color ]; + + /** + * Retrieves the {@link Stage} used for testing. + * @returns the stage used for testing + */ + function test_get_stage(): Actor; + + function test_init(argc: number, argv: string): void; + + /** + * Runs the test suite using the units added by calling + * {@link Clutter.test.add}. + * + * The typical test suite is composed of a list of functions + * called by clutter_test_run(), for instance: + * + * |[ + * static void unit_foo (void) { ... } + * + * static void unit_bar (void) { ... } + * + * static void unit_baz (void) { ... } + * + * int + * main (int argc, char *argv[]) + * { + * clutter_test_init (&argc, &argv); + * + * clutter_test_add ("/unit/foo", unit_foo); + * clutter_test_add ("/unit/bar", unit_bar); + * clutter_test_add ("/unit/baz", unit_baz); + * + * return clutter_test_run (); + * } + * ]| + * @returns the exit code for the test suite + */ + function test_run(): number; + + function texture_error_quark(): GLib.Quark; + + /** + * Simple wrapper around {@link Clutter.threads.add_frame_source_full}. + * @param fps the number of times per second to call the function + * @param func function to call + * @param data data to pass to the function + * @returns the ID (greater than 0) of the event source. + */ + function threads_add_frame_source(fps: number, func: GLib.SourceFunc, data: any | null): number; + + /** + * Sets a function to be called at regular intervals holding the Clutter + * threads lock, with the given priority. The function is called repeatedly + * until it returns %FALSE, at which point the timeout is automatically + * removed and the function will not be called again. The #notify function + * is called when the timeout is removed. + * + * This function is similar to {@link Clutter.threads.add_timeout_full} + * except that it will try to compensate for delays. For example, if + * #func takes half the interval time to execute then the function + * will be called again half the interval time after it finished. In + * contrast clutter_threads_add_timeout_full() would not fire until a + * full interval after the function completes so the delay between + * calls would be #interval * 1.5. This function does not however try + * to invoke the function multiple times to catch up missing frames if + * #func takes more than #interval ms to execute. + * + * See also clutter_threads_add_idle_full(). + * @param priority the priority of the frame source. Typically this will be in the + * range between %G_PRIORITY_DEFAULT and %G_PRIORITY_HIGH. + * @param fps the number of times per second to call the function + * @param func function to call + * @param data data to pass to the function + * @param notify function to call when the timeout source is removed + * @returns the ID (greater than 0) of the event source. + */ + function threads_add_frame_source_full(priority: number, fps: number, func: GLib.SourceFunc, data: any | null, notify: GLib.DestroyNotify): number; + + /** + * Simple wrapper around {@link Clutter.threads.add_idle_full} using the + * default priority. + * @param func function to call + * @param data data to pass to the function + * @returns the ID (greater than 0) of the event source. + */ + function threads_add_idle(func: GLib.SourceFunc, data: any | null): number; + + /** + * Adds a function to be called whenever there are no higher priority + * events pending. If the function returns %FALSE it is automatically + * removed from the list of event sources and will not be called again. + * + * This function can be considered a thread-safe variant of {@link GObject.idle_add_full}: + * it will call #function while holding the Clutter lock. It is logically + * equivalent to the following implementation: + * + * |[ + * static gboolean + * idle_safe_callback (gpointer data) + * { + * SafeClosure *closure = data; + * gboolean res = FALSE; + * + * // mark the critical section // + * + * clutter_threads_enter(); + * + * // the callback does not need to acquire the Clutter + * / lock itself, as it is held by the this proxy handler + * // + * res = closure->callback (closure->data); + * + * clutter_threads_leave(); + * + * return res; + * } + * static gulong + * add_safe_idle (GSourceFunc callback, + * gpointer data) + * { + * SafeClosure *closure = g_new0 (SafeClosure, 1); + * + * closure->callback = callback; + * closure->data = data; + * + * return g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, + * idle_safe_callback, + * closure, + * g_free) + * } + * ]| + * + * This function should be used by threaded applications to make sure + * that #func is emitted under the Clutter threads lock and invoked + * from the same thread that started the Clutter main loop. For instance, + * it can be used to update the UI using the results from a worker + * thread: + * + * |[ + * static gboolean + * update_ui (gpointer data) + * { + * SomeClosure *closure = data; + * + * // it is safe to call Clutter API from this function because + * / it is invoked from the same thread that started the main + * / loop and under the Clutter thread lock + * // + * clutter_label_set_text (CLUTTER_LABEL (closure->label), + * closure->text); + * + * g_object_unref (closure->label); + * g_free (closure); + * + * return FALSE; + * } + * + * // within another thread // + * closure = g_new0 (SomeClosure, 1); + * // always take a reference on GObject instances // + * closure->label = g_object_ref (my_application->label); + * closure->text = g_strdup (processed_text_to_update_the_label); + * + * clutter_threads_add_idle_full (G_PRIORITY_HIGH_IDLE, + * update_ui, + * closure, + * NULL); + * ]| + * @param priority the priority of the timeout source. Typically this will be in the + * range between #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE + * @param func function to call + * @param data data to pass to the function + * @param notify functio to call when the idle source is removed + * @returns the ID (greater than 0) of the event source. + */ + function threads_add_idle_full(priority: number, func: GLib.SourceFunc, data: any | null, notify: GLib.DestroyNotify): number; + + /** + * Adds a function to be called whenever Clutter is processing a new + * frame. + * + * If the function returns %FALSE it is automatically removed from the + * list of repaint functions and will not be called again. + * + * This function is guaranteed to be called from within the same thread + * that called clutter_main(), and while the Clutter lock is being held; + * the function will be called within the main loop, so it is imperative + * that it does not block, otherwise the frame time budget may be lost. + * + * A repaint function is useful to ensure that an update of the scenegraph + * is performed before the scenegraph is repainted; for instance, uploading + * a frame from a video into a {@link Texture}. By default, a repaint + * function added using this function will be invoked prior to the frame + * being processed. + * + * Adding a repaint function does not automatically ensure that a new + * frame will be queued. + * + * When the repaint function is removed (either because it returned %FALSE + * or because clutter_threads_remove_repaint_func() has been called) the + * #notify function will be called, if any is set. + * + * See also: clutter_threads_add_repaint_func_full() + * @param func the function to be called within the paint cycle + * @param data data to be passed to the function, or %NULL + * @param notify function to be called when removing the repaint + * function, or %NULL + * @returns the ID (greater than 0) of the repaint function. You + * can use the returned integer to remove the repaint function by + * calling {@link Clutter.threads.remove_repaint_func}. + */ + function threads_add_repaint_func(func: GLib.SourceFunc, data: any | null, notify: GLib.DestroyNotify): number; + + /** + * Adds a function to be called whenever Clutter is processing a new + * frame. + * + * If the function returns %FALSE it is automatically removed from the + * list of repaint functions and will not be called again. + * + * This function is guaranteed to be called from within the same thread + * that called clutter_main(), and while the Clutter lock is being held; + * the function will be called within the main loop, so it is imperative + * that it does not block, otherwise the frame time budget may be lost. + * + * A repaint function is useful to ensure that an update of the scenegraph + * is performed before the scenegraph is repainted; for instance, uploading + * a frame from a video into a {@link Texture}. The #flags passed to this + * function will determine the section of the frame processing that will + * result in #func being called. + * + * Adding a repaint function does not automatically ensure that a new + * frame will be queued. + * + * When the repaint function is removed (either because it returned %FALSE + * or because clutter_threads_remove_repaint_func() has been called) the + * #notify function will be called, if any is set. + * @param flags flags for the repaint function + * @param func the function to be called within the paint cycle + * @param data data to be passed to the function, or %NULL + * @param notify function to be called when removing the repaint + * function, or %NULL + * @returns the ID (greater than 0) of the repaint function. You + * can use the returned integer to remove the repaint function by + * calling {@link Clutter.threads.remove_repaint_func}. + */ + function threads_add_repaint_func_full(flags: RepaintFlags, func: GLib.SourceFunc, data: any | null, notify: GLib.DestroyNotify): number; + + /** + * Simple wrapper around {@link Clutter.threads.add_timeout_full}. + * @param interval the time between calls to the function, in milliseconds + * @param func function to call + * @param data data to pass to the function + * @returns the ID (greater than 0) of the event source. + */ + function threads_add_timeout(interval: number, func: GLib.SourceFunc, data: any | null): number; + + /** + * Sets a function to be called at regular intervals holding the Clutter + * threads lock, with the given priority. The function is called repeatedly + * until it returns %FALSE, at which point the timeout is automatically + * removed and the function will not be called again. The #notify function + * is called when the timeout is removed. + * + * The first call to the function will be at the end of the first #interval. + * + * It is important to note that, due to how the Clutter main loop is + * implemented, the timing will not be accurate and it will not try to + * "keep up" with the interval. + * + * See also {@link Clutter.threads.add_idle_full}. + * @param priority the priority of the timeout source. Typically this will be in the + * range between #G_PRIORITY_DEFAULT and #G_PRIORITY_HIGH. + * @param interval the time between calls to the function, in milliseconds + * @param func function to call + * @param data data to pass to the function + * @param notify function to call when the timeout source is removed + * @returns the ID (greater than 0) of the event source. + */ + function threads_add_timeout_full(priority: number, interval: number, func: GLib.SourceFunc, data: any | null, notify: GLib.DestroyNotify): number; + + /** + * Locks the Clutter thread lock. + */ + function threads_enter(): void; + + /** + * Initialises the Clutter threading mechanism, so that Clutter API can be + * called by multiple threads, using {@link Clutter.threads.enter} and + * clutter_threads_leave() to mark the critical sections. + * + * You must call g_thread_init() before this function. + * + * This function must be called before clutter_init(). + * + * It is safe to call this function multiple times. + */ + function threads_init(): void; + + /** + * Unlocks the Clutter thread lock. + */ + function threads_leave(): void; + + /** + * Removes the repaint function with #handle_id as its id + * @param handle_id an unsigned integer greater than zero + */ + function threads_remove_repaint_func(handle_id: number): void; + + /** + * Allows the application to replace the standard method that + * Clutter uses to protect its data structures. Normally, Clutter + * creates a single #GMutex that is locked by {@link Clutter.threads.enter}, + * and released by clutter_threads_leave(); using this function an + * application provides, instead, a function #enter_fn that is + * called by clutter_threads_enter() and a function #leave_fn that is + * called by clutter_threads_leave(). + * + * The functions must provide at least same locking functionality + * as the default implementation, but can also do extra application + * specific processing. + * + * As an example, consider an application that has its own recursive + * lock that when held, holds the Clutter lock as well. When Clutter + * unlocks the Clutter lock when entering a recursive main loop, the + * application must temporarily release its lock as well. + * + * Most threaded Clutter apps won't need to use this method. + * + * This method must be called before clutter_init(), and cannot + * be called multiple times. + * @param enter_fn function called when aquiring the Clutter main lock + * @param leave_fn function called when releasing the Clutter main lock + */ + function threads_set_lock_functions(enter_fn: GObject.Callback, leave_fn: GObject.Callback): void; + + /** + * Creates a new timeout pool source. A timeout pool should be used when + * multiple timeout functions, running at the same priority, are needed and + * the {@link GObject.timeout_add} API might lead to starvation of the time slice of + * the main loop. A timeout pool allocates a single time slice of the main + * loop and runs every timeout function inside it. The timeout pool is + * always sorted, so that the extraction of the next timeout function is + * a constant time operation. + * @param priority the priority of the timeout pool. Typically this will + * be #G_PRIORITY_DEFAULT + * @returns the newly created {@link TimeoutPool}. The created pool + * is owned by the GLib default context and will be automatically + * destroyed when the context is destroyed. It is possible to force + * the destruction of the timeout pool using {@link GObject.source_destroy} + */ + function timeout_pool_new(priority: number): TimeoutPool; + + /** + * Removes an existing grab of the keyboard. + */ + function ungrab_keyboard(): void; + + /** + * Removes an existing grab of the pointer. + */ + function ungrab_pointer(): void; + + /** + * Removes an existing grab of the pointer events for device #id_. + * @param id_ a device id + */ + function ungrab_pointer_for_device(id_: number): void; + + /** + * Convert from a ISO10646 character to a key symbol. + * @param wc a ISO10646 encoded character + * @returns the corresponding Clutter key symbol, if one exists. + * or, if there is no corresponding symbol, wc | 0x01000000 + */ + function unicode_to_keysym(wc: number): number; + + /** + * Stores a value in centimeters inside #units + * @param cm centimeters + * @returns a {@link Units} + */ + function units_from_cm(cm: number): Units; + + /** + * Stores a value in em inside #units, using the default font + * name as returned by {@link Clutter.Backend.get_font_name} + * @param em em + * @returns a {@link Units} + */ + function units_from_em(em: number): Units; + + /** + * Stores a value in em inside #units using #font_name + * @param font_name the font name and size + * @param em em + * @returns a {@link Units} + */ + function units_from_em_for_font(font_name: string | null, em: number): Units; + + /** + * Stores a value in millimiters inside #units + * @param mm millimeters + * @returns a {@link Units} + */ + function units_from_mm(mm: number): Units; + + /** + * Stores a value in pixels inside #units + * @param px pixels + * @returns a {@link Units} + */ + function units_from_pixels(px: number): Units; + + /** + * Stores a value in typographic points inside #units + * @param pt typographic points + * @returns a {@link Units} + */ + function units_from_pt(pt: number): Units; + + /** + * Parses a value and updates #units with it + * + * A {@link Units} expressed in string should match: + * + * |[ + * units: wsp* unit-value wsp* unit-name? wsp* + * unit-value: number + * unit-name: 'px' | 'pt' | 'mm' | 'em' | 'cm' + * number: digit+ + * | digit* sep digit+ + * sep: '.' | ',' + * digit: '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' + * wsp: (#0x20 | #0x9 | #0xA | #0xB | #0xC | #0xD)+ + * ]| + * + * For instance, these are valid strings: + * + * |[ + * 10 px + * 5.1 em + * 24 pt + * 12.6 mm + * .3 cm + * ]| + * + * While these are not: + * + * |[ + * 42 cats + * omg!1!ponies + * ]| + * + * If no unit is specified, pixels are assumed. + * @param str the string to convert + * @returns %TRUE if the string was successfully parsed, + * and %FALSE otherwise + * + * a {@link Units} + */ + function units_from_string(str: string): [ boolean, Units ]; + + /** + * Calculates the nearest power of two, greater than or equal to #a. + * @param a Value to get the next power + * @returns The nearest power of two, greater or equal to #a. + */ + function util_next_p2(a: number): number; + + /** + * Retrieves a pointer to the {@link PaintNode} contained inside + * the passed #GValue, and if not %NULL it will increase the + * reference count. + * @param value a #GValue initialized with %CLUTTER_TYPE_PAINT_NODE + * @returns a pointer + * to the {@link PaintNode}, with its reference count increased, + * or %NULL + */ + function value_dup_paint_node(value: GObject.Value): PaintNode; + + /** + * Gets the {@link Color} contained in #value. + * @param value a #GValue initialized to #CLUTTER_TYPE_COLOR + * @returns the color inside the passed #GValue + */ + function value_get_color(value: GObject.Value): Color; + + /** + * Gets the fixed point value stored inside #value. + * @param value a #GValue initialized to %COGL_TYPE_FIXED + * @returns the value inside the passed #GValue + */ + function value_get_fixed(value: GObject.Value): Cogl.Fixed; + + /** + * Retrieves a pointer to the {@link PaintNode} contained inside + * the passed #GValue. + * @param value a #GValue initialized with %CLUTTER_TYPE_PAINT_NODE + * @returns a pointer to + * a {@link PaintNode}, or %NULL + */ + function value_get_paint_node(value: GObject.Value): PaintNode; + + /** + * Retrieves the list of floating point values stored inside + * the passed #GValue. #value must have been initialized with + * %CLUTTER_TYPE_SHADER_FLOAT. + * @param value a #GValue + * @returns the pointer to a list of + * floating point values. The returned value is owned by the + * #GValue and should never be modified or freed. + * + * return location for the number of returned floating + * point values, or %NULL + */ + function value_get_shader_float(value: GObject.Value): [ number[], number ]; + + /** + * Retrieves the list of integer values stored inside the passed + * #GValue. #value must have been initialized with + * %CLUTTER_TYPE_SHADER_INT. + * @param value a #GValue + * @returns the pointer to a list of + * integer values. The returned value is owned by the #GValue and + * should never be modified or freed. + * + * return location for the number of returned integer + * values, or %NULL + */ + function value_get_shader_int(value: GObject.Value): [ number[], number ]; + + /** + * Retrieves a matrix of floating point values stored inside + * the passed #GValue. #value must have been initialized with + * %CLUTTER_TYPE_SHADER_MATRIX. + * @param value a #GValue + * @returns the pointer to a matrix + * of floating point values. The returned value is owned by the #GValue and + * should never be modified or freed. + * + * return location for the number of returned floating + * point values, or %NULL + */ + function value_get_shader_matrix(value: GObject.Value): [ number[], number ]; + + /** + * Gets the {@link Units} contained in #value. + * @param value a #GValue initialized to %CLUTTER_TYPE_UNITS + * @returns the units inside the passed #GValue + */ + function value_get_units(value: GObject.Value): Units; + + /** + * Sets #value to #color. + * @param value a #GValue initialized to #CLUTTER_TYPE_COLOR + * @param color the color to set + */ + function value_set_color(value: GObject.Value, color: Color): void; + + /** + * Sets #value to #fixed_. + * @param value a #GValue initialized to %COGL_TYPE_FIXED + * @param fixed_ the fixed point value to set + */ + function value_set_fixed(value: GObject.Value, fixed_: Cogl.Fixed): void; + + /** + * Sets the contents of a #GValue initialized with %CLUTTER_TYPE_PAINT_NODE. + * + * This function increased the reference count of #node; if you do not wish + * to increase the reference count, use {@link Clutter.value.take_paint_node} + * instead. The reference count will be released by g_value_unset(). + * @param value a #GValue initialized with %CLUTTER_TYPE_PAINT_NODE + * @param node a {@link PaintNode}, or %NULL + */ + function value_set_paint_node(value: GObject.Value, node: PaintNode | null): void; + + /** + * Sets #floats as the contents of #value. The passed #GValue + * must have been initialized using %CLUTTER_TYPE_SHADER_FLOAT. + * @param value a #GValue + * @param size number of floating point values in #floats + * @param floats an array of floating point values + */ + function value_set_shader_float(value: GObject.Value, size: number, floats: number[]): void; + + /** + * Sets #ints as the contents of #value. The passed #GValue + * must have been initialized using %CLUTTER_TYPE_SHADER_INT. + * @param value a #GValue + * @param size number of integer values in #ints + * @param ints an array of integer values + */ + function value_set_shader_int(value: GObject.Value, size: number, ints: number[]): void; + + /** + * Sets #matrix as the contents of #value. The passed #GValue + * must have been initialized using %CLUTTER_TYPE_SHADER_MATRIX. + * @param value a #GValue + * @param size number of floating point values in #floats + * @param matrix a matrix of floating point values + */ + function value_set_shader_matrix(value: GObject.Value, size: number, matrix: number[]): void; + + /** + * Sets #value to #units + * @param value a #GValue initialized to %CLUTTER_TYPE_UNITS + * @param units the units to set + */ + function value_set_units(value: GObject.Value, units: Units): void; + + /** + * Sets the contents of a #GValue initialized with %CLUTTER_TYPE_PAINT_NODE. + * + * Unlike {@link Clutter.value.set_paint_node}, this function will not take a + * reference on the passed #node: instead, it will take ownership of the + * current reference count. + * @param value a #GValue, initialized with %CLUTTER_TYPE_PAINT_NODE + * @param node a {@link PaintNode}, or %NULL + */ + function value_take_paint_node(value: GObject.Value, node: PaintNode | null): void; + + // const 0: number; + + // const 1: number; + + // const 2: number; + + // const 3: number; + + // const 3270_AltCursor: number; + + // const 3270_Attn: number; + + // const 3270_BackTab: number; + + // const 3270_ChangeScreen: number; + + // const 3270_Copy: number; + + // const 3270_CursorBlink: number; + + // const 3270_CursorSelect: number; + + // const 3270_DeleteWord: number; + + // const 3270_Duplicate: number; + + // const 3270_Enter: number; + + // const 3270_EraseEOF: number; + + // const 3270_EraseInput: number; + + // const 3270_ExSelect: number; + + // const 3270_FieldMark: number; + + // const 3270_Ident: number; + + // const 3270_Jump: number; + + // const 3270_KeyClick: number; + + // const 3270_Left2: number; + + // const 3270_PA1: number; + + // const 3270_PA2: number; + + // const 3270_PA3: number; + + // const 3270_Play: number; + + // const 3270_PrintScreen: number; + + // const 3270_Quit: number; + + // const 3270_Record: number; + + // const 3270_Reset: number; + + // const 3270_Right2: number; + + // const 3270_Rule: number; + + // const 3270_Setup: number; + + // const 3270_Test: number; + + // const 4: number; + + // const 5: number; + + // const 6: number; + + // const 7: number; + + // const 8: number; + + // const 9: number; + + const A: number; + + const AE: number; + + const Aacute: number; + + const Abelowdot: number; + + const Abreve: number; + + const Abreveacute: number; + + const Abrevebelowdot: number; + + const Abrevegrave: number; + + const Abrevehook: number; + + const Abrevetilde: number; + + const AccessX_Enable: number; + + const AccessX_Feedback_Enable: number; + + const Acircumflex: number; + + const Acircumflexacute: number; + + const Acircumflexbelowdot: number; + + const Acircumflexgrave: number; + + const Acircumflexhook: number; + + const Acircumflextilde: number; + + const AddFavorite: number; + + const Adiaeresis: number; + + const Agrave: number; + + const Ahook: number; + + const Alt_L: number; + + const Alt_R: number; + + const Amacron: number; + + const Aogonek: number; + + const ApplicationLeft: number; + + const ApplicationRight: number; + + const Arabic_0: number; + + const Arabic_1: number; + + const Arabic_2: number; + + const Arabic_3: number; + + const Arabic_4: number; + + const Arabic_5: number; + + const Arabic_6: number; + + const Arabic_7: number; + + const Arabic_8: number; + + const Arabic_9: number; + + const Arabic_ain: number; + + const Arabic_alef: number; + + const Arabic_alefmaksura: number; + + const Arabic_beh: number; + + const Arabic_comma: number; + + const Arabic_dad: number; + + const Arabic_dal: number; + + const Arabic_damma: number; + + const Arabic_dammatan: number; + + const Arabic_ddal: number; + + const Arabic_farsi_yeh: number; + + const Arabic_fatha: number; + + const Arabic_fathatan: number; + + const Arabic_feh: number; + + const Arabic_fullstop: number; + + const Arabic_gaf: number; + + const Arabic_ghain: number; + + const Arabic_ha: number; + + const Arabic_hah: number; + + const Arabic_hamza: number; + + const Arabic_hamza_above: number; + + const Arabic_hamza_below: number; + + const Arabic_hamzaonalef: number; + + const Arabic_hamzaonwaw: number; + + const Arabic_hamzaonyeh: number; + + const Arabic_hamzaunderalef: number; + + const Arabic_heh: number; + + const Arabic_heh_doachashmee: number; + + const Arabic_heh_goal: number; + + const Arabic_jeem: number; + + const Arabic_jeh: number; + + const Arabic_kaf: number; + + const Arabic_kasra: number; + + const Arabic_kasratan: number; + + const Arabic_keheh: number; + + const Arabic_khah: number; + + const Arabic_lam: number; + + const Arabic_madda_above: number; + + const Arabic_maddaonalef: number; + + const Arabic_meem: number; + + const Arabic_noon: number; + + const Arabic_noon_ghunna: number; + + const Arabic_peh: number; + + const Arabic_percent: number; + + const Arabic_qaf: number; + + const Arabic_question_mark: number; + + const Arabic_ra: number; + + const Arabic_rreh: number; + + const Arabic_sad: number; + + const Arabic_seen: number; + + const Arabic_semicolon: number; + + const Arabic_shadda: number; + + const Arabic_sheen: number; + + const Arabic_sukun: number; + + const Arabic_superscript_alef: number; + + const Arabic_switch: number; + + const Arabic_tah: number; + + const Arabic_tatweel: number; + + const Arabic_tcheh: number; + + const Arabic_teh: number; + + const Arabic_tehmarbuta: number; + + const Arabic_thal: number; + + const Arabic_theh: number; + + const Arabic_tteh: number; + + const Arabic_veh: number; + + const Arabic_waw: number; + + const Arabic_yeh: number; + + const Arabic_yeh_baree: number; + + const Arabic_zah: number; + + const Arabic_zain: number; + + const Aring: number; + + const Armenian_AT: number; + + const Armenian_AYB: number; + + const Armenian_BEN: number; + + const Armenian_CHA: number; + + const Armenian_DA: number; + + const Armenian_DZA: number; + + const Armenian_E: number; + + const Armenian_FE: number; + + const Armenian_GHAT: number; + + const Armenian_GIM: number; + + const Armenian_HI: number; + + const Armenian_HO: number; + + const Armenian_INI: number; + + const Armenian_JE: number; + + const Armenian_KE: number; + + const Armenian_KEN: number; + + const Armenian_KHE: number; + + const Armenian_LYUN: number; + + const Armenian_MEN: number; + + const Armenian_NU: number; + + const Armenian_O: number; + + const Armenian_PE: number; + + const Armenian_PYUR: number; + + const Armenian_RA: number; + + const Armenian_RE: number; + + const Armenian_SE: number; + + const Armenian_SHA: number; + + const Armenian_TCHE: number; + + const Armenian_TO: number; + + const Armenian_TSA: number; + + const Armenian_TSO: number; + + const Armenian_TYUN: number; + + const Armenian_VEV: number; + + const Armenian_VO: number; + + const Armenian_VYUN: number; + + const Armenian_YECH: number; + + const Armenian_ZA: number; + + const Armenian_ZHE: number; + + const Armenian_accent: number; + + const Armenian_amanak: number; + + const Armenian_apostrophe: number; + + const Armenian_at: number; + + const Armenian_ayb: number; + + const Armenian_ben: number; + + const Armenian_but: number; + + const Armenian_cha: number; + + const Armenian_da: number; + + const Armenian_dza: number; + + const Armenian_e: number; + + const Armenian_exclam: number; + + const Armenian_fe: number; + + const Armenian_full_stop: number; + + const Armenian_ghat: number; + + const Armenian_gim: number; + + const Armenian_hi: number; + + const Armenian_ho: number; + + const Armenian_hyphen: number; + + const Armenian_ini: number; + + const Armenian_je: number; + + const Armenian_ke: number; + + const Armenian_ken: number; + + const Armenian_khe: number; + + const Armenian_ligature_ew: number; + + const Armenian_lyun: number; + + const Armenian_men: number; + + const Armenian_nu: number; + + const Armenian_o: number; + + const Armenian_paruyk: number; + + const Armenian_pe: number; + + const Armenian_pyur: number; + + const Armenian_question: number; + + const Armenian_ra: number; + + const Armenian_re: number; + + const Armenian_se: number; + + const Armenian_separation_mark: number; + + const Armenian_sha: number; + + const Armenian_shesht: number; + + const Armenian_tche: number; + + const Armenian_to: number; + + const Armenian_tsa: number; + + const Armenian_tso: number; + + const Armenian_tyun: number; + + const Armenian_verjaket: number; + + const Armenian_vev: number; + + const Armenian_vo: number; + + const Armenian_vyun: number; + + const Armenian_yech: number; + + const Armenian_yentamna: number; + + const Armenian_za: number; + + const Armenian_zhe: number; + + const Atilde: number; + + const AudibleBell_Enable: number; + + const AudioCycleTrack: number; + + const AudioForward: number; + + const AudioLowerVolume: number; + + const AudioMedia: number; + + const AudioMicMute: number; + + const AudioMute: number; + + const AudioNext: number; + + const AudioPause: number; + + const AudioPlay: number; + + const AudioPrev: number; + + const AudioRaiseVolume: number; + + const AudioRandomPlay: number; + + const AudioRecord: number; + + const AudioRepeat: number; + + const AudioRewind: number; + + const AudioStop: number; + + const Away: number; + + const B: number; + + /** + * The middle button of a pointer device. + * @returns The middle button of a pointer device. + */ + const BUTTON_MIDDLE: number; + + /** + * The primary button of a pointer device. + * + * This is typically the left mouse button in a right-handed + * mouse configuration. + * @returns The primary button of a pointer device. + * + * This is typically the left mouse button in a right-handed + * mouse configuration. + */ + const BUTTON_PRIMARY: number; + + /** + * The secondary button of a pointer device. + * + * This is typically the right mouse button in a right-handed + * mouse configuration. + * @returns The secondary button of a pointer device. + * + * This is typically the right mouse button in a right-handed + * mouse configuration. + */ + const BUTTON_SECONDARY: number; + + const Babovedot: number; + + const Back: number; + + const BackForward: number; + + const BackSpace: number; + + const Battery: number; + + const Begin: number; + + const Blue: number; + + const Bluetooth: number; + + const Book: number; + + const BounceKeys_Enable: number; + + const Break: number; + + const BrightnessAdjust: number; + + const Byelorussian_SHORTU: number; + + const Byelorussian_shortu: number; + + const C: number; + + const CD: number; + + const CH: number; + + /** + * Cogl (internal GL abstraction utility library) backend. Can be "gl" or + * "gles" currently + * @returns Cogl (internal GL abstraction utility library) backend. Can be "gl" or + * "gles" currently + */ + const COGL: string; + + /** + * Default value for "now". + * @returns Default value for "now". + */ + const CURRENT_TIME: number; + + const C_H: number; + + const C_h: number; + + const Cabovedot: number; + + const Cacute: number; + + const Calculator: number; + + const Calendar: number; + + const Cancel: number; + + const Caps_Lock: number; + + const Ccaron: number; + + const Ccedilla: number; + + const Ccircumflex: number; + + const Ch: number; + + const Clear: number; + + const ClearGrab: number; + + const Close: number; + + const Codeinput: number; + + const ColonSign: number; + + const Community: number; + + const ContrastAdjust: number; + + const Control_L: number; + + const Control_R: number; + + const Copy: number; + + const CruzeiroSign: number; + + const Cut: number; + + const CycleAngle: number; + + const Cyrillic_A: number; + + const Cyrillic_BE: number; + + const Cyrillic_CHE: number; + + const Cyrillic_CHE_descender: number; + + const Cyrillic_CHE_vertstroke: number; + + const Cyrillic_DE: number; + + const Cyrillic_DZHE: number; + + const Cyrillic_E: number; + + const Cyrillic_EF: number; + + const Cyrillic_EL: number; + + const Cyrillic_EM: number; + + const Cyrillic_EN: number; + + const Cyrillic_EN_descender: number; + + const Cyrillic_ER: number; + + const Cyrillic_ES: number; + + const Cyrillic_GHE: number; + + const Cyrillic_GHE_bar: number; + + const Cyrillic_HA: number; + + const Cyrillic_HARDSIGN: number; + + const Cyrillic_HA_descender: number; + + const Cyrillic_I: number; + + const Cyrillic_IE: number; + + const Cyrillic_IO: number; + + const Cyrillic_I_macron: number; + + const Cyrillic_JE: number; + + const Cyrillic_KA: number; + + const Cyrillic_KA_descender: number; + + const Cyrillic_KA_vertstroke: number; + + const Cyrillic_LJE: number; + + const Cyrillic_NJE: number; + + const Cyrillic_O: number; + + const Cyrillic_O_bar: number; + + const Cyrillic_PE: number; + + const Cyrillic_SCHWA: number; + + const Cyrillic_SHA: number; + + const Cyrillic_SHCHA: number; + + const Cyrillic_SHHA: number; + + const Cyrillic_SHORTI: number; + + const Cyrillic_SOFTSIGN: number; + + const Cyrillic_TE: number; + + const Cyrillic_TSE: number; + + const Cyrillic_U: number; + + const Cyrillic_U_macron: number; + + const Cyrillic_U_straight: number; + + const Cyrillic_U_straight_bar: number; + + const Cyrillic_VE: number; + + const Cyrillic_YA: number; + + const Cyrillic_YERU: number; + + const Cyrillic_YU: number; + + const Cyrillic_ZE: number; + + const Cyrillic_ZHE: number; + + const Cyrillic_ZHE_descender: number; + + const Cyrillic_a: number; + + const Cyrillic_be: number; + + const Cyrillic_che: number; + + const Cyrillic_che_descender: number; + + const Cyrillic_che_vertstroke: number; + + const Cyrillic_de: number; + + const Cyrillic_dzhe: number; + + const Cyrillic_e: number; + + const Cyrillic_ef: number; + + const Cyrillic_el: number; + + const Cyrillic_em: number; + + const Cyrillic_en: number; + + const Cyrillic_en_descender: number; + + const Cyrillic_er: number; + + const Cyrillic_es: number; + + const Cyrillic_ghe: number; + + const Cyrillic_ghe_bar: number; + + const Cyrillic_ha: number; + + const Cyrillic_ha_descender: number; + + const Cyrillic_hardsign: number; + + const Cyrillic_i: number; + + const Cyrillic_i_macron: number; + + const Cyrillic_ie: number; + + const Cyrillic_io: number; + + const Cyrillic_je: number; + + const Cyrillic_ka: number; + + const Cyrillic_ka_descender: number; + + const Cyrillic_ka_vertstroke: number; + + const Cyrillic_lje: number; + + const Cyrillic_nje: number; + + const Cyrillic_o: number; + + const Cyrillic_o_bar: number; + + const Cyrillic_pe: number; + + const Cyrillic_schwa: number; + + const Cyrillic_sha: number; + + const Cyrillic_shcha: number; + + const Cyrillic_shha: number; + + const Cyrillic_shorti: number; + + const Cyrillic_softsign: number; + + const Cyrillic_te: number; + + const Cyrillic_tse: number; + + const Cyrillic_u: number; + + const Cyrillic_u_macron: number; + + const Cyrillic_u_straight: number; + + const Cyrillic_u_straight_bar: number; + + const Cyrillic_ve: number; + + const Cyrillic_ya: number; + + const Cyrillic_yeru: number; + + const Cyrillic_yu: number; + + const Cyrillic_ze: number; + + const Cyrillic_zhe: number; + + const Cyrillic_zhe_descender: number; + + const D: number; + + const DOS: number; + + const Dabovedot: number; + + const Dcaron: number; + + const Delete: number; + + const Display: number; + + const Documents: number; + + const DongSign: number; + + const Down: number; + + const Dstroke: number; + + const E: number; + + const ENG: number; + + const ETH: number; + + /** + * Continues the propagation of an event; this macro should be + * used in event-related signals. + * @returns Continues the propagation of an event; this macro should be + * used in event-related signals. + */ + const EVENT_PROPAGATE: boolean; + + /** + * Stops the propagation of an event; this macro should be used + * in event-related signals. + * @returns Stops the propagation of an event; this macro should be used + * in event-related signals. + */ + const EVENT_STOP: boolean; + + const EZH: number; + + const Eabovedot: number; + + const Eacute: number; + + const Ebelowdot: number; + + const Ecaron: number; + + const Ecircumflex: number; + + const Ecircumflexacute: number; + + const Ecircumflexbelowdot: number; + + const Ecircumflexgrave: number; + + const Ecircumflexhook: number; + + const Ecircumflextilde: number; + + const EcuSign: number; + + const Ediaeresis: number; + + const Egrave: number; + + const Ehook: number; + + const Eisu_Shift: number; + + const Eisu_toggle: number; + + const Eject: number; + + const Emacron: number; + + const End: number; + + const Eogonek: number; + + const Escape: number; + + const Eth: number; + + const Etilde: number; + + const EuroSign: number; + + const Excel: number; + + const Execute: number; + + const Explorer: number; + + const F: number; + + const F1: number; + + const F10: number; + + const F11: number; + + const F12: number; + + const F13: number; + + const F14: number; + + const F15: number; + + const F16: number; + + const F17: number; + + const F18: number; + + const F19: number; + + const F2: number; + + const F20: number; + + const F21: number; + + const F22: number; + + const F23: number; + + const F24: number; + + const F25: number; + + const F26: number; + + const F27: number; + + const F28: number; + + const F29: number; + + const F3: number; + + const F30: number; + + const F31: number; + + const F32: number; + + const F33: number; + + const F34: number; + + const F35: number; + + const F4: number; + + const F5: number; + + const F6: number; + + const F7: number; + + const F8: number; + + const F9: number; + + const FFrancSign: number; + + /** + * GL Windowing system used + * @returns GL Windowing system used + */ + const FLAVOUR: string; + + const Fabovedot: number; + + const Farsi_0: number; + + const Farsi_1: number; + + const Farsi_2: number; + + const Farsi_3: number; + + const Farsi_4: number; + + const Farsi_5: number; + + const Farsi_6: number; + + const Farsi_7: number; + + const Farsi_8: number; + + const Farsi_9: number; + + const Farsi_yeh: number; + + const Favorites: number; + + const Finance: number; + + const Find: number; + + const First_Virtual_Screen: number; + + const Forward: number; + + const FrameBack: number; + + const FrameForward: number; + + const G: number; + + const Gabovedot: number; + + const Game: number; + + const Gbreve: number; + + const Gcaron: number; + + const Gcedilla: number; + + const Gcircumflex: number; + + const Georgian_an: number; + + const Georgian_ban: number; + + const Georgian_can: number; + + const Georgian_char: number; + + const Georgian_chin: number; + + const Georgian_cil: number; + + const Georgian_don: number; + + const Georgian_en: number; + + const Georgian_fi: number; + + const Georgian_gan: number; + + const Georgian_ghan: number; + + const Georgian_hae: number; + + const Georgian_har: number; + + const Georgian_he: number; + + const Georgian_hie: number; + + const Georgian_hoe: number; + + const Georgian_in: number; + + const Georgian_jhan: number; + + const Georgian_jil: number; + + const Georgian_kan: number; + + const Georgian_khar: number; + + const Georgian_las: number; + + const Georgian_man: number; + + const Georgian_nar: number; + + const Georgian_on: number; + + const Georgian_par: number; + + const Georgian_phar: number; + + const Georgian_qar: number; + + const Georgian_rae: number; + + const Georgian_san: number; + + const Georgian_shin: number; + + const Georgian_tan: number; + + const Georgian_tar: number; + + const Georgian_un: number; + + const Georgian_vin: number; + + const Georgian_we: number; + + const Georgian_xan: number; + + const Georgian_zen: number; + + const Georgian_zhar: number; + + const Go: number; + + const Greek_ALPHA: number; + + const Greek_ALPHAaccent: number; + + const Greek_BETA: number; + + const Greek_CHI: number; + + const Greek_DELTA: number; + + const Greek_EPSILON: number; + + const Greek_EPSILONaccent: number; + + const Greek_ETA: number; + + const Greek_ETAaccent: number; + + const Greek_GAMMA: number; + + const Greek_IOTA: number; + + const Greek_IOTAaccent: number; + + const Greek_IOTAdiaeresis: number; + + const Greek_IOTAdieresis: number; + + const Greek_KAPPA: number; + + const Greek_LAMBDA: number; + + const Greek_LAMDA: number; + + const Greek_MU: number; + + const Greek_NU: number; + + const Greek_OMEGA: number; + + const Greek_OMEGAaccent: number; + + const Greek_OMICRON: number; + + const Greek_OMICRONaccent: number; + + const Greek_PHI: number; + + const Greek_PI: number; + + const Greek_PSI: number; + + const Greek_RHO: number; + + const Greek_SIGMA: number; + + const Greek_TAU: number; + + const Greek_THETA: number; + + const Greek_UPSILON: number; + + const Greek_UPSILONaccent: number; + + const Greek_UPSILONdieresis: number; + + const Greek_XI: number; + + const Greek_ZETA: number; + + const Greek_accentdieresis: number; + + const Greek_alpha: number; + + const Greek_alphaaccent: number; + + const Greek_beta: number; + + const Greek_chi: number; + + const Greek_delta: number; + + const Greek_epsilon: number; + + const Greek_epsilonaccent: number; + + const Greek_eta: number; + + const Greek_etaaccent: number; + + const Greek_finalsmallsigma: number; + + const Greek_gamma: number; + + const Greek_horizbar: number; + + const Greek_iota: number; + + const Greek_iotaaccent: number; + + const Greek_iotaaccentdieresis: number; + + const Greek_iotadieresis: number; + + const Greek_kappa: number; + + const Greek_lambda: number; + + const Greek_lamda: number; + + const Greek_mu: number; + + const Greek_nu: number; + + const Greek_omega: number; + + const Greek_omegaaccent: number; + + const Greek_omicron: number; + + const Greek_omicronaccent: number; + + const Greek_phi: number; + + const Greek_pi: number; + + const Greek_psi: number; + + const Greek_rho: number; + + const Greek_sigma: number; + + const Greek_switch: number; + + const Greek_tau: number; + + const Greek_theta: number; + + const Greek_upsilon: number; + + const Greek_upsilonaccent: number; + + const Greek_upsilonaccentdieresis: number; + + const Greek_upsilondieresis: number; + + const Greek_xi: number; + + const Greek_zeta: number; + + const Green: number; + + const H: number; + + const HAS_WAYLAND_COMPOSITOR_SUPPORT: number; + + const Hangul: number; + + const Hangul_A: number; + + const Hangul_AE: number; + + const Hangul_AraeA: number; + + const Hangul_AraeAE: number; + + const Hangul_Banja: number; + + const Hangul_Cieuc: number; + + const Hangul_Codeinput: number; + + const Hangul_Dikeud: number; + + const Hangul_E: number; + + const Hangul_EO: number; + + const Hangul_EU: number; + + const Hangul_End: number; + + const Hangul_Hanja: number; + + const Hangul_Hieuh: number; + + const Hangul_I: number; + + const Hangul_Ieung: number; + + const Hangul_J_Cieuc: number; + + const Hangul_J_Dikeud: number; + + const Hangul_J_Hieuh: number; + + const Hangul_J_Ieung: number; + + const Hangul_J_Jieuj: number; + + const Hangul_J_Khieuq: number; + + const Hangul_J_Kiyeog: number; + + const Hangul_J_KiyeogSios: number; + + const Hangul_J_KkogjiDalrinIeung: number; + + const Hangul_J_Mieum: number; + + const Hangul_J_Nieun: number; + + const Hangul_J_NieunHieuh: number; + + const Hangul_J_NieunJieuj: number; + + const Hangul_J_PanSios: number; + + const Hangul_J_Phieuf: number; + + const Hangul_J_Pieub: number; + + const Hangul_J_PieubSios: number; + + const Hangul_J_Rieul: number; + + const Hangul_J_RieulHieuh: number; + + const Hangul_J_RieulKiyeog: number; + + const Hangul_J_RieulMieum: number; + + const Hangul_J_RieulPhieuf: number; + + const Hangul_J_RieulPieub: number; + + const Hangul_J_RieulSios: number; + + const Hangul_J_RieulTieut: number; + + const Hangul_J_Sios: number; + + const Hangul_J_SsangKiyeog: number; + + const Hangul_J_SsangSios: number; + + const Hangul_J_Tieut: number; + + const Hangul_J_YeorinHieuh: number; + + const Hangul_Jamo: number; + + const Hangul_Jeonja: number; + + const Hangul_Jieuj: number; + + const Hangul_Khieuq: number; + + const Hangul_Kiyeog: number; + + const Hangul_KiyeogSios: number; + + const Hangul_KkogjiDalrinIeung: number; + + const Hangul_Mieum: number; + + const Hangul_MultipleCandidate: number; + + const Hangul_Nieun: number; + + const Hangul_NieunHieuh: number; + + const Hangul_NieunJieuj: number; + + const Hangul_O: number; + + const Hangul_OE: number; + + const Hangul_PanSios: number; + + const Hangul_Phieuf: number; + + const Hangul_Pieub: number; + + const Hangul_PieubSios: number; + + const Hangul_PostHanja: number; + + const Hangul_PreHanja: number; + + const Hangul_PreviousCandidate: number; + + const Hangul_Rieul: number; + + const Hangul_RieulHieuh: number; + + const Hangul_RieulKiyeog: number; + + const Hangul_RieulMieum: number; + + const Hangul_RieulPhieuf: number; + + const Hangul_RieulPieub: number; + + const Hangul_RieulSios: number; + + const Hangul_RieulTieut: number; + + const Hangul_RieulYeorinHieuh: number; + + const Hangul_Romaja: number; + + const Hangul_SingleCandidate: number; + + const Hangul_Sios: number; + + const Hangul_Special: number; + + const Hangul_SsangDikeud: number; + + const Hangul_SsangJieuj: number; + + const Hangul_SsangKiyeog: number; + + const Hangul_SsangPieub: number; + + const Hangul_SsangSios: number; + + const Hangul_Start: number; + + const Hangul_SunkyeongeumMieum: number; + + const Hangul_SunkyeongeumPhieuf: number; + + const Hangul_SunkyeongeumPieub: number; + + const Hangul_Tieut: number; + + const Hangul_U: number; + + const Hangul_WA: number; + + const Hangul_WAE: number; + + const Hangul_WE: number; + + const Hangul_WEO: number; + + const Hangul_WI: number; + + const Hangul_YA: number; + + const Hangul_YAE: number; + + const Hangul_YE: number; + + const Hangul_YEO: number; + + const Hangul_YI: number; + + const Hangul_YO: number; + + const Hangul_YU: number; + + const Hangul_YeorinHieuh: number; + + const Hangul_switch: number; + + const Hankaku: number; + + const Hcircumflex: number; + + const Hebrew_switch: number; + + const Help: number; + + const Henkan: number; + + const Henkan_Mode: number; + + const Hibernate: number; + + const Hiragana: number; + + const Hiragana_Katakana: number; + + const History: number; + + const Home: number; + + const HomePage: number; + + const HotLinks: number; + + const Hstroke: number; + + const Hyper_L: number; + + const Hyper_R: number; + + const I: number; + + const INPUT_EVDEV: string; + + const INPUT_GDK: string; + + const INPUT_NULL: string; + + const INPUT_WAYLAND: string; + + const INPUT_X11: string; + + const ISO_Center_Object: number; + + const ISO_Continuous_Underline: number; + + const ISO_Discontinuous_Underline: number; + + const ISO_Emphasize: number; + + const ISO_Enter: number; + + const ISO_Fast_Cursor_Down: number; + + const ISO_Fast_Cursor_Left: number; + + const ISO_Fast_Cursor_Right: number; + + const ISO_Fast_Cursor_Up: number; + + const ISO_First_Group: number; + + const ISO_First_Group_Lock: number; + + const ISO_Group_Latch: number; + + const ISO_Group_Lock: number; + + const ISO_Group_Shift: number; + + const ISO_Last_Group: number; + + const ISO_Last_Group_Lock: number; + + const ISO_Left_Tab: number; + + const ISO_Level2_Latch: number; + + const ISO_Level3_Latch: number; + + const ISO_Level3_Lock: number; + + const ISO_Level3_Shift: number; + + const ISO_Level5_Latch: number; + + const ISO_Level5_Lock: number; + + const ISO_Level5_Shift: number; + + const ISO_Lock: number; + + const ISO_Move_Line_Down: number; + + const ISO_Move_Line_Up: number; + + const ISO_Next_Group: number; + + const ISO_Next_Group_Lock: number; + + const ISO_Partial_Line_Down: number; + + const ISO_Partial_Line_Up: number; + + const ISO_Partial_Space_Left: number; + + const ISO_Partial_Space_Right: number; + + const ISO_Prev_Group: number; + + const ISO_Prev_Group_Lock: number; + + const ISO_Release_Both_Margins: number; + + const ISO_Release_Margin_Left: number; + + const ISO_Release_Margin_Right: number; + + const ISO_Set_Margin_Left: number; + + const ISO_Set_Margin_Right: number; + + const Iabovedot: number; + + const Iacute: number; + + const Ibelowdot: number; + + const Ibreve: number; + + const Icircumflex: number; + + const Idiaeresis: number; + + const Igrave: number; + + const Ihook: number; + + const Imacron: number; + + const Insert: number; + + const Iogonek: number; + + const Itilde: number; + + const J: number; + + const Jcircumflex: number; + + const K: number; + + const KEY_0: number; + + const KEY_1: number; + + const KEY_2: number; + + const KEY_3: number; + + const KEY_3270_AltCursor: number; + + const KEY_3270_Attn: number; + + const KEY_3270_BackTab: number; + + const KEY_3270_ChangeScreen: number; + + const KEY_3270_Copy: number; + + const KEY_3270_CursorBlink: number; + + const KEY_3270_CursorSelect: number; + + const KEY_3270_DeleteWord: number; + + const KEY_3270_Duplicate: number; + + const KEY_3270_Enter: number; + + const KEY_3270_EraseEOF: number; + + const KEY_3270_EraseInput: number; + + const KEY_3270_ExSelect: number; + + const KEY_3270_FieldMark: number; + + const KEY_3270_Ident: number; + + const KEY_3270_Jump: number; + + const KEY_3270_KeyClick: number; + + const KEY_3270_Left2: number; + + const KEY_3270_PA1: number; + + const KEY_3270_PA2: number; + + const KEY_3270_PA3: number; + + const KEY_3270_Play: number; + + const KEY_3270_PrintScreen: number; + + const KEY_3270_Quit: number; + + const KEY_3270_Record: number; + + const KEY_3270_Reset: number; + + const KEY_3270_Right2: number; + + const KEY_3270_Rule: number; + + const KEY_3270_Setup: number; + + const KEY_3270_Test: number; + + const KEY_4: number; + + const KEY_5: number; + + const KEY_6: number; + + const KEY_7: number; + + const KEY_8: number; + + const KEY_9: number; + + const KEY_A: number; + + const KEY_AE: number; + + const KEY_Aacute: number; + + const KEY_Abelowdot: number; + + const KEY_Abreve: number; + + const KEY_Abreveacute: number; + + const KEY_Abrevebelowdot: number; + + const KEY_Abrevegrave: number; + + const KEY_Abrevehook: number; + + const KEY_Abrevetilde: number; + + const KEY_AccessX_Enable: number; + + const KEY_AccessX_Feedback_Enable: number; + + const KEY_Acircumflex: number; + + const KEY_Acircumflexacute: number; + + const KEY_Acircumflexbelowdot: number; + + const KEY_Acircumflexgrave: number; + + const KEY_Acircumflexhook: number; + + const KEY_Acircumflextilde: number; + + const KEY_AddFavorite: number; + + const KEY_Adiaeresis: number; + + const KEY_Agrave: number; + + const KEY_Ahook: number; + + const KEY_Alt_L: number; + + const KEY_Alt_R: number; + + const KEY_Amacron: number; + + const KEY_Aogonek: number; + + const KEY_ApplicationLeft: number; + + const KEY_ApplicationRight: number; + + const KEY_Arabic_0: number; + + const KEY_Arabic_1: number; + + const KEY_Arabic_2: number; + + const KEY_Arabic_3: number; + + const KEY_Arabic_4: number; + + const KEY_Arabic_5: number; + + const KEY_Arabic_6: number; + + const KEY_Arabic_7: number; + + const KEY_Arabic_8: number; + + const KEY_Arabic_9: number; + + const KEY_Arabic_ain: number; + + const KEY_Arabic_alef: number; + + const KEY_Arabic_alefmaksura: number; + + const KEY_Arabic_beh: number; + + const KEY_Arabic_comma: number; + + const KEY_Arabic_dad: number; + + const KEY_Arabic_dal: number; + + const KEY_Arabic_damma: number; + + const KEY_Arabic_dammatan: number; + + const KEY_Arabic_ddal: number; + + const KEY_Arabic_farsi_yeh: number; + + const KEY_Arabic_fatha: number; + + const KEY_Arabic_fathatan: number; + + const KEY_Arabic_feh: number; + + const KEY_Arabic_fullstop: number; + + const KEY_Arabic_gaf: number; + + const KEY_Arabic_ghain: number; + + const KEY_Arabic_ha: number; + + const KEY_Arabic_hah: number; + + const KEY_Arabic_hamza: number; + + const KEY_Arabic_hamza_above: number; + + const KEY_Arabic_hamza_below: number; + + const KEY_Arabic_hamzaonalef: number; + + const KEY_Arabic_hamzaonwaw: number; + + const KEY_Arabic_hamzaonyeh: number; + + const KEY_Arabic_hamzaunderalef: number; + + const KEY_Arabic_heh: number; + + const KEY_Arabic_heh_doachashmee: number; + + const KEY_Arabic_heh_goal: number; + + const KEY_Arabic_jeem: number; + + const KEY_Arabic_jeh: number; + + const KEY_Arabic_kaf: number; + + const KEY_Arabic_kasra: number; + + const KEY_Arabic_kasratan: number; + + const KEY_Arabic_keheh: number; + + const KEY_Arabic_khah: number; + + const KEY_Arabic_lam: number; + + const KEY_Arabic_madda_above: number; + + const KEY_Arabic_maddaonalef: number; + + const KEY_Arabic_meem: number; + + const KEY_Arabic_noon: number; + + const KEY_Arabic_noon_ghunna: number; + + const KEY_Arabic_peh: number; + + const KEY_Arabic_percent: number; + + const KEY_Arabic_qaf: number; + + const KEY_Arabic_question_mark: number; + + const KEY_Arabic_ra: number; + + const KEY_Arabic_rreh: number; + + const KEY_Arabic_sad: number; + + const KEY_Arabic_seen: number; + + const KEY_Arabic_semicolon: number; + + const KEY_Arabic_shadda: number; + + const KEY_Arabic_sheen: number; + + const KEY_Arabic_sukun: number; + + const KEY_Arabic_superscript_alef: number; + + const KEY_Arabic_switch: number; + + const KEY_Arabic_tah: number; + + const KEY_Arabic_tatweel: number; + + const KEY_Arabic_tcheh: number; + + const KEY_Arabic_teh: number; + + const KEY_Arabic_tehmarbuta: number; + + const KEY_Arabic_thal: number; + + const KEY_Arabic_theh: number; + + const KEY_Arabic_tteh: number; + + const KEY_Arabic_veh: number; + + const KEY_Arabic_waw: number; + + const KEY_Arabic_yeh: number; + + const KEY_Arabic_yeh_baree: number; + + const KEY_Arabic_zah: number; + + const KEY_Arabic_zain: number; + + const KEY_Aring: number; + + const KEY_Armenian_AT: number; + + const KEY_Armenian_AYB: number; + + const KEY_Armenian_BEN: number; + + const KEY_Armenian_CHA: number; + + const KEY_Armenian_DA: number; + + const KEY_Armenian_DZA: number; + + const KEY_Armenian_E: number; + + const KEY_Armenian_FE: number; + + const KEY_Armenian_GHAT: number; + + const KEY_Armenian_GIM: number; + + const KEY_Armenian_HI: number; + + const KEY_Armenian_HO: number; + + const KEY_Armenian_INI: number; + + const KEY_Armenian_JE: number; + + const KEY_Armenian_KE: number; + + const KEY_Armenian_KEN: number; + + const KEY_Armenian_KHE: number; + + const KEY_Armenian_LYUN: number; + + const KEY_Armenian_MEN: number; + + const KEY_Armenian_NU: number; + + const KEY_Armenian_O: number; + + const KEY_Armenian_PE: number; + + const KEY_Armenian_PYUR: number; + + const KEY_Armenian_RA: number; + + const KEY_Armenian_RE: number; + + const KEY_Armenian_SE: number; + + const KEY_Armenian_SHA: number; + + const KEY_Armenian_TCHE: number; + + const KEY_Armenian_TO: number; + + const KEY_Armenian_TSA: number; + + const KEY_Armenian_TSO: number; + + const KEY_Armenian_TYUN: number; + + const KEY_Armenian_VEV: number; + + const KEY_Armenian_VO: number; + + const KEY_Armenian_VYUN: number; + + const KEY_Armenian_YECH: number; + + const KEY_Armenian_ZA: number; + + const KEY_Armenian_ZHE: number; + + const KEY_Armenian_accent: number; + + const KEY_Armenian_amanak: number; + + const KEY_Armenian_apostrophe: number; + + const KEY_Armenian_at: number; + + const KEY_Armenian_ayb: number; + + const KEY_Armenian_ben: number; + + const KEY_Armenian_but: number; + + const KEY_Armenian_cha: number; + + const KEY_Armenian_da: number; + + const KEY_Armenian_dza: number; + + const KEY_Armenian_e: number; + + const KEY_Armenian_exclam: number; + + const KEY_Armenian_fe: number; + + const KEY_Armenian_full_stop: number; + + const KEY_Armenian_ghat: number; + + const KEY_Armenian_gim: number; + + const KEY_Armenian_hi: number; + + const KEY_Armenian_ho: number; + + const KEY_Armenian_hyphen: number; + + const KEY_Armenian_ini: number; + + const KEY_Armenian_je: number; + + const KEY_Armenian_ke: number; + + const KEY_Armenian_ken: number; + + const KEY_Armenian_khe: number; + + const KEY_Armenian_ligature_ew: number; + + const KEY_Armenian_lyun: number; + + const KEY_Armenian_men: number; + + const KEY_Armenian_nu: number; + + const KEY_Armenian_o: number; + + const KEY_Armenian_paruyk: number; + + const KEY_Armenian_pe: number; + + const KEY_Armenian_pyur: number; + + const KEY_Armenian_question: number; + + const KEY_Armenian_ra: number; + + const KEY_Armenian_re: number; + + const KEY_Armenian_se: number; + + const KEY_Armenian_separation_mark: number; + + const KEY_Armenian_sha: number; + + const KEY_Armenian_shesht: number; + + const KEY_Armenian_tche: number; + + const KEY_Armenian_to: number; + + const KEY_Armenian_tsa: number; + + const KEY_Armenian_tso: number; + + const KEY_Armenian_tyun: number; + + const KEY_Armenian_verjaket: number; + + const KEY_Armenian_vev: number; + + const KEY_Armenian_vo: number; + + const KEY_Armenian_vyun: number; + + const KEY_Armenian_yech: number; + + const KEY_Armenian_yentamna: number; + + const KEY_Armenian_za: number; + + const KEY_Armenian_zhe: number; + + const KEY_Atilde: number; + + const KEY_AudibleBell_Enable: number; + + const KEY_AudioCycleTrack: number; + + const KEY_AudioForward: number; + + const KEY_AudioLowerVolume: number; + + const KEY_AudioMedia: number; + + const KEY_AudioMicMute: number; + + const KEY_AudioMute: number; + + const KEY_AudioNext: number; + + const KEY_AudioPause: number; + + const KEY_AudioPlay: number; + + const KEY_AudioPrev: number; + + const KEY_AudioRaiseVolume: number; + + const KEY_AudioRandomPlay: number; + + const KEY_AudioRecord: number; + + const KEY_AudioRepeat: number; + + const KEY_AudioRewind: number; + + const KEY_AudioStop: number; + + const KEY_Away: number; + + const KEY_B: number; + + const KEY_Babovedot: number; + + const KEY_Back: number; + + const KEY_BackForward: number; + + const KEY_BackSpace: number; + + const KEY_Battery: number; + + const KEY_Begin: number; + + const KEY_Blue: number; + + const KEY_Bluetooth: number; + + const KEY_Book: number; + + const KEY_BounceKeys_Enable: number; + + const KEY_Break: number; + + const KEY_BrightnessAdjust: number; + + const KEY_Byelorussian_SHORTU: number; + + const KEY_Byelorussian_shortu: number; + + const KEY_C: number; + + const KEY_CD: number; + + const KEY_CH: number; + + const KEY_C_H: number; + + const KEY_C_h: number; + + const KEY_Cabovedot: number; + + const KEY_Cacute: number; + + const KEY_Calculator: number; + + const KEY_Calendar: number; + + const KEY_Cancel: number; + + const KEY_Caps_Lock: number; + + const KEY_Ccaron: number; + + const KEY_Ccedilla: number; + + const KEY_Ccircumflex: number; + + const KEY_Ch: number; + + const KEY_Clear: number; + + const KEY_ClearGrab: number; + + const KEY_Close: number; + + const KEY_Codeinput: number; + + const KEY_ColonSign: number; + + const KEY_Community: number; + + const KEY_ContrastAdjust: number; + + const KEY_Control_L: number; + + const KEY_Control_R: number; + + const KEY_Copy: number; + + const KEY_CruzeiroSign: number; + + const KEY_Cut: number; + + const KEY_CycleAngle: number; + + const KEY_Cyrillic_A: number; + + const KEY_Cyrillic_BE: number; + + const KEY_Cyrillic_CHE: number; + + const KEY_Cyrillic_CHE_descender: number; + + const KEY_Cyrillic_CHE_vertstroke: number; + + const KEY_Cyrillic_DE: number; + + const KEY_Cyrillic_DZHE: number; + + const KEY_Cyrillic_E: number; + + const KEY_Cyrillic_EF: number; + + const KEY_Cyrillic_EL: number; + + const KEY_Cyrillic_EM: number; + + const KEY_Cyrillic_EN: number; + + const KEY_Cyrillic_EN_descender: number; + + const KEY_Cyrillic_ER: number; + + const KEY_Cyrillic_ES: number; + + const KEY_Cyrillic_GHE: number; + + const KEY_Cyrillic_GHE_bar: number; + + const KEY_Cyrillic_HA: number; + + const KEY_Cyrillic_HARDSIGN: number; + + const KEY_Cyrillic_HA_descender: number; + + const KEY_Cyrillic_I: number; + + const KEY_Cyrillic_IE: number; + + const KEY_Cyrillic_IO: number; + + const KEY_Cyrillic_I_macron: number; + + const KEY_Cyrillic_JE: number; + + const KEY_Cyrillic_KA: number; + + const KEY_Cyrillic_KA_descender: number; + + const KEY_Cyrillic_KA_vertstroke: number; + + const KEY_Cyrillic_LJE: number; + + const KEY_Cyrillic_NJE: number; + + const KEY_Cyrillic_O: number; + + const KEY_Cyrillic_O_bar: number; + + const KEY_Cyrillic_PE: number; + + const KEY_Cyrillic_SCHWA: number; + + const KEY_Cyrillic_SHA: number; + + const KEY_Cyrillic_SHCHA: number; + + const KEY_Cyrillic_SHHA: number; + + const KEY_Cyrillic_SHORTI: number; + + const KEY_Cyrillic_SOFTSIGN: number; + + const KEY_Cyrillic_TE: number; + + const KEY_Cyrillic_TSE: number; + + const KEY_Cyrillic_U: number; + + const KEY_Cyrillic_U_macron: number; + + const KEY_Cyrillic_U_straight: number; + + const KEY_Cyrillic_U_straight_bar: number; + + const KEY_Cyrillic_VE: number; + + const KEY_Cyrillic_YA: number; + + const KEY_Cyrillic_YERU: number; + + const KEY_Cyrillic_YU: number; + + const KEY_Cyrillic_ZE: number; + + const KEY_Cyrillic_ZHE: number; + + const KEY_Cyrillic_ZHE_descender: number; + + const KEY_Cyrillic_a: number; + + const KEY_Cyrillic_be: number; + + const KEY_Cyrillic_che: number; + + const KEY_Cyrillic_che_descender: number; + + const KEY_Cyrillic_che_vertstroke: number; + + const KEY_Cyrillic_de: number; + + const KEY_Cyrillic_dzhe: number; + + const KEY_Cyrillic_e: number; + + const KEY_Cyrillic_ef: number; + + const KEY_Cyrillic_el: number; + + const KEY_Cyrillic_em: number; + + const KEY_Cyrillic_en: number; + + const KEY_Cyrillic_en_descender: number; + + const KEY_Cyrillic_er: number; + + const KEY_Cyrillic_es: number; + + const KEY_Cyrillic_ghe: number; + + const KEY_Cyrillic_ghe_bar: number; + + const KEY_Cyrillic_ha: number; + + const KEY_Cyrillic_ha_descender: number; + + const KEY_Cyrillic_hardsign: number; + + const KEY_Cyrillic_i: number; + + const KEY_Cyrillic_i_macron: number; + + const KEY_Cyrillic_ie: number; + + const KEY_Cyrillic_io: number; + + const KEY_Cyrillic_je: number; + + const KEY_Cyrillic_ka: number; + + const KEY_Cyrillic_ka_descender: number; + + const KEY_Cyrillic_ka_vertstroke: number; + + const KEY_Cyrillic_lje: number; + + const KEY_Cyrillic_nje: number; + + const KEY_Cyrillic_o: number; + + const KEY_Cyrillic_o_bar: number; + + const KEY_Cyrillic_pe: number; + + const KEY_Cyrillic_schwa: number; + + const KEY_Cyrillic_sha: number; + + const KEY_Cyrillic_shcha: number; + + const KEY_Cyrillic_shha: number; + + const KEY_Cyrillic_shorti: number; + + const KEY_Cyrillic_softsign: number; + + const KEY_Cyrillic_te: number; + + const KEY_Cyrillic_tse: number; + + const KEY_Cyrillic_u: number; + + const KEY_Cyrillic_u_macron: number; + + const KEY_Cyrillic_u_straight: number; + + const KEY_Cyrillic_u_straight_bar: number; + + const KEY_Cyrillic_ve: number; + + const KEY_Cyrillic_ya: number; + + const KEY_Cyrillic_yeru: number; + + const KEY_Cyrillic_yu: number; + + const KEY_Cyrillic_ze: number; + + const KEY_Cyrillic_zhe: number; + + const KEY_Cyrillic_zhe_descender: number; + + const KEY_D: number; + + const KEY_DOS: number; + + const KEY_Dabovedot: number; + + const KEY_Dcaron: number; + + const KEY_Delete: number; + + const KEY_Display: number; + + const KEY_Documents: number; + + const KEY_DongSign: number; + + const KEY_Down: number; + + const KEY_Dstroke: number; + + const KEY_E: number; + + const KEY_ENG: number; + + const KEY_ETH: number; + + const KEY_EZH: number; + + const KEY_Eabovedot: number; + + const KEY_Eacute: number; + + const KEY_Ebelowdot: number; + + const KEY_Ecaron: number; + + const KEY_Ecircumflex: number; + + const KEY_Ecircumflexacute: number; + + const KEY_Ecircumflexbelowdot: number; + + const KEY_Ecircumflexgrave: number; + + const KEY_Ecircumflexhook: number; + + const KEY_Ecircumflextilde: number; + + const KEY_EcuSign: number; + + const KEY_Ediaeresis: number; + + const KEY_Egrave: number; + + const KEY_Ehook: number; + + const KEY_Eisu_Shift: number; + + const KEY_Eisu_toggle: number; + + const KEY_Eject: number; + + const KEY_Emacron: number; + + const KEY_End: number; + + const KEY_Eogonek: number; + + const KEY_Escape: number; + + const KEY_Eth: number; + + const KEY_Etilde: number; + + const KEY_EuroSign: number; + + const KEY_Excel: number; + + const KEY_Execute: number; + + const KEY_Explorer: number; + + const KEY_F: number; + + const KEY_F1: number; + + const KEY_F10: number; + + const KEY_F11: number; + + const KEY_F12: number; + + const KEY_F13: number; + + const KEY_F14: number; + + const KEY_F15: number; + + const KEY_F16: number; + + const KEY_F17: number; + + const KEY_F18: number; + + const KEY_F19: number; + + const KEY_F2: number; + + const KEY_F20: number; + + const KEY_F21: number; + + const KEY_F22: number; + + const KEY_F23: number; + + const KEY_F24: number; + + const KEY_F25: number; + + const KEY_F26: number; + + const KEY_F27: number; + + const KEY_F28: number; + + const KEY_F29: number; + + const KEY_F3: number; + + const KEY_F30: number; + + const KEY_F31: number; + + const KEY_F32: number; + + const KEY_F33: number; + + const KEY_F34: number; + + const KEY_F35: number; + + const KEY_F4: number; + + const KEY_F5: number; + + const KEY_F6: number; + + const KEY_F7: number; + + const KEY_F8: number; + + const KEY_F9: number; + + const KEY_FFrancSign: number; + + const KEY_Fabovedot: number; + + const KEY_Farsi_0: number; + + const KEY_Farsi_1: number; + + const KEY_Farsi_2: number; + + const KEY_Farsi_3: number; + + const KEY_Farsi_4: number; + + const KEY_Farsi_5: number; + + const KEY_Farsi_6: number; + + const KEY_Farsi_7: number; + + const KEY_Farsi_8: number; + + const KEY_Farsi_9: number; + + const KEY_Farsi_yeh: number; + + const KEY_Favorites: number; + + const KEY_Finance: number; + + const KEY_Find: number; + + const KEY_First_Virtual_Screen: number; + + const KEY_Forward: number; + + const KEY_FrameBack: number; + + const KEY_FrameForward: number; + + const KEY_G: number; + + const KEY_Gabovedot: number; + + const KEY_Game: number; + + const KEY_Gbreve: number; + + const KEY_Gcaron: number; + + const KEY_Gcedilla: number; + + const KEY_Gcircumflex: number; + + const KEY_Georgian_an: number; + + const KEY_Georgian_ban: number; + + const KEY_Georgian_can: number; + + const KEY_Georgian_char: number; + + const KEY_Georgian_chin: number; + + const KEY_Georgian_cil: number; + + const KEY_Georgian_don: number; + + const KEY_Georgian_en: number; + + const KEY_Georgian_fi: number; + + const KEY_Georgian_gan: number; + + const KEY_Georgian_ghan: number; + + const KEY_Georgian_hae: number; + + const KEY_Georgian_har: number; + + const KEY_Georgian_he: number; + + const KEY_Georgian_hie: number; + + const KEY_Georgian_hoe: number; + + const KEY_Georgian_in: number; + + const KEY_Georgian_jhan: number; + + const KEY_Georgian_jil: number; + + const KEY_Georgian_kan: number; + + const KEY_Georgian_khar: number; + + const KEY_Georgian_las: number; + + const KEY_Georgian_man: number; + + const KEY_Georgian_nar: number; + + const KEY_Georgian_on: number; + + const KEY_Georgian_par: number; + + const KEY_Georgian_phar: number; + + const KEY_Georgian_qar: number; + + const KEY_Georgian_rae: number; + + const KEY_Georgian_san: number; + + const KEY_Georgian_shin: number; + + const KEY_Georgian_tan: number; + + const KEY_Georgian_tar: number; + + const KEY_Georgian_un: number; + + const KEY_Georgian_vin: number; + + const KEY_Georgian_we: number; + + const KEY_Georgian_xan: number; + + const KEY_Georgian_zen: number; + + const KEY_Georgian_zhar: number; + + const KEY_Go: number; + + const KEY_Greek_ALPHA: number; + + const KEY_Greek_ALPHAaccent: number; + + const KEY_Greek_BETA: number; + + const KEY_Greek_CHI: number; + + const KEY_Greek_DELTA: number; + + const KEY_Greek_EPSILON: number; + + const KEY_Greek_EPSILONaccent: number; + + const KEY_Greek_ETA: number; + + const KEY_Greek_ETAaccent: number; + + const KEY_Greek_GAMMA: number; + + const KEY_Greek_IOTA: number; + + const KEY_Greek_IOTAaccent: number; + + const KEY_Greek_IOTAdiaeresis: number; + + const KEY_Greek_IOTAdieresis: number; + + const KEY_Greek_KAPPA: number; + + const KEY_Greek_LAMBDA: number; + + const KEY_Greek_LAMDA: number; + + const KEY_Greek_MU: number; + + const KEY_Greek_NU: number; + + const KEY_Greek_OMEGA: number; + + const KEY_Greek_OMEGAaccent: number; + + const KEY_Greek_OMICRON: number; + + const KEY_Greek_OMICRONaccent: number; + + const KEY_Greek_PHI: number; + + const KEY_Greek_PI: number; + + const KEY_Greek_PSI: number; + + const KEY_Greek_RHO: number; + + const KEY_Greek_SIGMA: number; + + const KEY_Greek_TAU: number; + + const KEY_Greek_THETA: number; + + const KEY_Greek_UPSILON: number; + + const KEY_Greek_UPSILONaccent: number; + + const KEY_Greek_UPSILONdieresis: number; + + const KEY_Greek_XI: number; + + const KEY_Greek_ZETA: number; + + const KEY_Greek_accentdieresis: number; + + const KEY_Greek_alpha: number; + + const KEY_Greek_alphaaccent: number; + + const KEY_Greek_beta: number; + + const KEY_Greek_chi: number; + + const KEY_Greek_delta: number; + + const KEY_Greek_epsilon: number; + + const KEY_Greek_epsilonaccent: number; + + const KEY_Greek_eta: number; + + const KEY_Greek_etaaccent: number; + + const KEY_Greek_finalsmallsigma: number; + + const KEY_Greek_gamma: number; + + const KEY_Greek_horizbar: number; + + const KEY_Greek_iota: number; + + const KEY_Greek_iotaaccent: number; + + const KEY_Greek_iotaaccentdieresis: number; + + const KEY_Greek_iotadieresis: number; + + const KEY_Greek_kappa: number; + + const KEY_Greek_lambda: number; + + const KEY_Greek_lamda: number; + + const KEY_Greek_mu: number; + + const KEY_Greek_nu: number; + + const KEY_Greek_omega: number; + + const KEY_Greek_omegaaccent: number; + + const KEY_Greek_omicron: number; + + const KEY_Greek_omicronaccent: number; + + const KEY_Greek_phi: number; + + const KEY_Greek_pi: number; + + const KEY_Greek_psi: number; + + const KEY_Greek_rho: number; + + const KEY_Greek_sigma: number; + + const KEY_Greek_switch: number; + + const KEY_Greek_tau: number; + + const KEY_Greek_theta: number; + + const KEY_Greek_upsilon: number; + + const KEY_Greek_upsilonaccent: number; + + const KEY_Greek_upsilonaccentdieresis: number; + + const KEY_Greek_upsilondieresis: number; + + const KEY_Greek_xi: number; + + const KEY_Greek_zeta: number; + + const KEY_Green: number; + + const KEY_H: number; + + const KEY_Hangul: number; + + const KEY_Hangul_A: number; + + const KEY_Hangul_AE: number; + + const KEY_Hangul_AraeA: number; + + const KEY_Hangul_AraeAE: number; + + const KEY_Hangul_Banja: number; + + const KEY_Hangul_Cieuc: number; + + const KEY_Hangul_Codeinput: number; + + const KEY_Hangul_Dikeud: number; + + const KEY_Hangul_E: number; + + const KEY_Hangul_EO: number; + + const KEY_Hangul_EU: number; + + const KEY_Hangul_End: number; + + const KEY_Hangul_Hanja: number; + + const KEY_Hangul_Hieuh: number; + + const KEY_Hangul_I: number; + + const KEY_Hangul_Ieung: number; + + const KEY_Hangul_J_Cieuc: number; + + const KEY_Hangul_J_Dikeud: number; + + const KEY_Hangul_J_Hieuh: number; + + const KEY_Hangul_J_Ieung: number; + + const KEY_Hangul_J_Jieuj: number; + + const KEY_Hangul_J_Khieuq: number; + + const KEY_Hangul_J_Kiyeog: number; + + const KEY_Hangul_J_KiyeogSios: number; + + const KEY_Hangul_J_KkogjiDalrinIeung: number; + + const KEY_Hangul_J_Mieum: number; + + const KEY_Hangul_J_Nieun: number; + + const KEY_Hangul_J_NieunHieuh: number; + + const KEY_Hangul_J_NieunJieuj: number; + + const KEY_Hangul_J_PanSios: number; + + const KEY_Hangul_J_Phieuf: number; + + const KEY_Hangul_J_Pieub: number; + + const KEY_Hangul_J_PieubSios: number; + + const KEY_Hangul_J_Rieul: number; + + const KEY_Hangul_J_RieulHieuh: number; + + const KEY_Hangul_J_RieulKiyeog: number; + + const KEY_Hangul_J_RieulMieum: number; + + const KEY_Hangul_J_RieulPhieuf: number; + + const KEY_Hangul_J_RieulPieub: number; + + const KEY_Hangul_J_RieulSios: number; + + const KEY_Hangul_J_RieulTieut: number; + + const KEY_Hangul_J_Sios: number; + + const KEY_Hangul_J_SsangKiyeog: number; + + const KEY_Hangul_J_SsangSios: number; + + const KEY_Hangul_J_Tieut: number; + + const KEY_Hangul_J_YeorinHieuh: number; + + const KEY_Hangul_Jamo: number; + + const KEY_Hangul_Jeonja: number; + + const KEY_Hangul_Jieuj: number; + + const KEY_Hangul_Khieuq: number; + + const KEY_Hangul_Kiyeog: number; + + const KEY_Hangul_KiyeogSios: number; + + const KEY_Hangul_KkogjiDalrinIeung: number; + + const KEY_Hangul_Mieum: number; + + const KEY_Hangul_MultipleCandidate: number; + + const KEY_Hangul_Nieun: number; + + const KEY_Hangul_NieunHieuh: number; + + const KEY_Hangul_NieunJieuj: number; + + const KEY_Hangul_O: number; + + const KEY_Hangul_OE: number; + + const KEY_Hangul_PanSios: number; + + const KEY_Hangul_Phieuf: number; + + const KEY_Hangul_Pieub: number; + + const KEY_Hangul_PieubSios: number; + + const KEY_Hangul_PostHanja: number; + + const KEY_Hangul_PreHanja: number; + + const KEY_Hangul_PreviousCandidate: number; + + const KEY_Hangul_Rieul: number; + + const KEY_Hangul_RieulHieuh: number; + + const KEY_Hangul_RieulKiyeog: number; + + const KEY_Hangul_RieulMieum: number; + + const KEY_Hangul_RieulPhieuf: number; + + const KEY_Hangul_RieulPieub: number; + + const KEY_Hangul_RieulSios: number; + + const KEY_Hangul_RieulTieut: number; + + const KEY_Hangul_RieulYeorinHieuh: number; + + const KEY_Hangul_Romaja: number; + + const KEY_Hangul_SingleCandidate: number; + + const KEY_Hangul_Sios: number; + + const KEY_Hangul_Special: number; + + const KEY_Hangul_SsangDikeud: number; + + const KEY_Hangul_SsangJieuj: number; + + const KEY_Hangul_SsangKiyeog: number; + + const KEY_Hangul_SsangPieub: number; + + const KEY_Hangul_SsangSios: number; + + const KEY_Hangul_Start: number; + + const KEY_Hangul_SunkyeongeumMieum: number; + + const KEY_Hangul_SunkyeongeumPhieuf: number; + + const KEY_Hangul_SunkyeongeumPieub: number; + + const KEY_Hangul_Tieut: number; + + const KEY_Hangul_U: number; + + const KEY_Hangul_WA: number; + + const KEY_Hangul_WAE: number; + + const KEY_Hangul_WE: number; + + const KEY_Hangul_WEO: number; + + const KEY_Hangul_WI: number; + + const KEY_Hangul_YA: number; + + const KEY_Hangul_YAE: number; + + const KEY_Hangul_YE: number; + + const KEY_Hangul_YEO: number; + + const KEY_Hangul_YI: number; + + const KEY_Hangul_YO: number; + + const KEY_Hangul_YU: number; + + const KEY_Hangul_YeorinHieuh: number; + + const KEY_Hangul_switch: number; + + const KEY_Hankaku: number; + + const KEY_Hcircumflex: number; + + const KEY_Hebrew_switch: number; + + const KEY_Help: number; + + const KEY_Henkan: number; + + const KEY_Henkan_Mode: number; + + const KEY_Hibernate: number; + + const KEY_Hiragana: number; + + const KEY_Hiragana_Katakana: number; + + const KEY_History: number; + + const KEY_Home: number; + + const KEY_HomePage: number; + + const KEY_HotLinks: number; + + const KEY_Hstroke: number; + + const KEY_Hyper_L: number; + + const KEY_Hyper_R: number; + + const KEY_I: number; + + const KEY_ISO_Center_Object: number; + + const KEY_ISO_Continuous_Underline: number; + + const KEY_ISO_Discontinuous_Underline: number; + + const KEY_ISO_Emphasize: number; + + const KEY_ISO_Enter: number; + + const KEY_ISO_Fast_Cursor_Down: number; + + const KEY_ISO_Fast_Cursor_Left: number; + + const KEY_ISO_Fast_Cursor_Right: number; + + const KEY_ISO_Fast_Cursor_Up: number; + + const KEY_ISO_First_Group: number; + + const KEY_ISO_First_Group_Lock: number; + + const KEY_ISO_Group_Latch: number; + + const KEY_ISO_Group_Lock: number; + + const KEY_ISO_Group_Shift: number; + + const KEY_ISO_Last_Group: number; + + const KEY_ISO_Last_Group_Lock: number; + + const KEY_ISO_Left_Tab: number; + + const KEY_ISO_Level2_Latch: number; + + const KEY_ISO_Level3_Latch: number; + + const KEY_ISO_Level3_Lock: number; + + const KEY_ISO_Level3_Shift: number; + + const KEY_ISO_Level5_Latch: number; + + const KEY_ISO_Level5_Lock: number; + + const KEY_ISO_Level5_Shift: number; + + const KEY_ISO_Lock: number; + + const KEY_ISO_Move_Line_Down: number; + + const KEY_ISO_Move_Line_Up: number; + + const KEY_ISO_Next_Group: number; + + const KEY_ISO_Next_Group_Lock: number; + + const KEY_ISO_Partial_Line_Down: number; + + const KEY_ISO_Partial_Line_Up: number; + + const KEY_ISO_Partial_Space_Left: number; + + const KEY_ISO_Partial_Space_Right: number; + + const KEY_ISO_Prev_Group: number; + + const KEY_ISO_Prev_Group_Lock: number; + + const KEY_ISO_Release_Both_Margins: number; + + const KEY_ISO_Release_Margin_Left: number; + + const KEY_ISO_Release_Margin_Right: number; + + const KEY_ISO_Set_Margin_Left: number; + + const KEY_ISO_Set_Margin_Right: number; + + const KEY_Iabovedot: number; + + const KEY_Iacute: number; + + const KEY_Ibelowdot: number; + + const KEY_Ibreve: number; + + const KEY_Icircumflex: number; + + const KEY_Idiaeresis: number; + + const KEY_Igrave: number; + + const KEY_Ihook: number; + + const KEY_Imacron: number; + + const KEY_Insert: number; + + const KEY_Iogonek: number; + + const KEY_Itilde: number; + + const KEY_J: number; + + const KEY_Jcircumflex: number; + + const KEY_K: number; + + const KEY_KP_0: number; + + const KEY_KP_1: number; + + const KEY_KP_2: number; + + const KEY_KP_3: number; + + const KEY_KP_4: number; + + const KEY_KP_5: number; + + const KEY_KP_6: number; + + const KEY_KP_7: number; + + const KEY_KP_8: number; + + const KEY_KP_9: number; + + const KEY_KP_Add: number; + + const KEY_KP_Begin: number; + + const KEY_KP_Decimal: number; + + const KEY_KP_Delete: number; + + const KEY_KP_Divide: number; + + const KEY_KP_Down: number; + + const KEY_KP_End: number; + + const KEY_KP_Enter: number; + + const KEY_KP_Equal: number; + + const KEY_KP_F1: number; + + const KEY_KP_F2: number; + + const KEY_KP_F3: number; + + const KEY_KP_F4: number; + + const KEY_KP_Home: number; + + const KEY_KP_Insert: number; + + const KEY_KP_Left: number; + + const KEY_KP_Multiply: number; + + const KEY_KP_Next: number; + + const KEY_KP_Page_Down: number; + + const KEY_KP_Page_Up: number; + + const KEY_KP_Prior: number; + + const KEY_KP_Right: number; + + const KEY_KP_Separator: number; + + const KEY_KP_Space: number; + + const KEY_KP_Subtract: number; + + const KEY_KP_Tab: number; + + const KEY_KP_Up: number; + + const KEY_Kana_Lock: number; + + const KEY_Kana_Shift: number; + + const KEY_Kanji: number; + + const KEY_Kanji_Bangou: number; + + const KEY_Katakana: number; + + const KEY_KbdBrightnessDown: number; + + const KEY_KbdBrightnessUp: number; + + const KEY_KbdLightOnOff: number; + + const KEY_Kcedilla: number; + + const KEY_Korean_Won: number; + + const KEY_L: number; + + const KEY_L1: number; + + const KEY_L10: number; + + const KEY_L2: number; + + const KEY_L3: number; + + const KEY_L4: number; + + const KEY_L5: number; + + const KEY_L6: number; + + const KEY_L7: number; + + const KEY_L8: number; + + const KEY_L9: number; + + const KEY_Lacute: number; + + const KEY_Last_Virtual_Screen: number; + + const KEY_Launch0: number; + + const KEY_Launch1: number; + + const KEY_Launch2: number; + + const KEY_Launch3: number; + + const KEY_Launch4: number; + + const KEY_Launch5: number; + + const KEY_Launch6: number; + + const KEY_Launch7: number; + + const KEY_Launch8: number; + + const KEY_Launch9: number; + + const KEY_LaunchA: number; + + const KEY_LaunchB: number; + + const KEY_LaunchC: number; + + const KEY_LaunchD: number; + + const KEY_LaunchE: number; + + const KEY_LaunchF: number; + + const KEY_Lbelowdot: number; + + const KEY_Lcaron: number; + + const KEY_Lcedilla: number; + + const KEY_Left: number; + + const KEY_LightBulb: number; + + const KEY_Linefeed: number; + + const KEY_LiraSign: number; + + const KEY_LogGrabInfo: number; + + const KEY_LogOff: number; + + const KEY_LogWindowTree: number; + + const KEY_Lstroke: number; + + const KEY_M: number; + + const KEY_Mabovedot: number; + + const KEY_Macedonia_DSE: number; + + const KEY_Macedonia_GJE: number; + + const KEY_Macedonia_KJE: number; + + const KEY_Macedonia_dse: number; + + const KEY_Macedonia_gje: number; + + const KEY_Macedonia_kje: number; + + const KEY_Mae_Koho: number; + + const KEY_Mail: number; + + const KEY_MailForward: number; + + const KEY_Market: number; + + const KEY_Massyo: number; + + const KEY_Meeting: number; + + const KEY_Memo: number; + + const KEY_Menu: number; + + const KEY_MenuKB: number; + + const KEY_MenuPB: number; + + const KEY_Messenger: number; + + const KEY_Meta_L: number; + + const KEY_Meta_R: number; + + const KEY_MillSign: number; + + const KEY_ModeLock: number; + + const KEY_Mode_switch: number; + + const KEY_MonBrightnessDown: number; + + const KEY_MonBrightnessUp: number; + + const KEY_MouseKeys_Accel_Enable: number; + + const KEY_MouseKeys_Enable: number; + + const KEY_Muhenkan: number; + + const KEY_Multi_key: number; + + const KEY_MultipleCandidate: number; + + const KEY_Music: number; + + const KEY_MyComputer: number; + + const KEY_MySites: number; + + const KEY_N: number; + + const KEY_Nacute: number; + + const KEY_NairaSign: number; + + const KEY_Ncaron: number; + + const KEY_Ncedilla: number; + + const KEY_New: number; + + const KEY_NewSheqelSign: number; + + const KEY_News: number; + + const KEY_Next: number; + + const KEY_Next_VMode: number; + + const KEY_Next_Virtual_Screen: number; + + const KEY_Ntilde: number; + + const KEY_Num_Lock: number; + + const KEY_O: number; + + const KEY_OE: number; + + const KEY_Oacute: number; + + const KEY_Obarred: number; + + const KEY_Obelowdot: number; + + const KEY_Ocaron: number; + + const KEY_Ocircumflex: number; + + const KEY_Ocircumflexacute: number; + + const KEY_Ocircumflexbelowdot: number; + + const KEY_Ocircumflexgrave: number; + + const KEY_Ocircumflexhook: number; + + const KEY_Ocircumflextilde: number; + + const KEY_Odiaeresis: number; + + const KEY_Odoubleacute: number; + + const KEY_OfficeHome: number; + + const KEY_Ograve: number; + + const KEY_Ohook: number; + + const KEY_Ohorn: number; + + const KEY_Ohornacute: number; + + const KEY_Ohornbelowdot: number; + + const KEY_Ohorngrave: number; + + const KEY_Ohornhook: number; + + const KEY_Ohorntilde: number; + + const KEY_Omacron: number; + + const KEY_Ooblique: number; + + const KEY_Open: number; + + const KEY_OpenURL: number; + + const KEY_Option: number; + + const KEY_Oslash: number; + + const KEY_Otilde: number; + + const KEY_Overlay1_Enable: number; + + const KEY_Overlay2_Enable: number; + + const KEY_P: number; + + const KEY_Pabovedot: number; + + const KEY_Page_Down: number; + + const KEY_Page_Up: number; + + const KEY_Paste: number; + + const KEY_Pause: number; + + const KEY_PesetaSign: number; + + const KEY_Phone: number; + + const KEY_Pictures: number; + + const KEY_Pointer_Accelerate: number; + + const KEY_Pointer_Button1: number; + + const KEY_Pointer_Button2: number; + + const KEY_Pointer_Button3: number; + + const KEY_Pointer_Button4: number; + + const KEY_Pointer_Button5: number; + + const KEY_Pointer_Button_Dflt: number; + + const KEY_Pointer_DblClick1: number; + + const KEY_Pointer_DblClick2: number; + + const KEY_Pointer_DblClick3: number; + + const KEY_Pointer_DblClick4: number; + + const KEY_Pointer_DblClick5: number; + + const KEY_Pointer_DblClick_Dflt: number; + + const KEY_Pointer_DfltBtnNext: number; + + const KEY_Pointer_DfltBtnPrev: number; + + const KEY_Pointer_Down: number; + + const KEY_Pointer_DownLeft: number; + + const KEY_Pointer_DownRight: number; + + const KEY_Pointer_Drag1: number; + + const KEY_Pointer_Drag2: number; + + const KEY_Pointer_Drag3: number; + + const KEY_Pointer_Drag4: number; + + const KEY_Pointer_Drag5: number; + + const KEY_Pointer_Drag_Dflt: number; + + const KEY_Pointer_EnableKeys: number; + + const KEY_Pointer_Left: number; + + const KEY_Pointer_Right: number; + + const KEY_Pointer_Up: number; + + const KEY_Pointer_UpLeft: number; + + const KEY_Pointer_UpRight: number; + + const KEY_PowerDown: number; + + const KEY_PowerOff: number; + + const KEY_Prev_VMode: number; + + const KEY_Prev_Virtual_Screen: number; + + const KEY_PreviousCandidate: number; + + const KEY_Print: number; + + const KEY_Prior: number; + + const KEY_Q: number; + + const KEY_R: number; + + const KEY_R1: number; + + const KEY_R10: number; + + const KEY_R11: number; + + const KEY_R12: number; + + const KEY_R13: number; + + const KEY_R14: number; + + const KEY_R15: number; + + const KEY_R2: number; + + const KEY_R3: number; + + const KEY_R4: number; + + const KEY_R5: number; + + const KEY_R6: number; + + const KEY_R7: number; + + const KEY_R8: number; + + const KEY_R9: number; + + const KEY_Racute: number; + + const KEY_Rcaron: number; + + const KEY_Rcedilla: number; + + const KEY_Red: number; + + const KEY_Redo: number; + + const KEY_Refresh: number; + + const KEY_Reload: number; + + const KEY_RepeatKeys_Enable: number; + + const KEY_Reply: number; + + const KEY_Return: number; + + const KEY_Right: number; + + const KEY_RockerDown: number; + + const KEY_RockerEnter: number; + + const KEY_RockerUp: number; + + const KEY_Romaji: number; + + const KEY_RotateWindows: number; + + const KEY_RotationKB: number; + + const KEY_RotationPB: number; + + const KEY_RupeeSign: number; + + const KEY_S: number; + + const KEY_SCHWA: number; + + const KEY_Sabovedot: number; + + const KEY_Sacute: number; + + const KEY_Save: number; + + const KEY_Scaron: number; + + const KEY_Scedilla: number; + + const KEY_Scircumflex: number; + + const KEY_ScreenSaver: number; + + const KEY_ScrollClick: number; + + const KEY_ScrollDown: number; + + const KEY_ScrollUp: number; + + const KEY_Scroll_Lock: number; + + const KEY_Search: number; + + const KEY_Select: number; + + const KEY_SelectButton: number; + + const KEY_Send: number; + + const KEY_Serbian_DJE: number; + + const KEY_Serbian_DZE: number; + + const KEY_Serbian_JE: number; + + const KEY_Serbian_LJE: number; + + const KEY_Serbian_NJE: number; + + const KEY_Serbian_TSHE: number; + + const KEY_Serbian_dje: number; + + const KEY_Serbian_dze: number; + + const KEY_Serbian_je: number; + + const KEY_Serbian_lje: number; + + const KEY_Serbian_nje: number; + + const KEY_Serbian_tshe: number; + + const KEY_Shift_L: number; + + const KEY_Shift_Lock: number; + + const KEY_Shift_R: number; + + const KEY_Shop: number; + + const KEY_SingleCandidate: number; + + const KEY_Sinh_a: number; + + const KEY_Sinh_aa: number; + + const KEY_Sinh_aa2: number; + + const KEY_Sinh_ae: number; + + const KEY_Sinh_ae2: number; + + const KEY_Sinh_aee: number; + + const KEY_Sinh_aee2: number; + + const KEY_Sinh_ai: number; + + const KEY_Sinh_ai2: number; + + const KEY_Sinh_al: number; + + const KEY_Sinh_au: number; + + const KEY_Sinh_au2: number; + + const KEY_Sinh_ba: number; + + const KEY_Sinh_bha: number; + + const KEY_Sinh_ca: number; + + const KEY_Sinh_cha: number; + + const KEY_Sinh_dda: number; + + const KEY_Sinh_ddha: number; + + const KEY_Sinh_dha: number; + + const KEY_Sinh_dhha: number; + + const KEY_Sinh_e: number; + + const KEY_Sinh_e2: number; + + const KEY_Sinh_ee: number; + + const KEY_Sinh_ee2: number; + + const KEY_Sinh_fa: number; + + const KEY_Sinh_ga: number; + + const KEY_Sinh_gha: number; + + const KEY_Sinh_h2: number; + + const KEY_Sinh_ha: number; + + const KEY_Sinh_i: number; + + const KEY_Sinh_i2: number; + + const KEY_Sinh_ii: number; + + const KEY_Sinh_ii2: number; + + const KEY_Sinh_ja: number; + + const KEY_Sinh_jha: number; + + const KEY_Sinh_jnya: number; + + const KEY_Sinh_ka: number; + + const KEY_Sinh_kha: number; + + const KEY_Sinh_kunddaliya: number; + + const KEY_Sinh_la: number; + + const KEY_Sinh_lla: number; + + const KEY_Sinh_lu: number; + + const KEY_Sinh_lu2: number; + + const KEY_Sinh_luu: number; + + const KEY_Sinh_luu2: number; + + const KEY_Sinh_ma: number; + + const KEY_Sinh_mba: number; + + const KEY_Sinh_na: number; + + const KEY_Sinh_ndda: number; + + const KEY_Sinh_ndha: number; + + const KEY_Sinh_ng: number; + + const KEY_Sinh_ng2: number; + + const KEY_Sinh_nga: number; + + const KEY_Sinh_nja: number; + + const KEY_Sinh_nna: number; + + const KEY_Sinh_nya: number; + + const KEY_Sinh_o: number; + + const KEY_Sinh_o2: number; + + const KEY_Sinh_oo: number; + + const KEY_Sinh_oo2: number; + + const KEY_Sinh_pa: number; + + const KEY_Sinh_pha: number; + + const KEY_Sinh_ra: number; + + const KEY_Sinh_ri: number; + + const KEY_Sinh_rii: number; + + const KEY_Sinh_ru2: number; + + const KEY_Sinh_ruu2: number; + + const KEY_Sinh_sa: number; + + const KEY_Sinh_sha: number; + + const KEY_Sinh_ssha: number; + + const KEY_Sinh_tha: number; + + const KEY_Sinh_thha: number; + + const KEY_Sinh_tta: number; + + const KEY_Sinh_ttha: number; + + const KEY_Sinh_u: number; + + const KEY_Sinh_u2: number; + + const KEY_Sinh_uu: number; + + const KEY_Sinh_uu2: number; + + const KEY_Sinh_va: number; + + const KEY_Sinh_ya: number; + + const KEY_Sleep: number; + + const KEY_SlowKeys_Enable: number; + + const KEY_Spell: number; + + const KEY_SplitScreen: number; + + const KEY_Standby: number; + + const KEY_Start: number; + + const KEY_StickyKeys_Enable: number; + + const KEY_Stop: number; + + const KEY_Subtitle: number; + + const KEY_Super_L: number; + + const KEY_Super_R: number; + + const KEY_Support: number; + + const KEY_Suspend: number; + + const KEY_Switch_VT_1: number; + + const KEY_Switch_VT_10: number; + + const KEY_Switch_VT_11: number; + + const KEY_Switch_VT_12: number; + + const KEY_Switch_VT_2: number; + + const KEY_Switch_VT_3: number; + + const KEY_Switch_VT_4: number; + + const KEY_Switch_VT_5: number; + + const KEY_Switch_VT_6: number; + + const KEY_Switch_VT_7: number; + + const KEY_Switch_VT_8: number; + + const KEY_Switch_VT_9: number; + + const KEY_Sys_Req: number; + + const KEY_T: number; + + const KEY_THORN: number; + + const KEY_Tab: number; + + const KEY_Tabovedot: number; + + const KEY_TaskPane: number; + + const KEY_Tcaron: number; + + const KEY_Tcedilla: number; + + const KEY_Terminal: number; + + const KEY_Terminate_Server: number; + + const KEY_Thai_baht: number; + + const KEY_Thai_bobaimai: number; + + const KEY_Thai_chochan: number; + + const KEY_Thai_chochang: number; + + const KEY_Thai_choching: number; + + const KEY_Thai_chochoe: number; + + const KEY_Thai_dochada: number; + + const KEY_Thai_dodek: number; + + const KEY_Thai_fofa: number; + + const KEY_Thai_fofan: number; + + const KEY_Thai_hohip: number; + + const KEY_Thai_honokhuk: number; + + const KEY_Thai_khokhai: number; + + const KEY_Thai_khokhon: number; + + const KEY_Thai_khokhuat: number; + + const KEY_Thai_khokhwai: number; + + const KEY_Thai_khorakhang: number; + + const KEY_Thai_kokai: number; + + const KEY_Thai_lakkhangyao: number; + + const KEY_Thai_lekchet: number; + + const KEY_Thai_lekha: number; + + const KEY_Thai_lekhok: number; + + const KEY_Thai_lekkao: number; + + const KEY_Thai_leknung: number; + + const KEY_Thai_lekpaet: number; + + const KEY_Thai_leksam: number; + + const KEY_Thai_leksi: number; + + const KEY_Thai_leksong: number; + + const KEY_Thai_leksun: number; + + const KEY_Thai_lochula: number; + + const KEY_Thai_loling: number; + + const KEY_Thai_lu: number; + + const KEY_Thai_maichattawa: number; + + const KEY_Thai_maiek: number; + + const KEY_Thai_maihanakat: number; + + const KEY_Thai_maihanakat_maitho: number; + + const KEY_Thai_maitaikhu: number; + + const KEY_Thai_maitho: number; + + const KEY_Thai_maitri: number; + + const KEY_Thai_maiyamok: number; + + const KEY_Thai_moma: number; + + const KEY_Thai_ngongu: number; + + const KEY_Thai_nikhahit: number; + + const KEY_Thai_nonen: number; + + const KEY_Thai_nonu: number; + + const KEY_Thai_oang: number; + + const KEY_Thai_paiyannoi: number; + + const KEY_Thai_phinthu: number; + + const KEY_Thai_phophan: number; + + const KEY_Thai_phophung: number; + + const KEY_Thai_phosamphao: number; + + const KEY_Thai_popla: number; + + const KEY_Thai_rorua: number; + + const KEY_Thai_ru: number; + + const KEY_Thai_saraa: number; + + const KEY_Thai_saraaa: number; + + const KEY_Thai_saraae: number; + + const KEY_Thai_saraaimaimalai: number; + + const KEY_Thai_saraaimaimuan: number; + + const KEY_Thai_saraam: number; + + const KEY_Thai_sarae: number; + + const KEY_Thai_sarai: number; + + const KEY_Thai_saraii: number; + + const KEY_Thai_sarao: number; + + const KEY_Thai_sarau: number; + + const KEY_Thai_saraue: number; + + const KEY_Thai_sarauee: number; + + const KEY_Thai_sarauu: number; + + const KEY_Thai_sorusi: number; + + const KEY_Thai_sosala: number; + + const KEY_Thai_soso: number; + + const KEY_Thai_sosua: number; + + const KEY_Thai_thanthakhat: number; + + const KEY_Thai_thonangmontho: number; + + const KEY_Thai_thophuthao: number; + + const KEY_Thai_thothahan: number; + + const KEY_Thai_thothan: number; + + const KEY_Thai_thothong: number; + + const KEY_Thai_thothung: number; + + const KEY_Thai_topatak: number; + + const KEY_Thai_totao: number; + + const KEY_Thai_wowaen: number; + + const KEY_Thai_yoyak: number; + + const KEY_Thai_yoying: number; + + const KEY_Thorn: number; + + const KEY_Time: number; + + const KEY_ToDoList: number; + + const KEY_Tools: number; + + const KEY_TopMenu: number; + + const KEY_TouchpadOff: number; + + const KEY_TouchpadOn: number; + + const KEY_TouchpadToggle: number; + + const KEY_Touroku: number; + + const KEY_Travel: number; + + const KEY_Tslash: number; + + const KEY_U: number; + + const KEY_UWB: number; + + const KEY_Uacute: number; + + const KEY_Ubelowdot: number; + + const KEY_Ubreve: number; + + const KEY_Ucircumflex: number; + + const KEY_Udiaeresis: number; + + const KEY_Udoubleacute: number; + + const KEY_Ugrave: number; + + const KEY_Uhook: number; + + const KEY_Uhorn: number; + + const KEY_Uhornacute: number; + + const KEY_Uhornbelowdot: number; + + const KEY_Uhorngrave: number; + + const KEY_Uhornhook: number; + + const KEY_Uhorntilde: number; + + const KEY_Ukrainian_GHE_WITH_UPTURN: number; + + const KEY_Ukrainian_I: number; + + const KEY_Ukrainian_IE: number; + + const KEY_Ukrainian_YI: number; + + const KEY_Ukrainian_ghe_with_upturn: number; + + const KEY_Ukrainian_i: number; + + const KEY_Ukrainian_ie: number; + + const KEY_Ukrainian_yi: number; + + const KEY_Ukranian_I: number; + + const KEY_Ukranian_JE: number; + + const KEY_Ukranian_YI: number; + + const KEY_Ukranian_i: number; + + const KEY_Ukranian_je: number; + + const KEY_Ukranian_yi: number; + + const KEY_Umacron: number; + + const KEY_Undo: number; + + const KEY_Ungrab: number; + + const KEY_Uogonek: number; + + const KEY_Up: number; + + const KEY_Uring: number; + + const KEY_User1KB: number; + + const KEY_User2KB: number; + + const KEY_UserPB: number; + + const KEY_Utilde: number; + + const KEY_V: number; + + const KEY_VendorHome: number; + + const KEY_Video: number; + + const KEY_View: number; + + const KEY_VoidSymbol: number; + + const KEY_W: number; + + const KEY_WLAN: number; + + const KEY_WWW: number; + + const KEY_Wacute: number; + + const KEY_WakeUp: number; + + const KEY_Wcircumflex: number; + + const KEY_Wdiaeresis: number; + + const KEY_WebCam: number; + + const KEY_Wgrave: number; + + const KEY_WheelButton: number; + + const KEY_WindowClear: number; + + const KEY_WonSign: number; + + const KEY_Word: number; + + const KEY_X: number; + + const KEY_Xabovedot: number; + + const KEY_Xfer: number; + + const KEY_Y: number; + + const KEY_Yacute: number; + + const KEY_Ybelowdot: number; + + const KEY_Ycircumflex: number; + + const KEY_Ydiaeresis: number; + + const KEY_Yellow: number; + + const KEY_Ygrave: number; + + const KEY_Yhook: number; + + const KEY_Ytilde: number; + + const KEY_Z: number; + + const KEY_Zabovedot: number; + + const KEY_Zacute: number; + + const KEY_Zcaron: number; + + const KEY_Zen_Koho: number; + + const KEY_Zenkaku: number; + + const KEY_Zenkaku_Hankaku: number; + + const KEY_ZoomIn: number; + + const KEY_ZoomOut: number; + + const KEY_Zstroke: number; + + const KEY_a: number; + + const KEY_aacute: number; + + const KEY_abelowdot: number; + + const KEY_abovedot: number; + + const KEY_abreve: number; + + const KEY_abreveacute: number; + + const KEY_abrevebelowdot: number; + + const KEY_abrevegrave: number; + + const KEY_abrevehook: number; + + const KEY_abrevetilde: number; + + const KEY_acircumflex: number; + + const KEY_acircumflexacute: number; + + const KEY_acircumflexbelowdot: number; + + const KEY_acircumflexgrave: number; + + const KEY_acircumflexhook: number; + + const KEY_acircumflextilde: number; + + const KEY_acute: number; + + const KEY_adiaeresis: number; + + const KEY_ae: number; + + const KEY_agrave: number; + + const KEY_ahook: number; + + const KEY_amacron: number; + + const KEY_ampersand: number; + + const KEY_aogonek: number; + + const KEY_apostrophe: number; + + const KEY_approxeq: number; + + const KEY_approximate: number; + + const KEY_aring: number; + + const KEY_asciicircum: number; + + const KEY_asciitilde: number; + + const KEY_asterisk: number; + + const KEY_at: number; + + const KEY_atilde: number; + + const KEY_b: number; + + const KEY_babovedot: number; + + const KEY_backslash: number; + + const KEY_ballotcross: number; + + const KEY_bar: number; + + const KEY_because: number; + + const KEY_blank: number; + + const KEY_botintegral: number; + + const KEY_botleftparens: number; + + const KEY_botleftsqbracket: number; + + const KEY_botleftsummation: number; + + const KEY_botrightparens: number; + + const KEY_botrightsqbracket: number; + + const KEY_botrightsummation: number; + + const KEY_bott: number; + + const KEY_botvertsummationconnector: number; + + const KEY_braceleft: number; + + const KEY_braceright: number; + + const KEY_bracketleft: number; + + const KEY_bracketright: number; + + const KEY_braille_blank: number; + + const KEY_braille_dot_1: number; + + const KEY_braille_dot_10: number; + + const KEY_braille_dot_2: number; + + const KEY_braille_dot_3: number; + + const KEY_braille_dot_4: number; + + const KEY_braille_dot_5: number; + + const KEY_braille_dot_6: number; + + const KEY_braille_dot_7: number; + + const KEY_braille_dot_8: number; + + const KEY_braille_dot_9: number; + + const KEY_braille_dots_1: number; + + const KEY_braille_dots_12: number; + + const KEY_braille_dots_123: number; + + const KEY_braille_dots_1234: number; + + const KEY_braille_dots_12345: number; + + const KEY_braille_dots_123456: number; + + const KEY_braille_dots_1234567: number; + + const KEY_braille_dots_12345678: number; + + const KEY_braille_dots_1234568: number; + + const KEY_braille_dots_123457: number; + + const KEY_braille_dots_1234578: number; + + const KEY_braille_dots_123458: number; + + const KEY_braille_dots_12346: number; + + const KEY_braille_dots_123467: number; + + const KEY_braille_dots_1234678: number; + + const KEY_braille_dots_123468: number; + + const KEY_braille_dots_12347: number; + + const KEY_braille_dots_123478: number; + + const KEY_braille_dots_12348: number; + + const KEY_braille_dots_1235: number; + + const KEY_braille_dots_12356: number; + + const KEY_braille_dots_123567: number; + + const KEY_braille_dots_1235678: number; + + const KEY_braille_dots_123568: number; + + const KEY_braille_dots_12357: number; + + const KEY_braille_dots_123578: number; + + const KEY_braille_dots_12358: number; + + const KEY_braille_dots_1236: number; + + const KEY_braille_dots_12367: number; + + const KEY_braille_dots_123678: number; + + const KEY_braille_dots_12368: number; + + const KEY_braille_dots_1237: number; + + const KEY_braille_dots_12378: number; + + const KEY_braille_dots_1238: number; + + const KEY_braille_dots_124: number; + + const KEY_braille_dots_1245: number; + + const KEY_braille_dots_12456: number; + + const KEY_braille_dots_124567: number; + + const KEY_braille_dots_1245678: number; + + const KEY_braille_dots_124568: number; + + const KEY_braille_dots_12457: number; + + const KEY_braille_dots_124578: number; + + const KEY_braille_dots_12458: number; + + const KEY_braille_dots_1246: number; + + const KEY_braille_dots_12467: number; + + const KEY_braille_dots_124678: number; + + const KEY_braille_dots_12468: number; + + const KEY_braille_dots_1247: number; + + const KEY_braille_dots_12478: number; + + const KEY_braille_dots_1248: number; + + const KEY_braille_dots_125: number; + + const KEY_braille_dots_1256: number; + + const KEY_braille_dots_12567: number; + + const KEY_braille_dots_125678: number; + + const KEY_braille_dots_12568: number; + + const KEY_braille_dots_1257: number; + + const KEY_braille_dots_12578: number; + + const KEY_braille_dots_1258: number; + + const KEY_braille_dots_126: number; + + const KEY_braille_dots_1267: number; + + const KEY_braille_dots_12678: number; + + const KEY_braille_dots_1268: number; + + const KEY_braille_dots_127: number; + + const KEY_braille_dots_1278: number; + + const KEY_braille_dots_128: number; + + const KEY_braille_dots_13: number; + + const KEY_braille_dots_134: number; + + const KEY_braille_dots_1345: number; + + const KEY_braille_dots_13456: number; + + const KEY_braille_dots_134567: number; + + const KEY_braille_dots_1345678: number; + + const KEY_braille_dots_134568: number; + + const KEY_braille_dots_13457: number; + + const KEY_braille_dots_134578: number; + + const KEY_braille_dots_13458: number; + + const KEY_braille_dots_1346: number; + + const KEY_braille_dots_13467: number; + + const KEY_braille_dots_134678: number; + + const KEY_braille_dots_13468: number; + + const KEY_braille_dots_1347: number; + + const KEY_braille_dots_13478: number; + + const KEY_braille_dots_1348: number; + + const KEY_braille_dots_135: number; + + const KEY_braille_dots_1356: number; + + const KEY_braille_dots_13567: number; + + const KEY_braille_dots_135678: number; + + const KEY_braille_dots_13568: number; + + const KEY_braille_dots_1357: number; + + const KEY_braille_dots_13578: number; + + const KEY_braille_dots_1358: number; + + const KEY_braille_dots_136: number; + + const KEY_braille_dots_1367: number; + + const KEY_braille_dots_13678: number; + + const KEY_braille_dots_1368: number; + + const KEY_braille_dots_137: number; + + const KEY_braille_dots_1378: number; + + const KEY_braille_dots_138: number; + + const KEY_braille_dots_14: number; + + const KEY_braille_dots_145: number; + + const KEY_braille_dots_1456: number; + + const KEY_braille_dots_14567: number; + + const KEY_braille_dots_145678: number; + + const KEY_braille_dots_14568: number; + + const KEY_braille_dots_1457: number; + + const KEY_braille_dots_14578: number; + + const KEY_braille_dots_1458: number; + + const KEY_braille_dots_146: number; + + const KEY_braille_dots_1467: number; + + const KEY_braille_dots_14678: number; + + const KEY_braille_dots_1468: number; + + const KEY_braille_dots_147: number; + + const KEY_braille_dots_1478: number; + + const KEY_braille_dots_148: number; + + const KEY_braille_dots_15: number; + + const KEY_braille_dots_156: number; + + const KEY_braille_dots_1567: number; + + const KEY_braille_dots_15678: number; + + const KEY_braille_dots_1568: number; + + const KEY_braille_dots_157: number; + + const KEY_braille_dots_1578: number; + + const KEY_braille_dots_158: number; + + const KEY_braille_dots_16: number; + + const KEY_braille_dots_167: number; + + const KEY_braille_dots_1678: number; + + const KEY_braille_dots_168: number; + + const KEY_braille_dots_17: number; + + const KEY_braille_dots_178: number; + + const KEY_braille_dots_18: number; + + const KEY_braille_dots_2: number; + + const KEY_braille_dots_23: number; + + const KEY_braille_dots_234: number; + + const KEY_braille_dots_2345: number; + + const KEY_braille_dots_23456: number; + + const KEY_braille_dots_234567: number; + + const KEY_braille_dots_2345678: number; + + const KEY_braille_dots_234568: number; + + const KEY_braille_dots_23457: number; + + const KEY_braille_dots_234578: number; + + const KEY_braille_dots_23458: number; + + const KEY_braille_dots_2346: number; + + const KEY_braille_dots_23467: number; + + const KEY_braille_dots_234678: number; + + const KEY_braille_dots_23468: number; + + const KEY_braille_dots_2347: number; + + const KEY_braille_dots_23478: number; + + const KEY_braille_dots_2348: number; + + const KEY_braille_dots_235: number; + + const KEY_braille_dots_2356: number; + + const KEY_braille_dots_23567: number; + + const KEY_braille_dots_235678: number; + + const KEY_braille_dots_23568: number; + + const KEY_braille_dots_2357: number; + + const KEY_braille_dots_23578: number; + + const KEY_braille_dots_2358: number; + + const KEY_braille_dots_236: number; + + const KEY_braille_dots_2367: number; + + const KEY_braille_dots_23678: number; + + const KEY_braille_dots_2368: number; + + const KEY_braille_dots_237: number; + + const KEY_braille_dots_2378: number; + + const KEY_braille_dots_238: number; + + const KEY_braille_dots_24: number; + + const KEY_braille_dots_245: number; + + const KEY_braille_dots_2456: number; + + const KEY_braille_dots_24567: number; + + const KEY_braille_dots_245678: number; + + const KEY_braille_dots_24568: number; + + const KEY_braille_dots_2457: number; + + const KEY_braille_dots_24578: number; + + const KEY_braille_dots_2458: number; + + const KEY_braille_dots_246: number; + + const KEY_braille_dots_2467: number; + + const KEY_braille_dots_24678: number; + + const KEY_braille_dots_2468: number; + + const KEY_braille_dots_247: number; + + const KEY_braille_dots_2478: number; + + const KEY_braille_dots_248: number; + + const KEY_braille_dots_25: number; + + const KEY_braille_dots_256: number; + + const KEY_braille_dots_2567: number; + + const KEY_braille_dots_25678: number; + + const KEY_braille_dots_2568: number; + + const KEY_braille_dots_257: number; + + const KEY_braille_dots_2578: number; + + const KEY_braille_dots_258: number; + + const KEY_braille_dots_26: number; + + const KEY_braille_dots_267: number; + + const KEY_braille_dots_2678: number; + + const KEY_braille_dots_268: number; + + const KEY_braille_dots_27: number; + + const KEY_braille_dots_278: number; + + const KEY_braille_dots_28: number; + + const KEY_braille_dots_3: number; + + const KEY_braille_dots_34: number; + + const KEY_braille_dots_345: number; + + const KEY_braille_dots_3456: number; + + const KEY_braille_dots_34567: number; + + const KEY_braille_dots_345678: number; + + const KEY_braille_dots_34568: number; + + const KEY_braille_dots_3457: number; + + const KEY_braille_dots_34578: number; + + const KEY_braille_dots_3458: number; + + const KEY_braille_dots_346: number; + + const KEY_braille_dots_3467: number; + + const KEY_braille_dots_34678: number; + + const KEY_braille_dots_3468: number; + + const KEY_braille_dots_347: number; + + const KEY_braille_dots_3478: number; + + const KEY_braille_dots_348: number; + + const KEY_braille_dots_35: number; + + const KEY_braille_dots_356: number; + + const KEY_braille_dots_3567: number; + + const KEY_braille_dots_35678: number; + + const KEY_braille_dots_3568: number; + + const KEY_braille_dots_357: number; + + const KEY_braille_dots_3578: number; + + const KEY_braille_dots_358: number; + + const KEY_braille_dots_36: number; + + const KEY_braille_dots_367: number; + + const KEY_braille_dots_3678: number; + + const KEY_braille_dots_368: number; + + const KEY_braille_dots_37: number; + + const KEY_braille_dots_378: number; + + const KEY_braille_dots_38: number; + + const KEY_braille_dots_4: number; + + const KEY_braille_dots_45: number; + + const KEY_braille_dots_456: number; + + const KEY_braille_dots_4567: number; + + const KEY_braille_dots_45678: number; + + const KEY_braille_dots_4568: number; + + const KEY_braille_dots_457: number; + + const KEY_braille_dots_4578: number; + + const KEY_braille_dots_458: number; + + const KEY_braille_dots_46: number; + + const KEY_braille_dots_467: number; + + const KEY_braille_dots_4678: number; + + const KEY_braille_dots_468: number; + + const KEY_braille_dots_47: number; + + const KEY_braille_dots_478: number; + + const KEY_braille_dots_48: number; + + const KEY_braille_dots_5: number; + + const KEY_braille_dots_56: number; + + const KEY_braille_dots_567: number; + + const KEY_braille_dots_5678: number; + + const KEY_braille_dots_568: number; + + const KEY_braille_dots_57: number; + + const KEY_braille_dots_578: number; + + const KEY_braille_dots_58: number; + + const KEY_braille_dots_6: number; + + const KEY_braille_dots_67: number; + + const KEY_braille_dots_678: number; + + const KEY_braille_dots_68: number; + + const KEY_braille_dots_7: number; + + const KEY_braille_dots_78: number; + + const KEY_braille_dots_8: number; + + const KEY_breve: number; + + const KEY_brokenbar: number; + + const KEY_c: number; + + const KEY_c_h: number; + + const KEY_cabovedot: number; + + const KEY_cacute: number; + + const KEY_careof: number; + + const KEY_caret: number; + + const KEY_caron: number; + + const KEY_ccaron: number; + + const KEY_ccedilla: number; + + const KEY_ccircumflex: number; + + const KEY_cedilla: number; + + const KEY_cent: number; + + const KEY_ch: number; + + const KEY_checkerboard: number; + + const KEY_checkmark: number; + + const KEY_circle: number; + + const KEY_club: number; + + const KEY_colon: number; + + const KEY_comma: number; + + const KEY_containsas: number; + + const KEY_copyright: number; + + const KEY_cr: number; + + const KEY_crossinglines: number; + + const KEY_cuberoot: number; + + const KEY_currency: number; + + const KEY_cursor: number; + + const KEY_d: number; + + const KEY_dabovedot: number; + + const KEY_dagger: number; + + const KEY_dcaron: number; + + const KEY_dead_A: number; + + const KEY_dead_E: number; + + const KEY_dead_I: number; + + const KEY_dead_O: number; + + const KEY_dead_U: number; + + const KEY_dead_a: number; + + const KEY_dead_abovecomma: number; + + const KEY_dead_abovedot: number; + + const KEY_dead_abovereversedcomma: number; + + const KEY_dead_abovering: number; + + const KEY_dead_aboveverticalline: number; + + const KEY_dead_acute: number; + + const KEY_dead_belowbreve: number; + + const KEY_dead_belowcircumflex: number; + + const KEY_dead_belowcomma: number; + + const KEY_dead_belowdiaeresis: number; + + const KEY_dead_belowdot: number; + + const KEY_dead_belowmacron: number; + + const KEY_dead_belowring: number; + + const KEY_dead_belowtilde: number; + + const KEY_dead_belowverticalline: number; + + const KEY_dead_breve: number; + + const KEY_dead_capital_schwa: number; + + const KEY_dead_caron: number; + + const KEY_dead_cedilla: number; + + const KEY_dead_circumflex: number; + + const KEY_dead_currency: number; + + const KEY_dead_dasia: number; + + const KEY_dead_diaeresis: number; + + const KEY_dead_doubleacute: number; + + const KEY_dead_doublegrave: number; + + const KEY_dead_e: number; + + const KEY_dead_grave: number; + + const KEY_dead_greek: number; + + const KEY_dead_hook: number; + + const KEY_dead_horn: number; + + const KEY_dead_i: number; + + const KEY_dead_invertedbreve: number; + + const KEY_dead_iota: number; + + const KEY_dead_longsolidusoverlay: number; + + const KEY_dead_lowline: number; + + const KEY_dead_macron: number; + + const KEY_dead_o: number; + + const KEY_dead_ogonek: number; + + const KEY_dead_perispomeni: number; + + const KEY_dead_psili: number; + + const KEY_dead_semivoiced_sound: number; + + const KEY_dead_small_schwa: number; + + const KEY_dead_stroke: number; + + const KEY_dead_tilde: number; + + const KEY_dead_u: number; + + const KEY_dead_voiced_sound: number; + + const KEY_decimalpoint: number; + + const KEY_degree: number; + + const KEY_diaeresis: number; + + const KEY_diamond: number; + + const KEY_digitspace: number; + + const KEY_dintegral: number; + + const KEY_division: number; + + const KEY_dollar: number; + + const KEY_doubbaselinedot: number; + + const KEY_doubleacute: number; + + const KEY_doubledagger: number; + + const KEY_doublelowquotemark: number; + + const KEY_downarrow: number; + + const KEY_downcaret: number; + + const KEY_downshoe: number; + + const KEY_downstile: number; + + const KEY_downtack: number; + + const KEY_dstroke: number; + + const KEY_e: number; + + const KEY_eabovedot: number; + + const KEY_eacute: number; + + const KEY_ebelowdot: number; + + const KEY_ecaron: number; + + const KEY_ecircumflex: number; + + const KEY_ecircumflexacute: number; + + const KEY_ecircumflexbelowdot: number; + + const KEY_ecircumflexgrave: number; + + const KEY_ecircumflexhook: number; + + const KEY_ecircumflextilde: number; + + const KEY_ediaeresis: number; + + const KEY_egrave: number; + + const KEY_ehook: number; + + const KEY_eightsubscript: number; + + const KEY_eightsuperior: number; + + const KEY_elementof: number; + + const KEY_ellipsis: number; + + const KEY_em3space: number; + + const KEY_em4space: number; + + const KEY_emacron: number; + + const KEY_emdash: number; + + const KEY_emfilledcircle: number; + + const KEY_emfilledrect: number; + + const KEY_emopencircle: number; + + const KEY_emopenrectangle: number; + + const KEY_emptyset: number; + + const KEY_emspace: number; + + const KEY_endash: number; + + const KEY_enfilledcircbullet: number; + + const KEY_enfilledsqbullet: number; + + const KEY_eng: number; + + const KEY_enopencircbullet: number; + + const KEY_enopensquarebullet: number; + + const KEY_enspace: number; + + const KEY_eogonek: number; + + const KEY_equal: number; + + const KEY_eth: number; + + const KEY_etilde: number; + + const KEY_exclam: number; + + const KEY_exclamdown: number; + + const KEY_ezh: number; + + const KEY_f: number; + + const KEY_fabovedot: number; + + const KEY_femalesymbol: number; + + const KEY_ff: number; + + const KEY_figdash: number; + + const KEY_filledlefttribullet: number; + + const KEY_filledrectbullet: number; + + const KEY_filledrighttribullet: number; + + const KEY_filledtribulletdown: number; + + const KEY_filledtribulletup: number; + + const KEY_fiveeighths: number; + + const KEY_fivesixths: number; + + const KEY_fivesubscript: number; + + const KEY_fivesuperior: number; + + const KEY_fourfifths: number; + + const KEY_foursubscript: number; + + const KEY_foursuperior: number; + + const KEY_fourthroot: number; + + const KEY_function: number; + + const KEY_g: number; + + const KEY_gabovedot: number; + + const KEY_gbreve: number; + + const KEY_gcaron: number; + + const KEY_gcedilla: number; + + const KEY_gcircumflex: number; + + const KEY_grave: number; + + const KEY_greater: number; + + const KEY_greaterthanequal: number; + + const KEY_guillemotleft: number; + + const KEY_guillemotright: number; + + const KEY_h: number; + + const KEY_hairspace: number; + + const KEY_hcircumflex: number; + + const KEY_heart: number; + + const KEY_hebrew_aleph: number; + + const KEY_hebrew_ayin: number; + + const KEY_hebrew_bet: number; + + const KEY_hebrew_beth: number; + + const KEY_hebrew_chet: number; + + const KEY_hebrew_dalet: number; + + const KEY_hebrew_daleth: number; + + const KEY_hebrew_doublelowline: number; + + const KEY_hebrew_finalkaph: number; + + const KEY_hebrew_finalmem: number; + + const KEY_hebrew_finalnun: number; + + const KEY_hebrew_finalpe: number; + + const KEY_hebrew_finalzade: number; + + const KEY_hebrew_finalzadi: number; + + const KEY_hebrew_gimel: number; + + const KEY_hebrew_gimmel: number; + + const KEY_hebrew_he: number; + + const KEY_hebrew_het: number; + + const KEY_hebrew_kaph: number; + + const KEY_hebrew_kuf: number; + + const KEY_hebrew_lamed: number; + + const KEY_hebrew_mem: number; + + const KEY_hebrew_nun: number; + + const KEY_hebrew_pe: number; + + const KEY_hebrew_qoph: number; + + const KEY_hebrew_resh: number; + + const KEY_hebrew_samech: number; + + const KEY_hebrew_samekh: number; + + const KEY_hebrew_shin: number; + + const KEY_hebrew_taf: number; + + const KEY_hebrew_taw: number; + + const KEY_hebrew_tet: number; + + const KEY_hebrew_teth: number; + + const KEY_hebrew_waw: number; + + const KEY_hebrew_yod: number; + + const KEY_hebrew_zade: number; + + const KEY_hebrew_zadi: number; + + const KEY_hebrew_zain: number; + + const KEY_hebrew_zayin: number; + + const KEY_hexagram: number; + + const KEY_horizconnector: number; + + const KEY_horizlinescan1: number; + + const KEY_horizlinescan3: number; + + const KEY_horizlinescan5: number; + + const KEY_horizlinescan7: number; + + const KEY_horizlinescan9: number; + + const KEY_hstroke: number; + + const KEY_ht: number; + + const KEY_hyphen: number; + + const KEY_i: number; + + const KEY_iTouch: number; + + const KEY_iacute: number; + + const KEY_ibelowdot: number; + + const KEY_ibreve: number; + + const KEY_icircumflex: number; + + const KEY_identical: number; + + const KEY_idiaeresis: number; + + const KEY_idotless: number; + + const KEY_ifonlyif: number; + + const KEY_igrave: number; + + const KEY_ihook: number; + + const KEY_imacron: number; + + const KEY_implies: number; + + const KEY_includedin: number; + + const KEY_includes: number; + + const KEY_infinity: number; + + const KEY_integral: number; + + const KEY_intersection: number; + + const KEY_iogonek: number; + + const KEY_itilde: number; + + const KEY_j: number; + + const KEY_jcircumflex: number; + + const KEY_jot: number; + + const KEY_k: number; + + const KEY_kana_A: number; + + const KEY_kana_CHI: number; + + const KEY_kana_E: number; + + const KEY_kana_FU: number; + + const KEY_kana_HA: number; + + const KEY_kana_HE: number; + + const KEY_kana_HI: number; + + const KEY_kana_HO: number; + + const KEY_kana_HU: number; + + const KEY_kana_I: number; + + const KEY_kana_KA: number; + + const KEY_kana_KE: number; + + const KEY_kana_KI: number; + + const KEY_kana_KO: number; + + const KEY_kana_KU: number; + + const KEY_kana_MA: number; + + const KEY_kana_ME: number; + + const KEY_kana_MI: number; + + const KEY_kana_MO: number; + + const KEY_kana_MU: number; + + const KEY_kana_N: number; + + const KEY_kana_NA: number; + + const KEY_kana_NE: number; + + const KEY_kana_NI: number; + + const KEY_kana_NO: number; + + const KEY_kana_NU: number; + + const KEY_kana_O: number; + + const KEY_kana_RA: number; + + const KEY_kana_RE: number; + + const KEY_kana_RI: number; + + const KEY_kana_RO: number; + + const KEY_kana_RU: number; + + const KEY_kana_SA: number; + + const KEY_kana_SE: number; + + const KEY_kana_SHI: number; + + const KEY_kana_SO: number; + + const KEY_kana_SU: number; + + const KEY_kana_TA: number; + + const KEY_kana_TE: number; + + const KEY_kana_TI: number; + + const KEY_kana_TO: number; + + const KEY_kana_TSU: number; + + const KEY_kana_TU: number; + + const KEY_kana_U: number; + + const KEY_kana_WA: number; + + const KEY_kana_WO: number; + + const KEY_kana_YA: number; + + const KEY_kana_YO: number; + + const KEY_kana_YU: number; + + const KEY_kana_a: number; + + const KEY_kana_closingbracket: number; + + const KEY_kana_comma: number; + + const KEY_kana_conjunctive: number; + + const KEY_kana_e: number; + + const KEY_kana_fullstop: number; + + const KEY_kana_i: number; + + const KEY_kana_middledot: number; + + const KEY_kana_o: number; + + const KEY_kana_openingbracket: number; + + const KEY_kana_switch: number; + + const KEY_kana_tsu: number; + + const KEY_kana_tu: number; + + const KEY_kana_u: number; + + const KEY_kana_ya: number; + + const KEY_kana_yo: number; + + const KEY_kana_yu: number; + + const KEY_kappa: number; + + const KEY_kcedilla: number; + + const KEY_kra: number; + + const KEY_l: number; + + const KEY_lacute: number; + + const KEY_latincross: number; + + const KEY_lbelowdot: number; + + const KEY_lcaron: number; + + const KEY_lcedilla: number; + + const KEY_leftanglebracket: number; + + const KEY_leftarrow: number; + + const KEY_leftcaret: number; + + const KEY_leftdoublequotemark: number; + + const KEY_leftmiddlecurlybrace: number; + + const KEY_leftopentriangle: number; + + const KEY_leftpointer: number; + + const KEY_leftradical: number; + + const KEY_leftshoe: number; + + const KEY_leftsinglequotemark: number; + + const KEY_leftt: number; + + const KEY_lefttack: number; + + const KEY_less: number; + + const KEY_lessthanequal: number; + + const KEY_lf: number; + + const KEY_logicaland: number; + + const KEY_logicalor: number; + + const KEY_lowleftcorner: number; + + const KEY_lowrightcorner: number; + + const KEY_lstroke: number; + + const KEY_m: number; + + const KEY_mabovedot: number; + + const KEY_macron: number; + + const KEY_malesymbol: number; + + const KEY_maltesecross: number; + + const KEY_marker: number; + + const KEY_masculine: number; + + const KEY_minus: number; + + const KEY_minutes: number; + + const KEY_mu: number; + + const KEY_multiply: number; + + const KEY_musicalflat: number; + + const KEY_musicalsharp: number; + + const KEY_n: number; + + const KEY_nabla: number; + + const KEY_nacute: number; + + const KEY_ncaron: number; + + const KEY_ncedilla: number; + + const KEY_ninesubscript: number; + + const KEY_ninesuperior: number; + + const KEY_nl: number; + + const KEY_nobreakspace: number; + + const KEY_notapproxeq: number; + + const KEY_notelementof: number; + + const KEY_notequal: number; + + const KEY_notidentical: number; + + const KEY_notsign: number; + + const KEY_ntilde: number; + + const KEY_numbersign: number; + + const KEY_numerosign: number; + + const KEY_o: number; + + const KEY_oacute: number; + + const KEY_obarred: number; + + const KEY_obelowdot: number; + + const KEY_ocaron: number; + + const KEY_ocircumflex: number; + + const KEY_ocircumflexacute: number; + + const KEY_ocircumflexbelowdot: number; + + const KEY_ocircumflexgrave: number; + + const KEY_ocircumflexhook: number; + + const KEY_ocircumflextilde: number; + + const KEY_odiaeresis: number; + + const KEY_odoubleacute: number; + + const KEY_oe: number; + + const KEY_ogonek: number; + + const KEY_ograve: number; + + const KEY_ohook: number; + + const KEY_ohorn: number; + + const KEY_ohornacute: number; + + const KEY_ohornbelowdot: number; + + const KEY_ohorngrave: number; + + const KEY_ohornhook: number; + + const KEY_ohorntilde: number; + + const KEY_omacron: number; + + const KEY_oneeighth: number; + + const KEY_onefifth: number; + + const KEY_onehalf: number; + + const KEY_onequarter: number; + + const KEY_onesixth: number; + + const KEY_onesubscript: number; + + const KEY_onesuperior: number; + + const KEY_onethird: number; + + const KEY_ooblique: number; + + const KEY_openrectbullet: number; + + const KEY_openstar: number; + + const KEY_opentribulletdown: number; + + const KEY_opentribulletup: number; + + const KEY_ordfeminine: number; + + const KEY_oslash: number; + + const KEY_otilde: number; + + const KEY_overbar: number; + + const KEY_overline: number; + + const KEY_p: number; + + const KEY_pabovedot: number; + + const KEY_paragraph: number; + + const KEY_parenleft: number; + + const KEY_parenright: number; + + const KEY_partdifferential: number; + + const KEY_partialderivative: number; + + const KEY_percent: number; + + const KEY_period: number; + + const KEY_periodcentered: number; + + const KEY_permille: number; + + const KEY_phonographcopyright: number; + + const KEY_plus: number; + + const KEY_plusminus: number; + + const KEY_prescription: number; + + const KEY_prolongedsound: number; + + const KEY_punctspace: number; + + const KEY_q: number; + + const KEY_quad: number; + + const KEY_question: number; + + const KEY_questiondown: number; + + const KEY_quotedbl: number; + + const KEY_quoteleft: number; + + const KEY_quoteright: number; + + const KEY_r: number; + + const KEY_racute: number; + + const KEY_radical: number; + + const KEY_rcaron: number; + + const KEY_rcedilla: number; + + const KEY_registered: number; + + const KEY_rightanglebracket: number; + + const KEY_rightarrow: number; + + const KEY_rightcaret: number; + + const KEY_rightdoublequotemark: number; + + const KEY_rightmiddlecurlybrace: number; + + const KEY_rightmiddlesummation: number; + + const KEY_rightopentriangle: number; + + const KEY_rightpointer: number; + + const KEY_rightshoe: number; + + const KEY_rightsinglequotemark: number; + + const KEY_rightt: number; + + const KEY_righttack: number; + + const KEY_s: number; + + const KEY_sabovedot: number; + + const KEY_sacute: number; + + const KEY_scaron: number; + + const KEY_scedilla: number; + + const KEY_schwa: number; + + const KEY_scircumflex: number; + + const KEY_script_switch: number; + + const KEY_seconds: number; + + const KEY_section: number; + + const KEY_semicolon: number; + + const KEY_semivoicedsound: number; + + const KEY_seveneighths: number; + + const KEY_sevensubscript: number; + + const KEY_sevensuperior: number; + + const KEY_signaturemark: number; + + const KEY_signifblank: number; + + const KEY_similarequal: number; + + const KEY_singlelowquotemark: number; + + const KEY_sixsubscript: number; + + const KEY_sixsuperior: number; + + const KEY_slash: number; + + const KEY_soliddiamond: number; + + const KEY_space: number; + + const KEY_squareroot: number; + + const KEY_ssharp: number; + + const KEY_sterling: number; + + const KEY_stricteq: number; + + const KEY_t: number; + + const KEY_tabovedot: number; + + const KEY_tcaron: number; + + const KEY_tcedilla: number; + + const KEY_telephone: number; + + const KEY_telephonerecorder: number; + + const KEY_therefore: number; + + const KEY_thinspace: number; + + const KEY_thorn: number; + + const KEY_threeeighths: number; + + const KEY_threefifths: number; + + const KEY_threequarters: number; + + const KEY_threesubscript: number; + + const KEY_threesuperior: number; + + const KEY_tintegral: number; + + const KEY_topintegral: number; + + const KEY_topleftparens: number; + + const KEY_topleftradical: number; + + const KEY_topleftsqbracket: number; + + const KEY_topleftsummation: number; + + const KEY_toprightparens: number; + + const KEY_toprightsqbracket: number; + + const KEY_toprightsummation: number; + + const KEY_topt: number; + + const KEY_topvertsummationconnector: number; + + const KEY_trademark: number; + + const KEY_trademarkincircle: number; + + const KEY_tslash: number; + + const KEY_twofifths: number; + + const KEY_twosubscript: number; + + const KEY_twosuperior: number; + + const KEY_twothirds: number; + + const KEY_u: number; + + const KEY_uacute: number; + + const KEY_ubelowdot: number; + + const KEY_ubreve: number; + + const KEY_ucircumflex: number; + + const KEY_udiaeresis: number; + + const KEY_udoubleacute: number; + + const KEY_ugrave: number; + + const KEY_uhook: number; + + const KEY_uhorn: number; + + const KEY_uhornacute: number; + + const KEY_uhornbelowdot: number; + + const KEY_uhorngrave: number; + + const KEY_uhornhook: number; + + const KEY_uhorntilde: number; + + const KEY_umacron: number; + + const KEY_underbar: number; + + const KEY_underscore: number; + + const KEY_union: number; + + const KEY_uogonek: number; + + const KEY_uparrow: number; + + const KEY_upcaret: number; + + const KEY_upleftcorner: number; + + const KEY_uprightcorner: number; + + const KEY_upshoe: number; + + const KEY_upstile: number; + + const KEY_uptack: number; + + const KEY_uring: number; + + const KEY_utilde: number; + + const KEY_v: number; + + const KEY_variation: number; + + const KEY_vertbar: number; + + const KEY_vertconnector: number; + + const KEY_voicedsound: number; + + const KEY_vt: number; + + const KEY_w: number; + + const KEY_wacute: number; + + const KEY_wcircumflex: number; + + const KEY_wdiaeresis: number; + + const KEY_wgrave: number; + + const KEY_x: number; + + const KEY_xabovedot: number; + + const KEY_y: number; + + const KEY_yacute: number; + + const KEY_ybelowdot: number; + + const KEY_ycircumflex: number; + + const KEY_ydiaeresis: number; + + const KEY_yen: number; + + const KEY_ygrave: number; + + const KEY_yhook: number; + + const KEY_ytilde: number; + + const KEY_z: number; + + const KEY_zabovedot: number; + + const KEY_zacute: number; + + const KEY_zcaron: number; + + const KEY_zerosubscript: number; + + const KEY_zerosuperior: number; + + const KEY_zstroke: number; + + const KP_0: number; + + const KP_1: number; + + const KP_2: number; + + const KP_3: number; + + const KP_4: number; + + const KP_5: number; + + const KP_6: number; + + const KP_7: number; + + const KP_8: number; + + const KP_9: number; + + const KP_Add: number; + + const KP_Begin: number; + + const KP_Decimal: number; + + const KP_Delete: number; + + const KP_Divide: number; + + const KP_Down: number; + + const KP_End: number; + + const KP_Enter: number; + + const KP_Equal: number; + + const KP_F1: number; + + const KP_F2: number; + + const KP_F3: number; + + const KP_F4: number; + + const KP_Home: number; + + const KP_Insert: number; + + const KP_Left: number; + + const KP_Multiply: number; + + const KP_Next: number; + + const KP_Page_Down: number; + + const KP_Page_Up: number; + + const KP_Prior: number; + + const KP_Right: number; + + const KP_Separator: number; + + const KP_Space: number; + + const KP_Subtract: number; + + const KP_Tab: number; + + const KP_Up: number; + + const Kana_Lock: number; + + const Kana_Shift: number; + + const Kanji: number; + + const Kanji_Bangou: number; + + const Katakana: number; + + const KbdBrightnessDown: number; + + const KbdBrightnessUp: number; + + const KbdLightOnOff: number; + + const Kcedilla: number; + + const Korean_Won: number; + + const L: number; + + const L1: number; + + const L10: number; + + const L2: number; + + const L3: number; + + const L4: number; + + const L5: number; + + const L6: number; + + const L7: number; + + const L8: number; + + const L9: number; + + const Lacute: number; + + const Last_Virtual_Screen: number; + + const Launch0: number; + + const Launch1: number; + + const Launch2: number; + + const Launch3: number; + + const Launch4: number; + + const Launch5: number; + + const Launch6: number; + + const Launch7: number; + + const Launch8: number; + + const Launch9: number; + + const LaunchA: number; + + const LaunchB: number; + + const LaunchC: number; + + const LaunchD: number; + + const LaunchE: number; + + const LaunchF: number; + + const Lbelowdot: number; + + const Lcaron: number; + + const Lcedilla: number; + + const Left: number; + + const LightBulb: number; + + const Linefeed: number; + + const LiraSign: number; + + const LogGrabInfo: number; + + const LogOff: number; + + const LogWindowTree: number; + + const Lstroke: number; + + const M: number; + + /** + * The major version of the Clutter library (1, if %CLUTTER_VERSION is 1.2.3) + * @returns The major version of the Clutter library (1, if %CLUTTER_VERSION is 1.2.3) + */ + const MAJOR_VERSION: number; + + /** + * The micro version of the Clutter library (3, if %CLUTTER_VERSION is 1.2.3) + * @returns The micro version of the Clutter library (3, if %CLUTTER_VERSION is 1.2.3) + */ + const MICRO_VERSION: number; + + /** + * The minor version of the Clutter library (2, if %CLUTTER_VERSION is 1.2.3) + * @returns The minor version of the Clutter library (2, if %CLUTTER_VERSION is 1.2.3) + */ + const MINOR_VERSION: number; + + const Mabovedot: number; + + const Macedonia_DSE: number; + + const Macedonia_GJE: number; + + const Macedonia_KJE: number; + + const Macedonia_dse: number; + + const Macedonia_gje: number; + + const Macedonia_kje: number; + + const Mae_Koho: number; + + const Mail: number; + + const MailForward: number; + + const Market: number; + + const Massyo: number; + + const Meeting: number; + + const Memo: number; + + const Menu: number; + + const MenuKB: number; + + const MenuPB: number; + + const Messenger: number; + + const Meta_L: number; + + const Meta_R: number; + + const MillSign: number; + + const ModeLock: number; + + const Mode_switch: number; + + const MonBrightnessDown: number; + + const MonBrightnessUp: number; + + const MouseKeys_Accel_Enable: number; + + const MouseKeys_Enable: number; + + const Muhenkan: number; + + const Multi_key: number; + + const MultipleCandidate: number; + + const Music: number; + + const MyComputer: number; + + const MySites: number; + + const N: number; + + /** + * Set to 1 if Clutter was built without FPU (i.e fixed math), 0 otherwise + * @returns Set to 1 if Clutter was built without FPU (i.e fixed math), 0 otherwise + */ + const NO_FPU: number; + + const Nacute: number; + + const NairaSign: number; + + const Ncaron: number; + + const Ncedilla: number; + + const New: number; + + const NewSheqelSign: number; + + const News: number; + + const Next: number; + + const Next_VMode: number; + + const Next_Virtual_Screen: number; + + const Ntilde: number; + + const Num_Lock: number; + + const O: number; + + const OE: number; + + const Oacute: number; + + const Obarred: number; + + const Obelowdot: number; + + const Ocaron: number; + + const Ocircumflex: number; + + const Ocircumflexacute: number; + + const Ocircumflexbelowdot: number; + + const Ocircumflexgrave: number; + + const Ocircumflexhook: number; + + const Ocircumflextilde: number; + + const Odiaeresis: number; + + const Odoubleacute: number; + + const OfficeHome: number; + + const Ograve: number; + + const Ohook: number; + + const Ohorn: number; + + const Ohornacute: number; + + const Ohornbelowdot: number; + + const Ohorngrave: number; + + const Ohornhook: number; + + const Ohorntilde: number; + + const Omacron: number; + + const Ooblique: number; + + const Open: number; + + const OpenURL: number; + + const Option: number; + + const Oslash: number; + + const Otilde: number; + + const Overlay1_Enable: number; + + const Overlay2_Enable: number; + + const P: number; + + const PATH_RELATIVE: number; + + /** + * Priority of the redraws. This is chosen to be lower than the GTK+ + * redraw and resize priorities, because in application with both + * GTK+ and Clutter it's more likely that the Clutter part will be + * continually animating (and thus able to starve GTK+) than + * vice-versa. + * @returns Priority of the redraws. This is chosen to be lower than the GTK+ + * redraw and resize priorities, because in application with both + * GTK+ and Clutter it's more likely that the Clutter part will be + * continually animating (and thus able to starve GTK+) than + * vice-versa. + */ + const PRIORITY_REDRAW: number; + + const Pabovedot: number; + + const Page_Down: number; + + const Page_Up: number; + + const Paste: number; + + const Pause: number; + + const PesetaSign: number; + + const Phone: number; + + const Pictures: number; + + const Pointer_Accelerate: number; + + const Pointer_Button1: number; + + const Pointer_Button2: number; + + const Pointer_Button3: number; + + const Pointer_Button4: number; + + const Pointer_Button5: number; + + const Pointer_Button_Dflt: number; + + const Pointer_DblClick1: number; + + const Pointer_DblClick2: number; + + const Pointer_DblClick3: number; + + const Pointer_DblClick4: number; + + const Pointer_DblClick5: number; + + const Pointer_DblClick_Dflt: number; + + const Pointer_DfltBtnNext: number; + + const Pointer_DfltBtnPrev: number; + + const Pointer_Down: number; + + const Pointer_DownLeft: number; + + const Pointer_DownRight: number; + + const Pointer_Drag1: number; + + const Pointer_Drag2: number; + + const Pointer_Drag3: number; + + const Pointer_Drag4: number; + + const Pointer_Drag5: number; + + const Pointer_Drag_Dflt: number; + + const Pointer_EnableKeys: number; + + const Pointer_Left: number; + + const Pointer_Right: number; + + const Pointer_Up: number; + + const Pointer_UpLeft: number; + + const Pointer_UpRight: number; + + const PowerDown: number; + + const PowerOff: number; + + const Prev_VMode: number; + + const Prev_Virtual_Screen: number; + + const PreviousCandidate: number; + + const Print: number; + + const Prior: number; + + const Q: number; + + const R: number; + + const R1: number; + + const R10: number; + + const R11: number; + + const R12: number; + + const R13: number; + + const R14: number; + + const R15: number; + + const R2: number; + + const R3: number; + + const R4: number; + + const R5: number; + + const R6: number; + + const R7: number; + + const R8: number; + + const R9: number; + + const Racute: number; + + const Rcaron: number; + + const Rcedilla: number; + + const Red: number; + + const Redo: number; + + const Refresh: number; + + const Reload: number; + + const RepeatKeys_Enable: number; + + const Reply: number; + + const Return: number; + + const Right: number; + + const RockerDown: number; + + const RockerEnter: number; + + const RockerUp: number; + + const Romaji: number; + + const RotateWindows: number; + + const RotationKB: number; + + const RotationPB: number; + + const RupeeSign: number; + + const S: number; + + const SCHWA: number; + + /** + * The default GObject type for the Clutter stage. + * @returns The default GObject type for the Clutter stage. + */ + const STAGE_TYPE: string; + + const Sabovedot: number; + + const Sacute: number; + + const Save: number; + + const Scaron: number; + + const Scedilla: number; + + const Scircumflex: number; + + const ScreenSaver: number; + + const ScrollClick: number; + + const ScrollDown: number; + + const ScrollUp: number; + + const Scroll_Lock: number; + + const Search: number; + + const Select: number; + + const SelectButton: number; + + const Send: number; + + const Serbian_DJE: number; + + const Serbian_DZE: number; + + const Serbian_JE: number; + + const Serbian_LJE: number; + + const Serbian_NJE: number; + + const Serbian_TSHE: number; + + const Serbian_dje: number; + + const Serbian_dze: number; + + const Serbian_je: number; + + const Serbian_lje: number; + + const Serbian_nje: number; + + const Serbian_tshe: number; + + const Shift_L: number; + + const Shift_Lock: number; + + const Shift_R: number; + + const Shop: number; + + const SingleCandidate: number; + + const Sinh_a: number; + + const Sinh_aa: number; + + const Sinh_aa2: number; + + const Sinh_ae: number; + + const Sinh_ae2: number; + + const Sinh_aee: number; + + const Sinh_aee2: number; + + const Sinh_ai: number; + + const Sinh_ai2: number; + + const Sinh_al: number; + + const Sinh_au: number; + + const Sinh_au2: number; + + const Sinh_ba: number; + + const Sinh_bha: number; + + const Sinh_ca: number; + + const Sinh_cha: number; + + const Sinh_dda: number; + + const Sinh_ddha: number; + + const Sinh_dha: number; + + const Sinh_dhha: number; + + const Sinh_e: number; + + const Sinh_e2: number; + + const Sinh_ee: number; + + const Sinh_ee2: number; + + const Sinh_fa: number; + + const Sinh_ga: number; + + const Sinh_gha: number; + + const Sinh_h2: number; + + const Sinh_ha: number; + + const Sinh_i: number; + + const Sinh_i2: number; + + const Sinh_ii: number; + + const Sinh_ii2: number; + + const Sinh_ja: number; + + const Sinh_jha: number; + + const Sinh_jnya: number; + + const Sinh_ka: number; + + const Sinh_kha: number; + + const Sinh_kunddaliya: number; + + const Sinh_la: number; + + const Sinh_lla: number; + + const Sinh_lu: number; + + const Sinh_lu2: number; + + const Sinh_luu: number; + + const Sinh_luu2: number; + + const Sinh_ma: number; + + const Sinh_mba: number; + + const Sinh_na: number; + + const Sinh_ndda: number; + + const Sinh_ndha: number; + + const Sinh_ng: number; + + const Sinh_ng2: number; + + const Sinh_nga: number; + + const Sinh_nja: number; + + const Sinh_nna: number; + + const Sinh_nya: number; + + const Sinh_o: number; + + const Sinh_o2: number; + + const Sinh_oo: number; + + const Sinh_oo2: number; + + const Sinh_pa: number; + + const Sinh_pha: number; + + const Sinh_ra: number; + + const Sinh_ri: number; + + const Sinh_rii: number; + + const Sinh_ru2: number; + + const Sinh_ruu2: number; + + const Sinh_sa: number; + + const Sinh_sha: number; + + const Sinh_ssha: number; + + const Sinh_tha: number; + + const Sinh_thha: number; + + const Sinh_tta: number; + + const Sinh_ttha: number; + + const Sinh_u: number; + + const Sinh_u2: number; + + const Sinh_uu: number; + + const Sinh_uu2: number; + + const Sinh_va: number; + + const Sinh_ya: number; + + const Sleep: number; + + const SlowKeys_Enable: number; + + const Spell: number; + + const SplitScreen: number; + + const Standby: number; + + const Start: number; + + const StickyKeys_Enable: number; + + const Stop: number; + + const Subtitle: number; + + const Super_L: number; + + const Super_R: number; + + const Support: number; + + const Suspend: number; + + const Switch_VT_1: number; + + const Switch_VT_10: number; + + const Switch_VT_11: number; + + const Switch_VT_12: number; + + const Switch_VT_2: number; + + const Switch_VT_3: number; + + const Switch_VT_4: number; + + const Switch_VT_5: number; + + const Switch_VT_6: number; + + const Switch_VT_7: number; + + const Switch_VT_8: number; + + const Switch_VT_9: number; + + const Sys_Req: number; + + const T: number; + + const THORN: number; + + const Tab: number; + + const Tabovedot: number; + + const TaskPane: number; + + const Tcaron: number; + + const Tcedilla: number; + + const Terminal: number; + + const Terminate_Server: number; + + const Thai_baht: number; + + const Thai_bobaimai: number; + + const Thai_chochan: number; + + const Thai_chochang: number; + + const Thai_choching: number; + + const Thai_chochoe: number; + + const Thai_dochada: number; + + const Thai_dodek: number; + + const Thai_fofa: number; + + const Thai_fofan: number; + + const Thai_hohip: number; + + const Thai_honokhuk: number; + + const Thai_khokhai: number; + + const Thai_khokhon: number; + + const Thai_khokhuat: number; + + const Thai_khokhwai: number; + + const Thai_khorakhang: number; + + const Thai_kokai: number; + + const Thai_lakkhangyao: number; + + const Thai_lekchet: number; + + const Thai_lekha: number; + + const Thai_lekhok: number; + + const Thai_lekkao: number; + + const Thai_leknung: number; + + const Thai_lekpaet: number; + + const Thai_leksam: number; + + const Thai_leksi: number; + + const Thai_leksong: number; + + const Thai_leksun: number; + + const Thai_lochula: number; + + const Thai_loling: number; + + const Thai_lu: number; + + const Thai_maichattawa: number; + + const Thai_maiek: number; + + const Thai_maihanakat: number; + + const Thai_maihanakat_maitho: number; + + const Thai_maitaikhu: number; + + const Thai_maitho: number; + + const Thai_maitri: number; + + const Thai_maiyamok: number; + + const Thai_moma: number; + + const Thai_ngongu: number; + + const Thai_nikhahit: number; + + const Thai_nonen: number; + + const Thai_nonu: number; + + const Thai_oang: number; + + const Thai_paiyannoi: number; + + const Thai_phinthu: number; + + const Thai_phophan: number; + + const Thai_phophung: number; + + const Thai_phosamphao: number; + + const Thai_popla: number; + + const Thai_rorua: number; + + const Thai_ru: number; + + const Thai_saraa: number; + + const Thai_saraaa: number; + + const Thai_saraae: number; + + const Thai_saraaimaimalai: number; + + const Thai_saraaimaimuan: number; + + const Thai_saraam: number; + + const Thai_sarae: number; + + const Thai_sarai: number; + + const Thai_saraii: number; + + const Thai_sarao: number; + + const Thai_sarau: number; + + const Thai_saraue: number; + + const Thai_sarauee: number; + + const Thai_sarauu: number; + + const Thai_sorusi: number; + + const Thai_sosala: number; + + const Thai_soso: number; + + const Thai_sosua: number; + + const Thai_thanthakhat: number; + + const Thai_thonangmontho: number; + + const Thai_thophuthao: number; + + const Thai_thothahan: number; + + const Thai_thothan: number; + + const Thai_thothong: number; + + const Thai_thothung: number; + + const Thai_topatak: number; + + const Thai_totao: number; + + const Thai_wowaen: number; + + const Thai_yoyak: number; + + const Thai_yoying: number; + + const Thorn: number; + + const Time: number; + + const ToDoList: number; + + const Tools: number; + + const TopMenu: number; + + const TouchpadOff: number; + + const TouchpadOn: number; + + const TouchpadToggle: number; + + const Touroku: number; + + const Travel: number; + + const Tslash: number; + + const U: number; + + const UWB: number; + + const Uacute: number; + + const Ubelowdot: number; + + const Ubreve: number; + + const Ucircumflex: number; + + const Udiaeresis: number; + + const Udoubleacute: number; + + const Ugrave: number; + + const Uhook: number; + + const Uhorn: number; + + const Uhornacute: number; + + const Uhornbelowdot: number; + + const Uhorngrave: number; + + const Uhornhook: number; + + const Uhorntilde: number; + + const Ukrainian_GHE_WITH_UPTURN: number; + + const Ukrainian_I: number; + + const Ukrainian_IE: number; + + const Ukrainian_YI: number; + + const Ukrainian_ghe_with_upturn: number; + + const Ukrainian_i: number; + + const Ukrainian_ie: number; + + const Ukrainian_yi: number; + + const Ukranian_I: number; + + const Ukranian_JE: number; + + const Ukranian_YI: number; + + const Ukranian_i: number; + + const Ukranian_je: number; + + const Ukranian_yi: number; + + const Umacron: number; + + const Undo: number; + + const Ungrab: number; + + const Uogonek: number; + + const Up: number; + + const Uring: number; + + const User1KB: number; + + const User2KB: number; + + const UserPB: number; + + const Utilde: number; + + const V: number; + + /** + * The full version of the Clutter library, like 1.2.3 + * @returns The full version of the Clutter library, like 1.2.3 + */ + const VERSION: number; + + /** + * Numerically encoded version of the Clutter library, like 0x010203 + * @returns Numerically encoded version of the Clutter library, like 0x010203 + */ + const VERSION_HEX: number; + + /** + * The full version of the Clutter library, in string form (suited for + * string concatenation) + * @returns The full version of the Clutter library, in string form (suited for + * string concatenation) + */ + const VERSION_S: string; + + const VendorHome: number; + + const Video: number; + + const View: number; + + const VoidSymbol: number; + + const W: number; + + const WINDOWING_EGL: string; + + const WINDOWING_GDK: string; + + const WINDOWING_GLX: string; + + const WINDOWING_WAYLAND: string; + + const WINDOWING_X11: string; + + const WLAN: number; + + const WWW: number; + + const Wacute: number; + + const WakeUp: number; + + const Wcircumflex: number; + + const Wdiaeresis: number; + + const WebCam: number; + + const Wgrave: number; + + const WheelButton: number; + + const WindowClear: number; + + const WonSign: number; + + const Word: number; + + const X: number; + + const Xabovedot: number; + + const Xfer: number; + + const Y: number; + + const Yacute: number; + + const Ybelowdot: number; + + const Ycircumflex: number; + + const Ydiaeresis: number; + + const Yellow: number; + + const Ygrave: number; + + const Yhook: number; + + const Ytilde: number; + + const Z: number; + + const Zabovedot: number; + + const Zacute: number; + + const Zcaron: number; + + const Zen_Koho: number; + + const Zenkaku: number; + + const Zenkaku_Hankaku: number; + + const ZoomIn: number; + + const ZoomOut: number; + + const Zstroke: number; + + const a: number; + + const aacute: number; + + const abelowdot: number; + + const abovedot: number; + + const abreve: number; + + const abreveacute: number; + + const abrevebelowdot: number; + + const abrevegrave: number; + + const abrevehook: number; + + const abrevetilde: number; + + const acircumflex: number; + + const acircumflexacute: number; + + const acircumflexbelowdot: number; + + const acircumflexgrave: number; + + const acircumflexhook: number; + + const acircumflextilde: number; + + const acute: number; + + const adiaeresis: number; + + const ae: number; + + const agrave: number; + + const ahook: number; + + const amacron: number; + + const ampersand: number; + + const aogonek: number; + + const apostrophe: number; + + const approxeq: number; + + const approximate: number; + + const aring: number; + + const asciicircum: number; + + const asciitilde: number; + + const asterisk: number; + + const at: number; + + const atilde: number; + + const b: number; + + const babovedot: number; + + const backslash: number; + + const ballotcross: number; + + const bar: number; + + const because: number; + + const blank: number; + + const botintegral: number; + + const botleftparens: number; + + const botleftsqbracket: number; + + const botleftsummation: number; + + const botrightparens: number; + + const botrightsqbracket: number; + + const botrightsummation: number; + + const bott: number; + + const botvertsummationconnector: number; + + const braceleft: number; + + const braceright: number; + + const bracketleft: number; + + const bracketright: number; + + const braille_blank: number; + + const braille_dot_1: number; + + const braille_dot_10: number; + + const braille_dot_2: number; + + const braille_dot_3: number; + + const braille_dot_4: number; + + const braille_dot_5: number; + + const braille_dot_6: number; + + const braille_dot_7: number; + + const braille_dot_8: number; + + const braille_dot_9: number; + + const braille_dots_1: number; + + const braille_dots_12: number; + + const braille_dots_123: number; + + const braille_dots_1234: number; + + const braille_dots_12345: number; + + const braille_dots_123456: number; + + const braille_dots_1234567: number; + + const braille_dots_12345678: number; + + const braille_dots_1234568: number; + + const braille_dots_123457: number; + + const braille_dots_1234578: number; + + const braille_dots_123458: number; + + const braille_dots_12346: number; + + const braille_dots_123467: number; + + const braille_dots_1234678: number; + + const braille_dots_123468: number; + + const braille_dots_12347: number; + + const braille_dots_123478: number; + + const braille_dots_12348: number; + + const braille_dots_1235: number; + + const braille_dots_12356: number; + + const braille_dots_123567: number; + + const braille_dots_1235678: number; + + const braille_dots_123568: number; + + const braille_dots_12357: number; + + const braille_dots_123578: number; + + const braille_dots_12358: number; + + const braille_dots_1236: number; + + const braille_dots_12367: number; + + const braille_dots_123678: number; + + const braille_dots_12368: number; + + const braille_dots_1237: number; + + const braille_dots_12378: number; + + const braille_dots_1238: number; + + const braille_dots_124: number; + + const braille_dots_1245: number; + + const braille_dots_12456: number; + + const braille_dots_124567: number; + + const braille_dots_1245678: number; + + const braille_dots_124568: number; + + const braille_dots_12457: number; + + const braille_dots_124578: number; + + const braille_dots_12458: number; + + const braille_dots_1246: number; + + const braille_dots_12467: number; + + const braille_dots_124678: number; + + const braille_dots_12468: number; + + const braille_dots_1247: number; + + const braille_dots_12478: number; + + const braille_dots_1248: number; + + const braille_dots_125: number; + + const braille_dots_1256: number; + + const braille_dots_12567: number; + + const braille_dots_125678: number; + + const braille_dots_12568: number; + + const braille_dots_1257: number; + + const braille_dots_12578: number; + + const braille_dots_1258: number; + + const braille_dots_126: number; + + const braille_dots_1267: number; + + const braille_dots_12678: number; + + const braille_dots_1268: number; + + const braille_dots_127: number; + + const braille_dots_1278: number; + + const braille_dots_128: number; + + const braille_dots_13: number; + + const braille_dots_134: number; + + const braille_dots_1345: number; + + const braille_dots_13456: number; + + const braille_dots_134567: number; + + const braille_dots_1345678: number; + + const braille_dots_134568: number; + + const braille_dots_13457: number; + + const braille_dots_134578: number; + + const braille_dots_13458: number; + + const braille_dots_1346: number; + + const braille_dots_13467: number; + + const braille_dots_134678: number; + + const braille_dots_13468: number; + + const braille_dots_1347: number; + + const braille_dots_13478: number; + + const braille_dots_1348: number; + + const braille_dots_135: number; + + const braille_dots_1356: number; + + const braille_dots_13567: number; + + const braille_dots_135678: number; + + const braille_dots_13568: number; + + const braille_dots_1357: number; + + const braille_dots_13578: number; + + const braille_dots_1358: number; + + const braille_dots_136: number; + + const braille_dots_1367: number; + + const braille_dots_13678: number; + + const braille_dots_1368: number; + + const braille_dots_137: number; + + const braille_dots_1378: number; + + const braille_dots_138: number; + + const braille_dots_14: number; + + const braille_dots_145: number; + + const braille_dots_1456: number; + + const braille_dots_14567: number; + + const braille_dots_145678: number; + + const braille_dots_14568: number; + + const braille_dots_1457: number; + + const braille_dots_14578: number; + + const braille_dots_1458: number; + + const braille_dots_146: number; + + const braille_dots_1467: number; + + const braille_dots_14678: number; + + const braille_dots_1468: number; + + const braille_dots_147: number; + + const braille_dots_1478: number; + + const braille_dots_148: number; + + const braille_dots_15: number; + + const braille_dots_156: number; + + const braille_dots_1567: number; + + const braille_dots_15678: number; + + const braille_dots_1568: number; + + const braille_dots_157: number; + + const braille_dots_1578: number; + + const braille_dots_158: number; + + const braille_dots_16: number; + + const braille_dots_167: number; + + const braille_dots_1678: number; + + const braille_dots_168: number; + + const braille_dots_17: number; + + const braille_dots_178: number; + + const braille_dots_18: number; + + const braille_dots_2: number; + + const braille_dots_23: number; + + const braille_dots_234: number; + + const braille_dots_2345: number; + + const braille_dots_23456: number; + + const braille_dots_234567: number; + + const braille_dots_2345678: number; + + const braille_dots_234568: number; + + const braille_dots_23457: number; + + const braille_dots_234578: number; + + const braille_dots_23458: number; + + const braille_dots_2346: number; + + const braille_dots_23467: number; + + const braille_dots_234678: number; + + const braille_dots_23468: number; + + const braille_dots_2347: number; + + const braille_dots_23478: number; + + const braille_dots_2348: number; + + const braille_dots_235: number; + + const braille_dots_2356: number; + + const braille_dots_23567: number; + + const braille_dots_235678: number; + + const braille_dots_23568: number; + + const braille_dots_2357: number; + + const braille_dots_23578: number; + + const braille_dots_2358: number; + + const braille_dots_236: number; + + const braille_dots_2367: number; + + const braille_dots_23678: number; + + const braille_dots_2368: number; + + const braille_dots_237: number; + + const braille_dots_2378: number; + + const braille_dots_238: number; + + const braille_dots_24: number; + + const braille_dots_245: number; + + const braille_dots_2456: number; + + const braille_dots_24567: number; + + const braille_dots_245678: number; + + const braille_dots_24568: number; + + const braille_dots_2457: number; + + const braille_dots_24578: number; + + const braille_dots_2458: number; + + const braille_dots_246: number; + + const braille_dots_2467: number; + + const braille_dots_24678: number; + + const braille_dots_2468: number; + + const braille_dots_247: number; + + const braille_dots_2478: number; + + const braille_dots_248: number; + + const braille_dots_25: number; + + const braille_dots_256: number; + + const braille_dots_2567: number; + + const braille_dots_25678: number; + + const braille_dots_2568: number; + + const braille_dots_257: number; + + const braille_dots_2578: number; + + const braille_dots_258: number; + + const braille_dots_26: number; + + const braille_dots_267: number; + + const braille_dots_2678: number; + + const braille_dots_268: number; + + const braille_dots_27: number; + + const braille_dots_278: number; + + const braille_dots_28: number; + + const braille_dots_3: number; + + const braille_dots_34: number; + + const braille_dots_345: number; + + const braille_dots_3456: number; + + const braille_dots_34567: number; + + const braille_dots_345678: number; + + const braille_dots_34568: number; + + const braille_dots_3457: number; + + const braille_dots_34578: number; + + const braille_dots_3458: number; + + const braille_dots_346: number; + + const braille_dots_3467: number; + + const braille_dots_34678: number; + + const braille_dots_3468: number; + + const braille_dots_347: number; + + const braille_dots_3478: number; + + const braille_dots_348: number; + + const braille_dots_35: number; + + const braille_dots_356: number; + + const braille_dots_3567: number; + + const braille_dots_35678: number; + + const braille_dots_3568: number; + + const braille_dots_357: number; + + const braille_dots_3578: number; + + const braille_dots_358: number; + + const braille_dots_36: number; + + const braille_dots_367: number; + + const braille_dots_3678: number; + + const braille_dots_368: number; + + const braille_dots_37: number; + + const braille_dots_378: number; + + const braille_dots_38: number; + + const braille_dots_4: number; + + const braille_dots_45: number; + + const braille_dots_456: number; + + const braille_dots_4567: number; + + const braille_dots_45678: number; + + const braille_dots_4568: number; + + const braille_dots_457: number; + + const braille_dots_4578: number; + + const braille_dots_458: number; + + const braille_dots_46: number; + + const braille_dots_467: number; + + const braille_dots_4678: number; + + const braille_dots_468: number; + + const braille_dots_47: number; + + const braille_dots_478: number; + + const braille_dots_48: number; + + const braille_dots_5: number; + + const braille_dots_56: number; + + const braille_dots_567: number; + + const braille_dots_5678: number; + + const braille_dots_568: number; + + const braille_dots_57: number; + + const braille_dots_578: number; + + const braille_dots_58: number; + + const braille_dots_6: number; + + const braille_dots_67: number; + + const braille_dots_678: number; + + const braille_dots_68: number; + + const braille_dots_7: number; + + const braille_dots_78: number; + + const braille_dots_8: number; + + const breve: number; + + const brokenbar: number; + + const c: number; + + const c_h: number; + + const cabovedot: number; + + const cacute: number; + + const careof: number; + + const caret: number; + + const caron: number; + + const ccaron: number; + + const ccedilla: number; + + const ccircumflex: number; + + const cedilla: number; + + const cent: number; + + const ch: number; + + const checkerboard: number; + + const checkmark: number; + + const circle: number; + + const club: number; + + const colon: number; + + const comma: number; + + const containsas: number; + + const copyright: number; + + const cr: number; + + const crossinglines: number; + + const cuberoot: number; + + const currency: number; + + const cursor: number; + + const d: number; + + const dabovedot: number; + + const dagger: number; + + const dcaron: number; + + const dead_A: number; + + const dead_E: number; + + const dead_I: number; + + const dead_O: number; + + const dead_U: number; + + const dead_a: number; + + const dead_abovecomma: number; + + const dead_abovedot: number; + + const dead_abovereversedcomma: number; + + const dead_abovering: number; + + const dead_aboveverticalline: number; + + const dead_acute: number; + + const dead_belowbreve: number; + + const dead_belowcircumflex: number; + + const dead_belowcomma: number; + + const dead_belowdiaeresis: number; + + const dead_belowdot: number; + + const dead_belowmacron: number; + + const dead_belowring: number; + + const dead_belowtilde: number; + + const dead_belowverticalline: number; + + const dead_breve: number; + + const dead_capital_schwa: number; + + const dead_caron: number; + + const dead_cedilla: number; + + const dead_circumflex: number; + + const dead_currency: number; + + const dead_dasia: number; + + const dead_diaeresis: number; + + const dead_doubleacute: number; + + const dead_doublegrave: number; + + const dead_e: number; + + const dead_grave: number; + + const dead_greek: number; + + const dead_hook: number; + + const dead_horn: number; + + const dead_i: number; + + const dead_invertedbreve: number; + + const dead_iota: number; + + const dead_longsolidusoverlay: number; + + const dead_lowline: number; + + const dead_macron: number; + + const dead_o: number; + + const dead_ogonek: number; + + const dead_perispomeni: number; + + const dead_psili: number; + + const dead_semivoiced_sound: number; + + const dead_small_schwa: number; + + const dead_stroke: number; + + const dead_tilde: number; + + const dead_u: number; + + const dead_voiced_sound: number; + + const decimalpoint: number; + + const degree: number; + + const diaeresis: number; + + const diamond: number; + + const digitspace: number; + + const dintegral: number; + + const division: number; + + const dollar: number; + + const doubbaselinedot: number; + + const doubleacute: number; + + const doubledagger: number; + + const doublelowquotemark: number; + + const downarrow: number; + + const downcaret: number; + + const downshoe: number; + + const downstile: number; + + const downtack: number; + + const dstroke: number; + + const e: number; + + const eabovedot: number; + + const eacute: number; + + const ebelowdot: number; + + const ecaron: number; + + const ecircumflex: number; + + const ecircumflexacute: number; + + const ecircumflexbelowdot: number; + + const ecircumflexgrave: number; + + const ecircumflexhook: number; + + const ecircumflextilde: number; + + const ediaeresis: number; + + const egrave: number; + + const ehook: number; + + const eightsubscript: number; + + const eightsuperior: number; + + const elementof: number; + + const ellipsis: number; + + const em3space: number; + + const em4space: number; + + const emacron: number; + + const emdash: number; + + const emfilledcircle: number; + + const emfilledrect: number; + + const emopencircle: number; + + const emopenrectangle: number; + + const emptyset: number; + + const emspace: number; + + const endash: number; + + const enfilledcircbullet: number; + + const enfilledsqbullet: number; + + const eng: number; + + const enopencircbullet: number; + + const enopensquarebullet: number; + + const enspace: number; + + const eogonek: number; + + const equal: number; + + const eth: number; + + const etilde: number; + + const exclam: number; + + const exclamdown: number; + + const ezh: number; + + const f: number; + + const fabovedot: number; + + const femalesymbol: number; + + const ff: number; + + const figdash: number; + + const filledlefttribullet: number; + + const filledrectbullet: number; + + const filledrighttribullet: number; + + const filledtribulletdown: number; + + const filledtribulletup: number; + + const fiveeighths: number; + + const fivesixths: number; + + const fivesubscript: number; + + const fivesuperior: number; + + const fourfifths: number; + + const foursubscript: number; + + const foursuperior: number; + + const fourthroot: number; + + // const function: number; + + const g: number; + + const gabovedot: number; + + const gbreve: number; + + const gcaron: number; + + const gcedilla: number; + + const gcircumflex: number; + + const grave: number; + + const greater: number; + + const greaterthanequal: number; + + const guillemotleft: number; + + const guillemotright: number; + + const h: number; + + const hairspace: number; + + const hcircumflex: number; + + const heart: number; + + const hebrew_aleph: number; + + const hebrew_ayin: number; + + const hebrew_bet: number; + + const hebrew_beth: number; + + const hebrew_chet: number; + + const hebrew_dalet: number; + + const hebrew_daleth: number; + + const hebrew_doublelowline: number; + + const hebrew_finalkaph: number; + + const hebrew_finalmem: number; + + const hebrew_finalnun: number; + + const hebrew_finalpe: number; + + const hebrew_finalzade: number; + + const hebrew_finalzadi: number; + + const hebrew_gimel: number; + + const hebrew_gimmel: number; + + const hebrew_he: number; + + const hebrew_het: number; + + const hebrew_kaph: number; + + const hebrew_kuf: number; + + const hebrew_lamed: number; + + const hebrew_mem: number; + + const hebrew_nun: number; + + const hebrew_pe: number; + + const hebrew_qoph: number; + + const hebrew_resh: number; + + const hebrew_samech: number; + + const hebrew_samekh: number; + + const hebrew_shin: number; + + const hebrew_taf: number; + + const hebrew_taw: number; + + const hebrew_tet: number; + + const hebrew_teth: number; + + const hebrew_waw: number; + + const hebrew_yod: number; + + const hebrew_zade: number; + + const hebrew_zadi: number; + + const hebrew_zain: number; + + const hebrew_zayin: number; + + const hexagram: number; + + const horizconnector: number; + + const horizlinescan1: number; + + const horizlinescan3: number; + + const horizlinescan5: number; + + const horizlinescan7: number; + + const horizlinescan9: number; + + const hstroke: number; + + const ht: number; + + const hyphen: number; + + const i: number; + + const iTouch: number; + + const iacute: number; + + const ibelowdot: number; + + const ibreve: number; + + const icircumflex: number; + + const identical: number; + + const idiaeresis: number; + + const idotless: number; + + const ifonlyif: number; + + const igrave: number; + + const ihook: number; + + const imacron: number; + + const implies: number; + + const includedin: number; + + const includes: number; + + const infinity: number; + + const integral: number; + + const intersection: number; + + const iogonek: number; + + const itilde: number; + + const j: number; + + const jcircumflex: number; + + const jot: number; + + const k: number; + + const kana_A: number; + + const kana_CHI: number; + + const kana_E: number; + + const kana_FU: number; + + const kana_HA: number; + + const kana_HE: number; + + const kana_HI: number; + + const kana_HO: number; + + const kana_HU: number; + + const kana_I: number; + + const kana_KA: number; + + const kana_KE: number; + + const kana_KI: number; + + const kana_KO: number; + + const kana_KU: number; + + const kana_MA: number; + + const kana_ME: number; + + const kana_MI: number; + + const kana_MO: number; + + const kana_MU: number; + + const kana_N: number; + + const kana_NA: number; + + const kana_NE: number; + + const kana_NI: number; + + const kana_NO: number; + + const kana_NU: number; + + const kana_O: number; + + const kana_RA: number; + + const kana_RE: number; + + const kana_RI: number; + + const kana_RO: number; + + const kana_RU: number; + + const kana_SA: number; + + const kana_SE: number; + + const kana_SHI: number; + + const kana_SO: number; + + const kana_SU: number; + + const kana_TA: number; + + const kana_TE: number; + + const kana_TI: number; + + const kana_TO: number; + + const kana_TSU: number; + + const kana_TU: number; + + const kana_U: number; + + const kana_WA: number; + + const kana_WO: number; + + const kana_YA: number; + + const kana_YO: number; + + const kana_YU: number; + + const kana_a: number; + + const kana_closingbracket: number; + + const kana_comma: number; + + const kana_conjunctive: number; + + const kana_e: number; + + const kana_fullstop: number; + + const kana_i: number; + + const kana_middledot: number; + + const kana_o: number; + + const kana_openingbracket: number; + + const kana_switch: number; + + const kana_tsu: number; + + const kana_tu: number; + + const kana_u: number; + + const kana_ya: number; + + const kana_yo: number; + + const kana_yu: number; + + const kappa: number; + + const kcedilla: number; + + const kra: number; + + const l: number; + + const lacute: number; + + const latincross: number; + + const lbelowdot: number; + + const lcaron: number; + + const lcedilla: number; + + const leftanglebracket: number; + + const leftarrow: number; + + const leftcaret: number; + + const leftdoublequotemark: number; + + const leftmiddlecurlybrace: number; + + const leftopentriangle: number; + + const leftpointer: number; + + const leftradical: number; + + const leftshoe: number; + + const leftsinglequotemark: number; + + const leftt: number; + + const lefttack: number; + + const less: number; + + const lessthanequal: number; + + const lf: number; + + const logicaland: number; + + const logicalor: number; + + const lowleftcorner: number; + + const lowrightcorner: number; + + const lstroke: number; + + const m: number; + + const mabovedot: number; + + const macron: number; + + const malesymbol: number; + + const maltesecross: number; + + const marker: number; + + const masculine: number; + + const minus: number; + + const minutes: number; + + const mu: number; + + const multiply: number; + + const musicalflat: number; + + const musicalsharp: number; + + const n: number; + + const nabla: number; + + const nacute: number; + + const ncaron: number; + + const ncedilla: number; + + const ninesubscript: number; + + const ninesuperior: number; + + const nl: number; + + const nobreakspace: number; + + const notapproxeq: number; + + const notelementof: number; + + const notequal: number; + + const notidentical: number; + + const notsign: number; + + const ntilde: number; + + const numbersign: number; + + const numerosign: number; + + const o: number; + + const oacute: number; + + const obarred: number; + + const obelowdot: number; + + const ocaron: number; + + const ocircumflex: number; + + const ocircumflexacute: number; + + const ocircumflexbelowdot: number; + + const ocircumflexgrave: number; + + const ocircumflexhook: number; + + const ocircumflextilde: number; + + const odiaeresis: number; + + const odoubleacute: number; + + const oe: number; + + const ogonek: number; + + const ograve: number; + + const ohook: number; + + const ohorn: number; + + const ohornacute: number; + + const ohornbelowdot: number; + + const ohorngrave: number; + + const ohornhook: number; + + const ohorntilde: number; + + const omacron: number; + + const oneeighth: number; + + const onefifth: number; + + const onehalf: number; + + const onequarter: number; + + const onesixth: number; + + const onesubscript: number; + + const onesuperior: number; + + const onethird: number; + + const ooblique: number; + + const openrectbullet: number; + + const openstar: number; + + const opentribulletdown: number; + + const opentribulletup: number; + + const ordfeminine: number; + + const oslash: number; + + const otilde: number; + + const overbar: number; + + const overline: number; + + const p: number; + + const pabovedot: number; + + const paragraph: number; + + const parenleft: number; + + const parenright: number; + + const partdifferential: number; + + const partialderivative: number; + + const percent: number; + + const period: number; + + const periodcentered: number; + + const permille: number; + + const phonographcopyright: number; + + const plus: number; + + const plusminus: number; + + const prescription: number; + + const prolongedsound: number; + + const punctspace: number; + + const q: number; + + const quad: number; + + const question: number; + + const questiondown: number; + + const quotedbl: number; + + const quoteleft: number; + + const quoteright: number; + + const r: number; + + const racute: number; + + const radical: number; + + const rcaron: number; + + const rcedilla: number; + + const registered: number; + + const rightanglebracket: number; + + const rightarrow: number; + + const rightcaret: number; + + const rightdoublequotemark: number; + + const rightmiddlecurlybrace: number; + + const rightmiddlesummation: number; + + const rightopentriangle: number; + + const rightpointer: number; + + const rightshoe: number; + + const rightsinglequotemark: number; + + const rightt: number; + + const righttack: number; + + const s: number; + + const sabovedot: number; + + const sacute: number; + + const scaron: number; + + const scedilla: number; + + const schwa: number; + + const scircumflex: number; + + const script_switch: number; + + const seconds: number; + + const section: number; + + const semicolon: number; + + const semivoicedsound: number; + + const seveneighths: number; + + const sevensubscript: number; + + const sevensuperior: number; + + const signaturemark: number; + + const signifblank: number; + + const similarequal: number; + + const singlelowquotemark: number; + + const sixsubscript: number; + + const sixsuperior: number; + + const slash: number; + + const soliddiamond: number; + + const space: number; + + const squareroot: number; + + const ssharp: number; + + const sterling: number; + + const stricteq: number; + + const t: number; + + const tabovedot: number; + + const tcaron: number; + + const tcedilla: number; + + const telephone: number; + + const telephonerecorder: number; + + const therefore: number; + + const thinspace: number; + + const thorn: number; + + const threeeighths: number; + + const threefifths: number; + + const threequarters: number; + + const threesubscript: number; + + const threesuperior: number; + + const tintegral: number; + + const topintegral: number; + + const topleftparens: number; + + const topleftradical: number; + + const topleftsqbracket: number; + + const topleftsummation: number; + + const toprightparens: number; + + const toprightsqbracket: number; + + const toprightsummation: number; + + const topt: number; + + const topvertsummationconnector: number; + + const trademark: number; + + const trademarkincircle: number; + + const tslash: number; + + const twofifths: number; + + const twosubscript: number; + + const twosuperior: number; + + const twothirds: number; + + const u: number; + + const uacute: number; + + const ubelowdot: number; + + const ubreve: number; + + const ucircumflex: number; + + const udiaeresis: number; + + const udoubleacute: number; + + const ugrave: number; + + const uhook: number; + + const uhorn: number; + + const uhornacute: number; + + const uhornbelowdot: number; + + const uhorngrave: number; + + const uhornhook: number; + + const uhorntilde: number; + + const umacron: number; + + const underbar: number; + + const underscore: number; + + const union: number; + + const uogonek: number; + + const uparrow: number; + + const upcaret: number; + + const upleftcorner: number; + + const uprightcorner: number; + + const upshoe: number; + + const upstile: number; + + const uptack: number; + + const uring: number; + + const utilde: number; + + const v: number; + + const variation: number; + + const vertbar: number; + + const vertconnector: number; + + const voicedsound: number; + + const vt: number; + + const w: number; + + const wacute: number; + + const wcircumflex: number; + + const wdiaeresis: number; + + const wgrave: number; + + const x: number; + + const xabovedot: number; + + const y: number; + + const yacute: number; + + const ybelowdot: number; + + const ycircumflex: number; + + const ydiaeresis: number; + + const yen: number; + + const ygrave: number; + + const yhook: number; + + const ytilde: number; + + const z: number; + + const zabovedot: number; + + const zacute: number; + + const zcaron: number; + + const zerosubscript: number; + + const zerosuperior: number; + + const zstroke: number; + +} \ No newline at end of file diff --git a/gir/ClutterX11-1.0.d.ts b/gir/ClutterX11-1.0.d.ts new file mode 100644 index 0000000000..47934456cb --- /dev/null +++ b/gir/ClutterX11-1.0.d.ts @@ -0,0 +1,446 @@ +/** Generated with https://github.com/Gr3q/GIR2TS - If possible do not modify. */ +declare namespace imports.gi.ClutterX11 { + /** This construct is only for enabling class multi-inheritance, + * use {@link TexturePixmap} instead. + */ + interface ITexturePixmap { + automatic_updates: boolean; + readonly destroyed: boolean; + pixmap: number; + readonly pixmap_depth: number; + readonly pixmap_height: number; + readonly pixmap_width: number; + window: number; + readonly window_mapped: boolean; + readonly window_override_redirect: boolean; + window_redirect_automatic: boolean; + readonly window_x: number; + readonly window_y: number; + /** + * Enables or disables the automatic updates ot #texture in case the backing + * pixmap or window is damaged + * @param setting %TRUE to enable automatic updates + */ + set_automatic(setting: boolean): void; + /** + * Sets the X Pixmap to which the texture should be bound. + * @param pixmap the X Pixmap to which the texture should be bound + */ + set_pixmap(pixmap: xlib.Pixmap): void; + /** + * Sets up a suitable pixmap for the window, using the composite and damage + * extensions if possible, and then calls + * {@link ClutterX11.TexturePixmap.set_pixmap}. + * + * If you want to display a window in a #ClutterTexture, you probably want + * this function, or its older sister, clutter_glx_texture_pixmap_set_window(). + * + * This function has no effect unless the XComposite extension is available. + * @param window the X window to which the texture should be bound + * @param automatic %TRUE for automatic window updates, %FALSE for manual. + */ + set_window(window: xlib.Window, automatic: boolean): void; + /** + * Resets the texture's pixmap from its window, perhaps in response to the + * pixmap's invalidation as the window changed size. + */ + sync_window(): void; + /** + * Performs the actual binding of texture to the current content of + * the pixmap. Can be called to update the texture if the pixmap + * content has changed. + * @param x the X coordinate of the area to update + * @param y the Y coordinate of the area to update + * @param width the width of the area to update + * @param height the height of the area to update + */ + update_area(x: number, y: number, width: number, height: number): void; + /** + * ::queue-damage-redraw is emitted to notify that some sub-region + * of the texture has been changed (either by an automatic damage + * update or by an explicit call to + * clutter_x11_texture_pixmap_update_area). This usually means a + * redraw needs to be queued for the actor. + * + * The default handler will queue a clipped redraw in response to + * the damage, using the assumption that the pixmap is being painted + * to a rectangle covering the transformed allocation of the actor. + * If you sub-class and change the paint method so this isn't true + * then you must also provide your own damage signal handler to + * queue a redraw that blocks this default behaviour. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - x: The top left x position of the damage region + * - y: The top left y position of the damage region + * - width: The width of the damage region + * - height: The height of the damage region + * + * @returns Callback ID + */ + connect(signal: "queue-damage-redraw", callback: (owner: this, x: number, y: number, width: number, height: number) => void): number; + /** + * The ::update-area signal is emitted to ask the texture to update its + * content from its source pixmap. + * @param signal + * @param callback Callback function + * - owner: owner of the emitted event + * - x: X coordinate of the area to update + * - y: Y coordinate of the area to update + * - width: width of the area to update + * - height: height of the area to update + * + * @returns Callback ID + */ + connect(signal: "update-area", callback: (owner: this, x: number, y: number, width: number, height: number) => void): number; + + connect(signal: "notify::automatic-updates", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::destroyed", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::pixmap", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::pixmap-depth", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::pixmap-height", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::pixmap-width", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::window", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::window-mapped", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::window-override-redirect", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::window-redirect-automatic", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::window-x", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::window-y", callback: (owner: this, ...args: any) => void): number; + + } + + type TexturePixmapInitOptionsMixin = Clutter.TextureInitOptions & Atk.ImplementorIfaceInitOptions & Clutter.AnimatableInitOptions & Clutter.ContainerInitOptions & Clutter.ScriptableInitOptions & + Pick; + + export interface TexturePixmapInitOptions extends TexturePixmapInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link TexturePixmap} instead. + */ + type TexturePixmapMixin = ITexturePixmap & Clutter.Texture & Atk.ImplementorIface & Clutter.Animatable & Clutter.Container & Clutter.Scriptable; + + /** + * The {@link TexturePixmap} structure contains only private data + */ + interface TexturePixmap extends TexturePixmapMixin {} + + class TexturePixmap { + public constructor(options?: Partial); + /** + * Creates a new {@link TexturePixmap} which can be used to display the + * contents of an X11 Pixmap inside a Clutter scene graph + * @returns A new {@link TexturePixmap} + */ + public static new(): Clutter.Actor; + /** + * Creates a new {@link TexturePixmap} for #pixmap + * @param pixmap the X Pixmap to which this texture should be bound + * @returns A new {@link TexturePixmap} bound to the given X Pixmap + */ + public static new_with_pixmap(pixmap: xlib.Pixmap): Clutter.Actor; + /** + * Creates a new {@link TexturePixmap} for #window + * @param window the X window to which this texture should be bound + * @returns A new {@link TexturePixmap} bound to the given X window. + */ + public static new_with_window(window: xlib.Window): Clutter.Actor; + } + + export interface XInputDeviceInitOptions {} + interface XInputDevice {} + class XInputDevice { + public constructor(options?: Partial); + } + + /** + * Return values for the {@link FilterFunc} function. + */ + enum FilterReturn { + /** + * The event was not handled, continues the + * processing + */ + CONTINUE = 0, + /** + * Native event translated into a Clutter + * event, stops the processing + */ + TRANSLATE = 1, + /** + * Remove the event, stops the processing + */ + REMOVE = 2 + } + + /** + * Filter function for X11 native events. + */ + interface FilterFunc { + /** + * Filter function for X11 native events. + * @param xev Native X11 event structure + * @param cev Clutter event structure + * @param data user data passed to the filter function + * @returns the result of the filtering + */ + (xev: xlib.XEvent, cev: Clutter.Event, data: any | null): FilterReturn; + } + + /** + * Adds an event filter function. + * @param func a filter function + * @param data user data to be passed to the filter function, or %NULL + */ + function add_filter(func: FilterFunc, data: any | null): void; + + /** + * Disables the internal polling of X11 events in the main loop. + * + * Libraries or applications calling this function will be responsible of + * polling all X11 events. + * + * You also must call {@link ClutterX11.handle.event} to let Clutter process + * events and maintain its internal state. + * + * This function can only be called before calling clutter_init(). + * + * Even with event handling disabled, Clutter will still select + * all the events required to maintain its internal state on the stage + * Window; compositors using Clutter and input regions to pass events + * through to application windows should not rely on an empty input + * region, and should instead clear it themselves explicitly using the + * XFixes extension. + * + * This function should not be normally used by applications. + */ + function disable_event_retrieval(): void; + + /** + * Enables the use of the XInput extension if present on connected + * XServer and support built into Clutter. XInput allows for multiple + * pointing devices to be used. + * + * This function must be called before clutter_init(). + * + * Since XInput might not be supported by the X server, you might + * want to use clutter_x11_has_xinput() to see if support was enabled. + */ + function enable_xinput(): void; + + /** + * Retrieves the group for the modifiers set in #event + * @param event a #ClutterEvent of type %CLUTTER_KEY_PRESS or %CLUTTER_KEY_RELEASE + * @returns the group id + */ + function event_get_key_group(event: Clutter.Event): number; + + /** + * Retrieves the touch detail froma #ClutterEventSequence. + * @param sequence a #ClutterEventSequence + * @returns the touch detail + */ + function event_sequence_get_touch_detail(sequence: Clutter.EventSequence): number; + + /** + * Retrieves the timestamp of the last X11 event processed by + * Clutter. This might be different from the timestamp returned + * by {@link Clutter.get.current_event_time}, as Clutter may synthesize + * or throttle events. + * @returns a timestamp, in milliseconds + */ + function get_current_event_time(): xlib.Time; + + /** + * Retrieves the pointer to the default display. + * @returns the default display + */ + function get_default_display(): xlib.Display; + + /** + * Gets the number of the default X Screen object. + * @returns the number of the default screen + */ + function get_default_screen(): number; + + /** + * Retrieves a pointer to the list of input devices + * @returns a + * pointer to the internal list of input devices; the returned list is + * owned by Clutter and should not be modified or freed + */ + function get_input_devices(): Clutter.InputDevice[]; + + /** + * Retrieves the root window. + * @returns the id of the root window + */ + function get_root_window(): xlib.Window; + + /** + * Gets the stage for a particular X window. + * @param win an X Window ID + * @returns A #ClutterStage, or% NULL if a stage + * does not exist for the window + */ + function get_stage_from_window(win: xlib.Window): Clutter.Stage; + + /** + * Returns an XVisualInfo suitable for creating a foreign window for the given + * stage. NOTE: It doesn't do as the name may suggest, which is return the + * XVisualInfo that was used to create an existing window for the given stage. + * + * XXX: It might be best to deprecate this function and replace with something + * along the lines of clutter_backend_x11_get_foreign_visual () or perhaps + * clutter_stage_x11_get_foreign_visual () + * @param stage a #ClutterStage + * @returns An XVisualInfo suitable for creating a + * foreign stage. Use XFree() to free the returned value instead + */ + function get_stage_visual(stage: Clutter.Stage): xlib.XVisualInfo; + + /** + * Gets the stages X Window. + * @param stage a #ClutterStage + * @returns An XID for the stage window. + */ + function get_stage_window(stage: Clutter.Stage): xlib.Window; + + /** + * Retrieves whether the Clutter X11 backend is using ARGB visuals by default + * @returns %TRUE if ARGB visuals are queried by default + */ + function get_use_argb_visual(): boolean; + + /** + * Retrieves whether the Clutter X11 backend will create stereo + * stages if possible. + * @returns %TRUE if stereo stages are used if possible + */ + function get_use_stereo_stage(): boolean; + + /** + * Retrieves the `XVisualInfo` used by the Clutter X11 backend. + * @returns a `XVisualInfo`, or `None`. + * The returned value should be freed using `XFree()` when done + */ + function get_visual_info(): xlib.XVisualInfo; + + /** + * This function processes a single X event; it can be used to hook + * into external X11 event processing (for example, a GDK filter + * function). + * + * If {@link ClutterX11.disable.event_retrieval} has been called, you must + * let this function process events to update Clutter's internal state. + * @param xevent pointer to XEvent structure + * @returns {@link FilterReturn}. %CLUTTER_X11_FILTER_REMOVE + * indicates that Clutter has internally handled the event and the + * caller should do no further processing. %CLUTTER_X11_FILTER_CONTINUE + * indicates that Clutter is either not interested in the event, + * or has used the event to update internal state without taking + * any exclusive action. %CLUTTER_X11_FILTER_TRANSLATE will not + * occur. + */ + function handle_event(xevent: xlib.XEvent): FilterReturn; + + /** + * Retrieves whether Clutter is running on an X11 server with the + * XComposite extension + * @returns %TRUE if the XComposite extension is available + */ + function has_composite_extension(): boolean; + + /** + * Queries the X11 backend to check if event collection has been disabled. + * @returns TRUE if event retrival has been disabled. FALSE otherwise. + */ + function has_event_retrieval(): boolean; + + /** + * Gets whether Clutter has XInput support. + * @returns %TRUE if Clutter was compiled with XInput support + * and XInput support is available at run time. + */ + function has_xinput(): boolean; + + /** + * Removes the given filter function. + * @param func a filter function + * @param data user data to be passed to the filter function, or %NULL + */ + function remove_filter(func: FilterFunc, data: any | null): void; + + /** + * Sets the display connection Clutter should use; must be called + * before clutter_init(), clutter_init_with_args() or other functions + * pertaining Clutter's initialization process. + * + * If you are parsing the command line arguments by retrieving Clutter's + * #GOptionGroup with clutter_get_option_group() and calling + * g_option_context_parse() yourself, you should also call + * clutter_x11_set_display() before g_option_context_parse(). + * @param xdpy pointer to a X display connection. + */ + function set_display(xdpy: xlib.Display): void; + + /** + * Target the #ClutterStage to use an existing external X Window + * @param stage a #ClutterStage + * @param xwindow an existing X Window id + * @returns %TRUE if foreign window is valid + */ + function set_stage_foreign(stage: Clutter.Stage, xwindow: xlib.Window): boolean; + + /** + * Sets whether the Clutter X11 backend should request ARGB visuals by default + * or not. + * + * By default, Clutter requests RGB visuals. + * + * If no ARGB visuals are found, the X11 backend will fall back to + * requesting a RGB visual instead. + * + * ARGB visuals are required for the #ClutterStage:use-alpha property to work. + * + * This function can only be called once, and before clutter_init() is + * called. + * @param use_argb %TRUE if ARGB visuals should be requested by default + */ + function set_use_argb_visual(use_argb: boolean): void; + + /** + * Sets whether the backend object for Clutter stages, will, + * if possible, be created with the ability to support stereo drawing + * (drawing separate images for the left and right eyes). + * + * This function must be called before clutter_init() is called. + * During paint callbacks, cogl_framebuffer_is_stereo() can be called + * on the framebuffer retrieved by cogl_get_draw_framebuffer() to + * determine if stereo support was successfully enabled, and + * cogl_framebuffer_set_stereo_mode() to determine which buffers + * will be drawn to. + * + * Note that this function *does not* cause the stage to be drawn + * multiple times with different perspective transformations and thus + * appear in 3D, it simply enables individual ClutterActors to paint + * different images for the left and and right eye. + * @param use_stereo %TRUE if the stereo stages should be used if possible. + */ + function set_use_stereo_stage(use_stereo: boolean): void; + + /** + * Traps every X error until {@link ClutterX11.untrap.x_errors} is called. + */ + function trap_x_errors(): void; + + /** + * Removes the X error trap and returns the current status. + * @returns the trapped error code, or 0 for success + */ + function untrap_x_errors(): number; + +} \ No newline at end of file diff --git a/gir/Cogl-1.0.d.ts b/gir/Cogl-1.0.d.ts new file mode 100644 index 0000000000..8929e298f5 --- /dev/null +++ b/gir/Cogl-1.0.d.ts @@ -0,0 +1,4349 @@ +/** Generated with https://github.com/Gr3q/GIR2TS - If possible do not modify. */ +declare namespace imports.gi.Cogl { + /** This construct is only for enabling class multi-inheritance, + * use {@link Bitmap} instead. + */ + interface IBitmap { + + } + + type BitmapInitOptionsMixin = {}; + export interface BitmapInitOptions extends BitmapInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Bitmap} instead. + */ + type BitmapMixin = IBitmap; + + interface Bitmap extends BitmapMixin {} + + class Bitmap { + public constructor(options?: Partial); + /** + * Loads an image file from disk. This function can be safely called from + * within a thread. + * @param filename the file to load. + * @returns a {@link Bitmap} to the new loaded + * image data, or %NULL if loading the image failed. + */ + public static new_from_file(filename: string): Bitmap; + /** + * Parses an image file enough to extract the width and height + * of the bitmap. + * @param filename the file to check + * @returns %TRUE if the image was successfully parsed + * + * return location for the bitmap width, or %NULL + * + * return location for the bitmap height, or %NULL + */ + public static get_size_from_file(filename: string): [ Bool, number, number ]; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Fixed} instead. + */ + interface IFixed { + /** + * Computes the arc tangent of #a. + * @returns the arc tangent of the passed value, in fixed point notation + */ + atan(): Fixed; + /** + * Computes the arc tangent of #a / #b but uses the sign of both + * arguments to return the angle in right quadrant. + * @param b the denominator as a {@link Fixed} number + * @returns the arc tangent of the passed fraction, in fixed point + * notation + */ + atan2(b: Fixed): Fixed; + /** + * Computes the cosine of #angle. + * @returns the cosine of the passed angle, in fixed point notation + */ + cos(): Fixed; + /** + * Calculates 2 to the #x power. + * + * This function is around 11 times faster on x86, and around 22 times faster + * on fpu-less arm than libc pow(2, x). + * @returns the power of 2 to the passed value + */ + pow2(): number; + /** + * Computes the sine of #angle. + * @returns the sine of the passed angle, in fixed point notation + */ + sin(): Fixed; + /** + * Computes the square root of #x. + * @returns the square root of the passed value, in floating point + * notation + */ + sqrt(): Fixed; + /** + * Computes the tangent of #angle. + * @returns the tangent of the passed angle, in fixed point notation + */ + tan(): Fixed; + } + + type FixedInitOptionsMixin = {}; + export interface FixedInitOptions extends FixedInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Fixed} instead. + */ + type FixedMixin = IFixed; + + /** + * Fixed point number using a (16.16) notation. + */ + interface Fixed extends FixedMixin {} + + class Fixed { + public constructor(options?: Partial); + /** + * Calculates base 2 logarithm. + * + * This function is some 2.5 times faster on x86, and over 12 times faster on + * fpu-less arm, than using libc log(). + * @param x value to calculate base 2 logarithm from + * @returns base 2 logarithm. + */ + public static log2(x: number): Fixed; + /** + * Calculates #x to the #y power. + * @param x base + * @param y {@link Fixed} exponent + * @returns the power of #x to the #y + */ + public static pow(x: number, y: Fixed): number; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Offscreen} instead. + */ + interface IOffscreen { + + } + + type OffscreenInitOptionsMixin = {}; + export interface OffscreenInitOptions extends OffscreenInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Offscreen} instead. + */ + type OffscreenMixin = IOffscreen; + + interface Offscreen extends OffscreenMixin {} + + class Offscreen { + public constructor(options?: Partial); + /** + * @deprecated + * Use cogl_offscreen_new_with_texture instead. + * + * This creates an offscreen buffer object using the given #texture as the + * primary color buffer. It doesn't just initialize the contents of the + * offscreen buffer with the #texture; they are tightly bound so that + * drawing to the offscreen buffer effectivly updates the contents of the + * given texture. You don't need to destroy the offscreen buffer before + * you can use the #texture again. + * + * This only works with low-level {@link Texture} types such as + * #CoglTexture2D, #CoglTexture3D and #CoglTextureRectangle, and not + * with meta-texture types such as #CoglTexture2DSliced. + * @param texture A {@link Texture} pointer + * @returns a newly instantiated {@link Offscreen} + * framebuffer or %NULL if it wasn't possible to create the + * buffer. + */ + public static new_to_texture(texture: Texture): Offscreen; + /** + * This creates an offscreen framebuffer object using the given + * #texture as the primary color buffer. It doesn't just initialize + * the contents of the offscreen buffer with the #texture; they are + * tightly bound so that drawing to the offscreen buffer effectively + * updates the contents of the given texture. You don't need to + * destroy the offscreen buffer before you can use the #texture again. + * + * This api only works with low-level {@link Texture} types such as + * #CoglTexture2D, #CoglTexture3D and #CoglTextureRectangle, and not + * with meta-texture types such as #CoglTexture2DSliced. + * + * The storage for the framebuffer is actually allocated lazily + * so this function will never return %NULL to indicate a runtime + * error. This means it is still possible to configure the framebuffer + * before it is really allocated. + * + * Simple applications without full error handling can simply rely on + * Cogl to lazily allocate the storage of framebuffers but you should + * be aware that if Cogl encounters an error (such as running out of + * GPU memory) then your application will simply abort with an error + * message. If you need to be able to catch such exceptions at runtime + * then you can explicitly allocate your framebuffer when you have + * finished configuring it by calling {@link Cogl.framebuffer_allocate} and + * passing in a #CoglError argument to catch any exceptions. + * @param texture A {@link Texture} pointer + * @returns a newly instantiated {@link Offscreen} + * framebuffer. + */ + public static new_with_texture(texture: Texture): Offscreen; + /** + * @deprecated + * {@link Cogl.object_ref} should be used in new code. + * + * Increments the reference count on the #offscreen framebuffer. + * @param offscreen A pointer to a {@link Offscreen} framebuffer + * @returns For convenience it returns the + * given #offscreen + */ + public static ref(offscreen: any | null): any | null; + /** + * @deprecated + * {@link Cogl.object_unref} should be used in new code. + * + * Decreases the reference count for the #offscreen buffer and frees it when + * the count reaches 0. + * @param offscreen A pointer to a {@link Offscreen} framebuffer + */ + public static unref(offscreen: any | null): void; + } + + export interface ColorInitOptions {} + /** + * A structure for holding a color definition. The contents of + * the CoglColor structure are private and should never by accessed + * directly. + */ + interface Color {} + class Color { + public constructor(options?: Partial); + /** + * Creates a new (empty) color + * @returns a newly-allocated {@link Color}. Use {@link Cogl.Color.free} + * to free the allocated resources + */ + public static new(): Color; + /** + * Compares two {@link Color}s and checks if they are the same. + * + * This function can be passed to {@link G.hash_table_new} as the #key_equal_func + * parameter, when using #CoglColors as keys in a #GHashTable. + * @param v1 a {@link Color} + * @param v2 a {@link Color} + * @returns %TRUE if the two colors are the same. + */ + public static equal(v1: any | null, v2: any | null): Bool; + /** + * Converts a color expressed in HLS (hue, luminance and saturation) + * values into a {@link Color}. + * @param hue hue value, in the 0 .. 360 range + * @param saturation saturation value, in the 0 .. 1 range + * @param luminance luminance value, in the 0 .. 1 range + * @returns return location for a {@link Color} + */ + public static init_from_hsl(hue: number, saturation: number, luminance: number): Color; + public readonly private_member_red: number; + public readonly private_member_green: number; + public readonly private_member_blue: number; + public readonly private_member_alpha: number; + public readonly private_member_padding0: number; + public readonly private_member_padding1: number; + public readonly private_member_padding2: number; + /** + * Creates a copy of #color + * @returns a newly-allocated {@link Color}. Use {@link Cogl.Color.free} + * to free the allocate resources + */ + public copy(): Color; + /** + * Frees the resources allocated by {@link Cogl.Color.new} and cogl_color_copy() + */ + public free(): void; + /** + * Retrieves the alpha channel of #color as a fixed point + * value between 0 and 1.0. + * @returns the alpha channel of the passed color + */ + public get_alpha(): number; + /** + * Retrieves the alpha channel of #color as a byte value + * between 0 and 255 + * @returns the alpha channel of the passed color + */ + public get_alpha_byte(): number; + /** + * Retrieves the alpha channel of #color as a floating point + * value between 0.0 and 1.0 + * @returns the alpha channel of the passed color + */ + public get_alpha_float(): number; + /** + * Retrieves the blue channel of #color as a fixed point + * value between 0 and 1.0. + * @returns the blue channel of the passed color + */ + public get_blue(): number; + /** + * Retrieves the blue channel of #color as a byte value + * between 0 and 255 + * @returns the blue channel of the passed color + */ + public get_blue_byte(): number; + /** + * Retrieves the blue channel of #color as a floating point + * value between 0.0 and 1.0 + * @returns the blue channel of the passed color + */ + public get_blue_float(): number; + /** + * Retrieves the green channel of #color as a fixed point + * value between 0 and 1.0. + * @returns the green channel of the passed color + */ + public get_green(): number; + /** + * Retrieves the green channel of #color as a byte value + * between 0 and 255 + * @returns the green channel of the passed color + */ + public get_green_byte(): number; + /** + * Retrieves the green channel of #color as a floating point + * value between 0.0 and 1.0 + * @returns the green channel of the passed color + */ + public get_green_float(): number; + /** + * Retrieves the red channel of #color as a fixed point + * value between 0 and 1.0. + * @returns the red channel of the passed color + */ + public get_red(): number; + /** + * Retrieves the red channel of #color as a byte value + * between 0 and 255 + * @returns the red channel of the passed color + */ + public get_red_byte(): number; + /** + * Retrieves the red channel of #color as a floating point + * value between 0.0 and 1.0 + * @returns the red channel of the passed color + */ + public get_red_float(): number; + /** + * Sets the values of the passed channels into a {@link Color} + * @param red value of the red channel, between 0 and 1.0 + * @param green value of the green channel, between 0 and 1.0 + * @param blue value of the blue channel, between 0 and 1.0 + * @param alpha value of the alpha channel, between 0 and 1.0 + */ + public init_from_4f(red: number, green: number, blue: number, alpha: number): void; + /** + * Sets the values of the passed channels into a {@link Color} + * @param color_array a pointer to an array of 4 float color components + */ + public init_from_4fv(color_array: number): void; + /** + * Sets the values of the passed channels into a {@link Color}. + * @param red value of the red channel, between 0 and 255 + * @param green value of the green channel, between 0 and 255 + * @param blue value of the blue channel, between 0 and 255 + * @param alpha value of the alpha channel, between 0 and 255 + */ + public init_from_4ub(red: number, green: number, blue: number, alpha: number): void; + /** + * Converts a non-premultiplied color to a pre-multiplied color. For + * example, semi-transparent red is (1.0, 0, 0, 0.5) when non-premultiplied + * and (0.5, 0, 0, 0.5) when premultiplied. + */ + public premultiply(): void; + /** + * Sets the alpha channel of #color to #alpha. + * @param alpha a float value between 0.0f and 1.0f + */ + public set_alpha(alpha: number): void; + /** + * Sets the alpha channel of #color to #alpha. + * @param alpha a byte value between 0 and 255 + */ + public set_alpha_byte(alpha: number): void; + /** + * Sets the alpha channel of #color to #alpha. + * @param alpha a float value between 0.0f and 1.0f + */ + public set_alpha_float(alpha: number): void; + /** + * Sets the blue channel of #color to #blue. + * @param blue a float value between 0.0f and 1.0f + */ + public set_blue(blue: number): void; + /** + * Sets the blue channel of #color to #blue. + * @param blue a byte value between 0 and 255 + */ + public set_blue_byte(blue: number): void; + /** + * Sets the blue channel of #color to #blue. + * @param blue a float value between 0.0f and 1.0f + */ + public set_blue_float(blue: number): void; + /** + * @deprecated + * Use cogl_color_init_from_4f instead. + * + * Sets the values of the passed channels into a {@link Color} + * @param red value of the red channel, between 0 and %1.0 + * @param green value of the green channel, between 0 and %1.0 + * @param blue value of the blue channel, between 0 and %1.0 + * @param alpha value of the alpha channel, between 0 and %1.0 + */ + public set_from_4f(red: number, green: number, blue: number, alpha: number): void; + /** + * @deprecated + * Use cogl_color_init_from_4ub instead. + * + * Sets the values of the passed channels into a {@link Color}. + * @param red value of the red channel, between 0 and 255 + * @param green value of the green channel, between 0 and 255 + * @param blue value of the blue channel, between 0 and 255 + * @param alpha value of the alpha channel, between 0 and 255 + */ + public set_from_4ub(red: number, green: number, blue: number, alpha: number): void; + /** + * Sets the green channel of #color to #green. + * @param green a float value between 0.0f and 1.0f + */ + public set_green(green: number): void; + /** + * Sets the green channel of #color to #green. + * @param green a byte value between 0 and 255 + */ + public set_green_byte(green: number): void; + /** + * Sets the green channel of #color to #green. + * @param green a float value between 0.0f and 1.0f + */ + public set_green_float(green: number): void; + /** + * Sets the red channel of #color to #red. + * @param red a float value between 0.0f and 1.0f + */ + public set_red(red: number): void; + /** + * Sets the red channel of #color to #red. + * @param red a byte value between 0 and 255 + */ + public set_red_byte(red: number): void; + /** + * Sets the red channel of #color to #red. + * @param red a float value between 0.0f and 1.0f + */ + public set_red_float(red: number): void; + /** + * Converts #color to the HLS format. + * + * The #hue value is in the 0 .. 360 range. The #luminance and + * #saturation values are in the 0 .. 1 range. + * @returns return location for the hue value or %NULL + * + * return location for the saturation value or %NULL + * + * return location for the luminance value or %NULL + */ + public to_hsl(): [ hue: number, saturation: number, luminance: number ]; + /** + * Converts a pre-multiplied color to a non-premultiplied color. For + * example, semi-transparent red is (0.5, 0, 0, 0.5) when premultiplied + * and (1.0, 0, 0, 0.5) when non-premultiplied. + */ + public unpremultiply(): void; + } + + export interface EulerInitOptions {} + interface Euler {} + class Euler { + public constructor(options?: Partial); + } + + export interface MaterialInitOptions {} + interface Material {} + class Material { + public constructor(options?: Partial); + /** + * @deprecated + * Use {@link Cogl.pipeline_new} instead + * + * Allocates and initializes a blank white material + * @returns a pointer to a new {@link Material} + */ + public static new(): Material; + /** + * @deprecated + * Use {@link Cogl.object_ref} instead + * + * Increment the reference count for a {@link Material}. + * @param material a {@link Material} object. + * @returns the #material. + */ + public static ref(material: Handle): Handle; + /** + * @deprecated + * Use {@link Cogl.object_unref} instead + * + * Decrement the reference count for a {@link Material}. + * @param material a {@link Material} object. + */ + public static unref(material: Handle): void; + /** + * @deprecated + * Use {@link Cogl.pipeline_copy} instead + * + * Creates a new material with the configuration copied from the + * source material. + * + * We would strongly advise developers to always aim to use + * {@link Cogl.Material.copy} instead of cogl_material_new() whenever there will + * be any similarity between two materials. Copying a material helps Cogl + * keep track of a materials ancestry which we may use to help minimize GPU + * state changes. + * @returns a pointer to the newly allocated {@link Material} + */ + public copy(): Material; + /** + * @deprecated + * Use the {@link Snippet} shader api for lighting + * + * Retrieves the current ambient color for #material + * @param ambient The location to store the ambient color + */ + public get_ambient(ambient: Color): void; + /** + * @deprecated + * Use {@link Cogl.pipeline_get_color} instead + * + * Retrieves the current material color. + * @returns The location to store the color + */ + public get_color(): Color; + /** + * @deprecated + * Use the {@link Snippet} shader api for lighting + * + * Retrieves the current diffuse color for #material + * @param diffuse The location to store the diffuse color + */ + public get_diffuse(diffuse: Color): void; + /** + * @deprecated + * Use the {@link Snippet} shader api for lighting + * + * Retrieves the materials current emission color. + * @param emission The location to store the emission color + */ + public get_emission(emission: Color): void; + /** + * @deprecated + * Use {@link Cogl.pipeline_get_layer_point_sprite_coords_enabled} + * instead + * + * Gets whether point sprite coordinate generation is enabled for this + * texture layer. + * @param layer_index the layer number to check. + * @returns whether the texture coordinates will be replaced with + * point sprite coordinates. + */ + public get_layer_point_sprite_coords_enabled(layer_index: number): Bool; + /** + * @deprecated + * Use {@link Cogl.pipeline_get_layer_wrap_mode_p} instead + * + * Returns the wrap mode for the 'p' coordinate of texture lookups on this + * layer. + * @param layer_index the layer number to change. + * @returns the wrap mode for the 'p' coordinate of texture lookups on + * this layer. + */ + public get_layer_wrap_mode_p(layer_index: number): MaterialWrapMode; + /** + * @deprecated + * Use {@link Cogl.pipeline_get_layer_wrap_mode_s} instead + * + * Returns the wrap mode for the 's' coordinate of texture lookups on this + * layer. + * @param layer_index the layer number to change. + * @returns the wrap mode for the 's' coordinate of texture lookups on + * this layer. + */ + public get_layer_wrap_mode_s(layer_index: number): MaterialWrapMode; + /** + * @deprecated + * Use {@link Cogl.pipeline_get_layer_wrap_mode_t} instead + * + * Returns the wrap mode for the 't' coordinate of texture lookups on this + * layer. + * @param layer_index the layer number to change. + * @returns the wrap mode for the 't' coordinate of texture lookups on + * this layer. + */ + public get_layer_wrap_mode_t(layer_index: number): MaterialWrapMode; + /** + * This function lets you access a material's internal list of layers + * for iteration. + * + * You should avoid using this API if possible since it was only + * made public by mistake and will be deprecated when we have + * suitable alternative. + * + * It's important to understand that the list returned may not + * remain valid if you modify the material or any of the layers in any + * way and so you would have to re-get the list in that + * situation. + * @returns A + * list of {@link MaterialLayer}'s that can be passed to the + * cogl_material_layer_* functions. The list is owned by Cogl and it + * should not be modified or freed + * Deprecated: 1.16: Use {@link Cogl.pipeline_get_layers} instead + */ + public get_layers(): MaterialLayer[]; + /** + * @deprecated + * Use {@link Cogl.pipeline_get_n_layers} instead + * + * Retrieves the number of layers defined for the given #material + * @returns the number of layers + */ + public get_n_layers(): number; + /** + * @deprecated + * Use {@link Cogl.pipeline_get_point_size} instead + * + * Get the size of points drawn when %COGL_VERTICES_MODE_POINTS is + * used with the vertex buffer API. + * @returns the point size of the material. + */ + public get_point_size(): number; + /** + * @deprecated + * Use the {@link Snippet} shader api for lighting + * + * Retrieves the materials current emission color. + * @returns The materials current shininess value + */ + public get_shininess(): number; + /** + * @deprecated + * Use the {@link Snippet} shader api for lighting + * + * Retrieves the materials current specular color. + * @param specular The location to store the specular color + */ + public get_specular(specular: Color): void; + /** + * @deprecated + * Use {@link Snippet} api instead instead + * + * Queries what user program has been associated with the given + * #material using {@link Cogl.Material.set_user_program}. + * @returns The current user program + * or %COGL_INVALID_HANDLE. + */ + public get_user_program(): Handle; + /** + * @deprecated + * Use {@link Cogl.pipeline_remove_layer} instead + * + * This function removes a layer from your material + * @param layer_index Specifies the layer you want to remove + */ + public remove_layer(layer_index: number): void; + /** + * @deprecated + * Use {@link Cogl.pipeline_set_alpha_test_function} instead + * + * Before a primitive is blended with the framebuffer, it goes through an + * alpha test stage which lets you discard fragments based on the current + * alpha value. This function lets you change the function used to evaluate + * the alpha channel, and thus determine which fragments are discarded + * and which continue on to the blending stage. + * + * The default is %COGL_MATERIAL_ALPHA_FUNC_ALWAYS + * @param alpha_func A {@link MaterialAlphaFunc} constant + * @param alpha_reference A reference point that the chosen alpha function uses + * to compare incoming fragments to. + */ + public set_alpha_test_function(alpha_func: MaterialAlphaFunc, alpha_reference: number): void; + /** + * @deprecated + * Use the {@link Snippet} shader api for lighting + * + * Sets the material's ambient color, in the standard OpenGL lighting + * model. The ambient color affects the overall color of the object. + * + * Since the diffuse color will be intense when the light hits the surface + * directly, the ambient will be most apparent where the light hits at a + * slant. + * + * The default value is (0.2, 0.2, 0.2, 1.0) + * @param ambient The components of the desired ambient color + */ + public set_ambient(ambient: Color): void; + /** + * @deprecated + * Use the {@link Snippet} shader api for lighting + * + * Conveniently sets the diffuse and ambient color of #material at the same + * time. See {@link Cogl.Material.set_ambient} and cogl_material_set_diffuse(). + * + * The default ambient color is (0.2, 0.2, 0.2, 1.0) + * + * The default diffuse color is (0.8, 0.8, 0.8, 1.0) + * @param color The components of the desired ambient and diffuse colors + */ + public set_ambient_and_diffuse(color: Color): void; + /** + * @deprecated + * Use {@link Cogl.pipeline_set_blend} instead + * + * If not already familiar; please refer here + * for an overview of what blend strings are, and their syntax. + * + * Blending occurs after the alpha test function, and combines fragments with + * the framebuffer. + * + * Currently the only blend function Cogl exposes is ADD(). So any valid + * blend statements will be of the form: + * + * |[ + * <channel-mask>=ADD(SRC_COLOR*(<factor>), DST_COLOR*(<factor>)) + * ]| + * + * The brackets around blend factors are currently not + * optional! + * + * This is the list of source-names usable as blend factors: + * + * SRC_COLOR: The color of the in comming fragment + * DST_COLOR: The color of the framebuffer + * CONSTANT: The constant set via cogl_material_set_blend_constant() + * + * + * The source names can be used according to the + * color-source and factor syntax, + * so for example "(1-SRC_COLOR[A])" would be a valid factor, as would + * "(CONSTANT[RGB])" + * + * These can also be used as factors: + * + * 0: (0, 0, 0, 0) + * 1: (1, 1, 1, 1) + * SRC_ALPHA_SATURATE_FACTOR: (f,f,f,1) where f = MIN(SRC_COLOR[A],1-DST_COLOR[A]) + * + * + * Remember; all color components are normalized to the range [0, 1] + * before computing the result of blending. + * + * + * Blend Strings/1 + * Blend a non-premultiplied source over a destination with + * premultiplied alpha: + * + * "RGB = ADD(SRC_COLOR*(SRC_COLOR[A]), DST_COLOR*(1-SRC_COLOR[A]))" + * "A = ADD(SRC_COLOR, DST_COLOR*(1-SRC_COLOR[A]))" + * + * + * + * + * Blend Strings/2 + * Blend a premultiplied source over a destination with + * premultiplied alpha + * + * "RGBA = ADD(SRC_COLOR, DST_COLOR*(1-SRC_COLOR[A]))" + * + * + * + * The default blend string is: + * |[ + * RGBA = ADD (SRC_COLOR, DST_COLOR*(1-SRC_COLOR[A])) + * ]| + * + * That gives normal alpha-blending when the calculated color for the material + * is in premultiplied form. + * @param blend_string A Cogl blend string + * describing the desired blend function. + * @returns %TRUE if the blend string was successfully parsed, and the + * described blending is supported by the underlying driver/hardware. If + * there was an error, %FALSE is returned and #error is set accordingly (if + * present). + */ + public set_blend(blend_string: string): Bool; + /** + * @deprecated + * Use {@link Cogl.pipeline_set_blend_constant} instead + * + * When blending is setup to reference a CONSTANT blend factor then + * blending will depend on the constant set with this function. + * @param constant_color The constant color you want + */ + public set_blend_constant(constant_color: Color): void; + /** + * @deprecated + * Use {@link Cogl.pipeline_set_color} instead + * + * Sets the basic color of the material, used when no lighting is enabled. + * + * Note that if you don't add any layers to the material then the color + * will be blended unmodified with the destination; the default blend + * expects premultiplied colors: for example, use (0.5, 0.0, 0.0, 0.5) for + * semi-transparent red. See {@link Cogl.Color.premultiply}. + * + * The default value is (1.0, 1.0, 1.0, 1.0) + * @param color The components of the color + */ + public set_color(color: Color): void; + /** + * @deprecated + * Use {@link Cogl.pipeline_set_color4f} instead + * + * Sets the basic color of the material, used when no lighting is enabled. + * + * The default value is (1.0, 1.0, 1.0, 1.0) + * @param red The red component + * @param green The green component + * @param blue The blue component + * @param alpha The alpha component + */ + public set_color4f(red: number, green: number, blue: number, alpha: number): void; + /** + * @deprecated + * Use {@link Cogl.pipeline_set_color4ub} instead + * + * Sets the basic color of the material, used when no lighting is enabled. + * + * The default value is (0xff, 0xff, 0xff, 0xff) + * @param red The red component + * @param green The green component + * @param blue The blue component + * @param alpha The alpha component + */ + public set_color4ub(red: number, green: number, blue: number, alpha: number): void; + /** + * @deprecated + * Use the {@link Snippet} shader api for lighting + * + * Sets the material's diffuse color, in the standard OpenGL lighting + * model. The diffuse color is most intense where the light hits the + * surface directly - perpendicular to the surface. + * + * The default value is (0.8, 0.8, 0.8, 1.0) + * @param diffuse The components of the desired diffuse color + */ + public set_diffuse(diffuse: Color): void; + /** + * @deprecated + * Use the {@link Snippet} shader api for lighting + * + * Sets the material's emissive color, in the standard OpenGL lighting + * model. It will look like the surface is a light source emitting this + * color. + * + * The default value is (0.0, 0.0, 0.0, 1.0) + * @param emission The components of the desired emissive color + */ + public set_emission(emission: Color): void; + /** + * @deprecated + * Use {@link Cogl.pipeline_set_layer} instead + * + * In addition to the standard OpenGL lighting model a Cogl material may have + * one or more layers comprised of textures that can be blended together in + * order, with a number of different texture combine modes. This function + * defines a new texture layer. + * + * The index values of multiple layers do not have to be consecutive; it is + * only their relative order that is important. + * + * In the future, we may define other types of material layers, such + * as purely GLSL based layers. + * @param layer_index the index of the layer + * @param texture a {@link Handle} for the layer object + */ + public set_layer(layer_index: number, texture: Handle): void; + /** + * @deprecated + * Use {@link Cogl.pipeline_set_layer_combine} instead + * + * If not already familiar; you can refer + * here for an overview of what blend + * strings are and there syntax. + * + * These are all the functions available for texture combining: + * + * REPLACE(arg0) = arg0 + * MODULATE(arg0, arg1) = arg0 x arg1 + * ADD(arg0, arg1) = arg0 + arg1 + * ADD_SIGNED(arg0, arg1) = arg0 + arg1 - 0.5 + * INTERPOLATE(arg0, arg1, arg2) = arg0 x arg2 + arg1 x (1 - arg2) + * SUBTRACT(arg0, arg1) = arg0 - arg1 + * + * + * DOT3_RGB(arg0, arg1) = 4 x ((arg0[R] - 0.5)) * (arg1[R] - 0.5) + + * (arg0[G] - 0.5)) * (arg1[G] - 0.5) + + * (arg0[B] - 0.5)) * (arg1[B] - 0.5)) + * + * + * + * + * DOT3_RGBA(arg0, arg1) = 4 x ((arg0[R] - 0.5)) * (arg1[R] - 0.5) + + * (arg0[G] - 0.5)) * (arg1[G] - 0.5) + + * (arg0[B] - 0.5)) * (arg1[B] - 0.5)) + * + * + * + * + * Refer to the + * color-source syntax for + * describing the arguments. The valid source names for texture combining + * are: + * + * + * TEXTURE + * Use the color from the current texture layer + * + * + * TEXTURE_0, TEXTURE_1, etc + * Use the color from the specified texture layer + * + * + * CONSTANT + * Use the color from the constant given with + * {@link Cogl.Material.set_layer_constant} + * + * + * PRIMARY + * Use the color of the material as set with + * cogl_material_set_color() + * + * + * PREVIOUS + * Either use the texture color from the previous layer, or + * if this is layer 0, use the color of the material as set with + * cogl_material_set_color() + * + * + * + * + * Layer Combine Examples + * This is effectively what the default blending is: + * + * RGBA = MODULATE (PREVIOUS, TEXTURE) + * + * This could be used to cross-fade between two images, using + * the alpha component of a constant as the interpolator. The constant + * color is given by calling cogl_material_set_layer_constant. + * + * RGBA = INTERPOLATE (PREVIOUS, TEXTURE, CONSTANT[A]) + * + * + * + * You can't give a multiplication factor for arguments as you can + * with blending. + * @param layer_index Specifies the layer you want define a combine function for + * @param blend_string A Cogl blend string + * describing the desired texture combine function. + * @returns %TRUE if the blend string was successfully parsed, and the + * described texture combining is supported by the underlying driver and + * or hardware. On failure, %FALSE is returned and #error is set + */ + public set_layer_combine(layer_index: number, blend_string: string): Bool; + /** + * @deprecated + * Use {@link Cogl.pipeline_set_layer_combine_constant} + * instead + * + * When you are using the 'CONSTANT' color source in a layer combine + * description then you can use this function to define its value. + * @param layer_index Specifies the layer you want to specify a constant used + * for texture combining + * @param constant The constant color you want + */ + public set_layer_combine_constant(layer_index: number, constant: Color): void; + /** + * @deprecated + * Use {@link Cogl.pipeline_set_layer_filters} instead + * + * Changes the decimation and interpolation filters used when a texture is + * drawn at other scales than 100%. + * @param layer_index the layer number to change. + * @param min_filter the filter used when scaling a texture down. + * @param mag_filter the filter used when magnifying a texture. + */ + public set_layer_filters(layer_index: number, min_filter: MaterialFilter, mag_filter: MaterialFilter): void; + /** + * @deprecated + * Use {@link Cogl.pipeline_set_layer_matrix} instead + * + * This function lets you set a matrix that can be used to e.g. translate + * and rotate a single layer of a material used to fill your geometry. + * @param layer_index the index for the layer inside #material + * @param matrix the transformation matrix for the layer + */ + public set_layer_matrix(layer_index: number, matrix: Matrix): void; + /** + * @deprecated + * Use {@link Cogl.pipeline_set_layer_point_sprite_coords_enabled} + * instead + * + * When rendering points, if #enable is %TRUE then the texture + * coordinates for this layer will be replaced with coordinates that + * vary from 0.0 to 1.0 across the primitive. The top left of the + * point will have the coordinates 0.0,0.0 and the bottom right will + * have 1.0,1.0. If #enable is %FALSE then the coordinates will be + * fixed for the entire point. + * + * This function will only work if %COGL_FEATURE_POINT_SPRITE is + * available. If the feature is not available then the function will + * return %FALSE and set #error. + * @param layer_index the layer number to change. + * @param enable whether to enable point sprite coord generation. + * @returns %TRUE if the function succeeds, %FALSE otherwise. + */ + public set_layer_point_sprite_coords_enabled(layer_index: number, enable: Bool): Bool; + /** + * @deprecated + * Use {@link Cogl.pipeline_set_layer_wrap_mode} instead + * + * Sets the wrap mode for all three coordinates of texture lookups on + * this layer. This is equivalent to calling + * {@link Cogl.Material.set_layer_wrap_mode_s}, + * cogl_material_set_layer_wrap_mode_t() and + * cogl_material_set_layer_wrap_mode_p() separately. + * @param layer_index the layer number to change. + * @param mode the new wrap mode + */ + public set_layer_wrap_mode(layer_index: number, mode: MaterialWrapMode): void; + /** + * @deprecated + * Use {@link Cogl.pipeline_set_layer_wrap_mode_p} instead + * + * Sets the wrap mode for the 'p' coordinate of texture lookups on + * this layer. 'p' is the third coordinate. + * @param layer_index the layer number to change. + * @param mode the new wrap mode + */ + public set_layer_wrap_mode_p(layer_index: number, mode: MaterialWrapMode): void; + /** + * @deprecated + * Use {@link Cogl.pipeline_set_layer_wrap_mode_s} instead + * + * Sets the wrap mode for the 's' coordinate of texture lookups on this layer. + * @param layer_index the layer number to change. + * @param mode the new wrap mode + */ + public set_layer_wrap_mode_s(layer_index: number, mode: MaterialWrapMode): void; + /** + * @deprecated + * Use {@link Cogl.pipeline_set_layer_wrap_mode_t} instead + * + * Sets the wrap mode for the 't' coordinate of texture lookups on this layer. + * @param layer_index the layer number to change. + * @param mode the new wrap mode + */ + public set_layer_wrap_mode_t(layer_index: number, mode: MaterialWrapMode): void; + /** + * @deprecated + * Use {@link Cogl.pipeline_set_point_size} instead + * + * Changes the size of points drawn when %COGL_VERTICES_MODE_POINTS is + * used with the vertex buffer API. Note that typically the GPU will + * only support a limited minimum and maximum range of point sizes. If + * the chosen point size is outside that range then the nearest value + * within that range will be used instead. The size of a point is in + * screen space so it will be the same regardless of any + * transformations. The default point size is 1.0. + * @param point_size the new point size. + */ + public set_point_size(point_size: number): void; + /** + * @deprecated + * Use the {@link Snippet} shader api for lighting + * + * Sets the shininess of the material, in the standard OpenGL lighting + * model, which determines the size of the specular highlights. A + * higher #shininess will produce smaller highlights which makes the + * object appear more shiny. + * + * The default value is 0.0 + * @param shininess The desired shininess; must be >= 0.0 + */ + public set_shininess(shininess: number): void; + /** + * @deprecated + * Use the {@link Snippet} shader api for lighting + * + * Sets the material's specular color, in the standard OpenGL lighting + * model. The intensity of the specular color depends on the viewport + * position, and is brightest along the lines of reflection. + * + * The default value is (0.0, 0.0, 0.0, 1.0) + * @param specular The components of the desired specular color + */ + public set_specular(specular: Color): void; + /** + * @deprecated + * Use {@link Snippet} api instead instead + * + * Associates a linked CoglProgram with the given material so that the + * program can take full control of vertex and/or fragment processing. + * + * This is an example of how it can be used to associate an ARBfp + * program with a {@link Material}: + * |[ + * CoglHandle shader; + * CoglHandle program; + * CoglMaterial *material; + * + * shader = cogl_create_shader (COGL_SHADER_TYPE_FRAGMENT); + * cogl_shader_source (shader, + * "!!ARBfp1.0\n" + * "MOV result.color,fragment.color;\n" + * "END\n"); + * cogl_shader_compile (shader); + * + * program = cogl_create_program (); + * cogl_program_attach_shader (program, shader); + * cogl_program_link (program); + * + * material = cogl_material_new (); + * cogl_material_set_user_program (material, program); + * + * cogl_set_source_color4ub (0xff, 0x00, 0x00, 0xff); + * cogl_rectangle (0, 0, 100, 100); + * ]| + * + * It is possibly worth keeping in mind that this API is not part of + * the long term design for how we want to expose shaders to Cogl + * developers (We are planning on deprecating the cogl_program and + * cogl_shader APIs in favour of a "snippet" framework) but in the + * meantime we hope this will handle most practical GLSL and ARBfp + * requirements. + * + * Also remember you need to check for either the + * %COGL_FEATURE_SHADERS_GLSL or %COGL_FEATURE_SHADERS_ARBFP before + * using the cogl_program or cogl_shader API. + * @param program A {@link Handle} to a linked CoglProgram + */ + public set_user_program(program: Handle): void; + } + + export interface MaterialLayerInitOptions {} + interface MaterialLayer {} + class MaterialLayer { + public constructor(options?: Partial); + /** + * @deprecated + * No replacement + * + * Queries the currently set downscaling filter for a material later + * @returns the current downscaling filter + */ + public get_mag_filter(): MaterialFilter; + /** + * @deprecated + * No replacement + * + * Queries the currently set downscaling filter for a material layer + * @returns the current downscaling filter + */ + public get_min_filter(): MaterialFilter; + /** + * @deprecated + * No replacement + * + * Extracts a texture handle for a specific layer. + * + * In the future Cogl may support purely GLSL based layers; for those + * layers this function which will likely return %COGL_INVALID_HANDLE if you + * try to get the texture handle from them. Considering this scenario, you + * should call {@link Cogl.MaterialLayer.get_type} first in order check it is of + * type %COGL_MATERIAL_LAYER_TYPE_TEXTURE before calling this function. + * @returns a {@link Handle} for the texture inside the layer + */ + public get_texture(): Handle; + /** + * @deprecated + * No replacement + * + * Retrieves the type of the layer + * + * Currently there is only one type of layer defined: + * %COGL_MATERIAL_LAYER_TYPE_TEXTURE, but considering we may add purely GLSL + * based layers in the future, you should write code that checks the type + * first. + * @returns the type of the layer + */ + public get_type(): MaterialLayerType; + /** + * @deprecated + * Use {@link Cogl.pipeline_layer_get_wrap_mode_p} instead + * + * Gets the wrap mode for the 'p' coordinate of texture lookups on + * this layer. 'p' is the third coordinate. + * @returns the wrap mode value for the p coordinate. + */ + public get_wrap_mode_p(): MaterialWrapMode; + /** + * @deprecated + * Use {@link Cogl.pipeline_layer_get_wrap_mode_s} instead + * + * Gets the wrap mode for the 's' coordinate of texture lookups on this layer. + * @returns the wrap mode value for the s coordinate. + */ + public get_wrap_mode_s(): MaterialWrapMode; + /** + * @deprecated + * Use {@link Cogl.pipeline_layer_get_wrap_mode_t} instead + * + * Gets the wrap mode for the 't' coordinate of texture lookups on this layer. + * @returns the wrap mode value for the t coordinate. + */ + public get_wrap_mode_t(): MaterialWrapMode; + } + + export interface MatrixInitOptions {} + /** + * A CoglMatrix holds a 4x4 transform matrix. This is a single precision, + * column-major matrix which means it is compatible with what OpenGL expects. + * + * A CoglMatrix can represent transforms such as, rotations, scaling, + * translation, sheering, and linear projections. You can combine these + * transforms by multiplying multiple matrices in the order you want them + * applied. + * + * The transformation of a vertex (x, y, z, w) by a CoglMatrix is given by: + * + * |[ + * x_new = xx * x + xy * y + xz * z + xw * w + * y_new = yx * x + yy * y + yz * z + yw * w + * z_new = zx * x + zy * y + zz * z + zw * w + * w_new = wx * x + wy * y + wz * z + ww * w + * ]| + * + * Where w is normally 1 + * + * You must consider the members of the CoglMatrix structure read only, + * and all matrix modifications must be done via the cogl_matrix API. This + * allows Cogl to annotate the matrices internally. Violation of this will give + * undefined results. If you need to initialize a matrix with a constant other + * than the identity matrix you can use {@link Cogl.Matrix.init_from_array}. + */ + interface Matrix {} + class Matrix { + public constructor(options?: Partial); + /** + * Compares two matrices to see if they represent the same + * transformation. Although internally the matrices may have different + * annotations associated with them and may potentially have a cached + * inverse matrix these are not considered in the comparison. + * @param v1 A 4x4 transformation matrix + * @param v2 A 4x4 transformation matrix + * @returns + */ + public static equal(v1: any | null, v2: any | null): Bool; + public xx: number; + public yx: number; + public zx: number; + public wx: number; + public xy: number; + public yy: number; + public zy: number; + public wy: number; + public xz: number; + public yz: number; + public zz: number; + public wz: number; + public xw: number; + public yw: number; + public zw: number; + public ww: number; + public readonly private_member_inv: number[]; + public readonly private_member_type: number; + public readonly private_member_flags: number; + public readonly private_member__padding3: number; + /** + * Allocates a new {@link Matrix} on the heap and initializes it with + * the same values as #matrix. + * @returns A newly allocated {@link Matrix} which + * should be freed using {@link Cogl.Matrix.free} + */ + public copy(): Matrix; + /** + * Frees a {@link Matrix} that was previously allocated via a call to + * {@link Cogl.Matrix.copy}. + */ + public free(): void; + /** + * Multiplies #matrix by the given frustum perspective matrix. + * @param left X position of the left clipping plane where it + * intersects the near clipping plane + * @param right X position of the right clipping plane where it + * intersects the near clipping plane + * @param bottom Y position of the bottom clipping plane where it + * intersects the near clipping plane + * @param top Y position of the top clipping plane where it intersects + * the near clipping plane + * @param z_near The distance to the near clipping plane (Must be positive) + * @param z_far The distance to the far clipping plane (Must be positive) + */ + public frustum(left: number, right: number, bottom: number, top: number, z_near: number, z_far: number): void; + /** + * Casts #matrix to a float array which can be directly passed to OpenGL. + * @returns a pointer to the float array + */ + public get_array(): number; + /** + * Gets the inverse transform of a given matrix and uses it to initialize + * a new {@link Matrix}. + * + * Although the first parameter is annotated as const to indicate + * that the transform it represents isn't modified this function may + * technically save a copy of the inverse transform within the given + * #CoglMatrix so that subsequent requests for the inverse transform may + * avoid costly inversion calculations. + * @returns %TRUE if the inverse was successfully calculated or %FALSE + * for degenerate transformations that can't be inverted (in this case the + * #inverse matrix will simply be initialized with the identity matrix) + * + * The destination for a 4x4 inverse transformation matrix + */ + public get_inverse(): [ Bool, Matrix ]; + /** + * Initializes #matrix with the contents of #array + * @param array A linear array of 16 floats (column-major order) + */ + public init_from_array(array: number): void; + /** + * Resets matrix to the identity matrix: + * + * |[ + * .xx=1; .xy=0; .xz=0; .xw=0; + * .yx=0; .yy=1; .yz=0; .yw=0; + * .zx=0; .zy=0; .zz=1; .zw=0; + * .wx=0; .wy=0; .wz=0; .ww=1; + * ]| + */ + public init_identity(): void; + /** + * Resets matrix to the (tx, ty, tz) translation matrix: + * + * |[ + * .xx=1; .xy=0; .xz=0; .xw=tx; + * .yx=0; .yy=1; .yz=0; .yw=ty; + * .zx=0; .zy=0; .zz=1; .zw=tz; + * .wx=0; .wy=0; .wz=0; .ww=1; + * ]| + * @param tx x coordinate of the translation vector + * @param ty y coordinate of the translation vector + * @param tz z coordinate of the translation vector + */ + public init_translation(tx: number, ty: number, tz: number): void; + /** + * Determines if the given matrix is an identity matrix. + * @returns %TRUE if #matrix is an identity matrix else %FALSE + */ + public is_identity(): Bool; + /** + * Applies a view transform #matrix that positions the camera at + * the coordinate (#eye_position_x, #eye_position_y, #eye_position_z) + * looking towards an object at the coordinate (#object_x, #object_y, + * #object_z). The top of the camera is aligned to the given world up + * vector, which is normally simply (0, 1, 0) to map up to the + * positive direction of the y axis. + * + * Because there is a lot of missleading documentation online for + * gluLookAt regarding the up vector we want to try and be a bit + * clearer here. + * + * The up vector should simply be relative to your world coordinates + * and does not need to change as you move the eye and object + * positions. Many online sources may claim that the up vector needs + * to be perpendicular to the vector between the eye and object + * position (partly because the man page is somewhat missleading) but + * that is not necessary for this function. + * + * You should never look directly along the world-up + * vector. + * + * It is assumed you are using a typical projection matrix where + * your origin maps to the center of your viewport. + * + * Almost always when you use this function it should be the first + * transform applied to a new modelview transform + * @param eye_position_x The X coordinate to look from + * @param eye_position_y The Y coordinate to look from + * @param eye_position_z The Z coordinate to look from + * @param object_x The X coordinate of the object to look at + * @param object_y The Y coordinate of the object to look at + * @param object_z The Z coordinate of the object to look at + * @param world_up_x The X component of the world's up direction vector + * @param world_up_y The Y component of the world's up direction vector + * @param world_up_z The Z component of the world's up direction vector + */ + public look_at(eye_position_x: number, eye_position_y: number, eye_position_z: number, object_x: number, object_y: number, object_z: number, world_up_x: number, world_up_y: number, world_up_z: number): void; + /** + * Multiplies the two supplied matrices together and stores + * the resulting matrix inside #result. + * + * It is possible to multiply the #a matrix in-place, so + * #result can be equal to #a but can't be equal to #b. + * @param a A 4x4 transformation matrix + * @param b A 4x4 transformation matrix + */ + public multiply(a: Matrix, b: Matrix): void; + /** + * @deprecated + * Use {@link Cogl.Matrix.orthographic} + * + * Multiplies #matrix by a parallel projection matrix. + * @param left The coordinate for the left clipping plane + * @param right The coordinate for the right clipping plane + * @param bottom The coordinate for the bottom clipping plane + * @param top The coordinate for the top clipping plane + * @param near The distance to the near clipping + * plane (will be negative if the plane is + * behind the viewer) + * @param far The distance to the far clipping + * plane (will be negative if the plane is + * behind the viewer) + */ + public ortho(left: number, right: number, bottom: number, top: number, near: number, far: number): void; + /** + * Multiplies #matrix by the described perspective matrix + * + * You should be careful not to have to great a #z_far / #z_near + * ratio since that will reduce the effectiveness of depth testing + * since there wont be enough precision to identify the depth of + * objects near to each other. + * @param fov_y Vertical field of view angle in degrees. + * @param aspect The (width over height) aspect ratio for display + * @param z_near The distance to the near clipping plane (Must be positive, + * and must not be 0) + * @param z_far The distance to the far clipping plane (Must be positive) + */ + public perspective(fov_y: number, aspect: number, z_near: number, z_far: number): void; + /** + * Multiplies #matrix with a rotation matrix that applies a rotation + * of #angle degrees around the specified 3D vector. + * @param angle The angle you want to rotate in degrees + * @param x X component of your rotation vector + * @param y Y component of your rotation vector + * @param z Z component of your rotation vector + */ + public rotate(angle: number, x: number, y: number, z: number): void; + /** + * Multiplies #matrix with a transform matrix that scales along the X, + * Y and Z axis. + * @param sx The X scale factor + * @param sy The Y scale factor + * @param sz The Z scale factor + */ + public scale(sx: number, sy: number, sz: number): void; + /** + * Transforms a point whos position is given and returned as four float + * components. + */ + public transform_point(): void; + /** + * Multiplies #matrix with a transform matrix that translates along + * the X, Y and Z axis. + * @param x The X translation you want to apply + * @param y The Y translation you want to apply + * @param z The Z translation you want to apply + */ + public translate(x: number, y: number, z: number): void; + /** + * Replaces #matrix with its transpose. Ie, every element (i,j) in the + * new matrix is taken from element (j,i) in the old matrix. + */ + public transpose(): void; + } + + export interface QuaternionInitOptions {} + interface Quaternion {} + class Quaternion { + public constructor(options?: Partial); + } + + export interface TextureVertexInitOptions {} + /** + * Used to specify vertex information when calling cogl_polygon() + */ + interface TextureVertex {} + class TextureVertex { + public constructor(options?: Partial); + /** + * Model x-coordinate + */ + public x: number; + /** + * Model y-coordinate + */ + public y: number; + /** + * Model z-coordinate + */ + public z: number; + /** + * Texture x-coordinate + */ + public tx: number; + /** + * Texture y-coordinate + */ + public ty: number; + /** + * The color to use at this vertex. This is ignored if + * use_color is %FALSE when calling cogl_polygon() + */ + public color: Color; + } + + export interface _ColorSizeCheckInitOptions {} + interface _ColorSizeCheck {} + class _ColorSizeCheck { + public constructor(options?: Partial<_ColorSizeCheckInitOptions>); + public compile_time_assert_CoglColor_size: string[]; + } + + export interface _MatrixSizeCheckInitOptions {} + interface _MatrixSizeCheck {} + class _MatrixSizeCheck { + public constructor(options?: Partial<_MatrixSizeCheckInitOptions>); + public compile_time_assert_CoglMatrix_size: string[]; + } + + export interface _TextureVertexSizeCheckInitOptions {} + interface _TextureVertexSizeCheck {} + class _TextureVertexSizeCheck { + public constructor(options?: Partial<_TextureVertexSizeCheckInitOptions>); + public compile_time_assert_CoglTextureVertex_size: string[]; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Texture} instead. + */ + interface ITexture { + /** + * Explicitly allocates the storage for the given #texture which + * allows you to be sure that there is enough memory for the + * texture and if not then the error can be handled gracefully. + * + * Normally applications don't need to use this api directly + * since the texture will be implicitly allocated when data is set on + * the texture, or if the texture is attached to a {@link Offscreen} + * framebuffer and rendered too. + * @returns %TRUE if the texture was successfully allocated, + * otherwise %FALSE and #error will be updated if it + * wasn't %NULL. + */ + allocate(): Bool; + /** + * Queries what components the given #texture stores internally as set + * via {@link Cogl.Texture.set_components}. + * + * For textures created by the ‘_with_size’ constructors the default + * is %COGL_TEXTURE_COMPONENTS_RGBA. The other constructors which take + * a %CoglBitmap or a data pointer default to the same components as + * the pixel format of the data. + * @returns + */ + get_components(): TextureComponents; + /** + * Copies the pixel data from a cogl texture to system memory. + * + * Don't pass the value of {@link Cogl.Texture.get_rowstride} as the + * #rowstride argument, the rowstride should be the rowstride you + * want for the destination #data buffer not the rowstride of the + * source texture + * @param format the {@link PixelFormat} to store the texture as. + * @param rowstride the rowstride of #data in bytes or pass 0 to calculate + * from the bytes-per-pixel of #format multiplied by the + * #texture width. + * @param data memory location to write the #texture's contents, or %NULL + * to only query the data size through the return value. + * @returns the size of the texture data in bytes + */ + get_data(format: PixelFormat, rowstride: number, data: number): number; + /** + * Queries the GL handles for a GPU side texture through its {@link Texture}. + * + * If the texture is spliced the data for the first sub texture will be + * queried. + * @returns %TRUE if the handle was successfully retrieved, %FALSE + * if the handle was invalid + * + * pointer to return location for the + * textures GL handle, or %NULL. + * + * pointer to return location for the + * GL target type, or %NULL. + */ + get_gl_texture(): [ Bool, number | null, number | null ]; + /** + * Queries the height of a cogl texture. + * @returns the height of the GPU side texture in pixels + */ + get_height(): number; + /** + * Queries the maximum wasted (unused) pixels in one dimension of a GPU side + * texture. + * @returns the maximum waste + */ + get_max_waste(): number; + /** + * Queries the pre-multiplied alpha status for internally stored red, + * green and blue components for the given #texture as set by + * {@link Cogl.Texture.set_premultiplied}. + * + * By default the pre-multipled state is #TRUE. + * @returns %TRUE if red, green and blue components are + * internally stored pre-multiplied by the alpha + * value or %FALSE if not. + */ + get_premultiplied(): Bool; + /** + * Queries the width of a cogl texture. + * @returns the width of the GPU side texture in pixels + */ + get_width(): number; + /** + * Queries if a texture is sliced (stored as multiple GPU side tecture + * objects). + * @returns %TRUE if the texture is sliced, %FALSE if the texture + * is stored as a single GPU texture + */ + is_sliced(): Bool; + /** + * Affects the internal storage format for this texture by specifying + * what components will be required for sampling later. + * + * This api affects how data is uploaded to the GPU since unused + * components can potentially be discarded from source data. + * + * For textures created by the ‘_with_size’ constructors the default + * is %COGL_TEXTURE_COMPONENTS_RGBA. The other constructors which take + * a %CoglBitmap or a data pointer default to the same components as + * the pixel format of the data. + * + * Note that the %COGL_TEXTURE_COMPONENTS_RG format is not available + * on all drivers. The availability can be determined by checking for + * the %COGL_FEATURE_ID_TEXTURE_RG feature. If this format is used on + * a driver where it is not available then %COGL_TEXTURE_ERROR_FORMAT + * will be raised when the texture is allocated. Even if the feature + * is not available then %COGL_PIXEL_FORMAT_RG_88 can still be used as + * an image format as long as %COGL_TEXTURE_COMPONENTS_RG isn't used + * as the texture's components. + * @param components + */ + set_components(components: TextureComponents): void; + /** + * Affects the internal storage format for this texture by specifying + * whether red, green and blue color components should be stored as + * pre-multiplied alpha values. + * + * This api affects how data is uploaded to the GPU since Cogl will + * convert source data to have premultiplied or unpremultiplied + * components according to this state. + * + * For example if you create a texture via + * {@link Cogl.Texture.2d_new_with_size} and then upload data via + * cogl_texture_set_data() passing a source format of + * %COGL_PIXEL_FORMAT_RGBA_8888 then Cogl will internally multiply the + * red, green and blue components of the source data by the alpha + * component, for each pixel so that the internally stored data has + * pre-multiplied alpha components. If you instead upload data that + * already has pre-multiplied components by passing + * %COGL_PIXEL_FORMAT_RGBA_8888_PRE as the source format to + * cogl_texture_set_data() then the data can be uploaded without being + * converted. + * + * By default the #premultipled state is #TRUE. + * @param premultiplied Whether any internally stored red, green or blue + * components are pre-multiplied by an alpha + * component. + */ + set_premultiplied(premultiplied: Bool): void; + /** + * Sets the pixels in a rectangular subregion of #texture from an in-memory + * buffer containing pixel data. + * + * The region set can't be larger than the source #data + * @param src_x upper left coordinate to use from source data. + * @param src_y upper left coordinate to use from source data. + * @param dst_x upper left destination horizontal coordinate. + * @param dst_y upper left destination vertical coordinate. + * @param dst_width width of destination region to write. (Must be less + * than or equal to #width) + * @param dst_height height of destination region to write. (Must be less + * than or equal to #height) + * @param width width of source data buffer. + * @param height height of source data buffer. + * @param format the {@link PixelFormat} used in the source buffer. + * @param rowstride rowstride of source buffer (computed from width if none + * specified) + * @param data the actual pixel data. + * @returns %TRUE if the subregion upload was successful, and + * %FALSE otherwise + */ + set_region(src_x: number, src_y: number, dst_x: number, dst_y: number, dst_width: number, dst_height: number, width: number, height: number, format: PixelFormat, rowstride: number, data: number): Bool; + } + + type TextureInitOptionsMixin = {}; + export interface TextureInitOptions extends TextureInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Texture} instead. + */ + type TextureMixin = ITexture; + + interface Texture extends TextureMixin {} + + class Texture { + public constructor(options?: Partial); + /** + * @deprecated + * Use {@link Cogl.object_ref} instead + * + * Increment the reference count for a cogl texture. + * @param texture a {@link Texture}. + * @returns the #texture pointer. + */ + public static ref(texture: any | null): any | null; + /** + * @deprecated + * Use {@link Cogl.object_unref} instead + * + * Decrement the reference count for a cogl texture. + * @param texture a {@link Texture}. + */ + public static unref(texture: any | null): void; + } + + + + /** + * Data types for the components of a vertex attribute. + */ + enum AttributeType { + /** + * Data is the same size of a byte + */ + BYTE = 5120, + /** + * Data is the same size of an + * unsigned byte + */ + UNSIGNED_BYTE = 5121, + /** + * Data is the same size of a short integer + */ + SHORT = 5122, + /** + * Data is the same size of + * an unsigned short integer + */ + UNSIGNED_SHORT = 5123, + /** + * Data is the same size of a float + */ + FLOAT = 5126 + } + + /** + * Error codes that can be thrown when performing bitmap + * operations. Note that {@link GdkPixbuf.new_from_file} can also throw + * errors directly from the underlying image loading library. For + * example, if GdkPixbuf is used then errors #GdkPixbufErrors + * will be used directly. + */ + enum BitmapError { + /** + * Generic failure code, something went + * wrong. + */ + FAILED = 0, + /** + * Unknown image type. + */ + UNKNOWN_TYPE = 1, + /** + * An image file was broken somehow. + */ + CORRUPT_IMAGE = 2 + } + + /** + * Error enumeration for the blend strings parser + */ + enum BlendStringError { + /** + * Generic parse error + */ + PARSE_ERROR = 0, + /** + * Argument parse error + */ + ARGUMENT_PARSE_ERROR = 1, + /** + * Internal parser error + */ + INVALID_ERROR = 2, + /** + * Blend string not + * supported by the GPU + */ + GPU_UNSUPPORTED_ERROR = 3 + } + + /** + * When using depth testing one of these functions is used to compare + * the depth of an incoming fragment against the depth value currently + * stored in the depth buffer. The function is changed using + * {@link Cogl.depth_state_set_test_function}. + * + * The test is only done when depth testing is explicitly enabled. (See + * cogl_depth_state_set_test_enabled()) + */ + enum DepthTestFunction { + /** + * Never passes. + */ + NEVER = 512, + /** + * Passes if the fragment's depth + * value is less than the value currently in the depth buffer. + */ + LESS = 513, + /** + * Passes if the fragment's depth + * value is equal to the value currently in the depth buffer. + */ + EQUAL = 514, + /** + * Passes if the fragment's depth + * value is less or equal to the value currently in the depth buffer. + */ + LEQUAL = 515, + /** + * Passes if the fragment's depth + * value is greater than the value currently in the depth buffer. + */ + GREATER = 516, + /** + * Passes if the fragment's depth + * value is not equal to the value currently in the depth buffer. + */ + NOTEQUAL = 517, + /** + * Passes if the fragment's depth + * value greater than or equal to the value currently in the depth buffer. + */ + GEQUAL = 518, + /** + * Always passes. + */ + ALWAYS = 519 + } + + /** + * Return values for the {@link XlibFilterFunc} and #CoglWin32FilterFunc functions. + */ + enum FilterReturn { + /** + * The event was not handled, continues the + * processing + */ + CONTINUE = 0, + /** + * Remove the event, stops the processing + */ + REMOVE = 1 + } + + /** + * The fog mode determines the equation used to calculate the fogging blend + * factor while fogging is enabled. The simplest %COGL_FOG_MODE_LINEAR mode + * determines f as: + * + * |[ + * f = end - eye_distance / end - start + * ]| + * + * Where eye_distance is the distance of the current fragment in eye + * coordinates from the origin. + */ + enum FogMode { + /** + * Calculates the fog blend factor as: + * |[ + * f = end - eye_distance / end - start + * ]| + */ + LINEAR = 0, + /** + * Calculates the fog blend factor as: + * |[ + * f = e ^ -(density * eye_distance) + * ]| + */ + EXPONENTIAL = 1, + /** + * Calculates the fog blend factor as: + * |[ + * f = e ^ -(density * eye_distance)^2 + * ]| + */ + EXPONENTIAL_SQUARED = 2 + } + + /** + * You should aim to use the smallest data type that gives you enough + * range, since it reduces the size of your index array and can help + * reduce the demand on memory bandwidth. + * + * Note that %COGL_INDICES_TYPE_UNSIGNED_INT is only supported if the + * %COGL_FEATURE_ID_UNSIGNED_INT_INDICES feature is available. This + * should always be available on OpenGL but on OpenGL ES it will only + * be available if the GL_OES_element_index_uint extension is + * advertized. + */ + enum IndicesType { + /** + * Your indices are unsigned bytes + */ + BYTE = 0, + /** + * Your indices are unsigned shorts + */ + SHORT = 1, + /** + * Your indices are unsigned ints + */ + INT = 2 + } + + /** + * Alpha testing happens before blending primitives with the framebuffer and + * gives an opportunity to discard fragments based on a comparison with the + * incoming alpha value and a reference alpha value. The {@link MaterialAlphaFunc} + * determines how the comparison is done. + */ + enum MaterialAlphaFunc { + /** + * Never let the fragment through. + */ + NEVER = 512, + /** + * Let the fragment through if the incoming + * alpha value is less than the reference alpha value + */ + LESS = 513, + /** + * Let the fragment through if the incoming + * alpha value equals the reference alpha value + */ + EQUAL = 514, + /** + * Let the fragment through if the incoming + * alpha value is less than or equal to the reference alpha value + */ + LEQUAL = 515, + /** + * Let the fragment through if the incoming + * alpha value is greater than the reference alpha value + */ + GREATER = 516, + /** + * Let the fragment through if the incoming + * alpha value does not equal the reference alpha value + */ + NOTEQUAL = 517, + /** + * Let the fragment through if the incoming + * alpha value is greater than or equal to the reference alpha value. + */ + GEQUAL = 518, + /** + * Always let the fragment through. + */ + ALWAYS = 519 + } + + /** + * Texture filtering is used whenever the current pixel maps either to more + * than one texture element (texel) or less than one. These filter enums + * correspond to different strategies used to come up with a pixel color, by + * possibly referring to multiple neighbouring texels and taking a weighted + * average or simply using the nearest texel. + */ + enum MaterialFilter { + /** + * Measuring in manhatten distance from the, + * current pixel center, use the nearest texture texel + */ + NEAREST = 9728, + /** + * Use the weighted average of the 4 texels + * nearest the current pixel center + */ + LINEAR = 9729, + /** + * Select the mimap level whose + * texel size most closely matches the current pixel, and use the + * %COGL_MATERIAL_FILTER_NEAREST criterion + */ + NEAREST_MIPMAP_NEAREST = 9984, + /** + * Select the mimap level whose + * texel size most closely matches the current pixel, and use the + * %COGL_MATERIAL_FILTER_LINEAR criterion + */ + LINEAR_MIPMAP_NEAREST = 9985, + /** + * Select the two mimap levels + * whose texel size most closely matches the current pixel, use + * the %COGL_MATERIAL_FILTER_NEAREST criterion on each one and take + * their weighted average + */ + NEAREST_MIPMAP_LINEAR = 9986, + /** + * Select the two mimap levels + * whose texel size most closely matches the current pixel, use + * the %COGL_MATERIAL_FILTER_LINEAR criterion on each one and take + * their weighted average + */ + LINEAR_MIPMAP_LINEAR = 9987 + } + + /** + * Available types of layers for a {@link Material}. This enumeration + * might be expanded in later versions. + */ + enum MaterialLayerType { + /** + * The layer represents a + * texture + */ + TEXTURE = 0 + } + + /** + * The wrap mode specifies what happens when texture coordinates + * outside the range 0→1 are used. Note that if the filter mode is + * anything but %COGL_MATERIAL_FILTER_NEAREST then texels outside the + * range 0→1 might be used even when the coordinate is exactly 0 or 1 + * because OpenGL will try to sample neighbouring pixels. For example + * if you are trying to render the full texture then you may get + * artifacts around the edges when the pixels from the other side are + * merged in if the wrap mode is set to repeat. + */ + enum MaterialWrapMode { + /** + * The texture will be repeated. This + * is useful for example to draw a tiled background. + */ + REPEAT = 10497, + /** + * The coordinates outside the + * range 0→1 will sample copies of the edge pixels of the + * texture. This is useful to avoid artifacts if only one copy of + * the texture is being rendered. + */ + CLAMP_TO_EDGE = 33071, + /** + * Cogl will try to automatically + * decide which of the above two to use. For cogl_rectangle(), it + * will use repeat mode if any of the texture coordinates are + * outside the range 0→1, otherwise it will use clamp to edge. For + * cogl_polygon() it will always use repeat mode. For + * cogl_vertex_buffer_draw() it will use repeat mode except for + * layers that have point sprite coordinate generation enabled. This + * is the default value. + */ + AUTOMATIC = 519 + } + + /** + * Pixel formats used by Cogl. For the formats with a byte per + * component, the order of the components specify the order in + * increasing memory addresses. So for example + * %COGL_PIXEL_FORMAT_RGB_888 would have the red component in the + * lowest address, green in the next address and blue after that + * regardless of the endianness of the system. + * + * For the formats with non byte aligned components the component + * order specifies the order within a 16-bit or 32-bit number from + * most significant bit to least significant. So for + * %COGL_PIXEL_FORMAT_RGB_565, the red component would be in bits + * 11-15, the green component would be in 6-11 and the blue component + * would be in 1-5. Therefore the order in memory depends on the + * endianness of the system. + * + * When uploading a texture %COGL_PIXEL_FORMAT_ANY can be used as the + * internal format. Cogl will try to pick the best format to use + * internally and convert the texture data if necessary. + */ + enum PixelFormat { + /** + * Any format + */ + ANY = 0, + /** + * 8 bits alpha mask + */ + A_8 = 17, + /** + * RGB, 16 bits + */ + RGB_565 = 4, + /** + * RGBA, 16 bits + */ + RGBA_4444 = 21, + /** + * RGBA, 16 bits + */ + RGBA_5551 = 22, + /** + * Not currently supported + */ + YUV = 7, + /** + * Single luminance component + */ + G_8 = 8, + /** + * RG, 16 bits. Note that red-green textures + * are only available if %COGL_FEATURE_ID_TEXTURE_RG is advertised. + * See {@link Cogl.Texture.set_components} for details. + */ + RG_88 = 9, + /** + * RGB, 24 bits + */ + RGB_888 = 2, + /** + * BGR, 24 bits + */ + BGR_888 = 34, + /** + * RGBA, 32 bits + */ + RGBA_8888 = 19, + /** + * BGRA, 32 bits + */ + BGRA_8888 = 51, + /** + * ARGB, 32 bits + */ + ARGB_8888 = 83, + /** + * ABGR, 32 bits + */ + ABGR_8888 = 115, + /** + * RGBA, 32 bits, 10 bpc + */ + RGBA_1010102 = 29, + /** + * BGRA, 32 bits, 10 bpc + */ + BGRA_1010102 = 61, + /** + * ARGB, 32 bits, 10 bpc + */ + ARGB_2101010 = 93, + /** + * ABGR, 32 bits, 10 bpc + */ + ABGR_2101010 = 125, + /** + * Premultiplied RGBA, 32 bits + */ + RGBA_8888_PRE = 147, + /** + * Premultiplied BGRA, 32 bits + */ + BGRA_8888_PRE = 179, + /** + * Premultiplied ARGB, 32 bits + */ + ARGB_8888_PRE = 211, + /** + * Premultiplied ABGR, 32 bits + */ + ABGR_8888_PRE = 243, + /** + * Premultiplied RGBA, 16 bits + */ + RGBA_4444_PRE = 149, + /** + * Premultiplied RGBA, 16 bits + */ + RGBA_5551_PRE = 150, + /** + * Premultiplied RGBA, 32 bits, 10 bpc + */ + RGBA_1010102_PRE = 157, + /** + * Premultiplied BGRA, 32 bits, 10 bpc + */ + BGRA_1010102_PRE = 189, + /** + * Premultiplied ARGB, 32 bits, 10 bpc + */ + ARGB_2101010_PRE = 221, + /** + * Premultiplied ABGR, 32 bits, 10 bpc + */ + ABGR_2101010_PRE = 253, + DEPTH_16 = 265, + DEPTH_32 = 259, + DEPTH_24_STENCIL_8 = 771 + } + + enum RendererError { + XLIB_DISPLAY_OPEN = 0, + BAD_CONSTRAINT = 1 + } + + /** + * Types of shaders + */ + enum ShaderType { + /** + * A program for proccessing vertices + */ + VERTEX = 0, + /** + * A program for processing fragments + */ + FRAGMENT = 1 + } + + /** + * Represents how draw should affect the two buffers + * of a stereo framebuffer. See {@link Cogl.framebuffer_set_stereo_mode}. + */ + enum StereoMode { + /** + * draw to both stereo buffers + */ + BOTH = 0, + /** + * draw only to the left stereo buffer + */ + LEFT = 1, + /** + * draw only to the left stereo buffer + */ + RIGHT = 2 + } + + /** + * Error enumeration for Cogl + * + * The #COGL_SYSTEM_ERROR_UNSUPPORTED error can be thrown for a + * variety of reasons. For example: + * + * + * You've tried to use a feature that is not + * advertised by {@link Cogl.has_feature}. This could happen if you create + * a 2d texture with a non-power-of-two size when + * %COGL_FEATURE_ID_TEXTURE_NPOT is not advertised. + * The GPU can not handle the configuration you have + * requested. An example might be if you try to use too many texture + * layers in a single {@link Pipeline} + * The driver does not support some + * configuration. + * + * + * Currently this is only used by Cogl API marked as experimental so + * this enum should also be considered experimental. + */ + enum SystemError { + /** + * You tried to use a feature or + * configuration not currently available. + */ + COGL_SYSTEM_ERROR_UNSUPPORTED = 0, + /** + * You tried to allocate a resource + * such as a texture and there wasn't enough memory. + */ + COGL_SYSTEM_ERROR_NO_MEMORY = 1 + } + + /** + * See {@link Cogl.Texture.set_components}. + */ + enum TextureComponents { + /** + * Only the alpha component + */ + A = 1, + /** + * Red and green components. Note that + * this can only be used if the %COGL_FEATURE_ID_TEXTURE_RG feature + * is advertised. + */ + RG = 2, + /** + * Red, green and blue components + */ + RGB = 3, + /** + * Red, green, blue and alpha components + */ + RGBA = 4, + /** + * Only a depth component + */ + DEPTH = 5 + } + + /** + * Error codes that can be thrown when allocating textures. + */ + enum TextureError { + /** + * Unsupported size + */ + SIZE = 0, + /** + * Unsupported format + */ + FORMAT = 1, + BAD_PARAMETER = 2, + /** + * A primitive texture type that is + * unsupported by the driver was used + */ + TYPE = 3 + } + + /** + * Constants representing the underlying hardware texture type of a + * {@link Texture}. + */ + enum TextureType { + /** + * A {@link Texture2D} + */ + _2D = 0, + /** + * A {@link Texture3D} + */ + _3D = 1, + /** + * A {@link TextureRectangle} + */ + RECTANGLE = 2 + } + + /** + * Different ways of interpreting vertices when drawing. + */ + enum VerticesMode { + /** + * FIXME, equivalent to + * GL_POINTS + */ + POINTS = 0, + /** + * FIXME, equivalent to GL_LINES + */ + LINES = 1, + /** + * FIXME, equivalent to + * GL_LINE_LOOP + */ + LINE_LOOP = 2, + /** + * FIXME, equivalent to + * GL_LINE_STRIP + */ + LINE_STRIP = 3, + /** + * FIXME, equivalent to + * GL_TRIANGLES + */ + TRIANGLES = 4, + /** + * FIXME, equivalent to + * GL_TRIANGLE_STRIP + */ + TRIANGLE_STRIP = 5, + /** + * FIXME, equivalent to GL_TRIANGLE_FAN + */ + TRIANGLE_FAN = 6 + } + + /** + * Enum used to represent the two directions of rotation. This can be + * used to set the front face for culling by calling + * {@link Cogl.pipeline_set_front_face_winding}. + */ + enum Winding { + /** + * Vertices are in a clockwise order + */ + CLOCKWISE = 0, + /** + * Vertices are in a counter-clockwise order + */ + COUNTER_CLOCKWISE = 1 + } + + enum WinsysFeature { + MULTIPLE_ONSCREEN = 0, + SWAP_THROTTLE = 1, + VBLANK_COUNTER = 2, + VBLANK_WAIT = 3, + TEXTURE_FROM_PIXMAP = 4, + SWAP_BUFFERS_EVENT = 5, + SWAP_REGION = 6, + SWAP_REGION_THROTTLE = 7, + SWAP_REGION_SYNCHRONIZED = 8, + BUFFER_AGE = 9, + SYNC_AND_COMPLETE_EVENT = 10, + N_FEATURES = 11 + } + + /** + * Types of auxiliary buffers + */ + enum BufferBit { + /** + * Selects the primary color buffer + */ + COLOR = 1, + /** + * Selects the depth buffer + */ + DEPTH = 2, + /** + * Selects the stencil buffer + */ + STENCIL = 4 + } + + /** + * Target flags for FBOs. + */ + enum BufferTarget { + /** + * FIXME + */ + WINDOW_BUFFER = 2, + /** + * FIXME + */ + OFFSCREEN_BUFFER = 4 + } + + /** + * Defines a bit mask of color channels. This can be used with + * {@link Cogl.pipeline_set_color_mask} for example to define which color + * channels should be written to the current framebuffer when + * drawing something. + */ + enum ColorMask { + /** + * None of the color channels are masked + */ + NONE = 0, + /** + * Masks the red color channel + */ + RED = 1, + /** + * Masks the green color channel + */ + GREEN = 2, + /** + * Masks the blue color channel + */ + BLUE = 4, + /** + * Masks the alpha color channel + */ + ALPHA = 8, + /** + * All of the color channels are masked + */ + ALL = 15 + } + + /** + * Flags for the supported features. + */ + enum FeatureFlags { + /** + * ARB_texture_rectangle support + */ + TEXTURE_RECTANGLE = 2, + /** + * Non power of two textures are supported + * by the hardware. This is a equivalent to the + * %COGL_FEATURE_TEXTURE_NPOT_BASIC, %COGL_FEATURE_TEXTURE_NPOT_MIPMAP + * and %COGL_FEATURE_TEXTURE_NPOT_REPEAT features combined. + */ + TEXTURE_NPOT = 4, + /** + * ycbcr conversion support + */ + TEXTURE_YUV = 8, + /** + * glReadPixels() support + */ + TEXTURE_READ_PIXELS = 16, + /** + * GLSL support + */ + SHADERS_GLSL = 32, + /** + * FBO support + */ + OFFSCREEN = 64, + /** + * Multisample support on FBOs + */ + OFFSCREEN_MULTISAMPLE = 128, + /** + * Blit support on FBOs + */ + OFFSCREEN_BLIT = 256, + /** + * At least 4 clip planes available + */ + FOUR_CLIP_PLANES = 512, + /** + * Stencil buffer support + */ + STENCIL_BUFFER = 1024, + /** + * VBO support + */ + VBOS = 2048, + /** + * PBO support + */ + PBOS = 4096, + /** + * Set if + * %COGL_INDICES_TYPE_UNSIGNED_INT is supported in + * {@link Cogl.vertex.buffer_indices_new}. + */ + UNSIGNED_INT_INDICES = 8192, + /** + * {@link Cogl.Material.set_depth_range} support + */ + DEPTH_RANGE = 16384, + /** + * The hardware supports non power + * of two textures, but you also need to check the + * %COGL_FEATURE_TEXTURE_NPOT_MIPMAP and %COGL_FEATURE_TEXTURE_NPOT_REPEAT + * features to know if the hardware supports npot texture mipmaps + * or repeat modes other than + * %COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE respectively. + */ + TEXTURE_NPOT_BASIC = 32768, + /** + * Mipmapping is supported in + * conjuntion with non power of two textures. + */ + TEXTURE_NPOT_MIPMAP = 65536, + /** + * Repeat modes other than + * %COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE are supported by the + * hardware. + */ + TEXTURE_NPOT_REPEAT = 131072, + /** + * Whether + * {@link Cogl.Material.set_layer_point_sprite_coords_enabled} is supported. + */ + POINT_SPRITE = 262144, + /** + * 3D texture support + */ + TEXTURE_3D = 524288, + /** + * ARBFP support + */ + SHADERS_ARBFP = 1048576, + /** + * Whether {@link Cogl.buffer_map} is + * supported with CoglBufferAccess including read support. + */ + MAP_BUFFER_FOR_READ = 2097152, + /** + * Whether {@link Cogl.buffer_map} is + * supported with CoglBufferAccess including write support. + */ + MAP_BUFFER_FOR_WRITE = 4194304, + ONSCREEN_MULTIPLE = 8388608, + /** + * Whether {@link Framebuffer} support rendering the + * depth buffer to a texture. + */ + DEPTH_TEXTURE = 16777216 + } + + /** + * Flags for {@link Cogl.framebuffer_read_pixels_into_bitmap} + */ + enum ReadPixelsFlags { + /** + * Read from the color buffer + */ + COLOR_BUFFER = 1 + } + + /** + * Flags to pass to the cogl_texture_new_* family of functions. + */ + enum TextureFlags { + /** + * No flags specified + */ + NONE = 0, + /** + * Disables the automatic generation of + * the mipmap pyramid from the base level image whenever it is + * updated. The mipmaps are only generated when the texture is + * rendered with a mipmap filter so it should be free to leave out + * this flag when using other filtering modes + */ + NO_AUTO_MIPMAP = 1, + /** + * Disables the slicing of the texture + */ + NO_SLICING = 2, + /** + * Disables the insertion of the texture inside + * the texture atlas used by Cogl + */ + NO_ATLAS = 4 + } + + /** + * The type used by cogl for function pointers, note that this type + * is used as a generic catch-all cast for function pointers and the + * actual arguments and return type may be different. + */ + interface FuncPtr { + /** + * The type used by cogl for function pointers, note that this type + * is used as a generic catch-all cast for function pointers and the + * actual arguments and return type may be different. + */ + (): void; + } + + interface XlibFilterFunc { + (event: any, data: any | null): FilterReturn; + } + + /** + * Integer representation of an angle such that 1024 corresponds to + * full circle (i.e., 2 * pi). + */ + type Angle = number; + + /** + * A boolean data type used throughout the Cogl C api. This should be + * used in conjunction with the %TRUE and %FALSE macro defines for + * setting and testing boolean values. + */ + type Bool = number; + + /** + * Type used for storing references to cogl objects, the CoglHandle is + * a fully opaque type without any public data members. + */ + type Handle = any; + + /** + * Computes the cosine of #angle + * @param angle an angle expressed using {@link Angle} + * @returns the cosine of the passed angle + */ + function angle_cos(angle: Angle): Fixed; + + /** + * Computes the sine of #angle + * @param angle an angle expressed using {@link Angle} + * @returns the sine of the passed angle + */ + function angle_sin(angle: Angle): Fixed; + + /** + * Computes the tangent of #angle + * @param angle an angle expressed using {@link Angle} + * @returns the tangent of the passed angle + */ + function angle_tan(angle: Angle): Fixed; + + /** + * We do not advise nor reliably support the interleaving of raw GL drawing and + * Cogl drawing functions, but if you insist, {@link Cogl.begin.gl} and cogl_end_gl() + * provide a simple mechanism that may at least give you a fighting chance of + * succeeding. + * + * Note: this doesn't help you modify the behaviour of Cogl drawing functions + * through the modification of GL state; that will never be reliably supported, + * but if you are trying to do something like: + * + * |[ + * { + * - setup some OpenGL state. + * - draw using OpenGL (e.g. glDrawArrays() ) + * - reset modified OpenGL state. + * - continue using Cogl to draw + * } + * ]| + * + * You should surround blocks of drawing using raw GL with cogl_begin_gl() + * and cogl_end_gl(): + * + * |[ + * { + * cogl_begin_gl (); + * - setup some OpenGL state. + * - draw using OpenGL (e.g. glDrawArrays() ) + * - reset modified OpenGL state. + * cogl_end_gl (); + * - continue using Cogl to draw + * } + * ]| + * + * Don't ever try and do: + * + * |[ + * { + * - setup some OpenGL state. + * - use Cogl to draw + * - reset modified OpenGL state. + * } + * ]| + * + * When the internals of Cogl evolves, this is very liable to break. + * + * This function will flush all batched primitives, and subsequently flush + * all internal Cogl state to OpenGL as if it were going to draw something + * itself. + * + * The result is that the OpenGL modelview matrix will be setup; the state + * corresponding to the current source material will be set up and other world + * state such as backface culling, depth and fogging enabledness will be sent + * to OpenGL. + * + * No special material state is flushed, so if you want Cogl to setup a + * simplified material state it is your responsibility to set a simple source + * material before calling cogl_begin_gl(). E.g. by calling + * cogl_set_source_color4ub(). + * + * It is your responsibility to restore any OpenGL state that you modify + * to how it was after calling cogl_begin_gl() if you don't do this then the + * result of further Cogl calls is undefined. + * + * You can not nest begin/end blocks. + * + * Again we would like to stress, we do not advise the use of this API and if + * possible we would prefer to improve Cogl than have developers require raw + * OpenGL. + */ + function begin_gl(): void; + + function bitmap_error_quark(): number; + + function blend_string_error_quark(): number; + + /** + * Check whether #name occurs in list of extensions in #ext. + * @param name extension to check for + * @param ext list of extensions + * @returns %TRUE if the extension occurs in the list, %FALSE otherwise. + */ + function check_extension(name: string, ext: string): Bool; + + /** + * Clears all the auxiliary buffers identified in the #buffers mask, and if + * that includes the color buffer then the specified #color is used. + * @param color Background color to clear to + * @param buffers A mask of {@link BufferBit}'s identifying which auxiliary + * buffers to clear + */ + function clear(color: Color, buffers: number): void; + + /** + * Ensures that the current clipping region has been set in GL. This + * will automatically be called before any Cogl primitives but it + * maybe be neccessary to call if you are using raw GL calls with + * clipping. + */ + function clip_ensure(): void; + + /** + * Reverts the clipping region to the state before the last call to + * {@link Cogl.clip.push}. + */ + function clip_pop(): void; + + /** + * Specifies a rectangular clipping area for all subsequent drawing + * operations. Any drawing commands that extend outside the rectangle + * will be clipped so that only the portion inside the rectangle will + * be displayed. The rectangle dimensions are transformed by the + * current model-view matrix. + * + * The rectangle is intersected with the current clip region. To undo + * the effect of this function, call {@link Cogl.clip.pop}. + * @param x_offset left edge of the clip rectangle + * @param y_offset top edge of the clip rectangle + * @param width width of the clip rectangle + * @param height height of the clip rectangle + */ + function clip_push(x_offset: number, y_offset: number, width: number, height: number): void; + + /** + * Sets a new clipping area using a 2D shaped described with a + * {@link Primitive}. The shape must not contain self overlapping + * geometry and must lie on a single 2D plane. A bounding box of the + * 2D shape in local coordinates (the same coordinates used to + * describe the shape) must be given. It is acceptable for the bounds + * to be larger than the true bounds but behaviour is undefined if the + * bounds are smaller than the true bounds. + * + * The primitive is transformed by the current model-view matrix and + * the silhouette is intersected with the previous clipping area. To + * restore the previous clipping area, call + * {@link Cogl.clip.pop}. + * @param primitive A {@link Primitive} describing a flat 2D shape + * @param bounds_x1 x coordinate for the top-left corner of the primitives + * bounds + * @param bounds_y1 y coordinate for the top-left corner of the primitives + * bounds + * @param bounds_x2 x coordinate for the bottom-right corner of the primitives + * bounds + * @param bounds_y2 y coordinate for the bottom-right corner of the + * primitives bounds. + */ + function clip_push_primitive(primitive: any, bounds_x1: number, bounds_y1: number, bounds_x2: number, bounds_y2: number): void; + + /** + * Specifies a rectangular clipping area for all subsequent drawing + * operations. Any drawing commands that extend outside the rectangle + * will be clipped so that only the portion inside the rectangle will + * be displayed. The rectangle dimensions are transformed by the + * current model-view matrix. + * + * The rectangle is intersected with the current clip region. To undo + * the effect of this function, call {@link Cogl.clip.pop}. + * @param x0 x coordinate for top left corner of the clip rectangle + * @param y0 y coordinate for top left corner of the clip rectangle + * @param x1 x coordinate for bottom right corner of the clip rectangle + * @param y1 y coordinate for bottom right corner of the clip rectangle + */ + function clip_push_rectangle(x0: number, y0: number, x1: number, y1: number): void; + + /** + * Specifies a rectangular clipping area for all subsequent drawing + * operations. Any drawing commands that extend outside the rectangle + * will be clipped so that only the portion inside the rectangle will + * be displayed. The rectangle dimensions are not transformed by the + * current model-view matrix. + * + * The rectangle is intersected with the current clip region. To undo + * the effect of this function, call {@link Cogl.clip.pop}. + * @param x_offset left edge of the clip rectangle in window coordinates + * @param y_offset top edge of the clip rectangle in window coordinates + * @param width width of the clip rectangle + * @param height height of the clip rectangle + */ + function clip_push_window_rect(x_offset: number, y_offset: number, width: number, height: number): void; + + /** + * Specifies a rectangular clipping area for all subsequent drawing + * operations. Any drawing commands that extend outside the rectangle + * will be clipped so that only the portion inside the rectangle will + * be displayed. The rectangle dimensions are not transformed by the + * current model-view matrix. + * + * The rectangle is intersected with the current clip region. To undo + * the effect of this function, call {@link Cogl.clip.pop}. + * @param x_offset left edge of the clip rectangle in window coordinates + * @param y_offset top edge of the clip rectangle in window coordinates + * @param width width of the clip rectangle + * @param height height of the clip rectangle + */ + function clip_push_window_rectangle(x_offset: number, y_offset: number, width: number, height: number): void; + + /** + * Restore the state of the clipping stack that was previously saved + * by {@link Cogl.clip.stack_save}. + */ + function clip_stack_restore(): void; + + /** + * Save the entire state of the clipping stack and then clear all + * clipping. The previous state can be returned to with + * {@link Cogl.clip.stack_restore}. Each call to cogl_clip_push() after this + * must be matched by a call to cogl_clip_pop() before calling + * cogl_clip_stack_restore(). + */ + function clip_stack_save(): void; + + function clutter_check_extension_CLUTTER(name: string, ext: string): Bool; + + function clutter_winsys_has_feature_CLUTTER(feature: WinsysFeature): Bool; + + function clutter_winsys_xlib_get_visual_info_CLUTTER(): any; + + /** + * Compares two {@link Color}s and checks if they are the same. + * + * This function can be passed to {@link G.hash_table_new} as the #key_equal_func + * parameter, when using #CoglColors as keys in a #GHashTable. + * @param v1 a {@link Color} + * @param v2 a {@link Color} + * @returns %TRUE if the two colors are the same. + */ + function color_equal(v1: any | null, v2: any | null): Bool; + + /** + * Converts a color expressed in HLS (hue, luminance and saturation) + * values into a {@link Color}. + * @param hue hue value, in the 0 .. 360 range + * @param saturation saturation value, in the 0 .. 1 range + * @param luminance luminance value, in the 0 .. 1 range + * @returns return location for a {@link Color} + */ + function color_init_from_hsl(hue: number, saturation: number, luminance: number): Color; + + /** + * Create a new cogl program object that can be used to replace parts of the GL + * rendering pipeline with custom code. + * @returns a new cogl program. + */ + function create_program(): Handle; + + /** + * Create a new shader handle, use {@link Cogl.shader.source} to set the + * source code to be used on it. + * @param shader_type COGL_SHADER_TYPE_VERTEX or COGL_SHADER_TYPE_FRAGMENT. + * @returns a new shader handle. + */ + function create_shader(shader_type: ShaderType): Handle; + + /** + * Prints the contents of a {@link Matrix} to stdout. + * @param matrix A {@link Matrix} + */ + function debug_matrix_print(matrix: Matrix): void; + + /** + * This function disables fogging, so primitives drawn afterwards will not be + * blended with any previously set fog color. + */ + function disable_fog(): void; + + function double_to_fixed(value: number): Fixed; + + function double_to_int(value: number): number; + + function double_to_uint(value: number): number; + + /** + * This is the counterpart to {@link Cogl.begin.gl} used to delimit blocks of drawing + * code using raw OpenGL. Please refer to cogl_begin_gl() for full details. + */ + function end_gl(): void; + + /** + * Checks whether the given COGL features are available. Multiple + * features can be checked for by or-ing them together with the '|' + * operator. %TRUE is only returned if all of the requested features + * are available. + * @param features A bitmask of features to check for + * @returns %TRUE if the features are available, %FALSE otherwise. + */ + function features_available(features: FeatureFlags): Bool; + + /** + * This function should only need to be called in exceptional circumstances. + * + * As an optimization Cogl drawing functions may batch up primitives + * internally, so if you are trying to use raw GL outside of Cogl you stand a + * better chance of being successful if you ask Cogl to flush any batched + * geometry before making your state changes. + * + * It only ensure that the underlying driver is issued all the commands + * necessary to draw the batched primitives. It provides no guarantees about + * when the driver will complete the rendering. + * + * This provides no guarantees about the GL state upon returning and to avoid + * confusing Cogl you should aim to restore any changes you make before + * resuming use of Cogl. + * + * If you are making state changes with the intention of affecting Cogl drawing + * primitives you are 100% on your own since you stand a good chance of + * conflicting with Cogl internals. For example clutter-gst which currently + * uses direct GL calls to bind ARBfp programs will very likely break when Cogl + * starts to use ARBfb programs itself for the material API. + */ + function flush(): void; + + /** + * Queries the common {@link PixelFormat} of all color buffers attached + * to this framebuffer. For an offscreen framebuffer created with + * {@link Cogl.Offscreen.new_with_texture} this will correspond to the format + * of the texture. + * + * This API is deprecated because it is missleading to report a + * #CoglPixelFormat for the internal format of the #framebuffer since + * #CoglPixelFormat is such a precise format description and it's + * only the set of components and the premultiplied alpha status + * that is really known. + * @param framebuffer A {@link Framebuffer} framebuffer + * @returns + */ + function framebuffer_get_color_format(framebuffer: any): PixelFormat; + + /** + * Replaces the current projection matrix with a perspective matrix + * for a given viewing frustum defined by 4 side clip planes that + * all cross through the origin and 2 near and far clip planes. + * @param left X position of the left clipping plane where it + * intersects the near clipping plane + * @param right X position of the right clipping plane where it + * intersects the near clipping plane + * @param bottom Y position of the bottom clipping plane where it + * intersects the near clipping plane + * @param top Y position of the top clipping plane where it intersects + * the near clipping plane + * @param z_near The distance to the near clipping plane (Must be positive) + * @param z_far The distance to the far clipping plane (Must be positive) + */ + function frustum(left: number, right: number, bottom: number, top: number, z_near: number, z_far: number): void; + + /** + * Queries if backface culling has been enabled via + * {@link Cogl.set.backface_culling_enabled} + * @returns %TRUE if backface culling is enabled, and %FALSE otherwise + */ + function get_backface_culling_enabled(): Bool; + + /** + * Gets the number of bitplanes used for each of the color components + * in the color buffer. Pass %NULL for any of the arguments if the + * value is not required. + * @returns Return location for the number of red bits or %NULL + * + * Return location for the number of green bits or %NULL + * + * Return location for the number of blue bits or %NULL + * + * Return location for the number of alpha bits or %NULL + */ + function get_bitmasks(): [ red: number, green: number, blue: number, alpha: number ]; + + /** + * Queries if depth testing has been enabled via {@link Cogl.set_depth_test_enable} + * @returns %TRUE if depth testing is enabled, and %FALSE otherwise + */ + function get_depth_test_enabled(): Bool; + + /** + * Returns all of the features supported by COGL. + * @returns A logical OR of all the supported COGL features. + */ + function get_features(): FeatureFlags; + + /** + * Stores the current model-view matrix in #matrix. + * @returns return location for the model-view matrix + */ + function get_modelview_matrix(): Matrix; + + /** + * Retrieves the #GOptionGroup used by Cogl to parse the command + * line options. Clutter uses this to handle the Cogl command line + * options during its initialization process. + * @returns a #GOptionGroup + */ + function get_option_group(): GLib.OptionGroup; + + /** + * Gets a pointer to a given GL or GL ES extension function. This acts + * as a wrapper around glXGetProcAddress() or whatever is the + * appropriate function for the current backend. + * + * This function should not be used to query core opengl API + * symbols since eglGetProcAddress for example doesn't allow this and + * and may return a junk pointer if you do. + * @param name the name of the function. + * @returns a pointer to the requested function or %NULL if the + * function is not available. + */ + function get_proc_address(name: string): FuncPtr; + + /** + * Stores the current projection matrix in #matrix. + * @returns return location for the projection matrix + */ + function get_projection_matrix(): Matrix; + + /** + * Returns the current source material as previously set using + * {@link Cogl.set.source}. + * + * You should typically consider the returned material immutable + * and not try to change any of its properties unless you own a + * reference to that material. At times you may be able to get a + * reference to an internally managed materials and the result of + * modifying such materials is undefined. + * @returns The current source material. + */ + function get_source(): any | null; + + /** + * Stores the current viewport in #v. #v[0] and #v[1] get the x and y + * position of the viewport and #v[2] and #v[3] get the width and + * height. + * @returns pointer to a 4 element array + * of #floats to receive the viewport dimensions. + */ + function get_viewport(): number[]; + + function gtype_matrix_get_type(): GObject.Type; + + function handle_get_type(): GObject.Type; + + /** + * Increases the reference count of #handle by 1 + * @param handle a {@link Handle} + * @returns the handle, with its reference count increased + */ + function handle_ref(handle: Handle): Handle; + + /** + * Drecreases the reference count of #handle by 1; if the reference + * count reaches 0, the resources allocated by #handle will be freed + * @param handle a {@link Handle} + */ + function handle_unref(handle: Handle): void; + + /** + * Checks whether #object is a {@link Bitmap} + * @param object a {@link Object} pointer + * @returns %TRUE if the passed #object represents a bitmap, + * and %FALSE otherwise + */ + function is_bitmap(object: any | null): Bool; + + /** + * Gets whether the given handle references an existing material object. + * @param handle A CoglHandle + * @returns %TRUE if the handle references a {@link Material}, + * %FALSE otherwise + */ + function is_material(handle: Handle): Bool; + + /** + * Determines whether the given {@link Object} references an offscreen + * framebuffer object. + * @param object A pointer to a {@link Object} + * @returns %TRUE if #object is a {@link Offscreen} framebuffer, + * %FALSE otherwise + */ + function is_offscreen(object: any | null): Bool; + + /** + * Gets whether the given handle references an existing program object. + * @param handle A CoglHandle + * @returns %TRUE if the handle references a program, + * %FALSE otherwise + */ + function is_program(handle: Handle): Bool; + + /** + * Gets whether the given handle references an existing shader object. + * @param handle A CoglHandle + * @returns %TRUE if the handle references a shader, + * %FALSE otherwise + */ + function is_shader(handle: Handle): Bool; + + /** + * Gets whether the given object references a texture object. + * @param object A {@link Object} pointer + * @returns %TRUE if the #object references a texture, and + * %FALSE otherwise + */ + function is_texture(object: any | null): Bool; + + /** + * Checks whether #handle is a Vertex Buffer Object + * @param handle a {@link Handle} for a vertex buffer object + * @returns %TRUE if the handle is a VBO, and %FALSE + * otherwise + */ + function is_vertex_buffer(handle: Handle): Bool; + + /** + * Checks whether #handle is a handle to the indices for a vertex + * buffer object + * @param handle a {@link Handle} + * @returns %TRUE if the handle is indices, and %FALSE + * otherwise + */ + function is_vertex_buffer_indices(handle: Handle): Bool; + + /** + * Increment the reference count for a {@link Material}. + * @param material a {@link Material} object. + * @returns the #material. + */ + function material_ref(material: Handle): Handle; + + /** + * Decrement the reference count for a {@link Material}. + * @param material a {@link Material} object. + */ + function material_unref(material: Handle): void; + + /** + * Compares two matrices to see if they represent the same + * transformation. Although internally the matrices may have different + * annotations associated with them and may potentially have a cached + * inverse matrix these are not considered in the comparison. + * @param v1 A 4x4 transformation matrix + * @param v2 A 4x4 transformation matrix + * @returns + */ + function matrix_equal(v1: any | null, v2: any | null): Bool; + + function onscreen_clutter_backend_set_size_CLUTTER(width: number, height: number): void; + + /** + * Replaces the current projection matrix with an orthographic projection + * matrix. See to see how the matrix is + * calculated. + * + *
+ * + * + *
+ * + * This function copies the arguments from OpenGL's glOrtho() even + * though they are unnecessarily confusing due to the z near and z far + * arguments actually being a "distance" from the origin, where + * negative values are behind the viewer, instead of coordinates for + * the z clipping planes which would have been consistent with the + * left, right bottom and top arguments. + * @param left The coordinate for the left clipping plane + * @param right The coordinate for the right clipping plane + * @param bottom The coordinate for the bottom clipping plane + * @param top The coordinate for the top clipping plane + * @param near The distance to the near clipping + * plane (negative if the plane is behind the viewer) + * @param far The distance for the far clipping + * plane (negative if the plane is behind the viewer) + */ + function ortho(left: number, right: number, bottom: number, top: number, near: number, far: number): void; + + /** + * Replaces the current projection matrix with a perspective matrix + * based on the provided values. + * + * You should be careful not to have to great a #z_far / #z_near + * ratio since that will reduce the effectiveness of depth testing + * since there wont be enough precision to identify the depth of + * objects near to each other. + * @param fovy Vertical field of view angle in degrees. + * @param aspect The (width over height) aspect ratio for display + * @param z_near The distance to the near clipping plane (Must be positive) + * @param z_far The distance to the far clipping plane (Must be positive) + */ + function perspective(fovy: number, aspect: number, z_near: number, z_far: number): void; + + /** + * Draws a convex polygon using the current source material to fill / texture + * with according to the texture coordinates passed. + * + * If #use_color is %TRUE then the color will be changed for each vertex using + * the value specified in the color member of {@link TextureVertex}. This can be + * used for example to make the texture fade out by setting the alpha value of + * the color. + * + * All of the texture coordinates must be in the range [0,1] and repeating the + * texture is not supported. + * + * Because of the way this function is implemented it will currently + * only work if either the texture is not sliced or the backend is not + * OpenGL ES and the minifying and magnifying functions are both set + * to COGL_MATERIAL_FILTER_NEAREST. + * @param vertices An array of {@link TextureVertex} structs + * @param n_vertices The length of the vertices array + * @param use_color %TRUE if the color member of {@link TextureVertex} should be used + */ + function polygon(vertices: TextureVertex, n_vertices: number, use_color: Bool): void; + + /** + * Restore {@link Cogl.set.draw_buffer} state. + */ + function pop_draw_buffer(): void; + + /** + * Restores the framebuffer that was previously at the top of the stack. + * All subsequent drawing will be redirected to this framebuffer. + */ + function pop_framebuffer(): void; + + /** + * Restores the current model-view matrix from the matrix stack. + */ + function pop_matrix(): void; + + /** + * Removes the material at the top of the source stack. The material + * at the top of this stack defines the GPU state used to process + * later primitives as defined by {@link Cogl.set.source}. + */ + function pop_source(): void; + + /** + * Attaches a shader to a program object. A program can have multiple + * vertex or fragment shaders but only one of them may provide a + * main() function. It is allowed to use a program with only a vertex + * shader or only a fragment shader. + * @param program_handle a {@link Handle} for a shdaer program. + * @param shader_handle a {@link Handle} for a vertex of fragment shader. + */ + function program_attach_shader(program_handle: Handle, shader_handle: Handle): void; + + /** + * Retrieve the location (offset) of a uniform variable in a shader program, + * a uniform is a variable that is constant for all vertices/fragments for a + * shader object and is possible to modify as an external parameter. + * @param handle a {@link Handle} for a shader program. + * @param uniform_name the name of a uniform. + * @returns the offset of a uniform in a specified program. + * This uniform can be set using {@link Cogl.program.uniform_1f} when the + * program is in use. + */ + function program_get_uniform_location(handle: Handle, uniform_name: string): number; + + /** + * Links a program making it ready for use. Note that calling this + * function is optional. If it is not called the program will + * automatically be linked the first time it is used. + * @param handle a {@link Handle} for a shader program. + */ + function program_link(handle: Handle): void; + + /** + * Add an extra reference to a program. + * @param handle A {@link Handle} to a program. + * @returns #handle + */ + function program_ref(handle: Handle): Handle; + + /** + * Changes the value of a floating point uniform for the given linked + * #program. + * @param program A {@link Handle} for a linked program + * @param uniform_location the uniform location retrieved from + * {@link Cogl.program.get_uniform_location}. + * @param value the new value of the uniform. + */ + function program_set_uniform_1f(program: Handle, uniform_location: number, value: number): void; + + /** + * Changes the value of an integer uniform for the given linked + * #program. + * @param program A {@link Handle} for a linked program + * @param uniform_location the uniform location retrieved from + * {@link Cogl.program.get_uniform_location}. + * @param value the new value of the uniform. + */ + function program_set_uniform_1i(program: Handle, uniform_location: number, value: number): void; + + /** + * Changes the value of a float vector uniform, or uniform array for + * the given linked #program. + * @param program A {@link Handle} for a linked program + * @param uniform_location the uniform location retrieved from + * {@link Cogl.program.get_uniform_location}. + * @param n_components The number of components for the uniform. For + * example with glsl you'd use 3 for a vec3 or 4 for a vec4. + * @param count For uniform arrays this is the array length otherwise just + * pass 1 + * @param value the new value of the uniform[s]. + */ + function program_set_uniform_float(program: Handle, uniform_location: number, n_components: number, count: number, value: number[]): void; + + /** + * Changes the value of a int vector uniform, or uniform array for + * the given linked #program. + * @param program A {@link Handle} for a linked program + * @param uniform_location the uniform location retrieved from + * {@link Cogl.program.get_uniform_location}. + * @param n_components The number of components for the uniform. For + * example with glsl you'd use 3 for a vec3 or 4 for a vec4. + * @param count For uniform arrays this is the array length otherwise just + * pass 1 + * @param value the new value of the uniform[s]. + */ + function program_set_uniform_int(program: Handle, uniform_location: number, n_components: number, count: number, value: number[]): void; + + /** + * Changes the value of a matrix uniform, or uniform array in the + * given linked #program. + * @param program A {@link Handle} for a linked program + * @param uniform_location the uniform location retrieved from + * {@link Cogl.program.get_uniform_location}. + * @param dimensions The dimensions of the matrix. So for for example pass + * 2 for a 2x2 matrix or 3 for 3x3. + * @param count For uniform arrays this is the array length otherwise just + * pass 1 + * @param transpose Whether to transpose the matrix when setting the uniform. + * @param value the new value of the uniform. + */ + function program_set_uniform_matrix(program: Handle, uniform_location: number, dimensions: number, count: number, transpose: Bool, value: number[]): void; + + /** + * Changes the value of a floating point uniform in the currently + * used (see {@link Cogl.program.use}) shader program. + * @param uniform_no the uniform to set. + * @param value the new value of the uniform. + */ + function program_uniform_1f(uniform_no: number, value: number): void; + + /** + * Changes the value of an integer uniform in the currently + * used (see {@link Cogl.program.use}) shader program. + * @param uniform_no the uniform to set. + * @param value the new value of the uniform. + */ + function program_uniform_1i(uniform_no: number, value: number): void; + + /** + * Changes the value of a float vector uniform, or uniform array in the + * currently used (see {@link Cogl.program.use}) shader program. + * @param uniform_no the uniform to set. + * @param size Size of float vector. + * @param count Size of array of uniforms. + * @param value the new value of the uniform. + */ + function program_uniform_float(uniform_no: number, size: number, count: number, value: number[]): void; + + /** + * Changes the value of a int vector uniform, or uniform array in the + * currently used (see {@link Cogl.program.use}) shader program. + * @param uniform_no the uniform to set. + * @param size Size of int vector. + * @param count Size of array of uniforms. + * @param value the new value of the uniform. + */ + function program_uniform_int(uniform_no: number, size: number, count: number, value: number[]): void; + + /** + * Changes the value of a matrix uniform, or uniform array in the + * currently used (see {@link Cogl.program.use}) shader program. The #size + * parameter is used to determine the square size of the matrix. + * @param uniform_no the uniform to set. + * @param size Size of matrix. + * @param count Size of array of uniforms. + * @param transpose Whether to transpose the matrix when setting the uniform. + * @param value the new value of the uniform. + */ + function program_uniform_matrix(uniform_no: number, size: number, count: number, transpose: Bool, value: number[]): void; + + /** + * Removes a reference to a program. If it was the last reference the + * program object will be destroyed. + * @param handle A {@link Handle} to a program. + */ + function program_unref(handle: Handle): void; + + /** + * Activate a specific shader program replacing that part of the GL + * rendering pipeline, if passed in %COGL_INVALID_HANDLE the default + * behavior of GL is reinstated. + * + * This function affects the global state of the current Cogl + * context. It is much more efficient to attach the shader to a + * specific material used for rendering instead by calling + * {@link Cogl.Material.set_user_program}. + * @param handle a {@link Handle} for a shader program or %COGL_INVALID_HANDLE. + */ + function program_use(handle: Handle): void; + + /** + * Save {@link Cogl.set.draw_buffer} state. + */ + function push_draw_buffer(): void; + + /** + * Redirects all subsequent drawing to the specified framebuffer. This can + * either be an offscreen buffer created with cogl_offscreen_new_to_texture () + * or in the future it may be an onscreen framebuffer too. + * + * You should understand that a framebuffer owns the following state: + * + * The projection matrix + * The modelview matrix stack + * The viewport + * The clip stack + * + * So these items will automatically be saved and restored when you + * push and pop between different framebuffers. + * + * Also remember a newly allocated framebuffer will have an identity matrix for + * the projection and modelview matrices which gives you a coordinate space + * like OpenGL with (-1, -1) corresponding to the top left of the viewport, + * (1, 1) corresponding to the bottom right and +z coming out towards the + * viewer. + * + * If you want to set up a coordinate space like Clutter does with (0, 0) + * corresponding to the top left and (framebuffer_width, framebuffer_height) + * corresponding to the bottom right you can do so like this: + * + * |[ + * static void + * setup_viewport (unsigned int width, + * unsigned int height, + * float fovy, + * float aspect, + * float z_near, + * float z_far) + * { + * float z_camera; + * CoglMatrix projection_matrix; + * CoglMatrix mv_matrix; + * + * cogl_set_viewport (0, 0, width, height); + * cogl_perspective (fovy, aspect, z_near, z_far); + * + * cogl_get_projection_matrix (&projection_matrix); + * z_camera = 0.5 * projection_matrix.xx; + * + * cogl_matrix_init_identity (&mv_matrix); + * cogl_matrix_translate (&mv_matrix, -0.5f, -0.5f, -z_camera); + * cogl_matrix_scale (&mv_matrix, 1.0f / width, -1.0f / height, 1.0f / width); + * cogl_matrix_translate (&mv_matrix, 0.0f, -1.0 * height, 0.0f); + * cogl_set_modelview_matrix (&mv_matrix); + * } + * + * static void + * my_init_framebuffer (ClutterStage *stage, + * CoglFramebuffer *framebuffer, + * unsigned int framebuffer_width, + * unsigned int framebuffer_height) + * { + * ClutterPerspective perspective; + * + * clutter_stage_get_perspective (stage, &perspective); + * + * cogl_push_framebuffer (framebuffer); + * setup_viewport (framebuffer_width, + * framebuffer_height, + * perspective.fovy, + * perspective.aspect, + * perspective.z_near, + * perspective.z_far); + * } + * ]| + * + * The previous framebuffer can be restored by calling {@link Cogl.pop.framebuffer} + * @param buffer A {@link Framebuffer} object, either onscreen or offscreen. + */ + function push_framebuffer(buffer: any): void; + + /** + * Stores the current model-view matrix on the matrix stack. The matrix + * can later be restored with {@link Cogl.pop.matrix}. + */ + function push_matrix(): void; + + /** + * Pushes the given #material to the top of the source stack. The + * material at the top of this stack defines the GPU state used to + * process later primitives as defined by {@link Cogl.set.source}. + * @param material A {@link Material} + */ + function push_source(material: any | null): void; + + /** + * This reads a rectangle of pixels from the current framebuffer where + * position (0, 0) is the top left. The pixel at (x, y) is the first + * read, and the data is returned with a rowstride of (width * 4). + * + * Currently Cogl assumes that the framebuffer is in a premultiplied + * format so if #format is non-premultiplied it will convert it. To + * read the pixel values without any conversion you should either + * specify a format that doesn't use an alpha channel or use one of + * the formats ending in PRE. + * @param x The window x position to start reading from + * @param y The window y position to start reading from + * @param width The width of the rectangle you want to read + * @param height The height of the rectangle you want to read + * @param source Identifies which auxillary buffer you want to read + * (only COGL_READ_PIXELS_COLOR_BUFFER supported currently) + * @param format The pixel format you want the result in + * (only COGL_PIXEL_FORMAT_RGBA_8888 supported currently) + * @param pixels The location to write the pixel data. + */ + function read_pixels(x: number, y: number, width: number, height: number, source: ReadPixelsFlags, format: PixelFormat, pixels: number): void; + + /** + * Fills a rectangle at the given coordinates with the current source material + * @param x_1 X coordinate of the top-left corner + * @param y_1 Y coordinate of the top-left corner + * @param x_2 X coordinate of the bottom-right corner + * @param y_2 Y coordinate of the bottom-right corner + */ + function rectangle(x_1: number, y_1: number, x_2: number, y_2: number): void; + + /** + * This function draws a rectangle using the current source material to + * texture or fill with. As a material may contain multiple texture layers + * this interface lets you supply texture coordinates for each layer of the + * material. + * + * The first pair of coordinates are for the first layer (with the smallest + * layer index) and if you supply less texture coordinates than there are + * layers in the current source material then default texture coordinates + * (0.0, 0.0, 1.0, 1.0) are generated. + * @param x1 x coordinate upper left on screen. + * @param y1 y coordinate upper left on screen. + * @param x2 x coordinate lower right on screen. + * @param y2 y coordinate lower right on screen. + * @param tex_coords An array containing groups of + * 4 float values: [tx1, ty1, tx2, ty2] that are interpreted as two texture + * coordinates; one for the upper left texel, and one for the lower right + * texel. Each value should be between 0.0 and 1.0, where the coordinate + * (0.0, 0.0) represents the top left of the texture, and (1.0, 1.0) the + * bottom right. + * @param tex_coords_len The length of the tex_coords array. (e.g. for one layer + * and one group of texture coordinates, this would be 4) + */ + function rectangle_with_multitexture_coords(x1: number, y1: number, x2: number, y2: number, tex_coords: number[], tex_coords_len: number): void; + + /** + * Draw a rectangle using the current material and supply texture coordinates + * to be used for the first texture layer of the material. To draw the entire + * texture pass in #tx1=0.0 #ty1=0.0 #tx2=1.0 #ty2=1.0. + * @param x1 x coordinate upper left on screen. + * @param y1 y coordinate upper left on screen. + * @param x2 x coordinate lower right on screen. + * @param y2 y coordinate lower right on screen. + * @param tx1 x part of texture coordinate to use for upper left pixel + * @param ty1 y part of texture coordinate to use for upper left pixel + * @param tx2 x part of texture coordinate to use for lower right pixel + * @param ty2 y part of texture coordinate to use for left pixel + */ + function rectangle_with_texture_coords(x1: number, y1: number, x2: number, y2: number, tx1: number, ty1: number, tx2: number, ty2: number): void; + + /** + * Draws a series of rectangles in the same way that + * cogl_rectangle() does. In some situations it can give a + * significant performance boost to use this function rather than + * calling cogl_rectangle() separately for each rectangle. + * + * #verts should point to an array of #floats with + * #n_rects * 4 elements. Each group of 4 values corresponds to the + * parameters x1, y1, x2, and y2, and have the same + * meaning as in cogl_rectangle(). + * @param verts an array of vertices + * @param n_rects number of rectangles to draw + */ + function rectangles(verts: number[], n_rects: number): void; + + /** + * Draws a series of rectangles in the same way that + * {@link Cogl.rectangle.with_texture_coords} does. In some situations it can give a + * significant performance boost to use this function rather than + * calling cogl_rectangle_with_texture_coords() separately for each rectangle. + * + * #verts should point to an array of #floats with + * #n_rects * 8 elements. Each group of 8 values corresponds to the + * parameters x1, y1, x2, y2, tx1, ty1, tx2 and ty2 and have the same + * meaning as in cogl_rectangle_with_texture_coords(). + * @param verts an array of vertices + * @param n_rects number of rectangles to draw + */ + function rectangles_with_texture_coords(verts: number[], n_rects: number): void; + + /** + * Multiplies the current model-view matrix by one that rotates the + * model around the vertex specified by #x, #y and #z. The rotation + * follows the right-hand thumb rule so for example rotating by 10 + * degrees about the vertex (0, 0, 1) causes a small counter-clockwise + * rotation. + * @param angle Angle in degrees to rotate. + * @param x X-component of vertex to rotate around. + * @param y Y-component of vertex to rotate around. + * @param z Z-component of vertex to rotate around. + */ + function rotate(angle: number, x: number, y: number, z: number): void; + + /** + * Multiplies the current model-view matrix by one that scales the x, + * y and z axes by the given values. + * @param x Amount to scale along the x-axis + * @param y Amount to scale along the y-axis + * @param z Amount to scale along the z-axis + */ + function scale(x: number, y: number, z: number): void; + + /** + * Sets whether textures positioned so that their backface is showing + * should be hidden. This can be used to efficiently draw two-sided + * textures or fully closed cubes without enabling depth testing. This + * only affects calls to the cogl_rectangle* family of functions and + * cogl_vertex_buffer_draw*. Backface culling is disabled by default. + * @param setting %TRUE to enable backface culling or %FALSE to disable. + */ + function set_backface_culling_enabled(setting: Bool): void; + + /** + * Sets whether depth testing is enabled. If it is disabled then the + * order that actors are layered on the screen depends solely on the + * order specified using {@link Clutter.Actor.raise} and + * clutter_actor_lower(), otherwise it will also take into account the + * actor's depth. Depth testing is disabled by default. + * @param setting %TRUE to enable depth testing or %FALSE to disable. + */ + function set_depth_test_enabled(setting: Bool): void; + + /** + * Redirects all subsequent drawing to the specified framebuffer. This + * can either be an offscreen buffer created with + * cogl_offscreen_new_to_texture () or you can revert to your original + * on screen window buffer. + * @param target A {@link BufferTarget} that specifies what kind of framebuffer you + * are setting as the render target. + * @param offscreen If you are setting a framebuffer of type COGL_OFFSCREEN_BUFFER + * then this is a CoglHandle for the offscreen buffer. + */ + function set_draw_buffer(target: BufferTarget, offscreen: Handle): void; + + /** + * Enables fogging. Fogging causes vertices that are further away from the eye + * to be rendered with a different color. The color is determined according to + * the chosen fog mode; at it's simplest the color is linearly interpolated so + * that vertices at #z_near are drawn fully with their original color and + * vertices at #z_far are drawn fully with #fog_color. Fogging will remain + * enabled until you call {@link Cogl.disable.fog}. + * + * The fogging functions only work correctly when primitives use + * unmultiplied alpha colors. By default Cogl will premultiply textures + * and cogl_set_source_color() will premultiply colors, so unless you + * explicitly load your textures requesting an unmultiplied internal format + * and use cogl_material_set_color() you can only use fogging with fully + * opaque primitives. This might improve in the future when we can depend + * on fragment shaders. + * @param fog_color The color of the fog + * @param mode A {@link FogMode} that determines the equation used to calculate the + * fogging blend factor. + * @param density Used by %COGL_FOG_MODE_EXPONENTIAL and by + * %COGL_FOG_MODE_EXPONENTIAL_SQUARED equations. + * @param z_near Position along Z axis where no fogging should be applied + * @param z_far Position along Z axis where full fogging should be applied + */ + function set_fog(fog_color: Color, mode: FogMode, density: number, z_near: number, z_far: number): void; + + /** + * This redirects all subsequent drawing to the specified framebuffer. This can + * either be an offscreen buffer created with cogl_offscreen_new_to_texture () + * or in the future it may be an onscreen framebuffers too. + * @param buffer A {@link Framebuffer} object, either onscreen or offscreen. + */ + function set_framebuffer(buffer: any): void; + + /** + * Loads #matrix as the new model-view matrix. + * @param matrix the new model-view matrix + */ + function set_modelview_matrix(matrix: Matrix): void; + + /** + * Loads matrix as the new projection matrix. + * @param matrix the new projection matrix + */ + function set_projection_matrix(matrix: Matrix): void; + + /** + * This function changes the material at the top of the source stack. + * The material at the top of this stack defines the GPU state used to + * process subsequent primitives, such as rectangles drawn with + * cogl_rectangle() or vertices drawn using cogl_vertex_buffer_draw(). + * @param material A {@link Material} + */ + function set_source(material: any | null): void; + + /** + * This is a convenience function for creating a solid fill source material + * from the given color. This color will be used for any subsequent drawing + * operation. + * + * The color will be premultiplied by Cogl, so the color should be + * non-premultiplied. For example: use (1.0, 0.0, 0.0, 0.5) for + * semi-transparent red. + * + * See also {@link Cogl.set.source_color4ub} and cogl_set_source_color4f() + * if you already have the color components. + * @param color a {@link Color} + */ + function set_source_color(color: Color): void; + + /** + * This is a convenience function for creating a solid fill source material + * from the given color using normalized values for each component. This color + * will be used for any subsequent drawing operation. + * + * The value for each component is a fixed point number in the range + * between 0 and %1.0. If the values passed in are outside that + * range, they will be clamped. + * @param red value of the red channel, between 0 and %1.0 + * @param green value of the green channel, between 0 and %1.0 + * @param blue value of the blue channel, between 0 and %1.0 + * @param alpha value of the alpha channel, between 0 and %1.0 + */ + function set_source_color4f(red: number, green: number, blue: number, alpha: number): void; + + /** + * This is a convenience function for creating a solid fill source material + * from the given color using unsigned bytes for each component. This + * color will be used for any subsequent drawing operation. + * + * The value for each component is an unsigned byte in the range + * between 0 and 255. + * @param red value of the red channel, between 0 and 255 + * @param green value of the green channel, between 0 and 255 + * @param blue value of the blue channel, between 0 and 255 + * @param alpha value of the alpha channel, between 0 and 255 + */ + function set_source_color4ub(red: number, green: number, blue: number, alpha: number): void; + + /** + * This is a convenience function for creating a material with the first + * layer set to #texture and setting that material as the source with + * cogl_set_source. + * + * Note: There is no interaction between calls to cogl_set_source_color + * and cogl_set_source_texture. If you need to blend a texture with a color then + * you can create a simple material like this: + * + * material = cogl_material_new (); + * cogl_material_set_color4ub (material, 0xff, 0x00, 0x00, 0x80); + * cogl_material_set_layer (material, 0, tex_handle); + * cogl_set_source (material); + * + * @param texture The {@link Texture} you want as your source + */ + function set_source_texture(texture: Texture): void; + + /** + * Replaces the current viewport with the given values. + * @param x X offset of the viewport + * @param y Y offset of the viewport + * @param width Width of the viewport + * @param height Height of the viewport + */ + function set_viewport(x: number, y: number, width: number, height: number): void; + + /** + * Compiles the shader, no return value, but the shader is now ready + * for linking into a program. Note that calling this function is + * optional. If it is not called then the shader will be automatically + * compiled when it is linked. + * @param handle {@link Handle} for a shader. + */ + function shader_compile(handle: Handle): void; + + /** + * Retrieves the information log for a coglobject, can be used in conjunction + * with {@link Cogl.shader_get_parameteriv} to retrieve the compiler warnings/error + * messages that caused a shader to not compile correctly, mainly useful for + * debugging purposes. + * @param handle {@link Handle} for a shader. + * @returns a newly allocated string containing the info log. Use + * {@link G.free} to free it + */ + function shader_get_info_log(handle: Handle): string; + + /** + * Retrieves the type of a shader {@link Handle} + * @param handle {@link Handle} for a shader. + * @returns %COGL_SHADER_TYPE_VERTEX if the shader is a vertex processor + * or %COGL_SHADER_TYPE_FRAGMENT if the shader is a frament processor + */ + function shader_get_type(handle: Handle): ShaderType; + + /** + * Retrieves whether a shader {@link Handle} has been compiled + * @param handle {@link Handle} for a shader. + * @returns %TRUE if the shader object has sucessfully be compiled + */ + function shader_is_compiled(handle: Handle): Bool; + + /** + * Add an extra reference to a shader. + * @param handle A {@link Handle} to a shader. + * @returns #handle + */ + function shader_ref(handle: Handle): Handle; + + /** + * Replaces the current source associated with a shader with a new + * one. + * + * Please see above + * for a description of the recommended format for the shader code. + * @param shader {@link Handle} for a shader. + * @param source Shader source. + */ + function shader_source(shader: Handle, source: string): void; + + /** + * Removes a reference to a shader. If it was the last reference the + * shader object will be destroyed. + * @param handle A {@link Handle} to a shader. + */ + function shader_unref(handle: Handle): void; + + /** + * Very fast fixed point implementation of square root for integers. + * + * This function is at least 6x faster than clib sqrt() on x86, and (this is + * not a typo!) about 500x faster on ARM without FPU. It's error is less than + * 5% for arguments smaller than %COGL_SQRTI_ARG_5_PERCENT and less than 10% + * for narguments smaller than %COGL_SQRTI_ARG_10_PERCENT. The maximum + * argument that can be passed to this function is %COGL_SQRTI_ARG_MAX. + * @param x integer value + * @returns integer square root. + */ + function sqrti(x: number): number; + + function texture_error_quark(): number; + + /** + * Increment the reference count for a cogl texture. + * @param texture a {@link Texture}. + * @returns the #texture pointer. + */ + function texture_ref(texture: any | null): any | null; + + /** + * Decrement the reference count for a cogl texture. + * @param texture a {@link Texture}. + */ + function texture_unref(texture: any | null): void; + + /** + * Multiplies the current model-view matrix by the given matrix. + * @param matrix the matrix to multiply with the current model-view + */ + function transform(matrix: Matrix): void; + + /** + * Multiplies the current model-view matrix by one that translates the + * model along all three axes according to the given values. + * @param x Distance to translate along the x-axis + * @param y Distance to translate along the y-axis + * @param z Distance to translate along the z-axis + */ + function translate(x: number, y: number, z: number): void; + + /** + * Adds an attribute to a buffer, or replaces a previously added + * attribute with the same name. + * + * You either can use one of the built-in names such as "gl_Vertex", or + * "gl_MultiTexCoord0" to add standard attributes, like positions, colors + * and normals, or you can add custom attributes for use in shaders. + * + * The number of vertices declared when calling {@link Cogl.vertex.buffer_new} + * determines how many attribute values will be read from the supplied + * #pointer. + * + * The data for your attribute isn't copied anywhere until you call + * cogl_vertex_buffer_submit(), or issue a draw call which automatically + * submits pending attribute changes. so the supplied pointer must remain + * valid until then. If you are updating an existing attribute (done by + * re-adding it) then you still need to re-call cogl_vertex_buffer_submit() + * to commit the changes to the GPU. Be carefull to minimize the number + * of calls to cogl_vertex_buffer_submit(), though. + * + * If you are interleving attributes it is assumed that each interleaved + * attribute starts no farther than +- stride bytes from the other attributes + * it is interleved with. I.e. this is ok: + * + * |-0-0-0-0-0-0-0-0-0-0| + * + * This is not ok: + * + * |- - - - -0-0-0-0-0-0 0 0 0 0| + * + * (Though you can have multiple groups of interleved attributes) + * @param handle A vertex buffer handle + * @param attribute_name The name of your attribute. It should be a valid GLSL + * variable name and standard attribute types must use one of following + * built-in names: (Note: they correspond to the built-in names of GLSL) + * + * "gl_Color" + * "gl_Normal" + * "gl_MultiTexCoord0, gl_MultiTexCoord1, ..." + * "gl_Vertex" + * + * To support adding multiple variations of the same attribute the name + * can have a detail component, E.g. "gl_Color::active" or + * "gl_Color::inactive" + * @param n_components The number of components per attribute and must be 1, 2, + * 3 or 4 + * @param type a {@link AttributeType} specifying the data type of each component. + * @param normalized If %TRUE, this specifies that values stored in an integer + * format should be mapped into the range [-1.0, 1.0] or [0.0, 1.0] + * for unsigned values. If %FALSE they are converted to floats + * directly. + * @param stride This specifies the number of bytes from the start of one attribute + * value to the start of the next value (for the same attribute). So, for + * example, with a position interleved with color like this: + * XYRGBAXYRGBAXYRGBA, then if each letter represents a byte, the + * stride for both attributes is 6. The special value 0 means the + * values are stored sequentially in memory. + * @param pointer This addresses the first attribute in the vertex array. This + * must remain valid until you either call {@link Cogl.vertex.buffer_submit} or + * issue a draw call. + */ + function vertex_buffer_add(handle: Handle, attribute_name: string, n_components: number, type: AttributeType, normalized: Bool, stride: number, pointer: any | null): void; + + /** + * Deletes an attribute from a buffer. You will need to call + * {@link Cogl.vertex.buffer_submit} or issue a draw call to commit this + * change to the GPU. + * @param handle A vertex buffer handle + * @param attribute_name The name of a previously added attribute + */ + function vertex_buffer_delete(handle: Handle, attribute_name: string): void; + + /** + * Disables a previosuly added attribute. + * + * Since it can be costly to add and remove new attributes to buffers; to make + * individual buffers more reuseable it is possible to enable and disable + * attributes before using a buffer for drawing. + * + * You don't need to call {@link Cogl.vertex.buffer_submit} after using this + * function. + * @param handle A vertex buffer handle + * @param attribute_name The name of the attribute you want to disable + */ + function vertex_buffer_disable(handle: Handle, attribute_name: string): void; + + /** + * Allows you to draw geometry using all or a subset of the + * vertices in a vertex buffer. + * + * Any un-submitted attribute changes are automatically submitted before + * drawing. + * @param handle A vertex buffer handle + * @param mode A {@link VerticesMode} specifying how the vertices should be + * interpreted. + * @param first Specifies the index of the first vertex you want to draw with + * @param count Specifies the number of vertices you want to draw. + */ + function vertex_buffer_draw(handle: Handle, mode: VerticesMode, first: number, count: number): void; + + /** + * This function lets you use an array of indices to specify the vertices + * within your vertex buffer that you want to draw. The indices themselves + * are created by calling cogl_vertex_buffer_indices_new () + * + * Any un-submitted attribute changes are automatically submitted before + * drawing. + * @param handle A vertex buffer handle + * @param mode A {@link VerticesMode} specifying how the vertices should be + * interpreted. + * @param indices A CoglHandle for a set of indices allocated via + * cogl_vertex_buffer_indices_new () + * @param min_index Specifies the minimum vertex index contained in indices + * @param max_index Specifies the maximum vertex index contained in indices + * @param indices_offset An offset into named indices. The offset marks the first + * index to use for drawing. + * @param count Specifies the number of vertices you want to draw. + */ + function vertex_buffer_draw_elements(handle: Handle, mode: VerticesMode, indices: Handle, min_index: number, max_index: number, indices_offset: number, count: number): void; + + /** + * Enables a previosuly disabled attribute. + * + * Since it can be costly to add and remove new attributes to buffers; to make + * individual buffers more reuseable it is possible to enable and disable + * attributes before using a buffer for drawing. + * + * You don't need to call {@link Cogl.vertex.buffer_submit} after using this function + * @param handle A vertex buffer handle + * @param attribute_name The name of the attribute you want to enable + */ + function vertex_buffer_enable(handle: Handle, attribute_name: string): void; + + /** + * Retrieves the number of vertices that #handle represents + * @param handle A vertex buffer handle + * @returns the number of vertices + */ + function vertex_buffer_get_n_vertices(handle: Handle): number; + + /** + * Creates a vertex buffer containing the indices needed to draw pairs + * of triangles from a list of vertices grouped as quads. There will + * be at least #n_indices entries in the buffer (but there may be + * more). + * + * The indices will follow this pattern: + * + * 0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7 ... etc + * + * For example, if you submit vertices for a quad like like that shown + * in then you can request 6 + * indices to render two triangles like those shown in . + * + *
+ * Example of vertices submitted to form a quad + * + *
+ * + *
+ * Illustration of the triangle indices that will be generated + * + *
+ * @param n_indices the number of indices in the vertex buffer. + * @returns A %CoglHandle containing the indices. The handled is + * owned by Cogl and should not be modified or unref'd. + */ + function vertex_buffer_indices_get_for_quads(n_indices: number): Handle; + + /** + * Queries back the data type used for the given indices + * @param indices An indices handle + * @returns The CoglIndicesType used + */ + function vertex_buffer_indices_get_type(indices: Handle): IndicesType; + + /** + * Depending on how much geometry you are submitting it can be worthwhile + * optimizing the number of redundant vertices you submit. Using an index + * array allows you to reference vertices multiple times, for example + * during triangle strips. + * @param indices_type a {@link IndicesType} specifying the data type used for + * the indices. + * @param indices_array Specifies the address of + * your array of indices + * @param indices_len The number of indices in indices_array + * @returns A CoglHandle for the indices which you can pass to + * {@link Cogl.vertex.buffer_draw_elements}. + */ + function vertex_buffer_indices_new(indices_type: IndicesType, indices_array: any[], indices_len: number): Handle; + + /** + * Creates a new vertex buffer that you can use to add attributes. + * @param n_vertices The number of vertices that your attributes will correspond to. + * @returns a new {@link Handle} + */ + function vertex_buffer_new(n_vertices: number): Handle; + + /** + * Increment the reference count for a vertex buffer + * @param handle a {@link Handle}. + * @returns the #handle. + */ + function vertex_buffer_ref(handle: Handle): Handle; + + /** + * Submits all the user added attributes to the GPU; once submitted, the + * attributes can be used for drawing. + * + * You should aim to minimize calls to this function since it implies + * validating your data; it potentially incurs a transport cost (especially if + * you are using GLX indirect rendering) and potentially a format conversion + * cost if the GPU doesn't natively support any of the given attribute formats. + * @param handle A vertex buffer handle + */ + function vertex_buffer_submit(handle: Handle): void; + + /** + * Decrement the reference count for a vertex buffer + * @param handle a {@link Handle}. + */ + function vertex_buffer_unref(handle: Handle): void; + + /** + * Replace the current viewport with the given values. + * @param width Width of the viewport + * @param height Height of the viewport + */ + function viewport(width: number, height: number): void; + + function xlib_renderer_add_filter(renderer: any, func: XlibFilterFunc, data: any | null): void; + + function xlib_renderer_get_display(renderer: any): any; + + function xlib_renderer_get_foreign_display(renderer: any): any; + + function xlib_renderer_get_visual_info(renderer: any): any; + + function xlib_renderer_handle_event(renderer: any, event: any): FilterReturn; + + function xlib_renderer_remove_filter(renderer: any, func: XlibFilterFunc, data: any | null): void; + + /** + * Sets whether Cogl should automatically retrieve events from the X + * display. This defaults to %TRUE unless + * {@link Cogl.xlib.renderer_set_foreign_display} is called. It can be set + * to %FALSE if the application wants to handle its own event + * retrieval. Note that Cogl still needs to see all of the X events to + * function properly so the application should call + * cogl_xlib_renderer_handle_event() for each event if it disables + * automatic event retrieval. + * @param renderer a {@link Renderer} + * @param enable The new value + */ + function xlib_renderer_set_event_retrieval_enabled(renderer: any, enable: Bool): void; + + function xlib_renderer_set_foreign_display(renderer: any, display: any): void; + + const AFIRST_BIT: number; + + const A_BIT: number; + + const BGR_BIT: number; + + const DEPTH_BIT: number; + + /** + * The number 0.5 expressed as a {@link Fixed} number. + * @returns The number 0.5 expressed as a {@link Fixed} number. + */ + const FIXED_0_5: number; + + /** + * The number 1 expressed as a {@link Fixed} number. + * @returns The number 1 expressed as a {@link Fixed} number. + */ + const FIXED_1: number; + + /** + * Two times pi, expressed as a {@link Fixed} number. + * @returns Two times pi, expressed as a {@link Fixed} number. + */ + const FIXED_2_PI: number; + + /** + * Evaluates to the number of bits used by the {@link Fixed} type. + * @returns Evaluates to the number of bits used by the {@link Fixed} type. + */ + const FIXED_BITS: number; + + /** + * A very small number expressed as a {@link Fixed} number. + * @returns A very small number expressed as a {@link Fixed} number. + */ + const FIXED_EPSILON: number; + + /** + * The biggest number representable using {@link Fixed} + * @returns The biggest number representable using {@link Fixed} + */ + const FIXED_MAX: number; + + /** + * The smallest number representable using {@link Fixed} + * @returns The smallest number representable using {@link Fixed} + */ + const FIXED_MIN: number; + + /** + * The number pi, expressed as a {@link Fixed} number. + * @returns The number pi, expressed as a {@link Fixed} number. + */ + const FIXED_PI: number; + + /** + * Half pi, expressed as a {@link Fixed} number. + * @returns Half pi, expressed as a {@link Fixed} number. + */ + const FIXED_PI_2: number; + + /** + * pi / 4, expressed as {@link Fixed} number. + * @returns pi / 4, expressed as {@link Fixed} number. + */ + const FIXED_PI_4: number; + + /** + * Evaluates to the number of bits used for the non-integer part + * of the {@link Fixed} type. + * @returns Evaluates to the number of bits used for the non-integer part + * of the {@link Fixed} type. + */ + const FIXED_Q: number; + + const PREMULT_BIT: number; + + /** + * Evaluates to 180 / pi in fixed point notation. + * @returns Evaluates to 180 / pi in fixed point notation. + */ + const RADIANS_TO_DEGREES: number; + + /** + * Maximum argument that can be passed to cogl_sqrti() for which the + * resulting error is < 10% + * @returns Maximum argument that can be passed to cogl_sqrti() for which the + * resulting error is < 10% + */ + const SQRTI_ARG_10_PERCENT: number; + + /** + * Maximum argument that can be passed to cogl_sqrti() for which the + * resulting error is < 5% + * @returns Maximum argument that can be passed to cogl_sqrti() for which the + * resulting error is < 5% + */ + const SQRTI_ARG_5_PERCENT: number; + + /** + * Maximum argument that can be passed to cogl_sqrti() function. + * @returns Maximum argument that can be passed to cogl_sqrti() function. + */ + const SQRTI_ARG_MAX: number; + + const STENCIL_BIT: number; + + const TEXTURE_MAX_WASTE: number; + +} \ No newline at end of file diff --git a/gir/Cvc-1.0.d.ts b/gir/Cvc-1.0.d.ts new file mode 100644 index 0000000000..7ad61c36e6 --- /dev/null +++ b/gir/Cvc-1.0.d.ts @@ -0,0 +1,549 @@ +/** Generated with https://github.com/Gr3q/GIR2TS - If possible do not modify. */ +declare namespace imports.gi.Cvc { + /** This construct is only for enabling class multi-inheritance, + * use {@link ChannelMap} instead. + */ + interface IChannelMap { + can_balance(): boolean; + can_fade(): boolean; + can_lfe(): boolean; + get_balance(): number; + get_fade(): number; + get_lfe(): number; + get_mapping(): string; + get_num_channels(): number; + get_volume(): number; + has_position(position: number): boolean; + set_balance(value: number): void; + set_fade(value: number): void; + set_lfe(value: number): void; + connect(signal: "volume-changed", callback: (owner: this, object: boolean) => void): number; + + } + + type ChannelMapInitOptionsMixin = GObject.ObjectInitOptions + export interface ChannelMapInitOptions extends ChannelMapInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link ChannelMap} instead. + */ + type ChannelMapMixin = IChannelMap & GObject.Object; + + interface ChannelMap extends ChannelMapMixin {} + + class ChannelMap { + public constructor(options?: Partial); + public static new(): ChannelMap; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link MixerCard} instead. + */ + interface IMixerCard { + readonly human_profile: string; + icon_name: string; + id: number; + index: number; + name: string; + pa_context: any; + profile: string; + change_profile(profile: string): boolean; + get_gicon(): Gio.Icon; + get_icon_name(): string; + get_id(): number; + get_index(): number; + get_name(): string; + get_ports(): MixerCardPort[]; + get_profile(): MixerCardProfile; + get_profiles(): MixerCardProfile[]; + set_icon_name(name: string): boolean; + set_name(name: string): boolean; + set_ports(ports: MixerCardPort[]): boolean; + set_profile(profile: string): boolean; + set_profiles(profiles: MixerCardProfile[]): boolean; + connect(signal: "notify::human-profile", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::icon-name", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::id", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::index", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::name", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::pa-context", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::profile", callback: (owner: this, ...args: any) => void): number; + + } + + type MixerCardInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface MixerCardInitOptions extends MixerCardInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link MixerCard} instead. + */ + type MixerCardMixin = IMixerCard & GObject.Object; + + interface MixerCard extends MixerCardMixin {} + + class MixerCard { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link MixerControl} instead. + */ + interface IMixerControl { + name: string; + change_input(input: MixerUIDevice): void; + change_output(output: MixerUIDevice): void; + change_profile_on_selected_device(device: MixerUIDevice, profile: string): boolean; + close(): boolean; + get_cards(): MixerCard[]; + get_default_sink(): MixerStream; + get_default_source(): MixerStream; + get_event_sink_input(): MixerStream; + get_sink_inputs(): MixerSinkInput[]; + get_sinks(): MixerSink[]; + get_source_outputs(): MixerSourceOutput[]; + get_sources(): MixerSource[]; + get_state(): MixerControlState; + get_stream_from_device(device: MixerUIDevice): MixerStream; + get_streams(): MixerStream[]; + get_vol_max_amplified(): number; + get_vol_max_norm(): number; + lookup_card_id(id: number): MixerCard; + lookup_device_from_stream(stream: MixerStream): MixerUIDevice; + lookup_input_id(id: number): MixerUIDevice; + lookup_output_id(id: number): MixerUIDevice; + lookup_stream_id(id: number): MixerStream; + open(): boolean; + set_default_sink(stream: MixerStream): boolean; + set_default_source(stream: MixerStream): boolean; + set_headset_port(id: number, choices: HeadsetPortChoice): void; + connect(signal: "active-input-update", callback: (owner: this, object: number) => void): number; + connect(signal: "active-output-update", callback: (owner: this, object: number) => void): number; + connect(signal: "audio-device-selection-needed", callback: (owner: this, object: number, p0: boolean, p1: number) => void): number; + connect(signal: "card-added", callback: (owner: this, object: number) => void): number; + connect(signal: "card-removed", callback: (owner: this, object: number) => void): number; + connect(signal: "default-sink-changed", callback: (owner: this, object: number) => void): number; + connect(signal: "default-source-changed", callback: (owner: this, object: number) => void): number; + connect(signal: "input-added", callback: (owner: this, object: number) => void): number; + connect(signal: "input-removed", callback: (owner: this, object: number) => void): number; + connect(signal: "output-added", callback: (owner: this, object: number) => void): number; + connect(signal: "output-removed", callback: (owner: this, object: number) => void): number; + connect(signal: "state-changed", callback: (owner: this, object: number) => void): number; + connect(signal: "stream-added", callback: (owner: this, object: number) => void): number; + connect(signal: "stream-changed", callback: (owner: this, object: number) => void): number; + connect(signal: "stream-removed", callback: (owner: this, object: number) => void): number; + + connect(signal: "notify::name", callback: (owner: this, ...args: any) => void): number; + + } + + type MixerControlInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface MixerControlInitOptions extends MixerControlInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link MixerControl} instead. + */ + type MixerControlMixin = IMixerControl & GObject.Object; + + interface MixerControl extends MixerControlMixin {} + + class MixerControl { + public constructor(options?: Partial); + public static new(name: string): MixerControl; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link MixerEventRole} instead. + */ + interface IMixerEventRole { + device: string; + + connect(signal: "notify::device", callback: (owner: this, ...args: any) => void): number; + + } + + type MixerEventRoleInitOptionsMixin = MixerStreamInitOptions & + Pick; + + export interface MixerEventRoleInitOptions extends MixerEventRoleInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link MixerEventRole} instead. + */ + type MixerEventRoleMixin = IMixerEventRole & MixerStream; + + interface MixerEventRole extends MixerEventRoleMixin {} + + class MixerEventRole { + public constructor(options?: Partial); + public static new(context: any, device: string, channel_map: ChannelMap): MixerStream; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link MixerSink} instead. + */ + interface IMixerSink { + + } + + type MixerSinkInitOptionsMixin = MixerStreamInitOptions + export interface MixerSinkInitOptions extends MixerSinkInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link MixerSink} instead. + */ + type MixerSinkMixin = IMixerSink & MixerStream; + + interface MixerSink extends MixerSinkMixin {} + + class MixerSink { + public constructor(options?: Partial); + public static new(context: any, index: number, channel_map: ChannelMap): MixerStream; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link MixerSinkInput} instead. + */ + interface IMixerSinkInput { + + } + + type MixerSinkInputInitOptionsMixin = MixerStreamInitOptions + export interface MixerSinkInputInitOptions extends MixerSinkInputInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link MixerSinkInput} instead. + */ + type MixerSinkInputMixin = IMixerSinkInput & MixerStream; + + interface MixerSinkInput extends MixerSinkInputMixin {} + + class MixerSinkInput { + public constructor(options?: Partial); + public static new(context: any, index: number, channel_map: ChannelMap): MixerStream; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link MixerSource} instead. + */ + interface IMixerSource { + + } + + type MixerSourceInitOptionsMixin = MixerStreamInitOptions + export interface MixerSourceInitOptions extends MixerSourceInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link MixerSource} instead. + */ + type MixerSourceMixin = IMixerSource & MixerStream; + + interface MixerSource extends MixerSourceMixin {} + + class MixerSource { + public constructor(options?: Partial); + public static new(context: any, index: number, channel_map: ChannelMap): MixerStream; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link MixerSourceOutput} instead. + */ + interface IMixerSourceOutput { + + } + + type MixerSourceOutputInitOptionsMixin = MixerStreamInitOptions + export interface MixerSourceOutputInitOptions extends MixerSourceOutputInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link MixerSourceOutput} instead. + */ + type MixerSourceOutputMixin = IMixerSourceOutput & MixerStream; + + interface MixerSourceOutput extends MixerSourceOutputMixin {} + + class MixerSourceOutput { + public constructor(options?: Partial); + public static new(context: any, index: number, channel_map: ChannelMap): MixerStream; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link MixerStream} instead. + */ + interface IMixerStream { + application_id: string; + can_decibel: boolean; + card_index: number; + channel_map: ChannelMap; + decibel: number; + description: string; + form_factor: string; + icon_name: string; + id: number; + index: number; + // is_event_stream: boolean; + is_muted: boolean; + // is_virtual: boolean; + name: string; + pa_context: any; + port: string; + sysfs_path: string; + volume: number; + change_is_muted(is_muted: boolean): boolean; + change_port(port: string): boolean; + create_monitor(): void; + get_application_id(): string; + get_base_volume(): number; + get_can_decibel(): boolean; + get_card_index(): number; + get_channel_map(): ChannelMap; + get_decibel(): number; + get_description(): string; + get_form_factor(): string; + get_gicon(): Gio.Icon; + get_icon_name(): string; + get_id(): number; + get_index(): number; + get_is_muted(): boolean; + get_name(): string; + get_port(): MixerStreamPort; + get_ports(): MixerStreamPort[]; + get_sysfs_path(): string; + get_volume(): number; + is_event_stream(): boolean; + is_running(): boolean; + is_virtual(): boolean; + push_volume(): boolean; + remove_monitor(): void; + set_application_id(application_id: string): boolean; + set_base_volume(base_volume: number): boolean; + set_can_decibel(can_decibel: boolean): boolean; + set_card_index(card_index: number): boolean; + set_decibel(db: number): boolean; + set_description(description: string): boolean; + set_form_factor(form_factor: string): boolean; + set_icon_name(name: string): boolean; + set_is_event_stream(is_event_stream: boolean): boolean; + set_is_muted(is_muted: boolean): boolean; + set_is_virtual(is_event_stream: boolean): boolean; + set_name(name: string): boolean; + set_port(port: string): boolean; + set_ports(ports: MixerStreamPort[]): boolean; + set_sysfs_path(sysfs_path: string): boolean; + set_volume(volume: number): boolean; + connect(signal: "monitor-suspend", callback: (owner: this) => void): number; + connect(signal: "monitor-update", callback: (owner: this, object: number) => void): number; + + connect(signal: "notify::application-id", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::can-decibel", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::card-index", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::channel-map", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::decibel", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::description", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::form-factor", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::icon-name", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::id", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::index", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::is-event-stream", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::is-muted", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::is-virtual", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::name", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::pa-context", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::port", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::sysfs-path", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::volume", callback: (owner: this, ...args: any) => void): number; + + } + + type MixerStreamInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface MixerStreamInitOptions extends MixerStreamInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link MixerStream} instead. + */ + type MixerStreamMixin = IMixerStream & GObject.Object; + + interface MixerStream extends MixerStreamMixin {} + + class MixerStream { + public constructor(options?: Partial); + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link MixerUIDevice} instead. + */ + interface IMixerUIDevice { + card: any; + description: string; + icon_name: string; + origin: string; + port_available: boolean; + port_name: string; + stream_id: number; + type: number; + get_active_profile(): string; + get_best_profile(selected: string, current: string): string; + get_card(): MixerCard; + get_description(): string; + get_gicon(): Gio.Icon; + get_icon_name(): string; + get_id(): number; + get_matching_profile(profile: string): string; + get_origin(): string; + get_port(): string; + get_profiles(): MixerCardProfile[]; + get_stream_id(): number; + get_supported_profiles(): MixerCardProfile[]; + get_top_priority_profile(): string; + get_user_preferred_profile(): string; + has_ports(): boolean; + invalidate_stream(): void; + is_output(): boolean; + /** + * Assigns value to + * - device->priv->profiles (profiles to be added to combobox) + * - device->priv->supported_profiles (all profiles of this port) + * - device->priv->disable_profile_swapping (whether to show the combobox) + * + * This method attempts to reduce the list of profiles visible to the user by figuring out + * from the context of that device (whether it's an input or an output) what profiles + * actually provide an alternative. + * + * It does this by the following. + * - It ignores off profiles. + * - It takes the canonical name of the profile. That name is what you get when you + * ignore the other direction. + * - In the first iteration, it only adds the names of canonical profiles - i e + * when the other side is turned off. + * - Normally the first iteration covers all cases, but sometimes (e g bluetooth) + * it doesn't, so add other profiles whose canonical name isn't already added + * in a second iteration. + * @param in_profiles a list of GvcMixerCardProfile + */ + set_profiles(in_profiles: MixerCardProfile[]): void; + set_user_preferred_profile(profile: string): void; + should_profiles_be_hidden(): boolean; + connect(signal: "notify::card", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::description", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::icon-name", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::origin", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::port-available", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::port-name", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::stream-id", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::type", callback: (owner: this, ...args: any) => void): number; + + } + + type MixerUIDeviceInitOptionsMixin = GObject.ObjectInitOptions & + Pick; + + export interface MixerUIDeviceInitOptions extends MixerUIDeviceInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link MixerUIDevice} instead. + */ + type MixerUIDeviceMixin = IMixerUIDevice & GObject.Object; + + interface MixerUIDevice extends MixerUIDeviceMixin {} + + class MixerUIDevice { + public constructor(options?: Partial); + } + + export interface MixerCardPortInitOptions {} + interface MixerCardPort {} + class MixerCardPort { + public constructor(options?: Partial); + public port: string; + public human_port: string; + public icon_name: string; + public priority: number; + public available: number; + public direction: number; + public profiles: any[]; + } + + export interface MixerCardProfileInitOptions {} + interface MixerCardProfile {} + class MixerCardProfile { + public constructor(options?: Partial); + public profile: string; + public human_profile: string; + public status: string; + public priority: number; + public n_sinks: number; + public n_sources: number; + public compare(b: MixerCardProfile): number; + } + + export interface MixerStreamPortInitOptions {} + interface MixerStreamPort {} + class MixerStreamPort { + public constructor(options?: Partial); + public port: string; + public human_port: string; + public priority: number; + public available: boolean; + } + + enum MixerControlState { + CLOSED = 0, + READY = 1, + CONNECTING = 2, + FAILED = 3 + } + + enum MixerUIDeviceDirection { + IDEVICEINPUT = 0, + IDEVICEOUTPUT = 1 + } + + enum HeadsetPortChoice { + NONE = 0, + HEADPHONES = 1, + HEADSET = 2, + MIC = 4 + } + + const MIXER_UI_DEVICE_INVALID: number; + +} \ No newline at end of file diff --git a/gir/GIRepository-2.0.d.ts b/gir/GIRepository-2.0.d.ts new file mode 100644 index 0000000000..05b5f7025e --- /dev/null +++ b/gir/GIRepository-2.0.d.ts @@ -0,0 +1,2466 @@ +/** Generated with https://github.com/Gr3q/GIR2TS - If possible do not modify. */ +declare namespace imports.gi.GIRepository { + /** This construct is only for enabling class multi-inheritance, + * use {@link Repository} instead. + */ + interface IRepository { + /** + * Obtain an unordered list of versions (either currently loaded or + * available) for #namespace_ in this #repository. + * @param namespace_ GI namespace, e.g. "Gtk" + * @returns the array of versions. + */ + enumerate_versions(namespace_: string): string[]; + /** + * Searches for the enum type corresponding to the given #GError + * domain. Before calling this function for a particular namespace, + * you must call {@link G.irepository_require} once to load the namespace, or + * otherwise ensure the namespace has already been loaded. + * @param domain a #GError domain + * @returns #GIEnumInfo representing metadata about #domain's + * enum type, or %NULL + */ + find_by_error_domain(domain: GLib.Quark): EnumInfo; + /** + * Searches all loaded namespaces for a particular #GType. Note that + * in order to locate the metadata, the namespace corresponding to + * the type must first have been loaded. There is currently no + * mechanism for determining the namespace which corresponds to an + * arbitrary GType - thus, this function will operate most reliably + * when you know the GType to originate from be from a loaded namespace. + * @param gtype GType to search for + * @returns #GIBaseInfo representing metadata about #type, or %NULL + */ + find_by_gtype(gtype: GObject.Type): BaseInfo; + /** + * Searches for a particular entry in a namespace. Before calling + * this function for a particular namespace, you must call + * {@link G.irepository_require} once to load the namespace, or otherwise + * ensure the namespace has already been loaded. + * @param namespace_ Namespace which will be searched + * @param name Entry name to find + * @returns #GIBaseInfo representing metadata about #name, or %NULL + */ + find_by_name(namespace_: string, name: string): BaseInfo; + /** + * This function returns the "C prefix", or the C level namespace + * associated with the given introspection namespace. Each C symbol + * starts with this prefix, as well each #GType in the library. + * + * Note: The namespace must have already been loaded using a function + * such as {@link G.irepository_require} before calling this function. + * @param namespace_ Namespace to inspect + * @returns C namespace prefix, or %NULL if none associated + */ + get_c_prefix(namespace_: string): string; + /** + * Retrieves all (transitive) versioned dependencies for + * #namespace_. + * + * The strings are of the form `namespace-version`. + * + * Note: #namespace_ must have already been loaded using a function + * such as {@link G.irepository_require} before calling this function. + * + * To get only the immediate dependencies for #namespace_, use + * g_irepository_get_immediate_dependencies(). + * @param namespace_ Namespace of interest + * @returns all versioned + * dependencies + */ + get_dependencies(namespace_: string): string[]; + /** + * Return an array of the immediate versioned dependencies for #namespace_. + * Returned strings are of the form `namespace-version`. + * + * Note: #namespace_ must have already been loaded using a function + * such as {@link G.irepository_require} before calling this function. + * + * To get the transitive closure of dependencies for #namespace_, use + * g_irepository_get_dependencies(). + * @param namespace_ Namespace of interest + * @returns Zero-terminated string array of immediate versioned + * dependencies + */ + get_immediate_dependencies(namespace_: string): string[]; + /** + * This function returns a particular metadata entry in the + * given namespace #namespace_. The namespace must have + * already been loaded before calling this function. + * See {@link G.irepository_get_n_infos} to find the maximum number of + * entries. + * @param namespace_ Namespace to inspect + * @param index 0-based offset into namespace metadata for entry + * @returns #GIBaseInfo containing metadata + */ + get_info(namespace_: string, index: number): BaseInfo; + /** + * Return the list of currently loaded namespaces. + * @returns List of namespaces + */ + get_loaded_namespaces(): string[]; + /** + * This function returns the number of metadata entries in + * given namespace #namespace_. The namespace must have + * already been loaded before calling this function. + * @param namespace_ Namespace to inspect + * @returns number of metadata entries + */ + get_n_infos(namespace_: string): number; + /** + * Look up the implemented interfaces for #gtype. This function + * cannot fail per se; but for a totally "unknown" #GType, it may + * return 0 implemented interfaces. + * + * The semantics of this function are designed for a dynamic binding, + * where in certain cases (such as a function which returns an + * interface which may have "hidden" implementation classes), not all + * data may be statically known, and will have to be determined from + * the #GType of the object. An example is {@link G.file_new_for_path} + * returning a concrete class of #GLocalFile, which is a #GType we + * see at runtime, but not statically. + * @param gtype a #GType whose fundamental type is G_TYPE_OBJECT + * @returns Interfaces for #gtype + */ + get_object_gtype_interfaces(gtype: GObject.Type): InterfaceInfo[]; + /** + * This function returns a comma-separated list of paths to the + * shared C libraries associated with the given namespace #namespace_. + * There may be no shared library path associated, in which case this + * function will return %NULL. + * + * Note: The namespace must have already been loaded using a function + * such as {@link G.irepository_require} before calling this function. + * @param namespace_ Namespace to inspect + * @returns Comma-separated list of paths to shared libraries, + * or %NULL if none are associated + */ + get_shared_library(namespace_: string): string | null; + /** + * If namespace #namespace_ is loaded, return the full path to the + * .typelib file it was loaded from. If the typelib for + * namespace #namespace_ was included in a shared library, return + * the special string "<builtin>". + * @param namespace_ GI namespace to use, e.g. "Gtk" + * @returns Filesystem path (or $lt;builtin$gt;) if successful, %NULL if namespace is not loaded + */ + get_typelib_path(namespace_: string): string; + /** + * This function returns the loaded version associated with the given + * namespace #namespace_. + * + * Note: The namespace must have already been loaded using a function + * such as {@link G.irepository_require} before calling this function. + * @param namespace_ Namespace to inspect + * @returns Loaded version + */ + get_version(namespace_: string): string; + /** + * Check whether a particular namespace (and optionally, a specific + * version thereof) is currently loaded. This function is likely to + * only be useful in unusual circumstances; in order to act upon + * metadata in the namespace, you should call {@link G.irepository_require} + * instead which will ensure the namespace is loaded, and return as + * quickly as this function will if it has already been loaded. + * @param namespace_ Namespace of interest + * @param version Required version, may be %NULL for latest + * @returns %TRUE if namespace-version is loaded, %FALSE otherwise + */ + is_registered(namespace_: string, version?: string | null): boolean; + /** + * TODO + * @param typelib TODO + * @param flags TODO + * @returns + */ + load_typelib(typelib: Typelib, flags: RepositoryLoadFlags): string; + /** + * Force the namespace #namespace_ to be loaded if it isn't already. + * If #namespace_ is not loaded, this function will search for a + * ".typelib" file using the repository search path. In addition, a + * version #version of namespace may be specified. If #version is + * not specified, the latest will be used. + * @param namespace_ GI namespace to use, e.g. "Gtk" + * @param version Version of namespace, may be %NULL for latest + * @param flags Set of %GIRepositoryLoadFlags, may be 0 + * @returns a pointer to the #GITypelib if successful, %NULL otherwise + */ + require(namespace_: string, version: string | null, flags: RepositoryLoadFlags): Typelib; + /** + * Force the namespace #namespace_ to be loaded if it isn't already. + * If #namespace_ is not loaded, this function will search for a + * ".typelib" file within the private directory only. In addition, a + * version #version of namespace should be specified. If #version is + * not specified, the latest will be used. + * @param typelib_dir Private directory where to find the requested typelib + * @param namespace_ GI namespace to use, e.g. "Gtk" + * @param version Version of namespace, may be %NULL for latest + * @param flags Set of %GIRepositoryLoadFlags, may be 0 + * @returns a pointer to the #GITypelib if successful, %NULL otherwise + */ + require_private(typelib_dir: string, namespace_: string, version: string | null, flags: RepositoryLoadFlags): Typelib; + } + + type RepositoryInitOptionsMixin = GObject.ObjectInitOptions + export interface RepositoryInitOptions extends RepositoryInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Repository} instead. + */ + type RepositoryMixin = IRepository & GObject.Object; + + /** + * #GIRepository is used to manage repositories of namespaces. Namespaces + * are represented on disk by type libraries (.typelib files). + * + * ### Discovery of type libraries + * + * #GIRepository will typically look for a `girepository-1.0` directory + * under the library directory used when compiling gobject-introspection. + * + * It is possible to control the search paths programmatically, using + * {@link G.irepository_prepend_search_path}. It is also possible to modify + * the search paths by using the `GI_TYPELIB_PATH` environment variable. + * The environment variable takes precedence over the default search path + * and the g_irepository_prepend_search_path() calls. + */ + interface Repository extends RepositoryMixin {} + + class Repository { + public constructor(options?: Partial); + public static dump(arg: string): boolean; + public static error_quark(): GLib.Quark; + /** + * Returns the singleton process-global default #GIRepository. It is + * not currently supported to have multiple repositories in a + * particular process, but this function is provided in the unlikely + * eventuality that it would become possible, and as a convenience for + * higher level language bindings to conform to the GObject method + * call conventions. + * + * All methods on #GIRepository also accept %NULL as an instance + * parameter to mean this default repository, which is usually more + * convenient for C. + * @returns The global singleton #GIRepository + */ + public static get_default(): Repository; + /** + * Obtain the option group for girepository, it's used + * by the dumper and for programs that wants to provide + * introspection information + * @returns the option group + */ + public static get_option_group(): GLib.OptionGroup; + /** + * Returns the current search path #GIRepository will use when loading + * typelib files. The list is internal to #GIRepository and should not + * be freed, nor should its string elements. + * @returns #GSList of strings + */ + public static get_search_path(): string[]; + public static prepend_library_path(directory: string): void; + /** + * Prepends #directory to the typelib search path. + * + * See also: {@link G.irepository_get_search_path}. + * @param directory directory name to prepend to the typelib + * search path + */ + public static prepend_search_path(directory: string): void; + } + + export interface AttributeIterInitOptions {} + /** + * An opaque structure used to iterate over attributes + * in a #GIBaseInfo struct. + */ + interface AttributeIter {} + class AttributeIter { + public constructor(options?: Partial); + public readonly data: any; + public readonly data2: any; + public readonly data3: any; + public readonly data4: any; + } + + export interface BaseInfoInitOptions {} + /** + * GIBaseInfo is the common base struct of all other Info structs + * accessible through the #GIRepository API. + * + * All info structures can be cast to a #GIBaseInfo, for instance: + * + * |[ + * GIFunctionInfo *function_info = ...; + * GIBaseInfo *info = (GIBaseInfo *) function_info; + * ]| + * + * Most #GIRepository APIs returning a #GIBaseInfo is actually + * creating a new struct; in other words, {@link G.base_info_unref} has to + * be called when done accessing the data. + * + * #GIBaseInfo structuress are normally accessed by calling either + * g_irepository_find_by_name(), g_irepository_find_by_gtype() or + * g_irepository_get_info(). + * + * |[ + * GIBaseInfo *button_info = + * g_irepository_find_by_name (NULL, "Gtk", "Button"); + * + * // ... use button_info ... + * + * g_base_info_unref (button_info); + * ]| + * + * ## Hierarchy + * + * |[ + * GIBaseInfo + * +---- GIArgInfo + * +---- GICallableInfo + * +---- GIConstantInfo + * +---- GIFieldInfo + * +---- GIPropertyInfo + * +---- GIRegisteredTypeInfo + * +---- GITypeInfo + * ]| + */ + interface BaseInfo {} + class BaseInfo { + public constructor(options?: Partial); + public readonly dummy1: number; + public readonly dummy2: number; + public readonly dummy3: any; + public readonly dummy4: any; + public readonly dummy5: any; + public readonly dummy6: number; + public readonly dummy7: number; + public readonly padding: any[]; + /** + * Compare two #GIBaseInfo. + * + * Using pointer comparison is not practical since many functions return + * different instances of #GIBaseInfo that refers to the same part of the + * TypeLib; use this function instead to do #GIBaseInfo comparisons. + * @param info2 a #GIBaseInfo + * @returns %TRUE if and only if #info1 equals #info2. + */ + public equal(info2: BaseInfo): boolean; + /** + * Retrieve an arbitrary attribute associated with this node. + * @param name a freeform string naming an attribute + * @returns The value of the attribute, or %NULL if no such attribute exists + */ + public get_attribute(name: string): string; + /** + * Obtain the container of the #info. The container is the parent + * GIBaseInfo. For instance, the parent of a #GIFunctionInfo is an + * #GIObjectInfo or #GIInterfaceInfo. + * @returns the container + */ + public get_container(): BaseInfo; + /** + * Obtain the name of the #info. What the name represents depends on + * the #GIInfoType of the #info. For instance for #GIFunctionInfo it is + * the name of the function. + * @returns the name of #info or %NULL if it lacks a name. + */ + public get_name(): string; + /** + * Obtain the namespace of #info. + * @returns the namespace + */ + public get_namespace(): string; + /** + * Obtain the info type of the GIBaseInfo. + * @returns the info type of #info + */ + public get_type(): InfoType; + /** + * Obtain the typelib this #info belongs to + * @returns the typelib. + */ + public get_typelib(): Typelib; + /** + * Obtain whether the #info is represents a metadata which is + * deprecated or not. + * @returns %TRUE if deprecated + */ + public is_deprecated(): boolean; + /** + * Iterate over all attributes associated with this node. The iterator + * structure is typically stack allocated, and must have its first + * member initialized to %NULL. Attributes are arbitrary namespaced key–value + * pairs which can be attached to almost any item. They are intended for use + * by software higher in the toolchain than bindings, and are distinct from + * normal GIR annotations. + * + * Both the #name and #value should be treated as constants + * and must not be freed. + * + * |[ + * void + * print_attributes (GIBaseInfo *info) + * { + * GIAttributeIter iter = { 0, }; + * char *name; + * char *value; + * while (g_base_info_iterate_attributes (info, &iter, &name, &value)) + * { + * g_print ("attribute name: %s value: %s", name, value); + * } + * } + * ]| + * @returns %TRUE if there are more attributes + * + * Returned name, must not be freed + * + * Returned name, must not be freed + */ + public iterate_attributes(): [ boolean, string, string ]; + /** + * Increases the reference count of #info. + * @returns the same #info. + */ + public ref(): BaseInfo; + /** + * Decreases the reference count of #info. When its reference count + * drops to 0, the info is freed. + */ + public unref(): void; + } + + export interface TypelibInitOptions {} + /** + * TODO + */ + interface Typelib {} + class Typelib { + public constructor(options?: Partial); + public static new_from_const_memory(memory: number, len: number): Typelib; + public static new_from_mapped_file(mfile: GLib.MappedFile): Typelib; + public static new_from_memory(memory: number, len: number): Typelib; + public free(): void; + public get_namespace(): string; + public symbol(symbol_name: string, symbol?: any | null): boolean; + } + + export interface UnresolvedInfoInitOptions {} + /** + * Represents a unresolved type in a typelib. + */ + interface UnresolvedInfo {} + class UnresolvedInfo { + public constructor(options?: Partial); + } + + /** + * The type of array in a #GITypeInfo. + */ + enum ArrayType { + /** + * a C array, char[] for instance + */ + C = 0, + /** + * a #GArray array + */ + ARRAY = 1, + /** + * a #GPtrArray array + */ + PTR_ARRAY = 2, + /** + * a #GByteArray array + */ + BYTE_ARRAY = 3 + } + + /** + * The direction of a #GIArgInfo. + */ + enum Direction { + /** + * in argument. + */ + IN = 0, + /** + * out argument. + */ + OUT = 1, + /** + * in and out argument. + */ + INOUT = 2 + } + + /** + * The type of a GIBaseInfo struct. + */ + enum InfoType { + /** + * invalid type + */ + INVALID = 0, + /** + * function, see #GIFunctionInfo + */ + FUNCTION = 1, + /** + * callback, see #GIFunctionInfo + */ + CALLBACK = 2, + /** + * struct, see #GIStructInfo + */ + STRUCT = 3, + /** + * boxed, see #GIStructInfo or #GIUnionInfo + */ + BOXED = 4, + /** + * enum, see #GIEnumInfo + */ + ENUM = 5, + /** + * flags, see #GIEnumInfo + */ + FLAGS = 6, + /** + * object, see #GIObjectInfo + */ + OBJECT = 7, + /** + * interface, see #GIInterfaceInfo + */ + INTERFACE = 8, + /** + * contant, see #GIConstantInfo + */ + CONSTANT = 9, + /** + * deleted, used to be GI_INFO_TYPE_ERROR_DOMAIN. + */ + INVALID_0 = 10, + /** + * union, see #GIUnionInfo + */ + UNION = 11, + /** + * enum value, see #GIValueInfo + */ + VALUE = 12, + /** + * signal, see #GISignalInfo + */ + SIGNAL = 13, + /** + * virtual function, see #GIVFuncInfo + */ + VFUNC = 14, + /** + * GObject property, see #GIPropertyInfo + */ + PROPERTY = 15, + /** + * struct or union field, see #GIFieldInfo + */ + FIELD = 16, + /** + * argument of a function or callback, see #GIArgInfo + */ + ARG = 17, + /** + * type information, see #GITypeInfo + */ + TYPE = 18, + /** + * unresolved type, a type which is not present in + * the typelib, or any of its dependencies. + */ + UNRESOLVED = 19 + } + + /** + * An error code used with #G_IREPOSITORY_ERROR in a #GError returned + * from a #GIRepository routine. + */ + enum RepositoryError { + /** + * the typelib could not be found. + */ + TYPELIB_NOT_FOUND = 0, + /** + * the namespace does not match the + * requested namespace. + */ + NAMESPACE_MISMATCH = 1, + /** + * the version of the + * typelib does not match the requested version. + */ + NAMESPACE_VERSION_CONFLICT = 2, + /** + * the library used by the typelib + * could not be found. + */ + LIBRARY_NOT_FOUND = 3 + } + + /** + * Scope type of a #GIArgInfo representing callback, determines how the + * callback is invoked and is used to decided when the invoke structs + * can be freed. + */ + enum ScopeType { + /** + * The argument is not of callback type. + */ + INVALID = 0, + /** + * The callback and associated user_data is only + * used during the call to this function. + */ + CALL = 1, + /** + * The callback and associated user_data is + * only used until the callback is invoked, and the callback. + * is invoked always exactly once. + */ + ASYNC = 2, + /** + * The callback and associated + * user_data is used until the caller is notfied via the destroy_notify. + */ + NOTIFIED = 3, + /** + * The callback and associated user_data is + * used until the process terminates + */ + FOREVER = 4 + } + + /** + * The transfer is the exchange of data between two parts, from the callee to + * the caller. The callee is either a function/method/signal or an + * object/interface where a property is defined. The caller is the side + * accessing a property or calling a function. + * #GITransfer specifies who's responsible for freeing the resources after the + * ownership transfer is complete. In case of a containing type such as a list, + * an array or a hash table the container itself is specified differently from + * the items within the container itself. Each container is freed differently, + * check the documentation for the types themselves for information on how to + * free them. + */ + enum Transfer { + /** + * transfer nothing from the callee (function or the type + * instance the property belongs to) to the caller. The callee retains the + * ownership of the transfer and the caller doesn't need to do anything to free + * up the resources of this transfer. + */ + NOTHING = 0, + /** + * transfer the container (list, array, hash table) from + * the callee to the caller. The callee retains the ownership of the individual + * items in the container and the caller has to free up the container resources + * {@link (g.list_free/g_hash_table_destroy()} etc) of this transfer. + */ + CONTAINER = 1, + /** + * transfer everything, eg the container and its + * contents from the callee to the caller. This is the case when the callee + * creates a copy of all the data it returns. The caller is responsible for + * cleaning up the container and item resources of this transfer. + */ + EVERYTHING = 2 + } + + /** + * The type tag of a #GITypeInfo. + */ + enum TypeTag { + /** + * void + */ + VOID = 0, + /** + * boolean + */ + BOOLEAN = 1, + /** + * 8-bit signed integer + */ + INT8 = 2, + /** + * 8-bit unsigned integer + */ + UINT8 = 3, + /** + * 16-bit signed integer + */ + INT16 = 4, + /** + * 16-bit unsigned integer + */ + UINT16 = 5, + /** + * 32-bit signed integer + */ + INT32 = 6, + /** + * 32-bit unsigned integer + */ + UINT32 = 7, + /** + * 64-bit signed integer + */ + INT64 = 8, + /** + * 64-bit unsigned integer + */ + UINT64 = 9, + /** + * float + */ + FLOAT = 10, + /** + * double floating point + */ + DOUBLE = 11, + /** + * a #GType + */ + GTYPE = 12, + /** + * a UTF-8 encoded string + */ + UTF8 = 13, + /** + * a filename, encoded in the same encoding + * as the native filesystem is using. + */ + FILENAME = 14, + /** + * an array + */ + ARRAY = 15, + /** + * an extended interface object + */ + INTERFACE = 16, + /** + * a #GList + */ + GLIST = 17, + /** + * a #GSList + */ + GSLIST = 18, + /** + * a #GHashTable + */ + GHASH = 19, + /** + * a #GError + */ + ERROR = 20, + /** + * Unicode character + */ + UNICHAR = 21 + } + + /** + * An error occuring while invoking a function via + * {@link G.function_info_invoke}. + */ + enum nvokeError { + /** + * invokation failed, unknown error. + */ + FAILED = 0, + /** + * symbol couldn't be found in any of the + * libraries associated with the typelib of the function. + */ + SYMBOL_NOT_FOUND = 1, + /** + * the arguments provided didn't match + * the expected arguments for the functions type signature. + */ + ARGUMENT_MISMATCH = 2 + } + + /** + * Flags for a #GIFieldInfo. + */ + enum FieldInfoFlags { + /** + * field is readable. + */ + READABLE = 1, + /** + * field is writable. + */ + WRITABLE = 2 + } + + /** + * Flags for a #GIFunctionInfo struct. + */ + enum FunctionInfoFlags { + /** + * is a method. + */ + IS_METHOD = 1, + /** + * is a constructor. + */ + IS_CONSTRUCTOR = 2, + /** + * is a getter of a #GIPropertyInfo. + */ + IS_GETTER = 4, + /** + * is a setter of a #GIPropertyInfo. + */ + IS_SETTER = 8, + /** + * represents a virtual function. + */ + WRAPS_VFUNC = 16, + /** + * the function may throw an error. + */ + THROWS = 32 + } + + /** + * Flags that control how a typelib is loaded. + */ + enum RepositoryLoadFlags { + /** + * Lazily load the typelib. + */ + IREPOSITORY_LOAD_FLAG_LAZY = 1 + } + + /** + * Flags of a #GIVFuncInfo struct. + */ + enum VFuncInfoFlags { + /** + * chains up to the parent type + */ + MUST_CHAIN_UP = 1, + /** + * overrides + */ + MUST_OVERRIDE = 2, + /** + * does not override + */ + MUST_NOT_OVERRIDE = 4, + /** + * Includes a #GError + */ + THROWS = 8 + } + + /** + * Extract an object instance out of #value + */ + interface ObjectInfoGetValueFunction { + /** + * Extract an object instance out of #value + * @param value a #GValue + * @returns the object instance + */ + (value: GObject.Value): any | null; + } + + /** + * Increases the reference count of an object instance. + */ + interface ObjectInfoRefFunction { + /** + * Increases the reference count of an object instance. + * @param object object instance pointer + * @returns the object instance + */ + (object?: any | null): any | null; + } + + /** + * Update #value and attach the object instance pointer #object to it. + */ + interface ObjectInfoSetValueFunction { + /** + * Update #value and attach the object instance pointer #object to it. + * @param value a #GValue + * @param object object instance pointer + */ + (value: GObject.Value, object?: any | null): void; + } + + /** + * Decreases the reference count of an object instance. + */ + interface ObjectInfoUnrefFunction { + /** + * Decreases the reference count of an object instance. + * @param object object instance pointer + */ + (object?: any | null): void; + } + + /** This construct is only for enabling class multi-inheritance, + * use {@link Argument} instead. + */ + interface IArgument { + /** + * TODO + */ + v_boolean: boolean; + /** + * TODO + */ + v_int8: number; + /** + * TODO + */ + v_uint8: number; + /** + * TODO + */ + v_int16: number; + /** + * TODO + */ + v_uint16: number; + /** + * TODO + */ + v_int32: number; + /** + * TODO + */ + v_uint32: number; + /** + * TODO + */ + v_int64: number; + /** + * TODO + */ + v_uint64: number; + /** + * TODO + */ + v_float: number; + /** + * TODO + */ + v_double: number; + /** + * TODO + */ + v_short: number; + /** + * TODO + */ + v_ushort: number; + /** + * TODO + */ + v_int: number; + /** + * TODO + */ + v_uint: number; + /** + * TODO + */ + v_long: number; + /** + * TODO + */ + v_ulong: number; + /** + * TODO + */ + v_ssize: number; + /** + * TODO + */ + v_size: number; + /** + * TODO + */ + v_string: string; + /** + * TODO + */ + v_pointer: any; + + connect(signal: "notify::v_boolean", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::v_int8", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::v_uint8", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::v_int16", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::v_uint16", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::v_int32", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::v_uint32", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::v_int64", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::v_uint64", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::v_float", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::v_double", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::v_short", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::v_ushort", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::v_int", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::v_uint", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::v_long", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::v_ulong", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::v_ssize", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::v_size", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::v_string", callback: (owner: this, ...args: any) => void): number; + connect(signal: "notify::v_pointer", callback: (owner: this, ...args: any) => void): number; + + } + + type ArgumentInitOptionsMixin = Pick; + + export interface ArgumentInitOptions extends ArgumentInitOptionsMixin {} + + /** This construct is only for enabling class multi-inheritance, + * use {@link Argument} instead. + */ + type ArgumentMixin = IArgument; + + /** + * Stores an argument of varying type + */ + interface Argument extends ArgumentMixin {} + + class Argument { + public constructor(options?: Partial); + } + + + /** + * Represents an argument. + */ + type ArgInfo = BaseInfo; + + /** + * Represents a callable, either #GIFunctionInfo, #GICallbackInfo or + * #GIVFuncInfo. + */ + type CallableInfo = BaseInfo; + + /** + * Represents a callback, eg arguments and return value. + */ + type CallbackInfo = BaseInfo; + + /** + * Represents a constant. + */ + type ConstantInfo = BaseInfo; + + /** + * Represents an enum or a flag. + */ + type EnumInfo = BaseInfo; + + /** + * Represents a field of a #GIStructInfo or a #GIUnionInfo. + */ + type FieldInfo = BaseInfo; + + /** + * Represents a function, eg arguments and return value. + */ + type FunctionInfo = BaseInfo; + + /** + * Represents an interface. + */ + type InterfaceInfo = BaseInfo; + + /** + * Represents an object. + */ + type ObjectInfo = BaseInfo; + + /** + * Represents a property of a #GIObjectInfo or a #GIInterfaceInfo. + */ + type PropertyInfo = BaseInfo; + + /** + * Represent a registered type. + */ + type RegisteredTypeInfo = BaseInfo; + + /** + * Represents a signal. + */ + type SignalInfo = BaseInfo; + + /** + * Represents a struct. + */ + type StructInfo = BaseInfo; + + /** + * Represents type information, direction, transfer etc. + */ + type TypeInfo = BaseInfo; + + /** + * Represents a union. + */ + type UnionInfo = BaseInfo; + + /** + * Represents a virtual function. + */ + type VFuncInfo = BaseInfo; + + /** + * Represents a enum value of a #GIEnumInfo. + */ + type ValueInfo = BaseInfo; + + /** + * Obtain the index of the user data argument. This is only valid + * for arguments which are callbacks. + * @param info a #GIArgInfo + * @returns index of the user data argument or -1 if there is none + */ + function arg_info_get_closure(info: ArgInfo): number; + /** + * Obtains the index of the #GDestroyNotify argument. This is only valid + * for arguments which are callbacks. + * @param info a #GIArgInfo + * @returns index of the #GDestroyNotify argument or -1 if there is none + */ + function arg_info_get_destroy(info: ArgInfo): number; + /** + * Obtain the direction of the argument. Check #GIDirection for possible + * direction values. + * @param info a #GIArgInfo + * @returns the direction + */ + function arg_info_get_direction(info: ArgInfo): Direction; + /** + * Obtain the ownership transfer for this argument. + * #GITransfer contains a list of possible values. + * @param info a #GIArgInfo + * @returns the transfer + */ + function arg_info_get_ownership_transfer(info: ArgInfo): Transfer; + /** + * Obtain the scope type for this argument. The scope type explains + * how a callback is going to be invoked, most importantly when + * the resources required to invoke it can be freed. + * #GIScopeType contains a list of possible values. + * @param info a #GIArgInfo + * @returns the scope type + */ + function arg_info_get_scope(info: ArgInfo): ScopeType; + /** + * Obtain the type information for #info. + * @param info a #GIArgInfo + * @returns the #GITypeInfo holding the type + * information for #info, free it with {@link G.base_info_unref} + * when done. + */ + function arg_info_get_type(info: ArgInfo): TypeInfo; + /** + * Obtain if the argument is a pointer to a struct or object that will + * receive an output of a function. The default assumption for + * %GI_DIRECTION_OUT arguments which have allocation is that the + * callee allocates; if this is %TRUE, then the caller must allocate. + * @param info a #GIArgInfo + * @returns %TRUE if caller is required to have allocated the argument + */ + function arg_info_is_caller_allocates(info: ArgInfo): boolean; + /** + * Obtain if the argument is optional. For 'out' arguments this means + * that you can pass %NULL in order to ignore the result. + * @param info a #GIArgInfo + * @returns %TRUE if it is an optional argument + */ + function arg_info_is_optional(info: ArgInfo): boolean; + /** + * Obtain if the argument is a return value. It can either be a + * parameter or a return value. + * @param info a #GIArgInfo + * @returns %TRUE if it is a return value + */ + function arg_info_is_return_value(info: ArgInfo): boolean; + /** + * Obtain if an argument is only useful in C. + * @param info a #GIArgInfo + * @returns %TRUE if argument is only useful in C. + */ + function arg_info_is_skip(info: ArgInfo): boolean; + /** + * Obtain information about a the type of given argument #info; this + * function is a variant of {@link G.arg_info_get_type} designed for stack + * allocation. + * + * The initialized #type must not be referenced after #info is deallocated. + * @param info a #GIArgInfo + * @returns Initialized with information about type of #info + */ + function arg_info_load_type(info: ArgInfo): TypeInfo; + /** + * Obtain if the type of the argument includes the possibility of %NULL. + * For 'in' values this means that %NULL is a valid value. For 'out' + * values, this means that %NULL may be returned. + * + * See also {@link G.arg_info_is_optional}. + * @param info a #GIArgInfo + * @returns %TRUE if the value may be %NULL + */ + function arg_info_may_be_null(info: ArgInfo): boolean; + /** + * TODO + * @param info a #GICallableInfo + * @returns %TRUE if this #GICallableInfo can throw a #GError + */ + function callable_info_can_throw_gerror(info: CallableInfo): boolean; + /** + * Obtain information about a particular argument of this callable. + * @param info a #GICallableInfo + * @param n the argument index to fetch + * @returns the #GIArgInfo. Free it with + * {@link G.base_info_unref} when done. + */ + function callable_info_get_arg(info: CallableInfo, n: number): ArgInfo; + /** + * See whether the caller owns the return value of this callable. + * #GITransfer contains a list of possible transfer values. + * @param info a #GICallableInfo + * @returns the transfer mode for the return value of the callable + */ + function callable_info_get_caller_owns(info: CallableInfo): Transfer; + /** + * Obtains the ownership transfer for the instance argument. + * #GITransfer contains a list of possible transfer values. + * @param info a #GICallableInfo + * @returns the transfer mode of the instance argument + */ + function callable_info_get_instance_ownership_transfer(info: CallableInfo): Transfer; + /** + * Obtain the number of arguments (both IN and OUT) for this callable. + * @param info a #GICallableInfo + * @returns The number of arguments this callable expects. + */ + function callable_info_get_n_args(info: CallableInfo): number; + /** + * Retrieve an arbitrary attribute associated with the return value. + * @param info a #GICallableInfo + * @param name a freeform string naming an attribute + * @returns The value of the attribute, or %NULL if no such attribute exists + */ + function callable_info_get_return_attribute(info: CallableInfo, name: string): string; + /** + * Obtain the return type of a callable item as a #GITypeInfo. + * @param info a #GICallableInfo + * @returns the #GITypeInfo. Free the struct by calling + * {@link G.base_info_unref} when done. + */ + function callable_info_get_return_type(info: CallableInfo): TypeInfo; + /** + * TODO + * @param info TODO + * @param _function TODO + * @param in_args TODO + * @param out_args TODO + * @param return_value TODO + * @param is_method TODO + * @param _throws TODO + * @returns + */ + function callable_info_invoke(info: CallableInfo, _function: any | null, in_args: Argument[], out_args: Argument[], return_value: Argument, is_method: boolean, _throws: boolean): boolean; + /** + * Determines if the callable info is a method. For #GIVFuncInfos, + * #GICallbackInfos, and #GISignalInfos, + * this is always true. Otherwise, this looks at the %GI_FUNCTION_IS_METHOD + * flag on the #GIFunctionInfo. + * + * Concretely, this function returns whether {@link G.callable_info_get_n_args} + * matches the number of arguments in the raw C method. For methods, there + * is one more C argument than is exposed by introspection: the "self" + * or "this" object. + * @param info a #GICallableInfo + * @returns %TRUE if #info is a method, %FALSE otherwise + */ + function callable_info_is_method(info: CallableInfo): boolean; + /** + * Iterate over all attributes associated with the return value. The + * iterator structure is typically stack allocated, and must have its + * first member initialized to %NULL. + * + * Both the #name and #value should be treated as constants + * and must not be freed. + * + * See {@link G.base_info_iterate_attributes} for an example of how to use a + * similar API. + * @param info a #GICallableInfo + * @returns %TRUE if there are more attributes + * + * Returned name, must not be freed + * + * Returned name, must not be freed + */ + function callable_info_iterate_return_attributes(info: CallableInfo): [ boolean, string, string ]; + /** + * Obtain information about a particular argument of this callable; this + * function is a variant of {@link G.callable_info_get_arg} designed for stack + * allocation. + * + * The initialized #arg must not be referenced after #info is deallocated. + * @param info a #GICallableInfo + * @param n the argument index to fetch + * @returns Initialize with argument number #n + */ + function callable_info_load_arg(info: CallableInfo, n: number): ArgInfo; + /** + * Obtain information about a return value of callable; this + * function is a variant of {@link G.callable_info_get_return_type} designed for stack + * allocation. + * + * The initialized #type must not be referenced after #info is deallocated. + * @param info a #GICallableInfo + * @returns Initialized with return type of #info + */ + function callable_info_load_return_type(info: CallableInfo): TypeInfo; + /** + * See if a callable could return %NULL. + * @param info a #GICallableInfo + * @returns %TRUE if callable could return %NULL + */ + function callable_info_may_return_null(info: CallableInfo): boolean; + /** + * See if a callable's return value is only useful in C. + * @param info a #GICallableInfo + * @returns %TRUE if return value is only useful in C. + */ + function callable_info_skip_return(info: CallableInfo): boolean; + function cclosure_marshal_generic(closure: GObject.Closure, return_gvalue: GObject.Value, n_param_values: number, param_values: GObject.Value, invocation_hint: any | null, marshal_data: any | null): void; + /** + * Free the value returned from {@link G.constant_info_get_value}. + * @param info a #GIConstantInfo + * @param value the argument + */ + function constant_info_free_value(info: ConstantInfo, value: Argument): void; + /** + * Obtain the type of the constant as a #GITypeInfo. + * @param info a #GIConstantInfo + * @returns the #GITypeInfo. Free the struct by calling + * {@link G.base_info_unref} when done. + */ + function constant_info_get_type(info: ConstantInfo): TypeInfo; + /** + * Obtain the value associated with the #GIConstantInfo and store it in the + * #value parameter. #argument needs to be allocated before passing it in. + * The size of the constant value stored in #argument will be returned. + * Free the value with {@link G.constant_info_free_value}. + * @param info a #GIConstantInfo + * @returns size of the constant + * + * an argument + */ + function constant_info_get_value(info: ConstantInfo): [ number, Argument ]; + /** + * Obtain the string form of the quark for the error domain associated with + * this enum, if any. + * @param info a #GIEnumInfo + * @returns the string form of the error domain associated + * with this enum, or %NULL. + */ + function enum_info_get_error_domain(info: EnumInfo): string; + /** + * Obtain an enum type method at index #n. + * @param info a #GIEnumInfo + * @param n index of method to get + * @returns the #GIFunctionInfo. Free the struct by calling + * {@link G.base_info_unref} when done. + */ + function enum_info_get_method(info: EnumInfo, n: number): FunctionInfo; + /** + * Obtain the number of methods that this enum type has. + * @param info a #GIEnumInfo + * @returns number of methods + */ + function enum_info_get_n_methods(info: EnumInfo): number; + /** + * Obtain the number of values this enumeration contains. + * @param info a #GIEnumInfo + * @returns the number of enumeration values + */ + function enum_info_get_n_values(info: EnumInfo): number; + /** + * Obtain the tag of the type used for the enum in the C ABI. This will + * will be a signed or unsigned integral type. + * + * Note that in the current implementation the width of the type is + * computed correctly, but the signed or unsigned nature of the type + * may not match the sign of the type used by the C compiler. + * @param info a #GIEnumInfo + * @returns the storage type for the enumeration + */ + function enum_info_get_storage_type(info: EnumInfo): TypeTag; + /** + * Obtain a value for this enumeration. + * @param info a #GIEnumInfo + * @param n index of value to fetch + * @returns the enumeration value or %NULL if type tag is wrong, + * free the struct with {@link G.base_info_unref} when done. + */ + function enum_info_get_value(info: EnumInfo, n: number): ValueInfo; + /** + * Reads a field identified by a #GIFieldInfo from a C structure or + * union. This only handles fields of simple C types. It will fail + * for a field of a composite type like a nested structure or union + * even if that is actually readable. + * @param field_info a #GIFieldInfo + * @param mem pointer to a block of memory representing a C structure or union + * @param value a #GIArgument into which to store the value retrieved + * @returns %TRUE if reading the field succeeded, otherwise %FALSE + */ + function field_info_get_field(field_info: FieldInfo, mem: any | null, value: Argument): boolean; + /** + * Obtain the flags for this #GIFieldInfo. See #GIFieldInfoFlags for possible + * flag values. + * @param info a #GIFieldInfo + * @returns the flags + */ + function field_info_get_flags(info: FieldInfo): FieldInfoFlags; + /** + * Obtain the offset in bytes of the field member, this is relative + * to the beginning of the struct or union. + * @param info a #GIFieldInfo + * @returns the field offset + */ + function field_info_get_offset(info: FieldInfo): number; + /** + * Obtain the size in bits of the field member, this is how + * much space you need to allocate to store the field. + * @param info a #GIFieldInfo + * @returns the field size + */ + function field_info_get_size(info: FieldInfo): number; + /** + * Obtain the type of a field as a #GITypeInfo. + * @param info a #GIFieldInfo + * @returns the #GITypeInfo. Free the struct by calling + * {@link G.base_info_unref} when done. + */ + function field_info_get_type(info: FieldInfo): TypeInfo; + /** + * Writes a field identified by a #GIFieldInfo to a C structure or + * union. This only handles fields of simple C types. It will fail + * for a field of a composite type like a nested structure or union + * even if that is actually writable. Note also that that it will refuse + * to write fields where memory management would by required. A field + * with a type such as 'char *' must be set with a setter function. + * @param field_info a #GIFieldInfo + * @param mem pointer to a block of memory representing a C structure or union + * @param value a #GIArgument holding the value to store + * @returns %TRUE if writing the field succeeded, otherwise %FALSE + */ + function field_info_set_field(field_info: FieldInfo, mem: any | null, value: Argument): boolean; + /** + * Obtain the #GIFunctionInfoFlags for the #info. + * @param info a #GIFunctionInfo + * @returns the flags + */ + function function_info_get_flags(info: FunctionInfo): FunctionInfoFlags; + /** + * Obtain the property associated with this #GIFunctionInfo. + * Only #GIFunctionInfo with the flag %GI_FUNCTION_IS_GETTER or + * %GI_FUNCTION_IS_SETTER have a property set. For other cases, + * %NULL will be returned. + * @param info a #GIFunctionInfo + * @returns the property or %NULL if not set. Free it with + * {@link G.base_info_unref} when done. + */ + function function_info_get_property(info: FunctionInfo): PropertyInfo; + /** + * Obtain the symbol of the function. The symbol is the name of the + * exported function, suitable to be used as an argument to + * {@link GModule.symbol}. + * @param info a #GIFunctionInfo + * @returns the symbol + */ + function function_info_get_symbol(info: FunctionInfo): string; + /** + * Obtain the virtual function associated with this #GIFunctionInfo. + * Only #GIFunctionInfo with the flag %GI_FUNCTION_WRAPS_VFUNC has + * a virtual function set. For other cases, %NULL will be returned. + * @param info a #GIFunctionInfo + * @returns the virtual function or %NULL if not set. + * Free it by calling {@link G.base_info_unref} when done. + */ + function function_info_get_vfunc(info: FunctionInfo): VFuncInfo; + /** + * Invokes the function described in #info with the given + * arguments. Note that inout parameters must appear in both + * argument lists. This function uses dlsym() to obtain a pointer + * to the function, so the library or shared object containing the + * described function must either be linked to the caller, or must + * have been g_module_symbol()ed before calling this function. + * @param info a #GIFunctionInfo describing the function to invoke + * @param in_args an array of #GIArguments, one for each in + * parameter of #info. If there are no in parameter, #in_args + * can be %NULL + * @param out_args an array of #GIArguments, one for each out + * parameter of #info. If there are no out parameters, #out_args + * may be %NULL + * @param return_value return location for the return value of the + * function. + * @returns %TRUE if the function has been invoked, %FALSE if an + * error occurred. + */ + function function_info_invoke(info: FunctionInfo, in_args: Argument[], out_args: Argument[], return_value: Argument): boolean; + /** + * Returns the major version number of the girepository library. + * (e.g. in version 1.58.2 this is 1.) + * @returns the major version number of the girepository library + */ + function get_major_version(): number; + /** + * Returns the micro version number of the girepository library. + * (e.g. in version 1.58.2 this is 2.) + * @returns the micro version number of the girepository library + */ + function get_micro_version(): number; + /** + * Returns the minor version number of the girepository library. + * (e.g. in version 1.58.2 this is 58.) + * @returns the minor version number of the girepository library + */ + function get_minor_version(): number; + /** + * TODO + * @param type TODO + * @param container TODO + * @param typelib TODO + * @param offset TODO + * @returns TODO + */ + function info_new(type: InfoType, container: BaseInfo, typelib: Typelib, offset: number): BaseInfo; + /** + * Obtain a string representation of #type + * @param type the info type + * @returns the string + */ + function info_type_to_string(type: InfoType): string; + /** + * Obtain a method of the interface type given a #name. %NULL will be + * returned if there's no method available with that name. + * @param info a #GIInterfaceInfo + * @param name name of method to obtain + * @returns the #GIFunctionInfo or %NULL if none found. + * Free the struct by calling {@link G.base_info_unref} when done. + */ + function interface_info_find_method(info: InterfaceInfo, name: string): FunctionInfo; + /** + * TODO + * @param info a #GIInterfaceInfo + * @param name Name of signal + * @returns Info for the signal with name #name in #info, or + * %NULL on failure. + */ + function interface_info_find_signal(info: InterfaceInfo, name: string): SignalInfo; + /** + * Locate a virtual function slot with name #name. See the documentation + * for {@link GObject.info_find_vfunc} for more information on virtuals. + * @param info a #GIInterfaceInfo + * @param name The name of a virtual function to find. + * @returns the #GIVFuncInfo, or %NULL. Free it with + * {@link G.base_info_unref} when done. + */ + function interface_info_find_vfunc(info: InterfaceInfo, name: string): VFuncInfo; + /** + * Obtain an interface type constant at index #n. + * @param info a #GIInterfaceInfo + * @param n index of constant to get + * @returns the #GIConstantInfo. Free the struct by calling + * {@link G.base_info_unref} when done. + */ + function interface_info_get_constant(info: InterfaceInfo, n: number): ConstantInfo; + /** + * Returns the layout C structure associated with this #GInterface. + * @param info a #GIInterfaceInfo + * @returns the #GIStructInfo or %NULL. Free it with + * {@link G.base_info_unref} when done. + */ + function interface_info_get_iface_struct(info: InterfaceInfo): StructInfo; + /** + * Obtain an interface type method at index #n. + * @param info a #GIInterfaceInfo + * @param n index of method to get + * @returns the #GIFunctionInfo. Free the struct by calling + * {@link G.base_info_unref} when done. + */ + function interface_info_get_method(info: InterfaceInfo, n: number): FunctionInfo; + /** + * Obtain the number of constants that this interface type has. + * @param info a #GIInterfaceInfo + * @returns number of constants + */ + function interface_info_get_n_constants(info: InterfaceInfo): number; + /** + * Obtain the number of methods that this interface type has. + * @param info a #GIInterfaceInfo + * @returns number of methods + */ + function interface_info_get_n_methods(info: InterfaceInfo): number; + /** + * Obtain the number of prerequisites for this interface type. + * A prerequisites is another interface that needs to be implemented for + * interface, similar to an base class for GObjects. + * @param info a #GIInterfaceInfo + * @returns number of prerequisites + */ + function interface_info_get_n_prerequisites(info: InterfaceInfo): number; + /** + * Obtain the number of properties that this interface type has. + * @param info a #GIInterfaceInfo + * @returns number of properties + */ + function interface_info_get_n_properties(info: InterfaceInfo): number; + /** + * Obtain the number of signals that this interface type has. + * @param info a #GIInterfaceInfo + * @returns number of signals + */ + function interface_info_get_n_signals(info: InterfaceInfo): number; + /** + * Obtain the number of virtual functions that this interface type has. + * @param info a #GIInterfaceInfo + * @returns number of virtual functions + */ + function interface_info_get_n_vfuncs(info: InterfaceInfo): number; + /** + * Obtain an interface type prerequisites index #n. + * @param info a #GIInterfaceInfo + * @param n index of prerequisites to get + * @returns the prerequisites as a #GIBaseInfo. Free the struct by calling + * {@link G.base_info_unref} when done. + */ + function interface_info_get_prerequisite(info: InterfaceInfo, n: number): BaseInfo; + /** + * Obtain an interface type property at index #n. + * @param info a #GIInterfaceInfo + * @param n index of property to get + * @returns the #GIPropertyInfo. Free the struct by calling + * {@link G.base_info_unref} when done. + */ + function interface_info_get_property(info: InterfaceInfo, n: number): PropertyInfo; + /** + * Obtain an interface type signal at index #n. + * @param info a #GIInterfaceInfo + * @param n index of signal to get + * @returns the #GISignalInfo. Free the struct by calling + * {@link G.base_info_unref} when done. + */ + function interface_info_get_signal(info: InterfaceInfo, n: number): SignalInfo; + /** + * Obtain an interface type virtual function at index #n. + * @param info a #GIInterfaceInfo + * @param n index of virtual function to get + * @returns the #GIVFuncInfo. Free the struct by calling + * {@link G.base_info_unref} when done. + */ + function interface_info_get_vfunc(info: InterfaceInfo, n: number): VFuncInfo; + /** + * TODO + * @returns TODO + */ + function invoke_error_quark(): GLib.Quark; + /** + * Obtain a method of the object type given a #name. %NULL will be + * returned if there's no method available with that name. + * @param info a #GIObjectInfo + * @param name name of method to obtain + * @returns the #GIFunctionInfo. Free the struct by calling + * {@link G.base_info_unref} when done. + */ + function object_info_find_method(info: ObjectInfo, name: string): FunctionInfo | null; + /** + * Obtain a method of the object given a #name, searching both the + * object #info and any interfaces it implements. %NULL will be + * returned if there's no method available with that name. + * + * Note that this function does *not* search parent classes; you will have + * to chain up if that's desired. + * @param info a #GIObjectInfo + * @param name name of method to obtain + * @returns the #GIFunctionInfo. Free the struct by calling + * {@link G.base_info_unref} when done. + * + * The implementor of the interface + */ + function object_info_find_method_using_interfaces(info: ObjectInfo, name: string): [ FunctionInfo | null, ObjectInfo ]; + /** + * TODO + * @param info a #GIObjectInfo + * @param name Name of signal + * @returns Info for the signal with name #name in #info, or %NULL on failure. + */ + function object_info_find_signal(info: ObjectInfo, name: string): SignalInfo | null; + /** + * Locate a virtual function slot with name #name. Note that the namespace + * for virtuals is distinct from that of methods; there may or may not be + * a concrete method associated for a virtual. If there is one, it may + * be retrieved using {@link G.vfunc_info_get_invoker}, otherwise %NULL will be + * returned. + * See the documentation for g_vfunc_info_get_invoker() for more + * information on invoking virtuals. + * @param info a #GIObjectInfo + * @param name The name of a virtual function to find. + * @returns the #GIVFuncInfo, or %NULL. Free it with + * {@link G.base_info_unref} when done. + */ + function object_info_find_vfunc(info: ObjectInfo, name: string): VFuncInfo | null; + /** + * Locate a virtual function slot with name #name, searching both the object + * #info and any interfaces it implements. Note that the namespace for + * virtuals is distinct from that of methods; there may or may not be a + * concrete method associated for a virtual. If there is one, it may be + * retrieved using {@link G.vfunc_info_get_invoker}, otherwise %NULL will be + * returned. + * + * Note that this function does *not* search parent classes; you will have + * to chain up if that's desired. + * @param info a #GIObjectInfo + * @param name name of vfunc to obtain + * @returns the #GIVFuncInfo. Free the struct by calling + * {@link G.base_info_unref} when done. + * + * The implementor of the interface + */ + function object_info_find_vfunc_using_interfaces(info: ObjectInfo, name: string): [ VFuncInfo | null, ObjectInfo ]; + /** + * Obtain if the object type is an abstract type, eg if it cannot be + * instantiated + * @param info a #GIObjectInfo + * @returns %TRUE if the object type is abstract + */ + function object_info_get_abstract(info: ObjectInfo): boolean; + /** + * Every #GObject has two structures; an instance structure and a class + * structure. This function returns the metadata for the class structure. + * @param info a #GIObjectInfo + * @returns the #GIStructInfo or %NULL. Free with + * {@link G.base_info_unref} when done. + */ + function object_info_get_class_struct(info: ObjectInfo): StructInfo | null; + /** + * Obtain an object type constant at index #n. + * @param info a #GIObjectInfo + * @param n index of constant to get + * @returns the #GIConstantInfo. Free the struct by calling + * {@link G.base_info_unref} when done. + */ + function object_info_get_constant(info: ObjectInfo, n: number): ConstantInfo; + /** + * Obtain an object type field at index #n. + * @param info a #GIObjectInfo + * @param n index of field to get + * @returns the #GIFieldInfo. Free the struct by calling + * {@link G.base_info_unref} when done. + */ + function object_info_get_field(info: ObjectInfo, n: number): FieldInfo; + /** + * Checks whether the object type is a final type, i.e. if it cannot + * be derived + * @param info a #GIObjectInfo + * @returns %TRUE if the object type is final + */ + function object_info_get_final(info: ObjectInfo): boolean; + /** + * Obtain if the object type is of a fundamental type which is not + * G_TYPE_OBJECT. This is mostly for supporting GstMiniObject. + * @param info a #GIObjectInfo + * @returns %TRUE if the object type is a fundamental type + */ + function object_info_get_fundamental(info: ObjectInfo): boolean; + /** + * Obtain the symbol name of the function that should be called to convert + * an object instance pointer of this object type to a GValue. + * I's mainly used fundamental types. The type signature for the symbol + * is %GIObjectInfoGetValueFunction, to fetch the function pointer + * see {@link GObject.info_get_get_value_function}. + * @param info a #GIObjectInfo + * @returns the symbol or %NULL + */ + function object_info_get_get_value_function(info: ObjectInfo): string | null; + /** + * Obtain a pointer to a function which can be used to + * extract an instance of this object type out of a GValue. + * This takes derivation into account and will reversely traverse + * the base classes of this type, starting at the top type. + * @param info a #GIObjectInfo + * @returns the function pointer or %NULL + */ + function object_info_get_get_value_function_pointer(info: ObjectInfo): ObjectInfoGetValueFunction | null; + /** + * Obtain an object type interface at index #n. + * @param info a #GIObjectInfo + * @param n index of interface to get + * @returns the #GIInterfaceInfo. Free the struct by calling + * {@link G.base_info_unref} when done. + */ + function object_info_get_interface(info: ObjectInfo, n: number): InterfaceInfo; + /** + * Obtain an object type method at index #n. + * @param info a #GIObjectInfo + * @param n index of method to get + * @returns the #GIFunctionInfo. Free the struct by calling + * {@link G.base_info_unref} when done. + */ + function object_info_get_method(info: ObjectInfo, n: number): FunctionInfo; + /** + * Obtain the number of constants that this object type has. + * @param info a #GIObjectInfo + * @returns number of constants + */ + function object_info_get_n_constants(info: ObjectInfo): number; + /** + * Obtain the number of fields that this object type has. + * @param info a #GIObjectInfo + * @returns number of fields + */ + function object_info_get_n_fields(info: ObjectInfo): number; + /** + * Obtain the number of interfaces that this object type has. + * @param info a #GIObjectInfo + * @returns number of interfaces + */ + function object_info_get_n_interfaces(info: ObjectInfo): number; + /** + * Obtain the number of methods that this object type has. + * @param info a #GIObjectInfo + * @returns number of methods + */ + function object_info_get_n_methods(info: ObjectInfo): number; + /** + * Obtain the number of properties that this object type has. + * @param info a #GIObjectInfo + * @returns number of properties + */ + function object_info_get_n_properties(info: ObjectInfo): number; + /** + * Obtain the number of signals that this object type has. + * @param info a #GIObjectInfo + * @returns number of signals + */ + function object_info_get_n_signals(info: ObjectInfo): number; + /** + * Obtain the number of virtual functions that this object type has. + * @param info a #GIObjectInfo + * @returns number of virtual functions + */ + function object_info_get_n_vfuncs(info: ObjectInfo): number; + /** + * Obtain the parent of the object type. + * @param info a #GIObjectInfo + * @returns the #GIObjectInfo. Free the struct by calling + * {@link G.base_info_unref} when done. + */ + function object_info_get_parent(info: ObjectInfo): ObjectInfo | null; + /** + * Obtain an object type property at index #n. + * @param info a #GIObjectInfo + * @param n index of property to get + * @returns the #GIPropertyInfo. Free the struct by calling + * {@link G.base_info_unref} when done. + */ + function object_info_get_property(info: ObjectInfo, n: number): PropertyInfo; + /** + * Obtain the symbol name of the function that should be called to ref this + * object type. It's mainly used fundamental types. The type signature for + * the symbol is %GIObjectInfoRefFunction, to fetch the function pointer + * see {@link GObject.info_get_ref_function}. + * @param info a #GIObjectInfo + * @returns the symbol or %NULL + */ + function object_info_get_ref_function(info: ObjectInfo): string | null; + /** + * Obtain a pointer to a function which can be used to + * increase the reference count an instance of this object type. + * This takes derivation into account and will reversely traverse + * the base classes of this type, starting at the top type. + * @param info a #GIObjectInfo + * @returns the function pointer or %NULL + */ + function object_info_get_ref_function_pointer(info: ObjectInfo): ObjectInfoRefFunction | null; + /** + * Obtain the symbol name of the function that should be called to convert + * set a GValue giving an object instance pointer of this object type. + * I's mainly used fundamental types. The type signature for the symbol + * is %GIObjectInfoSetValueFunction, to fetch the function pointer + * see {@link GObject.info_get_set_value_function}. + * @param info a #GIObjectInfo + * @returns the symbol or %NULL + */ + function object_info_get_set_value_function(info: ObjectInfo): string | null; + /** + * Obtain a pointer to a function which can be used to + * set a GValue given an instance of this object type. + * This takes derivation into account and will reversely traverse + * the base classes of this type, starting at the top type. + * @param info a #GIObjectInfo + * @returns the function pointer or %NULL + */ + function object_info_get_set_value_function_pointer(info: ObjectInfo): ObjectInfoSetValueFunction | null; + /** + * Obtain an object type signal at index #n. + * @param info a #GIObjectInfo + * @param n index of signal to get + * @returns the #GISignalInfo. Free the struct by calling + * {@link G.base_info_unref} when done. + */ + function object_info_get_signal(info: ObjectInfo, n: number): SignalInfo; + /** + * Obtain the function which when called will return the GType + * function for which this object type is registered. + * @param info a #GIObjectInfo + * @returns the type init function + */ + function object_info_get_type_init(info: ObjectInfo): string; + /** + * Obtain the name of the objects class/type. + * @param info a #GIObjectInfo + * @returns name of the objects type + */ + function object_info_get_type_name(info: ObjectInfo): string; + /** + * Obtain the symbol name of the function that should be called to unref this + * object type. It's mainly used fundamental types. The type signature for + * the symbol is %GIObjectInfoUnrefFunction, to fetch the function pointer + * see {@link GObject.info_get_unref_function}. + * @param info a #GIObjectInfo + * @returns the symbol or %NULL + */ + function object_info_get_unref_function(info: ObjectInfo): string | null; + /** + * Obtain a pointer to a function which can be used to + * decrease the reference count an instance of this object type. + * This takes derivation into account and will reversely traverse + * the base classes of this type, starting at the top type. + * @param info a #GIObjectInfo + * @returns the function pointer or %NULL + */ + function object_info_get_unref_function_pointer(info: ObjectInfo): ObjectInfoUnrefFunction | null; + /** + * Obtain an object type virtual function at index #n. + * @param info a #GIObjectInfo + * @param n index of virtual function to get + * @returns the #GIVFuncInfo. Free the struct by calling + * {@link G.base_info_unref} when done. + */ + function object_info_get_vfunc(info: ObjectInfo, n: number): VFuncInfo; + /** + * Obtain the flags for this property info. See #GParamFlags for + * more information about possible flag values. + * @param info a #GIPropertyInfo + * @returns the flags + */ + function property_info_get_flags(info: PropertyInfo): GObject.ParamFlags; + /** + * Obtains the getter function associated with this #GIPropertyInfo. + * + * The setter is only available for %G_PARAM_READABLE properties. + * @param info a #GIPropertyInfo + * @returns the function info or %NULL if not set. + * Free it with {@link G.base_info_unref} when done. + */ + function property_info_get_getter(info: PropertyInfo): FunctionInfo | null; + /** + * Obtain the ownership transfer for this property. See #GITransfer for more + * information about transfer values. + * @param info a #GIPropertyInfo + * @returns the transfer + */ + function property_info_get_ownership_transfer(info: PropertyInfo): Transfer; + /** + * Obtains the setter function associated with this #GIPropertyInfo. + * + * The setter is only available for %G_PARAM_WRITABLE properties that + * are also not %G_PARAM_CONSTRUCT_ONLY. + * @param info a #GIPropertyInfo + * @returns the function info or %NULL if not set. + * Free it with {@link G.base_info_unref} when done. + */ + function property_info_get_setter(info: PropertyInfo): FunctionInfo | null; + /** + * Obtain the type information for the property #info. + * @param info a #GIPropertyInfo + * @returns the #GITypeInfo, free it with + * {@link G.base_info_unref} when done. + */ + function property_info_get_type(info: PropertyInfo): TypeInfo; + /** + * Obtain the #GType for this registered type or G_TYPE_NONE which a special meaning. + * It means that either there is no type information associated with this #info or + * that the shared library which provides the type_init function for this + * #info cannot be called. + * @param info a #GIRegisteredTypeInfo + * @returns the #GType. + */ + function registered_type_info_get_g_type(info: RegisteredTypeInfo): GObject.Type; + /** + * Obtain the type init function for #info. The type init function is the + * function which will register the GType within the GObject type system. + * Usually this is not called by langauge bindings or applications, use + * {@link G.registered_type_info_get_g_type} directly instead. + * @param info a #GIRegisteredTypeInfo + * @returns the symbol name of the type init function, suitable for + * passing into {@link GModule.symbol}. + */ + function registered_type_info_get_type_init(info: RegisteredTypeInfo): string; + /** + * Obtain the type name of the struct within the GObject type system. + * This type can be passed to {@link G.type_name} to get a #GType. + * @param info a #GIRegisteredTypeInfo + * @returns the type name + */ + function registered_type_info_get_type_name(info: RegisteredTypeInfo): string; + /** + * Obtain the class closure for this signal if one is set. The class + * closure is a virtual function on the type that the signal belongs to. + * If the signal lacks a closure %NULL will be returned. + * @param info a #GISignalInfo + * @returns the class closure or %NULL + */ + function signal_info_get_class_closure(info: SignalInfo): VFuncInfo; + /** + * Obtain the flags for this signal info. See #GSignalFlags for + * more information about possible flag values. + * @param info a #GISignalInfo + * @returns the flags + */ + function signal_info_get_flags(info: SignalInfo): GObject.SignalFlags; + /** + * Obtain if the returning true in the signal handler will + * stop the emission of the signal. + * @param info a #GISignalInfo + * @returns %TRUE if returning true stops the signal emission + */ + function signal_info_true_stops_emit(info: SignalInfo): boolean; + /** + * Obtain the type information for field named #name. + * @param info a #GIStructInfo + * @param name a field name + * @returns the #GIFieldInfo or %NULL if not found, + * free it with {@link G.base_info_unref} when done. + */ + function struct_info_find_field(info: StructInfo, name: string): FieldInfo; + /** + * Obtain the type information for method named #name. + * @param info a #GIStructInfo + * @param name a method name + * @returns the #GIFunctionInfo, free it with {@link G.base_info_unref} + * when done. + */ + function struct_info_find_method(info: StructInfo, name: string): FunctionInfo; + /** + * Obtain the required alignment of the structure. + * @param info a #GIStructInfo + * @returns required alignment in bytes + */ + function struct_info_get_alignment(info: StructInfo): number; + /** + * Obtain the type information for field with specified index. + * @param info a #GIStructInfo + * @param n a field index + * @returns the #GIFieldInfo, free it with {@link G.base_info_unref} + * when done. + */ + function struct_info_get_field(info: StructInfo, n: number): FieldInfo; + /** + * Obtain the type information for method with specified index. + * @param info a #GIStructInfo + * @param n a method index + * @returns the #GIFunctionInfo, free it with {@link G.base_info_unref} + * when done. + */ + function struct_info_get_method(info: StructInfo, n: number): FunctionInfo; + /** + * Obtain the number of fields this structure has. + * @param info a #GIStructInfo + * @returns number of fields + */ + function struct_info_get_n_fields(info: StructInfo): number; + /** + * Obtain the number of methods this structure has. + * @param info a #GIStructInfo + * @returns number of methods + */ + function struct_info_get_n_methods(info: StructInfo): number; + /** + * Obtain the total size of the structure. + * @param info a #GIStructInfo + * @returns size of the structure in bytes + */ + function struct_info_get_size(info: StructInfo): number; + /** + * TODO + * @param info TODO + * @returns TODO + */ + function struct_info_is_foreign(info: StructInfo): boolean; + /** + * Return true if this structure represents the "class structure" for some + * #GObject or #GInterface. This function is mainly useful to hide this kind of structure + * from generated public APIs. + * @param info a #GIStructInfo + * @returns %TRUE if this is a class struct, %FALSE otherwise + */ + function struct_info_is_gtype_struct(info: StructInfo): boolean; + /** + * GLib data structures, such as #GList, #GSList, and #GHashTable, all store + * data pointers. + * In the case where the list or hash table is storing single types rather than + * structs, these data pointers may have values stuffed into them via macros + * such as %GPOINTER_TO_INT. + * + * Use this function to ensure that all values are correctly extracted from + * stuffed pointers, regardless of the machine's architecture or endianness. + * + * This function fills in the appropriate field of #arg with the value extracted + * from #hash_pointer, depending on the storage type of #info. + * @param info a #GITypeInfo + * @param hash_pointer A pointer, such as a #GHashTable data pointer + * @param arg A #GIArgument to fill in + */ + function type_info_argument_from_hash_pointer(info: TypeInfo, hash_pointer: any | null, arg: Argument): void; + /** + * Obtain the fixed array size of the type. The type tag must be a + * #GI_TYPE_TAG_ARRAY or -1 will be returned. + * @param info a #GITypeInfo + * @returns the size or -1 if it's not an array + */ + function type_info_get_array_fixed_size(info: TypeInfo): number; + /** + * Obtain the position of the argument which gives the array length of the type. + * The type tag must be a #GI_TYPE_TAG_ARRAY or -1 will be returned. + * @param info a #GITypeInfo + * @returns the array length, or -1 if the type is not an array + */ + function type_info_get_array_length(info: TypeInfo): number; + /** + * Obtain the array type for this type. See #GIArrayType for a list of + * possible values. If the type tag of this type is not array, -1 will be + * returned. + * @param info a #GITypeInfo + * @returns the array type or -1 + */ + function type_info_get_array_type(info: TypeInfo): ArrayType; + /** + * For types which have #GI_TYPE_TAG_INTERFACE such as GObjects and boxed values, + * this function returns full information about the referenced type. You can then + * inspect the type of the returned #GIBaseInfo to further query whether it is + * a concrete GObject, a GInterface, a structure, etc. using {@link G.base_info_get_type}. + * @param info a #GITypeInfo + * @returns the #GIBaseInfo, or %NULL. Free it with + * {@link G.base_info_unref} when done. + */ + function type_info_get_interface(info: TypeInfo): BaseInfo; + /** + * Obtain the parameter type #n. + * @param info a #GITypeInfo + * @param n index of the parameter + * @returns the param type info + */ + function type_info_get_param_type(info: TypeInfo, n: number): TypeInfo; + /** + * Obtain the type tag corresponding to the underlying storage type in C for + * the type. + * See #GITypeTag for a list of type tags. + * @param info a #GITypeInfo + * @returns the type tag + */ + function type_info_get_storage_type(info: TypeInfo): TypeTag; + /** + * Obtain the type tag for the type. See #GITypeTag for a list + * of type tags. + * @param info a #GITypeInfo + * @returns the type tag + */ + function type_info_get_tag(info: TypeInfo): TypeTag; + /** + * GLib data structures, such as #GList, #GSList, and #GHashTable, all store + * data pointers. + * In the case where the list or hash table is storing single types rather than + * structs, these data pointers may have values stuffed into them via macros + * such as %GPOINTER_TO_INT. + * + * Use this function to ensure that all values are correctly stuffed into + * pointers, regardless of the machine's architecture or endianness. + * + * This function returns a pointer stuffed with the appropriate field of #arg, + * depending on the storage type of #info. + * @param info a #GITypeInfo + * @param arg A #GIArgument with the value to stuff into a pointer + * @returns A stuffed pointer, that can be stored in a #GHashTable, for example + */ + function type_info_hash_pointer_from_argument(info: TypeInfo, arg: Argument): any | null; + /** + * Obtain if the type is passed as a reference. + * + * Note that the types of %GI_DIRECTION_OUT and %GI_DIRECTION_INOUT parameters + * will only be pointers if the underlying type being transferred is a pointer + * (i.e. only if the type of the C function’s formal parameter is a pointer to a + * pointer). + * @param info a #GITypeInfo + * @returns %TRUE if it is a pointer + */ + function type_info_is_pointer(info: TypeInfo): boolean; + /** + * Obtain if the last element of the array is %NULL. The type tag must be a + * #GI_TYPE_TAG_ARRAY or %FALSE will be returned. + * @param info a #GITypeInfo + * @returns %TRUE if zero terminated + */ + function type_info_is_zero_terminated(info: TypeInfo): boolean; + /** + * GLib data structures, such as #GList, #GSList, and #GHashTable, all store + * data pointers. + * In the case where the list or hash table is storing single types rather than + * structs, these data pointers may have values stuffed into them via macros + * such as %GPOINTER_TO_INT. + * + * Use this function to ensure that all values are correctly extracted from + * stuffed pointers, regardless of the machine's architecture or endianness. + * + * This function fills in the appropriate field of #arg with the value extracted + * from #hash_pointer, depending on #storage_type. + * @param storage_type a #GITypeTag obtained from {@link G.type_info_get_storage_type} + * @param hash_pointer A pointer, such as a #GHashTable data pointer + * @param arg A #GIArgument to fill in + */ + function type_tag_argument_from_hash_pointer(storage_type: TypeTag, hash_pointer: any | null, arg: Argument): void; + /** + * GLib data structures, such as #GList, #GSList, and #GHashTable, all store + * data pointers. + * In the case where the list or hash table is storing single types rather than + * structs, these data pointers may have values stuffed into them via macros + * such as %GPOINTER_TO_INT. + * + * Use this function to ensure that all values are correctly stuffed into + * pointers, regardless of the machine's architecture or endianness. + * + * This function returns a pointer stuffed with the appropriate field of #arg, + * depending on #storage_type. + * @param storage_type a #GITypeTag obtained from {@link G.type_info_get_storage_type} + * @param arg A #GIArgument with the value to stuff into a pointer + * @returns A stuffed pointer, that can be stored in a #GHashTable, for example + */ + function type_tag_hash_pointer_from_argument(storage_type: TypeTag, arg: Argument): any | null; + /** + * Obtain a string representation of #type + * @param type the type_tag + * @returns the string + */ + function type_tag_to_string(type: TypeTag): string; + /** + * Obtain the type information for method named #name. + * @param info a #GIUnionInfo + * @param name a method name + * @returns the #GIFunctionInfo, free it with {@link G.base_info_unref} + * when done. + */ + function union_info_find_method(info: UnionInfo, name: string): FunctionInfo; + /** + * Obtain the required alignment of the union. + * @param info a #GIUnionInfo + * @returns required alignment in bytes + */ + function union_info_get_alignment(info: UnionInfo): number; + /** + * Obtain discriminator value assigned for n-th union field, i.e. n-th + * union field is the active one if discriminator contains this + * constant. + * @param info a #GIUnionInfo + * @param n a union field index + * @returns the #GIConstantInfo, free it with {@link G.base_info_unref} + * when done. + */ + function union_info_get_discriminator(info: UnionInfo, n: number): ConstantInfo; + /** + * Returns offset of the discriminator field in the structure. + * @param info a #GIUnionInfo + * @returns offset in bytes of the discriminator + */ + function union_info_get_discriminator_offset(info: UnionInfo): number; + /** + * Obtain the type information of the union discriminator. + * @param info a #GIUnionInfo + * @returns the #GITypeInfo, free it with {@link G.base_info_unref} + * when done. + */ + function union_info_get_discriminator_type(info: UnionInfo): TypeInfo; + /** + * Obtain the type information for field with specified index. + * @param info a #GIUnionInfo + * @param n a field index + * @returns the #GIFieldInfo, free it with {@link G.base_info_unref} + * when done. + */ + function union_info_get_field(info: UnionInfo, n: number): FieldInfo; + /** + * Obtain the type information for method with specified index. + * @param info a #GIUnionInfo + * @param n a method index + * @returns the #GIFunctionInfo, free it with {@link G.base_info_unref} + * when done. + */ + function union_info_get_method(info: UnionInfo, n: number): FunctionInfo; + /** + * Obtain the number of fields this union has. + * @param info a #GIUnionInfo + * @returns number of fields + */ + function union_info_get_n_fields(info: UnionInfo): number; + /** + * Obtain the number of methods this union has. + * @param info a #GIUnionInfo + * @returns number of methods + */ + function union_info_get_n_methods(info: UnionInfo): number; + /** + * Obtain the total size of the union. + * @param info a #GIUnionInfo + * @returns size of the union in bytes + */ + function union_info_get_size(info: UnionInfo): number; + /** + * Return true if this union contains discriminator field. + * @param info a #GIUnionInfo + * @returns %TRUE if this is a discriminated union, %FALSE otherwise + */ + function union_info_is_discriminated(info: UnionInfo): boolean; + /** + * Obtain the enumeration value of the #GIValueInfo. + * @param info a #GIValueInfo + * @returns the enumeration value. This will always be representable + * as a 32-bit signed or unsigned value. The use of gint64 as the + * return type is to allow both. + */ + function value_info_get_value(info: ValueInfo): number; + /** + * This method will look up where inside the type struct of #implementor_gtype + * is the implementation for #info. + * @param info a #GIVFuncInfo + * @param implementor_gtype #GType implementing this virtual function + * @returns address to a function or %NULL if an error happened + */ + function vfunc_info_get_address(info: VFuncInfo, implementor_gtype: GObject.Type): any | null; + /** + * Obtain the flags for this virtual function info. See #GIVFuncInfoFlags for + * more information about possible flag values. + * @param info a #GIVFuncInfo + * @returns the flags + */ + function vfunc_info_get_flags(info: VFuncInfo): VFuncInfoFlags; + /** + * If this virtual function has an associated invoker method, this + * method will return it. An invoker method is a C entry point. + * + * Not all virtuals will have invokers. + * @param info a #GIVFuncInfo + * @returns the #GIVFuncInfo or %NULL. Free it with + * {@link G.base_info_unref} when done. + */ + function vfunc_info_get_invoker(info: VFuncInfo): FunctionInfo; + /** + * Obtain the offset of the function pointer in the class struct. The value + * 0xFFFF indicates that the struct offset is unknown. + * @param info a #GIVFuncInfo + * @returns the struct offset or 0xFFFF if it's unknown + */ + function vfunc_info_get_offset(info: VFuncInfo): number; + /** + * Obtain the signal for the virtual function if one is set. + * The signal comes from the object or interface to which + * this virtual function belongs. + * @param info a #GIVFuncInfo + * @returns the signal or %NULL if none set + */ + function vfunc_info_get_signal(info: VFuncInfo): SignalInfo; + /** + * Invokes the function described in #info with the given + * arguments. Note that inout parameters must appear in both + * argument lists. + * @param info a #GIVFuncInfo describing the virtual function to invoke + * @param implementor #GType of the type that implements this virtual function + * @param in_args an array of #GIArguments, one for each in + * parameter of #info. If there are no in parameter, #in_args + * can be %NULL + * @param out_args an array of #GIArguments, one for each out + * parameter of #info. If there are no out parameters, #out_args + * may be %NULL + * @param return_value return location for the return value of the + * function. If the function returns void, #return_value may be + * %NULL + * @returns %TRUE if the function has been invoked, %FALSE if an + * error occurred. + */ + function vfunc_info_invoke(info: VFuncInfo, implementor: GObject.Type, in_args: Argument[], out_args: Argument[], return_value: Argument): boolean; + /** + * The major version number of the girepository library. + * @returns The major version number of the girepository library. + */ + const MAJOR_VERSION: number; + + /** + * The micro version number of the girepository library. + * @returns The micro version number of the girepository library. + */ + const MICRO_VERSION: number; + + /** + * The minor version number of the girepository library. + * @returns The minor version number of the girepository library. + */ + const MINOR_VERSION: number; + + /** + * TODO + * @returns TODO + */ + const TYPE_TAG_N_TYPES: number; + +} \ No newline at end of file diff --git a/gir/GLib-2.0.d.ts b/gir/GLib-2.0.d.ts new file mode 100644 index 0000000000..06138e3aa1 --- /dev/null +++ b/gir/GLib-2.0.d.ts @@ -0,0 +1,31660 @@ +/** Generated with https://github.com/Gr3q/GIR2TS - If possible do not modify. */ +declare namespace imports.gi.GLib { + export interface ArrayInitOptions {} + /** + * Contains the public fields of a GArray. + */ + interface Array {} + class Array { + public constructor(options?: Partial); + /** + * Adds #len elements onto the end of the array. + * @param array a #GArray + * @param data a pointer to the elements to append to the end of the array + * @param len the number of elements to append + * @returns the #GArray + */ + public static append_vals(array: any[], data: any, len: number): any[]; + /** + * Checks whether #target exists in #array by performing a binary + * search based on the given comparison function #compare_func which + * get pointers to items as arguments. If the element is found, %TRUE + * is returned and the element’s index is returned in #out_match_index + * (if non-%NULL). Otherwise, %FALSE is returned and #out_match_index + * is undefined. If #target exists multiple times in #array, the index + * of the first instance is returned. This search is using a binary + * search, so the #array must absolutely be sorted to return a correct + * result (if not, the function may produce false-negative). + * + * This example defines a comparison function and search an element in a #GArray: + * |[ + * static gint* + * cmpint (gconstpointer a, gconstpointer b) + * { + * const gint *_a = a; + * const gint *_b = b; + * + * return *_a - *_b; + * } + * ... + * gint i = 424242; + * guint matched_index; + * gboolean result = g_array_binary_search (garray, &i, cmpint, &matched_index); + * ... + * ]| + * @param array a #GArray. + * @param target a pointer to the item to look up. + * @param compare_func A #GCompareFunc used to locate #target. + * @returns %TRUE if #target is one of the elements of #array, %FALSE otherwise. + * + * return location + * for the index of the element, if found. + */ + public static binary_search(array: any[], target: any | null, compare_func: CompareFunc): [ boolean, number | null ]; + /** + * Create a shallow copy of a #GArray. If the array elements consist of + * pointers to data, the pointers are copied but the actual data is not. + * @param array A #GArray. + * @returns A copy of #array. + */ + public static copy(array: any[]): any[]; + /** + * Frees the memory allocated for the #GArray. If #free_segment is + * %TRUE it frees the memory block holding the elements as well. Pass + * %FALSE if you want to free the #GArray wrapper but preserve the + * underlying array for use elsewhere. If the reference count of + * #array is greater than one, the #GArray wrapper is preserved but + * the size of #array will be set to zero. + * + * If array contents point to dynamically-allocated memory, they should + * be freed separately if #free_seg is %TRUE and no #clear_func + * function has been set for #array. + * + * This function is not thread-safe. If using a #GArray from multiple + * threads, use only the atomic {@link G.array_ref} and g_array_unref() + * functions. + * @param array a #GArray + * @param free_segment if %TRUE the actual element data is freed as well + * @returns the element data if #free_segment is %FALSE, otherwise + * %NULL. The element data should be freed using {@link G.free}. + */ + public static free(array: any[], free_segment: boolean): string; + /** + * Gets the size of the elements in #array. + * @param array A #GArray + * @returns Size of each element, in bytes + */ + public static get_element_size(array: any[]): number; + /** + * Inserts #len elements into a #GArray at the given index. + * + * If #index_ is greater than the array’s current length, the array is expanded. + * The elements between the old end of the array and the newly inserted elements + * will be initialised to zero if the array was configured to clear elements; + * otherwise their values will be undefined. + * + * If #index_ is less than the array’s current length, new entries will be + * inserted into the array, and the existing entries above #index_ will be moved + * upwards. + * + * #data may be %NULL if (and only if) #len is zero. If #len is zero, this + * function is a no-op. + * @param array a #GArray + * @param index_ the index to place the elements at + * @param data a pointer to the elements to insert + * @param len the number of elements to insert + * @returns the #GArray + */ + public static insert_vals(array: any[], index_: number, data: any | null, len: number): any[]; + /** + * Creates a new #GArray with a reference count of 1. + * @param zero_terminated %TRUE if the array should have an extra element at + * the end which is set to 0 + * @param clear_ %TRUE if #GArray elements should be automatically cleared + * to 0 when they are allocated + * @param element_size the size of each element in bytes + * @returns the new #GArray + */ + public static new(zero_terminated: boolean, clear_: boolean, element_size: number): any[]; + /** + * Adds #len elements onto the start of the array. + * + * #data may be %NULL if (and only if) #len is zero. If #len is zero, this + * function is a no-op. + * + * This operation is slower than {@link G.array_append_vals} since the + * existing elements in the array have to be moved to make space for + * the new elements. + * @param array a #GArray + * @param data a pointer to the elements to prepend to the start of the array + * @param len the number of elements to prepend, which may be zero + * @returns the #GArray + */ + public static prepend_vals(array: any[], data: any | null, len: number): any[]; + /** + * Atomically increments the reference count of #array by one. + * This function is thread-safe and may be called from any thread. + * @param array A #GArray + * @returns The passed in #GArray + */ + public static ref(array: any[]): any[]; + /** + * Removes the element at the given index from a #GArray. The following + * elements are moved down one place. + * @param array a #GArray + * @param index_ the index of the element to remove + * @returns the #GArray + */ + public static remove_index(array: any[], index_: number): any[]; + /** + * Removes the element at the given index from a #GArray. The last + * element in the array is used to fill in the space, so this function + * does not preserve the order of the #GArray. But it is faster than + * {@link G.array_remove_index}. + * @param array a #GArray + * @param index_ the index of the element to remove + * @returns the #GArray + */ + public static remove_index_fast(array: any[], index_: number): any[]; + /** + * Removes the given number of elements starting at the given index + * from a #GArray. The following elements are moved to close the gap. + * @param array a #GArray + * @param index_ the index of the first element to remove + * @param length the number of elements to remove + * @returns the #GArray + */ + public static remove_range(array: any[], index_: number, length: number): any[]; + /** + * Sets a function to clear an element of #array. + * + * The #clear_func will be called when an element in the array + * data segment is removed and when the array is freed and data + * segment is deallocated as well. #clear_func will be passed a + * pointer to the element to clear, rather than the element itself. + * + * Note that in contrast with other uses of #GDestroyNotify + * functions, #clear_func is expected to clear the contents of + * the array element it is given, but not free the element itself. + * + * |[ + * typedef struct + * { + * gchar *str; + * GObject *obj; + * } ArrayElement; + * + * static void + * array_element_clear (ArrayElement *element) + * { + * g_clear_pointer (&element->str, g_free); + * g_clear_object (&element->obj); + * } + * + * // main code + * GArray *garray = g_array_new (FALSE, FALSE, sizeof (ArrayElement)); + * g_array_set_clear_func (garray, (GDestroyNotify) array_element_clear); + * // assign data to the structure + * g_array_free (garray, TRUE); + * ]| + * @param array A #GArray + */ + public static set_clear_func(array: any[]): void; + /** + * Sets the size of the array, expanding it if necessary. If the array + * was created with #clear_ set to %TRUE, the new elements are set to 0. + * @param array a #GArray + * @param length the new size of the #GArray + * @returns the #GArray + */ + public static set_size(array: any[], length: number): any[]; + /** + * Creates a new #GArray with #reserved_size elements preallocated and + * a reference count of 1. This avoids frequent reallocation, if you + * are going to add many elements to the array. Note however that the + * size of the array is still 0. + * @param zero_terminated %TRUE if the array should have an extra element at + * the end with all bits cleared + * @param clear_ %TRUE if all bits in the array should be cleared to 0 on + * allocation + * @param element_size size of each element in the array + * @param reserved_size number of elements preallocated + * @returns the new #GArray + */ + public static sized_new(zero_terminated: boolean, clear_: boolean, element_size: number, reserved_size: number): any[]; + /** + * Sorts a #GArray using #compare_func which should be a qsort()-style + * comparison function (returns less than zero for first arg is less + * than second arg, zero for equal, greater zero if first arg is + * greater than second arg). + * + * This is guaranteed to be a stable sort since version 2.32. + * @param array a #GArray + * @param compare_func comparison function + */ + public static sort(array: any[], compare_func: CompareFunc): void; + /** + * Like {@link G.array_sort}, but the comparison function receives an extra + * user data argument. + * + * This is guaranteed to be a stable sort since version 2.32. + * + * There used to be a comment here about making the sort stable by + * using the addresses of the elements in the comparison function. + * This did not actually work, so any such code should be removed. + * @param array a #GArray + * @param compare_func comparison function + */ + public static sort_with_data(array: any[], compare_func: CompareDataFunc): void; + /** + * Frees the data in the array and resets the size to zero, while + * the underlying array is preserved for use elsewhere and returned + * to the caller. + * + * If the array was created with the #zero_terminate property + * set to %TRUE, the returned data is zero terminated too. + * + * If array elements contain dynamically-allocated memory, + * the array elements should also be freed by the caller. + * + * A short example of use: + * |[ + * ... + * gpointer data; + * gsize data_len; + * data = g_array_steal (some_array, &data_len); + * ... + * ]| + * @param array a #GArray. + * @returns the element data, which should be + * freed using {@link G.free}. + * + * pointer to retrieve the number of + * elements of the original array + */ + public static steal(array: any[]): [ any | null, number | null ]; + /** + * Atomically decrements the reference count of #array by one. If the + * reference count drops to 0, all memory allocated by the array is + * released. This function is thread-safe and may be called from any + * thread. + * @param array A #GArray + */ + public static unref(array: any[]): void; + /** + * a pointer to the element data. The data may be moved as + * elements are added to the #GArray. + */ + public data: string; + /** + * the number of elements in the #GArray not including the + * possible terminating zero element. + */ + public len: number; + } + + export interface AsyncQueueInitOptions {} + /** + * An opaque data structure which represents an asynchronous queue. + * + * It should only be accessed through the `g_async_queue_*` functions. + */ + interface AsyncQueue {} + class AsyncQueue { + public constructor(options?: Partial); + /** + * Creates a new asynchronous queue. + * @returns a new #GAsyncQueue. Free with {@link G.async_queue_unref} + */ + public static new(): AsyncQueue; + /** + * Creates a new asynchronous queue and sets up a destroy notify + * function that is used to free any remaining queue items when + * the queue is destroyed after the final unref. + * @returns a new #GAsyncQueue. Free with {@link G.async_queue_unref} + */ + public static new_full(): AsyncQueue; + /** + * Returns the length of the queue. + * + * Actually this function returns the number of data items in + * the queue minus the number of waiting threads, so a negative + * value means waiting threads, and a positive value means available + * entries in the #queue. A return value of 0 could mean n entries + * in the queue and n threads waiting. This can happen due to locking + * of the queue or due to scheduling. + * @returns the length of the #queue + */ + public length(): number; + /** + * Returns the length of the queue. + * + * Actually this function returns the number of data items in + * the queue minus the number of waiting threads, so a negative + * value means waiting threads, and a positive value means available + * entries in the #queue. A return value of 0 could mean n entries + * in the queue and n threads waiting. This can happen due to locking + * of the queue or due to scheduling. + * + * This function must be called while holding the #queue's lock. + * @returns the length of the #queue. + */ + public length_unlocked(): number; + /** + * Acquires the #queue's lock. If another thread is already + * holding the lock, this call will block until the lock + * becomes available. + * + * Call {@link G.async_queue_unlock} to drop the lock again. + * + * While holding the lock, you can only call the + * g_async_queue_*_unlocked() functions on #queue. Otherwise, + * deadlock may occur. + */ + public lock(): void; + /** + * Pops data from the #queue. If #queue is empty, this function + * blocks until data becomes available. + * @returns data from the queue + */ + public pop(): any | null; + /** + * Pops data from the #queue. If #queue is empty, this function + * blocks until data becomes available. + * + * This function must be called while holding the #queue's lock. + * @returns data from the queue. + */ + public pop_unlocked(): any | null; + /** + * Pushes the #data into the #queue. #data must not be %NULL. + * @param data #data to push into the #queue + */ + public push(data?: any | null): void; + /** + * Pushes the #item into the #queue. #item must not be %NULL. + * In contrast to {@link G.async_queue_push}, this function + * pushes the new item ahead of the items already in the queue, + * so that it will be the next one to be popped off the queue. + * @param item data to push into the #queue + */ + public push_front(item?: any | null): void; + /** + * Pushes the #item into the #queue. #item must not be %NULL. + * In contrast to {@link G.async_queue_push_unlocked}, this function + * pushes the new item ahead of the items already in the queue, + * so that it will be the next one to be popped off the queue. + * + * This function must be called while holding the #queue's lock. + * @param item data to push into the #queue + */ + public push_front_unlocked(item?: any | null): void; + /** + * Inserts #data into #queue using #func to determine the new + * position. + * + * This function requires that the #queue is sorted before pushing on + * new elements, see {@link G.async_queue_sort}. + * + * This function will lock #queue before it sorts the queue and unlock + * it when it is finished. + * + * For an example of #func see g_async_queue_sort(). + * @param data the #data to push into the #queue + * @param func the #GCompareDataFunc is used to sort #queue + */ + public push_sorted(data: any | null, func: CompareDataFunc): void; + /** + * Inserts #data into #queue using #func to determine the new + * position. + * + * The sort function #func is passed two elements of the #queue. + * It should return 0 if they are equal, a negative value if the + * first element should be higher in the #queue or a positive value + * if the first element should be lower in the #queue than the second + * element. + * + * This function requires that the #queue is sorted before pushing on + * new elements, see {@link G.async_queue_sort}. + * + * This function must be called while holding the #queue's lock. + * + * For an example of #func see g_async_queue_sort(). + * @param data the #data to push into the #queue + * @param func the #GCompareDataFunc is used to sort #queue + */ + public push_sorted_unlocked(data: any | null, func: CompareDataFunc): void; + /** + * Pushes the #data into the #queue. #data must not be %NULL. + * + * This function must be called while holding the #queue's lock. + * @param data #data to push into the #queue + */ + public push_unlocked(data?: any | null): void; + /** + * Increases the reference count of the asynchronous #queue by 1. + * You do not need to hold the lock to call this function. + * @returns the #queue that was passed in (since 2.6) + */ + public ref(): AsyncQueue; + /** + * @deprecated + * Reference counting is done atomically. + * so {@link G.async_queue_ref} can be used regardless of the #queue's + * lock. + * + * Increases the reference count of the asynchronous #queue by 1. + */ + public ref_unlocked(): void; + /** + * Remove an item from the queue. + * @param item the data to remove from the #queue + * @returns %TRUE if the item was removed + */ + public remove(item?: any | null): boolean; + /** + * Remove an item from the queue. + * + * This function must be called while holding the #queue's lock. + * @param item the data to remove from the #queue + * @returns %TRUE if the item was removed + */ + public remove_unlocked(item?: any | null): boolean; + /** + * Sorts #queue using #func. + * + * The sort function #func is passed two elements of the #queue. + * It should return 0 if they are equal, a negative value if the + * first element should be higher in the #queue or a positive value + * if the first element should be lower in the #queue than the second + * element. + * + * This function will lock #queue before it sorts the queue and unlock + * it when it is finished. + * + * If you were sorting a list of priority numbers to make sure the + * lowest priority would be at the top of the queue, you could use: + * |[ + * gint32 id1; + * gint32 id2; + * + * id1 = GPOINTER_TO_INT (element1); + * id2 = GPOINTER_TO_INT (element2); + * + * return (id1 > id2 ? +1 : id1 == id2 ? 0 : -1); + * ]| + * @param func the #GCompareDataFunc is used to sort #queue + */ + public sort(func: CompareDataFunc): void; + /** + * Sorts #queue using #func. + * + * The sort function #func is passed two elements of the #queue. + * It should return 0 if they are equal, a negative value if the + * first element should be higher in the #queue or a positive value + * if the first element should be lower in the #queue than the second + * element. + * + * This function must be called while holding the #queue's lock. + * @param func the #GCompareDataFunc is used to sort #queue + */ + public sort_unlocked(func: CompareDataFunc): void; + /** + * @deprecated + * use {@link G.async_queue_timeout_pop}. + * + * Pops data from the #queue. If the queue is empty, blocks until + * #end_time or until data becomes available. + * + * If no data is received before #end_time, %NULL is returned. + * + * To easily calculate #end_time, a combination of {@link G.get_real_time} + * and g_time_val_add() can be used. + * @param end_time a #GTimeVal, determining the final time + * @returns data from the queue or %NULL, when no data is + * received before #end_time. + */ + public timed_pop(end_time: TimeVal): any | null; + /** + * @deprecated + * use {@link G.async_queue_timeout_pop_unlocked}. + * + * Pops data from the #queue. If the queue is empty, blocks until + * #end_time or until data becomes available. + * + * If no data is received before #end_time, %NULL is returned. + * + * To easily calculate #end_time, a combination of {@link G.get_real_time} + * and g_time_val_add() can be used. + * + * This function must be called while holding the #queue's lock. + * @param end_time a #GTimeVal, determining the final time + * @returns data from the queue or %NULL, when no data is + * received before #end_time. + */ + public timed_pop_unlocked(end_time: TimeVal): any | null; + /** + * Pops data from the #queue. If the queue is empty, blocks for + * #timeout microseconds, or until data becomes available. + * + * If no data is received before the timeout, %NULL is returned. + * @param timeout the number of microseconds to wait + * @returns data from the queue or %NULL, when no data is + * received before the timeout. + */ + public timeout_pop(timeout: number): any | null; + /** + * Pops data from the #queue. If the queue is empty, blocks for + * #timeout microseconds, or until data becomes available. + * + * If no data is received before the timeout, %NULL is returned. + * + * This function must be called while holding the #queue's lock. + * @param timeout the number of microseconds to wait + * @returns data from the queue or %NULL, when no data is + * received before the timeout. + */ + public timeout_pop_unlocked(timeout: number): any | null; + /** + * Tries to pop data from the #queue. If no data is available, + * %NULL is returned. + * @returns data from the queue or %NULL, when no data is + * available immediately. + */ + public try_pop(): any | null; + /** + * Tries to pop data from the #queue. If no data is available, + * %NULL is returned. + * + * This function must be called while holding the #queue's lock. + * @returns data from the queue or %NULL, when no data is + * available immediately. + */ + public try_pop_unlocked(): any | null; + /** + * Releases the queue's lock. + * + * Calling this function when you have not acquired + * the with {@link G.async_queue_lock} leads to undefined + * behaviour. + */ + public unlock(): void; + /** + * Decreases the reference count of the asynchronous #queue by 1. + * + * If the reference count went to 0, the #queue will be destroyed + * and the memory allocated will be freed. So you are not allowed + * to use the #queue afterwards, as it might have disappeared. + * You do not need to hold the lock to call this function. + */ + public unref(): void; + /** + * @deprecated + * Reference counting is done atomically. + * so {@link G.async_queue_unref} can be used regardless of the #queue's + * lock. + * + * Decreases the reference count of the asynchronous #queue by 1 + * and releases the lock. This function must be called while holding + * the #queue's lock. If the reference count went to 0, the #queue + * will be destroyed and the memory allocated will be freed. + */ + public unref_and_unlock(): void; + } + + export interface BookmarkFileInitOptions {} + /** + * An opaque data structure representing a set of bookmarks. + */ + interface BookmarkFile {} + class BookmarkFile { + public constructor(options?: Partial); + public static error_quark(): Quark; + /** + * Creates a new empty #GBookmarkFile object. + * + * Use {@link G.bookmark_file_load_from_file}, g_bookmark_file_load_from_data() + * or g_bookmark_file_load_from_data_dirs() to read an existing bookmark + * file. + * @returns an empty #GBookmarkFile + */ + public static new(): BookmarkFile; + /** + * Adds the application with #name and #exec to the list of + * applications that have registered a bookmark for #uri into + * #bookmark. + * + * Every bookmark inside a #GBookmarkFile must have at least an + * application registered. Each application must provide a name, a + * command line useful for launching the bookmark, the number of times + * the bookmark has been registered by the application and the last + * time the application registered this bookmark. + * + * If #name is %NULL, the name of the application will be the + * same returned by {@link G.get_application_name}; if #exec is %NULL, the + * command line will be a composition of the program name as + * returned by g_get_prgname() and the "\%u" modifier, which will be + * expanded to the bookmark's URI. + * + * This function will automatically take care of updating the + * registrations count and timestamping in case an application + * with the same #name had already registered a bookmark for + * #uri inside #bookmark. + * + * If no bookmark for #uri is found, one is created. + * @param uri a valid URI + * @param name the name of the application registering the bookmark + * or %NULL + * @param exec command line to be used to launch the bookmark or %NULL + */ + public add_application(uri: string, name?: string | null, exec?: string | null): void; + /** + * Adds #group to the list of groups to which the bookmark for #uri + * belongs to. + * + * If no bookmark for #uri is found then it is created. + * @param uri a valid URI + * @param group the group name to be added + */ + public add_group(uri: string, group: string): void; + /** + * Frees a #GBookmarkFile. + */ + public free(): void; + /** + * @deprecated + * Use {@link G.bookmark_file_get_added_date_time} instead, as + * `time_t` is deprecated due to the year 2038 problem. + * + * Gets the time the bookmark for #uri was added to #bookmark + * + * In the event the URI cannot be found, -1 is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @param uri a valid URI + * @returns a timestamp + */ + public get_added(uri: string): number; + /** + * Gets the time the bookmark for #uri was added to #bookmark + * + * In the event the URI cannot be found, %NULL is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @param uri a valid URI + * @returns a #GDateTime + */ + public get_added_date_time(uri: string): DateTime; + /** + * @deprecated + * Use {@link G.bookmark_file_get_application_info} instead, as + * `time_t` is deprecated due to the year 2038 problem. + * + * Gets the registration information of #app_name for the bookmark for + * #uri. See {@link G.bookmark_file_set_application_info} for more information about + * the returned data. + * + * The string returned in #app_exec must be freed. + * + * In the event the URI cannot be found, %FALSE is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the + * event that no application with name #app_name has registered a bookmark + * for #uri, %FALSE is returned and error is set to + * #G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. In the event that unquoting + * the command line fails, an error of the #G_SHELL_ERROR domain is + * set and %FALSE is returned. + * @param uri a valid URI + * @param name an application's name + * @returns %TRUE on success. + * + * return location for the command line of the application, or %NULL + * + * return location for the registration count, or %NULL + * + * return location for the last registration time, or %NULL + */ + public get_app_info(uri: string, name: string): [ boolean, string | null, number | null, number | null ]; + /** + * Gets the registration information of #app_name for the bookmark for + * #uri. See {@link G.bookmark_file_set_application_info} for more information about + * the returned data. + * + * The string returned in #app_exec must be freed. + * + * In the event the URI cannot be found, %FALSE is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the + * event that no application with name #app_name has registered a bookmark + * for #uri, %FALSE is returned and error is set to + * #G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. In the event that unquoting + * the command line fails, an error of the #G_SHELL_ERROR domain is + * set and %FALSE is returned. + * @param uri a valid URI + * @param name an application's name + * @returns %TRUE on success. + * + * return location for the command line of the application, or %NULL + * + * return location for the registration count, or %NULL + * + * return location for the last registration time, or %NULL + */ + public get_application_info(uri: string, name: string): [ boolean, string | null, number | null, DateTime | null ]; + /** + * Retrieves the names of the applications that have registered the + * bookmark for #uri. + * + * In the event the URI cannot be found, %NULL is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @param uri a valid URI + * @returns a newly allocated %NULL-terminated array of strings. + * Use {@link G.strfreev} to free it. + * + * return location of the length of the returned list, or %NULL + */ + public get_applications(uri: string): [ string[], number | null ]; + /** + * Retrieves the description of the bookmark for #uri. + * + * In the event the URI cannot be found, %NULL is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @param uri a valid URI + * @returns a newly allocated string or %NULL if the specified + * URI cannot be found. + */ + public get_description(uri: string): string; + /** + * Retrieves the list of group names of the bookmark for #uri. + * + * In the event the URI cannot be found, %NULL is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * + * The returned array is %NULL terminated, so #length may optionally + * be %NULL. + * @param uri a valid URI + * @returns a newly allocated %NULL-terminated array of group names. + * Use {@link G.strfreev} to free it. + * + * return location for the length of the returned string, or %NULL + */ + public get_groups(uri: string): [ string[], number | null ]; + /** + * Gets the icon of the bookmark for #uri. + * + * In the event the URI cannot be found, %FALSE is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @param uri a valid URI + * @returns %TRUE if the icon for the bookmark for the URI was found. + * You should free the returned strings. + * + * return location for the icon's location or %NULL + * + * return location for the icon's MIME type or %NULL + */ + public get_icon(uri: string): [ boolean, string | null, string | null ]; + /** + * Gets whether the private flag of the bookmark for #uri is set. + * + * In the event the URI cannot be found, %FALSE is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the + * event that the private flag cannot be found, %FALSE is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_INVALID_VALUE. + * @param uri a valid URI + * @returns %TRUE if the private flag is set, %FALSE otherwise. + */ + public get_is_private(uri: string): boolean; + /** + * Retrieves the MIME type of the resource pointed by #uri. + * + * In the event the URI cannot be found, %NULL is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the + * event that the MIME type cannot be found, %NULL is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_INVALID_VALUE. + * @param uri a valid URI + * @returns a newly allocated string or %NULL if the specified + * URI cannot be found. + */ + public get_mime_type(uri: string): string; + /** + * @deprecated + * Use {@link G.bookmark_file_get_modified_date_time} instead, as + * `time_t` is deprecated due to the year 2038 problem. + * + * Gets the time when the bookmark for #uri was last modified. + * + * In the event the URI cannot be found, -1 is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @param uri a valid URI + * @returns a timestamp + */ + public get_modified(uri: string): number; + /** + * Gets the time when the bookmark for #uri was last modified. + * + * In the event the URI cannot be found, %NULL is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @param uri a valid URI + * @returns a #GDateTime + */ + public get_modified_date_time(uri: string): DateTime; + /** + * Gets the number of bookmarks inside #bookmark. + * @returns the number of bookmarks + */ + public get_size(): number; + /** + * Returns the title of the bookmark for #uri. + * + * If #uri is %NULL, the title of #bookmark is returned. + * + * In the event the URI cannot be found, %NULL is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @param uri a valid URI or %NULL + * @returns a newly allocated string or %NULL if the specified + * URI cannot be found. + */ + public get_title(uri?: string | null): string; + /** + * Returns all URIs of the bookmarks in the bookmark file #bookmark. + * The array of returned URIs will be %NULL-terminated, so #length may + * optionally be %NULL. + * @returns a newly allocated %NULL-terminated array of strings. + * Use {@link G.strfreev} to free it. + * + * return location for the number of returned URIs, or %NULL + */ + public get_uris(): [ string[], number | null ]; + /** + * @deprecated + * Use {@link G.bookmark_file_get_visited_date_time} instead, as + * `time_t` is deprecated due to the year 2038 problem. + * + * Gets the time the bookmark for #uri was last visited. + * + * In the event the URI cannot be found, -1 is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @param uri a valid URI + * @returns a timestamp. + */ + public get_visited(uri: string): number; + /** + * Gets the time the bookmark for #uri was last visited. + * + * In the event the URI cannot be found, %NULL is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @param uri a valid URI + * @returns a #GDateTime + */ + public get_visited_date_time(uri: string): DateTime; + /** + * Checks whether the bookmark for #uri inside #bookmark has been + * registered by application #name. + * + * In the event the URI cannot be found, %FALSE is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @param uri a valid URI + * @param name the name of the application + * @returns %TRUE if the application #name was found + */ + public has_application(uri: string, name: string): boolean; + /** + * Checks whether #group appears in the list of groups to which + * the bookmark for #uri belongs to. + * + * In the event the URI cannot be found, %FALSE is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @param uri a valid URI + * @param group the group name to be searched + * @returns %TRUE if #group was found. + */ + public has_group(uri: string, group: string): boolean; + /** + * Looks whether the desktop bookmark has an item with its URI set to #uri. + * @param uri a valid URI + * @returns %TRUE if #uri is inside #bookmark, %FALSE otherwise + */ + public has_item(uri: string): boolean; + /** + * Loads a bookmark file from memory into an empty #GBookmarkFile + * structure. If the object cannot be created then #error is set to a + * #GBookmarkFileError. + * @param data desktop bookmarks + * loaded in memory + * @returns %TRUE if a desktop bookmark could be loaded. + */ + public load_from_data(data: number[]): boolean; + /** + * This function looks for a desktop bookmark file named #file in the + * paths returned from {@link G.get_user_data_dir} and g_get_system_data_dirs(), + * loads the file into #bookmark and returns the file's full path in + * #full_path. If the file could not be loaded then #error is + * set to either a #GFileError or #GBookmarkFileError. + * @param file a relative path to a filename to open and parse + * @returns %TRUE if a key file could be loaded, %FALSE otherwise + * + * return location for a string + * containing the full path of the file, or %NULL + */ + public load_from_data_dirs(file: string): [ boolean, string | null ]; + /** + * Loads a desktop bookmark file into an empty #GBookmarkFile structure. + * If the file could not be loaded then #error is set to either a #GFileError + * or #GBookmarkFileError. + * @param filename the path of a filename to load, in the + * GLib file name encoding + * @returns %TRUE if a desktop bookmark file could be loaded + */ + public load_from_file(filename: string): boolean; + /** + * Changes the URI of a bookmark item from #old_uri to #new_uri. Any + * existing bookmark for #new_uri will be overwritten. If #new_uri is + * %NULL, then the bookmark is removed. + * + * In the event the URI cannot be found, %FALSE is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @param old_uri a valid URI + * @param new_uri a valid URI, or %NULL + * @returns %TRUE if the URI was successfully changed + */ + public move_item(old_uri: string, new_uri?: string | null): boolean; + /** + * Removes application registered with #name from the list of applications + * that have registered a bookmark for #uri inside #bookmark. + * + * In the event the URI cannot be found, %FALSE is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * In the event that no application with name #app_name has registered + * a bookmark for #uri, %FALSE is returned and error is set to + * #G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. + * @param uri a valid URI + * @param name the name of the application + * @returns %TRUE if the application was successfully removed. + */ + public remove_application(uri: string, name: string): boolean; + /** + * Removes #group from the list of groups to which the bookmark + * for #uri belongs to. + * + * In the event the URI cannot be found, %FALSE is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * In the event no group was defined, %FALSE is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_INVALID_VALUE. + * @param uri a valid URI + * @param group the group name to be removed + * @returns %TRUE if #group was successfully removed. + */ + public remove_group(uri: string, group: string): boolean; + /** + * Removes the bookmark for #uri from the bookmark file #bookmark. + * @param uri a valid URI + * @returns %TRUE if the bookmark was removed successfully. + */ + public remove_item(uri: string): boolean; + /** + * @deprecated + * Use {@link G.bookmark_file_set_added_date_time} instead, as + * `time_t` is deprecated due to the year 2038 problem. + * + * Sets the time the bookmark for #uri was added into #bookmark. + * + * If no bookmark for #uri is found then it is created. + * @param uri a valid URI + * @param added a timestamp or -1 to use the current time + */ + public set_added(uri: string, added: number): void; + /** + * Sets the time the bookmark for #uri was added into #bookmark. + * + * If no bookmark for #uri is found then it is created. + * @param uri a valid URI + * @param added a #GDateTime + */ + public set_added_date_time(uri: string, added: DateTime): void; + /** + * @deprecated + * Use {@link G.bookmark_file_set_application_info} instead, as + * `time_t` is deprecated due to the year 2038 problem. + * + * Sets the meta-data of application #name inside the list of + * applications that have registered a bookmark for #uri inside + * #bookmark. + * + * You should rarely use this function; use {@link G.bookmark_file_add_application} + * and g_bookmark_file_remove_application() instead. + * + * #name can be any UTF-8 encoded string used to identify an + * application. + * #exec can have one of these two modifiers: "\%f", which will + * be expanded as the local file name retrieved from the bookmark's + * URI; "\%u", which will be expanded as the bookmark's URI. + * The expansion is done automatically when retrieving the stored + * command line using the g_bookmark_file_get_application_info() function. + * #count is the number of times the application has registered the + * bookmark; if is < 0, the current registration count will be increased + * by one, if is 0, the application with #name will be removed from + * the list of registered applications. + * #stamp is the Unix time of the last registration; if it is -1, the + * current time will be used. + * + * If you try to remove an application by setting its registration count to + * zero, and no bookmark for #uri is found, %FALSE is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND; similarly, + * in the event that no application #name has registered a bookmark + * for #uri, %FALSE is returned and error is set to + * #G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. Otherwise, if no bookmark + * for #uri is found, one is created. + * @param uri a valid URI + * @param name an application's name + * @param exec an application's command line + * @param count the number of registrations done for this application + * @param stamp the time of the last registration for this application + * @returns %TRUE if the application's meta-data was successfully + * changed. + */ + public set_app_info(uri: string, name: string, exec: string, count: number, stamp: number): boolean; + /** + * Sets the meta-data of application #name inside the list of + * applications that have registered a bookmark for #uri inside + * #bookmark. + * + * You should rarely use this function; use {@link G.bookmark_file_add_application} + * and g_bookmark_file_remove_application() instead. + * + * #name can be any UTF-8 encoded string used to identify an + * application. + * #exec can have one of these two modifiers: "\%f", which will + * be expanded as the local file name retrieved from the bookmark's + * URI; "\%u", which will be expanded as the bookmark's URI. + * The expansion is done automatically when retrieving the stored + * command line using the g_bookmark_file_get_application_info() function. + * #count is the number of times the application has registered the + * bookmark; if is < 0, the current registration count will be increased + * by one, if is 0, the application with #name will be removed from + * the list of registered applications. + * #stamp is the Unix time of the last registration. + * + * If you try to remove an application by setting its registration count to + * zero, and no bookmark for #uri is found, %FALSE is returned and + * #error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND; similarly, + * in the event that no application #name has registered a bookmark + * for #uri, %FALSE is returned and error is set to + * #G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. Otherwise, if no bookmark + * for #uri is found, one is created. + * @param uri a valid URI + * @param name an application's name + * @param exec an application's command line + * @param count the number of registrations done for this application + * @param stamp the time of the last registration for this application, + * which may be %NULL if #count is 0 + * @returns %TRUE if the application's meta-data was successfully + * changed. + */ + public set_application_info(uri: string, name: string, exec: string, count: number, stamp?: DateTime | null): boolean; + /** + * Sets #description as the description of the bookmark for #uri. + * + * If #uri is %NULL, the description of #bookmark is set. + * + * If a bookmark for #uri cannot be found then it is created. + * @param uri a valid URI or %NULL + * @param description a string + */ + public set_description(uri: string | null, description: string): void; + /** + * Sets a list of group names for the item with URI #uri. Each previously + * set group name list is removed. + * + * If #uri cannot be found then an item for it is created. + * @param uri an item's URI + * @param groups an array of + * group names, or %NULL to remove all groups + */ + public set_groups(uri: string, groups?: string[] | null): void; + /** + * Sets the icon for the bookmark for #uri. If #href is %NULL, unsets + * the currently set icon. #href can either be a full URL for the icon + * file or the icon name following the Icon Naming specification. + * + * If no bookmark for #uri is found one is created. + * @param uri a valid URI + * @param href the URI of the icon for the bookmark, or %NULL + * @param mime_type the MIME type of the icon for the bookmark + */ + public set_icon(uri: string, href: string | null, mime_type: string): void; + /** + * Sets the private flag of the bookmark for #uri. + * + * If a bookmark for #uri cannot be found then it is created. + * @param uri a valid URI + * @param is_private %TRUE if the bookmark should be marked as private + */ + public set_is_private(uri: string, is_private: boolean): void; + /** + * Sets #mime_type as the MIME type of the bookmark for #uri. + * + * If a bookmark for #uri cannot be found then it is created. + * @param uri a valid URI + * @param mime_type a MIME type + */ + public set_mime_type(uri: string, mime_type: string): void; + /** + * @deprecated + * Use {@link G.bookmark_file_set_modified_date_time} instead, as + * `time_t` is deprecated due to the year 2038 problem. + * + * Sets the last time the bookmark for #uri was last modified. + * + * If no bookmark for #uri is found then it is created. + * + * The "modified" time should only be set when the bookmark's meta-data + * was actually changed. Every function of #GBookmarkFile that + * modifies a bookmark also changes the modification time, except for + * {@link G.bookmark_file_set_visited_date_time}. + * @param uri a valid URI + * @param modified a timestamp or -1 to use the current time + */ + public set_modified(uri: string, modified: number): void; + /** + * Sets the last time the bookmark for #uri was last modified. + * + * If no bookmark for #uri is found then it is created. + * + * The "modified" time should only be set when the bookmark's meta-data + * was actually changed. Every function of #GBookmarkFile that + * modifies a bookmark also changes the modification time, except for + * {@link G.bookmark_file_set_visited_date_time}. + * @param uri a valid URI + * @param modified a #GDateTime + */ + public set_modified_date_time(uri: string, modified: DateTime): void; + /** + * Sets #title as the title of the bookmark for #uri inside the + * bookmark file #bookmark. + * + * If #uri is %NULL, the title of #bookmark is set. + * + * If a bookmark for #uri cannot be found then it is created. + * @param uri a valid URI or %NULL + * @param title a UTF-8 encoded string + */ + public set_title(uri: string | null, title: string): void; + /** + * @deprecated + * Use {@link G.bookmark_file_set_visited_date_time} instead, as + * `time_t` is deprecated due to the year 2038 problem. + * + * Sets the time the bookmark for #uri was last visited. + * + * If no bookmark for #uri is found then it is created. + * + * The "visited" time should only be set if the bookmark was launched, + * either using the command line retrieved by {@link G.bookmark_file_get_application_info} + * or by the default application for the bookmark's MIME type, retrieved + * using g_bookmark_file_get_mime_type(). Changing the "visited" time + * does not affect the "modified" time. + * @param uri a valid URI + * @param visited a timestamp or -1 to use the current time + */ + public set_visited(uri: string, visited: number): void; + /** + * Sets the time the bookmark for #uri was last visited. + * + * If no bookmark for #uri is found then it is created. + * + * The "visited" time should only be set if the bookmark was launched, + * either using the command line retrieved by {@link G.bookmark_file_get_application_info} + * or by the default application for the bookmark's MIME type, retrieved + * using g_bookmark_file_get_mime_type(). Changing the "visited" time + * does not affect the "modified" time. + * @param uri a valid URI + * @param visited a #GDateTime + */ + public set_visited_date_time(uri: string, visited: DateTime): void; + /** + * This function outputs #bookmark as a string. + * @returns + * a newly allocated string holding the contents of the #GBookmarkFile + * + * return location for the length of the returned string, or %NULL + */ + public to_data(): [ number[], number | null ]; + /** + * This function outputs #bookmark into a file. The write process is + * guaranteed to be atomic by using {@link G.file_set_contents} internally. + * @param filename path of the output file + * @returns %TRUE if the file was successfully written. + */ + public to_file(filename: string): boolean; + } + + export interface ByteArrayInitOptions {} + /** + * Contains the public fields of a GByteArray. + */ + interface ByteArray {} + class ByteArray { + public constructor(options?: Partial); + /** + * Adds the given bytes to the end of the #GByteArray. + * The array will grow in size automatically if necessary. + * @param array a #GByteArray + * @param data the byte data to be added + * @param len the number of bytes to add + * @returns the #GByteArray + */ + public static append(array: number[], data: number, len: number): number[]; + /** + * Frees the memory allocated by the #GByteArray. If #free_segment is + * %TRUE it frees the actual byte data. If the reference count of + * #array is greater than one, the #GByteArray wrapper is preserved but + * the size of #array will be set to zero. + * @param array a #GByteArray + * @param free_segment if %TRUE the actual byte data is freed as well + * @returns the element data if #free_segment is %FALSE, otherwise + * %NULL. The element data should be freed using {@link G.free}. + */ + public static free(array: number[], free_segment: boolean): number; + /** + * Transfers the data from the #GByteArray into a new immutable #GBytes. + * + * The #GByteArray is freed unless the reference count of #array is greater + * than one, the #GByteArray wrapper is preserved but the size of #array + * will be set to zero. + * + * This is identical to using {@link G.bytes_new_take} and g_byte_array_free() + * together. + * @param array a #GByteArray + * @returns a new immutable #GBytes representing same + * byte data that was in the array + */ + public static free_to_bytes(array: number[]): Bytes; + /** + * Creates a new #GByteArray with a reference count of 1. + * @returns the new #GByteArray + */ + public static new(): number[]; + /** + * Create byte array containing the data. The data will be owned by the array + * and will be freed with {@link G.free}, i.e. it could be allocated using g_strdup(). + * + * Do not use it if #len is greater than %G_MAXUINT. #GByteArray + * stores the length of its data in #guint, which may be shorter than + * #gsize. + * @param data byte data for the array + * @returns a new #GByteArray + */ + public static new_take(data: number[]): number[]; + /** + * Adds the given data to the start of the #GByteArray. + * The array will grow in size automatically if necessary. + * @param array a #GByteArray + * @param data the byte data to be added + * @param len the number of bytes to add + * @returns the #GByteArray + */ + public static prepend(array: number[], data: number, len: number): number[]; + /** + * Atomically increments the reference count of #array by one. + * This function is thread-safe and may be called from any thread. + * @param array A #GByteArray + * @returns The passed in #GByteArray + */ + public static ref(array: number[]): number[]; + /** + * Removes the byte at the given index from a #GByteArray. + * The following bytes are moved down one place. + * @param array a #GByteArray + * @param index_ the index of the byte to remove + * @returns the #GByteArray + */ + public static remove_index(array: number[], index_: number): number[]; + /** + * Removes the byte at the given index from a #GByteArray. The last + * element in the array is used to fill in the space, so this function + * does not preserve the order of the #GByteArray. But it is faster + * than {@link G.byte_array_remove_index}. + * @param array a #GByteArray + * @param index_ the index of the byte to remove + * @returns the #GByteArray + */ + public static remove_index_fast(array: number[], index_: number): number[]; + /** + * Removes the given number of bytes starting at the given index from a + * #GByteArray. The following elements are moved to close the gap. + * @param array a #GByteArray + * @param index_ the index of the first byte to remove + * @param length the number of bytes to remove + * @returns the #GByteArray + */ + public static remove_range(array: number[], index_: number, length: number): number[]; + /** + * Sets the size of the #GByteArray, expanding it if necessary. + * @param array a #GByteArray + * @param length the new size of the #GByteArray + * @returns the #GByteArray + */ + public static set_size(array: number[], length: number): number[]; + /** + * Creates a new #GByteArray with #reserved_size bytes preallocated. + * This avoids frequent reallocation, if you are going to add many + * bytes to the array. Note however that the size of the array is still + * 0. + * @param reserved_size number of bytes preallocated + * @returns the new #GByteArray + */ + public static sized_new(reserved_size: number): number[]; + /** + * Sorts a byte array, using #compare_func which should be a + * qsort()-style comparison function (returns less than zero for first + * arg is less than second arg, zero for equal, greater than zero if + * first arg is greater than second arg). + * + * If two array elements compare equal, their order in the sorted array + * is undefined. If you want equal elements to keep their order (i.e. + * you want a stable sort) you can write a comparison function that, + * if two elements would otherwise compare equal, compares them by + * their addresses. + * @param array a #GByteArray + * @param compare_func comparison function + */ + public static sort(array: number[], compare_func: CompareFunc): void; + /** + * Like {@link G.byte_array_sort}, but the comparison function takes an extra + * user data argument. + * @param array a #GByteArray + * @param compare_func comparison function + */ + public static sort_with_data(array: number[], compare_func: CompareDataFunc): void; + /** + * Frees the data in the array and resets the size to zero, while + * the underlying array is preserved for use elsewhere and returned + * to the caller. + * @param array a #GByteArray. + * @returns the element data, which should be + * freed using {@link G.free}. + * + * pointer to retrieve the number of + * elements of the original array + */ + public static steal(array: number[]): [ number, number | null ]; + /** + * Atomically decrements the reference count of #array by one. If the + * reference count drops to 0, all memory allocated by the array is + * released. This function is thread-safe and may be called from any + * thread. + * @param array A #GByteArray + */ + public static unref(array: number[]): void; + /** + * a pointer to the element data. The data may be moved as + * elements are added to the #GByteArray + */ + public data: number; + /** + * the number of elements in the #GByteArray + */ + public len: number; + } + + export interface BytesInitOptions {} + /** + * A simple refcounted data type representing an immutable sequence of zero or + * more bytes from an unspecified origin. + * + * The purpose of a #GBytes is to keep the memory region that it holds + * alive for as long as anyone holds a reference to the bytes. When + * the last reference count is dropped, the memory is released. Multiple + * unrelated callers can use byte data in the #GBytes without coordinating + * their activities, resting assured that the byte data will not change or + * move while they hold a reference. + * + * A #GBytes can come from many different origins that may have + * different procedures for freeing the memory region. Examples are + * memory from {@link G.malloc}, from memory slices, from a #GMappedFile or + * memory from other allocators. + * + * #GBytes work well as keys in #GHashTable. Use g_bytes_equal() and + * g_bytes_hash() as parameters to g_hash_table_new() or g_hash_table_new_full(). + * #GBytes can also be used as keys in a #GTree by passing the g_bytes_compare() + * function to g_tree_new(). + * + * The data pointed to by this bytes must not be modified. For a mutable + * array of bytes see #GByteArray. Use g_bytes_unref_to_array() to create a + * mutable array for a #GBytes sequence. To create an immutable #GBytes from + * a mutable #GByteArray, use the g_byte_array_free_to_bytes() function. + */ + interface Bytes {} + class Bytes { + public constructor(options?: Partial); + /** + * Creates a new #GBytes from #data. + * + * #data is copied. If #size is 0, #data may be %NULL. + * @param data + * the data to be used for the bytes + * @returns a new #GBytes + */ + public static new(data?: number[] | null): Bytes; + /** + * Creates a new #GBytes from static data. + * + * #data must be static (ie: never modified or freed). It may be %NULL if #size + * is 0. + * @param data + * the data to be used for the bytes + * @returns a new #GBytes + */ + public static new_static(data?: number[] | null): Bytes; + /** + * Creates a new #GBytes from #data. + * + * After this call, #data belongs to the bytes and may no longer be + * modified by the caller. {@link G.free} will be called on #data when the + * bytes is no longer in use. Because of this #data must have been created by + * a call to g_malloc(), g_malloc0() or g_realloc() or by one of the many + * functions that wrap these calls (such as g_new(), g_strdup(), etc). + * + * For creating #GBytes with memory from other allocators, see + * g_bytes_new_with_free_func(). + * + * #data may be %NULL if #size is 0. + * @param data + * the data to be used for the bytes + * @returns a new #GBytes + */ + public static new_take(data?: number[] | null): Bytes; + /** + * Creates a #GBytes from #data. + * + * When the last reference is dropped, #free_func will be called with the + * #user_data argument. + * + * #data must not be modified after this call is made until #free_func has + * been called to indicate that the bytes is no longer in use. + * + * #data may be %NULL if #size is 0. + * @param data + * the data to be used for the bytes + * @param user_data data to pass to #free_func + * @returns a new #GBytes + */ + public static new_with_free_func(data?: number[] | null, user_data?: any | null): Bytes; + /** + * Compares the two #GBytes values. + * + * This function can be used to sort GBytes instances in lexicographical order. + * + * If #bytes1 and #bytes2 have different length but the shorter one is a + * prefix of the longer one then the shorter one is considered to be less than + * the longer one. Otherwise the first byte where both differ is used for + * comparison. If #bytes1 has a smaller value at that position it is + * considered less, otherwise greater than #bytes2. + * @param bytes2 a pointer to a #GBytes to compare with #bytes1 + * @returns a negative value if #bytes1 is less than #bytes2, a positive value + * if #bytes1 is greater than #bytes2, and zero if #bytes1 is equal to + * #bytes2 + */ + public compare(bytes2: Bytes): number; + /** + * Compares the two #GBytes values being pointed to and returns + * %TRUE if they are equal. + * + * This function can be passed to {@link G.hash_table_new} as the #key_equal_func + * parameter, when using non-%NULL #GBytes pointers as keys in a #GHashTable. + * @param bytes2 a pointer to a #GBytes to compare with #bytes1 + * @returns %TRUE if the two keys match. + */ + public equal(bytes2: Bytes): boolean; + /** + * Get the byte data in the #GBytes. This data should not be modified. + * + * This function will always return the same pointer for a given #GBytes. + * + * %NULL may be returned if #size is 0. This is not guaranteed, as the #GBytes + * may represent an empty string with #data non-%NULL and #size as 0. %NULL will + * not be returned if #size is non-zero. + * @returns + * a pointer to the byte data, or %NULL + * + * location to return size of byte data + */ + public get_data(): [ number[] | null, number | null ]; + /** + * Gets a pointer to a region in #bytes. + * + * The region starts at #offset many bytes from the start of the data + * and contains #n_elements many elements of #element_size size. + * + * #n_elements may be zero, but #element_size must always be non-zero. + * Ideally, #element_size is a static constant (eg: sizeof a struct). + * + * This function does careful bounds checking (including checking for + * arithmetic overflows) and returns a non-%NULL pointer if the + * specified region lies entirely within the #bytes. If the region is + * in some way out of range, or if an overflow has occurred, then %NULL + * is returned. + * + * Note: it is possible to have a valid zero-size region. In this case, + * the returned pointer will be equal to the base pointer of the data of + * #bytes, plus #offset. This will be non-%NULL except for the case + * where #bytes itself was a zero-sized region. Since it is unlikely + * that you will be using this function to check for a zero-sized region + * in a zero-sized #bytes, %NULL effectively always means "error". + * @param element_size a non-zero element size + * @param offset an offset to the start of the region within the #bytes + * @param n_elements the number of elements in the region + * @returns the requested region, or %NULL in case of an error + */ + public get_region(element_size: number, offset: number, n_elements: number): any | null; + /** + * Get the size of the byte data in the #GBytes. + * + * This function will always return the same value for a given #GBytes. + * @returns the size + */ + public get_size(): number; + /** + * Creates an integer hash code for the byte data in the #GBytes. + * + * This function can be passed to {@link G.hash_table_new} as the #key_hash_func + * parameter, when using non-%NULL #GBytes pointers as keys in a #GHashTable. + * @returns a hash value corresponding to the key. + */ + public hash(): number; + /** + * Creates a #GBytes which is a subsection of another #GBytes. The #offset + + * #length may not be longer than the size of #bytes. + * + * A reference to #bytes will be held by the newly created #GBytes until + * the byte data is no longer needed. + * + * Since 2.56, if #offset is 0 and #length matches the size of #bytes, then + * #bytes will be returned with the reference count incremented by 1. If #bytes + * is a slice of another #GBytes, then the resulting #GBytes will reference + * the same #GBytes instead of #bytes. This allows consumers to simplify the + * usage of #GBytes when asynchronously writing to streams. + * @param offset offset which subsection starts at + * @param length length of subsection + * @returns a new #GBytes + */ + public new_from_bytes(offset: number, length: number): Bytes; + /** + * Increase the reference count on #bytes. + * @returns the #GBytes + */ + public ref(): Bytes; + /** + * Releases a reference on #bytes. This may result in the bytes being + * freed. If #bytes is %NULL, it will return immediately. + */ + public unref(): void; + /** + * Unreferences the bytes, and returns a new mutable #GByteArray containing + * the same byte data. + * + * As an optimization, the byte data is transferred to the array without copying + * if this was the last reference to bytes and bytes was created with + * {@link G.bytes_new}, g_bytes_new_take() or g_byte_array_free_to_bytes(). In all + * other cases the data is copied. + * + * Do not use it if #bytes contains more than %G_MAXUINT + * bytes. #GByteArray stores the length of its data in #guint, which + * may be shorter than #gsize, that #bytes is using. + * @returns a new mutable #GByteArray containing the same byte data + */ + public unref_to_array(): number[]; + /** + * Unreferences the bytes, and returns a pointer the same byte data + * contents. + * + * As an optimization, the byte data is returned without copying if this was + * the last reference to bytes and bytes was created with {@link G.bytes_new}, + * g_bytes_new_take() or g_byte_array_free_to_bytes(). In all other cases the + * data is copied. + * @returns a pointer to the same byte data, which should be + * freed with {@link G.free} + * + * location to place the length of the returned data + */ + public unref_to_data(): [ number[], number ]; + } + + export interface ChecksumInitOptions {} + /** + * An opaque structure representing a checksumming operation. + * + * To create a new GChecksum, use {@link G.checksum_new}. To free + * a GChecksum, use g_checksum_free(). + */ + interface Checksum {} + class Checksum { + public constructor(options?: Partial); + /** + * Creates a new #GChecksum, using the checksum algorithm #checksum_type. + * If the #checksum_type is not known, %NULL is returned. + * A #GChecksum can be used to compute the checksum, or digest, of an + * arbitrary binary blob, using different hashing algorithms. + * + * A #GChecksum works by feeding a binary blob through {@link G.checksum_update} + * until there is data to be checked; the digest can then be extracted + * using g_checksum_get_string(), which will return the checksum as a + * hexadecimal string; or g_checksum_get_digest(), which will return a + * vector of raw bytes. Once either g_checksum_get_string() or + * g_checksum_get_digest() have been called on a #GChecksum, the checksum + * will be closed and it won't be possible to call g_checksum_update() + * on it anymore. + * @param checksum_type the desired type of checksum + * @returns the newly created #GChecksum, or %NULL. + * Use {@link G.checksum_free} to free the memory allocated by it. + */ + public static new(checksum_type: ChecksumType): Checksum | null; + /** + * Gets the length in bytes of digests of type #checksum_type + * @param checksum_type a #GChecksumType + * @returns the checksum length, or -1 if #checksum_type is + * not supported. + */ + public static type_get_length(checksum_type: ChecksumType): number; + /** + * Copies a #GChecksum. If #checksum has been closed, by calling + * {@link G.checksum_get_string} or g_checksum_get_digest(), the copied + * checksum will be closed as well. + * @returns the copy of the passed #GChecksum. Use + * {@link G.checksum_free} when finished using it. + */ + public copy(): Checksum; + /** + * Frees the memory allocated for #checksum. + */ + public free(): void; + /** + * Gets the digest from #checksum as a raw binary vector and places it + * into #buffer. The size of the digest depends on the type of checksum. + * + * Once this function has been called, the #GChecksum is closed and can + * no longer be updated with {@link G.checksum_update}. + * @param buffer output buffer + */ + public get_digest(buffer: number[]): void; + /** + * Gets the digest as a hexadecimal string. + * + * Once this function has been called the #GChecksum can no longer be + * updated with {@link G.checksum_update}. + * + * The hexadecimal characters will be lower case. + * @returns the hexadecimal representation of the checksum. The + * returned string is owned by the checksum and should not be modified + * or freed. + */ + public get_string(): string; + /** + * Resets the state of the #checksum back to its initial state. + */ + public reset(): void; + /** + * Feeds #data into an existing #GChecksum. The checksum must still be + * open, that is {@link G.checksum_get_string} or g_checksum_get_digest() must + * not have been called on #checksum. + * @param data buffer used to compute the checksum + */ + public update(data: number[]): void; + } + + export interface CondInitOptions {} + /** + * The #GCond struct is an opaque data structure that represents a + * condition. Threads can block on a #GCond if they find a certain + * condition to be false. If other threads change the state of this + * condition they signal the #GCond, and that causes the waiting + * threads to be woken up. + * + * Consider the following example of a shared variable. One or more + * threads can wait for data to be published to the variable and when + * another thread publishes the data, it can signal one of the waiting + * threads to wake up to collect the data. + * + * Here is an example for using GCond to block a thread until a condition + * is satisfied: + * |[ + * gpointer current_data = NULL; + * GMutex data_mutex; + * GCond data_cond; + * + * void + * push_data (gpointer data) + * { + * g_mutex_lock (&data_mutex); + * current_data = data; + * g_cond_signal (&data_cond); + * g_mutex_unlock (&data_mutex); + * } + * + * gpointer + * pop_data (void) + * { + * gpointer data; + * + * g_mutex_lock (&data_mutex); + * while (!current_data) + * g_cond_wait (&data_cond, &data_mutex); + * data = current_data; + * current_data = NULL; + * g_mutex_unlock (&data_mutex); + * + * return data; + * } + * ]| + * Whenever a thread calls {@link Pop.data} now, it will wait until + * current_data is non-%NULL, i.e. until some other thread + * has called push_data(). + * + * The example shows that use of a condition variable must always be + * paired with a mutex. Without the use of a mutex, there would be a + * race between the check of #current_data by the while loop in + * pop_data() and waiting. Specifically, another thread could set + * #current_data after the check, and signal the cond (with nobody + * waiting on it) before the first thread goes to sleep. #GCond is + * specifically useful for its ability to release the mutex and go + * to sleep atomically. + * + * It is also important to use the g_cond_wait() and g_cond_wait_until() + * functions only inside a loop which checks for the condition to be + * true. See g_cond_wait() for an explanation of why the condition may + * not be true even after it returns. + * + * If a #GCond is allocated in static storage then it can be used + * without initialisation. Otherwise, you should call g_cond_init() + * on it and g_cond_clear() when done. + * + * A #GCond should only be accessed via the g_cond_ functions. + */ + interface Cond {} + class Cond { + public constructor(options?: Partial); + public readonly p: any; + public readonly i: number[]; + /** + * If threads are waiting for #cond, all of them are unblocked. + * If no threads are waiting for #cond, this function has no effect. + * It is good practice to lock the same mutex as the waiting threads + * while calling this function, though not required. + */ + public broadcast(): void; + /** + * Frees the resources allocated to a #GCond with {@link G.cond_init}. + * + * This function should not be used with a #GCond that has been + * statically allocated. + * + * Calling g_cond_clear() for a #GCond on which threads are + * blocking leads to undefined behaviour. + */ + public clear(): void; + /** + * Initialises a #GCond so that it can be used. + * + * This function is useful to initialise a #GCond that has been + * allocated as part of a larger structure. It is not necessary to + * initialise a #GCond that has been statically allocated. + * + * To undo the effect of {@link G.cond_init} when a #GCond is no longer + * needed, use g_cond_clear(). + * + * Calling g_cond_init() on an already-initialised #GCond leads + * to undefined behaviour. + */ + public init(): void; + /** + * If threads are waiting for #cond, at least one of them is unblocked. + * If no threads are waiting for #cond, this function has no effect. + * It is good practice to hold the same lock as the waiting thread + * while calling this function, though not required. + */ + public signal(): void; + /** + * Atomically releases #mutex and waits until #cond is signalled. + * When this function returns, #mutex is locked again and owned by the + * calling thread. + * + * When using condition variables, it is possible that a spurious wakeup + * may occur (ie: {@link G.cond_wait} returns even though g_cond_signal() was + * not called). It's also possible that a stolen wakeup may occur. + * This is when g_cond_signal() is called, but another thread acquires + * #mutex before this thread and modifies the state of the program in + * such a way that when g_cond_wait() is able to return, the expected + * condition is no longer met. + * + * For this reason, g_cond_wait() must always be used in a loop. See + * the documentation for #GCond for a complete example. + * @param mutex a #GMutex that is currently locked + */ + public wait(mutex: Mutex): void; + /** + * Waits until either #cond is signalled or #end_time has passed. + * + * As with {@link G.cond_wait} it is possible that a spurious or stolen wakeup + * could occur. For that reason, waiting on a condition variable should + * always be in a loop, based on an explicitly-checked predicate. + * + * %TRUE is returned if the condition variable was signalled (or in the + * case of a spurious wakeup). %FALSE is returned if #end_time has + * passed. + * + * The following code shows how to correctly perform a timed wait on a + * condition variable (extending the example presented in the + * documentation for #GCond): + * + * |[ + * gpointer + * pop_data_timed (void) + * { + * gint64 end_time; + * gpointer data; + * + * g_mutex_lock (&data_mutex); + * + * end_time = g_get_monotonic_time () + 5 * G_TIME_SPAN_SECOND; + * while (!current_data) + * if (!g_cond_wait_until (&data_cond, &data_mutex, end_time)) + * { + * // timeout has passed. + * g_mutex_unlock (&data_mutex); + * return NULL; + * } + * + * // there is data for us + * data = current_data; + * current_data = NULL; + * + * g_mutex_unlock (&data_mutex); + * + * return data; + * } + * ]| + * + * Notice that the end time is calculated once, before entering the + * loop and reused. This is the motivation behind the use of absolute + * time on this API -- if a relative time of 5 seconds were passed + * directly to the call and a spurious wakeup occurred, the program would + * have to start over waiting again (which would lead to a total wait + * time of more than 5 seconds). + * @param mutex a #GMutex that is currently locked + * @param end_time the monotonic time to wait until + * @returns %TRUE on a signal, %FALSE on a timeout + */ + public wait_until(mutex: Mutex, end_time: number): boolean; + } + + export interface DataInitOptions {} + /** + * An opaque data structure that represents a keyed data list. + * + * See also: [Keyed data lists][glib-Keyed-Data-Lists]. + */ + interface Data {} + class Data { + public constructor(options?: Partial); + } + + export interface DateInitOptions {} + /** + * Represents a day between January 1, Year 1 and a few thousand years in + * the future. None of its members should be accessed directly. + * + * If the `GDate` is obtained from {@link G.date_new}, it will be safe + * to mutate but invalid and thus not safe for calendrical computations. + * + * If it's declared on the stack, it will contain garbage so must be + * initialized with g_date_clear(). g_date_clear() makes the date invalid + * but safe. An invalid date doesn't represent a day, it's "empty." A date + * becomes valid after you set it to a Julian day or you set a day, month, + * and year. + */ + interface Date {} + class Date { + public constructor(options?: Partial); + /** + * Allocates a #GDate and initializes + * it to a safe state. The new date will + * be cleared (as if you'd called {@link G.date_clear}) but invalid (it won't + * represent an existing day). Free the return value with g_date_free(). + * @returns a newly-allocated #GDate + */ + public static new(): Date; + /** + * Like {@link G.date_new}, but also sets the value of the date. Assuming the + * day-month-year triplet you pass in represents an existing day, the + * returned date will be valid. + * @param day day of the month + * @param month month of the year + * @param year year + * @returns a newly-allocated #GDate initialized with #day, #month, and #year + */ + public static new_dmy(day: DateDay, month: DateMonth, year: DateYear): Date; + /** + * Like {@link G.date_new}, but also sets the value of the date. Assuming the + * Julian day number you pass in is valid (greater than 0, less than an + * unreasonably large number), the returned date will be valid. + * @param julian_day days since January 1, Year 1 + * @returns a newly-allocated #GDate initialized with #julian_day + */ + public static new_julian(julian_day: number): Date; + /** + * Returns the number of days in a month, taking leap + * years into account. + * @param month month + * @param year year + * @returns number of days in #month during the #year + */ + public static get_days_in_month(month: DateMonth, year: DateYear): number; + /** + * Returns the number of weeks in the year, where weeks + * are taken to start on Monday. Will be 52 or 53. The + * date must be valid. (Years always have 52 7-day periods, + * plus 1 or 2 extra days depending on whether it's a leap + * year. This function is basically telling you how many + * Mondays are in the year, i.e. there are 53 Mondays if + * one of the extra days happens to be a Monday.) + * @param year a year + * @returns number of Mondays in the year + */ + public static get_monday_weeks_in_year(year: DateYear): number; + /** + * Returns the number of weeks in the year, where weeks + * are taken to start on Sunday. Will be 52 or 53. The + * date must be valid. (Years always have 52 7-day periods, + * plus 1 or 2 extra days depending on whether it's a leap + * year. This function is basically telling you how many + * Sundays are in the year, i.e. there are 53 Sundays if + * one of the extra days happens to be a Sunday.) + * @param year year to count weeks in + * @returns the number of weeks in #year + */ + public static get_sunday_weeks_in_year(year: DateYear): number; + /** + * Returns %TRUE if the year is a leap year. + * + * For the purposes of this function, leap year is every year + * divisible by 4 unless that year is divisible by 100. If it + * is divisible by 100 it would be a leap year only if that year + * is also divisible by 400. + * @param year year to check + * @returns %TRUE if the year is a leap year + */ + public static is_leap_year(year: DateYear): boolean; + /** + * Generates a printed representation of the date, in a + * [locale][setlocale]-specific way. + * Works just like the platform's C library strftime() function, + * but only accepts date-related formats; time-related formats + * give undefined results. Date must be valid. Unlike strftime() + * (which uses the locale encoding), works on a UTF-8 format + * string and stores a UTF-8 result. + * + * This function does not provide any conversion specifiers in + * addition to those implemented by the platform's C library. + * For example, don't expect that using g_date_strftime() would + * make the \%F provided by the C99 strftime() work on Windows + * where the C library only complies to C89. + * @param s destination buffer + * @param slen buffer size + * @param format format string + * @param date valid #GDate + * @returns number of characters written to the buffer, or 0 the buffer was too small + */ + public static strftime(s: string, slen: number, format: string, date: Date): number; + /** + * Returns %TRUE if the day of the month is valid (a day is valid if it's + * between 1 and 31 inclusive). + * @param day day to check + * @returns %TRUE if the day is valid + */ + public static valid_day(day: DateDay): boolean; + /** + * Returns %TRUE if the day-month-year triplet forms a valid, existing day + * in the range of days #GDate understands (Year 1 or later, no more than + * a few thousand years in the future). + * @param day day + * @param month month + * @param year year + * @returns %TRUE if the date is a valid one + */ + public static valid_dmy(day: DateDay, month: DateMonth, year: DateYear): boolean; + /** + * Returns %TRUE if the Julian day is valid. Anything greater than zero + * is basically a valid Julian, though there is a 32-bit limit. + * @param julian_date Julian day to check + * @returns %TRUE if the Julian day is valid + */ + public static valid_julian(julian_date: number): boolean; + /** + * Returns %TRUE if the month value is valid. The 12 #GDateMonth + * enumeration values are the only valid months. + * @param month month + * @returns %TRUE if the month is valid + */ + public static valid_month(month: DateMonth): boolean; + /** + * Returns %TRUE if the weekday is valid. The seven #GDateWeekday enumeration + * values are the only valid weekdays. + * @param weekday weekday + * @returns %TRUE if the weekday is valid + */ + public static valid_weekday(weekday: DateWeekday): boolean; + /** + * Returns %TRUE if the year is valid. Any year greater than 0 is valid, + * though there is a 16-bit limit to what #GDate will understand. + * @param year year + * @returns %TRUE if the year is valid + */ + public static valid_year(year: DateYear): boolean; + /** + * the Julian representation of the date + */ + public julian_days: number; + /** + * this bit is set if #julian_days is valid + */ + public julian: number; + /** + * this is set if #day, #month and #year are valid + */ + public dmy: number; + /** + * the day of the day-month-year representation of the date, + * as a number between 1 and 31 + */ + public day: number; + /** + * the day of the day-month-year representation of the date, + * as a number between 1 and 12 + */ + public month: number; + /** + * the day of the day-month-year representation of the date + */ + public year: number; + /** + * Increments a date some number of days. + * To move forward by weeks, add weeks*7 days. + * The date must be valid. + * @param n_days number of days to move the date forward + */ + public add_days(n_days: number): void; + /** + * Increments a date by some number of months. + * If the day of the month is greater than 28, + * this routine may change the day of the month + * (because the destination month may not have + * the current day in it). The date must be valid. + * @param n_months number of months to move forward + */ + public add_months(n_months: number): void; + /** + * Increments a date by some number of years. + * If the date is February 29, and the destination + * year is not a leap year, the date will be changed + * to February 28. The date must be valid. + * @param n_years number of years to move forward + */ + public add_years(n_years: number): void; + /** + * If #date is prior to #min_date, sets #date equal to #min_date. + * If #date falls after #max_date, sets #date equal to #max_date. + * Otherwise, #date is unchanged. + * Either of #min_date and #max_date may be %NULL. + * All non-%NULL dates must be valid. + * @param min_date minimum accepted value for #date + * @param max_date maximum accepted value for #date + */ + public clamp(min_date: Date, max_date: Date): void; + /** + * Initializes one or more #GDate structs to a safe but invalid + * state. The cleared dates will not represent an existing date, but will + * not contain garbage. Useful to init a date declared on the stack. + * Validity can be tested with {@link G.date_valid}. + * @param n_dates number of dates to clear + */ + public clear(n_dates: number): void; + /** + * qsort()-style comparison function for dates. + * Both dates must be valid. + * @param rhs second date to compare + * @returns 0 for equal, less than zero if #lhs is less than #rhs, + * greater than zero if #lhs is greater than #rhs + */ + public compare(rhs: Date): number; + /** + * Copies a GDate to a newly-allocated GDate. If the input was invalid + * (as determined by {@link G.date_valid}), the invalid state will be copied + * as is into the new object. + * @returns a newly-allocated #GDate initialized from #date + */ + public copy(): Date; + /** + * Computes the number of days between two dates. + * If #date2 is prior to #date1, the returned value is negative. + * Both dates must be valid. + * @param date2 the second date + * @returns the number of days between #date1 and #date2 + */ + public days_between(date2: Date): number; + /** + * Frees a #GDate returned from {@link G.date_new}. + */ + public free(): void; + /** + * Returns the day of the month. The date must be valid. + * @returns day of the month + */ + public get_day(): DateDay; + /** + * Returns the day of the year, where Jan 1 is the first day of the + * year. The date must be valid. + * @returns day of the year + */ + public get_day_of_year(): number; + /** + * Returns the week of the year, where weeks are interpreted according + * to ISO 8601. + * @returns ISO 8601 week number of the year. + */ + public get_iso8601_week_of_year(): number; + /** + * Returns the Julian day or "serial number" of the #GDate. The + * Julian day is simply the number of days since January 1, Year 1; i.e., + * January 1, Year 1 is Julian day 1; January 2, Year 1 is Julian day 2, + * etc. The date must be valid. + * @returns Julian day + */ + public get_julian(): number; + /** + * Returns the week of the year, where weeks are understood to start on + * Monday. If the date is before the first Monday of the year, return 0. + * The date must be valid. + * @returns week of the year + */ + public get_monday_week_of_year(): number; + /** + * Returns the month of the year. The date must be valid. + * @returns month of the year as a #GDateMonth + */ + public get_month(): DateMonth; + /** + * Returns the week of the year during which this date falls, if + * weeks are understood to begin on Sunday. The date must be valid. + * Can return 0 if the day is before the first Sunday of the year. + * @returns week number + */ + public get_sunday_week_of_year(): number; + /** + * Returns the day of the week for a #GDate. The date must be valid. + * @returns day of the week as a #GDateWeekday. + */ + public get_weekday(): DateWeekday; + /** + * Returns the year of a #GDate. The date must be valid. + * @returns year in which the date falls + */ + public get_year(): DateYear; + /** + * Returns %TRUE if the date is on the first of a month. + * The date must be valid. + * @returns %TRUE if the date is the first of the month + */ + public is_first_of_month(): boolean; + /** + * Returns %TRUE if the date is the last day of the month. + * The date must be valid. + * @returns %TRUE if the date is the last day of the month + */ + public is_last_of_month(): boolean; + /** + * Checks if #date1 is less than or equal to #date2, + * and swap the values if this is not the case. + * @param date2 the second date + */ + public order(date2: Date): void; + /** + * Sets the day of the month for a #GDate. If the resulting + * day-month-year triplet is invalid, the date will be invalid. + * @param day day to set + */ + public set_day(day: DateDay): void; + /** + * Sets the value of a #GDate from a day, month, and year. + * The day-month-year triplet must be valid; if you aren't + * sure it is, call {@link G.date_valid_dmy} to check before you + * set it. + * @param day day + * @param month month + * @param y year + */ + public set_dmy(day: DateDay, month: DateMonth, y: DateYear): void; + /** + * Sets the value of a #GDate from a Julian day number. + * @param julian_date Julian day number (days since January 1, Year 1) + */ + public set_julian(julian_date: number): void; + /** + * Sets the month of the year for a #GDate. If the resulting + * day-month-year triplet is invalid, the date will be invalid. + * @param month month to set + */ + public set_month(month: DateMonth): void; + /** + * Parses a user-inputted string #str, and try to figure out what date it + * represents, taking the [current locale][setlocale] into account. If the + * string is successfully parsed, the date will be valid after the call. + * Otherwise, it will be invalid. You should check using {@link G.date_valid} + * to see whether the parsing succeeded. + * + * This function is not appropriate for file formats and the like; it + * isn't very precise, and its exact behavior varies with the locale. + * It's intended to be a heuristic routine that guesses what the user + * means by a given string (and it does work pretty well in that + * capacity). + * @param str string to parse + */ + public set_parse(str: string): void; + /** + * @deprecated + * Use {@link G.date_set_time_t} instead. + * + * Sets the value of a date from a #GTime value. + * The time to date conversion is done using the user's current timezone. + * @param time_ #GTime value to set. + */ + public set_time(time_: Time): void; + /** + * Sets the value of a date to the date corresponding to a time + * specified as a time_t. The time to date conversion is done using + * the user's current timezone. + * + * To set the value of a date to the current day, you could write: + * |[ + * time_t now = time (NULL); + * if (now == (time_t) -1) + * // handle the error + * g_date_set_time_t (date, now); + * ]| + * @param timet time_t value to set + */ + public set_time_t(timet: number): void; + /** + * @deprecated + * #GTimeVal is not year-2038-safe. Use {@link G.date_set_time_t} + * instead. + * + * Sets the value of a date from a #GTimeVal value. Note that the + * #tv_usec member is ignored, because #GDate can't make use of the + * additional precision. + * + * The time to date conversion is done using the user's current timezone. + * @param timeval #GTimeVal value to set + */ + public set_time_val(timeval: TimeVal): void; + /** + * Sets the year for a #GDate. If the resulting day-month-year + * triplet is invalid, the date will be invalid. + * @param year year to set + */ + public set_year(year: DateYear): void; + /** + * Moves a date some number of days into the past. + * To move by weeks, just move by weeks*7 days. + * The date must be valid. + * @param n_days number of days to move + */ + public subtract_days(n_days: number): void; + /** + * Moves a date some number of months into the past. + * If the current day of the month doesn't exist in + * the destination month, the day of the month + * may change. The date must be valid. + * @param n_months number of months to move + */ + public subtract_months(n_months: number): void; + /** + * Moves a date some number of years into the past. + * If the current day doesn't exist in the destination + * year (i.e. it's February 29 and you move to a non-leap-year) + * then the day is changed to February 29. The date + * must be valid. + * @param n_years number of years to move + */ + public subtract_years(n_years: number): void; + /** + * Fills in the date-related bits of a struct tm using the #date value. + * Initializes the non-date parts with something safe but meaningless. + * @param tm struct tm to fill + */ + public to_struct_tm(tm: any): void; + /** + * Returns %TRUE if the #GDate represents an existing day. The date must not + * contain garbage; it should have been initialized with {@link G.date_clear} + * if it wasn't allocated by one of the g_date_new() variants. + * @returns Whether the date is valid + */ + public valid(): boolean; + } + + export interface DateTimeInitOptions {} + /** + * An opaque structure that represents a date and time, including a time zone. + */ + interface DateTime {} + class DateTime { + public constructor(options?: Partial); + /** + * Creates a new #GDateTime corresponding to the given date and time in + * the time zone #tz. + * + * The #year must be between 1 and 9999, #month between 1 and 12 and #day + * between 1 and 28, 29, 30 or 31 depending on the month and the year. + * + * #hour must be between 0 and 23 and #minute must be between 0 and 59. + * + * #seconds must be at least 0.0 and must be strictly less than 60.0. + * It will be rounded down to the nearest microsecond. + * + * If the given time is not representable in the given time zone (for + * example, 02:30 on March 14th 2010 in Toronto, due to daylight savings + * time) then the time will be rounded up to the nearest existing time + * (in this case, 03:00). If this matters to you then you should verify + * the return value for containing the same as the numbers you gave. + * + * In the case that the given time is ambiguous in the given time zone + * (for example, 01:30 on November 7th 2010 in Toronto, due to daylight + * savings time) then the time falling within standard (ie: + * non-daylight) time is taken. + * + * It not considered a programmer error for the values to this function + * to be out of range, but in the case that they are, the function will + * return %NULL. + * + * You should release the return value by calling {@link G.date_time_unref} + * when you are done with it. + * @param tz a #GTimeZone + * @param year the year component of the date + * @param month the month component of the date + * @param day the day component of the date + * @param hour the hour component of the date + * @param minute the minute component of the date + * @param seconds the number of seconds past the minute + * @returns a new #GDateTime, or %NULL + */ + public static new(tz: TimeZone, year: number, month: number, day: number, hour: number, minute: number, seconds: number): DateTime | null; + /** + * Creates a #GDateTime corresponding to the given + * [ISO 8601 formatted string](https://en.wikipedia.org/wiki/ISO_8601) + * #text. ISO 8601 strings of the form