{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc) -} #define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \ && !defined(__HADDOCK_VERSION__)) module GI.GtkSource.Flags ( -- * Flags -- ** CompletionActivation #flag:CompletionActivation# CompletionActivation(..) , -- ** DrawSpacesFlags #flag:DrawSpacesFlags# DrawSpacesFlags(..) , -- ** FileSaverFlags #flag:FileSaverFlags# FileSaverFlags(..) , -- ** GutterRendererState #flag:GutterRendererState# GutterRendererState(..) , -- ** SortFlags #flag:SortFlags# SortFlags(..) , -- ** SpaceLocationFlags #flag:SpaceLocationFlags# SpaceLocationFlags(..) , -- ** SpaceTypeFlags #flag:SpaceTypeFlags# SpaceTypeFlags(..) , ) where import Data.GI.Base.ShortPrelude import qualified Data.GI.Base.ShortPrelude as SP import qualified Data.GI.Base.Overloading as O import qualified Prelude as P import qualified Data.GI.Base.Attributes as GI.Attributes import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr import qualified Data.GI.Base.GClosure as B.GClosure import qualified Data.GI.Base.GError as B.GError import qualified Data.GI.Base.GVariant as B.GVariant import qualified Data.GI.Base.GValue as B.GValue import qualified Data.GI.Base.GParamSpec as B.GParamSpec import qualified Data.GI.Base.CallStack as B.CallStack import qualified Data.GI.Base.Properties as B.Properties import qualified Data.Text as T import qualified Data.ByteString.Char8 as B import qualified Data.Map as Map import qualified Foreign.Ptr as FP import qualified GHC.OverloadedLabels as OL -- Flags SpaceTypeFlags {- | 'GI.GtkSource.Flags.SpaceTypeFlags' contains flags for white space types. /Since: 3.24/ -} data SpaceTypeFlags = SpaceTypeFlagsNone {- ^ No flags. -} | SpaceTypeFlagsSpace {- ^ Space character. -} | SpaceTypeFlagsTab {- ^ Tab character. -} | SpaceTypeFlagsNewline {- ^ Line break character. If the 'GI.GtkSource.Objects.Buffer.Buffer':@/implicit-trailing-newline/@ property is 'True', 'GI.GtkSource.Objects.SpaceDrawer.SpaceDrawer' also draws a line break at the end of the buffer. -} | SpaceTypeFlagsNbsp {- ^ Non-breaking space character. -} | SpaceTypeFlagsAll {- ^ All white spaces. -} | AnotherSpaceTypeFlags Int -- ^ Catch-all for unknown values deriving (Show, Eq) instance P.Enum SpaceTypeFlags where fromEnum SpaceTypeFlagsNone = 0 fromEnum SpaceTypeFlagsSpace = 1 fromEnum SpaceTypeFlagsTab = 2 fromEnum SpaceTypeFlagsNewline = 4 fromEnum SpaceTypeFlagsNbsp = 8 fromEnum SpaceTypeFlagsAll = 15 fromEnum (AnotherSpaceTypeFlags k) = k toEnum 0 = SpaceTypeFlagsNone toEnum 1 = SpaceTypeFlagsSpace toEnum 2 = SpaceTypeFlagsTab toEnum 4 = SpaceTypeFlagsNewline toEnum 8 = SpaceTypeFlagsNbsp toEnum 15 = SpaceTypeFlagsAll toEnum k = AnotherSpaceTypeFlags k instance P.Ord SpaceTypeFlags where compare a b = P.compare (P.fromEnum a) (P.fromEnum b) foreign import ccall "gtk_source_space_type_flags_get_type" c_gtk_source_space_type_flags_get_type :: IO GType instance BoxedFlags SpaceTypeFlags where boxedFlagsType _ = c_gtk_source_space_type_flags_get_type instance IsGFlag SpaceTypeFlags -- Flags SpaceLocationFlags {- | 'GI.GtkSource.Flags.SpaceLocationFlags' contains flags for white space locations. If a line contains only white spaces (no text), the white spaces match both 'GI.GtkSource.Flags.SpaceLocationFlagsLeading' and 'GI.GtkSource.Flags.SpaceLocationFlagsTrailing'. /Since: 3.24/ -} data SpaceLocationFlags = SpaceLocationFlagsNone {- ^ No flags. -} | SpaceLocationFlagsLeading {- ^ Leading white spaces on a line, i.e. the indentation. -} | SpaceLocationFlagsInsideText {- ^ White spaces inside a line of text. -} | SpaceLocationFlagsTrailing {- ^ Trailing white spaces on a line. -} | SpaceLocationFlagsAll {- ^ White spaces anywhere. -} | AnotherSpaceLocationFlags Int -- ^ Catch-all for unknown values deriving (Show, Eq) instance P.Enum SpaceLocationFlags where fromEnum SpaceLocationFlagsNone = 0 fromEnum SpaceLocationFlagsLeading = 1 fromEnum SpaceLocationFlagsInsideText = 2 fromEnum SpaceLocationFlagsTrailing = 4 fromEnum SpaceLocationFlagsAll = 7 fromEnum (AnotherSpaceLocationFlags k) = k toEnum 0 = SpaceLocationFlagsNone toEnum 1 = SpaceLocationFlagsLeading toEnum 2 = SpaceLocationFlagsInsideText toEnum 4 = SpaceLocationFlagsTrailing toEnum 7 = SpaceLocationFlagsAll toEnum k = AnotherSpaceLocationFlags k instance P.Ord SpaceLocationFlags where compare a b = P.compare (P.fromEnum a) (P.fromEnum b) foreign import ccall "gtk_source_space_location_flags_get_type" c_gtk_source_space_location_flags_get_type :: IO GType instance BoxedFlags SpaceLocationFlags where boxedFlagsType _ = c_gtk_source_space_location_flags_get_type instance IsGFlag SpaceLocationFlags -- Flags SortFlags {- | /No description available in the introspection data./ /Since: 3.18/ -} data SortFlags = SortFlagsNone {- ^ no flags specified -} | SortFlagsCaseSensitive {- ^ case sensitive sort -} | SortFlagsReverseOrder {- ^ sort in reverse order -} | SortFlagsRemoveDuplicates {- ^ remove duplicates -} | AnotherSortFlags Int -- ^ Catch-all for unknown values deriving (Show, Eq) instance P.Enum SortFlags where fromEnum SortFlagsNone = 0 fromEnum SortFlagsCaseSensitive = 1 fromEnum SortFlagsReverseOrder = 2 fromEnum SortFlagsRemoveDuplicates = 4 fromEnum (AnotherSortFlags k) = k toEnum 0 = SortFlagsNone toEnum 1 = SortFlagsCaseSensitive toEnum 2 = SortFlagsReverseOrder toEnum 4 = SortFlagsRemoveDuplicates toEnum k = AnotherSortFlags k instance P.Ord SortFlags where compare a b = P.compare (P.fromEnum a) (P.fromEnum b) foreign import ccall "gtk_source_sort_flags_get_type" c_gtk_source_sort_flags_get_type :: IO GType instance BoxedFlags SortFlags where boxedFlagsType _ = c_gtk_source_sort_flags_get_type instance IsGFlag SortFlags -- Flags GutterRendererState {- | /No description available in the introspection data./ -} data GutterRendererState = GutterRendererStateNormal {- ^ normal state -} | GutterRendererStateCursor {- ^ area in the renderer represents the line on which the insert cursor is currently positioned -} | GutterRendererStatePrelit {- ^ the mouse pointer is currently over the activatable area of the renderer -} | GutterRendererStateSelected {- ^ area in the renderer represents a line in the buffer which contains part of the selection -} | AnotherGutterRendererState Int -- ^ Catch-all for unknown values deriving (Show, Eq) instance P.Enum GutterRendererState where fromEnum GutterRendererStateNormal = 0 fromEnum GutterRendererStateCursor = 1 fromEnum GutterRendererStatePrelit = 2 fromEnum GutterRendererStateSelected = 4 fromEnum (AnotherGutterRendererState k) = k toEnum 0 = GutterRendererStateNormal toEnum 1 = GutterRendererStateCursor toEnum 2 = GutterRendererStatePrelit toEnum 4 = GutterRendererStateSelected toEnum k = AnotherGutterRendererState k instance P.Ord GutterRendererState where compare a b = P.compare (P.fromEnum a) (P.fromEnum b) foreign import ccall "gtk_source_gutter_renderer_state_get_type" c_gtk_source_gutter_renderer_state_get_type :: IO GType instance BoxedFlags GutterRendererState where boxedFlagsType _ = c_gtk_source_gutter_renderer_state_get_type instance IsGFlag GutterRendererState -- Flags FileSaverFlags {- | Flags to define the behavior of a 'GI.GtkSource.Objects.FileSaver.FileSaver'. /Since: 3.14/ -} data FileSaverFlags = FileSaverFlagsNone {- ^ No flags. -} | FileSaverFlagsIgnoreInvalidChars {- ^ Ignore invalid characters. -} | FileSaverFlagsIgnoreModificationTime {- ^ Save file despite external modifications. -} | FileSaverFlagsCreateBackup {- ^ Create a backup before saving the file. -} | AnotherFileSaverFlags Int -- ^ Catch-all for unknown values deriving (Show, Eq) instance P.Enum FileSaverFlags where fromEnum FileSaverFlagsNone = 0 fromEnum FileSaverFlagsIgnoreInvalidChars = 1 fromEnum FileSaverFlagsIgnoreModificationTime = 2 fromEnum FileSaverFlagsCreateBackup = 4 fromEnum (AnotherFileSaverFlags k) = k toEnum 0 = FileSaverFlagsNone toEnum 1 = FileSaverFlagsIgnoreInvalidChars toEnum 2 = FileSaverFlagsIgnoreModificationTime toEnum 4 = FileSaverFlagsCreateBackup toEnum k = AnotherFileSaverFlags k instance P.Ord FileSaverFlags where compare a b = P.compare (P.fromEnum a) (P.fromEnum b) foreign import ccall "gtk_source_file_saver_flags_get_type" c_gtk_source_file_saver_flags_get_type :: IO GType instance BoxedFlags FileSaverFlags where boxedFlagsType _ = c_gtk_source_file_saver_flags_get_type instance IsGFlag FileSaverFlags -- Flags DrawSpacesFlags {-# DEPRECATED DrawSpacesFlags ["(Since version 3.24)","Use 'GI.GtkSource.Flags.SpaceTypeFlags' and","'GI.GtkSource.Flags.SpaceLocationFlags' instead."] #-} {- | GtkSourceDrawSpacesFlags determine what kind of spaces whould be drawn. If none of GTK_SOURCE_DRAW_SPACES_LEADING, GTK_SOURCE_DRAW_SPACES_TEXT or GTK_SOURCE_DRAW_SPACES_TRAILING is specified, whitespaces at any position in the line will be drawn (i.e. it has the same effect as specifying all of them). -} data DrawSpacesFlags = DrawSpacesFlagsSpace {- ^ whether the space character should be drawn. -} | DrawSpacesFlagsTab {- ^ whether the tab character should be drawn. -} | DrawSpacesFlagsNewline {- ^ whether the line breaks should be drawn. If the 'GI.GtkSource.Objects.Buffer.Buffer':@/implicit-trailing-newline/@ property is 'True', a line break is also drawn at the end of the buffer. -} | DrawSpacesFlagsNbsp {- ^ whether the non-breaking whitespaces should be drawn. -} | DrawSpacesFlagsLeading {- ^ whether leading whitespaces should be drawn. -} | DrawSpacesFlagsText {- ^ whether whitespaces inside text should be drawn. -} | DrawSpacesFlagsTrailing {- ^ whether trailing whitespaces should be drawn. -} | DrawSpacesFlagsAll {- ^ wheter all kind of spaces should be drawn. -} | AnotherDrawSpacesFlags Int -- ^ Catch-all for unknown values deriving (Show, Eq) instance P.Enum DrawSpacesFlags where fromEnum DrawSpacesFlagsSpace = 1 fromEnum DrawSpacesFlagsTab = 2 fromEnum DrawSpacesFlagsNewline = 4 fromEnum DrawSpacesFlagsNbsp = 8 fromEnum DrawSpacesFlagsLeading = 16 fromEnum DrawSpacesFlagsText = 32 fromEnum DrawSpacesFlagsTrailing = 64 fromEnum DrawSpacesFlagsAll = 127 fromEnum (AnotherDrawSpacesFlags k) = k toEnum 1 = DrawSpacesFlagsSpace toEnum 2 = DrawSpacesFlagsTab toEnum 4 = DrawSpacesFlagsNewline toEnum 8 = DrawSpacesFlagsNbsp toEnum 16 = DrawSpacesFlagsLeading toEnum 32 = DrawSpacesFlagsText toEnum 64 = DrawSpacesFlagsTrailing toEnum 127 = DrawSpacesFlagsAll toEnum k = AnotherDrawSpacesFlags k instance P.Ord DrawSpacesFlags where compare a b = P.compare (P.fromEnum a) (P.fromEnum b) foreign import ccall "gtk_source_draw_spaces_flags_get_type" c_gtk_source_draw_spaces_flags_get_type :: IO GType instance BoxedFlags DrawSpacesFlags where boxedFlagsType _ = c_gtk_source_draw_spaces_flags_get_type instance IsGFlag DrawSpacesFlags -- Flags CompletionActivation {- | /No description available in the introspection data./ -} data CompletionActivation = CompletionActivationNone {- ^ None. -} | CompletionActivationInteractive {- ^ Interactive activation. By default, it occurs on each insertion in the 'GI.Gtk.Objects.TextBuffer.TextBuffer'. This can be blocked temporarily with 'GI.GtkSource.Objects.Completion.completionBlockInteractive'. -} | CompletionActivationUserRequested {- ^ User requested activation. By default, it occurs when the user presses \\Control\<\/keycap>\space\<\/keycap>\<\/keycombo>. -} | AnotherCompletionActivation Int -- ^ Catch-all for unknown values deriving (Show, Eq) instance P.Enum CompletionActivation where fromEnum CompletionActivationNone = 0 fromEnum CompletionActivationInteractive = 1 fromEnum CompletionActivationUserRequested = 2 fromEnum (AnotherCompletionActivation k) = k toEnum 0 = CompletionActivationNone toEnum 1 = CompletionActivationInteractive toEnum 2 = CompletionActivationUserRequested toEnum k = AnotherCompletionActivation k instance P.Ord CompletionActivation where compare a b = P.compare (P.fromEnum a) (P.fromEnum b) foreign import ccall "gtk_source_completion_activation_get_type" c_gtk_source_completion_activation_get_type :: IO GType instance BoxedFlags CompletionActivation where boxedFlagsType _ = c_gtk_source_completion_activation_get_type instance IsGFlag CompletionActivation