Portability | portable (depends on GHC) |
---|---|
Stability | provisional |
Maintainer | gtk2hs-users@lists.sourceforge.net |
Safe Haskell | None |
A terminal widget
- data Terminal
- type VteSelect = Int -> Int -> Bool
- data VteChar = VteChar {}
- data TerminalEraseBinding
- data TerminalCursorBlinkMode
- data TerminalCursorShape
- data RegexCompileFlags
- data RegexMatchFlags
- 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
type VteSelect = Int -> Int -> BoolSource
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.
A structure describing the individual characters in the visible part of a terminal window.
Enums
data TerminalEraseBinding Source
Values for what should happen when the user presses backspace/delete.
Use EraseAuto
unless the user can cause them to be overridden.
data TerminalCursorBlinkMode Source
Values for the cursor blink setting.
data TerminalCursorShape Source
Values for the cursor shape setting.
data RegexCompileFlags Source
Flags determining how the regular expression is to be interpreted. See <http: for an explanation of these flags.
data RegexMatchFlags Source
Flags determining how the string is matched against the regular expression. See <http: for an explanation of these flags.
Constructors
terminalNew :: IO TerminalSource
Create a new terminal widget.
Methods
terminalImAppendMenuitemsSource
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.
:: TerminalClass self | |
=> self | |
-> Maybe String |
|
-> Maybe [String] |
|
-> Maybe [String] |
|
-> Maybe String |
|
-> Bool |
|
-> Bool |
|
-> Bool |
|
-> IO Int | return the ID of the new process |
Starts the specified command under a newly-allocated controlling pseudo-terminal.
:: TerminalClass self | |
=> self | |
-> Maybe [String] |
|
-> Maybe String |
|
-> Bool |
|
-> Bool |
|
-> Bool |
|
-> IO Int | return the ID of the new process in the parent, 0 in the child, and -1 if there was an error |
Starts a new child process under a newly-allocated controlling pseudo-terminal.
- Available since Vte version 0.11.11
:: TerminalClass self | |
=> self | |
-> 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
:: TerminalClass self | |
=> self | |
-> IO Int | return the file descriptor, or -1 if the terminal has no PTY. |
Returns the file descriptor of the master end of terminal's PTY.
- Available since Vte version 0.19.1
:: TerminalClass self | |
=> self | |
-> 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.
Sends a block of UTF-8 text to the child as if it were entered by the user at the keyboard.
Sends a block of binary data to the child.
- Available since Vte version 0.12.1
terminalGetChildExitStatusSource
Gets the exit status of the command started by terminalForkCommand
.
- Available since Vte version 0.19.1
terminalSelectAll :: TerminalClass self => self -> IO ()Source
Selects all text within the terminal (including the scrollback buffer).
- Available since Vte version 0.16
terminalSelectNone :: TerminalClass self => self -> IO ()Source
Clears the current selection.
- Available since Vte version 0.16
terminalCopyClipboard :: TerminalClass self => self -> IO ()Source
Places the selected text in the terminal in the selectionClipboard
selection.
terminalPasteClipboard :: TerminalClass self => self -> IO ()Source
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 ()Source
Places the selected text in the terminal in the
selectionPrimary
selection.
terminalPastePrimary :: TerminalClass self => self -> IO ()Source
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.
:: TerminalClass self | |
=> self | |
-> Int |
|
-> 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.
Controls whether or not the terminal will beep when the child outputs the "bl" sequence.
Checks whether or not the terminal will beep when the child outputs the "bl" sequence.
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.
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.
:: TerminalClass self | |
=> self | |
-> 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.
Checks whether or not the terminal will attempt to draw bold text by repainting text with a one-pixel offset.
terminalSetScrollOnOutputSource
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.
terminalSetScrollOnKeystrokeSource
:: TerminalClass self | |
=> self | |
-> 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.
Sets the color used to draw bold text in the default foreground color.
terminalSetColorForegroundSource
Sets the foreground color used to draw normal text
terminalSetColorBackgroundSource
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.
Sets the color used to draw dim text in the default foreground color.
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
terminalSetColorHighlightSource
:: TerminalClass self | |
=> self | |
-> 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
:: TerminalClass self | |
=> self | |
-> Color |
|
-> Color |
|
-> Color |
|
-> 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 ()Source
Reset the terminal palette to reasonable compiled-in defaults.
Sets the opacity of the terminal background, were 0 means completely transparent and 65535 means completely opaque.
terminalSetBackgroundImageSource
:: TerminalClass self | |
=> self | |
-> 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.
terminalSetBackgroundImageFileSource
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.
terminalSetBackgroundSaturationSource
:: TerminalClass self | |
=> self | |
-> 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.
terminalSetBackgroundTransparentSource
:: TerminalClass self | |
=> self | |
-> 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.
terminalSetBackgroundTintColorSource
:: TerminalClass self | |
=> self | |
-> 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
terminalSetScrollBackgroundSource
:: TerminalClass self | |
=> self | |
-> 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
:: TerminalClass self | |
=> self | |
-> TerminalCursorShape |
|
-> IO () |
Sets the shape of the cursor drawn.
- Available since Vte version 0.19.1
:: TerminalClass self | |
=> self | |
-> IO TerminalCursorShape | return cursor shape |
Returns the currently set cursor shape.
- Available since Vte version 0.17.6
terminalSetCursorBlinkModeSource
:: TerminalClass self | |
=> self | |
-> TerminalCursorBlinkMode |
|
-> IO () |
Sets whether or not the cursor will blink.
- Available since Vte version 0.17.1
terminalGetCursorBlinkModeSource
:: TerminalClass self | |
=> self | |
-> IO TerminalCursorBlinkMode | return cursor blink mode. |
Returns the currently set cursor blink mode.
- Available since Vte version 0.17.1
terminalSetScrollbackLinesSource
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.
:: TerminalClass self | |
=> self | |
-> 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.
terminalSetFontFromStringSource
A convenience function which converts name into a FontDescription
and passes it to terminalSetFont
.
:: TerminalClass self | |
=> self | |
-> IO FontDescription | return a |
Queries the terminal for information about the fonts which will be used to draw text in the terminal.
:: TerminalClass self | |
=> self | |
-> IO Bool | return |
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.
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.
:: TerminalClass self | |
=> self | |
-> Char |
|
-> IO Bool | return |
Checks if a particular character is considered to be part of a word or not, based on the values last passed to terminalSetWordChars
.
terminalSetBackspaceBindingSource
:: TerminalClass self | |
=> self | |
-> 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.
terminalSetDeleteBindingSource
:: TerminalClass self | |
=> self | |
-> 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.
terminalSetMouseAutohideSource
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 BoolSource
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
.
:: TerminalClass self | |
=> self | |
-> Bool |
|
-> 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.
:: TerminalClass self | |
=> self | |
-> Maybe VteSelect |
|
-> IO [VteChar] | return a text string |
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.
terminalGetTextIncludeTrailingSpacesSource
:: TerminalClass self | |
=> self | |
-> Maybe VteSelect |
|
-> IO [VteChar] | return a text string |
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
:: TerminalClass self | |
=> self | |
-> Int |
|
-> Int |
|
-> Int |
|
-> Int |
|
-> Maybe VteSelect |
|
-> IO [VteChar] | return a text string |
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.
terminalGetCursorPositionSource
Reads the location of the insertion cursor and returns it. The row coordinate is absolute.
terminalMatchClearAll :: TerminalClass self => self -> IO ()Source
Clears the list of regular expressions the terminal uses to highlight text when the user moves the mouse cursor.
:: TerminalClass self | |
=> self | |
-> String |
|
-> [RegexCompileFlags] |
|
-> [RegexMatchFlags] |
|
-> IO Int | return an integer associated with this expression |
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: details about the accepted syntex.
- Available since Vte version 0.17.1
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.
:: TerminalClass self | |
=> self | |
-> Int |
|
-> Int |
|
-> 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.
:: TerminalClass self | |
=> self | |
-> Int |
|
-> 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
terminalMatchSetCursorTypeSource
:: TerminalClass self | |
=> self | |
-> Int |
|
-> 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
terminalMatchSetCursorNameSource
:: TerminalClass self | |
=> self | |
-> Int |
|
-> 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
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.
:: TerminalClass self | |
=> self | |
-> IO String | return the name of the terminal type the widget is attempting to emulate |
Queries the terminal for its current emulation, as last set by a call to terminalSetEmulation
.
terminalGetDefaultEmulationSource
:: TerminalClass self | |
=> self | |
-> IO String | return the name of the default terminal type the widget attempts to emulate |
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
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.
Determines the name of the encoding in which the terminal expects data to be encoded.
:: TerminalClass self | |
=> self | |
-> IO String | The current content of the terminal's status line. For terminals like xterm, this will usually be the empty 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.
:: TerminalClass self | |
=> self | |
-> 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.
:: TerminalClass self | |
=> self | |
-> IO Adjustment | return the contents of terminal's adjustment field |
Get Adjustment
of terminal widget.
Get terminal's char height.
Get terminal's char width.
Get terminal's column count.
Get terminal's row count.
Get icon title.
Get window title.
Attributes
terminalAllowBold :: TerminalClass self => Attr self BoolSource
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 BoolSource
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 StringSource
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)Source
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 DoubleSource
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 DoubleSource
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 ColorSource
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 BoolSource
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 TerminalEraseBindingSource
- 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 TerminalCursorBlinkModeSource
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 TerminalCursorShapeSource
Controls the shape of the cursor.
Default value: CursorShapeBlock
- Available since Vte version 0.19.1
terminalDeleteBinding :: TerminalClass self => Attr self TerminalEraseBindingSource
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 StringSource
terminalEncoding :: TerminalClass self => Attr self StringSource
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 FontDescriptionSource
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 StringSource
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 BoolSource
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 IntSource
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 BoolSource
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 BoolSource
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 BoolSource
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 IntSource
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 BoolSource
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 StringSource
The terminal's title.
Default value: ""
- Available since Vte version 0.19.1
terminalWordChars :: TerminalClass self => Attr self StringSource
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 ())Source
This signal is emitted when the a child sends a beep request to the terminal.
charSizeChanged :: TerminalClass self => Signal self (Int -> Int -> IO ())Source
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 ())Source
This signal is emitted when the terminal detects that a child started using terminalForkCommand
has exited.
commit :: TerminalClass self => Signal self (String -> Int -> IO ())Source
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 ())Source
Emitted whenever the visible appearance of the terminal has changed. Used primarily by TerminalAccessible
.
copyClipboard :: TerminalClass self => Signal self (IO ())Source
Emitted whenever terminalCopyClipboard
is called.
cursorMoved :: TerminalClass self => Signal self (IO ())Source
Emitted whenever the cursor moves to a new character cell. Used primarily by TerminalAccessible
.
decreaseFontSize :: TerminalClass self => Signal self (IO ())Source
Emitted when the user hits the -
key while holding the Control key.
deiconifyWindow :: TerminalClass self => Signal self (IO ())Source
Emitted at the child application's request.
emulationChanged :: TerminalClass self => Signal self (IO ())Source
Emitted whenever the terminal's emulation changes, only possible at the parent application's request.
encodingChanged :: TerminalClass self => Signal self (IO ())Source
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 ())Source
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 ())Source
Emitted when the terminal's icon_title field is modified.
iconifyWindow :: TerminalClass self => Signal self (IO ())Source
Emitted at the child application's request.
increaseFontSize :: TerminalClass self => Signal self (IO ())Source
Emitted when the user hits the +
key while holding the Control key.
lowerWindow :: TerminalClass self => Signal self (IO ())Source
Emitted at the child application's request.
maximizeWindow :: TerminalClass self => Signal self (IO ())Source
Emitted at the child application's request.
moveWindow :: TerminalClass self => Signal self (Word -> Word -> IO ())Source
Emitted when user move terminal window.
pasteClipboard :: TerminalClass self => Signal self (IO ())Source
Emitted whenever terminalPasteClipboard
is called.
raiseWindow :: TerminalClass self => Signal self (IO ())Source
Emitted at the child application's request.
refreshWindow :: TerminalClass self => Signal self (IO ())Source
Emitted at the child application's request.
resizeWidnow :: TerminalClass self => Signal self (Int -> Int -> IO ())Source
Emitted at the child application's request.
restoreWindow :: TerminalClass self => Signal self (IO ())Source
Emitted at the child application's request.
selectionChanged :: TerminalClass self => Signal self (IO ())Source
Emitted at the child application's request.
setScrollAdjustments :: TerminalClass self => Signal self (Adjustment -> Adjustment -> IO ())Source
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 ())Source
Emitted whenever the contents of the status line are modified or cleared.
textDeleted :: TerminalClass self => Signal self (IO ())Source
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 ())Source
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 ())Source
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 ())Source
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 ())Source
Emitted when the terminal's window_title field is modified.