-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Binding to the GtkSourceView library.
--   
--   GtkSourceView is a text widget that extends the standard GTK+ 2.x text
--   widget GtkTextView. It improves GtkTextView by implementing syntax
--   highlighting and other features typical of a source editor.
@package gtksourceview2
@version 0.13.3.1


module Graphics.UI.Gtk.SourceView.SourceStyle
data SourceStyle
SourceStyle :: Maybe Text -> Maybe Bool -> Maybe Text -> Maybe Bool -> Maybe Text -> Maybe Bool -> Maybe Bool -> SourceStyle
[sourceStyleBackground] :: SourceStyle -> Maybe Text
[sourceStyleBold] :: SourceStyle -> Maybe Bool
[sourceStyleForeground] :: SourceStyle -> Maybe Text
[sourceStyleItalic] :: SourceStyle -> Maybe Bool
[sourceStyleLineBackground] :: SourceStyle -> Maybe Text
[sourceStyleStrikethrough] :: SourceStyle -> Maybe Bool
[sourceStyleUnderline] :: SourceStyle -> Maybe Bool


module Graphics.UI.Gtk.SourceView.SourceStyleScheme
data SourceStyleScheme
class GObjectClass o => SourceStyleSchemeClass o
castToSourceStyleScheme :: GObjectClass obj => obj -> SourceStyleScheme
gTypeSourceStyleScheme :: GType
toSourceStyleScheme :: SourceStyleSchemeClass o => o -> SourceStyleScheme
sourceStyleSchemeGetId :: (SourceStyleSchemeClass sss, GlibString string) => sss -> IO string
sourceStyleSchemeGetName :: (SourceStyleSchemeClass sss, GlibString string) => sss -> IO string
sourceStyleSchemeGetDescription :: (SourceStyleSchemeClass sss, GlibString string) => sss -> IO string
sourceStyleSchemeGetAuthors :: (SourceStyleSchemeClass sss, GlibString string) => sss -> IO [string]
sourceStyleSchemeGetFilename :: (SourceStyleSchemeClass sss, GlibString string) => sss -> IO string
sourceStyleSchemeGetStyle :: (SourceStyleSchemeClass sss, GlibString string) => sss -> string -> IO SourceStyle

-- | Style scheme description.
--   
--   Default value: ""
sourceStyleSchemeDescription :: (SourceStyleSchemeClass sss, GlibString string) => ReadAttr sss string

-- | Style scheme filename or <a>Nothing</a>.
--   
--   Default value: ""
sourceStyleSchemeFilename :: (SourceStyleSchemeClass sss, GlibFilePath fp) => ReadAttr sss fp

-- | Style scheme id, a unique string used to identify the style scheme in
--   <a>SourceStyleSchemeManager</a>.
--   
--   Default value: ""
sourceStyleSchemeId :: (SourceStyleSchemeClass sss, GlibString string) => ReadAttr sss string

-- | Style scheme name, a translatable string to present to user.
--   
--   Default value: ""
sourceStyleSchemeName :: (SourceStyleSchemeClass sss, GlibString string) => ReadAttr sss string


module Graphics.UI.Gtk.SourceView.SourceStyleSchemeManager
data SourceStyleSchemeManager
class GObjectClass o => SourceStyleSchemeManagerClass o

-- | Creates a new style manager. If you do not need more than one style
--   manager then use <a>sourceStyleSchemeManagerGetDefault</a> instead.
sourceStyleSchemeManagerNew :: IO SourceStyleSchemeManager

-- | Returns the default <a>SourceStyleSchemeManager</a> instance.
sourceStyleSchemeManagerGetDefault :: IO SourceStyleSchemeManager

-- | Sets the list of directories where the manager looks for style scheme
--   files. If dirs is <a>Nothing</a>, the search path is reset to default.
sourceStyleSchemeManagerSetSearchPath :: (SourceStyleSchemeManagerClass sssm, GlibFilePath fp) => sssm -> Maybe [fp] -> IO ()

-- | Appends path to the list of directories where the manager looks for
--   style scheme files. See <a>sourceStyleSchemeManagerSetSearchPath</a>
--   for details.
sourceStyleSchemeManagerAppendSearchPath :: (SourceStyleSchemeManagerClass sssm, GlibFilePath fp) => sssm -> fp -> IO ()

-- | Prepends path to the list of directories where the manager looks for
--   style scheme files. See <a>sourceStyleSchemeManagerSetSearchPath</a>
--   for details.
sourceStyleSchemeManagerPrependSearchPath :: (SourceStyleSchemeManagerClass sssm, GlibFilePath fp) => sssm -> fp -> IO ()

-- | Returns the current search path for the manager. See
--   <a>sourceStyleSchemeManagerSetSearchPath</a> for details.
sourceStyleSchemeManagerGetSearchPath :: (SourceStyleSchemeManagerClass sssm, GlibFilePath fp) => sssm -> IO [fp]

-- | Returns the ids of the available style schemes.
sourceStyleSchemeManagerGetSchemeIds :: (SourceStyleSchemeManagerClass sssm, GlibString string) => sssm -> IO [string]

-- | Looks up style scheme by id.
sourceStyleSchemeManagerGetScheme :: (SourceStyleSchemeManagerClass sssm, GlibString string) => sssm -> string -> IO SourceStyleScheme

-- | Mark any currently cached information about the available style
--   scehems as invalid. All the available style schemes will be reloaded
--   next time the manager is accessed.
sourceStyleSchemeManagerForceRescan :: SourceStyleSchemeManagerClass sssm => sssm -> IO ()

-- | List of the ids of the available style schemes.
sourceStyleSchemeManagerStyleIds :: (SourceStyleSchemeManagerClass sssm, GlibString string) => ReadAttr sssm [string]

-- | List of directories and files where the style schemes are located.
sourceStyleSchemeManagerSearchPath :: (SourceStyleSchemeManagerClass sssm, GlibFilePath fp) => ReadWriteAttr sssm [fp] (Maybe [fp])


module Graphics.UI.Gtk.SourceView.SourceMark
data SourceMark
class TextMarkClass o => SourceMarkClass o
castToSourceMark :: GObjectClass obj => obj -> SourceMark
gTypeSourceMark :: GType
toSourceMark :: SourceMarkClass o => o -> SourceMark

-- | Creates a text mark. Add it to a buffer using
--   <tt>textBufferAddMark</tt>. If name is <a>Nothing</a>, the mark is
--   anonymous; otherwise, the mark can be retrieved by name using
--   <tt>textBufferGetMark</tt>. Normally marks are created using the
--   utility function <tt>sourceBufferCreateMark</tt>.
sourceMarkNew :: GlibString string => Maybe string -> string -> IO SourceMark

-- | Returns the mark category
sourceMarkGetCategory :: (SourceMarkClass mark, GlibString string) => mark -> IO string

-- | Returns the next <a>SourceMark</a> in the buffer or <a>Nothing</a> if
--   the mark was not added to a buffer. If there is no next mark,
--   <a>Nothing</a> will be returned.
--   
--   If category is <a>Nothing</a>, looks for marks of any category
sourceMarkNext :: (SourceMarkClass mark, GlibString string) => mark -> Maybe string -> IO (Maybe SourceMark)

-- | Returns the previous <a>SourceMark</a> in the buffer or <a>Nothing</a>
--   if the mark was not added to a buffer. If there is no previous mark,
--   <a>Nothing</a> is returned.
--   
--   If category is <a>Nothing</a>, looks for marks of any category
sourceMarkPrev :: (SourceMarkClass mark, GlibString string) => mark -> Maybe string -> IO (Maybe SourceMark)

-- | The category of the <a>SourceMark</a>, classifies the mark and
--   controls which pixbuf is used and with which priority it is drawn.
--   Default value: ""
sourceMarkCategory :: (SourceMarkClass mark, GlibString string) => Attr mark string


module Graphics.UI.Gtk.SourceView.SourceLanguageManager
data SourceLanguageManager
class GObjectClass o => SourceLanguageManagerClass o
castToSourceLanguageManager :: GObjectClass obj => obj -> SourceLanguageManager
gTypeSourceLanguageManager :: GType
toSourceLanguageManager :: SourceLanguageManagerClass o => o -> SourceLanguageManager

-- | Creates a new language manager. If you do not need more than one
--   language manager or a private language manager instance then use
--   <a>sourceLanguageManagerGetDefault</a> instead.
sourceLanguageManagerNew :: IO SourceLanguageManager

-- | Returns the default <a>SourceLanguageManager</a> instance.
sourceLanguageManagerGetDefault :: IO SourceLanguageManager

-- | Sets the list of directories where the lm looks for language files. If
--   dirs is <a>Nothing</a>, the search path is reset to default.
--   
--   Note
--   
--   At the moment this function can be called only before the language
--   files are loaded for the first time. In practice to set a custom
--   search path for a <a>SourceLanguageManager</a>, you have to call this
--   function right after creating it.
sourceLanguageManagerSetSearchPath :: (SourceLanguageManagerClass slm, GlibFilePath fp) => slm -> Maybe [fp] -> IO ()

-- | Gets the list directories where lm looks for language files.
sourceLanguageManagerGetSearchPath :: (SourceLanguageManagerClass slm, GlibFilePath fp) => slm -> IO [fp]

-- | Returns the ids of the available languages.
sourceLanguageManagerGetLanguageIds :: (SourceLanguageManagerClass slm, GlibString string) => slm -> IO [string]

-- | Gets the <a>SourceLanguage</a> identified by the given id in the
--   language manager.
sourceLanguageManagerGetLanguage :: (SourceLanguageManagerClass slm, GlibString string) => slm -> string -> IO (Maybe SourceLanguage)

-- | Picks a <a>SourceLanguage</a> for given file name and content type,
--   according to the information in lang files. Either filename or
--   <tt>contentType</tt> may be <a>Nothing</a>.
sourceLanguageManagerGuessLanguage :: (SourceLanguageManagerClass slm, GlibFilePath fp, GlibString string) => slm -> Maybe fp -> Maybe string -> IO (Maybe SourceLanguage)

-- | List of the ids of the available languages.
sourceLanguageManagerLanguageIds :: (SourceLanguageManagerClass slm, GlibString string) => ReadAttr slm [string]

-- | List of directories where the language specification files (.lang) are
--   located.
sourceLanguageManagerSearchPath :: (SourceLanguageManagerClass slm, GlibString string) => ReadWriteAttr slm [string] (Maybe [string])


module Graphics.UI.Gtk.SourceView.SourceLanguage
data SourceLanguage
class GObjectClass o => SourceLanguageClass o
castToSourceLanguage :: GObjectClass obj => obj -> SourceLanguage
gTypeSourceLanguage :: GType
toSourceLanguage :: SourceLanguageClass o => o -> SourceLanguage

-- | Returns the ID of the language. The ID is not locale-dependent.
sourceLanguageGetId :: (SourceLanguageClass sl, GlibString string) => sl -> IO string

-- | Returns the localized name of the language.
sourceLanguageGetName :: (SourceLanguageClass sl, GlibString string) => sl -> IO string

-- | Returns the localized section of the language. Each language belong to
--   a section (ex. HTML belogs to the Markup section).
sourceLanguageGetSection :: (SourceLanguageClass sl, GlibString string) => sl -> IO string

-- | Returns whether the language should be hidden from the user.
sourceLanguageGetHidden :: SourceLanguageClass sl => sl -> IO Bool
sourceLanguageGetMetadata :: (SourceLanguageClass sl, GlibString string) => sl -> string -> IO string

-- | Returns the mime types associated to this language. This is just an
--   utility wrapper around 'sourceLanguageGetMetadata ' to retrieve the
--   "mimetypes" metadata property and split it into an array.
sourceLanguageGetMimeTypes :: (SourceLanguageClass sl, GlibString string) => sl -> IO [string]

-- | Returns the globs associated to this language. This is just an utility
--   wrapper around <a>sourceLanguageGetMetadata</a> to retrieve the
--   "globs" metadata property and split it into an array.
sourceLanguageGetGlobs :: (SourceLanguageClass sl, GlibString string) => sl -> IO [string]

-- | Returns the name of the style with ID <tt>styleId</tt> defined by this
--   language.
sourceLanguageGetStyleName :: (SourceLanguageClass sl, GlibString string) => sl -> string -> IO string

-- | Returns the ids of the styles defined by this language.
sourceLanguageGetStyleIds :: (SourceLanguageClass sl, GlibString string) => sl -> IO [string]

-- | Whether the language should be hidden from the user.
--   
--   Default value: <a>False</a>
sourceLanguageHidden :: SourceLanguageClass sl => ReadAttr sl Bool

-- | Language id.
--   
--   Default value: ""
sourceLanguageId :: (SourceLanguageClass sl, GlibString string) => ReadAttr sl string

-- | Language name.
--   
--   Default value: ""
sourceLanguageName :: (SourceLanguageClass sl, GlibString string) => ReadAttr sl string

-- | Language section.
--   
--   Default value: ""
sourceLanguageSection :: (SourceLanguageClass sl, GlibString string) => ReadAttr sl string


module Graphics.UI.Gtk.SourceView.SourceBuffer
data SourceBuffer
class TextBufferClass o => SourceBufferClass o
castToSourceBuffer :: GObjectClass obj => obj -> SourceBuffer
gTypeSourceBuffer :: GType
toSourceBuffer :: SourceBufferClass o => o -> SourceBuffer

-- | Create a new <a>SourceBuffer</a>, possibly taking a
--   <a>TextTagTable</a>.
sourceBufferNew :: Maybe TextTagTable -> IO SourceBuffer

-- | Create a new <a>SourceBuffer</a> with a <a>SourceLanguage</a>.
sourceBufferNewWithLanguage :: SourceLanguage -> IO SourceBuffer

-- | Controls whether syntax is highlighted in the buffer. If highlight is
--   <a>True</a>, the text will be highlighted according to the syntax
--   patterns specified in the language set with
--   <a>sourceBufferSetLanguage</a>. If highlight is <a>False</a>, syntax
--   highlighting is disabled and all the <a>TextTag</a> objects that have
--   been added by the syntax highlighting engine are removed from the
--   buffer.
sourceBufferSetHighlightSyntax :: SourceBufferClass buffer => buffer -> Bool -> IO ()

-- | Determines whether syntax highlighting is activated in the source
--   buffer.
sourceBufferGetHighlightSyntax :: SourceBufferClass buffer => buffer -> IO Bool

-- | Associate a <a>SourceLanguage</a> with the source buffer. If language
--   is not-<a>Nothing</a> and syntax highlighting is enabled (see
--   <a>sourceBufferSetHighlightSyntax</a>, the syntax patterns defined in
--   language will be used to highlight the text contained in the buffer.
--   If language is <a>Nothing</a>, the text contained in the buffer is not
--   highlighted.
sourceBufferSetLanguage :: SourceBufferClass buffer => buffer -> Maybe SourceLanguage -> IO ()

-- | Returns the <a>SourceLanguage</a> associated with the buffer, see
--   <a>sourceBufferSetLanguage</a>.
sourceBufferGetLanguage :: SourceBufferClass buffer => buffer -> IO (Maybe SourceLanguage)

-- | Controls the bracket match highlighting function in the buffer. If
--   activated, when you position your cursor over a bracket character (a
--   parenthesis, a square bracket, etc.) the matching opening or closing
--   bracket character will be highlighted. You can specify the style with
--   the <tt>sourceBufferSetBracketMatchStyle</tt> function.
sourceBufferSetHighlightMatchingBrackets :: SourceBufferClass buffer => buffer -> Bool -> IO ()

-- | Determines whether bracket match highlighting is activated for the
--   source buffer.
sourceBufferGetHighlightMatchingBrackets :: SourceBufferClass buffer => buffer -> IO Bool

-- | Sets style scheme used by the buffer. If scheme is <a>Nothing</a> no
--   style scheme is used.
sourceBufferSetStyleScheme :: SourceBufferClass buffer => buffer -> Maybe SourceStyleScheme -> IO ()

-- | Returns the <a>SourceStyleScheme</a> currently used in buffer.
sourceBufferGetStyleScheme :: SourceBufferClass buffer => buffer -> IO (Maybe SourceStyleScheme)

-- | Sets the number of undo levels for user actions the buffer will track.
--   If the number of user actions exceeds the limit set by this function,
--   older actions will be discarded.
--   
--   If <tt>maxUndoLevels</tt> is -1, no limit is set.
--   
--   A new action is started whenever the function
--   <tt>textBufferBeginUserAction</tt> is called. In general, this happens
--   whenever the user presses any key which modifies the buffer, but the
--   undo manager will try to merge similar consecutive actions, such as
--   multiple character insertions into one action. But, inserting a
--   newline does start a new action.
sourceBufferSetMaxUndoLevels :: SourceBufferClass buffer => buffer -> Int -> IO ()

-- | Determines the number of undo levels the buffer will track for buffer
--   edits.
sourceBufferGetMaxUndoLevels :: SourceBufferClass buffer => buffer -> IO Int

-- | Determines whether a source buffer can undo the last action.
sourceBufferGetCanUndo :: SourceBufferClass buffer => buffer -> IO Bool

-- | Determines whether a source buffer can redo the last action (i.e. if
--   the last operation was an undo).
sourceBufferGetCanRedo :: SourceBufferClass buffer => buffer -> IO Bool

-- | Undoes the last user action which modified the buffer. Use
--   <a>sourceBufferCanUndo</a> to check whether a call to this function
--   will have any effect.
--   
--   Actions are defined as groups of operations between a call to
--   <tt>textBufferBeginUserAction</tt> and
--   <tt>textBufferEndUserAction</tt> on the same line.
sourceBufferUndo :: SourceBufferClass buffer => buffer -> IO ()

-- | Redoes the last undo operation. Use <a>sourceBufferCanRedo</a> to
--   check whether a call to this function will have any effect.
sourceBufferRedo :: SourceBufferClass buffer => buffer -> IO ()

-- | Marks the beginning of a not undoable action on the buffer, disabling
--   the undo manager. Typically you would call this function before
--   initially setting the contents of the buffer (e.g. when loading a file
--   in a text editor).
--   
--   You may nest <a>sourceBufferBeginNotUndoableAction</a> /
--   <a>sourceBufferEndNotUndoableAction</a> blocks.
sourceBufferBeginNotUndoableAction :: SourceBufferClass buffer => buffer -> IO ()

-- | Marks the end of a not undoable action on the buffer. When the last
--   not undoable block is closed through the call to this function, the
--   list of undo actions is cleared and the undo manager is re-enabled.
sourceBufferEndNotUndoableAction :: SourceBufferClass buffer => buffer -> IO ()

-- | Creates a marker in the buffer of the given type.
--   
--   <ul>
--   <li>A marker is semantically very similar to a <a>TextMark</a>, except
--   it has a type which is used by the <a>SourceView</a> displaying the
--   buffer to show a pixmap on the left margin, at the line the marker is
--   in. Because of this, a marker is generally associated to a line and
--   not a character position. Markers are also accessible through a
--   position or range in the buffer.</li>
--   <li>Markers are implemented using <a>TextMark</a>, so all
--   characteristics and restrictions to marks apply to markers too. These
--   includes life cycle issues and <a>onMarkSet</a> and
--   <a>onMarkDeleted</a> signal emissions.</li>
--   <li>Like a <a>TextMark</a>, a <tt>SourceMarker</tt> can be anonymous
--   if the passed name is <tt>Nothing</tt>. Also, the buffer owns the
--   markers so you shouldn't unreference it.</li>
--   </ul>
sourceBufferCreateSourceMark :: (SourceBufferClass buffer, GlibString string) => buffer -> Maybe string -> string -> TextIter -> IO SourceMark

-- | Returns the list of marks of the given category at line. If category
--   is empty, all marks at line are returned.
sourceBufferGetSourceMarksAtLine :: (SourceBufferClass buffer, GlibString string) => buffer -> Int -> string -> IO [SourceMark]

-- | Returns the list of marks of the given category at iter. If category
--   is empty it returns all marks at iter.
sourceBufferGetSourceMarksAtIter :: (SourceBufferClass buffer, GlibString string) => buffer -> TextIter -> string -> IO [SourceMark]

-- | Remove all marks of category between start and end from the buffer. If
--   category is empty, all marks in the range will be removed.
sourceBufferRemoveSourceMarks :: (SourceBufferClass buffer, GlibString string) => buffer -> TextIter -> TextIter -> string -> IO ()

-- | Moves iter to the position of the next <a>SourceMark</a> of the given
--   category. Returns <a>True</a> if iter was moved. If category is empty,
--   the next source mark can be of any category.
sourceBufferForwardIterToSourceMark :: (SourceBufferClass buffer, GlibString string) => buffer -> TextIter -> string -> IO Bool

-- | Moves iter to the position of the previous <a>SourceMark</a> of the
--   given category. Returns <a>True</a> if iter was moved. If category is
--   empty, the previous source mark can be of any category.
sourceBufferBackwardIterToSourceMark :: (SourceBufferClass buffer, GlibString string) => buffer -> TextIter -> string -> IO Bool

-- | Forces buffer to analyze and highlight the given area synchronously.
--   
--   Note
--   
--   This is a potentially slow operation and should be used only when you
--   need to make sure that some text not currently visible is highlighted,
--   for instance before printing.
sourceBufferEnsureHighlight :: SourceBufferClass buffer => buffer -> TextIter -> TextIter -> IO ()

-- | Whether Redo operation is possible.
--   
--   Default value: <a>False</a>
sourceBufferCanRedo :: SourceBufferClass buffer => ReadAttr buffer Bool

-- | Whether Undo operation is possible.
--   
--   Default value: <a>False</a>
sourceBufferCanUndo :: SourceBufferClass buffer => ReadAttr buffer Bool

-- | Whether to highlight matching brackets in the buffer.
--   
--   Default value: <a>True</a>
sourceBufferHighlightMatchingBrackets :: SourceBufferClass buffer => Attr buffer Bool

-- | Whether to highlight syntax in the buffer.
--   
--   Default value: <a>True</a>
sourceBufferHighlightSyntax :: SourceBufferClass buffer => Attr buffer Bool

-- | Language object to get highlighting patterns from.
sourceBufferLanguage :: SourceBufferClass buffer => Attr buffer (Maybe SourceLanguage)

-- | Style scheme. It contains styles for syntax highlighting, optionally
--   foreground, background, cursor color, current line color, and matching
--   brackets style.
sourceBufferSourceStyleScheme :: SourceBufferClass buffer => Attr buffer (Maybe SourceStyleScheme)

-- | Number of undo levels for the buffer. -1 means no limit. This property
--   will only affect the default undo manager.
--   
--   Allowed values: &gt;= GMaxulong
--   
--   Default value: 1000
sourceBufferMaxUndoLevels :: SourceBufferClass buffer => Attr buffer Int

-- | The buffer undo manager.
sourceBufferUndoManager :: SourceBufferClass buffer => Attr buffer SourceUndoManager
sourceBufferHighlightUpdated :: SourceBufferClass buffer => Signal buffer (TextIter -> TextIter -> IO ())
sourceBufferRedoSignal :: SourceBufferClass buffer => Signal buffer (IO ())
sourceBufferUndoSignal :: SourceBufferClass buffer => Signal buffer (IO ())

-- | The <tt>sourceBufferMarkUpdated</tt> signal is emitted each time a
--   mark is added to, moved or removed from the buffer.
sourceBufferSourceMarkUpdated :: SourceBufferClass buffer => Signal buffer (TextMark -> IO ())


module Graphics.UI.Gtk.SourceView.SourceCompletion
data SourceCompletion
class GObjectClass o => SourceCompletionClass o

-- | Add a new <a>SourceCompletionProvider</a> to the completion object.
--   This will add a reference provider, so make sure to unref your own
--   copy when you no longer need it.
sourceCompletionAddProvider :: SourceCompletionClass sc => sc -> SourceCompletionProvider -> IO Bool

-- | Remove provider from the completion.
sourceCompletionRemoveProvider :: SourceCompletionClass sc => sc -> SourceCompletionProvider -> IO Bool

-- | Get list of providers registered on completion. The returned list is
--   owned by the completion and should not be freed.
sourceCompletionGetProviders :: SourceCompletionClass sc => sc -> IO [SourceCompletionProvider]

-- | Starts a new completion with the specified
--   <a>SourceCompletionContext</a> and a list of potential candidate
--   providers for completion.
sourceCompletionShow :: SourceCompletionClass sc => sc -> [SourceCompletionProvider] -> SourceCompletionContext -> IO Bool

-- | Hides the completion if it is active (visible).
sourceCompletionHide :: SourceCompletionClass sc => sc -> IO ()

-- | The info widget is the window where the completion displays optional
--   extra information of the proposal.
sourceCompletionGetInfoWindow :: SourceCompletionClass sc => sc -> IO SourceCompletionInfo

-- | Create a new <a>SourceCompletionContext</a> for completion. The
--   position at which the completion using the new context will consider
--   completion can be provider by position. If position is <a>Nothing</a>,
--   the current cursor position will be used.
sourceCompletionCreateContext :: SourceCompletionClass sc => sc -> Maybe TextIter -> IO SourceCompletionContext

-- | Move the completion window to a specific iter.
sourceCompletionMoveWindow :: SourceCompletionClass sc => sc -> TextIter -> IO ()

-- | Block interactive completion. This can be used to disable interactive
--   completion when inserting or deleting text from the buffer associated
--   with the completion. Use <a>sourceCompletionUnblockInteractive</a> to
--   enable interactive completion again.
sourceCompletionBlockInteractive :: SourceCompletionClass sc => sc -> IO ()

-- | Unblock interactive completion. This can be used after using
--   <a>sourceCompletionBlockInteractive</a> to enable interactive
--   completion again.
sourceCompletionUnblockInteractive :: SourceCompletionClass sc => sc -> IO ()

-- | Number of accelerators to show for the first proposals.
--   
--   Allowed values: &lt;= 10
--   
--   Default value: 5
sourceCompletionAccelerators :: SourceCompletionClass sc => Attr sc Int

-- | Determines the popup delay (in milliseconds) at which the completion
--   will be shown for interactive completion.
--   
--   Default value: 250
sourceCompletionAutoCompleteDelay :: SourceCompletionClass sc => Attr sc Int

-- | The scroll page size of the proposals in the completion window.
--   
--   Allowed values: &gt;= 1
--   
--   Default value: 5
sourceCompletionProposalPageSize :: SourceCompletionClass sc => Attr sc Int

-- | The scroll page size of the provider pages in the completion window.
--   
--   Allowed values: &gt;= 1
--   
--   Default value: 5
sourceCompletionProviderPageSize :: SourceCompletionClass sc => Attr sc Int

-- | Determines whether the visibility of the info window should be saved
--   when the completion is hidden, and restored when the completion is
--   shown again.
--   
--   Default value: <a>False</a>
sourceCompletionRememberInfoVisibility :: SourceCompletionClass sc => Attr sc Bool

-- | Determines whether the first proposal should be selected when the
--   completion is first shown.
--   
--   Default value: <a>True</a>
sourceCompletionSelectOnShow :: SourceCompletionClass sc => Attr sc Bool

-- | Determines whether provider headers should be shown in the proposal
--   list if there is more than one provider with proposals.
--   
--   Default value: <a>True</a>
sourceCompletionShowHeaders :: SourceCompletionClass sc => Attr sc Bool

-- | Determines whether provider and proposal icons should be shown in the
--   completion popup.
--   
--   Default value: <a>True</a>
sourceCompletionShowIcons :: SourceCompletionClass sc => Attr sc Bool

-- | The <a>SourceView</a> bound to the completion object.
sourceCompletionView :: SourceCompletionClass sc => Attr sc SourceView

-- | The <tt>activateProposal</tt> signal is a keybinding signal which gets
--   emitted when the user initiates a proposal activation.
--   
--   Applications should not connect to it, but may emit it with
--   <tt>gSignalEmitByName</tt> if they need to control the proposal
--   activation programmatically.
sourceCompletionActivateProposal :: SourceCompletionClass sc => Signal sc (IO ())

-- | Emitted when the completion window is hidden. The default handler will
--   actually hide the window.
sourceCompletionHideSignal :: SourceCompletionClass sc => Signal sc (IO ())

-- | The <tt>moveCursor</tt> signal is a keybinding signal which gets
--   emitted when the user initiates a cursor movement.
--   
--   Applications should not connect to it, but may emit it with
--   <tt>gSignalEmitByName</tt> if they need to control the cursor
--   programmatically.
sourceCompletionMoveCursor :: SourceCompletionClass sc => Signal sc (ScrollStep -> Int -> IO ())

-- | The <tt>movePage</tt> signal is a keybinding signal which gets emitted
--   when the user initiates a page movement (i.e. switches between
--   provider pages).
--   
--   Applications should not connect to it, but may emit it with
--   <tt>gSignalEmitByName</tt> if they need to control the page selection
--   programmatically.
sourceCompletionMovePage :: SourceCompletionClass sc => Signal sc (ScrollStep -> Int -> IO ())

-- | Emitted just before starting to populate the completion with
--   providers. You can use this signal to add additional attributes in the
--   context.
sourceCompletionPopulateContext :: SourceCompletionClass sc => Signal sc (SourceCompletionContext -> IO ())

-- | Emitted when the completion window is shown. The default handler will
--   actually show the window.
sourceCompletionShowSignal :: SourceCompletionClass sc => Signal sc (IO ())


module Graphics.UI.Gtk.SourceView.SourceCompletionInfo
data SourceCompletionInfo
class WindowClass o => SourceCompletionInfoClass o
sourceCompletionInfoNew :: IO SourceCompletionInfo

-- | Moves the <a>SourceCompletionInfo</a> to iter. If iter is
--   <a>Nothing</a> info is moved to the cursor position. Moving will
--   respect the <tt>Gravity</tt> setting of the info window and will
--   ensure the line at iter is not occluded by the window.
sourceCompletionInfoMoveToIter :: SourceCompletionInfoClass info => info -> TextView -> Maybe TextIter -> IO ()

-- | Set sizing information for the info window. If <tt>shrinkWidth</tt> or
--   <tt>shrinkHeight</tt> is <a>True</a>, the info window will try to
--   resize to fit the window contents, with a maximum size given by width
--   and height. Setting width or height to -1 removes the maximum size of
--   respectively the width and height of the window.
sourceCompletionInfoSetSizing :: SourceCompletionInfoClass info => info -> Int -> Int -> Bool -> Bool -> IO ()

-- | Sets the content widget of the info window. If widget does not fit
--   within the size requirements of the window, a <a>ScrolledWindow</a>
--   will automatically be created and added to the window.
sourceCompletionInfoSetWidget :: (SourceCompletionInfoClass info, WidgetClass widget) => info -> widget -> IO ()

-- | Get the current content widget.
sourceCompletionInfoGetWidget :: SourceCompletionInfoClass info => info -> IO Widget
sourceCompletionInfoProcessResize :: SourceCompletionInfoClass info => info -> IO ()

-- | The maximum allowed height.
--   
--   Allowed values: &gt;= GMaxulong
--   
--   Default value: -1
sourceCompletionInfoMaxHeight :: SourceCompletionInfoClass info => Attr info Int

-- | The maximum allowed width.
--   
--   Allowed values: &gt;= GMaxulong
--   
--   Default value: -1
sourceCompletionInfoMaxWidth :: SourceCompletionInfoClass info => Attr info Int

-- | Whether the window should shrink height to fit the contents.
--   
--   Default value: <a>True</a>
sourceCompletionInfoShrinkHeight :: SourceCompletionInfoClass info => Attr info Bool

-- | Whether the window should shrink width to fit the contents.
--   
--   Default value: <a>True</a>
sourceCompletionInfoShrinkWidth :: SourceCompletionInfoClass info => Attr info Bool
sourceCompletionInfoBeforeShow :: SourceCompletionInfoClass info => Signal info (IO ())


module Graphics.UI.Gtk.SourceView.SourceCompletionItem
data SourceCompletionItem
class GObjectClass o => SourceCompletionItemClass o

-- | Create a new <a>SourceCompletionItem</a> with label label, icon icon
--   and extra information info. Both icon and info can be <a>Nothing</a>
--   in which case there will be no icon shown and no extra information
--   available.
sourceCompletionItemNew :: GlibString string => string -> string -> Maybe Pixbuf -> string -> IO SourceCompletionItem

-- | Create a new <a>SourceCompletionItem</a> with markup label markup,
--   icon icon and extra information info. Both icon and info can be
--   <a>Nothing</a> in which case there will be no icon shown and no extra
--   information available.
sourceCompletionItemNewWithMarkup :: GlibString string => string -> string -> Maybe Pixbuf -> string -> IO SourceCompletionItem

-- | Creates a new <a>SourceCompletionItem</a> from a stock item. If label
--   is <a>Nothing</a>, the stock label will be used.
sourceCompletionItemNewFromStock :: GlibString string => Maybe string -> string -> string -> string -> IO SourceCompletionItem

-- | Icon to be shown for this proposal.
sourceCompletionItemIcon :: SourceCompletionItemClass item => Attr item Pixbuf

-- | Optional extra information to be shown for this proposal.
--   
--   Default value: ""
sourceCompletionItemInfo :: (SourceCompletionItemClass item, GlibString string) => Attr item string

-- | Optional extra labelrmation to be shown for this proposal.
--   
--   Default value: ""
sourceCompletionItemLabel :: (SourceCompletionItemClass item, GlibString string) => Attr item string

-- | Optional extra markuprmation to be shown for this proposal.
--   
--   Default value: ""
sourceCompletionItemMarkup :: (SourceCompletionItemClass item, GlibString string) => Attr item string

-- | Optional extra textrmation to be shown for this proposal.
--   
--   Default value: ""
sourceCompletionItemText :: (SourceCompletionItemClass item, GlibString string) => Attr item string


module Graphics.UI.Gtk.SourceView.SourceCompletionProposal
data SourceCompletionProposal
class GObjectClass o => SourceCompletionProposalClass o

-- | Gets the label of proposal. The label is shown in the list of
--   proposals as plain text. If you need any markup (such as bold or
--   italic text), you have to implement
--   <a>sourceCompletionProposalGetMarkup</a>.
sourceCompletionProposalGetLabel :: (SourceCompletionProposalClass scp, GlibString string) => scp -> IO string

-- | Gets the label of proposal with markup. The label is shown in the list
--   of proposals and may contain markup. This will be used instead of
--   <a>sourceCompletionProposalGetLabel</a> if implemented.
sourceCompletionProposalGetMarkup :: (SourceCompletionProposalClass scp, GlibString string) => scp -> IO string

-- | Gets the text of proposal. The text that is inserted into the text
--   buffer when the proposal is activated by the default activation. You
--   are free to implement a custom activation handler in the provider and
--   not implement this function.
sourceCompletionProposalGetText :: (SourceCompletionProposalClass scp, GlibString string) => scp -> IO string

-- | Gets the icon of proposal.
sourceCompletionProposalGetIcon :: SourceCompletionProposalClass scp => scp -> IO Pixbuf

-- | Gets extra information associated to the proposal. This information
--   will be used to present the user with extra, detailed information
--   about the selected proposal.
sourceCompletionProposalGetInfo :: (SourceCompletionProposalClass scp, GlibString string) => scp -> IO string

-- | Get the hash value of proposal. This is used to (together with
--   <a>sourceCompletionProposalEqual</a>) to match proposals in the
--   completion model.
sourceCompletionProposalHash :: SourceCompletionProposalClass scp => scp -> IO Int

-- | Get whether two proposal objects are the same. This is used to
--   (together with <a>sourceCompletionProposalHash</a>) to match proposals
--   in the completion model.
sourceCompletionProposalEqual :: (SourceCompletionProposalClass scp1, SourceCompletionProposalClass scp2) => scp1 -> scp2 -> IO Bool

-- | Emitted when the proposal has changed. The completion popup will react
--   to this by updating the shown information.
sourceCompletionProposalChanged :: SourceCompletionProposalClass scp => Signal scp (IO ())


module Graphics.UI.Gtk.SourceView.SourceGutter
data SourceGutter
class GObjectClass o => SourceGutterClass o

-- | Get the <a>Window</a> of the gutter. The window will only be available
--   when the gutter has at least one, non-zero width, cell renderer
--   packed.
sourceGutterGetWindow :: SourceGutterClass sg => sg -> IO (Maybe DrawWindow)

-- | Sets the <a>SourceGutterDataFunc</a> to use for renderer. This
--   function is used to setup the cell renderer properties for rendering
--   the current cell.
sourceGutterSetCellDataFunc :: (SourceGutterClass sg, CellRendererClass cell) => sg -> cell -> (CellRenderer -> Int -> Bool -> IO ()) -> IO ()

-- | Sets the <a>SourceGutterSizeFunc</a> to use for renderer. This
--   function is used to setup the cell renderer properties for measuring
--   the maximum size of the cell.
sourceGutterSetCellSizeFunc :: (SourceGutterClass gutter, CellRendererClass cell) => gutter -> cell -> (CellRenderer -> IO ()) -> IO ()

-- | The <a>SourceView</a> of the gutter
sourceGutterView :: SourceGutterClass sg => Attr sg SourceView

-- | The text window type on which the window is placed
--   
--   Default value: <a>TextWindowPrivate</a>
sourceGutterWindowType :: SourceGutterClass sg => Attr sg TextWindowType

-- | Emitted when a cell has been activated (for instance when there was a
--   button press on the cell). The signal is only emitted for cells that
--   have the activatable property set to <a>True</a>.
sourceGutterCellActivated :: SourceGutterClass sg => Signal sg (CellRenderer -> TextIter -> EventM EAny ())

-- | Emitted when a tooltip is requested for a specific cell. Signal
--   handlers can return <a>True</a> to notify the tooltip has been
--   handled.
sourceGutterQueryTooltip :: SourceGutterClass sg => Signal sg (CellRenderer -> TextIter -> Tooltip -> IO Bool)


module Graphics.UI.Gtk.SourceView.SourceUndoManager
data SourceUndoManager
class GObjectClass o => SourceUndoManagerClass o

-- | Get whether there are undo operations available.
sourceUndoManagerCanUndo :: SourceUndoManagerClass sum => sum -> IO Bool

-- | Get whether there are redo operations available.
sourceUndoManagerCanRedo :: SourceUndoManagerClass sum => sum -> IO Bool

-- | Perform a single undo. Calling this function when there are no undo
--   operations available is an error. Use
--   <tt>gtkSourceUndoManagerCanUndo</tt> to find out if there are undo
--   operations available.
sourceUndoManagerUndo :: SourceUndoManagerClass sum => sum -> IO ()

-- | Perform a single redo. Calling this function when there are no redo
--   operations available is an error. Use
--   <tt>gtkSourceUndoManagerCanRedo</tt> to find out if there are redo
--   operations available.
sourceUndoManagerRedo :: SourceUndoManagerClass sum => sum -> IO ()

-- | Begin a not undoable action on the buffer. All changes between this
--   call and the call to <tt>gtkSourceUndoManagerEndNotUndoableAction</tt>
--   cannot be undone. This function should be re-entrant.
sourceUndoManagerBeginNotUndoableAction :: SourceUndoManagerClass sum => sum -> IO ()

-- | Ends a not undoable action on the buffer.
sourceUndoManagerEndNotUndoableAction :: SourceUndoManagerClass sum => sum -> IO ()

-- | Emitted when the ability to redo has changed.
sourceUndoManagerCanRedoChanged :: SourceUndoManagerClass sum => Signal sum (IO ())

-- | Emitted when the ability to undo has changed.
sourceUndoManagerCanUndoChanged :: SourceUndoManagerClass sum => Signal sum (IO ())


module Graphics.UI.Gtk.SourceView.Enums
data SourceCompletionActivation
SourceCompletionActivationNone :: SourceCompletionActivation
SourceCompletionActivationInteractive :: SourceCompletionActivation
SourceCompletionActivationUserRequested :: SourceCompletionActivation
data SourceSearchFlags
SourceSearchVisibleOnly :: SourceSearchFlags
SourceSearchTextOnly :: SourceSearchFlags
SourceSearchCaseInsensitive :: SourceSearchFlags
data SourceSmartHomeEndType
SourceSmartHomeEndDisabled :: SourceSmartHomeEndType
SourceSmartHomeEndBefore :: SourceSmartHomeEndType
SourceSmartHomeEndAfter :: SourceSmartHomeEndType
SourceSmartHomeEndAlways :: SourceSmartHomeEndType
data SourceDrawSpacesFlags
SourceDrawSpacesSpace :: SourceDrawSpacesFlags
SourceDrawSpacesTab :: SourceDrawSpacesFlags
SourceDrawSpacesNewline :: SourceDrawSpacesFlags
SourceDrawSpacesNbsp :: SourceDrawSpacesFlags
SourceDrawSpacesLeading :: SourceDrawSpacesFlags
SourceDrawSpacesText :: SourceDrawSpacesFlags
SourceDrawSpacesTrailing :: SourceDrawSpacesFlags
SourceDrawSpacesAll :: SourceDrawSpacesFlags
data SourceViewGutterPosition
SourceViewGutterPositionLines :: SourceViewGutterPosition
SourceViewGutterPositionMarks :: SourceViewGutterPosition
instance GHC.Read.Read Graphics.UI.Gtk.SourceView.Enums.SourceViewGutterPosition
instance GHC.Show.Show Graphics.UI.Gtk.SourceView.Enums.SourceViewGutterPosition
instance GHC.Enum.Bounded Graphics.UI.Gtk.SourceView.Enums.SourceViewGutterPosition
instance GHC.Classes.Eq Graphics.UI.Gtk.SourceView.Enums.SourceViewGutterPosition
instance GHC.Read.Read Graphics.UI.Gtk.SourceView.Enums.SourceDrawSpacesFlags
instance GHC.Show.Show Graphics.UI.Gtk.SourceView.Enums.SourceDrawSpacesFlags
instance GHC.Enum.Bounded Graphics.UI.Gtk.SourceView.Enums.SourceDrawSpacesFlags
instance GHC.Classes.Eq Graphics.UI.Gtk.SourceView.Enums.SourceDrawSpacesFlags
instance GHC.Read.Read Graphics.UI.Gtk.SourceView.Enums.SourceSmartHomeEndType
instance GHC.Show.Show Graphics.UI.Gtk.SourceView.Enums.SourceSmartHomeEndType
instance GHC.Enum.Bounded Graphics.UI.Gtk.SourceView.Enums.SourceSmartHomeEndType
instance GHC.Classes.Eq Graphics.UI.Gtk.SourceView.Enums.SourceSmartHomeEndType
instance GHC.Enum.Enum Graphics.UI.Gtk.SourceView.Enums.SourceSmartHomeEndType
instance GHC.Read.Read Graphics.UI.Gtk.SourceView.Enums.SourceSearchFlags
instance GHC.Show.Show Graphics.UI.Gtk.SourceView.Enums.SourceSearchFlags
instance GHC.Enum.Bounded Graphics.UI.Gtk.SourceView.Enums.SourceSearchFlags
instance GHC.Classes.Eq Graphics.UI.Gtk.SourceView.Enums.SourceSearchFlags
instance GHC.Read.Read Graphics.UI.Gtk.SourceView.Enums.SourceCompletionActivation
instance GHC.Show.Show Graphics.UI.Gtk.SourceView.Enums.SourceCompletionActivation
instance GHC.Enum.Bounded Graphics.UI.Gtk.SourceView.Enums.SourceCompletionActivation
instance GHC.Classes.Eq Graphics.UI.Gtk.SourceView.Enums.SourceCompletionActivation
instance GHC.Enum.Enum Graphics.UI.Gtk.SourceView.Enums.SourceCompletionActivation
instance GHC.Enum.Enum Graphics.UI.Gtk.SourceView.Enums.SourceSearchFlags
instance System.Glib.Flags.Flags Graphics.UI.Gtk.SourceView.Enums.SourceSearchFlags
instance GHC.Enum.Enum Graphics.UI.Gtk.SourceView.Enums.SourceDrawSpacesFlags
instance System.Glib.Flags.Flags Graphics.UI.Gtk.SourceView.Enums.SourceDrawSpacesFlags
instance GHC.Enum.Enum Graphics.UI.Gtk.SourceView.Enums.SourceViewGutterPosition


module Graphics.UI.Gtk.SourceView.SourceCompletionContext
data SourceCompletionContext
class GObjectClass o => SourceCompletionContextClass o
data SourceCompletionActivation

-- | Providers can use this function to add proposals to the completion.
--   They can do so asynchronously by means of the finished argument.
--   Providers must ensure that they always call this function with
--   finished set to <a>True</a> once each population (even if no proposals
--   need to be added).
sourceCompletionContextAddProposals :: (SourceCompletionContextClass scc, SourceCompletionProviderClass scp) => scc -> scp -> [SourceCompletionProposal] -> Bool -> IO ()

-- | Get the iter at which the completion was invoked. Providers can use
--   this to determine how and if to match proposals.
sourceCompletionContextGetIter :: SourceCompletionContextClass scc => scc -> IO TextIter

-- | The completion activation
sourceCompletionContextActivation :: SourceCompletionContextClass scc => Attr scc SourceCompletionActivation

-- | The <a>SourceCompletion</a> associated with the context.
sourceCompletionContextCompletion :: SourceCompletionContextClass scc => Attr scc SourceCompletion

-- | Emitted when the current population of proposals has been cancelled.
--   Providers adding proposals asynchronously should connect to this
--   signal to know when to cancel running proposal queries.
sourceCompletionContextCancelled :: SourceCompletionContextClass scc => Signal scc (IO ())


module Graphics.UI.Gtk.SourceView.SourceCompletionProvider
data SourceCompletionProvider
class GObjectClass o => SourceCompletionProviderClass o

-- | Get the name of the provider. This should be a translatable name for
--   display to the user. For example: _("Document word completion
--   provider").
sourceCompletionProviderGetName :: (SourceCompletionProviderClass scp, GlibString string) => scp -> IO string

-- | Get the icon of the provider.
sourceCompletionProviderGetIcon :: SourceCompletionProviderClass scp => scp -> IO (Maybe Pixbuf)

-- | Get the delay in milliseconds before starting interactive completion
--   for this provider. A value of -1 indicates to use the default value as
--   set by <tt>autoCompleteDelay</tt>.
sourceCompletionProviderGetInteractiveDelay :: SourceCompletionProviderClass scp => scp -> IO Int

-- | Get the provider priority. The priority determines the order in which
--   proposals appear in the completion popup. Higher priorities are sorted
--   before lower priorities. The default priority is 0.
sourceCompletionProviderGetPriority :: SourceCompletionProviderClass scp => scp -> IO Int

-- | Get a customized info widget to show extra information of a proposal.
--   This allows for customized widgets on a proposal basis, although in
--   general providers will have the same custom widget for all their
--   proposals and proposal can be ignored. The implementation of this
--   function is optional. If implemented,
--   <a>sourceCompletionProviderUpdateInfo</a> MUST also be implemented. If
--   not implemented, the default <tt>sourceCompletionProposalGetInfo</tt>
--   will be used to display extra information about a
--   <a>SourceCompletionProposal</a>.
sourceCompletionProviderGetInfoWidget :: SourceCompletionProviderClass scp => scp -> SourceCompletionProposal -> IO Widget

-- | Get with what kind of activation the provider should be activated.
sourceCompletionProviderGetActivation :: SourceCompletionProviderClass scp => scp -> IO SourceCompletionActivation

-- | Get the <a>TextIter</a> at which the completion for proposal starts.
--   When implemented, the completion can use this information to position
--   the completion window accordingly when a proposal is selected in the
--   completion window.
sourceCompletionProviderGetStartIter :: SourceCompletionProviderClass scp => scp -> SourceCompletionContext -> SourceCompletionProposal -> IO (Maybe TextIter)

-- | Get whether the provider match the context of completion detailed in
--   context.
sourceCompletionProviderMatch :: SourceCompletionProviderClass scp => scp -> SourceCompletionContext -> IO Bool

-- | Update extra information shown in info for proposal. This should be
--   implemented if your provider sets a custom info widget for proposal.
--   This function MUST be implemented when
--   <a>sourceCompletionProviderGetInfoWidget</a> is implemented.
sourceCompletionProviderUpdateInfo :: SourceCompletionProviderClass scp => scp -> SourceCompletionProposal -> SourceCompletionInfo -> IO ()

-- | Populate context with proposals from provider
sourceCompletionProviderPopulate :: SourceCompletionProviderClass scp => scp -> SourceCompletionContext -> IO ()

-- | Activate proposal at iter. When this functions returns <a>False</a>,
--   the default activation of proposal will take place which replaces the
--   word at iter with the label of proposal.
sourceCompletionProviderActivateProposal :: SourceCompletionProviderClass scp => scp -> SourceCompletionProposal -> TextIter -> IO Bool


-- | Adds extra useful methods for <a>TextIter</a> for searching forwards
--   and backwards within a region in the buffer and matching brackets.
--   
--   <ul>
--   <li>There is no SourceIter object, just extra methods for
--   <a>TextIter</a></li>
--   </ul>
module Graphics.UI.Gtk.SourceView.SourceIter
data SourceSearchFlags
SourceSearchVisibleOnly :: SourceSearchFlags
SourceSearchTextOnly :: SourceSearchFlags
SourceSearchCaseInsensitive :: SourceSearchFlags

-- | Searches forward for str. Any match is returned by setting
--   <tt>matchStart</tt> to the first character of the match and
--   <tt>matchEnd</tt> to the first character after the match. The search
--   will not continue past limit. Note that a search is a linear or O(n)
--   operation, so you may wish to use limit to avoid locking up your UI on
--   large buffers.
--   
--   If the <a>SourceSearchVisibleOnly</a> flag is present, the match may
--   have invisible text interspersed in str. i.e. str will be a
--   possibly-noncontiguous subsequence of the matched range. similarly, if
--   you specify <a>SourceSearchTextOnly</a>, the match may have pixbufs or
--   child widgets mixed inside the matched range. If these flags are not
--   given, the match must be exact; the special 0xFFFC character in str
--   will match embedded pixbufs or child widgets. If you specify the
--   <a>SourceSearchCaseInsensitive</a> flag, the text will be matched
--   regardless of what case it is in.
--   
--   Same as <a>textIterForwardSearch</a>, but supports case insensitive
--   searching.
sourceIterForwardSearch :: GlibString string => TextIter -> string -> [SourceSearchFlags] -> Maybe TextIter -> IO (Maybe (TextIter, TextIter))

-- | same as <a>textIterForwardSearch</a> but allows case insensitive
--   search and possibly in the future regular expressions.
sourceIterBackwardSearch :: GlibString string => TextIter -> string -> [SourceSearchFlags] -> Maybe TextIter -> IO (Maybe (TextIter, TextIter))


module Graphics.UI.Gtk.SourceView.SourceView
data SourceView
class TextViewClass o => SourceViewClass o
data SourceSmartHomeEndType
SourceSmartHomeEndDisabled :: SourceSmartHomeEndType
SourceSmartHomeEndBefore :: SourceSmartHomeEndType
SourceSmartHomeEndAfter :: SourceSmartHomeEndType
SourceSmartHomeEndAlways :: SourceSmartHomeEndType
data SourceDrawSpacesFlags
SourceDrawSpacesSpace :: SourceDrawSpacesFlags
SourceDrawSpacesTab :: SourceDrawSpacesFlags
SourceDrawSpacesNewline :: SourceDrawSpacesFlags
SourceDrawSpacesNbsp :: SourceDrawSpacesFlags
SourceDrawSpacesLeading :: SourceDrawSpacesFlags
SourceDrawSpacesText :: SourceDrawSpacesFlags
SourceDrawSpacesTrailing :: SourceDrawSpacesFlags
SourceDrawSpacesAll :: SourceDrawSpacesFlags
data SourceViewGutterPosition
SourceViewGutterPositionLines :: SourceViewGutterPosition
SourceViewGutterPositionMarks :: SourceViewGutterPosition
castToSourceView :: GObjectClass obj => obj -> SourceView
gTypeSourceView :: GType
toSourceView :: SourceViewClass o => o -> SourceView

-- | Create a new <a>SourceView</a> widget with a default
--   <a>SourceBuffer</a>.
sourceViewNew :: IO SourceView

-- | Create a new <a>SourceView</a> widget with the given
--   <a>SourceBuffer</a>.
sourceViewNewWithBuffer :: SourceBuffer -> IO SourceView

-- | If <a>True</a> auto indentation of text is enabled.
sourceViewSetAutoIndent :: SourceViewClass sv => sv -> Bool -> IO ()

-- | Returns whether auto indentation of text is enabled.
sourceViewGetAutoIndent :: SourceViewClass sv => sv -> IO Bool

-- | If <a>True</a>, when the tab key is pressed and there is a selection,
--   the selected text is indented of one level instead of being replaced
--   with the t characters. Shift+Tab unindents the selection.
sourceViewSetIndentOnTab :: SourceViewClass sv => sv -> Bool -> IO ()

-- | Returns whether when the tab key is pressed the current selection
--   should get indented instead of replaced with the t character.
sourceViewGetIndentOnTab :: SourceViewClass sv => sv -> IO Bool

-- | Sets the number of spaces to use for each step of indent. If width is
--   -1, the value of the <tt>tabWidth</tt> property will be used.
sourceViewSetIndentWidth :: SourceViewClass sv => sv -> Int -> IO ()

-- | Returns the number of spaces to use for each step of indent. See
--   <a>sourceViewSetIndentWidth</a> for details.
sourceViewGetIndentWidth :: SourceViewClass sv => sv -> IO Int

-- | If <a>True</a> any tabulator character inserted is replaced by a group
--   of space characters.
sourceViewSetInsertSpacesInsteadOfTabs :: SourceViewClass sv => sv -> Bool -> IO ()

-- | Returns whether when inserting a tabulator character it should be
--   replaced by a group of space characters.
sourceViewGetInsertSpacesInsteadOfTabs :: SourceViewClass sv => sv -> IO Bool

-- | Set the desired movement of the cursor when HOME and END keys are
--   pressed.
sourceViewSetSmartHomeEnd :: SourceViewClass sv => sv -> SourceSmartHomeEndType -> IO ()

-- | Returns a <a>SourceSmartHomeEndType</a> end value specifying how the
--   cursor will move when HOME and END keys are pressed.
sourceViewGetSmartHomeEnd :: SourceViewClass sv => sv -> IO SourceSmartHomeEndType

-- | Set the priority for the given mark category. When there are multiple
--   marks on the same line, marks of categories with higher priorities
--   will be drawn on top.
sourceViewSetMarkCategoryPriority :: (SourceViewClass sv, GlibString string) => sv -> string -> Int -> IO ()

-- | Gets the priority which is associated with the given category.
sourceViewGetMarkCategoryPriority :: (SourceViewClass sv, GlibString string) => sv -> string -> IO Int

-- | Sets the icon to be used for category to pixbuf. If pixbuf is
--   <a>Nothing</a>, the icon is unset.
sourceViewSetMarkCategoryIconFromPixbuf :: (SourceViewClass sv, GlibString string) => sv -> string -> Maybe Pixbuf -> IO ()

-- | Sets the icon to be used for category to the stock item
--   <tt>stockId</tt>. If <tt>stockId</tt> is <a>Nothing</a>, the icon is
--   unset.
sourceViewSetMarkCategoryIconFromStock :: (SourceViewClass sv, GlibString string) => sv -> string -> Maybe string -> IO ()

-- | Sets the icon to be used for category to the named theme item name. If
--   name is <a>Nothing</a>, the icon is unset.
sourceViewSetMarkCategoryIconFromIconName :: (SourceViewClass sv, GlibString string) => sv -> string -> Maybe string -> IO ()

-- | Sets given background color for mark category. If color is
--   <a>Nothing</a>, the background color is unset.
sourceViewSetMarkCategoryBackground :: (SourceViewClass sv, GlibString string) => sv -> string -> Maybe Color -> IO ()

-- | Gets the background color associated with given category.
sourceViewGetMarkCategoryBackground :: (SourceViewClass sv, GlibString string) => sv -> string -> Color -> IO Bool

-- | If show is <a>True</a> the current line is highlighted.
sourceViewSetHighlightCurrentLine :: SourceViewClass sv => sv -> Bool -> IO ()

-- | Returns whether the current line is highlighted
sourceViewGetHighlightCurrentLine :: SourceViewClass sv => sv -> IO Bool

-- | If <a>True</a> line marks will be displayed beside the text.
sourceViewSetShowLineMarks :: SourceViewClass sv => sv -> Bool -> IO ()

-- | Returns whether line marks are displayed beside the text.
sourceViewGetShowLineMarks :: SourceViewClass sv => sv -> IO Bool

-- | If <a>True</a> line numbers will be displayed beside the text.
sourceViewSetShowLineNumbers :: SourceViewClass sv => sv -> Bool -> IO ()

-- | Returns whether line numbers are displayed beside the text.
sourceViewGetShowLineNumbers :: SourceViewClass sv => sv -> IO Bool

-- | If <a>True</a> a right margin is displayed
sourceViewSetShowRightMargin :: SourceViewClass sv => sv -> Bool -> IO ()

-- | Returns whether a right margin is displayed.
sourceViewGetShowRightMargin :: SourceViewClass sv => sv -> IO Bool

-- | Sets the position of the right margin in the given view.
sourceViewSetRightMarginPosition :: SourceViewClass sv => sv -> Word -> IO ()

-- | Gets the position of the right margin in the given view.
sourceViewGetRightMarginPosition :: SourceViewClass sv => sv -> IO Int

-- | Sets the width of tabulation in characters.
sourceViewSetTabWidth :: SourceViewClass sv => sv -> Int -> IO ()

-- | Returns the width of tabulation in characters.
sourceViewGetTabWidth :: SourceViewClass sv => sv -> IO Int

-- | Set if and how the spaces should be visualized. Specifying flags as []
--   will disable display of spaces.
sourceViewSetDrawSpaces :: SourceViewClass sv => sv -> [SourceDrawSpacesFlags] -> IO ()

-- | Returns the <a>SourceDrawSpacesFlags</a> specifying if and how spaces
--   should be displayed for this view.
sourceViewGetDrawSpaces :: SourceViewClass sv => sv -> IO [SourceDrawSpacesFlags]

-- | Returns the <a>SourceGutter</a> object associated with
--   <tt>windowType</tt> for view. Only <a>TextWindowLeft</a> and
--   <a>TextWindowRight</a> are supported, respectively corresponding to
--   the left and right gutter. The line numbers and mark category icons
--   are rendered in the gutter corresponding to <a>TextWindowLeft</a>.
sourceViewGetGutter :: SourceViewClass sv => sv -> TextWindowType -> IO SourceGutter

-- | Whether to enable auto indentation.
--   
--   Default value: <a>False</a>
sourceViewAutoIndent :: SourceViewClass sv => Attr sv Bool

-- | The completion object associated with the view.
sourceViewCompletion :: SourceViewClass sv => ReadAttr sv SourceCompletion

-- | Set if and how the spaces should be visualized.
sourceViewDrawSpaces :: SourceViewClass sv => Attr sv [SourceDrawSpacesFlags]

-- | Whether to highlight the current line.
--   
--   Default value: <a>False</a>
sourceViewHighlightCurrentLine :: SourceViewClass sv => Attr sv Bool

-- | Whether to indent the selected text when the tab key is pressed.
--   
--   Default value: <a>True</a>
sourceViewIndentOnTab :: SourceViewClass sv => Attr sv Bool

-- | Width of an indentation step expressed in number of spaces.
--   
--   Allowed values: [GMaxulong,32]
--   
--   Default value: -1
sourceViewIndentWidth :: SourceViewClass sv => Attr sv Int

-- | Whether to insert spaces instead of tabs.
--   
--   Default value: <a>False</a>
sourceViewInsertSpacesInsteadOfTabs :: SourceViewClass sv => Attr sv Bool

-- | Position of the right margin.
--   
--   Allowed values: [1,200]
--   
--   Default value: 80
sourceViewRightMarginPosition :: SourceViewClass sv => Attr sv Int

-- | Whether to display line numbers
--   
--   Default value: <a>False</a>
sourceViewShowLineNumbers :: SourceViewClass sv => Attr sv Bool

-- | Whether to display line mark pixbufs
--   
--   Default value: <a>False</a>
sourceViewShowRightMargin :: SourceViewClass sv => Attr sv Bool

-- | Set the behavior of the HOME and END keys.
--   
--   Default value: <a>SourceSmartHomeEndDisabled</a>
--   
--   Since 2.0
sourceViewSmartHomeEnd :: SourceViewClass sv => Attr sv SourceSmartHomeEndType

-- | Width of an tab character expressed in number of spaces.
--   
--   Allowed values: [1,32]
--   
--   Default value: 8
sourceViewTabWidth :: SourceViewClass sv => Attr sv Int
sourceViewUndo :: SourceViewClass sv => Signal sv (IO ())
sourceViewRedo :: SourceViewClass sv => Signal sv (IO ())

-- | The <tt>moveLines</tt> signal is a keybinding which gets emitted when
--   the user initiates moving a line. The default binding key is
--   Alt+Up/Down arrow. And moves the currently selected lines, or the
--   current line by count. For the moment, only count of -1 or 1 is valid.
sourceViewMoveLines :: SourceViewClass sv => Signal sv (Bool -> Int -> IO ())

-- | The <tt>showCompletion</tt> signal is a keybinding signal which gets
--   emitted when the user initiates a completion in default mode.
--   
--   Applications should not connect to it, but may emit it with
--   <tt>gSignalEmitByName</tt> if they need to control the default mode
--   completion activation.
sourceViewShowCompletion :: SourceViewClass sv => Signal sv (IO ())

-- | Emitted when a line mark has been activated (for instance when there
--   was a button press in the line marks gutter). You can use iter to
--   determine on which line the activation took place.
sourceViewLineMarkActivated :: SourceViewClass sv => Signal sv (TextIter -> EventM EAny ())

module Graphics.UI.Gtk.SourceView
