{-# LINE 2 "./Graphics/UI/Gtk/SourceView/SourceBuffer.chs" #-}-- -*-haskell-*--- GIMP Toolkit (GTK) SourceBuffer---- Author : Peter Gavin-- derived from sourceview bindings by Axel Simon and Duncan Coutts---- Created: 18 December 2008---- Copyright (C) 2003-2008 Peter Gavin, Duncan Coutts, Axel Simon---- This library is free software; you can redistribute it and/or-- modify it under the terms of the GNU Lesser General Public-- License as published by the Free Software Foundation; either-- version 2.1 of the License, or (at your option) any later version.---- This library is distributed in the hope that it will be useful,-- but WITHOUT ANY WARRANTY; without even the implied warranty of-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU-- Lesser General Public License for more details.---- |-- Maintainer : gtk2hs-users@lists.sourceforge.net-- Stability : provisional-- Portability : portable (depends on GHC)--moduleGraphics.UI.Gtk.SourceView.SourceBuffer(SourceBuffer,SourceBufferClass,castToSourceBuffer,sourceBufferNew,sourceBufferNewWithLanguage,sourceBufferSetHighlightSyntax,sourceBufferGetHighlightSyntax,sourceBufferSetLanguage,sourceBufferGetLanguage,sourceBufferSetHighlightMatchingBrackets,sourceBufferGetHighlightMatchingBrackets,sourceBufferSetStyleScheme,sourceBufferGetStyleScheme,sourceBufferSetMaxUndoLevels,sourceBufferGetMaxUndoLevels,sourceBufferGetCanUndo,sourceBufferGetCanRedo,sourceBufferUndo,sourceBufferRedo,sourceBufferBeginNotUndoableAction,sourceBufferEndNotUndoableAction,sourceBufferCreateSourceMark,sourceBufferEnsureHighlight,sourceBufferCanRedo,sourceBufferCanUndo,sourceBufferHighlightMatchingBrackets,sourceBufferHighlightSyntax,sourceBufferLanguage,sourceBufferSourceStyleScheme,sourceBufferHighlightUpdated)whereimportControl.Monad(liftM)importData.Maybe(fromMaybe)importSystem.Glib.FFIimportSystem.Glib.GObject(constructNewGObject,makeNewGObject)importSystem.Glib.Properties{-# LINE 67 "./Graphics/UI/Gtk/SourceView/SourceBuffer.chs" #-}importSystem.Glib.AttributesimportGraphics.UI.Gtk.Abstract.Object(makeNewObject)importGraphics.UI.Gtk.SourceView.Types{-# LINE 70 "./Graphics/UI/Gtk/SourceView/SourceBuffer.chs" #-}importGraphics.UI.Gtk.SourceView.Signals{-# LINE 71 "./Graphics/UI/Gtk/SourceView/SourceBuffer.chs" #-}importGraphics.UI.Gtk.Multiline.TextIter{-# LINE 72 "./Graphics/UI/Gtk/SourceView/SourceBuffer.chs" #-}importGraphics.UI.Gtk.SourceView.SourceMark{-# LINE 74 "./Graphics/UI/Gtk/SourceView/SourceBuffer.chs" #-}{-# LINE 76 "./Graphics/UI/Gtk/SourceView/SourceBuffer.chs" #-}-- methods-- | Create a new 'SourceBuffer', possibly-- taking a 'TextTagTable'.--sourceBufferNew::MaybeTextTagTable->IOSourceBuffersourceBufferNewtt=constructNewGObjectmkSourceBuffer$(\(TextTagTablearg1)->withForeignPtrarg1$\argPtr1->gtk_source_buffer_newargPtr1){-# LINE 85 "./Graphics/UI/Gtk/SourceView/SourceBuffer.chs" #-}(fromMaybe(TextTagTablenullForeignPtr)tt)-- | Create a new 'SourceBuffer'-- with a 'SourceLanguage'.--sourceBufferNewWithLanguage::SourceLanguage->IOSourceBuffersourceBufferNewWithLanguagelang=constructNewGObjectmkSourceBuffer$(\(SourceLanguagearg1)->withForeignPtrarg1$\argPtr1->gtk_source_buffer_new_with_languageargPtr1)lang-- |--sourceBufferSetHighlightSyntax::SourceBuffer->Bool->IO()sourceBufferSetHighlightSyntaxsbnewVal=(\(SourceBufferarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_source_buffer_set_highlight_syntaxargPtr1arg2)sb(fromBoolnewVal)-- |--sourceBufferGetHighlightSyntax::SourceBuffer->IOBoolsourceBufferGetHighlightSyntaxsb=liftMtoBool$(\(SourceBufferarg1)->withForeignPtrarg1$\argPtr1->gtk_source_buffer_get_highlight_syntaxargPtr1)sb-- |--sourceBufferSetLanguage::SourceBuffer->SourceLanguage->IO()sourceBufferSetLanguagesblang=(\(SourceBufferarg1)(SourceLanguagearg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_source_buffer_set_languageargPtr1argPtr2)sblang-- |--sourceBufferGetLanguage::SourceBuffer->IOSourceLanguagesourceBufferGetLanguagesb=makeNewGObjectmkSourceLanguage$(\(SourceBufferarg1)->withForeignPtrarg1$\argPtr1->gtk_source_buffer_get_languageargPtr1)sb-- |--sourceBufferSetHighlightMatchingBrackets::SourceBuffer->Bool->IO()sourceBufferSetHighlightMatchingBracketssbnewVal=(\(SourceBufferarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_source_buffer_set_highlight_matching_bracketsargPtr1arg2)sb(fromBoolnewVal)-- |--sourceBufferGetHighlightMatchingBrackets::SourceBuffer->IOBoolsourceBufferGetHighlightMatchingBracketssb=liftMtoBool$(\(SourceBufferarg1)->withForeignPtrarg1$\argPtr1->gtk_source_buffer_get_highlight_matching_bracketsargPtr1)sb-- |--sourceBufferSetStyleScheme::SourceBuffer->SourceStyleScheme->IO()sourceBufferSetStyleSchemesbsss=(\(SourceBufferarg1)(SourceStyleSchemearg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_source_buffer_set_style_schemeargPtr1argPtr2)sbsss-- |--sourceBufferGetStyleScheme::SourceBuffer->IOSourceStyleSchemesourceBufferGetStyleSchemesb=makeNewGObjectmkSourceStyleScheme$(\(SourceBufferarg1)->withForeignPtrarg1$\argPtr1->gtk_source_buffer_get_style_schemeargPtr1)sb-- |--sourceBufferSetMaxUndoLevels::SourceBuffer->Int->IO()sourceBufferSetMaxUndoLevelssbnewVal=(\(SourceBufferarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_source_buffer_set_max_undo_levelsargPtr1arg2)sb(fromIntegralnewVal)-- |--sourceBufferGetMaxUndoLevels::SourceBuffer->IOIntsourceBufferGetMaxUndoLevelssb=liftMfromIntegral$(\(SourceBufferarg1)->withForeignPtrarg1$\argPtr1->gtk_source_buffer_get_max_undo_levelsargPtr1)sb-- |--sourceBufferGetCanUndo::SourceBuffer->IOBoolsourceBufferGetCanUndosb=liftMtoBool$(\(SourceBufferarg1)->withForeignPtrarg1$\argPtr1->gtk_source_buffer_can_undoargPtr1)sb-- |--sourceBufferGetCanRedo::SourceBuffer->IOBoolsourceBufferGetCanRedosb=liftMtoBool$(\(SourceBufferarg1)->withForeignPtrarg1$\argPtr1->gtk_source_buffer_can_redoargPtr1)sb-- |--sourceBufferUndo::SourceBuffer->IO()sourceBufferUndosb=(\(SourceBufferarg1)->withForeignPtrarg1$\argPtr1->gtk_source_buffer_undoargPtr1)sb-- |--sourceBufferRedo::SourceBuffer->IO()sourceBufferRedosb=(\(SourceBufferarg1)->withForeignPtrarg1$\argPtr1->gtk_source_buffer_redoargPtr1)sb-- |--sourceBufferBeginNotUndoableAction::SourceBuffer->IO()sourceBufferBeginNotUndoableActionsb=(\(SourceBufferarg1)->withForeignPtrarg1$\argPtr1->gtk_source_buffer_begin_not_undoable_actionargPtr1)sb-- |--sourceBufferEndNotUndoableAction::SourceBuffer->IO()sourceBufferEndNotUndoableActionsb=(\(SourceBufferarg1)->withForeignPtrarg1$\argPtr1->gtk_source_buffer_end_not_undoable_actionargPtr1)sb-- | Creates a marker in the buffer of the given type.---- * A marker is-- semantically very similar to a 'Graphics.UI.Gtk.Multiline.TextMark',-- except it has a type-- which is used by the 'SourceView' 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.---- * Markers are implemented using 'Graphics.UI.Gtk.Multiline.TextMark',-- so all characteristics-- and restrictions to marks apply to markers too. These includes-- life cycle issues and 'Graphics.UI.Gtk.Multiline.TextMark.onMarkSet'-- and 'Graphics.UI.Gtk.Multiline.TextMark.onMarkDeleted' signal-- emissions.---- * Like a 'Graphics.UI.Gtk.Multiline.TextMark', a 'SourceMarker'-- can be anonymous if the-- passed name is @Nothing@. Also, the buffer owns the markers so you-- shouldn't unreference it.sourceBufferCreateSourceMark::SourceBuffer-- the buffer->MaybeString-- the name of the mark->String-- the category of the mark->TextIter->IOSourceMarksourceBufferCreateSourceMarksbnamecategoryiter=makeNewGObjectmkSourceMark$maybeWithwithCStringname$\strPtr1->withCStringcategory$\strPtr2->(\(SourceBufferarg1)arg2arg3(TextIterarg4)->withForeignPtrarg1$\argPtr1->withForeignPtrarg4$\argPtr4->gtk_source_buffer_create_source_markargPtr1arg2arg3argPtr4)sbstrPtr1strPtr2iter-- |--sourceBufferEnsureHighlight::SourceBuffer->TextIter->TextIter->IO()sourceBufferEnsureHighlightsbstartend=(\(SourceBufferarg1)(TextIterarg2)(TextIterarg3)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->withForeignPtrarg3$\argPtr3->gtk_source_buffer_ensure_highlightargPtr1argPtr2argPtr3)sbstartend-- |--sourceBufferCanRedo::ReadAttrSourceBufferBoolsourceBufferCanRedo=readAttrFromBoolProperty"can-redo"-- |--sourceBufferCanUndo::ReadAttrSourceBufferBoolsourceBufferCanUndo=readAttrFromBoolProperty"can-undo"-- |--sourceBufferHighlightMatchingBrackets::AttrSourceBufferBoolsourceBufferHighlightMatchingBrackets=newAttrFromBoolProperty"highlight-matching-brackets"-- |--sourceBufferHighlightSyntax::AttrSourceBufferBoolsourceBufferHighlightSyntax=newAttrFromBoolProperty"highlight-matching-brackets"-- |--sourceBufferLanguage::AttrSourceBuffer(MaybeSourceLanguage)sourceBufferLanguage=newAttrFromMaybeObjectProperty"language"gTypeSourceLanguage-- |--sourceBufferMaxUndoLevels::AttrSourceBufferIntsourceBufferMaxUndoLevels=newAttrFromIntProperty"max-undo-levels"-- |--sourceBufferSourceStyleScheme::AttrSourceBuffer(MaybeSourceStyleScheme)sourceBufferSourceStyleScheme=newAttrFromMaybeObjectProperty"style-scheme"gTypeSourceStyleScheme-- |--sourceBufferHighlightUpdated::SignalSourceBuffer(TextIter->TextIter->IO())sourceBufferHighlightUpdated=Signal$connect_BOXED_BOXED__NONE"highlight-updated"mkTextIterCopymkTextIterCopyforeignimportccallunsafe"gtk_source_buffer_new"gtk_source_buffer_new::((PtrTextTagTable)->(IO(PtrSourceBuffer)))foreignimportccallunsafe"gtk_source_buffer_new_with_language"gtk_source_buffer_new_with_language::((PtrSourceLanguage)->(IO(PtrSourceBuffer)))foreignimportccallunsafe"gtk_source_buffer_set_highlight_syntax"gtk_source_buffer_set_highlight_syntax::((PtrSourceBuffer)->(CInt->(IO())))foreignimportccallunsafe"gtk_source_buffer_get_highlight_syntax"gtk_source_buffer_get_highlight_syntax::((PtrSourceBuffer)->(IOCInt))foreignimportccallunsafe"gtk_source_buffer_set_language"gtk_source_buffer_set_language::((PtrSourceBuffer)->((PtrSourceLanguage)->(IO())))foreignimportccallunsafe"gtk_source_buffer_get_language"gtk_source_buffer_get_language::((PtrSourceBuffer)->(IO(PtrSourceLanguage)))foreignimportccallunsafe"gtk_source_buffer_set_highlight_matching_brackets"gtk_source_buffer_set_highlight_matching_brackets::((PtrSourceBuffer)->(CInt->(IO())))foreignimportccallunsafe"gtk_source_buffer_get_highlight_matching_brackets"gtk_source_buffer_get_highlight_matching_brackets::((PtrSourceBuffer)->(IOCInt))foreignimportccallunsafe"gtk_source_buffer_set_style_scheme"gtk_source_buffer_set_style_scheme::((PtrSourceBuffer)->((PtrSourceStyleScheme)->(IO())))foreignimportccallunsafe"gtk_source_buffer_get_style_scheme"gtk_source_buffer_get_style_scheme::((PtrSourceBuffer)->(IO(PtrSourceStyleScheme)))foreignimportccallunsafe"gtk_source_buffer_set_max_undo_levels"gtk_source_buffer_set_max_undo_levels::((PtrSourceBuffer)->(CInt->(IO())))foreignimportccallunsafe"gtk_source_buffer_get_max_undo_levels"gtk_source_buffer_get_max_undo_levels::((PtrSourceBuffer)->(IOCInt))foreignimportccallunsafe"gtk_source_buffer_can_undo"gtk_source_buffer_can_undo::((PtrSourceBuffer)->(IOCInt))foreignimportccallunsafe"gtk_source_buffer_can_redo"gtk_source_buffer_can_redo::((PtrSourceBuffer)->(IOCInt))foreignimportccallsafe"gtk_source_buffer_undo"gtk_source_buffer_undo::((PtrSourceBuffer)->(IO()))foreignimportccallsafe"gtk_source_buffer_redo"gtk_source_buffer_redo::((PtrSourceBuffer)->(IO()))foreignimportccallsafe"gtk_source_buffer_begin_not_undoable_action"gtk_source_buffer_begin_not_undoable_action::((PtrSourceBuffer)->(IO()))foreignimportccallsafe"gtk_source_buffer_end_not_undoable_action"gtk_source_buffer_end_not_undoable_action::((PtrSourceBuffer)->(IO()))foreignimportccallsafe"gtk_source_buffer_create_source_mark"gtk_source_buffer_create_source_mark::((PtrSourceBuffer)->((PtrCChar)->((PtrCChar)->((PtrTextIter)->(IO(PtrSourceMark))))))foreignimportccallsafe"gtk_source_buffer_ensure_highlight"gtk_source_buffer_ensure_highlight::((PtrSourceBuffer)->((PtrTextIter)->((PtrTextIter)->(IO()))))