mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-27 17:52:58 +02:00
gobject: Add G_TYPE_FLAG_DEPRECATED
This can be used to mark entire types as deprecated, and trigger a warning when they are instantiated and `G_ENABLE_DIAGNOSTIC=1` is set in the environment. There's currently no convenient macros for defining types with the new flag, but you can do: ```c _G_DEFINE_TYPE_EXTENDED_BEGIN (GtkAppChooserWidget, gtk_app_chooser_widget, GTK_TYPE_WIDGET, G_TYPE_FLAG_DEPRECATED) ... _G_DEFINE_TYPE_EXTENDED_END () ``` Includes a unit test by Philip Withnall.
This commit is contained in:
committed by
Philip Withnall
parent
abdb81efa2
commit
fd0dd9e93c
@@ -18,6 +18,7 @@ G_TYPE_IS_DERIVABLE
|
||||
G_TYPE_IS_DEEP_DERIVABLE
|
||||
G_TYPE_IS_INTERFACE
|
||||
G_TYPE_IS_FINAL
|
||||
G_TYPE_IS_DEPRECATED
|
||||
GTypeInterface
|
||||
GTypeInstance
|
||||
GTypeClass
|
||||
|
Reference in New Issue
Block a user