Class Gobject


public class Gobject extends Package
  • Constructor Details

    • Gobject

      public Gobject()
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • boxedCopy

      public static Pointer boxedCopy(long boxed_type, @Nonnull Pointer src_boxed)
      Provide a copy of a boxed structure @src_boxed which is of type @boxed_type.
      Parameters:
      boxed_type - The type of @src_boxed.
      src_boxed - The boxed structure to be copied.
      Returns:
      The newly created copy of the boxed structure.
    • boxedFree

      public static void boxedFree(long boxed_type, @Nonnull Pointer boxed)
      Free the boxed structure @boxed which is of type @boxed_type.
      Parameters:
      boxed_type - The type of @boxed.
      boxed - The boxed structure to be freed.
    • boxedTypeRegisterStatic

      public static long boxedTypeRegisterStatic(@Nonnull Str name, Gobject.OnBoxedCopyFunc boxed_copy, Gobject.OnBoxedFreeFunc boxed_free)
      This function creates a new %G_TYPE_BOXED derived type id for a new
      boxed type with name @name.

      Boxed type handling functions have to be provided to copy and free
      opaque boxed structures of this type.

      For the general case, it is recommended to use G_DEFINE_BOXED_TYPE()
      instead of calling g_boxed_type_register_static() directly. The macro
      will create the appropriate `*_get_type()` function for the boxed type.
      Parameters:
      name - Name of the new boxed type.
      boxed_copy - Boxed structure copy function.
      boxed_free - Boxed structure free function.
      Returns:
      New %G_TYPE_BOXED derived type id for @name.
    • cclosureMarshalBooleanBoxedBoxed

      public static void cclosureMarshalBooleanBoxedBoxed(@Nonnull Closure closure, @Nonnull Value return_value, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A #GClosureMarshal function for use with signals with handlers that
      take two boxed pointers as arguments and return a boolean. If you
      have such a signal, you will probably also need to use an
      accumulator, such as g_signal_accumulator_true_handled().
      Parameters:
      closure - A #GClosure.
      return_value - A #GValue to store the return value. May be %NULL if the callback of closure doesn't return a value.
      n_param_values - The length of the @param_values array.
      param_values - An array of #GValues holding the arguments on which to invoke the callback of closure.
      invocation_hint - The invocation hint given as the last argument to g_closure_invoke().
      marshal_data - Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
    • cclosureMarshalBooleanFlags

      public static void cclosureMarshalBooleanFlags(@Nonnull Closure closure, @Nonnull Value return_value, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A marshaller for a #GCClosure with a callback of type
      `gboolean (*callback) (gpointer instance, gint arg1, gpointer user_data)` where the #gint parameter
      denotes a flags type.
      Parameters:
      closure - the #GClosure to which the marshaller belongs
      return_value - a #GValue which can store the returned #gboolean
      n_param_values - 2
      param_values - a #GValue array holding instance and arg1
      invocation_hint - the invocation hint given as the last argument to g_closure_invoke()
      marshal_data - additional data specified when registering the marshaller
    • cclosureMarshalStringObjectPointer

      public static void cclosureMarshalStringObjectPointer(@Nonnull Closure closure, @Nonnull Value return_value, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A marshaller for a #GCClosure with a callback of type
      `gchar* (*callback) (gpointer instance, GObject *arg1, gpointer arg2, gpointer user_data)`.
      Parameters:
      closure - the #GClosure to which the marshaller belongs
      return_value - a #GValue, which can store the returned string
      n_param_values - 3
      param_values - a #GValue array holding instance, arg1 and arg2
      invocation_hint - the invocation hint given as the last argument to g_closure_invoke()
      marshal_data - additional data specified when registering the marshaller
    • cclosureMarshalVoidBoolean

      public static void cclosureMarshalVoidBoolean(@Nonnull Closure closure, @Nonnull Value return_value, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A marshaller for a #GCClosure with a callback of type
      `void (*callback) (gpointer instance, gboolean arg1, gpointer user_data)`.
      Parameters:
      closure - the #GClosure to which the marshaller belongs
      return_value - ignored
      n_param_values - 2
      param_values - a #GValue array holding the instance and the #gboolean parameter
      invocation_hint - the invocation hint given as the last argument to g_closure_invoke()
      marshal_data - additional data specified when registering the marshaller
    • cclosureMarshalVoidBoxed

      public static void cclosureMarshalVoidBoxed(@Nonnull Closure closure, @Nonnull Value return_value, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A marshaller for a #GCClosure with a callback of type
      `void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data)`.
      Parameters:
      closure - the #GClosure to which the marshaller belongs
      return_value - ignored
      n_param_values - 2
      param_values - a #GValue array holding the instance and the #GBoxed* parameter
      invocation_hint - the invocation hint given as the last argument to g_closure_invoke()
      marshal_data - additional data specified when registering the marshaller
    • cclosureMarshalVoidChar

      public static void cclosureMarshalVoidChar(@Nonnull Closure closure, @Nonnull Value return_value, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A marshaller for a #GCClosure with a callback of type
      `void (*callback) (gpointer instance, gchar arg1, gpointer user_data)`.
      Parameters:
      closure - the #GClosure to which the marshaller belongs
      return_value - ignored
      n_param_values - 2
      param_values - a #GValue array holding the instance and the #gchar parameter
      invocation_hint - the invocation hint given as the last argument to g_closure_invoke()
      marshal_data - additional data specified when registering the marshaller
    • cclosureMarshalVoidDouble

      public static void cclosureMarshalVoidDouble(@Nonnull Closure closure, @Nonnull Value return_value, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A marshaller for a #GCClosure with a callback of type
      `void (*callback) (gpointer instance, gdouble arg1, gpointer user_data)`.
      Parameters:
      closure - the #GClosure to which the marshaller belongs
      return_value - ignored
      n_param_values - 2
      param_values - a #GValue array holding the instance and the #gdouble parameter
      invocation_hint - the invocation hint given as the last argument to g_closure_invoke()
      marshal_data - additional data specified when registering the marshaller
    • cclosureMarshalVoidEnum

      public static void cclosureMarshalVoidEnum(@Nonnull Closure closure, @Nonnull Value return_value, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A marshaller for a #GCClosure with a callback of type
      `void (*callback) (gpointer instance, gint arg1, gpointer user_data)` where the #gint parameter denotes an enumeration type..
      Parameters:
      closure - the #GClosure to which the marshaller belongs
      return_value - ignored
      n_param_values - 2
      param_values - a #GValue array holding the instance and the enumeration parameter
      invocation_hint - the invocation hint given as the last argument to g_closure_invoke()
      marshal_data - additional data specified when registering the marshaller
    • cclosureMarshalVoidFlags

      public static void cclosureMarshalVoidFlags(@Nonnull Closure closure, @Nonnull Value return_value, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A marshaller for a #GCClosure with a callback of type
      `void (*callback) (gpointer instance, gint arg1, gpointer user_data)` where the #gint parameter denotes a flags type.
      Parameters:
      closure - the #GClosure to which the marshaller belongs
      return_value - ignored
      n_param_values - 2
      param_values - a #GValue array holding the instance and the flags parameter
      invocation_hint - the invocation hint given as the last argument to g_closure_invoke()
      marshal_data - additional data specified when registering the marshaller
    • cclosureMarshalVoidFloat

      public static void cclosureMarshalVoidFloat(@Nonnull Closure closure, @Nonnull Value return_value, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A marshaller for a #GCClosure with a callback of type
      `void (*callback) (gpointer instance, gfloat arg1, gpointer user_data)`.
      Parameters:
      closure - the #GClosure to which the marshaller belongs
      return_value - ignored
      n_param_values - 2
      param_values - a #GValue array holding the instance and the #gfloat parameter
      invocation_hint - the invocation hint given as the last argument to g_closure_invoke()
      marshal_data - additional data specified when registering the marshaller
    • cclosureMarshalVoidInt

      public static void cclosureMarshalVoidInt(@Nonnull Closure closure, @Nonnull Value return_value, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A marshaller for a #GCClosure with a callback of type
      `void (*callback) (gpointer instance, gint arg1, gpointer user_data)`.
      Parameters:
      closure - the #GClosure to which the marshaller belongs
      return_value - ignored
      n_param_values - 2
      param_values - a #GValue array holding the instance and the #gint parameter
      invocation_hint - the invocation hint given as the last argument to g_closure_invoke()
      marshal_data - additional data specified when registering the marshaller
    • cclosureMarshalVoidLong

      public static void cclosureMarshalVoidLong(@Nonnull Closure closure, @Nonnull Value return_value, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A marshaller for a #GCClosure with a callback of type
      `void (*callback) (gpointer instance, glong arg1, gpointer user_data)`.
      Parameters:
      closure - the #GClosure to which the marshaller belongs
      return_value - ignored
      n_param_values - 2
      param_values - a #GValue array holding the instance and the #glong parameter
      invocation_hint - the invocation hint given as the last argument to g_closure_invoke()
      marshal_data - additional data specified when registering the marshaller
    • cclosureMarshalVoidObject

      public static void cclosureMarshalVoidObject(@Nonnull Closure closure, @Nonnull Value return_value, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A marshaller for a #GCClosure with a callback of type
      `void (*callback) (gpointer instance, GObject *arg1, gpointer user_data)`.
      Parameters:
      closure - the #GClosure to which the marshaller belongs
      return_value - ignored
      n_param_values - 2
      param_values - a #GValue array holding the instance and the #GObject* parameter
      invocation_hint - the invocation hint given as the last argument to g_closure_invoke()
      marshal_data - additional data specified when registering the marshaller
    • cclosureMarshalVoidParam

      public static void cclosureMarshalVoidParam(@Nonnull Closure closure, @Nonnull Value return_value, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A marshaller for a #GCClosure with a callback of type
      `void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data)`.
      Parameters:
      closure - the #GClosure to which the marshaller belongs
      return_value - ignored
      n_param_values - 2
      param_values - a #GValue array holding the instance and the #GParamSpec* parameter
      invocation_hint - the invocation hint given as the last argument to g_closure_invoke()
      marshal_data - additional data specified when registering the marshaller
    • cclosureMarshalVoidPointer

      public static void cclosureMarshalVoidPointer(@Nonnull Closure closure, @Nonnull Value return_value, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A marshaller for a #GCClosure with a callback of type
      `void (*callback) (gpointer instance, gpointer arg1, gpointer user_data)`.
      Parameters:
      closure - the #GClosure to which the marshaller belongs
      return_value - ignored
      n_param_values - 2
      param_values - a #GValue array holding the instance and the #gpointer parameter
      invocation_hint - the invocation hint given as the last argument to g_closure_invoke()
      marshal_data - additional data specified when registering the marshaller
    • cclosureMarshalVoidString

      public static void cclosureMarshalVoidString(@Nonnull Closure closure, @Nonnull Value return_value, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A marshaller for a #GCClosure with a callback of type
      `void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data)`.
      Parameters:
      closure - the #GClosure to which the marshaller belongs
      return_value - ignored
      n_param_values - 2
      param_values - a #GValue array holding the instance and the #gchar* parameter
      invocation_hint - the invocation hint given as the last argument to g_closure_invoke()
      marshal_data - additional data specified when registering the marshaller
    • cclosureMarshalVoidUchar

      public static void cclosureMarshalVoidUchar(@Nonnull Closure closure, @Nonnull Value return_value, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A marshaller for a #GCClosure with a callback of type
      `void (*callback) (gpointer instance, guchar arg1, gpointer user_data)`.
      Parameters:
      closure - the #GClosure to which the marshaller belongs
      return_value - ignored
      n_param_values - 2
      param_values - a #GValue array holding the instance and the #guchar parameter
      invocation_hint - the invocation hint given as the last argument to g_closure_invoke()
      marshal_data - additional data specified when registering the marshaller
    • cclosureMarshalVoidUint

      public static void cclosureMarshalVoidUint(@Nonnull Closure closure, @Nonnull Value return_value, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A marshaller for a #GCClosure with a callback of type
      `void (*callback) (gpointer instance, guint arg1, gpointer user_data)`.
      Parameters:
      closure - the #GClosure to which the marshaller belongs
      return_value - ignored
      n_param_values - 2
      param_values - a #GValue array holding the instance and the #guint parameter
      invocation_hint - the invocation hint given as the last argument to g_closure_invoke()
      marshal_data - additional data specified when registering the marshaller
    • cclosureMarshalVoidUintPointer

      public static void cclosureMarshalVoidUintPointer(@Nonnull Closure closure, @Nonnull Value return_value, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A marshaller for a #GCClosure with a callback of type
      `void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data)`.
      Parameters:
      closure - the #GClosure to which the marshaller belongs
      return_value - ignored
      n_param_values - 3
      param_values - a #GValue array holding instance, arg1 and arg2
      invocation_hint - the invocation hint given as the last argument to g_closure_invoke()
      marshal_data - additional data specified when registering the marshaller
    • cclosureMarshalVoidUlong

      public static void cclosureMarshalVoidUlong(@Nonnull Closure closure, @Nonnull Value return_value, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A marshaller for a #GCClosure with a callback of type
      `void (*callback) (gpointer instance, gulong arg1, gpointer user_data)`.
      Parameters:
      closure - the #GClosure to which the marshaller belongs
      return_value - ignored
      n_param_values - 2
      param_values - a #GValue array holding the instance and the #gulong parameter
      invocation_hint - the invocation hint given as the last argument to g_closure_invoke()
      marshal_data - additional data specified when registering the marshaller
    • cclosureMarshalVoidVariant

      public static void cclosureMarshalVoidVariant(@Nonnull Closure closure, @Nonnull Value return_value, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A marshaller for a #GCClosure with a callback of type
      `void (*callback) (gpointer instance, GVariant *arg1, gpointer user_data)`.
      Parameters:
      closure - the #GClosure to which the marshaller belongs
      return_value - ignored
      n_param_values - 2
      param_values - a #GValue array holding the instance and the #GVariant* parameter
      invocation_hint - the invocation hint given as the last argument to g_closure_invoke()
      marshal_data - additional data specified when registering the marshaller
    • cclosureMarshalVoidVoid

      public static void cclosureMarshalVoidVoid(@Nonnull Closure closure, @Nonnull Value return_value, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A marshaller for a #GCClosure with a callback of type
      `void (*callback) (gpointer instance, gpointer user_data)`.
      Parameters:
      closure - the #GClosure to which the marshaller belongs
      return_value - ignored
      n_param_values - 1
      param_values - a #GValue array holding only the instance
      invocation_hint - the invocation hint given as the last argument to g_closure_invoke()
      marshal_data - additional data specified when registering the marshaller
    • cclosureMarshalGeneric

      public static void cclosureMarshalGeneric(@Nonnull Closure closure, @Nonnull Value return_gvalue, int n_param_values, @Nonnull Value param_values, @Nullable Pointer invocation_hint, @Nullable Pointer marshal_data)
      A generic marshaller function implemented via
      [libffi](http://sourceware.org/libffi/).

      Normally this function is not passed explicitly to g_signal_new(),
      but used automatically by GLib when specifying a %NULL marshaller.
      Parameters:
      closure - A #GClosure.
      return_gvalue - A #GValue to store the return value. May be %NULL if the callback of closure doesn't return a value.
      n_param_values - The length of the @param_values array.
      param_values - An array of #GValues holding the arguments on which to invoke the callback of closure.
      invocation_hint - The invocation hint given as the last argument to g_closure_invoke().
      marshal_data - Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
    • cclosureNew

      public static Closure cclosureNew(Gobject.OnCallback callback_func, @Nullable Pointer user_data, Gobject.OnClosureNotify destroy_data)
      Creates a new closure which invokes @callback_func with @user_data as
      the last parameter.

      @destroy_data will be called as a finalize notifier on the #GClosure.
      Parameters:
      callback_func - the function to invoke
      user_data - user data to pass to @callback_func
      destroy_data - destroy notify to be called when @user_data is no longer used
      Returns:
      a floating reference to a new #GCClosure
    • cclosureNewObject

      public static Closure cclosureNewObject(Gobject.OnCallback callback_func, @Nonnull Object object)
      A variant of g_cclosure_new() which uses @object as @user_data and
      calls g_object_watch_closure() on @object and the created
      closure. This function is useful when you have a callback closely
      associated with a #GObject, and want the callback to no longer run
      after the object is is freed.
      Parameters:
      callback_func - the function to invoke
      object - a #GObject pointer to pass to @callback_func
      Returns:
      a new #GCClosure
    • cclosureNewObjectSwap

      public static Closure cclosureNewObjectSwap(Gobject.OnCallback callback_func, @Nonnull Object object)
      A variant of g_cclosure_new_swap() which uses @object as @user_data
      and calls g_object_watch_closure() on @object and the created
      closure. This function is useful when you have a callback closely
      associated with a #GObject, and want the callback to no longer run
      after the object is is freed.
      Parameters:
      callback_func - the function to invoke
      object - a #GObject pointer to pass to @callback_func
      Returns:
      a new #GCClosure
    • cclosureNewSwap

      public static Closure cclosureNewSwap(Gobject.OnCallback callback_func, @Nullable Pointer user_data, Gobject.OnClosureNotify destroy_data)
      Creates a new closure which invokes @callback_func with @user_data as
      the first parameter.

      @destroy_data will be called as a finalize notifier on the #GClosure.
      Parameters:
      callback_func - the function to invoke
      user_data - user data to pass to @callback_func
      destroy_data - destroy notify to be called when @user_data is no longer used
      Returns:
      a floating reference to a new #GCClosure
    • enumCompleteTypeInfo

      public static void enumCompleteTypeInfo(long g_enum_type, @Nonnull TypeInfo info, @Nonnull EnumValue const_values)
      This function is meant to be called from the `complete_type_info`
      function of a #GTypePlugin implementation, as in the following
      example:
      <!-- language="C" -->
       static void
       my_enum_complete_type_info (GTypePlugin     *plugin,
                                   GType            g_type,
                                   GTypeInfo       *info,
                                   GTypeValueTable *value_table)
       {
         static const GEnumValue values[] = {
           { MY_ENUM_FOO, "MY_ENUM_FOO", "foo" },
           { MY_ENUM_BAR, "MY_ENUM_BAR", "bar" },
           { 0, NULL, NULL }
         };
       
         g_enum_complete_type_info (type, info, values);
       }
       
      Parameters:
      g_enum_type - the type identifier of the type being completed
      info - the #GTypeInfo struct to be filled in
      const_values - An array of #GEnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
    • enumGetValue

      public static EnumValue enumGetValue(@Nonnull EnumClass enum_class, int value)
      Returns the #GEnumValue for a value.
      Parameters:
      enum_class - a #GEnumClass
      value - the value to look up
      Returns:
      the #GEnumValue for @value, or %NULL if @value is not a member of the enumeration
    • enumGetValueByName

      public static EnumValue enumGetValueByName(@Nonnull EnumClass enum_class, @Nonnull Str name)
      Looks up a #GEnumValue by name.
      Parameters:
      enum_class - a #GEnumClass
      name - the name to look up
      Returns:
      the #GEnumValue with name @name, or %NULL if the enumeration doesn't have a member with that name
    • enumGetValueByNick

      public static EnumValue enumGetValueByNick(@Nonnull EnumClass enum_class, @Nonnull Str nick)
      Looks up a #GEnumValue by nickname.
      Parameters:
      enum_class - a #GEnumClass
      nick - the nickname to look up
      Returns:
      the #GEnumValue with nickname @nick, or %NULL if the enumeration doesn't have a member with that nickname
    • enumRegisterStatic

      public static long enumRegisterStatic(@Nonnull Str name, @Nonnull EnumValue const_static_values)
      Registers a new static enumeration type with the name @name.

      It is normally more convenient to let [glib-mkenums][glib-mkenums],
      generate a my_enum_get_type() function from a usual C enumeration
      definition than to write one yourself using g_enum_register_static().
      Parameters:
      name - A nul-terminated string used as the name of the new type.
      const_static_values - An array of #GEnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0. GObject keeps a reference to the data, so it cannot be stack-allocated.
      Returns:
      The new type identifier.
    • enumToString

      public static Str enumToString(long g_enum_type, int value)
      Pretty-prints @value in the form of the enum’s name.

      This is intended to be used for debugging purposes. The format of the output
      may change in the future.
      Parameters:
      g_enum_type - the type identifier of a #GEnumClass type
      value - the value
      Returns:
      a newly-allocated text string
    • flagsCompleteTypeInfo

      public static void flagsCompleteTypeInfo(long g_flags_type, @Nonnull TypeInfo info, @Nonnull FlagsValue const_values)
      This function is meant to be called from the complete_type_info()
      function of a #GTypePlugin implementation, see the example for
      g_enum_complete_type_info() above.
      Parameters:
      g_flags_type - the type identifier of the type being completed
      info - the #GTypeInfo struct to be filled in
      const_values - An array of #GFlagsValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
    • flagsGetFirstValue

      public static FlagsValue flagsGetFirstValue(@Nonnull FlagsClass flags_class, int value)
      Returns the first #GFlagsValue which is set in @value.
      Parameters:
      flags_class - a #GFlagsClass
      value - the value
      Returns:
      the first #GFlagsValue which is set in @value, or %NULL if none is set
    • flagsGetValueByName

      public static FlagsValue flagsGetValueByName(@Nonnull FlagsClass flags_class, @Nonnull Str name)
      Looks up a #GFlagsValue by name.
      Parameters:
      flags_class - a #GFlagsClass
      name - the name to look up
      Returns:
      the #GFlagsValue with name @name, or %NULL if there is no flag with that name
    • flagsGetValueByNick

      public static FlagsValue flagsGetValueByNick(@Nonnull FlagsClass flags_class, @Nonnull Str nick)
      Looks up a #GFlagsValue by nickname.
      Parameters:
      flags_class - a #GFlagsClass
      nick - the nickname to look up
      Returns:
      the #GFlagsValue with nickname @nick, or %NULL if there is no flag with that nickname
    • flagsRegisterStatic

      public static long flagsRegisterStatic(@Nonnull Str name, @Nonnull FlagsValue const_static_values)
      Registers a new static flags type with the name @name.

      It is normally more convenient to let [glib-mkenums][glib-mkenums]
      generate a my_flags_get_type() function from a usual C enumeration
      definition than to write one yourself using g_flags_register_static().
      Parameters:
      name - A nul-terminated string used as the name of the new type.
      const_static_values - An array of #GFlagsValue structs for the possible flags values. The array is terminated by a struct with all members being 0. GObject keeps a reference to the data, so it cannot be stack-allocated.
      Returns:
      The new type identifier.
    • flagsToString

      public static Str flagsToString(long flags_type, int value)
      Pretty-prints @value in the form of the flag names separated by ` | ` and
      sorted. Any extra bits will be shown at the end as a hexadecimal number.

      This is intended to be used for debugging purposes. The format of the output
      may change in the future.
      Parameters:
      flags_type - the type identifier of a #GFlagsClass type
      value - the value
      Returns:
      a newly-allocated text string
    • gtypeGetType

      public static long gtypeGetType()
      Returns:
    • paramSpecBoolean

      public static ParamSpec paramSpecBoolean(@Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, boolean default_value, int flags)
      Creates a new #GParamSpecBoolean instance specifying a %G_TYPE_BOOLEAN
      property. In many cases, it may be more appropriate to use an enum with
      g_param_spec_enum(), both to improve code clarity by using explicitly named
      values, and to allow for more values to be added in future without breaking
      API.

      See g_param_spec_internal() for details on property names.
      Parameters:
      name - canonical name of the property specified
      nick - nick name for the property specified
      blurb - description of the property specified
      default_value - default value for the property specified
      flags - flags for the property specified
      Returns:
      a newly created parameter specification
    • paramSpecBoxed

      public static ParamSpec paramSpecBoxed(@Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, long boxed_type, int flags)
      Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_BOXED
      derived property.

      See g_param_spec_internal() for details on property names.
      Parameters:
      name - canonical name of the property specified
      nick - nick name for the property specified
      blurb - description of the property specified
      boxed_type - %G_TYPE_BOXED derived type of this property
      flags - flags for the property specified
      Returns:
      a newly created parameter specification
    • paramSpecChar

      public static ParamSpec paramSpecChar(@Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, int minimum, int maximum, int default_value, int flags)
      Creates a new #GParamSpecChar instance specifying a %G_TYPE_CHAR property.
      Parameters:
      name - canonical name of the property specified
      nick - nick name for the property specified
      blurb - description of the property specified
      minimum - minimum value for the property specified
      maximum - maximum value for the property specified
      default_value - default value for the property specified
      flags - flags for the property specified
      Returns:
      a newly created parameter specification
    • paramSpecDouble

      public static ParamSpec paramSpecDouble(@Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, double minimum, double maximum, double default_value, int flags)
      Creates a new #GParamSpecDouble instance specifying a %G_TYPE_DOUBLE
      property.

      See g_param_spec_internal() for details on property names.
      Parameters:
      name - canonical name of the property specified
      nick - nick name for the property specified
      blurb - description of the property specified
      minimum - minimum value for the property specified
      maximum - maximum value for the property specified
      default_value - default value for the property specified
      flags - flags for the property specified
      Returns:
      a newly created parameter specification
    • paramSpecEnum

      public static ParamSpec paramSpecEnum(@Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, long enum_type, int default_value, int flags)
      Creates a new #GParamSpecEnum instance specifying a %G_TYPE_ENUM
      property.

      See g_param_spec_internal() for details on property names.
      Parameters:
      name - canonical name of the property specified
      nick - nick name for the property specified
      blurb - description of the property specified
      enum_type - a #GType derived from %G_TYPE_ENUM
      default_value - default value for the property specified
      flags - flags for the property specified
      Returns:
      a newly created parameter specification
    • paramSpecFlags

      public static ParamSpec paramSpecFlags(@Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, long flags_type, int default_value, int flags)
      Creates a new #GParamSpecFlags instance specifying a %G_TYPE_FLAGS
      property.

      See g_param_spec_internal() for details on property names.
      Parameters:
      name - canonical name of the property specified
      nick - nick name for the property specified
      blurb - description of the property specified
      flags_type - a #GType derived from %G_TYPE_FLAGS
      default_value - default value for the property specified
      flags - flags for the property specified
      Returns:
      a newly created parameter specification
    • paramSpecFloat

      public static ParamSpec paramSpecFloat(@Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, float minimum, float maximum, float default_value, int flags)
      Creates a new #GParamSpecFloat instance specifying a %G_TYPE_FLOAT property.

      See g_param_spec_internal() for details on property names.
      Parameters:
      name - canonical name of the property specified
      nick - nick name for the property specified
      blurb - description of the property specified
      minimum - minimum value for the property specified
      maximum - maximum value for the property specified
      default_value - default value for the property specified
      flags - flags for the property specified
      Returns:
      a newly created parameter specification
    • paramSpecGtype

      public static ParamSpec paramSpecGtype(@Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, long is_a_type, int flags)
      Creates a new #GParamSpecGType instance specifying a
      %G_TYPE_GTYPE property.

      See g_param_spec_internal() for details on property names.
      Parameters:
      name - canonical name of the property specified
      nick - nick name for the property specified
      blurb - description of the property specified
      is_a_type - a #GType whose subtypes are allowed as values of the property (use %G_TYPE_NONE for any type)
      flags - flags for the property specified
      Returns:
      a newly created parameter specification
    • paramSpecInt

      public static ParamSpec paramSpecInt(@Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, int minimum, int maximum, int default_value, int flags)
      Creates a new #GParamSpecInt instance specifying a %G_TYPE_INT property.

      See g_param_spec_internal() for details on property names.
      Parameters:
      name - canonical name of the property specified
      nick - nick name for the property specified
      blurb - description of the property specified
      minimum - minimum value for the property specified
      maximum - maximum value for the property specified
      default_value - default value for the property specified
      flags - flags for the property specified
      Returns:
      a newly created parameter specification
    • paramSpecInt64

      public static ParamSpec paramSpecInt64(@Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, long minimum, long maximum, long default_value, int flags)
      Creates a new #GParamSpecInt64 instance specifying a %G_TYPE_INT64 property.

      See g_param_spec_internal() for details on property names.
      Parameters:
      name - canonical name of the property specified
      nick - nick name for the property specified
      blurb - description of the property specified
      minimum - minimum value for the property specified
      maximum - maximum value for the property specified
      default_value - default value for the property specified
      flags - flags for the property specified
      Returns:
      a newly created parameter specification
    • paramSpecLong

      public static ParamSpec paramSpecLong(@Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, long minimum, long maximum, long default_value, int flags)
      Creates a new #GParamSpecLong instance specifying a %G_TYPE_LONG property.

      See g_param_spec_internal() for details on property names.
      Parameters:
      name - canonical name of the property specified
      nick - nick name for the property specified
      blurb - description of the property specified
      minimum - minimum value for the property specified
      maximum - maximum value for the property specified
      default_value - default value for the property specified
      flags - flags for the property specified
      Returns:
      a newly created parameter specification
    • paramSpecObject

      public static ParamSpec paramSpecObject(@Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, long object_type, int flags)
      Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_OBJECT
      derived property.

      See g_param_spec_internal() for details on property names.
      Parameters:
      name - canonical name of the property specified
      nick - nick name for the property specified
      blurb - description of the property specified
      object_type - %G_TYPE_OBJECT derived type of this property
      flags - flags for the property specified
      Returns:
      a newly created parameter specification
    • paramSpecOverride

      public static ParamSpec paramSpecOverride(@Nonnull Str name, @Nonnull ParamSpec overridden)
      Creates a new property of type #GParamSpecOverride. This is used
      to direct operations to another paramspec, and will not be directly
      useful unless you are implementing a new base type similar to GObject.
      Parameters:
      name - the name of the property.
      overridden - The property that is being overridden
      Returns:
      the newly created #GParamSpec
    • paramSpecParam

      public static ParamSpec paramSpecParam(@Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, long param_type, int flags)
      Creates a new #GParamSpecParam instance specifying a %G_TYPE_PARAM
      property.

      See g_param_spec_internal() for details on property names.
      Parameters:
      name - canonical name of the property specified
      nick - nick name for the property specified
      blurb - description of the property specified
      param_type - a #GType derived from %G_TYPE_PARAM
      flags - flags for the property specified
      Returns:
      a newly created parameter specification
    • paramSpecPointer

      public static ParamSpec paramSpecPointer(@Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, int flags)
      Creates a new #GParamSpecPointer instance specifying a pointer property.
      Where possible, it is better to use g_param_spec_object() or
      g_param_spec_boxed() to expose memory management information.

      See g_param_spec_internal() for details on property names.
      Parameters:
      name - canonical name of the property specified
      nick - nick name for the property specified
      blurb - description of the property specified
      flags - flags for the property specified
      Returns:
      a newly created parameter specification
    • paramSpecString

      public static ParamSpec paramSpecString(@Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, @Nullable Str default_value, int flags)
      Creates a new #GParamSpecString instance.

      See g_param_spec_internal() for details on property names.
      Parameters:
      name - canonical name of the property specified
      nick - nick name for the property specified
      blurb - description of the property specified
      default_value - default value for the property specified
      flags - flags for the property specified
      Returns:
      a newly created parameter specification
    • paramSpecUchar

      public static ParamSpec paramSpecUchar(@Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, int minimum, int maximum, int default_value, int flags)
      Creates a new #GParamSpecUChar instance specifying a %G_TYPE_UCHAR property.
      Parameters:
      name - canonical name of the property specified
      nick - nick name for the property specified
      blurb - description of the property specified
      minimum - minimum value for the property specified
      maximum - maximum value for the property specified
      default_value - default value for the property specified
      flags - flags for the property specified
      Returns:
      a newly created parameter specification
    • paramSpecUint

      public static ParamSpec paramSpecUint(@Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, int minimum, int maximum, int default_value, int flags)
      Creates a new #GParamSpecUInt instance specifying a %G_TYPE_UINT property.

      See g_param_spec_internal() for details on property names.
      Parameters:
      name - canonical name of the property specified
      nick - nick name for the property specified
      blurb - description of the property specified
      minimum - minimum value for the property specified
      maximum - maximum value for the property specified
      default_value - default value for the property specified
      flags - flags for the property specified
      Returns:
      a newly created parameter specification
    • paramSpecUint64

      public static ParamSpec paramSpecUint64(@Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, long minimum, long maximum, long default_value, int flags)
      Creates a new #GParamSpecUInt64 instance specifying a %G_TYPE_UINT64
      property.

      See g_param_spec_internal() for details on property names.
      Parameters:
      name - canonical name of the property specified
      nick - nick name for the property specified
      blurb - description of the property specified
      minimum - minimum value for the property specified
      maximum - maximum value for the property specified
      default_value - default value for the property specified
      flags - flags for the property specified
      Returns:
      a newly created parameter specification
    • paramSpecUlong

      public static ParamSpec paramSpecUlong(@Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, long minimum, long maximum, long default_value, int flags)
      Creates a new #GParamSpecULong instance specifying a %G_TYPE_ULONG
      property.

      See g_param_spec_internal() for details on property names.
      Parameters:
      name - canonical name of the property specified
      nick - nick name for the property specified
      blurb - description of the property specified
      minimum - minimum value for the property specified
      maximum - maximum value for the property specified
      default_value - default value for the property specified
      flags - flags for the property specified
      Returns:
      a newly created parameter specification
    • paramSpecUnichar

      public static ParamSpec paramSpecUnichar(@Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, byte default_value, int flags)
      Creates a new #GParamSpecUnichar instance specifying a %G_TYPE_UINT
      property. #GValue structures for this property can be accessed with
      g_value_set_uint() and g_value_get_uint().

      See g_param_spec_internal() for details on property names.
      Parameters:
      name - canonical name of the property specified
      nick - nick name for the property specified
      blurb - description of the property specified
      default_value - default value for the property specified
      flags - flags for the property specified
      Returns:
      a newly created parameter specification
    • paramSpecValueArray

      public static ParamSpec paramSpecValueArray(@Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, @Nonnull ParamSpec element_spec, int flags)
      Creates a new #GParamSpecValueArray instance specifying a
      %G_TYPE_VALUE_ARRAY property. %G_TYPE_VALUE_ARRAY is a
      %G_TYPE_BOXED type, as such, #GValue structures for this property
      can be accessed with g_value_set_boxed() and g_value_get_boxed().

      See g_param_spec_internal() for details on property names.
      Parameters:
      name - canonical name of the property specified
      nick - nick name for the property specified
      blurb - description of the property specified
      element_spec - a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
      flags - flags for the property specified
      Returns:
      a newly created parameter specification
    • paramSpecVariant

      public static ParamSpec paramSpecVariant(@Nonnull Str name, @Nullable Str nick, @Nullable Str blurb, @Nonnull VariantType type, @Nullable Variant default_value, int flags)
      Creates a new #GParamSpecVariant instance specifying a #GVariant
      property.

      If @default_value is floating, it is consumed.

      See g_param_spec_internal() for details on property names.
      Parameters:
      name - canonical name of the property specified
      nick - nick name for the property specified
      blurb - description of the property specified
      type - a #GVariantType
      default_value - a #GVariant of type @type to use as the default value, or %NULL
      flags - flags for the property specified
      Returns:
      the newly created #GParamSpec
    • paramTypeRegisterStatic

      public static long paramTypeRegisterStatic(@Nonnull Str name, @Nonnull ParamSpecTypeInfo pspec_info)
      Registers @name as the name of a new static type derived
      from %G_TYPE_PARAM.

      The type system uses the information contained in the #GParamSpecTypeInfo
      structure pointed to by @info to manage the #GParamSpec type and its
      instances.
      Parameters:
      name - 0-terminated string used as the name of the new #GParamSpec type.
      pspec_info - The #GParamSpecTypeInfo for this #GParamSpec type.
      Returns:
      The new type identifier.
    • paramValueConvert

      public static boolean paramValueConvert(@Nonnull ParamSpec pspec, @Nonnull Value src_value, @Nonnull Value dest_value, boolean strict_validation)
      Transforms @src_value into @dest_value if possible, and then
      validates @dest_value, in order for it to conform to @pspec. If
      @strict_validation is %TRUE this function will only succeed if the
      transformed @dest_value complied to @pspec without modifications.

      See also g_value_type_transformable(), g_value_transform() and
      g_param_value_validate().
      Parameters:
      pspec - a valid #GParamSpec
      src_value - source #GValue
      dest_value - destination #GValue of correct type for @pspec
      strict_validation - %TRUE requires @dest_value to conform to @pspec without modifications
      Returns:
      %TRUE if transformation and validation were successful, %FALSE otherwise and @dest_value is left untouched.
    • paramValueDefaults

      public static boolean paramValueDefaults(@Nonnull ParamSpec pspec, @Nonnull Value value)
      Checks whether @value contains the default value as specified in @pspec.
      Parameters:
      pspec - a valid #GParamSpec
      value - a #GValue of correct type for @pspec
      Returns:
      whether @value contains the canonical default for this @pspec
    • paramValueIsValid

      public static boolean paramValueIsValid(@Nonnull ParamSpec pspec, @Nonnull Value value)
      Return whether the contents of @value comply with the specifications
      set out by @pspec.
      Parameters:
      pspec - a valid #GParamSpec
      value - a #GValue of correct type for @pspec
      Returns:
      whether the contents of @value comply with the specifications set out by @pspec.
    • paramValueSetDefault

      public static void paramValueSetDefault(@Nonnull ParamSpec pspec, @Nonnull Value value)
      Sets @value to its default value as specified in @pspec.
      Parameters:
      pspec - a valid #GParamSpec
      value - a #GValue of correct type for @pspec; since 2.64, you can also pass an empty #GValue, initialized with %G_VALUE_INIT
    • paramValueValidate

      public static boolean paramValueValidate(@Nonnull ParamSpec pspec, @Nonnull Value value)
      Ensures that the contents of @value comply with the specifications
      set out by @pspec. For example, a #GParamSpecInt might require
      that integers stored in @value may not be smaller than -42 and not be
      greater than +42. If @value contains an integer outside of this range,
      it is modified accordingly, so the resulting value will fit into the
      range -42 .. +42.
      Parameters:
      pspec - a valid #GParamSpec
      value - a #GValue of correct type for @pspec
      Returns:
      whether modifying @value was necessary to ensure validity
    • paramValuesCmp

      public static int paramValuesCmp(@Nonnull ParamSpec pspec, @Nonnull Value value1, @Nonnull Value value2)
      Compares @value1 with @value2 according to @pspec, and return -1, 0 or +1,
      if @value1 is found to be less than, equal to or greater than @value2,
      respectively.
      Parameters:
      pspec - a valid #GParamSpec
      value1 - a #GValue of correct type for @pspec
      value2 - a #GValue of correct type for @pspec
      Returns:
      -1, 0 or +1, for a less than, equal to or greater than result
    • pointerTypeRegisterStatic

      public static long pointerTypeRegisterStatic(@Nonnull Str name)
      Creates a new %G_TYPE_POINTER derived type id for a new
      pointer type with name @name.
      Parameters:
      name - the name of the new pointer type.
      Returns:
      a new %G_TYPE_POINTER derived type id for @name.
    • signalAccumulatorFirstWins

      public static boolean signalAccumulatorFirstWins(@Nonnull SignalInvocationHint ihint, @Nonnull Value return_accu, @Nonnull Value handler_return, @Nullable Pointer dummy)
      A predefined #GSignalAccumulator for signals intended to be used as a
      hook for application code to provide a particular value. Usually
      only one such value is desired and multiple handlers for the same
      signal don't make much sense (except for the case of the default
      handler defined in the class structure, in which case you will
      usually want the signal connection to override the class handler).

      This accumulator will use the return value from the first signal
      handler that is run as the return value for the signal and not run
      any further handlers (ie: the first handler "wins").
      Parameters:
      ihint - standard #GSignalAccumulator parameter
      return_accu - standard #GSignalAccumulator parameter
      handler_return - standard #GSignalAccumulator parameter
      dummy - standard #GSignalAccumulator parameter
      Returns:
      standard #GSignalAccumulator result
    • signalAccumulatorTrueHandled

      public static boolean signalAccumulatorTrueHandled(@Nonnull SignalInvocationHint ihint, @Nonnull Value return_accu, @Nonnull Value handler_return, @Nullable Pointer dummy)
      A predefined #GSignalAccumulator for signals that return a
      boolean values. The behavior that this accumulator gives is
      that a return of %TRUE stops the signal emission: no further
      callbacks will be invoked, while a return of %FALSE allows
      the emission to continue. The idea here is that a %TRUE return
      indicates that the callback handled the signal, and no further
      handling is needed.
      Parameters:
      ihint - standard #GSignalAccumulator parameter
      return_accu - standard #GSignalAccumulator parameter
      handler_return - standard #GSignalAccumulator parameter
      dummy - standard #GSignalAccumulator parameter
      Returns:
      standard #GSignalAccumulator result
    • signalChainFromOverriddenHandler

      public static void signalChainFromOverriddenHandler(@Nonnull Pointer instance, Object... _elipse)
      Calls the original class closure of a signal. This function should
      only be called from an overridden class closure; see
      g_signal_override_class_closure() and
      g_signal_override_class_handler().
      Parameters:
      instance - the instance the signal is being emitted on.
      _elipse - parameters to be passed to the parent class closure, followed by a location for the return value. If the return type of the signal is %G_TYPE_NONE, the return value location can be omitted.
    • signalConnectClosure

      public static long signalConnectClosure(@Nonnull Pointer instance, @Nonnull Str detailed_signal, @Nonnull Closure closure, boolean after)
      Connects a closure to a signal for a particular object.
      Parameters:
      instance - the instance to connect to.
      detailed_signal - a string of the form "signal-name::detail".
      closure - the closure to connect.
      after - whether the handler should be called before or after the default handler of the signal.
      Returns:
      the handler ID (always greater than 0 for successful connections)
    • signalConnectClosureById

      public static long signalConnectClosureById(@Nonnull Pointer instance, int signal_id, int detail, @Nonnull Closure closure, boolean after)
      Connects a closure to a signal for a particular object.
      Parameters:
      instance - the instance to connect to.
      signal_id - the id of the signal.
      detail - the detail.
      closure - the closure to connect.
      after - whether the handler should be called before or after the default handler of the signal.
      Returns:
      the handler ID (always greater than 0 for successful connections)
    • signalConnectData

      public static long signalConnectData(@Nonnull Pointer instance, @Nonnull Str detailed_signal, Gobject.OnCallback c_handler, @Nullable Pointer data, Gobject.OnClosureNotify destroy_data, int connect_flags)
      Connects a #GCallback function to a signal for a particular object. Similar
      to g_signal_connect(), but allows to provide a #GClosureNotify for the data
      which will be called when the signal handler is disconnected and no longer
      used. Specify @connect_flags if you need `..._after()` or
      `..._swapped()` variants of this function.
      Parameters:
      instance - the instance to connect to.
      detailed_signal - a string of the form "signal-name::detail".
      c_handler - the #GCallback to connect.
      data - data to pass to @c_handler calls.
      destroy_data - a #GClosureNotify for @data.
      connect_flags - a combination of #GConnectFlags.
      Returns:
      the handler ID (always greater than 0 for successful connections)
    • signalConnectObject

      public static long signalConnectObject(@Nonnull Pointer instance, @Nonnull Str detailed_signal, Gobject.OnCallback c_handler, @Nullable Pointer gobject, int connect_flags)
      This is similar to g_signal_connect_data(), but uses a closure which
      ensures that the @gobject stays alive during the call to @c_handler
      by temporarily adding a reference count to @gobject.

      When the @gobject is destroyed the signal handler will be automatically
      disconnected. Note that this is not currently threadsafe (ie:
      emitting a signal while @gobject is being destroyed in another thread
      is not safe).
      Parameters:
      instance - the instance to connect to.
      detailed_signal - a string of the form "signal-name::detail".
      c_handler - the #GCallback to connect.
      gobject - the object to pass as data to @c_handler.
      connect_flags - a combination of #GConnectFlags.
      Returns:
      the handler id.
    • signalEmit

      public static void signalEmit(@Nonnull Pointer instance, int signal_id, int detail, Object... _elipse)
      Emits a signal. Signal emission is done synchronously.
      The method will only return control after all handlers are called or signal emission was stopped.

      Note that g_signal_emit() resets the return value to the default
      if no handlers are connected, in contrast to g_signal_emitv().
      Parameters:
      instance - the instance the signal is being emitted on.
      signal_id - the signal id
      detail - the detail
      _elipse - parameters to be passed to the signal, followed by a location for the return value. If the return type of the signal is %G_TYPE_NONE, the return value location can be omitted.
    • signalEmitByName

      public static void signalEmitByName(@Nonnull Pointer instance, @Nonnull Str detailed_signal, Object... _elipse)
      Emits a signal. Signal emission is done synchronously.
      The method will only return control after all handlers are called or signal emission was stopped.

      Note that g_signal_emit_by_name() resets the return value to the default
      if no handlers are connected, in contrast to g_signal_emitv().
      Parameters:
      instance - the instance the signal is being emitted on.
      detailed_signal - a string of the form "signal-name::detail".
      _elipse - parameters to be passed to the signal, followed by a location for the return value. If the return type of the signal is %G_TYPE_NONE, the return value location can be omitted. The number of parameters to pass to this function is defined when creating the signal.
    • signalGetInvocationHint

      public static SignalInvocationHint signalGetInvocationHint(@Nonnull Pointer instance)
      Returns the invocation hint of the innermost signal emission of instance.
      Parameters:
      instance - the instance to query
      Returns:
      the invocation hint of the innermost signal emission, or %NULL if not found.
    • signalHandlerBlock

      public static void signalHandlerBlock(@Nonnull Pointer instance, long handler_id)
      Blocks a handler of an instance so it will not be called during any
      signal emissions unless it is unblocked again. Thus "blocking" a
      signal handler means to temporarily deactivate it, a signal handler
      has to be unblocked exactly the same amount of times it has been
      blocked before to become active again.

      The @handler_id has to be a valid signal handler id, connected to a
      signal of @instance.
      Parameters:
      instance - The instance to block the signal handler of.
      handler_id - Handler id of the handler to be blocked.
    • signalHandlerDisconnect

      public static void signalHandlerDisconnect(@Nonnull Pointer instance, long handler_id)
      Disconnects a handler from an instance so it will not be called during
      any future or currently ongoing emissions of the signal it has been
      connected to. The @handler_id becomes invalid and may be reused.

      The @handler_id has to be a valid signal handler id, connected to a
      signal of @instance.
      Parameters:
      instance - The instance to remove the signal handler from.
      handler_id - Handler id of the handler to be disconnected.
    • signalHandlerFind

      public static long signalHandlerFind(@Nonnull Pointer instance, int mask, int signal_id, int detail, @Nullable Closure closure, @Nullable Pointer func, @Nullable Pointer data)
      Finds the first signal handler that matches certain selection criteria.
      The criteria mask is passed as an OR-ed combination of #GSignalMatchType
      flags, and the criteria values are passed as arguments.
      The match @mask has to be non-0 for successful matches.
      If no handler was found, 0 is returned.
      Parameters:
      instance - The instance owning the signal handler to be found.
      mask - Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handler has to match.
      signal_id - Signal the handler has to be connected to.
      detail - Signal detail the handler has to be connected to.
      closure - The closure the handler will invoke.
      func - The C closure callback of the handler (useless for non-C closures).
      data - The closure data of the handler's closure.
      Returns:
      A valid non-0 signal handler id for a successful match.
    • signalHandlerIsConnected

      public static boolean signalHandlerIsConnected(@Nonnull Pointer instance, long handler_id)
      Returns whether @handler_id is the ID of a handler connected to @instance.
      Parameters:
      instance - The instance where a signal handler is sought.
      handler_id - the handler ID.
      Returns:
      whether @handler_id identifies a handler connected to @instance.
    • signalHandlerUnblock

      public static void signalHandlerUnblock(@Nonnull Pointer instance, long handler_id)
      Undoes the effect of a previous g_signal_handler_block() call. A
      blocked handler is skipped during signal emissions and will not be
      invoked, unblocking it (for exactly the amount of times it has been
      blocked before) reverts its "blocked" state, so the handler will be
      recognized by the signal system and is called upon future or
      currently ongoing signal emissions (since the order in which
      handlers are called during signal emissions is deterministic,
      whether the unblocked handler in question is called as part of a
      currently ongoing emission depends on how far that emission has
      proceeded yet).

      The @handler_id has to be a valid id of a signal handler that is
      connected to a signal of @instance and is currently blocked.
      Parameters:
      instance - The instance to unblock the signal handler of.
      handler_id - Handler id of the handler to be unblocked.
    • signalHandlersBlockMatched

      public static int signalHandlersBlockMatched(@Nonnull Pointer instance, int mask, int signal_id, int detail, @Nullable Closure closure, @Nullable Pointer func, @Nullable Pointer data)
      Blocks all handlers on an instance that match a certain selection criteria.
      The criteria mask is passed as an OR-ed combination of #GSignalMatchType
      flags, and the criteria values are passed as arguments.
      Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC
      or %G_SIGNAL_MATCH_DATA match flags is required for successful matches.
      If no handlers were found, 0 is returned, the number of blocked handlers
      otherwise.
      Parameters:
      instance - The instance to block handlers from.
      mask - Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
      signal_id - Signal the handlers have to be connected to.
      detail - Signal detail the handlers have to be connected to.
      closure - The closure the handlers will invoke.
      func - The C closure callback of the handlers (useless for non-C closures).
      data - The closure data of the handlers' closures.
      Returns:
      The number of handlers that matched.
    • signalHandlersDestroy

      public static void signalHandlersDestroy(@Nonnull Pointer instance)
      Destroy all signal handlers of a type instance. This function is
      an implementation detail of the #GObject dispose implementation,
      and should not be used outside of the type system.
      Parameters:
      instance - The instance whose signal handlers are destroyed
    • signalHandlersDisconnectMatched

      public static int signalHandlersDisconnectMatched(@Nonnull Pointer instance, int mask, int signal_id, int detail, @Nullable Closure closure, @Nullable Pointer func, @Nullable Pointer data)
      Disconnects all handlers on an instance that match a certain
      selection criteria. The criteria mask is passed as an OR-ed
      combination of #GSignalMatchType flags, and the criteria values are
      passed as arguments. Passing at least one of the
      %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC or
      %G_SIGNAL_MATCH_DATA match flags is required for successful
      matches. If no handlers were found, 0 is returned, the number of
      disconnected handlers otherwise.
      Parameters:
      instance - The instance to remove handlers from.
      mask - Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
      signal_id - Signal the handlers have to be connected to.
      detail - Signal detail the handlers have to be connected to.
      closure - The closure the handlers will invoke.
      func - The C closure callback of the handlers (useless for non-C closures).
      data - The closure data of the handlers' closures.
      Returns:
      The number of handlers that matched.
    • signalHandlersUnblockMatched

      public static int signalHandlersUnblockMatched(@Nonnull Pointer instance, int mask, int signal_id, int detail, @Nullable Closure closure, @Nullable Pointer func, @Nullable Pointer data)
      Unblocks all handlers on an instance that match a certain selection
      criteria. The criteria mask is passed as an OR-ed combination of
      #GSignalMatchType flags, and the criteria values are passed as arguments.
      Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC
      or %G_SIGNAL_MATCH_DATA match flags is required for successful matches.
      If no handlers were found, 0 is returned, the number of unblocked handlers
      otherwise. The match criteria should not apply to any handlers that are
      not currently blocked.
      Parameters:
      instance - The instance to unblock handlers from.
      mask - Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
      signal_id - Signal the handlers have to be connected to.
      detail - Signal detail the handlers have to be connected to.
      closure - The closure the handlers will invoke.
      func - The C closure callback of the handlers (useless for non-C closures).
      data - The closure data of the handlers' closures.
      Returns:
      The number of handlers that matched.
    • signalHasHandlerPending

      public static boolean signalHasHandlerPending(@Nonnull Pointer instance, int signal_id, int detail, boolean may_be_blocked)
      Returns whether there are any handlers connected to @instance for the
      given signal id and detail.

      If @detail is 0 then it will only match handlers that were connected
      without detail. If @detail is non-zero then it will match handlers
      connected both without detail and with the given detail. This is
      consistent with how a signal emitted with @detail would be delivered
      to those handlers.

      Since 2.46 this also checks for a non-default class closure being
      installed, as this is basically always what you want.

      One example of when you might use this is when the arguments to the
      signal are difficult to compute. A class implementor may opt to not
      emit the signal if no one is attached anyway, thus saving the cost
      of building the arguments.
      Parameters:
      instance - the object whose signal handlers are sought.
      signal_id - the signal id.
      detail - the detail.
      may_be_blocked - whether blocked handlers should count as match.
      Returns:
      %TRUE if a handler is connected to the signal, %FALSE otherwise.
    • signalIsValidName

      public static boolean signalIsValidName(@Nonnull Str name)
      Validate a signal name. This can be useful for dynamically-generated signals
      which need to be validated at run-time before actually trying to create them.

      See [canonical parameter names][canonical-parameter-names] for details of
      the rules for valid names. The rules for signal names are the same as those
      for property names.
      Parameters:
      name - the canonical name of the signal
      Returns:
      %TRUE if @name is a valid signal name, %FALSE otherwise.
    • signalLookup

      public static int signalLookup(@Nonnull Str name, long itype)
      Given the name of the signal and the type of object it connects to, gets
      the signal's identifying integer. Emitting the signal by number is
      somewhat faster than using the name each time.

      Also tries the ancestors of the given type.

      The type class passed as @itype must already have been instantiated (for
      example, using g_type_class_ref()) for this function to work, as signals are
      always installed during class initialization.

      See g_signal_new() for details on allowed signal names.
      Parameters:
      name - the signal's name.
      itype - the type that the signal operates on.
      Returns:
      the signal's identifying number, or 0 if no signal was found.
    • signalName

      public static Str signalName(int signal_id)
      Given the signal's identifier, finds its name.

      Two different signals may have the same name, if they have differing types.
      Parameters:
      signal_id - the signal's identifying number.
      Returns:
      the signal name, or %NULL if the signal number was invalid.
    • signalOverrideClassClosure

      public static void signalOverrideClassClosure(int signal_id, long instance_type, @Nonnull Closure class_closure)
      Overrides the class closure (i.e. the default handler) for the given signal
      for emissions on instances of @instance_type. @instance_type must be derived
      from the type to which the signal belongs.

      See g_signal_chain_from_overridden() and
      g_signal_chain_from_overridden_handler() for how to chain up to the
      parent class closure from inside the overridden one.
      Parameters:
      signal_id - the signal id
      instance_type - the instance type on which to override the class closure for the signal.
      class_closure - the closure.
    • signalOverrideClassHandler

      public static void signalOverrideClassHandler(@Nonnull Str signal_name, long instance_type, Gobject.OnCallback class_handler)
      Overrides the class closure (i.e. the default handler) for the
      given signal for emissions on instances of @instance_type with
      callback @class_handler. @instance_type must be derived from the
      type to which the signal belongs.

      See g_signal_chain_from_overridden() and
      g_signal_chain_from_overridden_handler() for how to chain up to the
      parent class closure from inside the overridden one.
      Parameters:
      signal_name - the name for the signal
      instance_type - the instance type on which to override the class handler for the signal.
      class_handler - the handler.
    • signalQuery

      public static void signalQuery(int signal_id, @Nonnull SignalQuery query)
      Queries the signal system for in-depth information about a
      specific signal. This function will fill in a user-provided
      structure to hold signal-specific information. If an invalid
      signal id is passed in, the @signal_id member of the #GSignalQuery
      is 0. All members filled into the #GSignalQuery structure should
      be considered constant and have to be left untouched.
      Parameters:
      signal_id - The signal id of the signal to query information for.
      query - A user provided structure that is filled in with constant values upon success.
    • signalRemoveEmissionHook

      public static void signalRemoveEmissionHook(int signal_id, long hook_id)
      Deletes an emission hook.
      Parameters:
      signal_id - the id of the signal
      hook_id - the id of the emission hook, as returned by g_signal_add_emission_hook()
    • signalStopEmission

      public static void signalStopEmission(@Nonnull Pointer instance, int signal_id, int detail)
      Stops a signal's current emission.

      This will prevent the default method from running, if the signal was
      %G_SIGNAL_RUN_LAST and you connected normally (i.e. without the "after"
      flag).

      Prints a warning if used on a signal which isn't being emitted.
      Parameters:
      instance - the object whose signal handlers you wish to stop.
      signal_id - the signal identifier, as returned by g_signal_lookup().
      detail - the detail which the signal was emitted with.
    • signalStopEmissionByName

      public static void signalStopEmissionByName(@Nonnull Pointer instance, @Nonnull Str detailed_signal)
      Stops a signal's current emission.

      This is just like g_signal_stop_emission() except it will look up the
      signal id for you.
      Parameters:
      instance - the object whose signal handlers you wish to stop.
      detailed_signal - a string of the form "signal-name::detail".
    • signalTypeCclosureNew

      public static Closure signalTypeCclosureNew(long itype, int struct_offset)
      Creates a new closure which invokes the function found at the offset
      @struct_offset in the class structure of the interface or classed type
      identified by @itype.
      Parameters:
      itype - the #GType identifier of an interface or classed type
      struct_offset - the offset of the member function of @itype's class structure which is to be invoked by the new closure
      Returns:
      a floating reference to a new #GCClosure
    • sourceSetClosure

      public static void sourceSetClosure(@Nonnull Source source, @Nonnull Closure closure)
      Set the callback for a source as a #GClosure.

      If the source is not one of the standard GLib types, the @closure_callback
      and @closure_marshal fields of the #GSourceFuncs structure must have been
      filled in with pointers to appropriate functions.
      Parameters:
      source - the source
      closure - a #GClosure
    • sourceSetDummyCallback

      public static void sourceSetDummyCallback(@Nonnull Source source)
      Sets a dummy callback for @source. The callback will do nothing, and
      if the source expects a #gboolean return value, it will return %TRUE.
      (If the source expects any other type of return value, it will return
      a 0/%NULL value; whatever g_value_init() initializes a #GValue to for
      that type.)

      If the source is not one of the standard GLib types, the
      @closure_callback and @closure_marshal fields of the #GSourceFuncs
      structure must have been filled in with pointers to appropriate
      functions.
      Parameters:
      source - the source
    • strdupValueContents

      public static Str strdupValueContents(@Nonnull Value value)
      Return a newly allocated string, which describes the contents of a
      #GValue. The main purpose of this function is to describe #GValue
      contents for debugging output, the way in which the contents are
      described may change between different GLib versions.
      Parameters:
      value - #GValue which contents are to be described.
      Returns:
      Newly allocated string.
    • typeAddClassCacheFunc

      public static void typeAddClassCacheFunc(@Nullable Pointer cache_data, Gobject.OnTypeClassCacheFunc cache_func)
      Adds a #GTypeClassCacheFunc to be called before the reference count of a
      class goes from one to zero. This can be used to prevent premature class
      destruction. All installed #GTypeClassCacheFunc functions will be chained
      until one of them returns %TRUE. The functions have to check the class id
      passed in to figure whether they actually want to cache the class of this
      type, since all classes are routed through the same #GTypeClassCacheFunc
      chain.
      Parameters:
      cache_data - data to be passed to @cache_func
      cache_func - a #GTypeClassCacheFunc
    • typeAddClassPrivate

      public static void typeAddClassPrivate(long class_type, long private_size)
      Registers a private class structure for a classed type;
      when the class is allocated, the private structures for
      the class and all of its parent types are allocated
      sequentially in the same memory block as the public
      structures, and are zero-filled.

      This function should be called in the
      type's get_type() function after the type is registered.
      The private structure can be retrieved using the
      G_TYPE_CLASS_GET_PRIVATE() macro.
      Parameters:
      class_type - GType of a classed type
      private_size - size of private structure
    • typeAddInstancePrivate

      public static int typeAddInstancePrivate(long class_type, long private_size)
      Parameters:
      class_type -
      private_size -
      Returns:
    • typeAddInterfaceCheck

      public static void typeAddInterfaceCheck(@Nullable Pointer check_data, Gobject.OnTypeInterfaceCheckFunc check_func)
      Adds a function to be called after an interface vtable is
      initialized for any class (i.e. after the @interface_init
      member of #GInterfaceInfo has been called).

      This function is useful when you want to check an invariant
      that depends on the interfaces of a class. For instance, the
      implementation of #GObject uses this facility to check that an
      object implements all of the properties that are defined on its
      interfaces.
      Parameters:
      check_data - data to pass to @check_func
      check_func - function to be called after each interface is initialized
    • typeAddInterfaceDynamic

      public static void typeAddInterfaceDynamic(long instance_type, long interface_type, @Nonnull TypePlugin plugin)
      Adds @interface_type to the dynamic @instance_type. The information
      contained in the #GTypePlugin structure pointed to by @plugin
      is used to manage the relationship.
      Parameters:
      instance_type - #GType value of an instantiatable type
      interface_type - #GType value of an interface type
      plugin - #GTypePlugin structure to retrieve the #GInterfaceInfo from
    • typeAddInterfaceStatic

      public static void typeAddInterfaceStatic(long instance_type, long interface_type, @Nonnull InterfaceInfo info)
      Adds @interface_type to the static @instance_type.
      The information contained in the #GInterfaceInfo structure
      pointed to by @info is used to manage the relationship.
      Parameters:
      instance_type - #GType value of an instantiatable type
      interface_type - #GType value of an interface type
      info - #GInterfaceInfo structure for this (@instance_type, @interface_type) combination
    • typeCheckClassCast

      public static TypeClass typeCheckClassCast(@Nonnull TypeClass g_class, long is_a_type)
      Parameters:
      g_class -
      is_a_type -
      Returns:
    • typeCheckClassIsA

      public static boolean typeCheckClassIsA(@Nonnull TypeClass g_class, long is_a_type)
      Parameters:
      g_class -
      is_a_type -
      Returns:
    • typeCheckInstance

      public static boolean typeCheckInstance(@Nonnull TypeInstance instance)
      Private helper function to aid implementation of the
      G_TYPE_CHECK_INSTANCE() macro.
      Parameters:
      instance - a valid #GTypeInstance structure
      Returns:
      %TRUE if @instance is valid, %FALSE otherwise
    • typeCheckInstanceCast

      public static TypeInstance typeCheckInstanceCast(@Nonnull TypeInstance instance, long iface_type)
      Parameters:
      instance -
      iface_type -
      Returns:
    • typeCheckInstanceIsA

      public static boolean typeCheckInstanceIsA(@Nonnull TypeInstance instance, long iface_type)
      Parameters:
      instance -
      iface_type -
      Returns:
    • typeCheckInstanceIsFundamentallyA

      public static boolean typeCheckInstanceIsFundamentallyA(@Nonnull TypeInstance instance, long fundamental_type)
      Parameters:
      instance -
      fundamental_type -
      Returns:
    • typeCheckIsValueType

      public static boolean typeCheckIsValueType(long type)
      Parameters:
      type -
      Returns:
    • typeCheckValue

      public static boolean typeCheckValue(@Nonnull Value value)
      Parameters:
      value -
      Returns:
    • typeCheckValueHolds

      public static boolean typeCheckValueHolds(@Nonnull Value value, long type)
      Parameters:
      value -
      type -
      Returns:
    • typeClassAdjustPrivateOffset

      public static void typeClassAdjustPrivateOffset(@Nullable Pointer g_class, @Nonnull Int private_size_or_offset)
      Parameters:
      g_class -
      private_size_or_offset -
    • typeClassPeek

      public static Pointer typeClassPeek(long type)
      This function is essentially the same as g_type_class_ref(),
      except that the classes reference count isn't incremented.
      As a consequence, this function may return %NULL if the class
      of the type passed in does not currently exist (hasn't been
      referenced before).
      Parameters:
      type - type ID of a classed type
      Returns:
      the #GTypeClass structure for the given type ID or %NULL if the class does not currently exist
    • typeClassPeekStatic

      public static Pointer typeClassPeekStatic(long type)
      A more efficient version of g_type_class_peek() which works only for
      static types.
      Parameters:
      type - type ID of a classed type
      Returns:
      the #GTypeClass structure for the given type ID or %NULL if the class does not currently exist or is dynamically loaded
    • typeClassRef

      public static Pointer typeClassRef(long type)
      Increments the reference count of the class structure belonging to
      @type. This function will demand-create the class if it doesn't
      exist already.
      Parameters:
      type - type ID of a classed type
      Returns:
      the #GTypeClass structure for the given type ID
    • typeCreateInstance

      public static TypeInstance typeCreateInstance(long type)
      Creates and initializes an instance of @type if @type is valid and
      can be instantiated. The type system only performs basic allocation
      and structure setups for instances: actual instance creation should
      happen through functions supplied by the type's fundamental type
      implementation. So use of g_type_create_instance() is reserved for
      implementers of fundamental types only. E.g. instances of the
      #GObject hierarchy should be created via g_object_new() and never
      directly through g_type_create_instance() which doesn't handle things
      like singleton objects or object construction.

      The extended members of the returned instance are guaranteed to be filled
      with zeros.

      Note: Do not use this function, unless you're implementing a
      fundamental type. Also language bindings should not use this
      function, but g_object_new() instead.
      Parameters:
      type - an instantiatable type to create an instance for
      Returns:
      an allocated and initialized instance, subject to further treatment by the fundamental type implementation
    • typeDefaultInterfacePeek

      public static Pointer typeDefaultInterfacePeek(long g_type)
      If the interface type @g_type is currently in use, returns its
      default interface vtable.
      Parameters:
      g_type - an interface type
      Returns:
      the default vtable for the interface, or %NULL if the type is not currently in use
    • typeDefaultInterfaceRef

      public static Pointer typeDefaultInterfaceRef(long g_type)
      Increments the reference count for the interface type @g_type,
      and returns the default interface vtable for the type.

      If the type is not currently in use, then the default vtable
      for the type will be created and initialized by calling
      the base interface init and default vtable init functions for
      the type (the @base_init and @class_init members of #GTypeInfo).
      Calling g_type_default_interface_ref() is useful when you
      want to make sure that signals and properties for an interface
      have been installed.
      Parameters:
      g_type - an interface type
      Returns:
      the default vtable for the interface; call g_type_default_interface_unref() when you are done using the interface.
    • typeDefaultInterfaceUnref

      public static void typeDefaultInterfaceUnref(@Nonnull Pointer g_iface)
      Decrements the reference count for the type corresponding to the
      interface default vtable @g_iface. If the type is dynamic, then
      when no one is using the interface and all references have
      been released, the finalize function for the interface's default
      vtable (the @class_finalize member of #GTypeInfo) will be called.
      Parameters:
      g_iface - the default vtable structure for an interface, as returned by g_type_default_interface_ref()
    • typeDepth

      public static int typeDepth(long type)
      Returns the length of the ancestry of the passed in type. This
      includes the type itself, so that e.g. a fundamental type has depth 1.
      Parameters:
      type - a #GType
      Returns:
      the depth of @type
    • typeEnsure

      public static void typeEnsure(long type)
      Ensures that the indicated @type has been registered with the
      type system, and its _class_init() method has been run.

      In theory, simply calling the type's _get_type() method (or using
      the corresponding macro) is supposed take care of this. However,
      _get_type() methods are often marked %G_GNUC_CONST for performance
      reasons, even though this is technically incorrect (since
      %G_GNUC_CONST requires that the function not have side effects,
      which _get_type() methods do on the first call). As a result, if
      you write a bare call to a _get_type() macro, it may get optimized
      out by the compiler. Using g_type_ensure() guarantees that the
      type's _get_type() method is called.
      Parameters:
      type - a #GType
    • typeFreeInstance

      public static void typeFreeInstance(@Nonnull TypeInstance instance)
      Frees an instance of a type, returning it to the instance pool for
      the type, if there is one.

      Like g_type_create_instance(), this function is reserved for
      implementors of fundamental types.
      Parameters:
      instance - an instance of a type
    • typeFromName

      public static long typeFromName(@Nonnull Str name)
      Look up the type ID from a given type name, returning 0 if no type
      has been registered under this name (this is the preferred method
      to find out by name whether a specific type has been registered
      yet).
      Parameters:
      name - type name to look up
      Returns:
      corresponding type ID or 0
    • typeFundamental

      public static long typeFundamental(long type_id)
      Internal function, used to extract the fundamental type ID portion.
      Use G_TYPE_FUNDAMENTAL() instead.
      Parameters:
      type_id - valid type ID
      Returns:
      fundamental type ID
    • typeFundamentalNext

      public static long typeFundamentalNext()
      Returns the next free fundamental type id which can be used to
      register a new fundamental type with g_type_register_fundamental().
      The returned type ID represents the highest currently registered
      fundamental type identifier.
      Returns:
      the next available fundamental type ID to be registered, or 0 if the type system ran out of fundamental type IDs
    • typeGetInstanceCount

      public static int typeGetInstanceCount(long type)
      Returns the number of instances allocated of the particular type;
      this is only available if GLib is built with debugging support and
      the instance_count debug flag is set (by setting the GOBJECT_DEBUG
      variable to include instance-count).
      Parameters:
      type - a #GType
      Returns:
      the number of instances allocated of the given type; if instance counts are not available, returns 0.
    • typeGetPlugin

      public static TypePlugin typeGetPlugin(long type)
      Returns the #GTypePlugin structure for @type.
      Parameters:
      type - #GType to retrieve the plugin for
      Returns:
      the corresponding plugin if @type is a dynamic type, %NULL otherwise
    • typeGetQdata

      public static Pointer typeGetQdata(long type, int quark)
      Obtains data which has previously been attached to @type
      with g_type_set_qdata().

      Note that this does not take subtyping into account; data
      attached to one type with g_type_set_qdata() cannot
      be retrieved from a subtype using g_type_get_qdata().
      Parameters:
      type - a #GType
      quark - a #GQuark id to identify the data
      Returns:
      the data, or %NULL if no data was found
    • typeGetTypeRegistrationSerial

      public static int typeGetTypeRegistrationSerial()
      Returns an opaque serial number that represents the state of the set
      of registered types. Any time a type is registered this serial changes,
      which means you can cache information based on type lookups (such as
      g_type_from_name()) and know if the cache is still valid at a later
      time by comparing the current serial with the one at the type lookup.
      Returns:
      An unsigned int, representing the state of type registrations
    • typeInterfaceAddPrerequisite

      public static void typeInterfaceAddPrerequisite(long interface_type, long prerequisite_type)
      Adds @prerequisite_type to the list of prerequisites of @interface_type.
      This means that any type implementing @interface_type must also implement
      @prerequisite_type. Prerequisites can be thought of as an alternative to
      interface derivation (which GType doesn't support). An interface can have
      at most one instantiatable prerequisite type.
      Parameters:
      interface_type - #GType value of an interface type
      prerequisite_type - #GType value of an interface or instantiatable type
    • typeInterfaceGetPlugin

      public static TypePlugin typeInterfaceGetPlugin(long instance_type, long interface_type)
      Returns the #GTypePlugin structure for the dynamic interface
      @interface_type which has been added to @instance_type, or %NULL
      if @interface_type has not been added to @instance_type or does
      not have a #GTypePlugin structure. See g_type_add_interface_dynamic().
      Parameters:
      instance_type - #GType of an instantiatable type
      interface_type - #GType of an interface type
      Returns:
      the #GTypePlugin for the dynamic interface @interface_type of @instance_type
    • typeInterfaceInstantiatablePrerequisite

      public static long typeInterfaceInstantiatablePrerequisite(long interface_type)
      Returns the most specific instantiatable prerequisite of an
      interface type. If the interface type has no instantiatable
      prerequisite, %G_TYPE_INVALID is returned.

      See g_type_interface_add_prerequisite() for more information
      about prerequisites.
      Parameters:
      interface_type - an interface type
      Returns:
      the instantiatable prerequisite type or %G_TYPE_INVALID if none
    • typeInterfacePeek

      public static Pointer typeInterfacePeek(@Nonnull Pointer instance_class, long iface_type)
      Returns the #GTypeInterface structure of an interface to which the
      passed in class conforms.
      Parameters:
      instance_class - a #GTypeClass structure
      iface_type - an interface ID which this class conforms to
      Returns:
      the #GTypeInterface structure of @iface_type if implemented by @instance_class, %NULL otherwise
    • typeIsA

      public static boolean typeIsA(long type, long is_a_type)
      If @is_a_type is a derivable type, check whether @type is a
      descendant of @is_a_type. If @is_a_type is an interface, check
      whether @type conforms to it.
      Parameters:
      type - type to check ancestry for
      is_a_type - possible ancestor of @type or interface that @type could conform to
      Returns:
      %TRUE if @type is a @is_a_type
    • typeName

      public static Str typeName(long type)
      Get the unique name that is assigned to a type ID. Note that this
      function (like all other GType API) cannot cope with invalid type
      IDs. %G_TYPE_INVALID may be passed to this function, as may be any
      other validly registered type ID, but randomized type IDs should
      not be passed in and will most likely lead to a crash.
      Parameters:
      type - type to return name for
      Returns:
      static type name or %NULL
    • typeNameFromClass

      public static Str typeNameFromClass(@Nonnull TypeClass g_class)
      Parameters:
      g_class -
      Returns:
    • typeNameFromInstance

      public static Str typeNameFromInstance(@Nonnull TypeInstance instance)
      Parameters:
      instance -
      Returns:
    • typeNextBase

      public static long typeNextBase(long leaf_type, long root_type)
      Given a @leaf_type and a @root_type which is contained in its
      ancestry, return the type that @root_type is the immediate parent
      of. In other words, this function determines the type that is
      derived directly from @root_type which is also a base class of
      @leaf_type. Given a root type and a leaf type, this function can
      be used to determine the types and order in which the leaf type is
      descended from the root type.
      Parameters:
      leaf_type - descendant of @root_type and the type to be returned
      root_type - immediate parent of the returned type
      Returns:
      immediate child of @root_type and ancestor of @leaf_type
    • typeParent

      public static long typeParent(long type)
      Return the direct parent type of the passed in type. If the passed
      in type has no parent, i.e. is a fundamental type, 0 is returned.
      Parameters:
      type - the derived type
      Returns:
      the parent type
    • typeQname

      public static int typeQname(long type)
      Get the corresponding quark of the type IDs name.
      Parameters:
      type - type to return quark of type name for
      Returns:
      the type names quark or 0
    • typeQuery

      public static void typeQuery(long type, @Nonnull TypeQuery query)
      Queries the type system for information about a specific type.
      This function will fill in a user-provided structure to hold
      type-specific information. If an invalid #GType is passed in, the
      @type member of the #GTypeQuery is 0. All members filled into the
      #GTypeQuery structure should be considered constant and have to be
      left untouched.
      Parameters:
      type - #GType of a static, classed type
      query - a user provided structure that is filled in with constant values upon success
    • typeRegisterDynamic

      public static long typeRegisterDynamic(long parent_type, @Nonnull Str type_name, @Nonnull TypePlugin plugin, int flags)
      Registers @type_name as the name of a new dynamic type derived from
      @parent_type. The type system uses the information contained in the
      #GTypePlugin structure pointed to by @plugin to manage the type and its
      instances (if not abstract). The value of @flags determines the nature
      (e.g. abstract or not) of the type.
      Parameters:
      parent_type - type from which this type will be derived
      type_name - 0-terminated string used as the name of the new type
      plugin - #GTypePlugin structure to retrieve the #GTypeInfo from
      flags - bitwise combination of #GTypeFlags values
      Returns:
      the new type identifier or %G_TYPE_INVALID if registration failed
    • typeRegisterFundamental

      public static long typeRegisterFundamental(long type_id, @Nonnull Str type_name, @Nonnull TypeInfo info, @Nonnull TypeFundamentalInfo finfo, int flags)
      Registers @type_id as the predefined identifier and @type_name as the
      name of a fundamental type. If @type_id is already registered, or a
      type named @type_name is already registered, the behaviour is undefined.
      The type system uses the information contained in the #GTypeInfo structure
      pointed to by @info and the #GTypeFundamentalInfo structure pointed to by
      @finfo to manage the type and its instances. The value of @flags determines
      additional characteristics of the fundamental type.
      Parameters:
      type_id - a predefined type identifier
      type_name - 0-terminated string used as the name of the new type
      info - #GTypeInfo structure for this type
      finfo - #GTypeFundamentalInfo structure for this type
      flags - bitwise combination of #GTypeFlags values
      Returns:
      the predefined type identifier
    • typeRegisterStatic

      public static long typeRegisterStatic(long parent_type, @Nonnull Str type_name, @Nonnull TypeInfo info, int flags)
      Registers @type_name as the name of a new static type derived from
      @parent_type. The type system uses the information contained in the
      #GTypeInfo structure pointed to by @info to manage the type and its
      instances (if not abstract). The value of @flags determines the nature
      (e.g. abstract or not) of the type.
      Parameters:
      parent_type - type from which this type will be derived
      type_name - 0-terminated string used as the name of the new type
      info - #GTypeInfo structure for this type
      flags - bitwise combination of #GTypeFlags values
      Returns:
      the new type identifier
    • typeRegisterStaticSimple

      public static long typeRegisterStaticSimple(long parent_type, @Nonnull Str type_name, int class_size, Gobject.OnClassInitFunc class_init, int instance_size, Gobject.OnInstanceInitFunc instance_init, int flags)
      Registers @type_name as the name of a new static type derived from
      @parent_type. The value of @flags determines the nature (e.g.
      abstract or not) of the type. It works by filling a #GTypeInfo
      struct and calling g_type_register_static().
      Parameters:
      parent_type - type from which this type will be derived
      type_name - 0-terminated string used as the name of the new type
      class_size - size of the class structure (see #GTypeInfo)
      class_init - location of the class initialization function (see #GTypeInfo)
      instance_size - size of the instance structure (see #GTypeInfo)
      instance_init - location of the instance initialization function (see #GTypeInfo)
      flags - bitwise combination of #GTypeFlags values
      Returns:
      the new type identifier
    • typeRemoveClassCacheFunc

      public static void typeRemoveClassCacheFunc(@Nullable Pointer cache_data, Gobject.OnTypeClassCacheFunc cache_func)
      Removes a previously installed #GTypeClassCacheFunc. The cache
      maintained by @cache_func has to be empty when calling
      g_type_remove_class_cache_func() to avoid leaks.
      Parameters:
      cache_data - data that was given when adding @cache_func
      cache_func - a #GTypeClassCacheFunc
    • typeRemoveInterfaceCheck

      public static void typeRemoveInterfaceCheck(@Nullable Pointer check_data, Gobject.OnTypeInterfaceCheckFunc check_func)
      Removes an interface check function added with
      g_type_add_interface_check().
      Parameters:
      check_data - callback data passed to g_type_add_interface_check()
      check_func - callback function passed to g_type_add_interface_check()
    • typeSetQdata

      public static void typeSetQdata(long type, int quark, @Nullable Pointer data)
      Attaches arbitrary data to a type.
      Parameters:
      type - a #GType
      quark - a #GQuark id to identify the data
      data - the data
    • typeTestFlags

      public static boolean typeTestFlags(long type, int flags)
      Parameters:
      type -
      flags -
      Returns:
    • typeValueTablePeek

      public static TypeValueTable typeValueTablePeek(long type)
      Returns the location of the #GTypeValueTable associated with @type.

      Note that this function should only be used from source code
      that implements or has internal knowledge of the implementation of
      @type.
      Parameters:
      type - a #GType
      Returns:
      location of the #GTypeValueTable associated with @type or %NULL if there is no #GTypeValueTable associated with @type
    • valueRegisterTransformFunc

      public static void valueRegisterTransformFunc(long src_type, long dest_type, Gobject.OnValueTransform transform_func)
      Registers a value transformation function for use in g_value_transform().
      A previously registered transformation function for @src_type and @dest_type
      will be replaced.
      Parameters:
      src_type - Source type.
      dest_type - Target type.
      transform_func - a function which transforms values of type @src_type into value of type @dest_type
    • valueTypeCompatible

      public static boolean valueTypeCompatible(long src_type, long dest_type)
      Returns whether a #GValue of type @src_type can be copied into
      a #GValue of type @dest_type.
      Parameters:
      src_type - source type to be copied.
      dest_type - destination type for copying.
      Returns:
      %TRUE if g_value_copy() is possible with @src_type and @dest_type.
    • valueTypeTransformable

      public static boolean valueTypeTransformable(long src_type, long dest_type)
      Check whether g_value_transform() is able to transform values
      of type @src_type into values of type @dest_type. Note that for
      the types to be transformable, they must be compatible or a
      transformation function must be registered.
      Parameters:
      src_type - Source type.
      dest_type - Target type.
      Returns:
      %TRUE if the transformation is possible, %FALSE otherwise.