mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
Add GObjectClass flag CLASS_HAS_PROPS_FLAG
This is set if a class or any of its parents have installed any properties. https://bugzilla.gnome.org/show_bug.cgi?id=557100
This commit is contained in:
parent
301d52d858
commit
39a1fe5782
@ -113,6 +113,9 @@
|
|||||||
((G_DATALIST_GET_FLAGS (&(object)->qdata) & OBJECT_HAS_TOGGLE_REF_FLAG) != 0)
|
((G_DATALIST_GET_FLAGS (&(object)->qdata) & OBJECT_HAS_TOGGLE_REF_FLAG) != 0)
|
||||||
#define OBJECT_FLOATING_FLAG 0x2
|
#define OBJECT_FLOATING_FLAG 0x2
|
||||||
|
|
||||||
|
#define CLASS_HAS_PROPS_FLAG 0x1
|
||||||
|
#define CLASS_HAS_PROPS(class) \
|
||||||
|
((class)->flags & CLASS_HAS_PROPS_FLAG)
|
||||||
|
|
||||||
/* --- signals --- */
|
/* --- signals --- */
|
||||||
enum {
|
enum {
|
||||||
@ -409,6 +412,9 @@ g_object_class_install_property (GObjectClass *class,
|
|||||||
{
|
{
|
||||||
g_return_if_fail (G_IS_OBJECT_CLASS (class));
|
g_return_if_fail (G_IS_OBJECT_CLASS (class));
|
||||||
g_return_if_fail (G_IS_PARAM_SPEC (pspec));
|
g_return_if_fail (G_IS_PARAM_SPEC (pspec));
|
||||||
|
|
||||||
|
class->flags |= CLASS_HAS_PROPS_FLAG;
|
||||||
|
|
||||||
if (pspec->flags & G_PARAM_WRITABLE)
|
if (pspec->flags & G_PARAM_WRITABLE)
|
||||||
g_return_if_fail (class->set_property != NULL);
|
g_return_if_fail (class->set_property != NULL);
|
||||||
if (pspec->flags & G_PARAM_READABLE)
|
if (pspec->flags & G_PARAM_READABLE)
|
||||||
|
Loading…
Reference in New Issue
Block a user