gi-nm-1.0.1: NM bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.NM.Structs.Range

Description

No description available in the introspection data.

Synopsis

Exported types

newtype Range Source #

Memory-managed wrapper type.

Constructors

Range (ManagedPtr Range) 

Instances

Instances details
Eq Range Source # 
Instance details

Defined in GI.NM.Structs.Range

Methods

(==) :: Range -> Range -> Bool #

(/=) :: Range -> Range -> Bool #

GBoxed Range Source # 
Instance details

Defined in GI.NM.Structs.Range

ManagedPtrNewtype Range Source # 
Instance details

Defined in GI.NM.Structs.Range

TypedObject Range Source # 
Instance details

Defined in GI.NM.Structs.Range

Methods

glibType :: IO GType #

HasParentTypes Range Source # 
Instance details

Defined in GI.NM.Structs.Range

IsGValue (Maybe Range) Source #

Convert Range to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.NM.Structs.Range

type ParentTypes Range Source # 
Instance details

Defined in GI.NM.Structs.Range

type ParentTypes Range = '[] :: [Type]

Methods

Click to display all available methods, including inherited ones

Expand

Methods

cmp, ref, toStr, unref.

Getters

getRange.

Setters

None.

cmp

rangeCmp Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Range

a: a Range

-> Range

b: another Range

-> m Int32

Returns: zero if the two instances are equivalent or a non-zero integer otherwise. This defines a total ordering over the ranges.

Compare two ranges.

Since: 1.42

fromStr

rangeFromStr Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

str: the string representation of a range

-> m Range

Returns: the NMRange or Nothing (Can throw GError)

Parses the string representation of the range to create a NMRange instance.

Since: 1.42

getRange

rangeGetRange Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Range

range: the Range

-> m (Bool, Word64, Word64)

Returns: True if the range contains more than one element, False otherwise.

Gets the start and end values for the range.

Since: 1.42

new

rangeNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word64

start: the first element of the range

-> Word64

end: the last element of the range, must be greater than or equal to start.

-> m Range

Returns: the new Range object.

Creates a new Range object for the given range. Setting end equal to start creates a single-element range.

Since: 1.42

ref

rangeRef Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Range

range: the Range

-> m Range

Returns: the input argument range object.

Increases the reference count of the object. This is thread-safe.

Since: 1.42

toStr

rangeToStr Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Range

range: the NMRange

-> m Text

Returns: a string representing the range.

Convert a NMRange to a string.

Since: 1.42

unref

rangeUnref Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Range

range: the Range

-> m () 

Decreases the reference count of the object. If the reference count reaches zero the object will be destroyed. This is thread-safe.

Since: 1.42