Gtk2HsContentsIndex
Graphics.UI.Gtk.Vte.Vte
Portabilityportable (depends on GHC)
Stabilityprovisional
Maintainergtk2hs-users@lists.sourceforge.net
Contents
Types
Enums
Constructors
Methods
Attributes
Signals
Description
A terminal widget
Synopsis
data Terminal
type VteSelect = Int -> Int -> Bool
data VteChar = VteChar {
vcRow :: Int
vcCol :: Int
vcChar :: Char
vcFore :: Color
vcBack :: Color
vcUnderline :: Bool
vcStrikethrough :: Bool
}
data TerminalEraseBinding
= EraseAuto
| EraseAsciiBackspace
| EraseAsciiDelete
| EraseDeleteSequence
| EraseTty
data TerminalCursorBlinkMode
= CursorBlinkSystem
| CursorBlinkOn
| CursorBlinkOff
data TerminalCursorShape
= CursorShapeBlock
| CursorShapeIbeam
| CursorShapeUnderline
data RegexCompileFlags
= GRegexCaseless
| GRegexMultiline
| GRegexDotall
| GRegexExtended
| GRegexAnchored
| GRegexDollarEndonly
| GRegexUngreedy
| GRegexRaw
| GRegexNoAutoCapture
| GRegexOptimize
| GRegexDupnames
| GRegexNewlineCr
| GRegexNewlineLf
| GRegexNewlineCrlf
data RegexMatchFlags
= GRegexMatchAnchored
| GRegexMatchNotbol
| GRegexMatchNoteol
| GRegexMatchNotempty
| GRegexMatchPartial
| GRegexMatchNewlineCr
| GRegexMatchNewlineLf
| GRegexMatchNewlineCrlf
| GRegexMatchNewlineAny
terminalNew :: IO Terminal
terminalImAppendMenuitems :: TerminalClass self => self -> MenuShell -> IO ()
terminalForkCommand :: TerminalClass self => self -> Maybe String -> Maybe [String] -> Maybe [String] -> Maybe String -> Bool -> Bool -> Bool -> IO Int
terminalForkpty :: TerminalClass self => self -> Maybe [String] -> Maybe String -> Bool -> Bool -> Bool -> IO Int
terminalSetPty :: TerminalClass self => self -> Int -> IO ()
terminalGetPty :: TerminalClass self => self -> IO Int
terminalFeed :: TerminalClass self => self -> String -> IO ()
terminalFeedChild :: TerminalClass self => self -> String -> IO ()
terminalFeedChildBinary :: TerminalClass self => self -> [Word8] -> IO ()
terminalGetChildExitStatus :: TerminalClass self => self -> IO Int
terminalSelectAll :: TerminalClass self => self -> IO ()
terminalSelectNone :: TerminalClass self => self -> IO ()
terminalCopyClipboard :: TerminalClass self => self -> IO ()
terminalPasteClipboard :: TerminalClass self => self -> IO ()
terminalCopyPrimary :: TerminalClass self => self -> IO ()
terminalPastePrimary :: TerminalClass self => self -> IO ()
terminalSetSize :: TerminalClass self => self -> Int -> Int -> IO ()
terminalSetAudibleBell :: TerminalClass self => self -> Bool -> IO ()
terminalGetAudibleBell :: TerminalClass self => self -> IO Bool
terminalSetVisibleBell :: TerminalClass self => self -> Bool -> IO ()
terminalGetVisibleBell :: TerminalClass self => self -> IO Bool
terminalSetAllowBold :: TerminalClass self => self -> Bool -> IO ()
terminalGetAllowBold :: TerminalClass self => self -> IO Bool
terminalSetScrollOnOutput :: TerminalClass self => self -> Bool -> IO ()
terminalSetScrollOnKeystroke :: TerminalClass self => self -> Bool -> IO ()
terminalSetColorBold :: TerminalClass self => self -> Color -> IO ()
terminalSetColorForeground :: TerminalClass self => self -> Color -> IO ()
terminalSetColorBackground :: TerminalClass self => self -> Color -> IO ()
terminalSetColorDim :: TerminalClass self => self -> Color -> IO ()
terminalSetColorCursor :: TerminalClass self => self -> Color -> IO ()
terminalSetColorHighlight :: TerminalClass self => self -> Color -> IO ()
terminalSetColors :: TerminalClass self => self -> Color -> Color -> Color -> Int -> IO ()
terminalSetDefaultColors :: TerminalClass self => self -> IO ()
terminalSetOpacity :: TerminalClass self => self -> Int -> IO ()
terminalSetBackgroundImage :: TerminalClass self => self -> Maybe Pixbuf -> IO ()
terminalSetBackgroundImageFile :: TerminalClass self => self -> String -> IO ()
terminalSetBackgroundSaturation :: TerminalClass self => self -> Double -> IO ()
terminalSetBackgroundTransparent :: TerminalClass self => self -> Bool -> IO ()
terminalSetBackgroundTintColor :: TerminalClass self => self -> Color -> IO ()
terminalSetScrollBackground :: TerminalClass self => self -> Bool -> IO ()
terminalSetCursorShape :: TerminalClass self => self -> TerminalCursorShape -> IO ()
terminalGetCursorShape :: TerminalClass self => self -> IO TerminalCursorShape
terminalSetCursorBlinkMode :: TerminalClass self => self -> TerminalCursorBlinkMode -> IO ()
terminalGetCursorBlinkMode :: TerminalClass self => self -> IO TerminalCursorBlinkMode
terminalSetScrollbackLines :: TerminalClass self => self -> Int -> IO ()
terminalSetFont :: TerminalClass self => self -> FontDescription -> IO ()
terminalSetFontFromString :: TerminalClass self => self -> String -> IO ()
terminalGetFont :: TerminalClass self => self -> IO FontDescription
terminalGetHasSelection :: TerminalClass self => self -> IO Bool
terminalSetWordChars :: TerminalClass self => self -> String -> IO ()
terminalIsWordChar :: TerminalClass self => self -> Char -> IO Bool
terminalSetBackspaceBinding :: TerminalClass self => self -> TerminalEraseBinding -> IO ()
terminalSetDeleteBinding :: TerminalClass self => self -> TerminalEraseBinding -> IO ()
terminalSetMouseAutohide :: TerminalClass self => self -> Bool -> IO ()
terminalGetMouseAutohide :: TerminalClass self => self -> IO Bool
terminalReset :: TerminalClass self => self -> Bool -> Bool -> IO ()
terminalGetText :: TerminalClass self => self -> Maybe VteSelect -> IO [VteChar]
terminalGetTextIncludeTrailingSpaces :: TerminalClass self => self -> Maybe VteSelect -> IO [VteChar]
terminalGetTextRange :: TerminalClass self => self -> Int -> Int -> Int -> Int -> Maybe VteSelect -> IO [VteChar]
terminalGetCursorPosition :: TerminalClass self => self -> IO (Int, Int)
terminalMatchClearAll :: TerminalClass self => self -> IO ()
terminalMatchAddRegex :: TerminalClass self => self -> String -> [RegexCompileFlags] -> [RegexMatchFlags] -> IO Int
terminalMatchRemove :: TerminalClass self => self -> Int -> IO ()
terminalMatchCheck :: TerminalClass self => self -> Int -> Int -> IO (Maybe (String, Int))
terminalMatchSetCursor :: TerminalClass self => self -> Int -> Cursor -> IO ()
terminalMatchSetCursorType :: TerminalClass self => self -> Int -> CursorType -> IO ()
terminalMatchSetCursorName :: TerminalClass self => self -> Int -> String -> IO ()
terminalSetEmulation :: TerminalClass self => self -> String -> IO ()
terminalGetEmulation :: TerminalClass self => self -> IO String
terminalGetDefaultEmulation :: TerminalClass self => self -> IO String
terminalSetEncoding :: TerminalClass self => self -> String -> IO ()
terminalGetEncoding :: TerminalClass self => self -> IO String
terminalGetStatusLine :: TerminalClass self => self -> IO String
terminalGetPadding :: TerminalClass self => self -> IO (Int, Int)
terminalGetAdjustment :: TerminalClass self => self -> IO Adjustment
terminalGetCharHeight :: TerminalClass self => self -> IO Int
terminalGetCharWidth :: TerminalClass self => self -> IO Int
terminalGetColumnCount :: TerminalClass self => self -> IO Int
terminalGetRowCount :: TerminalClass self => self -> IO Int
terminalGetIconTitle :: TerminalClass self => self -> IO String
terminalGetWindowTitle :: TerminalClass self => self -> IO String
terminalAllowBold :: TerminalClass self => Attr self Bool
terminalAudibleBell :: TerminalClass self => Attr self Bool
terminalBackgroundImageFile :: TerminalClass self => Attr self String
terminalBackgroundImagePixbuf :: TerminalClass self => Attr self (Maybe Pixbuf)
terminalBackgroundOpacity :: TerminalClass self => Attr self Double
terminalBackgroundSaturation :: TerminalClass self => Attr self Double
terminalBackgroundTintColor :: TerminalClass self => Attr self Color
terminalBackgroundTransparent :: TerminalClass self => Attr self Bool
terminalBackspaceBinding :: TerminalClass self => Attr self TerminalEraseBinding
terminalCursorBlinkMode :: TerminalClass self => Attr self TerminalCursorBlinkMode
terminalCursorShape :: TerminalClass self => Attr self TerminalCursorShape
terminalDeleteBinding :: TerminalClass self => Attr self TerminalEraseBinding
terminalEmulation :: TerminalClass self => Attr self String
terminalEncoding :: TerminalClass self => Attr self String
terminalFontDesc :: TerminalClass self => Attr self FontDescription
terminalIconTitle :: TerminalClass self => ReadAttr self String
terminalPointerAutohide :: TerminalClass self => Attr self Bool
terminalPty :: TerminalClass self => Attr self Int
terminalScrollBackground :: TerminalClass self => Attr self Bool
terminalScrollOnKeystroke :: TerminalClass self => Attr self Bool
terminalScrollOnOutput :: TerminalClass self => Attr self Bool
terminalScrollbackLines :: TerminalClass self => Attr self Int
terminalVisibleBell :: TerminalClass self => Attr self Bool
terminalWindowTitle :: TerminalClass self => ReadAttr self String
terminalWordChars :: TerminalClass self => Attr self String
beep :: TerminalClass self => Signal self (IO ())
charSizeChanged :: TerminalClass self => Signal self (Int -> Int -> IO ())
childExited :: TerminalClass self => Signal self (IO ())
commit :: TerminalClass self => Signal self (String -> Int -> IO ())
contentsChanged :: TerminalClass self => Signal self (IO ())
copyClipboard :: TerminalClass self => Signal self (IO ())
cursorMoved :: TerminalClass self => Signal self (IO ())
decreaseFontSize :: TerminalClass self => Signal self (IO ())
deiconifyWindow :: TerminalClass self => Signal self (IO ())
emulationChanged :: TerminalClass self => Signal self (IO ())
encodingChanged :: TerminalClass self => Signal self (IO ())
eof :: TerminalClass self => Signal self (IO ())
iconTitleChanged :: TerminalClass self => Signal self (IO ())
iconifyWindow :: TerminalClass self => Signal self (IO ())
increaseFontSize :: TerminalClass self => Signal self (IO ())
lowerWindow :: TerminalClass self => Signal self (IO ())
maximizeWindow :: TerminalClass self => Signal self (IO ())
moveWindow :: TerminalClass self => Signal self (Word -> Word -> IO ())
pasteClipboard :: TerminalClass self => Signal self (IO ())
raiseWindow :: TerminalClass self => Signal self (IO ())
refreshWindow :: TerminalClass self => Signal self (IO ())
resizeWidnow :: TerminalClass self => Signal self (Int -> Int -> IO ())
restoreWindow :: TerminalClass self => Signal self (IO ())
selectionChanged :: TerminalClass self => Signal self (IO ())
setScrollAdjustments :: TerminalClass self => Signal self (Adjustment -> Adjustment -> IO ())
statusLineChanged :: TerminalClass self => Signal self (IO ())
textDeleted :: TerminalClass self => Signal self (IO ())
textInserted :: TerminalClass self => Signal self (IO ())
textModified :: TerminalClass self => Signal self (IO ())
textScrolled :: TerminalClass self => Signal self (Int -> IO ())
windowTitleChanged :: TerminalClass self => Signal self (IO ())
Types
data Terminal
show/hide Instances
type VteSelect = Int -> Int -> Bool
A predicate that states which characters are of interest. The predicate p c r where p :: VteSelect, should return True if the character at column c and row r should be extracted.
data VteChar
A structure describing the individual characters in the visible part of a terminal window.
Constructors
VteChar
vcRow :: Int
vcCol :: Int
vcChar :: Char
vcFore :: Color
vcBack :: Color
vcUnderline :: Bool
vcStrikethrough :: Bool
Enums
data TerminalEraseBinding
Values for what should happen when the user presses backspace/delete. Use EraseAuto unless the user can cause them to be overridden.
Constructors
EraseAuto
EraseAsciiBackspace
EraseAsciiDelete
EraseDeleteSequence
EraseTty
show/hide Instances
data TerminalCursorBlinkMode
Values for the cursor blink setting.
Constructors
CursorBlinkSystem
CursorBlinkOn
CursorBlinkOff
show/hide Instances
data TerminalCursorShape
Values for the cursor shape setting.
Constructors
CursorShapeBlock
CursorShapeIbeam
CursorShapeUnderline
show/hide Instances
data RegexCompileFlags
Flags determining how the regular expression is to be interpreted. See http://library.gnome.org/devel/glib/stable/glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags for an explanation of these flags.
Constructors
GRegexCaseless
GRegexMultiline
GRegexDotall
GRegexExtended
GRegexAnchored
GRegexDollarEndonly
GRegexUngreedy
GRegexRaw
GRegexNoAutoCapture
GRegexOptimize
GRegexDupnames
GRegexNewlineCr
GRegexNewlineLf
GRegexNewlineCrlf
show/hide Instances
data RegexMatchFlags
Flags determining how the string is matched against the regular expression. See http://library.gnome.org/devel/glib/stable/glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags for an explanation of these flags.
Constructors
GRegexMatchAnchored
GRegexMatchNotbol
GRegexMatchNoteol
GRegexMatchNotempty
GRegexMatchPartial
GRegexMatchNewlineCr
GRegexMatchNewlineLf
GRegexMatchNewlineCrlf
GRegexMatchNewlineAny
show/hide Instances
Constructors
terminalNew :: IO Terminal
Create a new terminal widget.
Methods
terminalImAppendMenuitems
:: TerminalClass self
=> selfmenushell - a menu shell of MenuShell
-> MenuShell
-> IO ()
Appends menu items for various input methods to the given menu. The user can select one of these items to modify the input method used by the terminal.
terminalForkCommand
:: TerminalClass self
=> selfcommand - the name of a binary to run, or Nothing to get user's shell
-> Maybe Stringargv - the argument list to be passed to command, or Nothing
-> Maybe [String]envv - a list of environment variables to be added to the environment before starting command, or Nothing
-> Maybe [String]directory - the name of a directory the command should start in, or Nothing
-> Maybe Stringlastlog - True if the session should be logged to the lastlog
-> Boolutmp - True if the session should be logged to the utmp/utmpx log
-> Boolwtmp - True if the session should be logged to the wtmp/wtmpx log
-> Boolreturn the ID of the new process
-> IO Int
Starts the specified command under a newly-allocated controlling pseudo-terminal.
terminalForkpty
:: TerminalClass self
=> selfenvv - a list of environment variables to be added to the environment before starting returning in the child process, or Nothing
-> Maybe [String]directory - the name of a directory the child process should change to, or Nothing
-> Maybe Stringlastlog - True if the session should be logged to the lastlog
-> Boolutmp - True if the session should be logged to the utmp/utmpx log
-> Boolwtmp - True if the session should be logged to the wtmp/wtmpx log
-> Boolreturn the ID of the new process in the parent, 0 in the child, and -1 if there was an error
-> IO Int

Starts a new child process under a newly-allocated controlling pseudo-terminal.

  • Available since Vte version 0.11.11
terminalSetPty
:: TerminalClass self
=> selfptyMaster - a file descriptor of the master end of a PTY
-> Int
-> IO ()

Attach an existing PTY master side to the terminal widget. Use instead of terminalForkCommand or terminalForkpty.

  • Available since Vte version 0.12.1
terminalGetPty
:: TerminalClass self
=> selfreturn the file descriptor, or -1 if the terminal has no PTY.
-> IO Int

Returns the file descriptor of the master end of terminal's PTY.

  • Available since Vte version 0.19.1
terminalFeed
:: TerminalClass self
=> selfstring - a string in the terminal's current encoding
-> String
-> IO ()
Interprets data as if it were data received from a child process. This can either be used to drive the terminal without a child process, or just to mess with your users.
terminalFeedChild
:: TerminalClass self
=> selfstring - data to send to the child
-> String
-> IO ()
Sends a block of UTF-8 text to the child as if it were entered by the user at the keyboard.
terminalFeedChildBinary
:: TerminalClass self
=> selfdata - data to send to the child
-> [Word8]
-> IO ()

Sends a block of binary data to the child.

  • Available since Vte version 0.12.1
terminalGetChildExitStatus
:: TerminalClass self
=> selfreturn the child's exit status
-> IO Int

Gets the exit status of the command started by terminalForkCommand.

  • Available since Vte version 0.19.1
terminalSelectAll :: TerminalClass self => self -> IO ()

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

  • Available since Vte version 0.16
terminalSelectNone :: TerminalClass self => self -> IO ()

Clears the current selection.

  • Available since Vte version 0.16
terminalCopyClipboard :: TerminalClass self => self -> IO ()
Places the selected text in the terminal in the selectionClipboard selection.
terminalPasteClipboard :: TerminalClass self => self -> IO ()
Sends the contents of the selectionClipboard selection to the terminal's child. If necessary, the data is converted from UTF-8 to the terminal's current encoding. It's called on paste menu item, or when user presses Shift+Insert.
terminalCopyPrimary :: TerminalClass self => self -> IO ()
Places the selected text in the terminal in the selectionPrimary selection.
terminalPastePrimary :: TerminalClass self => self -> IO ()
Sends the contents of the selectionPrimary selection to the terminal's child. If necessary, the data is converted from UTF-8 to the terminal's current encoding. The terminal will call also paste the SelectionPrimary selection when the user clicks with the the second mouse button.
terminalSetSize
:: TerminalClass self
=> selfcolumns - the desired number of columns
-> Introws - the desired number of rows
-> Int
-> IO ()
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.
terminalSetAudibleBell
:: TerminalClass self
=> selfisAudible - True if the terminal should beep
-> Bool
-> IO ()
Controls whether or not the terminal will beep when the child outputs the "bl" sequence.
terminalGetAudibleBell
:: TerminalClass self
=> selfreturn True if audible bell is enabled, False if not
-> IO Bool
Checks whether or not the terminal will beep when the child outputs the "bl" sequence.
terminalSetVisibleBell
:: TerminalClass self
=> selfisVisible - True if the terminal should flash
-> Bool
-> IO ()
Controls whether or not the terminal will present a visible bell to the user when the child outputs the "bl" sequence. The terminal will clear itself to the default foreground color and then repaint itself.
terminalGetVisibleBell
:: TerminalClass self
=> selfreturn True if visible bell is enabled, False if not
-> IO Bool
Checks whether or not the terminal will present a visible bell to the user when the child outputs the "bl" sequence. The terminal will clear itself to the default foreground color and then repaint itself.
terminalSetAllowBold
:: TerminalClass self
=> selfallowBold - True if the terminal should attempt to draw bold text
-> Bool
-> IO ()
Controls whether or not the terminal will attempt to draw bold text, either by using a bold font variant or by repainting text with a different offset.
terminalGetAllowBold
:: TerminalClass self
=> selfreturn True if bolding is enabled, False if not
-> IO Bool
Checks whether or not the terminal will attempt to draw bold text by repainting text with a one-pixel offset.
terminalSetScrollOnOutput
:: TerminalClass self
=> selfscroll - True if the terminal should scroll on output
-> Bool
-> IO ()
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.
terminalSetScrollOnKeystroke
:: TerminalClass self
=> selfscroll - True if the terminal should scroll on keystrokes
-> Bool
-> IO ()
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.
terminalSetColorBold
:: TerminalClass self
=> selfbold - the new bold color
-> Color
-> IO ()
Sets the color used to draw bold text in the default foreground color.
terminalSetColorForeground
:: TerminalClass self
=> selfforeground - the new foreground color
-> Color
-> IO ()
Sets the foreground color used to draw normal text
terminalSetColorBackground
:: TerminalClass self
=> selfbackground - the new background color
-> Color
-> IO ()
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.
terminalSetColorDim
:: TerminalClass self
=> selfdim - the nw dim color
-> Color
-> IO ()
Sets the color used to draw dim text in the default foreground color.
terminalSetColorCursor
:: TerminalClass self
=> selfcursor - the new color to use for the text cursor
-> Color
-> IO ()

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

  • Available since Vte version 0.11.11
terminalSetColorHighlight
:: TerminalClass self
=> selfhighlight - the new color to use for highlighted text
-> Color
-> IO ()

Sets the background color for text which is highlighted. If Nothing, highlighted text (which is usually highlighted because it is selected) will be drawn with foreground and background colors reversed.

  • Available since Vte version 0.11.11
terminalSetColors
:: TerminalClass self
=> selfforeground - the new foreground color, or Nothing
-> Colorbackground - the new background color, or Nothing
-> Colorpalette - the color palette
-> Colorsize - the number of entries in palette
-> Int
-> IO ()
The terminal widget uses a 28-color model comprised of the default foreground and background colors, the bold foreground color, the dim foreground color, an eight color palette, bold versions of the eight color palette, and a dim version of the the eight color palette. palette_size must be either 0, 8, 16, or 24. If foreground is Nothing and palette_size is greater than 0, the new foreground color is taken from palette[7]. If background is Nothing and palette_size is greater than 0, the new background color is taken from palette[0]. If palette_size is 8 or 16, the third (dim) and possibly the second (bold) 8-color palettes are extrapolated from the new background color and the items in palette.
terminalSetDefaultColors :: TerminalClass self => self -> IO ()
Reset the terminal palette to reasonable compiled-in defaults.
terminalSetOpacity
:: TerminalClass self
=> selfopacity - the new opacity
-> Int
-> IO ()
Sets the opacity of the terminal background, were 0 means completely transparent and 65535 means completely opaque.
terminalSetBackgroundImage
:: TerminalClass self
=> selfimage - a Pixbuf to use, or Nothing to use the default background
-> Maybe Pixbuf
-> IO ()
Sets a background image for the widget. Text which would otherwise be drawn using the default background color will instead be drawn over the specified image. If necessary, the image will be tiled to cover the widget's entire visible area. If specified by terminalSetBackgroundSaturation the terminal will tint its in-memory copy of the image before applying it to the terminal.
terminalSetBackgroundImageFile
:: TerminalClass self
=> selfpath - path to an image file
-> String
-> IO ()
Sets a background image for the widget. If specified by terminalSetBackgroundSaturation, the terminal will tint its in-memory copy of the image before applying it to the terminal.
terminalSetBackgroundSaturation
:: TerminalClass self
=> selfsaturation - a floating point value between 0.0 and 1.0.
-> Double
-> IO ()
If a background image has been set using terminalSetBackgroundImage, terminalSetBackgroundImageFile, or terminalSetBackgroundTransparent, and the saturation value is less than 1.0, the terminal will adjust the colors of the image before drawing the image. To do so, the terminal will create a copy of the background image (or snapshot of the root window) and modify its pixel values.
terminalSetBackgroundTransparent
:: TerminalClass self
=> selftransparent - True if the terminal should fake transparency
-> Bool
-> IO ()
Sets the terminal's background image to the pixmap stored in the root window, adjusted so that if there are no windows below your application, the widget will appear to be transparent.
terminalSetBackgroundTintColor
:: TerminalClass self
=> selfcolor - a color which the terminal background should be tinted to if its saturation is not 1.0.
-> Color
-> IO ()

If a background image has been set using terminalSetBackgroundImage, terminalSetBackgroundImageFile, or terminalSetBackgroundTransparent, and the value set by terminalSetBackgroundSaturation is less than one, the terminal will adjust the color of the image before drawing the image. To do so, the terminal will create a copy of the background image (or snapshot of the root window) and modify its pixel values. The initial tint color is black.

  • Available since Vte version 0.11
terminalSetScrollBackground
:: TerminalClass self
=> selfscroll - True if the terminal should scroll the background image along with text.
-> Bool
-> IO ()

Controls whether or not the terminal will scroll the background image (if one is set) when the text in the window must be scrolled.

  • Available since Vte version 0.11
terminalSetCursorShape
:: TerminalClass self
=> selfshape - the TerminalCursorShape to use
-> TerminalCursorShape
-> IO ()

Sets the shape of the cursor drawn.

  • Available since Vte version 0.19.1
terminalGetCursorShape
:: TerminalClass self
=> selfreturn cursor shape
-> IO TerminalCursorShape

Returns the currently set cursor shape.

  • Available since Vte version 0.17.6
terminalSetCursorBlinkMode
:: TerminalClass self
=> selfmode - the TerminalCursorBlinkMode to use
-> TerminalCursorBlinkMode
-> IO ()

Sets whether or not the cursor will blink.

  • Available since Vte version 0.17.1
terminalGetCursorBlinkMode
:: TerminalClass self
=> selfreturn cursor blink mode.
-> IO TerminalCursorBlinkMode

Returns the currently set cursor blink mode.

  • Available since Vte version 0.17.1
terminalSetScrollbackLines
:: TerminalClass self
=> selflines - the length of the history buffer
-> Int
-> IO ()
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. Note that this setting only affects the normal screen buffer. For terminal types which have an alternate screen buffer, no scrollback is allowed on the alternate screen buffer.
terminalSetFont
:: TerminalClass self
=> selffontDesc - the FontDescription of the desired font.
-> FontDescription
-> IO ()
Sets the font used for rendering all text displayed by the terminal, overriding any fonts set using widgetModifyFont. 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.
terminalSetFontFromString
:: TerminalClass self
=> selfname - a string describing the font.
-> String
-> IO ()
A convenience function which converts name into a FontDescription and passes it to terminalSetFont.
terminalGetFont
:: TerminalClass self
=> selfreturn a FontDescription describing the font the terminal is currently using to render text.
-> IO FontDescription
Queries the terminal for information about the fonts which will be used to draw text in the terminal.
terminalGetHasSelection
:: TerminalClass self
=> selfreturn True if part of the text in the terminal is selected.
-> IO Bool
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.
terminalSetWordChars
:: TerminalClass self
=> selfspec - a specification
-> String
-> IO ()
When the user double-clicks to start selection, the terminal will extend the selection on word boundaries. It will treat characters included in spec as parts of words, and all other characters as word separators. Ranges of characters can be specified by separating them with a hyphen. As a special case, if spec is the empty string, the terminal will treat all graphic non-punctuation non-space characters as word characters.
terminalIsWordChar
:: TerminalClass self
=> selfc - a candidate Unicode code point
-> Charreturn True if the character is considered to be part of a word
-> IO Bool
Checks if a particular character is considered to be part of a word or not, based on the values last passed to terminalSetWordChars.
terminalSetBackspaceBinding
:: TerminalClass self
=> selfbinding - a TerminalEraseBinding for the backspace key
-> TerminalEraseBinding
-> IO ()
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.
terminalSetDeleteBinding
:: TerminalClass self
=> selfbindign - a TerminalEraseBinding for the delete key
-> TerminalEraseBinding
-> IO ()
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.
terminalSetMouseAutohide
:: TerminalClass self
=> selfautohide - True if the autohide should be enabled
-> Bool
-> IO ()
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 terminalGetMouseAutohide.
terminalGetMouseAutohide :: TerminalClass self => self -> IO Bool
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 terminalSetMouseAutohide.
terminalReset
:: TerminalClass self
=> selffull - True to reset tabstops
-> BoolclearHistory - True to empty the terminal's scrollback buffer
-> Bool
-> IO ()
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.
terminalGetText
:: TerminalClass self
=> selfJust p for a predicate p that determines which character should be extracted or Nothing to select all characters
-> Maybe VteSelectreturn a text string
-> IO [VteChar]
Extracts a view of the visible part of the terminal. A selection predicate may be supplied to restrict the inspected characters. The return value is a list of VteChar structures, each detailing the character's position, colors, and other characteristics.
terminalGetTextIncludeTrailingSpaces
:: TerminalClass self
=> selfJust p for a predicate p that determines which character should be extracted or Nothing to select all characters
-> Maybe VteSelectreturn a text string
-> IO [VteChar]

Extracts a view of the visible part of the terminal. If is_selected is not Nothing, characters will only be read if is_selected returns True after being passed the column and row, respectively. A CharAttributes structure is added to attributes for each byte added to the returned string detailing the character's position, colors, and other characteristics. This function differs from terminalGetText in that trailing spaces at the end of lines are included.

  • Available since Vte version 0.11.11
terminalGetTextRange
:: TerminalClass self
=> selfsRow first row to search for data
-> IntsCol first column to search for data
-> InteRow last row to search for data
-> InteCol last column to search for data
-> IntJust p for a predicate p that determines which character should be extracted or Nothing to select all characters
-> Maybe VteSelectreturn a text string
-> IO [VteChar]
Extracts a view of the visible part of the terminal. If is_selected is not Nothing, characters will only be read if is_selected returns True after being passed the column and row, respectively. A CharAttributes structure is added to attributes for each byte added to the returned string detailing the character's position, colors, and other characteristics. The entire scrollback buffer is scanned, so it is possible to read the entire contents of the buffer using this function.
terminalGetCursorPosition
:: TerminalClass self
=> self(column,row) the position of the cursor
-> IO (Int, Int)
Reads the location of the insertion cursor and returns it. The row coordinate is absolute.
terminalMatchClearAll :: TerminalClass self => self -> IO ()
Clears the list of regular expressions the terminal uses to highlight text when the user moves the mouse cursor.
terminalMatchAddRegex
:: TerminalClass self
=> selfpattern - a regular expression
-> Stringflags - specify how to interpret the pattern
-> [RegexCompileFlags]flags - specify how to match
-> [RegexMatchFlags]return an integer associated with this expression
-> IO Int

Adds the regular expression 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.

See http://library.gnome.org/devel/glib/stable/glib-regex-syntax.html for details about the accepted syntex.

  • Available since Vte version 0.17.1
terminalMatchRemove
:: TerminalClass self
=> selftag - the tag of the regex to remove
-> Int
-> IO ()
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.
terminalMatchCheck
:: TerminalClass self
=> selfcolumn - the text column
-> Introw - the text row
-> IntJust (str, tag) - the string that matched one of the previously set regular expressions together with the number tag that was returned by terminalMatchAddRegex
-> IO (Maybe (String, Int))
Checks if the text in and around the specified position matches any of the regular expressions previously registered using terminalMatchAddRegex. If a match exists, the matching string is returned together with the number associated with the matched regular expression. If more than one regular expression matches, the expressions that was registered first will be returned.
terminalMatchSetCursor
:: TerminalClass self
=> selftag - the tag of the regex which should use the specified cursor
-> Intcursor - the Cursor which the terminal should use when the pattern is highlighted
-> Cursor
-> IO ()

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

  • Available since Vte version 0.11
terminalMatchSetCursorType
:: TerminalClass self
=> selftag the tag of the regex which should use the specified cursor
-> IntcursorType a CursorType
-> CursorType
-> IO ()

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

  • Available since Vte version 0.11.9
terminalMatchSetCursorName
:: TerminalClass self
=> selftag - the tag of the regex which should use the specified cursor
-> Intname - the name of the cursor
-> String
-> IO ()

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

  • Available since Vte version 0.17.1
terminalSetEmulation
:: TerminalClass self
=> selfemulation - the name of a terminal description
-> String
-> IO ()
Sets what type of terminal the widget attempts to emulate by scanning for control sequences defined in the system's termcap file. Unless you are interested in this feature, always use xterm.
terminalGetEmulation
:: TerminalClass self
=> selfreturn the name of the terminal type the widget is attempting to emulate
-> IO String
Queries the terminal for its current emulation, as last set by a call to terminalSetEmulation.
terminalGetDefaultEmulation
:: TerminalClass self
=> selfreturn the name of the default terminal type the widget attempts to emulate
-> IO String

Queries the terminal for its default emulation, which is attempted if the terminal type passed to terminalSetEmulation emptry string.

  • Available since Vte version 0.11.11
terminalSetEncoding
:: TerminalClass self
=> selfcodeset - a valid g_iconv target
-> String
-> IO ()
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. The default encoding is defined by the application's locale settings.
terminalGetEncoding
:: TerminalClass self
=> selfreturn the current encoding for the terminal.
-> IO String
Determines the name of the encoding in which the terminal expects data to be encoded.
terminalGetStatusLine
:: TerminalClass self
=> selfThe current content of the terminal's status line. For terminals like xterm, this will usually be the empty string.
-> IO String
Some terminal emulations specify a status line which is separate from the main display area, and define a means for applications to move the cursor to the status line and back.
terminalGetPadding
:: TerminalClass self
=> self(lr,tb) - the left/right-edge and top/bottom-edge padding
-> IO (Int, Int)
Determines the amount of additional space the widget is using to pad the edges of its visible area. This is necessary for cases where characters in the selected font don't themselves include a padding area and the text itself would otherwise be contiguous with the window border. Applications which use the widget's row_count, column_count, char_height, and char_width fields to set geometry hints using windowSetGeometryHints will need to add this value to the base size. The values returned in xpad and ypad are the total padding used in each direction, and do not need to be doubled.
terminalGetAdjustment
:: TerminalClass self
=> selfreturn the contents of terminal's adjustment field
-> IO Adjustment
Get Adjustment of terminal widget.
terminalGetCharHeight
:: TerminalClass self
=> selfreturn the contents of terminal's char_height field
-> IO Int
Get terminal's char height.
terminalGetCharWidth
:: TerminalClass self
=> selfreturn the contents of terminal's char_width field
-> IO Int
Get terminal's char width.
terminalGetColumnCount
:: TerminalClass self
=> selfreturn the contents of terminal's column_count field
-> IO Int
Get terminal's column count.
terminalGetRowCount
:: TerminalClass self
=> selfreturn the contents of terminal's row_count field
-> IO Int
Get terminal's row count.
terminalGetIconTitle
:: TerminalClass self
=> selfreturn the contents of terminal's icon_title field
-> IO String
Get icon title.
terminalGetWindowTitle
:: TerminalClass self
=> selfreturn the contents of terminal's window_title field
-> IO String
Get window title.
Attributes
terminalAllowBold :: TerminalClass self => Attr self Bool

Controls whether or not the terminal will attempt to draw bold text. This may happen either by using a bold font variant, or by repainting text with a different offset.

Default value: True

  • Available since Vte version 0.19.1
terminalAudibleBell :: TerminalClass self => Attr self Bool

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

Default value: True

  • Available since Vte version 0.19.1
terminalBackgroundImageFile :: TerminalClass self => Attr self String

Sets a background image file for the widget. If specified by background-saturation:, the terminal will tint its in-memory copy of the image before applying it to the terminal.

Default value: ""

  • Available since Vte version 0.19.1
terminalBackgroundImagePixbuf :: TerminalClass self => Attr self (Maybe Pixbuf)

Sets a background image for the widget. Text which would otherwise be drawn using the default background color will instead be drawn over the specified image. If necessary, the image will be tiled to cover the widget's entire visible area. If specified by background-saturation:, the terminal will tint its in-memory copy of the image before applying it to the terminal.

  • Available since Vte version 0.19.1
terminalBackgroundOpacity :: TerminalClass self => Attr self Double

Sets the opacity of the terminal background, were 0.0 means completely transparent and 1.0 means completely opaque.

Allowed values: [0,1]

Default values: 1

  • Available since Vte version 0.19.1
terminalBackgroundSaturation :: TerminalClass self => Attr self Double

If a background image has been set using background-image-file: or background-image-pixbuf:, or background-transparent:, and the saturation value is less than 1.0, the terminal will adjust the colors of the image before drawing the image. To do so, the terminal will create a copy of the background image (or snapshot of the root window) and modify its pixel values.

Allowed values: [0,1]

Default value: 0.4

  • Available since Vte version 0.19.1
terminalBackgroundTintColor :: TerminalClass self => Attr self Color

If a background image has been set using background-image-file: or background-image-pixbuf:, or background-transparent:, and the value set by Terminal background-saturation: is less than 1.0, the terminal will adjust the color of the image before drawing the image. To do so, the terminal will create a copy of the background image (or snapshot of the root window) and modify its pixel values. The initial tint color is black.

  • Available since Vte version 0.19.1
terminalBackgroundTransparent :: TerminalClass self => Attr self Bool

Sets whther the terminal uses the pixmap stored in the root window as the background, adjusted so that if there are no windows below your application, the widget will appear to be transparent.

NOTE: When using a compositing window manager, you should instead set a RGBA colourmap on the toplevel window, so you get real transparency.

Default value: False

  • Available since Vte version 0.19.1
terminalBackspaceBinding :: TerminalClass self => Attr self TerminalEraseBinding
  • Controls what string or control sequence the terminal sends to its child when the user presses the backspace key.

Default value: EraseAuto

  • Available since Vte version 0.19.1
terminalCursorBlinkMode :: TerminalClass self => Attr self TerminalCursorBlinkMode

Sets whether or not the cursor will blink. Using CursorBlinkSystem will use the gtk-cursor-blink setting.

Default value: CursorBlinkSystem

  • Available since Vte version 0.19.1
terminalCursorShape :: TerminalClass self => Attr self TerminalCursorShape

Controls the shape of the cursor.

Default value: CursorShapeBlock

  • Available since Vte version 0.19.1
terminalDeleteBinding :: TerminalClass self => Attr self TerminalEraseBinding

Controls what string or control sequence the terminal sends to its child when the user presses the delete key.

Default value: EraseAuto

  • Available since Vte version 0.19.1
terminalEmulation :: TerminalClass self => Attr self String

Sets what type of terminal the widget attempts to emulate by scanning for control sequences defined in the system's termcap file. Unless you are interested in this feature, always use the default which is xterm.

Default value: xterm

  • Available since Vte version 0.19.1
terminalEncoding :: TerminalClass self => Attr self String

Controls 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. The default is defined by the application's locale settings.

Default value: ""

  • Available since Vte version 0.19.1
terminalFontDesc :: TerminalClass self => Attr self FontDescription

Specifies the font used for rendering all text displayed by the terminal, overriding any fonts set using widgetModifyFont. 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.

  • Available since Vte version 0.19.1
terminalIconTitle :: TerminalClass self => ReadAttr self String

The terminal's so-called icon title, or empty if no icon title has been set.

Default value: ""

  • Available since Vte version 0.19.1
terminalPointerAutohide :: TerminalClass self => Attr self Bool

Controls 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.

Default value: False

  • Available since Vte version 0.19.1
terminalPty :: TerminalClass self => Attr self Int

The file descriptor of the master end of the terminal's PTY.

Allowed values: [-1 ...]

Default values: -1

  • Available since Vte version 0.19.1
terminalScrollBackground :: TerminalClass self => Attr self Bool

Controls 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.

Default value: False

  • Available since Vte version 0.19.1
terminalScrollOnKeystroke :: TerminalClass self => Attr self Bool

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.

Default value: False

  • Available since Vte version 0.19.1
terminalScrollOnOutput :: TerminalClass self => Attr self Bool

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.

Default value: True

  • Available since Vte version 0.19.1
terminalScrollbackLines :: TerminalClass self => Attr self Int

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. Note that this setting only affects the normal screen buffer. For terminal types which have an alternate screen buffer, no scrollback is allowed on the alternate screen buffer.

Default value: 100

  • Available since Vte version 0.19.1
terminalVisibleBell :: TerminalClass self => Attr self Bool

Controls whether the terminal will present a visible bell to the user when the child outputs the "bl" sequence. The terminal will clear itself to the default foreground color and then repaint itself.

Default value: False

  • Available since Vte version 0.19.1
terminalWindowTitle :: TerminalClass self => ReadAttr self String

The terminal's title.

Default value: ""

  • Available since Vte version 0.19.1
terminalWordChars :: TerminalClass self => Attr self String

When the user double-clicks to start selection, the terminal will extend the selection on word boundaries. It will treat characters the word-chars characters as parts of words, and all other characters as word separators. Ranges of characters can be specified by separating them with a hyphen. As a special case, when setting this to the empty string, the terminal will treat all graphic non-punctuation non-space characters as word characters.

Defalut value: ""

  • Available since Vte version 0.19.1
Signals
beep :: TerminalClass self => Signal self (IO ())
This signal is emitted when the a child sends a beep request to the terminal.
charSizeChanged :: TerminalClass self => Signal self (Int -> Int -> IO ())
Emitted whenever selection of a new font causes the values of the char_width or char_height fields to change.
childExited :: TerminalClass self => Signal self (IO ())
This signal is emitted when the terminal detects that a child started using terminalForkCommand has exited.
commit :: TerminalClass self => Signal self (String -> Int -> IO ())
Emitted whenever the terminal receives input from the user and prepares to send it to the child process. The signal is emitted even when there is no child process.
contentsChanged :: TerminalClass self => Signal self (IO ())
Emitted whenever the visible appearance of the terminal has changed. Used primarily by TerminalAccessible.
copyClipboard :: TerminalClass self => Signal self (IO ())
Emitted whenever terminalCopyClipboard is called.
cursorMoved :: TerminalClass self => Signal self (IO ())
Emitted whenever the cursor moves to a new character cell. Used primarily by TerminalAccessible.
decreaseFontSize :: TerminalClass self => Signal self (IO ())
Emitted when the user hits the - key while holding the Control key.
deiconifyWindow :: TerminalClass self => Signal self (IO ())
Emitted at the child application's request.
emulationChanged :: TerminalClass self => Signal self (IO ())
Emitted whenever the terminal's emulation changes, only possible at the parent application's request.
encodingChanged :: TerminalClass self => Signal self (IO ())
Emitted whenever the terminal's current encoding has changed, either as a result of receiving a control sequence which toggled between the local and UTF-8 encodings, or at the parent application's request.
eof :: TerminalClass self => Signal self (IO ())
Emitted when the terminal receives an end-of-file from a child which is running in the terminal. This signal is frequently (but not always) emitted with a childExited signal.
iconTitleChanged :: TerminalClass self => Signal self (IO ())
Emitted when the terminal's icon_title field is modified.
iconifyWindow :: TerminalClass self => Signal self (IO ())
Emitted at the child application's request.
increaseFontSize :: TerminalClass self => Signal self (IO ())
Emitted when the user hits the + key while holding the Control key.
lowerWindow :: TerminalClass self => Signal self (IO ())
Emitted at the child application's request.
maximizeWindow :: TerminalClass self => Signal self (IO ())
Emitted at the child application's request.
moveWindow :: TerminalClass self => Signal self (Word -> Word -> IO ())
Emitted when user move terminal window.
pasteClipboard :: TerminalClass self => Signal self (IO ())
Emitted whenever terminalPasteClipboard is called.
raiseWindow :: TerminalClass self => Signal self (IO ())
Emitted at the child application's request.
refreshWindow :: TerminalClass self => Signal self (IO ())
Emitted at the child application's request.
resizeWidnow :: TerminalClass self => Signal self (Int -> Int -> IO ())
Emitted at the child application's request.
restoreWindow :: TerminalClass self => Signal self (IO ())
Emitted at the child application's request.
selectionChanged :: TerminalClass self => Signal self (IO ())
Emitted at the child application's request.
setScrollAdjustments :: TerminalClass self => Signal self (Adjustment -> Adjustment -> IO ())
Set the scroll adjustments for the terminal. Usually scrolled containers like ScrolledWindow will emit this signal to connect two instances of Scrollbar to the scroll directions of the Terminal.
statusLineChanged :: TerminalClass self => Signal self (IO ())
Emitted whenever the contents of the status line are modified or cleared.
textDeleted :: TerminalClass self => Signal self (IO ())
An internal signal used for communication between the terminal and its accessibility peer. May not be emitted under certain circumstances.
textInserted :: TerminalClass self => Signal self (IO ())
An internal signal used for communication between the terminal and its accessibility peer. May not be emitted under certain circumstances.
textModified :: TerminalClass self => Signal self (IO ())
An internal signal used for communication between the terminal and its accessibility peer. May not be emitted under certain circumstances.
textScrolled :: TerminalClass self => Signal self (Int -> IO ())
An internal signal used for communication between the terminal and its accessibility peer. May not be emitted under certain circumstances.
windowTitleChanged :: TerminalClass self => Signal self (IO ())
Emitted when the terminal's window_title field is modified.
Produced by Haddock version 2.6.0