Package ch.bailu.gtk.gobject
Klasse ParamSpec
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.ParamSpec
- Alle implementierten Schnittstellen:
PointerInterface
- Bekannte direkte Unterklassen:
ParamArray
,ParamFraction
,ParamSpecBoolean
,ParamSpecBoxed
,ParamSpecChar
,ParamSpecDouble
,ParamSpecEnum
,ParamSpecExpression
,ParamSpecFlags
,ParamSpecFloat
,ParamSpecGType
,ParamSpecInt
,ParamSpecInt64
,ParamSpecLong
,ParamSpecObject
,ParamSpecOverride
,ParamSpecParam
,ParamSpecPointer
,ParamSpecString
,ParamSpecUChar
,ParamSpecUInt
,ParamSpecUInt64
,ParamSpecULong
,ParamSpecUnichar
,ParamSpecValueArray
,ParamSpecVariant
`GParamSpec` encapsulates the metadata required to specify parameters, such as `GObject` properties.
## Parameter names
A property name consists of one or more segments consisting of ASCII letters
and digits, separated by either the `-` or `_` character. The first
character of a property name must be a letter. These are the same rules as
for signal naming (see [func@GObject.signal_new]).
When creating and looking up a `GParamSpec`, either separator can be
used, but they cannot be mixed. Using `-` is considerably more
efficient, and is the ‘canonical form’. Using `_` is discouraged.
## Parameter names
A property name consists of one or more segments consisting of ASCII letters
and digits, separated by either the `-` or `_` character. The first
character of a property name must be a letter. These are the same rules as
for signal naming (see [func@GObject.signal_new]).
When creating and looking up a `GParamSpec`, either separator can be
used, but they cannot be mixed. Using `-` is considerably more
efficient, and is the ‘canonical form’. Using `_` is discouraged.
-
Verschachtelte Klassen - Übersicht
Verschachtelte Klassen -
Feldübersicht
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetBlurb()
Get the short description of a #GParamSpec.static ClassHandler
Gets the default value of @pspec as a pointer to a #GValue.static int
getName()
Get the name of a #GParamSpec.int
Gets the GQuark for the name.getNick()
Get the nickname of a #GParamSpec.static long
static TypeSystem.TypeSize
getQdata
(int quark) Gets back user data pointers stored via g_param_spec_set_qdata().If the paramspec redirects operations to another paramspec,
returns that paramspec.static long
static TypeSystem.TypeSize
static Pointer
Creates a new #GParamSpec instance.static boolean
isValidName
(Str name) Validate a property name for a #GParamSpec.ref()
Increments the reference count of @pspec.refSink()
Convenience function to ref and sink a #GParamSpec.void
Sets an opaque, named pointer on a #GParamSpec.void
setQdataFull
(int quark, Pointer data, ParamSpec.OnDestroyNotify destroy) This function works like g_param_spec_set_qdata(), but in addition,
a `void (*destroy) (gpointer)` function may be
specified which is called with @data as argument when the @pspec is
finalized, or the data is being overwritten by a call to
g_param_spec_set_qdata() with the same @quark.void
sink()
The initial reference count of a newly created #GParamSpec is 1,
even though no one has explicitly called g_param_spec_ref() on it
yet.stealQdata
(int quark) Gets back user data pointers stored via g_param_spec_set_qdata()
and removes the @data from @pspec without invoking its destroy()
function (if any was set).void
unref()
Decrements the reference count of a @pspec.Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Konstruktordetails
-
ParamSpec
-
-
Methodendetails
-
getClassHandler
-
getBlurb
Get the short description of a #GParamSpec.- Gibt zurück:
- the short description of @pspec.
-
getDefaultValue
Gets the default value of @pspec as a pointer to a #GValue.
The #GValue will remain valid for the life of @pspec.- Gibt zurück:
- a pointer to a #GValue which must not be modified
-
getName
Get the name of a #GParamSpec.
The name is always an "interned" string (as per g_intern_string()).
This allows for pointer-value comparisons.- Gibt zurück:
- the name of @pspec.
-
getNameQuark
public int getNameQuark()Gets the GQuark for the name.- Gibt zurück:
- the GQuark for @pspec->name.
-
getNick
Get the nickname of a #GParamSpec.- Gibt zurück:
- the nickname of @pspec.
-
getQdata
Gets back user data pointers stored via g_param_spec_set_qdata().- Parameter:
quark
- a #GQuark, naming the user data pointer- Gibt zurück:
- the user data pointer set, or %NULL
-
getRedirectTarget
If the paramspec redirects operations to another paramspec,
returns that paramspec. Redirect is used typically for
providing a new implementation of a property in a derived
type while preserving all the properties from the parent
type. Redirection is established by creating a property
of type #GParamSpecOverride. See g_object_class_override_property()
for an example of the use of this capability.- Gibt zurück:
- paramspec to which requests on this paramspec should be redirected, or %NULL if none.
-
ref
Increments the reference count of @pspec.- Gibt zurück:
- the #GParamSpec that was passed into this function
-
refSink
Convenience function to ref and sink a #GParamSpec.- Gibt zurück:
- the #GParamSpec that was passed into this function
-
setQdata
Sets an opaque, named pointer on a #GParamSpec. The name is
specified through a #GQuark (retrieved e.g. via
g_quark_from_static_string()), and the pointer can be gotten back
from the @pspec with g_param_spec_get_qdata(). Setting a
previously set user data pointer, overrides (frees) the old pointer
set, using %NULL as pointer essentially removes the data stored.- Parameter:
quark
- a #GQuark, naming the user data pointerdata
- an opaque user data pointer
-
setQdataFull
This function works like g_param_spec_set_qdata(), but in addition,
a `void (*destroy) (gpointer)` function may be
specified which is called with @data as argument when the @pspec is
finalized, or the data is being overwritten by a call to
g_param_spec_set_qdata() with the same @quark.- Parameter:
quark
- a #GQuark, naming the user data pointerdata
- an opaque user data pointerdestroy
- function to invoke with @data as argument, when @data needs to be freed
-
sink
public void sink()The initial reference count of a newly created #GParamSpec is 1,
even though no one has explicitly called g_param_spec_ref() on it
yet. So the initial reference count is flagged as "floating", until
someone calls `g_param_spec_ref (pspec); g_param_spec_sink
(pspec);` in sequence on it, taking over the initial
reference count (thus ending up with a @pspec that has a reference
count of 1 still, but is not flagged "floating" anymore). -
stealQdata
Gets back user data pointers stored via g_param_spec_set_qdata()
and removes the @data from @pspec without invoking its destroy()
function (if any was set). Usually, calling this function is only
required to update user data pointers with a destroy notifier.- Parameter:
quark
- a #GQuark, naming the user data pointer- Gibt zurück:
- the user data pointer set, or %NULL
-
unref
public void unref()Decrements the reference count of a @pspec. -
internal
public static Pointer internal(long param_type, @Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, int flags) Creates a new #GParamSpec instance.
See [canonical parameter names][class@GObject.ParamSpec#parameter-names]
for details of the rules for @name. Names which violate these rules lead
to undefined behaviour.
Beyond the name, #GParamSpecs have two more descriptive strings, the
@nick and @blurb, which may be used as a localized label and description.
For GTK and related libraries these are considered deprecated and may be
omitted, while for other libraries such as GStreamer and its plugins they
are essential. When in doubt, follow the conventions used in the
surrounding code and supporting libraries.- Parameter:
param_type
- the #GType for the property; must be derived from %G_TYPE_PARAMname
- the canonical name of the propertynick
- the nickname of the propertyblurb
- a short description of the propertyflags
- a combination of #GParamFlags- Gibt zurück:
- (transfer floating): a newly allocated #GParamSpec instance, which is initially floating
-
isValidName
Validate a property name for a #GParamSpec. This can be useful for
dynamically-generated properties which need to be validated at run-time
before actually trying to create them.
See [canonical parameter names][class@GObject.ParamSpec#parameter-names]
for details of the rules for valid names.- Parameter:
name
- the canonical name of the property- Gibt zurück:
- %TRUE if @name is a valid property name, %FALSE otherwise.
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-