Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
The LogAttr
structure stores information
about the attributes of a single character.
Synopsis
- newtype LogAttr = LogAttr (ManagedPtr LogAttr)
- newZeroLogAttr :: MonadIO m => m LogAttr
- noLogAttr :: Maybe LogAttr
- getLogAttrBackspaceDeletesCharacter :: MonadIO m => LogAttr -> m Word32
- setLogAttrBackspaceDeletesCharacter :: MonadIO m => LogAttr -> Word32 -> m ()
- getLogAttrIsCharBreak :: MonadIO m => LogAttr -> m Word32
- setLogAttrIsCharBreak :: MonadIO m => LogAttr -> Word32 -> m ()
- getLogAttrIsCursorPosition :: MonadIO m => LogAttr -> m Word32
- setLogAttrIsCursorPosition :: MonadIO m => LogAttr -> Word32 -> m ()
- getLogAttrIsExpandableSpace :: MonadIO m => LogAttr -> m Word32
- setLogAttrIsExpandableSpace :: MonadIO m => LogAttr -> Word32 -> m ()
- getLogAttrIsLineBreak :: MonadIO m => LogAttr -> m Word32
- setLogAttrIsLineBreak :: MonadIO m => LogAttr -> Word32 -> m ()
- getLogAttrIsMandatoryBreak :: MonadIO m => LogAttr -> m Word32
- setLogAttrIsMandatoryBreak :: MonadIO m => LogAttr -> Word32 -> m ()
- getLogAttrIsSentenceBoundary :: MonadIO m => LogAttr -> m Word32
- setLogAttrIsSentenceBoundary :: MonadIO m => LogAttr -> Word32 -> m ()
- getLogAttrIsSentenceEnd :: MonadIO m => LogAttr -> m Word32
- setLogAttrIsSentenceEnd :: MonadIO m => LogAttr -> Word32 -> m ()
- getLogAttrIsSentenceStart :: MonadIO m => LogAttr -> m Word32
- setLogAttrIsSentenceStart :: MonadIO m => LogAttr -> Word32 -> m ()
- getLogAttrIsWhite :: MonadIO m => LogAttr -> m Word32
- setLogAttrIsWhite :: MonadIO m => LogAttr -> Word32 -> m ()
- getLogAttrIsWordBoundary :: MonadIO m => LogAttr -> m Word32
- setLogAttrIsWordBoundary :: MonadIO m => LogAttr -> Word32 -> m ()
- getLogAttrIsWordEnd :: MonadIO m => LogAttr -> m Word32
- setLogAttrIsWordEnd :: MonadIO m => LogAttr -> Word32 -> m ()
- getLogAttrIsWordStart :: MonadIO m => LogAttr -> m Word32
- setLogAttrIsWordStart :: MonadIO m => LogAttr -> Word32 -> m ()
Exported types
Memory-managed wrapper type.
Instances
WrappedPtr LogAttr Source # | |
Defined in GI.Pango.Structs.LogAttr wrappedPtrCalloc :: IO (Ptr LogAttr) # wrappedPtrCopy :: LogAttr -> IO LogAttr # | |
tag ~ AttrSet => Constructible LogAttr tag Source # | |
Defined in GI.Pango.Structs.LogAttr |
Properties
backspaceDeletesCharacter
if set, backspace deletes one character
rather than the entire grapheme cluster. This
field is only meaningful on grapheme
boundaries (where isCursorPosition
is
set). In some languages, the full grapheme
(e.g. letter + diacritics) is considered a
unit, while in others, each decomposed
character in the grapheme is a unit. In the
default implementation of break
, this
bit is set on all grapheme boundaries except
those following Latin, Cyrillic or Greek base characters.
getLogAttrBackspaceDeletesCharacter :: MonadIO m => LogAttr -> m Word32 Source #
Get the value of the “backspace_deletes_character
” field.
When overloading is enabled, this is equivalent to
get
logAttr #backspaceDeletesCharacter
setLogAttrBackspaceDeletesCharacter :: MonadIO m => LogAttr -> Word32 -> m () Source #
Set the value of the “backspace_deletes_character
” field.
When overloading is enabled, this is equivalent to
set
logAttr [ #backspaceDeletesCharacter:=
value ]
isCharBreak
if set, can break here when doing character wrapping
getLogAttrIsCharBreak :: MonadIO m => LogAttr -> m Word32 Source #
Get the value of the “is_char_break
” field.
When overloading is enabled, this is equivalent to
get
logAttr #isCharBreak
setLogAttrIsCharBreak :: MonadIO m => LogAttr -> Word32 -> m () Source #
Set the value of the “is_char_break
” field.
When overloading is enabled, this is equivalent to
set
logAttr [ #isCharBreak:=
value ]
isCursorPosition
if set, cursor can appear in front of character. i.e. this is a grapheme boundary, or the first character in the text. This flag implements Unicode's <ulink url="http://www.unicode.org/reports/tr29/">Grapheme Cluster Boundaries</ulink> semantics.
getLogAttrIsCursorPosition :: MonadIO m => LogAttr -> m Word32 Source #
Get the value of the “is_cursor_position
” field.
When overloading is enabled, this is equivalent to
get
logAttr #isCursorPosition
setLogAttrIsCursorPosition :: MonadIO m => LogAttr -> Word32 -> m () Source #
Set the value of the “is_cursor_position
” field.
When overloading is enabled, this is equivalent to
set
logAttr [ #isCursorPosition:=
value ]
isExpandableSpace
is a whitespace character that can possibly be expanded for justification purposes. (Since: 1.18)
getLogAttrIsExpandableSpace :: MonadIO m => LogAttr -> m Word32 Source #
Get the value of the “is_expandable_space
” field.
When overloading is enabled, this is equivalent to
get
logAttr #isExpandableSpace
setLogAttrIsExpandableSpace :: MonadIO m => LogAttr -> Word32 -> m () Source #
Set the value of the “is_expandable_space
” field.
When overloading is enabled, this is equivalent to
set
logAttr [ #isExpandableSpace:=
value ]
isLineBreak
if set, can break line in front of character
getLogAttrIsLineBreak :: MonadIO m => LogAttr -> m Word32 Source #
Get the value of the “is_line_break
” field.
When overloading is enabled, this is equivalent to
get
logAttr #isLineBreak
setLogAttrIsLineBreak :: MonadIO m => LogAttr -> Word32 -> m () Source #
Set the value of the “is_line_break
” field.
When overloading is enabled, this is equivalent to
set
logAttr [ #isLineBreak:=
value ]
isMandatoryBreak
if set, must break line in front of character
getLogAttrIsMandatoryBreak :: MonadIO m => LogAttr -> m Word32 Source #
Get the value of the “is_mandatory_break
” field.
When overloading is enabled, this is equivalent to
get
logAttr #isMandatoryBreak
setLogAttrIsMandatoryBreak :: MonadIO m => LogAttr -> Word32 -> m () Source #
Set the value of the “is_mandatory_break
” field.
When overloading is enabled, this is equivalent to
set
logAttr [ #isMandatoryBreak:=
value ]
isSentenceBoundary
is a sentence boundary.
There are two ways to divide sentences. The first assigns all
inter-sentence whitespace/control/format chars to some sentence,
so all chars are in some sentence; isSentenceBoundary
denotes
the boundaries there. The second way doesn't assign
between-sentence spaces, etc. to any sentence, so
isSentenceStart
/isSentenceEnd
mark the boundaries of those sentences.
getLogAttrIsSentenceBoundary :: MonadIO m => LogAttr -> m Word32 Source #
Get the value of the “is_sentence_boundary
” field.
When overloading is enabled, this is equivalent to
get
logAttr #isSentenceBoundary
setLogAttrIsSentenceBoundary :: MonadIO m => LogAttr -> Word32 -> m () Source #
Set the value of the “is_sentence_boundary
” field.
When overloading is enabled, this is equivalent to
set
logAttr [ #isSentenceBoundary:=
value ]
isSentenceEnd
is first char after a sentence.
Note that in degenerate cases, you could have both isSentenceStart
and isSentenceEnd
set for some character. (e.g. no space after a
period, so the next sentence starts right away)
getLogAttrIsSentenceEnd :: MonadIO m => LogAttr -> m Word32 Source #
Get the value of the “is_sentence_end
” field.
When overloading is enabled, this is equivalent to
get
logAttr #isSentenceEnd
setLogAttrIsSentenceEnd :: MonadIO m => LogAttr -> Word32 -> m () Source #
Set the value of the “is_sentence_end
” field.
When overloading is enabled, this is equivalent to
set
logAttr [ #isSentenceEnd:=
value ]
isSentenceStart
is first character in a sentence
getLogAttrIsSentenceStart :: MonadIO m => LogAttr -> m Word32 Source #
Get the value of the “is_sentence_start
” field.
When overloading is enabled, this is equivalent to
get
logAttr #isSentenceStart
setLogAttrIsSentenceStart :: MonadIO m => LogAttr -> Word32 -> m () Source #
Set the value of the “is_sentence_start
” field.
When overloading is enabled, this is equivalent to
set
logAttr [ #isSentenceStart:=
value ]
isWhite
is whitespace character
getLogAttrIsWhite :: MonadIO m => LogAttr -> m Word32 Source #
Get the value of the “is_white
” field.
When overloading is enabled, this is equivalent to
get
logAttr #isWhite
setLogAttrIsWhite :: MonadIO m => LogAttr -> Word32 -> m () Source #
Set the value of the “is_white
” field.
When overloading is enabled, this is equivalent to
set
logAttr [ #isWhite:=
value ]
isWordBoundary
is a word boundary. More specifically, means that this is not a position in the middle of a word. For example, both sides of a punctuation mark are considered word boundaries. This flag is particularly useful when selecting text word-by-word. This flag implements Unicode's <ulink url="http://www.unicode.org/reports/tr29/">Word Boundaries</ulink> semantics. (Since: 1.22)
getLogAttrIsWordBoundary :: MonadIO m => LogAttr -> m Word32 Source #
Get the value of the “is_word_boundary
” field.
When overloading is enabled, this is equivalent to
get
logAttr #isWordBoundary
setLogAttrIsWordBoundary :: MonadIO m => LogAttr -> Word32 -> m () Source #
Set the value of the “is_word_boundary
” field.
When overloading is enabled, this is equivalent to
set
logAttr [ #isWordBoundary:=
value ]
isWordEnd
is first non-word char after a word
Note that in degenerate cases, you could have both isWordStart
and isWordEnd
set for some character.
getLogAttrIsWordEnd :: MonadIO m => LogAttr -> m Word32 Source #
Get the value of the “is_word_end
” field.
When overloading is enabled, this is equivalent to
get
logAttr #isWordEnd
setLogAttrIsWordEnd :: MonadIO m => LogAttr -> Word32 -> m () Source #
Set the value of the “is_word_end
” field.
When overloading is enabled, this is equivalent to
set
logAttr [ #isWordEnd:=
value ]
isWordStart
is first character in a word
getLogAttrIsWordStart :: MonadIO m => LogAttr -> m Word32 Source #
Get the value of the “is_word_start
” field.
When overloading is enabled, this is equivalent to
get
logAttr #isWordStart
setLogAttrIsWordStart :: MonadIO m => LogAttr -> Word32 -> m () Source #
Set the value of the “is_word_start
” field.
When overloading is enabled, this is equivalent to
set
logAttr [ #isWordStart:=
value ]