/** * thunarx_provider_plugin_register_type: * @plugin : a #ThunarxProviderPlugin. * @type_parent : the type for the parent class. * @type_name : name for the type. * @type_info : type information structure. * @type_flags : flags field providing details about the type. * * Looks up or registers a type that is implemented with a particular type @plugin. If a type with name @type_name * was previously registered, the #GType identifier for the type is returned, otherwise the type is newly registered, * and the resulting #GType identifier returned. * * When reregistering a type (typically because a module is unloaded then reloaded, and reinitialized), module and * @type_parent must be the same as they were previously. * * Return value: the new or existing type id. **/ GType thunarx_provider_plugin_register_type (ThunarxProviderPlugin *plugin, GType type_parent, const gchar *type_name, const GTypeInfo *type_info, GTypeFlags type_flags) { g_return_val_if_fail (THUNARX_IS_PROVIDER_PLUGIN (plugin), G_TYPE_INVALID); g_return_val_if_fail (G_TYPE_IS_DERIVABLE (type_parent), G_TYPE_INVALID); g_return_val_if_fail (type_name != NULL && *type_name != '\0', G_TYPE_INVALID); g_return_val_if_fail (type_info != NULL, G_TYPE_INVALID); return (*THUNARX_PROVIDER_PLUGIN_GET_IFACE (plugin)->register_type) (plugin, type_parent, type_name, type_info, type_flags); }
/* Help function to dump a GType */ void my_dump_type(GType type_id) { printf("Type id: %d\n", type_id); printf("Type name: %s\n", g_type_name(type_id)); printf("Is fundamental? %s\n", G_TYPE_IS_FUNDAMENTAL(type_id) ? "yes" : "no"); printf("Is derived? %s\n", G_TYPE_IS_DERIVED(type_id) ? "yes" : "no"); printf("Is interface? %s\n", G_TYPE_IS_INTERFACE(type_id) ? "yes" : "no"); printf("Is classed? %s\n", G_TYPE_IS_CLASSED(type_id) ? "yes" : "no"); printf("Is instantiatable? %s\n", G_TYPE_IS_INSTANTIATABLE(type_id) ? "yes" : "no"); printf("Is derivable? %s\n", G_TYPE_IS_DERIVABLE(type_id) ? "yes" : "no"); printf("Is deep derivable? %s\n", G_TYPE_IS_DEEP_DERIVABLE(type_id) ? "yes" : "no"); printf("Is abstract? %s\n", G_TYPE_IS_ABSTRACT(type_id) ? "yes" : "no"); printf("Is value abstract? %s\n", G_TYPE_IS_VALUE_ABSTRACT(type_id) ? "yes" : "no"); printf("Is value type: %s\n", G_TYPE_IS_VALUE_TYPE(type_id) ? "yes" : "no"); printf("Has value table: %s\n", G_TYPE_HAS_VALUE_TABLE(type_id) ? "yes" : "no"); }
static PyObject* _wrap_g_type_is_derivable(PyGTypeWrapper *self) { return PyBool_FromLong(G_TYPE_IS_DERIVABLE(self->type)); }
static VALUE rg_derivable_p(VALUE self) { return CBOOL2RVAL(G_TYPE_IS_DERIVABLE(rbgobj_gtype_get(self))); }