Terminal

class Terminal : Widget , Scrollable {}

Constructors

this
this()

Creates a new terminal widget.

Members

Functions

checkHyperlinkAt
string checkHyperlinkAt(double x, double y)

Returns a nonempty string: the target of the explicit hyperlink (printed using the OSC 8 escape sequence) at the position (x, y), or null.

checkMatchAt
string checkMatchAt(double x, double y, int tag)

Checks if the text in and around the position (x, y) matches any of the regular expressions previously set using vte_terminal_match_add(). If a match exists, the text string is returned and if tag is not null, the number associated with the matched regular expression will be stored in tag.

checkRegexSimpleAt
string[] checkRegexSimpleAt(double x, double y, vte.regex.Regex[] regexes, uint matchFlags)

Like vte.terminal.Terminal.checkRegexSimpleAt, but returns an array of strings, containing the matching text (or null if no match) corresponding to each of the regexes in regexes.

connectBell
ulong connectBell(T callback, Flag!"After" after)

Connect to Bell signal.

connectCharSizeChanged
ulong connectCharSizeChanged(T callback, Flag!"After" after)

Connect to CharSizeChanged signal.

connectChildExited
ulong connectChildExited(T callback, Flag!"After" after)

Connect to ChildExited signal.

connectCommit
ulong connectCommit(T callback, Flag!"After" after)

Connect to Commit signal.

connectContentsChanged
ulong connectContentsChanged(T callback, Flag!"After" after)

Connect to ContentsChanged signal.

connectCopyClipboard
ulong connectCopyClipboard(T callback, Flag!"After" after)

Connect to CopyClipboard signal.

connectCurrentDirectoryUriChanged
ulong connectCurrentDirectoryUriChanged(T callback, Flag!"After" after)

Connect to CurrentDirectoryUriChanged signal.

connectCurrentFileUriChanged
ulong connectCurrentFileUriChanged(T callback, Flag!"After" after)

Connect to CurrentFileUriChanged signal.

connectCursorMoved
ulong connectCursorMoved(T callback, Flag!"After" after)

Connect to CursorMoved signal.

connectDecreaseFontSize
ulong connectDecreaseFontSize(T callback, Flag!"After" after)

Connect to DecreaseFontSize signal.

connectDeiconifyWindow
ulong connectDeiconifyWindow(T callback, Flag!"After" after)

Connect to DeiconifyWindow signal.

connectEncodingChanged
ulong connectEncodingChanged(T callback, Flag!"After" after)

Connect to EncodingChanged signal.

connectEof
ulong connectEof(T callback, Flag!"After" after)

Connect to Eof signal.

connectHyperlinkHoverUriChanged
ulong connectHyperlinkHoverUriChanged(T callback, Flag!"After" after)

Connect to HyperlinkHoverUriChanged signal.

connectIconTitleChanged
ulong connectIconTitleChanged(T callback, Flag!"After" after)

Connect to IconTitleChanged signal.

connectIconifyWindow
ulong connectIconifyWindow(T callback, Flag!"After" after)

Connect to IconifyWindow signal.

connectIncreaseFontSize
ulong connectIncreaseFontSize(T callback, Flag!"After" after)

Connect to IncreaseFontSize signal.

connectLowerWindow
ulong connectLowerWindow(T callback, Flag!"After" after)

Connect to LowerWindow signal.

connectMaximizeWindow
ulong connectMaximizeWindow(T callback, Flag!"After" after)

Connect to MaximizeWindow signal.

connectMoveWindow
ulong connectMoveWindow(T callback, Flag!"After" after)

Connect to MoveWindow signal.

connectPasteClipboard
ulong connectPasteClipboard(T callback, Flag!"After" after)

Connect to PasteClipboard signal.

connectRaiseWindow
ulong connectRaiseWindow(T callback, Flag!"After" after)

Connect to RaiseWindow signal.

connectRefreshWindow
ulong connectRefreshWindow(T callback, Flag!"After" after)

Connect to RefreshWindow signal.

connectResizeWindow
ulong connectResizeWindow(T callback, Flag!"After" after)

Connect to ResizeWindow signal.

connectRestoreWindow
ulong connectRestoreWindow(T callback, Flag!"After" after)

Connect to RestoreWindow signal.

connectSelectionChanged
ulong connectSelectionChanged(T callback, Flag!"After" after)

Connect to SelectionChanged signal.

connectSetupContextMenu
ulong connectSetupContextMenu(T callback, Flag!"After" after)

Connect to SetupContextMenu signal.

connectWindowTitleChanged
ulong connectWindowTitleChanged(T callback, Flag!"After" after)

Connect to WindowTitleChanged signal.

copyClipboard
void copyClipboard()

Places the selected text in the terminal in the #GDK_SELECTION_CLIPBOARD selection.

copyClipboardFormat
void copyClipboardFormat(vte.types.Format format)

Places the selected text in the terminal in the #GDK_SELECTION_CLIPBOARD selection in the form specified by format.

copyPrimary
void copyPrimary()

Places the selected text in the terminal in the #GDK_SELECTION_PRIMARY selection.

feed
void feed(ubyte[] data)

Interprets data as if it were data received from a child process.

feedChild
void feedChild(ubyte[] text)

Sends a block of UTF-8 text to the child as if it were entered by the user at the keyboard.

feedChildBinary
void feedChildBinary(ubyte[] data)

Sends a block of binary data to the child.

getAllowBold
bool getAllowBold()

Checks whether or not the terminal will attempt to draw bold text, by using a bold font variant.

getAllowHyperlink
bool getAllowHyperlink()

Checks whether or not hyperlinks (OSC 8 escape sequence) are allowed.

getAudibleBell
bool getAudibleBell()

Checks whether or not the terminal will beep when the child outputs the "bl" sequence.

getBoldIsBright
bool getBoldIsBright()

Checks whether the SGR 1 attribute also switches to the bright counterpart of the first 8 palette colors, in addition to making them bold (legacy behavior) or if SGR 1 only enables bold and leaves the color intact.

getCellHeightScale
double getCellHeightScale()
getCellWidthScale
double getCellWidthScale()
getCharHeight
glong getCharHeight()
getCharWidth
glong getCharWidth()
getCjkAmbiguousWidth
int getCjkAmbiguousWidth()

Returns whether ambiguous-width characters are narrow or wide. (Note that when using a non-UTF-8 encoding set via vte.terminal.Terminal.setEncoding, the width of ambiguous-width characters is fixed and determined by the encoding itself.)

getColorBackgroundForDraw
void getColorBackgroundForDraw(gdk.rgba.RGBA color)

Returns the background colour, as used by terminal when drawing the background, which may be different from the color set by vte.terminal.Terminal.setColorBackground.

getColumnCount
glong getColumnCount()
getContextMenu
gtk.widget.Widget getContextMenu()
getContextMenuModel
gio.menu_model.MenuModel getContextMenuModel()
getCurrentDirectoryUri
string getCurrentDirectoryUri()
getCurrentFileUri
string getCurrentFileUri()
getCursorBlinkMode
vte.types.CursorBlinkMode getCursorBlinkMode()

Returns the currently set cursor blink mode.

getCursorPosition
void getCursorPosition(glong column, glong row)

Reads the location of the insertion cursor and returns it. The row coordinate is absolute.

getCursorShape
vte.types.CursorShape getCursorShape()

Returns the currently set cursor shape.

getEnableBidi
bool getEnableBidi()

Checks whether the terminal performs bidirectional text rendering.

getEnableFallbackScrolling
bool getEnableFallbackScrolling()
getEnableShaping
bool getEnableShaping()

Checks whether the terminal shapes Arabic text.

getEnableSixel
bool getEnableSixel()
getEncoding
string getEncoding()

Determines the name of the encoding in which the terminal expects data to be encoded, or null if UTF-8 is in use.

getFont
pango.font_description.FontDescription getFont()

Queries the terminal for information about the fonts which will be used to draw text in the terminal. The actual font takes the font scale into account, this is not reflected in the return value, the unscaled font is returned.

getFontOptions
cairo.font_options.FontOptions getFontOptions()
getFontScale
double getFontScale()
getHasSelection
bool getHasSelection()

Checks if the terminal currently contains selected text. Note that this is different from determining if the terminal is the owner of any #GtkClipboard items.

getIconTitle
string getIconTitle()
getInputEnabled
bool getInputEnabled()

Returns whether the terminal allow user input.

getMouseAutohide
bool getMouseAutohide()

Determines the value of the terminal's mouse autohide setting. When autohiding is enabled, the mouse cursor will be hidden when the user presses a key and shown when the user moves the mouse. This setting can be changed using vte.terminal.Terminal.setMouseAutohide.

getPty
vte.pty.Pty getPty()

Returns the #VtePty of terminal.

getRewrapOnResize
bool getRewrapOnResize()

Checks whether or not the terminal will rewrap its contents upon resize.

getRowCount
glong getRowCount()
getScrollOnInsert
bool getScrollOnInsert()
getScrollOnKeystroke
bool getScrollOnKeystroke()
getScrollOnOutput
bool getScrollOnOutput()
getScrollUnitIsPixels
bool getScrollUnitIsPixels()
getScrollbackLines
glong getScrollbackLines()
getTextBlinkMode
vte.types.TextBlinkMode getTextBlinkMode()

Checks whether or not the terminal will allow blinking text.

getTextFormat
string getTextFormat(vte.types.Format format)

Returns text from the visible part of the terminal in the specified format.

getTextRangeFormat
string getTextRangeFormat(vte.types.Format format, glong startRow, glong startCol, glong endRow, glong endCol, size_t length)

Returns the specified range of text in the specified format.

getTextSelected
string getTextSelected(vte.types.Format format)

Gets the currently selected text in the format specified by format. Since 0.72, this function also supports vte.types.Format.Html format.

getTextSelectedFull
string getTextSelectedFull(vte.types.Format format, size_t length)

Gets the currently selected text in the format specified by format.

getWindowTitle
string getWindowTitle()
getWordCharExceptions
string getWordCharExceptions()

Returns the set of characters which will be considered parts of a word when doing word-wise selection, in addition to the default which only considers alphanumeric characters part of a word.

getXalign
vte.types.Align getXalign()
getXfill
bool getXfill()
getYalign
vte.types.Align getYalign()
getYfill
bool getYfill()
matchAddRegex
int matchAddRegex(vte.regex.Regex regex, uint flags)

Adds the regular expression regex to the list of matching expressions. When the user moves the mouse cursor over a section of displayed text which matches this expression, the text will be highlighted.

matchCheck
string matchCheck(glong column, glong row, int tag)

Checks if the text in and around the specified position matches any of the regular expressions previously set using vte_terminal_match_add(). If a match exists, the text string is returned and if tag is not null, the number associated with the matched regular expression will be stored in tag.

matchRemove
void matchRemove(int tag)

Removes the regular expression which is associated with the given tag from the list of expressions which the terminal will highlight when the user moves the mouse cursor over matching text.

matchRemoveAll
void matchRemoveAll()

Clears the list of regular expressions the terminal uses to highlight text when the user moves the mouse cursor.

matchSetCursor
void matchSetCursor(int tag, gdk.cursor.Cursor cursor)

Sets which cursor the terminal will use if the pointer is over the pattern specified by tag. The terminal keeps a reference to cursor.

matchSetCursorName
void matchSetCursorName(int tag, string cursorName)

Sets which cursor the terminal will use if the pointer is over the pattern specified by tag.

pasteClipboard
void pasteClipboard()

Sends the contents of the #GDK_SELECTION_CLIPBOARD selection to the terminal's child. It's called on paste menu item, or when user presses Shift+Insert.

pastePrimary
void pastePrimary()

Sends the contents of the #GDK_SELECTION_PRIMARY selection to the terminal's child. The terminal will call also paste the #GDK_SELECTION_PRIMARY selection when the user clicks with the the second mouse button.

pasteText
void pasteText(string text)

Sends text to the terminal's child as if retrived from the clipboard, this differs from vte.terminal.Terminal.feedChild in that it may process text before passing it to the child (e.g. apply bracketed mode)

ptyNewSync
vte.pty.Pty ptyNewSync(vte.types.PtyFlags flags, gio.cancellable.Cancellable cancellable)

Creates a new #VtePty, sets the emulation property from #VteTerminal:emulation, and sets the size using terminal's size.

reset
void reset(bool clearTabstops, bool clearHistory)

Resets as much of the terminal's internal state as possible, discarding any unprocessed input data, resetting character attributes, cursor state, national character set state, status line, terminal modes (insert/delete), selection state, and encoding.

searchFindNext
bool searchFindNext()

Searches the next string matching the search regex set with vte.terminal.Terminal.searchSetRegex.

searchFindPrevious
bool searchFindPrevious()

Searches the previous string matching the search regex set with vte.terminal.Terminal.searchSetRegex.

searchGetRegex
vte.regex.Regex searchGetRegex()
searchGetWrapAround
bool searchGetWrapAround()
searchSetRegex
void searchSetRegex(vte.regex.Regex regex, uint flags)

Sets the regex to search for. Unsets the search regex when passed null.

searchSetWrapAround
void searchSetWrapAround(bool wrapAround)

Sets whether search should wrap around to the beginning of the terminal content when reaching its end.

selectAll
void selectAll()

Selects all text within the terminal (not including the scrollback buffer).

setAllowBold
void setAllowBold(bool allowBold)

Controls whether or not the terminal will attempt to draw bold text, by using a bold font variant.

setAllowHyperlink
void setAllowHyperlink(bool allowHyperlink)

Controls whether or not hyperlinks (OSC 8 escape sequence) are allowed.

setAudibleBell
void setAudibleBell(bool isAudible)

Controls whether or not the terminal will beep when the child outputs the "bl" sequence.

setBackspaceBinding
void setBackspaceBinding(vte.types.EraseBinding binding)

Modifies the terminal's backspace key binding, which controls what string or control sequence the terminal sends to its child when the user presses the backspace key.

setBoldIsBright
void setBoldIsBright(bool boldIsBright)

Sets whether the SGR 1 attribute also switches to the bright counterpart of the first 8 palette colors, in addition to making them bold (legacy behavior) or if SGR 1 only enables bold and leaves the color intact.

setCellHeightScale
void setCellHeightScale(double scale)

Sets the terminal's cell height scale to scale.

setCellWidthScale
void setCellWidthScale(double scale)

Sets the terminal's cell width scale to scale.

setCjkAmbiguousWidth
void setCjkAmbiguousWidth(int width)

This setting controls whether ambiguous-width characters are narrow or wide. (Note that when using a non-UTF-8 encoding set via vte.terminal.Terminal.setEncoding, the width of ambiguous-width characters is fixed and determined by the encoding itself.)

setClearBackground
void setClearBackground(bool setting)

Sets whether to paint the background with the background colour. The default is true.

setColorBackground
void setColorBackground(gdk.rgba.RGBA background)

Sets the background color for text which does not have a specific background color assigned. Only has effect when no background image is set and when the terminal is not transparent.

setColorBold
void setColorBold(gdk.rgba.RGBA bold)

Sets the color used to draw bold text in the default foreground color. If bold is null then the default color is used.

setColorCursor
void setColorCursor(gdk.rgba.RGBA cursorBackground)

Sets the background color for text which is under the cursor. If null, text under the cursor will be drawn with foreground and background colors reversed.

setColorCursorForeground
void setColorCursorForeground(gdk.rgba.RGBA cursorForeground)

Sets the foreground color for text which is under the cursor. If null, text under the cursor will be drawn with foreground and background colors reversed.

setColorForeground
void setColorForeground(gdk.rgba.RGBA foreground)

Sets the foreground color used to draw normal text.

setColorHighlight
void setColorHighlight(gdk.rgba.RGBA highlightBackground)

Sets the background color for text which is highlighted. If null, it is unset. If neither highlight background nor highlight foreground are set, highlighted text (which is usually highlighted because it is selected) will be drawn with foreground and background colors reversed.

setColorHighlightForeground
void setColorHighlightForeground(gdk.rgba.RGBA highlightForeground)

Sets the foreground color for text which is highlighted. If null, it is unset. If neither highlight background nor highlight foreground are set, highlighted text (which is usually highlighted because it is selected) will be drawn with foreground and background colors reversed.

setColors
void setColors(gdk.rgba.RGBA foreground, gdk.rgba.RGBA background, gdk.rgba.RGBA[] palette)

palette specifies the new values for the 256 palette colors: 8 standard colors, their 8 bright counterparts, 6x6x6 color cube, and 24 grayscale colors. Omitted entries will default to a hardcoded value.

setContextMenu
void setContextMenu(gtk.widget.Widget menu)

Sets menu as the context menu in terminal. Use null to unset the current menu.

setContextMenuModel
void setContextMenuModel(gio.menu_model.MenuModel model)

Sets model as the context menu model in terminal. Use null to unset the current menu model.

setCursorBlinkMode
void setCursorBlinkMode(vte.types.CursorBlinkMode mode)

Sets whether or not the cursor will blink. Using vte.types.CursorBlinkMode.System will use the #GtkSettings::gtk-cursor-blink setting.

setCursorShape
void setCursorShape(vte.types.CursorShape shape)

Sets the shape of the cursor drawn.

setDefaultColors
void setDefaultColors()

Reset the terminal palette to reasonable compiled-in default color.

setDeleteBinding
void setDeleteBinding(vte.types.EraseBinding binding)

Modifies the terminal's delete key binding, which controls what string or control sequence the terminal sends to its child when the user presses the delete key.

setEnableBidi
void setEnableBidi(bool enableBidi)

Controls whether or not the terminal will perform bidirectional text rendering.

setEnableFallbackScrolling
void setEnableFallbackScrolling(bool enable)

Controls whether the terminal uses scroll events to scroll the history if the event was not otherwise consumed by it.

setEnableShaping
void setEnableShaping(bool enableShaping)

Controls whether or not the terminal will shape Arabic text.

setEnableSixel
void setEnableSixel(bool enabled)

Set whether to enable SIXEL images.

setEncoding
bool setEncoding(string codeset)

Changes the encoding the terminal will expect data from the child to be encoded with. For certain terminal types, applications executing in the terminal can change the encoding. If codeset is null, it uses "UTF-8".

setFont
void setFont(pango.font_description.FontDescription fontDesc)

Sets the font used for rendering all text displayed by the terminal, overriding any fonts set using gtk.widget.Widget.modifyFont. The terminal will immediately attempt to load the desired font, retrieve its metrics, and attempt to resize itself to keep the same number of rows and columns. The font scale is applied to the specified font.

setFontOptions
void setFontOptions(cairo.font_options.FontOptions fontOptions)

Sets the terminal's font options to options.

setFontScale
void setFontScale(double scale)

Sets the terminal's font scale to scale.

setInputEnabled
void setInputEnabled(bool enabled)

Enables or disables user input. When user input is disabled, the terminal's child will not receive any key press, or mouse button press or motion events sent to it.

setMouseAutohide
void setMouseAutohide(bool setting)

Changes the value of the terminal's mouse autohide setting. When autohiding is enabled, the mouse cursor will be hidden when the user presses a key and shown when the user moves the mouse. This setting can be read using vte.terminal.Terminal.getMouseAutohide.

setPty
void setPty(vte.pty.Pty pty)

Sets pty as the PTY to use in terminal. Use null to unset the PTY.

setRewrapOnResize
void setRewrapOnResize(bool rewrap)

Controls whether or not the terminal will rewrap its contents, including the scrollback history, whenever the terminal's width changes.

setScrollOnInsert
void setScrollOnInsert(bool scroll)

Controls whether or not the terminal will forcibly scroll to the bottom of the viewable history when text is inserted, e.g. by a paste.

setScrollOnKeystroke
void setScrollOnKeystroke(bool scroll)

Controls whether or not the terminal will forcibly scroll to the bottom of the viewable history when the user presses a key. Modifier keys do not trigger this behavior.

setScrollOnOutput
void setScrollOnOutput(bool scroll)

Controls whether or not the terminal will forcibly scroll to the bottom of the viewable history when the new data is received from the child.

setScrollUnitIsPixels
void setScrollUnitIsPixels(bool enable)

Controls whether the terminal's scroll unit is lines or pixels.

setScrollbackLines
void setScrollbackLines(glong lines)

Sets the length of the scrollback buffer used by the terminal. The size of the scrollback buffer will be set to the larger of this value and the number of visible rows the widget can display, so 0 can safely be used to disable scrollback.

setSize
void setSize(glong columns, glong rows)

Attempts to change the terminal's size in terms of rows and columns. If the attempt succeeds, the widget will resize itself to the proper size.

setTextBlinkMode
void setTextBlinkMode(vte.types.TextBlinkMode textBlinkMode)

Controls whether or not the terminal will allow blinking text.

setWordCharExceptions
void setWordCharExceptions(string exceptions)

With this function you can provide a set of characters which will be considered parts of a word when doing word-wise selection, in addition to the default which only considers alphanumeric characters part of a word.

setXalign
void setXalign(vte.types.Align align_)

Sets the horizontal alignment of terminal within its allocation.

setXfill
void setXfill(bool fill)

Sets the horizontal fillment of terminal within its allocation.

setYalign
void setYalign(vte.types.Align align_)

Sets the vertical alignment of terminal within its allocation.

setYfill
void setYfill(bool fill)

Sets the vertical fillment of terminal within its allocation. Note that yfill is only supported with yalign set to vte.types.Align.Start, and is ignored for all other yalign values.

spawnAsync
void spawnAsync(vte.types.PtyFlags ptyFlags, string workingDirectory, string[] argv, string[] envv, glib.types.SpawnFlags spawnFlags, glib.types.SpawnChildSetupFunc childSetup, int timeout, gio.cancellable.Cancellable cancellable, vte.types.TerminalSpawnAsyncCallback callback)

A convenience function that wraps creating the #VtePty and spawning the child process on it. Like vte.terminal.Terminal.spawnWithFdsAsync, except that this function does not allow passing file descriptors to the child process. See vte.terminal.Terminal.spawnWithFdsAsync for more information.

spawnSync
bool spawnSync(vte.types.PtyFlags ptyFlags, string workingDirectory, string[] argv, string[] envv, glib.types.SpawnFlags spawnFlags, glib.types.SpawnChildSetupFunc childSetup, glib.types.Pid childPid, gio.cancellable.Cancellable cancellable)

Starts the specified command under a newly-allocated controlling pseudo-terminal. The argv and envv lists should be null-terminated. The "TERM" environment variable is automatically set to a default value, but can be overridden from envv. pty_flags controls logging the session to the specified system log files.

spawnWithFdsAsync
void spawnWithFdsAsync(vte.types.PtyFlags ptyFlags, string workingDirectory, string[] argv, string[] envv, int[] fds, int[] mapFds, glib.types.SpawnFlags spawnFlags, glib.types.SpawnChildSetupFunc childSetup, int timeout, gio.cancellable.Cancellable cancellable, vte.types.TerminalSpawnAsyncCallback callback)

A convenience function that wraps creating the #VtePty and spawning the child process on it. See vte.pty.Pty.newSync, vte.pty.Pty.spawnWithFdsAsync, and vte.pty.Pty.spawnFinish for more information.

unselectAll
void unselectAll()

Clears the current selection.

watchChild
void watchChild(glib.types.Pid childPid)

Watches child_pid. When the process exists, the #VteTerminal::child-exited signal will be called with the child's exit status.

writeContentsSync
bool writeContentsSync(gio.output_stream.OutputStream stream, vte.types.WriteFlags flags, gio.cancellable.Cancellable cancellable)

Write contents of the current contents of terminal (including any scrollback history) to stream according to flags.

Mixed In Members

From mixin ScrollableT!()

getBorder
bool getBorder(gtk.border.Border border)

Returns the size of a non-scrolling border around the outside of the scrollable.

getHadjustment
gtk.adjustment.Adjustment getHadjustment()

Retrieves the gtk.adjustment.Adjustment used for horizontal scrolling.

getHscrollPolicy
gtk.types.ScrollablePolicy getHscrollPolicy()

Gets the horizontal gtk.types.ScrollablePolicy.

getVadjustment
gtk.adjustment.Adjustment getVadjustment()

Retrieves the gtk.adjustment.Adjustment used for vertical scrolling.

getVscrollPolicy
gtk.types.ScrollablePolicy getVscrollPolicy()

Gets the vertical gtk.types.ScrollablePolicy.

setHadjustment
void setHadjustment(gtk.adjustment.Adjustment hadjustment)

Sets the horizontal adjustment of the gtk.scrollable.Scrollable.

setHscrollPolicy
void setHscrollPolicy(gtk.types.ScrollablePolicy policy)

Sets the gtk.types.ScrollablePolicy.

setVadjustment
void setVadjustment(gtk.adjustment.Adjustment vadjustment)

Sets the vertical adjustment of the gtk.scrollable.Scrollable.

setVscrollPolicy
void setVscrollPolicy(gtk.types.ScrollablePolicy policy)

Sets the gtk.types.ScrollablePolicy.

Inherited Members

From Widget

getDefaultDirection
gtk.types.TextDirection getDefaultDirection()

Obtains the current default reading direction.

setDefaultDirection
void setDefaultDirection(gtk.types.TextDirection dir)

Sets the default reading direction for widgets.

actionSetEnabled
void actionSetEnabled(string actionName, bool enabled)

Enable or disable an action installed with gtk.widget_class.WidgetClass.installAction.

activate
bool activate()

For widgets that can be “activated” (buttons, menu items, etc.), this function activates them.

activateAction
bool activateAction(string name, glib.variant.VariantG args)

Looks up the action in the action groups associated with widget and its ancestors, and activates it.

activateDefault
void activateDefault()

Activates the default.activate action from widget.

addController
void addController(gtk.event_controller.EventController controller)

Adds controller to widget so that it will receive events.

addCssClass
void addCssClass(string cssClass)

Adds a style class to widget.

addMnemonicLabel
void addMnemonicLabel(gtk.widget.Widget label)

Adds a widget to the list of mnemonic labels for this widget.

addTickCallback
uint addTickCallback(gtk.types.TickCallback callback)

Queues an animation frame update and adds a callback to be called before each frame.

allocate
void allocate(int width, int height, int baseline, gsk.transform.Transform transform)

This function is only used by gtk.widget.Widget subclasses, to assign a size, position and (optionally) baseline to their child widgets.

childFocus
bool childFocus(gtk.types.DirectionType direction)

Called by widgets as the user moves around the window using keyboard shortcuts.

computeBounds
bool computeBounds(gtk.widget.Widget target, graphene.rect.Rect outBounds)

Computes the bounds for widget in the coordinate space of target.

computeExpand
bool computeExpand(gtk.types.Orientation orientation)

Computes whether a container should give this widget extra space when possible.

computePoint
bool computePoint(gtk.widget.Widget target, graphene.point.Point point, graphene.point.Point outPoint)

Translates the given point in widget's coordinates to coordinates relative to target’s coordinate system.

computeTransform
bool computeTransform(gtk.widget.Widget target, graphene.matrix.Matrix outTransform)

Computes a matrix suitable to describe a transformation from widget's coordinate system into target's coordinate system.

contains
bool contains(double x, double y)

Tests if the point at (x, y) is contained in widget.

createPangoContext
pango.context.Context createPangoContext()

Creates a new pango.context.Context with the appropriate font map, font options, font description, and base direction for drawing text for this widget.

createPangoLayout
pango.layout.Layout createPangoLayout(string text)

Creates a new pango.layout.Layout with the appropriate font map, font description, and base direction for drawing text for this widget.

disposeTemplate
void disposeTemplate(gobject.types.GType widgetType)

Clears the template children for the given widget.

dragCheckThreshold
bool dragCheckThreshold(int startX, int startY, int currentX, int currentY)

Checks to see if a drag movement has passed the GTK drag threshold.

errorBell
void errorBell()

Notifies the user about an input-related error on this widget.

getAllocatedBaseline
int getAllocatedBaseline()

Returns the baseline that has currently been allocated to widget.

getAllocatedHeight
int getAllocatedHeight()

Returns the height that has currently been allocated to widget.

getAllocatedWidth
int getAllocatedWidth()

Returns the width that has currently been allocated to widget.

getAncestor
gtk.widget.Widget getAncestor(gobject.types.GType widgetType)

Gets the first ancestor of widget with type widget_type.

getBaseline
int getBaseline()

Returns the baseline that has currently been allocated to widget.

getCanFocus
bool getCanFocus()

Determines whether the input focus can enter widget or any of its children.

getCanTarget
bool getCanTarget()

Queries whether widget can be the target of pointer events.

getChildVisible
bool getChildVisible()

Gets the value set with gtk.widget.Widget.setChildVisible.

getClipboard
gdk.clipboard.Clipboard getClipboard()

Gets the clipboard object for widget.

getColor
void getColor(gdk.rgba.RGBA color)

Gets the current foreground color for the widget’s CSS style.

getCssClasses
string[] getCssClasses()

Returns the list of style classes applied to widget.

getCssName
string getCssName()

Returns the CSS name that is used for self.

getCursor
gdk.cursor.Cursor getCursor()

Queries the cursor set on widget.

getDirection
gtk.types.TextDirection getDirection()

Gets the reading direction for a particular widget.

getDisplay
gdk.display.Display getDisplay()

Get the gdk.display.Display for the toplevel window associated with this widget.

getFirstChild
gtk.widget.Widget getFirstChild()

Returns the widget’s first child.

getFocusChild
gtk.widget.Widget getFocusChild()

Returns the current focus child of widget.

getFocusOnClick
bool getFocusOnClick()

Returns whether the widget should grab focus when it is clicked with the mouse.

getFocusable
bool getFocusable()

Determines whether widget can own the input focus.

getFontMap
pango.font_map.FontMap getFontMap()

Gets the font map of widget.

getFontOptions
cairo.font_options.FontOptions getFontOptions()

Returns the cairo.font_options.FontOptions of widget.

getFrameClock
gdk.frame_clock.FrameClock getFrameClock()

Obtains the frame clock for a widget.

getHalign
gtk.types.Align getHalign()

Gets the horizontal alignment of widget.

getHasTooltip
bool getHasTooltip()

Returns the current value of the has-tooltip property.

getHeight
int getHeight()

Returns the content height of the widget.

getHexpand
bool getHexpand()

Gets whether the widget would like any available extra horizontal space.

getHexpandSet
bool getHexpandSet()

Gets whether gtk.widget.Widget.setHexpand has been used to explicitly set the expand flag on this widget.

getLastChild
gtk.widget.Widget getLastChild()

Returns the widget’s last child.

getLayoutManager
gtk.layout_manager.LayoutManager getLayoutManager()

Retrieves the layout manager used by widget.

getMapped
bool getMapped()

Whether the widget is mapped.

getMarginBottom
int getMarginBottom()

Gets the bottom margin of widget.

getMarginEnd
int getMarginEnd()

Gets the end margin of widget.

getMarginStart
int getMarginStart()

Gets the start margin of widget.

getMarginTop
int getMarginTop()

Gets the top margin of widget.

getName
string getName()

Retrieves the name of a widget.

getNative
gtk.native.Native getNative()

Returns the nearest gtk.native.Native ancestor of widget.

getNextSibling
gtk.widget.Widget getNextSibling()

Returns the widget’s next sibling.

getOpacity
double getOpacity()

#Fetches the requested opacity for this widget.

getOverflow
gtk.types.Overflow getOverflow()

Returns the widget’s overflow value.

getPangoContext
pango.context.Context getPangoContext()

Gets a pango.context.Context with the appropriate font map, font description, and base direction for this widget.

getParent
gtk.widget.Widget getParent()

Returns the parent widget of widget.

getPreferredSize
void getPreferredSize(gtk.requisition.Requisition minimumSize, gtk.requisition.Requisition naturalSize)

Retrieves the minimum and natural size of a widget, taking into account the widget’s preference for height-for-width management.

getPrevSibling
gtk.widget.Widget getPrevSibling()

Returns the widget’s previous sibling.

getPrimaryClipboard
gdk.clipboard.Clipboard getPrimaryClipboard()

Gets the primary clipboard of widget.

getRealized
bool getRealized()

Determines whether widget is realized.

getReceivesDefault
bool getReceivesDefault()

Determines whether widget is always treated as the default widget within its toplevel when it has the focus, even if another widget is the default.

getRequestMode
gtk.types.SizeRequestMode getRequestMode()

Gets whether the widget prefers a height-for-width layout or a width-for-height layout.

getRoot
gtk.root.Root getRoot()

Returns the gtk.root.Root widget of widget.

getScaleFactor
int getScaleFactor()

Retrieves the internal scale factor that maps from window coordinates to the actual device pixels.

getSensitive
bool getSensitive()

Returns the widget’s sensitivity.

getSettings
gtk.settings.Settings getSettings()

Gets the settings object holding the settings used for this widget.

getSize
int getSize(gtk.types.Orientation orientation)

Returns the content width or height of the widget.

getSizeRequest
void getSizeRequest(int width, int height)

Gets the size request that was explicitly set for the widget using gtk.widget.Widget.setSizeRequest.

getStateFlags
gtk.types.StateFlags getStateFlags()

Returns the widget state as a flag set.

getStyleContext
gtk.style_context.StyleContext getStyleContext()

Returns the style context associated to widget.

getTemplateChild
gobject.object.ObjectG getTemplateChild(gobject.types.GType widgetType, string name)

Fetch an object build from the template XML for widget_type in this widget instance.

getTooltipMarkup
string getTooltipMarkup()

Gets the contents of the tooltip for widget.

getTooltipText
string getTooltipText()

Gets the contents of the tooltip for widget.

getValign
gtk.types.Align getValign()

Gets the vertical alignment of widget.

getVexpand
bool getVexpand()

Gets whether the widget would like any available extra vertical space.

getVexpandSet
bool getVexpandSet()

Gets whether gtk.widget.Widget.setVexpand has been used to explicitly set the expand flag on this widget.

getVisible
bool getVisible()

Determines whether the widget is visible.

getWidth
int getWidth()

Returns the content width of the widget.

grabFocus
bool grabFocus()

Causes widget to have the keyboard focus for the gtk.window.Window it's inside.

hasCssClass
bool hasCssClass(string cssClass)

Returns whether css_class is currently applied to widget.

hasDefault
bool hasDefault()

Determines whether widget is the current default widget within its toplevel.

hasFocus
bool hasFocus()

Determines if the widget has the global input focus.

hasVisibleFocus
bool hasVisibleFocus()

Determines if the widget should show a visible indication that it has the global input focus.

hide
void hide()

Reverses the effects of gtk.widget.Widget.show.

inDestruction
bool inDestruction()

Returns whether the widget is currently being destroyed.

initTemplate
void initTemplate()

Creates and initializes child widgets defined in templates.

insertActionGroup
void insertActionGroup(string name, gio.action_group.ActionGroup group)

Inserts group into widget.

insertAfter
void insertAfter(gtk.widget.Widget parent, gtk.widget.Widget previousSibling)

Inserts widget into the child widget list of parent.

insertBefore
void insertBefore(gtk.widget.Widget parent, gtk.widget.Widget nextSibling)

Inserts widget into the child widget list of parent.

isAncestor
bool isAncestor(gtk.widget.Widget ancestor)

Determines whether widget is somewhere inside ancestor, possibly with intermediate containers.

isDrawable
bool isDrawable()

Determines whether widget can be drawn to.

isFocus
bool isFocus()

Determines if the widget is the focus widget within its toplevel.

isSensitive
bool isSensitive()

Returns the widget’s effective sensitivity.

isVisible
bool isVisible()

Determines whether the widget and all its parents are marked as visible.

keynavFailed
bool keynavFailed(gtk.types.DirectionType direction)

Emits the ::keynav-failed signal on the widget.

listMnemonicLabels
gtk.widget.Widget[] listMnemonicLabels()

Returns the widgets for which this widget is the target of a mnemonic.

map
void map()

Causes a widget to be mapped if it isn’t already.

measure
void measure(gtk.types.Orientation orientation, int forSize, int minimum, int natural, int minimumBaseline, int naturalBaseline)

Measures widget in the orientation orientation and for the given for_size.

mnemonicActivate
bool mnemonicActivate(bool groupCycling)

Emits the ::mnemonic-activate signal.

observeChildren
gio.list_model.ListModel observeChildren()

Returns a gio.list_model.ListModel to track the children of widget.

observeControllers
gio.list_model.ListModel observeControllers()

Returns a gio.list_model.ListModel to track the gtk.event_controller.EventControllers of widget.

pick
gtk.widget.Widget pick(double x, double y, gtk.types.PickFlags flags)

Finds the descendant of widget closest to the point (x, y).

queueAllocate
void queueAllocate()

Flags the widget for a rerun of the vfuncGtk.Widget.size_allocate function.

queueDraw
void queueDraw()

Schedules this widget to be redrawn in the paint phase of the current or the next frame.

queueResize
void queueResize()

Flags a widget to have its size renegotiated.

realize
void realize()

Creates the GDK resources associated with a widget.

removeController
void removeController(gtk.event_controller.EventController controller)

Removes controller from widget, so that it doesn't process events anymore.

removeCssClass
void removeCssClass(string cssClass)

Removes a style from widget.

removeMnemonicLabel
void removeMnemonicLabel(gtk.widget.Widget label)

Removes a widget from the list of mnemonic labels for this widget.

removeTickCallback
void removeTickCallback(uint id)

Removes a tick callback previously registered with gtk.widget.Widget.addTickCallback.

setCanFocus
void setCanFocus(bool canFocus)

Specifies whether the input focus can enter the widget or any of its children.

setCanTarget
void setCanTarget(bool canTarget)

Sets whether widget can be the target of pointer events.

setChildVisible
void setChildVisible(bool childVisible)

Sets whether widget should be mapped along with its parent.

setCssClasses
void setCssClasses(string[] classes)

Clear all style classes applied to widget and replace them with classes.

setCursor
void setCursor(gdk.cursor.Cursor cursor)

Sets the cursor to be shown when pointer devices point towards widget.

setCursorFromName
void setCursorFromName(string name)

Sets a named cursor to be shown when pointer devices point towards widget.

setDirection
void setDirection(gtk.types.TextDirection dir)

Sets the reading direction on a particular widget.

setFocusChild
void setFocusChild(gtk.widget.Widget child)

Set child as the current focus child of widget.

setFocusOnClick
void setFocusOnClick(bool focusOnClick)

Sets whether the widget should grab focus when it is clicked with the mouse.

setFocusable
void setFocusable(bool focusable)

Specifies whether widget can own the input focus.

setFontMap
void setFontMap(pango.font_map.FontMap fontMap)

Sets the font map to use for Pango rendering.

setFontOptions
void setFontOptions(cairo.font_options.FontOptions options)

Sets the cairo.font_options.FontOptions used for Pango rendering in this widget.

setHalign
void setHalign(gtk.types.Align align_)

Sets the horizontal alignment of widget.

setHasTooltip
void setHasTooltip(bool hasTooltip)

Sets the has-tooltip property on widget to has_tooltip.

setHexpand
void setHexpand(bool expand)

Sets whether the widget would like any available extra horizontal space.

setHexpandSet
void setHexpandSet(bool set)

Sets whether the hexpand flag will be used.

setLayoutManager
void setLayoutManager(gtk.layout_manager.LayoutManager layoutManager)

Sets the layout manager delegate instance that provides an implementation for measuring and allocating the children of widget.

setMarginBottom
void setMarginBottom(int margin)

Sets the bottom margin of widget.

setMarginEnd
void setMarginEnd(int margin)

Sets the end margin of widget.

setMarginStart
void setMarginStart(int margin)

Sets the start margin of widget.

setMarginTop
void setMarginTop(int margin)

Sets the top margin of widget.

setName
void setName(string name)

Sets a widgets name.

setOpacity
void setOpacity(double opacity)

Request the widget to be rendered partially transparent.

setOverflow
void setOverflow(gtk.types.Overflow overflow)

Sets how widget treats content that is drawn outside the widget's content area.

setParent
void setParent(gtk.widget.Widget parent)

Sets parent as the parent widget of widget.

setReceivesDefault
void setReceivesDefault(bool receivesDefault)

Specifies whether widget will be treated as the default widget within its toplevel when it has the focus, even if another widget is the default.

setSensitive
void setSensitive(bool sensitive)

Sets the sensitivity of a widget.

setSizeRequest
void setSizeRequest(int width, int height)

Sets the minimum size of a widget.

setStateFlags
void setStateFlags(gtk.types.StateFlags flags, bool clear)

Turns on flag values in the current widget state.

setTooltipMarkup
void setTooltipMarkup(string markup)

Sets markup as the contents of the tooltip, which is marked up with Pango markup.

setTooltipText
void setTooltipText(string text)

Sets text as the contents of the tooltip.

setValign
void setValign(gtk.types.Align align_)

Sets the vertical alignment of widget.

setVexpand
void setVexpand(bool expand)

Sets whether the widget would like any available extra vertical space.

setVexpandSet
void setVexpandSet(bool set)

Sets whether the vexpand flag will be used.

setVisible
void setVisible(bool visible)

Sets the visibility state of widget.

shouldLayout
bool shouldLayout()

Returns whether widget should contribute to the measuring and allocation of its parent.

show
void show()

Flags a widget to be displayed.

snapshotChild
void snapshotChild(gtk.widget.Widget child, gtk.snapshot.Snapshot snapshot)

Snapshot the a child of widget.

translateCoordinates
bool translateCoordinates(gtk.widget.Widget destWidget, double srcX, double srcY, double destX, double destY)

Translate coordinates relative to src_widget’s allocation to coordinates relative to dest_widget’s allocations.

triggerTooltipQuery
void triggerTooltipQuery()

Triggers a tooltip query on the display where the toplevel of widget is located.

unmap
void unmap()

Causes a widget to be unmapped if it’s currently mapped.

unparent
void unparent()

Dissociate widget from its parent.

unrealize
void unrealize()

Causes a widget to be unrealized (frees all GDK resources associated with the widget).

unsetStateFlags
void unsetStateFlags(gtk.types.StateFlags flags)

Turns off flag values for the current widget state.

connectDestroy
ulong connectDestroy(T callback, Flag!"After" after)

Connect to Destroy signal.

connectDirectionChanged
ulong connectDirectionChanged(T callback, Flag!"After" after)

Connect to DirectionChanged signal.

connectHide
ulong connectHide(T callback, Flag!"After" after)

Connect to Hide signal.

connectKeynavFailed
ulong connectKeynavFailed(T callback, Flag!"After" after)

Connect to KeynavFailed signal.

connectMap
ulong connectMap(T callback, Flag!"After" after)

Connect to Map signal.

connectMnemonicActivate
ulong connectMnemonicActivate(T callback, Flag!"After" after)

Connect to MnemonicActivate signal.

connectMoveFocus
ulong connectMoveFocus(T callback, Flag!"After" after)

Connect to MoveFocus signal.

connectQueryTooltip
ulong connectQueryTooltip(T callback, Flag!"After" after)

Connect to QueryTooltip signal.

connectRealize
ulong connectRealize(T callback, Flag!"After" after)

Connect to Realize signal.

connectShow
ulong connectShow(T callback, Flag!"After" after)

Connect to Show signal.

connectStateFlagsChanged
ulong connectStateFlagsChanged(T callback, Flag!"After" after)

Connect to StateFlagsChanged signal.

connectUnmap
ulong connectUnmap(T callback, Flag!"After" after)

Connect to Unmap signal.

connectUnrealize
ulong connectUnrealize(T callback, Flag!"After" after)

Connect to Unrealize signal.

From Scrollable

getBorder
bool getBorder(gtk.border.Border border)

Returns the size of a non-scrolling border around the outside of the scrollable.

getHadjustment
gtk.adjustment.Adjustment getHadjustment()

Retrieves the gtk.adjustment.Adjustment used for horizontal scrolling.

getHscrollPolicy
gtk.types.ScrollablePolicy getHscrollPolicy()

Gets the horizontal gtk.types.ScrollablePolicy.

getVadjustment
gtk.adjustment.Adjustment getVadjustment()

Retrieves the gtk.adjustment.Adjustment used for vertical scrolling.

getVscrollPolicy
gtk.types.ScrollablePolicy getVscrollPolicy()

Gets the vertical gtk.types.ScrollablePolicy.

setHadjustment
void setHadjustment(gtk.adjustment.Adjustment hadjustment)

Sets the horizontal adjustment of the gtk.scrollable.Scrollable.

setHscrollPolicy
void setHscrollPolicy(gtk.types.ScrollablePolicy policy)

Sets the gtk.types.ScrollablePolicy.

setVadjustment
void setVadjustment(gtk.adjustment.Adjustment vadjustment)

Sets the vertical adjustment of the gtk.scrollable.Scrollable.

setVscrollPolicy
void setVscrollPolicy(gtk.types.ScrollablePolicy policy)

Sets the gtk.types.ScrollablePolicy.