/// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /** * Type Definitions for Gjs (https://gjs.guide/) * * These type definitions are automatically generated, do not edit them by hand. * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir * * The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ... */ declare module 'gi://GimpUi?version=3.0' { // Module dependencies import type cairo from 'cairo'; import type GObject from 'gi://GObject?version=2.0'; import type GLib from 'gi://GLib?version=2.0'; import type Pango from 'gi://Pango?version=1.0'; import type HarfBuzz from 'gi://HarfBuzz?version=0.0'; import type freetype2 from 'gi://freetype2?version=2.0'; import type Gio from 'gi://Gio?version=2.0'; import type GModule from 'gi://GModule?version=2.0'; import type Gtk from 'gi://Gtk?version=3.0'; import type xlib from 'gi://xlib?version=2.0'; import type Gdk from 'gi://Gdk?version=3.0'; import type GdkPixbuf from 'gi://GdkPixbuf?version=2.0'; import type Atk from 'gi://Atk?version=1.0'; import type Gimp from 'gi://Gimp?version=3.0'; import type Gegl from 'gi://Gegl?version=0.4'; import type Babl from 'gi://Babl?version=0.1'; export namespace GimpUi { /** * GimpUi-3.0 */ /** * Aspect ratios. */ /** * Aspect ratios. */ export namespace AspectType { export const $gtype: GObject.GType; } enum AspectType { /** * it's a 1:1 square */ SQUARE, /** * it's higher than it's wide */ PORTRAIT, /** * it's wider than it's high */ LANDSCAPE, } /** * Possible chain positions for #GimpChainButton. */ /** * Possible chain positions for #GimpChainButton. */ export namespace ChainPosition { export const $gtype: GObject.GType; } enum ChainPosition { /** * the chain is on top */ TOP, /** * the chain is to the left */ LEFT, /** * the chain is on bottom */ BOTTOM, /** * the chain is to the right */ RIGHT, } /** * The types of transparency display for #GimpColorArea. */ /** * The types of transparency display for #GimpColorArea. */ export namespace ColorAreaType { export const $gtype: GObject.GType; } enum ColorAreaType { /** * don't display transparency */ FLAT, /** * display transparency using small checks */ SMALL_CHECKS, /** * display transparency using large checks */ LARGE_CHECKS, } /** * An enum to specify the types of color channels edited in * #GimpColorSelector widgets. */ /** * An enum to specify the types of color channels edited in * #GimpColorSelector widgets. */ export namespace ColorSelectorChannel { export const $gtype: GObject.GType; } enum ColorSelectorChannel { /** * the hue channel */ HUE, /** * the saturation channel */ SATURATION, /** * the value channel */ VALUE, /** * the red channel */ RED, /** * the green channel */ GREEN, /** * the blue channel */ BLUE, /** * the alpha channel */ ALPHA, /** * the lightness channel */ LCH_LIGHTNESS, /** * the chroma channel */ LCH_CHROMA, /** * the hue channel */ LCH_HUE, } /** * An enum to specify the types of color spaces edited in * #GimpColorSelector widgets. */ /** * An enum to specify the types of color spaces edited in * #GimpColorSelector widgets. */ export namespace ColorSelectorModel { export const $gtype: GObject.GType; } enum ColorSelectorModel { /** * RGB color model */ RGB, /** * CIE LCh color model */ LCH, /** * HSV color model */ HSV, } /** * Possible layouts for #GimpIntComboBox. */ /** * Possible layouts for #GimpIntComboBox. */ export namespace IntComboBoxLayout { export const $gtype: GObject.GType; } enum IntComboBoxLayout { /** * show icons only */ ICON_ONLY, /** * show icons and abbreviated labels, * when available */ ABBREVIATED, /** * show icons and full labels */ FULL, } /** * The column types of #GimpIntStore. */ /** * The column types of #GimpIntStore. */ export namespace IntStoreColumns { export const $gtype: GObject.GType; } enum IntStoreColumns { /** * the integer value */ VALUE, /** * a human-readable label */ LABEL, /** * an abbreviated label */ ABBREV, /** * an icon name */ ICON_NAME, /** * a #GdkPixbuf */ PIXBUF, /** * arbitrary user data */ USER_DATA, /** * the number of columns */ NUM_COLUMNS, } /** * Import targets for #GimpPageSelector. */ /** * Import targets for #GimpPageSelector. */ export namespace PageSelectorTarget { export const $gtype: GObject.GType; } enum PageSelectorTarget { /** * import as layers of one image */ LAYERS, /** * import as separate images */ IMAGES, } /** * Update policies for #GimpSizeEntry. */ /** * Update policies for #GimpSizeEntry. */ export namespace SizeEntryUpdatePolicy { export const $gtype: GObject.GType; } enum SizeEntryUpdatePolicy { /** * the size entry's meaning is up to the user */ NONE, /** * the size entry displays values */ SIZE, /** * the size entry displays resolutions */ RESOLUTION, } /** * Types of errors returned by libgimpwidgets functions */ class WidgetsError extends GLib.Error { static $gtype: GObject.GType; // Static fields /** * A parse error has occurred */ static WIDGETS_PARSE_ERROR: number; // Constructors constructor(options: { message: string; code: number }); _init(...args: any[]): void; } /** * the zoom types for #GimpZoomModel. */ /** * the zoom types for #GimpZoomModel. */ export namespace ZoomType { export const $gtype: GObject.GType; } enum ZoomType { /** * zoom in */ IN, /** * zoom out */ OUT, } /** * The suggested width for a color bar in a #GimpColorSelector * implementation. */ const COLOR_SELECTOR_BAR_SIZE: number; /** * The suggested size for a color area in a #GimpColorSelector * implementation. */ const COLOR_SELECTOR_SIZE: number; const ICON_APPLICATION_EXIT: string; const ICON_ASPECT_LANDSCAPE: string; const ICON_ASPECT_PORTRAIT: string; const ICON_ATTACH: string; const ICON_BUSINESS_CARD: string; const ICON_CAP_BUTT: string; const ICON_CAP_ROUND: string; const ICON_CAP_SQUARE: string; const ICON_CENTER: string; const ICON_CENTER_HORIZONTAL: string; const ICON_CENTER_VERTICAL: string; const ICON_CHAIN_HORIZONTAL: string; const ICON_CHAIN_HORIZONTAL_BROKEN: string; const ICON_CHAIN_VERTICAL: string; const ICON_CHAIN_VERTICAL_BROKEN: string; const ICON_CHANNEL: string; const ICON_CHANNEL_ALPHA: string; const ICON_CHANNEL_BLUE: string; const ICON_CHANNEL_GRAY: string; const ICON_CHANNEL_GREEN: string; const ICON_CHANNEL_INDEXED: string; const ICON_CHANNEL_RED: string; const ICON_CHAR_PICKER: string; const ICON_CLOSE: string; const ICON_CLOSE_ALL: string; const ICON_COLORMAP: string; const ICON_COLORS_DEFAULT: string; const ICON_COLORS_SWAP: string; const ICON_COLOR_PICKER_BLACK: string; const ICON_COLOR_PICKER_GRAY: string; const ICON_COLOR_PICKER_WHITE: string; const ICON_COLOR_PICK_FROM_SCREEN: string; const ICON_COLOR_SELECTOR_CMYK: string; const ICON_COLOR_SELECTOR_TRIANGLE: string; const ICON_COLOR_SELECTOR_WATER: string; const ICON_COLOR_SPACE_LINEAR: string; const ICON_COLOR_SPACE_NON_LINEAR: string; const ICON_COLOR_SPACE_PERCEPTUAL: string; const ICON_CONTROLLER: string; const ICON_CONTROLLER_KEYBOARD: string; const ICON_CONTROLLER_LINUX_INPUT: string; const ICON_CONTROLLER_MIDI: string; const ICON_CONTROLLER_WHEEL: string; const ICON_CONVERT_GRAYSCALE: string; const ICON_CONVERT_INDEXED: string; const ICON_CONVERT_RGB: string; const ICON_CURSOR: string; const ICON_CURVE_FREE: string; const ICON_CURVE_SMOOTH: string; const ICON_DETACH: string; const ICON_DIALOG_CHANNELS: string; const ICON_DIALOG_DASHBOARD: string; const ICON_DIALOG_DEVICE_STATUS: string; const ICON_DIALOG_ERROR: string; const ICON_DIALOG_IMAGES: string; const ICON_DIALOG_INFORMATION: string; const ICON_DIALOG_LAYERS: string; const ICON_DIALOG_NAVIGATION: string; const ICON_DIALOG_PATHS: string; const ICON_DIALOG_QUESTION: string; const ICON_DIALOG_RESHOW_FILTER: string; const ICON_DIALOG_TOOLS: string; const ICON_DIALOG_TOOL_OPTIONS: string; const ICON_DIALOG_UNDO_HISTORY: string; const ICON_DIALOG_WARNING: string; const ICON_DISPLAY: string; const ICON_DISPLAY_FILTER: string; const ICON_DISPLAY_FILTER_CLIP_WARNING: string; const ICON_DISPLAY_FILTER_COLORBLIND: string; const ICON_DISPLAY_FILTER_CONTRAST: string; const ICON_DISPLAY_FILTER_GAMMA: string; const ICON_DISPLAY_FILTER_LCMS: string; const ICON_DISPLAY_FILTER_PROOF: string; const ICON_DOCUMENT_NEW: string; const ICON_DOCUMENT_OPEN: string; const ICON_DOCUMENT_OPEN_RECENT: string; const ICON_DOCUMENT_PAGE_SETUP: string; const ICON_DOCUMENT_PRINT: string; const ICON_DOCUMENT_PRINT_RESOLUTION: string; const ICON_DOCUMENT_PROPERTIES: string; const ICON_DOCUMENT_REVERT: string; const ICON_DOCUMENT_SAVE: string; const ICON_DOCUMENT_SAVE_AS: string; const ICON_DYNAMICS: string; const ICON_EDIT: string; const ICON_EDIT_CLEAR: string; const ICON_EDIT_COPY: string; const ICON_EDIT_CUT: string; const ICON_EDIT_DELETE: string; const ICON_EDIT_FIND: string; const ICON_EDIT_PASTE: string; const ICON_EDIT_PASTE_AS_NEW: string; const ICON_EDIT_PASTE_INTO: string; const ICON_EDIT_REDO: string; const ICON_EDIT_UNDO: string; const ICON_EFFECT: string; const ICON_EVEN_HORIZONTAL_GAP: string; const ICON_EVEN_VERTICAL_GAP: string; const ICON_FILE_MANAGER: string; const ICON_FILL_HORIZONTAL: string; const ICON_FILL_VERTICAL: string; const ICON_FOLDER_NEW: string; const ICON_FONT: string; const ICON_FORMAT_INDENT_LESS: string; const ICON_FORMAT_INDENT_MORE: string; const ICON_FORMAT_JUSTIFY_CENTER: string; const ICON_FORMAT_JUSTIFY_FILL: string; const ICON_FORMAT_JUSTIFY_LEFT: string; const ICON_FORMAT_JUSTIFY_RIGHT: string; const ICON_FORMAT_TEXT_BOLD: string; const ICON_FORMAT_TEXT_DIRECTION_LTR: string; const ICON_FORMAT_TEXT_DIRECTION_RTL: string; const ICON_FORMAT_TEXT_DIRECTION_TTB_LTR: string; const ICON_FORMAT_TEXT_DIRECTION_TTB_LTR_UPRIGHT: string; const ICON_FORMAT_TEXT_DIRECTION_TTB_RTL: string; const ICON_FORMAT_TEXT_DIRECTION_TTB_RTL_UPRIGHT: string; const ICON_FORMAT_TEXT_ITALIC: string; const ICON_FORMAT_TEXT_SPACING_LETTER: string; const ICON_FORMAT_TEXT_SPACING_LINE: string; const ICON_FORMAT_TEXT_STRIKETHROUGH: string; const ICON_FORMAT_TEXT_UNDERLINE: string; const ICON_FRAME: string; const ICON_GEGL: string; const ICON_GO_BOTTOM: string; const ICON_GO_DOWN: string; const ICON_GO_FIRST: string; const ICON_GO_HOME: string; const ICON_GO_LAST: string; const ICON_GO_NEXT: string; const ICON_GO_PREVIOUS: string; const ICON_GO_TOP: string; const ICON_GO_UP: string; const ICON_GRADIENT_BILINEAR: string; const ICON_GRADIENT_CONICAL_ASYMMETRIC: string; const ICON_GRADIENT_CONICAL_SYMMETRIC: string; const ICON_GRADIENT_LINEAR: string; const ICON_GRADIENT_RADIAL: string; const ICON_GRADIENT_SHAPEBURST_ANGULAR: string; const ICON_GRADIENT_SHAPEBURST_DIMPLED: string; const ICON_GRADIENT_SHAPEBURST_SPHERICAL: string; const ICON_GRADIENT_SPIRAL_ANTICLOCKWISE: string; const ICON_GRADIENT_SPIRAL_CLOCKWISE: string; const ICON_GRADIENT_SQUARE: string; const ICON_GRAVITY_EAST: string; const ICON_GRAVITY_NORTH: string; const ICON_GRAVITY_NORTH_EAST: string; const ICON_GRAVITY_NORTH_WEST: string; const ICON_GRAVITY_SOUTH: string; const ICON_GRAVITY_SOUTH_EAST: string; const ICON_GRAVITY_SOUTH_WEST: string; const ICON_GRAVITY_WEST: string; const ICON_GRID: string; const ICON_HELP: string; const ICON_HELP_ABOUT: string; const ICON_HELP_USER_MANUAL: string; const ICON_HISTOGRAM: string; const ICON_HISTOGRAM_LINEAR: string; const ICON_HISTOGRAM_LOGARITHMIC: string; const ICON_IMAGE: string; const ICON_IMAGE_OPEN: string; const ICON_IMAGE_RELOAD: string; const ICON_INPUT_DEVICE: string; const ICON_INVERT: string; const ICON_JOIN_BEVEL: string; const ICON_JOIN_MITER: string; const ICON_JOIN_ROUND: string; const ICON_LAYER: string; const ICON_LAYER_ANCHOR: string; const ICON_LAYER_FLOATING_SELECTION: string; const ICON_LAYER_MASK: string; const ICON_LAYER_MERGE_DOWN: string; const ICON_LAYER_TEXT_LAYER: string; const ICON_LAYER_TO_IMAGESIZE: string; const ICON_LINKED: string; const ICON_LIST: string; const ICON_LIST_ADD: string; const ICON_LIST_REMOVE: string; const ICON_LOCK: string; const ICON_LOCK_ALPHA: string; const ICON_LOCK_CONTENT: string; const ICON_LOCK_MULTI: string; const ICON_LOCK_PATH: string; const ICON_LOCK_POSITION: string; const ICON_LOCK_VISIBILITY: string; const ICON_MARKER: string; const ICON_MENU_LEFT: string; const ICON_MENU_RIGHT: string; const ICON_OBJECT_DUPLICATE: string; const ICON_OBJECT_FLIP_HORIZONTAL: string; const ICON_OBJECT_FLIP_VERTICAL: string; const ICON_OBJECT_RESIZE: string; const ICON_OBJECT_ROTATE_180: string; const ICON_OBJECT_ROTATE_270: string; const ICON_OBJECT_ROTATE_90: string; const ICON_OBJECT_SCALE: string; const ICON_PALETTE: string; const ICON_PATH: string; const ICON_PATH_STROKE: string; const ICON_PATTERN: string; const ICON_PIVOT_CENTER: string; const ICON_PIVOT_EAST: string; const ICON_PIVOT_NORTH: string; const ICON_PIVOT_NORTH_EAST: string; const ICON_PIVOT_NORTH_WEST: string; const ICON_PIVOT_SOUTH: string; const ICON_PIVOT_SOUTH_EAST: string; const ICON_PIVOT_SOUTH_WEST: string; const ICON_PIVOT_WEST: string; const ICON_PLUGIN: string; const ICON_PREFERENCES_SYSTEM: string; const ICON_PROCESS_STOP: string; const ICON_QUICK_MASK_OFF: string; const ICON_QUICK_MASK_ON: string; const ICON_RECORD: string; const ICON_RESET: string; const ICON_SAMPLE_POINT: string; const ICON_SELECTION: string; const ICON_SELECTION_ADD: string; const ICON_SELECTION_ALL: string; const ICON_SELECTION_BORDER: string; const ICON_SELECTION_GROW: string; const ICON_SELECTION_INTERSECT: string; const ICON_SELECTION_NONE: string; const ICON_SELECTION_REPLACE: string; const ICON_SELECTION_SHRINK: string; const ICON_SELECTION_STROKE: string; const ICON_SELECTION_SUBTRACT: string; const ICON_SELECTION_TO_CHANNEL: string; const ICON_SELECTION_TO_PATH: string; const ICON_SHAPE_CIRCLE: string; const ICON_SHAPE_DIAMOND: string; const ICON_SHAPE_SQUARE: string; const ICON_SHRED: string; const ICON_SMARTPHONE: string; const ICON_SYMMETRY: string; const ICON_SYSTEM_RUN: string; const ICON_TEMPLATE: string; const ICON_TEXTURE: string; const ICON_TOOL_AIRBRUSH: string; const ICON_TOOL_ALIGN: string; const ICON_TOOL_BLUR: string; const ICON_TOOL_BRIGHTNESS_CONTRAST: string; const ICON_TOOL_BUCKET_FILL: string; const ICON_TOOL_BY_COLOR_SELECT: string; const ICON_TOOL_CAGE: string; const ICON_TOOL_CLONE: string; const ICON_TOOL_COLORIZE: string; const ICON_TOOL_COLOR_BALANCE: string; const ICON_TOOL_COLOR_PICKER: string; const ICON_TOOL_COLOR_TEMPERATURE: string; const ICON_TOOL_CROP: string; const ICON_TOOL_CURVES: string; const ICON_TOOL_DESATURATE: string; const ICON_TOOL_DODGE: string; const ICON_TOOL_ELLIPSE_SELECT: string; const ICON_TOOL_ERASER: string; const ICON_TOOL_EXPOSURE: string; const ICON_TOOL_FLIP: string; const ICON_TOOL_FOREGROUND_SELECT: string; const ICON_TOOL_FREE_SELECT: string; const ICON_TOOL_FUZZY_SELECT: string; const ICON_TOOL_GRADIENT: string; const ICON_TOOL_HANDLE_TRANSFORM: string; const ICON_TOOL_HEAL: string; const ICON_TOOL_HUE_SATURATION: string; const ICON_TOOL_INK: string; const ICON_TOOL_ISCISSORS: string; const ICON_TOOL_LEVELS: string; const ICON_TOOL_MEASURE: string; const ICON_TOOL_MOVE: string; const ICON_TOOL_MYPAINT_BRUSH: string; const ICON_TOOL_N_POINT_DEFORMATION: string; const ICON_TOOL_OFFSET: string; const ICON_TOOL_PAINTBRUSH: string; const ICON_TOOL_PAINT_SELECT: string; const ICON_TOOL_PATH: string; const ICON_TOOL_PENCIL: string; const ICON_TOOL_PERSPECTIVE: string; const ICON_TOOL_PERSPECTIVE_CLONE: string; const ICON_TOOL_POSTERIZE: string; const ICON_TOOL_PRESET: string; const ICON_TOOL_RECT_SELECT: string; const ICON_TOOL_ROTATE: string; const ICON_TOOL_SCALE: string; const ICON_TOOL_SEAMLESS_CLONE: string; const ICON_TOOL_SHADOWS_HIGHLIGHTS: string; const ICON_TOOL_SHEAR: string; const ICON_TOOL_SMUDGE: string; const ICON_TOOL_TEXT: string; const ICON_TOOL_THRESHOLD: string; const ICON_TOOL_TRANSFORM_3D: string; const ICON_TOOL_UNIFIED_TRANSFORM: string; const ICON_TOOL_WARP: string; const ICON_TOOL_ZOOM: string; const ICON_TRANSFORM_3D_CAMERA: string; const ICON_TRANSFORM_3D_MOVE: string; const ICON_TRANSFORM_3D_ROTATE: string; const ICON_TRANSPARENCY: string; const ICON_VIDEO: string; const ICON_VIEW_FULLSCREEN: string; const ICON_VIEW_REFRESH: string; const ICON_VIEW_SHRINK_WRAP: string; const ICON_VIEW_ZOOM_FILL: string; const ICON_VISIBLE: string; const ICON_WEB: string; const ICON_WILBER: string; const ICON_WILBER_EEK: string; const ICON_WINDOW_CLOSE: string; const ICON_WINDOW_MOVE_TO_SCREEN: string; const ICON_WINDOW_NEW: string; const ICON_ZOOM_FIT_BEST: string; const ICON_ZOOM_FOLLOW_WINDOW: string; const ICON_ZOOM_IN: string; const ICON_ZOOM_ORIGINAL: string; const ICON_ZOOM_OUT: string; /** * Sets color and dash pattern for stroking a focus line on the given * `cr`. The line pattern is taken from `widget`. * @param cr Cairo context * @param widget widget to draw the focus indicator on * @returns %TRUE if the widget style has a focus line pattern, %FALSE otherwise */ function cairo_set_focus_line_pattern(cr: cairo.Context, widget: Gtk.Widget): boolean; /** * Sets `color` as the source pattern within `cr,` taking into account the profile * of the [class`Gdk`.Monitor] which `widget` is displayed on. * * If `config` is set, the color configuration as set by the user will be used, * in particular using any custom monitor profile set in preferences (overriding * system-set profile). If no such custom profile is set, it will use the * profile of the monitor `widget` is displayed on and will default to sRGB if * `widget` is %NULL. * * Use [func`Gimp`.get_color_configuration] to retrieve the user * [class`Gimp`.ColorConfig]. * * TODO: `softproof` is currently unused. * @param cr Cairo context. * @param color the [class@Gegl.Color] to use as source pattern within @cr. * @param config the color management settings. * @param softproof whether the color must also be soft-proofed. * @param widget [class@Gtk.Widget] to draw the focus indicator on. */ function cairo_set_source_color( cr: cairo.Context, color: Gegl.Color, config: Gimp.ColorConfig, softproof: boolean, widget?: Gtk.Widget | null, ): void; /** * Create a Cairo image surface from a GdkPixbuf. * * You should avoid calling this function as there are probably more * efficient ways of achieving the result you are looking for. * @param pixbuf a #GdkPixbuf * @returns a #cairo_surface_t. */ function cairo_surface_create_from_pixbuf(pixbuf: GdkPixbuf.Pixbuf): cairo.Surface; /** * This function invokes the context help inspector. * * The mouse cursor will turn turn into a question mark and the user can * click on any widget of the application which started the inspector. * * If the widget the user clicked on has a `help_id` string attached * (see gimp_help_set_help_data()), the corresponding help page will * be displayed. Otherwise the help system will ascend the widget hierarchy * until it finds an attached `help_id` string (which should be the * case at least for every window/dialog). * @param widget Any #GtkWidget on the screen. */ function context_help(widget: Gtk.Widget): void; /** * Convenience function that creates a #GimpSizeEntry with two fields for x/y * coordinates/sizes with a #GimpChainButton attached to constrain either the * two fields' values or the ratio between them. * @param unit The initial unit of the #GimpUnitMenu. * @param unit_format A printf-like unit-format string as is used with gimp_unit_menu_new(). * @param menu_show_pixels %TRUE if the #GimpUnitMenu should contain an item for GIMP_UNIT_PIXEL. * @param menu_show_percent %TRUE if the #GimpUnitMenu should contain an item for GIMP_UNIT_PERCENT. * @param spinbutton_width The horizontal size of the #GimpSizeEntry's #GtkSpinButton's. * @param update_policy The update policy for the #GimpSizeEntry. * @param chainbutton_active %TRUE if the attached #GimpChainButton should be active. * @param chain_constrains_ratio %TRUE if the chainbutton should constrain the fields' aspect ratio. If %FALSE, the values will be constrained. * @param xlabel The label for the X coordinate. * @param x The initial value of the X coordinate. * @param xres The horizontal resolution in DPI. * @param lower_boundary_x The lower boundary of the X coordinate. * @param upper_boundary_x The upper boundary of the X coordinate. * @param xsize_0 The X value which will be treated as 0%. * @param xsize_100 The X value which will be treated as 100%. * @param ylabel The label for the Y coordinate. * @param y The initial value of the Y coordinate. * @param yres The vertical resolution in DPI. * @param lower_boundary_y The lower boundary of the Y coordinate. * @param upper_boundary_y The upper boundary of the Y coordinate. * @param ysize_0 The Y value which will be treated as 0%. * @param ysize_100 The Y value which will be treated as 100%. * @returns The new #GimpSizeEntry. */ function coordinates_new( unit: Gimp.Unit, unit_format: string, menu_show_pixels: boolean, menu_show_percent: boolean, spinbutton_width: number, update_policy: SizeEntryUpdatePolicy | null, chainbutton_active: boolean, chain_constrains_ratio: boolean, xlabel: string, x: number, xres: number, lower_boundary_x: number, upper_boundary_x: number, xsize_0: number, xsize_100: number, ylabel: string, y: number, yres: number, lower_boundary_y: number, upper_boundary_y: number, ysize_0: number, ysize_100: number, ): Gtk.Widget; function double_adjustment_update(adjustment: Gtk.Adjustment): number; /** * Creates a horizontal box of radio buttons with named icons. The * icon name for each icon is created by appending the enum_value's * nick to the given `icon_prefix`. * @param enum_type the #GType of an enum. * @param icon_prefix the prefix of the group of icon names to use. * @param icon_size the icon size for the icons * @param callback a callback to connect to the "toggled" signal of each #GtkRadioButton that is created. * @returns a new horizontal #GtkBox holding a group of #GtkRadioButtons. */ function enum_icon_box_new( enum_type: GObject.GType, icon_prefix: string, icon_size: Gtk.IconSize | null, callback?: GObject.Callback | null, ): [Gtk.Widget, Gtk.Widget | null]; /** * Just like gimp_enum_icon_box_new(), this function creates a group * of radio buttons, but additionally it supports limiting the range * of available enum values. * @param enum_type the #GType of an enum. * @param minimum the minumim enum value * @param maximum the maximum enum value * @param icon_prefix the prefix of the group of icon names to use. * @param icon_size the icon size for the icons * @param callback a callback to connect to the "toggled" signal of each #GtkRadioButton that is created. * @returns a new horizontal #GtkBox holding a group of #GtkRadioButtons. */ function enum_icon_box_new_with_range( enum_type: GObject.GType, minimum: number, maximum: number, icon_prefix: string, icon_size: Gtk.IconSize | null, callback?: GObject.Callback | null, ): [Gtk.Widget, Gtk.Widget | null]; /** * Sets the padding of all buttons in a box created by * gimp_enum_icon_box_new(). * @param icon_box an icon box widget * @param xpad horizontal padding * @param ypad vertical padding */ function enum_icon_box_set_child_padding(icon_box: Gtk.Widget, xpad: number, ypad: number): void; /** * Sets the icon size of all buttons in a box created by * gimp_enum_icon_box_new(). * @param icon_box an icon box widget * @param icon_size the #GtkIconSize enum */ function enum_icon_box_set_icon_size(icon_box: Gtk.Widget, icon_size: Gtk.IconSize | null): void; /** * Creates a new group of #GtkRadioButtons representing the enum * values. A group of radiobuttons is a good way to represent enums * with up to three or four values. Often it is better to use a * #GimpEnumComboBox instead. * @param enum_type the #GType of an enum. * @param callback a callback to connect to the "toggled" signal of each #GtkRadioButton that is created. * @returns a new #GtkBox holding a group of #GtkRadioButtons. */ function enum_radio_box_new( enum_type: GObject.GType, callback?: GObject.Callback | null, ): [Gtk.Widget, Gtk.Widget | null]; /** * Just like gimp_enum_radio_box_new(), this function creates a group * of radio buttons, but additionally it supports limiting the range * of available enum values. * @param enum_type the #GType of an enum. * @param minimum the minimum enum value * @param maximum the maximum enum value * @param callback a callback to connect to the "toggled" signal of each #GtkRadioButton that is created. * @returns a new vertical #GtkBox holding a group of #GtkRadioButtons */ function enum_radio_box_new_with_range( enum_type: GObject.GType, minimum: number, maximum: number, callback?: GObject.Callback | null, ): [Gtk.Widget, Gtk.Widget | null]; /** * Calls gimp_enum_radio_box_new() and puts the resulting vbox into a * #GtkFrame. * @param enum_type the #GType of an enum. * @param label_widget a #GtkWidget to use as label for the frame that will hold the radio box. * @param callback a callback to connect to the "toggled" signal of each #GtkRadioButton that is created. * @returns a new #GtkFrame holding a group of #GtkRadioButtons. */ function enum_radio_frame_new( enum_type: GObject.GType, label_widget?: Gtk.Widget | null, callback?: GObject.Callback | null, ): [Gtk.Widget, Gtk.Widget | null]; /** * Calls gimp_enum_radio_box_new_with_range() and puts the resulting * vertical box into a #GtkFrame. * @param enum_type the #GType of an enum. * @param minimum the minimum enum value * @param maximum the maximum enum value * @param label_widget a widget to put into the frame that will hold the radio box. * @param callback a callback to connect to the "toggled" signal of each #GtkRadioButton that is created. * @returns a new #GtkFrame holding a group of #GtkRadioButtons. */ function enum_radio_frame_new_with_range( enum_type: GObject.GType, minimum: number, maximum: number, label_widget?: Gtk.Widget | null, callback?: GObject.Callback | null, ): [Gtk.Widget, Gtk.Widget | null]; /** * Alternative of gdk_event_triggers_context_menu() with the additional * feature of allowing a menu triggering to happen on a button release * event. All the other rules on whether `event` should trigger a * contextual menu are exactly the same. Only the swapping to release * state as additional feature is different. * @param event The #GdkEvent to verify. * @param on_release Whether a menu is triggered on a button release event instead of a press event. * @returns %TRUE if the event should trigger a context menu. */ function event_triggers_context_menu(event: Gdk.Event, on_release: boolean): boolean; function float_adjustment_update(adjustment: Gtk.Adjustment): number; function get_monitor_at_pointer(): Gdk.Monitor; /** * Note that the `label_text` can be %NULL and that the widget will be * attached starting at (`column` + 1) in this case, too. * @param grid The #GtkGrid the widgets will be attached to. * @param left The column to start with. * @param top The row to attach the widgets. * @param label_text The text for the #GtkLabel which will be attached left of the widget. * @param label_xalign The horizontal alignment of the #GtkLabel. * @param label_yalign The vertical alignment of the #GtkLabel. * @param widget The #GtkWidget to attach right of the label. * @param widget_columns The number of columns the widget will use. * @returns The created #GtkLabel. */ function grid_attach_aligned( grid: Gtk.Grid, left: number, top: number, label_text: string, label_xalign: number, label_yalign: number, widget: Gtk.Widget, widget_columns: number, ): Gtk.Widget; /** * Note that this function is automatically called by all libgimp dialog * constructors. You only have to call it for windows/dialogs you created * "manually". * * Most of the time, what you want to call for non-windows widgets is * simply [func`GimpUi`.help_set_help_data]. Yet if you need to set up an * `help_func,` call `gimp_help_connect` instead. Note that `gimp_help_set_help_data` * is implied, so you don't have to call it too. * @param widget The widget you want to connect the help accelerator for. Will be a #GtkWindow in most cases. * @param tooltip The text for this widget's tooltip. For windows, you usually want to set %NULL. * @param help_func The function which will be called if the user presses "F1". * @param help_id The @help_id which will be passed to @help_func. */ function help_connect(widget: Gtk.Widget, tooltip: string | null, help_func: HelpFunc, help_id: string): void; /** * This function returns the #GQuark which should be used as key when * attaching help IDs to widgets and objects. * @returns The #GQuark. */ function help_id_quark(): GLib.Quark; /** * The reason why we don't use gtk_widget_set_tooltip_text() is that * elements in the GIMP user interface should, if possible, also have * a `help_id` set for context-sensitive help. * * This function can be called with %NULL for `tooltip`. Use this feature * if you want to set a help link for a widget which shouldn't have * a visible tooltip. * @param widget The #GtkWidget you want to set a @tooltip and/or @help_id for. * @param tooltip The text for this widget's tooltip (or %NULL). * @param help_id The @help_id for the #GtkTipsQuery tooltips inspector. */ function help_set_help_data(widget: Gtk.Widget, tooltip: string | null, help_id: string): void; /** * Just like gimp_help_set_help_data(), but supports to pass text * which is marked up with Pango * text markup language. * @param widget The #GtkWidget you want to set a @tooltip and/or @help_id for. * @param tooltip The markup for this widget's tooltip (or %NULL). * @param help_id The @help_id for the #GtkTipsQuery tooltips inspector. */ function help_set_help_data_with_markup(widget: Gtk.Widget, tooltip: string, help_id: string): void; /** * Initializes the GIMP stock icon factory. * * You don't need to call this function as gimp_ui_init() already does * this for you. */ function icons_init(): void; function icons_set_icon_theme(path: Gio.File): boolean; /** * This function initializes GTK+ with gtk_init(). * It also initializes Gegl and Babl. * * It also sets up various other things so that the plug-in user looks * and behaves like the GIMP core. This includes selecting the GTK+ * theme and setting up the help system as chosen in the GIMP * preferences. Any plug-in that provides a user interface should call * this function. * * It can safely be called more than once. * Calls after the first return quickly with no effect. * @param prog_name The name of the plug-in which will be passed as argv[0] to gtk_init(). It's a convention to use the name of the executable and _not_ the PDB procedure name. */ function init(prog_name: string): void; /** * Note that the #GtkAdjustment's value (which is a #gdouble) will be * rounded with RINT(). * @param adjustment A #GtkAdjustment. */ function int_adjustment_update(adjustment: Gtk.Adjustment): number; /** * Calls gtk_toggle_button_set_active() with the radio button that was created * with a matching `item_data`. This function does the same thing as * gimp_radio_group_set_active(), but takes integers as `item_data` instead * of pointers. * @param radio_button Pointer to a #GtkRadioButton. * @param item_data The @item_data of the radio button you want to select. */ function int_radio_group_set_active(radio_button: Gtk.RadioButton, item_data: number): void; /** * This function returns the #GimpColorProfile of `monitor` * or %NULL if there is no profile configured. * @param monitor a #GdkMonitor * @returns the monitor's #GimpColorProfile, or %NULL. */ function monitor_get_color_profile(monitor: Gdk.Monitor): Gimp.ColorProfile | null; function proc_view_new(procedure_name: string): Gtk.Widget; /** * Creates a #GtkComboBox widget to display and set the specified * boolean property. The combo box will have two entries, one * displaying the `true_text` label, the other displaying the * `false_text` label. * @param config Object to which property is attached. * @param property_name Name of boolean property controlled by combo box. * @param true_text Label used for entry corresponding to %TRUE value. * @param false_text Label used for entry corresponding to %FALSE value. * @returns The newly created #GtkComboBox widget. */ function prop_boolean_combo_box_new( config: GObject.Object, property_name: string, true_text: string, false_text: string, ): Gtk.Widget; /** * Creates a pair of radio buttons which function to set and display * the specified boolean property. * If `title` is %NULL, the `property_name'`s nick will be used as label * of the returned frame. * @param config Object to which property is attached. * @param property_name Name of boolean property controlled by the radio buttons. * @param title Label for the frame. * @param true_text Label for the button corresponding to %TRUE. * @param false_text Label for the button corresponding to %FALSE. * @returns A #GimpFrame containing the radio buttons. */ function prop_boolean_radio_frame_new( config: GObject.Object, property_name: string, title: string | null, true_text: string, false_text: string, ): Gtk.Widget; /** * Creates a [class`GimpUi`.BrushChooser] controlled by the specified property. * @param config Object to which property is attached. * @param property_name Name of a [class@Gimp.Brush] property. * @param chooser_title title for the poppable dialog. * @returns A new [class@GimpUi.BrushChooser]. */ function prop_brush_chooser_new( config: GObject.Object, property_name: string, chooser_title?: string | null, ): Gtk.Widget; /** * Creates a #GtkCheckButton that displays and sets the specified * boolean property. * If `label` is %NULL, the `property_name'`s nick will be used as label * of the returned button. * @param config Object to which property is attached. * @param property_name Name of boolean property controlled by checkbutton. * @param label Label to give checkbutton (including mnemonic). * @returns The newly created #GtkCheckButton widget. */ function prop_check_button_new( config: GObject.Object, property_name: string, label?: string | null, ): Gtk.Widget; /** * Creates a #GimpStringComboBox widget to display and set the * specified property. * @param config Object to which property is attached. * @param property_name Name of %GimpChoice property controlled by combo box. * @returns The newly created #GimpStringComboBox widget. */ function prop_choice_combo_box_new(config: GObject.Object, property_name: string): Gtk.Widget; /** * Creates a [class`GimpUi`.IntRadioFrame] widget to display and set the * specified [class`Gimp`.Choice] property. * @param config Object to which property is attached. * @param property_name Name of %GimpChoice property controlled by radio buttons. * @returns The newly created #GimpIntRadioFrame widget. */ function prop_choice_radio_frame_new(config: GObject.Object, property_name: string): Gtk.Widget; /** * Creates a #GimpColorArea to set and display the value of an RGB * property. * @param config Object to which property is attached. * @param property_name Name of %GeglColor property. * @param width Width of color area. * @param height Height of color area. * @param type How transparency is represented. * @returns A new #GimpColorArea widget. */ function prop_color_area_new( config: GObject.Object, property_name: string, width: number, height: number, type: ColorAreaType | null, ): Gtk.Widget; /** * Creates a #GimpColorButton to set and display the value of a color * property. * @param config Object to which property is attached. * @param property_name Name of [class@Gegl.Color] property. * @param width Width of the colorpreview in pixels. * @param height Height of the colorpreview in pixels. * @param type How transparency is represented. * @returns A new #GimpColorButton widget. */ function prop_color_select_new( config: GObject.Object, property_name: string, width: number, height: number, type: ColorAreaType | null, ): Gtk.Widget; function prop_coordinates_connect( config: GObject.Object, x_property_name: string, y_property_name: string, unit_property_name: string, sizeentry: Gtk.Widget, chainbutton: Gtk.Widget, xresolution: number, yresolution: number, ): boolean; /** * Creates a #GimpSizeEntry to set and display two double or int * properties, which will usually represent X and Y coordinates, and * their associated unit property. * @param config Object to which property is attached. * @param x_property_name Name of int or double property for X coordinate. * @param y_property_name Name of int or double property for Y coordinate. * @param unit_property_name Name of unit property. * @param unit_format A printf-like unit-format string as is used with gimp_unit_menu_new(). * @param update_policy How the automatic pixel <-> real-world-unit calculations should be done. * @param xresolution The resolution (in dpi) for the X coordinate. * @param yresolution The resolution (in dpi) for the Y coordinate. * @param has_chainbutton Whether to add a chainbutton to the size entry. * @returns A new #GimpSizeEntry widget. */ function prop_coordinates_new( config: GObject.Object, x_property_name: string, y_property_name: string, unit_property_name: string, unit_format: string, update_policy: SizeEntryUpdatePolicy | null, xresolution: number, yresolution: number, has_chainbutton: boolean, ): Gtk.Widget; /** * Creates a [class`GimpUi`.DrawableChooser] controlled by the specified property. * @param config Object to which property is attached. * @param property_name Name of a [class@Gimp.Drawable] property. * @param chooser_title title for the poppable dialog. * @returns A new [class@GimpUi.DrawableChooser]. */ function prop_drawable_chooser_new( config: GObject.Object, property_name: string, chooser_title?: string | null, ): Gtk.Widget; /** * Creates a #GtkEntry to set and display the value of the specified * string property. * @param config Object to which property is attached. * @param property_name Name of string property. * @param max_len Maximum allowed length of string. * @returns A new #GtkEntry widget. */ function prop_entry_new(config: GObject.Object, property_name: string, max_len: number): Gtk.Widget; /** * Creates a #GtkCheckButton that displays and sets the specified * property of type Enum. Note that this widget only allows two values * for the enum, one corresponding to the "checked" state and the * other to the "unchecked" state. * If `label` is %NULL, the `property_name'`s nick will be used as label * of the returned button. * @param config Object to which property is attached. * @param property_name Name of enum property controlled by checkbutton. * @param label Label to give checkbutton (including mnemonic). * @param false_value Enum value corresponding to unchecked state. * @param true_value Enum value corresponding to checked state. * @returns The newly created #GtkCheckButton widget. */ function prop_enum_check_button_new( config: GObject.Object, property_name: string, label: string | null, false_value: number, true_value: number, ): Gtk.Widget; /** * Creates a #GimpIntComboBox widget to display and set the specified * enum property. The `mimimum_value` and `maximum_value` give the * possibility of restricting the allowed range to a subset of the * enum. If the two values are equal (e.g., 0, 0), then the full * range of the Enum is used. * @param config Object to which property is attached. * @param property_name Name of enum property controlled by combo box. * @param minimum Smallest allowed value of enum. * @param maximum Largest allowed value of enum. * @returns The newly created #GimpEnumComboBox widget. */ function prop_enum_combo_box_new( config: GObject.Object, property_name: string, minimum: number, maximum: number, ): Gtk.Widget; /** * Creates a horizontal box of radio buttons with named icons, which * function to set and display the value of the specified Enum * property. The icon name for each icon is created by appending the * enum_value's nick to the given `icon_prefix`. See * gimp_enum_icon_box_new() for more information. * @param config Object to which property is attached. * @param property_name Name of enum property controlled by the radio buttons. * @param icon_prefix The prefix of the group of icon names to use. * @param minimum Smallest value of enum to be included. * @param maximum Largest value of enum to be included. * @returns A #libgimpwidgets-gimpenumiconbox containing the radio buttons. */ function prop_enum_icon_box_new( config: GObject.Object, property_name: string, icon_prefix: string, minimum: number, maximum: number, ): Gtk.Widget; function prop_enum_label_new(config: GObject.Object, property_name: string): Gtk.Widget; /** * Creates a group of radio buttons which function to set and display * the specified enum property. The `minimum` and `maximum` arguments * allow only a subset of the enum to be used. If the two arguments * are equal (e.g., 0, 0), then the full range of the enum will be used. * If you want to assign a label to the group of radio buttons, use * gimp_prop_enum_radio_frame_new() instead of this function. * @param config Object to which property is attached. * @param property_name Name of enum property controlled by the radio buttons. * @param minimum Smallest value of enum to be included. * @param maximum Largest value of enum to be included. * @returns A #GtkBox containing the radio buttons. */ function prop_enum_radio_box_new( config: GObject.Object, property_name: string, minimum: number, maximum: number, ): Gtk.Widget; /** * Creates a group of radio buttons which function to set and display * the specified enum property. The `minimum` and `maximum` arguments * allow only a subset of the enum to be used. If the two arguments * are equal (e.g., 0, 0), then the full range of the enum will be used. * If `title` is %NULL, the `property_name'`s nick will be used as label * of the returned frame. * @param config Object to which property is attached. * @param property_name Name of enum property controlled by the radio buttons. * @param title Label for the frame holding the buttons * @param minimum Smallest value of enum to be included. * @param maximum Largest value of enum to be included. * @returns A #GimpFrame containing the radio buttons. */ function prop_enum_radio_frame_new( config: GObject.Object, property_name: string, title: string | null, minimum: number, maximum: number, ): Gtk.Widget; /** * Creates a #GtkExpander controlled by the specified boolean property. * A value of %TRUE for the property corresponds to the expanded state * for the widget. * If `label` is %NULL, the `property_name'`s nick will be used as label * of the returned widget. * @param config Object to which property is attached. * @param property_name Name of boolean property. * @param label Label for expander. * @returns A new #GtkExpander widget. */ function prop_expander_new(config: GObject.Object, property_name: string, label?: string | null): Gtk.Widget; /** * Creates a #GtkFileChooserButton to edit the specified path property. * `property_name` must represent either a GIMP_PARAM_SPEC_CONFIG_PATH or * a G_PARAM_SPEC_OBJECT where `value_type == G_TYPE_FILE`. * * Note that #GtkFileChooserButton implements the #GtkFileChooser * interface; you can use the #GtkFileChooser API with it. * @param config object to which property is attached. * @param property_name name of path property. * @param title the title of the browse dialog. * @param action the open mode for the widget. * @returns A new #GtkFileChooserButton. */ function prop_file_chooser_button_new( config: GObject.Object, property_name: string, title: string | null, action: Gtk.FileChooserAction | null, ): Gtk.Widget; /** * Creates a #GtkFileChooserButton to edit the specified path property. * * The button uses `dialog` as it's file-picking window. Note that `dialog` * must be a #GtkFileChooserDialog (or subclass) and must not have * %GTK_DIALOG_DESTROY_WITH_PARENT set. * * Note that #GtkFileChooserButton implements the #GtkFileChooser * interface; you can use the #GtkFileChooser API with it. * @param config object to which property is attached. * @param property_name name of path property. * @param dialog the #GtkFileChooserDialog widget to use. * @returns A new #GtkFileChooserButton. */ function prop_file_chooser_button_new_with_dialog( config: GObject.Object, property_name: string, dialog: Gtk.Widget, ): Gtk.Widget; /** * Creates a [class`GimpUi`.FileChooser] to edit the specified file * property. `property_name` must be a %GimpParamSpecFile with an action * other than [enum`Gimp`.FileChooserAction.ANY]. * * If `label` is %NULL, `property_name'`s `nick` text will be used * instead. * @param config Object to which property is attached. * @param property_name Name of a %GimpParamSpecFile property. * @param label Label of the widget. * @param title Title of the file dialog. * @returns A new #GtkFileChooserButton. */ function prop_file_chooser_new( config: GObject.Object, property_name: string, label?: string | null, title?: string | null, ): Gtk.Widget; /** * Creates a [class`GimpUi`.FontChooser] controlled by the specified property. * @param config Object to which property is attached. * @param property_name Name of a [class@Gimp.Font] property. * @param chooser_title title for the poppable dialog. * @returns A new [class@GimpUi.FontChooser]. */ function prop_font_chooser_new( config: GObject.Object, property_name: string, chooser_title?: string | null, ): Gtk.Widget; /** * Creates a [class`GimpUi`.GradientChooser] controlled by the specified property. * @param config Object to which property is attached. * @param property_name Name of a [class@Gimp.Gradient] property. * @param chooser_title title for the poppable dialog. * @returns A new [class@GimpUi.GradientChooser]. */ function prop_gradient_chooser_new( config: GObject.Object, property_name: string, chooser_title?: string | null, ): Gtk.Widget; /** * Creates a horizontal scale to control the value of the specified * integer or double property. * @param config Object to which property is attached. * @param property_name Name of integer or double property controlled by the scale. * @param step_increment Step size. * @param page_increment Page size. * @param digits Number of digits after decimal point to display. * @returns A new #GtkScale. */ function prop_hscale_new( config: GObject.Object, property_name: string, step_increment: number, page_increment: number, digits: number, ): Gtk.Widget; /** * Creates a widget to display a icon image representing the value of the * specified string property, which should encode an icon name. * See gtk_image_new_from_icon_name() for more information. * @param config Object to which property is attached. * @param property_name Name of string property. * @param icon_size Size of desired icon image. * @returns A new #GtkImage widget. */ function prop_icon_image_new( config: GObject.Object, property_name: string, icon_size: Gtk.IconSize | null, ): Gtk.Widget; /** * Creates a #GimpIntComboBox widget to display and set the specified * property. The contents of the widget are determined by `store,` * which should be created using gimp_int_store_new(). * @param config Object to which property is attached. * @param property_name Name of int property controlled by combo box. * @param store #GimpIntStore holding list of labels, values, etc. * @returns The newly created #GimpIntComboBox widget. */ function prop_int_combo_box_new(config: GObject.Object, property_name: string, store: IntStore): Gtk.Widget; /** * Creates a group of radio buttons which function to set and display * the specified int property. If `title` is %NULL, the * `property_name'`s nick will be used as label of the returned frame. * @param config Object to which property is attached. * @param property_name Name of enum property controlled by the radio buttons. * @param title Label for the frame holding the buttons * @param store #GimpIntStore holding list of labels, values, etc. * @returns A #GimpFrame containing the radio buttons. */ function prop_int_radio_frame_new( config: GObject.Object, property_name: string, title: string | null, store: IntStore, ): Gtk.Widget; /** * Creates a #GimpLabelColor to set and display the value of an RGB * property. * @param config Object to which property is attached. * @param property_name Name of RGB property. * @param editable Whether the widget should allow color editability. * @returns A new #GimpLabelColor widget. */ function prop_label_color_new(config: GObject.Object, property_name: string, editable: boolean): Gtk.Widget; /** * Creates a #GimpLabelEntry to set and display the value of the * specified string property. * @param config Object to which property is attached. * @param property_name Name of string property. * @param max_len Maximum allowed length of string (set to negative for no maximum). * @returns A new #GtkEntry widget. */ function prop_label_entry_new(config: GObject.Object, property_name: string, max_len: number): Gtk.Widget; /** * Creates a #GtkLabel to display the value of the specified property. * The property should be a string property or at least transformable * to a string. If the user should be able to edit the string, use * gimp_prop_entry_new() instead. * @param config Object to which property is attached. * @param property_name Name of string property. * @returns A new #GtkLabel widget. */ function prop_label_new(config: GObject.Object, property_name: string): Gtk.Widget; /** * Creates a #GimpLabelSpin to set and display the value of the * specified double property. * @param config Object to which property is attached. * @param property_name * @param digits Number of digits after decimal point to display. * @returns A new #libgimpwidgets-gimpspinbutton. */ function prop_label_spin_new(config: GObject.Object, property_name: string, digits: number): Gtk.Widget; /** * Creates a #GimpMemsizeEntry (spin button and option menu) to set * and display the value of the specified memsize property. See * gimp_memsize_entry_new() for more information. * @param config Object to which property is attached. * @param property_name Name of memsize property. * @returns A new #GimpMemsizeEntry. */ function prop_memsize_entry_new(config: GObject.Object, property_name: string): Gtk.Widget; /** * Creates a [class`GimpUi`.PaletteChooser] controlled by the specified property. * @param config Object to which property is attached. * @param property_name Name of a [class@Gimp.Palette] property. * @param chooser_title title for the poppable dialog. * @returns A new [class@GimpUi.PaletteChooser]. */ function prop_palette_chooser_new( config: GObject.Object, property_name: string, chooser_title?: string | null, ): Gtk.Widget; /** * Creates a #GimpPathEditor to edit the specified path and writable * path properties. * @param config object to which property is attached. * @param path_property_name name of path property. * @param writable_property_name name of writable path property. * @param filechooser_title window title of #GtkFileChooserDialog widget. * @returns A new #GimpPathEditor. */ function prop_path_editor_new( config: GObject.Object, path_property_name: string, writable_property_name: string, filechooser_title: string, ): Gtk.Widget; /** * Creates a [class`GimpUi`.PatternChooser] controlled by the specified property. * @param config Object to which property is attached. * @param property_name Name of a [class@Gimp.Pattern] property. * @param chooser_title title for the poppable dialog. * @returns A new [class@GimpUi.PatternChooser]. */ function prop_pattern_chooser_new( config: GObject.Object, property_name: string, chooser_title?: string | null, ): Gtk.Widget; /** * Creates a #GimpIntComboBox widget to display and set the specified * property. The contents of the widget are determined by `store,` * which should be created using gimp_int_store_new(). * Values are GType/gpointer data, and therefore must be stored in the * "user-data" column, instead of the usual "value" column. * @param config Object to which property is attached. * @param property_name Name of GType/gpointer property controlled by combo box. * @param store #GimpIntStore holding list of labels, values, etc. * @returns The newly created #GimpIntComboBox widget. */ function prop_pointer_combo_box_new(config: GObject.Object, property_name: string, store: IntStore): Gtk.Widget; /** * Creates a #GimpScaleEntry (slider and spin button) to set and display * the value of a specified int or double property with sensible default * settings depending on the range (decimal places, increments, etc.). * These settings can be overridden by the relevant widget methods. * * If `label` is %NULL, the `property_name'`s nick will be used as label * of the returned object. * * If `factor` is not 1.0, the widget's range will be computed based of * `property_name'`s range multiplied by `factor`. A typical usage would * be to display a [0.0, 1.0] range as [0.0, 100.0] by setting 100.0 as * `factor`. * * See gimp_scale_entry_set_bounds() for more information on * `limit_scale,` `lower_limit` and `upper_limit`. * @param config Object to which property is attached. * @param property_name Name of integer or double property controlled by the scale. * @param label The text for the #GtkLabel which will appear left of the #GtkScale. * @param factor Optional multiplier to convert @property_name's range into the #GimpScaleEntry's range. The common usage is to set 1.0. For non-double properties, no other values than 1.0 are acceptable. * @param limit_scale %FALSE if the range of possible values of the GtkScale should be the same as of the GtkSpinButton. * @param lower_limit The scale's lower boundary if @scale_limits is %TRUE. * @param upper_limit The scale's upper boundary if @scale_limits is %TRUE. * @returns The newly allocated #GimpScaleEntry. */ function prop_scale_entry_new( config: GObject.Object, property_name: string, label: string | null, factor: number, limit_scale: boolean, lower_limit: number, upper_limit: number, ): Gtk.Widget; /** * Creates a #GimpSizeEntry to set and display the specified double or * int property, and its associated unit property. Note that this * function is only suitable for creating a size entry holding a * single value. Use gimp_prop_coordinates_new() to create a size * entry holding two values. * @param config Object to which property is attached. * @param property_name Name of int or double property. * @param property_is_pixel When %TRUE, the property value is in pixels, and in the selected unit otherwise. * @param unit_property_name Name of unit property. * @param unit_format A printf-like unit-format string as is used with gimp_unit_menu_new(). * @param update_policy How the automatic pixel <-> real-world-unit calculations should be done. * @param resolution The resolution (in dpi) for the field. * @returns A new #GimpSizeEntry widget. */ function prop_size_entry_new( config: GObject.Object, property_name: string, property_is_pixel: boolean, unit_property_name: string, unit_format: string, update_policy: SizeEntryUpdatePolicy | null, resolution: number, ): Gtk.Widget; /** * Creates a spin button to set and display the value of the * specified double property. * * If you wish to change the widget's range relatively to the * `property_name'`s range, use gimp_prop_widget_set_factor(). * @param config Object to which property is attached. * @param property_name Name of double property controlled by the spin button. * @param step_increment Step size. * @param page_increment Page size. * @param digits Number of digits after decimal point to display. * @returns A new #libgimpwidgets-gimpspinbutton. */ function prop_spin_button_new( config: GObject.Object, property_name: string, step_increment: number, page_increment: number, digits: number, ): Gtk.Widget; /** * Creates a spin scale to set and display the value of the specified * int or double property. * * By default, the `property_name'`s nick will be used as label of the * returned widget. Use gimp_spin_scale_set_label() to change this. * * If you wish to change the widget's range relatively to the * `property_name'`s range, use gimp_prop_widget_set_factor(). * @param config Object to which property is attached. * @param property_name Name of double or int property controlled by the spin button. * @param step_increment Step size. * @param page_increment Page size. * @param digits Number of digits after decimal point to display. This is only used for double properties. In case of int properties, `digits = 0` is implied. * @returns A new #libgimpwidgets-gimpspinbutton. */ function prop_spin_scale_new( config: GObject.Object, property_name: string, step_increment: number, page_increment: number, digits: number, ): Gtk.Widget; /** * Creates a #GimpStringComboBox widget to display and set the * specified property. The contents of the widget are determined by * `store`. * @param config Object to which property is attached. * @param property_name Name of int property controlled by combo box. * @param model #GtkTreeStore holding list of values * @param id_column column in @store that holds string IDs * @param label_column column in @store that holds labels to use in the combo-box * @returns The newly created #GimpStringComboBox widget. */ function prop_string_combo_box_new( config: GObject.Object, property_name: string, model: Gtk.TreeModel, id_column: number, label_column: number, ): Gtk.Widget; /** * Creates a #GtkBox with a switch and a label that displays and sets the * specified boolean property. * If `label` is %NULL, the `property_name'`s nick will be used as label. * @param config Object to which property is attached. * @param property_name Name of boolean property controlled by checkbutton. * @param label Label to give checkbutton (including mnemonic). * @returns The newly created box containing a #GtkSwitch. */ function prop_switch_new( config: GObject.Object, property_name: string, label: string, ): [Gtk.Widget, Gtk.Widget | null, Gtk.Widget | null]; /** * Creates a #GtkTextBuffer to set and display the value of the * specified string property. Unless the string is expected to * contain multiple lines or a large amount of text, use * gimp_prop_entry_new() instead. See #GtkTextView for information on * how to insert a text buffer into a visible widget. * * If `max_len` is 0 or negative, the text buffer allows an unlimited * number of characters to be entered. * @param config Object to which property is attached. * @param property_name Name of string property. * @param max_len Maximum allowed length of text (in characters). * @returns A new #GtkTextBuffer. */ function prop_text_buffer_new(config: GObject.Object, property_name: string, max_len: number): Gtk.TextBuffer; /** * Creates a #GimpUnitComboBox to set and display the value of a Unit * property. See gimp_unit_combo_box_new() for more information. * @param config Object to which property is attached. * @param property_name Name of Unit property. * @returns A new #GimpUnitComboBox widget. */ function prop_unit_combo_box_new(config: GObject.Object, property_name: string): Gtk.Widget; /** * Change the display factor of the property `widget` relatively to the * property it was bound to. Currently the only types of widget accepted * as input are those created by gimp_prop_spin_scale_new() and * gimp_prop_spin_button_new(). * * If `factor` is 1.0, then the config property and the widget display * map exactly. * * If `factor` is not 1.0, the widget's range will be computed based of * `property_name'`s range multiplied by `factor`. A typical usage would * be to display a [0.0, 1.0] range as [0.0, 100.0] by setting 100.0 as * `factor`. This function can only be used with double properties. * * The `step_increment` and `page_increment` can be set to new increments * you want to get for this new range. If you set them to 0.0 or * negative values, new increments will be computed based on the new * `factor` and previous factor. * @param widget Property widget. * @param factor Multiplier to convert the @widget's range and map appropriately to the property's range it is associated to. * @param step_increment Step size. * @param page_increment Page size. * @param digits Number of digits after decimal point to display. */ function prop_widget_set_factor( widget: Gtk.Widget, factor: number, step_increment: number, page_increment: number, digits: number, ): void; /** * Creates a new #GtkDialog that asks the user to do a boolean decision. * @param title The query box dialog's title. * @param parent The dialog's parent widget. * @param help_func The help function to show this dialog's help page. * @param help_id A string identifying this dialog's help page. * @param icon_name An icon name to specify an icon to appear on the left on the dialog's message. * @param message A string which will be shown in the query box. * @param true_button The string to be shown in the dialog's left button. * @param false_button The string to be shown in the dialog's right button. * @param object The object this query box is associated with. * @param signal The object's signal which will cause the query box to be closed. * @param callback The function which will be called when the user clicks one of the buttons. * @returns A pointer to the new #GtkDialog. */ function query_boolean_box( title: string, parent: Gtk.Widget, help_func: HelpFunc, help_id: string, icon_name: string, message: string, true_button: string, false_button: string, object: GObject.Object, signal: string, callback: QueryBooleanCallback, ): Gtk.Widget; /** * Creates a new #GtkDialog that queries the user for a double value. * @param title The query box dialog's title. * @param parent The dialog's parent widget. * @param help_func The help function to show this dialog's help page. * @param help_id A string identifying this dialog's help page. * @param message A string which will be shown above the dialog's entry widget. * @param initial The initial value. * @param lower The lower boundary of the range of possible values. * @param upper The upper boundray of the range of possible values. * @param digits The number of decimal digits the #GtkSpinButton will provide. * @param object The object this query box is associated with. * @param signal The object's signal which will cause the query box to be closed. * @param callback The function which will be called when the user selects "OK". * @returns A pointer to the new #GtkDialog. */ function query_double_box( title: string, parent: Gtk.Widget, help_func: HelpFunc, help_id: string, message: string, initial: number, lower: number, upper: number, digits: number, object: GObject.Object, signal: string, callback: QueryDoubleCallback, ): Gtk.Widget; /** * Creates a new #GtkDialog that queries the user for an integer value. * @param title The query box dialog's title. * @param parent The dialog's parent widget. * @param help_func The help function to show this dialog's help page. * @param help_id A string identifying this dialog's help page. * @param message A string which will be shown above the dialog's entry widget. * @param initial The initial value. * @param lower The lower boundary of the range of possible values. * @param upper The upper boundray of the range of possible values. * @param object The object this query box is associated with. * @param signal The object's signal which will cause the query box to be closed. * @param callback The function which will be called when the user selects "OK". * @returns A pointer to the new #GtkDialog. */ function query_int_box( title: string, parent: Gtk.Widget, help_func: HelpFunc, help_id: string, message: string, initial: number, lower: number, upper: number, object: GObject.Object, signal: string, callback: QueryIntCallback, ): Gtk.Widget; /** * Creates a new #GtkDialog that queries the user for a size using a * #GimpSizeEntry. * @param title The query box dialog's title. * @param parent The dialog's parent widget. * @param help_func The help function to show this dialog's help page. * @param help_id A string identifying this dialog's help page. * @param message A string which will be shown above the dialog's entry widget. * @param initial The initial value. * @param lower The lower boundary of the range of possible values. * @param upper The upper boundray of the range of possible values. * @param digits The number of decimal digits the #GimpSizeEntry provide in "pixel" mode. * @param unit The unit initially shown by the #GimpUnitMenu. * @param resolution The resolution (in dpi) which will be used for pixel/unit calculations. * @param dot_for_dot %TRUE if the #GimpUnitMenu's initial unit should be "pixels". * @param object The object this query box is associated with. * @param signal The object's signal which will cause the query box to be closed. * @param callback The function which will be called when the user selects "OK". * @returns A pointer to the new #GtkDialog. */ function query_size_box( title: string, parent: Gtk.Widget, help_func: HelpFunc, help_id: string, message: string, initial: number, lower: number, upper: number, digits: number, unit: Gimp.Unit, resolution: number, dot_for_dot: boolean, object: GObject.Object, signal: string, callback: QuerySizeCallback, ): Gtk.Widget; /** * Creates a new #GtkDialog that queries the user for a string value. * @param title The query box dialog's title. * @param parent The dialog's parent widget. * @param help_func The help function to show this dialog's help page. * @param help_id A string identifying this dialog's help page. * @param message A string which will be shown above the dialog's entry widget. * @param initial The initial value. * @param object The object this query box is associated with. * @param signal The object's signal which will cause the query box to be closed. * @param callback The function which will be called when the user selects "OK". * @returns A pointer to the new #GtkDialog. */ function query_string_box( title: string, parent: Gtk.Widget, help_func: HelpFunc, help_id: string, message: string, initial: string, object: GObject.Object, signal: string, callback: QueryStringCallback, ): Gtk.Widget; function radio_button_update(widget: Gtk.Widget): number; /** * Creates a widget that allows the user to control how the random number * generator is initialized. * @param seed A pointer to the variable which stores the random seed. * @param random_seed A pointer to a boolean indicating whether seed should be initialised randomly or not. * @returns A #GtkBox containing a #GtkSpinButton for the seed and a #GtkButton for setting a random seed. */ function random_seed_new(seed: number, random_seed: boolean): Gtk.Widget; function scroll_adjustment_values( sevent: Gdk.EventScroll, hadj: Gtk.Adjustment | null, vadj: Gtk.Adjustment | null, ): [number, number]; /** * This is the standard GIMP help function which does nothing but calling * gimp_help(). It is the right function to use in almost all cases. * @param help_id A unique help identifier. * @param help_data The @help_data passed to gimp_help_connect(). */ function standard_help_func(help_id: string, help_data?: any | null): void; function toggle_button_update(widget: Gtk.Widget): boolean; /** * Note that the #GtkAdjustment's value (which is a #gdouble) will be rounded * with (#guint) (value + 0.5). * @param adjustment A #GtkAdjustment. */ function uint_adjustment_update(adjustment: Gtk.Adjustment): number; /** * This function attempts to read the user's system preference for * showing animation. It can be used to turn off or hide unnecessary * animations such as the scrolling credits or Easter Egg animations. * @returns %TRUE if the user has animations enabled on their system */ function widget_animation_enabled(): boolean; /** * Disposes a widget's native window handle created asynchronously after * a previous call to gimp_widget_set_native_handle. * This disposes what the pointer points to, a *GBytes, if any. * Call this when the widget and the window handle it owns is being disposed. * * This should be called at least once, paired with set_native_handle. * This knows how to free `window_handle,` especially that on some platforms, * an asynchronous callback must be canceled else it might call back * with the pointer, after the widget and its private is freed. * * This is safe to call when deferenced `window_handle` is NULL, * when the window handle was never actually set, * on Wayland where actual setting is asynchronous. * * !!! The word "handle" has two meanings. * A "window handle" is an ID of a window. * A "handle" also commonly means a pointer to a pointer, in this case **GBytes. * `window_handle` is both kinds of handle. * @param widget a #GtkWindow */ function widget_free_native_handle(widget: Gtk.Widget): GLib.Bytes; /** * This function returns the #GimpColorProfile of the monitor `widget` is * currently displayed on, or %NULL if there is no profile configured. * @param widget a #GtkWidget * @returns @widget's monitor's #GimpColorProfile, or %NULL. */ function widget_get_color_profile(widget: Gtk.Widget): Gimp.ColorProfile | null; /** * This function returns the #GimpColorTransform that transforms pixels * from `src_profile` to the profile of the #GdkMonitor the `widget` is * displayed on. * @param widget a #GtkWidget * @param config a #GimpColorConfig * @param src_profile a #GimpColorProfile * @param src_format Babl format for the transform's source pixels * @param dest_format Babl format for the transforms's destination pixels * @param softproof_profile * @param proof_intent * @param proof_bpc * @returns the #GimpColorTransform. */ function widget_get_color_transform( widget: Gtk.Widget, config: Gimp.ColorConfig, src_profile: Gimp.ColorProfile, src_format: Babl.Object, dest_format: Babl.Object, softproof_profile: Gimp.ColorProfile, proof_intent: Gimp.ColorRenderingIntent | null, proof_bpc: boolean, ): Gimp.ColorTransform | null; function widget_get_monitor(widget: Gtk.Widget): Gdk.Monitor; function widget_get_render_space(widget: Gtk.Widget, config: Gimp.ColorConfig): Babl.Object; /** * This function is used to store the handle representing `window` into * `handle` so that it can later be reused to set other windows as * transient to this one (even in other processes, such as plug-ins). * * Depending on the platform, the actual content of `handle` can be * various types. Moreover it may be filled asynchronously in a * callback, so you should not assume that `handle` is set after running * this function. * * This convenience function is safe to use even before `widget` is * visible as it will set the handle once it is mapped. * @param widget a #GtkWindow */ function widget_set_native_handle(widget: Gtk.Widget): GLib.Bytes; /** * This function behaves as if #GtkWidget had a signal * * GtkWidget::monitor_changed(GtkWidget *widget, gpointer user_data) * * That is emitted whenever `widget'`s toplevel window is moved from * one monitor to another. This function automatically connects to * the right toplevel #GtkWindow, even across moving `widget` between * toplevel windows. * * Note that this function tracks the toplevel, not `widget` itself, so * all a window's widgets are always considered to be on the same * monitor. This is because this function is mainly used for fetching * the new monitor's color profile, and it makes little sense to use * different profiles for the widgets of one window. * @param widget a #GtkWidget * @param monitor_changed_callback the callback when @widget's monitor changes */ function widget_track_monitor(widget: Gtk.Widget, monitor_changed_callback: GObject.Callback): void; /** * This function is never called directly. Use GIMP_WIDGETS_ERROR() instead. * @returns the #GQuark that defines the GIMP widgets error domain. */ function widgets_error_quark(): GLib.Quark; /** * Indicates to the window manager that `window` is a transient dialog * associated with the GIMP window that the plug-in has been * started from. See also gimp_window_set_transient_for_display(). * @param window the #GtkWindow that should become transient */ function window_set_transient(window: Gtk.Window): void; /** * Indicates to the window manager that `window` is a transient dialog * to the window identified by `handle`. * * Note that `handle` is an opaque data, which you should not try to * construct yourself or make sense of. It may be different things * depending on the OS or even the display server. You should only use * a handle returned by [func`Gimp`.progress_get_window_handle], * [method`Gimp`.Display.get_window_handle] or * [method`GimpUi`.Dialog.get_native_handle]. * * Most of the time you will want to use the convenience function * [func`GimpUi`.window_set_transient]. * @param window the #GtkWindow that should become transient * @param handle handle of the window that should become the parent */ function window_set_transient_for(window: Gtk.Window, handle: GLib.Bytes | Uint8Array): void; /** * Indicates to the window manager that `window` is a transient dialog * associated with the GIMP image window that is identified by its * display. See [method`Gdk`.Window.set_transient_for] for more information. * * Most of the time you will want to use the convenience function * [func`GimpUi`.window_set_transient]. * @param window the #GtkWindow that should become transient * @param display display of the image window that should become the parent */ function window_set_transient_for_display(window: Gtk.Window, display: Gimp.Display): void; function zoom_button_new( model: ZoomModel, zoom_type: ZoomType | null, icon_size: Gtk.IconSize | null, ): Gtk.Widget; interface HelpFunc { (help_id: string, help_data?: any | null): void; } interface ImageConstraintFunc { (image: Gimp.Image): boolean; } interface IntRadioFrameSensitivityFunc { (value: number, new_value: number): boolean; } interface IntSensitivityFunc { (value: number): boolean; } interface ItemConstraintFunc { (image: Gimp.Image, item: Gimp.Item): boolean; } interface QueryBooleanCallback { (query_box: Gtk.Widget, value: boolean): void; } interface QueryDoubleCallback { (query_box: Gtk.Widget, value: number): void; } interface QueryIntCallback { (query_box: Gtk.Widget, value: number): void; } interface QuerySizeCallback { (query_box: Gtk.Widget, size: number, unit: Gimp.Unit): void; } interface QueryStringCallback { (query_box: Gtk.Widget, string: string): void; } interface StringSensitivityFunc { (id: string): boolean; } namespace AspectPreview { // Constructor properties interface interface ConstructorProps extends Preview.ConstructorProps, Atk.ImplementorIface.ConstructorProps, Gtk.Buildable.ConstructorProps, Gtk.Orientable.ConstructorProps { drawable: Gimp.Drawable; } } /** * A widget providing a preview with fixed aspect ratio. */ class AspectPreview extends Preview implements Atk.ImplementorIface, Gtk.Buildable, Gtk.Orientable { static $gtype: GObject.GType; // Properties get drawable(): Gimp.Drawable; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; static new_from_drawable(drawable: Gimp.Drawable): AspectPreview; // Inherited methods /** * Creates a binding between `source_property` on `source` and `target_property` * on `target`. * * Whenever the `source_property` is changed the `target_property` is * updated using the same value. For instance: * * * ```c * g_object_bind_property (action, "active", widget, "sensitive", 0); * ``` * * * Will result in the "sensitive" property of the widget #GObject instance to be * updated with the same value of the "active" property of the action #GObject * instance. * * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: * if `target_property` on `target` changes then the `source_property` on `source` * will be updated as well. * * The binding will automatically be removed when either the `source` or the * `target` instances are finalized. To remove the binding without affecting the * `source` and the `target` you can just call g_object_unref() on the returned * #GBinding instance. * * Removing the binding by calling g_object_unref() on it must only be done if * the binding, `source` and `target` are only used from a single thread and it * is clear that both `source` and `target` outlive the binding. Especially it * is not safe to rely on this if the binding, `source` or `target` can be * finalized from different threads. Keep another reference to the binding and * use g_binding_unbind() instead to be on the safe side. * * A #GObject can have multiple bindings. * @param source_property the property on @source to bind * @param target the target #GObject * @param target_property the property on @target to bind * @param flags flags to pass to #GBinding * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero. */ bind_property( source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags | null, ): GObject.Binding; /** * Complete version of g_object_bind_property(). * * Creates a binding between `source_property` on `source` and `target_property` * on `target,` allowing you to set the transformation functions to be used by * the binding. * * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: * if `target_property` on `target` changes then the `source_property` on `source` * will be updated as well. The `transform_from` function is only used in case * of bidirectional bindings, otherwise it will be ignored * * The binding will automatically be removed when either the `source` or the * `target` instances are finalized. This will release the reference that is * being held on the #GBinding instance; if you want to hold on to the * #GBinding instance, you will need to hold a reference to it. * * To remove the binding, call g_binding_unbind(). * * A #GObject can have multiple bindings. * * The same `user_data` parameter will be used for both `transform_to` * and `transform_from` transformation functions; the `notify` function will * be called once, when the binding is removed. If you need different data * for each transformation function, please use * g_object_bind_property_with_closures() instead. * @param source_property the property on @source to bind * @param target the target #GObject * @param target_property the property on @target to bind * @param flags flags to pass to #GBinding * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero. */ bind_property_full( source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags | null, transform_to?: GObject.BindingTransformFunc | null, transform_from?: GObject.BindingTransformFunc | null, notify?: GLib.DestroyNotify | null, ): GObject.Binding; // Conflicted with GObject.Object.bind_property_full bind_property_full(...args: never[]): any; /** * This function is intended for #GObject implementations to re-enforce * a [floating][floating-ref] object reference. Doing this is seldom * required: all #GInitiallyUnowneds are created with a floating reference * which usually just needs to be sunken by calling g_object_ref_sink(). */ force_floating(): void; /** * Increases the freeze count on `object`. If the freeze count is * non-zero, the emission of "notify" signals on `object` is * stopped. The signals are queued until the freeze count is decreased * to zero. Duplicate notifications are squashed so that at most one * #GObject::notify signal is emitted for each property modified while the * object is frozen. * * This is necessary for accessors that modify multiple properties to prevent * premature notification while the object is still being modified. */ freeze_notify(): void; /** * Gets a named field from the objects table of associations (see g_object_set_data()). * @param key name of the key for that association * @returns the data if found, or %NULL if no such data exists. */ get_data(key: string): any | null; /** * Gets a property of an object. * * The value can be: * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60) * - a GObject.Value initialized with the expected type of the property * - a GObject.Value initialized with a type to which the expected type of the property can be transformed * * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset. * * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming. * @param property_name The name of the property to get * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type */ get_property(property_name: string, value: GObject.Value | any): any; /** * This function gets back user data pointers stored via * g_object_set_qdata(). * @param quark A #GQuark, naming the user data pointer * @returns The user data pointer set, or %NULL */ get_qdata(quark: GLib.Quark): any | null; /** * Gets `n_properties` properties for an `object`. * Obtained properties will be set to `values`. All properties must be valid. * Warnings will be emitted and undefined behaviour may result if invalid * properties are passed in. * @param names the names of each property to get * @param values the values of each property to get */ getv(names: string[], values: (GObject.Value | any)[]): void; /** * Checks whether `object` has a [floating][floating-ref] reference. * @returns %TRUE if @object has a floating reference */ is_floating(): boolean; /** * Emits a "notify" signal for the property `property_name` on `object`. * * When possible, eg. when signaling a property change from within the class * that registered the property, you should use g_object_notify_by_pspec() * instead. * * Note that emission of the notify signal may be blocked with * g_object_freeze_notify(). In this case, the signal emissions are queued * and will be emitted (in reverse order) when g_object_thaw_notify() is * called. * @param property_name the name of a property installed on the class of @object. */ notify(property_name: string): void; /** * Emits a "notify" signal for the property specified by `pspec` on `object`. * * This function omits the property name lookup, hence it is faster than * g_object_notify(). * * One way to avoid using g_object_notify() from within the * class that registered the properties, and using g_object_notify_by_pspec() * instead, is to store the GParamSpec used with * g_object_class_install_property() inside a static array, e.g.: * * * ```c * typedef enum * { * PROP_FOO = 1, * PROP_LAST * } MyObjectProperty; * * static GParamSpec *properties[PROP_LAST]; * * static void * my_object_class_init (MyObjectClass *klass) * { * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL, * 0, 100, * 50, * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); * g_object_class_install_property (gobject_class, * PROP_FOO, * properties[PROP_FOO]); * } * ``` * * * and then notify a change on the "foo" property with: * * * ```c * g_object_notify_by_pspec (self, properties[PROP_FOO]); * ``` * * @param pspec the #GParamSpec of a property installed on the class of @object. */ notify_by_pspec(pspec: GObject.ParamSpec): void; /** * Increases the reference count of `object`. * * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type * of `object` will be propagated to the return type (using the GCC typeof() * extension), so any casting the caller needs to do on the return type must be * explicit. * @returns the same @object */ ref(): GObject.Object; /** * Increase the reference count of `object,` and possibly remove the * [floating][floating-ref] reference, if `object` has a floating reference. * * In other words, if the object is floating, then this call "assumes * ownership" of the floating reference, converting it to a normal * reference by clearing the floating flag while leaving the reference * count unchanged. If the object is not floating, then this call * adds a new normal reference increasing the reference count by one. * * Since GLib 2.56, the type of `object` will be propagated to the return type * under the same conditions as for g_object_ref(). * @returns @object */ ref_sink(): GObject.Object; /** * Releases all references to other objects. This can be used to break * reference cycles. * * This function should only be called from object system implementations. */ run_dispose(): void; /** * Each object carries around a table of associations from * strings to pointers. This function lets you set an association. * * If the object already had an association with that name, * the old association will be destroyed. * * Internally, the `key` is converted to a #GQuark using g_quark_from_string(). * This means a copy of `key` is kept permanently (even after `object` has been * finalized) — so it is recommended to only use a small, bounded set of values * for `key` in your program, to avoid the #GQuark storage growing unbounded. * @param key name of the key * @param data data to associate with that key */ set_data(key: string, data?: any | null): void; /** * Sets a property on an object. * @param property_name The name of the property to set * @param value The value to set the property to */ set_property(property_name: string, value: GObject.Value | any): void; /** * Remove a specified datum from the object's data associations, * without invoking the association's destroy handler. * @param key name of the key * @returns the data if found, or %NULL if no such data exists. */ steal_data(key: string): any | null; /** * This function gets back user data pointers stored via * g_object_set_qdata() and removes the `data` from object * without invoking its destroy() function (if any was * set). * Usually, calling this function is only required to update * user data pointers with a destroy notifier, for example: * * ```c * void * object_add_to_user_list (GObject *object, * const gchar *new_string) * { * // the quark, naming the object data * GQuark quark_string_list = g_quark_from_static_string ("my-string-list"); * // retrieve the old string list * GList *list = g_object_steal_qdata (object, quark_string_list); * * // prepend new string * list = g_list_prepend (list, g_strdup (new_string)); * // this changed 'list', so we need to set it again * g_object_set_qdata_full (object, quark_string_list, list, free_string_list); * } * static void * free_string_list (gpointer data) * { * GList *node, *list = data; * * for (node = list; node; node = node->next) * g_free (node->data); * g_list_free (list); * } * ``` * * Using g_object_get_qdata() in the above example, instead of * g_object_steal_qdata() would have left the destroy function set, * and thus the partial string list would have been freed upon * g_object_set_qdata_full(). * @param quark A #GQuark, naming the user data pointer * @returns The user data pointer set, or %NULL */ steal_qdata(quark: GLib.Quark): any | null; /** * Reverts the effect of a previous call to * g_object_freeze_notify(). The freeze count is decreased on `object` * and when it reaches zero, queued "notify" signals are emitted. * * Duplicate notifications for each property are squashed so that at most one * #GObject::notify signal is emitted for each property, in the reverse order * in which they have been queued. * * It is an error to call this function when the freeze count is zero. */ thaw_notify(): void; /** * Decreases the reference count of `object`. When its reference count * drops to 0, the object is finalized (i.e. its memory is freed). * * If the pointer to the #GObject may be reused in future (for example, if it is * an instance variable of another object), it is recommended to clear the * pointer to %NULL rather than retain a dangling pointer to a potentially * invalid #GObject instance. Use g_clear_object() for this. */ unref(): void; /** * This function essentially limits the life time of the `closure` to * the life time of the object. That is, when the object is finalized, * the `closure` is invalidated by calling g_closure_invalidate() on * it, in order to prevent invocations of the closure with a finalized * (nonexisting) object. Also, g_object_ref() and g_object_unref() are * added as marshal guards to the `closure,` to ensure that an extra * reference count is held on `object` during invocation of the * `closure`. Usually, this function will be called on closures that * use this `object` as closure data. * @param closure #GClosure to watch */ watch_closure(closure: GObject.Closure): void; /** * the `constructed` function is called by g_object_new() as the * final step of the object creation process. At the point of the call, all * construction properties have been set on the object. The purpose of this * call is to allow for object initialisation steps that can only be performed * after construction properties have been set. `constructed` implementors * should chain up to the `constructed` call of their parent class to allow it * to complete its initialisation. */ vfunc_constructed(): void; /** * emits property change notification for a bunch * of properties. Overriding `dispatch_properties_changed` should be rarely * needed. * @param n_pspecs * @param pspecs */ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void; /** * the `dispose` function is supposed to drop all references to other * objects, but keep the instance otherwise intact, so that client method * invocations still work. It may be run multiple times (due to reference * loops). Before returning, `dispose` should chain up to the `dispose` method * of the parent class. */ vfunc_dispose(): void; /** * instance finalization function, should finish the finalization of * the instance begun in `dispose` and chain up to the `finalize` method of the * parent class. */ vfunc_finalize(): void; /** * the generic getter for all properties of this type. Should be * overridden for every type with properties. * @param property_id * @param value * @param pspec */ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void; /** * Emits a "notify" signal for the property `property_name` on `object`. * * When possible, eg. when signaling a property change from within the class * that registered the property, you should use g_object_notify_by_pspec() * instead. * * Note that emission of the notify signal may be blocked with * g_object_freeze_notify(). In this case, the signal emissions are queued * and will be emitted (in reverse order) when g_object_thaw_notify() is * called. * @param pspec */ vfunc_notify(pspec: GObject.ParamSpec): void; /** * the generic setter for all properties of this type. Should be * overridden for every type with properties. If implementations of * `set_property` don't emit property change notification explicitly, this will * be done implicitly by the type system. However, if the notify signal is * emitted explicitly, the type system will not emit it a second time. * @param property_id * @param value * @param pspec */ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void; /** * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to. * @param id Handler ID of the handler to be disconnected */ disconnect(id: number): void; /** * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values. * @param properties Object containing the properties to set */ set(properties: { [key: string]: any }): void; /** * Blocks a handler of an instance so it will not be called during any signal emissions * @param id Handler ID of the handler to be blocked */ block_signal_handler(id: number): void; /** * Unblocks a handler so it will be called again during any signal emissions * @param id Handler ID of the handler to be unblocked */ unblock_signal_handler(id: number): void; /** * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked. * @param detailedName Name of the signal to stop emission of */ stop_emission_by_name(detailedName: string): void; } namespace Browser { // Signal callback interfaces interface Search { (object: string, p0: number): void; } // Constructor properties interface interface ConstructorProps extends Gtk.Paned.ConstructorProps, Atk.ImplementorIface.ConstructorProps, Gtk.Buildable.ConstructorProps, Gtk.Orientable.ConstructorProps {} } /** * A base class for a documentation browser. */ class Browser extends Gtk.Paned implements Atk.ImplementorIface, Gtk.Buildable, Gtk.Orientable { static $gtype: GObject.GType; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; static ['new'](): Browser; // Signals connect(id: string, callback: (...args: any[]) => any): number; connect_after(id: string, callback: (...args: any[]) => any): number; emit(id: string, ...args: any[]): void; connect(signal: 'search', callback: (_source: this, object: string, p0: number) => void): number; connect_after(signal: 'search', callback: (_source: this, object: string, p0: number) => void): number; emit(signal: 'search', object: string, p0: number): void; // Methods get_left_vbox(): Gtk.Box; get_right_vbox(): Gtk.Box; /** * Sets the search summary text. * @param summary a string describing the search result */ set_search_summary(summary: string): void; /** * Sets the widget to appear on the right side of the `browser`. * @param widget a #GtkWidget */ set_widget(widget: Gtk.Widget): void; /** * Displays `message` in the right side of the `browser`. Unless the right * side already contains a #GtkLabel, the widget previously added with * gimp_browser_set_widget() is removed and replaced by a #GtkLabel. * @param message text message */ show_message(message: string): void; // Inherited properties /** * The orientation of the orientable. */ get orientation(): Gtk.Orientation; set orientation(val: Gtk.Orientation); // Inherited methods /** * Retrieves the orientation of the `orientable`. * @returns the orientation of the @orientable. */ get_orientation(): Gtk.Orientation; /** * Sets the orientation of the `orientable`. * @param orientation the orientable’s new orientation. */ set_orientation(orientation: Gtk.Orientation | null): void; /** * Creates a binding between `source_property` on `source` and `target_property` * on `target`. * * Whenever the `source_property` is changed the `target_property` is * updated using the same value. For instance: * * * ```c * g_object_bind_property (action, "active", widget, "sensitive", 0); * ``` * * * Will result in the "sensitive" property of the widget #GObject instance to be * updated with the same value of the "active" property of the action #GObject * instance. * * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: * if `target_property` on `target` changes then the `source_property` on `source` * will be updated as well. * * The binding will automatically be removed when either the `source` or the * `target` instances are finalized. To remove the binding without affecting the * `source` and the `target` you can just call g_object_unref() on the returned * #GBinding instance. * * Removing the binding by calling g_object_unref() on it must only be done if * the binding, `source` and `target` are only used from a single thread and it * is clear that both `source` and `target` outlive the binding. Especially it * is not safe to rely on this if the binding, `source` or `target` can be * finalized from different threads. Keep another reference to the binding and * use g_binding_unbind() instead to be on the safe side. * * A #GObject can have multiple bindings. * @param source_property the property on @source to bind * @param target the target #GObject * @param target_property the property on @target to bind * @param flags flags to pass to #GBinding * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero. */ bind_property( source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags | null, ): GObject.Binding; /** * Complete version of g_object_bind_property(). * * Creates a binding between `source_property` on `source` and `target_property` * on `target,` allowing you to set the transformation functions to be used by * the binding. * * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: * if `target_property` on `target` changes then the `source_property` on `source` * will be updated as well. The `transform_from` function is only used in case * of bidirectional bindings, otherwise it will be ignored * * The binding will automatically be removed when either the `source` or the * `target` instances are finalized. This will release the reference that is * being held on the #GBinding instance; if you want to hold on to the * #GBinding instance, you will need to hold a reference to it. * * To remove the binding, call g_binding_unbind(). * * A #GObject can have multiple bindings. * * The same `user_data` parameter will be used for both `transform_to` * and `transform_from` transformation functions; the `notify` function will * be called once, when the binding is removed. If you need different data * for each transformation function, please use * g_object_bind_property_with_closures() instead. * @param source_property the property on @source to bind * @param target the target #GObject * @param target_property the property on @target to bind * @param flags flags to pass to #GBinding * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero. */ bind_property_full( source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags | null, transform_to?: GObject.BindingTransformFunc | null, transform_from?: GObject.BindingTransformFunc | null, notify?: GLib.DestroyNotify | null, ): GObject.Binding; // Conflicted with GObject.Object.bind_property_full bind_property_full(...args: never[]): any; /** * This function is intended for #GObject implementations to re-enforce * a [floating][floating-ref] object reference. Doing this is seldom * required: all #GInitiallyUnowneds are created with a floating reference * which usually just needs to be sunken by calling g_object_ref_sink(). */ force_floating(): void; /** * Increases the freeze count on `object`. If the freeze count is * non-zero, the emission of "notify" signals on `object` is * stopped. The signals are queued until the freeze count is decreased * to zero. Duplicate notifications are squashed so that at most one * #GObject::notify signal is emitted for each property modified while the * object is frozen. * * This is necessary for accessors that modify multiple properties to prevent * premature notification while the object is still being modified. */ freeze_notify(): void; /** * Gets a named field from the objects table of associations (see g_object_set_data()). * @param key name of the key for that association * @returns the data if found, or %NULL if no such data exists. */ get_data(key: string): any | null; /** * Gets a property of an object. * * The value can be: * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60) * - a GObject.Value initialized with the expected type of the property * - a GObject.Value initialized with a type to which the expected type of the property can be transformed * * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset. * * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming. * @param property_name The name of the property to get * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type */ get_property(property_name: string, value: GObject.Value | any): any; /** * This function gets back user data pointers stored via * g_object_set_qdata(). * @param quark A #GQuark, naming the user data pointer * @returns The user data pointer set, or %NULL */ get_qdata(quark: GLib.Quark): any | null; /** * Gets `n_properties` properties for an `object`. * Obtained properties will be set to `values`. All properties must be valid. * Warnings will be emitted and undefined behaviour may result if invalid * properties are passed in. * @param names the names of each property to get * @param values the values of each property to get */ getv(names: string[], values: (GObject.Value | any)[]): void; /** * Checks whether `object` has a [floating][floating-ref] reference. * @returns %TRUE if @object has a floating reference */ is_floating(): boolean; /** * Emits a "notify" signal for the property `property_name` on `object`. * * When possible, eg. when signaling a property change from within the class * that registered the property, you should use g_object_notify_by_pspec() * instead. * * Note that emission of the notify signal may be blocked with * g_object_freeze_notify(). In this case, the signal emissions are queued * and will be emitted (in reverse order) when g_object_thaw_notify() is * called. * @param property_name the name of a property installed on the class of @object. */ notify(property_name: string): void; /** * Emits a "notify" signal for the property specified by `pspec` on `object`. * * This function omits the property name lookup, hence it is faster than * g_object_notify(). * * One way to avoid using g_object_notify() from within the * class that registered the properties, and using g_object_notify_by_pspec() * instead, is to store the GParamSpec used with * g_object_class_install_property() inside a static array, e.g.: * * * ```c * typedef enum * { * PROP_FOO = 1, * PROP_LAST * } MyObjectProperty; * * static GParamSpec *properties[PROP_LAST]; * * static void * my_object_class_init (MyObjectClass *klass) * { * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL, * 0, 100, * 50, * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); * g_object_class_install_property (gobject_class, * PROP_FOO, * properties[PROP_FOO]); * } * ``` * * * and then notify a change on the "foo" property with: * * * ```c * g_object_notify_by_pspec (self, properties[PROP_FOO]); * ``` * * @param pspec the #GParamSpec of a property installed on the class of @object. */ notify_by_pspec(pspec: GObject.ParamSpec): void; /** * Increases the reference count of `object`. * * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type * of `object` will be propagated to the return type (using the GCC typeof() * extension), so any casting the caller needs to do on the return type must be * explicit. * @returns the same @object */ ref(): GObject.Object; /** * Increase the reference count of `object,` and possibly remove the * [floating][floating-ref] reference, if `object` has a floating reference. * * In other words, if the object is floating, then this call "assumes * ownership" of the floating reference, converting it to a normal * reference by clearing the floating flag while leaving the reference * count unchanged. If the object is not floating, then this call * adds a new normal reference increasing the reference count by one. * * Since GLib 2.56, the type of `object` will be propagated to the return type * under the same conditions as for g_object_ref(). * @returns @object */ ref_sink(): GObject.Object; /** * Releases all references to other objects. This can be used to break * reference cycles. * * This function should only be called from object system implementations. */ run_dispose(): void; /** * Each object carries around a table of associations from * strings to pointers. This function lets you set an association. * * If the object already had an association with that name, * the old association will be destroyed. * * Internally, the `key` is converted to a #GQuark using g_quark_from_string(). * This means a copy of `key` is kept permanently (even after `object` has been * finalized) — so it is recommended to only use a small, bounded set of values * for `key` in your program, to avoid the #GQuark storage growing unbounded. * @param key name of the key * @param data data to associate with that key */ set_data(key: string, data?: any | null): void; /** * Sets a property on an object. * @param property_name The name of the property to set * @param value The value to set the property to */ set_property(property_name: string, value: GObject.Value | any): void; /** * Remove a specified datum from the object's data associations, * without invoking the association's destroy handler. * @param key name of the key * @returns the data if found, or %NULL if no such data exists. */ steal_data(key: string): any | null; /** * This function gets back user data pointers stored via * g_object_set_qdata() and removes the `data` from object * without invoking its destroy() function (if any was * set). * Usually, calling this function is only required to update * user data pointers with a destroy notifier, for example: * * ```c * void * object_add_to_user_list (GObject *object, * const gchar *new_string) * { * // the quark, naming the object data * GQuark quark_string_list = g_quark_from_static_string ("my-string-list"); * // retrieve the old string list * GList *list = g_object_steal_qdata (object, quark_string_list); * * // prepend new string * list = g_list_prepend (list, g_strdup (new_string)); * // this changed 'list', so we need to set it again * g_object_set_qdata_full (object, quark_string_list, list, free_string_list); * } * static void * free_string_list (gpointer data) * { * GList *node, *list = data; * * for (node = list; node; node = node->next) * g_free (node->data); * g_list_free (list); * } * ``` * * Using g_object_get_qdata() in the above example, instead of * g_object_steal_qdata() would have left the destroy function set, * and thus the partial string list would have been freed upon * g_object_set_qdata_full(). * @param quark A #GQuark, naming the user data pointer * @returns The user data pointer set, or %NULL */ steal_qdata(quark: GLib.Quark): any | null; /** * Reverts the effect of a previous call to * g_object_freeze_notify(). The freeze count is decreased on `object` * and when it reaches zero, queued "notify" signals are emitted. * * Duplicate notifications for each property are squashed so that at most one * #GObject::notify signal is emitted for each property, in the reverse order * in which they have been queued. * * It is an error to call this function when the freeze count is zero. */ thaw_notify(): void; /** * Decreases the reference count of `object`. When its reference count * drops to 0, the object is finalized (i.e. its memory is freed). * * If the pointer to the #GObject may be reused in future (for example, if it is * an instance variable of another object), it is recommended to clear the * pointer to %NULL rather than retain a dangling pointer to a potentially * invalid #GObject instance. Use g_clear_object() for this. */ unref(): void; /** * This function essentially limits the life time of the `closure` to * the life time of the object. That is, when the object is finalized, * the `closure` is invalidated by calling g_closure_invalidate() on * it, in order to prevent invocations of the closure with a finalized * (nonexisting) object. Also, g_object_ref() and g_object_unref() are * added as marshal guards to the `closure,` to ensure that an extra * reference count is held on `object` during invocation of the * `closure`. Usually, this function will be called on closures that * use this `object` as closure data. * @param closure #GClosure to watch */ watch_closure(closure: GObject.Closure): void; /** * the `constructed` function is called by g_object_new() as the * final step of the object creation process. At the point of the call, all * construction properties have been set on the object. The purpose of this * call is to allow for object initialisation steps that can only be performed * after construction properties have been set. `constructed` implementors * should chain up to the `constructed` call of their parent class to allow it * to complete its initialisation. */ vfunc_constructed(): void; /** * emits property change notification for a bunch * of properties. Overriding `dispatch_properties_changed` should be rarely * needed. * @param n_pspecs * @param pspecs */ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void; /** * the `dispose` function is supposed to drop all references to other * objects, but keep the instance otherwise intact, so that client method * invocations still work. It may be run multiple times (due to reference * loops). Before returning, `dispose` should chain up to the `dispose` method * of the parent class. */ vfunc_dispose(): void; /** * instance finalization function, should finish the finalization of * the instance begun in `dispose` and chain up to the `finalize` method of the * parent class. */ vfunc_finalize(): void; /** * the generic getter for all properties of this type. Should be * overridden for every type with properties. * @param property_id * @param value * @param pspec */ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void; /** * Emits a "notify" signal for the property `property_name` on `object`. * * When possible, eg. when signaling a property change from within the class * that registered the property, you should use g_object_notify_by_pspec() * instead. * * Note that emission of the notify signal may be blocked with * g_object_freeze_notify(). In this case, the signal emissions are queued * and will be emitted (in reverse order) when g_object_thaw_notify() is * called. * @param pspec */ vfunc_notify(pspec: GObject.ParamSpec): void; /** * the generic setter for all properties of this type. Should be * overridden for every type with properties. If implementations of * `set_property` don't emit property change notification explicitly, this will * be done implicitly by the type system. However, if the notify signal is * emitted explicitly, the type system will not emit it a second time. * @param property_id * @param value * @param pspec */ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void; /** * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to. * @param id Handler ID of the handler to be disconnected */ disconnect(id: number): void; /** * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values. * @param properties Object containing the properties to set */ set(properties: { [key: string]: any }): void; /** * Blocks a handler of an instance so it will not be called during any signal emissions * @param id Handler ID of the handler to be blocked */ block_signal_handler(id: number): void; /** * Unblocks a handler so it will be called again during any signal emissions * @param id Handler ID of the handler to be unblocked */ unblock_signal_handler(id: number): void; /** * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked. * @param detailedName Name of the signal to stop emission of */ stop_emission_by_name(detailedName: string): void; } namespace BrushChooser { // Constructor properties interface interface ConstructorProps extends ResourceChooser.ConstructorProps, Atk.ImplementorIface.ConstructorProps, Gtk.Buildable.ConstructorProps, Gtk.Orientable.ConstructorProps {} } /** * A button which pops up a brush selection dialog. * * Note that this widget draws itself using `GEGL` code. You **must** call * [func`Gegl`.init] first to be able to use this chooser. */ class BrushChooser extends ResourceChooser implements Atk.ImplementorIface, Gtk.Buildable, Gtk.Orientable { static $gtype: GObject.GType; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; static ['new'](title?: string | null, label?: string | null, brush?: Gimp.Brush | null): BrushChooser; // Conflicted with Gtk.Box.new static ['new'](...args: never[]): any; // Inherited methods /** * Creates a binding between `source_property` on `source` and `target_property` * on `target`. * * Whenever the `source_property` is changed the `target_property` is * updated using the same value. For instance: * * * ```c * g_object_bind_property (action, "active", widget, "sensitive", 0); * ``` * * * Will result in the "sensitive" property of the widget #GObject instance to be * updated with the same value of the "active" property of the action #GObject * instance. * * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: * if `target_property` on `target` changes then the `source_property` on `source` * will be updated as well. * * The binding will automatically be removed when either the `source` or the * `target` instances are finalized. To remove the binding without affecting the * `source` and the `target` you can just call g_object_unref() on the returned * #GBinding instance. * * Removing the binding by calling g_object_unref() on it must only be done if * the binding, `source` and `target` are only used from a single thread and it * is clear that both `source` and `target` outlive the binding. Especially it * is not safe to rely on this if the binding, `source` or `target` can be * finalized from different threads. Keep another reference to the binding and * use g_binding_unbind() instead to be on the safe side. * * A #GObject can have multiple bindings. * @param source_property the property on @source to bind * @param target the target #GObject * @param target_property the property on @target to bind * @param flags flags to pass to #GBinding * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero. */ bind_property( source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags | null, ): GObject.Binding; /** * Complete version of g_object_bind_property(). * * Creates a binding between `source_property` on `source` and `target_property` * on `target,` allowing you to set the transformation functions to be used by * the binding. * * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: * if `target_property` on `target` changes then the `source_property` on `source` * will be updated as well. The `transform_from` function is only used in case * of bidirectional bindings, otherwise it will be ignored * * The binding will automatically be removed when either the `source` or the * `target` instances are finalized. This will release the reference that is * being held on the #GBinding instance; if you want to hold on to the * #GBinding instance, you will need to hold a reference to it. * * To remove the binding, call g_binding_unbind(). * * A #GObject can have multiple bindings. * * The same `user_data` parameter will be used for both `transform_to` * and `transform_from` transformation functions; the `notify` function will * be called once, when the binding is removed. If you need different data * for each transformation function, please use * g_object_bind_property_with_closures() instead. * @param source_property the property on @source to bind * @param target the target #GObject * @param target_property the property on @target to bind * @param flags flags to pass to #GBinding * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero. */ bind_property_full( source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags | null, transform_to?: GObject.BindingTransformFunc | null, transform_from?: GObject.BindingTransformFunc | null, notify?: GLib.DestroyNotify | null, ): GObject.Binding; // Conflicted with GObject.Object.bind_property_full bind_property_full(...args: never[]): any; /** * This function is intended for #GObject implementations to re-enforce * a [floating][floating-ref] object reference. Doing this is seldom * required: all #GInitiallyUnowneds are created with a floating reference * which usually just needs to be sunken by calling g_object_ref_sink(). */ force_floating(): void; /** * Increases the freeze count on `object`. If the freeze count is * non-zero, the emission of "notify" signals on `object` is * stopped. The signals are queued until the freeze count is decreased * to zero. Duplicate notifications are squashed so that at most one * #GObject::notify signal is emitted for each property modified while the * object is frozen. * * This is necessary for accessors that modify multiple properties to prevent * premature notification while the object is still being modified. */ freeze_notify(): void; /** * Gets a named field from the objects table of associations (see g_object_set_data()). * @param key name of the key for that association * @returns the data if found, or %NULL if no such data exists. */ get_data(key: string): any | null; /** * Gets a property of an object. * * The value can be: * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60) * - a GObject.Value initialized with the expected type of the property * - a GObject.Value initialized with a type to which the expected type of the property can be transformed * * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset. * * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming. * @param property_name The name of the property to get * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type */ get_property(property_name: string, value: GObject.Value | any): any; /** * This function gets back user data pointers stored via * g_object_set_qdata(). * @param quark A #GQuark, naming the user data pointer * @returns The user data pointer set, or %NULL */ get_qdata(quark: GLib.Quark): any | null; /** * Gets `n_properties` properties for an `object`. * Obtained properties will be set to `values`. All properties must be valid. * Warnings will be emitted and undefined behaviour may result if invalid * properties are passed in. * @param names the names of each property to get * @param values the values of each property to get */ getv(names: string[], values: (GObject.Value | any)[]): void; /** * Checks whether `object` has a [floating][floating-ref] reference. * @returns %TRUE if @object has a floating reference */ is_floating(): boolean; /** * Emits a "notify" signal for the property `property_name` on `object`. * * When possible, eg. when signaling a property change from within the class * that registered the property, you should use g_object_notify_by_pspec() * instead. * * Note that emission of the notify signal may be blocked with * g_object_freeze_notify(). In this case, the signal emissions are queued * and will be emitted (in reverse order) when g_object_thaw_notify() is * called. * @param property_name the name of a property installed on the class of @object. */ notify(property_name: string): void; /** * Emits a "notify" signal for the property specified by `pspec` on `object`. * * This function omits the property name lookup, hence it is faster than * g_object_notify(). * * One way to avoid using g_object_notify() from within the * class that registered the properties, and using g_object_notify_by_pspec() * instead, is to store the GParamSpec used with * g_object_class_install_property() inside a static array, e.g.: * * * ```c * typedef enum * { * PROP_FOO = 1, * PROP_LAST * } MyObjectProperty; * * static GParamSpec *properties[PROP_LAST]; * * static void * my_object_class_init (MyObjectClass *klass) * { * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL, * 0, 100, * 50, * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); * g_object_class_install_property (gobject_class, * PROP_FOO, * properties[PROP_FOO]); * } * ``` * * * and then notify a change on the "foo" property with: * * * ```c * g_object_notify_by_pspec (self, properties[PROP_FOO]); * ``` * * @param pspec the #GParamSpec of a property installed on the class of @object. */ notify_by_pspec(pspec: GObject.ParamSpec): void; /** * Increases the reference count of `object`. * * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type * of `object` will be propagated to the return type (using the GCC typeof() * extension), so any casting the caller needs to do on the return type must be * explicit. * @returns the same @object */ ref(): GObject.Object; /** * Increase the reference count of `object,` and possibly remove the * [floating][floating-ref] reference, if `object` has a floating reference. * * In other words, if the object is floating, then this call "assumes * ownership" of the floating reference, converting it to a normal * reference by clearing the floating flag while leaving the reference * count unchanged. If the object is not floating, then this call * adds a new normal reference increasing the reference count by one. * * Since GLib 2.56, the type of `object` will be propagated to the return type * under the same conditions as for g_object_ref(). * @returns @object */ ref_sink(): GObject.Object; /** * Releases all references to other objects. This can be used to break * reference cycles. * * This function should only be called from object system implementations. */ run_dispose(): void; /** * Each object carries around a table of associations from * strings to pointers. This function lets you set an association. * * If the object already had an association with that name, * the old association will be destroyed. * * Internally, the `key` is converted to a #GQuark using g_quark_from_string(). * This means a copy of `key` is kept permanently (even after `object` has been * finalized) — so it is recommended to only use a small, bounded set of values * for `key` in your program, to avoid the #GQuark storage growing unbounded. * @param key name of the key * @param data data to associate with that key */ set_data(key: string, data?: any | null): void; /** * Sets a property on an object. * @param property_name The name of the property to set * @param value The value to set the property to */ set_property(property_name: string, value: GObject.Value | any): void; /** * Remove a specified datum from the object's data associations, * without invoking the association's destroy handler. * @param key name of the key * @returns the data if found, or %NULL if no such data exists. */ steal_data(key: string): any | null; /** * This function gets back user data pointers stored via * g_object_set_qdata() and removes the `data` from object * without invoking its destroy() function (if any was * set). * Usually, calling this function is only required to update * user data pointers with a destroy notifier, for example: * * ```c * void * object_add_to_user_list (GObject *object, * const gchar *new_string) * { * // the quark, naming the object data * GQuark quark_string_list = g_quark_from_static_string ("my-string-list"); * // retrieve the old string list * GList *list = g_object_steal_qdata (object, quark_string_list); * * // prepend new string * list = g_list_prepend (list, g_strdup (new_string)); * // this changed 'list', so we need to set it again * g_object_set_qdata_full (object, quark_string_list, list, free_string_list); * } * static void * free_string_list (gpointer data) * { * GList *node, *list = data; * * for (node = list; node; node = node->next) * g_free (node->data); * g_list_free (list); * } * ``` * * Using g_object_get_qdata() in the above example, instead of * g_object_steal_qdata() would have left the destroy function set, * and thus the partial string list would have been freed upon * g_object_set_qdata_full(). * @param quark A #GQuark, naming the user data pointer * @returns The user data pointer set, or %NULL */ steal_qdata(quark: GLib.Quark): any | null; /** * Reverts the effect of a previous call to * g_object_freeze_notify(). The freeze count is decreased on `object` * and when it reaches zero, queued "notify" signals are emitted. * * Duplicate notifications for each property are squashed so that at most one * #GObject::notify signal is emitted for each property, in the reverse order * in which they have been queued. * * It is an error to call this function when the freeze count is zero. */ thaw_notify(): void; /** * Decreases the reference count of `object`. When its reference count * drops to 0, the object is finalized (i.e. its memory is freed). * * If the pointer to the #GObject may be reused in future (for example, if it is * an instance variable of another object), it is recommended to clear the * pointer to %NULL rather than retain a dangling pointer to a potentially * invalid #GObject instance. Use g_clear_object() for this. */ unref(): void; /** * This function essentially limits the life time of the `closure` to * the life time of the object. That is, when the object is finalized, * the `closure` is invalidated by calling g_closure_invalidate() on * it, in order to prevent invocations of the closure with a finalized * (nonexisting) object. Also, g_object_ref() and g_object_unref() are * added as marshal guards to the `closure,` to ensure that an extra * reference count is held on `object` during invocation of the * `closure`. Usually, this function will be called on closures that * use this `object` as closure data. * @param closure #GClosure to watch */ watch_closure(closure: GObject.Closure): void; /** * the `constructed` function is called by g_object_new() as the * final step of the object creation process. At the point of the call, all * construction properties have been set on the object. The purpose of this * call is to allow for object initialisation steps that can only be performed * after construction properties have been set. `constructed` implementors * should chain up to the `constructed` call of their parent class to allow it * to complete its initialisation. */ vfunc_constructed(): void; /** * emits property change notification for a bunch * of properties. Overriding `dispatch_properties_changed` should be rarely * needed. * @param n_pspecs * @param pspecs */ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void; /** * the `dispose` function is supposed to drop all references to other * objects, but keep the instance otherwise intact, so that client method * invocations still work. It may be run multiple times (due to reference * loops). Before returning, `dispose` should chain up to the `dispose` method * of the parent class. */ vfunc_dispose(): void; /** * instance finalization function, should finish the finalization of * the instance begun in `dispose` and chain up to the `finalize` method of the * parent class. */ vfunc_finalize(): void; /** * the generic getter for all properties of this type. Should be * overridden for every type with properties. * @param property_id * @param value * @param pspec */ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void; /** * Emits a "notify" signal for the property `property_name` on `object`. * * When possible, eg. when signaling a property change from within the class * that registered the property, you should use g_object_notify_by_pspec() * instead. * * Note that emission of the notify signal may be blocked with * g_object_freeze_notify(). In this case, the signal emissions are queued * and will be emitted (in reverse order) when g_object_thaw_notify() is * called. * @param pspec */ vfunc_notify(pspec: GObject.ParamSpec): void; /** * the generic setter for all properties of this type. Should be * overridden for every type with properties. If implementations of * `set_property` don't emit property change notification explicitly, this will * be done implicitly by the type system. However, if the notify signal is * emitted explicitly, the type system will not emit it a second time. * @param property_id * @param value * @param pspec */ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void; /** * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to. * @param id Handler ID of the handler to be disconnected */ disconnect(id: number): void; /** * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values. * @param properties Object containing the properties to set */ set(properties: { [key: string]: any }): void; /** * Blocks a handler of an instance so it will not be called during any signal emissions * @param id Handler ID of the handler to be blocked */ block_signal_handler(id: number): void; /** * Unblocks a handler so it will be called again during any signal emissions * @param id Handler ID of the handler to be unblocked */ unblock_signal_handler(id: number): void; /** * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked. * @param detailedName Name of the signal to stop emission of */ stop_emission_by_name(detailedName: string): void; } namespace BusyBox { // Constructor properties interface interface ConstructorProps extends Gtk.Box.ConstructorProps, Atk.ImplementorIface.ConstructorProps, Gtk.Buildable.ConstructorProps, Gtk.Orientable.ConstructorProps { message: string; } } /** * #GimpBusyBox displays a styled message, providing indication of * an ongoing operation. */ class BusyBox extends Gtk.Box implements Atk.ImplementorIface, Gtk.Buildable, Gtk.Orientable { static $gtype: GObject.GType; // Properties /** * Specifies the displayed message. */ get message(): string; set message(val: string); // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; static ['new'](message?: string | null): BusyBox; // Conflicted with Gtk.Box.new static ['new'](...args: never[]): any; // Methods /** * Returns the displayed message of `box`. * @returns The displayed message. */ get_message(): string; /** * Sets the displayed message og `box` to `message`. * @param message the displayed message */ set_message(message: string): void; // Inherited properties /** * The orientation of the orientable. */ get orientation(): Gtk.Orientation; set orientation(val: Gtk.Orientation); // Inherited methods /** * Retrieves the orientation of the `orientable`. * @returns the orientation of the @orientable. */ get_orientation(): Gtk.Orientation; /** * Sets the orientation of the `orientable`. * @param orientation the orientable’s new orientation. */ set_orientation(orientation: Gtk.Orientation | null): void; /** * Creates a binding between `source_property` on `source` and `target_property` * on `target`. * * Whenever the `source_property` is changed the `target_property` is * updated using the same value. For instance: * * * ```c * g_object_bind_property (action, "active", widget, "sensitive", 0); * ``` * * * Will result in the "sensitive" property of the widget #GObject instance to be * updated with the same value of the "active" property of the action #GObject * instance. * * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: * if `target_property` on `target` changes then the `source_property` on `source` * will be updated as well. * * The binding will automatically be removed when either the `source` or the * `target` instances are finalized. To remove the binding without affecting the * `source` and the `target` you can just call g_object_unref() on the returned * #GBinding instance. * * Removing the binding by calling g_object_unref() on it must only be done if * the binding, `source` and `target` are only used from a single thread and it * is clear that both `source` and `target` outlive the binding. Especially it * is not safe to rely on this if the binding, `source` or `target` can be * finalized from different threads. Keep another reference to the binding and * use g_binding_unbind() instead to be on the safe side. * * A #GObject can have multiple bindings. * @param source_property the property on @source to bind * @param target the target #GObject * @param target_property the property on @target to bind * @param flags flags to pass to #GBinding * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero. */ bind_property( source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags | null, ): GObject.Binding; /** * Complete version of g_object_bind_property(). * * Creates a binding between `source_property` on `source` and `target_property` * on `target,` allowing you to set the transformation functions to be used by * the binding. * * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: * if `target_property` on `target` changes then the `source_property` on `source` * will be updated as well. The `transform_from` function is only used in case * of bidirectional bindings, otherwise it will be ignored * * The binding will automatically be removed when either the `source` or the * `target` instances are finalized. This will release the reference that is * being held on the #GBinding instance; if you want to hold on to the * #GBinding instance, you will need to hold a reference to it. * * To remove the binding, call g_binding_unbind(). * * A #GObject can have multiple bindings. * * The same `user_data` parameter will be used for both `transform_to` * and `transform_from` transformation functions; the `notify` function will * be called once, when the binding is removed. If you need different data * for each transformation function, please use * g_object_bind_property_with_closures() instead. * @param source_property the property on @source to bind * @param target the target #GObject * @param target_property the property on @target to bind * @param flags flags to pass to #GBinding * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero. */ bind_property_full( source_property: string, target: GObject.Object, target_property: string, flags: GObject.BindingFlags | null, transform_to?: GObject.BindingTransformFunc | null, transform_from?: GObject.BindingTransformFunc | null, notify?: GLib.DestroyNotify | null, ): GObject.Binding; // Conflicted with GObject.Object.bind_property_full bind_property_full(...args: never[]): any; /** * This function is intended for #GObject implementations to re-enforce * a [floating][floating-ref] object reference. Doing this is seldom * required: all #GInitiallyUnowneds are created with a floating reference * which usually just needs to be sunken by calling g_object_ref_sink(). */ force_floating(): void; /** * Increases the freeze count on `object`. If the freeze count is * non-zero, the emission of "notify" signals on `object` is * stopped. The signals are queued until the freeze count is decreased * to zero. Duplicate notifications are squashed so that at most one * #GObject::notify signal is emitted for each property modified while the * object is frozen. * * This is necessary for accessors that modify multiple properties to prevent * premature notification while the object is still being modified. */ freeze_notify(): void; /** * Gets a named field from the objects table of associations (see g_object_set_data()). * @param key name of the key for that association * @returns the data if found, or %NULL if no such data exists. */ get_data(key: string): any | null; /** * Gets a property of an object. * * The value can be: * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60) * - a GObject.Value initialized with the expected type of the property * - a GObject.Value initialized with a type to which the expected type of the property can be transformed * * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset. * * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming. * @param property_name The name of the property to get * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type */ get_property(property_name: string, value: GObject.Value | any): any; /** * This function gets back user data pointers stored via * g_object_set_qdata(). * @param quark A #GQuark, naming the user data pointer * @returns The user data pointer set, or %NULL */ get_qdata(quark: GLib.Quark): any | null; /** * Gets `n_properties` properties for an `object`. * Obtained properties will be set to `values`. All properties must be valid. * Warnings will be emitted and undefined behaviour may result if invalid * properties are passed in. * @param names the names of each property to get * @param values the values of each property to get */ getv(names: string[], values: (GObject.Value | any)[]): void; /** * Checks whether `object` has a [floating][floating-ref] reference. * @returns %TRUE if @object has a floating reference */ is_floating(): boolean; /** * Emits a "notify" signal for the property `property_name` on `object`. * * When possible, eg. when signaling a property change from within the class * that registered the property, you should use g_object_notify_by_pspec() * instead. * * Note that emission of the notify signal may be blocked with * g_object_freeze_notify(). In this case, the signal emissions are queued * and will be emitted (in reverse order) when g_object_thaw_notify() is * called. * @param property_name the name of a property installed on the class of @object. */ notify(property_name: string): void; /** * Emits a "notify" signal for the property specified by `pspec` on `object`. * * This function omits the property name lookup, hence it is faster than * g_object_notify(). * * One way to avoid using g_object_notify() from within the * class that registered the properties, and using g_object_notify_by_pspec() * instead, is to store the GParamSpec used with * g_object_class_install_property() inside a static array, e.g.: * * * ```c * typedef enum * { * PROP_FOO = 1, * PROP_LAST * } MyObjectProperty; * * static GParamSpec *properties[PROP_LAST]; * * static void * my_object_class_init (MyObjectClass *klass) * { * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL, * 0, 100, * 50, * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); * g_object_class_install_property (gobject_class, * PROP_FOO, * properties[PROP_FOO]); * } * ``` * * * and then notify a change on the "foo" property with: * * * ```c * g_object_notify_by_pspec (self, properties[PROP_FOO]); * ``` * * @param pspec the #GParamSpec of a property installed on the class of @object. */ notify_by_pspec(pspec: GObject.ParamSpec): void; /** * Increases the reference count of `object`. * * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type * of `object` will be propagated to the return type (using the GCC typeof() * extension), so any casting the caller needs to do on the return type must be * explicit. * @returns the same @object */ ref(): GObject.Object; /** * Increase the reference count of `object,` and possibly remove the * [floating][floating-ref] reference, if `object` has a floating reference. * * In other words, if the object is floating, then this call "assumes * ownership" of the floating reference, converting it to a normal * reference by clearing the floating flag while leaving the reference * count unchanged. If the object is not floating, then this call * adds a new normal reference increasing the reference count by one. * * Since GLib 2.56, the type of `object` will be propagated to the return type * under the same conditions as for g_object_ref(). * @returns @object */ ref_sink(): GObject.Object; /** * Releases all references to other objects. This can be used to break * reference cycles. * * This function should only be called from object system implementations. */ run_dispose(): void; /** * Each object carries around a table of associations from * strings to pointers. This function lets you set an association. * * If the object already had an association with that name, * the old association will be destroyed. * * Internally, the `key` is converted to a #GQuark using g_quark_from_string(). * This means a copy of `key` is kept permanently (even after `object` has been * finalized) — so it is recommended to only use a small, bounded set of values * for `key` in your program, to avoid the #GQuark storage growing unbounded. * @param key name of the key * @param data data to associate with that key */ set_data(key: string, data?: any | null): void; /** * Sets a property on an object. * @param property_name The name of the property to set * @param value The value to set the property to */ set_property(property_name: string, value: GObject.Value | any): void; /** * Remove a specified datum from the object's data associations, * without invoking the association's destroy handler. * @param key name of the key * @returns the data if found, or %NULL if no such data exists. */ steal_data(key: string): any | null; /** * This function gets back user data pointers stored via * g_object_set_qdata() and removes the `data` from object * without invoking its destroy() function (if any was * set). * Usually, calling this function is only required to update * user data pointers with a destroy notifier, for example: * * ```c * void * object_add_to_user_list (GObject *object, * const gchar *new_string) * { * // the quark, naming the object data * GQuark quark_string_list = g_quark_from_static_string ("my-string-list"); * // retrieve the old string list * GList *list = g_object_steal_qdata (object, quark_string_list); * * // prepend new string * list = g_list_prepend (list, g_strdup (new_string)); * // this changed 'list', so we need to set it again * g_object_set_qdata_full (object, quark_string_list, list, free_string_list); * } * static void * free_string_list (gpointer data) * { * GList *node, *list = data; * * for (node = list; node; node = node->next) * g_free (node->data); * g_list_free (list); * } * ``` * * Using g_object_get_qdata() in the above example, instead of * g_object_steal_qdata() would have left the destroy function set, * and thus the partial string list would have been freed upon * g_object_set_qdata_full(). * @param quark A #GQuark, naming the user data pointer * @returns The user data pointer set, or %NULL */ steal_qdata(quark: GLib.Quark): any | null; /** * Reverts the effect of a previous call to * g_object_freeze_notify(). The freeze count is decreased on `object` * and when it reaches zero, queued "notify" signals are emitted. * * Duplicate notifications for each property are squashed so that at most one * #GObject::notify signal is emitted for each property, in the reverse order * in which they have been queued. * * It is an error to call this function when the freeze count is zero. */ thaw_notify(): void; /** * Decreases the reference count of `object`. When its reference count * drops to 0, the object is finalized (i.e. its memory is freed). * * If the pointer to the #GObject may be reused in future (for example, if it is * an instance variable of another object), it is recommended to clear the * pointer to %NULL rather than retain a dangling pointer to a potentially * invalid #GObject instance. Use g_clear_object() for this. */ unref(): void; /** * This function essentially limits the life time of the `closure` to * the life time of the object. That is, when the object is finalized, * the `closure` is invalidated by calling g_closure_invalidate() on * it, in order to prevent invocations of the closure with a finalized * (nonexisting) object. Also, g_object_ref() and g_object_unref() are * added as marshal guards to the `closure,` to ensure that an extra * reference count is held on `object` during invocation of the * `closure`. Usually, this function will be called on closures that * use this `object` as closure data. * @param closure #GClosure to watch */ watch_closure(closure: GObject.Closure): void; /** * the `constructed` function is called by g_object_new() as the * final step of the object creation process. At the point of the call, all * construction properties have been set on the object. The purpose of this * call is to allow for object initialisation steps that can only be performed * after construction properties have been set. `constructed` implementors * should chain up to the `constructed` call of their parent class to allow it * to complete its initialisation. */ vfunc_constructed(): void; /** * emits property change notification for a bunch * of properties. Overriding `dispatch_properties_changed` should be rarely * needed. * @param n_pspecs * @param pspecs */ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void; /** * the `dispose` function is supposed to drop all references to other * objects, but keep the instance otherwise intact, so that client method * invocations still work. It may be run multiple times (due to reference * loops). Before returning, `dispose` should chain up to the `dispose` method * of the parent class. */ vfunc_dispose(): void; /** * instance finalization function, should finish the finalization of * the instance begun in `dispose` and chain up to the `finalize` method of the * parent class. */ vfunc_finalize(): void; /** * the generic getter for all properties of this type. Should be * overridden for every type with properties. * @param property_id * @param value * @param pspec */ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void; /** * Emits a "notify" signal for the property `property_name` on `object`. * * When possible, eg. when signaling a property change from within the class * that registered the property, you should use g_object_notify_by_pspec() * instead. * * Note that emission of the notify signal may be blocked with * g_object_freeze_notify(). In this case, the signal emissions are queued * and will be emitted (in reverse order) when g_object_thaw_notify() is * called. * @param pspec */ vfunc_notify(pspec: GObject.ParamSpec): void; /** * the generic setter for all properties of this type. Should be * overridden for every type with properties. If implementations of * `set_property` don't emit property change notification explicitly, this will * be done implicitly by the type system. However, if the notify signal is * emitted explicitly, the type system will not emit it a second time. * @param property_id * @param value * @param pspec */ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void; /** * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to. * @param id Handler ID of the handler to be disconnected */ disconnect(id: number): void; /** * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values. * @param properties Object containing the properties to set */ set(properties: { [key: string]: any }): void; /** * Blocks a handler of an instance so it will not be called during any signal emissions * @param id Handler ID of the handler to be blocked */ block_signal_handler(id: number): void; /** * Unblocks a handler so it will be called again during any signal emissions * @param id Handler ID of the handler to be unblocked */ unblock_signal_handler(id: number): void; /** * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked. * @param detailedName Name of the signal to stop emission of */ stop_emission_by_name(detailedName: string): void; } namespace Button { // Signal callback interfaces interface ExtendedClicked { (arg1: Gdk.ModifierType): void; } // Constructor properties interface interface ConstructorProps extends Gtk.Button.ConstructorProps, Atk.ImplementorIface.ConstructorProps, Gtk.Actionable.ConstructorProps, Gtk.Activatable.ConstructorProps, Gtk.Buildable.ConstructorProps {} } /** * #GimpButton adds an extra signal to the #GtkButton widget that * allows the callback to distinguish a normal click from a click that * was performed with modifier keys pressed. */ class Button extends Gtk.Button implements Atk.ImplementorIface, Gtk.Actionable, Gtk.Activatable, Gtk.Buildable { static $gtype: GObject.GType