Gjsify LogoGjsify Logo

Index

Enumerations

Classes

Interfaces

Type Aliases

Variables

Functions

Type Aliases

Allocation: Gdk.Rectangle
ClassInitFunc: BaseInitFunc
EnumValue: GObject.EnumValue
FlagValue: FlagsValue
FundamentalType: GType
ObjectInitFunc: InstanceInitFunc
SignalMarshaller: SignalCMarshaller
Type: GType
TypeClass: GObject.TypeClass
TypeObject: TypeInstance

Variables

ARG_READWRITE: number
BINARY_AGE: number
BUTTONBOX_DEFAULT: number
INPUT_ERROR: number
INTERFACE_AGE: number
MAJOR_VERSION: number
MAX_COMPOSE_LEN: number
MICRO_VERSION: number
MINOR_VERSION: number
NO_TEXT_INPUT_MOD_MASK: number
PAPER_NAME_A3: string
PAPER_NAME_A4: string
PAPER_NAME_A5: string
PAPER_NAME_B5: string
PAPER_NAME_EXECUTIVE: string
PAPER_NAME_LEGAL: string
PAPER_NAME_LETTER: string
PARAM_READABLE: number
PARAM_READWRITE: number
PARAM_WRITABLE: number
PATH_PRIO_MASK: number
PRINT_SETTINGS_COLLATE: string
PRINT_SETTINGS_DEFAULT_SOURCE: string
PRINT_SETTINGS_DITHER: string
PRINT_SETTINGS_DUPLEX: string
PRINT_SETTINGS_FINISHINGS: string
PRINT_SETTINGS_MEDIA_TYPE: string
PRINT_SETTINGS_NUMBER_UP: string
PRINT_SETTINGS_NUMBER_UP_LAYOUT: string
PRINT_SETTINGS_N_COPIES: string
PRINT_SETTINGS_ORIENTATION: string
PRINT_SETTINGS_OUTPUT_BIN: string
PRINT_SETTINGS_OUTPUT_FILE_FORMAT: string
PRINT_SETTINGS_OUTPUT_URI: string
PRINT_SETTINGS_PAGE_RANGES: string
PRINT_SETTINGS_PAGE_SET: string
PRINT_SETTINGS_PAPER_FORMAT: string
PRINT_SETTINGS_PAPER_HEIGHT: string
PRINT_SETTINGS_PAPER_WIDTH: string
PRINT_SETTINGS_PRINTER: string
PRINT_SETTINGS_PRINTER_LPI: string
PRINT_SETTINGS_PRINT_PAGES: string
PRINT_SETTINGS_QUALITY: string
PRINT_SETTINGS_RESOLUTION: string
PRINT_SETTINGS_RESOLUTION_X: string
PRINT_SETTINGS_RESOLUTION_Y: string
PRINT_SETTINGS_REVERSE: string
PRINT_SETTINGS_SCALE: string
PRINT_SETTINGS_USE_COLOR: string
PRINT_SETTINGS_WIN32_DRIVER_EXTRA: string
PRINT_SETTINGS_WIN32_DRIVER_VERSION: string
PRIORITY_REDRAW: number
PRIORITY_RESIZE: number
STOCK_ABOUT: string

The "About" item.

STOCK_ADD: string

The "Add" item.

STOCK_APPLY: string

The "Apply" item.

STOCK_BOLD: string

The "Bold" item.

STOCK_CANCEL: string

The "Cancel" item.

STOCK_CAPS_LOCK_WARNING: string

The "Caps Lock Warning" icon.

STOCK_CDROM: string

The "CD-Rom" item.

STOCK_CLEAR: string

The "Clear" item.

STOCK_CLOSE: string

The "Close" item.

STOCK_COLOR_PICKER: string

The "Color Picker" item.

STOCK_CONNECT: string

The "Connect" icon.

STOCK_CONVERT: string

The "Convert" item.

STOCK_COPY: string

The "Copy" item.

STOCK_CUT: string

The "Cut" item.

STOCK_DELETE: string

The "Delete" item.

STOCK_DIALOG_AUTHENTICATION: string

The "Authentication" item.

STOCK_DIALOG_ERROR: string

The "Error" item.

STOCK_DIALOG_INFO: string

The "Information" item.

STOCK_DIALOG_QUESTION: string

The "Question" item.

STOCK_DIALOG_WARNING: string

The "Warning" item.

STOCK_DIRECTORY: string

The "Directory" icon.

STOCK_DISCARD: string

The "Discard" item.

STOCK_DISCONNECT: string

The "Disconnect" icon.

STOCK_DND: string

The "Drag-And-Drop" icon.

STOCK_DND_MULTIPLE: string

The "Drag-And-Drop multiple" icon.

STOCK_EDIT: string

The "Edit" item.

STOCK_EXECUTE: string

The "Execute" item.

STOCK_FILE: string

The "File" icon.

STOCK_FIND: string

The "Find" item.

STOCK_FIND_AND_REPLACE: string

The "Find and Replace" item.

STOCK_FLOPPY: string

The "Floppy" item.

STOCK_FULLSCREEN: string

The "Fullscreen" item.

STOCK_GOTO_BOTTOM: string

The "Bottom" item.

STOCK_GOTO_FIRST: string

The "First" item. RTL variant

STOCK_GOTO_LAST: string

The "Last" item. RTL variant

STOCK_GOTO_TOP: string

The "Top" item.

STOCK_GO_BACK: string

The "Back" item. RTL variant

STOCK_GO_DOWN: string

The "Down" item.

STOCK_GO_FORWARD: string

The "Forward" item. RTL variant

STOCK_GO_UP: string

The "Up" item.

STOCK_HARDDISK: string

The "Harddisk" item.

STOCK_HELP: string

The "Help" item.

STOCK_HOME: string

The "Home" item.

STOCK_INDENT: string

The "Indent" item. RTL variant

STOCK_INDEX: string

The "Index" item.

STOCK_INFO: string

The "Info" item.

STOCK_ITALIC: string

The "Italic" item.

STOCK_JUMP_TO: string

The "Jump to" item. RTL-variant

STOCK_JUSTIFY_CENTER: string

The "Center" item.

STOCK_JUSTIFY_FILL: string

The "Fill" item.

STOCK_JUSTIFY_LEFT: string

The "Left" item.

STOCK_JUSTIFY_RIGHT: string

The "Right" item.

STOCK_LEAVE_FULLSCREEN: string

The "Leave Fullscreen" item.

STOCK_MEDIA_FORWARD: string

The "Media Forward" item. RTL variant

STOCK_MEDIA_NEXT: string

The "Media Next" item. RTL variant

STOCK_MEDIA_PAUSE: string

The "Media Pause" item.

STOCK_MEDIA_PLAY: string

The "Media Play" item. RTL variant

STOCK_MEDIA_PREVIOUS: string

The "Media Previous" item. RTL variant

STOCK_MEDIA_RECORD: string

The "Media Record" item.

STOCK_MEDIA_REWIND: string

The "Media Rewind" item. RTL variant

STOCK_MEDIA_STOP: string

The "Media Stop" item.

STOCK_MISSING_IMAGE: string

The "Missing image" icon.

STOCK_NETWORK: string

The "Network" item.

STOCK_NEW: string

The "New" item.

STOCK_NO: string

The "No" item.

STOCK_OK: string

The "OK" item.

STOCK_OPEN: string

The "Open" item.

STOCK_ORIENTATION_LANDSCAPE: string

The "Landscape Orientation" item.

STOCK_ORIENTATION_PORTRAIT: string

The "Portrait Orientation" item.

STOCK_ORIENTATION_REVERSE_LANDSCAPE: string

The "Reverse Landscape Orientation" item.

STOCK_ORIENTATION_REVERSE_PORTRAIT: string

The "Reverse Portrait Orientation" item.

STOCK_PAGE_SETUP: string

The "Page Setup" item.

STOCK_PASTE: string

The "Paste" item.

STOCK_PREFERENCES: string

The "Preferences" item.

STOCK_PRINT: string

The "Print" item.

STOCK_PRINT_ERROR: string

The "Print Error" icon.

STOCK_PRINT_PAUSED: string

The "Print Paused" icon.

STOCK_PRINT_PREVIEW: string

The "Print Preview" item.

STOCK_PRINT_REPORT: string

The "Print Report" icon.

STOCK_PRINT_WARNING: string

The "Print Warning" icon.

STOCK_PROPERTIES: string

The "Properties" item.

STOCK_QUIT: string

The "Quit" item.

STOCK_REDO: string

The "Redo" item. RTL variant

STOCK_REFRESH: string

The "Refresh" item.

STOCK_REMOVE: string

The "Remove" item.

STOCK_REVERT_TO_SAVED: string

The "Revert" item. RTL variant

STOCK_SAVE: string

The "Save" item.

STOCK_SAVE_AS: string

The "Save As" item.

STOCK_SELECT_ALL: string

The "Select All" item.

STOCK_SELECT_COLOR: string

The "Color" item.

STOCK_SELECT_FONT: string

The "Font" item.

STOCK_SORT_ASCENDING: string

The "Ascending" item.

STOCK_SORT_DESCENDING: string

The "Descending" item.

STOCK_SPELL_CHECK: string

The "Spell Check" item.

STOCK_STOP: string

The "Stop" item.

STOCK_STRIKETHROUGH: string

The "Strikethrough" item.

STOCK_UNDELETE: string

The "Undelete" item. RTL variant

STOCK_UNDERLINE: string

The "Underline" item.

STOCK_UNDO: string

The "Undo" item. RTL variant

STOCK_UNINDENT: string

The "Unindent" item. RTL variant

STOCK_YES: string

The "Yes" item.

STOCK_ZOOM_100: string

The "Zoom 100%" item.

STOCK_ZOOM_FIT: string

The "Zoom to Fit" item.

STOCK_ZOOM_IN: string

The "Zoom In" item.

STOCK_ZOOM_OUT: string

The "Zoom Out" item.

TEXT_VIEW_PRIORITY_VALIDATE: number
TOGGLE_GROUP_MOD_MASK: number
TYPE_FUNDAMENTAL_LAST: number

Functions

  • Finds the first accelerator in any #GtkAccelGroup attached to object that matches accel_key and accel_mods, and activates that accelerator.

    Parameters

    • object: GObject.Object

      the #GObject, usually a #GtkWindow, on which to activate the accelerator.

    • accel_key: number

      accelerator keyval from a key event

    • accel_mods: Gdk.ModifierType

      keyboard state mask from a key event

    Returns boolean

  • accelerator_get_default_mod_mask(): number
  • accelerator_get_label(accelerator_key: number, accelerator_mods: Gdk.ModifierType): string
  • Converts an accelerator keyval and modifier mask into a string which can be used to represent the accelerator to the user.

    Parameters

    • accelerator_key: number

      accelerator keyval

    • accelerator_mods: Gdk.ModifierType

      accelerator modifier mask

    Returns string

  • accelerator_name(accelerator_key: number, accelerator_mods: Gdk.ModifierType): string
  • Converts an accelerator keyval and modifier mask into a string parseable by gtk_accelerator_parse(). For example, if you pass in #GDK_q and #GDK_CONTROL_MASK, this function returns "<Control>q".

    If you need to display accelerators in the user interface, see gtk_accelerator_get_label().

    Parameters

    • accelerator_key: number

      accelerator keyval

    • accelerator_mods: Gdk.ModifierType

      accelerator modifier mask

    Returns string

  • Parses a string representing an accelerator. The format looks like "<Control>a" or "<Shift><Alt>F1" or "<Release>z" (the last one is for key release). The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". Key names are parsed using gdk_keyval_from_name(). For character keys the name is not the symbol, but the lowercase name, e.g. one would use "<Ctrl>minus" instead of "<Ctrl>-".

    If the parse fails, accelerator_key and accelerator_mods will be set to 0 (zero).

    Parameters

    • accelerator: string

      string representing an accelerator

    Returns [number, Gdk.ModifierType]

  • Sets the modifiers that will be considered significant for keyboard accelerators. The default mod mask is #GDK_CONTROL_MASK | #GDK_SHIFT_MASK | #GDK_MOD1_MASK | #GDK_SUPER_MASK | #GDK_HYPER_MASK | #GDK_META_MASK, that is, Control, Shift, Alt, Super, Hyper and Meta. Other modifiers will by default be ignored by #GtkAccelGroup. You must include at least the three modifiers Control, Shift and Alt in any value you pass to this function.

    The default mod mask should be changed on application startup, before using any accelerator groups.

    Parameters

    Returns void

  • Determines whether a given keyval and modifier mask constitute a valid keyboard accelerator. For example, the #GDK_a keyval plus #GDK_CONTROL_MASK is valid - this is a "Ctrl+a" accelerator. But, you can't, for instance, use the #GDK_Control_L keyval as an accelerator.

    Parameters

    Returns boolean

  • alternative_dialog_button_order(screen: Gdk.Screen): boolean
  • Returns %TRUE if dialogs are expected to use an alternative button order on the screen screen. See gtk_dialog_set_alternative_button_order() for more details about alternative button order.

    If you need to use this function, you should probably connect to the ::notify:gtk-alternative-button-order signal on the #GtkSettings object associated to screen, in order to be notified if the button order setting changes.

    Parameters

    • screen: Gdk.Screen

      a #GdkScreen, or %NULL to use the default screen

    Returns boolean

  • Override or install a new key binding for keyval with modifiers on binding_set.

    Parameters

    • binding_set: Gtk.BindingSet

      a #GtkBindingSet to add a signal to

    • keyval: number

      key value

    • modifiers: Gdk.ModifierType

      key modifier

    • signal_name: string

      signal name to be bound

    • binding_args: Gtk.BindingArg[]

      list of #GtkBindingArg signal arguments

    Returns void

  • Remove a binding previously installed via gtk_binding_entry_add_signal() on binding_set.

    Parameters

    • binding_set: Gtk.BindingSet

      a #GtkBindingSet to remove an entry of

    • keyval: number

      key value of binding to remove

    • modifiers: Gdk.ModifierType

      key modifier of binding to remove

    Returns void

  • Install a binding on binding_set which causes key lookups to be aborted, to prevent bindings from lower priority sets to be activated.

    Parameters

    • binding_set: Gtk.BindingSet

      a #GtkBindingSet to skip an entry of

    • keyval: number

      key value of binding to skip

    • modifiers: Gdk.ModifierType

      key modifier of binding to skip

    Returns void

  • Find a binding set by its globally unique name. The set_name can either be a name used for gtk_binding_set_new() or the type name of a class used in gtk_binding_set_by_class().

    Parameters

    • set_name: string

      unique binding set name

    Returns Gtk.BindingSet

  • Find a key binding matching keyval and modifiers and activate the binding on object.

    Parameters

    • object: Gtk.Object

      object to activate when binding found

    • keyval: number

      key value of the binding

    • modifiers: Gdk.ModifierType

      key modifier of the binding

    Returns boolean

  • Looks up key bindings for object to find one matching event, and if one was found, activate it.

    Parameters

    Returns boolean

  • builder_error_quark(): Quark
  • check_version(required_major: number, required_minor: number, required_micro: number): string
  • Checks that the GTK+ library in use is compatible with the given version. Generally you would pass in the constants #GTK_MAJOR_VERSION, #GTK_MINOR_VERSION, #GTK_MICRO_VERSION as the three arguments to this function; that produces a check that the library in use is compatible with the version of GTK+ the application or module was compiled against.

    Compatibility is defined by two things: first the version of the running library is newer than the version required_major.required_minor.required_micro. Second the running library must be binary compatible with the version required_major.required_minor.required_micro (same major version.)

    This function is primarily for GTK+ modules; the module can call this function to check that it wasn't loaded into an incompatible version of GTK+. However, such a a check isn't completely reliable, since the module may be linked against an old version of GTK+ and calling the old version of gtk_check_version(), but still get loaded into an application using a newer version of GTK+.

    Parameters

    • required_major: number

      the required major version.

    • required_minor: number

      the required minor version.

    • required_micro: number

      the required micro version.

    Returns string

  • ctree_node_get_type(): GType
  • disable_setlocale(): void
  • Prevents gtk_init(), gtk_init_check(), gtk_init_with_args() and gtk_parse_args() from automatically calling setlocale (LC_ALL, ""). You would want to use this function if you wanted to set the locale for your program to something other than the user's locale, or if you wanted to set different values for different locale categories.

    Most programs should not need to call this function.

    Returns void

  • Initiates a drag on the source side. The function only needs to be used when the application is starting drags itself, and is not needed when gtk_drag_source_set() is used.

    The event is used to retrieve the timestamp that will be used internally to grab the pointer. If event is #NULL, then GDK_CURRENT_TIME will be used. However, you should try to pass a real event in all cases, since that can be used by GTK+ to get information about the start position of the drag, for example if the event is a GDK_MOTION_NOTIFY.

    Generally there are three cases when you want to start a drag by hand by calling this function:

    1. During a button-press-event handler, if you want to start a drag immediately when the user presses the mouse button. Pass the event that you have in your button-press-event handler.

    2. During a motion-notify-event handler, if you want to start a drag when the mouse moves past a certain threshold distance after a button-press. Pass the event that you have in your motion-notify-event handler.

    3. During a timeout handler, if you want to start a drag after the mouse button is held down for some time. Try to save the last event that you got from the mouse, using gdk_event_copy(), and pass it to this function (remember to free the event with gdk_event_free() when you are done). If you can really not pass a real event, pass #NULL instead.

    Parameters

    • widget: Gtk.Widget

      the source widget.

    • targets: Gtk.TargetList

      The targets (data formats) in which the source can provide the data.

    • actions: Gdk.DragAction

      A bitmask of the allowed drag actions for this drag.

    • button: number

      The button the user clicked to start the drag.

    • event: Gdk.Event

      The event that triggered the start of the drag.

    Returns Gdk.DragContext

  • drag_check_threshold(widget: Gtk.Widget, start_x: number, start_y: number, current_x: number, current_y: number): boolean
  • Checks to see if a mouse drag starting at (start_x, start_y) and ending at (current_x, current_y) has passed the GTK+ drag threshold, and thus should trigger the beginning of a drag-and-drop operation.

    Parameters

    • widget: Gtk.Widget

      a #GtkWidget

    • start_x: number

      X coordinate of start of drag

    • start_y: number

      Y coordinate of start of drag

    • current_x: number

      current X coordinate

    • current_y: number

      current Y coordinate

    Returns boolean

  • drag_dest_add_image_targets(widget: Gtk.Widget): void
  • Add the image targets supported by #GtkSelection to the target list of the drag destination. The targets are added with info = 0. If you need another value, use gtk_target_list_add_image_targets() and gtk_drag_dest_set_target_list().

    Parameters

    • widget: Gtk.Widget

      a #GtkWidget that's a drag destination

    Returns void

  • drag_dest_add_text_targets(widget: Gtk.Widget): void
  • Add the text targets supported by #GtkSelection to the target list of the drag destination. The targets are added with info = 0. If you need another value, use gtk_target_list_add_text_targets() and gtk_drag_dest_set_target_list().

    Parameters

    • widget: Gtk.Widget

      a #GtkWidget that's a drag destination

    Returns void

  • drag_dest_add_uri_targets(widget: Gtk.Widget): void
  • Add the URI targets supported by #GtkSelection to the target list of the drag destination. The targets are added with info = 0. If you need another value, use gtk_target_list_add_uri_targets() and gtk_drag_dest_set_target_list().

    Parameters

    • widget: Gtk.Widget

      a #GtkWidget that's a drag destination

    Returns void

  • drag_dest_get_track_motion(widget: Gtk.Widget): boolean
  • Returns whether the widget has been configured to always emit ::drag-motion signals.

    Parameters

    • widget: Gtk.Widget

      a #GtkWidget that's a drag destination

    Returns boolean

  • Sets a widget as a potential drop destination, and adds default behaviors.

    The default behaviors listed in flags have an effect similar to installing default handlers for the widget's drag-and-drop signals (#GtkWidget:drag-motion, #GtkWidget:drag-drop, ...). They all exist for convenience. When passing #GTK_DEST_DEFAULT_ALL for instance it is sufficient to connect to the widget's #GtkWidget::drag-data-received signal to get primitive, but consistent drag-and-drop support.

    Things become more complicated when you try to preview the dragged data, as described in the documentation for #GtkWidget:drag-motion. The default behaviors described by flags make some assumptions, that can conflict with your own signal handlers. For instance #GTK_DEST_DEFAULT_DROP causes invokations of gdk_drag_status() in the context of #GtkWidget:drag-motion, and invokations of gtk_drag_finish() in #GtkWidget:drag-data-received. Especially the later is dramatic, when your own #GtkWidget:drag-motion handler calls gtk_drag_get_data() to inspect the dragged data.

    There's no way to set a default action here, you can use the #GtkWidget:drag-motion callback for that. Here's an example which selects the action to use depending on whether the control key is pressed or not: |[ static void drag_motion (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time) { GdkModifierType mask;

    gdk_window_get_pointer (gtk_widget_get_window (widget), NULL, NULL, &mask); if (mask & GDK_CONTROL_MASK) gdk_drag_status (context, GDK_ACTION_COPY, time); else gdk_drag_status (context, GDK_ACTION_MOVE, time); }


    @param widget a #GtkWidget
    @param flags which types of default drag behavior to use
    @param targets a pointer to an array of #GtkTargetEntry<!-- -->s indicating the drop types that this `widget` will accept, or %NULL. Later you can access the list with gtk_drag_dest_get_target_list() and gtk_drag_dest_find_target().
    @param actions a bitmask of possible actions for a drop onto this `widget`.

    Parameters

    Returns void

  • Sets the target types that this widget can accept from drag-and-drop. The widget must first be made into a drag destination with gtk_drag_dest_set().

    Parameters

    • widget: Gtk.Widget

      a #GtkWidget that's a drag destination

    • target_list: Gtk.TargetList

      list of droppable targets, or %NULL for none

    Returns void

  • drag_dest_set_track_motion(widget: Gtk.Widget, track_motion: boolean): void
  • Tells the widget to emit ::drag-motion and ::drag-leave events regardless of the targets and the %GTK_DEST_DEFAULT_MOTION flag.

    This may be used when a widget wants to do generic actions regardless of the targets that the source offers.

    Parameters

    • widget: Gtk.Widget

      a #GtkWidget that's a drag destination

    • track_motion: boolean

      whether to accept all targets

    Returns void

  • drag_finish(context: Gdk.DragContext, success: boolean, del: boolean, time_: number): void
  • Changes the default drag icon. GTK+ retains references for the arguments, and will release them when they are no longer needed.

    Parameters

    • colormap: Gdk.Colormap

      the colormap of the icon

    • pixmap: Gdk.Pixmap

      the image data for the icon

    • mask: Gdk.Bitmap

      the transparency mask for an image, or %NULL

    • hot_x: number

      The X offset within widget of the hotspot.

    • hot_y: number

      The Y offset within widget of the hotspot.

    Returns void

  • Sets the icon for a particular drag to the default icon.

    Parameters

    • context: Gdk.DragContext

      the context for a drag. (This must be called with a context for the source side of a drag)

    Returns void

  • drag_set_icon_name(context: Gdk.DragContext, icon_name: string, hot_x: number, hot_y: number): void
  • Sets the icon for a given drag from a named themed icon. See the docs for #GtkIconTheme for more details. Note that the size of the icon depends on the icon theme (the icon is loaded at the symbolic size #GTK_ICON_SIZE_DND), thus hot_x and hot_y have to be used with care.

    Parameters

    • context: Gdk.DragContext

      the context for a drag. (This must be called with a context for the source side of a drag)

    • icon_name: string

      name of icon to use

    • hot_x: number

      the X offset of the hotspot within the icon

    • hot_y: number

      the Y offset of the hotspot within the icon

    Returns void

  • Sets pixbuf as the icon for a given drag.

    Parameters

    • context: Gdk.DragContext

      the context for a drag. (This must be called with a context for the source side of a drag)

    • pixbuf: Pixbuf

      the #GdkPixbuf to use as the drag icon.

    • hot_x: number

      the X offset within widget of the hotspot.

    • hot_y: number

      the Y offset within widget of the hotspot.

    Returns void

  • Sets pixmap as the icon for a given drag. GTK+ retains references for the arguments, and will release them when they are no longer needed. In general, gtk_drag_set_icon_pixbuf() will be more convenient to use.

    Parameters

    • context: Gdk.DragContext

      the context for a drag. (This must be called with a context for the source side of a drag)

    • colormap: Gdk.Colormap

      the colormap of the icon

    • pixmap: Gdk.Pixmap

      the image data for the icon

    • mask: Gdk.Bitmap

      the transparency mask for the icon or %NULL for none.

    • hot_x: number

      the X offset within pixmap of the hotspot.

    • hot_y: number

      the Y offset within pixmap of the hotspot.

    Returns void

  • drag_set_icon_stock(context: Gdk.DragContext, stock_id: string, hot_x: number, hot_y: number): void
  • Sets the icon for a given drag from a stock ID.

    Parameters

    • context: Gdk.DragContext

      the context for a drag. (This must be called with a context for the source side of a drag)

    • stock_id: string

      the ID of the stock icon to use for the drag.

    • hot_x: number

      the X offset within the icon of the hotspot.

    • hot_y: number

      the Y offset within the icon of the hotspot.

    Returns void

  • Changes the icon for a widget to a given widget. GTK+ will not destroy the icon, so if you don't want it to persist, you should connect to the "drag-end" signal and destroy it yourself.

    Parameters

    • context: Gdk.DragContext

      the context for a drag. (This must be called with a context for the source side of a drag)

    • widget: Gtk.Widget

      a toplevel window to use as an icon.

    • hot_x: number

      the X offset within widget of the hotspot.

    • hot_y: number

      the Y offset within widget of the hotspot.

    Returns void

  • drag_source_add_image_targets(widget: Gtk.Widget): void
  • Add the writable image targets supported by #GtkSelection to the target list of the drag source. The targets are added with info = 0. If you need another value, use gtk_target_list_add_image_targets() and gtk_drag_source_set_target_list().

    Parameters

    • widget: Gtk.Widget

      a #GtkWidget that's is a drag source

    Returns void

  • drag_source_add_text_targets(widget: Gtk.Widget): void
  • Add the text targets supported by #GtkSelection to the target list of the drag source. The targets are added with info = 0. If you need another value, use gtk_target_list_add_text_targets() and gtk_drag_source_set_target_list().

    Parameters

    • widget: Gtk.Widget

      a #GtkWidget that's is a drag source

    Returns void

  • drag_source_add_uri_targets(widget: Gtk.Widget): void
  • Add the URI targets supported by #GtkSelection to the target list of the drag source. The targets are added with info = 0. If you need another value, use gtk_target_list_add_uri_targets() and gtk_drag_source_set_target_list().

    Parameters

    • widget: Gtk.Widget

      a #GtkWidget that's is a drag source

    Returns void

  • Sets up a widget so that GTK+ will start a drag operation when the user clicks and drags on the widget. The widget must have a window.

    Parameters

    • widget: Gtk.Widget

      a #GtkWidget

    • start_button_mask: Gdk.ModifierType

      the bitmask of buttons that can start the drag

    • targets: Gtk.TargetEntry[]

      the table of targets that the drag will support, may be %NULL

    • actions: Gdk.DragAction

      the bitmask of possible actions for a drag from this widget

    Returns void

  • Sets the icon that will be used for drags from a particular widget from a pixmap/mask. GTK+ retains references for the arguments, and will release them when they are no longer needed. Use gtk_drag_source_set_icon_pixbuf() instead.

    Parameters

    Returns void

  • drag_source_set_icon_name(widget: Gtk.Widget, icon_name: string): void
  • Sets the icon that will be used for drags from a particular source to a themed icon. See the docs for #GtkIconTheme for more details.

    Parameters

    • widget: Gtk.Widget

      a #GtkWidget

    • icon_name: string

      name of icon to use

    Returns void

  • Sets the icon that will be used for drags from a particular widget from a #GdkPixbuf. GTK+ retains a reference for pixbuf and will release it when it is no longer needed.

    Parameters

    • widget: Gtk.Widget

      a #GtkWidget

    • pixbuf: Pixbuf

      the #GdkPixbuf for the drag icon

    Returns void

  • drag_source_set_icon_stock(widget: Gtk.Widget, stock_id: string): void
  • Sets the icon that will be used for drags from a particular source to a stock icon.

    Parameters

    • widget: Gtk.Widget

      a #GtkWidget

    • stock_id: string

      the ID of the stock icon to use

    Returns void

  • Changes the target types that this widget offers for drag-and-drop. The widget must first be made into a drag source with gtk_drag_source_set().

    Parameters

    • widget: Gtk.Widget

      a #GtkWidget that's a drag source

    • target_list: Gtk.TargetList

      list of draggable targets, or %NULL for none

    Returns void

  • Draws an arrow in the given rectangle on window using the given parameters. arrow_type determines the direction of the arrow.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      the type of shadow to draw

    • arrow_type: Gtk.ArrowType

      the type of arrow to draw

    • fill: boolean

      %TRUE if the arrow tip should be filled

    • x: number

      x origin of the rectangle to draw the arrow in

    • y: number

      y origin of the rectangle to draw the arrow in

    • width: number

      width of the rectangle to draw the arrow in

    • height: number

      height of the rectangle to draw the arrow in

    Returns void

  • Draws a box on window with the given parameters.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      the type of shadow to draw

    • x: number

      x origin of the box

    • y: number

      y origin of the box

    • width: number

      the width of the box

    • height: number

      the height of the box

    Returns void

  • Draws a box in window using the given style and state and shadow type, leaving a gap in one side.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      type of shadow to draw

    • x: number

      x origin of the rectangle

    • y: number

      y origin of the rectangle

    • width: number

      width of the rectangle

    • height: number

      width of the rectangle

    • gap_side: Gtk.PositionType

      side in which to leave the gap

    • gap_x: number

      starting position of the gap

    • gap_width: number

      width of the gap

    Returns void

  • Draws a check button indicator in the given rectangle on window with the given parameters.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      the type of shadow to draw

    • x: number

      x origin of the rectangle to draw the check in

    • y: number

      y origin of the rectangle to draw the check in

    • width: number

      the width of the rectangle to draw the check in

    • height: number

      the height of the rectangle to draw the check in

    Returns void

  • Draws a diamond in the given rectangle on window using the given parameters.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      the type of shadow to draw

    • x: number

      x origin of the rectangle to draw the diamond in

    • y: number

      y origin of the rectangle to draw the diamond in

    • width: number

      width of the rectangle to draw the diamond in

    • height: number

      height of the rectangle to draw the diamond in

    Returns void

  • Draws an expander as used in #GtkTreeView.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • x: number

      the x position to draw the expander at

    • y: number

      the y position to draw the expander at

    • expander_style: Gtk.ExpanderStyle

      the style to draw the expander in

    Returns void

  • Draws an extension, i.e. a notebook tab.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      type of shadow to draw

    • x: number

      x origin of the extension

    • y: number

      y origin of the extension

    • width: number

      width of the extension

    • height: number

      width of the extension

    • gap_side: Gtk.PositionType

      the side on to which the extension is attached

    Returns void

  • Draws a flat box on window with the given parameters.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      the type of shadow to draw

    • x: number

      x origin of the box

    • y: number

      y origin of the box

    • width: number

      the width of the box

    • height: number

      the height of the box

    Returns void

  • draw_focus(style: Gtk.Style, window: Gdk.Window, x: number, y: number, width: number, height: number): void
  • Draws a focus indicator around the given rectangle on window using the given style.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • x: number

      the x origin of the rectangle around which to draw a focus indicator

    • y: number

      the y origin of the rectangle around which to draw a focus indicator

    • width: number

      the width of the rectangle around which to draw a focus indicator

    • height: number

      the height of the rectangle around which to draw a focus indicator

    Returns void

  • Draws a handle as used in #GtkHandleBox and #GtkPaned.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      type of shadow to draw

    • x: number

      x origin of the handle

    • y: number

      y origin of the handle

    • width: number

      with of the handle

    • height: number

      height of the handle

    • orientation: Gtk.Orientation

      the orientation of the handle

    Returns void

  • Draws a horizontal line from (x1, y) to (x2, y) in window using the given style and state.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • x1: number

      the starting x coordinate

    • x2: number

      the ending x coordinate

    • y: number

      the y coordinate

    Returns void

  • Draws a text caret on drawable at location. This is not a style function but merely a convenience function for drawing the standard cursor shape.

    Parameters

    • widget: Gtk.Widget

      a #GtkWidget

    • drawable: Gdk.Drawable

      a #GdkDrawable

    • area: Gdk.Rectangle

      rectangle to which the output is clipped, or %NULL if the output should not be clipped

    • location: Gdk.Rectangle

      location where to draw the cursor (location->width is ignored)

    • is_primary: boolean

      if the cursor should be the primary cursor color.

    • direction: Gtk.TextDirection

      whether the cursor is left-to-right or right-to-left. Should never be #GTK_TEXT_DIR_NONE

    • draw_arrow: boolean

      %TRUE to draw a directional arrow on the cursor. Should be %FALSE unless the cursor is split.

    Returns void

  • Draws a layout on window using the given parameters.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • use_text: boolean

      whether to use the text or foreground graphics context of style

    • x: number

      x origin

    • y: number

      y origin

    • layout: Pango.Layout

      the layout to draw

    Returns void

  • Draws a radio button indicator in the given rectangle on window with the given parameters.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      the type of shadow to draw

    • x: number

      x origin of the rectangle to draw the option in

    • y: number

      y origin of the rectangle to draw the option in

    • width: number

      the width of the rectangle to draw the option in

    • height: number

      the height of the rectangle to draw the option in

    Returns void

  • Draws a resize grip in the given rectangle on window using the given parameters.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • edge: Gdk.WindowEdge

      the edge in which to draw the resize grip

    • x: number

      the x origin of the rectangle in which to draw the resize grip

    • y: number

      the y origin of the rectangle in which to draw the resize grip

    • width: number

      the width of the rectangle in which to draw the resize grip

    • height: number

      the height of the rectangle in which to draw the resize grip

    Returns void

  • Draws a shadow around the given rectangle in window using the given style and state and shadow type.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      type of shadow to draw

    • x: number

      x origin of the rectangle

    • y: number

      y origin of the rectangle

    • width: number

      width of the rectangle

    • height: number

      width of the rectangle

    Returns void

  • Draws a shadow around the given rectangle in window using the given style and state and shadow type, leaving a gap in one side.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      type of shadow to draw

    • x: number

      x origin of the rectangle

    • y: number

      y origin of the rectangle

    • width: number

      width of the rectangle

    • height: number

      width of the rectangle

    • gap_side: Gtk.PositionType

      side in which to leave the gap

    • gap_x: number

      starting position of the gap

    • gap_width: number

      width of the gap

    Returns void

  • Draws a slider in the given rectangle on window using the given style and orientation.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      a shadow

    • x: number

      the x origin of the rectangle in which to draw a slider

    • y: number

      the y origin of the rectangle in which to draw a slider

    • width: number

      the width of the rectangle in which to draw a slider

    • height: number

      the height of the rectangle in which to draw a slider

    • orientation: Gtk.Orientation

      the orientation to be used

    Returns void

  • Draws a text string on window with the given parameters.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • x: number

      x origin

    • y: number

      y origin

    • string: string

      the string to draw

    Returns void

  • Draws an option menu tab (i.e. the up and down pointing arrows) in the given rectangle on window using the given parameters.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      the type of shadow to draw

    • x: number

      x origin of the rectangle to draw the tab in

    • y: number

      y origin of the rectangle to draw the tab in

    • width: number

      the width of the rectangle to draw the tab in

    • height: number

      the height of the rectangle to draw the tab in

    Returns void

  • Draws a vertical line from (x, y1) to (x, y2) in window using the given style and state.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • y1_: number

      the starting y coordinate

    • y2_: number

      the ending y coordinate

    • x: number

      the x coordinate

    Returns void

  • events_pending(): boolean
  • exit(error_code: number): void
  • false_TODO(): boolean
  • file_chooser_error_quark(): Quark
  • gc_release(gc: Gdk.GC): void
  • Obtains a copy of the event currently being processed by GTK+. For example, if you get a "clicked" signal from #GtkButton, the current event will be the #GdkEventButton that triggered the "clicked" signal. The returned event must be freed with gdk_event_free(). If there is no current event, the function returns %NULL.

    Returns Gdk.Event

  • get_current_event_time(): number
  • If there is a current event and it has a timestamp, return that timestamp, otherwise return %GDK_CURRENT_TIME.

    Returns number

  • Returns the #PangoLanguage for the default language currently in effect. (Note that this can change over the life of an application.) The default language is derived from the current locale. It determines, for example, whether GTK+ uses the right-to-left or left-to-right text direction.

    This function is equivalent to pango_language_get_default(). See that function for details.

    Returns Pango.Language

  • If event is %NULL or the event was not associated with any widget, returns %NULL, otherwise returns the widget that received the event originally.

    Parameters

    Returns Gtk.Widget

  • get_option_group(open_default_display: boolean): OptionGroup
  • Returns a #GOptionGroup for the commandline arguments recognized by GTK+ and GDK. You should add this group to your #GOptionContext with g_option_context_add_group(), if you are using g_option_context_parse() to parse your commandline arguments.

    Parameters

    • open_default_display: boolean

      whether to open the default display when parsing the commandline arguments

    Returns OptionGroup

  • icon_size_from_name(name: string): number
  • Looks up the icon size associated with name.

    Parameters

    • name: string

      the name to look up.

    Returns number

  • icon_size_get_name(size: number): string
  • Gets the canonical name of the given icon size. The returned string is statically allocated and should not be freed.

    Parameters

    • size: number

      a #GtkIconSize.

    Returns string

  • icon_size_lookup(size: number): [boolean, number, number]
  • Obtains the pixel size of a semantic icon size, possibly modified by user preferences for the default #GtkSettings. (See gtk_icon_size_lookup_for_settings().) Normally size would be #GTK_ICON_SIZE_MENU, #GTK_ICON_SIZE_BUTTON, etc. This function isn't normally needed, gtk_widget_render_icon() is the usual way to get an icon for rendering, then just look at the size of the rendered pixbuf. The rendered pixbuf may not even correspond to the width/height returned by gtk_icon_size_lookup(), because themes are free to render the pixbuf however they like, including changing the usual size.

    Parameters

    • size: number

      an icon size

    Returns [boolean, number, number]

  • icon_size_lookup_for_settings(settings: Gtk.Settings, size: number): [boolean, number, number]
  • Obtains the pixel size of a semantic icon size, possibly modified by user preferences for a particular #GtkSettings. Normally size would be #GTK_ICON_SIZE_MENU, #GTK_ICON_SIZE_BUTTON, etc. This function isn't normally needed, gtk_widget_render_icon() is the usual way to get an icon for rendering, then just look at the size of the rendered pixbuf. The rendered pixbuf may not even correspond to the width/height returned by gtk_icon_size_lookup(), because themes are free to render the pixbuf however they like, including changing the usual size.

    Parameters

    • settings: Gtk.Settings

      a #GtkSettings object, used to determine which set of user preferences to used.

    • size: number

      an icon size

    Returns [boolean, number, number]

  • icon_size_register(name: string, width: number, height: number): number
  • Registers a new icon size, along the same lines as #GTK_ICON_SIZE_MENU, etc. Returns the integer value for the size.

    Parameters

    • name: string

      name of the icon size

    • width: number

      the icon width

    • height: number

      the icon height

    Returns number

  • icon_size_register_alias(alias: string, target: number): void
  • Registers alias as another name for target. So calling gtk_icon_size_from_name() with alias as argument will return target.

    Parameters

    • alias: string

      an alias for target

    • target: number

      an existing icon size

    Returns void

  • icon_theme_error_quark(): Quark
  • idle_remove(idle_handler_id: number): void
  • idle_remove_by_data(data: object): void
  • init(argv: string[]): string[] | null
  • Call this function before using any other GTK+ functions in your GUI applications. It will initialize everything needed to operate the toolkit and parses some standard command line options.

    argc and argv are adjusted accordingly so your own code will never see those standard arguments.

    Note that there are some alternative ways to initialize GTK+: if you are calling gtk_parse_args(), gtk_init_check(), gtk_init_with_args() or g_option_context_parse() with the option group returned by gtk_get_option_group(), you don't have to call gtk_init().

    This function will terminate your program if it was unable to initialize the windowing system for some reason. If you want your program to fall back to a textual interface you want to call gtk_init_check() instead.

    Since 2.18, GTK+ calls signal (SIGPIPE, SIG_IGN) during initialization, to ignore SIGPIPE signals, since these are almost never wanted in graphical applications. If you do need to handle SIGPIPE for some reason, reset the handler after gtk_init(), but notice that other libraries (e.g. libdbus or gvfs) might do similar things.

    Parameters

    • argv: string[]

      Address of the argv parameter of main(). Any options understood by GTK+ are stripped before return.

    Returns string[] | null

  • init_check(argv: string[]): [boolean, string[] | null]
  • This function does the same work as gtk_init() with only a single change: It does not terminate the program if the GUI can't be initialized. Instead it returns %FALSE on failure.

    This way the application can fall back to some other means of communication with the user - for example a curses or command line interface.

    Parameters

    • argv: string[]

      Address of the argv parameter of main(). Any parameters understood by gtk_init() are stripped before return.

    Returns [boolean, string[] | null]

  • init_with_args(argv: string[], parameter_string: string, entries: OptionEntry[], translation_domain: string): [boolean, string[]]
  • This function does the same work as gtk_init_check(). Additionally, it allows you to add your own commandline options, and it automatically generates nicely formatted

    output. Note that your program will be terminated after writing out the help output.

    Parameters

    • argv: string[]

      a pointer to the array of command line arguments.

    • parameter_string: string

      a string which is displayed in the first line of output, after programname [OPTION...]

    • entries: OptionEntry[]

      a %NULL-terminated array of #GOptionEntrys describing the options of your program

    • translation_domain: string

      a translation domain to use for translating the output for the options in entries and the parameter_string with gettext(), or %NULL

    Returns [boolean, string[]]

  • input_remove(input_handler_id: number): void
  • key_snooper_remove(snooper_handler_id: number): void
  • main(): void
  • main_iteration(): boolean
  • main_iteration_do(blocking: boolean): boolean
  • main_level(): number
  • main_quit(): void
  • marshal_BOOLEAN__POINTER(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_BOOLEAN__POINTER_INT_INT(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_BOOLEAN__POINTER_INT_INT_UINT(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_BOOLEAN__POINTER_POINTER_INT_INT(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_BOOLEAN__POINTER_STRING_STRING_POINTER(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_BOOLEAN__VOID(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_ENUM__ENUM(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_INT__POINTER(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_INT__POINTER_CHAR_CHAR(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_VOID__ENUM_FLOAT(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_VOID__ENUM_FLOAT_BOOLEAN(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_VOID__INT_INT(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_VOID__INT_INT_POINTER(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_VOID__POINTER_INT(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_VOID__POINTER_INT_INT_POINTER_UINT_UINT(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_VOID__POINTER_POINTER(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_VOID__POINTER_POINTER_POINTER(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_VOID__POINTER_POINTER_UINT_UINT(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_VOID__POINTER_STRING_STRING(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_VOID__POINTER_UINT(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_VOID__POINTER_UINT_ENUM(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_VOID__POINTER_UINT_UINT(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_VOID__STRING_INT_POINTER(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_VOID__UINT_POINTER_UINT_ENUM_ENUM_POINTER(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_VOID__UINT_POINTER_UINT_UINT_ENUM(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • marshal_VOID__UINT_STRING(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • Draws an arrow in the given rectangle on window using the given parameters. arrow_type determines the direction of the arrow.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      the type of shadow to draw

    • area: Gdk.Rectangle

      clip rectangle, or %NULL if the output should not be clipped

    • widget: Gtk.Widget

      the widget

    • detail: string

      a style detail

    • arrow_type: Gtk.ArrowType

      the type of arrow to draw

    • fill: boolean

      %TRUE if the arrow tip should be filled

    • x: number

      x origin of the rectangle to draw the arrow in

    • y: number

      y origin of the rectangle to draw the arrow in

    • width: number

      width of the rectangle to draw the arrow in

    • height: number

      height of the rectangle to draw the arrow in

    Returns void

  • Draws a box on window with the given parameters.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      the type of shadow to draw

    • area: Gdk.Rectangle

      clip rectangle, or %NULL if the output should not be clipped

    • widget: Gtk.Widget

      the widget

    • detail: string

      a style detail

    • x: number

      x origin of the box

    • y: number

      y origin of the box

    • width: number

      the width of the box

    • height: number

      the height of the box

    Returns void

  • Draws a box in window using the given style and state and shadow type, leaving a gap in one side.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      type of shadow to draw

    • area: Gdk.Rectangle

      clip rectangle, or %NULL if the output should not be clipped

    • widget: Gtk.Widget

      the widget

    • detail: string

      a style detail

    • x: number

      x origin of the rectangle

    • y: number

      y origin of the rectangle

    • width: number

      width of the rectangle

    • height: number

      width of the rectangle

    • gap_side: Gtk.PositionType

      side in which to leave the gap

    • gap_x: number

      starting position of the gap

    • gap_width: number

      width of the gap

    Returns void

  • Draws a check button indicator in the given rectangle on window with the given parameters.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      the type of shadow to draw

    • area: Gdk.Rectangle

      clip rectangle, or %NULL if the output should not be clipped

    • widget: Gtk.Widget

      the widget

    • detail: string

      a style detail

    • x: number

      x origin of the rectangle to draw the check in

    • y: number

      y origin of the rectangle to draw the check in

    • width: number

      the width of the rectangle to draw the check in

    • height: number

      the height of the rectangle to draw the check in

    Returns void

  • Draws a diamond in the given rectangle on window using the given parameters.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      the type of shadow to draw

    • area: Gdk.Rectangle

      clip rectangle, or %NULL if the output should not be clipped

    • widget: Gtk.Widget

      the widget

    • detail: string

      a style detail

    • x: number

      x origin of the rectangle to draw the diamond in

    • y: number

      y origin of the rectangle to draw the diamond in

    • width: number

      width of the rectangle to draw the diamond in

    • height: number

      height of the rectangle to draw the diamond in

    Returns void

  • Draws an expander as used in #GtkTreeView. x and y specify the center the expander. The size of the expander is determined by the "expander-size" style property of widget. (If widget is not specified or doesn't have an "expander-size" property, an unspecified default size will be used, since the caller doesn't have sufficient information to position the expander, this is likely not useful.) The expander is expander_size pixels tall in the collapsed position and expander_size pixels wide in the expanded position.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • area: Gdk.Rectangle

      clip rectangle, or %NULL if the output should not be clipped

    • widget: Gtk.Widget

      the widget

    • detail: string

      a style detail

    • x: number

      the x position to draw the expander at

    • y: number

      the y position to draw the expander at

    • expander_style: Gtk.ExpanderStyle

      the style to draw the expander in; determines whether the expander is collapsed, expanded, or in an intermediate state.

    Returns void

  • Draws an extension, i.e. a notebook tab.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      type of shadow to draw

    • area: Gdk.Rectangle

      clip rectangle, or %NULL if the output should not be clipped

    • widget: Gtk.Widget

      the widget

    • detail: string

      a style detail

    • x: number

      x origin of the extension

    • y: number

      y origin of the extension

    • width: number

      width of the extension

    • height: number

      width of the extension

    • gap_side: Gtk.PositionType

      the side on to which the extension is attached

    Returns void

  • Draws a flat box on window with the given parameters.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      the type of shadow to draw

    • area: Gdk.Rectangle

      clip rectangle, or %NULL if the output should not be clipped

    • widget: Gtk.Widget

      the widget

    • detail: string

      a style detail

    • x: number

      x origin of the box

    • y: number

      y origin of the box

    • width: number

      the width of the box

    • height: number

      the height of the box

    Returns void

  • Draws a focus indicator around the given rectangle on window using the given style.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • area: Gdk.Rectangle

      clip rectangle, or %NULL if the output should not be clipped

    • widget: Gtk.Widget

      the widget

    • detail: string

      a style detail

    • x: number

      the x origin of the rectangle around which to draw a focus indicator

    • y: number

      the y origin of the rectangle around which to draw a focus indicator

    • width: number

      the width of the rectangle around which to draw a focus indicator

    • height: number

      the height of the rectangle around which to draw a focus indicator

    Returns void

  • Draws a handle as used in #GtkHandleBox and #GtkPaned.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      type of shadow to draw

    • area: Gdk.Rectangle

      clip rectangle, or %NULL if the output should not be clipped

    • widget: Gtk.Widget

      the widget

    • detail: string

      a style detail

    • x: number

      x origin of the handle

    • y: number

      y origin of the handle

    • width: number

      with of the handle

    • height: number

      height of the handle

    • orientation: Gtk.Orientation

      the orientation of the handle

    Returns void

  • Draws a horizontal line from (x1, y) to (x2, y) in window using the given style and state.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • area: Gdk.Rectangle

      rectangle to which the output is clipped, or %NULL if the output should not be clipped

    • widget: Gtk.Widget

      the widget

    • detail: string

      a style detail

    • x1: number

      the starting x coordinate

    • x2: number

      the ending x coordinate

    • y: number

      the y coordinate

    Returns void

  • Draws a layout on window using the given parameters.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • use_text: boolean

      whether to use the text or foreground graphics context of style

    • area: Gdk.Rectangle

      clip rectangle, or %NULL if the output should not be clipped

    • widget: Gtk.Widget

      the widget

    • detail: string

      a style detail

    • x: number

      x origin

    • y: number

      y origin

    • layout: Pango.Layout

      the layout to draw

    Returns void

  • Draws a radio button indicator in the given rectangle on window with the given parameters.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      the type of shadow to draw

    • area: Gdk.Rectangle

      clip rectangle, or %NULL if the output should not be clipped

    • widget: Gtk.Widget

      the widget

    • detail: string

      a style detail

    • x: number

      x origin of the rectangle to draw the option in

    • y: number

      y origin of the rectangle to draw the option in

    • width: number

      the width of the rectangle to draw the option in

    • height: number

      the height of the rectangle to draw the option in

    Returns void

  • Draws a polygon on window with the given parameters.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      type of shadow to draw

    • area: Gdk.Rectangle

      clip rectangle, or %NULL if the output should not be clipped

    • widget: Gtk.Widget

      the widget

    • detail: string

      a style detail

    • points: Gdk.Point

      an array of #GdkPoints

    • n_points: number

      length of points

    • fill: boolean

      %TRUE if the polygon should be filled

    Returns void

  • Draws a resize grip in the given rectangle on window using the given parameters.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • area: Gdk.Rectangle

      clip rectangle, or %NULL if the output should not be clipped

    • widget: Gtk.Widget

      the widget

    • detail: string

      a style detail

    • edge: Gdk.WindowEdge

      the edge in which to draw the resize grip

    • x: number

      the x origin of the rectangle in which to draw the resize grip

    • y: number

      the y origin of the rectangle in which to draw the resize grip

    • width: number

      the width of the rectangle in which to draw the resize grip

    • height: number

      the height of the rectangle in which to draw the resize grip

    Returns void

  • Draws a shadow around the given rectangle in window using the given style and state and shadow type.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      type of shadow to draw

    • area: Gdk.Rectangle

      clip rectangle or %NULL if the output should not be clipped

    • widget: Gtk.Widget

      the widget

    • detail: string

      a style detail

    • x: number

      x origin of the rectangle

    • y: number

      y origin of the rectangle

    • width: number

      width of the rectangle

    • height: number

      width of the rectangle

    Returns void

  • Draws a shadow around the given rectangle in window using the given style and state and shadow type, leaving a gap in one side.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      type of shadow to draw

    • area: Gdk.Rectangle

      clip rectangle, or %NULL if the output should not be clipped

    • widget: Gtk.Widget

      the widget

    • detail: string

      a style detail

    • x: number

      x origin of the rectangle

    • y: number

      y origin of the rectangle

    • width: number

      width of the rectangle

    • height: number

      width of the rectangle

    • gap_side: Gtk.PositionType

      side in which to leave the gap

    • gap_x: number

      starting position of the gap

    • gap_width: number

      width of the gap

    Returns void

  • Draws a slider in the given rectangle on window using the given style and orientation.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      a shadow

    • area: Gdk.Rectangle

      clip rectangle, or %NULL if the output should not be clipped

    • widget: Gtk.Widget

      the widget

    • detail: string

      a style detail

    • x: number

      the x origin of the rectangle in which to draw a slider

    • y: number

      the y origin of the rectangle in which to draw a slider

    • width: number

      the width of the rectangle in which to draw a slider

    • height: number

      the height of the rectangle in which to draw a slider

    • orientation: Gtk.Orientation

      the orientation to be used

    Returns void

  • Draws a spinner on window using the given parameters.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • area: Gdk.Rectangle

      clip rectangle, or %NULL if the output should not be clipped

    • widget: Gtk.Widget

      the widget (may be %NULL)

    • detail: string

      a style detail (may be %NULL)

    • step: number

      the nth step, a value between 0 and #GtkSpinner:num-steps

    • x: number

      the x origin of the rectangle in which to draw the spinner

    • y: number

      the y origin of the rectangle in which to draw the spinner

    • width: number

      the width of the rectangle in which to draw the spinner

    • height: number

      the height of the rectangle in which to draw the spinner

    Returns void

  • Draws a text string on window with the given parameters.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • area: Gdk.Rectangle

      clip rectangle, or %NULL if the output should not be clipped

    • widget: Gtk.Widget

      the widget

    • detail: string

      a style detail

    • x: number

      x origin

    • y: number

      y origin

    • string: string

      the string to draw

    Returns void

  • Draws an option menu tab (i.e. the up and down pointing arrows) in the given rectangle on window using the given parameters.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • shadow_type: Gtk.ShadowType

      the type of shadow to draw

    • area: Gdk.Rectangle

      clip rectangle, or %NULL if the output should not be clipped

    • widget: Gtk.Widget

      the widget

    • detail: string

      a style detail

    • x: number

      x origin of the rectangle to draw the tab in

    • y: number

      y origin of the rectangle to draw the tab in

    • width: number

      the width of the rectangle to draw the tab in

    • height: number

      the height of the rectangle to draw the tab in

    Returns void

  • Draws a vertical line from (x, y1) to (x, y2) in window using the given style and state.

    Parameters

    • style: Gtk.Style

      a #GtkStyle

    • window: Gdk.Window

      a #GdkWindow

    • state_type: Gtk.StateType

      a state

    • area: Gdk.Rectangle

      rectangle to which the output is clipped, or %NULL if the output should not be clipped

    • widget: Gtk.Widget

      the widget

    • detail: string

      a style detail

    • y1_: number

      the starting y coordinate

    • y2_: number

      the ending y coordinate

    • x: number

      the x coordinate

    Returns void

  • paper_size_get_default(): string
  • paper_size_get_paper_sizes(include_custom: boolean): Gtk.PaperSize[]
  • Creates a list of known paper sizes.

    Parameters

    • include_custom: boolean

      whether to include custom paper sizes as defined in the page setup dialog

    Returns Gtk.PaperSize[]

  • parse_args(argv: string[]): [boolean, string[]]
  • Parses command line arguments, and initializes global attributes of GTK+, but does not actually open a connection to a display. (See gdk_display_open(), gdk_get_display_arg_name())

    Any arguments used by GTK+ or GDK are removed from the array and argc and argv are updated accordingly.

    There is no need to call this function explicitely if you are using gtk_init(), or gtk_init_check().

    Parameters

    • argv: string[]

      a pointer to the array of command line arguments

    Returns [boolean, string[]]

  • print_error_quark(): Quark
  • Runs a page setup dialog, letting the user modify the values from page_setup. If the user cancels the dialog, the returned #GtkPageSetup is identical to the passed in page_setup, otherwise it contains the modifications done in the dialog.

    Note that this function may use a recursive mainloop to show the page setup dialog. See gtk_print_run_page_setup_dialog_async() if this is a problem.

    Parameters

    Returns Gtk.PageSetup

  • Sends an event to a widget, propagating the event to parent widgets if the event remains unhandled. Events received by GTK+ from GDK normally begin in gtk_main_do_event(). Depending on the type of event, existence of modal dialogs, grabs, etc., the event may be propagated; if so, this function is used. gtk_propagate_event() calls gtk_widget_event() on each widget it decides to send the event to. So gtk_widget_event() is the lowest-level function; it simply emits the "event" and possibly an event-specific signal on a widget. gtk_propagate_event() is a bit higher-level, and gtk_main_do_event() is the highest level.

    All that said, you most likely don't want to use any of these functions; synthesizing events is rarely needed. Consider asking on the mailing list for better ways to achieve your goals. For example, use gdk_window_invalidate_rect() or gtk_widget_queue_draw() instead of making up expose events.

    Parameters

    Returns void

  • quit_add_destroy(main_level: number, object: Gtk.Object): void
  • quit_remove(quit_handler_id: number): void
  • quit_remove_by_data(data: object): void
  • rc_add_class_style(rc_style: Gtk.RcStyle, pattern: string): void
  • rc_add_default_file(filename: string): void
  • Adds a file to the list of files to be parsed at the end of gtk_init().

    Parameters

    • filename: string

      the pathname to the file. If filename is not absolute, it is searched in the current directory.

    Returns void

  • rc_add_widget_class_style(rc_style: Gtk.RcStyle, pattern: string): void
  • rc_add_widget_name_style(rc_style: Gtk.RcStyle, pattern: string): void
  • rc_find_module_in_path(module_file: string): string
  • Searches for a theme engine in the GTK+ search path. This function is not useful for applications and should not be used.

    Parameters

    • module_file: string

      name of a theme engine

    Returns string

  • Looks up a file in pixmap path for the specified #GtkSettings. If the file is not found, it outputs a warning message using g_warning() and returns %NULL.

    Parameters

    • settings: Gtk.Settings

      a #GtkSettings

    • scanner: GLib.Scanner

      Scanner used to get line number information for the warning message, or %NULL

    • pixmap_file: string

      name of the pixmap file to locate.

    Returns string

  • rc_get_default_files(): string[]
  • Retrieves the current list of RC files that will be parsed at the end of gtk_init().

    Returns string[]

  • rc_get_im_module_file(): string
  • Obtains the path to the IM modules file. See the documentation of the GTK_IM_MODULE_FILE environment variable for more details.

    Returns string

  • rc_get_im_module_path(): string
  • Obtains the path in which to look for IM modules. See the documentation of the GTK_PATH environment variable for more details about looking up modules. This function is useful solely for utilities supplied with GTK+ and should not be used by applications under normal circumstances.

    Returns string

  • rc_get_module_dir(): string
  • Returns a directory in which GTK+ looks for theme engines. For full information about the search for theme engines, see the docs for GTK_PATH in .

    Returns string

  • Finds all matching RC styles for a given widget, composites them together, and then creates a #GtkStyle representing the composite appearance. (GTK+ actually keeps a cache of previously created styles, so a new style may not be created.)

    Parameters

    Returns Gtk.Style

  • Creates up a #GtkStyle from styles defined in a RC file by providing the raw components used in matching. This function may be useful when creating pseudo-widgets that should be themed like widgets but don't actually have corresponding GTK+ widgets. An example of this would be items inside a GNOME canvas widget.

    The action of gtk_rc_get_style() is similar to: |[ gtk_widget_path (widget, NULL, &path, NULL); gtk_widget_class_path (widget, NULL, &class_path, NULL); gtk_rc_get_style_by_paths (gtk_widget_get_settings (widget), path, class_path, G_OBJECT_TYPE (widget));


    @param settings a #GtkSettings object
    @param widget_path the widget path to use when looking up the style, or %NULL if no matching against the widget path should be done
    @param class_path the class path to use when looking up the style, or %NULL if no matching against the class path should be done.
    @param type a type that will be used along with parent types of this type when matching against class styles, or #G_TYPE_NONE

    Parameters

    Returns Gtk.Style

  • rc_get_theme_dir(): string
  • rc_parse(filename: string): void
  • Parses a color in the format expected in a RC file.

    Note that theme engines should use gtk_rc_parse_color_full() in order to support symbolic colors.

    Parameters

    Returns [number, Gdk.Color]

  • Parses a color in the format expected in a RC file. If style is not %NULL, it will be consulted to resolve references to symbolic colors.

    Parameters

    Returns [number, Gdk.Color]

  • rc_parse_string(rc_string: string): void
  • A #GtkRcPropertyParser for use with gtk_settings_install_property_parser() or gtk_widget_class_install_style_property_parser() which parses borders in the form "{ left, right, top, bottom }" for integers %left, %right, %top and %bottom.

    Parameters

    • pspec: ParamSpec

      a #GParamSpec

    • gstring: GLib.String

      the #GString to be parsed

    • property_value: any

      a #GValue which must hold boxed values.

    Returns boolean

  • A #GtkRcPropertyParser for use with gtk_settings_install_property_parser() or gtk_widget_class_install_style_property_parser() which parses a color given either by its name or in the form { red, green, blue } where %red, %green and %blue are integers between 0 and 65535 or floating-point numbers between 0 and 1.

    Parameters

    • pspec: ParamSpec

      a #GParamSpec

    • gstring: GLib.String

      the #GString to be parsed

    • property_value: any

      a #GValue which must hold #GdkColor values.

    Returns boolean

  • A #GtkRcPropertyParser for use with gtk_settings_install_property_parser() or gtk_widget_class_install_style_property_parser() which parses a single enumeration value.

    The enumeration value can be specified by its name, its nickname or its numeric value. For consistency with flags parsing, the value may be surrounded by parentheses.

    Parameters

    • pspec: ParamSpec

      a #GParamSpec

    • gstring: GLib.String

      the #GString to be parsed

    • property_value: any

      a #GValue which must hold enum values.

    Returns boolean

  • A #GtkRcPropertyParser for use with gtk_settings_install_property_parser() or gtk_widget_class_install_style_property_parser() which parses flags.

    Flags can be specified by their name, their nickname or numerically. Multiple flags can be specified in the form "( flag1 | flag2 | ... )".

    Parameters

    • pspec: ParamSpec

      a #GParamSpec

    • gstring: GLib.String

      the #GString to be parsed

    • property_value: any

      a #GValue which must hold flags values.

    Returns boolean

  • rc_property_parse_requisition(pspec: ParamSpec, gstring: GLib.String, property_value: any): boolean
  • A #GtkRcPropertyParser for use with gtk_settings_install_property_parser() or gtk_widget_class_install_style_property_parser() which parses a requisition in the form "{ width, height }" for integers %width and %height.

    Parameters

    • pspec: ParamSpec

      a #GParamSpec

    • gstring: GLib.String

      the #GString to be parsed

    • property_value: any

      a #GValue which must hold boxed values.

    Returns boolean

  • rc_reparse_all(): boolean
  • If the modification time on any previously read file for the default #GtkSettings has changed, discard all style information and then reread all previously read RC files.

    Returns boolean

  • rc_reparse_all_for_settings(settings: Gtk.Settings, force_load: boolean): boolean
  • If the modification time on any previously read file for the given #GtkSettings has changed, discard all style information and then reread all previously read RC files.

    Parameters

    • settings: Gtk.Settings

      a #GtkSettings

    • force_load: boolean

      load whether or not anything changed

    Returns boolean

  • This function recomputes the styles for all widgets that use a particular #GtkSettings object. (There is one #GtkSettings object per #GdkScreen, see gtk_settings_get_for_screen()); It is useful when some global parameter has changed that affects the appearance of all widgets, because when a widget gets a new style, it will both redraw and recompute any cached information about its appearance. As an example, it is used when the default font size set by the operating system changes. Note that this function doesn't affect widgets that have a style set explicitely on them with gtk_widget_set_style().

    Parameters

    Returns void

  • rc_set_default_files(filenames: string): void
  • Sets the list of files that GTK+ will read at the end of gtk_init().

    Parameters

    • filenames: string

      A %NULL-terminated list of filenames.

    Returns void

  • recent_chooser_error_quark(): Quark
  • recent_manager_error_quark(): Quark
  • rgb_to_hsv(r: number, g: number, b: number): [number, number, number]
  • Converts a color from RGB space to HSV. Input values must be in the [0.0, 1.0] range; output values will be in the same range.

    Parameters

    • r: number

      Red

    • g: number

      Green

    • b: number

      Blue

    Returns [number, number, number]

  • Appends a specified target to the list of supported targets for a given widget and selection.

    Parameters

    • widget: Gtk.Widget

      a #GtkTarget

    • selection: Gdk.Atom

      the selection

    • target: Gdk.Atom

      target to add.

    • info: number

      A unsigned integer which will be passed back to the application.

    Returns void

  • Requests the contents of a selection. When received, a "selection-received" signal will be generated.

    Parameters

    • widget: Gtk.Widget

      The widget which acts as requestor

    • selection: Gdk.Atom

      Which selection to get

    • target: Gdk.Atom

      Form of information desired (e.g., STRING)

    • time_: number

      Time of request (usually of triggering event) In emergency, you could use #GDK_CURRENT_TIME

    Returns boolean

  • selection_owner_set(widget: Gtk.Widget, selection: Gdk.Atom, time_: number): boolean
  • Claims ownership of a given selection for a particular widget, or, if widget is %NULL, release ownership of the selection.

    Parameters

    • widget: Gtk.Widget

      a #GtkWidget, or %NULL.

    • selection: Gdk.Atom

      an interned atom representing the selection to claim

    • time_: number

      timestamp with which to claim the selection

    Returns boolean

  • Claim ownership of a given selection for a particular widget, or, if widget is %NULL, release ownership of the selection.

    Parameters

    • display: Gdk.Display

      the #Gdkdisplay where the selection is set

    • widget: Gtk.Widget

      new selection owner (a #GdkWidget), or %NULL.

    • selection: Gdk.Atom

      an interned atom representing the selection to claim.

    • time_: number

      timestamp with which to claim the selection

    Returns boolean

  • selection_remove_all(widget: Gtk.Widget): void
  • Removes all handlers and unsets ownership of all selections for a widget. Called when widget is being destroyed. This function will not generally be called by applications.

    Parameters

    Returns void

  • set_locale(): string
  • Initializes internationalization support for GTK+. gtk_init() automatically does this, so there is typically no point in calling this function.

    If you are calling this function because you changed the locale after GTK+ is was initialized, then calling this function may help a bit. (Note, however, that changing the locale after GTK+ is initialized may produce inconsistent results and is not really supported.)

    In detail - sets the current locale according to the program environment. This is the same as calling the C library function setlocale (LC_ALL, "") but also takes care of the locale specific setup of the windowing system used by GDK.

    Returns string

  • show_uri(screen: Gdk.Screen, uri: string, timestamp: number): boolean
  • This is a convenience function for launching the default application to show the uri. The uri must be of a form understood by GIO (i.e. you need to install gvfs to get support for uri schemes such as http:// or ftp://, as only local files are handled by GIO itself). Typical examples are file:///home/gnome/pict.jpg http://www.gnome.org mailto:me@gnome.org Ideally the timestamp is taken from the event triggering the gtk_show_uri() call. If timestamp is not known you can take %GDK_CURRENT_TIME.

    This function can be used as a replacement for gnome_vfs_url_show() and gnome_url_show().

    Parameters

    • screen: Gdk.Screen

      screen to show the uri on or %NULL for the default screen

    • uri: string

      the uri to show

    • timestamp: number

      a timestamp to prevent focus stealing.

    Returns boolean

  • signal_emit_stop_by_name(object: Gtk.Object, name: string): void
  • signal_emitv(object: Gtk.Object, signal_id: number, args: Arg): void
  • signal_emitv_by_name(object: Gtk.Object, name: string, args: Arg): void
  • signal_newv(name: string, signal_flags: SignalRunType, object_type: GType<unknown>, function_offset: number, marshaller: ClosureMarshal, return_val: GType<unknown>, n_args: number, args: GType<unknown>): number
  • Registers each of the stock items in items. If an item already exists with the same stock ID as one of the items, the old item gets replaced. The stock items are copied, so GTK+ does not hold any pointer into items and items can be freed. Use gtk_stock_add_static() if items is persistent and GTK+ need not copy the array.

    Parameters

    Returns void

  • Same as gtk_stock_add(), but doesn't copy items, so items must persist until application exit.

    Parameters

    • items: Gtk.StockItem[]

      a #GtkStockItem or array of #GtkStockItem

    Returns void

  • stock_list_ids(): string[]
  • Retrieves a list of all known stock IDs added to a #GtkIconFactory or registered with gtk_stock_add(). The list must be freed with g_slist_free(), and each string in the list must be freed with g_free().

    Returns string[]

  • Fills item with the registered values for stock_id, returning %TRUE if stock_id was known.

    Parameters

    • stock_id: string

      a stock item name

    Returns [boolean, Gtk.StockItem]

  • Sets a function to be used for translating the label of a stock item.

    If no function is registered for a translation domain, g_dgettext() is used.

    The function is used for all stock items whose translation_domain matches domain. Note that it is possible to use strings different from the actual gettext translation domain of your application for this, as long as your #GtkTranslateFunc uses the correct domain when calling dgettext(). This can be useful, e.g. when dealing with message contexts:

    |[ GtkStockItem items[] = { { MY_ITEM1, NC_("odd items", "Item 1"), 0, 0, "odd-item-domain" }, { MY_ITEM2, NC_("even items", "Item 2"), 0, 0, "even-item-domain" }, };

    gchar * my_translate_func (const gchar *msgid, gpointer data) { gchar *msgctxt = data;

    return (gchar*)g_dpgettext2 (GETTEXT_PACKAGE, msgctxt, msgid); }

    /* ... */

    gtk_stock_add (items, G_N_ELEMENTS (items)); gtk_stock_set_translate_func ("odd-item-domain", my_translate_func, "odd items"); gtk_stock_set_translate_func ("even-item-domain", my_translate_func, "even items");


    @param domain the translation domain for which `func` shall be used
    @param func a #GtkTranslateFunc

    Parameters

    Returns void

  • This function creates an #GtkTargetEntry array that contains the same targets as the passed %list. The returned table is newly allocated and should be freed using gtk_target_table_free() when no longer needed.

    Parameters

    Returns Gtk.TargetEntry[]

  • targets_include_image(targets: Gdk.Atom[], writable: boolean): boolean
  • Determines if any of the targets in targets can be used to provide a #GdkPixbuf.

    Parameters

    • targets: Gdk.Atom[]

      an array of #GdkAtoms

    • writable: boolean

      whether to accept only targets for which GTK+ knows how to convert a pixbuf into the format

    Returns boolean

  • targets_include_text(targets: Gdk.Atom[]): boolean
  • Determines if any of the targets in targets can be used to provide text.

    Parameters

    • targets: Gdk.Atom[]

      an array of #GdkAtoms

    Returns boolean

  • targets_include_uri(targets: Gdk.Atom[]): boolean
  • Determines if any of the targets in targets can be used to provide an uri list.

    Parameters

    • targets: Gdk.Atom[]

      an array of #GdkAtoms

    Returns boolean

  • test_create_simple_window(window_title: string, dialog_text: string): Gtk.Widget
  • Create a simple window with window title window_title and text contents dialog_text. The window will quit any running gtk_main()-loop when destroyed, and it will automatically be destroyed upon test function teardown.

    Parameters

    • window_title: string

      Title of the window to be displayed.

    • dialog_text: string

      Text inside the window to be displayed.

    Returns Gtk.Widget

  • This function will search widget and all its descendants for a GtkLabel widget with a text string matching label_pattern. The label_pattern may contain asterisks '*' and question marks '?' as placeholders, g_pattern_match() is used for the matching. Note that locales other than "C" tend to alter (translate" label strings, so this function is genrally only useful in test programs with predetermined locales, see gtk_test_init() for more details.

    Parameters

    • widget: Gtk.Widget

      Valid label or container widget.

    • label_pattern: string

      Shell-glob pattern to match a label string.

    Returns Gtk.Widget

  • This function will search siblings of base_widget and siblings of its ancestors for all widgets matching widget_type. Of the matching widgets, the one that is geometrically closest to base_widget will be returned. The general purpose of this function is to find the most likely "action" widget, relative to another labeling widget. Such as finding a button or text entry widget, given it's corresponding label widget.

    Parameters

    • base_widget: Gtk.Widget

      Valid widget, part of a widget hierarchy

    • widget_type: GType<unknown>

      Type of a aearched for sibling widget

    Returns Gtk.Widget

  • This function will search the descendants of widget for a widget of type widget_type that has a label matching label_pattern next to it. This is most useful for automated GUI testing, e.g. to find the "OK" button in a dialog and synthesize clicks on it. However see gtk_test_find_label(), gtk_test_find_sibling() and gtk_test_widget_click() for possible caveats involving the search of such widgets and synthesizing widget events.

    Parameters

    • widget: Gtk.Widget

      Container widget, usually a GtkWindow.

    • label_pattern: string

      Shell-glob pattern to match a label string.

    • widget_type: GType<unknown>

      Type of a aearched for label sibling widget.

    Returns Gtk.Widget

  • test_list_all_types(): GType[]
  • test_register_all_types(): void
  • Force registration of all core Gtk+ and Gdk object types. This allowes to refer to any of those object types via g_type_from_name() after calling this function.

    Returns void

  • test_slider_get_value(widget: Gtk.Widget): number
  • Retrive the literal adjustment value for GtkRange based widgets and spin buttons. Note that the value returned by this function is anything between the lower and upper bounds of the adjustment belonging to widget, and is not a percentage as passed in to gtk_test_slider_set_perc().

    Parameters

    Returns number

  • test_slider_set_perc(widget: Gtk.Widget, percentage: number): void
  • This function will adjust the slider position of all GtkRange based widgets, such as scrollbars or scales, it'll also adjust spin buttons. The adjustment value of these widgets is set to a value between the lower and upper limits, according to the percentage argument.

    Parameters

    • widget: Gtk.Widget

      valid widget pointer.

    • percentage: number

      value between 0 and 100.

    Returns void

  • test_spin_button_click(spinner: Gtk.SpinButton, button: number, upwards: boolean): boolean
  • This function will generate a button click in the upwards or downwards spin button arrow areas, usually leading to an increase or decrease of spin button's value.

    Parameters

    • spinner: Gtk.SpinButton

      valid GtkSpinButton widget.

    • button: number

      Number of the pointer button for the event, usually 1, 2 or 3.

    • upwards: boolean

      %TRUE for upwards arrow click, %FALSE for downwards arrow click.

    Returns boolean

  • Retrive the text string of widget if it is a GtkLabel, GtkEditable (entry and text widgets) or GtkTextView.

    Parameters

    Returns string

  • test_text_set(widget: Gtk.Widget, string: string): void
  • Set the text string of widget to string if it is a GtkLabel, GtkEditable (entry and text widgets) or GtkTextView.

    Parameters

    • widget: Gtk.Widget

      valid widget pointer.

    • string: string

      a 0-terminated C string

    Returns void

  • This function will generate a button click (button press and button release event) in the middle of the first GdkWindow found that belongs to widget. For %GTK_NO_WINDOW widgets like GtkButton, this will often be an input-only event window. For other widgets, this is usually widget->window. Certain caveats should be considered when using this function, in particular because the mouse pointer is warped to the button click location, see gdk_test_simulate_button() for details.

    Parameters

    • widget: Gtk.Widget

      Widget to generate a button click on.

    • button: number

      Number of the pointer button for the event, usually 1, 2 or 3.

    • modifiers: Gdk.ModifierType

      Keyboard modifiers the event is setup with.

    Returns boolean

  • This function will generate keyboard press and release events in the middle of the first GdkWindow found that belongs to widget. For %GTK_NO_WINDOW widgets like GtkButton, this will often be an input-only event window. For other widgets, this is usually widget->window. Certain caveats should be considered when using this function, in particular because the mouse pointer is warped to the key press location, see gdk_test_simulate_key() for details.

    Parameters

    • widget: Gtk.Widget

      Widget to generate a key press and release on.

    • keyval: number

      A Gdk keyboard value.

    • modifiers: Gdk.ModifierType

      Keyboard modifiers the event is setup with.

    Returns boolean

  • timeout_remove(timeout_handler_id: number): void
  • Obtains a tree_model and path from selection data of target type %GTK_TREE_MODEL_ROW. Normally called from a drag_data_received handler. This function can only be used if selection_data originates from the same process that's calling this function, because a pointer to the tree model is being passed around. If you aren't in the same process, then you'll get memory corruption. In the #GtkTreeDragDest drag_data_received handler, you can assume that selection data of type %GTK_TREE_MODEL_ROW is in from the current process. The returned path must be freed with gtk_tree_path_free().

    Parameters

    Returns [boolean, Gtk.TreeModel, Gtk.TreePath]

  • Lets a set of row reference created by gtk_tree_row_reference_new_proxy() know that the model emitted the "row_deleted" signal.

    Parameters

    Returns void

  • Lets a set of row reference created by gtk_tree_row_reference_new_proxy() know that the model emitted the "row_inserted" signal.

    Parameters

    Returns void

  • Lets a set of row reference created by gtk_tree_row_reference_new_proxy() know that the model emitted the "rows_reordered" signal.

    Parameters

    • proxy: GObject.Object

      A #GObject

    • path: Gtk.TreePath

      The parent path of the reordered signal

    • iter: Gtk.TreeIter

      The iter pointing to the parent of the reordered

    • new_order: number

      The new order of rows

    Returns void

  • true_TODO(): boolean
  • type_class(type: Gtk.Type): object | null
  • Returns a pointer pointing to the class of type or %NULL if there was any trouble identifying type. Initializes the class if necessary.

    Parameters

    Returns object | null

  • type_new(type: Gtk.Type): object | null

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method