PropertyExpression#
- class PropertyExpression(*args, **kwargs)#
Superclasses: Expression
A GObject property value in a GtkExpression.
Constructors#
- class PropertyExpression
- classmethod new(this_type: GType, expression: Expression | None, property_name: str) PropertyExpression#
Creates an expression that looks up a property.
The object to use is found by evaluating the
expression, or using thethisargument whenexpressionisNULL.If the resulting object conforms to
this_type, its property namedproperty_namewill be queried. Otherwise, this expression’s evaluation will fail.The given
this_typemust have a property withproperty_name.- Parameters:
this_type – The type to expect for the this type
expression – Expression to evaluate to get the object to query or
NULLto query thethisobjectproperty_name – name of the property
- classmethod new_for_pspec(expression: Expression | None, pspec: ParamSpec) PropertyExpression#
Creates an expression that looks up a property.
The object to use is found by evaluating the
expression, or using thethisargument whenexpressionisNULL.If the resulting object conforms to
this_type, its property specified bypspecwill be queried. Otherwise, this expression’s evaluation will fail.- Parameters:
expression – Expression to evaluate to get the object to query or
NULLto query thethisobjectpspec – the
GParamSpecfor the property to query
Methods#
- class PropertyExpression
- get_expression() Expression | None#
Gets the expression specifying the object of a property expression.
- get_pspec() ParamSpec#
Gets the
GParamSpecspecifying the property of a property expression.