Maintainer | gtk2hs-users@lists.sourceforge.net |
---|---|
Stability | provisional |
Portability | portable (depends on GHC) |
Safe Haskell | None |
Language | Haskell98 |
Graphics.UI.Gtk.Vte.Vte
Description
A terminal widget
- data Terminal
- type VteSelect = Int -> Int -> Bool
- data VteChar = VteChar {}
- data TerminalEraseBinding
- data TerminalCursorBlinkMode
- data TerminalCursorShape
- data RegexCompileFlags
- = GRegexCaseless
- | GRegexMultiline
- | GRegexDotall
- | GRegexExtended
- | GRegexAnchored
- | GRegexDollarEndonly
- | GRegexUngreedy
- | GRegexRaw
- | GRegexNoAutoCapture
- | GRegexOptimize
- | GRegexFirstline
- | GRegexDupnames
- | GRegexNewlineCr
- | GRegexNewlineLf
- | GRegexNewlineCrlf
- | GRegexNewlineAnycrlf
- | GRegexBsrAnycrlf
- | GRegexJavascriptCompat
- data RegexMatchFlags
- = GRegexMatchAnchored
- | GRegexMatchNotbol
- | GRegexMatchNoteol
- | GRegexMatchNotempty
- | GRegexMatchPartial
- | GRegexMatchNewlineCr
- | GRegexMatchNewlineLf
- | GRegexMatchNewlineCrlf
- | GRegexMatchNewlineAny
- | GRegexMatchNewlineAnycrlf
- | GRegexMatchBsrAnycrlf
- | GRegexMatchBsrAny
- | GRegexMatchPartialSoft
- | GRegexMatchPartialHard
- | GRegexMatchNotemptyAtstart
- terminalNew :: IO Terminal
- terminalImAppendMenuitems :: TerminalClass self => self -> MenuShell -> IO ()
- terminalForkCommand :: (TerminalClass self, GlibFilePath fp, GlibString string) => self -> Maybe fp -> Maybe [string] -> Maybe [string] -> Maybe fp -> Bool -> Bool -> Bool -> IO Int
- terminalForkpty :: (TerminalClass self, GlibString string, GlibFilePath fp) => self -> Maybe [string] -> Maybe fp -> Bool -> Bool -> Bool -> IO Int
- terminalSetPty :: TerminalClass self => self -> Int -> IO ()
- terminalGetPty :: TerminalClass self => self -> IO Int
- terminalFeed :: (TerminalClass self, GlibString string) => self -> string -> IO ()
- terminalFeedChild :: (TerminalClass self, GlibString string) => 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] -> IO ()
- terminalSetDefaultColors :: TerminalClass self => self -> IO ()
- terminalSetOpacity :: TerminalClass self => self -> Int -> IO ()
- terminalSetBackgroundImage :: TerminalClass self => self -> Maybe Pixbuf -> IO ()
- terminalSetBackgroundImageFile :: (TerminalClass self, GlibFilePath fp) => self -> fp -> 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, GlibString string) => self -> string -> IO ()
- terminalGetFont :: TerminalClass self => self -> IO FontDescription
- terminalGetHasSelection :: TerminalClass self => self -> IO Bool
- terminalSetWordChars :: (TerminalClass self, GlibString string) => 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, GlibString string) => self -> string -> [RegexCompileFlags] -> [RegexMatchFlags] -> IO Int
- terminalMatchRemove :: TerminalClass self => self -> Int -> IO ()
- terminalMatchCheck :: (TerminalClass self, GlibString string) => self -> Int -> Int -> IO (Maybe (string, Int))
- terminalMatchSetCursor :: TerminalClass self => self -> Int -> Cursor -> IO ()
- terminalMatchSetCursorType :: TerminalClass self => self -> Int -> CursorType -> IO ()
- terminalMatchSetCursorName :: (TerminalClass self, GlibString string) => self -> Int -> string -> IO ()
- terminalSetEmulation :: (TerminalClass self, GlibString string) => self -> string -> IO ()
- terminalGetEmulation :: (TerminalClass self, GlibString string) => self -> IO string
- terminalGetDefaultEmulation :: (TerminalClass self, GlibString string) => self -> IO string
- terminalSetEncoding :: (TerminalClass self, GlibString string) => self -> string -> IO ()
- terminalGetEncoding :: (TerminalClass self, GlibString string) => self -> IO string
- terminalGetStatusLine :: (TerminalClass self, GlibString string) => 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, GlibString string) => self -> IO string
- terminalGetWindowTitle :: (TerminalClass self, GlibString string) => self -> IO string
- terminalAllowBold :: TerminalClass self => Attr self Bool
- terminalAudibleBell :: TerminalClass self => Attr self Bool
- terminalBackgroundImageFile :: (TerminalClass self, GlibString string) => 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, GlibString string) => Attr self string
- terminalEncoding :: (TerminalClass self, GlibString string) => Attr self string
- terminalFontDesc :: TerminalClass self => Attr self FontDescription
- terminalIconTitle :: (TerminalClass self, GlibString string) => 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, GlibString string) => ReadAttr self string
- terminalWordChars :: (TerminalClass self, GlibString string) => 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, GlibString string) => 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 ())
- resizeWindow :: 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 -> Bool Source #
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.
Constructors
CursorBlinkSystem | |
CursorBlinkOn | |
CursorBlinkOff |
data TerminalCursorShape Source #
Values for the cursor shape setting.
Constructors
CursorShapeBlock | |
CursorShapeIbeam | |
CursorShapeUnderline |
data RegexCompileFlags Source #
Flags determining how the regular expression is to be interpreted. See <http: for an explanation of these flags.
Constructors
data RegexMatchFlags Source #
Flags determining how the string is matched against the regular expression. See <http: for an explanation of these flags.
Constructors
Constructors
terminalNew :: IO Terminal Source #
Create a new terminal widget.
Methods
terminalImAppendMenuitems Source #
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.
Arguments
:: (TerminalClass self, GlibFilePath fp, GlibString string) | |
=> self | |
-> Maybe fp |
|
-> Maybe [string] |
|
-> Maybe [string] |
|
-> Maybe fp |
|
-> Bool |
|
-> Bool |
|
-> Bool |
|
-> IO Int | return the ID of the new process |
Starts the specified command under a newly-allocated controlling pseudo-terminal.
Arguments
:: (TerminalClass self, GlibString string, GlibFilePath fp) | |
=> self | |
-> Maybe [string] |
|
-> Maybe fp |
|
-> 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
Arguments
:: 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
Arguments
:: 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
Arguments
:: (TerminalClass self, GlibString string) | |
=> 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.
Arguments
:: (TerminalClass self, GlibString string) | |
=> self | |
-> string |
|
-> IO () |
Sends a block of UTF-8 text to the child as if it were entered by the user at the keyboard.
terminalFeedChildBinary Source #
Sends a block of binary data to the child.
- Available since Vte version 0.12.1
terminalGetChildExitStatus Source #
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.
Arguments
:: 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.
terminalSetAudibleBell Source #
Controls whether or not the terminal will beep when the child outputs the "bl" sequence.
terminalGetAudibleBell Source #
Arguments
:: TerminalClass self | |
=> self | |
-> IO Bool | return |
Checks whether or not the terminal will beep when the child outputs the "bl" sequence.
terminalSetVisibleBell Source #
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 Source #
Arguments
:: TerminalClass self | |
=> self | |
-> IO Bool | return |
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.
Arguments
:: 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.
terminalSetScrollOnOutput Source #
Arguments
:: TerminalClass self | |
=> self | |
-> 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 Source #
Arguments
:: 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.
terminalSetColorForeground Source #
Sets the foreground color used to draw normal text
terminalSetColorBackground Source #
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.
terminalSetColorCursor Source #
Arguments
:: TerminalClass self | |
=> self | |
-> 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 Source #
Arguments
:: 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
Arguments
:: TerminalClass self | |
=> self | |
-> Color |
|
-> Color |
|
-> [Color] |
|
-> 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.
terminalSetBackgroundImage Source #
Arguments
:: 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.
terminalSetBackgroundImageFile Source #
Arguments
:: (TerminalClass self, GlibFilePath fp) | |
=> self | |
-> fp |
|
-> 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 Source #
Arguments
:: 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.
terminalSetBackgroundTransparent Source #
Arguments
:: 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.
terminalSetBackgroundTintColor Source #
Arguments
:: 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
terminalSetScrollBackground Source #
Arguments
:: 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
terminalSetCursorShape Source #
Arguments
:: TerminalClass self | |
=> self | |
-> TerminalCursorShape |
|
-> IO () |
Sets the shape of the cursor drawn.
- Available since Vte version 0.19.1
terminalGetCursorShape Source #
Arguments
:: TerminalClass self | |
=> self | |
-> IO TerminalCursorShape | return cursor shape |
Returns the currently set cursor shape.
- Available since Vte version 0.17.6
terminalSetCursorBlinkMode Source #
Arguments
:: TerminalClass self | |
=> self | |
-> TerminalCursorBlinkMode |
|
-> IO () |
Sets whether or not the cursor will blink.
- Available since Vte version 0.17.1
terminalGetCursorBlinkMode Source #
Arguments
:: TerminalClass self | |
=> self | |
-> IO TerminalCursorBlinkMode | return cursor blink mode. |
Returns the currently set cursor blink mode.
- Available since Vte version 0.17.1
terminalSetScrollbackLines Source #
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.
Arguments
:: 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.
terminalSetFontFromString Source #
Arguments
:: (TerminalClass self, GlibString string) | |
=> self | |
-> string |
|
-> IO () |
A convenience function which converts name into a FontDescription
and passes it to terminalSetFont
.
Arguments
:: 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.
terminalGetHasSelection Source #
Arguments
:: 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.
Arguments
:: (TerminalClass self, GlibString string) | |
=> self | |
-> 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.
Arguments
:: 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
.
terminalSetBackspaceBinding Source #
Arguments
:: 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.
terminalSetDeleteBinding Source #
Arguments
:: 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.
terminalSetMouseAutohide Source #
Arguments
:: TerminalClass self | |
=> self | |
-> 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 Source #
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
.
Arguments
:: 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.
Arguments
:: 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.
terminalGetTextIncludeTrailingSpaces Source #
Arguments
:: 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
Arguments
:: 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.
terminalGetCursorPosition Source #
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.
terminalMatchAddRegex Source #
Arguments
:: (TerminalClass self, GlibString string) | |
=> 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.
Arguments
:: (TerminalClass self, GlibString string) | |
=> 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.
terminalMatchSetCursor Source #
Arguments
:: 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
terminalMatchSetCursorType Source #
Arguments
:: 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
terminalMatchSetCursorName Source #
Arguments
:: (TerminalClass self, GlibString string) | |
=> 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
Arguments
:: (TerminalClass self, GlibString string) | |
=> self | |
-> 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".
Arguments
:: (TerminalClass self, GlibString string) | |
=> 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
.
terminalGetDefaultEmulation Source #
Arguments
:: (TerminalClass self, GlibString string) | |
=> 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
Arguments
:: (TerminalClass self, GlibString string) | |
=> self | |
-> 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.
Arguments
:: (TerminalClass self, GlibString string) | |
=> self | |
-> IO string | return the current encoding for the terminal. |
Determines the name of the encoding in which the terminal expects data to be encoded.
terminalGetStatusLine Source #
Arguments
:: (TerminalClass self, GlibString string) | |
=> 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.
Arguments
:: 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.
terminalGetAdjustment Source #
Arguments
:: TerminalClass self | |
=> self | |
-> IO Adjustment | return the contents of terminal's adjustment field |
Get Adjustment
of terminal widget.
terminalGetCharHeight Source #
Get terminal's char height.
Get terminal's char width.
terminalGetColumnCount Source #
Arguments
:: TerminalClass self | |
=> self | |
-> IO Int | return the contents of terminal's column_count field |
Get terminal's column count.
Get terminal's row count.
Arguments
:: (TerminalClass self, GlibString string) | |
=> self | |
-> IO string | return the contents of terminal's icon_title field |
Get icon title.
terminalGetWindowTitle Source #
Arguments
:: (TerminalClass self, GlibString string) | |
=> self | |
-> IO string | return the contents of terminal's window_title field |
Get window title.
Attributes
terminalAllowBold :: TerminalClass self => Attr self Bool Source #
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 Source #
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, GlibString string) => Attr self string Source #
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 Double Source #
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 Source #
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 Source #
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 Source #
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 Source #
- 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 Source #
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 Source #
terminalDeleteBinding :: TerminalClass self => Attr self TerminalEraseBinding Source #
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, GlibString string) => Attr self string Source #
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, GlibString string) => Attr self string Source #
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 Source #
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, GlibString string) => ReadAttr self string Source #
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 Source #
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 Source #
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 Source #
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 Source #
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 Source #
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 Source #
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 Source #
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, GlibString string) => ReadAttr self string Source #
The terminal's title.
Default value: ""
- Available since Vte version 0.19.1
terminalWordChars :: (TerminalClass self, GlibString string) => Attr self string Source #
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, GlibString string) => 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.
resizeWindow :: 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.