Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Management of GParamSpec
s.
Synopsis
- wrapGParamSpecPtr :: Ptr GParamSpec -> IO GParamSpec
- newGParamSpecFromPtr :: Ptr GParamSpec -> IO GParamSpec
- unrefGParamSpec :: GParamSpec -> IO ()
- disownGParamSpec :: GParamSpec -> IO (Ptr GParamSpec)
- data PropertyInfo o a = PropertyInfo {}
- gParamSpecValue :: forall o a. GObject o => PropertyInfo o a -> IO GParamSpec
- data CStringPropertyInfo o = CStringPropertyInfo {}
- gParamSpecCString :: GObject o => CStringPropertyInfo o -> IO GParamSpec
- data CIntPropertyInfo o = CIntPropertyInfo {}
- gParamSpecCInt :: GObject o => CIntPropertyInfo o -> IO GParamSpec
- data GParamFlag
- data PropGetSetter o = PropGetSetter {
- propGetter :: Ptr o -> Ptr GValue -> IO ()
- propSetter :: Ptr o -> Ptr GValue -> IO ()
- getGParamSpecGetterSetter :: forall o. Ptr GParamSpec -> IO (Maybe (PropGetSetter o))
Memory management
wrapGParamSpecPtr :: Ptr GParamSpec -> IO GParamSpec Source #
Take ownership of a ParamSpec passed in Ptr
.
newGParamSpecFromPtr :: Ptr GParamSpec -> IO GParamSpec Source #
Construct a Haskell wrapper for the given GParamSpec
, without
assuming ownership.
unrefGParamSpec :: GParamSpec -> IO () Source #
Remove a reference to the given GParamSpec
.
disownGParamSpec :: GParamSpec -> IO (Ptr GParamSpec) Source #
Disown a GParamSpec
, i.e. do not longer unref the associated
foreign GParamSpec
when the Haskell GParamSpec
gets garbage
collected.
GParamSpec building
data PropertyInfo o a Source #
Information on a property encoding a Haskell value. Note that from the C side this property will appear as an opaque pointer. Use the specialized constructors below for creating properties meaningful from the C side.
A property name consists of segments consisting of ASCII letters and digits, separated by either the '-' or '_' character. The first character of a property name must be a letter. Names which violate these rules lead to undefined behaviour.
When creating and looking up a property, either separator can be used, but they cannot be mixed. Using '-' is considerably more efficient and in fact required when using property names as detail strings for signals.
Beyond the name, properties have two more descriptive strings
associated with them, the nick
, which should be suitable for use
as a label for the property in a property editor, and the blurb
,
which should be a somewhat longer description, suitable for e.g. a
tooltip. The nick
and blurb
should ideally be localized.
PropertyInfo | |
|
gParamSpecValue :: forall o a. GObject o => PropertyInfo o a -> IO GParamSpec Source #
Create a GParamSpec
for a Haskell value.
data CStringPropertyInfo o Source #
Information on a property of type Text
to be registered. A
property name consists of segments consisting of ASCII letters and
digits, separated by either the '-' or '_' character. The first
character of a property name must be a letter. Names which violate
these rules lead to undefined behaviour.
When creating and looking up a property, either separator can be used, but they cannot be mixed. Using '-' is considerably more efficient and in fact required when using property names as detail strings for signals.
Beyond the name, properties have two more descriptive strings
associated with them, the nick
, which should be suitable for use
as a label for the property in a property editor, and the blurb
,
which should be a somewhat longer description, suitable for e.g. a
tooltip. The nick
and blurb
should ideally be localized.
gParamSpecCString :: GObject o => CStringPropertyInfo o -> IO GParamSpec Source #
Create a GParamSpec
for a string param.
data CIntPropertyInfo o Source #
Information on a property of type CInt
to be registered. A
property name consists of segments consisting of ASCII letters and
digits, separated by either the '-' or '_' character. The first
character of a property name must be a letter. Names which violate
these rules lead to undefined behaviour.
When creating and looking up a property, either separator can be used, but they cannot be mixed. Using '-' is considerably more efficient and in fact required when using property names as detail strings for signals.
Beyond the name, properties have two more descriptive strings
associated with them, the nick
, which should be suitable for use
as a label for the property in a property editor, and the blurb
,
which should be a somewhat longer description, suitable for e.g. a
tooltip. The nick
and blurb
should ideally be localized.
CIntPropertyInfo | |
|
gParamSpecCInt :: GObject o => CIntPropertyInfo o -> IO GParamSpec Source #
Create a GParamSpec
for an integer param.
data GParamFlag Source #
Flags controlling the behaviour of the the parameters.
GParamReadable | the parameter is readable |
GParamWritable | the parameter is writable |
GParamConstruct | the parameter will be set upon object construction |
GParamConstructOnly | the parameter can only be set upon object construction |
GParamExplicitNotify | calls to |
AnotherGParamFlag Int | Catch-all for unknown values |
Instances
Get/Set
data PropGetSetter o Source #
Low-level getter and setter for the property.
PropGetSetter | |
|
getGParamSpecGetterSetter :: forall o. Ptr GParamSpec -> IO (Maybe (PropGetSetter o)) Source #
Attempt to get the Haskell setter and getter for the given
GParamSpec
. This will only be possible if the GParamSpec
was
created with one of the functions above, if this is not the case
the function will return Nothing
.