diff --git a/src/panel/applets/keyboard-layout/KeyboardLayoutApplet.vala b/src/panel/applets/keyboard-layout/KeyboardLayoutApplet.vala index f4c7c639d..3f04d9473 100644 --- a/src/panel/applets/keyboard-layout/KeyboardLayoutApplet.vala +++ b/src/panel/applets/keyboard-layout/KeyboardLayoutApplet.vala @@ -157,9 +157,9 @@ class InputSource { } /* Get useful display string */ - string? language = Gnome.get_language_from_code(engine.language, null); + string? language = Gnome.Languages.get_language_from_code(engine.language, null); if (language == null) { - language = Gnome.get_language_from_locale(engine.language, null); + language = Gnome.Languages.get_language_from_locale(engine.language, null); } this.description = "%s (%s)".printf(language, engine.name); @@ -172,7 +172,6 @@ class InputSource { } } - class InputSourceMenuItem : Gtk.Button { private Gtk.Label tick_label; public uint idx; @@ -441,8 +440,8 @@ public class KeyboardLayoutApplet : Budgie.Applet { locale = DEFAULT_LOCALE; } - if (!Gnome.get_input_source_from_locale(locale, out type, out id)) { - Gnome.get_input_source_from_locale(DEFAULT_LOCALE, out type, out id); + if (!Gnome.Languages.get_input_source_from_locale(locale, out type, out id)) { + Gnome.Languages.get_input_source_from_locale(DEFAULT_LOCALE, out type, out id); } try { diff --git a/src/panel/applets/keyboard-layout/meson.build b/src/panel/applets/keyboard-layout/meson.build index f7cd442d7..761359a18 100644 --- a/src/panel/applets/keyboard-layout/meson.build +++ b/src/panel/applets/keyboard-layout/meson.build @@ -18,7 +18,6 @@ applet_keyboardlayout_deps = [ dep_gtk3, dep_peas, dep_gnomedesktop, - dep_gsettings, dep_ibus, link_libpanelplugin, ] @@ -32,7 +31,6 @@ shared_library( '--pkg', 'gtk+-3.0', '--pkg', 'ibus-1.0', '--pkg', 'gnome-desktop-3.0', - '--pkg', 'gsettings-desktop-schemas', '--vapidir', join_paths(meson.source_root(), 'vapi'), ], c_args: [ diff --git a/src/wm/keyboard.vala b/src/wm/keyboard.vala index 4c1aef5ee..9b5798631 100644 --- a/src/wm/keyboard.vala +++ b/src/wm/keyboard.vala @@ -246,8 +246,8 @@ namespace Budgie { locale = DEFAULT_LOCALE; } - if (!Gnome.get_input_source_from_locale(locale, out type, out id)) { - Gnome.get_input_source_from_locale(DEFAULT_LOCALE, out type, out id); + if (!Gnome.Languages.get_input_source_from_locale(locale, out type, out id)) { + Gnome.Languages.get_input_source_from_locale(DEFAULT_LOCALE, out type, out id); } if (xkb.get_layout_info(id, out display_name, out short_name, out xkb_layout, out xkb_variant)) { diff --git a/src/wm/meson.build b/src/wm/meson.build index 04ba8439a..027538e94 100644 --- a/src/wm/meson.build +++ b/src/wm/meson.build @@ -55,7 +55,6 @@ budgie_wm_deps = [ dep_giounix, dep_mutter, dep_gnomedesktop, - dep_gsettings, dep_ibus, ] @@ -65,7 +64,6 @@ budgie_wm_vala_args = [ '--pkg', 'gnome-desktop-3.0', '--pkg', vapi_mutter, '--pkg', 'budgie-config', - '--pkg', 'gsettings-desktop-schemas', '--vapidir', join_paths(meson.source_root(), 'vapi'), '--vapidir', dir_libconfig, budgie_wm_status_vala_args, diff --git a/vapi/gio-2.0.deps b/vapi/gio-2.0.deps deleted file mode 100644 index 24f2a207b..000000000 --- a/vapi/gio-2.0.deps +++ /dev/null @@ -1,2 +0,0 @@ -glib-2.0 -gobject-2.0 diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi deleted file mode 100644 index 1d60a861b..000000000 --- a/vapi/gio-2.0.vapi +++ /dev/null @@ -1,4975 +0,0 @@ -/* gio-2.0.vapi generated by vapigen, do not modify. */ - -[CCode (cprefix = "G", gir_namespace = "Gio", gir_version = "2.0", lower_case_cprefix = "g_")] -namespace GLib { - namespace Bus { - [CCode (cheader_filename = "gio/gio.h")] - public static async GLib.DBusConnection @get (GLib.BusType bus_type, GLib.Cancellable? cancellable = null) throws GLib.IOError; - [CCode (cheader_filename = "gio/gio.h")] - public static async T get_proxy (GLib.BusType bus_type, string name, string object_path, GLib.DBusProxyFlags flags = 0, GLib.Cancellable? cancellable = null) throws GLib.IOError; - [CCode (cheader_filename = "gio/gio.h")] - public static T get_proxy_sync (GLib.BusType bus_type, string name, string object_path, GLib.DBusProxyFlags flags = 0, GLib.Cancellable? cancellable = null) throws GLib.IOError; - [CCode (cheader_filename = "gio/gio.h")] - public static GLib.DBusConnection get_sync (GLib.BusType bus_type, GLib.Cancellable? cancellable = null) throws GLib.IOError; - [CCode (cheader_filename = "gio/gio.h", cname = "g_bus_own_name_with_closures")] - [Version (since = "2.26")] - public static uint own_name (GLib.BusType bus_type, string name, GLib.BusNameOwnerFlags flags, [CCode (type = "GClosure*")] owned GLib.BusAcquiredCallback? bus_acquired_closure = null, [CCode (type = "GClosure*")] owned GLib.BusNameAcquiredCallback? name_acquired_closure = null, [CCode (type = "GClosure*")] owned GLib.BusNameLostCallback? name_lost_closure = null); - [CCode (cheader_filename = "gio/gio.h", cname = "g_bus_own_name_on_connection_with_closures")] - [Version (since = "2.26")] - public static uint own_name_on_connection (GLib.DBusConnection connection, string name, GLib.BusNameOwnerFlags flags, [CCode (type = "GClosure*")] owned GLib.BusNameAcquiredCallback? name_acquired_closure = null, [CCode (type = "GClosure*")] owned GLib.BusNameLostCallback? name_lost_closure = null); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.26")] - public static void unown_name (uint owner_id); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.26")] - public static void unwatch_name (uint watcher_id); - [CCode (cheader_filename = "gio/gio.h", cname = "g_bus_watch_name_with_closures")] - [Version (since = "2.26")] - public static uint watch_name (GLib.BusType bus_type, string name, GLib.BusNameWatcherFlags flags, [CCode (type = "GClosure*")] owned GLib.BusNameAppearedCallback? name_appeared_closure = null, [CCode (type = "GClosure*")] owned GLib.BusNameVanishedCallback? name_vanished_closure = null); - [CCode (cheader_filename = "gio/gio.h", cname = "g_bus_watch_name_on_connection_with_closures")] - [Version (since = "2.26")] - public static uint watch_name_on_connection (GLib.DBusConnection connection, string name, GLib.BusNameWatcherFlags flags, [CCode (type = "GClosure*")] owned GLib.BusNameAppearedCallback? name_appeared_closure = null, [CCode (type = "GClosure*")] owned GLib.BusNameVanishedCallback? name_vanished_closure = null); - } - namespace ContentType { - [CCode (cheader_filename = "gio/gio.h")] - public static bool can_be_executable (string type); - [CCode (cheader_filename = "gio/gio.h")] - public static bool equals (string type1, string type2); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.18")] - public static string? from_mime_type (string mime_type); - [CCode (cheader_filename = "gio/gio.h")] - public static string get_description (string type); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.34")] - public static string? get_generic_icon_name (string type); - [CCode (cheader_filename = "gio/gio.h")] - public static GLib.Icon get_icon (string type); - [CCode (array_length = false, array_null_terminated = true, cheader_filename = "gio/gio.h")] - [Version (since = "2.60")] - public static unowned string[] get_mime_dirs (); - [CCode (cheader_filename = "gio/gio.h")] - public static string? get_mime_type (string type); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.34")] - public static GLib.Icon get_symbolic_icon (string type); - [CCode (cheader_filename = "gio/gio.h")] - public static string guess (string? filename, [CCode (array_length_cname = "data_size", array_length_pos = 2.5, array_length_type = "gsize")] uint8[]? data, out bool result_uncertain); - [CCode (array_length = false, array_null_terminated = true, cheader_filename = "gio/gio.h")] - [Version (since = "2.18")] - public static string[] guess_for_tree (GLib.File root); - [CCode (cheader_filename = "gio/gio.h")] - public static bool is_a (string type, string supertype); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.52")] - public static bool is_mime_type (string type, string mime_type); - [CCode (cheader_filename = "gio/gio.h")] - public static bool is_unknown (string type); - [CCode (cheader_filename = "gio/gio.h", cname = "g_content_types_get_registered")] - public static GLib.List list_registered (); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.60")] - public static void set_mime_dirs ([CCode (array_length = false, array_null_terminated = true)] string[]? dirs); - } - namespace DBus { - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.36")] - public static string address_escape_value (string string); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.26")] - public static async GLib.IOStream address_get_stream (string address, GLib.Cancellable? cancellable = null, out string out_guid) throws GLib.Error; - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.26")] - public static GLib.IOStream address_get_stream_sync (string address, out string out_guid, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.26")] - public static unowned string annotation_info_lookup ([CCode (array_length = false, array_null_terminated = true)] GLib.DBusAnnotationInfo[]? annotations, string name); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.26")] - public static string generate_guid (); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.30")] - public static GLib.Variant gvalue_to_gvariant (GLib.Value gvalue, GLib.VariantType type); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.30")] - public static GLib.Value gvariant_to_gvalue (GLib.Variant value); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.26")] - public static bool is_address (string string); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.26")] - public static bool is_guid (string string); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.26")] - public static bool is_interface_name (string string); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.26")] - public static bool is_member_name (string string); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.26")] - public static bool is_name (string string); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.26")] - public static bool is_supported_address (string string) throws GLib.Error; - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.26")] - public static bool is_unique_name (string string); - } - namespace FileAttribute { - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE")] - public const string ACCESS_CAN_DELETE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE")] - public const string ACCESS_CAN_EXECUTE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_ACCESS_CAN_READ")] - public const string ACCESS_CAN_READ; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME")] - public const string ACCESS_CAN_RENAME; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH")] - public const string ACCESS_CAN_TRASH; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE")] - public const string ACCESS_CAN_WRITE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE")] - public const string DOS_IS_ARCHIVE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_DOS_IS_MOUNTPOINT")] - [Version (since = "2.60")] - public const string DOS_IS_MOUNTPOINT; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_DOS_IS_SYSTEM")] - public const string DOS_IS_SYSTEM; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_DOS_REPARSE_POINT_TAG")] - [Version (since = "2.60")] - public const string DOS_REPARSE_POINT_TAG; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_ETAG_VALUE")] - public const string ETAG_VALUE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_FILESYSTEM_FREE")] - public const string FILESYSTEM_FREE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_FILESYSTEM_READONLY")] - public const string FILESYSTEM_READONLY; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE")] - public const string FILESYSTEM_REMOTE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_FILESYSTEM_SIZE")] - public const string FILESYSTEM_SIZE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_FILESYSTEM_TYPE")] - public const string FILESYSTEM_TYPE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_FILESYSTEM_USED")] - [Version (since = "2.32")] - public const string FILESYSTEM_USED; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW")] - public const string FILESYSTEM_USE_PREVIEW; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_GVFS_BACKEND")] - public const string GVFS_BACKEND; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_ID_FILE")] - public const string ID_FILE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_ID_FILESYSTEM")] - public const string ID_FILESYSTEM; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT")] - public const string MOUNTABLE_CAN_EJECT; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT")] - public const string MOUNTABLE_CAN_MOUNT; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL")] - [Version (since = "2.22")] - public const string MOUNTABLE_CAN_POLL; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START")] - [Version (since = "2.22")] - public const string MOUNTABLE_CAN_START; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED")] - [Version (since = "2.22")] - public const string MOUNTABLE_CAN_START_DEGRADED; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP")] - [Version (since = "2.22")] - public const string MOUNTABLE_CAN_STOP; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT")] - public const string MOUNTABLE_CAN_UNMOUNT; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI")] - public const string MOUNTABLE_HAL_UDI; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC")] - [Version (since = "2.22")] - public const string MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE")] - [Version (since = "2.22")] - public const string MOUNTABLE_START_STOP_TYPE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE")] - public const string MOUNTABLE_UNIX_DEVICE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE")] - [Version (since = "2.22")] - public const string MOUNTABLE_UNIX_DEVICE_FILE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_OWNER_GROUP")] - public const string OWNER_GROUP; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_OWNER_USER")] - public const string OWNER_USER; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_OWNER_USER_REAL")] - public const string OWNER_USER_REAL; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_PREVIEW_ICON")] - [Version (since = "2.20")] - public const string PREVIEW_ICON; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_RECENT_MODIFIED")] - [Version (since = "2.52")] - public const string RECENT_MODIFIED; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_SELINUX_CONTEXT")] - public const string SELINUX_CONTEXT; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE")] - [Version (since = "2.20")] - public const string STANDARD_ALLOCATED_SIZE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE")] - public const string STANDARD_CONTENT_TYPE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_STANDARD_COPY_NAME")] - public const string STANDARD_COPY_NAME; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION")] - public const string STANDARD_DESCRIPTION; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME")] - public const string STANDARD_DISPLAY_NAME; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME")] - public const string STANDARD_EDIT_NAME; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE")] - public const string STANDARD_FAST_CONTENT_TYPE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_STANDARD_ICON")] - public const string STANDARD_ICON; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP")] - public const string STANDARD_IS_BACKUP; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN")] - public const string STANDARD_IS_HIDDEN; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK")] - public const string STANDARD_IS_SYMLINK; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL")] - public const string STANDARD_IS_VIRTUAL; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE")] - [Version (since = "2.46")] - public const string STANDARD_IS_VOLATILE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_STANDARD_NAME")] - public const string STANDARD_NAME; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_STANDARD_SIZE")] - public const string STANDARD_SIZE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER")] - public const string STANDARD_SORT_ORDER; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON")] - [Version (since = "2.34")] - public const string STANDARD_SYMBOLIC_ICON; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET")] - public const string STANDARD_SYMLINK_TARGET; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_STANDARD_TARGET_URI")] - public const string STANDARD_TARGET_URI; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_STANDARD_TYPE")] - public const string STANDARD_TYPE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_THUMBNAILING_FAILED")] - public const string THUMBNAILING_FAILED; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID")] - [Version (since = "2.40")] - public const string THUMBNAIL_IS_VALID; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_THUMBNAIL_PATH")] - public const string THUMBNAIL_PATH; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_TIME_ACCESS")] - public const string TIME_ACCESS; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_TIME_ACCESS_USEC")] - public const string TIME_ACCESS_USEC; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_TIME_CHANGED")] - public const string TIME_CHANGED; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_TIME_CHANGED_USEC")] - public const string TIME_CHANGED_USEC; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_TIME_CREATED")] - public const string TIME_CREATED; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_TIME_CREATED_USEC")] - public const string TIME_CREATED_USEC; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_TIME_MODIFIED")] - public const string TIME_MODIFIED; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC")] - public const string TIME_MODIFIED_USEC; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_TRASH_DELETION_DATE")] - [Version (since = "2.24")] - public const string TRASH_DELETION_DATE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT")] - public const string TRASH_ITEM_COUNT; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_TRASH_ORIG_PATH")] - [Version (since = "2.24")] - public const string TRASH_ORIG_PATH; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_UNIX_BLOCKS")] - public const string UNIX_BLOCKS; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE")] - public const string UNIX_BLOCK_SIZE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_UNIX_DEVICE")] - public const string UNIX_DEVICE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_UNIX_GID")] - public const string UNIX_GID; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_UNIX_INODE")] - public const string UNIX_INODE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT")] - public const string UNIX_IS_MOUNTPOINT; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_UNIX_MODE")] - public const string UNIX_MODE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_UNIX_NLINK")] - public const string UNIX_NLINK; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_UNIX_RDEV")] - public const string UNIX_RDEV; - [CCode (cheader_filename = "gio/gio.h", cname = "G_FILE_ATTRIBUTE_UNIX_UID")] - public const string UNIX_UID; - } - namespace VolumeIdentifier { - [CCode (cheader_filename = "gio/gio.h", cname = "G_VOLUME_IDENTIFIER_KIND_CLASS")] - public const string CLASS; - [CCode (cheader_filename = "gio/gio.h", cname = "G_VOLUME_IDENTIFIER_KIND_HAL_UDI")] - [Version (deprecated = true, deprecated_since = "2.58")] - public const string HAL_UDI; - [CCode (cheader_filename = "gio/gio.h", cname = "G_VOLUME_IDENTIFIER_KIND_LABEL")] - public const string LABEL; - [CCode (cheader_filename = "gio/gio.h", cname = "G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT")] - public const string NFS_MOUNT; - [CCode (cheader_filename = "gio/gio.h", cname = "G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE")] - public const string UNIX_DEVICE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_VOLUME_IDENTIFIER_KIND_UUID")] - public const string UUID; - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_app_info_monitor_get_type ()")] - [Version (since = "2.40")] - public class AppInfoMonitor : GLib.Object { - [CCode (has_construct_function = false)] - protected AppInfoMonitor (); - public static GLib.AppInfoMonitor @get (); - public signal void changed (); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_app_launch_context_get_type ()")] - public class AppLaunchContext : GLib.Object { - [CCode (has_construct_function = false)] - public AppLaunchContext (); - public virtual string get_display (GLib.AppInfo info, GLib.List files); - [CCode (array_length = false, array_null_terminated = true)] - [Version (since = "2.32")] - public string[] get_environment (); - public virtual string get_startup_notify_id (GLib.AppInfo info, GLib.List files); - [Version (since = "2.32")] - public void setenv (string variable, string value); - [Version (since = "2.32")] - public void unsetenv (string variable); - [HasEmitter] - [Version (since = "2.36")] - public virtual signal void launch_failed (string startup_notify_id); - [Version (since = "2.36")] - public virtual signal void launched (GLib.AppInfo info, GLib.Variant platform_data); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_application_get_type ()")] - [Version (since = "2.28")] - public class Application : GLib.Object, GLib.ActionGroup, GLib.ActionMap { - [CCode (has_construct_function = false)] - public Application (string? application_id, GLib.ApplicationFlags flags); - [Version (since = "2.42")] - public void add_main_option (string long_name, char short_name, GLib.OptionFlags flags, GLib.OptionArg arg, string description, string? arg_description); - [Version (since = "2.40")] - public void add_main_option_entries ([CCode (array_length = false, array_null_terminated = true)] GLib.OptionEntry[] entries); - [Version (since = "2.40")] - public void add_option_group (owned GLib.OptionGroup group); - [NoWrapper] - public virtual void add_platform_data (GLib.VariantBuilder builder); - [NoWrapper] - public virtual void after_emit (GLib.Variant platform_data); - [NoWrapper] - public virtual void before_emit (GLib.Variant platform_data); - [Version (since = "2.44")] - public void bind_busy_property (GLib.Object object, string property); - [NoWrapper] - public virtual bool dbus_register (GLib.DBusConnection connection, string object_path) throws GLib.Error; - [NoWrapper] - public virtual void dbus_unregister (GLib.DBusConnection connection, string object_path); - public unowned string get_application_id (); - [Version (since = "2.34")] - public unowned GLib.DBusConnection get_dbus_connection (); - [Version (since = "2.34")] - public unowned string get_dbus_object_path (); - [Version (since = "2.32")] - public static unowned GLib.Application get_default (); - public GLib.ApplicationFlags get_flags (); - public uint get_inactivity_timeout (); - [Version (since = "2.44")] - public bool get_is_busy (); - public bool get_is_registered (); - public bool get_is_remote (); - [Version (since = "2.42")] - public unowned string? get_resource_base_path (); - public void hold (); - public static bool id_is_valid (string application_id); - [NoWrapper] - public virtual bool local_command_line ([CCode (array_length = false, array_null_terminated = true)] ref unowned string[] arguments, out int exit_status); - [Version (since = "2.38")] - public void mark_busy (); - [Version (since = "2.32")] - public void quit (); - [NoWrapper] - public virtual void quit_mainloop (); - public bool register (GLib.Cancellable? cancellable = null) throws GLib.Error; - public void release (); - public int run ([CCode (array_length_cname = "argc", array_length_pos = 0.5)] string[]? argv = null); - [NoWrapper] - public virtual void run_mainloop (); - [Version (since = "2.40")] - public void send_notification (string? id, GLib.Notification notification); - [Version (deprecated = true, deprecated_since = "2.32", since = "2.28")] - public void set_action_group (GLib.ActionGroup? action_group); - public void set_application_id (string? application_id); - [Version (since = "2.32")] - public static void set_default (GLib.Application? application); - public void set_flags (GLib.ApplicationFlags flags); - public void set_inactivity_timeout (uint inactivity_timeout); - [Version (since = "2.56")] - public void set_option_context_description (string? description); - [Version (since = "2.56")] - public void set_option_context_parameter_string (string? parameter_string); - [Version (since = "2.56")] - public void set_option_context_summary (string? summary); - [Version (since = "2.42")] - public void set_resource_base_path (string? resource_path); - [Version (since = "2.44")] - public void unbind_busy_property (GLib.Object object, string property); - [Version (since = "2.38")] - public void unmark_busy (); - [Version (since = "2.40")] - public void withdraw_notification (string id); - public GLib.ActionGroup action_group { set; } - public string application_id { get; set construct; } - public GLib.ApplicationFlags flags { get; set; } - public uint inactivity_timeout { get; set; } - [Version (since = "2.44")] - public bool is_busy { get; } - public bool is_registered { get; } - public bool is_remote { get; } - public string resource_base_path { get; set; } - [HasEmitter] - public virtual signal void activate (); - public virtual signal int command_line (GLib.ApplicationCommandLine command_line); - [Version (since = "2.40")] - public virtual signal int handle_local_options (GLib.VariantDict options); - [Version (since = "2.60")] - public virtual signal bool name_lost (); - [HasEmitter] - public virtual signal void open ([CCode (array_length_cname = "n_files", array_length_pos = 1.5)] GLib.File[] files, string hint); - public virtual signal void shutdown (); - public virtual signal void startup (); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_application_command_line_get_type ()")] - public class ApplicationCommandLine : GLib.Object { - [CCode (has_construct_function = false)] - protected ApplicationCommandLine (); - [Version (since = "2.36")] - public GLib.File create_file_for_arg (string arg); - [CCode (array_length_pos = 0.1)] - [Version (since = "2.28")] - public string[] get_arguments (); - [Version (since = "2.28")] - public unowned string? get_cwd (); - [CCode (array_length = false, array_null_terminated = true)] - [Version (since = "2.28")] - public unowned string[] get_environ (); - [Version (since = "2.28")] - public int get_exit_status (); - [Version (since = "2.28")] - public bool get_is_remote (); - [Version (since = "2.40")] - public unowned GLib.VariantDict get_options_dict (); - [Version (since = "2.28")] - public GLib.Variant? get_platform_data (); - [Version (since = "2.34")] - public virtual GLib.InputStream get_stdin (); - [Version (since = "2.28")] - public unowned string getenv (string name); - [PrintfFormat] - [Version (since = "2.28")] - public void print (string format, ...); - [NoWrapper] - public virtual void print_literal (string message); - [PrintfFormat] - [Version (since = "2.28")] - public void printerr (string format, ...); - [NoWrapper] - public virtual void printerr_literal (string message); - [Version (since = "2.28")] - public void set_exit_status (int exit_status); - [NoAccessorMethod] - public GLib.Variant arguments { construct; } - public bool is_remote { get; } - [NoAccessorMethod] - public GLib.Variant options { construct; } - [NoAccessorMethod] - public GLib.Variant platform_data { construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_buffered_input_stream_get_type ()")] - public class BufferedInputStream : GLib.FilterInputStream, GLib.Seekable { - [CCode (has_construct_function = false, type = "GInputStream*")] - public BufferedInputStream (GLib.InputStream base_stream); - public virtual ssize_t fill (ssize_t count, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async ssize_t fill_async (ssize_t count, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - public size_t get_available (); - public size_t get_buffer_size (); - public size_t peek ([CCode (array_length_cname = "count", array_length_pos = 2.1, array_length_type = "gsize")] uint8[] buffer, size_t offset = 0); - [CCode (array_length_pos = 0.1, array_length_type = "gsize")] - public unowned uint8[] peek_buffer (); - public int read_byte (GLib.Cancellable? cancellable = null) throws GLib.Error; - public void set_buffer_size (size_t size); - [CCode (has_construct_function = false, type = "GInputStream*")] - public BufferedInputStream.sized (GLib.InputStream base_stream, size_t size); - public uint buffer_size { get; set construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_buffered_output_stream_get_type ()")] - public class BufferedOutputStream : GLib.FilterOutputStream, GLib.Seekable { - [CCode (has_construct_function = false, type = "GOutputStream*")] - public BufferedOutputStream (GLib.OutputStream base_stream); - public bool get_auto_grow (); - public size_t get_buffer_size (); - public void set_auto_grow (bool auto_grow); - public void set_buffer_size (size_t size); - [CCode (has_construct_function = false, type = "GOutputStream*")] - public BufferedOutputStream.sized (GLib.OutputStream base_stream, size_t size); - public bool auto_grow { get; set; } - public uint buffer_size { get; set construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_bytes_icon_get_type ()")] - [Version (since = "2.38")] - public class BytesIcon : GLib.Object, GLib.Icon, GLib.LoadableIcon { - [CCode (has_construct_function = false, type = "GIcon*")] - public BytesIcon (GLib.Bytes bytes); - public unowned GLib.Bytes get_bytes (); - public GLib.Bytes bytes { get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_cancellable_get_type ()")] - public class Cancellable : GLib.Object { - [CCode (has_construct_function = false)] - public Cancellable (); - public void cancel (); - [Version (since = "2.22")] - public ulong connect ([CCode (type = "GCallback")] owned GLib.Func callback); - [Version (since = "2.22")] - public void disconnect (ulong handler_id); - public static unowned GLib.Cancellable? get_current (); - public int get_fd (); - public bool is_cancelled (); - [Version (since = "2.22")] - public bool make_pollfd (GLib.PollFD pollfd); - public void pop_current (); - public void push_current (); - [Version (since = "2.22")] - public void release_fd (); - public void reset (); - public bool set_error_if_cancelled () throws GLib.IOError; - [Version (deprecated_since = "vala-0.44", replacement = "CancellableSource", since = "2.28")] - public GLib.CancellableSource source_new (); - public virtual signal void cancelled (); - } - [CCode (cheader_filename = "gio/gio.h", cname = "GSource", ref_function = "g_source_ref", unref_function = "g_source_unref")] - [Compact] - public class CancellableSource : GLib.Source { - [CCode (has_construct_function = false)] - [Version (since = "2.28")] - public CancellableSource (GLib.Cancellable? cancellable); - [CCode (cname = "g_source_set_callback")] - public void set_callback ([CCode (type = "GSourceFunc")] owned GLib.CancellableSourceFunc func); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_charset_converter_get_type ()")] - public class CharsetConverter : GLib.Object, GLib.Converter, GLib.Initable { - [CCode (has_construct_function = false)] - [Version (since = "2.24")] - public CharsetConverter (string to_charset, string from_charset) throws GLib.Error; - [Version (since = "2.24")] - public uint get_num_fallbacks (); - [Version (since = "2.24")] - public bool get_use_fallback (); - [Version (since = "2.24")] - public void set_use_fallback (bool use_fallback); - [NoAccessorMethod] - public string from_charset { owned get; construct; } - [NoAccessorMethod] - public string to_charset { owned get; construct; } - public bool use_fallback { get; set construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_converter_input_stream_get_type ()")] - public class ConverterInputStream : GLib.FilterInputStream, GLib.PollableInputStream { - [CCode (has_construct_function = false, type = "GInputStream*")] - public ConverterInputStream (GLib.InputStream base_stream, GLib.Converter converter); - [Version (since = "2.24")] - public unowned GLib.Converter get_converter (); - public GLib.Converter converter { get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_converter_output_stream_get_type ()")] - public class ConverterOutputStream : GLib.FilterOutputStream, GLib.PollableOutputStream { - [CCode (has_construct_function = false, type = "GOutputStream*")] - public ConverterOutputStream (GLib.OutputStream base_stream, GLib.Converter converter); - [Version (since = "2.24")] - public unowned GLib.Converter get_converter (); - public GLib.Converter converter { get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_credentials_get_type ()")] - [Version (since = "2.26")] - public class Credentials : GLib.Object { - [CCode (has_construct_function = false)] - public Credentials (); - public void* get_native (GLib.CredentialsType native_type); - [Version (since = "2.36")] - public int get_unix_pid () throws GLib.Error; - public uint get_unix_user () throws GLib.Error; - public bool is_same_user (GLib.Credentials other_credentials) throws GLib.Error; - public void set_native (GLib.CredentialsType native_type, void* native); - public bool set_unix_user (uint uid) throws GLib.Error; - public string to_string (); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_action_group_get_type ()")] - public class DBusActionGroup : GLib.Object, GLib.ActionGroup, GLib.RemoteActionGroup { - [CCode (has_construct_function = false)] - protected DBusActionGroup (); - [Version (since = "2.32")] - public static GLib.DBusActionGroup @get (GLib.DBusConnection connection, string? bus_name, string object_path); - } - [CCode (cheader_filename = "gio/gio.h", ref_function = "g_dbus_annotation_info_ref", type_id = "g_dbus_annotation_info_get_type ()", unref_function = "g_dbus_annotation_info_unref")] - [Compact] - [Version (since = "2.26")] - public class DBusAnnotationInfo { - [CCode (array_length = false, array_null_terminated = true)] - public GLib.DBusAnnotationInfo[] annotations; - public string key; - public int ref_count; - public string value; - public unowned GLib.DBusAnnotationInfo @ref (); - public void unref (); - } - [CCode (cheader_filename = "gio/gio.h", ref_function = "g_dbus_arg_info_ref", type_id = "g_dbus_arg_info_get_type ()", unref_function = "g_dbus_arg_info_unref")] - [Compact] - [Version (since = "2.26")] - public class DBusArgInfo { - [CCode (array_length = false, array_null_terminated = true)] - public GLib.DBusAnnotationInfo[] annotations; - public string name; - public int ref_count; - public string signature; - public unowned GLib.DBusArgInfo @ref (); - public void unref (); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_auth_observer_get_type ()")] - [Version (since = "2.26")] - public class DBusAuthObserver : GLib.Object { - [CCode (has_construct_function = false)] - public DBusAuthObserver (); - [HasEmitter] - [Version (since = "2.34")] - public signal bool allow_mechanism (string mechanism); - public virtual signal bool authorize_authenticated_peer (GLib.IOStream stream, GLib.Credentials? credentials); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_connection_get_type ()")] - [Version (since = "2.26")] - public class DBusConnection : GLib.Object, GLib.AsyncInitable, GLib.Initable { - [CCode (cname = "g_dbus_connection_new", has_construct_function = false)] - public async DBusConnection (GLib.IOStream stream, string? guid, GLib.DBusConnectionFlags flags, GLib.DBusAuthObserver? observer = null, GLib.Cancellable? cancellable = null) throws GLib.Error; - public uint add_filter (owned GLib.DBusMessageFilterFunction filter_function); - public async GLib.Variant call (string? bus_name, string object_path, string interface_name, string method_name, GLib.Variant? parameters, GLib.VariantType? reply_type, GLib.DBusCallFlags flags, int timeout_msec, GLib.Cancellable? cancellable = null) throws GLib.Error; - public GLib.Variant call_sync (string? bus_name, string object_path, string interface_name, string method_name, GLib.Variant? parameters, GLib.VariantType? reply_type, GLib.DBusCallFlags flags, int timeout_msec, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (async_result_pos = 2.1)] - [Version (since = "2.30")] - public async GLib.Variant call_with_unix_fd_list (string? bus_name, string object_path, string interface_name, string method_name, GLib.Variant? parameters, GLib.VariantType? reply_type, GLib.DBusCallFlags flags, int timeout_msec, GLib.UnixFDList? fd_list = null, GLib.Cancellable? cancellable = null, out GLib.UnixFDList? out_fd_list = null) throws GLib.Error; - [Version (since = "2.30")] - public GLib.Variant call_with_unix_fd_list_sync (string? bus_name, string object_path, string interface_name, string method_name, GLib.Variant? parameters, GLib.VariantType? reply_type, GLib.DBusCallFlags flags, int timeout_msec, GLib.UnixFDList? fd_list = null, out GLib.UnixFDList? out_fd_list = null, GLib.Cancellable? cancellable = null) throws GLib.Error; - public async bool close (GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool close_sync (GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool emit_signal (string? destination_bus_name, string object_path, string interface_name, string signal_name, GLib.Variant? parameters) throws GLib.Error; - [Version (since = "2.32")] - public uint export_action_group (string object_path, GLib.ActionGroup action_group) throws GLib.Error; - [Version (since = "2.32")] - public uint export_menu_model (string object_path, GLib.MenuModel menu) throws GLib.Error; - public async bool flush (GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool flush_sync (GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (cname = "g_dbus_connection_new_for_address", has_construct_function = false)] - public async DBusConnection.for_address (string address, GLib.DBusConnectionFlags flags, GLib.DBusAuthObserver? observer = null, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (has_construct_function = false)] - public DBusConnection.for_address_sync (string address, GLib.DBusConnectionFlags flags, GLib.DBusAuthObserver? observer = null, GLib.Cancellable? cancellable = null) throws GLib.Error; - public GLib.DBusCapabilityFlags get_capabilities (); - public bool get_exit_on_close (); - [Version (since = "2.60")] - public GLib.DBusConnectionFlags get_flags (); - public unowned string get_guid (); - [Version (since = "2.34")] - public uint32 get_last_serial (); - public unowned GLib.Credentials? get_peer_credentials (); - public async T get_proxy (string? name, string object_path, GLib.DBusProxyFlags flags = 0, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public T get_proxy_sync (string? name, string object_path, GLib.DBusProxyFlags flags = 0, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public unowned GLib.IOStream get_stream (); - public unowned string? get_unique_name (); - public bool is_closed (); - [CCode (cname = "g_dbus_connection_new", finish_name = "g_dbus_connection_new_finish")] - [Version (deprecated_since = "vala-0.36", replacement = "DBusConnection")] - public static async GLib.DBusConnection @new (GLib.IOStream stream, string? guid, GLib.DBusConnectionFlags flags, GLib.DBusAuthObserver? observer = null, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (cname = "g_dbus_connection_new_for_address", finish_name = "g_dbus_connection_new_for_address_finish")] - [Version (deprecated_since = "vala-0.36", replacement = "DBusConnection.for_address")] - public static async GLib.DBusConnection new_for_address (string address, GLib.DBusConnectionFlags flags, GLib.DBusAuthObserver? observer = null, GLib.Cancellable? cancellable = null) throws GLib.Error; - public uint register_object (string object_path, T object) throws GLib.IOError; - [Version (since = "2.46")] - public uint register_object_with_closures (string object_path, GLib.DBusInterfaceInfo interface_info, GLib.Closure? method_call_closure, GLib.Closure? get_property_closure, GLib.Closure? set_property_closure) throws GLib.Error; - public uint register_subtree (string object_path, GLib.DBusSubtreeVTable vtable, GLib.DBusSubtreeFlags flags, void* user_data, GLib.DestroyNotify user_data_free_func) throws GLib.Error; - public void remove_filter (uint filter_id); - public bool send_message (GLib.DBusMessage message, GLib.DBusSendMessageFlags flags, out uint32 out_serial) throws GLib.Error; - public async GLib.DBusMessage send_message_with_reply (GLib.DBusMessage message, GLib.DBusSendMessageFlags flags, int timeout_msec, uint32* out_serial = null, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public GLib.DBusMessage send_message_with_reply_sync (GLib.DBusMessage message, GLib.DBusSendMessageFlags flags, int timeout_msec, out uint32 out_serial = null, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public void set_exit_on_close (bool exit_on_close); - public uint signal_subscribe (string? sender, string? interface_name, string? member, string? object_path, string? arg0, GLib.DBusSignalFlags flags, owned GLib.DBusSignalCallback callback); - public void signal_unsubscribe (uint subscription_id); - public void start_message_processing (); - [CCode (has_construct_function = false)] - public DBusConnection.sync (GLib.IOStream stream, string? guid, GLib.DBusConnectionFlags flags, GLib.DBusAuthObserver? observer = null, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.32")] - public void unexport_action_group (uint export_id); - [Version (since = "2.32")] - public void unexport_menu_model (uint export_id); - public bool unregister_object (uint registration_id); - public bool unregister_subtree (uint registration_id); - [NoAccessorMethod] - public string address { construct; } - [NoAccessorMethod] - public GLib.DBusAuthObserver authentication_observer { construct; } - public GLib.DBusCapabilityFlags capabilities { get; } - [NoAccessorMethod] - public bool closed { get; } - public bool exit_on_close { get; set; } - public GLib.DBusConnectionFlags flags { get; construct; } - public string guid { get; construct; } - public GLib.IOStream stream { get; construct; } - public string unique_name { get; } - [CCode (cname = "closed")] - public signal void on_closed (bool remote_peer_vanished, GLib.Error? error); - } - [CCode (cheader_filename = "gio/gio.h", ref_function = "g_dbus_interface_info_ref", type_id = "g_dbus_interface_info_get_type ()", unref_function = "g_dbus_interface_info_unref")] - [Compact] - [Version (since = "2.26")] - public class DBusInterfaceInfo { - [CCode (array_length = false, array_null_terminated = true)] - public GLib.DBusAnnotationInfo[] annotations; - [CCode (array_length = false, array_null_terminated = true)] - public GLib.DBusMethodInfo[] methods; - public string name; - [CCode (array_length = false, array_null_terminated = true)] - public GLib.DBusPropertyInfo[] properties; - public int ref_count; - [CCode (array_length = false, array_null_terminated = true)] - public GLib.DBusSignalInfo[] signals; - [Version (since = "2.30")] - public void cache_build (); - [Version (since = "2.30")] - public void cache_release (); - public void generate_xml (uint indent, GLib.StringBuilder string_builder); - public unowned GLib.DBusMethodInfo lookup_method (string name); - public unowned GLib.DBusPropertyInfo lookup_property (string name); - public unowned GLib.DBusSignalInfo lookup_signal (string name); - public unowned GLib.DBusInterfaceInfo @ref (); - public void unref (); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_interface_skeleton_get_type ()")] - [Version (since = "2.30")] - public abstract class DBusInterfaceSkeleton : GLib.Object, GLib.DBusInterface { - [CCode (has_construct_function = false)] - protected DBusInterfaceSkeleton (); - public bool export (GLib.DBusConnection connection, string object_path) throws GLib.Error; - public virtual void flush (); - public unowned GLib.DBusConnection get_connection (); - [Version (since = "2.32")] - public GLib.List get_connections (); - public GLib.DBusInterfaceSkeletonFlags get_flags (); - public virtual unowned GLib.DBusInterfaceInfo get_info (); - public unowned string get_object_path (); - public virtual GLib.Variant get_properties (); - public virtual GLib.DBusInterfaceVTable? get_vtable (); - [Version (since = "2.32")] - public bool has_connection (GLib.DBusConnection connection); - public void set_flags (GLib.DBusInterfaceSkeletonFlags flags); - public void unexport (); - [Version (since = "2.32")] - public void unexport_from_connection (GLib.DBusConnection connection); - [NoAccessorMethod] - public GLib.DBusInterfaceSkeletonFlags g_flags { get; set; } - public virtual signal bool g_authorize_method (GLib.DBusMethodInvocation invocation); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_menu_model_get_type ()")] - public class DBusMenuModel : GLib.MenuModel { - [CCode (has_construct_function = false)] - protected DBusMenuModel (); - [Version (since = "2.32")] - public static GLib.DBusMenuModel @get (GLib.DBusConnection connection, string? bus_name, string object_path); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_message_get_type ()")] - [Version (since = "2.26")] - public class DBusMessage : GLib.Object { - [CCode (has_construct_function = false)] - public DBusMessage (); - public static ssize_t bytes_needed ([CCode (array_length_cname = "blob_len", array_length_pos = 1.1, array_length_type = "gsize")] uint8[] blob) throws GLib.Error; - public GLib.DBusMessage copy () throws GLib.Error; - [CCode (has_construct_function = false)] - public DBusMessage.from_blob ([CCode (array_length_cname = "blob_len", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] blob, GLib.DBusCapabilityFlags capabilities) throws GLib.Error; - public unowned string get_arg0 (); - public unowned GLib.Variant get_body (); - public GLib.DBusMessageByteOrder get_byte_order (); - public unowned string get_destination (); - public unowned string get_error_name (); - public GLib.DBusMessageFlags get_flags (); - public unowned GLib.Variant? get_header (GLib.DBusMessageHeaderField header_field); - [CCode (array_length = false, array_null_terminated = true)] - public uchar[] get_header_fields (); - public unowned string get_interface (); - public bool get_locked (); - public unowned string get_member (); - public GLib.DBusMessageType get_message_type (); - public uint32 get_num_unix_fds (); - public unowned string get_path (); - public uint32 get_reply_serial (); - public unowned string get_sender (); - public uint32 get_serial (); - public unowned string get_signature (); - public unowned GLib.UnixFDList get_unix_fd_list (); - public void @lock (); - [CCode (has_construct_function = false)] - public DBusMessage.method_call (string? name, string path, string? interface_, string method); - [CCode (has_construct_function = false)] - [PrintfFormat] - public DBusMessage.method_error (GLib.DBusMessage method_call_message, string error_name, string error_message_format, ...); - [CCode (has_construct_function = false)] - public DBusMessage.method_error_literal (GLib.DBusMessage method_call_message, string error_name, string error_message); - [CCode (has_construct_function = false)] - public DBusMessage.method_error_valist (GLib.DBusMessage method_call_message, string error_name, string error_message_format, va_list var_args); - [CCode (has_construct_function = false)] - public DBusMessage.method_reply (GLib.DBusMessage method_call_message); - public string print (uint indent = 0); - public void set_body (GLib.Variant body); - public void set_byte_order (GLib.DBusMessageByteOrder byte_order); - public void set_destination (string value); - public void set_error_name (string value); - public void set_flags (GLib.DBusMessageFlags flags); - public void set_header (GLib.DBusMessageHeaderField header_field, GLib.Variant? value); - public void set_interface (string value); - public void set_member (string value); - public void set_message_type (GLib.DBusMessageType type); - public void set_num_unix_fds (uint32 value); - public void set_path (string value); - public void set_reply_serial (uint32 value); - public void set_sender (string value); - public void set_serial (uint32 serial); - public void set_signature (string value); - public void set_unix_fd_list (GLib.UnixFDList? fd_list); - [CCode (has_construct_function = false)] - public DBusMessage.@signal (string path, string interface_, string @signal); - [CCode (array_length_pos = 0.5, array_length_type = "gsize")] - public uint8[] to_blob (GLib.DBusCapabilityFlags capabilities) throws GLib.Error; - public bool to_gerror () throws GLib.Error; - public bool locked { get; } - } - [CCode (cheader_filename = "gio/gio.h", ref_function = "g_dbus_method_info_ref", type_id = "g_dbus_method_info_get_type ()", unref_function = "g_dbus_method_info_unref")] - [Compact] - [Version (since = "2.26")] - public class DBusMethodInfo { - [CCode (array_length = false, array_null_terminated = true)] - public GLib.DBusAnnotationInfo[] annotations; - [CCode (array_length = false, array_null_terminated = true)] - public GLib.DBusArgInfo[] in_args; - public string name; - [CCode (array_length = false, array_null_terminated = true)] - public GLib.DBusArgInfo[] out_args; - public int ref_count; - public unowned GLib.DBusMethodInfo @ref (); - public void unref (); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_method_invocation_get_type ()")] - [Version (since = "2.26")] - public class DBusMethodInvocation : GLib.Object { - [CCode (has_construct_function = false)] - protected DBusMethodInvocation (); - public unowned GLib.DBusConnection get_connection (); - public unowned string get_interface_name (); - public unowned GLib.DBusMessage get_message (); - public unowned GLib.DBusMethodInfo get_method_info (); - public unowned string get_method_name (); - public unowned string get_object_path (); - public unowned GLib.Variant get_parameters (); - [Version (since = "2.38")] - public unowned GLib.DBusPropertyInfo get_property_info (); - public unowned string get_sender (); - public void* get_user_data (); - [DestroysInstance] - public void return_dbus_error (string error_name, string error_message); - [DestroysInstance] - public void return_error (GLib.Quark domain, int code, string format, ...); - [DestroysInstance] - public void return_error_literal (GLib.Quark domain, int code, string message); - [DestroysInstance] - public void return_error_valist (GLib.Quark domain, int code, string format, [CCode (type = "va_list")] va_list var_args); - [DestroysInstance] - public void return_gerror (GLib.Error error); - [DestroysInstance] - public void return_value (GLib.Variant? parameters); - [DestroysInstance] - [Version (since = "2.30")] - public void return_value_with_unix_fd_list (GLib.Variant? parameters, GLib.UnixFDList? fd_list); - [DestroysInstance] - [Version (since = "2.30")] - public void take_error (owned GLib.Error error); - } - [CCode (cheader_filename = "gio/gio.h", ref_function = "g_dbus_node_info_ref", type_id = "g_dbus_node_info_get_type ()", unref_function = "g_dbus_node_info_unref")] - [Compact] - [Version (since = "2.26")] - public class DBusNodeInfo { - [CCode (array_length = false, array_null_terminated = true)] - public GLib.DBusAnnotationInfo[] annotations; - [CCode (array_length = false, array_null_terminated = true)] - public GLib.DBusInterfaceInfo[] interfaces; - [CCode (array_length = false, array_null_terminated = true)] - public GLib.DBusNodeInfo[] nodes; - public string path; - public int ref_count; - [CCode (has_construct_function = false)] - public DBusNodeInfo.for_xml (string xml_data) throws GLib.Error; - public void generate_xml (uint indent, GLib.StringBuilder string_builder); - public unowned GLib.DBusInterfaceInfo lookup_interface (string name); - public unowned GLib.DBusNodeInfo @ref (); - public void unref (); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_object_manager_client_get_type ()")] - [Version (since = "2.30")] - public class DBusObjectManagerClient : GLib.Object, GLib.AsyncInitable, GLib.DBusObjectManager, GLib.Initable { - [CCode (cname = "g_dbus_object_manager_client_new", has_construct_function = false)] - public async DBusObjectManagerClient (GLib.DBusConnection connection, GLib.DBusObjectManagerClientFlags flags, string name, string object_path, [CCode (delegate_target_pos = 5.33333, destroy_notify_pos = 5.66667)] owned GLib.DBusProxyTypeFunc? get_proxy_type_func, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (cname = "g_dbus_object_manager_client_new_for_bus", has_construct_function = false)] - public async DBusObjectManagerClient.for_bus (GLib.BusType bus_type, GLib.DBusObjectManagerClientFlags flags, string name, string object_path, [CCode (delegate_target_pos = 5.33333, destroy_notify_pos = 5.66667)] owned GLib.DBusProxyTypeFunc? get_proxy_type_func, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (has_construct_function = false, type = "GDBusObjectManager*")] - public DBusObjectManagerClient.for_bus_sync (GLib.BusType bus_type, GLib.DBusObjectManagerClientFlags flags, string name, string object_path, [CCode (delegate_target_pos = 5.33333, destroy_notify_pos = 5.66667)] owned GLib.DBusProxyTypeFunc? get_proxy_type_func, GLib.Cancellable? cancellable = null) throws GLib.Error; - public unowned GLib.DBusConnection get_connection (); - public GLib.DBusObjectManagerClientFlags get_flags (); - public unowned string get_name (); - public string? get_name_owner (); - [CCode (cname = "g_dbus_object_manager_client_new", finish_name = "g_dbus_object_manager_client_new_finish")] - [Version (deprecated_since = "vala-0.36", replacement = "DBusObjectManagerClient")] - public static async GLib.DBusObjectManagerClient @new (GLib.DBusConnection connection, GLib.DBusObjectManagerClientFlags flags, string name, string object_path, [CCode (delegate_target_pos = 5.33333, destroy_notify_pos = 5.66667)] owned GLib.DBusProxyTypeFunc? get_proxy_type_func, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (cname = "g_dbus_object_manager_client_new_for_bus", finish_name = "g_dbus_object_manager_client_new_for_bus_finish")] - [Version (deprecated_since = "vala-0.36", replacement = "DBusObjectManagerClient.for_bus")] - public static async GLib.DBusObjectManagerClient new_for_bus (GLib.BusType bus_type, GLib.DBusObjectManagerClientFlags flags, string name, string object_path, [CCode (delegate_target_pos = 5.33333, destroy_notify_pos = 5.66667)] owned GLib.DBusProxyTypeFunc? get_proxy_type_func, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (has_construct_function = false, type = "GDBusObjectManager*")] - public DBusObjectManagerClient.sync (GLib.DBusConnection connection, GLib.DBusObjectManagerClientFlags flags, string? name, string object_path, [CCode (delegate_target_pos = 5.33333, destroy_notify_pos = 5.66667)] owned GLib.DBusProxyTypeFunc? get_proxy_type_func, GLib.Cancellable? cancellable = null) throws GLib.Error; - [NoAccessorMethod] - public GLib.BusType bus_type { construct; } - public GLib.DBusConnection connection { get; construct; } - public GLib.DBusObjectManagerClientFlags flags { get; construct; } - [NoAccessorMethod] - public void* get_proxy_type_destroy_notify { get; construct; } - [NoAccessorMethod] - public void* get_proxy_type_func { get; construct; } - [NoAccessorMethod] - public void* get_proxy_type_user_data { get; construct; } - public string name { get; construct; } - public string? name_owner { owned get; } - [NoAccessorMethod] - public string object_path { owned get; construct; } - public virtual signal void interface_proxy_properties_changed (GLib.DBusObjectProxy object_proxy, GLib.DBusProxy interface_proxy, GLib.Variant changed_properties, [CCode (array_length = false, array_null_terminated = true)] string[] invalidated_properties); - public virtual signal void interface_proxy_signal (GLib.DBusObjectProxy object_proxy, GLib.DBusProxy interface_proxy, string sender_name, string signal_name, GLib.Variant parameters); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_object_manager_server_get_type ()")] - [Version (since = "2.30")] - public class DBusObjectManagerServer : GLib.Object, GLib.DBusObjectManager { - [CCode (has_construct_function = false)] - public DBusObjectManagerServer (string object_path); - public void export (GLib.DBusObjectSkeleton object); - public void export_uniquely (GLib.DBusObjectSkeleton object); - public GLib.DBusConnection get_connection (); - [Version (since = "2.34")] - public bool is_exported (GLib.DBusObjectSkeleton object); - public void set_connection (GLib.DBusConnection? connection); - public bool unexport (string object_path); - public GLib.DBusConnection connection { owned get; set; } - [NoAccessorMethod] - public string object_path { owned get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_object_proxy_get_type ()")] - [Version (since = "2.30")] - public class DBusObjectProxy : GLib.Object, GLib.DBusObject { - [CCode (has_construct_function = false)] - public DBusObjectProxy (GLib.DBusConnection connection, string object_path); - public unowned GLib.DBusConnection get_connection (); - [NoAccessorMethod] - public GLib.DBusConnection g_connection { owned get; construct; } - [NoAccessorMethod] - public string g_object_path { owned get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_object_skeleton_get_type ()")] - [Version (since = "2.30")] - public class DBusObjectSkeleton : GLib.Object, GLib.DBusObject { - [CCode (has_construct_function = false)] - public DBusObjectSkeleton (string object_path); - public void add_interface (GLib.DBusInterfaceSkeleton interface_); - public void flush (); - public void remove_interface (GLib.DBusInterfaceSkeleton interface_); - public void remove_interface_by_name (string interface_name); - public void set_object_path (string object_path); - [NoAccessorMethod] - public string g_object_path { owned get; set construct; } - public virtual signal bool authorize_method (GLib.DBusInterfaceSkeleton interface_, GLib.DBusMethodInvocation invocation); - } - [CCode (cheader_filename = "gio/gio.h", ref_function = "g_dbus_property_info_ref", type_id = "g_dbus_property_info_get_type ()", unref_function = "g_dbus_property_info_unref")] - [Compact] - [Version (since = "2.26")] - public class DBusPropertyInfo { - [CCode (array_length = false, array_null_terminated = true)] - public GLib.DBusAnnotationInfo[] annotations; - public GLib.DBusPropertyInfoFlags flags; - public string name; - public int ref_count; - public string signature; - public unowned GLib.DBusPropertyInfo @ref (); - public void unref (); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_proxy_get_type ()")] - [Version (since = "2.26")] - public class DBusProxy : GLib.Object, GLib.AsyncInitable, GLib.DBusInterface, GLib.Initable { - [CCode (cname = "g_dbus_proxy_new", has_construct_function = false)] - public async DBusProxy (GLib.DBusConnection connection, GLib.DBusProxyFlags flags, GLib.DBusInterfaceInfo? info, string? name, string object_path, string interface_name, GLib.Cancellable? cancellable = null) throws GLib.Error; - public async GLib.Variant call (string method_name, GLib.Variant? parameters, GLib.DBusCallFlags flags, int timeout_msec, GLib.Cancellable? cancellable = null) throws GLib.Error; - public GLib.Variant call_sync (string method_name, GLib.Variant? parameters, GLib.DBusCallFlags flags, int timeout_msec, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (async_result_pos = 2.1)] - [Version (since = "2.30")] - public async GLib.Variant call_with_unix_fd_list (string method_name, GLib.Variant? parameters, GLib.DBusCallFlags flags, int timeout_msec, GLib.UnixFDList? fd_list = null, GLib.Cancellable? cancellable = null, out GLib.UnixFDList? out_fd_list = null) throws GLib.Error; - [Version (since = "2.30")] - public GLib.Variant call_with_unix_fd_list_sync (string method_name, GLib.Variant? parameters, GLib.DBusCallFlags flags, int timeout_msec, GLib.UnixFDList? fd_list = null, out GLib.UnixFDList? out_fd_list = null, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (cname = "g_dbus_proxy_new_for_bus", finish_name = "g_dbus_proxy_new_for_bus_finish")] - [Version (deprecated_since = "vala-0.36", replacement = "DBusProxy.for_bus")] - public static async GLib.DBusProxy create_for_bus (GLib.BusType bus_type, GLib.DBusProxyFlags flags, GLib.DBusInterfaceInfo? info, string name, string object_path, string interface_name, GLib.Cancellable? cancellable = null) throws GLib.IOError; - [CCode (cname = "g_dbus_proxy_new_for_bus", has_construct_function = false)] - public async DBusProxy.for_bus (GLib.BusType bus_type, GLib.DBusProxyFlags flags, GLib.DBusInterfaceInfo? info, string name, string object_path, string interface_name, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (has_construct_function = false)] - public DBusProxy.for_bus_sync (GLib.BusType bus_type, GLib.DBusProxyFlags flags, GLib.DBusInterfaceInfo? info, string name, string object_path, string interface_name, GLib.Cancellable? cancellable = null) throws GLib.Error; - public GLib.Variant? get_cached_property (string property_name); - [CCode (array_length = false, array_null_terminated = true)] - public string[]? get_cached_property_names (); - public unowned GLib.DBusConnection get_connection (); - public int get_default_timeout (); - public GLib.DBusProxyFlags get_flags (); - public unowned GLib.DBusInterfaceInfo? get_interface_info (); - public unowned string get_interface_name (); - public unowned string get_name (); - public string? get_name_owner (); - public unowned string get_object_path (); - [CCode (cname = "g_dbus_proxy_new", finish_name = "g_dbus_proxy_new_finish")] - [Version (deprecated_since = "vala-0.36", replacement = "DBusProxy")] - public static async GLib.DBusProxy @new (GLib.DBusConnection connection, GLib.DBusProxyFlags flags, GLib.DBusInterfaceInfo? info, string? name, string object_path, string interface_name, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public void set_cached_property (string property_name, GLib.Variant? value); - public void set_default_timeout (int timeout_msec); - public void set_interface_info (GLib.DBusInterfaceInfo? info); - [CCode (has_construct_function = false)] - public DBusProxy.sync (GLib.DBusConnection connection, GLib.DBusProxyFlags flags, GLib.DBusInterfaceInfo? info, string? name, string object_path, string interface_name, GLib.Cancellable? cancellable = null) throws GLib.Error; - [NoAccessorMethod] - public GLib.BusType g_bus_type { construct; } - [NoAccessorMethod] - public GLib.DBusConnection g_connection { owned get; construct; } - [NoAccessorMethod] - public int g_default_timeout { get; set construct; } - [NoAccessorMethod] - public GLib.DBusProxyFlags g_flags { get; construct; } - [NoAccessorMethod] - public GLib.DBusInterfaceInfo g_interface_info { owned get; set; } - [NoAccessorMethod] - public string g_interface_name { owned get; construct; } - [NoAccessorMethod] - public string g_name { owned get; construct; } - [NoAccessorMethod] - public string g_name_owner { owned get; } - [NoAccessorMethod] - public string g_object_path { owned get; construct; } - public virtual signal void g_properties_changed (GLib.Variant changed_properties, [CCode (array_length = false, array_null_terminated = true)] string[] invalidated_properties); - public virtual signal void g_signal (string? sender_name, string signal_name, GLib.Variant parameters); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_server_get_type ()")] - [Version (since = "2.26")] - public class DBusServer : GLib.Object, GLib.Initable { - [CCode (has_construct_function = false)] - protected DBusServer (); - public unowned string get_client_address (); - public GLib.DBusServerFlags get_flags (); - public unowned string get_guid (); - public bool is_active (); - public void start (); - public void stop (); - [CCode (has_construct_function = false)] - public DBusServer.sync (string address, GLib.DBusServerFlags flags, string guid, GLib.DBusAuthObserver? observer = null, GLib.Cancellable? cancellable = null) throws GLib.Error; - [NoAccessorMethod] - public bool active { get; } - [NoAccessorMethod] - public string address { owned get; construct; } - [NoAccessorMethod] - public GLib.DBusAuthObserver authentication_observer { owned get; construct; } - public string client_address { get; } - public GLib.DBusServerFlags flags { get; construct; } - public string guid { get; construct; } - public signal bool new_connection (GLib.DBusConnection connection); - } - [CCode (cheader_filename = "gio/gio.h", ref_function = "g_dbus_signal_info_ref", type_id = "g_dbus_signal_info_get_type ()", unref_function = "g_dbus_signal_info_unref")] - [Compact] - [Version (since = "2.26")] - public class DBusSignalInfo { - [CCode (array_length = false, array_null_terminated = true)] - public GLib.DBusAnnotationInfo[] annotations; - [CCode (array_length = false, array_null_terminated = true)] - public GLib.DBusArgInfo[] args; - public string name; - public int ref_count; - public unowned GLib.DBusSignalInfo @ref (); - public void unref (); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_data_input_stream_get_type ()")] - public class DataInputStream : GLib.BufferedInputStream, GLib.Seekable { - [CCode (has_construct_function = false)] - public DataInputStream (GLib.InputStream base_stream); - public GLib.DataStreamByteOrder get_byte_order (); - public GLib.DataStreamNewlineType get_newline_type (); - public uint8 read_byte (GLib.Cancellable? cancellable = null) throws GLib.IOError; - public int16 read_int16 (GLib.Cancellable? cancellable = null) throws GLib.IOError; - public int32 read_int32 (GLib.Cancellable? cancellable = null) throws GLib.IOError; - public int64 read_int64 (GLib.Cancellable? cancellable = null) throws GLib.IOError; - [CCode (array_length = false, array_null_terminated = true)] - public string? read_line (out size_t length = null, GLib.Cancellable? cancellable = null) throws GLib.IOError; - [CCode (array_length = false, array_null_terminated = true)] - [Version (since = "2.20")] - public async string? read_line_async (int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null, out size_t length = null) throws GLib.IOError, GLib.IOError; - [Version (since = "2.30")] - public string? read_line_utf8 (out size_t length = null, GLib.Cancellable? cancellable = null) throws GLib.IOError; - [CCode (cname = "g_data_input_stream_read_line_async", finish_name = "g_data_input_stream_read_line_finish_utf8")] - public async string? read_line_utf8_async (int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null, out size_t length = null) throws GLib.IOError; - public uint16 read_uint16 (GLib.Cancellable? cancellable = null) throws GLib.IOError; - public uint32 read_uint32 (GLib.Cancellable? cancellable = null) throws GLib.IOError; - public uint64 read_uint64 (GLib.Cancellable? cancellable = null) throws GLib.IOError; - [Version (deprecated = true, deprecated_since = "2.56")] - public string read_until (string stop_chars, out size_t length, GLib.Cancellable? cancellable = null) throws GLib.IOError; - [Version (deprecated = true, deprecated_since = "2.56", since = "2.20")] - public async string read_until_async (string stop_chars, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null, out size_t length) throws GLib.IOError, GLib.IOError; - [Version (since = "2.26")] - public string read_upto (string stop_chars, ssize_t stop_chars_len, out size_t length, GLib.Cancellable? cancellable = null) throws GLib.IOError; - [Version (since = "2.26")] - public async string read_upto_async (string stop_chars, ssize_t stop_chars_len, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null, out size_t length) throws GLib.IOError, GLib.IOError; - public void set_byte_order (GLib.DataStreamByteOrder order); - public void set_newline_type (GLib.DataStreamNewlineType type); - public GLib.DataStreamByteOrder byte_order { get; set; } - public GLib.DataStreamNewlineType newline_type { get; set; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_data_output_stream_get_type ()")] - public class DataOutputStream : GLib.FilterOutputStream, GLib.Seekable { - [CCode (has_construct_function = false)] - public DataOutputStream (GLib.OutputStream base_stream); - public GLib.DataStreamByteOrder get_byte_order (); - public bool put_byte (uint8 data, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public bool put_int16 (int16 data, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public bool put_int32 (int32 data, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public bool put_int64 (int64 data, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public bool put_string (string str, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public bool put_uint16 (uint16 data, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public bool put_uint32 (uint32 data, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public bool put_uint64 (uint64 data, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public void set_byte_order (GLib.DataStreamByteOrder order); - public GLib.DataStreamByteOrder byte_order { get; set; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_emblem_get_type ()")] - public class Emblem : GLib.Object, GLib.Icon { - [CCode (has_construct_function = false)] - [Version (since = "2.18")] - public Emblem (GLib.Icon icon); - [Version (since = "2.18")] - public unowned GLib.Icon get_icon (); - [Version (since = "2.18")] - public GLib.EmblemOrigin get_origin (); - [CCode (has_construct_function = false)] - [Version (since = "2.18")] - public Emblem.with_origin (GLib.Icon icon, GLib.EmblemOrigin origin); - public GLib.Object icon { get; construct; } - public GLib.EmblemOrigin origin { get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_emblemed_icon_get_type ()")] - public class EmblemedIcon : GLib.Object, GLib.Icon { - [CCode (has_construct_function = false, type = "GIcon*")] - [Version (since = "2.18")] - public EmblemedIcon (GLib.Icon icon, GLib.Emblem? emblem); - [Version (since = "2.18")] - public void add_emblem (GLib.Emblem emblem); - [Version (since = "2.28")] - public void clear_emblems (); - [Version (since = "2.18")] - public unowned GLib.List get_emblems (); - [Version (since = "2.18")] - public unowned GLib.Icon get_icon (); - [NoAccessorMethod] - public GLib.Icon gicon { owned get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", ref_function = "g_file_attribute_info_list_ref", type_id = "g_file_attribute_info_list_get_type ()", unref_function = "g_file_attribute_info_list_unref")] - [Compact] - public class FileAttributeInfoList { - [CCode (array_length_cname = "n_infos")] - public GLib.FileAttributeInfo[] infos; - public int n_infos; - [CCode (has_construct_function = false)] - public FileAttributeInfoList (); - public void add (string name, GLib.FileAttributeType type, GLib.FileAttributeInfoFlags flags); - public GLib.FileAttributeInfoList dup (); - public unowned GLib.FileAttributeInfo? lookup (string name); - public unowned GLib.FileAttributeInfoList @ref (); - public void unref (); - } - [CCode (cheader_filename = "gio/gio.h", ref_function = "g_file_attribute_matcher_ref", type_id = "g_file_attribute_matcher_get_type ()", unref_function = "g_file_attribute_matcher_unref")] - [Compact] - public class FileAttributeMatcher { - [CCode (has_construct_function = false)] - public FileAttributeMatcher (string attributes); - public bool enumerate_namespace (string ns); - public unowned string enumerate_next (); - public bool matches (string attribute); - public bool matches_only (string attribute); - public unowned GLib.FileAttributeMatcher @ref (); - public GLib.FileAttributeMatcher subtract (GLib.FileAttributeMatcher subtract); - [Version (since = "2.32")] - public string to_string (); - public void unref (); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_file_enumerator_get_type ()")] - public class FileEnumerator : GLib.Object { - [CCode (has_construct_function = false)] - protected FileEnumerator (); - public bool close (GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async bool close_async (int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - [NoWrapper] - public virtual bool close_fn (GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.36")] - public GLib.File get_child (GLib.FileInfo info); - [Version (since = "2.18")] - public unowned GLib.File get_container (); - public bool has_pending (); - public bool is_closed (); - [Version (since = "2.44")] - public bool iterate (out unowned GLib.FileInfo out_info, out unowned GLib.File out_child, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual GLib.FileInfo? next_file (GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async GLib.List next_files_async (int num_files, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - public void set_pending (bool pending); - [NoAccessorMethod] - public GLib.File container { construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_file_io_stream_get_type ()")] - [Version (since = "2.22")] - public class FileIOStream : GLib.IOStream, GLib.Seekable { - [CCode (has_construct_function = false)] - protected FileIOStream (); - [NoWrapper] - public virtual bool can_seek (); - [NoWrapper] - public virtual bool can_truncate (); - public virtual string get_etag (); - public virtual GLib.FileInfo query_info (string attributes, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async GLib.FileInfo query_info_async (string attributes, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - [NoWrapper] - public virtual bool seek (int64 offset, GLib.SeekType type, GLib.Cancellable? cancellable = null) throws GLib.Error; - [NoWrapper] - public virtual int64 tell (); - [NoWrapper] - public virtual bool truncate_fn (int64 size, GLib.Cancellable? cancellable = null) throws GLib.Error; - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_file_icon_get_type ()")] - public class FileIcon : GLib.Object, GLib.Icon, GLib.LoadableIcon { - [CCode (has_construct_function = false, type = "GIcon*")] - public FileIcon (GLib.File file); - public unowned GLib.File get_file (); - public GLib.File file { get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_file_info_get_type ()")] - public class FileInfo : GLib.Object { - [CCode (has_construct_function = false)] - public FileInfo (); - public void clear_status (); - public void copy_into (GLib.FileInfo dest_info); - public GLib.FileInfo dup (); - public string? get_attribute_as_string (string attribute); - public bool get_attribute_boolean (string attribute); - public unowned string get_attribute_byte_string (string attribute); - public bool get_attribute_data (string attribute, out GLib.FileAttributeType type, out void* value_pp, out GLib.FileAttributeStatus status); - public int32 get_attribute_int32 (string attribute); - public int64 get_attribute_int64 (string attribute); - public unowned GLib.Object get_attribute_object (string attribute); - public GLib.FileAttributeStatus get_attribute_status (string attribute); - public unowned string get_attribute_string (string attribute); - [CCode (array_length = false, array_null_terminated = true)] - [Version (since = "2.22")] - public unowned string[] get_attribute_stringv (string attribute); - public GLib.FileAttributeType get_attribute_type (string attribute); - public uint32 get_attribute_uint32 (string attribute); - public uint64 get_attribute_uint64 (string attribute); - public unowned string get_content_type (); - [Version (since = "2.36")] - public GLib.DateTime get_deletion_date (); - public unowned string get_display_name (); - public unowned string get_edit_name (); - public unowned string get_etag (); - public GLib.FileType get_file_type (); - public unowned GLib.Icon get_icon (); - public bool get_is_backup (); - public bool get_is_hidden (); - public bool get_is_symlink (); - [Version (since = "2.62")] - public GLib.DateTime? get_modification_date_time (); - [Version (deprecated = true, deprecated_since = "2.62")] - public GLib.TimeVal get_modification_time (); - public unowned string get_name (); - public int64 get_size (); - public int32 get_sort_order (); - [Version (since = "2.34")] - public unowned GLib.Icon get_symbolic_icon (); - public unowned string get_symlink_target (); - public bool has_attribute (string attribute); - [Version (since = "2.22")] - public bool has_namespace (string name_space); - [CCode (array_length = false, array_null_terminated = true)] - public string[]? list_attributes (string? name_space); - public void remove_attribute (string attribute); - public void set_attribute (string attribute, GLib.FileAttributeType type, void* value_p); - public void set_attribute_boolean (string attribute, bool attr_value); - public void set_attribute_byte_string (string attribute, string attr_value); - public void set_attribute_int32 (string attribute, int32 attr_value); - public void set_attribute_int64 (string attribute, int64 attr_value); - public void set_attribute_mask (GLib.FileAttributeMatcher mask); - public void set_attribute_object (string attribute, GLib.Object attr_value); - [Version (since = "2.22")] - public bool set_attribute_status (string attribute, GLib.FileAttributeStatus status); - public void set_attribute_string (string attribute, string attr_value); - public void set_attribute_stringv (string attribute, [CCode (array_length = false, array_null_terminated = true)] string[] attr_value); - public void set_attribute_uint32 (string attribute, uint32 attr_value); - public void set_attribute_uint64 (string attribute, uint64 attr_value); - public void set_content_type (string content_type); - public void set_display_name (string display_name); - public void set_edit_name (string edit_name); - public void set_file_type (GLib.FileType type); - public void set_icon (GLib.Icon icon); - public void set_is_hidden (bool is_hidden); - public void set_is_symlink (bool is_symlink); - [Version (since = "2.62")] - public void set_modification_date_time (GLib.DateTime mtime); - [Version (deprecated = true, deprecated_since = "2.62")] - public void set_modification_time (GLib.TimeVal mtime); - public void set_name (string name); - public void set_size (int64 size); - public void set_sort_order (int32 sort_order); - [Version (since = "2.34")] - public void set_symbolic_icon (GLib.Icon icon); - public void set_symlink_target (string symlink_target); - public void unset_attribute_mask (); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_file_input_stream_get_type ()")] - public class FileInputStream : GLib.InputStream, GLib.Seekable { - [CCode (has_construct_function = false)] - protected FileInputStream (); - [NoWrapper] - public virtual bool can_seek (); - public virtual GLib.FileInfo query_info (string attributes, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async GLib.FileInfo query_info_async (string attributes, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - [NoWrapper] - public virtual bool seek (int64 offset, GLib.SeekType type, GLib.Cancellable? cancellable = null) throws GLib.Error; - [NoWrapper] - public virtual int64 tell (); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_file_monitor_get_type ()")] - public abstract class FileMonitor : GLib.Object { - [CCode (has_construct_function = false)] - protected FileMonitor (); - public virtual bool cancel (); - public void emit_event (GLib.File child, GLib.File other_file, GLib.FileMonitorEvent event_type); - public bool is_cancelled (); - public void set_rate_limit (int limit_msecs); - [NoAccessorMethod] - public bool cancelled { get; } - [Version (deprecated_since = "2.46")] - public GLib.MainContext context { construct; } - [NoAccessorMethod] - public int rate_limit { get; set; } - public virtual signal void changed (GLib.File file, GLib.File? other_file, GLib.FileMonitorEvent event_type); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_file_output_stream_get_type ()")] - public class FileOutputStream : GLib.OutputStream, GLib.Seekable { - [CCode (has_construct_function = false)] - protected FileOutputStream (); - [NoWrapper] - public virtual bool can_seek (); - [NoWrapper] - public virtual bool can_truncate (); - public virtual string get_etag (); - public virtual GLib.FileInfo query_info (string attributes, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async GLib.FileInfo query_info_async (string attributes, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - [NoWrapper] - public virtual bool seek (int64 offset, GLib.SeekType type, GLib.Cancellable? cancellable = null) throws GLib.Error; - [NoWrapper] - public virtual int64 tell (); - [NoWrapper] - public virtual bool truncate_fn (int64 size, GLib.Cancellable? cancellable = null) throws GLib.Error; - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_filename_completer_get_type ()")] - public class FilenameCompleter : GLib.Object { - [CCode (has_construct_function = false)] - public FilenameCompleter (); - public string get_completion_suffix (string initial_text); - [CCode (array_length = false, array_null_terminated = true)] - public string[] get_completions (string initial_text); - public void set_dirs_only (bool dirs_only); - public virtual signal void got_completion_data (); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_filter_input_stream_get_type ()")] - public abstract class FilterInputStream : GLib.InputStream { - [CCode (has_construct_function = false)] - protected FilterInputStream (); - public unowned GLib.InputStream get_base_stream (); - public bool get_close_base_stream (); - public void set_close_base_stream (bool close_base); - public GLib.InputStream base_stream { get; construct; } - public bool close_base_stream { get; set construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_filter_output_stream_get_type ()")] - public abstract class FilterOutputStream : GLib.OutputStream { - [CCode (has_construct_function = false)] - protected FilterOutputStream (); - public unowned GLib.OutputStream get_base_stream (); - public bool get_close_base_stream (); - public void set_close_base_stream (bool close_base); - public GLib.OutputStream base_stream { get; construct; } - public bool close_base_stream { get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", has_type_id = false)] - [Compact] - public class IOExtension { - public unowned string get_name (); - public int get_priority (); - public GLib.Type get_type (); - } - [CCode (cheader_filename = "gio/gio.h", has_type_id = false)] - [Compact] - public class IOExtensionPoint { - [CCode (cheader_filename = "gio/gio.h", cname = "G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME")] - [Version (deprecated = true, deprecated_since = "2.28")] - public const string DESKTOP_APP_INFO_LOOKUP; - [CCode (cheader_filename = "gio/gio.h", cname = "G_MEMORY_MONITOR_EXTENSION_POINT_NAME")] - [Version (since = "2.64")] - public const string MEMORY_MONITOR; - [CCode (cheader_filename = "gio/gio.h", cname = "G_NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME")] - public const string NATIVE_VOLUME_MONITOR; - [CCode (cheader_filename = "gio/gio.h", cname = "G_NETWORK_MONITOR_EXTENSION_POINT_NAME")] - [Version (since = "2.30")] - public const string NETWORK_MONITOR; - [CCode (cheader_filename = "gio/gio.h", cname = "G_PROXY_EXTENSION_POINT_NAME")] - [Version (since = "2.26")] - public const string PROXY; - [CCode (cheader_filename = "gio/gio.h", cname = "G_PROXY_RESOLVER_EXTENSION_POINT_NAME")] - public const string PROXY_RESOLVER; - [CCode (cheader_filename = "gio/gsettingsbackend.h", cname = "G_SETTINGS_BACKEND_EXTENSION_POINT_NAME", feature_test_macro = "G_SETTINGS_ENABLE_BACKEND")] - public const string SETTINGS_BACKEND; - [CCode (cheader_filename = "gio/gio.h", cname = "G_TLS_BACKEND_EXTENSION_POINT_NAME")] - public const string TLS_BACKEND; - [CCode (cheader_filename = "gio/gio.h", cname = "G_VFS_EXTENSION_POINT_NAME")] - public const string VFS; - [CCode (cheader_filename = "gio/gio.h", cname = "G_VOLUME_MONITOR_EXTENSION_POINT_NAME")] - public const string VOLUME_MONITOR; - public unowned GLib.IOExtension get_extension_by_name (string name); - public unowned GLib.List get_extensions (); - public GLib.Type get_required_type (); - [CCode (cheader_filename = "gio/gio.h")] - public static unowned GLib.IOExtension implement (string extension_point_name, GLib.Type type, string extension_name, int priority); - [CCode (cheader_filename = "gio/gio.h")] - public static unowned GLib.IOExtensionPoint lookup (string name); - [CCode (cheader_filename = "gio/gio.h")] - public static unowned GLib.IOExtensionPoint register (string name); - public void set_required_type (GLib.Type type); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_io_module_get_type ()")] - public class IOModule : GLib.TypeModule, GLib.TypePlugin { - [CCode (has_construct_function = false)] - public IOModule (string filename); - public void load (); - [CCode (cheader_filename = "gio/gio.h", cname = "g_io_modules_load_all_in_directory")] - public static GLib.List load_all_in_directory (string dirname); - [CCode (cheader_filename = "gio/gio.h", cname = "g_io_modules_load_all_in_directory_with_scope")] - [Version (since = "2.30")] - public static GLib.List load_all_in_directory_with_scope (string dirname, GLib.IOModuleScope scope); - [CCode (array_length = false, array_null_terminated = true)] - [Version (since = "2.24")] - public static string[] query (); - [CCode (cheader_filename = "gio/gio.h", cname = "g_io_modules_scan_all_in_directory")] - [Version (since = "2.24")] - public static void scan_all_in_directory (string dirname); - [CCode (cheader_filename = "gio/gio.h", cname = "g_io_modules_scan_all_in_directory_with_scope")] - [Version (since = "2.30")] - public static void scan_all_in_directory_with_scope (string dirname, GLib.IOModuleScope scope); - public void unload (); - } - [CCode (cheader_filename = "gio/gio.h", has_type_id = false)] - [Compact] - [Version (since = "2.30")] - public class IOModuleScope { - [CCode (has_construct_function = false)] - public IOModuleScope (GLib.IOModuleScopeFlags flags); - public void block (string basename); - public void free (); - } - [CCode (cheader_filename = "gio/gio.h", has_type_id = false)] - [Compact] - public class IOSchedulerJob { - [CCode (cheader_filename = "gio/gio.h", cname = "g_io_scheduler_cancel_all_jobs")] - [Version (deprecated = true)] - public static void cancel_all (); - [CCode (cheader_filename = "gio/gio.h", cname = "g_io_scheduler_push_job")] - [Version (deprecated = true)] - public static void push ([CCode (delegate_target_pos = 1.33333, destroy_notify_pos = 1.66667)] owned GLib.IOSchedulerJobFunc job_func, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null); - [Version (deprecated = true)] - public bool send_to_mainloop (owned GLib.SourceFunc func); - [Version (deprecated = true)] - public void send_to_mainloop_async (owned GLib.SourceFunc func); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_io_stream_get_type ()")] - [Version (since = "2.22")] - public abstract class IOStream : GLib.Object { - [CCode (has_construct_function = false)] - protected IOStream (); - public void clear_pending (); - [CCode (vfunc_name = "close_fn")] - public virtual bool close (GLib.Cancellable? cancellable = null) throws GLib.IOError; - public virtual async bool close_async (int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public virtual unowned GLib.InputStream get_input_stream (); - public virtual unowned GLib.OutputStream get_output_stream (); - public bool has_pending (); - public bool is_closed (); - public bool set_pending () throws GLib.Error; - [CCode (finish_instance = false)] - [Version (since = "2.28")] - public async bool splice_async (GLib.IOStream stream2, GLib.IOStreamSpliceFlags flags, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - [NoAccessorMethod] - public bool closed { get; } - public abstract GLib.InputStream input_stream { get; } - public abstract GLib.OutputStream output_stream { get; } - } - [CCode (cheader_filename = "gio/gio.h", has_type_id = false)] - [Compact] - public class IOStreamAdapter { - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_inet_address_get_type ()")] - public class InetAddress : GLib.Object { - [CCode (has_construct_function = false)] - protected InetAddress (); - [CCode (has_construct_function = false)] - [Version (since = "2.22")] - public InetAddress.any (GLib.SocketFamily family); - [Version (since = "2.30")] - public bool equal (GLib.InetAddress other_address); - [CCode (has_construct_function = false)] - [Version (since = "2.22")] - public InetAddress.from_bytes ([CCode (array_length = false)] uint8[] bytes, GLib.SocketFamily family); - [CCode (has_construct_function = false)] - [Version (since = "2.22")] - public InetAddress.from_string (string string); - [Version (since = "2.22")] - public GLib.SocketFamily get_family (); - [Version (since = "2.22")] - public bool get_is_any (); - [Version (since = "2.22")] - public bool get_is_link_local (); - [Version (since = "2.22")] - public bool get_is_loopback (); - [Version (since = "2.22")] - public bool get_is_mc_global (); - [Version (since = "2.22")] - public bool get_is_mc_link_local (); - [Version (since = "2.22")] - public bool get_is_mc_node_local (); - [Version (since = "2.22")] - public bool get_is_mc_org_local (); - [Version (since = "2.22")] - public bool get_is_mc_site_local (); - [Version (since = "2.22")] - public bool get_is_multicast (); - [Version (since = "2.22")] - public bool get_is_site_local (); - [Version (since = "2.22")] - public size_t get_native_size (); - [CCode (has_construct_function = false)] - [Version (since = "2.22")] - public InetAddress.loopback (GLib.SocketFamily family); - [CCode (array_length = false)] - [Version (since = "2.22")] - public virtual unowned uint8[] to_bytes (); - [Version (since = "2.22")] - public virtual string to_string (); - [NoAccessorMethod] - public void* bytes { get; construct; } - public GLib.SocketFamily family { get; construct; } - [Version (since = "2.22")] - public bool is_any { get; } - [Version (since = "2.22")] - public bool is_link_local { get; } - [Version (since = "2.22")] - public bool is_loopback { get; } - [Version (since = "2.22")] - public bool is_mc_global { get; } - [Version (since = "2.22")] - public bool is_mc_link_local { get; } - [Version (since = "2.22")] - public bool is_mc_node_local { get; } - [Version (since = "2.22")] - public bool is_mc_org_local { get; } - [Version (since = "2.22")] - public bool is_mc_site_local { get; } - [Version (since = "2.22")] - public bool is_multicast { get; } - [Version (since = "2.22")] - public bool is_site_local { get; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_inet_address_mask_get_type ()")] - [Version (since = "2.32")] - public class InetAddressMask : GLib.Object, GLib.Initable { - [CCode (has_construct_function = false)] - public InetAddressMask (GLib.InetAddress addr, uint length) throws GLib.Error; - public bool equal (GLib.InetAddressMask mask2); - [CCode (has_construct_function = false)] - public InetAddressMask.from_string (string mask_string) throws GLib.Error; - public unowned GLib.InetAddress get_address (); - public GLib.SocketFamily get_family (); - public uint get_length (); - public bool matches (GLib.InetAddress address); - public string to_string (); - [NoAccessorMethod] - public GLib.InetAddress address { owned get; set; } - public GLib.SocketFamily family { get; } - [NoAccessorMethod] - public uint length { get; set; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_inet_socket_address_get_type ()")] - public class InetSocketAddress : GLib.SocketAddress, GLib.SocketConnectable { - [CCode (has_construct_function = false, type = "GSocketAddress*")] - [Version (since = "2.22")] - public InetSocketAddress (GLib.InetAddress address, uint16 port); - [CCode (has_construct_function = false, type = "GSocketAddress*")] - [Version (since = "2.40")] - public InetSocketAddress.from_string (string address, uint port); - [Version (since = "2.22")] - public unowned GLib.InetAddress get_address (); - [Version (since = "2.32")] - public uint32 get_flowinfo (); - [Version (since = "2.22")] - public uint16 get_port (); - [Version (since = "2.32")] - public uint32 get_scope_id (); - public GLib.InetAddress address { get; construct; } - [Version (since = "2.32")] - public uint flowinfo { get; construct; } - public uint port { get; construct; } - public uint scope_id { get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_input_stream_get_type ()")] - public abstract class InputStream : GLib.Object { - [CCode (has_construct_function = false)] - protected InputStream (); - public void clear_pending (); - [CCode (vfunc_name = "close_fn")] - public abstract bool close (GLib.Cancellable? cancellable = null) throws GLib.IOError; - public virtual async bool close_async (int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public bool has_pending (); - public bool is_closed (); - [CCode (vfunc_name = "read_fn")] - public abstract ssize_t read ([CCode (array_length_cname = "count", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] buffer, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public bool read_all ([CCode (array_length_cname = "count", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] buffer, out size_t bytes_read, GLib.Cancellable? cancellable = null) throws GLib.IOError; - [Version (since = "2.44")] - public async bool read_all_async ([CCode (array_length_cname = "count", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] buffer, int io_priority, GLib.Cancellable? cancellable, out size_t bytes_read) throws GLib.Error; - public virtual async ssize_t read_async ([CCode (array_length_cname = "count", array_length_pos = 1.5, array_length_type = "gsize")] uint8[]? buffer, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.IOError; - [Version (since = "2.34")] - public GLib.Bytes read_bytes (size_t count, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.34")] - public async GLib.Bytes read_bytes_async (size_t count, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool set_pending () throws GLib.Error; - public virtual ssize_t skip (size_t count, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public virtual async ssize_t skip_async (size_t count, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.IOError; - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_list_store_get_type ()")] - public class ListStore : GLib.Object, GLib.ListModel { - [CCode (has_construct_function = false)] - [Version (since = "2.44")] - public ListStore (GLib.Type item_type); - [Version (since = "2.44")] - public void append (GLib.Object item); - [Version (since = "2.64")] - public bool find (GLib.Object item, out uint position); - [Version (since = "2.64")] - public bool find_with_equal_func (GLib.Object item, GLib.EqualFunc equal_func, out uint position); - [Version (since = "2.44")] - public void insert (uint position, GLib.Object item); - [Version (since = "2.44")] - public uint insert_sorted (GLib.Object item, GLib.CompareDataFunc compare_func); - [Version (since = "2.44")] - public void remove (uint position); - [Version (since = "2.44")] - public void remove_all (); - [Version (since = "2.46")] - public void sort (GLib.CompareDataFunc compare_func); - [Version (since = "2.44")] - public void splice (uint position, uint n_removals, [CCode (array_length_cname = "n_additions", array_length_pos = 3.1, array_length_type = "guint")] GLib.Object[] additions); - [NoAccessorMethod] - [Version (since = "2.44")] - public GLib.Type item_type { get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_memory_input_stream_get_type ()")] - public class MemoryInputStream : GLib.InputStream, GLib.PollableInputStream, GLib.Seekable { - [CCode (has_construct_function = false, type = "GInputStream*")] - public MemoryInputStream (); - [Version (since = "2.34")] - public void add_bytes (GLib.Bytes bytes); - public void add_data ([CCode (array_length_cname = "len", array_length_pos = 1.5, array_length_type = "gssize")] owned uint8[] data, GLib.DestroyNotify? destroy = GLib.g_free); - [CCode (has_construct_function = false, type = "GInputStream*")] - [Version (since = "2.34")] - public MemoryInputStream.from_bytes (GLib.Bytes bytes); - [CCode (has_construct_function = false, type = "GInputStream*")] - public MemoryInputStream.from_data ([CCode (array_length_cname = "len", array_length_pos = 1.5, array_length_type = "gssize")] owned uint8[] data, GLib.DestroyNotify? destroy = GLib.g_free); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_memory_output_stream_get_type ()")] - public class MemoryOutputStream : GLib.OutputStream, GLib.PollableOutputStream, GLib.Seekable { - [CCode (has_construct_function = false, type = "GOutputStream*")] - public MemoryOutputStream ([CCode (array_length_type = "gsize")] owned uint8[]? data, GLib.ReallocFunc? realloc_function = GLib.g_realloc, GLib.DestroyNotify? destroy_function = GLib.g_free); - [CCode (array_length = false)] - public unowned uint8[] get_data (); - [Version (since = "2.18")] - public size_t get_data_size (); - public size_t get_size (); - [CCode (has_construct_function = false, type = "GOutputStream*")] - [Version (since = "2.36")] - public MemoryOutputStream.resizable (); - [Version (since = "2.34")] - public GLib.Bytes steal_as_bytes (); - [CCode (array_length = false)] - [Version (since = "2.26")] - public uint8[] steal_data (); - [Version (since = "2.24")] - public void* data { get; construct; } - [Version (since = "2.24")] - public ulong data_size { get; } - [NoAccessorMethod] - [Version (since = "2.24")] - public GLib.DestroyNotify? destroy_function { get; construct; } - [NoAccessorMethod] - [Version (since = "2.24")] - public GLib.ReallocFunc? realloc_function { get; construct; } - [Version (since = "2.24")] - public ulong size { get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_menu_get_type ()")] - [Version (since = "2.32")] - public class Menu : GLib.MenuModel { - [CCode (cheader_filename = "gio/gio.h", cname = "G_MENU_ATTRIBUTE_ACTION")] - public const string ATTRIBUTE_ACTION; - [CCode (cheader_filename = "gio/gio.h", cname = "G_MENU_ATTRIBUTE_ACTION_NAMESPACE")] - [Version (since = "2.36")] - public const string ATTRIBUTE_ACTION_NAMESPACE; - [CCode (cheader_filename = "gio/gio.h", cname = "G_MENU_ATTRIBUTE_ICON")] - [Version (since = "2.38")] - public const string ATTRIBUTE_ICON; - [CCode (cheader_filename = "gio/gio.h", cname = "G_MENU_ATTRIBUTE_LABEL")] - public const string ATTRIBUTE_LABEL; - [CCode (cheader_filename = "gio/gio.h", cname = "G_MENU_ATTRIBUTE_TARGET")] - public const string ATTRIBUTE_TARGET; - [CCode (cheader_filename = "gio/gio.h", cname = "G_MENU_LINK_SECTION")] - public const string LINK_SECTION; - [CCode (cheader_filename = "gio/gio.h", cname = "G_MENU_LINK_SUBMENU")] - public const string LINK_SUBMENU; - [CCode (has_construct_function = false)] - public Menu (); - public void append (string? label, string? detailed_action); - public void append_item (GLib.MenuItem item); - public void append_section (string? label, GLib.MenuModel section); - public void append_submenu (string? label, GLib.MenuModel submenu); - public void freeze (); - public void insert (int position, string? label, string? detailed_action); - public void insert_item (int position, GLib.MenuItem item); - public void insert_section (int position, string? label, GLib.MenuModel section); - public void insert_submenu (int position, string? label, GLib.MenuModel submenu); - public void prepend (string? label, string? detailed_action); - public void prepend_item (GLib.MenuItem item); - public void prepend_section (string? label, GLib.MenuModel section); - public void prepend_submenu (string? label, GLib.MenuModel submenu); - public void remove (int position); - [Version (since = "2.38")] - public void remove_all (); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_menu_attribute_iter_get_type ()")] - [Version (since = "2.32")] - public abstract class MenuAttributeIter : GLib.Object { - [CCode (has_construct_function = false)] - protected MenuAttributeIter (); - public unowned string get_name (); - public virtual bool get_next (out unowned string out_name, out GLib.Variant value); - public GLib.Variant get_value (); - public bool next (); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_menu_item_get_type ()")] - [Version (since = "2.32")] - public class MenuItem : GLib.Object { - [CCode (has_construct_function = false)] - public MenuItem (string? label, string? detailed_action); - [CCode (has_construct_function = false)] - [Version (since = "2.34")] - public MenuItem.from_model (GLib.MenuModel model, int item_index); - [Version (since = "2.34")] - public GLib.Variant get_attribute_value (string attribute, GLib.VariantType? expected_type); - [Version (since = "2.34")] - public GLib.MenuModel get_link (string link); - [CCode (has_construct_function = false)] - public MenuItem.section (string? label, GLib.MenuModel section); - public void set_action_and_target (string? action, string? format_string, ...); - public void set_action_and_target_value (string? action, GLib.Variant? target_value); - public void set_attribute (string attribute, string? format_string, ...); - public void set_attribute_value (string attribute, GLib.Variant? value); - public void set_detailed_action (string detailed_action); - [Version (since = "2.38")] - public void set_icon (GLib.Icon icon); - public void set_label (string? label); - public void set_link (string link, GLib.MenuModel? model); - public void set_section (GLib.MenuModel? section); - public void set_submenu (GLib.MenuModel? submenu); - [CCode (has_construct_function = false)] - public MenuItem.submenu (string? label, GLib.MenuModel submenu); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_menu_link_iter_get_type ()")] - [Version (since = "2.32")] - public abstract class MenuLinkIter : GLib.Object { - [CCode (has_construct_function = false)] - protected MenuLinkIter (); - public unowned string get_name (); - public virtual bool get_next (out unowned string out_link, out GLib.MenuModel value); - public GLib.MenuModel get_value (); - public bool next (); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_menu_model_get_type ()")] - [Version (since = "2.32")] - public abstract class MenuModel : GLib.Object { - [CCode (has_construct_function = false)] - protected MenuModel (); - public bool get_item_attribute (int item_index, string attribute, string format_string, ...); - public virtual GLib.Variant get_item_attribute_value (int item_index, string attribute, GLib.VariantType? expected_type); - [NoWrapper] - public virtual void get_item_attributes (int item_index, [CCode (type = "GHashTable**")] out GLib.HashTable? attributes); - public virtual GLib.MenuModel get_item_link (int item_index, string link); - [NoWrapper] - public virtual void get_item_links (int item_index, out GLib.HashTable links); - public virtual int get_n_items (); - public virtual bool is_mutable (); - public virtual GLib.MenuAttributeIter iterate_item_attributes (int item_index); - public virtual GLib.MenuLinkIter iterate_item_links (int item_index); - [HasEmitter] - public signal void items_changed (int position, int removed, int added); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_mount_operation_get_type ()")] - public class MountOperation : GLib.Object { - [CCode (has_construct_function = false)] - public MountOperation (); - public bool get_anonymous (); - public int get_choice (); - public unowned string get_domain (); - [Version (since = "2.58")] - public bool get_is_tcrypt_hidden_volume (); - [Version (since = "2.58")] - public bool get_is_tcrypt_system_volume (); - public unowned string get_password (); - public GLib.PasswordSave get_password_save (); - [Version (since = "2.58")] - public uint get_pim (); - public unowned string get_username (); - public void set_anonymous (bool anonymous); - public void set_choice (int choice); - public void set_domain (string domain); - [Version (since = "2.58")] - public void set_is_tcrypt_hidden_volume (bool hidden_volume); - [Version (since = "2.58")] - public void set_is_tcrypt_system_volume (bool system_volume); - public void set_password (string password); - public void set_password_save (GLib.PasswordSave save); - [Version (since = "2.58")] - public void set_pim (uint pim); - public void set_username (string username); - public bool anonymous { get; set; } - public int choice { get; set; } - public string domain { get; set; } - [Version (since = "2.58")] - public bool is_tcrypt_hidden_volume { get; set; } - [Version (since = "2.58")] - public bool is_tcrypt_system_volume { get; set; } - public string password { get; set; } - public GLib.PasswordSave password_save { get; set; } - [Version (since = "2.58")] - public uint pim { get; set; } - public string username { get; set; } - [Version (since = "2.20")] - public virtual signal void aborted (); - public virtual signal void ask_password (string message, string default_user, string default_domain, GLib.AskPasswordFlags flags); - public virtual signal void ask_question (string message, [CCode (array_length = false, array_null_terminated = true)] string[] choices); - [HasEmitter] - public virtual signal void reply (GLib.MountOperationResult result); - [Version (since = "2.22")] - public virtual signal void show_processes (string message, GLib.Array processes, [CCode (array_length = false, array_null_terminated = true)] string[] choices); - [Version (since = "2.34")] - public virtual signal void show_unmount_progress (string message, int64 time_left, int64 bytes_left); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_native_socket_address_get_type ()")] - public class NativeSocketAddress : GLib.SocketAddress, GLib.SocketConnectable { - [CCode (has_construct_function = false, type = "GSocketAddress*")] - [Version (since = "2.46")] - public NativeSocketAddress (void* native, size_t len); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_native_volume_monitor_get_type ()")] - public abstract class NativeVolumeMonitor : GLib.VolumeMonitor { - [CCode (has_construct_function = false)] - protected NativeVolumeMonitor (); - [NoWrapper] - public abstract GLib.Mount get_mount_for_mount_path (string mount_path, GLib.Cancellable? cancellable = null); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_network_address_get_type ()")] - public class NetworkAddress : GLib.Object, GLib.SocketConnectable { - [CCode (has_construct_function = false, type = "GSocketConnectable*")] - [Version (since = "2.22")] - public NetworkAddress (string hostname, uint16 port); - [Version (since = "2.22")] - public unowned string get_hostname (); - [Version (since = "2.22")] - public uint16 get_port (); - [Version (since = "2.26")] - public unowned string get_scheme (); - [CCode (has_construct_function = false, type = "GSocketConnectable*")] - [Version (since = "2.44")] - public NetworkAddress.loopback (uint16 port); - [Version (since = "2.22")] - public static GLib.NetworkAddress parse (string host_and_port, uint16 default_port) throws GLib.Error; - [Version (since = "2.26")] - public static GLib.NetworkAddress parse_uri (string uri, uint16 default_port) throws GLib.Error; - public string hostname { get; construct; } - public uint port { get; construct; } - public string scheme { get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_network_service_get_type ()")] - public class NetworkService : GLib.Object, GLib.SocketConnectable { - [CCode (has_construct_function = false, type = "GSocketConnectable*")] - [Version (since = "2.22")] - public NetworkService (string service, string protocol, string domain); - [Version (since = "2.22")] - public unowned string get_domain (); - [Version (since = "2.22")] - public unowned string get_protocol (); - [Version (since = "2.26")] - public unowned string get_scheme (); - [Version (since = "2.22")] - public unowned string get_service (); - [Version (since = "2.26")] - public void set_scheme (string scheme); - public string domain { get; construct; } - public string protocol { get; construct; } - public string scheme { get; set; } - public string service { get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_notification_get_type ()")] - [Version (since = "2.40")] - public class Notification : GLib.Object { - [CCode (has_construct_function = false)] - public Notification (string title); - public void add_button (string label, string detailed_action); - public void add_button_with_target_value (string label, string action, GLib.Variant? target); - public void set_body (string? body); - public void set_default_action (string detailed_action); - public void set_default_action_and_target_value (string action, GLib.Variant? target); - public void set_icon (GLib.Icon icon); - public void set_priority (GLib.NotificationPriority priority); - public void set_title (string title); - [Version (deprecated = true, deprecated_since = "2.42", since = "2.40")] - public void set_urgent (bool urgent); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_output_stream_get_type ()")] - public abstract class OutputStream : GLib.Object { - [CCode (has_construct_function = false)] - protected OutputStream (); - public void clear_pending (); - [CCode (vfunc_name = "close_fn")] - public abstract bool close (GLib.Cancellable? cancellable = null) throws GLib.IOError; - public virtual async bool close_async (int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public virtual bool flush (GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async bool flush_async (int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool has_pending (); - public bool is_closed (); - [Version (since = "2.24")] - public bool is_closing (); - public bool set_pending () throws GLib.Error; - public virtual ssize_t splice (GLib.InputStream source, GLib.OutputStreamSpliceFlags flags, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public virtual async ssize_t splice_async (GLib.InputStream source, GLib.OutputStreamSpliceFlags flags, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.IOError; - [CCode (vfunc_name = "write_fn")] - public abstract ssize_t write ([CCode (array_length_cname = "count", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] buffer, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public bool write_all ([CCode (array_length_cname = "count", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] buffer, out size_t bytes_written, GLib.Cancellable? cancellable = null) throws GLib.IOError; - [Version (since = "2.44")] - public async bool write_all_async ([CCode (array_length_cname = "count", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] buffer, int io_priority, GLib.Cancellable? cancellable, out size_t bytes_written) throws GLib.Error; - public virtual async ssize_t write_async ([CCode (array_length_cname = "count", array_length_pos = 1.5, array_length_type = "gsize")] uint8[]? buffer, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public ssize_t write_bytes (GLib.Bytes bytes, GLib.Cancellable? cancellable = null) throws GLib.Error; - public async ssize_t write_bytes_async (GLib.Bytes bytes, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (vfunc_name = "writev_fn")] - [Version (since = "2.60")] - public virtual bool writev ([CCode (array_length_cname = "n_vectors", array_length_pos = 1.5, array_length_type = "gsize")] GLib.OutputVector[] vectors, out size_t bytes_written, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.60")] - public bool writev_all ([CCode (array_length_cname = "n_vectors", array_length_pos = 1.5, array_length_type = "gsize")] GLib.OutputVector[] vectors, out size_t bytes_written, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.60")] - public async bool writev_all_async ([CCode (array_length_cname = "n_vectors", array_length_pos = 1.5, array_length_type = "gsize")] GLib.OutputVector[] vectors, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null, out size_t bytes_written) throws GLib.Error; - [Version (since = "2.60")] - public virtual async bool writev_async ([CCode (array_length_cname = "n_vectors", array_length_pos = 1.5, array_length_type = "gsize")] GLib.OutputVector[] vectors, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null, out size_t bytes_written) throws GLib.Error; - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_permission_get_type ()")] - public abstract class Permission : GLib.Object { - [CCode (has_construct_function = false)] - protected Permission (); - [Version (since = "2.26")] - public virtual bool acquire (GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.26")] - public virtual async bool acquire_async (GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.26")] - public bool get_allowed (); - [Version (since = "2.26")] - public bool get_can_acquire (); - [Version (since = "2.26")] - public bool get_can_release (); - [Version (since = "2.26")] - public void impl_update (bool allowed, bool can_acquire, bool can_release); - [Version (since = "2.26")] - public virtual bool release (GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.26")] - public virtual async bool release_async (GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool allowed { get; } - public bool can_acquire { get; } - public bool can_release { get; } - } - [CCode (cheader_filename = "gio/gio.h", cname = "GSource", ref_function = "g_source_ref", unref_function = "g_source_unref")] - [Compact] - public class PollableSource : GLib.Source { - [CCode (cheader_filename = "gio/gio.h", has_construct_function = false)] - [Version (since = "2.28")] - public PollableSource (GLib.Object pollable_stream); - [CCode (cheader_filename = "gio/gio.h", has_construct_function = false)] - [Version (since = "2.34")] - public PollableSource.full (GLib.Object pollable_stream, GLib.Source? child_source = null, GLib.Cancellable? cancellable = null); - [CCode (cname = "g_source_set_callback")] - public void set_callback ([CCode (type = "GSourceFunc")] owned GLib.PollableSourceFunc func); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_property_action_get_type ()")] - [Version (since = "2.38")] - public class PropertyAction : GLib.Object, GLib.Action { - [CCode (has_construct_function = false)] - public PropertyAction (string name, GLib.Object object, string property_name); - [NoAccessorMethod] - [Version (since = "2.46")] - public bool invert_boolean { get; construct; } - [NoAccessorMethod] - public GLib.Object object { construct; } - [NoAccessorMethod] - public string property_name { construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_proxy_address_get_type ()")] - [Version (since = "2.26")] - public class ProxyAddress : GLib.InetSocketAddress, GLib.SocketConnectable { - [CCode (has_construct_function = false, type = "GSocketAddress*")] - public ProxyAddress (GLib.InetAddress inetaddr, uint16 port, string protocol, string dest_hostname, uint16 dest_port, string? username, string? password); - public unowned string get_destination_hostname (); - public uint16 get_destination_port (); - [Version (since = "2.34")] - public unowned string get_destination_protocol (); - public unowned string get_password (); - public unowned string get_protocol (); - [Version (since = "2.34")] - public unowned string get_uri (); - public unowned string get_username (); - public string destination_hostname { get; construct; } - public uint destination_port { get; construct; } - [Version (since = "2.34")] - public string destination_protocol { get; construct; } - public string password { get; construct; } - public string protocol { get; construct; } - [Version (since = "2.34")] - public string uri { get; construct; } - public string username { get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_proxy_address_enumerator_get_type ()")] - public class ProxyAddressEnumerator : GLib.SocketAddressEnumerator { - [CCode (has_construct_function = false)] - protected ProxyAddressEnumerator (); - [NoAccessorMethod] - public GLib.SocketConnectable connectable { owned get; construct; } - [NoAccessorMethod] - [Version (since = "2.38")] - public uint default_port { get; construct; } - [NoAccessorMethod] - [Version (since = "2.36")] - public GLib.ProxyResolver proxy_resolver { owned get; set construct; } - [NoAccessorMethod] - public string uri { owned get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_resolver_get_type ()")] - public abstract class Resolver : GLib.Object { - [CCode (has_construct_function = false)] - protected Resolver (); - [Version (since = "2.22")] - public static GLib.Resolver get_default (); - [Version (since = "2.22")] - public virtual string lookup_by_address (GLib.InetAddress address, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.22")] - public virtual async string lookup_by_address_async (GLib.InetAddress address, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.22")] - public virtual GLib.List lookup_by_name (string hostname, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.22")] - public virtual async GLib.List lookup_by_name_async (string hostname, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.60")] - public virtual GLib.List lookup_by_name_with_flags (string hostname, GLib.ResolverNameLookupFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.60")] - public virtual async GLib.List lookup_by_name_with_flags_async (string hostname, GLib.ResolverNameLookupFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.34")] - public virtual GLib.List lookup_records (string rrname, GLib.ResolverRecordType record_type, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.34")] - public virtual async GLib.List lookup_records_async (string rrname, GLib.ResolverRecordType record_type, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.22")] - public virtual GLib.List lookup_service (string service, string protocol, string domain, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (finish_vfunc_name = "lookup_service_finish", vfunc_name = "lookup_service_async")] - public virtual async GLib.List lookup_service_async (string rrname, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.22")] - public void set_default (); - public virtual signal void reload (); - } - [CCode (cheader_filename = "gio/gio.h", ref_function = "g_resource_ref", type_id = "g_resource_get_type ()", unref_function = "g_resource_unref")] - [Compact] - [Version (since = "2.32")] - public class Resource { - [CCode (cname = "g_resources_register")] - public void _register (); - [CCode (cname = "g_resources_unregister")] - public void _unregister (); - [CCode (array_length = false, array_null_terminated = true)] - public string[] enumerate_children (string path, GLib.ResourceLookupFlags lookup_flags) throws GLib.Error; - [CCode (has_construct_function = false)] - public Resource.from_data (GLib.Bytes data) throws GLib.Error; - public bool get_info (string path, GLib.ResourceLookupFlags lookup_flags, out size_t size, out uint32 flags) throws GLib.Error; - [CCode (cheader_filename = "gio/gio.h")] - public static GLib.Resource load (string filename) throws GLib.Error; - public GLib.Bytes lookup_data (string path, GLib.ResourceLookupFlags lookup_flags) throws GLib.Error; - public GLib.InputStream open_stream (string path, GLib.ResourceLookupFlags lookup_flags) throws GLib.Error; - public unowned GLib.Resource @ref (); - public void unref (); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_settings_get_type ()")] - public class Settings : GLib.Object { - [CCode (has_construct_function = false)] - [Version (since = "2.26")] - public Settings (string schema_id); - public void apply (); - [Version (since = "2.26")] - public void bind (string key, GLib.Object object, string property, GLib.SettingsBindFlags flags); - public void bind_with_mapping (string key, GLib.Object object, string property, GLib.SettingsBindFlags flags, GLib.SettingsBindGetMappingShared get_mapping, GLib.SettingsBindSetMappingShared set_mapping, void* user_data, GLib.DestroyNotify? notify); - [Version (since = "2.26")] - public void bind_writable (string key, GLib.Object object, string property, bool inverted); - [Version (since = "2.32")] - public GLib.Action create_action (string key); - [Version (since = "2.26")] - public void delay (); - [CCode (has_construct_function = false)] - [Version (since = "2.32")] - public Settings.full (GLib.SettingsSchema schema, GLib.SettingsBackend? backend, string? path); - [CCode (sentinel = "")] - [Version (since = "2.26")] - public void @get (string key, string format, ...); - [Version (since = "2.26")] - public bool get_boolean (string key); - [Version (since = "2.26")] - public GLib.Settings get_child (string name); - [Version (since = "2.40")] - public GLib.Variant? get_default_value (string key); - [Version (since = "2.26")] - public double get_double (string key); - [Version (since = "2.26")] - public int get_enum (string key); - [Version (since = "2.26")] - public uint get_flags (string key); - [Version (since = "2.26")] - public bool get_has_unapplied (); - [Version (since = "2.26")] - public int get_int (string key); - [Version (since = "2.50")] - public int64 get_int64 (string key); - public void* get_mapped (string key, GLib.SettingsGetMapping mapping); - [Version (deprecated = true, deprecated_since = "2.40", since = "2.28")] - public GLib.Variant get_range (string key); - [Version (since = "2.26")] - public string get_string (string key); - [CCode (array_length = false, array_null_terminated = true)] - [Version (since = "2.26")] - public string[] get_strv (string key); - [Version (since = "2.30")] - public uint get_uint (string key); - [Version (since = "2.50")] - public uint64 get_uint64 (string key); - [Version (since = "2.40")] - public GLib.Variant? get_user_value (string key); - [Version (since = "2.26")] - public GLib.Variant get_value (string key); - [Version (since = "2.26")] - public bool is_writable (string name); - [CCode (array_length = false, array_null_terminated = true)] - public string[] list_children (); - [CCode (array_length = false, array_null_terminated = true)] - [Version (deprecated = true, deprecated_since = "2.46")] - public string[] list_keys (); - [CCode (array_length = false, array_null_terminated = true)] - [Version (deprecated = true, deprecated_since = "2.40", since = "2.28")] - public static unowned string[] list_relocatable_schemas (); - [CCode (array_length = false, array_null_terminated = true)] - [Version (deprecated = true, deprecated_since = "2.40", since = "2.26")] - public static unowned string[] list_schemas (); - [Version (deprecated = true, deprecated_since = "2.40", since = "2.28")] - public bool range_check (string key, GLib.Variant value); - public void reset (string key); - public void revert (); - [CCode (sentinel = "")] - [Version (since = "2.26")] - public bool @set (string key, string format, ...); - [Version (since = "2.26")] - public bool set_boolean (string key, bool value); - [Version (since = "2.26")] - public bool set_double (string key, double value); - public bool set_enum (string key, int value); - public bool set_flags (string key, uint value); - [Version (since = "2.26")] - public bool set_int (string key, int value); - [Version (since = "2.50")] - public bool set_int64 (string key, int64 value); - [Version (since = "2.26")] - public bool set_string (string key, string value); - [Version (since = "2.26")] - public bool set_strv (string key, [CCode (array_length = false, array_null_terminated = true)] string[]? value); - [Version (since = "2.30")] - public bool set_uint (string key, uint value); - [Version (since = "2.50")] - public bool set_uint64 (string key, uint64 value); - [Version (since = "2.26")] - public bool set_value (string key, GLib.Variant value); - public static void sync (); - [Version (since = "2.26")] - public static void unbind (GLib.Object object, string property); - [CCode (has_construct_function = false)] - [Version (since = "2.26")] - public Settings.with_backend (string schema_id, GLib.SettingsBackend backend); - [CCode (has_construct_function = false)] - [Version (since = "2.26")] - public Settings.with_backend_and_path (string schema_id, GLib.SettingsBackend backend, string path); - [CCode (has_construct_function = false)] - [Version (since = "2.26")] - public Settings.with_path (string schema_id, string path); - [NoAccessorMethod] - public GLib.SettingsBackend backend { owned get; construct; } - [NoAccessorMethod] - [Version (since = "2.28")] - public bool delay_apply { get; } - public bool has_unapplied { get; } - [NoAccessorMethod] - public string path { owned get; construct; } - [NoAccessorMethod] - [Version (deprecated = true, deprecated_since = "2.32")] - public string schema { owned get; construct; } - [NoAccessorMethod] - public string schema_id { owned get; construct; } - [NoAccessorMethod] - public GLib.SettingsSchema settings_schema { owned get; construct; } - public virtual signal bool change_event ([CCode (array_length_cname = "n_keys", array_length_pos = 1.1)] GLib.Quark[]? keys); - public virtual signal void changed (string key); - public virtual signal bool writable_change_event (uint key); - public virtual signal void writable_changed (string key); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_settings_backend_get_type ()")] - public abstract class SettingsBackend : GLib.Object { - [CCode (has_construct_function = false)] - protected SettingsBackend (); - [CCode (cheader_filename = "gio/gsettingsbackend.h", feature_test_macro = "G_SETTINGS_ENABLE_BACKEND")] - [Version (since = "2.26")] - public void changed (string key, void* origin_tag); - [CCode (cheader_filename = "gio/gsettingsbackend.h", feature_test_macro = "G_SETTINGS_ENABLE_BACKEND")] - [Version (since = "2.26")] - public void changed_tree (GLib.Tree tree, void* origin_tag); - [CCode (cheader_filename = "gio/gsettingsbackend.h", feature_test_macro = "G_SETTINGS_ENABLE_BACKEND")] - [Version (since = "2.26")] - public static void flatten_tree (GLib.Tree tree, out string path, [CCode (array_length = false, array_null_terminated = true)] out (unowned string)[] keys, [CCode (array_length = false, array_null_terminated = true)] out (unowned GLib.Variant)[] values); - [CCode (cheader_filename = "gio/gsettingsbackend.h", feature_test_macro = "G_SETTINGS_ENABLE_BACKEND")] - [Version (since = "2.28")] - public static GLib.SettingsBackend get_default (); - [CCode (cheader_filename = "gio/gsettingsbackend.h", feature_test_macro = "G_SETTINGS_ENABLE_BACKEND")] - [NoWrapper] - public virtual bool get_writable (string key); - [CCode (cheader_filename = "gio/gsettingsbackend.h", cname = "g_keyfile_settings_backend_new", feature_test_macro = "G_SETTINGS_ENABLE_BACKEND")] - public static GLib.SettingsBackend keyfile_settings_backend_new (string filename, string root_path, string? root_group); - [CCode (cheader_filename = "gio/gsettingsbackend.h", feature_test_macro = "G_SETTINGS_ENABLE_BACKEND")] - [Version (since = "2.26")] - public void keys_changed (string path, [CCode (array_length = false, array_null_terminated = true)] string[] items, void* origin_tag); - [CCode (cheader_filename = "gio/gsettingsbackend.h", cname = "g_memory_settings_backend_new", feature_test_macro = "G_SETTINGS_ENABLE_BACKEND")] - [Version (since = "2.28")] - public static GLib.SettingsBackend memory_settings_backend_new (); - [CCode (cheader_filename = "gio/gsettingsbackend.h", cname = "g_null_settings_backend_new", feature_test_macro = "G_SETTINGS_ENABLE_BACKEND")] - [Version (since = "2.28")] - public static GLib.SettingsBackend null_settings_backend_new (); - [CCode (cheader_filename = "gio/gsettingsbackend.h", feature_test_macro = "G_SETTINGS_ENABLE_BACKEND")] - [Version (since = "2.26")] - public void path_changed (string path, void* origin_tag); - [CCode (cheader_filename = "gio/gsettingsbackend.h", feature_test_macro = "G_SETTINGS_ENABLE_BACKEND")] - [Version (since = "2.26")] - public void path_writable_changed (string path); - [CCode (cheader_filename = "gio/gsettingsbackend.h", feature_test_macro = "G_SETTINGS_ENABLE_BACKEND")] - [NoWrapper] - public virtual GLib.Variant read (string key, GLib.VariantType expected_type, bool default_value); - [CCode (cheader_filename = "gio/gsettingsbackend.h", feature_test_macro = "G_SETTINGS_ENABLE_BACKEND")] - [NoWrapper] - public virtual GLib.Variant read_user_value (string key, GLib.VariantType expected_type); - [CCode (cheader_filename = "gio/gsettingsbackend.h", feature_test_macro = "G_SETTINGS_ENABLE_BACKEND")] - [NoWrapper] - public virtual void reset (string key, void* origin_tag); - [CCode (cheader_filename = "gio/gsettingsbackend.h", feature_test_macro = "G_SETTINGS_ENABLE_BACKEND")] - [NoWrapper] - public virtual void subscribe (string name); - [CCode (cheader_filename = "gio/gsettingsbackend.h", feature_test_macro = "G_SETTINGS_ENABLE_BACKEND")] - [NoWrapper] - public virtual void sync (); - [CCode (cheader_filename = "gio/gsettingsbackend.h", feature_test_macro = "G_SETTINGS_ENABLE_BACKEND")] - [NoWrapper] - public virtual void unsubscribe (string name); - [CCode (cheader_filename = "gio/gsettingsbackend.h", feature_test_macro = "G_SETTINGS_ENABLE_BACKEND")] - [Version (since = "2.26")] - public void writable_changed (string key); - [CCode (cheader_filename = "gio/gsettingsbackend.h", feature_test_macro = "G_SETTINGS_ENABLE_BACKEND")] - [NoWrapper] - public virtual bool write (string key, GLib.Variant value, void* origin_tag); - [CCode (cheader_filename = "gio/gsettingsbackend.h", feature_test_macro = "G_SETTINGS_ENABLE_BACKEND")] - [NoWrapper] - public virtual bool write_tree (GLib.Tree tree, void* origin_tag); - } - [CCode (cheader_filename = "gio/gio.h", ref_function = "g_settings_schema_ref", type_id = "g_settings_schema_get_type ()", unref_function = "g_settings_schema_unref")] - [Compact] - [Version (since = "2.32")] - public class SettingsSchema { - public unowned string get_id (); - [Version (since = "2.40")] - public GLib.SettingsSchemaKey get_key (string name); - public unowned string get_path (); - [Version (since = "2.40")] - public bool has_key (string name); - [CCode (array_length = false, array_null_terminated = true)] - [Version (since = "2.44")] - public string[] list_children (); - [CCode (array_length = false, array_null_terminated = true)] - [Version (since = "2.46")] - public string[] list_keys (); - public unowned GLib.SettingsSchema @ref (); - public void unref (); - } - [CCode (cheader_filename = "gio/gio.h", ref_function = "g_settings_schema_key_ref", type_id = "g_settings_schema_key_get_type ()", unref_function = "g_settings_schema_key_unref")] - [Compact] - public class SettingsSchemaKey { - [Version (since = "2.40")] - public GLib.Variant get_default_value (); - [Version (since = "2.34")] - public unowned string get_description (); - [Version (since = "2.44")] - public unowned string get_name (); - [Version (since = "2.40")] - public GLib.Variant get_range (); - [Version (since = "2.34")] - public unowned string get_summary (); - [Version (since = "2.40")] - public unowned GLib.VariantType get_value_type (); - [Version (since = "2.40")] - public bool range_check (GLib.Variant value); - [Version (since = "2.40")] - public unowned GLib.SettingsSchemaKey @ref (); - [Version (since = "2.40")] - public void unref (); - } - [CCode (cheader_filename = "gio/gio.h", ref_function = "g_settings_schema_source_ref", type_id = "g_settings_schema_source_get_type ()", unref_function = "g_settings_schema_source_unref")] - [Compact] - [Version (since = "2.32")] - public class SettingsSchemaSource { - [CCode (has_construct_function = false)] - public SettingsSchemaSource.from_directory (string directory, GLib.SettingsSchemaSource? parent, bool trusted) throws GLib.Error; - [CCode (cheader_filename = "gio/gio.h")] - public static unowned GLib.SettingsSchemaSource? get_default (); - [Version (since = "2.40")] - public void list_schemas (bool recursive, [CCode (array_length = false, array_null_terminated = true)] out string[] non_relocatable, [CCode (array_length = false, array_null_terminated = true)] out string[] relocatable); - public GLib.SettingsSchema? lookup (string schema_id, bool recursive); - public unowned GLib.SettingsSchemaSource @ref (); - public void unref (); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_simple_action_get_type ()")] - public class SimpleAction : GLib.Object, GLib.Action { - [CCode (has_construct_function = false)] - [Version (since = "2.28")] - public SimpleAction (string name, GLib.VariantType? parameter_type); - [Version (since = "2.28")] - public void set_enabled (bool enabled); - [Version (since = "2.30")] - public void set_state (GLib.Variant value); - [Version (since = "2.44")] - public void set_state_hint (GLib.Variant? state_hint); - [CCode (has_construct_function = false)] - [Version (since = "2.28")] - public SimpleAction.stateful (string name, GLib.VariantType? parameter_type, GLib.Variant state); - [Version (since = "2.28")] - public signal void activate (GLib.Variant? parameter); - [Version (since = "2.30")] - public signal void change_state (GLib.Variant? value); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_simple_action_group_get_type ()")] - [Version (since = "2.28")] - public class SimpleActionGroup : GLib.Object, GLib.ActionGroup, GLib.ActionMap { - [CCode (has_construct_function = false)] - public SimpleActionGroup (); - [Version (deprecated = true, deprecated_since = "2.38", since = "2.30")] - public void add_entries ([CCode (array_length_cname = "n_entries", array_length_pos = 1.5)] GLib.ActionEntry[] entries, void* user_data); - [Version (deprecated = true, deprecated_since = "2.38", since = "2.28")] - public void insert (GLib.Action action); - [Version (deprecated = true, deprecated_since = "2.38", since = "2.28")] - public unowned GLib.Action lookup (string action_name); - [Version (deprecated = true, deprecated_since = "2.38", since = "2.28")] - public void remove (string action_name); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_simple_async_result_get_type ()")] - public class SimpleAsyncResult : GLib.Object, GLib.AsyncResult { - [CCode (has_construct_function = false)] - public SimpleAsyncResult (GLib.Object? source_object, void* source_tag); - [Version (deprecated = true, deprecated_since = "2.46")] - public void complete (); - [Version (deprecated = true, deprecated_since = "2.46")] - public void complete_in_idle (); - [CCode (has_construct_function = false)] - [PrintfFormat] - public SimpleAsyncResult.error (GLib.Object? source_object, GLib.Quark domain, int code, string format, ...); - [CCode (has_construct_function = false)] - public SimpleAsyncResult.from_error (GLib.Object? source_object, GLib.Error error); - [Version (deprecated = true, deprecated_since = "2.46")] - public bool get_op_res_gboolean (); - [CCode (simple_generics = true)] - public unowned T get_op_res_gpointer (); - [Version (deprecated = true, deprecated_since = "2.46")] - public ssize_t get_op_res_gssize (); - [Version (deprecated = true, deprecated_since = "2.46.")] - public void* get_source_tag (); - [Version (deprecated = true, deprecated_since = "2.46", since = "2.20")] - public static bool is_valid (GLib.AsyncResult result, GLib.Object? source, void* source_tag); - [Version (deprecated = true, deprecated_since = "2.46")] - public bool propagate_error () throws GLib.Error; - [CCode (cheader_filename = "gio/gio.h", cname = "g_simple_async_report_gerror_in_idle")] - [Version (deprecated = true, deprecated_since = "2.46")] - public static async void report_gerror_in_idle (GLib.Object? object, GLib.Error error); - [Version (deprecated = true, deprecated_since = "2.46")] - public void run_in_thread (GLib.SimpleAsyncThreadFunc func, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null); - [Version (deprecated = true, deprecated_since = "2.46", since = "2.32")] - public void set_check_cancellable (GLib.Cancellable? check_cancellable); - [PrintfFormat] - [Version (deprecated = true, deprecated_since = "2.46")] - public void set_error (GLib.Quark domain, int code, string format, ...); - [Version (deprecated = true, deprecated_since = "2.46")] - public void set_error_va (GLib.Quark domain, int code, string format, va_list args); - [Version (deprecated = true, deprecated_since = "2.46")] - public void set_from_error (GLib.Error error); - [Version (deprecated = true, deprecated_since = "2.46")] - public void set_handle_cancellation (bool handle_cancellation); - [Version (deprecated = true, deprecated_since = "2.46")] - public void set_op_res_gboolean (bool op_res); - [CCode (simple_generics = true)] - public void set_op_res_gpointer (owned T op_res); - [Version (deprecated = true, deprecated_since = "2.46")] - public void set_op_res_gssize (ssize_t op_res); - [Version (deprecated = true, deprecated_since = "2.46", since = "2.28")] - public void take_error (GLib.Error error); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_simple_io_stream_get_type ()")] - [Version (since = "2.44")] - public class SimpleIOStream : GLib.IOStream { - [CCode (has_construct_function = false, type = "GIOStream*")] - public SimpleIOStream (GLib.InputStream input_stream, GLib.OutputStream output_stream); - [NoAccessorMethod] - public GLib.InputStream input_stream { owned get; construct; } - [NoAccessorMethod] - public GLib.OutputStream output_stream { owned get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_simple_permission_get_type ()")] - public class SimplePermission : GLib.Permission { - [CCode (has_construct_function = false, type = "GPermission*")] - [Version (since = "2.26")] - public SimplePermission (bool allowed); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_simple_proxy_resolver_get_type ()")] - [Version (since = "2.36")] - public class SimpleProxyResolver : GLib.Object, GLib.ProxyResolver { - [CCode (has_construct_function = false, type = "GProxyResolver*")] - public SimpleProxyResolver (string? default_proxy, string? ignore_hosts); - public void set_default_proxy (string default_proxy); - public void set_ignore_hosts (string ignore_hosts); - public void set_uri_proxy (string uri_scheme, string proxy); - [NoAccessorMethod] - public string default_proxy { owned get; set; } - [CCode (array_length = false, array_null_terminated = true)] - [NoAccessorMethod] - public string[] ignore_hosts { owned get; set; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_socket_get_type ()")] - [Version (since = "2.22")] - public class Socket : GLib.Object, GLib.DatagramBased, GLib.Initable { - [CCode (has_construct_function = false)] - public Socket (GLib.SocketFamily family, GLib.SocketType type, GLib.SocketProtocol protocol) throws GLib.Error; - public GLib.Socket accept (GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool bind (GLib.SocketAddress address, bool allow_reuse) throws GLib.Error; - public bool check_connect_result () throws GLib.Error; - public bool close () throws GLib.Error; - public GLib.IOCondition condition_check (GLib.IOCondition condition); - [Version (since = "2.32")] - public bool condition_timed_wait (GLib.IOCondition condition, int64 timeout_us, GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool condition_wait (GLib.IOCondition condition, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public bool connect (GLib.SocketAddress address, GLib.Cancellable? cancellable = null) throws GLib.Error; - public GLib.SocketSource create_source (GLib.IOCondition condition, GLib.Cancellable? cancellable = null); - [CCode (has_construct_function = false)] - public Socket.from_fd (int fd) throws GLib.Error; - [Version (since = "2.32")] - public ssize_t get_available_bytes (); - public bool get_blocking (); - [Version (since = "2.32")] - public bool get_broadcast (); - [Version (since = "2.26")] - public GLib.Credentials get_credentials () throws GLib.Error; - public GLib.SocketFamily get_family (); - public int get_fd (); - public bool get_keepalive (); - public int get_listen_backlog (); - public GLib.SocketAddress get_local_address () throws GLib.Error; - [Version (since = "2.32")] - public bool get_multicast_loopback (); - [Version (since = "2.32")] - public uint get_multicast_ttl (); - [Version (since = "2.36")] - public bool get_option (int level, int optname, out int value) throws GLib.Error; - public GLib.SocketProtocol get_protocol (); - public GLib.SocketAddress get_remote_address () throws GLib.Error; - public GLib.SocketType get_socket_type (); - [Version (since = "2.26")] - public uint get_timeout (); - [Version (since = "2.32")] - public uint get_ttl (); - public bool is_closed (); - public bool is_connected (); - [Version (since = "2.32")] - public bool join_multicast_group (GLib.InetAddress group, bool source_specific, string? iface) throws GLib.Error; - [Version (since = "2.56")] - public bool join_multicast_group_ssm (GLib.InetAddress group, GLib.InetAddress? source_specific, string? iface) throws GLib.Error; - [Version (since = "2.32")] - public bool leave_multicast_group (GLib.InetAddress group, bool source_specific, string? iface) throws GLib.Error; - [Version (since = "2.56")] - public bool leave_multicast_group_ssm (GLib.InetAddress group, GLib.InetAddress? source_specific, string? iface) throws GLib.Error; - public bool listen () throws GLib.Error; - public ssize_t receive ([CCode (array_length_cname = "size", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] buffer, GLib.Cancellable? cancellable = null) throws GLib.Error; - public ssize_t receive_from (out GLib.SocketAddress address, [CCode (array_length_cname = "size", array_length_pos = 2.5, array_length_type = "gsize")] uint8[] buffer, GLib.Cancellable? cancellable = null) throws GLib.Error; - public ssize_t receive_message (out GLib.SocketAddress? address, [CCode (array_length_cname = "num_vectors", array_length_pos = 2.5)] GLib.InputVector[] vectors, [CCode (array_length_cname = "num_messages", array_length_pos = 3.5)] out GLib.SocketControlMessage[]? messages, ref int flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.48")] - public int receive_messages ([CCode (array_length_cname = "num_messages", array_length_pos = 1.5, array_length_type = "guint")] GLib.InputMessage[] messages, int flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.26")] - public ssize_t receive_with_blocking ([CCode (array_length_cname = "size", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] buffer, bool blocking, GLib.Cancellable? cancellable = null) throws GLib.Error; - public ssize_t send ([CCode (array_length_cname = "size", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] buffer, GLib.Cancellable? cancellable = null) throws GLib.Error; - public ssize_t send_message (GLib.SocketAddress? address, [CCode (array_length_cname = "num_vectors", array_length_pos = 2.5)] GLib.OutputVector[] vectors, [CCode (array_length_cname = "num_messages", array_length_pos = 3.5)] GLib.SocketControlMessage[]? messages, int flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.60")] - public GLib.PollableReturn send_message_with_timeout (GLib.SocketAddress? address, [CCode (array_length_cname = "num_vectors", array_length_pos = 2.5)] GLib.OutputVector[] vectors, [CCode (array_length_cname = "num_messages", array_length_pos = 3.5)] GLib.SocketControlMessage[]? messages, int flags, int64 timeout_us, out size_t bytes_written, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.44")] - public int send_messages ([CCode (array_length_cname = "num_messages", array_length_pos = 1.5, array_length_type = "guint")] GLib.OutputMessage[] messages, int flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public ssize_t send_to (GLib.SocketAddress? address, [CCode (array_length_cname = "size", array_length_pos = 2.5, array_length_type = "gsize")] uint8[] buffer, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.26")] - public ssize_t send_with_blocking ([CCode (array_length_cname = "size", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] buffer, bool blocking, GLib.Cancellable? cancellable = null) throws GLib.Error; - public void set_blocking (bool blocking); - [Version (since = "2.32")] - public void set_broadcast (bool broadcast); - public void set_keepalive (bool keepalive); - public void set_listen_backlog (int backlog); - [Version (since = "2.32")] - public void set_multicast_loopback (bool loopback); - [Version (since = "2.32")] - public void set_multicast_ttl (uint ttl); - [Version (since = "2.36")] - public bool set_option (int level, int optname, int value) throws GLib.Error; - [Version (since = "2.26")] - public void set_timeout (uint timeout); - [Version (since = "2.32")] - public void set_ttl (uint ttl); - public bool shutdown (bool shutdown_read, bool shutdown_write) throws GLib.Error; - public bool speaks_ipv4 (); - public bool blocking { get; set; } - [Version (since = "2.32")] - public bool broadcast { get; set; } - public GLib.SocketFamily family { get; construct; } - public int fd { get; construct; } - public bool keepalive { get; set; } - public int listen_backlog { get; set; } - [NoAccessorMethod] - public GLib.SocketAddress local_address { owned get; } - [Version (since = "2.32")] - public bool multicast_loopback { get; set; } - [Version (since = "2.32")] - public uint multicast_ttl { get; set; } - public GLib.SocketProtocol protocol { get; construct; } - [NoAccessorMethod] - public GLib.SocketAddress remote_address { owned get; } - [Version (since = "2.26")] - public uint timeout { get; set; } - [Version (since = "2.32")] - public uint ttl { get; set; } - [NoAccessorMethod] - public GLib.SocketType type { get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_socket_address_get_type ()")] - public abstract class SocketAddress : GLib.Object, GLib.SocketConnectable { - [CCode (has_construct_function = false)] - protected SocketAddress (); - [CCode (cname = "g_socket_address_new_from_native")] - [Version (since = "2.22")] - public static GLib.SocketAddress? from_native (void* native, size_t len); - [Version (since = "2.22")] - public virtual GLib.SocketFamily get_family (); - [Version (since = "2.22")] - public virtual ssize_t get_native_size (); - [Version (since = "2.22")] - public virtual bool to_native (void* dest, size_t destlen) throws GLib.Error; - public GLib.SocketFamily family { get; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_socket_address_enumerator_get_type ()")] - public abstract class SocketAddressEnumerator : GLib.Object { - [CCode (has_construct_function = false)] - protected SocketAddressEnumerator (); - public virtual GLib.SocketAddress next (GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async GLib.SocketAddress next_async (GLib.Cancellable? cancellable = null) throws GLib.Error; - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_socket_client_get_type ()")] - [Version (since = "2.22")] - public class SocketClient : GLib.Object { - [CCode (has_construct_function = false)] - public SocketClient (); - public void add_application_proxy (string protocol); - public GLib.SocketConnection connect (GLib.SocketConnectable connectable, GLib.Cancellable? cancellable = null) throws GLib.Error; - public async GLib.SocketConnection connect_async (GLib.SocketConnectable connectable, GLib.Cancellable? cancellable = null) throws GLib.Error; - public GLib.SocketConnection connect_to_host (string host_and_port, uint16 default_port, GLib.Cancellable? cancellable = null) throws GLib.Error; - public async GLib.SocketConnection connect_to_host_async (string host_and_port, uint16 default_port, GLib.Cancellable? cancellable = null) throws GLib.Error; - public GLib.SocketConnection connect_to_service (string domain, string service, GLib.Cancellable? cancellable = null) throws GLib.Error; - public async GLib.SocketConnection connect_to_service_async (string domain, string service, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.26")] - public GLib.SocketConnection connect_to_uri (string uri, uint16 default_port, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.26")] - public async GLib.SocketConnection connect_to_uri_async (string uri, uint16 default_port, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.26")] - public bool get_enable_proxy (); - public GLib.SocketFamily get_family (); - public unowned GLib.SocketAddress get_local_address (); - public GLib.SocketProtocol get_protocol (); - [Version (since = "2.36")] - public unowned GLib.ProxyResolver get_proxy_resolver (); - public GLib.SocketType get_socket_type (); - [Version (since = "2.26")] - public uint get_timeout (); - [Version (since = "2.28")] - public bool get_tls (); - [Version (since = "2.28")] - public GLib.TlsCertificateFlags get_tls_validation_flags (); - [Version (since = "2.26")] - public void set_enable_proxy (bool enable); - public void set_family (GLib.SocketFamily family); - public void set_local_address (GLib.SocketAddress? address); - public void set_protocol (GLib.SocketProtocol protocol); - [Version (since = "2.36")] - public void set_proxy_resolver (GLib.ProxyResolver? proxy_resolver); - public void set_socket_type (GLib.SocketType type); - [Version (since = "2.26")] - public void set_timeout (uint timeout); - [Version (since = "2.28")] - public void set_tls (bool tls); - [Version (since = "2.28")] - public void set_tls_validation_flags (GLib.TlsCertificateFlags flags); - public bool enable_proxy { get; set construct; } - public GLib.SocketFamily family { get; set construct; } - public GLib.SocketAddress local_address { get; set construct; } - public GLib.SocketProtocol protocol { get; set construct; } - [Version (since = "2.36")] - public GLib.ProxyResolver proxy_resolver { get; set construct; } - public uint timeout { get; set construct; } - public bool tls { get; set construct; } - public GLib.TlsCertificateFlags tls_validation_flags { get; set construct; } - [NoAccessorMethod] - public GLib.SocketType type { get; set construct; } - [Version (since = "2.32")] - public virtual signal void event (GLib.SocketClientEvent event, GLib.SocketConnectable connectable, GLib.IOStream? connection); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_socket_connection_get_type ()")] - [Version (since = "2.22")] - public class SocketConnection : GLib.IOStream { - [CCode (has_construct_function = false)] - protected SocketConnection (); - [Version (since = "2.32")] - public bool connect (GLib.SocketAddress address, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.32")] - public async bool connect_async (GLib.SocketAddress address, GLib.Cancellable? cancellable = null) throws GLib.Error; - public static GLib.SocketConnection factory_create_connection (GLib.Socket socket); - public static GLib.Type factory_lookup_type (GLib.SocketFamily family, GLib.SocketType type, int protocol_id); - public static void factory_register_type (GLib.Type g_type, GLib.SocketFamily family, GLib.SocketType type, int protocol); - public GLib.SocketAddress get_local_address () throws GLib.Error; - public GLib.SocketAddress get_remote_address () throws GLib.Error; - public unowned GLib.Socket get_socket (); - [Version (since = "2.32")] - public bool is_connected (); - public GLib.Socket socket { get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_socket_control_message_get_type ()")] - [Version (since = "2.22")] - public abstract class SocketControlMessage : GLib.Object { - [CCode (has_construct_function = false)] - protected SocketControlMessage (); - public static GLib.SocketControlMessage deserialize (int level, int type, [CCode (array_length_cname = "size", array_length_pos = 2.5, array_length_type = "gsize")] uint8[] data); - public virtual int get_level (); - public int get_msg_type (); - public virtual size_t get_size (); - [NoWrapper] - public virtual int get_type (); - public virtual void serialize ([CCode (array_length = false, type = "gpointer")] uint8[] data); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_socket_listener_get_type ()")] - [Version (since = "2.22")] - public class SocketListener : GLib.Object { - [CCode (has_construct_function = false)] - public SocketListener (); - public GLib.SocketConnection accept (out unowned GLib.Object? source_object = null, GLib.Cancellable? cancellable = null) throws GLib.Error; - public async GLib.SocketConnection accept_async (GLib.Cancellable? cancellable = null, out unowned GLib.Object? source_object = null) throws GLib.Error; - public GLib.Socket accept_socket (out unowned GLib.Object? source_object = null, GLib.Cancellable? cancellable = null) throws GLib.Error; - public async GLib.Socket accept_socket_async (GLib.Cancellable? cancellable = null, out unowned GLib.Object? source_object = null) throws GLib.Error; - public bool add_address (GLib.SocketAddress address, GLib.SocketType type, GLib.SocketProtocol protocol, GLib.Object? source_object, out GLib.SocketAddress effective_address) throws GLib.Error; - [Version (since = "2.24")] - public uint16 add_any_inet_port (GLib.Object? source_object) throws GLib.Error; - public bool add_inet_port (uint16 port, GLib.Object? source_object) throws GLib.Error; - public bool add_socket (GLib.Socket socket, GLib.Object? source_object) throws GLib.Error; - [NoWrapper] - public virtual void changed (); - public void close (); - public void set_backlog (int listen_backlog); - [NoAccessorMethod] - public int listen_backlog { get; set construct; } - [Version (since = "2.46")] - public virtual signal void event (GLib.SocketListenerEvent event, GLib.Socket socket); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_socket_service_get_type ()")] - [Version (since = "2.22")] - public class SocketService : GLib.SocketListener { - [CCode (has_construct_function = false)] - public SocketService (); - public bool is_active (); - public void start (); - public void stop (); - [NoAccessorMethod] - [Version (since = "2.46")] - public bool active { get; set construct; } - public virtual signal bool incoming (GLib.SocketConnection connection, GLib.Object? source_object); - } - [CCode (cheader_filename = "gio/gio.h", cname = "GSource", ref_function = "g_source_ref", unref_function = "g_source_unref")] - [Compact] - public class SocketSource : GLib.Source { - [CCode (cname = "g_source_set_callback")] - public void set_callback ([CCode (type = "GSourceFunc")] owned GLib.SocketSourceFunc func); - } - [CCode (cheader_filename = "gio/gio.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "g_srv_target_get_type ()")] - [Compact] - public class SrvTarget { - [CCode (has_construct_function = false)] - [Version (since = "2.22")] - public SrvTarget (string hostname, uint16 port, uint16 priority, uint16 weight); - [Version (since = "2.22")] - public GLib.SrvTarget copy (); - [Version (since = "2.22")] - public void free (); - [Version (since = "2.22")] - public unowned string get_hostname (); - [Version (since = "2.22")] - public uint16 get_port (); - [Version (since = "2.22")] - public uint16 get_priority (); - [Version (since = "2.22")] - public uint16 get_weight (); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.22")] - public static GLib.List list_sort (owned GLib.List targets); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_subprocess_get_type ()")] - [Version (since = "2.40")] - public class Subprocess : GLib.Object, GLib.Initable { - [CCode (has_construct_function = false)] - public Subprocess (GLib.SubprocessFlags flags, ...) throws GLib.Error; - public bool communicate (GLib.Bytes? stdin_buf, GLib.Cancellable? cancellable, out GLib.Bytes? stdout_buf, out GLib.Bytes? stderr_buf) throws GLib.Error; - public async bool communicate_async (GLib.Bytes? stdin_buf, GLib.Cancellable? cancellable, out GLib.Bytes? stdout_buf, out GLib.Bytes? stderr_buf) throws GLib.Error; - public bool communicate_utf8 (string? stdin_buf, GLib.Cancellable? cancellable, out string? stdout_buf, out string? stderr_buf) throws GLib.Error; - public async bool communicate_utf8_async (string? stdin_buf, GLib.Cancellable? cancellable, out string? stdout_buf, out string? stderr_buf) throws GLib.Error; - public void force_exit (); - public int get_exit_status (); - public unowned string? get_identifier (); - public bool get_if_exited (); - public bool get_if_signaled (); - public int get_status (); - public unowned GLib.InputStream get_stderr_pipe (); - public unowned GLib.OutputStream get_stdin_pipe (); - public unowned GLib.InputStream get_stdout_pipe (); - public bool get_successful (); - public int get_term_sig (); - [CCode (cname = "g_subprocess_newv", has_construct_function = false)] - public Subprocess.newv ([CCode (array_length = false, array_null_terminated = true)] string[] argv, GLib.SubprocessFlags flags) throws GLib.Error; - public void send_signal (int signal_num); - public bool wait (GLib.Cancellable? cancellable = null) throws GLib.Error; - public async bool wait_async (GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool wait_check (GLib.Cancellable? cancellable = null) throws GLib.Error; - public async bool wait_check_async (GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (array_length = false, array_null_terminated = true)] - [NoAccessorMethod] - public string[] argv { construct; } - [NoAccessorMethod] - public GLib.SubprocessFlags flags { construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_subprocess_launcher_get_type ()")] - [Version (since = "2.40")] - public class SubprocessLauncher : GLib.Object { - [CCode (has_construct_function = false)] - public SubprocessLauncher (GLib.SubprocessFlags flags); - public unowned string getenv (string variable); - public void set_child_setup (owned GLib.SpawnChildSetupFunc child_setup); - public void set_cwd (string cwd); - public void set_environ ([CCode (array_length = false, array_null_terminated = true)] string[] env); - public void set_flags (GLib.SubprocessFlags flags); - public void set_stderr_file_path (string? path); - public void set_stdin_file_path (string path); - public void set_stdout_file_path (string? path); - public void setenv (string variable, string value, bool overwrite); - public GLib.Subprocess spawnv ([CCode (array_length = false, array_null_terminated = true)] string[] argv) throws GLib.Error; - public void take_fd (int source_fd, int target_fd); - public void take_stderr_fd (int fd); - public void take_stdin_fd (int fd); - public void take_stdout_fd (int fd); - public void unsetenv (string variable); - [NoAccessorMethod] - public GLib.SubprocessFlags flags { construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_task_get_type ()")] - public class Task : GLib.Object, GLib.AsyncResult { - [CCode (has_construct_function = false)] - [Version (since = "2.36")] - public Task (GLib.Object? source_object, GLib.Cancellable? cancellable, [CCode (scope = "async")] GLib.TaskReadyCallback callback); - [Version (since = "2.36")] - public void attach_source (GLib.Source source, [CCode (type = "GSourceFunc")] GLib.TaskSourceFunc callback); - [Version (since = "2.36")] - public unowned GLib.Cancellable get_cancellable (); - [Version (since = "2.36")] - public bool get_check_cancellable (); - [Version (since = "2.44")] - public bool get_completed (); - [Version (since = "2.36")] - public unowned GLib.MainContext get_context (); - [Version (since = "2.60")] - public unowned string? get_name (); - [Version (since = "2.36")] - public int get_priority (); - [Version (since = "2.36")] - public bool get_return_on_cancel (); - [Version (since = "2.36")] - public void* get_source_tag (); - [Version (since = "2.36")] - public void* get_task_data (); - [CCode (cname = "g_task_get_source_object")] - [Version (since = "2.36")] - public unowned GLib.Object? get_unowned_source_object (); - [Version (since = "2.36")] - public bool had_error (); - [Version (since = "2.36")] - public static bool is_valid (GLib.AsyncResult result, GLib.Object? source_object); - [Version (since = "2.36")] - public bool propagate_boolean () throws GLib.Error; - [Version (since = "2.36")] - public ssize_t propagate_int () throws GLib.Error; - [Version (since = "2.36")] - public void* propagate_pointer () throws GLib.Error; - [Version (since = "2.64")] - public bool propagate_value (out GLib.Value value) throws GLib.Error; - [Version (since = "2.36")] - public static void report_error (GLib.Object? source_object, [CCode (scope = "async")] GLib.TaskReadyCallback callback, void* source_tag, owned GLib.Error error); - [PrintfFormat] - [Version (since = "2.36")] - public static void report_new_error (GLib.Object? source_object, [CCode (scope = "async")] GLib.TaskReadyCallback callback, void* source_tag, GLib.Quark domain, int code, string format, ...); - [Version (since = "2.36")] - public void return_boolean (bool result); - [Version (since = "2.36")] - public void return_error (owned GLib.Error error); - [Version (since = "2.36")] - public bool return_error_if_cancelled (); - [Version (since = "2.36")] - public void return_int (ssize_t result); - [PrintfFormat] - [Version (since = "2.36")] - public void return_new_error (GLib.Quark domain, int code, string format, ...); - [Version (since = "2.36")] - public void return_pointer (owned void* result, GLib.DestroyNotify? result_destroy); - [Version (since = "2.64")] - public void return_value (GLib.Value? result); - [Version (since = "2.36")] - public void run_in_thread ([CCode (scope = "async")] GLib.TaskThreadFunc task_func); - [Version (since = "2.36")] - public void run_in_thread_sync ([CCode (scope = "async")] GLib.TaskThreadFunc task_func); - [Version (since = "2.36")] - public void set_check_cancellable (bool check_cancellable); - [Version (since = "2.60")] - public void set_name (string? name); - [Version (since = "2.36")] - public void set_priority (int priority); - [Version (since = "2.36")] - public bool set_return_on_cancel (bool return_on_cancel); - [Version (since = "2.36")] - public void set_source_tag (void* source_tag); - [Version (since = "2.36")] - public void set_task_data (void* task_data, GLib.DestroyNotify? task_data_destroy); - [Version (since = "2.44")] - public bool completed { get; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_tcp_connection_get_type ()")] - [Version (since = "2.22")] - public class TcpConnection : GLib.SocketConnection { - [CCode (has_construct_function = false)] - protected TcpConnection (); - public bool get_graceful_disconnect (); - public void set_graceful_disconnect (bool graceful_disconnect); - public bool graceful_disconnect { get; set; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_tcp_wrapper_connection_get_type ()")] - [Version (since = "2.28")] - public class TcpWrapperConnection : GLib.TcpConnection { - [CCode (has_construct_function = false, type = "GSocketConnection*")] - public TcpWrapperConnection (GLib.IOStream base_io_stream, GLib.Socket socket); - public unowned GLib.IOStream get_base_io_stream (); - public GLib.IOStream base_io_stream { get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_test_dbus_get_type ()")] - [Version (since = "2.34")] - public class TestDBus : GLib.Object { - [CCode (has_construct_function = false)] - public TestDBus (GLib.TestDBusFlags flags); - public void add_service_dir (string path); - public void down (); - public unowned string? get_bus_address (); - public GLib.TestDBusFlags get_flags (); - public void stop (); - public static void unset (); - public void up (); - public GLib.TestDBusFlags flags { get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_themed_icon_get_type ()")] - public class ThemedIcon : GLib.Object, GLib.Icon { - [CCode (has_construct_function = false, type = "GIcon*")] - public ThemedIcon (string iconname); - public void append_name (string iconname); - [CCode (has_construct_function = false, type = "GIcon*")] - public ThemedIcon.from_names ([CCode (array_length_cname = "len", array_length_pos = 1.1)] string[] iconnames); - [CCode (array_length = false, array_null_terminated = true)] - public unowned string[] get_names (); - [Version (since = "2.18")] - public void prepend_name (string iconname); - [CCode (has_construct_function = false, type = "GIcon*")] - public ThemedIcon.with_default_fallbacks (string iconname); - [NoAccessorMethod] - public string name { construct; } - [CCode (array_length = false, array_null_terminated = true)] - public string[] names { get; construct; } - [NoAccessorMethod] - public bool use_default_fallbacks { get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_threaded_socket_service_get_type ()")] - [Version (since = "2.22")] - public class ThreadedSocketService : GLib.SocketService { - [CCode (has_construct_function = false, type = "GSocketService*")] - public ThreadedSocketService (int max_threads); - [NoAccessorMethod] - public int max_threads { get; construct; } - public virtual signal bool run (GLib.SocketConnection connection, GLib.Object source_object); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_tls_certificate_get_type ()")] - [Version (since = "2.28")] - public class TlsCertificate : GLib.Object { - [CCode (has_construct_function = false)] - protected TlsCertificate (); - [CCode (has_construct_function = false)] - public TlsCertificate.from_file (string file) throws GLib.Error; - [CCode (has_construct_function = false)] - public TlsCertificate.from_files (string cert_file, string key_file) throws GLib.Error; - [CCode (has_construct_function = false)] - public TlsCertificate.from_pem (string data, ssize_t length) throws GLib.Error; - public unowned GLib.TlsCertificate get_issuer (); - [Version (since = "2.34")] - public bool is_same (GLib.TlsCertificate cert_two); - public static GLib.List list_new_from_file (string file) throws GLib.Error; - public virtual GLib.TlsCertificateFlags verify (GLib.SocketConnectable? identity, GLib.TlsCertificate? trusted_ca); - [NoAccessorMethod] - public GLib.ByteArray certificate { owned get; construct; } - [NoAccessorMethod] - public string certificate_pem { owned get; construct; } - public GLib.TlsCertificate issuer { get; construct; } - [NoAccessorMethod] - public GLib.ByteArray private_key { construct; } - [NoAccessorMethod] - public string private_key_pem { construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_tls_connection_get_type ()")] - [Version (since = "2.28")] - public abstract class TlsConnection : GLib.IOStream { - [CCode (has_construct_function = false)] - protected TlsConnection (); - public bool emit_accept_certificate (GLib.TlsCertificate peer_cert, GLib.TlsCertificateFlags errors); - public unowned GLib.TlsCertificate? get_certificate (); - [Version (since = "2.30")] - public unowned GLib.TlsDatabase? get_database (); - [Version (since = "2.30")] - public unowned GLib.TlsInteraction? get_interaction (); - [Version (since = "2.60")] - public unowned string? get_negotiated_protocol (); - public unowned GLib.TlsCertificate? get_peer_certificate (); - public GLib.TlsCertificateFlags get_peer_certificate_errors (); - [Version (deprecated = true, deprecated_since = "2.60.", since = "2.28")] - public GLib.TlsRehandshakeMode get_rehandshake_mode (); - public bool get_require_close_notify (); - [Version (deprecated = true, deprecated_since = "2.30")] - public bool get_use_system_certdb (); - public virtual bool handshake (GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async bool handshake_async (int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.60")] - public void set_advertised_protocols ([CCode (array_length = false, array_null_terminated = true)] string[]? protocols); - public void set_certificate (GLib.TlsCertificate certificate); - [Version (since = "2.30")] - public void set_database (GLib.TlsDatabase? database); - [Version (since = "2.30")] - public void set_interaction (GLib.TlsInteraction? interaction); - [Version (deprecated = true, deprecated_since = "2.60.", since = "2.28")] - public void set_rehandshake_mode (GLib.TlsRehandshakeMode mode); - public void set_require_close_notify (bool require_close_notify); - [Version (deprecated = true, deprecated_since = "2.30")] - public void set_use_system_certdb (bool use_system_certdb); - [CCode (array_length = false, array_null_terminated = true)] - [NoAccessorMethod] - [Version (since = "2.60")] - public string[] advertised_protocols { owned get; set; } - [NoAccessorMethod] - public GLib.IOStream base_io_stream { owned get; construct; } - public GLib.TlsCertificate certificate { get; set; } - [Version (since = "2.30")] - public GLib.TlsDatabase database { get; set; } - [Version (since = "2.30")] - public GLib.TlsInteraction interaction { get; set; } - [Version (since = "2.60")] - public string negotiated_protocol { get; } - public GLib.TlsCertificate peer_certificate { get; } - public GLib.TlsCertificateFlags peer_certificate_errors { get; } - [Version (deprecated = true, deprecated_since = "2.60", since = "2.28")] - public GLib.TlsRehandshakeMode rehandshake_mode { get; set construct; } - public bool require_close_notify { get; set construct; } - [Version (deprecated = true, deprecated_since = "2.30")] - public bool use_system_certdb { get; set construct; } - public virtual signal bool accept_certificate (GLib.TlsCertificate peer_cert, GLib.TlsCertificateFlags errors); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_tls_database_get_type ()")] - [Version (since = "2.30")] - public abstract class TlsDatabase : GLib.Object { - [CCode (cheader_filename = "gio/gio.h", cname = "G_TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT")] - public const string PURPOSE_AUTHENTICATE_CLIENT; - [CCode (cheader_filename = "gio/gio.h", cname = "G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER")] - public const string PURPOSE_AUTHENTICATE_SERVER; - [CCode (has_construct_function = false)] - protected TlsDatabase (); - public virtual string? create_certificate_handle (GLib.TlsCertificate certificate); - public virtual GLib.TlsCertificate? lookup_certificate_for_handle (string handle, GLib.TlsInteraction? interaction, GLib.TlsDatabaseLookupFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async GLib.TlsCertificate lookup_certificate_for_handle_async (string handle, GLib.TlsInteraction? interaction, GLib.TlsDatabaseLookupFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual GLib.TlsCertificate lookup_certificate_issuer (GLib.TlsCertificate certificate, GLib.TlsInteraction? interaction, GLib.TlsDatabaseLookupFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async GLib.TlsCertificate lookup_certificate_issuer_async (GLib.TlsCertificate certificate, GLib.TlsInteraction? interaction, GLib.TlsDatabaseLookupFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual GLib.List lookup_certificates_issued_by (GLib.ByteArray issuer_raw_dn, GLib.TlsInteraction? interaction, GLib.TlsDatabaseLookupFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async GLib.List lookup_certificates_issued_by_async (GLib.ByteArray issuer_raw_dn, GLib.TlsInteraction? interaction, GLib.TlsDatabaseLookupFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual GLib.TlsCertificateFlags verify_chain (GLib.TlsCertificate chain, string purpose, GLib.SocketConnectable? identity, GLib.TlsInteraction? interaction, GLib.TlsDatabaseVerifyFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async GLib.TlsCertificateFlags verify_chain_async (GLib.TlsCertificate chain, string purpose, GLib.SocketConnectable? identity, GLib.TlsInteraction? interaction, GLib.TlsDatabaseVerifyFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_tls_interaction_get_type ()")] - [Version (since = "2.30")] - public class TlsInteraction : GLib.Object { - [CCode (has_construct_function = false)] - protected TlsInteraction (); - public virtual GLib.TlsInteractionResult ask_password (GLib.TlsPassword password, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async GLib.TlsInteractionResult ask_password_async (GLib.TlsPassword password, GLib.Cancellable? cancellable = null) throws GLib.Error; - public GLib.TlsInteractionResult invoke_ask_password (GLib.TlsPassword password, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.40")] - public GLib.TlsInteractionResult invoke_request_certificate (GLib.TlsConnection connection, GLib.TlsCertificateRequestFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.40")] - public virtual GLib.TlsInteractionResult request_certificate (GLib.TlsConnection connection, GLib.TlsCertificateRequestFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.40")] - public virtual async GLib.TlsInteractionResult request_certificate_async (GLib.TlsConnection connection, GLib.TlsCertificateRequestFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_tls_password_get_type ()")] - [Version (since = "2.30")] - public class TlsPassword : GLib.Object { - [CCode (has_construct_function = false)] - public TlsPassword (GLib.TlsPasswordFlags flags, string description); - [NoWrapper] - public virtual unowned string get_default_warning (); - public unowned string get_description (); - public GLib.TlsPasswordFlags get_flags (); - [CCode (array_length_pos = 0.1)] - public virtual unowned uint8[] get_value (); - public unowned string get_warning (); - public void set_description (string description); - public void set_flags (GLib.TlsPasswordFlags flags); - public void set_value ([CCode (array_length_cname = "length", array_length_pos = 1.1, array_length_type = "gssize")] uint8[] value); - [CCode (vfunc_name = "set_value")] - public virtual void set_value_full ([CCode (array_length_cname = "length", array_length_pos = 1.5, array_length_type = "gssize")] owned uint8[] value, GLib.DestroyNotify? destroy = GLib.free); - public void set_warning (string warning); - public string description { get; set; } - public GLib.TlsPasswordFlags flags { get; set; } - public string warning { get; set; } - } - [CCode (cheader_filename = "gio/gunixfdlist.h", type_id = "g_unix_fd_list_get_type ()")] - public class UnixFDList : GLib.Object { - [CCode (has_construct_function = false)] - [Version (since = "2.24")] - public UnixFDList (); - [Version (since = "2.24")] - public int append (int fd) throws GLib.Error; - [CCode (has_construct_function = false)] - [Version (since = "2.24")] - public UnixFDList.from_array ([CCode (array_length_cname = "n_fds", array_length_pos = 1.1)] int[] fds); - [Version (since = "2.24")] - public int @get (int index_) throws GLib.Error; - [Version (since = "2.24")] - public int get_length (); - [CCode (array_length_pos = 0.1)] - [Version (since = "2.24")] - public unowned int[] peek_fds (); - [CCode (array_length_pos = 0.1)] - [Version (since = "2.24")] - public int[] steal_fds (); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_vfs_get_type ()")] - public class Vfs : GLib.Object { - [CCode (has_construct_function = false)] - protected Vfs (); - [NoWrapper] - public virtual void add_writable_namespaces (GLib.FileAttributeInfoList list); - public static unowned GLib.Vfs get_default (); - public virtual GLib.File get_file_for_path (string path); - public virtual GLib.File get_file_for_uri (string uri); - public static unowned GLib.Vfs get_local (); - [CCode (array_length = false, array_null_terminated = true)] - public virtual unowned string[] get_supported_uri_schemes (); - public virtual bool is_active (); - [NoWrapper] - public virtual void local_file_add_info (string filename, uint64 device, GLib.FileAttributeMatcher attribute_matcher, GLib.FileInfo info, GLib.Cancellable? cancellable = null, void* extra_data = null, GLib.DestroyNotify? free_extra_data = null); - [NoWrapper] - public virtual void local_file_moved (string source, string dest); - [NoWrapper] - public virtual void local_file_removed (string filename); - [NoWrapper] - public virtual bool local_file_set_attributes (string filename, GLib.FileInfo info, GLib.FileQueryInfoFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual GLib.File parse_name (string parse_name); - [Version (since = "2.50")] - public bool register_uri_scheme (string scheme, [CCode (delegate_target_pos = 2.33333, destroy_notify_pos = 2.66667)] owned GLib.VfsFileLookupFunc? uri_func, owned GLib.VfsFileLookupFunc? parse_name_func); - [Version (since = "2.50")] - public bool unregister_uri_scheme (string scheme); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_volume_monitor_get_type ()")] - public class VolumeMonitor : GLib.Object { - [CCode (has_construct_function = false)] - protected VolumeMonitor (); - [Version (deprecated = true, deprecated_since = "2.20")] - public static GLib.Volume adopt_orphan_mount (GLib.Mount mount); - public static GLib.VolumeMonitor @get (); - public virtual GLib.List get_connected_drives (); - public virtual GLib.Mount get_mount_for_uuid (string uuid); - public virtual GLib.List get_mounts (); - public virtual GLib.Volume get_volume_for_uuid (string uuid); - public virtual GLib.List get_volumes (); - [NoWrapper] - public virtual bool is_supported (); - public virtual signal void drive_changed (GLib.Drive drive); - public virtual signal void drive_connected (GLib.Drive drive); - public virtual signal void drive_disconnected (GLib.Drive drive); - [Version (since = "2.18")] - public virtual signal void drive_eject_button (GLib.Drive drive); - [Version (since = "2.22")] - public virtual signal void drive_stop_button (GLib.Drive drive); - public virtual signal void mount_added (GLib.Mount mount); - public virtual signal void mount_changed (GLib.Mount mount); - public virtual signal void mount_pre_unmount (GLib.Mount mount); - public virtual signal void mount_removed (GLib.Mount mount); - public virtual signal void volume_added (GLib.Volume volume); - public virtual signal void volume_changed (GLib.Volume volume); - public virtual signal void volume_removed (GLib.Volume volume); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_zlib_compressor_get_type ()")] - public class ZlibCompressor : GLib.Object, GLib.Converter { - [CCode (has_construct_function = false)] - [Version (since = "2.24")] - public ZlibCompressor (GLib.ZlibCompressorFormat format, int level = -1); - [Version (since = "2.26")] - public unowned GLib.FileInfo get_file_info (); - [Version (since = "2.26")] - public void set_file_info (GLib.FileInfo? file_info); - [Version (since = "2.26")] - public GLib.FileInfo file_info { get; set; } - [NoAccessorMethod] - public GLib.ZlibCompressorFormat format { get; construct; } - [NoAccessorMethod] - public int level { get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_zlib_decompressor_get_type ()")] - public class ZlibDecompressor : GLib.Object, GLib.Converter { - [CCode (has_construct_function = false)] - [Version (since = "2.24")] - public ZlibDecompressor (GLib.ZlibCompressorFormat format); - [Version (since = "2.26")] - public unowned GLib.FileInfo get_file_info (); - [Version (since = "2.26")] - public GLib.FileInfo file_info { get; } - [NoAccessorMethod] - public GLib.ZlibCompressorFormat format { get; construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_cname = "GActionInterface", type_id = "g_action_get_type ()")] - public interface Action : GLib.Object { - [Version (since = "2.28")] - public abstract void activate (GLib.Variant? parameter); - [Version (since = "2.30")] - public abstract void change_state (GLib.Variant value); - [Version (since = "2.28")] - public abstract bool get_enabled (); - [Version (since = "2.28")] - public abstract unowned string get_name (); - [Version (since = "2.28")] - public abstract unowned GLib.VariantType? get_parameter_type (); - [Version (since = "2.28")] - public abstract GLib.Variant get_state (); - [Version (since = "2.28")] - public abstract GLib.Variant? get_state_hint (); - [Version (since = "2.28")] - public abstract unowned GLib.VariantType? get_state_type (); - [Version (since = "2.38")] - public static bool name_is_valid (string action_name); - [Version (since = "2.38")] - public static bool parse_detailed_name (string detailed_name, out string action_name, out GLib.Variant target_value) throws GLib.Error; - [Version (since = "2.38")] - public static string print_detailed_name (string action_name, GLib.Variant? target_value); - [Version (since = "2.28")] - public abstract bool enabled { get; } - [Version (since = "2.28")] - public abstract string name { get; } - [Version (since = "2.28")] - public abstract GLib.VariantType? parameter_type { get; } - [Version (since = "2.28")] - public abstract GLib.Variant? state { owned get; } - [Version (since = "2.28")] - public abstract GLib.VariantType? state_type { get; } - } - [CCode (cheader_filename = "gio/gio.h", type_cname = "GActionGroupInterface", type_id = "g_action_group_get_type ()")] - public interface ActionGroup : GLib.Object { - [Version (since = "2.28")] - public abstract void activate_action (string action_name, GLib.Variant? parameter); - [Version (since = "2.28")] - public abstract void change_action_state (string action_name, GLib.Variant value); - [Version (since = "2.28")] - public abstract bool get_action_enabled (string action_name); - [Version (since = "2.28")] - public abstract unowned GLib.VariantType? get_action_parameter_type (string action_name); - [Version (since = "2.28")] - public abstract GLib.Variant? get_action_state (string action_name); - [Version (since = "2.28")] - public abstract GLib.Variant? get_action_state_hint (string action_name); - [Version (since = "2.28")] - public abstract unowned GLib.VariantType? get_action_state_type (string action_name); - [Version (since = "2.28")] - public abstract bool has_action (string action_name); - [CCode (array_length = false, array_null_terminated = true)] - [Version (since = "2.28")] - public abstract string[] list_actions (); - [Version (since = "2.32")] - public virtual bool query_action (string action_name, out bool enabled, out GLib.VariantType parameter_type, out GLib.VariantType state_type, out GLib.Variant state_hint, out GLib.Variant state); - [HasEmitter] - [Version (since = "2.28")] - public virtual signal void action_added (string action_name); - [HasEmitter] - [Version (since = "2.28")] - public virtual signal void action_enabled_changed (string action_name, bool enabled); - [HasEmitter] - [Version (since = "2.28")] - public virtual signal void action_removed (string action_name); - [HasEmitter] - [Version (since = "2.28")] - public virtual signal void action_state_changed (string action_name, GLib.Variant state); - } - [CCode (cheader_filename = "gio/gio.h", type_cname = "GActionMapInterface", type_id = "g_action_map_get_type ()")] - [Version (since = "2.32")] - public interface ActionMap : GLib.Object { - public abstract void add_action (GLib.Action action); - public void add_action_entries ([CCode (array_length_cname = "n_entries", array_length_pos = 1.5)] GLib.ActionEntry[] entries, void* user_data); - public abstract unowned GLib.Action lookup_action (string action_name); - public abstract void remove_action (string action_name); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_app_info_get_type ()")] - public interface AppInfo : GLib.Object { - public abstract bool add_supports_type (string content_type) throws GLib.Error; - [Version (since = "2.20")] - public abstract bool can_delete (); - public abstract bool can_remove_supports_type (); - public static GLib.AppInfo create_from_commandline (string commandline, string? application_name, GLib.AppInfoCreateFlags flags) throws GLib.Error; - [CCode (vfunc_name = "do_delete")] - [Version (since = "2.20")] - public abstract bool @delete (); - public abstract GLib.AppInfo dup (); - public abstract bool equal (GLib.AppInfo appinfo2); - public static GLib.List get_all (); - public static GLib.List get_all_for_type (string content_type); - [NoWrapper] - public abstract unowned string get_commandline (); - public static GLib.AppInfo get_default_for_type (string content_type, bool must_support_uris); - public static GLib.AppInfo get_default_for_uri_scheme (string uri_scheme); - public abstract unowned string get_description (); - [Version (since = "2.24")] - public abstract unowned string get_display_name (); - [NoWrapper] - public abstract unowned string get_executable (); - [Version (since = "2.28")] - public static GLib.List get_fallback_for_type (string content_type); - public abstract unowned GLib.Icon get_icon (); - public abstract unowned string get_id (); - public abstract unowned string get_name (); - [Version (since = "2.28")] - public static GLib.List get_recommended_for_type (string content_type); - [CCode (array_length = false, array_null_terminated = true)] - [Version (since = "2.34")] - public abstract unowned string[] get_supported_types (); - public abstract bool launch (GLib.List? files, GLib.AppLaunchContext? context) throws GLib.Error; - public static bool launch_default_for_uri (string uri, GLib.AppLaunchContext? context) throws GLib.Error; - [Version (since = "2.50")] - public static async bool launch_default_for_uri_async (string uri, GLib.AppLaunchContext? context, GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract bool launch_uris (GLib.List? uris, GLib.AppLaunchContext? context) throws GLib.Error; - [Version (since = "2.60")] - public abstract async bool launch_uris_async (GLib.List? uris, GLib.AppLaunchContext? context, GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract bool remove_supports_type (string content_type) throws GLib.Error; - [Version (since = "2.20")] - public static void reset_type_associations (string content_type); - public abstract bool set_as_default_for_extension (string extension) throws GLib.Error; - public abstract bool set_as_default_for_type (string content_type) throws GLib.Error; - public abstract bool set_as_last_used_for_type (string content_type) throws GLib.Error; - public abstract bool should_show (); - public abstract bool supports_files (); - public abstract bool supports_uris (); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_async_initable_get_type ()")] - [Version (since = "2.22")] - public interface AsyncInitable : GLib.Object { - public virtual async bool init_async (int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (finish_name = "g_async_initable_new_finish")] - public static async GLib.Object new_async (GLib.Type object_type, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable, ...) throws GLib.Error; - [CCode (finish_name = "g_async_initable_new_finish")] - public static async GLib.Object new_valist_async (GLib.Type object_type, string first_property_name, va_list var_args, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null); - [CCode (finish_name = "g_async_initable_new_finish")] - [Version (deprecated = true, deprecated_since = "2.54", since = "2.22")] - public static async GLib.Object newv_async (GLib.Type object_type, [CCode (array_length_pos = 1.1)] GLib.Parameter[] parameters, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_async_result_get_type ()")] - public interface AsyncResult : GLib.Object { - public abstract GLib.Object? get_source_object (); - public abstract void* get_user_data (); - [Version (since = "2.34")] - public abstract bool is_tagged (void* source_tag); - [Version (since = "2.34")] - public bool legacy_propagate_error () throws GLib.Error; - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_converter_get_type ()")] - [Version (since = "2.24")] - public interface Converter : GLib.Object { - public abstract GLib.ConverterResult convert ([CCode (array_length_cname = "inbuf_size", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] inbuf, [CCode (array_length_cname = "outbuf_size", array_length_pos = 2.5, array_length_type = "gsize")] uint8[] outbuf, GLib.ConverterFlags flags, out size_t bytes_read, out size_t bytes_written) throws GLib.Error; - public abstract void reset (); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_interface_get_type ()")] - [Version (since = "2.30")] - public interface DBusInterface : GLib.Object { - [Version (since = "2.32")] - public abstract GLib.DBusObject dup_object (); - public abstract unowned GLib.DBusInterfaceInfo get_info (); - public abstract unowned GLib.DBusObject get_object (); - public abstract void set_object (GLib.DBusObject? object); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_object_get_type ()")] - public interface DBusObject : GLib.Object { - [Version (since = "2.30")] - public abstract GLib.DBusInterface get_interface (string interface_name); - [Version (since = "2.30")] - public abstract GLib.List get_interfaces (); - [Version (since = "2.30")] - public abstract unowned string get_object_path (); - [Version (since = "2.30")] - public virtual signal void interface_added (GLib.DBusInterface interface_); - [Version (since = "2.30")] - public virtual signal void interface_removed (GLib.DBusInterface interface_); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_object_manager_get_type ()")] - public interface DBusObjectManager : GLib.Object { - [Version (since = "2.30")] - public abstract GLib.DBusInterface get_interface (string object_path, string interface_name); - [Version (since = "2.30")] - public abstract GLib.DBusObject get_object (string object_path); - [Version (since = "2.30")] - public abstract unowned string get_object_path (); - [Version (since = "2.30")] - public abstract GLib.List get_objects (); - [Version (since = "2.30")] - public virtual signal void interface_added (GLib.DBusObject object, GLib.DBusInterface interface_); - [Version (since = "2.30")] - public virtual signal void interface_removed (GLib.DBusObject object, GLib.DBusInterface interface_); - [Version (since = "2.30")] - public virtual signal void object_added (GLib.DBusObject object); - [Version (since = "2.30")] - public virtual signal void object_removed (GLib.DBusObject object); - } - [CCode (cheader_filename = "gio/gio.h", type_cname = "GDatagramBasedInterface", type_id = "g_datagram_based_get_type ()")] - [Version (since = "2.48")] - public interface DatagramBased : GLib.Object { - public GLib.IOCondition condition_check (GLib.IOCondition condition); - public bool condition_wait (GLib.IOCondition condition, int64 timeout, GLib.Cancellable? cancellable = null) throws GLib.Error; - public GLib.Source create_source (GLib.IOCondition condition, GLib.Cancellable? cancellable = null); - [CCode (vfunc_name = "condition_check")] - public virtual GLib.IOCondition datagram_condition_check (GLib.IOCondition condition); - [CCode (vfunc_name = "condition_wait")] - public virtual bool datagram_condition_wait (GLib.IOCondition condition, int64 timeout, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (vfunc_name = "create_source")] - public virtual GLib.Source datagram_create_source (GLib.IOCondition condition, GLib.Cancellable? cancellable = null); - [CCode (vfunc_name = "receive_messages")] - public virtual int datagram_receive_messages ([CCode (array_length_cname = "num_messages", array_length_pos = 1.5, array_length_type = "guint")] GLib.InputMessage[] messages, int flags, int64 timeout, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (vfunc_name = "send_messages")] - public virtual int datagram_send_messages ([CCode (array_length_cname = "num_messages", array_length_pos = 1.5, array_length_type = "guint")] GLib.OutputMessage[] messages, int flags, int64 timeout, GLib.Cancellable? cancellable = null) throws GLib.Error; - public int receive_messages ([CCode (array_length_cname = "num_messages", array_length_pos = 1.5, array_length_type = "guint")] GLib.InputMessage[] messages, int flags, int64 timeout, GLib.Cancellable? cancellable = null) throws GLib.Error; - public int send_messages ([CCode (array_length_cname = "num_messages", array_length_pos = 1.5, array_length_type = "guint")] GLib.OutputMessage[] messages, int flags, int64 timeout, GLib.Cancellable? cancellable = null) throws GLib.Error; - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_drive_get_type ()")] - public interface Drive : GLib.Object { - public abstract bool can_eject (); - public abstract bool can_poll_for_media (); - [Version (since = "2.22")] - public abstract bool can_start (); - [Version (since = "2.22")] - public abstract bool can_start_degraded (); - [Version (since = "2.22")] - public abstract bool can_stop (); - [Version (deprecated = true, deprecated_since = "2.22")] - public abstract async bool eject (GLib.MountUnmountFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.22")] - public abstract async bool eject_with_operation (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (array_length = false, array_null_terminated = true)] - public abstract string[] enumerate_identifiers (); - public abstract GLib.Icon get_icon (); - public abstract string? get_identifier (string kind); - public abstract string get_name (); - [Version (since = "2.32")] - public virtual unowned string? get_sort_key (); - [Version (since = "2.22")] - public abstract GLib.DriveStartStopType get_start_stop_type (); - [Version (since = "2.34")] - public abstract GLib.Icon get_symbolic_icon (); - public abstract GLib.List get_volumes (); - public abstract bool has_media (); - public abstract bool has_volumes (); - public abstract bool is_media_check_automatic (); - public abstract bool is_media_removable (); - [Version (since = "2.50")] - public abstract bool is_removable (); - public abstract async bool poll_for_media (GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.22")] - public abstract async bool start (GLib.DriveStartFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.22")] - public abstract async bool stop (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual signal void changed (); - public virtual signal void disconnected (); - public virtual signal void eject_button (); - [Version (since = "2.22")] - public virtual signal void stop_button (); - } - [CCode (cheader_filename = "gio/gio.h", type_cname = "GDtlsClientConnectionInterface", type_id = "g_dtls_client_connection_get_type ()")] - [Version (since = "2.48")] - public interface DtlsClientConnection : GLib.DatagramBased, GLib.DtlsConnection, GLib.Object { - public GLib.List get_accepted_cas (); - public unowned GLib.SocketConnectable get_server_identity (); - public GLib.TlsCertificateFlags get_validation_flags (); - public static GLib.DtlsClientConnection @new (GLib.DatagramBased base_socket, GLib.SocketConnectable? server_identity) throws GLib.Error; - public void set_server_identity (GLib.SocketConnectable identity); - public void set_validation_flags (GLib.TlsCertificateFlags flags); - [ConcreteAccessor] - public abstract GLib.List accepted_cas { owned get; } - [ConcreteAccessor] - public abstract GLib.SocketConnectable server_identity { get; set construct; } - [ConcreteAccessor] - public abstract GLib.TlsCertificateFlags validation_flags { get; set construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_cname = "GDtlsConnectionInterface", type_id = "g_dtls_connection_get_type ()")] - [Version (since = "2.48")] - public interface DtlsConnection : GLib.DatagramBased, GLib.Object { - public bool close (GLib.Cancellable? cancellable = null) throws GLib.Error; - public async bool close_async (int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool emit_accept_certificate (GLib.TlsCertificate peer_cert, GLib.TlsCertificateFlags errors); - public unowned GLib.TlsCertificate? get_certificate (); - public unowned GLib.TlsDatabase? get_database (); - public unowned GLib.TlsInteraction? get_interaction (); - [Version (since = "2.60")] - public abstract unowned string? get_negotiated_protocol (); - public unowned GLib.TlsCertificate? get_peer_certificate (); - public GLib.TlsCertificateFlags get_peer_certificate_errors (); - [Version (deprecated = true, deprecated_since = "2.64.", since = "2.48")] - public GLib.TlsRehandshakeMode get_rehandshake_mode (); - public bool get_require_close_notify (); - public abstract bool handshake (GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract async bool handshake_async (int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.60")] - public abstract void set_advertised_protocols ([CCode (array_length = false, array_null_terminated = true)] string[]? protocols); - public void set_certificate (GLib.TlsCertificate certificate); - public void set_database (GLib.TlsDatabase? database); - public void set_interaction (GLib.TlsInteraction? interaction); - [Version (deprecated = true, deprecated_since = "2.60.", since = "2.48")] - public void set_rehandshake_mode (GLib.TlsRehandshakeMode mode); - public void set_require_close_notify (bool require_close_notify); - public abstract bool shutdown (bool shutdown_read, bool shutdown_write, GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract async bool shutdown_async (bool shutdown_read, bool shutdown_write, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (array_length = false, array_null_terminated = true)] - [NoAccessorMethod] - [Version (since = "2.60")] - public abstract string[] advertised_protocols { owned get; set; } - [NoAccessorMethod] - public abstract GLib.DatagramBased base_socket { owned get; construct; } - [ConcreteAccessor] - public abstract GLib.TlsCertificate certificate { get; set; } - [ConcreteAccessor] - public abstract GLib.TlsDatabase database { get; set; } - [ConcreteAccessor] - public abstract GLib.TlsInteraction interaction { get; set; } - [Version (since = "2.60")] - public abstract string negotiated_protocol { get; } - [ConcreteAccessor] - public abstract GLib.TlsCertificate peer_certificate { get; } - [ConcreteAccessor] - public abstract GLib.TlsCertificateFlags peer_certificate_errors { get; } - [ConcreteAccessor] - [Version (deprecated = true, deprecated_since = "2.60", since = "2.48")] - public abstract GLib.TlsRehandshakeMode rehandshake_mode { get; set construct; } - [ConcreteAccessor] - public abstract bool require_close_notify { get; set construct; } - public virtual signal bool accept_certificate (GLib.TlsCertificate peer_cert, GLib.TlsCertificateFlags errors); - } - [CCode (cheader_filename = "gio/gio.h", type_cname = "GDtlsServerConnectionInterface", type_id = "g_dtls_server_connection_get_type ()")] - [Version (since = "2.48")] - public interface DtlsServerConnection : GLib.DatagramBased, GLib.DtlsConnection, GLib.Object { - public static GLib.DtlsServerConnection @new (GLib.DatagramBased base_socket, GLib.TlsCertificate? certificate) throws GLib.Error; - [NoAccessorMethod] - public abstract GLib.TlsAuthenticationMode authentication_mode { get; set; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_file_get_type ()")] - public interface File : GLib.Object { - public abstract GLib.FileOutputStream append_to (GLib.FileCreateFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async GLib.FileOutputStream append_to_async (GLib.FileCreateFlags flags, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract bool copy (GLib.File destination, GLib.FileCopyFlags flags, GLib.Cancellable? cancellable = null, GLib.FileProgressCallback? progress_callback = null) throws GLib.Error; - public virtual async bool copy_async (GLib.File destination, GLib.FileCopyFlags flags, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null, GLib.FileProgressCallback? progress_callback = null) throws GLib.Error; - public bool copy_attributes (GLib.File destination, GLib.FileCopyFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract GLib.FileOutputStream create (GLib.FileCreateFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async GLib.FileOutputStream create_async (GLib.FileCreateFlags flags, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.22")] - public abstract GLib.FileIOStream create_readwrite (GLib.FileCreateFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.22")] - public virtual async GLib.FileIOStream create_readwrite_async (GLib.FileCreateFlags flags, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (vfunc_name = "delete_file")] - public abstract bool @delete (GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (vfunc_name = "delete_file_async")] - [Version (since = "2.34")] - public virtual async bool delete_async (int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract GLib.File dup (); - [Version (deprecated = true, deprecated_since = "2.22")] - public abstract async bool eject_mountable (GLib.MountUnmountFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.22")] - public abstract async bool eject_mountable_with_operation (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract GLib.FileEnumerator enumerate_children (string attributes, GLib.FileQueryInfoFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async GLib.FileEnumerator enumerate_children_async (string attributes, GLib.FileQueryInfoFlags flags, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract bool equal (GLib.File file2); - public abstract GLib.Mount find_enclosing_mount (GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async GLib.Mount find_enclosing_mount_async (int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - [NoWrapper] - public abstract string? get_basename (); - public GLib.File get_child (string name); - public abstract GLib.File get_child_for_display_name (string display_name) throws GLib.Error; - public abstract GLib.File? get_parent (); - public abstract string get_parse_name (); - [NoWrapper] - public abstract string? get_path (); - [NoWrapper] - public abstract string? get_relative_path (GLib.File descendant); - public abstract string get_uri (); - public abstract string get_uri_scheme (); - [Version (since = "2.24")] - public bool has_parent (GLib.File? parent); - [CCode (vfunc_name = "prefix_matches")] - public abstract bool has_prefix (GLib.File file); - public abstract bool has_uri_scheme (string uri_scheme); - public abstract uint hash (); - public abstract bool is_native (); - [Version (since = "2.56")] - public GLib.Bytes load_bytes (GLib.Cancellable? cancellable = null, out string? etag_out = null) throws GLib.Error; - [Version (since = "2.56")] - public async GLib.Bytes load_bytes_async (GLib.Cancellable? cancellable = null, out string? etag_out) throws GLib.Error; - public bool load_contents (GLib.Cancellable? cancellable, [CCode (array_length_cname = "length", array_length_pos = 2.5, array_length_type = "gsize")] out uint8[] contents, out string etag_out) throws GLib.Error; - public async bool load_contents_async (GLib.Cancellable? cancellable = null, [CCode (array_length_cname = "length", array_length_pos = 2.5, array_length_type = "gsize")] out uint8[] contents, out string etag_out) throws GLib.Error; - public async bool load_partial_contents_async (GLib.Cancellable? cancellable = null, [CCode (delegate_target_pos = -0.9)] GLib.FileReadMoreCallback read_more_callback, [CCode (array_length_cname = "length", array_length_pos = 2.5, array_length_type = "gsize")] out uint8[] contents, out string etag_out) throws GLib.Error; - public abstract bool make_directory (GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.38")] - public virtual async bool make_directory_async (int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.18")] - public bool make_directory_with_parents (GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract bool make_symbolic_link (string symlink_value, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.38")] - public virtual bool measure_disk_usage (GLib.FileMeasureFlags flags, GLib.Cancellable? cancellable, [CCode (delegate_target_pos = 3.5)] GLib.FileMeasureProgressCallback? progress_callback, out uint64 disk_usage, out uint64 num_dirs, out uint64 num_files) throws GLib.Error; - [Version (since = "2.38")] - public virtual async bool measure_disk_usage_async (GLib.FileMeasureFlags flags, int io_priority, GLib.Cancellable? cancellable, GLib.FileMeasureProgressCallback? progress_callback, out uint64 disk_usage, out uint64 num_dirs, out uint64 num_files) throws GLib.Error; - [Version (since = "2.18")] - public GLib.FileMonitor monitor (GLib.FileMonitorFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (vfunc_name = "monitor_dir")] - public abstract GLib.FileMonitor monitor_directory (GLib.FileMonitorFlags flags, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public abstract GLib.FileMonitor monitor_file (GLib.FileMonitorFlags flags, GLib.Cancellable? cancellable = null) throws GLib.IOError; - public abstract async bool mount_enclosing_volume (GLib.MountMountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract async GLib.File mount_mountable (GLib.MountMountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract bool move (GLib.File destination, GLib.FileCopyFlags flags, GLib.Cancellable? cancellable = null, GLib.FileProgressCallback? progress_callback = null) throws GLib.Error; - [Version (since = "2.56")] - public static GLib.File new_build_filename (string first_element, ...); - public static GLib.File new_for_commandline_arg (string arg); - [Version (since = "2.36")] - public static GLib.File new_for_commandline_arg_and_cwd (string arg, string cwd); - public static GLib.File new_for_path (string path); - public static GLib.File new_for_uri (string uri); - [Version (since = "2.32")] - public static GLib.File new_tmp (string? tmpl, out GLib.FileIOStream iostream) throws GLib.Error; - [Version (since = "2.22")] - public abstract GLib.FileIOStream open_readwrite (GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.22")] - public virtual async GLib.FileIOStream open_readwrite_async (int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - public static GLib.File parse_name (string parse_name); - [Version (since = "2.56")] - public unowned string? peek_path (); - [Version (since = "2.22")] - public abstract async bool poll_mountable (GLib.Cancellable? cancellable = null) throws GLib.Error; - public GLib.AppInfo query_default_handler (GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.60")] - public async GLib.AppInfo query_default_handler_async (int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool query_exists (GLib.Cancellable? cancellable = null); - [Version (since = "2.18")] - public GLib.FileType query_file_type (GLib.FileQueryInfoFlags flags, GLib.Cancellable? cancellable = null); - public abstract GLib.FileInfo query_filesystem_info (string attributes, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async GLib.FileInfo query_filesystem_info_async (string attributes, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract GLib.FileInfo query_info (string attributes, GLib.FileQueryInfoFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async GLib.FileInfo query_info_async (string attributes, GLib.FileQueryInfoFlags flags, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract GLib.FileAttributeInfoList query_settable_attributes (GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract GLib.FileAttributeInfoList query_writable_namespaces (GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (vfunc_name = "read_fn")] - public abstract GLib.FileInputStream read (GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async GLib.FileInputStream read_async (int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract GLib.FileOutputStream replace (string? etag, bool make_backup, GLib.FileCreateFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async GLib.FileOutputStream replace_async (string? etag, bool make_backup, GLib.FileCreateFlags flags, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool replace_contents ([CCode (array_length_cname = "length", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] contents, string? etag, bool make_backup, GLib.FileCreateFlags flags, out string new_etag, GLib.Cancellable? cancellable = null) throws GLib.Error; - public async bool replace_contents_async ([CCode (array_length_cname = "length", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] contents, string? etag, bool make_backup, GLib.FileCreateFlags flags, GLib.Cancellable? cancellable = null, out string new_etag) throws GLib.Error; - [CCode (finish_name = "g_file_replace_contents_finish")] - [Version (since = "2.40")] - public async bool replace_contents_bytes_async (GLib.Bytes contents, string? etag, bool make_backup, GLib.FileCreateFlags flags, GLib.Cancellable? cancellable = null, out string new_etag) throws GLib.Error; - [Version (since = "2.22")] - public abstract GLib.FileIOStream replace_readwrite (string? etag, bool make_backup, GLib.FileCreateFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.22")] - public virtual async GLib.FileIOStream replace_readwrite_async (string? etag, bool make_backup, GLib.FileCreateFlags flags, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract GLib.File resolve_relative_path (string relative_path); - public abstract bool set_attribute (string attribute, GLib.FileAttributeType type, void* value_p, GLib.FileQueryInfoFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool set_attribute_byte_string (string attribute, string value, GLib.FileQueryInfoFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool set_attribute_int32 (string attribute, int32 value, GLib.FileQueryInfoFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool set_attribute_int64 (string attribute, int64 value, GLib.FileQueryInfoFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool set_attribute_string (string attribute, string value, GLib.FileQueryInfoFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool set_attribute_uint32 (string attribute, uint32 value, GLib.FileQueryInfoFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool set_attribute_uint64 (string attribute, uint64 value, GLib.FileQueryInfoFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async bool set_attributes_async (GLib.FileInfo info, GLib.FileQueryInfoFlags flags, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null, out GLib.FileInfo info_out) throws GLib.Error; - public abstract bool set_attributes_from_info (GLib.FileInfo info, GLib.FileQueryInfoFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract GLib.File set_display_name (string display_name, GLib.Cancellable? cancellable = null) throws GLib.Error; - public virtual async GLib.File set_display_name_async (string display_name, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.22")] - public abstract async bool start_mountable (GLib.DriveStartFlags flags, GLib.MountOperation? start_operation, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.22")] - public abstract async bool stop_mountable (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.22")] - public bool supports_thread_contexts (); - public abstract bool trash (GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.38")] - public virtual async bool trash_async (int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (deprecated = true, deprecated_since = "2.22")] - public abstract async bool unmount_mountable (GLib.MountUnmountFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.22")] - public abstract async bool unmount_mountable_with_operation (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable = null) throws GLib.Error; - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_icon_get_type ()")] - public interface Icon : GLib.Object { - [Version (since = "2.38")] - public static GLib.Icon deserialize (GLib.Variant value); - public abstract bool equal (GLib.Icon? icon2); - [NoWrapper] - public virtual GLib.Icon? from_tokens (string[] tokens, int version) throws GLib.Error; - public abstract uint hash (); - [Version (since = "2.20")] - public static GLib.Icon? new_for_string (string str) throws GLib.Error; - [Version (since = "2.38")] - public virtual GLib.Variant serialize (); - [Version (since = "2.20")] - public string? to_string (); - [NoWrapper] - public virtual bool to_tokens (GLib.GenericArray tokens, out int out_version); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_initable_get_type ()")] - [Version (since = "2.22")] - public interface Initable : GLib.Object { - public abstract bool init (GLib.Cancellable? cancellable = null) throws GLib.Error; - public static GLib.Object @new (GLib.Type object_type, GLib.Cancellable? cancellable = null, ...) throws GLib.Error; - public static GLib.Object new_valist (GLib.Type object_type, string first_property_name, va_list var_args, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (deprecated = true, deprecated_since = "2.54", since = "2.22")] - public static GLib.Object newv (GLib.Type object_type, [CCode (array_length_cname = "n_parameters", array_length_pos = 1.5, array_length_type = "guint")] GLib.Parameter[] parameters, GLib.Cancellable? cancellable = null) throws GLib.Error; - } - [CCode (cheader_filename = "gio/gio.h", type_cname = "GListModelInterface", type_id = "g_list_model_get_type ()")] - public interface ListModel : GLib.Object { - [Version (since = "2.44")] - public abstract GLib.Object? get_item (uint position); - [Version (since = "2.44")] - public abstract GLib.Type get_item_type (); - [Version (since = "2.44")] - public abstract uint get_n_items (); - [Version (since = "2.44")] - public GLib.Object? get_object (uint position); - [HasEmitter] - [Version (since = "2.44")] - public signal void items_changed (uint position, uint removed, uint added); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_loadable_icon_get_type ()")] - public interface LoadableIcon : GLib.Icon, GLib.Object { - public abstract GLib.InputStream load (int size, out string? type, GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract async GLib.InputStream load_async (int size, GLib.Cancellable? cancellable = null, out string? type = null) throws GLib.Error; - } - [CCode (cheader_filename = "gio/gio.h", type_cname = "GMemoryMonitorInterface", type_id = "g_memory_monitor_get_type ()")] - [Version (since = "2.64")] - public interface MemoryMonitor : GLib.Initable, GLib.Object { - public static GLib.MemoryMonitor dup_default (); - public virtual signal void low_memory_warning (GLib.MemoryMonitorWarningLevel level); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_mount_get_type ()")] - public interface Mount : GLib.Object { - public abstract bool can_eject (); - public abstract bool can_unmount (); - [Version (deprecated = true, deprecated_since = "2.22")] - public abstract async bool eject (GLib.MountUnmountFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.22")] - public abstract async bool eject_with_operation (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract GLib.File get_default_location (); - public abstract GLib.Drive? get_drive (); - public abstract GLib.Icon get_icon (); - public abstract string get_name (); - public abstract GLib.File get_root (); - [Version (since = "2.32")] - public virtual unowned string? get_sort_key (); - [Version (since = "2.34")] - public abstract GLib.Icon get_symbolic_icon (); - public abstract string? get_uuid (); - public abstract GLib.Volume? get_volume (); - [CCode (array_length = false, array_null_terminated = true)] - [Version (since = "2.18")] - public abstract async string[] guess_content_type (bool force_rescan, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (array_length = false, array_null_terminated = true)] - [Version (since = "2.18")] - public abstract string[] guess_content_type_sync (bool force_rescan, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.20")] - public bool is_shadowed (); - public abstract async bool remount (GLib.MountMountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.20")] - public void shadow (); - [Version (deprecated = true, deprecated_since = "2.22")] - public abstract async bool unmount (GLib.MountUnmountFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.22")] - public abstract async bool unmount_with_operation (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.20")] - public void unshadow (); - public virtual signal void changed (); - [Version (since = "2.22")] - public virtual signal void pre_unmount (); - public virtual signal void unmounted (); - } - [CCode (cheader_filename = "gio/gio.h", type_cname = "GNetworkMonitorInterface", type_id = "g_network_monitor_get_type ()")] - [Version (since = "2.32")] - public interface NetworkMonitor : GLib.Initable, GLib.Object { - public abstract bool can_reach (GLib.SocketConnectable connectable, GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract async bool can_reach_async (GLib.SocketConnectable connectable, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.44")] - public GLib.NetworkConnectivity get_connectivity (); - public static unowned GLib.NetworkMonitor get_default (); - public bool get_network_available (); - [Version (since = "2.46")] - public bool get_network_metered (); - [ConcreteAccessor] - [Version (since = "2.44")] - public abstract GLib.NetworkConnectivity connectivity { get; } - [ConcreteAccessor] - public abstract bool network_available { get; } - [ConcreteAccessor] - [Version (since = "2.46")] - public abstract bool network_metered { get; } - public virtual signal void network_changed (bool network_available); - } - [CCode (cheader_filename = "gio/gio.h", type_cname = "GPollableInputStreamInterface", type_id = "g_pollable_input_stream_get_type ()")] - [Version (since = "2.28")] - public interface PollableInputStream : GLib.InputStream { - public abstract bool can_poll (); - public abstract GLib.PollableSource create_source (GLib.Cancellable? cancellable = null); - public abstract bool is_readable (); - public ssize_t read_nonblocking ([CCode (array_length_cname = "count", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] buffer, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (vfunc_name = "read_nonblocking")] - public abstract ssize_t read_nonblocking_fn ([CCode (array_length_cname = "count", array_length_pos = 1.1, array_length_type = "gsize")] uint8[] buffer) throws GLib.Error; - } - [CCode (cheader_filename = "gio/gio.h", type_cname = "GPollableOutputStreamInterface", type_id = "g_pollable_output_stream_get_type ()")] - [Version (since = "2.28")] - public interface PollableOutputStream : GLib.OutputStream { - public abstract bool can_poll (); - public abstract GLib.PollableSource create_source (GLib.Cancellable? cancellable = null); - public abstract bool is_writable (); - public abstract ssize_t write_nonblocking ([CCode (array_length_cname = "count", array_length_pos = 1.1, array_length_type = "gsize")] uint8[]? buffer) throws GLib.Error; - [Version (since = "2.60")] - public abstract GLib.PollableReturn writev_nonblocking ([CCode (array_length_cname = "n_vectors", array_length_pos = 1.5, array_length_type = "gsize")] GLib.OutputVector[] vectors, out size_t bytes_written) throws GLib.Error; - } - [CCode (cheader_filename = "gio/gio.h", type_cname = "GProxyInterface", type_id = "g_proxy_get_type ()")] - [Version (since = "2.26")] - public interface Proxy : GLib.Object { - public abstract GLib.IOStream connect (GLib.IOStream connection, GLib.ProxyAddress proxy_address, GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract async GLib.IOStream connect_async (GLib.IOStream connection, GLib.ProxyAddress proxy_address, GLib.Cancellable? cancellable = null) throws GLib.Error; - public static GLib.Proxy get_default_for_protocol (string protocol); - public abstract bool supports_hostname (); - } - [CCode (cheader_filename = "gio/gio.h", type_cname = "GProxyResolverInterface", type_id = "g_proxy_resolver_get_type ()")] - [Version (since = "2.26")] - public interface ProxyResolver : GLib.Object { - public static unowned GLib.ProxyResolver get_default (); - public abstract bool is_supported (); - [CCode (array_length = false, array_null_terminated = true)] - public abstract string[] lookup (string uri, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (array_length = false, array_null_terminated = true)] - public abstract async string[] lookup_async (string uri, GLib.Cancellable? cancellable = null) throws GLib.Error; - } - [CCode (cheader_filename = "gio/gio.h", type_cname = "GRemoteActionGroupInterface", type_id = "g_remote_action_group_get_type ()")] - [Version (since = "2.32")] - public interface RemoteActionGroup : GLib.ActionGroup, GLib.Object { - public abstract void activate_action_full (string action_name, GLib.Variant? parameter, GLib.Variant platform_data); - public abstract void change_action_state_full (string action_name, GLib.Variant value, GLib.Variant platform_data); - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_seekable_get_type ()")] - public interface Seekable : GLib.Object { - public abstract bool can_seek (); - public abstract bool can_truncate (); - public abstract bool seek (int64 offset, GLib.SeekType type, GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract int64 tell (); - [CCode (vfunc_name = "truncate_fn")] - public abstract bool truncate (int64 offset, GLib.Cancellable? cancellable = null) throws GLib.Error; - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_socket_connectable_get_type ()")] - public interface SocketConnectable : GLib.Object { - [Version (since = "2.22")] - public abstract GLib.SocketAddressEnumerator enumerate (); - [Version (since = "2.26")] - public abstract GLib.SocketAddressEnumerator proxy_enumerate (); - [Version (since = "2.48")] - public abstract string to_string (); - } - [CCode (cheader_filename = "gio/gio.h", type_cname = "GTlsBackendInterface", type_id = "g_tls_backend_get_type ()")] - [Version (since = "2.28")] - public interface TlsBackend : GLib.Object { - public abstract GLib.Type get_certificate_type (); - public abstract GLib.Type get_client_connection_type (); - public static unowned GLib.TlsBackend get_default (); - [Version (since = "2.30")] - public abstract GLib.TlsDatabase get_default_database (); - [Version (since = "2.48")] - public GLib.Type get_dtls_client_connection_type (); - [Version (since = "2.48")] - public GLib.Type get_dtls_server_connection_type (); - [Version (since = "2.30")] - public abstract GLib.Type get_file_database_type (); - public abstract GLib.Type get_server_connection_type (); - [Version (since = "2.60")] - public void set_default_database (GLib.TlsDatabase? database); - [Version (since = "2.48")] - public abstract bool supports_dtls (); - public abstract bool supports_tls (); - } - [CCode (cheader_filename = "gio/gio.h", type_cname = "GTlsClientConnectionInterface", type_id = "g_tls_client_connection_get_type ()")] - [Version (since = "2.28")] - public interface TlsClientConnection : GLib.TlsConnection { - [Version (since = "2.46")] - public abstract void copy_session_state (GLib.TlsClientConnection source); - public GLib.List get_accepted_cas (); - public unowned GLib.SocketConnectable get_server_identity (); - [Version (deprecated = true, deprecated_since = "2.56", since = "2.28")] - public bool get_use_ssl3 (); - public GLib.TlsCertificateFlags get_validation_flags (); - public static GLib.TlsClientConnection? @new (GLib.IOStream base_io_stream, GLib.SocketConnectable? server_identity) throws GLib.Error; - public void set_server_identity (GLib.SocketConnectable identity); - [Version (deprecated = true, deprecated_since = "2.56", since = "2.28")] - public void set_use_ssl3 (bool use_ssl3); - public void set_validation_flags (GLib.TlsCertificateFlags flags); - [ConcreteAccessor] - public abstract GLib.List accepted_cas { owned get; } - [ConcreteAccessor] - public abstract GLib.SocketConnectable server_identity { get; set construct; } - [ConcreteAccessor] - [Version (deprecated = true, deprecated_since = "2.56", since = "2.28")] - public abstract bool use_ssl3 { get; set construct; } - [ConcreteAccessor] - public abstract GLib.TlsCertificateFlags validation_flags { get; set construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_cname = "GTlsFileDatabaseInterface", type_id = "g_tls_file_database_get_type ()")] - [Version (since = "2.30")] - public interface TlsFileDatabase : GLib.TlsDatabase { - public static GLib.TlsFileDatabase? @new (string anchors) throws GLib.Error; - [NoAccessorMethod] - public abstract string anchors { owned get; set construct; } - } - [CCode (cheader_filename = "gio/gio.h", type_cname = "GTlsServerConnectionInterface", type_id = "g_tls_server_connection_get_type ()")] - [Version (since = "2.28")] - public interface TlsServerConnection : GLib.TlsConnection { - public static GLib.TlsServerConnection? @new (GLib.IOStream base_io_stream, GLib.TlsCertificate? certificate) throws GLib.Error; - [NoAccessorMethod] - public abstract GLib.TlsAuthenticationMode authentication_mode { get; set; } - } - [CCode (cheader_filename = "gio/gio.h", type_id = "g_volume_get_type ()")] - public interface Volume : GLib.Object { - public abstract bool can_eject (); - public abstract bool can_mount (); - [Version (deprecated = true, deprecated_since = "2.22")] - public abstract async bool eject (GLib.MountUnmountFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; - [Version (since = "2.22")] - public abstract async bool eject_with_operation (GLib.MountUnmountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (array_length = false, array_null_terminated = true)] - public abstract string[] enumerate_identifiers (); - [Version (since = "2.18")] - public abstract GLib.File? get_activation_root (); - public abstract GLib.Drive? get_drive (); - public abstract GLib.Icon get_icon (); - public abstract string? get_identifier (string kind); - public abstract GLib.Mount? get_mount (); - public abstract string get_name (); - [Version (since = "2.32")] - public virtual unowned string? get_sort_key (); - [Version (since = "2.34")] - public abstract GLib.Icon get_symbolic_icon (); - public abstract string? get_uuid (); - [CCode (finish_vfunc_name = "mount_finish", vfunc_name = "mount_fn")] - public abstract async bool mount (GLib.MountMountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable = null) throws GLib.Error; - public abstract bool should_automount (); - public virtual signal void changed (); - public virtual signal void removed (); - } - [CCode (cheader_filename = "gio/gio.h", has_type_id = false)] - public struct ActionEntry { - public weak string name; - [CCode (delegate_target = false)] - public weak GLib.SimpleActionActivateCallback? activate; - public weak string? parameter_type; - public weak string? state; - [CCode (delegate_target = false)] - public weak GLib.SimpleActionChangeStateCallback? change_state; - } - [CCode (cheader_filename = "gio/gio.h", has_type_id = false)] - [Version (since = "2.26")] - public struct DBusErrorEntry { - public int error_code; - public weak string dbus_error_name; - } - [CCode (cheader_filename = "gio/gio.h", has_type_id = false)] - [Version (since = "2.26")] - public struct DBusInterfaceVTable { - [CCode (delegate_target = false)] - public weak GLib.DBusInterfaceMethodCallFunc method_call; - [CCode (delegate_target = false)] - public weak GLib.DBusInterfaceGetPropertyFunc get_property; - [CCode (delegate_target = false)] - public weak GLib.DBusInterfaceSetPropertyFunc set_property; - } - [CCode (cheader_filename = "gio/gio.h", has_type_id = false)] - [Version (since = "2.26")] - public struct DBusSubtreeVTable { - [CCode (delegate_target = false)] - public weak GLib.DBusSubtreeEnumerateFunc enumerate; - [CCode (delegate_target = false)] - public weak GLib.DBusSubtreeIntrospectFunc introspect; - [CCode (delegate_target = false)] - public weak GLib.DBusSubtreeDispatchFunc dispatch; - } - [CCode (cheader_filename = "gio/gio.h", has_type_id = false)] - public struct FileAttributeInfo { - public weak string name; - public GLib.FileAttributeType type; - public GLib.FileAttributeInfoFlags flags; - } - [CCode (cheader_filename = "gio/gio.h", has_type_id = false)] - [Version (since = "2.48")] - public struct InputMessage { - public weak GLib.SocketAddress address; - [CCode (array_length_cname = "num_vectors", array_length_type = "guint")] - public weak GLib.InputVector[] vectors; - public uint num_vectors; - public size_t bytes_received; - public int flags; - public GLib.SocketControlMessage*** control_messages; - public uint* num_control_messages; - } - [CCode (cheader_filename = "gio/gio.h", has_type_id = false)] - [Version (since = "2.22")] - public struct InputVector { - public void* buffer; - public size_t size; - } - [CCode (cheader_filename = "gio/gio.h", has_type_id = false)] - [Version (since = "2.44")] - public struct OutputMessage { - public weak GLib.SocketAddress address; - [CCode (array_length_cname = "num_vectors", array_length_type = "guint")] - public weak GLib.OutputVector[] vectors; - public uint num_vectors; - public uint bytes_sent; - public GLib.SocketControlMessage*** control_messages; - public uint* num_control_messages; - } - [CCode (cheader_filename = "gio/gio.h", has_type_id = false)] - [Version (since = "2.22")] - public struct OutputVector { - public void* buffer; - public size_t size; - } - [CCode (cheader_filename = "gio/gio.h", has_type_id = false)] - public struct StaticResource { - [Version (since = "2.32")] - public void fini (); - [Version (since = "2.32")] - public unowned GLib.Resource get_resource (); - [Version (since = "2.32")] - public void init (); - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_APP_INFO_CREATE_", type_id = "g_app_info_create_flags_get_type ()")] - [Flags] - public enum AppInfoCreateFlags { - NONE, - NEEDS_TERMINAL, - SUPPORTS_URIS, - SUPPORTS_STARTUP_NOTIFICATION - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_APPLICATION_", type_id = "g_application_flags_get_type ()")] - [Flags] - [Version (since = "2.28")] - public enum ApplicationFlags { - FLAGS_NONE, - IS_SERVICE, - IS_LAUNCHER, - HANDLES_OPEN, - HANDLES_COMMAND_LINE, - SEND_ENVIRONMENT, - NON_UNIQUE, - CAN_OVERRIDE_APP_ID, - ALLOW_REPLACEMENT, - REPLACE - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_ASK_PASSWORD_", type_id = "g_ask_password_flags_get_type ()")] - [Flags] - public enum AskPasswordFlags { - NEED_PASSWORD, - NEED_USERNAME, - NEED_DOMAIN, - SAVING_SUPPORTED, - ANONYMOUS_SUPPORTED, - TCRYPT - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_BUS_NAME_OWNER_FLAGS_", type_id = "g_bus_name_owner_flags_get_type ()")] - [Flags] - [Version (since = "2.26")] - public enum BusNameOwnerFlags { - NONE, - ALLOW_REPLACEMENT, - REPLACE, - DO_NOT_QUEUE - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_BUS_NAME_WATCHER_FLAGS_", type_id = "g_bus_name_watcher_flags_get_type ()")] - [Flags] - [Version (since = "2.26")] - public enum BusNameWatcherFlags { - NONE, - AUTO_START - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_BUS_TYPE_", type_id = "g_bus_type_get_type ()")] - [Version (since = "2.26")] - public enum BusType { - STARTER, - NONE, - SYSTEM, - SESSION; - [CCode (cheader_filename = "gio/gio.h", cname = "g_dbus_address_get_for_bus_sync")] - public static string get_address_sync (GLib.BusType bus_type, GLib.Cancellable? cancellable = null) throws GLib.Error; - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_CONVERTER_", type_id = "g_converter_flags_get_type ()")] - [Flags] - [Version (since = "2.24")] - public enum ConverterFlags { - [CCode (cname = "G_CONVERTER_NO_FLAGS")] - NONE, - INPUT_AT_END, - FLUSH - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_CONVERTER_", type_id = "g_converter_result_get_type ()")] - [Version (since = "2.24")] - public enum ConverterResult { - ERROR, - CONVERTED, - FINISHED, - FLUSHED - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_CREDENTIALS_TYPE_", type_id = "g_credentials_type_get_type ()")] - [Version (since = "2.26")] - public enum CredentialsType { - INVALID, - LINUX_UCRED, - FREEBSD_CMSGCRED, - OPENBSD_SOCKPEERCRED, - SOLARIS_UCRED, - NETBSD_UNPCBID - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_DBUS_CALL_FLAGS_", type_id = "g_dbus_call_flags_get_type ()")] - [Flags] - [Version (since = "2.26")] - public enum DBusCallFlags { - NONE, - NO_AUTO_START, - ALLOW_INTERACTIVE_AUTHORIZATION - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_DBUS_CAPABILITY_FLAGS_", type_id = "g_dbus_capability_flags_get_type ()")] - [Flags] - [Version (since = "2.26")] - public enum DBusCapabilityFlags { - NONE, - UNIX_FD_PASSING - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_DBUS_CONNECTION_FLAGS_", type_id = "g_dbus_connection_flags_get_type ()")] - [Flags] - [Version (since = "2.26")] - public enum DBusConnectionFlags { - NONE, - AUTHENTICATION_CLIENT, - AUTHENTICATION_SERVER, - AUTHENTICATION_ALLOW_ANONYMOUS, - MESSAGE_BUS_CONNECTION, - DELAY_MESSAGE_PROCESSING - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_DBUS_INTERFACE_SKELETON_FLAGS_", type_id = "g_dbus_interface_skeleton_flags_get_type ()")] - [Flags] - [Version (since = "2.30")] - public enum DBusInterfaceSkeletonFlags { - NONE, - HANDLE_METHOD_INVOCATIONS_IN_THREAD - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_DBUS_MESSAGE_BYTE_ORDER_", type_id = "g_dbus_message_byte_order_get_type ()")] - [Version (since = "2.26")] - public enum DBusMessageByteOrder { - BIG_ENDIAN, - LITTLE_ENDIAN - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_DBUS_MESSAGE_FLAGS_", type_id = "g_dbus_message_flags_get_type ()")] - [Flags] - [Version (since = "2.26")] - public enum DBusMessageFlags { - NONE, - NO_REPLY_EXPECTED, - NO_AUTO_START, - ALLOW_INTERACTIVE_AUTHORIZATION - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_DBUS_MESSAGE_HEADER_FIELD_", type_id = "g_dbus_message_header_field_get_type ()")] - [Version (since = "2.26")] - public enum DBusMessageHeaderField { - INVALID, - PATH, - INTERFACE, - MEMBER, - ERROR_NAME, - REPLY_SERIAL, - DESTINATION, - SENDER, - SIGNATURE, - NUM_UNIX_FDS - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_DBUS_MESSAGE_TYPE_", type_id = "g_dbus_message_type_get_type ()")] - [Version (since = "2.26")] - public enum DBusMessageType { - INVALID, - METHOD_CALL, - METHOD_RETURN, - ERROR, - SIGNAL - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_", type_id = "g_dbus_object_manager_client_flags_get_type ()")] - [Flags] - [Version (since = "2.30")] - public enum DBusObjectManagerClientFlags { - NONE, - DO_NOT_AUTO_START - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_DBUS_PROPERTY_INFO_FLAGS_", type_id = "g_dbus_property_info_flags_get_type ()")] - [Flags] - [Version (since = "2.26")] - public enum DBusPropertyInfoFlags { - NONE, - READABLE, - WRITABLE - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_DBUS_PROXY_FLAGS_", type_id = "g_dbus_proxy_flags_get_type ()")] - [Flags] - [Version (since = "2.26")] - public enum DBusProxyFlags { - NONE, - DO_NOT_LOAD_PROPERTIES, - DO_NOT_CONNECT_SIGNALS, - DO_NOT_AUTO_START, - GET_INVALIDATED_PROPERTIES, - DO_NOT_AUTO_START_AT_CONSTRUCTION - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_DBUS_SEND_MESSAGE_FLAGS_", type_id = "g_dbus_send_message_flags_get_type ()")] - [Flags] - [Version (since = "2.26")] - public enum DBusSendMessageFlags { - NONE, - PRESERVE_SERIAL - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_DBUS_SERVER_FLAGS_", type_id = "g_dbus_server_flags_get_type ()")] - [Flags] - [Version (since = "2.26")] - public enum DBusServerFlags { - NONE, - RUN_IN_THREAD, - AUTHENTICATION_ALLOW_ANONYMOUS - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_DBUS_SIGNAL_FLAGS_", type_id = "g_dbus_signal_flags_get_type ()")] - [Flags] - [Version (since = "2.26")] - public enum DBusSignalFlags { - NONE, - NO_MATCH_RULE, - MATCH_ARG0_NAMESPACE, - MATCH_ARG0_PATH - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_DBUS_SUBTREE_FLAGS_", type_id = "g_dbus_subtree_flags_get_type ()")] - [Flags] - [Version (since = "2.26")] - public enum DBusSubtreeFlags { - NONE, - DISPATCH_TO_UNENUMERATED_NODES - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_DATA_STREAM_BYTE_ORDER_", type_id = "g_data_stream_byte_order_get_type ()")] - public enum DataStreamByteOrder { - BIG_ENDIAN, - LITTLE_ENDIAN, - HOST_ENDIAN - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_DATA_STREAM_NEWLINE_TYPE_", type_id = "g_data_stream_newline_type_get_type ()")] - public enum DataStreamNewlineType { - LF, - CR, - CR_LF, - ANY - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_DRIVE_START_", type_id = "g_drive_start_flags_get_type ()")] - [Flags] - [Version (since = "2.22")] - public enum DriveStartFlags { - NONE - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_DRIVE_START_STOP_TYPE_", type_id = "g_drive_start_stop_type_get_type ()")] - [Version (since = "2.22")] - public enum DriveStartStopType { - UNKNOWN, - SHUTDOWN, - NETWORK, - MULTIDISK, - PASSWORD - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_EMBLEM_ORIGIN_", type_id = "g_emblem_origin_get_type ()")] - [Version (since = "2.18")] - public enum EmblemOrigin { - UNKNOWN, - DEVICE, - LIVEMETADATA, - TAG - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_FILE_ATTRIBUTE_INFO_", type_id = "g_file_attribute_info_flags_get_type ()")] - [Flags] - public enum FileAttributeInfoFlags { - NONE, - COPY_WITH_FILE, - COPY_WHEN_MOVED - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_FILE_ATTRIBUTE_STATUS_", type_id = "g_file_attribute_status_get_type ()")] - public enum FileAttributeStatus { - UNSET, - SET, - ERROR_SETTING - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_FILE_ATTRIBUTE_TYPE_", type_id = "g_file_attribute_type_get_type ()")] - public enum FileAttributeType { - INVALID, - STRING, - BYTE_STRING, - BOOLEAN, - UINT32, - INT32, - UINT64, - INT64, - OBJECT, - STRINGV - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_FILE_COPY_", type_id = "g_file_copy_flags_get_type ()")] - [Flags] - public enum FileCopyFlags { - NONE, - OVERWRITE, - BACKUP, - NOFOLLOW_SYMLINKS, - ALL_METADATA, - NO_FALLBACK_FOR_MOVE, - TARGET_DEFAULT_PERMS - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_FILE_CREATE_", type_id = "g_file_create_flags_get_type ()")] - [Flags] - public enum FileCreateFlags { - NONE, - PRIVATE, - REPLACE_DESTINATION - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_FILE_MEASURE_", type_id = "g_file_measure_flags_get_type ()")] - [Flags] - [Version (since = "2.38")] - public enum FileMeasureFlags { - NONE, - REPORT_ANY_ERROR, - APPARENT_SIZE, - NO_XDEV - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_FILE_MONITOR_EVENT_", type_id = "g_file_monitor_event_get_type ()")] - public enum FileMonitorEvent { - CHANGED, - CHANGES_DONE_HINT, - DELETED, - CREATED, - ATTRIBUTE_CHANGED, - PRE_UNMOUNT, - UNMOUNTED, - MOVED, - RENAMED, - MOVED_IN, - MOVED_OUT - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_FILE_MONITOR_", type_id = "g_file_monitor_flags_get_type ()")] - [Flags] - public enum FileMonitorFlags { - NONE, - WATCH_MOUNTS, - SEND_MOVED, - WATCH_HARD_LINKS, - WATCH_MOVES - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_FILE_QUERY_INFO_", type_id = "g_file_query_info_flags_get_type ()")] - [Flags] - public enum FileQueryInfoFlags { - NONE, - NOFOLLOW_SYMLINKS - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_FILE_TYPE_", type_id = "g_file_type_get_type ()")] - public enum FileType { - UNKNOWN, - REGULAR, - DIRECTORY, - SYMBOLIC_LINK, - SPECIAL, - SHORTCUT, - MOUNTABLE - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_FILESYSTEM_PREVIEW_TYPE_", type_id = "g_filesystem_preview_type_get_type ()")] - public enum FilesystemPreviewType { - IF_ALWAYS, - IF_LOCAL, - NEVER - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_IO_MODULE_SCOPE_", type_id = "g_io_module_scope_flags_get_type ()")] - [Version (since = "2.30")] - public enum IOModuleScopeFlags { - NONE, - BLOCK_DUPLICATES - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_IO_STREAM_SPLICE_", type_id = "g_io_stream_splice_flags_get_type ()")] - [Flags] - [Version (since = "2.28")] - public enum IOStreamSpliceFlags { - NONE, - CLOSE_STREAM1, - CLOSE_STREAM2, - WAIT_FOR_BOTH - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_MEMORY_MONITOR_WARNING_LEVEL_", type_id = "g_memory_monitor_warning_level_get_type ()")] - [Version (since = "2.64")] - public enum MemoryMonitorWarningLevel { - LOW, - MEDIUM, - CRITICAL - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_MOUNT_MOUNT_", type_id = "g_mount_mount_flags_get_type ()")] - [Flags] - public enum MountMountFlags { - NONE - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_MOUNT_OPERATION_", type_id = "g_mount_operation_result_get_type ()")] - public enum MountOperationResult { - HANDLED, - ABORTED, - UNHANDLED - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_MOUNT_UNMOUNT_", type_id = "g_mount_unmount_flags_get_type ()")] - [Flags] - public enum MountUnmountFlags { - NONE, - FORCE - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_NETWORK_CONNECTIVITY_", type_id = "g_network_connectivity_get_type ()")] - [Version (since = "2.44")] - public enum NetworkConnectivity { - LOCAL, - LIMITED, - PORTAL, - FULL - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_NOTIFICATION_PRIORITY_", type_id = "g_notification_priority_get_type ()")] - [Version (since = "2.42")] - public enum NotificationPriority { - NORMAL, - LOW, - HIGH, - URGENT - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_OUTPUT_STREAM_SPLICE_", type_id = "g_output_stream_splice_flags_get_type ()")] - [Flags] - public enum OutputStreamSpliceFlags { - NONE, - CLOSE_SOURCE, - CLOSE_TARGET - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_PASSWORD_SAVE_", type_id = "g_password_save_get_type ()")] - public enum PasswordSave { - NEVER, - FOR_SESSION, - PERMANENTLY - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_POLLABLE_RETURN_", type_id = "g_pollable_return_get_type ()")] - [Version (since = "2.60")] - public enum PollableReturn { - FAILED, - OK, - WOULD_BLOCK - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_RESOLVER_NAME_LOOKUP_FLAGS_", type_id = "g_resolver_name_lookup_flags_get_type ()")] - [Flags] - [Version (since = "2.60")] - public enum ResolverNameLookupFlags { - DEFAULT, - IPV4_ONLY, - IPV6_ONLY - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_RESOLVER_RECORD_", type_id = "g_resolver_record_type_get_type ()")] - [Version (since = "2.34")] - public enum ResolverRecordType { - SRV, - MX, - TXT, - SOA, - NS - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_RESOURCE_FLAGS_", type_id = "g_resource_flags_get_type ()")] - [Flags] - [Version (since = "2.32")] - public enum ResourceFlags { - NONE, - COMPRESSED - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_RESOURCE_LOOKUP_FLAGS_", type_id = "g_resource_lookup_flags_get_type ()")] - [Flags] - [Version (since = "2.32")] - public enum ResourceLookupFlags { - NONE - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_SETTINGS_BIND_", type_id = "g_settings_bind_flags_get_type ()")] - [Flags] - public enum SettingsBindFlags { - DEFAULT, - GET, - SET, - NO_SENSITIVITY, - GET_NO_CHANGES, - INVERT_BOOLEAN - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_SOCKET_CLIENT_", type_id = "g_socket_client_event_get_type ()")] - [Version (since = "2.32")] - public enum SocketClientEvent { - RESOLVING, - RESOLVED, - CONNECTING, - CONNECTED, - PROXY_NEGOTIATING, - PROXY_NEGOTIATED, - TLS_HANDSHAKING, - TLS_HANDSHAKED, - COMPLETE - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_SOCKET_FAMILY_", type_id = "g_socket_family_get_type ()")] - [Version (since = "2.22")] - public enum SocketFamily { - INVALID, - UNIX, - IPV4, - IPV6 - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_SOCKET_LISTENER_", type_id = "g_socket_listener_event_get_type ()")] - [Version (since = "2.46")] - public enum SocketListenerEvent { - BINDING, - BOUND, - LISTENING, - LISTENED - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_SOCKET_MSG_", type_id = "g_socket_msg_flags_get_type ()")] - [Flags] - [Version (since = "2.22")] - public enum SocketMsgFlags { - NONE, - OOB, - PEEK, - DONTROUTE - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_SOCKET_PROTOCOL_", type_id = "g_socket_protocol_get_type ()")] - [Version (since = "2.22")] - public enum SocketProtocol { - UNKNOWN, - DEFAULT, - TCP, - UDP, - SCTP - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_SOCKET_TYPE_", type_id = "g_socket_type_get_type ()")] - [Version (since = "2.22")] - public enum SocketType { - INVALID, - STREAM, - DATAGRAM, - SEQPACKET - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_SUBPROCESS_FLAGS_", type_id = "g_subprocess_flags_get_type ()")] - [Flags] - [Version (since = "2.40")] - public enum SubprocessFlags { - NONE, - STDIN_PIPE, - STDIN_INHERIT, - STDOUT_PIPE, - STDOUT_SILENCE, - STDERR_PIPE, - STDERR_SILENCE, - STDERR_MERGE, - INHERIT_FDS - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_TEST_DBUS_", type_id = "g_test_dbus_flags_get_type ()")] - [Flags] - [Version (since = "2.34")] - public enum TestDBusFlags { - NONE - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_TLS_AUTHENTICATION_", type_id = "g_tls_authentication_mode_get_type ()")] - [Version (since = "2.28")] - public enum TlsAuthenticationMode { - NONE, - REQUESTED, - REQUIRED - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_TLS_CERTIFICATE_", type_id = "g_tls_certificate_flags_get_type ()")] - [Flags] - [Version (since = "2.28")] - public enum TlsCertificateFlags { - UNKNOWN_CA, - BAD_IDENTITY, - NOT_ACTIVATED, - EXPIRED, - REVOKED, - INSECURE, - GENERIC_ERROR, - VALIDATE_ALL - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_TLS_CERTIFICATE_REQUEST_", type_id = "g_tls_certificate_request_flags_get_type ()")] - [Version (since = "2.40")] - public enum TlsCertificateRequestFlags { - NONE - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_TLS_DATABASE_LOOKUP_", type_id = "g_tls_database_lookup_flags_get_type ()")] - [Version (since = "2.30")] - public enum TlsDatabaseLookupFlags { - NONE, - KEYPAIR - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_TLS_DATABASE_VERIFY_", type_id = "g_tls_database_verify_flags_get_type ()")] - [Flags] - [Version (since = "2.30")] - public enum TlsDatabaseVerifyFlags { - NONE - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_TLS_INTERACTION_", type_id = "g_tls_interaction_result_get_type ()")] - [Version (since = "2.30")] - public enum TlsInteractionResult { - UNHANDLED, - HANDLED, - FAILED - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_TLS_PASSWORD_", type_id = "g_tls_password_flags_get_type ()")] - [Flags] - [Version (since = "2.30")] - public enum TlsPasswordFlags { - NONE, - RETRY, - MANY_TRIES, - FINAL_TRY - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_TLS_REHANDSHAKE_", type_id = "g_tls_rehandshake_mode_get_type ()")] - [Version (deprecated = true, deprecated_since = "2.60.", since = "2.28")] - public enum TlsRehandshakeMode { - NEVER, - SAFELY, - UNSAFELY - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_UNIX_SOCKET_ADDRESS_", type_id = "g_unix_socket_address_type_get_type ()")] - [Version (since = "2.26")] - public enum UnixSocketAddressType { - INVALID, - ANONYMOUS, - PATH, - ABSTRACT, - ABSTRACT_PADDED - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_ZLIB_COMPRESSOR_FORMAT_", type_id = "g_zlib_compressor_format_get_type ()")] - [Version (since = "2.24")] - public enum ZlibCompressorFormat { - ZLIB, - GZIP, - RAW - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_DBUS_ERROR_")] - [Version (since = "2.26")] - public errordomain DBusError { - FAILED, - NO_MEMORY, - SERVICE_UNKNOWN, - NAME_HAS_NO_OWNER, - NO_REPLY, - IO_ERROR, - BAD_ADDRESS, - NOT_SUPPORTED, - LIMITS_EXCEEDED, - ACCESS_DENIED, - AUTH_FAILED, - NO_SERVER, - TIMEOUT, - NO_NETWORK, - ADDRESS_IN_USE, - DISCONNECTED, - INVALID_ARGS, - FILE_NOT_FOUND, - FILE_EXISTS, - UNKNOWN_METHOD, - TIMED_OUT, - MATCH_RULE_NOT_FOUND, - MATCH_RULE_INVALID, - SPAWN_EXEC_FAILED, - SPAWN_FORK_FAILED, - SPAWN_CHILD_EXITED, - SPAWN_CHILD_SIGNALED, - SPAWN_FAILED, - SPAWN_SETUP_FAILED, - SPAWN_CONFIG_INVALID, - SPAWN_SERVICE_INVALID, - SPAWN_SERVICE_NOT_FOUND, - SPAWN_PERMISSIONS_INVALID, - SPAWN_FILE_INVALID, - SPAWN_NO_MEMORY, - UNIX_PROCESS_ID_UNKNOWN, - INVALID_SIGNATURE, - INVALID_FILE_CONTENT, - SELINUX_SECURITY_CONTEXT_UNKNOWN, - ADT_AUDIT_DATA_UNKNOWN, - OBJECT_PATH_IN_USE, - UNKNOWN_OBJECT, - UNKNOWN_INTERFACE, - UNKNOWN_PROPERTY, - PROPERTY_READ_ONLY; - [CCode (cheader_filename = "gio/gio.h")] - public static string encode_gerror (GLib.Error error); - [CCode (cheader_filename = "gio/gio.h")] - public static string get_remote_error (GLib.Error error); - [CCode (cheader_filename = "gio/gio.h")] - public static bool is_remote_error (GLib.Error error); - [CCode (cheader_filename = "gio/gio.h")] - public static GLib.Error new_for_dbus_error (string dbus_error_name, string dbus_error_message); - [CCode (cheader_filename = "gio/gio.h")] - public static GLib.Quark quark (); - [CCode (cheader_filename = "gio/gio.h")] - public static bool register_error (GLib.Quark error_domain, int error_code, string dbus_error_name); - [CCode (cheader_filename = "gio/gio.h")] - public static void register_error_domain (string error_domain_quark_name, size_t quark_volatile, [CCode (array_length_cname = "num_entries", array_length_pos = 3.1, array_length_type = "guint")] GLib.DBusErrorEntry[] entries); - [CCode (cheader_filename = "gio/gio.h")] - public static bool strip_remote_error (GLib.Error error); - [CCode (cheader_filename = "gio/gio.h")] - public static bool unregister_error (GLib.Quark error_domain, int error_code, string dbus_error_name); - } - [CCode (cheader_filename = "gio/gio.h", cname = "GIOErrorEnum", cprefix = "G_IO_ERROR_")] - [GIR (name = "IOErrorEnum")] - public errordomain IOError { - FAILED, - NOT_FOUND, - EXISTS, - IS_DIRECTORY, - NOT_DIRECTORY, - NOT_EMPTY, - NOT_REGULAR_FILE, - NOT_SYMBOLIC_LINK, - NOT_MOUNTABLE_FILE, - FILENAME_TOO_LONG, - INVALID_FILENAME, - TOO_MANY_LINKS, - NO_SPACE, - INVALID_ARGUMENT, - PERMISSION_DENIED, - NOT_SUPPORTED, - NOT_MOUNTED, - ALREADY_MOUNTED, - CLOSED, - CANCELLED, - PENDING, - READ_ONLY, - CANT_CREATE_BACKUP, - WRONG_ETAG, - TIMED_OUT, - WOULD_RECURSE, - BUSY, - WOULD_BLOCK, - HOST_NOT_FOUND, - WOULD_MERGE, - FAILED_HANDLED, - TOO_MANY_OPEN_FILES, - NOT_INITIALIZED, - ADDRESS_IN_USE, - PARTIAL_INPUT, - INVALID_DATA, - DBUS_ERROR, - HOST_UNREACHABLE, - NETWORK_UNREACHABLE, - CONNECTION_REFUSED, - PROXY_FAILED, - PROXY_AUTH_FAILED, - PROXY_NEED_AUTH, - PROXY_NOT_ALLOWED, - BROKEN_PIPE, - CONNECTION_CLOSED, - NOT_CONNECTED, - MESSAGE_TOO_LARGE; - [CCode (cname = "vala_g_io_error_from_errno")] - public static GLib.IOError from_errno (int err_no) { - return (GLib.IOError) new GLib.Error (GLib.IOError.quark (), GLib.IOError._from_errno (err_no), "%s", GLib.strerror (err_no)); - } - [CCode (cname = "g_io_error_from_win32_error")] - public static int _from_win32_error (int error_code); - [CCode (cname = "vala_g_io_error_from_win32_error")] - public static GLib.IOError from_win32_error (int error_code) { - return (GLib.IOError) new GLib.Error (GLib.IOError.quark (), GLib.IOError._from_win32_error (error_code), "%s", GLib.Win32.error_message (error_code)); - } - [CCode (cheader_filename = "gio/gio.h", cname = "g_io_error_from_errno")] - public static int _from_errno (int err_no); - [CCode (cheader_filename = "gio/gio.h")] - public static GLib.Quark quark (); - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_RESOLVER_ERROR_")] - [Version (since = "2.22")] - public errordomain ResolverError { - NOT_FOUND, - TEMPORARY_FAILURE, - INTERNAL; - [CCode (cheader_filename = "gio/gio.h")] - public static GLib.Quark quark (); - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_RESOURCE_ERROR_")] - [Version (since = "2.32")] - public errordomain ResourceError { - NOT_FOUND, - INTERNAL; - [CCode (cheader_filename = "gio/gio.h")] - public static GLib.Quark quark (); - } - [CCode (cheader_filename = "gio/gio.h", cprefix = "G_TLS_ERROR_")] - [Version (since = "2.28")] - public errordomain TlsError { - UNAVAILABLE, - MISC, - BAD_CERTIFICATE, - NOT_TLS, - HANDSHAKE, - CERTIFICATE_REQUIRED, - EOF, - INAPPROPRIATE_FALLBACK - } - [CCode (cheader_filename = "gio/gio.h", instance_pos = 2.9)] - public delegate void AsyncReadyCallback (GLib.Object? source_object, GLib.AsyncResult res); - [CCode (cheader_filename = "gio/gio.h", instance_pos = 2.9)] - [Version (since = "2.26")] - public delegate void BusAcquiredCallback (GLib.DBusConnection connection, string name); - [CCode (cheader_filename = "gio/gio.h", instance_pos = 2.9)] - [Version (since = "2.26")] - public delegate void BusNameAcquiredCallback (GLib.DBusConnection connection, string name); - [CCode (cheader_filename = "gio/gio.h", instance_pos = 3.9)] - [Version (since = "2.26")] - public delegate void BusNameAppearedCallback (GLib.DBusConnection connection, string name, string name_owner); - [CCode (cheader_filename = "gio/gio.h", instance_pos = 2.9)] - [Version (since = "2.26")] - public delegate void BusNameLostCallback (GLib.DBusConnection connection, string name); - [CCode (cheader_filename = "gio/gio.h", instance_pos = 2.9)] - [Version (since = "2.26")] - public delegate void BusNameVanishedCallback (GLib.DBusConnection connection, string name); - [CCode (cheader_filename = "gio/gio.h", instance_pos = 1.9)] - [Version (since = "2.28")] - public delegate bool CancellableSourceFunc (GLib.Cancellable? cancellable = null); - [CCode (cheader_filename = "gio/gio.h", error_pos = 5.8, instance_pos = 5.9)] - [Version (since = "2.26")] - public delegate GLib.Variant DBusInterfaceGetPropertyFunc (GLib.DBusConnection connection, string sender, string object_path, string interface_name, string property_name) throws GLib.Error; - [CCode (cheader_filename = "gio/gio.h", instance_pos = 7.9)] - [Version (since = "2.26")] - public delegate void DBusInterfaceMethodCallFunc (GLib.DBusConnection connection, string sender, string object_path, string interface_name, string method_name, GLib.Variant parameters, owned GLib.DBusMethodInvocation invocation); - [CCode (cheader_filename = "gio/gio.h", error_pos = 6.8, instance_pos = 6.9)] - [Version (since = "2.26")] - public delegate bool DBusInterfaceSetPropertyFunc (GLib.DBusConnection connection, string sender, string object_path, string interface_name, string property_name, GLib.Variant value) throws GLib.Error; - [CCode (cheader_filename = "gio/gio.h", instance_pos = 3.9)] - [Version (since = "2.26")] - public delegate GLib.DBusMessage? DBusMessageFilterFunction (GLib.DBusConnection connection, owned GLib.DBusMessage message, bool incoming); - [CCode (cheader_filename = "gio/gio.h", instance_pos = 3.9)] - [Version (since = "2.30")] - public delegate GLib.Type DBusProxyTypeFunc (GLib.DBusObjectManagerClient manager, string object_path, string? interface_name); - [CCode (cheader_filename = "gio/gio.h", instance_pos = 6.9)] - [Version (since = "2.26")] - public delegate void DBusSignalCallback (GLib.DBusConnection connection, string sender_name, string object_path, string interface_name, string signal_name, GLib.Variant parameters); - [CCode (cheader_filename = "gio/gio.h", instance_pos = 6.9)] - [Version (since = "2.26")] - public delegate unowned GLib.DBusInterfaceVTable? DBusSubtreeDispatchFunc (GLib.DBusConnection connection, string sender, string object_path, string interface_name, string node, void* out_user_data); - [CCode (array_length = false, array_null_terminated = true, cheader_filename = "gio/gio.h", instance_pos = 3.9)] - [Version (since = "2.26")] - public delegate string[] DBusSubtreeEnumerateFunc (GLib.DBusConnection connection, string sender, string object_path); - [CCode (cheader_filename = "gio/gio.h", instance_pos = 4.9)] - [Version (since = "2.26")] - public delegate GLib.DBusInterfaceInfo DBusSubtreeIntrospectFunc (GLib.DBusConnection connection, string sender, string object_path, string node); - [CCode (cheader_filename = "gio/gio.h", instance_pos = 2.9)] - [Version (since = "2.48")] - public delegate bool DatagramBasedSourceFunc (GLib.DatagramBased datagram_based, GLib.IOCondition condition); - [CCode (cheader_filename = "gio/gio.h", instance_pos = 4.9)] - [Version (since = "2.38")] - public delegate void FileMeasureProgressCallback (bool reporting, uint64 current_size, uint64 num_dirs, uint64 num_files); - [CCode (cheader_filename = "gio/gio.h", instance_pos = 2.9)] - public delegate void FileProgressCallback (int64 current_num_bytes, int64 total_num_bytes); - [CCode (cheader_filename = "gio/gio.h", instance_pos = 2.9)] - public delegate bool FileReadMoreCallback (string file_contents, int64 file_size); - [CCode (cheader_filename = "gio/gio.h", instance_pos = 2.9)] - public delegate bool IOSchedulerJobFunc (GLib.IOSchedulerJob job, GLib.Cancellable? cancellable = null); - [CCode (cheader_filename = "gio/gio.h", instance_pos = 1.9)] - [Version (since = "2.28")] - public delegate bool PollableSourceFunc (GLib.Object pollable_stream); - [CCode (cheader_filename = "gio/gio.h", has_target = false)] - public delegate void* ReallocFunc (void* data, size_t size); - [CCode (cheader_filename = "gio/gio.h", instance_pos = 2.9)] - public delegate bool SettingsBindGetMapping (GLib.Value value, GLib.Variant variant); - [CCode (cheader_filename = "gio/gio.h", cname = "GSettingsBindGetMapping", has_target = false)] - public delegate bool SettingsBindGetMappingShared (GLib.Value value, GLib.Variant variant, void* user_data); - [CCode (cheader_filename = "gio/gio.h", instance_pos = 2.9)] - public delegate GLib.Variant SettingsBindSetMapping (GLib.Value value, GLib.VariantType expected_type); - [CCode (cheader_filename = "gio/gio.h", cname = "GSettingsBindSetMapping", has_target = false)] - public delegate GLib.Variant SettingsBindSetMappingShared (GLib.Value value, GLib.VariantType expected_type, void* user_data); - [CCode (cheader_filename = "gio/gio.h", instance_pos = 2.9)] - public delegate bool SettingsGetMapping (GLib.Variant value, out void* result); - [CCode (cheader_filename = "gio/gio.h")] - public delegate void SimpleActionActivateCallback (GLib.SimpleAction action, GLib.Variant? parameter); - [CCode (cheader_filename = "gio/gio.h")] - public delegate void SimpleActionChangeStateCallback (GLib.SimpleAction action, GLib.Variant value); - [CCode (cheader_filename = "gio/gio.h", has_target = false)] - public delegate void SimpleAsyncThreadFunc (GLib.SimpleAsyncResult res, GLib.Object object, GLib.Cancellable? cancellable = null); - [CCode (cheader_filename = "gio/gio.h", instance_pos = 2.9)] - [Version (since = "2.22")] - public delegate bool SocketSourceFunc (GLib.Socket socket, GLib.IOCondition condition); - [CCode (cheader_filename = "gio/gio.h", cname = "GAsyncReadyCallback", instance_pos = 2.9)] - public delegate void TaskReadyCallback (GLib.Object? source_object, GLib.Task task); - [CCode (cheader_filename = "gio/gio.h", cname = "GSourceFunc", has_target = false)] - public delegate bool TaskSourceFunc (GLib.Task task); - [CCode (cheader_filename = "gio/gio.h", has_target = false)] - [Version (since = "2.36")] - public delegate void TaskThreadFunc (GLib.Task task, GLib.Object source_object, void* task_data, GLib.Cancellable? cancellable = null); - [CCode (cheader_filename = "gio/gio.h", instance_pos = 2.9)] - [Version (since = "2.50")] - public delegate GLib.File VfsFileLookupFunc (GLib.Vfs vfs, string identifier); - [CCode (cheader_filename = "glib.h", cname = "g_realloc")] - public static GLib.ReallocFunc g_realloc; - [CCode (cheader_filename = "gio/gio.h", cname = "G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE")] - [Version (since = "2.58")] - public const string DRIVE_IDENTIFIER_KIND_UNIX_DEVICE; - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.38")] - public static bool action_name_is_valid (string action_name); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.38")] - public static bool action_parse_detailed_name (string detailed_name, out string action_name, out GLib.Variant target_value) throws GLib.Error; - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.38")] - public static string action_print_detailed_name (string action_name, GLib.Variant? target_value); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.48")] - public static GLib.DtlsClientConnection dtls_client_connection_new (GLib.DatagramBased base_socket, GLib.SocketConnectable? server_identity) throws GLib.Error; - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.48")] - public static GLib.DtlsServerConnection dtls_server_connection_new (GLib.DatagramBased base_socket, GLib.TlsCertificate? certificate) throws GLib.Error; - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.64")] - public static GLib.MemoryMonitor memory_monitor_dup_default (); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.36")] - public static void networking_init (); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.34")] - public static ssize_t pollable_stream_read (GLib.InputStream stream, [CCode (array_length_cname = "count", array_length_pos = 2.5, array_length_type = "gsize")] uint8[] buffer, bool blocking, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.34")] - public static ssize_t pollable_stream_write (GLib.OutputStream stream, [CCode (array_length_cname = "count", array_length_pos = 2.5, array_length_type = "gsize")] uint8[] buffer, bool blocking, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.34")] - public static bool pollable_stream_write_all (GLib.OutputStream stream, [CCode (array_length_cname = "count", array_length_pos = 2.5, array_length_type = "gsize")] uint8[] buffer, bool blocking, out size_t bytes_written, GLib.Cancellable? cancellable = null) throws GLib.Error; - [CCode (array_length = false, array_null_terminated = true, cheader_filename = "gio/gio.h")] - [Version (since = "2.32")] - public static string[] resources_enumerate_children (string path, GLib.ResourceLookupFlags lookup_flags) throws GLib.Error; - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.32")] - public static bool resources_get_info (string path, GLib.ResourceLookupFlags lookup_flags, out size_t size, out uint32 flags) throws GLib.Error; - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.32")] - public static GLib.Bytes resources_lookup_data (string path, GLib.ResourceLookupFlags lookup_flags) throws GLib.Error; - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.32")] - public static GLib.InputStream resources_open_stream (string path, GLib.ResourceLookupFlags lookup_flags) throws GLib.Error; - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.32")] - public static void resources_register (GLib.Resource resource); - [CCode (cheader_filename = "gio/gio.h")] - [Version (since = "2.32")] - public static void resources_unregister (GLib.Resource resource); -} diff --git a/vapi/gio-unix-2.0.deps b/vapi/gio-unix-2.0.deps deleted file mode 100644 index cd10dfde4..000000000 --- a/vapi/gio-unix-2.0.deps +++ /dev/null @@ -1 +0,0 @@ -gio-2.0 diff --git a/vapi/gio-unix-2.0.vapi b/vapi/gio-unix-2.0.vapi deleted file mode 100644 index 64d446142..000000000 --- a/vapi/gio-unix-2.0.vapi +++ /dev/null @@ -1,189 +0,0 @@ -/* gio-unix-2.0.vapi generated by vapigen, do not modify. */ - -[CCode (cprefix = "G", lower_case_cprefix = "g_")] -namespace GLib { - [CCode (cheader_filename = "gio/gdesktopappinfo.h")] - public class DesktopAppInfo : GLib.Object, GLib.AppInfo { - [CCode (has_construct_function = false)] - public DesktopAppInfo (string desktop_id); - [CCode (has_construct_function = false)] - public DesktopAppInfo.from_filename (string filename); - [CCode (has_construct_function = false)] - public DesktopAppInfo.from_keyfile (GLib.KeyFile key_file); - public string get_action_name (string action_name); - public bool get_boolean (string key); - public unowned string get_categories (); - public unowned string get_filename (); - public unowned string get_generic_name (); - public static GLib.List get_implementations (string @interface); - public bool get_is_hidden (); - [CCode (array_length = false, array_null_terminated = true)] - public unowned string[] get_keywords (); - public string? get_locale_string (string key); - public bool get_nodisplay (); - public bool get_show_in (string desktop_env); - public unowned string get_startup_wm_class (); - public string get_string (string key); - [CCode (array_length_type = "gsize")] - public string[] get_string_list (string key); - public bool has_key (string key); - public void launch_action (string action_name, GLib.AppLaunchContext launch_context); - public bool launch_uris_as_manager (GLib.List uris, GLib.AppLaunchContext? launch_context, GLib.SpawnFlags spawn_flags, GLib.SpawnChildSetupFunc? user_setup = null, GLib.DesktopAppLaunchCallback? pid_callback = null) throws GLib.Error; - public bool launch_uris_as_manager_with_fds (GLib.List uris, GLib.AppLaunchContext? launch_context, GLib.SpawnFlags spawn_flags, GLib.SpawnChildSetupFunc? user_setup = null, GLib.DesktopAppLaunchCallback? pid_callback = null, int stdin_fd = -1, int stdout_fd = -1, int stderr_fd = -1) throws GLib.Error; - [CCode (array_length = false, array_null_terminated = true)] - public unowned string[] list_actions (); - [CCode (array_length = false, array_null_terminated = true)] - public static string**[] search (string search_string); - public static void set_desktop_env (string desktop_env); - public string filename { get; construct; } - } - [CCode (cheader_filename = "gio/gunixconnection.h")] - public class UnixConnection : GLib.SocketConnection { - [CCode (has_construct_function = false)] - protected UnixConnection (); - public GLib.Credentials receive_credentials (GLib.Cancellable? cancellable = null) throws GLib.Error; - public async GLib.Credentials receive_credentials_async (GLib.Cancellable? cancellable = null) throws GLib.Error; - public int receive_fd (GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool send_credentials (GLib.Cancellable? cancellable = null) throws GLib.Error; - public async bool send_credentials_async (GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool send_fd (int fd, GLib.Cancellable? cancellable = null) throws GLib.Error; - } - [CCode (cheader_filename = "gio/gunixcredentialsmessage.h")] - public class UnixCredentialsMessage : GLib.SocketControlMessage { - [CCode (has_construct_function = false, type = "GSocketControlMessage*")] - public UnixCredentialsMessage (); - public unowned GLib.Credentials get_credentials (); - public static bool is_supported (); - [CCode (has_construct_function = false, type = "GSocketControlMessage*")] - public UnixCredentialsMessage.with_credentials (GLib.Credentials credentials); - public GLib.Credentials credentials { get; construct; } - } - [CCode (cheader_filename = "gio/gunixfdmessage.h")] - public class UnixFDMessage : GLib.SocketControlMessage { - [CCode (has_construct_function = false, type = "GSocketControlMessage*")] - public UnixFDMessage (); - public bool append_fd (int fd) throws GLib.Error; - public unowned GLib.UnixFDList get_fd_list (); - public int[] steal_fds (); - [CCode (has_construct_function = false, type = "GSocketControlMessage*")] - public UnixFDMessage.with_fd_list (GLib.UnixFDList fd_list); - public GLib.UnixFDList fd_list { get; construct; } - } - [CCode (cheader_filename = "gio/gunixinputstream.h")] - public class UnixInputStream : GLib.InputStream, GLib.PollableInputStream, GLib.FileDescriptorBased { - [CCode (has_construct_function = false, type = "GInputStream*")] - public UnixInputStream (int fd, bool close_fd); - public bool get_close_fd (); - public void set_close_fd (bool close_fd); - public bool close_fd { get; set; } - public int fd { get; construct; } - } - [CCode (cheader_filename = "gio/gunixmounts.h", cname = "GUnixMountEntry", free_function = "g_unix_mount_free", lower_case_cprefix = "g_unix_mount_")] - [Compact] - public class UnixMountEntry { - [CCode (cname = "g_unix_mount_at")] - public UnixMountEntry (string mount_path, out uint64 time_read = null); - public int compare (GLib.UnixMountEntry mount); - [CCode (cname = "g_unix_mount_for")] - [Version (since = "2.52")] - public UnixMountEntry.@for (string file_path, out uint64 time_read = null); - [CCode (cname = "g_unix_mounts_get")] - public static GLib.List @get (out uint64 time_read = null); - public unowned string get_device_path (); - public unowned string get_fs_type (); - public unowned string get_mount_path (); - [Version (since = "2.58")] - public unowned string get_options (); - [Version (since = "2.60")] - public unowned string get_root_path (); - public bool guess_can_eject (); - public GLib.Icon guess_icon (); - public string guess_name (); - public bool guess_should_display (); - [Version (since = "2.34")] - public GLib.Icon guess_symbolic_icon (); - public bool is_readonly (); - public bool is_system_internal (); - } - [CCode (cheader_filename = "gio/gunixmounts.h")] - public class UnixMountMonitor : GLib.Object { - [CCode (has_construct_function = false)] - [Version (deprecated_since = "2.44", replacement = "UnixMountMonitor.get")] - public UnixMountMonitor (); - public static GLib.UnixMountMonitor @get (); - public void set_rate_limit (int limit_msec); - public virtual signal void mountpoints_changed (); - public virtual signal void mounts_changed (); - } - [CCode (cheader_filename = "gio/gunixmounts.h")] - [Compact] - public class UnixMountMonitorClass { - } - [CCode (cheader_filename = "gio/gunixmounts.h")] - [Compact] - public class UnixMountPoint { - public int compare (GLib.UnixMountPoint mount2); - public unowned string get_device_path (); - public unowned string get_fs_type (); - public unowned string get_mount_path (); - public unowned string get_options (); - public bool guess_can_eject (); - public GLib.Icon guess_icon (); - public string guess_name (); - public GLib.Icon guess_symbolic_icon (); - public bool is_loopback (); - public bool is_readonly (); - public bool is_user_mountable (); - } - [CCode (cheader_filename = "gio/gunixoutputstream.h")] - public class UnixOutputStream : GLib.OutputStream, GLib.PollableOutputStream, GLib.FileDescriptorBased { - [CCode (has_construct_function = false, type = "GOutputStream*")] - public UnixOutputStream (int fd, bool close_fd); - public bool get_close_fd (); - public void set_close_fd (bool close_fd); - public bool close_fd { get; set; } - public int fd { get; construct; } - } - [CCode (cheader_filename = "gio/gunixsocketaddress.h")] - public class UnixSocketAddress : GLib.SocketAddress, GLib.SocketConnectable { - [CCode (has_construct_function = false, type = "GSocketAddress*")] - public UnixSocketAddress (string path); - public static bool abstract_names_supported (); - [CCode (cname = "g_unix_socket_address_new_abstract", has_construct_function = false, type = "GSocketAddress*")] - public UnixSocketAddress.as_abstract (string path, int path_len); - public GLib.UnixSocketAddressType get_address_type (); - public bool get_is_abstract (); - public unowned string get_path (); - public size_t get_path_len (); - [CCode (has_construct_function = false, type = "GSocketAddress*")] - public UnixSocketAddress.with_type (string path, int path_len, GLib.UnixSocketAddressType type); - [NoAccessorMethod] - public bool @abstract { get; construct; } - public GLib.UnixSocketAddressType address_type { get; construct; } - public string path { get; construct; } - [NoAccessorMethod] - public GLib.ByteArray path_as_array { owned get; construct; } - } - [CCode (cheader_filename = "gio/gdesktopappinfo.h")] - public interface DesktopAppInfoLookup : GLib.Object { - public abstract GLib.AppInfo get_default_for_uri_scheme (string uri_scheme); - } - [CCode (cheader_filename = "gio/gfiledescriptorbased.h")] - public interface FileDescriptorBased : GLib.Object { - public abstract int get_fd (); - } - [CCode (cheader_filename = "gio/gdesktopappinfo.h")] - public delegate void DesktopAppLaunchCallback (GLib.DesktopAppInfo appinfo, GLib.Pid pid); - [CCode (cheader_filename = "gio/gdesktopappinfo.h")] - public const string DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME; - [CCode (cheader_filename = "gio/gunixmounts.h", cname = "g_unix_is_mount_path_system_internal")] - public static bool is_mount_path_system_internal (string mount_path); - [CCode (cheader_filename = "gio/gunixmounts.h", cname = "g_unix_is_system_device_path")] - public static bool is_system_device_path (string device_path); - [CCode (cheader_filename = "gio/gunixmounts.h", cname = "g_unix_is_system_fs_type")] - public static bool is_system_fs_type (string fs_type); - [CCode (cheader_filename = "gio/gunixmounts.h", cname = "g_unix_mount_points_changed_since")] - public static bool mount_points_changed_since (uint64 time); - [CCode (cheader_filename = "gio/gunixmounts.h", cname = "g_unix_mounts_changed_since")] - public static bool mounts_changed_since (uint64 time); -} diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi deleted file mode 100644 index 1980a1b65..000000000 --- a/vapi/glib-2.0.vapi +++ /dev/null @@ -1,6417 +0,0 @@ -/* glib-2.0.vala - * - * Copyright (C) 2006-2014 Jürg Billeter - * Copyright (C) 2006-2008 Raffaele Sandrini - * Copyright (C) 2007 Mathias Hasselmann - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * As a special exception, if you use inline functions from this file, this - * file does not by itself cause the resulting executable to be covered by - * the GNU Lesser General Public License. - * - * Author: - * Jürg Billeter - * Raffaele Sandrini - * Mathias Hasselmann - */ - -[SimpleType] -[GIR (name = "gboolean")] -[CCode (cname = "gboolean", cheader_filename = "glib.h", type_id = "G_TYPE_BOOLEAN", marshaller_type_name = "BOOLEAN", get_value_function = "g_value_get_boolean", set_value_function = "g_value_set_boolean", default_value = "FALSE", type_signature = "b")] -[BooleanType] -public struct bool { - public string to_string () { - if (this) { - return "true"; - } else { - return "false"; - } - } - - public static bool parse (string str) { - if (str == "true") { - return true; - } else { - return false; - } - } - public static bool try_parse (string str, out bool result = null) { - if (str == "true") { - result = true; - return true; - } else if (str == "false") { - result = false; - return true; - } else { - result = false; - return false; - } - } -} - -[SimpleType] -[GIR (name = "gint8")] -[CCode (cname = "gchar", cprefix = "g_ascii_", cheader_filename = "glib.h", type_id = "G_TYPE_CHAR", marshaller_type_name = "CHAR", get_value_function = "g_value_get_schar", set_value_function = "g_value_set_schar", default_value = "\'\\0\'", type_signature = "y")] -[IntegerType (rank = 2, min = 0, max = 127)] -public struct char { - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%c"); - public bool isalnum (); - public bool isalpha (); - public bool iscntrl (); - public bool isdigit (); - public bool isgraph (); - public bool islower (); - public bool isprint (); - public bool ispunct (); - public bool isspace (); - public bool isupper (); - public bool isxdigit (); - public int digit_value (); - public int xdigit_value (); - public char tolower (); - public char toupper (); - - [CCode (cname = "MIN")] - public static char min (char a, char b); - [CCode (cname = "MAX")] - public static char max (char a, char b); - [CCode (cname = "CLAMP")] - public char clamp (char low, char high); -} - -[SimpleType] -[GIR (name = "guint8")] -[CCode (cname = "guchar", cheader_filename = "glib.h", type_id = "G_TYPE_UCHAR", marshaller_type_name = "UCHAR", get_value_function = "g_value_get_uchar", set_value_function = "g_value_set_uchar", default_value = "\'\\0\'", type_signature = "y")] -[IntegerType (rank = 3, min = 0, max = 255)] -public struct uchar { - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%hhu"); - - [CCode (cname = "MIN")] - public static uchar min (uchar a, uchar b); - [CCode (cname = "MAX")] - public static uchar max (uchar a, uchar b); - [CCode (cname = "CLAMP")] - public uchar clamp (uchar low, uchar high); -} - -[SimpleType] -[GIR (name = "gint")] -[CCode (cname = "gint", cheader_filename = "glib.h", type_id = "G_TYPE_INT", marshaller_type_name = "INT", get_value_function = "g_value_get_int", set_value_function = "g_value_set_int", default_value = "0", default_value_on_error = "-1", type_signature = "i")] -[IntegerType (rank = 6)] -public struct int { - [CCode (cname = "G_MININT")] - public const int MIN; - [CCode (cname = "G_MAXINT")] - public const int MAX; - - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%i"); - - [CCode (cname = "MIN")] - public static int min (int a, int b); - [CCode (cname = "MAX")] - public static int max (int a, int b); - [CCode (cname = "CLAMP")] - public int clamp (int low, int high); - - [CCode (cname = "GINT_TO_POINTER")] - public void* to_pointer (); - [CCode (cname = "GPOINTER_TO_INT")] - public static int from_pointer (void* p); - - [CCode (cname = "abs", cheader_filename = "stdlib.h")] - public int abs (); - - [CCode (cname = "GINT_TO_BE")] - public int to_big_endian (); - [CCode (cname = "GINT_TO_LE")] - public int to_little_endian (); - - [CCode (cname = "GINT_FROM_BE")] - public static int from_big_endian (int val); - [CCode (cname = "GINT_FROM_LE")] - public static int from_little_endian (int val); - - [CCode (cname = "atoi", cheader_filename = "stdlib.h")] - public static int parse (string str); - - [CCode (cname = "strtol", cheader_filename = "stdlib.h")] - static long strtol (string nptr, out char* endptr, int _base); - - public static bool try_parse (string str, out int result = null, out unowned string unparsed = null, uint _base = 0) { - char* endptr; - errno = 0; - long long_result = strtol (str, out endptr, (int) _base); - if (endptr == (char*) str + str.length) { - unparsed = ""; - } else { - unparsed = (string) endptr; - } - if (int.MIN <= long_result <= int.MAX) { - result = (int) long_result; - return errno != ERANGE && errno != EINVAL && unparsed != endptr; - } else { - result = int.MAX; - return false; - } - } -} - -[SimpleType] -[GIR (name = "guint")] -[CCode (cname = "guint", cheader_filename = "glib.h", type_id = "G_TYPE_UINT", marshaller_type_name = "UINT", get_value_function = "g_value_get_uint", set_value_function = "g_value_set_uint", default_value = "0U", type_signature = "u")] -[IntegerType (rank = 7)] -public struct uint { - [CCode (cname = "0")] - public const uint MIN; - [CCode (cname = "G_MAXUINT")] - public const uint MAX; - - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%u"); - - [CCode (cname = "MIN")] - public static uint min (uint a, uint b); - [CCode (cname = "MAX")] - public static uint max (uint a, uint b); - [CCode (cname = "CLAMP")] - public uint clamp (uint low, uint high); - - [CCode (cname = "GUINT_TO_POINTER")] - public void* to_pointer (); - [CCode (cname = "GPOINTER_TO_UINT")] - public static uint from_pointer (void* p); - - [CCode (cname = "GUINT_TO_BE")] - public uint to_big_endian (); - [CCode (cname = "GUINT_TO_LE")] - public uint to_little_endian (); - - [CCode (cname = "GUINT_FROM_BE")] - public static uint from_big_endian (uint val); - [CCode (cname = "GUINT_FROM_LE")] - public static uint from_little_endian (uint val); - - [CCode (cname = "strtoul", cheader_filename = "stdlib.h")] - static ulong strtoul (string nptr, out char* endptr, int _base); - - public static uint parse (string str, uint _base = 0) { - return (uint) strtoul (str, null, (int) _base); - } - - public static bool try_parse (string str, out uint result = null, out unowned string unparsed = null, uint _base = 0) { - char* endptr; - errno = 0; - ulong ulong_result = strtoul (str, out endptr, (int) _base); - if (endptr == (char*) str + str.length) { - unparsed = ""; - } else { - unparsed = (string) endptr; - } - if (uint.MIN <= ulong_result <= uint.MAX) { - result = (uint) ulong_result; - return errno != ERANGE && errno != EINVAL && unparsed != endptr; - } else { - result = uint.MAX; - return false; - } - } -} - -[SimpleType] -[GIR (name = "gshort")] -[CCode (cname = "gshort", cheader_filename = "glib.h", type_id = "G_TYPE_INT", marshaller_type_name = "INT", get_value_function = "g_value_get_int", set_value_function = "g_value_set_int", default_value = "0", default_value_on_error = "-1", type_signature = "n")] -[IntegerType (rank = 4, min = -32768, max = 32767)] -public struct short { - [CCode (cname = "G_MINSHORT")] - public const short MIN; - [CCode (cname = "G_MAXSHORT")] - public const short MAX; - - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%hi"); - - [CCode (cname = "MIN")] - public static short min (short a, short b); - [CCode (cname = "MAX")] - public static short max (short a, short b); - [CCode (cname = "CLAMP")] - public short clamp (short low, short high); - [CCode (cname = "abs", cheader_filename = "stdlib.h")] - public short abs (); -} - -[SimpleType] -[GIR (name = "gushort")] -[CCode (cname = "gushort", cheader_filename = "glib.h", type_id = "G_TYPE_UINT", marshaller_type_name = "UINT", get_value_function = "g_value_get_uint", set_value_function = "g_value_set_uint", default_value = "0U", type_signature = "q")] -[IntegerType (rank = 5, min = 0, max = 65535)] -public struct ushort { - [CCode (cname = "0U")] - public const ushort MIN; - [CCode (cname = "G_MAXUSHORT")] - public const ushort MAX; - - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%hu"); - - [CCode (cname = "MIN")] - public static ushort min (ushort a, ushort b); - [CCode (cname = "MAX")] - public static ushort max (ushort a, ushort b); - [CCode (cname = "CLAMP")] - public ushort clamp (ushort low, ushort high); -} - -[SimpleType] -[GIR (name = "glong")] -[CCode (cname = "glong", cheader_filename = "glib.h", type_id = "G_TYPE_LONG", marshaller_type_name = "LONG", get_value_function = "g_value_get_long", set_value_function = "g_value_set_long", default_value = "0L", default_value_on_error = "-1L")] -[IntegerType (rank = 8)] -public struct long { - [CCode (cname = "G_MINLONG")] - public const long MIN; - [CCode (cname = "G_MAXLONG")] - public const long MAX; - - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%li"); - - [CCode (cname = "MIN")] - public static long min (long a, long b); - [CCode (cname = "MAX")] - public static long max (long a, long b); - [CCode (cname = "CLAMP")] - public long clamp (long low, long high); - [CCode (cname = "labs", cheader_filename = "stdlib.h")] - public long abs (); - - [CCode (cname = "GLONG_TO_BE")] - public long to_big_endian (); - [CCode (cname = "GLONG_TO_LE")] - public long to_little_endian (); - - [CCode (cname = "GLONG_FROM_BE")] - public static long from_big_endian (long val); - [CCode (cname = "GLONG_FROM_LE")] - public static long from_little_endian (long val); - - [CCode (cname = "strtol", cheader_filename = "stdlib.h")] - static long strtol (string nptr, out char* endptr, int _base); - - public static long parse (string str, uint _base = 0) { - return strtol (str, null, (int) _base); - } - - public static bool try_parse (string str, out long result = null, out unowned string unparsed = null, uint _base = 0) { - char* endptr; - errno = 0; - result = strtol (str, out endptr, (int) _base); - if (endptr == (char*) str + str.length) { - unparsed = ""; - return errno != ERANGE && errno != EINVAL; - } else { - unparsed = (string) endptr; - return false; - } - } -} - -[SimpleType] -[GIR (name = "gulong")] -[CCode (cname = "gulong", cheader_filename = "glib.h", type_id = "G_TYPE_ULONG", marshaller_type_name = "ULONG", get_value_function = "g_value_get_ulong", set_value_function = "g_value_set_ulong", default_value = "0UL")] -[IntegerType (rank = 9)] -public struct ulong { - [CCode (cname = "0UL")] - public const ulong MIN; - [CCode (cname = "G_MAXULONG")] - public const ulong MAX; - - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%lu"); - - [CCode (cname = "MIN")] - public static ulong min (ulong a, ulong b); - [CCode (cname = "MAX")] - public static ulong max (ulong a, ulong b); - [CCode (cname = "CLAMP")] - public ulong clamp (ulong low, ulong high); - - [CCode (cname = "GULONG_TO_BE")] - public ulong to_big_endian (); - [CCode (cname = "GULONG_TO_LE")] - public ulong to_little_endian (); - - [CCode (cname = "GULONG_FROM_BE")] - public static ulong from_big_endian (ulong val); - [CCode (cname = "GULONG_FROM_LE")] - public static ulong from_little_endian (ulong val); - - [CCode (cname = "strtoul", cheader_filename = "stdlib.h")] - static ulong strtoul (string nptr, out char* endptr, int _base); - - public static ulong parse (string str, uint _base = 0) { - return strtoul (str, null, (int) _base); - } - - public static bool try_parse (string str, out ulong result = null, out unowned string unparsed = null, uint _base = 0) { - char* endptr; - errno = 0; - result = strtoul (str, out endptr, (int) _base); - if (endptr == (char*) str + str.length) { - unparsed = ""; - return errno != ERANGE && errno != EINVAL; - } else { - unparsed = (string) endptr; - return false; - } - } -} - -[SimpleType] -[GIR (name = "gulong")] -[CCode (cname = "gsize", cheader_filename = "glib.h", type_id = "G_TYPE_ULONG", marshaller_type_name = "ULONG", get_value_function = "g_value_get_ulong", set_value_function = "g_value_set_ulong", default_value = "0UL")] -[IntegerType (rank = 9)] -public struct size_t { - [CCode (cname = "0UL")] - public const ulong MIN; - [Version (since = "2.4")] - [CCode (cname = "G_MAXSIZE")] - public const ulong MAX; - - [Version (since = "2.6")] - [CCode (cname = "G_GSIZE_FORMAT")] - public const string FORMAT; - [Version (since = "2.6")] - [CCode (cname = "G_GSIZE_MODIFIER")] - public const string FORMAT_MODIFIER; - - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%" + FORMAT); - - [CCode (cname = "GSIZE_TO_POINTER")] - public void* to_pointer (); - [CCode (cname = "GPOINTER_TO_SIZE")] - public static size_t from_pointer (void* p); - - [CCode (cname = "MIN")] - public static size_t min (size_t a, size_t b); - [CCode (cname = "MAX")] - public static size_t max (size_t a, size_t b); - [CCode (cname = "CLAMP")] - public size_t clamp (size_t low, size_t high); -} - -[SimpleType] -[GIR (name = "glong")] -[CCode (cname = "gssize", cheader_filename = "glib.h", type_id = "G_TYPE_LONG", marshaller_type_name = "LONG", get_value_function = "g_value_get_long", set_value_function = "g_value_set_long", default_value = "0L", default_value_on_error = "-1L")] -[IntegerType (rank = 8)] -public struct ssize_t { - [Version (since = "2.14")] - [CCode (cname = "G_MINSSIZE")] - public const long MIN; - [Version (since = "2.14")] - [CCode (cname = "G_MAXSSIZE")] - public const long MAX; - - [Version (since = "2.6")] - [CCode (cname = "G_GSSIZE_FORMAT")] - public const string FORMAT; - [CCode (cname = "G_GSIZE_MODIFIER")] - public const string FORMAT_MODIFIER; - - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%" + FORMAT); - - [CCode (cname = "MIN")] - public static ssize_t min (ssize_t a, ssize_t b); - [CCode (cname = "MAX")] - public static ssize_t max (ssize_t a, ssize_t b); - [CCode (cname = "CLAMP")] - public ssize_t clamp (ssize_t low, ssize_t high); -} - -[SimpleType] -[GIR (name = "gulong")] -[CCode (cname = "guintptr", cheader_filename = "glib.h", type_id = "G_TYPE_ULONG", marshaller_type_name = "ULONG", get_value_function = "g_value_get_ulong", set_value_function = "g_value_set_ulong", default_value = "0UL")] -[IntegerType (rank = 9)] -public struct uintptr { - [CCode (cname = "0UL")] - public const ulong MIN; - [CCode (cname = "G_MAXSIZE")] - public const ulong MAX; - - [CCode (cname = "G_GUINTPTR_FORMAT")] - public const string FORMAT; - [CCode (cname = "G_GINTPTR_MODIFIER")] - public const string FORMAT_MODIFIER; - - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%" + FORMAT); - - [CCode (cname = "GSIZE_TO_POINTER")] - public void* to_pointer (); - [CCode (cname = "GPOINTER_TO_SIZE")] - public static uintptr from_pointer (void* p); - - [CCode (cname = "MIN")] - public static uintptr min (uintptr a, uintptr b); - [CCode (cname = "MAX")] - public static uintptr max (uintptr a, uintptr b); - [CCode (cname = "CLAMP")] - public uintptr clamp (uintptr low, uintptr high); -} - -[SimpleType] -[GIR (name = "glong")] -[CCode (cname = "gintptr", cheader_filename = "glib.h", type_id = "G_TYPE_LONG", marshaller_type_name = "LONG", get_value_function = "g_value_get_long", set_value_function = "g_value_set_long", default_value = "0L")] -[IntegerType (rank = 8)] -public struct intptr { - [CCode (cname = "G_MINSSIZE")] - public const long MIN; - [CCode (cname = "G_MAXSSIZE")] - public const long MAX; - - [CCode (cname = "G_GINTPTR_FORMAT")] - public const string FORMAT; - [CCode (cname = "G_GINTPTR_MODIFIER")] - public const string FORMAT_MODIFIER; - - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%" + FORMAT); - - [CCode (cname = "MIN")] - public static intptr min (intptr a, intptr b); - [CCode (cname = "MAX")] - public static intptr max (intptr a, intptr b); - [CCode (cname = "CLAMP")] - public intptr clamp (intptr low, intptr high); -} - -[SimpleType] -[GIR (name = "gint8")] -[CCode (cname = "gint8", cheader_filename = "glib.h", type_id = "G_TYPE_CHAR", marshaller_type_name = "CHAR", get_value_function = "g_value_get_char", set_value_function = "g_value_set_char", default_value = "0", default_value_on_error = "-1", type_signature = "y")] -[IntegerType (rank = 1, min = -128, max = 127)] -public struct int8 { - [Version (since = "2.4")] - [CCode (cname = "G_MININT8")] - public const int8 MIN; - [Version (since = "2.4")] - [CCode (cname = "G_MAXINT8")] - public const int8 MAX; - - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%hhi"); - - [CCode (cname = "MIN")] - public static int8 min (int8 a, int8 b); - [CCode (cname = "MAX")] - public static int8 max (int8 a, int8 b); - [CCode (cname = "CLAMP")] - public int8 clamp (int8 low, int8 high); -} - -[SimpleType] -[GIR (name = "guint8")] -[CCode (cname = "guint8", cheader_filename = "glib.h", type_id = "G_TYPE_UCHAR", marshaller_type_name = "UCHAR", get_value_function = "g_value_get_uchar", set_value_function = "g_value_set_uchar", default_value = "0U", type_signature = "y")] -[IntegerType (rank = 3, min = 0, max = 255)] -public struct uint8 { - [CCode (cname = "0U")] - public const uint8 MIN; - [Version (since = "2.4")] - [CCode (cname = "G_MAXUINT8")] - public const uint8 MAX; - - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%hhu"); - - [CCode (cname = "MIN")] - public static uint8 min (uint8 a, uint8 b); - [CCode (cname = "MAX")] - public static uint8 max (uint8 a, uint8 b); - [CCode (cname = "CLAMP")] - public uint8 clamp (uint8 low, uint8 high); -} - -[SimpleType] -[GIR (name = "gint16")] -[CCode (cname = "gint16", cheader_filename = "glib.h", type_id = "G_TYPE_INT", marshaller_type_name = "INT", get_value_function = "g_value_get_int", set_value_function = "g_value_set_int", default_value = "0", default_value_on_error = "-1", type_signature = "n")] -[IntegerType (rank = 4, min = -32768, max = 32767)] -public struct int16 { - [Version (since = "2.4")] - [CCode (cname = "G_MININT16")] - public const int16 MIN; - [Version (since = "2.4")] - [CCode (cname = "G_MAXINT16")] - public const int16 MAX; - - [CCode (cname = "G_GINT16_FORMAT")] - public const string FORMAT; - [Version (since = "2.4")] - [CCode (cname = "G_GINT16_MODIFIER")] - public const string FORMAT_MODIFIER; - - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%" + FORMAT); - - [CCode (cname = "MIN")] - public static int16 min (int16 a, int16 b); - [CCode (cname = "MAX")] - public static int16 max (int16 a, int16 b); - [CCode (cname = "CLAMP")] - public int16 clamp (int16 low, int16 high); - - [CCode (cname = "GINT16_TO_BE")] - public int16 to_big_endian (); - [CCode (cname = "GINT16_TO_LE")] - public int16 to_little_endian (); - - [CCode (cname = "GINT16_FROM_BE")] - public static int16 from_big_endian (int16 val); - [CCode (cname = "GINT16_FROM_LE")] - public static int16 from_little_endian (int16 val); -} - -[SimpleType] -[GIR (name = "guint16")] -[CCode (cname = "guint16", cheader_filename = "glib.h", type_id = "G_TYPE_UINT", marshaller_type_name = "UINT", get_value_function = "g_value_get_uint", set_value_function = "g_value_set_uint", default_value = "0U", type_signature = "q")] -[IntegerType (rank = 5, min = 0, max = 65535)] -public struct uint16 { - [CCode (cname = "0U")] - public const uint16 MIN; - [Version (since = "2.4")] - [CCode (cname = "G_MAXUINT16")] - public const uint16 MAX; - - [CCode (cname = "G_GUINT16_FORMAT")] - public const string FORMAT; - [CCode (cname = "G_GINT16_MODIFIER")] - public const string FORMAT_MODIFIER; - - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%hu"); - - [CCode (cname = "MIN")] - public static uint16 min (uint16 a, uint16 b); - [CCode (cname = "MAX")] - public static uint16 max (uint16 a, uint16 b); - [CCode (cname = "CLAMP")] - public uint16 clamp (uint16 low, uint16 high); - - [CCode (cname = "GUINT16_TO_BE")] - public uint16 to_big_endian (); - [CCode (cname = "GUINT16_TO_LE")] - public uint16 to_little_endian (); - - [CCode (cname = "GUINT16_FROM_BE")] - public static uint16 from_big_endian (uint16 val); - [CCode (cname = "GUINT16_FROM_LE")] - public static uint16 from_little_endian (uint16 val); - - [CCode (cname = "g_htons")] - public static uint16 to_network (uint16 val); - [CCode (cname = "g_ntohs")] - public static uint16 from_network (uint16 val); - - [CCode (cname = "GUINT16_SWAP_BE_PDP")] - public uint16 swap_big_endian_pdp (); - [CCode (cname = "GUINT16_SWAP_LE_BE")] - public uint16 swap_little_endian_big_endian (); - [CCode (cname = "GUINT16_SWAP_LE_PDP")] - public uint16 swap_little_endian_pdp (); -} - -[SimpleType] -[GIR (name = "gint32")] -[CCode (cname = "gint32", cheader_filename = "glib.h", type_id = "G_TYPE_INT", marshaller_type_name = "INT", get_value_function = "g_value_get_int", set_value_function = "g_value_set_int", default_value = "0", default_value_on_error = "-1", type_signature = "i")] -[IntegerType (rank = 6)] -public struct int32 { - [Version (since = "2.4")] - [CCode (cname = "G_MININT32")] - public const int32 MIN; - [Version (since = "2.4")] - [CCode (cname = "G_MAXINT32")] - public const int32 MAX; - - [CCode (cname = "G_GINT32_FORMAT")] - public const string FORMAT; - [Version (since = "2.4")] - [CCode (cname = "G_GINT32_MODIFIER")] - public const string FORMAT_MODIFIER; - - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%i"); - - [CCode (cname = "MIN")] - public static int32 min (int32 a, int32 b); - [CCode (cname = "MAX")] - public static int32 max (int32 a, int32 b); - [CCode (cname = "CLAMP")] - public int32 clamp (int32 low, int32 high); - - [CCode (cname = "GINT32_TO_BE")] - public int32 to_big_endian (); - [CCode (cname = "GINT32_TO_LE")] - public int32 to_little_endian (); - - [CCode (cname = "GINT32_FROM_BE")] - public static int32 from_big_endian (int32 val); - [CCode (cname = "GINT32_FROM_LE")] - public static int32 from_little_endian (int32 val); -} - -[SimpleType] -[GIR (name = "guint32")] -[CCode (cname = "guint32", cheader_filename = "glib.h", type_id = "G_TYPE_UINT", marshaller_type_name = "UINT", get_value_function = "g_value_get_uint", set_value_function = "g_value_set_uint", default_value = "0U", type_signature = "u")] -[IntegerType (rank = 7)] -public struct uint32 { - [CCode (cname = "0U")] - public const uint32 MIN; - [Version (since = "2.4")] - [CCode (cname = "G_MAXUINT32")] - public const uint32 MAX; - - [CCode (cname = "G_GUINT32_FORMAT")] - public const string FORMAT; - [CCode (cname = "G_GINT32_MODIFIER")] - public const string FORMAT_MODIFIER; - - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%u"); - - [CCode (cname = "MIN")] - public static uint32 min (uint32 a, uint32 b); - [CCode (cname = "MAX")] - public static uint32 max (uint32 a, uint32 b); - [CCode (cname = "CLAMP")] - public uint32 clamp (uint32 low, uint32 high); - - [CCode (cname = "GUINT32_TO_BE")] - public uint32 to_big_endian (); - [CCode (cname = "GUINT32_TO_LE")] - public uint32 to_little_endian (); - - [CCode (cname = "GUINT32_FROM_BE")] - public static uint32 from_big_endian (uint32 val); - [CCode (cname = "GUINT32_FROM_LE")] - public static uint32 from_little_endian (uint32 val); - - [CCode (cname = "g_htonl")] - public static uint32 to_network (uint32 val); - [CCode (cname = "g_ntohl")] - public static uint32 from_network (uint32 val); - - [CCode (cname = "GUINT32_SWAP_BE_PDP")] - public uint32 swap_big_endian_pdp (); - [CCode (cname = "GUINT32_SWAP_LE_BE")] - public uint32 swap_little_endian_big_endian (); - [CCode (cname = "GUINT32_SWAP_LE_PDP")] - public uint32 swap_little_endian_pdp (); -} - -[SimpleType] -[GIR (name = "gint64")] -[CCode (cname = "gint64", cheader_filename = "glib.h", type_id = "G_TYPE_INT64", marshaller_type_name = "INT64", get_value_function = "g_value_get_int64", set_value_function = "g_value_set_int64", default_value = "0LL", default_value_on_error = "-1LL", type_signature = "x")] -[IntegerType (rank = 10)] -public struct int64 { - [CCode (cname = "G_MININT64")] - public const int64 MIN; - [CCode (cname = "G_MAXINT64")] - public const int64 MAX; - - [CCode (cname = "G_GINT64_FORMAT")] - public const string FORMAT; - [Version (since = "2.4")] - [CCode (cname = "G_GINT64_MODIFIER")] - public const string FORMAT_MODIFIER; - - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%" + FORMAT); - - [CCode (cname = "MIN")] - public static int64 min (int64 a, int64 b); - [CCode (cname = "MAX")] - public static int64 max (int64 a, int64 b); - [CCode (cname = "CLAMP")] - public int64 clamp (int64 low, int64 high); - [CCode (cname = "llabs", cheader_filename = "stdlib.h")] - public int64 abs (); - - [CCode (cname = "GINT64_TO_BE")] - public int64 to_big_endian (); - [CCode (cname = "GINT64_TO_LE")] - public int64 to_little_endian (); - - [CCode (cname = "GINT64_FROM_BE")] - public static int64 from_big_endian (int64 val); - [CCode (cname = "GINT64_FROM_LE")] - public static int64 from_little_endian (int64 val); - - [CCode (cname = "GUINT64_SWAP_LE_BE")] - public uint64 swap_little_endian_big_endian (); - - [CCode (cname = "g_ascii_strtoll")] - static int64 ascii_strtoll (string nptr, out char* endptr, uint _base); - - [Version (since = "2.12")] - public static int64 parse (string str, uint _base = 0) { - return ascii_strtoll (str, null, _base); - } - - [Version (since = "2.12")] - public static bool try_parse (string str, out int64 result = null, out unowned string unparsed = null, uint _base = 0) { - char* endptr; - errno = 0; - result = ascii_strtoll (str, out endptr, _base); - if (endptr == (char*) str + str.length) { - unparsed = ""; - return errno != ERANGE && errno != EINVAL; - } else { - unparsed = (string) endptr; - return false; - } - } - - [CCode (cname = "g_ascii_string_to_signed")] - [Version (since = "2.54")] - public static bool from_string (string str, [CCode (pos = 5.1)] out int64 out_num = null, uint @base = 10U, int64 min = int64.MIN, int64 max = int64.MAX) throws GLib.NumberParserError; -} - -[SimpleType] -[GIR (name = "guint64")] -[CCode (cname = "guint64", cheader_filename = "glib.h", type_id = "G_TYPE_UINT64", marshaller_type_name = "UINT64", get_value_function = "g_value_get_uint64", set_value_function = "g_value_set_uint64", default_value = "0ULL", type_signature = "t")] -[IntegerType (rank = 11)] -public struct uint64 { - [CCode (cname = "0ULL")] - public const uint64 MIN; - [CCode (cname = "G_MAXUINT64")] - public const uint64 MAX; - - [CCode (cname = "G_GUINT64_FORMAT")] - public const string FORMAT; - [CCode (cname = "G_GINT64_MODIFIER")] - public const string FORMAT_MODIFIER; - - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%" + FORMAT); - - [CCode (cname = "MIN")] - public static uint64 min (uint64 a, uint64 b); - [CCode (cname = "MAX")] - public static uint64 max (uint64 a, uint64 b); - [CCode (cname = "CLAMP")] - public uint64 clamp (uint64 low, uint64 high); - - [CCode (cname = "GUINT64_TO_BE")] - public uint64 to_big_endian (); - [CCode (cname = "GUINT64_TO_LE")] - public uint64 to_little_endian (); - - [CCode (cname = "GUINT64_FROM_BE")] - public static uint64 from_big_endian (uint64 val); - [CCode (cname = "GUINT64_FROM_LE")] - public static uint64 from_little_endian (uint64 val); - - [CCode (cname = "g_ascii_strtoull")] - static uint64 ascii_strtoull (string nptr, out char* endptr, uint _base); - - public static uint64 parse (string str, uint _base = 0) { - return ascii_strtoull (str, null, _base); - } - - public static bool try_parse (string str, out uint64 result = null, out unowned string unparsed = null, uint _base = 0) { - char* endptr; - errno = 0; - result = ascii_strtoull (str, out endptr, _base); - if (endptr == (char*) str + str.length) { - unparsed = ""; - return errno != ERANGE && errno != EINVAL; - } else { - unparsed = (string) endptr; - return false; - } - } - - [CCode (cname = "g_ascii_string_to_unsigned")] - [Version (since = "2.54")] - public static bool from_string (string str, [CCode (pos = 5.1)] out uint64 out_num = null, uint @base = 10U, uint64 min = uint64.MIN, uint64 max = uint64.MAX) throws GLib.NumberParserError; -} - -[SimpleType] -[GIR (name = "gfloat")] -[CCode (cname = "gfloat", cheader_filename = "glib.h,float.h,math.h", type_id = "G_TYPE_FLOAT", marshaller_type_name = "FLOAT", get_value_function = "g_value_get_float", set_value_function = "g_value_set_float", default_value = "0.0F", default_value_on_error = "-1.0F")] -[FloatingType (rank = 1)] -public struct float { - [CCode (cname = "FLT_ROUNDS")] - public const int ROUNDS; - [CCode (cname = "FLT_RADIX")] - public const int RADIX; - [CCode (cname = "FLT_MANT_DIG")] - public const int MANT_DIG; - [CCode (cname = "FLT_DIG")] - public const int DIG; - - [CCode (cname = "FLT_MIN_EXP")] - public const int MIN_EXP; - [CCode (cname = "FLT_MAX_EXP")] - public const int MAX_EXP; - - [CCode (cname = "FLT_MIN_10_EXP")] - public const int MIN_10_EXP; - [CCode (cname = "FLT_MAX_10_EXP")] - public const int MAX_10_EXP; - - [CCode (cname = "FLT_EPSILON")] - public const float EPSILON; - [CCode (cname = "FLT_MIN")] - public const float MIN; - [CCode (cname = "FLT_MAX")] - public const float MAX; - - [CCode (cname = "NAN")] - public const float NAN; - [CCode (cname = "INFINITY")] - public const float INFINITY; - - [CCode (cname = "isnan")] - public bool is_nan (); - [CCode (cname = "isfinite")] - public bool is_finite (); - [CCode (cname = "isnormal")] - public bool is_normal (); - [CCode (cname = "isinf")] - public int is_infinity (); - - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%g"); - - [CCode (cname = "MIN")] - public static float min (float a, float b); - [CCode (cname = "MAX")] - public static float max (float a, float b); - [CCode (cname = "CLAMP")] - public float clamp (float low, float high); - [CCode (cname = "fabsf")] - public float abs (); - - [CCode (cname = "strtof", cheader_filename = "stdlib.h")] - static float strtof (string nptr, out char* endptr); - - public static float parse (string str) { - return strtof (str, null); - } - - public static bool try_parse (string str, out float result = null, out unowned string unparsed = null) { - char* endptr; - errno = 0; - result = strtof (str, out endptr); - if (endptr == (char*) str + str.length) { - unparsed = ""; - return errno != ERANGE; - } else { - unparsed = (string) endptr; - return false; - } - } -} - -[SimpleType] -[GIR (name = "gdouble")] -[CCode (cname = "gdouble", cheader_filename = "glib.h,float.h,math.h", type_id = "G_TYPE_DOUBLE", marshaller_type_name = "DOUBLE", get_value_function = "g_value_get_double", set_value_function = "g_value_set_double", default_value = "0.0", default_value_on_error = "-1.0", type_signature = "d")] -[FloatingType (rank = 2)] -public struct double { - [CCode (cname = "DBL_MANT_DIG")] - public const int MANT_DIG; - [CCode (cname = "DBL_DIG")] - public const int DIG; - - [CCode (cname = "DBL_MIN_EXP")] - public const int MIN_EXP; - [CCode (cname = "DBL_MAX_EXP")] - public const int MAX_EXP; - - [CCode (cname = "DBL_MIN_10_EXP")] - public const int MIN_10_EXP; - [CCode (cname = "DBL_MAX_10_EXP")] - public const int MAX_10_EXP; - - [CCode (cname = "DBL_EPSILON")] - public const double EPSILON; - [CCode (cname = "DBL_MIN")] - public const double MIN; - [CCode (cname = "DBL_MAX")] - public const double MAX; - - [CCode (cname = "((double) NAN)")] - public const double NAN; - [CCode (cname = "((double) INFINITY)")] - public const double INFINITY; - - [CCode (cname = "isnan")] - public bool is_nan (); - [CCode (cname = "isfinite")] - public bool is_finite (); - [CCode (cname = "isnormal")] - public bool is_normal (); - [CCode (cname = "isinf")] - public int is_infinity (); - - [CCode (cname = "MIN")] - public static double min (double a, double b); - [CCode (cname = "MAX")] - public static double max (double a, double b); - [CCode (cname = "CLAMP")] - public double clamp (double low, double high); - [CCode (cname = "fabs")] - public double abs (); - - [CCode (cname = "G_ASCII_DTOSTR_BUF_SIZE")] - public const int DTOSTR_BUF_SIZE; - [CCode (cname = "g_ascii_dtostr", instance_pos = -1)] - public unowned string to_str (char[] buffer); - [CCode (cname = "g_ascii_formatd", instance_pos = -1)] - public unowned string format (char[] buffer, string format = "%g"); - - public string to_string () { - return this.to_str(new char[DTOSTR_BUF_SIZE]); - } - - [CCode (cname = "g_ascii_strtod")] - static double ascii_strtod (string nptr, out char* endptr); - - public static double parse (string str) { - return ascii_strtod (str, null); - } - - public static bool try_parse (string str, out double result = null, out unowned string unparsed = null) { - char* endptr; - errno = 0; - result = ascii_strtod (str, out endptr); - if (endptr == (char*) str + str.length) { - unparsed = ""; - return errno != ERANGE; - } else { - unparsed = (string) endptr; - return false; - } - } -} - -[GIR (name = "glong")] -[CCode (cheader_filename = "time.h", has_type_id = false, default_value = "0")] -[IntegerType (rank = 8)] -public struct time_t { - [CCode (cname = "time")] - public time_t (out time_t result = null); -} - -[SimpleType] -[CCode (cheader_filename="stdarg.h", cprefix="va_", has_type_id = false, destroy_function = "va_end", lvalue_access = false)] -public struct va_list { - [CCode (cname = "va_start")] - public va_list (); - [CCode (cname = "va_copy")] - public va_list.copy (va_list src); - [CCode (generic_type_pos = 1.1, simple_generics = true)] - public unowned G arg (); -} - -[SimpleType] -[GIR (name = "gunichar")] -[CCode (cname = "gunichar", cprefix = "g_unichar_", cheader_filename = "glib.h", type_id = "G_TYPE_UINT", marshaller_type_name = "UINT", get_value_function = "g_value_get_uint", set_value_function = "g_value_set_uint", default_value = "0U", type_signature = "u")] -[IntegerType (rank = 7)] -public struct unichar { - public bool validate (); - public bool isalnum (); - public bool isalpha (); - public bool iscntrl (); - public bool isdigit (); - public bool isgraph (); - public bool islower (); - [Version (since = "2.14")] - public bool ismark (); - public bool isprint (); - public bool ispunct (); - public bool isspace (); - public bool isupper (); - public bool isxdigit (); - public bool istitle (); - public bool isdefined (); - public bool iswide (); - [Version (since = "2.12")] - public bool iswide_cjk (); - [Version (since = "2.14")] - public bool iszerowidth (); - public unichar toupper (); - public unichar tolower (); - public unichar totitle (); - public int digit_value (); - public int xdigit_value (); - public GLib.UnicodeType type (); - public GLib.UnicodeBreakType break_type (); - [Version (since = "2.14")] - public GLib.UnicodeScript get_script(); - - public int to_utf8 (string? outbuf); - - public string to_string () { - string str = (string) new char[7]; - this.to_utf8 (str); - return str; - } - - [Version (since = "2.30")] - public bool compose (unichar b, out unichar ch); - [Version (since = "2.30")] - public bool decompose (out unichar a, out unichar b); - [Version (since = "2.30")] - public size_t fully_decompose (bool compat, unichar[] result); - - [CCode (cname = "MIN")] - public static unichar min (unichar a, unichar b); - [CCode (cname = "MAX")] - public static unichar max (unichar a, unichar b); - [CCode (cname = "CLAMP")] - public unichar clamp (unichar low, unichar high); - - [CCode (cname = "G_UNICHAR_MAX_DECOMPOSITION_LENGTH")] - public const int MAX_DECOMPOSITION_LENGTH; - - [CCode (cname = "G_GUINT32_FORMAT")] - public const string FORMAT; - [CCode (cname = "G_GINT32_MODIFIER")] - public const string FORMAT_MODIFIER; -} - -[SimpleType] -[GIR (name = "guint16")] -[CCode (cname = "gunichar2", cheader_filename = "glib.h", default_value = "0U", type_signature = "q", has_type_id = false)] -[IntegerType (rank = 5)] -public struct unichar2 { - [CCode (cname = "G_GUINT16_FORMAT")] - public const string FORMAT; - [CCode (cname = "G_GINT16_MODIFIER")] - public const string FORMAT_MODIFIER; -} - -[Compact] -[Immutable] -[GIR (name = "utf8")] -[CCode (cname = "gchar", const_cname = "const gchar", copy_function = "g_strdup", free_function = "g_free", cheader_filename = "stdlib.h,string.h,glib.h", type_id = "G_TYPE_STRING", marshaller_type_name = "STRING", param_spec_function = "g_param_spec_string", get_value_function = "g_value_get_string", set_value_function = "g_value_set_string", take_value_function = "g_value_take_string", type_signature = "s")] -public class string { - [Version (replacement = "string.index_of")] - [CCode (cname = "strstr")] - public unowned string? str (string needle); - [Version (replacement = "string.last_index_of")] - [CCode (cname = "g_strrstr")] - public unowned string? rstr (string needle); - [CCode (cname = "g_strrstr_len")] - public unowned string? rstr_len (ssize_t haystack_len, string needle); - - [CCode (cname = "strstr")] - static char* strstr (char* haystack, char* needle); - [CCode (cname = "g_strrstr")] - static char* strrstr (char* haystack, char* needle); - [CCode (cname = "g_utf8_strchr")] - static char* utf8_strchr (char* str, ssize_t len, unichar c); - [CCode (cname = "g_utf8_strrchr")] - static char* utf8_strrchr (char* str, ssize_t len, unichar c); - - public int index_of (string needle, int start_index = 0) { - char* result = strstr ((char*) this + start_index, (char*) needle); - - if (result != null) { - return (int) (result - (char*) this); - } else { - return -1; - } - } - - public int last_index_of (string needle, int start_index = 0) { - char* result = strrstr ((char*) this + start_index, (char*) needle); - - if (result != null) { - return (int) (result - (char*) this); - } else { - return -1; - } - } - - public int index_of_char (unichar c, int start_index = 0) { - char* result = utf8_strchr ((char*) this + start_index, -1, c); - - if (result != null) { - return (int) (result - (char*) this); - } else { - return -1; - } - } - - public int last_index_of_char (unichar c, int start_index = 0) { - char* result = utf8_strrchr ((char*) this + start_index, -1, c); - - if (result != null) { - return (int) (result - (char*) this); - } else { - return -1; - } - } - - [Version (since = "2.2")] - [CCode (cname = "g_str_has_prefix")] - public bool has_prefix (string prefix); - [Version (since = "2.2")] - [CCode (cname = "g_str_has_suffix")] - public bool has_suffix (string suffix); - [CCode (cname = "g_strdup_printf"), PrintfFormat] - public string printf (...); - [CCode (cname = "g_strdup_vprintf")] - public string vprintf (va_list args); - [CCode (cname = "sscanf", cheader_filename = "stdio.h"), ScanfFormat] - public int scanf (string format, ...); - [CCode (cname = "g_strconcat")] - public string concat (string string2, ...); - [CCode (cname = "g_strescape")] - public string escape (string? exceptions = null); - [CCode (cname = "g_strcompress")] - public string compress (); - [CCode (cname = "g_strsplit", array_length = false, array_null_terminated = true)] - public string[] split (string delimiter, int max_tokens = 0); - [Version (since = "2.4")] - [CCode (cname = "g_strsplit_set", array_length = false, array_null_terminated = true)] - public string[] split_set (string delimiters, int max_tokens = 0); - [CCode (cname = "g_stpcpy")] - private static void* copy_to_buffer (void* dest, string src); - [CCode (cname = "_vala_g_strjoinv")] - public static string joinv (string? separator, string?[]? str_array) { - if (separator == null) { - separator = ""; - } - if (str_array != null && (str_array.length > 0 || (str_array.length == -1 && str_array[0] != null))) { - int i; - size_t len = 1; - for (i = 0 ; (str_array.length != -1 && i < str_array.length) || (str_array.length == -1 && str_array[i] != null) ; i++) { - len += (str_array[i] != null) ? ((!) str_array[i]).length : 0; - } - if (i == 0) { - return ""; - } - str_array.length = i; - len += ((!) separator).length * (i - 1); - - string* res = GLib.malloc (len); - void* ptr = string.copy_to_buffer ((void*) res, (!) str_array[0]); - for (i = 1 ; i < str_array.length ; i++) { - ptr = string.copy_to_buffer (ptr, (!) separator); - ptr = string.copy_to_buffer (ptr, (str_array[i] != null) ? ((!) str_array[i]) : ""); - } - - return (owned) res; - } else { - return ""; - } - } - [CCode (cname = "g_strjoin")] - public static string join (string separator, ...); - [CCode (cname = "g_strnfill")] - public static string nfill (size_t length, char fill_char); - - public char get (long index) { - return ((char*) this)[index]; - } - - // checks whether valid string character starts at specified index - // embedded NULs are not supported by the string class - public bool valid_char (int index) { - uint8 c = ((uint8*) this)[index]; - if (c == 0x00 || (c >= 0x80 && c < 0xc2) || c >= 0xf5) { - return false; - } else { - return true; - } - } - - [CCode (cname = "g_utf8_next_char")] - public unowned string next_char (); - [CCode (cname = "g_utf8_next_char")] - static char* utf8_next_char (char* str); - public bool get_next_char (ref int index, out unichar c) { - c = utf8_get_char ((char*) this + index); - if (c != 0) { - index = (int) (utf8_next_char ((char*) this + index) - (char*) this); - return true; - } else { - return false; - } - } - [CCode (cname = "g_utf8_get_char")] - static unichar utf8_get_char (char* str); - public unichar get_char (long index = 0) { - return utf8_get_char ((char*) this + index); - } - [CCode (cname = "g_utf8_get_char_validated")] - public unichar get_char_validated (ssize_t max_len = -1); - - [Version (replacement = "string.index_of_nth_char")] - [CCode (cname = "g_utf8_offset_to_pointer")] - public unowned string utf8_offset (long offset); - public unowned string offset (long offset) { - return (string) ((char*) this + offset); - } - [Version (replacement = "string.char_count")] - public long pointer_to_offset (string pos) { - return (long) ((char*) pos - (char*) this); - } - - [CCode (cname = "g_utf8_offset_to_pointer")] - char* utf8_offset_to_pointer (long offset); - - public int index_of_nth_char (long c) { - return (int) (this.utf8_offset_to_pointer (c) - (char*) this); - } - - [CCode (cname = "g_utf8_prev_char")] - public unowned string prev_char (); - [CCode (cname = "g_utf8_prev_char")] - static char* utf8_prev_char (char* str); - public bool get_prev_char (ref int index, out unichar c) { - if (0 < index) { - index = (int) (utf8_prev_char ((char*) this + index) - (char*) this); - c = utf8_get_char ((char*) this + index); - return true; - } else { - c = 0; - return false; - } - } - - [Version (replacement = "string.length")] - [CCode (cname = "strlen")] - public long len (); - [Version (replacement = "string.index_of_char")] - [CCode (cname = "g_utf8_strchr")] - public unowned string chr (ssize_t len, unichar c); - [Version (replacement = "string.last_index_of_char")] - [CCode (cname = "g_utf8_strrchr")] - public unowned string rchr (ssize_t len, unichar c); - [Version (since = "2.2")] - [CCode (cname = "g_utf8_strreverse")] - public string reverse (ssize_t len = -1); - [CCode (cname = "g_utf8_validate")] - public bool validate (ssize_t max_len = -1, out char* end = null); - [Version (since = "2.60")] - [CCode (cname = "g_utf8_validate_len")] - public bool validate_len (size_t max_len, out char* end = null); - [Version (since = "2.52")] - [CCode (cname = "g_utf8_make_valid")] - public string make_valid (ssize_t len = -1); - [CCode (cname = "g_utf8_normalize")] - public string normalize (ssize_t len = -1, GLib.NormalizeMode mode = GLib.NormalizeMode.DEFAULT); - - [CCode (cname = "g_utf8_strup")] - public string up (ssize_t len = -1); - [CCode (cname = "g_utf8_strdown")] - public string down (ssize_t len = -1); - [CCode (cname = "g_utf8_casefold")] - public string casefold (ssize_t len = -1); - [CCode (cname = "g_utf8_collate")] - public int collate (string str2); - [CCode (cname = "g_utf8_collate_key")] - public string collate_key (ssize_t len = -1); - [Version (since = "2.8")] - [CCode (cname = "g_utf8_collate_key_for_filename")] - public string collate_key_for_filename (ssize_t len = -1); - - [CCode (cname = "g_locale_to_utf8")] - public string locale_to_utf8 (ssize_t len, out size_t bytes_read, out size_t bytes_written, out GLib.Error error = null); - - [CCode (cname = "g_strchomp")] - public unowned string _chomp(); - public string chomp () { - string result = this.dup (); - result._chomp (); - return result; - } - - [CCode (cname = "g_strchug")] - public unowned string _chug(); - public string chug () { - string result = this.dup (); - result._chug (); - return result; - } - - [CCode (cname = "g_strstrip")] - public unowned string _strip (); - public string strip () { - string result = this.dup (); - result._strip (); - return result; - } - - [CCode (cname = "g_strdelimit")] - public unowned string _delimit (string delimiters, char new_delimiter); - public string delimit (string delimiters, char new_delimiter) { - string result = this.dup (); - result._delimit (delimiters, new_delimiter); - return result; - } - - [CCode (cname = "g_str_hash")] - public uint hash (); - - [Version (since = "2.40")] - [CCode (cname = "g_str_is_ascii")] - public bool is_ascii (); - [Version (since = "2.40")] - [CCode (instance_pos = "1.5", cname = "g_str_match_string")] - public bool match_string (string search_term, bool accept_alternates); - [Version (since = "2.40")] - [CCode (cname = "g_str_to_ascii")] - public string to_ascii (string? from_locale = null); - [Version (replacement = "int.parse")] - [CCode (cname = "atoi")] - public int to_int (); - [Version (replacement = "long.parse")] - [CCode (cname = "strtol")] - public long to_long (out unowned string endptr = null, int _base = 0); - [Version (replacement = "double.parse")] - [CCode (cname = "g_ascii_strtod")] - public double to_double (out unowned string endptr = null); - [Version (replacement = "ulong.parse")] - [CCode (cname = "strtoul")] - public ulong to_ulong (out unowned string endptr = null, int _base = 0); - [Version (replacement = "int64.parse")] - [CCode (cname = "g_ascii_strtoll")] - public int64 to_int64 (out unowned string endptr = null, int _base = 0); - [Version (replacement = "uint64.parse", since = "2.2")] - [CCode (cname = "g_ascii_strtoull")] - public uint64 to_uint64 (out unowned string endptr = null, int _base = 0); - [CCode (cname = "g_str_tokenize_and_fold", array_length = false, array_null_terminated = true)] - [Version (since = "2.40")] - public string[] tokenize_and_fold (string transit_locale, [CCode (array_length = false, array_null_terminated = true)] out string[] ascii_alternates); - - [Version (replacement = "bool.parse")] - public bool to_bool () { - if (this == "true") { - return true; - } else { - return false; - } - } - - [Version (replacement = "string.length")] - [CCode (cname = "strlen")] - public size_t size (); - - [CCode (cname = "g_ascii_strcasecmp")] - public int ascii_casecmp (string s2); - [CCode (cname = "g_ascii_strncasecmp")] - public int ascii_ncasecmp (string s2, size_t n); - [CCode (cname = "g_ascii_strup")] - public string ascii_up (ssize_t len = -1); - [CCode (cname = "g_ascii_strdown")] - public string ascii_down (ssize_t len = -1); - - [CCode (cname = "g_utf8_skip")] - public static char skip[256]; - - /* modifies string in place */ - [CCode (cname = "g_strcanon")] - public void canon (string valid_chars, char substitutor); - - [CCode (cname = "g_strdup")] - public string dup (); - [Version (replacement = "string.substring")] - [CCode (cname = "g_strndup")] - public string ndup (size_t n); - - [CCode (cname = "memchr")] - static char* memchr (char* s, int c, size_t n); - - // strnlen is not available on all systems - static long strnlen (char* str, long maxlen) { - char* end = memchr (str, 0, maxlen); - if (end == null) { - return maxlen; - } else { - return (long) (end - str); - } - } - - [CCode (cname = "g_strndup")] - static string strndup (char* str, size_t n); - - public string substring (long offset, long len = -1) { - long string_length; - if (offset >= 0 && len >= 0) { - // avoid scanning whole string - string_length = strnlen ((char*) this, offset + len); - } else { - string_length = this.length; - } - - if (offset < 0) { - offset = string_length + offset; - GLib.return_val_if_fail (offset >= 0, null); - } else { - GLib.return_val_if_fail (offset <= string_length, null); - } - if (len < 0) { - len = string_length - offset; - } - GLib.return_val_if_fail (offset + len <= string_length, null); - return strndup ((char*) this + offset, len); - } - - public string slice (long start, long end) { - long string_length = this.length; - if (start < 0) { - start = string_length + start; - } - if (end < 0) { - end = string_length + end; - } - GLib.return_val_if_fail (start >= 0 && start <= string_length, null); - GLib.return_val_if_fail (end >= 0 && end <= string_length, null); - GLib.return_val_if_fail (start <= end, null); - return strndup ((char*) this + start, end - start); - } - - public string splice (long start, long end, string? str = null) { - long string_length = this.length; - if (start < 0) { - start = string_length + start; - } - if (end < 0) { - end = string_length + end; - } - GLib.return_val_if_fail (start >= 0 && start <= string_length, null); - GLib.return_val_if_fail (end >= 0 && end <= string_length, null); - GLib.return_val_if_fail (start <= end, null); - - size_t str_size; - if (str == null) { - str_size = 0; - } else { - str_size = ((!)(str)).length; - } - - string* result = GLib.malloc0 (string_length - (end - start) + str_size + 1); - - char* dest = (char*) result; - - GLib.Memory.copy (dest, this, start); - dest += start; - - if (str != null) { - GLib.Memory.copy (dest, str, str_size); - dest += str_size; - } - - GLib.Memory.copy (dest, (char*) this + end, string_length - end); - - return (owned) result; - } - - public bool contains (string needle) { - return strstr ((char*) this, (char*) needle) != null; - } - - public string replace (string old, string replacement) { - if (*((char*) this) == '\0' || *((char*) old) == '\0' || old == replacement) - return this; - - try { - var regex = new GLib.Regex (GLib.Regex.escape_string (old)); - return regex.replace_literal (this, -1, 0, replacement); - } catch (GLib.RegexError e) { - GLib.assert_not_reached (); - } - } - - [CCode (cname = "g_utf8_strlen")] - public int char_count (ssize_t max = -1); - - public int length { - [CCode (cname = "strlen")] - get; - } - - public uint8[] data { - get { - unowned uint8[] res = (uint8[]) this; - res.length = (int) this.length; - return res; - } - } - - public char[] to_utf8 () { - var string_length = this.length; - char[] result = new char[string_length + 1]; - result.length--; - GLib.Memory.copy (result, this, string_length); - return result; - } - - public unowned string to_string () { - return this; - } - - [CCode (cname = "g_utf8_to_utf16")] - public string16 to_utf16 (long len = -1, out long items_read = null, out long items_written = null) throws GLib.ConvertError; - [CCode (cname = "g_utf8_to_ucs4")] - public string32 to_utf32 (long len = -1, out long items_read = null, out long items_written = null) throws GLib.ConvertError; - [CCode (cname = "g_utf8_to_ucs4_fast")] - public string32 to_utf32_fast (long len = -1, out long items_written = null); - -} - -[Compact] -[Immutable] -[GIR (name = "gunichar")] -[CCode (cname = "gunichar", const_cname = "const gunichar", free_function = "g_free", cheader_filename = "glib.h")] -public class string32 { - [CCode (cname = "g_ucs4_to_utf16")] - public string16 to_utf16 (long len = -1, out long items_read = null, out long items_written = null) throws GLib.ConvertError; - [CCode (cname = "g_ucs4_to_utf8")] - public string to_utf8 (long len = -1, out long items_read = null, out long items_written = null) throws GLib.ConvertError; - - public string? to_string () { - try { - return this.to_utf8 (); - } catch (GLib.ConvertError e) { - return null; - } - } -} - -[Compact] -[Immutable] -[GIR (name = "guint16")] -[CCode (cname = "gunichar2", const_cname = "const gunichar2", free_function = "g_free", cheader_filename = "glib.h")] -public class string16 { - [CCode (cname = "g_utf16_to_ucs4")] - public string32 to_utf32 (long len = -1, out long items_read = null, out long items_written = null) throws GLib.ConvertError; - [CCode (cname = "g_utf16_to_utf8")] - public string to_utf8 (long len = -1, out long items_read = null, out long items_written = null) throws GLib.ConvertError; - - public string? to_string () { - try { - return this.to_utf8 (); - } catch (GLib.ConvertError e) { - return null; - } - } -} - -// Required for proper error checking in *.try_parse() -[CCode (cheader_filename = "errno.h")] -private int errno; -[CCode (cheader_filename = "errno.h")] -private const int ERANGE; -[CCode (cheader_filename = "errno.h")] -private const int EINVAL; - -[CCode (cprefix = "G", lower_case_cprefix = "g_", cheader_filename = "glib.h", gir_namespace = "GLib", gir_version = "2.0")] -namespace GLib { - [PointerType] - [GIR (fullname = "gpointer")] - [CCode (cname = "gpointer", const_cname = "gconstpointer", cheader_filename = "glib.h", default_value = "NULL", type_id = "G_TYPE_POINTER")] - public struct pointer { - } - - [CCode (lower_case_cprefix = "", cheader_filename = "math.h")] - namespace Math { - [CCode (cname = "G_E")] - public const double E; - - [CCode (cname = "G_PI")] - public const double PI; - - [CCode (cname = "G_LN2")] - public const double LN2; - - [CCode (cname = "G_LN10")] - public const double LN10; - - [CCode (cname = "G_PI_2")] - public const double PI_2; - - [CCode (cname = "G_PI_4")] - public const double PI_4; - - [CCode (cname = "G_SQRT2")] - public const double SQRT2; - - [CCode (cname = "G_LOG_2_BASE_10")] - public const double LOG_2_BASE_10; - - /* generated from of glibc */ - public static double acos (double x); - public static float acosf (float x); - public static double asin (double x); - public static float asinf (float x); - public static double atan (double x); - public static float atanf (float x); - public static double atan2 (double y, double x); - public static float atan2f (float y, float x); - public static double cos (double x); - public static float cosf (float x); - public static double sin (double x); - public static float sinf (float x); - public static double tan (double x); - public static float tanf (float x); - public static double cosh (double x); - public static float coshf (float x); - public static double sinh (double x); - public static float sinhf (float x); - public static double tanh (double x); - public static float tanhf (float x); - public static void sincos (double x, out double sinx, out double cosx); - public static void sincosf (float x, out float sinx, out float cosx); - public static double acosh (double x); - public static float acoshf (float x); - public static double asinh (double x); - public static float asinhf (float x); - public static double atanh (double x); - public static float atanhf (float x); - public static double exp (double x); - public static float expf (float x); - public static double frexp (double x, out int exponent); - public static float frexpf (float x, out int exponent); - public static double ldexp (double x, int exponent); - public static float ldexpf (float x, int exponent); - public static double log (double x); - public static float logf (float x); - public static double log10 (double x); - public static float log10f (float x); - public static double modf (double x, out double iptr); - public static float modff (float x, out float iptr); - [CCode (feature_test_macro = "_GNU_SOURCE")] - public static double exp10 (double x); - [CCode (feature_test_macro = "_GNU_SOURCE")] - public static float exp10f (float x); - [CCode (feature_test_macro = "_GNU_SOURCE")] - public static double pow10 (double x); - [CCode (feature_test_macro = "_GNU_SOURCE")] - public static float pow10f (float x); - public static double expm1 (double x); - public static float expm1f (float x); - public static double log1p (double x); - public static float log1pf (float x); - public static double logb (double x); - public static float logbf (float x); - public static double exp2 (double x); - public static float exp2f (float x); - public static double log2 (double x); - public static float log2f (float x); - public static double pow (double x, double y); - public static float powf (float x, float y); - public static double sqrt (double x); - public static float sqrtf (float x); - public static double hypot (double x, double y); - public static float hypotf (float x, float y); - public static double cbrt (double x); - public static float cbrtf (float x); - public static double ceil (double x); - public static float ceilf (float x); - public static double fabs (double x); - public static float fabsf (float x); - public static double floor (double x); - public static float floorf (float x); - public static double fmod (double x, double y); - public static float fmodf (float x, float y); - public static int isinf (double value); - public static int isinff (float value); - public static int finite (double value); - public static int finitef (float value); - public static double drem (double x, double y); - public static float dremf (float x, float y); - public static double significand (double x); - public static float significandf (float x); - public static double copysign (double x, double y); - public static float copysignf (float x, float y); - public static double nan (string tagb); - public static float nanf (string tagb); - public static int isnan (double value); - public static int isnanf (float value); - public static double j0 (double x0); - public static float j0f (float x0); - public static double j1 (double x0); - public static float j1f (float x0); - public static double jn (int x0, double x1); - public static float jnf (int x0, float x1); - public static double y0 (double x0); - public static float y0f (float x0); - public static double y1 (double x0); - public static float y1f (float x0); - public static double yn (int x0, double x1); - public static float ynf (int x0, float x1); - public static double erf (double x0); - public static float erff (float x0); - public static double erfc (double x0); - public static float erfcf (float x0); - public static double lgamma (double x0); - public static float lgammaf (float x0); - public static double tgamma (double x0); - public static float tgammaf (float x0); - public static double gamma (double x0); - public static float gammaf (float x0); - public static double lgamma_r (double x0, out int signgamp); - public static float lgamma_rf (float x0, out int signgamp); - public static double rint (double x); - public static float rintf (float x); - public static double nextafter (double x, double y); - public static float nextafterf (float x, float y); - public static double nexttoward (double x, double y); - public static float nexttowardf (float x, double y); - public static double remainder (double x, double y); - public static float remainderf (float x, float y); - public static double scalbn (double x, int n); - public static float scalbnf (float x, int n); - public static int ilogb (double x); - public static int ilogbf (float x); - public static double scalbln (double x, long n); - public static float scalblnf (float x, long n); - public static double nearbyint (double x); - public static float nearbyintf (float x); - public static double round (double x); - public static float roundf (float x); - public static double trunc (double x); - public static float truncf (float x); - public static double remquo (double x, double y, out int quo); - public static float remquof (float x, float y, out int quo); - public static long lrint (double x); - public static long lrintf (float x); - public static int64 llrint (double x); - public static int64 llrintf (float x); - public static long lround (double x); - public static long lroundf (float x); - public static int64 llround (double x); - public static int64 llroundf (float x); - public static double fdim (double x, double y); - public static float fdimf (float x, float y); - public static double fmax (double x, double y); - public static float fmaxf (float x, float y); - public static double fmin (double x, double y); - public static float fminf (float x, float y); - public static double fma (double x, double y, double z); - public static float fmaf (float x, float y, float z); - public static double scalb (double x, double n); - public static float scalbf (float x, float n); - } - - /* Byte order */ - [CCode (cprefix = "G_", cname = "int", has_type_id = false)] - public enum ByteOrder { - [CCode (cname = "G_BYTE_ORDER")] - HOST, - LITTLE_ENDIAN, - BIG_ENDIAN, - PDP_ENDIAN - } - - public const ByteOrder BYTE_ORDER; - - /* Atomic Operations */ - - [Version (since = "2.4")] - namespace AtomicInt { - public static int get ([CCode (type = "volatile gint *")] ref int atomic); - public static void set ([CCode (type = "volatile gint *")] ref int atomic, int newval); - [Version (since = "2.30")] - public static int add ([CCode (type = "volatile gint *")] ref int atomic, int val); - [Version (deprecated_since = "2.30", replacement = "add")] - public static int exchange_and_add ([CCode (type = "volatile gint *")] ref int atomic, int val); - public static bool compare_and_exchange ([CCode (type = "volatile gint *")] ref int atomic, int oldval, int newval); - public static void inc ([CCode (type = "volatile gint *")] ref int atomic); - public static bool dec_and_test ([CCode (type = "volatile gint *")] ref int atomic); - } - - [Version (since = "2.4")] - namespace AtomicUint { - [CCode (cname = "g_atomic_int_get")] - public static uint get ([CCode (type = "volatile guint *")] ref uint atomic); - [CCode (cname = "g_atomic_int_set")] - public static void set ([CCode (type = "volatile guint *")] ref uint atomic, uint newval); - [Version (since = "2.30")] - [CCode (cname = "g_atomic_int_add")] - public static uint add ([CCode (type = "volatile guint *")] ref uint atomic, uint val); - [Version (deprecated_since = "2.30", replacement = "add")] - [CCode (cname = "g_atomic_int_exchange_and_add")] - public static uint exchange_and_add ([CCode (type = "volatile guint *")] ref uint atomic, uint val); - [CCode (cname = "g_atomic_int_compare_and_exchange")] - public static bool compare_and_exchange ([CCode (type = "volatile guint *")] ref uint atomic, uint oldval, uint newval); - [CCode (cname = "g_atomic_int_inc")] - public static void inc ([CCode (type = "volatile guint *")] ref uint atomic); - [CCode (cname = "g_atomic_int_dec_and_test")] - public static bool dec_and_test ([CCode (type = "volatile guint *")] ref uint atomic); - } - - [Version (since = "2.4")] - namespace AtomicPointer { - public static void* get ([CCode (type = "volatile gpointer *")] void** atomic); - public static void set ([CCode (type = "volatile gpointer *")] void** atomic, void* newval); - public static bool compare_and_exchange ([CCode (type = "volatile gpointer *")] void** atomic, void* oldval, void* newval); - } - - /* The Main Event Loop */ - - [Compact] - [CCode (ref_function = "g_main_loop_ref", unref_function = "g_main_loop_unref")] - public class MainLoop { - public MainLoop (MainContext? context = null, bool is_running = false); - public void run (); - public void quit (); - public bool is_running (); - public unowned MainContext get_context (); - } - - namespace Priority { - public const int HIGH; - public const int DEFAULT; - public const int HIGH_IDLE; - public const int DEFAULT_IDLE; - public const int LOW; - } - - [Compact] - [CCode (ref_function = "g_main_context_ref", unref_function = "g_main_context_unref")] - public class MainContext { - public MainContext (); - public static unowned MainContext @default (); - public bool iteration (bool may_block); - public bool pending (); - public unowned Source find_source_by_id (uint source_id); - public unowned Source find_source_by_user_data (void* user_data); - public unowned Source find_source_by_funcs_user_data (SourceFuncs funcs, void* user_data); - public void wakeup (); - public bool acquire (); - public void release (); - [Version (since = "2.10")] - public bool is_owner (); - public bool wait (Cond cond, Mutex mutex); - public bool prepare (out int priority); - public int query (int max_priority, out int timeout_, PollFD[] fds); - public bool check (int max_priority, PollFD[] fds); - public void dispatch (); - public void set_poll_func (PollFunc func); - public PollFunc get_poll_func (); - public void add_poll (ref PollFD fd, int priority); - public void remove_poll (ref PollFD fd); - public int depth (); - [Version (since = "2.12")] - [CCode (cname = "g_main_current_source")] - public static unowned Source current_source (); - [Version (since = "2.22")] - public static unowned MainContext? get_thread_default (); - [Version (since = "2.32")] - public static MainContext ref_thread_default (); - [Version (since = "2.22")] - public void push_thread_default (); - [Version (since = "2.22")] - public void pop_thread_default (); - [Version (since = "2.28")] - [CCode (cname = "g_main_context_invoke_full")] - public void invoke (owned SourceFunc function, [CCode (pos = 0.1)] int priority = Priority.DEFAULT); - [Version (since = "2.28")] - public void invoke_full (int priority, owned SourceFunc function); - } - - [Compact] - [Version (since = "2.64")] - [CCode (free_function = "g_main_context_pusher_free")] - public class MainContextPusher { - public MainContextPusher (MainContext context); - [DestroysInstance] - public void free (); - } - - [CCode (has_target = false)] - public delegate int PollFunc (PollFD[] ufds, int timeout_); - - public int poll ([CCode (array_length_type = "guint")] PollFD[] fds, int timeout); - - [CCode (cname = "GSource")] - public class TimeoutSource : Source { - public TimeoutSource (uint interval); - [Version (since = "2.14")] - public TimeoutSource.seconds (uint interval); - } - - namespace Timeout { - [CCode (cname = "g_timeout_add_full")] - public static uint add (uint interval, owned SourceFunc function, [CCode (pos = 0.1)] int priority = Priority.DEFAULT); - public static uint add_full (int priority, uint interval, owned SourceFunc function); - [Version (since = "2.14")] - [CCode (cname = "g_timeout_add_seconds_full")] - public static uint add_seconds (uint interval, owned SourceFunc function, [CCode (pos = 0.1)] int priority = Priority.DEFAULT); - [Version (since = "2.14")] - public static uint add_seconds_full (int priority, uint interval, owned SourceFunc function); - } - - [CCode (cname = "GSource")] - public class IdleSource : Source { - public IdleSource (); - } - - namespace Idle { - [CCode (cname = "g_idle_add_full")] - public static uint add (owned SourceFunc function, [CCode (pos = 0.1)] int priority = Priority.DEFAULT_IDLE); - public static uint add_full (int priority, owned SourceFunc function); - public static bool remove_by_data (void* data); - } - - [CCode (type_id = "G_TYPE_INT", marshaller_type_name = "INT", get_value_function = "g_value_get_int", set_value_function = "g_value_set_int", default_value = "0")] - [IntegerType (rank = 6)] - public struct Pid : int { - [CCode (cname = "G_PID_FORMAT")] - [Version (since = "2.50")] - public const string FORMAT; - -#if GLIB_2_50 - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%" + FORMAT); -#endif - } - - public delegate void ChildWatchFunc (Pid pid, int status); - [Version (since = "2.64")] - [CCode (has_target = false)] - public delegate void SourceDisposeFunc (Source source); - - [CCode (cname = "GSource")] - public class ChildWatchSource : Source { - public ChildWatchSource (Pid pid); - } - - namespace ChildWatch { - [Version (since = "2.4")] - [CCode (cname = "g_child_watch_add_full")] - public static uint add (Pid pid, owned ChildWatchFunc function, [CCode (pos = 0.1)] int priority = Priority.DEFAULT_IDLE); - [Version (since = "2.4")] - public static uint add_full (int priority, Pid pid, owned ChildWatchFunc function); - } - - [CCode (type_id = "G_TYPE_POLLFD")] - public struct PollFD { - public int fd; - public IOCondition events; - public IOCondition revents; - - [CCode (cname = "G_POLLFD_FORMAT")] - public const string FORMAT; - - [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string to_string (string format = "%" + FORMAT); - } - - [Compact] - [CCode (ref_function = "g_source_ref", unref_function = "g_source_unref")] - public abstract class Source { - protected Source (); - [Version (since = "2.12")] - public void set_funcs (SourceFuncs funcs); - public uint attach (MainContext? context = null); - public void destroy (); - [Version (since = "2.12")] - public bool is_destroyed (); - public void set_priority (int priority); - public int get_priority (); - public void set_can_recurse (bool can_recurse); - public bool get_can_recurse (); - public uint get_id (); - [Version (since = "2.26")] - public unowned string? get_name (); - [Version (since = "2.26")] - public void set_name (string? name); - [Version (since = "2.26")] - public static void set_name_by_id (uint tag, string? name); - public unowned MainContext get_context (); - public void set_callback (owned SourceFunc func); - public void set_callback_indirect (void* callback_data, SourceCallbackFuncs callback_funcs); - [Version (since = "2.64")] - public void set_dispose_function (SourceDisposeFunc dispose); - [Version (since = "2.36")] - public void* add_unix_fd (int fd, IOCondition events); - [Version (since = "2.36")] - public void remove_unix_fd (void* tag); - [Version (since = "2.36")] - public void modify_unix_fd (void* tag, IOCondition new_events); - [Version (since = "2.36")] - public IOCondition query_unix_fd (void* tag); - public void add_poll (ref PollFD fd); - public void remove_poll (ref PollFD fd); - [Version (since = "2.28")] - public void add_child_source (Source child_source); - [Version (since = "2.28")] - public void remove_child_source (Source child_source); - [Version (since = "2.28")] - public int64 get_time (); - [Version (deprecated_since = "2.28", replacement = "get_time")] - public void get_current_time (out TimeVal timeval); - [Version (since = "2.36")] - public void set_ready_time (int64 ready_time); - public int64 get_ready_time (); - public static bool remove (uint id); - public static bool remove_by_funcs_user_data (void* user_data); - public static bool remove_by_user_data (void* user_data); - [Version (since = "2.32")] - [CCode (cname = "G_SOURCE_CONTINUE")] - public const bool CONTINUE; - [Version (since = "2.32")] - [CCode (cname = "G_SOURCE_REMOVE")] - public const bool REMOVE; - - protected abstract bool prepare (out int timeout_); - protected abstract bool check (); - protected abstract bool dispatch (SourceFunc? _callback); - } - - [CCode (has_target = false)] - public delegate void SourceDummyMarshal (); - - [CCode (has_target = false)] - public delegate bool SourcePrepareFunc (Source source, out int timeout_); - [CCode (has_target = false)] - public delegate bool SourceCheckFunc (Source source); - [CCode (has_target = false)] - public delegate bool SourceDispatchFunc (Source source, SourceFunc? _callback); - [CCode (has_target = false)] - public delegate void SourceFinalizeFunc (Source source); - - [CCode (has_type_id = false)] - public struct SourceFuncs { - public SourcePrepareFunc prepare; - public SourceCheckFunc check; - public SourceDispatchFunc dispatch; - public SourceFinalizeFunc finalize; - } - - [CCode (has_target = false)] - public delegate void SourceCallbackRefFunc (void* cb_data); - [CCode (has_target = false)] - public delegate void SourceCallbackUnrefFunc (void* cb_data); - [CCode (has_target = false)] - public delegate void SourceCallbackGetFunc (void* cb_data, Source source, SourceFunc func); - - [Compact] - public class SourceCallbackFuncs { - public SourceCallbackRefFunc @ref; - public SourceCallbackUnrefFunc unref; - public SourceCallbackGetFunc @get; - } - - public delegate bool SourceFunc (); - - public errordomain ThreadError { - AGAIN; - public static GLib.Quark quark (); - } - - /* Thread support */ - - [CCode (scope = "async")] - public delegate G ThreadFunc (); - public delegate void Func (G data); - - [Version (since = "2.36")] - public uint get_num_processors (); - - [CCode (has_type_id = false)] - public enum ThreadPriority { - LOW, - NORMAL, - HIGH, - URGENT - } - - [Compact] - [Version (since = "2.32")] - [CCode (ref_function = "g_thread_ref", unref_function = "g_thread_unref")] - public class Thread { - [Version (since = "2.32")] - public Thread (string? name, owned ThreadFunc func); - [Version (since = "2.32")] - [CCode (cname = "g_thread_try_new")] - public Thread.try (string? name, owned ThreadFunc func) throws GLib.Error; - public static bool supported (); - [Version (deprecated_since = "2.32", replacement = "new Thread ()")] - [CCode (simple_generics = true)] - public static unowned Thread create (owned ThreadFunc func, bool joinable) throws ThreadError; - [Version (deprecated_since = "2.32", replacement = "new Thread ()")] - [CCode (simple_generics = true)] - public static unowned Thread create_full (owned ThreadFunc func, ulong stack_size, bool joinable, bool bound, ThreadPriority priority) throws ThreadError; - [CCode (simple_generics = true)] - public static unowned Thread self (); - [DestroysInstance] - public T join (); - [Version (deprecated_since = "2.32")] - public void set_priority (ThreadPriority priority); - public static void yield (); - public static void exit (T retval); - [Version (deprecated_since = "2.32", since = "2.10")] - public static void @foreach (Func thread_func); - - [CCode (cname = "g_usleep")] - public static void usleep (ulong microseconds); - } - - [Version (since = "2.32")] - [CCode (destroy_function = "g_mutex_clear", has_type_id = false, lvalue_access = false)] - public struct Mutex { - public Mutex (); - public void @lock (); - public bool trylock (); - public void unlock (); - } - - [Version (since = "2.44")] - [Compact] - [CCode (free_function = "g_mutex_locker_free")] - public class MutexLocker { - public MutexLocker (Mutex mutex); - [DestroysInstance] - public void free (); - } - - [Version (since = "2.32")] - [CCode (destroy_function = "g_rec_mutex_clear", has_type_id = false)] - public struct RecMutex { - public RecMutex (); - public void @lock (); - public bool trylock (); - public void unlock (); - } - - [Version (since = "2.60")] - [Compact] - [CCode (free_function = "g_rec_mutex_locker_free")] - public class RecMutexLocker { - public RecMutexLocker (RecMutex rec_mutex); - [DestroysInstance] - public void free (); - } - - [Version (since = "2.32")] - [CCode (destroy_function = "g_rw_lock_clear", has_type_id = false)] - public struct RWLock { - public RWLock (); - public void writer_lock (); - public bool writer_trylock (); - public void writer_unlock (); - public void reader_lock (); - public bool reader_trylock (); - public void reader_unlock (); - } - - [Version (since = "2.62")] - [Compact] - [CCode (free_function = "g_rw_lock_reader_locker_free")] - public class RWLockReaderLocker { - public RWLockReaderLocker (RWLock rw_lock); - [DestroysInstance] - public void free (); - } - - [Version (since = "2.62")] - [Compact] - [CCode (free_function = "g_rw_lock_writer_locker_free")] - public class RWLockWriterLocker { - public RWLockWriterLocker (RWLock rw_lock); - [DestroysInstance] - public void free (); - } - - [Version (deprecated_since = "2.32", replacement = "Mutex")] - [CCode (destroy_function = "g_static_mutex_free", default_value = "G_STATIC_MUTEX_INIT", has_type_id = false)] - public struct StaticMutex { - public StaticMutex (); - public void lock (); - public bool trylock (); - public void unlock (); - public void lock_full (); - } - - [Version (deprecated_since = "2.32", replacement = "RecMutex")] - [CCode (destroy_function = "g_static_rec_mutex_free", default_value = "G_STATIC_REC_MUTEX_INIT", has_type_id = false)] - public struct StaticRecMutex { - public StaticRecMutex (); - public void lock (); - public bool trylock (); - public void unlock (); - public void lock_full (); - } - - [Version (deprecated_since = "2.32", replacement = "RWLock")] - [CCode (destroy_function = "g_static_rw_lock_free", default_value = "G_STATIC_RW_LOCK_INIT", has_type_id = false)] - public struct StaticRWLock { - public StaticRWLock (); - public void reader_lock (); - public bool reader_trylock (); - public void reader_unlock (); - public void writer_lock (); - public bool writer_trylock (); - public void writer_unlock (); - } - - [Compact] - [CCode (ref_function = "", unref_function = "")] - public class Private { - public Private (DestroyNotify? destroy_func = null); - public void* get (); - public void set (void* data); - public void replace (void* data); - } - - [CCode (destroy_function = "g_static_private_free", default_value = "G_STATIC_PRIVATE_INIT", has_type_id = false)] - [Version (deprecated_since = "2.32")] - public struct StaticPrivate { - public StaticPrivate (); - public void* get (); - public void set (void* data, DestroyNotify? destroy_func); - } - - [Version (since = "2.32")] - [CCode (destroy_function = "g_cond_clear", has_type_id = false, lvalue_access = false)] - public struct Cond { - public Cond (); - public void @signal (); - public void broadcast (); - public void wait (Mutex mutex); - [Version (deprecated_since = "2.32", replacement = "wait_until")] - public bool timed_wait (Mutex mutex, TimeVal abs_time); - [Version (since = "2.32")] - public bool wait_until (Mutex mutex, int64 end_time); - } - - [CCode (cname = "GThreadFunc")] - public delegate G OnceFunc (); - - [Version (since = "2.4")] - [CCode (default_value = "G_ONCE_INIT", has_type_id = false)] - public struct Once { - [CCode (cname = "g_once")] - public unowned G once (OnceFunc function); - [Version (since = "2.14")] - public static bool init_enter ([CCode (type="volatile gsize *")] size_t *value); - [Version (since = "2.14")] - public static void init_leave ([CCode (type="volatile gsize *")] size_t *value, size_t set_value); - public OnceStatus status; - } - - [CCode (cprefix = "G_ONCE_STATUS_", has_type_id = false)] - public enum OnceStatus { - NOTCALLED, - PROGRESS, - READY - } - - /* Thread Pools */ - - [CCode (cname = "GFunc")] - public delegate void ThreadPoolFunc (owned G data); - - [Compact] - [CCode (free_function = "g_thread_pool_free")] - public class ThreadPool { - [Version (deprecated_since = "vala-0.18", replacement = "ThreadPool.with_owned_data")] - public ThreadPool (Func func, int max_threads, bool exclusive) throws ThreadError; - [CCode (cname = "g_thread_pool_new")] - public ThreadPool.with_owned_data (ThreadPoolFunc func, int max_threads, bool exclusive) throws ThreadError; - [Version (deprecated_since = "vala-0.18", replacement = "add")] - public void push (T data) throws ThreadError; - [CCode (cname = "g_thread_pool_push")] - public void add (owned T data) throws ThreadError; - public void set_max_threads (int max_threads) throws ThreadError; - public int get_max_threads (); - public uint get_num_threads (); - [Version (since = "2.46")] - public bool move_to_front (T data); - public uint unprocessed (); - [CCode (cname = "g_thread_pool_free")] - void _free (bool immediate, bool wait); - [CCode (cname = "vala__g_thread_pool_free_wrapper")] - public static void free (owned ThreadPool? pool, bool immediate, bool wait) { - ThreadPool* ptr = (owned) pool; - if (ptr != null) { - ((ThreadPool)ptr)._free (immediate, wait); - } - } - public static void set_max_unused_threads (int max_threads); - public static int get_max_unused_threads (); - public static uint get_num_unused_threads (); - public static void stop_unused_threads (); - [Version (since = "2.10")] - public void set_sort_function (CompareDataFunc func); - [Version (since = "2.10")] - public static void set_max_idle_time (uint interval); - [Version (since = "2.10")] - public static uint get_max_idle_time (); - } - - /* Asynchronous Queues */ - - [Compact] - [CCode (ref_function = "g_async_queue_ref", unref_function = "g_async_queue_unref")] - public class AsyncQueue { - [Version (since = "2.16")] - [CCode (cname = "g_async_queue_new_full", simple_generics = true)] - public AsyncQueue (); - public void push (owned G data); - [Version (since = "2.10")] - public void push_sorted (owned G data, CompareDataFunc func); - public G pop (); - public G? try_pop (); - public G? timed_pop (ref TimeVal end_time); - public int length (); - [Version (since = "2.10")] - public void sort (CompareDataFunc func); - public void @lock (); - public void unlock (); - public void ref_unlocked (); - public void unref_and_unlock (); - [Version (since = "2.46")] - public void push_front (owned G data); - [Version (since = "2.46")] - public void push_front_unlocked (owned G data); - public void push_unlocked (owned G data); - [Version (since = "2.10")] - public void push_sorted_unlocked (owned G data, CompareDataFunc func); - public G pop_unlocked (); - [Version (since = "2.46")] - public bool remove (G data); - [Version (since = "2.46")] - public bool remove_unlocked (G data); - public G? try_pop_unlocked (); - public G? timed_pop_unlocked (ref TimeVal end_time); - public G? timeout_pop (uint64 timeout); - public G? timeout_pop_unlocked (uint64 timeout); - public int length_unlocked (); - public void sort_unlocked (CompareDataFunc func); - } - - /* Memory Allocation */ - - public static void* malloc (size_t n_bytes); - public static void* malloc0 (size_t n_bytes); - public static void* realloc (void* mem, size_t n_bytes); - - public static void* try_malloc (size_t n_bytes); - [Version (since = "2.8")] - public static void* try_malloc0 (size_t n_bytes); - public static void* try_realloc (void* mem, size_t n_bytes); - - public static void free (void* mem); - - public class MemVTable { - } - - [Version (deprecated_since = "2.46")] - [CCode (cname = "glib_mem_profiler_table")] - public static MemVTable mem_profiler_table; - - [Version (deprecated_since = "2.46")] - public static bool mem_is_system_malloc (); - [Version (deprecated_since = "2.46")] - public static void mem_set_vtable (MemVTable vtable); - [Version (deprecated_since = "2.46")] - public static void mem_profile (); - - [CCode (cheader_filename = "string.h")] - namespace Memory { - [CCode (cname = "memcmp")] - public static int cmp (void* s1, void* s2, size_t n); - [CCode (cname = "memcpy")] - public static void* copy (void* dest, void* src, size_t n); - [CCode (cname = "memset")] - public static void* set (void* dest, int src, size_t n); - [CCode (cname = "memmove")] - public static void* move (void* dest, void* src, size_t n); - [CCode (cname = "g_memdup")] - public static void* dup (void* mem, uint n); - } - - [Version (since = "2.10")] - namespace Slice { - public static void* alloc (size_t block_size); - public static void* alloc0 (size_t block_size); - [Version (since = "2.14")] - public static void* copy (size_t block_size, void* mem_block); - [CCode (cname = "g_slice_free1")] - public static void free (size_t block_size, void* mem_block); - public static void free_chain_with_offset (size_t block_size, void *mem_chain, size_t next_offset); - public static int64 get_config (SliceConfig ckey); - [CCode (array_length_cname = "n_values", array_length_type = "guint")] - public static int64[] get_config_state (SliceConfig ckey, int64 address); - public static void set_config (SliceConfig ckey, int64 value); - } - - [CCode (cprefix = "G_SLICE_CONFIG_", has_type_id = false)] - public enum SliceConfig { - ALWAYS_MALLOC, - BYPASS_MAGAZINES, - WORKING_SET_MSECS, - COLOR_INCREMENT, - CHUNK_SIZES, - CONTENTION_COUNTER - } - - /* IO Channels */ - - [Compact] - [CCode (ref_function = "g_io_channel_ref", unref_function = "g_io_channel_unref")] - public class IOChannel { - [CCode (cname = "g_io_channel_unix_new")] - public IOChannel.unix_new (int fd); - public int unix_get_fd (); - [CCode (cname = "g_io_channel_win32_new_fd")] - public IOChannel.win32_new_fd (int fd); - public int win32_get_fd (); - [CCode (cname = "g_io_channel_win32_new_socket")] - public IOChannel.win32_socket (int socket); - [CCode (cname = "g_io_channel_win32_new_messages")] - public IOChannel.win32_messages (size_t hwnd); - public void init (); - public IOChannel.file (string filename, string mode) throws FileError; - public IOStatus read_chars (char[] buf, out size_t bytes_read) throws ConvertError, IOChannelError; - public IOStatus read_unichar (out unichar thechar) throws ConvertError, IOChannelError; - public IOStatus read_line (out string str_return, out size_t length, out size_t terminator_pos) throws ConvertError, IOChannelError; - public IOStatus read_line_string (StringBuilder buffer, out size_t terminator_pos) throws ConvertError, IOChannelError; - public IOStatus read_to_end (out string str_return, out size_t length) throws ConvertError, IOChannelError; - public IOStatus write_chars (char[] buf, out size_t bytes_written) throws ConvertError, IOChannelError; - public IOStatus write_unichar (unichar thechar) throws ConvertError, IOChannelError; - public IOStatus flush () throws IOChannelError; - public IOStatus seek_position (int64 offset, SeekType type) throws IOChannelError; - public IOStatus shutdown (bool flush) throws IOChannelError; - [CCode (cname = "g_io_create_watch")] - public IOSource create_watch (IOCondition condition); - [CCode (cname = "g_io_add_watch")] - public uint add_watch (IOCondition condition, IOFunc func); - [CCode (cname = "g_io_add_watch_full")] - public uint add_watch_full (int priority, IOCondition condition, owned IOFunc func); - public size_t get_buffer_size (); - public void set_buffer_size (size_t size); - public IOCondition get_buffer_condition (); - public IOFlags get_flags (); - public IOStatus set_flags (IOFlags flags) throws IOChannelError; - public unowned string get_line_term (out int length); - public void set_line_term (string line_term, int length); - public bool get_buffered (); - public void set_buffered (bool buffered); - public unowned string get_encoding (); - public IOStatus set_encoding (string? encoding) throws IOChannelError; - public bool get_close_on_unref (); - public void set_close_on_unref (bool do_close); - public void win32_make_pollfd (IOCondition condition, ref PollFD fd); - public static int win32_poll (PollFD[] fds, int timeout); - public void win32_set_debug (bool flag); - } - - [Compact] - [CCode (cname = "GSource")] - public class IOSource : Source { - [CCode (cname = "g_io_create_watch")] - public IOSource (IOChannel channel, IOCondition condition); - [CCode (cname = "g_source_set_callback")] - public void set_callback ([CCode (type = "GSourceFunc")] owned IOFunc func); - } - - [CCode (cprefix = "G_SEEK_", has_type_id = false)] - public enum SeekType { - CUR, - SET, - END - } - - [CCode (has_type_id = false)] - public enum IOStatus { - ERROR, - NORMAL, - EOF, - AGAIN - } - - public errordomain IOChannelError { - FBIG, - INVAL, - IO, - ISDIR, - NOSPC, - NXIO, - OVERFLOW, - PIPE, - FAILED; - public static GLib.Quark quark (); - } - - [Flags] - [CCode (cprefix = "G_IO_")] - public enum IOCondition { - IN, - OUT, - PRI, - ERR, - HUP, - NVAL - } - - public delegate bool IOFunc (IOChannel source, IOCondition condition); - - [CCode (cprefix = "G_IO_FLAG_", has_type_id = false)] - [Flags] - public enum IOFlags { - APPEND, - NONBLOCK, - IS_READABLE, - IS_WRITABLE, - IS_WRITEABLE, - IS_SEEKABLE, - MASK, - GET_MASK, - SET_MASK - } - - /* Error Reporting */ - - [Compact] - [ErrorBase] - [CCode (copy_function = "g_error_copy", free_function = "g_error_free")] - public class Error { - [PrintfFormat] - public Error (Quark domain, int code, string format, ...); - public Error.literal (Quark domain, int code, string message); - [PrintfFormat] - public Error.valist (Quark domain, int code, string format, va_list args); - public Error copy (); - public bool matches (Quark domain, int code); - [CCode (cname = "g_prefix_error")] - public static void prefix (out Error? dest, string format, ...); - [CCode (cname = "g_propagate_error")] - public static void propagate (out Error? dest, owned Error src); - [CCode (cname = "g_propagate_prefixed_error")] - public static void propagate_prefixed (out Error? dest, owned Error src, string format, ...); - [CCode (cname = "g_set_error")] - public static void @set (out Error? dest, Quark domain, int code, string format, ...); - [CCode (cname = "g_set_error_literal")] - public static void set_literal (out Error? dest, Quark domain, int code, string message); - - public Quark domain; - public int code; - public string message; - } - - /* Message Output and Debugging Functions */ - - [PrintfFormat] - public static void print (string format, ...); - public static void set_print_handler (PrintFunc func); - [CCode (has_target = false)] - public delegate void PrintFunc (string text); - [PrintfFormat] - public static void printerr (string format, ...); - public static void set_printerr_handler (PrintFunc func); - - public static void return_if_fail (bool expr); - [CCode (sentinel = "")] - public static void return_val_if_fail (bool expr, ...); - [NoReturn] - public static void return_if_reached (); - [NoReturn] - [CCode (sentinel = "")] - public static void return_val_if_reached (...); - [Version (since = "2.16")] - public static void warn_if_fail (bool expr); - [Version (since = "2.16")] - public static void warn_if_reached (); - - [Assert] - public static void assert (bool expr); - [Version (since = "2.46")] - public static void assert_cmpmem (uint8[] m1, uint8[] m2); - public static void assert_error (Error? error, Quark error_domain, int error_code); - [Version (since = "2.38")] - public static void assert_false (bool expr); - [Version (since = "2.38")] - public static void assert_true (bool expr); - [Version (since = "2.38")] - public static void assert_null (void* expr); - public static void assert_no_error (Error? error); - [Version (since = "2.40")] - public static void assert_nonnull (void* expr); - [NoReturn] - public static void assert_not_reached (); - - public static void on_error_query (string? prg_name = null); - public static void on_error_stack_trace (string? prg_name = null); - [CCode (cname = "G_BREAKPOINT")] - public static void breakpoint (); - - /* Message Logging */ - - [CCode (cprefix = "G_LOG_", has_type_id = false)] - [Flags] - public enum LogLevelFlags { - /* log flags */ - FLAG_RECURSION, - FLAG_FATAL, - - /* GLib log levels */ - LEVEL_ERROR, - LEVEL_CRITICAL, - LEVEL_WARNING, - LEVEL_MESSAGE, - LEVEL_INFO, - LEVEL_DEBUG, - - LEVEL_MASK - } - - [CCode (cprefix = "G_LOG_WRITER_", has_type_id = false)] - [Version (since = "2.50")] - public enum LogWriterOutput { - HANDLED, - UNHANDLED - } - - [CCode (has_type_id = false, simple_generics = true)] - [Version (since = "2.50")] - public struct LogField { - public unowned string key; - public unowned T @value; - public ssize_t length; - } - - public void logv (string? log_domain, LogLevelFlags log_level, string format, va_list args); - [Diagnostics] - [PrintfFormat] - public void log (string? log_domain, LogLevelFlags log_level, string format, ...); - - [Version (since = "2.50")] - public void log_structured (string? log_domain, LogLevelFlags log_levels, ...); - [Version (since = "2.50")] - public void log_structured_array (LogLevelFlags log_levels, LogField[] fields); - - [Version (since = "2.50")] - public void log_variant (string? log_domain, LogLevelFlags log_levels, GLib.Variant fields); - - [Diagnostics] - [PrintfFormat] - public void message (string format, ...); - [Diagnostics] - [PrintfFormat] - public void warning (string format, ...); - [Diagnostics] - [PrintfFormat] - [Version (since = "2.64")] - public void warning_once (string format, ...); - [Diagnostics] - [PrintfFormat] - public void critical (string format, ...); - [Diagnostics] - [PrintfFormat] - [NoReturn] - public void error (string format, ...); - [Diagnostics] - [PrintfFormat] - [Version (since = "2.6")] - public void debug (string format, ...); - [Diagnostics] - [PrintfFormat] - [Version (since = "2.40")] - public void info (string format, ...); - [CCode (cname = "G_DEBUG_HERE")] - [Version (since = "2.50")] - public void debug_here (); - - public delegate void LogFunc (string? log_domain, LogLevelFlags log_levels, string message); - [Version (since = "2.50")] - public delegate LogWriterOutput LogWriterFunc (LogLevelFlags log_level, [CCode (array_length_type = "gsize")] LogField[] fields); - - namespace Log { - public static uint set_handler (string? log_domain, LogLevelFlags log_levels, LogFunc log_func); - [Version (since = "2.46")] - public static void set_handler_full (string? log_domain, LogLevelFlags log_levels, owned LogFunc log_func); - [Version (since = "2.6")] - public static void set_default_handler (LogFunc log_func); - [CCode (delegate_target = false)] - public static GLib.LogFunc default_handler; - public static LogLevelFlags set_fatal_mask (string log_domain, LogLevelFlags log_levels); - public static LogLevelFlags set_always_fatal (LogLevelFlags log_levels); - public static void remove_handler (string? log_domain, uint handler_id); - - public const string FILE; - public const int LINE; - public const string METHOD; - - [Version (since = "2.50")] - public static void set_writer_func (owned LogWriterFunc func); - [Version (since = "2.50")] - public static bool writer_supports_color (int output_fd); - [Version (since = "2.50")] - public static bool writer_is_journald (int output_fd); - [Version (since = "2.50")] - public static string writer_format_fields (LogLevelFlags log_levels, [CCode (array_length_type = "gsize")] LogField[] fields, bool use_color); - [Version (since = "2.50")] - [CCode (delegate_target = false)] - public static LogWriterFunc writer_journald; - [Version (since = "2.50")] - [CCode (delegate_target = false)] - public static LogWriterFunc writer_standard_streams; - [Version (since = "2.50")] - [CCode (delegate_target = false)] - public static LogWriterFunc writer_default; - } - - [CCode (has_type_id = false)] - public struct DebugKey { - unowned string key; - uint value; - } - - public uint parse_debug_string (string? debug_string, DebugKey[] keys); - - /* String Utility Functions */ - - public string strdup (string str); - [CCode (array_length = false, array_null_terminated = true)] - public string[] strdupv ([CCode (array_length = false, array_null_terminated = true)] string[] str_array); - - public void strfreev (string** str_array); - [Version (since = "2.6")] - public uint strv_length ([CCode (array_length = false, array_null_terminated = true)] string[] str_array); - [Version (since = "2.44")] - public bool strv_contains ([CCode (array_length = false, array_null_terminated = true)] string[] str_array, string str); - - [CCode (cname = "errno", cheader_filename = "errno.h")] - public int errno; - public unowned string strerror (int errnum); - - /* Character Set Conversions */ - - public static string convert (string str, ssize_t len, string to_codeset, string from_codeset, out size_t bytes_read = null, out size_t bytes_written = null) throws ConvertError; - public static string convert_with_fallback (string str, ssize_t len, string to_codeset, string from_codeset, string? fallback = null, out size_t bytes_read = null, out size_t bytes_written = null) throws ConvertError; - public static string convert_with_iconv (string str, ssize_t len, IConv converter, out size_t bytes_read = null, out size_t bytes_written = null) throws ConvertError; - public static bool get_charset (out unowned string charset); - [Version (since = "2.62")] - public static bool get_console_charset ([CCode (array_length = false, array_null_terminated = true)] out unowned string[] charsets); - public static bool get_filename_charsets ([CCode (array_length = false, array_null_terminated = true)] out unowned string[] charsets); - - [SimpleType] - [CCode (has_type_id = false)] - public struct IConv { - public static IConv open (string to_codeset, string from_codeset); - [CCode (cname = "g_iconv")] - public size_t iconv ([CCode (array_length = false)] ref char[] inbuf, ref size_t inbytes_left, [CCode (array_length = false)] ref char[] outbuf, ref size_t outbytes_left); - public int close (); - } - - namespace Filename { - public static string to_utf8 (string opsysstring, ssize_t len, out size_t bytes_read, out size_t bytes_written) throws ConvertError; - public static string from_utf8 (string utf8string, ssize_t len, out size_t bytes_read, out size_t bytes_written) throws ConvertError; - public static string from_uri (string uri, out string hostname = null) throws ConvertError; - public static string to_uri (string filename, string? hostname = null) throws ConvertError; - [Version (since = "2.6")] - public static string display_name (string filename); - [Version (since = "2.6")] - public static string display_basename (string filename); - [Version (since = "2.58")] - [CCode (cname = "g_canonicalize_filename")] - public static string canonicalize (string filename, string? relative_to = null); - } - - public errordomain ConvertError { - NO_CONVERSION, - ILLEGAL_SEQUENCE, - FAILED, - PARTIAL_INPUT, - BAD_URI, - NOT_ABSOLUTE_PATH; - public static GLib.Quark quark (); - } - - /* Base64 Encoding */ - - [Version (since = "2.12")] - namespace Base64 { - public static size_t encode_step (uchar[] _in, bool break_lines, char* _out, ref int state, ref int save); - public static size_t encode_close (bool break_lines, char* _out, ref int state, ref int save); - public static string encode (uchar[] data); - public static size_t decode_step (char[] _in, uchar* _out, ref int state, ref uint save); - [CCode (array_length_type = "size_t")] - public static uchar[] decode (string text); - } - - /* Data Checksums */ - - [Version (since = "2.16")] - [CCode (cprefix = "G_CHECKSUM_", has_type_id = false)] - public enum ChecksumType { - MD5, - SHA1, - SHA256, - [Version (since = "2.52")] - SHA384, - [Version (since = "2.36")] - SHA512; - - public ssize_t get_length (); - } - - [Compact] - [Version (since = "2.16")] - [CCode (free_function = "g_checksum_free")] - public class Checksum { - public Checksum (ChecksumType checksum_type); - public Checksum copy (); - public void update ([CCode (array_length = false)] uchar[] data, size_t length); - public unowned string get_string (); - public void get_digest ([CCode (array_length = false)] uint8[] buffer, ref size_t digest_len); - [CCode (cname = "g_compute_checksum_for_data")] - public static string compute_for_data (ChecksumType checksum_type, uchar[] data); - [CCode (cname = "g_compute_checksum_for_string")] - public static string compute_for_string (ChecksumType checksum_type, string str, size_t length = -1); - [Version (since = "2.34")] - [CCode (cname = "g_compute_checksum_for_bytes")] - public static string compute_for_bytes (ChecksumType checksum_type, Bytes data); - } - - /* Secure HMAC Digests */ - - [Compact] - [Version (since = "2.30")] - [CCode (ref_function = "g_hmac_ref", unref_function = "g_hmac_unref")] - public class Hmac { - public Hmac (ChecksumType digest_type, [CCode (array_length_type = "gsize")] uint8[] key); - public Hmac copy (); - public void update ([CCode (array_length_type = "gssize")] uint8[] data); - public unowned string get_string (); - public void get_digest ([CCode (array_length = false)] uint8[] buffer, ref size_t digest_len); - [Version (since = "2.30")] - [CCode (cname = "g_compute_hmac_for_data")] - public static string compute_for_data (ChecksumType checksum_type, uint8[] key, uint8[] data); - [Version (since = "2.30")] - [CCode (cname = "g_compute_hmac_for_string")] - public static string compute_for_string (ChecksumType checksum_type, uint8[] key, string str, size_t length = -1); - [Version (since = "2.50")] - [CCode (cname = "g_compute_hmac_for_bytes")] - public static string compute_hmac_for_bytes (ChecksumType checksum_type, Bytes key, Bytes data); - } - - /* Date and Time Functions */ - - [Version (deprecated_since = "2.62")] - [CCode (has_type_id = false)] - public struct TimeVal { - public long tv_sec; - public long tv_usec; - - [CCode (cname = "g_get_current_time")] - public TimeVal (); - [Version (deprecated_since = "2.62", replacement = "get_real_time")] - [CCode (cname = "g_get_current_time")] - public void get_current_time (); - public void add (long microseconds); - [Version (since = "2.12")] - [CCode (instance_pos = -1)] - public bool from_iso8601 (string iso_date); - [Version (since = "2.12")] - public string to_iso8601 (); - } - - [Version (since = "2.28")] - public static int64 get_monotonic_time (); - [Version (since = "2.28")] - public static int64 get_real_time (); - - public struct DateDay : uchar { - [CCode (cname = "G_DATE_BAD_DAY")] - public static DateDay BAD_DAY; - - [CCode (cname = "g_date_valid_day")] - public bool valid (); - } - - [CCode (cprefix = "G_DATE_", has_type_id = false)] - public enum DateMonth { - BAD_MONTH, - JANUARY, - FEBRUARY, - MARCH, - APRIL, - MAY, - JUNE, - JULY, - AUGUST, - SEPTEMBER, - OCTOBER, - NOVEMBER, - DECEMBER; - - [CCode (cname = "g_date_get_days_in_month")] - public uchar get_days_in_month (DateYear year); - [CCode (cname = "g_date_valid_month")] - public bool valid (); - } - - public struct DateYear : ushort { - [CCode (cname = "G_DATE_BAD_YEAR")] - public static DateDay BAD_YEAR; - - [CCode (cname = "g_date_is_leap_year")] - public bool is_leap_year (); - [CCode (cname = "g_date_get_monday_weeks_in_year")] - public uchar get_monday_weeks_in_year (); - [CCode (cname = "g_date_get_sunday_weeks_in_year")] - public uchar get_sunday_weeks_in_year (); - [CCode (cname = "g_date_valid_year")] - public bool valid (); - } - - [CCode (cprefix = "G_DATE_", has_type_id = false)] - public enum DateWeekday { - BAD_WEEKDAY, - MONDAY, - TUESDAY, - WEDNESDAY, - THURSDAY, - FRIDAY, - SATURDAY, - SUNDAY; - - [CCode (cname = "g_date_valid_weekday")] - public bool valid (); - } - - [CCode (cprefix = "G_DATE_", has_type_id = false)] - public enum DateDMY { - DAY, - MONTH, - YEAR - } - - [CCode (type_id = "G_TYPE_DATE")] - public struct Date { - public void clear (uint n_dates = 1); - [Version (since = "2.56")] - public Date copy (); - public void set_day (DateDay day); - public void set_month (DateMonth month); - public void set_year (DateYear year); - public void set_dmy (DateDay day, int month, DateYear y); - public void set_julian (uint julian_day); - [Version (since = "2.10")] - public void set_time_t (time_t timet); - [Version (deprecated_since = "2.62", since = "2.10")] - public void set_time_val (TimeVal timeval); - public void set_parse (string str); - public void add_days (uint n_days); - public void subtract_days (uint n_days); - public void add_months (uint n_months); - public void subtract_months (uint n_months); - public void add_years (uint n_years); - public void subtract_years (uint n_years); - public int days_between (Date date2); - public int compare (Date rhs); - public void clamp (Date min_date, Date max_date); - public void order (Date date2); - public DateDay get_day (); - public DateMonth get_month (); - public DateYear get_year (); - public uint get_julian (); - public DateWeekday get_weekday (); - public uint get_day_of_year (); - public bool is_first_of_month (); - public bool is_last_of_month (); - public uint get_monday_week_of_year (); - public uint get_sunday_week_of_year (); - [Version (since = "2.6")] - public uint get_iso8601_week_of_year (); - [CCode (instance_pos = -1)] - public size_t strftime (char[] s, string format); - [CCode (cname = "g_date_to_struct_tm")] - public void to_time (out Time tm); - public bool valid (); - public static uchar get_days_in_month (DateMonth month, DateYear year); - public static bool valid_day (DateDay day); - public static bool valid_dmy (DateDay day, DateMonth month, DateYear year); - public static bool valid_julian (uint julian_date); - public static bool valid_weekday (DateWeekday weekday); - } - - [CCode (cname = "struct tm", cheader_filename = "time.h", has_type_id = false)] - public struct Time { - [CCode (cname = "tm_sec")] - public int second; - [CCode (cname = "tm_min")] - public int minute; - [CCode (cname = "tm_hour")] - public int hour; - [CCode (cname = "tm_mday")] - public int day; - [CCode (cname = "tm_mon")] - public int month; - [CCode (cname = "tm_year")] - public int year; - [CCode (cname = "tm_wday")] - public int weekday; - [CCode (cname = "tm_yday")] - public int day_of_year; - [CCode (cname = "tm_isdst")] - public int isdst; - - [CCode (cname = "gmtime_r", feature_test_macro = "_XOPEN_SOURCE")] - static void gmtime_r (ref time_t time, out Time result); - [CCode (cname = "localtime_r", feature_test_macro = "_XOPEN_SOURCE")] - static void localtime_r (ref time_t time, out Time result); - - public static Time gm (time_t time) { - Time result; - gmtime_r (ref time, out result); - return result; - } - public static Time local (time_t time) { - Time result; - localtime_r (ref time, out result); - return result; - } - - public string to_string () { - return "%04d-%02d-%02d %02d:%02d:%02d".printf (year + 1900, month + 1, day, hour, minute, second); - } - - public string format (string format) { - var buffer = new char[64]; - this.strftime (buffer, format); - return (string) buffer; - } - - [CCode (cname = "mktime")] - public time_t mktime (); - - [CCode (cname = "strftime", instance_pos = -1)] - public size_t strftime (char[] s, string format); - [CCode (cname = "strptime", instance_pos = -1, feature_test_macro = "_XOPEN_SOURCE")] - public unowned string? strptime (string buf, string format); - } - - [SimpleType] - [Version (since = "2.26")] - [CCode (cheader_filename = "glib.h", type_id = "G_TYPE_INT64", marshaller_type_name = "INT64", get_value_function = "g_value_get_int64", set_value_function = "g_value_set_int64", default_value = "0LL", type_signature = "x")] - [IntegerType (rank = 10)] - public struct TimeSpan : int64 { - public const TimeSpan DAY; - public const TimeSpan HOUR; - public const TimeSpan MINUTE; - public const TimeSpan SECOND; - public const TimeSpan MILLISECOND; - } - - [Compact] - [Version (since = "2.26")] - [CCode (ref_function = "g_date_time_ref", unref_function = "g_date_time_unref", type_id = "G_TYPE_DATE_TIME")] - public class DateTime { - public DateTime.now (TimeZone tz = new TimeZone.local ()); - public DateTime.now_local (); - public DateTime.now_utc (); - [Version (since = "2.56")] - public DateTime.from_iso8601 (string text, TimeZone? default_tz); - public DateTime.from_unix_local (int64 t); - public DateTime.from_unix_utc (int64 t); - [Version (deprecated_since = "2.62")] - public DateTime.from_timeval_local (TimeVal tv); - [Version (deprecated_since = "2.62")] - public DateTime.from_timeval_utc (TimeVal tv); - public DateTime (TimeZone tz, int year, int month, int day, int hour, int minute, double seconds); - public DateTime.local (int year, int month, int day, int hour, int minute, double seconds); - public DateTime.utc (int year, int month, int day, int hour, int minute, double seconds); - public DateTime add (TimeSpan timespan); - public DateTime add_years (int years); - public DateTime add_months (int months); - public DateTime add_weeks (int weeks); - public DateTime add_days (int days); - public DateTime add_hours (int hours); - public DateTime add_minutes (int minutes); - public DateTime add_seconds (double seconds); - public DateTime add_full (int years, int months, int days, int hours = 0, int minutes = 0, double seconds = 0); - public int compare (DateTime dt); - public TimeSpan difference (DateTime begin); - public uint hash (); - public bool equal (DateTime dt); - public void get_ymd (out int year, out int month, out int day); - public int get_year (); - public int get_month (); - public int get_day_of_month (); - public int get_week_numbering_year (); - public int get_week_of_year (); - public int get_day_of_week (); - public int get_day_of_year (); - public int get_hour (); - public int get_minute (); - public int get_second (); - public int get_microsecond (); - public double get_seconds (); - [Version (since = "2.58")] - public unowned TimeZone get_timezone (); - public int64 to_unix (); - [Version (deprecated_since = "2.62")] - public bool to_timeval (out TimeVal tv); - public TimeSpan get_utc_offset (); - public unowned string get_timezone_abbreviation (); - public bool is_daylight_savings (); - public DateTime to_timezone (TimeZone tz); - public DateTime to_local (); - public DateTime to_utc (); - public string format (string format); - [Version (since = "2.62")] - public string format_iso8601 (); - public string to_string () { - return this.format ("%FT%H:%M:%S%z"); - } - } - - public enum TimeType { - STANDARD, - DAYLIGHT, - UNIVERSAL - } - - [Compact] - [Version (since = "2.26")] - [CCode (ref_function = "g_time_zone_ref", unref_function = "g_time_zone_unref")] - public class TimeZone { - public TimeZone (string identifier); - public TimeZone.utc (); - public TimeZone.local (); - [Version (since = "2.58")] - public TimeZone.offset (int32 seconds); - public int find_interval (TimeType type, int64 time); - public int adjust_time (TimeType type, ref int64 time); - public unowned string get_abbreviation (int interval); - [Version (since = "2.58")] - public unowned string get_identifier (); - public int32 get_offset (int interval); - public bool is_dst (int interval); - } - - /* Random Numbers */ - - [Compact] - [CCode (copy_function = "g_rand_copy", free_function = "g_rand_free")] - public class Rand { - public Rand.with_seed (uint32 seed); - [Version (since = "2.4")] - public Rand.with_seed_array ([CCode (array_length = false)] uint32[] seed, uint seed_length); - public Rand (); - public void set_seed (uint32 seed); - [Version (since = "2.4")] - public void set_seed_array ([CCode (array_length = false)] uint32[] seed, uint seed_length); - public bool boolean (); - [CCode (cname = "g_rand_int")] - public uint32 next_int (); - public int32 int_range (int32 begin, int32 end); - [CCode (cname = "g_rand_double")] - public double next_double (); - public double double_range (double begin, double end); - } - - namespace Random { - public static void set_seed (uint32 seed); - public static bool boolean (); - [CCode (cname = "g_random_int")] - public static uint32 next_int (); - public static int32 int_range (int32 begin, int32 end); - [CCode (cname = "g_random_double")] - public static double next_double (); - public static double double_range (double begin, double end); - } - - namespace Uuid { - [Version (since = "2.52")] - public static bool string_is_valid (string str); - [Version (since = "2.52")] - public static string string_random (); - } - - /* Miscellaneous Utility Functions */ - - namespace Environment { - [Version (since = "2.2")] - [CCode (cname = "g_get_application_name")] - public static unowned string? get_application_name (); - [Version (since = "2.2")] - [CCode (cname = "g_set_application_name")] - public static void set_application_name (string application_name); - [CCode (cname = "g_get_prgname")] - public static unowned string get_prgname (); - [CCode (cname = "g_set_prgname")] - public static void set_prgname (string application_name); - [CCode (cname = "g_getenv")] - public static unowned string? get_variable (string variable); - [Version (since = "2.4")] - [CCode (cname = "g_setenv")] - public static bool set_variable (string variable, string value, bool overwrite); - [Version (since = "2.4")] - [CCode (cname = "g_unsetenv")] - public static void unset_variable (string variable); - [Version (since = "2.8")] - [CCode (cname = "g_listenv", array_length = false, array_null_terminated = true)] - public static string[] list_variables (); - [CCode (cname = "g_get_user_name")] - public static unowned string get_user_name (); - [CCode (cname = "g_get_real_name")] - public static unowned string get_real_name (); - [Version (since = "2.6")] - [CCode (cname = "g_get_user_cache_dir")] - public static unowned string get_user_cache_dir (); - [Version (since = "2.6")] - [CCode (cname = "g_get_user_data_dir")] - public static unowned string get_user_data_dir (); - [Version (since = "2.6")] - [CCode (cname = "g_get_user_config_dir")] - public static unowned string get_user_config_dir (); - [CCode (cname = "g_get_user_runtime_dir")] - public static unowned string get_user_runtime_dir (); - [Version (since = "2.14")] - [CCode (cname = "g_get_user_special_dir")] - public static unowned string get_user_special_dir (UserDirectory directory); - [Version (since = "2.6")] - [CCode (cname = "g_get_system_data_dirs", array_length = false, array_null_terminated = true)] - public static unowned string[] get_system_data_dirs (); - [Version (since = "2.6")] - [CCode (cname = "g_get_system_config_dirs", array_length = false, array_null_terminated = true)] - public static unowned string[] get_system_config_dirs (); - [Version (since = "2.8")] - [CCode (cname = "g_get_host_name")] - public static unowned string get_host_name (); - [CCode (cname = "g_get_home_dir")] - public static unowned string get_home_dir (); - [Version (since = "2.64")] - [CCode (cname = "g_get_os_info")] - public static string? get_os_info (string key_name); - [CCode (cname = "g_get_tmp_dir")] - public static unowned string get_tmp_dir (); - [CCode (cname = "g_get_current_dir")] - public static string get_current_dir (); - [CCode (cname = "g_find_program_in_path")] - public static string? find_program_in_path (string program); - [Version (deprecated_since = "2.32")] - [CCode (cname = "g_atexit")] - public static void atexit (VoidFunc func); - [Version (since = "2.8")] - [CCode (cname = "g_chdir")] - public static int set_current_dir (string path); - } - - namespace Environ { - [Version (since = "2.28")] - [CCode (cname = "g_get_environ", array_length = false, array_null_terminated = true)] - public static string[] get (); - [Version (since = "2.32")] - [CCode (cname = "g_environ_getenv")] - public static unowned string? get_variable ([CCode (array_length = false, array_null_terminated = true)] string[]? envp, string variable); - [Version (since = "2.32")] - [CCode (cname = "g_environ_setenv", array_length = false, array_null_terminated = true)] - public static string[] set_variable ([CCode (array_length = false, array_null_terminated = true)] owned string[]? envp, string variable, string value, bool overwrite = true); - [Version (since = "2.32")] - [CCode (cname = "g_environ_unsetenv", array_length = false, array_null_terminated = true)] - public static string[] unset_variable ([CCode (array_length = false, array_null_terminated = true)] owned string[]? envp, string variable); - } - - [Version (since = "2.14")] - [CCode (has_type_id = false)] - public enum UserDirectory { - DESKTOP, - DOCUMENTS, - DOWNLOAD, - MUSIC, - PICTURES, - PUBLIC_SHARE, - TEMPLATES, - VIDEOS, - [CCode (cname = "G_USER_N_DIRECTORIES")] - N_DIRECTORIES - } - - namespace Hostname { - public static bool is_non_ascii (string hostname); - public static bool is_ascii_encoded (string hostname); - public static bool is_ip_address (string hostname); - public static string to_ascii (string hostname); - public static string to_unicode (string hostname); - } - - [Version (since = "2.64")] - [CCode (lower_case_cprefix = "G_OS_INFO_KEY_")] - namespace OsInfoKey { - public const string NAME; - public const string PRETTY_NAME; - public const string VERSION; - public const string VERSION_CODENAME; - public const string VERSION_ID; - public const string ID; - public const string HOME_URL; - public const string DOCUMENTATION_URL; - public const string SUPPORT_URL; - public const string BUG_REPORT_URL; - public const string PRIVACY_POLICY_URL; - } - - namespace Path { - public static bool is_absolute (string file_name); - public static unowned string skip_root (string file_name); - public static string get_basename (string file_name); - public static string get_dirname (string file_name); - [CCode (cname = "g_build_filename")] - public static string build_filename (string first_element, ...); - [Version (since = "2.56")] - [CCode (cname = "g_build_filename_valist")] - public static string build_filename_valist (string first_element, va_list args); - [CCode (cname = "g_build_path")] - public static string build_path (string separator, string first_element, ...); - - [CCode (cname = "G_DIR_SEPARATOR")] - public const char DIR_SEPARATOR; - [CCode (cname = "G_DIR_SEPARATOR_S")] - public const string DIR_SEPARATOR_S; - [Version (since = "2.6")] - [CCode (cname = "G_IS_DIR_SEPARATOR")] - public static bool is_dir_separator (unichar c); - [CCode (cname = "G_SEARCHPATH_SEPARATOR")] - public const char SEARCHPATH_SEPARATOR; - [CCode (cname = "G_SEARCHPATH_SEPARATOR_S")] - public const string SEARCHPATH_SEPARATOR_S; - } - - namespace Bit { - public static int nth_lsf (ulong mask, int nth_bit); - public static int nth_msf (ulong mask, int nth_bit); - public static uint storage (ulong number); - } - - namespace SpacedPrimes { - public static uint closest (uint num); - } - - [CCode (has_target = false)] - public delegate void FreeFunc (void* data); - [CCode (has_target = false)] - public delegate void VoidFunc (); - - [Version (deprecated_since = "2.30", replacement = "format_size", since = "2.16")] - public string format_size_for_display (int64 size); - - [Version (since = "2.30")] - [CCode (cname = "g_format_size_full")] - public string format_size (uint64 size, FormatSizeFlags flags = FormatSizeFlags.DEFAULT); - - [Version (since = "2.30")] - [CCode (cprefix = "G_FORMAT_SIZE_", has_type_id = false)] - [Flags] - public enum FormatSizeFlags { - DEFAULT, - LONG_FORMAT, - IEC_UNITS - } - - /* Lexical Scanner */ - [CCode (has_target = false)] - public delegate void ScannerMsgFunc (Scanner scanner, string message, bool error); - - [Compact] - [CCode (free_function = "g_scanner_destroy")] - public class Scanner { - public unowned string input_name; - public TokenType token; - public TokenValue value; - public uint line; - public uint position; - public TokenType next_token; - public TokenValue next_value; - public uint next_line; - public uint next_position; - public ScannerMsgFunc msg_handler; - public ScannerConfig? config; - public Scanner (ScannerConfig? config_templ); - public void input_file (int input_fd); - public void sync_file_offset (); - public void input_text (string text, uint text_len); - public TokenType peek_next_token (); - public TokenType get_next_token (); - public bool eof (); - public int cur_line (); - public int cur_position (); - public TokenType cur_token (); - public TokenValue cur_value (); - public uint set_scope (uint scope_id); - public void scope_add_symbol (uint scope_id, string symbol, void* value); - public void scope_foreach_symbol (uint scope_id, HFunc func); - public void* scope_lookup_symbol (uint scope_id, string symbol); - public void scope_remove_symbol (uint scope_id, string symbol); - public void* lookup_symbol (string symbol); - [PrintfFormat] - public void warn (string format, ...); - [PrintfFormat] - public void error (string format, ...); - public void unexp_token (TokenType expected_token, string? identifier_spec, string? symbol_spec, string? symbol_name, string? message, bool is_error); - } - - [CCode (has_type_id = false)] - public struct ScannerConfig { - public string* cset_skip_characters; - public string* cset_identifier_first; - public string* cset_identifier_nth; - public string* cpair_comment_single; - public bool case_sensitive; - public bool skip_comment_multi; - public bool skip_comment_single; - public bool scan_comment_multi; - public bool scan_identifier; - public bool scan_identifier_1char; - public bool scan_identifier_NULL; - public bool scan_symbols; - public bool scan_binary; - public bool scan_octal; - public bool scan_float; - public bool scan_hex; - public bool scan_hex_dollar; - public bool scan_string_sq; - public bool scan_string_dq; - public bool numbers_2_int; - public bool int_2_float; - public bool identifier_2_string; - public bool char_2_token; - public bool symbol_2_token; - public bool scope_0_fallback; - public bool store_int64; - } - - [CCode (lower_case_cprefix="G_CSET_")] - namespace CharacterSet { - public const string A_2_Z; - public const string a_2_z; - public const string DIGITS; - public const string LATINC; - public const string LATINS; - } - - [CCode (cprefix = "G_TOKEN_", has_type_id = false)] - public enum TokenType { - EOF, - LEFT_PAREN, - RIGHT_PAREN, - LEFT_CURLY, - RIGHT_CURLY, - LEFT_BRACE, - RIGHT_BRACE, - EQUAL_SIGN, - COMMA, - NONE, - ERROR, - CHAR, - BINARY, - OCTAL, - INT, - HEX, - FLOAT, - STRING, - SYMBOL, - IDENTIFIER, - IDENTIFIER_NULL, - COMMENT_SINGLE, - COMMENT_MULTI, - LAST - } - - [CCode (has_type_id = false)] - [SimpleType] - public struct TokenValue { - [CCode (cname="v_symbol")] - public void* symbol; - [CCode (cname="v_identifier")] - public unowned string identifier; - [CCode (cname="v_binary")] - public ulong binary; - [CCode (cname="v_octal")] - public ulong octal; - [CCode (cname="v_int")] - public ulong int; - [CCode (cname="v_int64")] - public ulong int64; - [CCode (cname="v_float")] - public double float; - [CCode (cname="v_hex")] - public ulong hex; - [CCode (cname="v_string")] - public unowned string string; - [CCode (cname="v_comment")] - public unowned string comment; - [CCode (cname="v_char")] - public uchar char; - [CCode (cname="v_error")] - public uint error; - } - - [CCode (cprefix = "G_ERR_", has_type_id = false)] - public enum ErrorType { - UNKNOWN, - UNEXP_EOF, - UNEXP_EOF_IN_STRING, - UNEXP_EOF_IN_COMMENT, - NON_DIGIT_IN_CONST, - DIGIT_RADIX, - FLOAT_RADIX, - FLOAT_MALFORMED - } - - /* Automatic String Completion */ - - [Version (deprecated_since = "2.26")] - [Compact] - [CCode (free_function = "g_completion_free")] - public class Completion { - public Completion (CompletionFunc? func = null); - public List items; - public CompletionFunc func; - public string prefix; - public List cache; - public CompletionStrncmpFunc strncmp_func; - public void add_items (List items); - public void remove_items (List items); - public void clear_items (); - public unowned List complete (string prefix, out string? new_prefix = null); - [Version (since = "2.4")] - public unowned List complete_utf8 (string prefix, out string? new_prefix = null); - } - - [CCode (has_target = false)] - public delegate string CompletionFunc (void* item); - [CCode (has_target = false)] - public delegate int CompletionStrncmpFunc (string s1, string s2, size_t n); - - /* Timers */ - - [Compact] - [CCode (free_function = "g_timer_destroy")] - public class Timer { - public Timer (); - public void start (); - public void stop (); - [Version (since = "2.4")] - public void @continue (); - public double elapsed (out ulong microseconds = null); - [Version (since = "2.62")] - public bool is_active (); - public void reset (); - } - - /* Spawning Processes */ - - public errordomain SpawnError { - FORK, - READ, - CHDIR, - ACCES, - PERM, - TOO_BIG, - NOEXEC, - NAMETOOLONG, - NOENT, - NOMEM, - NOTDIR, - LOOP, - TXTBUSY, - IO, - NFILE, - MFILE, - INVAL, - ISDIR, - LIBBAD, - FAILED; - public static GLib.Quark quark (); - } - - [CCode (cprefix = "G_SPAWN_", has_type_id = false)] - [Flags] - public enum SpawnFlags { - LEAVE_DESCRIPTORS_OPEN, - DO_NOT_REAP_CHILD, - SEARCH_PATH, - STDOUT_TO_DEV_NULL, - STDERR_TO_DEV_NULL, - CHILD_INHERITS_STDIN, - FILE_AND_ARGV_ZERO, - SEARCH_PATH_FROM_ENVP - } - - public delegate void SpawnChildSetupFunc (); - [CCode (has_target = false, cheader_filename = "signal.h")] - public delegate void SignalHandlerFunc (int signum); - - public unowned string strsignal (int signum); - - [CCode (lower_case_cprefix = "g_")] - namespace Process { - [Version (since = "2.58")] - public static bool spawn_async_with_fds (string? working_directory, [CCode (array_length = false, array_null_terminated = true)] string[] argv, [CCode (array_length = false, array_null_terminated = true)] string[]? envp, SpawnFlags _flags, SpawnChildSetupFunc? child_setup, out Pid child_pid = null, int stdin_fd = -1, int stdout_fd = -1, int stderr_fd = -1) throws SpawnError; - public static bool spawn_async_with_pipes (string? working_directory, [CCode (array_length = false, array_null_terminated = true)] string[] argv, [CCode (array_length = false, array_null_terminated = true)] string[]? envp, SpawnFlags _flags, SpawnChildSetupFunc? child_setup, out Pid child_pid, out int standard_input = null, out int standard_output = null, out int standard_error = null) throws SpawnError; - public static bool spawn_async (string? working_directory, [CCode (array_length = false, array_null_terminated = true)] string[] argv, [CCode (array_length = false, array_null_terminated = true)] string[]? envp, SpawnFlags _flags, SpawnChildSetupFunc? child_setup, out Pid child_pid) throws SpawnError; - public static bool spawn_sync (string? working_directory, [CCode (array_length = false, array_null_terminated = true)] string[] argv, [CCode (array_length = false, array_null_terminated = true)] string[]? envp, SpawnFlags _flags, SpawnChildSetupFunc? child_setup, out string standard_output = null, out string standard_error = null, out int exit_status = null) throws SpawnError; - public static bool spawn_command_line_async (string command_line) throws SpawnError; - public static bool spawn_command_line_sync (string command_line, out string standard_output = null, out string standard_error = null, out int exit_status = null) throws SpawnError; - [CCode (cname = "g_spawn_close_pid")] - public static void close_pid (Pid pid); - [Version (since = "2.34")] - [CCode (cname = "g_spawn_check_exit_status")] - public static bool check_exit_status (int exit_status) throws GLib.Error; - - /* these macros are required to examine the exit status of a process */ - [CCode (cname = "WIFEXITED", cheader_filename = "sys/wait.h")] - public static bool if_exited (int status); - [CCode (cname = "WEXITSTATUS", cheader_filename = "sys/wait.h")] - public static int exit_status (int status); - [CCode (cname = "WIFSIGNALED", cheader_filename = "sys/wait.h")] - public static bool if_signaled (int status); - [CCode (cname = "WTERMSIG", cheader_filename = "sys/wait.h")] - public static ProcessSignal term_sig (int status); - [CCode (cname = "WCOREDUMP", cheader_filename = "sys/wait.h")] - public static bool core_dump (int status); - [CCode (cname = "WIFSTOPPED", cheader_filename = "sys/wait.h")] - public static bool if_stopped (int status); - [CCode (cname = "WSTOPSIG", cheader_filename = "sys/wait.h")] - public static ProcessSignal stop_sig (int status); - [CCode (cname = "WIFCONTINUED", cheader_filename = "sys/wait.h")] - public static bool if_continued (int status); - - [NoReturn] - [CCode (cname = "abort", cheader_filename = "stdlib.h")] - public void abort (); - [NoReturn] - [CCode (cname = "exit", cheader_filename = "stdlib.h")] - public void exit (int status); - [CCode (cname = "raise", cheader_filename = "signal.h")] - public int raise (ProcessSignal sig); - [CCode (cname = "signal", cheader_filename = "signal.h")] - public SignalHandlerFunc @signal (ProcessSignal signum, SignalHandlerFunc handler); - } - - [CCode (cname = "int", has_type_id = false, cheader_filename = "signal.h", cprefix = "SIG")] - public enum ProcessSignal { - HUP, - INT, - QUIT, - ILL, - TRAP, - ABRT, - BUS, - FPE, - KILL, - SEGV, - PIPE, - ALRM, - TERM, - USR1, - USR2, - CHLD, - CONT, - STOP, - TSTP, - TTIN, - TTOU - } - - - /* File Utilities */ - - public errordomain FileError { - EXIST, - ISDIR, - ACCES, - NAMETOOLONG, - NOENT, - NOTDIR, - NXIO, - NODEV, - ROFS, - TXTBSY, - FAULT, - LOOP, - NOSPC, - NOMEM, - MFILE, - NFILE, - BADF, - INVAL, - PIPE, - AGAIN, - INTR, - IO, - PERM, - NOSYS, - FAILED; - public static GLib.Quark quark (); - } - - [CCode (has_type_id = false)] - [Flags] - public enum FileTest { - IS_REGULAR, - IS_SYMLINK, - IS_DIR, - IS_EXECUTABLE, - EXISTS - } - - [CCode (cname = "int", cprefix = "SEEK_", has_type_id = false)] - public enum FileSeek { - SET, - CUR, - END - } - - [Compact] - [CCode (cname = "FILE", free_function = "fclose", cheader_filename = "stdio.h")] - public class FileStream { - [CCode (cname = "EOF", cheader_filename = "stdio.h")] - public const int EOF; - - [Version (since = "2.6")] - [CCode (cname = "g_fopen", cheader_filename = "glib/gstdio.h")] - public static FileStream? open (string path, string mode); - [CCode (cname = "fdopen")] - public static FileStream? fdopen (int fildes, string mode); - [CCode (cname = "fprintf")] - [PrintfFormat ()] - public void printf (string format, ...); - [CCode (cname = "vfprintf")] - public void vprintf (string format, va_list args); - [CCode (cname = "fputc", instance_pos = -1)] - public void putc (char c); - [CCode (cname = "fputs", instance_pos = -1)] - public void puts (string s); - [CCode (cname = "fgetc")] - public int getc (); - [CCode (cname = "ungetc", instance_pos = -1)] - public int ungetc (int c); - [CCode (cname = "fgets", instance_pos = -1)] - public unowned string? gets (char[] s); - [CCode (cname = "feof")] - public bool eof (); - [CCode (cname = "fscanf"), ScanfFormat] - public int scanf (string format, ...); - [CCode (cname = "fflush")] - public int flush (); - [CCode (cname = "fseek")] - public int seek (long offset, FileSeek whence); - [CCode (cname = "ftell")] - public long tell (); - [CCode (cname = "rewind")] - public void rewind (); - [CCode (cname = "fileno")] - public int fileno (); - [CCode (cname = "ferror")] - public int error (); - [CCode (cname = "clearerr")] - public void clearerr (); - [CCode (cname = "fread", instance_pos = -1)] - public size_t read ([CCode (array_length_pos = 2.1)] uint8[] buf, size_t size = 1); - [CCode (cname = "fwrite", instance_pos = -1)] - public size_t write ([CCode (array_length_pos = 2.1)] uint8[] buf, size_t size = 1); - - public string? read_line () { - int c; - StringBuilder? ret = null; - while ((c = getc ()) != EOF) { - if (ret == null) { - ret = new StringBuilder (); - } - if (c == '\n') { - break; - } - ((!)(ret)).append_c ((char) c); - } - if (ret == null) { - return null; - } else { - return ((!)(ret)).str; - } - } - } - - [CCode (cname = "struct utimbuf", cheader_filename = "sys/types.h,utime.h", has_type_id = false)] - public struct UTimBuf { - time_t actime; /* access time */ - time_t modtime; /* modification time */ - } - - [CCode (lower_case_cprefix = "g_file_", cheader_filename = "glib/gstdio.h")] - namespace FileUtils { - public static bool get_contents (string filename, out string contents, out size_t length = null) throws FileError; - [Version (since = "2.8")] - public static bool set_contents (string filename, string contents, ssize_t length = -1) throws FileError; - [CCode (cname = "g_file_get_contents")] - public static bool get_data (string filename, [CCode (type = "gchar**", array_length_type = "size_t")] out uint8[] contents) throws FileError; - [CCode (cname = "g_file_set_contents")] - public static bool set_data (string filename, [CCode (type = "const char*", array_length_type = "size_t")] uint8[] contents) throws FileError; - public static bool test (string filename, FileTest test); - public static int open_tmp (string tmpl, out string name_used) throws FileError; - [Version (since = "2.4")] - public static string read_link (string filename) throws FileError; - public static int error_from_errno (int err_no); - - [Version (since = "2.64")] - [CCode (cname = "g_fsync")] - public static int fsync (int fd); - [CCode (cname = "g_mkstemp")] - public static int mkstemp (string tmpl); - [Version (since = "2.6")] - [CCode (cname = "g_rename")] - public static int rename (string oldfilename, string newfilename); - [Version (since = "2.6")] - [CCode (cname = "g_remove")] - public static int remove (string filename); - [CCode (cname = "g_unlink")] - public static int unlink (string filename); - [Version (since = "2.8")] - [CCode (cname = "g_chmod")] - public static int chmod (string filename, int mode); - [Version (since = "2.18")] - [CCode (cname = "g_utime")] - public static int utime (string filename, UTimBuf? times = null); - - [CCode (cname = "symlink", cheader_filename = "unistd.h")] - public static int symlink (string oldpath, string newpath); - - [CCode (cname = "close", cheader_filename = "unistd.h")] - public static int close (int fd); - - [Version (since = "2.36")] - [CCode (cname = "g_close")] - public static bool close_checked (int fd) throws FileError; - } - - [CCode (cname = "GStatBuf", cheader_filename = "glib/gstdio.h", has_type_id = false)] - public struct Stat { - public time_t st_atime; - public time_t st_mtime; - public time_t st_ctime; - [CCode (cname = "g_stat", instance_pos = -1)] - public Stat (string filename); - [Version (since = "2.6")] - [CCode (cname = "g_lstat", instance_pos = -1)] - public Stat.l (string filename); - } - - [Compact] - [CCode (free_function = "g_dir_close")] - public class Dir { - public static Dir open (string filename, uint _flags = 0) throws FileError; - public unowned string? read_name (); - public void rewind (); - } - - [CCode (cheader_filename = "glib/gstdio.h")] - namespace DirUtils { - [Version (since = "2.6")] - [CCode (cname = "g_mkdir")] - public static int create (string pathname, int mode); - [Version (since = "2.8")] - [CCode (cname = "g_mkdir_with_parents")] - public static int create_with_parents (string pathname, int mode); - [Version (since = "2.30")] - [CCode (cname = "mkdtemp")] - public static string mkdtemp (owned string template); - [Version (since = "2.30")] - [CCode (cname = "g_dir_make_tmp")] - public static string make_tmp (string tmpl) throws FileError; - [Version (since = "2.6")] - [CCode (cname = "g_rmdir")] - public static int remove (string filename); - } - - [Compact] - [Version (since = "2.22")] - [CCode (ref_function = "g_mapped_file_ref", unref_function = "g_mapped_file_unref")] - public class MappedFile { - public MappedFile (string filename, bool writable) throws FileError; - [Version (since = "2.32")] - public MappedFile.from_fd (int fd, bool writable) throws FileError; - public size_t get_length (); - public unowned char* get_contents (); - [Version (since = "2.34")] - public Bytes get_bytes (); - } - - [CCode (cname = "stdin", cheader_filename = "stdio.h")] - public static FileStream stdin; - - [CCode (cname = "stdout", cheader_filename = "stdio.h")] - public static FileStream stdout; - - [CCode (cname = "stderr", cheader_filename = "stdio.h")] - public static FileStream stderr; - - /* URI Functions */ - - namespace Uri { - public const string RESERVED_CHARS_ALLOWED_IN_PATH; - public const string RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT; - public const string RESERVED_CHARS_ALLOWED_IN_USERINFO; - public const string RESERVED_CHARS_GENERIC_DELIMITERS; - public const string RESERVED_CHARS_SUBCOMPONENT_DELIMITERS; - - [Version (since = "2.16")] - public static string? parse_scheme (string uri); - [Version (since = "2.16")] - public static string escape_string (string unescaped, string? reserved_chars_allowed = null, bool allow_utf8 = true); - [Version (since = "2.16")] - public static string? unescape_string (string escaped_string, string? illegal_characters = null); - [Version (since = "2.16")] - public static string? unescape_segment (string? escaped_string, string? escaped_string_end, string? illegal_characters = null); - [Version (since = "2.6")] - [CCode (array_length = false, array_null_terminated = true)] - public static string[] list_extract_uris (string uri_list); - } - - /* Shell-related Utilities */ - - public errordomain ShellError { - BAD_QUOTING, - EMPTY_STRING, - FAILED; - public static GLib.Quark quark (); - } - - namespace Shell { - public static bool parse_argv (string command_line, [CCode (array_length_pos = 1.9)] out string[] argvp) throws ShellError; - public static string quote (string unquoted_string); - public static string unquote (string quoted_string) throws ShellError; - } - - /* Commandline option parser */ - - public errordomain OptionError { - UNKNOWN_OPTION, - BAD_VALUE, - FAILED; - public static GLib.Quark quark (); - } - - [Compact] - [Version (since = "2.6")] - [CCode (free_function = "g_option_context_free")] - public class OptionContext { - public OptionContext (string? parameter_string = null); - [Version (since = "2.12")] - public void set_summary (string summary); - [Version (since = "2.12")] - public unowned string get_summary (); - [Version (since = "2.12")] - public void set_description (string description); - [Version (since = "2.12")] - public unowned string get_description (); - [Version (since = "2.12")] - public void set_translate_func (TranslateFunc func, DestroyNotify? destroy_notify); - [Version (since = "2.12")] - public void set_translation_domain (string domain); - public bool parse ([CCode (array_length_pos = 0.9)] ref unowned string[] argv) throws OptionError; - [Version (since = "2.40")] - public bool parse_strv ([CCode (array_length = false, array_null_terminated = true)] ref string[] argv) throws OptionError; - public void set_help_enabled (bool help_enabled); - public bool get_help_enabled (); - public void set_ignore_unknown_options (bool ignore_unknown); - public bool get_ignore_unknown_options (); - [Version (since = "2.14")] - public string get_help (bool main_help, OptionGroup? group); - public void add_main_entries ([CCode (array_length = false, array_null_terminated = true)] OptionEntry[] entries, string? translation_domain); - public void add_group (owned OptionGroup group); - public void set_main_group (owned OptionGroup group); - public unowned OptionGroup get_main_group (); - [Version (since = "2.44")] - public void set_strict_posix (bool strict_posix); - [Version (since = "2.44")] - public bool get_strict_posix (); - } - - public delegate unowned string TranslateFunc (string str); - - public const string OPTION_REMAINING; - - [CCode (has_type_id = false)] - public enum OptionArg { - NONE, - STRING, - INT, - CALLBACK, - FILENAME, - STRING_ARRAY, - FILENAME_ARRAY, - DOUBLE, - INT64 - } - - [Flags] - [CCode (cprefix = "G_OPTION_FLAG_", has_type_id = false)] - public enum OptionFlags { - [Version (since = "2.42")] - NONE, - HIDDEN, - IN_MAIN, - REVERSE, - NO_ARG, - FILENAME, - OPTIONAL_ARG, - NOALIAS - } - - [CCode (has_type_id = false)] - public struct OptionEntry { - public unowned string long_name; - public char short_name; - public int flags; - - public OptionArg arg; - public void* arg_data; - - public unowned string description; - public unowned string? arg_description; - } - - [Compact] - [Version (since = "2.44")] - [CCode (ref_function = "g_option_group_ref", unref_function = "g_option_group_unref", type_id = "G_TYPE_OPTION_GROUP")] - public class OptionGroup { - public OptionGroup (string name, string description, string help_description, void* user_data = null, DestroyNotify? destroy = null); - public void add_entries ([CCode (array_length = false, array_null_terminated = true)] OptionEntry[] entries); - public void set_parse_hooks (OptionParseFunc? pre_parse_func, OptionParseFunc? post_parse_hook); - public void set_error_hook (OptionErrorFunc? error_func); - public void set_translate_func (owned TranslateFunc? func); - public void set_translation_domain (string domain); - } - - [CCode (has_target = false)] - public delegate bool OptionParseFunc (OptionContext context, OptionGroup group, void* data) throws OptionError; - [CCode (has_target = false)] - public delegate void OptionErrorFunc (OptionContext context, OptionGroup group, void* data, ref Error error); - [CCode (has_target = false)] - public delegate bool OptionArgFunc (string option_name, string val, void* data) throws OptionError; - - /* Perl-compatible regular expressions */ - - [Version (since = "2.14")] - public errordomain RegexError { - COMPILE, - OPTIMIZE, - REPLACE, - MATCH, - INTERNAL, - STRAY_BACKSLASH, - MISSING_CONTROL_CHAR, - UNRECOGNIZED_ESCAPE, - QUANTIFIERS_OUT_OF_ORDER, - QUANTIFIER_TOO_BIG, - UNTERMINATED_CHARACTER_CLASS, - INVALID_ESCAPE_IN_CHARACTER_CLASS, - RANGE_OUT_OF_ORDER, - NOTHING_TO_REPEAT, - UNRECOGNIZED_CHARACTER, - POSIX_NAMED_CLASS_OUTSIDE_CLASS, - UNMATCHED_PARENTHESIS, - INEXISTENT_SUBPATTERN_REFERENCE, - UNTERMINATED_COMMENT, - EXPRESSION_TOO_LARGE, - MEMORY_ERROR, - VARIABLE_LENGTH_LOOKBEHIND, - MALFORMED_CONDITION, - TOO_MANY_CONDITIONAL_BRANCHES, - ASSERTION_EXPECTED, - UNKNOWN_POSIX_CLASS_NAME, - POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED, - HEX_CODE_TOO_LARGE, - INVALID_CONDITION, - SINGLE_BYTE_MATCH_IN_LOOKBEHIND, - INFINITE_LOOP, - MISSING_SUBPATTERN_NAME_TERMINATOR, - DUPLICATE_SUBPATTERN_NAME, - MALFORMED_PROPERTY, - UNKNOWN_PROPERTY, - SUBPATTERN_NAME_TOO_LONG, - TOO_MANY_SUBPATTERNS, - INVALID_OCTAL_VALUE, - TOO_MANY_BRANCHES_IN_DEFINE, - DEFINE_REPETION, - INCONSISTENT_NEWLINE_OPTIONS, - MISSING_BACK_REFERENCE, - INVALID_RELATIVE_REFERENCE, - BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN, - UNKNOWN_BACKTRACKING_CONTROL_VERB, - NUMBER_TOO_BIG, - MISSING_SUBPATTERN_NAME, - MISSING_DIGIT, - INVALID_DATA_CHARACTER, - EXTRA_SUBPATTERN_NAME, - BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED, - INVALID_CONTROL_CHAR, - MISSING_NAME, - NOT_SUPPORTED_IN_CLASS, - TOO_MANY_FORWARD_REFERENCES, - NAME_TOO_LONG, - CHARACTER_VALUE_TOO_LARGE; - public static GLib.Quark quark (); - } - - [Version (since = "2.14")] - [CCode (cprefix = "G_REGEX_", has_type_id = false)] - [Flags] - public enum RegexCompileFlags { - CASELESS, - MULTILINE, - DOTALL, - EXTENDED, - ANCHORED, - DOLLAR_ENDONLY, - UNGREEDY, - RAW, - NO_AUTO_CAPTURE, - OPTIMIZE, - DUPNAMES, - NEWLINE_CR, - NEWLINE_LF, - NEWLINE_CRLF, - NEWLINE_ANYCRLF, - BSR_ANYCRLF, - JAVASCRIPT_COMPAT - } - - [Version (since = "2.14")] - [CCode (cprefix = "G_REGEX_MATCH_", has_type_id = false)] - [Flags] - public enum RegexMatchFlags { - ANCHORED, - NOTBOL, - NOTEOL, - NOTEMPTY, - PARTIAL, - NEWLINE_CR, - NEWLINE_LF, - NEWLINE_CRLF, - NEWLINE_ANY, - NEWLINE_ANYCRLF, - BSR_ANYCRLF, - BSR_ANY, - PARTIAL_SOFT, - PARTIAL_HARD, - NOTEMPTY_ATSTART - } - - [Compact] - [Version (since = "2.14")] - [CCode (ref_function = "g_regex_ref", unref_function = "g_regex_unref", type_id = "G_TYPE_REGEX")] - public class Regex { - public Regex (string pattern, RegexCompileFlags compile_options = 0, RegexMatchFlags match_options = 0) throws RegexError; - public unowned string get_pattern (); - [Version (since = "2.26")] - public RegexCompileFlags get_compile_flags (); - [Version (since = "2.34")] - public bool get_has_cr_or_lf (); - [Version (since = "2.26")] - public RegexMatchFlags get_match_flags (); - public int get_max_backref (); - [Version (since = "2.38")] - public int get_max_lookbehind (); - public int get_capture_count (); - public int get_string_number (string name); - public static string escape_string (string str, int length = -1); - public static bool match_simple (string pattern, string str, RegexCompileFlags compile_options = 0, RegexMatchFlags match_options = 0); - public bool match (string str, RegexMatchFlags match_options = 0, out MatchInfo match_info = null); - public bool match_full (string str, ssize_t string_len = -1, int start_position = 0, RegexMatchFlags match_options = 0, out MatchInfo match_info = null) throws RegexError; - public bool match_all (string str, RegexMatchFlags match_options = 0, out MatchInfo match_info = null); - public bool match_all_full (string str, ssize_t string_len = -1, int start_position = 0, RegexMatchFlags match_options = 0, out MatchInfo match_info = null) throws RegexError; - [CCode (array_length = false, array_null_terminated = true)] - public static string[] split_simple (string pattern, string str, RegexCompileFlags compile_options = 0, RegexMatchFlags match_options = 0); - [CCode (array_length = false, array_null_terminated = true)] - public string[] split (string str, RegexMatchFlags match_options = 0); - [CCode (array_length = false, array_null_terminated = true)] - public string[] split_full (string str, ssize_t string_len = -1, int start_position = 0, RegexMatchFlags match_options = 0, int max_tokens = 0) throws RegexError; - public string replace (string str, ssize_t string_len, int start_position, string replacement, RegexMatchFlags match_options = 0) throws RegexError; - public string replace_literal (string str, ssize_t string_len, int start_position, string replacement, RegexMatchFlags match_options = 0) throws RegexError; - public string replace_eval (string str, ssize_t string_len, int start_position, RegexMatchFlags match_options, RegexEvalCallback eval) throws RegexError; - public static bool check_replacement (string replacement, out bool has_references = null) throws RegexError; - } - - [Version (since = "2.14")] - public delegate bool RegexEvalCallback (MatchInfo match_info, StringBuilder result); - - [Compact] - [Version (since = "2.30")] - [CCode (ref_function = "g_match_info_ref", unref_function = "g_match_info_unref", type_id = "G_TYPE_MATCH_INFO")] - public class MatchInfo { - public unowned Regex get_regex (); - public unowned string get_string (); - public bool matches (); - public bool next () throws RegexError; - public int get_match_count (); - public bool is_partial_match (); - public string expand_references (string string_to_expand) throws RegexError; - public string? fetch (int match_num); - public bool fetch_pos (int match_num, out int start_pos, out int end_pos); - public string? fetch_named (string name); - public bool fetch_named_pos (string name, out int start_pos, out int end_pos); - [CCode (array_length = false, array_null_terminated = true)] - public string[] fetch_all (); - } - - /* Simple XML Subset Parser - See http://live.gnome.org/Vala/MarkupSample for an example */ - - public errordomain MarkupError { - BAD_UTF8, - EMPTY, - PARSE, - UNKNOWN_ELEMENT, - UNKNOWN_ATTRIBUTE, - INVALID_CONTENT, - MISSING_ATTRIBUTE; - public static GLib.Quark quark (); - } - - [CCode (cprefix = "G_MARKUP_", has_type_id = false)] - [Flags] - public enum MarkupParseFlags { - TREAT_CDATA_AS_TEXT, - PREFIX_ERROR_POSITION - } - - [Compact] - [Version (since = "2.36")] - [CCode (ref_function = "g_markup_parse_context_ref", unref_function = "g_markup_parse_context_unref", type_id = "G_TYPE_MARKUP_PARSE_CONTEXT")] - public class MarkupParseContext { - public MarkupParseContext (MarkupParser parser, MarkupParseFlags _flags, void* user_data, DestroyNotify? user_data_dnotify); - public bool parse (string text, ssize_t text_len) throws MarkupError; - public bool end_parse () throws MarkupError; - [Version (since = "2.2")] - public unowned string get_element (); - [Version (since = "2.16")] - public unowned SList get_element_stack (); - public void get_position (out int line_number, out int char_number); - [Version (since = "2.18")] - public void push (MarkupParser parser, void* user_data); - [Version (since = "2.18")] - public void* pop (); - [Version (since = "2.18")] - public void* get_user_data (); - } - - [CCode (has_typedef = false)] - public delegate void MarkupParserStartElementFunc (MarkupParseContext context, string element_name, [CCode (array_length = false, array_null_terminated = true)] string[] attribute_names, [CCode (array_length = false, array_null_terminated = true)] string[] attribute_values) throws MarkupError; - [CCode (has_typedef = false)] - public delegate void MarkupParserEndElementFunc (MarkupParseContext context, string element_name) throws MarkupError; - [CCode (has_typedef = false)] - public delegate void MarkupParserTextFunc (MarkupParseContext context, string text, size_t text_len) throws MarkupError; - [CCode (has_typedef = false)] - public delegate void MarkupParserPassthroughFunc (MarkupParseContext context, string passthrough_text, size_t text_len) throws MarkupError; - [CCode (has_typedef = false)] - public delegate void MarkupParserErrorFunc (MarkupParseContext context, Error error); - - [CCode (has_type_id = false)] - public struct MarkupParser { - [CCode (delegate_target = false)] - public unowned MarkupParserStartElementFunc start_element; - [CCode (delegate_target = false)] - public unowned MarkupParserEndElementFunc end_element; - [CCode (delegate_target = false)] - public unowned MarkupParserTextFunc text; - [CCode (delegate_target = false)] - public unowned MarkupParserPassthroughFunc passthrough; - [CCode (delegate_target = false)] - public unowned MarkupParserErrorFunc error; - } - - namespace Markup { - [CCode (cprefix = "G_MARKUP_COLLECT_", has_type_id = false)] - public enum CollectType { - INVALID, - STRING, - STRDUP, - BOOLEAN, - TRISTATE, - OPTIONAL - } - - public static string escape_text (string text, ssize_t length = -1); - [Version (since = "2.4")] - [PrintfFormat] - public static string printf_escaped (string format, ...); - [Version (since = "2.4")] - public static string vprintf_escaped (string format, va_list args); - [Version (since = "2.16")] - [CCode (sentinel = "G_MARKUP_COLLECT_INVALID")] - public static bool collect_attributes (string element_name, [CCode (array_length = false, array_null_terminated = true)] string[] attribute_names, [CCode (array_length = false, array_null_terminated = true)] string[] attribute_values, ...) throws MarkupError; - } - - /* Key-value file parser */ - - public errordomain KeyFileError { - UNKNOWN_ENCODING, - PARSE, - NOT_FOUND, - KEY_NOT_FOUND, - GROUP_NOT_FOUND, - INVALID_VALUE; - public static GLib.Quark quark (); - } - - [Compact] - [Version (since = "2.32")] - [CCode (ref_function = "g_key_file_ref", unref_function = "g_key_file_unref", type_id = "G_TYPE_KEY_FILE")] - public class KeyFile { - public KeyFile (); - public void set_list_separator (char separator); - [Version (since = "2.50")] - public bool load_from_bytes (Bytes bytes, KeyFileFlags @flags) throws KeyFileError; - public bool load_from_file (string file, KeyFileFlags @flags) throws KeyFileError, FileError; - [Version (since = "2.14")] - public bool load_from_dirs (string file, [CCode (array_length = false, array_null_terminated = true)] string[] search_dirs, out string full_path, KeyFileFlags @flags) throws KeyFileError, FileError; - public bool load_from_data (string data, size_t length, KeyFileFlags @flags) throws KeyFileError; - public bool load_from_data_dirs (string file, out string full_path, KeyFileFlags @flags) throws KeyFileError, FileError; - // g_key_file_to_data never throws an error according to the documentation - public string to_data (out size_t length = null, out GLib.Error error = null); - public string get_start_group (); - [CCode (array_length_type = "gsize")] - public string[] get_groups (); - [CCode (array_length_type = "gsize")] - public string[] get_keys (string group_name) throws KeyFileError; - public bool has_group (string group_name); - public bool has_key (string group_name, string key) throws KeyFileError; - public string get_value (string group_name, string key) throws KeyFileError; - public string get_string (string group_name, string key) throws KeyFileError; - public string get_locale_string (string group_name, string key, string? locale = null) throws KeyFileError; - [Version (since = "2.56")] - public string? get_locale_for_key (string group_name, string key, string? locale = null); - public bool get_boolean (string group_name, string key) throws KeyFileError; - public int get_integer (string group_name, string key) throws KeyFileError; - [Version (since = "2.26")] - public int64 get_int64 (string group_name, string key) throws KeyFileError; - [Version (since = "2.26")] - public uint64 get_uint64 (string group_name, string key) throws KeyFileError; - [Version (since = "2.12")] - public double get_double (string group_name, string key) throws KeyFileError; - [CCode (array_length = true, array_length_type = "gsize", array_null_terminated = true)] - public string[] get_string_list (string group_name, string key) throws KeyFileError; - [CCode (array_length_type = "gsize")] - public string[] get_locale_string_list (string group_name, string key, string? locale = null) throws KeyFileError; - [CCode (array_length_type = "gsize")] - public bool[] get_boolean_list (string group_name, string key) throws KeyFileError; - [CCode (array_length_type = "gsize")] - public int[] get_integer_list (string group_name, string key) throws KeyFileError; - [Version (since = "2.12")] - [CCode (array_length_type = "gsize")] - public double[] get_double_list (string group_name, string key) throws KeyFileError; - public string get_comment (string? group_name, string? key) throws KeyFileError; - [Version (since = "2.40")] - public bool save_to_file (string filename) throws GLib.FileError; - public void set_value (string group_name, string key, string value); - public void set_string (string group_name, string key, string str); - public void set_locale_string (string group_name, string key, string locale, string str); - public void set_boolean (string group_name, string key, bool value); - public void set_integer (string group_name, string key, int value); - [Version (since = "2.26")] - public void set_int64 (string group_name, string key, int64 value); - [Version (since = "2.26")] - public void set_uint64 (string group_name, string key, uint64 value); - [Version (since = "2.12")] - public void set_double (string group_name, string key, double value); - public void set_string_list (string group_name, string key, [CCode (type = "const gchar* const*")] string[] list); - public void set_locale_string_list (string group_name, string key, string locale, string[] list); - public void set_boolean_list (string group_name, string key, bool[] list); - public void set_integer_list (string group_name, string key, int[] list); - [Version (since = "2.12")] - public void set_double_list (string group_name, string key, double[] list); - public void set_comment (string? group_name, string? key, string comment) throws KeyFileError; - public void remove_group (string group_name) throws KeyFileError; - public void remove_key (string group_name, string key) throws KeyFileError; - public void remove_comment (string group_name, string key) throws KeyFileError; - } - - [CCode (cprefix = "G_KEY_FILE_", has_type_id = false)] - [Flags] - public enum KeyFileFlags { - NONE, - KEEP_COMMENTS, - KEEP_TRANSLATIONS - } - - [Version (since = "2.14")] - [CCode (cprefix = "G_KEY_FILE_DESKTOP_")] - namespace KeyFileDesktop { - public const string GROUP; - public const string KEY_ACTIONS; - public const string KEY_CATEGORIES; - public const string KEY_COMMENT; - public const string KEY_DBUS_ACTIVATABLE; - public const string KEY_EXEC; - public const string KEY_FULLNAME; - public const string KEY_GENERIC_NAME; - public const string KEY_GETTEXT_DOMAIN; - public const string KEY_HIDDEN; - public const string KEY_ICON; - public const string KEY_KEYWORDS; - public const string KEY_MIME_TYPE; - public const string KEY_NAME; - public const string KEY_NOT_SHOW_IN; - public const string KEY_NO_DISPLAY; - public const string KEY_ONLY_SHOW_IN; - public const string KEY_PATH; - public const string KEY_STARTUP_NOTIFY; - public const string KEY_STARTUP_WM_CLASS; - public const string KEY_TERMINAL; - public const string KEY_TRY_EXEC; - public const string KEY_TYPE; - public const string KEY_URL; - public const string KEY_VERSION; - public const string TYPE_APPLICATION; - public const string TYPE_DIRECTORY; - public const string TYPE_LINK; - } - - /* Bookmark file parser */ - - [Compact] - [Version (since = "2.12")] - [CCode (free_function = "g_bookmark_file_free")] - public class BookmarkFile { - public BookmarkFile (); - public bool load_from_file (string file) throws BookmarkFileError, FileError; - public bool load_from_data (string data, size_t length) throws BookmarkFileError; - public bool load_from_data_dirs (string file, out string full_path) throws BookmarkFileError, FileError; - public string to_data (out size_t length) throws BookmarkFileError; - public bool to_file (string filename) throws BookmarkFileError, FileError; - public bool has_item (string uri); - public bool has_group (string uri, string group) throws BookmarkFileError; - public bool has_application (string uri, string name) throws BookmarkFileError; - public int get_size (); - [CCode (array_length_type = "gsize")] - public string[] get_uris (); - public string get_title (string uri) throws BookmarkFileError; - public string get_description (string uri) throws BookmarkFileError; - public string get_mime_type (string uri) throws BookmarkFileError; - public bool get_is_private (string uri) throws BookmarkFileError; - public bool get_icon (string uri, out string href, out string mime_type) throws BookmarkFileError; - public time_t get_added (string uri) throws BookmarkFileError; - public time_t get_modified (string uri) throws BookmarkFileError; - public time_t get_visited (string uri) throws BookmarkFileError; - [CCode (array_length_type = "gsize")] - public string[] get_groups (string uri) throws BookmarkFileError; - [CCode (array_length_type = "gsize")] - public string[] get_applications (string uri) throws BookmarkFileError; - public bool get_app_info (string uri, string name, out string exec, out uint count, out time_t stamp) throws BookmarkFileError; - public void set_title (string uri, string title); - public void set_description (string uri, string description); - public void set_mime_type (string uri, string mime_type); - public void set_is_private (string uri, bool is_private); - public void set_icon (string uri, string href, string mime_type); - public void set_added (string uri, time_t added); - public void set_groups (string uri, string[] groups); - public void set_modified (string uri, time_t modified); - public void set_visited (string uri, time_t visited); - public bool set_app_info (string uri, string name, string exec, int count, time_t stamp) throws BookmarkFileError; - public void add_group (string uri, string group); - public void add_application (string uri, string name, string exec); - public bool remove_group (string uri, string group) throws BookmarkFileError; - public bool remove_application (string uri, string name) throws BookmarkFileError; - public bool remove_item (string uri) throws BookmarkFileError; - public bool move_item (string old_uri, string new_uri) throws BookmarkFileError; - } - - public errordomain BookmarkFileError { - INVALID_URI, - INVALID_VALUE, - APP_NOT_REGISTERED, - URI_NOT_FOUND, - READ, - UNKNOWN_ENCODING, - WRITE, - FILE_NOT_FOUND; - public static GLib.Quark quark (); - } - - /* Testing */ - - namespace Test { - [CCode (cprefix = "G_TEST_", has_type_id = false)] - public enum FileType { - DIST, - BUILT - } - - [PrintfFormat] - [Version (since = "2.16")] - public static void minimized_result (double minimized_quantity, string format, ...); - [PrintfFormat] - [Version (since = "2.16")] - public static void maximized_result (double maximized_quantity, string format, ...); - [Version (since = "2.16")] - public static void init ([CCode (array_length_pos = 0.9)] ref unowned string[] args, ...); - public static bool quick (); - public static bool slow (); - public static bool thorough (); - public static bool perf (); - public static bool verbose (); - public static bool quiet (); - [Version (since = "2.16")] - public static int run (); - [Version (since = "2.16")] - public static void add (string testpath, void* fixture, [CCode (delegate_target_pos = 2.9)] TestFixtureFunc fsetup, [CCode (delegate_target_pos = 2.9)] TestFixtureFunc ftest, [CCode (delegate_target_pos = 2.9)] TestFixtureFunc fteardown); - [Version (since = "2.16")] - public static void add_func (string testpath, [CCode (scope = "async")] owned TestFunc test_funcvoid); - [Version (since = "2.16")] - public static void add_data_func (string testpath, [CCode (delegate_target_pos = 1.9, scope = "async")] owned TestDataFunc test_funcvoid); - [Version (since = "2.34")] - public static void add_data_func_full (string testpath, [CCode (delegate_target_pos = 1.9)] owned TestDataFunc test_func); - [Version (since = "2.34")] - public static void assert_expected_messages (); - [Version (since = "2.38")] - public static string build_filename (GLib.Test.FileType file_type, params string[] path_segments); - [Version (since = "2.34")] - public static void expect_message (string? log_domain, LogLevelFlags log_level, string pattern); - [Version (since = "2.30")] - public static void fail (); - [Version (since = "2.38")] - public static bool failed (); - [Version (since = "2.38")] - public static unowned string get_dir (GLib.Test.FileType file_type); - [Version (since = "2.38")] - public static unowned string get_filename (GLib.Test.FileType file_type, params string[] path_segments); - [Version (since = "2.38")] - public static void incomplete (string? msg = null); - [Version (since = "2.36")] - public static bool initialized (); - [PrintfFormat] - [Version (since = "2.16")] - public static void message (string format, ...); - [Version (since = "2.38")] - public static void set_nonfatal_assertions (); - [Version (since = "2.38")] - public static void skip (string? msg = null); - [Version (since = "2.38")] - public static bool subprocess (); - [Version (since = "2.16")] - public static void bug_base (string uri_pattern); - [Version (since = "2.16")] - public static void bug (string bug_uri_snippet); - [Version (since = "2.62")] - public static void summary (string summary); - [Version (since = "2.16")] - public static void timer_start (); - [Version (since = "2.16")] - public static double timer_elapsed (); - [Version (since = "2.16")] - public static double timer_last (); - [Version (since = "2.16", deprecated_since = "2.38", replacement = "trap_subprocess")] - public static bool trap_fork (uint64 usec_timeout, TestTrapFlags test_trap_flags); - [Version (since = "2.16")] - public static bool trap_has_passed (); - [Version (since = "2.16")] - public static bool trap_reached_timeout (); - [Version (since = "2.38")] - public static void trap_subprocess (string? test_path, uint64 usec_timeout, TestSubprocessFlags test_flags); - [Version (since = "2.16")] - public static void trap_assert_passed (); - [Version (since = "2.16")] - public static void trap_assert_failed (); - [Version (since = "2.16")] - public static void trap_assert_stdout (string soutpattern); - [Version (since = "2.16")] - public static void trap_assert_stdout_unmatched (string soutpattern); - [Version (since = "2.16")] - public static void trap_assert_stderr (string serrpattern); - [Version (since = "2.16")] - public static void trap_assert_stderr_unmatched (string serrpattern); - [Version (since = "2.16")] - public static bool rand_bit (); - [Version (since = "2.16")] - public static int32 rand_int (); - [Version (since = "2.16")] - public static int32 rand_int_range (int32 begin, int32 end); - [Version (since = "2.16")] - public static double rand_double (); - [Version (since = "2.16")] - public static double rand_double_range (double begin, double end); - [Version (since = "2.22")] - public static void log_set_fatal_handler (LogFatalFunc log_func); - } - - public delegate bool LogFatalFunc (string? log_domain, LogLevelFlags log_levels, string message); - - [Compact] - [CCode (cname = "GTestCase", ref_function = "", unref_function = "")] - public class TestCase { - [Version (since = "2.16")] - [CCode (cname = "g_test_create_case")] - public TestCase (string test_name, [CCode (delegate_target_pos = 1.9)] TestFixtureFunc data_setup, [CCode (delegate_target_pos = 1.9)] TestFixtureFunc data_func, [CCode (delegate_target_pos = 1.9)] TestFixtureFunc data_teardown, [CCode (pos = 1.8)] size_t data_size = 0); - } - - [Compact] - [CCode (cname = "GTestSuite", ref_function = "", unref_function = "")] - public class TestSuite { - [Version (since = "2.16")] - [CCode (cname = "g_test_create_suite")] - public TestSuite (string name); - [Version (since = "2.16")] - [CCode (cname = "g_test_get_root")] - public static TestSuite get_root (); - [Version (since = "2.16")] - [CCode (cname = "g_test_suite_add")] - public void add (TestCase test_case); - [Version (since = "2.16")] - [CCode (cname = "g_test_suite_add_suite")] - public void add_suite (TestSuite test_suite); - } - - [Version (since = "2.26")] - [CCode (has_target = false)] - public delegate void TestFunc (); - [Version (since = "2.26")] - public delegate void TestDataFunc (); - [Version (since = "2.26")] - public delegate void TestFixtureFunc (void* fixture); - - [CCode (cprefix = "G_TEST_SUBPROCESS_INHERIT_", has_type_id = false)] - [Flags] - public enum TestSubprocessFlags { - STDIN, - STDOUT, - STDERR - } - - [Flags] - [CCode (cprefix = "G_TEST_TRAP_", has_type_id = false)] - public enum TestTrapFlags { - SILENCE_STDOUT, - SILENCE_STDERR, - INHERIT_STDIN - } - - /* Doubly-Linked Lists */ - - [Compact] - [CCode (dup_function = "g_list_copy", free_function = "g_list_free")] - public class List { - public List (); - - [ReturnsModifiedPointer ()] - public void append (owned G data); - [ReturnsModifiedPointer ()] - public void prepend (owned G data); - [ReturnsModifiedPointer ()] - public void insert (owned G data, int position); - [ReturnsModifiedPointer ()] - public void insert_before (List sibling, owned G data); - [ReturnsModifiedPointer ()] - [Version (since = "2.62")] - public void insert_before_link (List sibling, owned List link_); - [ReturnsModifiedPointer ()] - public void insert_sorted (owned G data, CompareFunc compare_func); - [ReturnsModifiedPointer ()] - public void remove (G data); - [ReturnsModifiedPointer ()] - public void remove_link (List llink); - [ReturnsModifiedPointer ()] - public void delete_link (List link_); - [ReturnsModifiedPointer ()] - public void remove_all (G data); - - public uint length (); - public List copy (); - [Version (since = "2.34")] - public List copy_deep (CopyFunc func); - [ReturnsModifiedPointer ()] - public void reverse (); - [ReturnsModifiedPointer ()] - public void sort (CompareFunc compare_func); - [Version (since = "2.10")] - [ReturnsModifiedPointer ()] - public void insert_sorted_with_data (owned G data, CompareDataFunc compare_func); - [ReturnsModifiedPointer ()] - public void sort_with_data (CompareDataFunc compare_func); - [ReturnsModifiedPointer ()] - public void concat (owned List list2); - public void @foreach (Func func); - - public unowned List first (); - public unowned List last (); - public unowned List nth (uint n); - public unowned G nth_data (uint n); - public unowned List nth_prev (uint n); - - public unowned List find (G data); - public unowned List find_custom (G data, CompareFunc func); - [CCode (cname = "g_list_find_custom", simple_generics = true)] - public unowned List search (T data, SearchFunc func); - - public int position (List llink); - public int index (G data); - - public G data; - public List next; - public unowned List prev; - } - - /* Singly-Linked Lists */ - - [Compact] - [CCode (dup_function = "g_slist_copy", free_function = "g_slist_free")] - public class SList { - public SList (); - - [ReturnsModifiedPointer ()] - public void append (owned G data); - [ReturnsModifiedPointer ()] - public void prepend (owned G data); - [ReturnsModifiedPointer ()] - public void insert (owned G data, int position); - [ReturnsModifiedPointer ()] - public void insert_before (SList sibling, owned G data); - [ReturnsModifiedPointer ()] - public void insert_sorted (owned G data, CompareFunc compare_func); - [ReturnsModifiedPointer ()] - public void remove (G data); - [ReturnsModifiedPointer ()] - public void remove_link (SList llink); - [ReturnsModifiedPointer ()] - public void delete_link (SList link_); - [ReturnsModifiedPointer ()] - public void remove_all (G data); - - public uint length (); - public SList copy (); - [Version (since = "2.34")] - public SList copy_deep (CopyFunc func); - [ReturnsModifiedPointer ()] - public void reverse (); - [Version (since = "2.10")] - [ReturnsModifiedPointer ()] - public void insert_sorted_with_data (owned G data, CompareDataFunc compare_func); - [ReturnsModifiedPointer ()] - public void sort (CompareFunc compare_func); - [ReturnsModifiedPointer ()] - public void sort_with_data (CompareDataFunc compare_func); - [ReturnsModifiedPointer ()] - public void concat (owned SList list2); - public void @foreach (Func func); - - public unowned SList last (); - public unowned SList nth (uint n); - public unowned G nth_data (uint n); - - public unowned SList find (G data); - public unowned SList find_custom (G data, CompareFunc func); - [CCode (cname = "g_slist_find_custom", simple_generics = true)] - public unowned SList search (T data, SearchFunc func); - - public int position (SList llink); - public int index (G data); - - public G data; - public SList next; - } - - [CCode (has_target = false)] - public delegate int CompareFunc (G a, G b); - - public delegate int CompareDataFunc (G a, G b); - - [Version (since = "2.16")] - [CCode (cname = "((GCompareFunc) g_strcmp0)")] - public static GLib.CompareFunc strcmp; - - public delegate G CopyFunc (G src); - - [CCode (cname = "GCompareFunc", has_target = false)] - public delegate int SearchFunc (G a, T b); - - /* Double-ended Queues */ - - [Compact] - [CCode (dup_function = "g_queue_copy", free_function = "g_queue_free")] - public class Queue { - public unowned List head; - public unowned List tail; - public uint length; - - public Queue (); - - [Version (since = "2.14")] - public void clear (); - [Version (since = "2.60")] - public void clear_full (GLib.DestroyNotify? free_func); - public bool is_empty (); - [Version (since = "2.4")] - public uint get_length (); - [Version (since = "2.4")] - public void reverse (); - public Queue copy (); - [Version (since = "2.4")] - public unowned List find (G data); - [Version (since = "2.4")] - public unowned List find_custom (G data, CompareFunc func); - [CCode (cname = "g_queue_find_custom", simple_generics = true)] - public unowned List search (T data, SearchFunc func); - [Version (since = "2.4")] - public void sort (CompareDataFunc compare_func); - public void push_head (owned G data); - public void push_tail (owned G data); - [Version (since = "2.4")] - public void push_nth (owned G data, int n); - public G pop_head (); - public G pop_tail (); - [Version (since = "2.4")] - public G pop_nth (uint n); - public unowned G peek_head (); - public unowned G peek_tail (); - [Version (since = "2.4")] - public unowned G peek_nth (uint n); - [Version (since = "2.4")] - public int index (G data); - [Version (since = "2.4")] - public bool remove (G data); - [Version (since = "2.4")] - public uint remove_all (G data); - [Version (since = "2.4")] - public void delete_link (List link); - [Version (since = "2.4")] - public void unlink (List link); - [Version (since = "2.4")] - public void insert_before (List sibling, owned G data); - [Version (since = "2.62")] - public void insert_before_link (List sibling, owned List link_); - [Version (since = "2.4")] - public void insert_after (List sibling, owned G data); - [Version (since = "2.62")] - public void insert_after_link (List sibling, owned List link_); - [Version (since = "2.4")] - public void insert_sorted (owned G data, CompareDataFunc func); - } - - /* Sequences */ - - [Compact] - [Version (since = "2.14")] - [CCode (free_function = "g_sequence_free")] - public class Sequence { - [CCode (simple_generics = true)] - public Sequence (); - public int get_length (); - public void @foreach (Func func); - public void sort (CompareDataFunc cmp_func); - public void sort_iter (SequenceIterCompareFunc func); - public SequenceIter get_begin_iter (); - public SequenceIter get_end_iter (); - public SequenceIter get_iter_at_pos (int pos); - public SequenceIter append (owned G data); - public SequenceIter prepend (owned G data); - public SequenceIter insert_sorted (owned G data, CompareDataFunc cmp_func); - [Version (since = "2.48")] - public bool is_empty (); - public SequenceIter insert_sorted_iter (owned G data, SequenceIterCompareFunc iter_cmp); - public SequenceIter search (G data, CompareDataFunc cmp_func); - public SequenceIter search_iter (G data, SequenceIterCompareFunc iter_cmp); - [Version (since = "2.28")] - public SequenceIter lookup (G data, CompareDataFunc cmp_func); - [Version (since = "2.28")] - public SequenceIter lookup_iter (G data, SequenceIterCompareFunc iter_cmp); - - [Version (deprecated_since = "vala-0.26", replacement = "SequenceIter.foreach_range")] - public static void foreach_range (SequenceIter begin, SequenceIter end, Func func); - [Version (deprecated_since = "vala-0.26", replacement = "SequenceIter.insert_before")] - public static SequenceIter insert_before (SequenceIter iter, owned G data); - [Version (deprecated_since = "vala-0.26", replacement = "SequenceIter.move_to")] - public static void move (SequenceIter src, SequenceIter dest); - [Version (deprecated_since = "vala-0.26", replacement = "SequenceIter.swap")] - public static void swap (SequenceIter src, SequenceIter dest); - [Version (deprecated_since = "vala-0.26", replacement = "SequenceIter.sort_changed")] - public static void sort_changed (SequenceIter iter, CompareDataFunc cmp_func); - [Version (deprecated_since = "vala-0.26", replacement = "SequenceIter.sort_changed_iter")] - public static void sort_changed_iter (SequenceIter iter, SequenceIterCompareFunc iter_cmp); - [Version (deprecated_since = "vala-0.26", replacement = "SequenceIter.remove")] - public static void remove (SequenceIter iter); - [Version (deprecated_since = "vala-0.26", replacement = "SequenceIter.remove_range")] - public static void remove_range (SequenceIter begin, SequenceIter end); - [Version (deprecated_since = "vala-0.26", replacement = "SequenceIter.move_range")] - public static void move_range (SequenceIter dest, SequenceIter begin, SequenceIter end); - [Version (deprecated_since = "vala-0.26", replacement = "SequenceIter.get")] - public static unowned G get (SequenceIter iter); - [Version (deprecated_since = "vala-0.26", replacement = "SequenceIter.set")] - public static void set (SequenceIter iter, owned G data); - [Version (deprecated_since = "vala-0.26", replacement = "SequenceIter.range_get_midpoint")] - public static SequenceIter range_get_midpoint (SequenceIter begin, SequenceIter end); - } - - [Compact] - [Version (since = "2.14")] - [CCode (ref_function = "", unref_function = "")] - public class SequenceIter { - public bool is_begin (); - public bool is_end (); - public SequenceIter next (); - public SequenceIter prev (); - public int get_position (); - public SequenceIter move (int delta); - public unowned Sequence get_sequence (); - public int compare (SequenceIter other); - - [CCode (cname = "g_sequence_foreach_range")] - public void foreach_range (SequenceIter end, Func func); - [CCode (cname = "g_sequence_insert_before")] - public SequenceIter insert_before (owned G data); - [CCode (cname = "g_sequence_move")] - public void move_to (SequenceIter dest); - [CCode (cname = "g_sequence_swap")] - public void swap (SequenceIter dest); - [CCode (cname = "g_sequence_sort_changed")] - public void sort_changed (CompareDataFunc cmp_func); - [CCode (cname = "g_sequence_sort_changed_iter")] - public void sort_changed_iter (SequenceIterCompareFunc iter_cmp); - [CCode (cname = "g_sequence_remove")] - public void remove (); - [CCode (cname = "g_sequence_remove_range")] - public void remove_range (SequenceIter end); - [CCode (cname = "g_sequence_move_range")] - public void move_range (SequenceIter begin, SequenceIter end); - [CCode (cname = "g_sequence_get")] - public unowned G get (); - [CCode (cname = "g_sequence_set")] - public void set (owned G data); - [CCode (cname = "g_sequence_range_get_midpoint")] - public SequenceIter range_get_midpoint (SequenceIter end); - } - - public delegate int SequenceIterCompareFunc (SequenceIter a, SequenceIter b); - - /* Hash Tables */ - - [Compact] - [CCode (ref_function = "g_hash_table_ref", unref_function = "g_hash_table_unref", type_id = "G_TYPE_HASH_TABLE", type_signature = "a{%s}")] - public class HashTable { - [CCode (cname = "g_hash_table_new_full", simple_generics = true)] - public HashTable (HashFunc? hash_func, EqualFunc? key_equal_func); - public HashTable.full (HashFunc? hash_func, EqualFunc? key_equal_func, DestroyNotify? key_destroy_func, DestroyNotify? value_destroy_func); - public void insert (owned K key, owned V value); - public void replace (owned K key, owned V value); - [Version (since = "2.32", deprecated_since = "vala-0.26", replacement = "GenericSet.add")] - public void add (owned K key); - public unowned V? lookup (K key); - public bool lookup_extended (K lookup_key, out unowned K orig_key, out unowned V value); - [Version (since = "2.32")] - public bool contains (K key); - public bool remove (K key); - [Version (since = "2.12")] - public void remove_all (); - public uint foreach_remove (HRFunc predicate); - public uint foreach_steal (HRFunc predicate); - [CCode (cname = "g_hash_table_lookup")] - public unowned V? @get (K key); - [CCode (cname = "g_hash_table_insert")] - public void @set (owned K key, owned V value); - [Version (since = "2.14")] - public List get_keys (); -#if VALA_0_26 - [CCode (array_length_type = "guint")] - [Version (since = "2.40")] - public (unowned K)[] get_keys_as_array (); -#endif - [Version (since = "2.14")] - public List get_values (); - public void @foreach (HFunc func); - [CCode (cname = "g_hash_table_foreach")] - public void for_each (HFunc func); - [Version (since = "2.4")] - public unowned V? find (HRFunc predicate); - public uint size (); - public bool steal (K key); - [Version (since = "2.12")] - public void steal_all (); - [Version (since = "2.58")] - public bool steal_extended (K lookup_key, out K stolen_key, out V stolen_value); - [CCode (cname = "_vala_g_hash_table_take")] - public V? take (K key, out bool exists = null) { - GLib.HashTable? ht = null; - void** htp = &ht; - *htp = this.lookup (key); - exists = this.steal (key); - return ht; - } - public uint length { - [CCode (cname = "g_hash_table_size")] - get; - } - } - - [Version (since = "2.16")] - [CCode (has_type_id = false)] - public struct HashTableIter { - public HashTableIter (GLib.HashTable table); - public bool next ([CCode (type = "gpointer*")] out unowned K key, [CCode (type = "gpointer*")] out unowned V value); - public void remove (); - public void steal (); - public unowned GLib.HashTable get_hash_table (); - } - - [Version (since = "2.32")] - [Compact, CCode (cname = "GHashTable", lower_case_cprefix = "g_hash_table_", ref_function = "g_hash_table_ref", unref_function = "g_hash_table_unref", type_id = "G_TYPE_HASH_TABLE", type_signature = "a{%s}")] - public class GenericSet { - [CCode (cname = "g_hash_table_new_full", simple_generics = true)] - public GenericSet (HashFunc? hash_func, EqualFunc? equal_func, GLib.DestroyNotify? always_pass_null_here = null); - public void add (owned T value); - public bool contains (T valule); - public bool remove (T value); - public void remove_all (); - public GLib.List get_values (); - [CCode (cname = "g_hash_table_iter_init", instance_pos = -1)] - public GLib.GenericSetIter iterator (); - [CCode (cname = "_vala_g_hash_set_foreach")] - public void @foreach (GLib.Func func) { - ((GLib.HashTable) this).foreach ((k, v) => func (v)); - } - public uint length { - [CCode (cname = "g_hash_table_size")] - get; - } - } - - [Version (since = "2.32")] - [CCode (cname = "GHashTableIter", lower_case_cprefix = "g_hash_table_iter_", has_type_id = false)] - public struct GenericSetIter { - [CCode (cname = "_vala_hash_set_next_value")] - public unowned T? next_value () { - void* vi = &this; - GLib.HashTableIter* htp = vi; - unowned T? value; - return htp->next (out value, null) ? value : null; - } - public void remove (); - } - - [CCode (has_target = false)] - public delegate uint HashFunc (K key); - [CCode (has_target = false)] - public delegate bool EqualFunc (G a, G b); - public delegate void HFunc (K key, V value); - public delegate bool HRFunc (K key, V value); - - [CCode (has_target = false)] - public delegate void DestroyNotify (void* data); - - [CCode (cname = "g_direct_hash")] - public static GLib.HashFunc direct_hash; - [CCode (cname = "g_direct_equal")] - public static GLib.EqualFunc direct_equal; - [CCode (cname = "g_int64_hash")] - public static GLib.HashFunc int64_hash; - [Version (since = "2.22")] - [CCode (cname = "g_int64_equal")] - public static GLib.EqualFunc int64_equal; - [Version (since = "2.22")] - [CCode (cname = "g_int_hash")] - public static GLib.HashFunc int_hash; - [CCode (cname = "g_int_equal")] - public static GLib.EqualFunc int_equal; - [CCode (cname = "g_str_hash")] - public static GLib.HashFunc str_hash; - [CCode (cname = "g_str_equal")] - public static GLib.EqualFunc str_equal; - [Version (since = "2.60")] - [CCode (cname = "((GEqualFunc) g_strv_equal)")] - public static GLib.EqualFunc strv_equal; - [CCode (cname = "g_free")] - public static GLib.DestroyNotify g_free; - [CCode (cname = "g_list_free")] - public static GLib.DestroyNotify g_list_free; - [CCode (cname = "((GDestroyNotify) g_variant_unref)")] - public static GLib.DestroyNotify g_variant_unref; - - /* Strings */ - - [Compact] - [GIR (name = "String")] - [CCode (cname = "GString", cprefix = "g_string_", free_function = "g_string_free", type_id = "G_TYPE_GSTRING")] - public class StringBuilder { - public StringBuilder (string init = ""); - [CCode (cname = "g_string_sized_new")] - public StringBuilder.sized (size_t dfl_size); - public unowned StringBuilder assign (string rval); - public unowned StringBuilder append (string val); - public unowned StringBuilder append_c (char c); - public unowned StringBuilder append_unichar (unichar wc); - public unowned StringBuilder append_len (string val, ssize_t len); - public unowned StringBuilder prepend (string val); - public unowned StringBuilder prepend_c (char c); - public unowned StringBuilder prepend_unichar (unichar wc); - public unowned StringBuilder prepend_len (string val, ssize_t len); - public unowned StringBuilder insert (ssize_t pos, string val); - public unowned StringBuilder insert_len (ssize_t pos, string val, ssize_t len); - public unowned StringBuilder insert_unichar (ssize_t pos, unichar wc); - [Version (since = "2.14")] - public unowned StringBuilder overwrite (size_t pos, string val); - [Version (since = "2.14")] - public unowned StringBuilder overwrite_len (size_t pos, string val, ssize_t len); - public unowned StringBuilder erase (ssize_t pos = 0, ssize_t len = -1); - public unowned StringBuilder truncate (size_t len = 0); - - [PrintfFormat] - public void printf (string format, ...); - [PrintfFormat] - public void append_printf (string format, ...); - [Version (since = "2.14")] - public void vprintf (string format, va_list args); - [Version (since = "2.14")] - public void append_vprintf (string format, va_list args); - - public string str; - public ssize_t len; - public ssize_t allocated_len; - - public uint8[] data { - get { - unowned uint8[] res = (uint8[]) this.str; - res.length = (int) this.len; - return res; - } - } - - [Version (since = "2.34")] - public static Bytes free_to_bytes (owned StringBuilder str); - } - - /* String Chunks */ - - [Compact] - [CCode (free_function = "g_string_chunk_free")] - public class StringChunk { - public StringChunk (size_t size); - public unowned string insert (string str); - public unowned string insert_const (string str); - [Version (since = "2.4")] - public unowned string insert_len (string str, ssize_t len); - [Version (since = "2.14")] - public void clear (); - } - - /* Pointer Arrays */ - - [Compact] - [Version (since = "2.22", deprecated_since = "vala-0.26", replacement="GenericArray")] - [CCode (ref_function = "g_ptr_array_ref", unref_function = "g_ptr_array_unref", type_id = "G_TYPE_PTR_ARRAY")] - public class PtrArray { - public PtrArray (); - [Version (since = "2.22")] - public PtrArray.with_free_func (GLib.DestroyNotify? element_free_func); - [CCode (cname = "g_ptr_array_sized_new")] - public PtrArray.sized (uint reserved_size); - public void add (void* data); - [Version (since = "2.4")] - public void foreach (GLib.Func func); - [CCode (cname = "g_ptr_array_index")] - public void* index(uint index); - public bool remove (void* data); - public void* remove_index (uint index); - public bool remove_fast (void *data); - public void remove_index_fast (uint index); - [Version (since = "2.4")] - public void remove_range (uint index, uint length); - public void sort (CompareFunc compare_func); - public void sort_with_data (CompareDataFunc compare_func); - [Version (since = "2.22")] - public void set_free_func (GLib.DestroyNotify? element_free_function); - public void set_size (int length); - - public uint len; - public void** pdata; - } - - [Compact] - [CCode (cname = "GPtrArray", cprefix = "g_ptr_array_", ref_function = "g_ptr_array_ref", unref_function = "g_ptr_array_unref", type_id = "G_TYPE_PTR_ARRAY")] - [GIR (name = "PtrArray")] - public class GenericArray { - [Version (since = "2.30")] - [CCode (cname = "g_ptr_array_new_full", simple_generics = true)] - public GenericArray (uint reserved_size = 0); - public void add (owned G data); - [Version (since = "2.62")] - public GenericArray copy (CopyFunc func); - [Version (since = "2.62")] - public void extend (GenericArray array, CopyFunc func); - [Version (since = "2.62")] - public void extend_and_steal (owned GenericArray array); - [Version (since = "2.54")] - public bool find (G needle, out uint index = null); - [Version (since = "2.54")] - public bool find_with_equal_func (G needle, GLib.EqualFunc? equal_func, out uint index = null); - public void foreach (GLib.Func func); - [CCode (cname = "g_ptr_array_index")] - public unowned G get (uint index); - [Version (since = "2.40")] - public void insert (int index, owned G data); - public bool remove (G data); - public void remove_index (uint index); - public bool remove_fast (G data); - public void remove_index_fast (uint index); - public void remove_range (uint index, uint length); - public void set (uint index, owned G data) { - this.add ((owned) data); - this.remove_index_fast (index); - } - [CCode (cname = "vala_g_ptr_array_sort")] - public void sort (GLib.CompareFunc compare_func) { - this._sort_with_data ((a, b) => { - return compare_func ((G**) (*a), (G**) (*b)); - }); - } - [CCode (cname = "g_ptr_array_sort_with_data")] - public void _sort_with_data (GLib.CompareDataFunc compare_func); - [CCode (cname = "vala_g_ptr_array_sort_with_data")] - public void sort_with_data (GLib.CompareDataFunc compare_func) { - this._sort_with_data ((a, b) => { - return compare_func ((G**) (*a), (G**) (*b)); - }); - } - [Version (since = "2.64")] - [CCode (array_length_type = "gsize")] - public G[] steal (); - [Version (since = "2.58")] - public G steal_index (uint index); - [Version (since = "2.58")] - public G steal_index_fast (uint index); - - private void set_size (int length); - - public int length { - get { return (int) this.len; } - set { this.set_size (value); } - } - - [CCode (cname = "pdata", array_length_cname = "len", array_length_type = "guint")] - public G[] data; - - private uint len; - } - - [Compact] - [Version (since = "2.32")] - [CCode (cprefix = "g_bytes_", ref_function = "g_bytes_ref", unref_function = "g_bytes_unref", type_id = "G_TYPE_BYTES")] - public class Bytes { - public Bytes ([CCode (array_length_type = "gsize")] uint8[] data); - public Bytes.take ([CCode (array_length_type = "gsize")] owned uint8[] data); - public Bytes.static ([CCode (array_length_type = "gsize")] uint8[] data); - public Bytes.with_free_func ([CCode (array_length_type = "gsize")] owned uint8[] data, GLib.DestroyNotify? free_func, void* user_data); - public Bytes.from_bytes (GLib.Bytes bytes, size_t offset, size_t length); - - [CCode (cname = "g_bytes_new_with_free_func", simple_generics = true)] - public static Bytes new_with_owner ([CCode (array_length_type = "gsize")] uint8[] data, [CCode (destroy_notify_pos = 1.9)] owned T? owner = null); - - [CCode (array_length_type = "gsize")] - public unowned uint8[] get_data (); - public size_t get_size (); - public uint hash (); - public int compare (GLib.Bytes bytes2); - [CCode (array_length_type = "gsize")] - public static uint8[] unref_to_data (owned GLib.Bytes bytes); - public static GLib.ByteArray unref_to_array (owned GLib.Bytes bytes); - - [CCode (cname = "_vala_g_bytes_get")] - public uint8 get (int index) { - unowned uint8[] data = this.get_data (); - return data[index]; - } - - [CCode (cname = "_vala_g_bytes_slice")] - public GLib.Bytes slice (size_t start, size_t end) { - return new GLib.Bytes.from_bytes (this, start, end - start); - } - - public int length { - [CCode (cname = "_vala_g_bytes_get_length")] - get { - return (int) this.get_size (); - } - } - } - - /* Byte Arrays */ - - [Compact] - [Version (since = "2.22")] - [CCode (cprefix = "g_byte_array_", ref_function = "g_byte_array_ref", unref_function = "g_byte_array_unref", type_id = "G_TYPE_BYTE_ARRAY")] - public class ByteArray { - public ByteArray (); - [CCode (cname = "g_byte_array_sized_new")] - public ByteArray.sized (uint reserved_size); - [Version (since = "2.32")] - public ByteArray.take (owned uint8[] data); - public void append (uint8[] data); - [Version (since = "2.32")] - public static GLib.Bytes free_to_bytes (owned GLib.ByteArray array); - public void prepend (uint8[] data); - public void remove_index (uint index); - public void remove_index_fast (uint index); - [Version (since = "2.4")] - public void remove_range (uint index, uint length); - public void sort (CompareFunc compare_func); - public void sort_with_data (CompareDataFunc compare_func); - public void set_size (uint length); - [Version (since = "2.64")] - [CCode (array_length_type = "gsize")] - public uint8[] steal (); - - public uint len; - [CCode (array_length_cname = "len", array_length_type = "guint")] - public uint8[] data; - } - - /* N-ary Trees */ - - public delegate bool NodeTraverseFunc (Node node); - public delegate void NodeForeachFunc (Node node); - - [CCode (cprefix = "G_TRAVERSE_")] - public enum TraverseFlags { - LEAVES, - NON_LEAVES, - ALL, - MASK, - LEAFS, - NON_LEAFS - } - - [Compact] - [CCode (dup_function = "g_node_copy", free_function = "g_node_destroy")] - public class Node { - public Node(owned G? data = null); - public Node copy (); - public Node copy_deep (CopyFunc copy_func); - public unowned Node insert (int position, owned Node node); - public unowned Node insert_before (Node sibling, owned Node node); - public unowned Node insert_after (Node sibling, owned Node node); - public unowned Node append (owned Node node); - public unowned Node prepend (owned Node node); - public unowned Node insert_data (int position, owned G data); - public unowned Node insert_data_before (Node sibling, owned G data); - public unowned Node append_data (owned G data); - public unowned Node prepend_data (owned G data); - public void reverse_children (); - public void traverse (TraverseType order, TraverseFlags flags, int max_depth, NodeTraverseFunc func); - public void children_foreach (TraverseFlags flags, NodeForeachFunc func); - public unowned Node get_root (); - public unowned Node find (TraverseType order, TraverseFlags flags, G data); - public unowned Node find_child (TraverseFlags flags, G data); - public int child_index (G data); - public int child_position (Node child); - public unowned Node first_child (); - public unowned Node last_child (); - public unowned Node nth_child (uint n); - public unowned Node first_sibling (); - public unowned Node next_sibling (); - public unowned Node prev_sibling (); - public unowned Node last_sibling (); - - [CCode (cname = "G_NODE_IS_LEAF")] - public bool is_leaf (); - [CCode (cname = "G_NODE_IS_ROOT")] - public bool is_root (); - public bool is_ancestor (Node descendant); - - public uint depth (); - public uint n_nodes (TraverseFlags flags); - public uint n_children (); - public uint max_height (); - - [CCode (cname = "g_node_unlink")] - public void _unlink (); - [CCode (cname = "g_node_unlink_vala")] - public Node unlink () - { - void *ptr = this; - _unlink (); - return (Node) (owned) ptr; - } - - public G data; - public Node next; - public Node prev; - public Node parent; - public Node children; - } - - /* Quarks */ - - [CCode (type_id = "G_TYPE_UINT")] - public struct Quark : uint32 { - public static Quark from_string (string str); - public static Quark try_string (string str); - public unowned string to_string (); - } - - /* Keyed Data Lists */ - - [CCode (cname = "GData*", has_type_id = false)] - [GIR (name = "Data")] - public struct Datalist { - public Datalist (); - public void clear (); - [Version (since = "2.34")] - public G id_dup_data (Quark key_id, DuplicateFunc dup_func); - public unowned G id_get_data (Quark key_id); - public void id_set_data (Quark key_id, owned G data); - public void id_set_data_full (Quark key_id, owned G data, DestroyNotify? destroy_func); - public void id_remove_data (Quark key_id); - public G id_remove_no_notify (Quark key_id); - [Version (since = "2.34")] - public bool id_replace_data (Quark key_id, G oldval, owned G newval, GLib.DestroyNotify? destroy, out GLib.DestroyNotify? old_destroy); - public void @foreach (DataForeachFunc func); - public unowned G get_data (string key); - public void set_data_full (string key, owned G data, DestroyNotify? destry_func); - public G remove_no_notify (string key); - public void set_data (string key, owned G data); - public void remove_data (string key); - } - - public delegate void DataForeachFunc (Quark key_id, G data); - public delegate G DuplicateFunc (G data); - - /* GArray */ - - [Compact] - [Version (since = "2.22")] - [CCode (ref_function = "g_array_ref", unref_function = "g_array_unref", type_id = "G_TYPE_ARRAY")] - public class Array { - [CCode (cname = "len")] - public uint length; - [CCode (cname = "data", array_length_cname = "len", array_length_type = "uint")] - public G[] data; - - public Array (bool zero_terminated = true, bool clear = true, ulong element_size = sizeof (G)); - [CCode (cname = "g_array_sized_new")] - public Array.sized (bool zero_terminated = true, bool clear = true, ulong element_size = sizeof (G), uint reserved_size = 0); - public void append_val (owned G value); - public void append_vals (void* data, uint len); - [Version (since = "2.62")] - public bool binary_search (G target, CompareFunc compare_func, out uint match_index); - [Version (since = "2.62")] - public Array copy (); - public void prepend_val (owned G value); - public void prepend_vals (void* data, uint len); - public void insert_val (uint index, owned G value); - public void insert_vals (uint index, void* data, uint len); - [CCode (cname = "g_array_remove_index")] - public void _remove_index (uint index); - [CCode (cname = "g_array_remove_index_fast")] - public void _remove_index_fast (uint index); - [CCode (cname = "g_array_remove_range")] - public void _remove_range (uint index, uint length); - [CCode (cname = "vala_g_array_remove_index")] - public G remove_index (uint index) { - assert (length > index); - G g = (owned) data[index]; - _remove_index (index); - return g; - } - [CCode (cname = "vala_g_array_remove_index_fast")] - public G remove_index_fast (uint index) { - assert (length > index); - G g = (owned) data[index]; - _remove_index_fast (index); - return g; - } - [CCode (cname = "vala_g_array_remove_range")] - public G[] remove_range (uint index, uint length) { - assert (this.length >= index + length); - G[] ga = new G[length]; - for (uint i = 0; i < length; i++) { - ga[i] = (owned) data[i + index]; - } - _remove_range (index, length); - return ga; - } - public void sort (CompareFunc compare_func); - public void sort_with_data (CompareDataFunc compare_func); - [CCode (generic_type_pos = 0.1)] - public unowned G index (uint index); - public void set_size (uint length); - [Version (since = "2.32")] - public void set_clear_func (GLib.DestroyNotify clear_func); - [Version (since = "2.64")] - [CCode (array_length_type = "gsize")] - public G[] steal (); - } - - /* GTree */ - - public delegate bool TraverseFunc (K key, V value); - - [CCode (cprefix = "G_", has_type_id = false)] - public enum TraverseType { - IN_ORDER, - PRE_ORDER, - POST_ORDER, - LEVEL_ORDER - } - - public delegate int TreeSearchFunc (K key); - - [Compact] - [Version (since = "2.22")] - [CCode (ref_function = "g_tree_ref", unref_function = "g_tree_unref")] - public class Tree { - [CCode (cname = "g_tree_new_full", simple_generics = true)] - public Tree (CompareDataFunc key_compare_func); - [Version (deprecated_since = "vala-0.20", replacement = "Tree ()")] - public Tree.with_data (CompareDataFunc key_compare_func); - public Tree.full (CompareDataFunc key_compare_func, DestroyNotify? key_destroy_func, DestroyNotify? value_destroy_func); - public void insert (owned K key, owned V value); - public void replace (owned K key, owned V value); - public int nnodes (); - public int height (); - public unowned V lookup (K key); - public bool lookup_extended (K lookup_key, out unowned K orig_key, out unowned V value); - public void foreach (TraverseFunc traverse_func); - public unowned V search (TreeSearchFunc search_func); - [CCode (cname = "g_tree_search")] - public unowned V search_key (CompareFunc search_func, K key); - public bool remove (K key); - public bool steal (K key); - } - - /* Internationalization */ - - [Version (since = "2.4")] - [CCode (cname = "_", cheader_filename = "glib.h,glib/gi18n-lib.h")] - public static unowned string _ ([FormatArg] string str); - [Version (since = "2.4")] - [CCode (cname = "Q_", cheader_filename = "glib.h,glib/gi18n-lib.h")] - public static unowned string Q_ ([FormatArg] string str); - [Version (since = "2.4")] - [CCode (cname = "N_", cheader_filename = "glib.h,glib/gi18n-lib.h")] - public static unowned string N_ ([FormatArg] string str); - [Version (since = "2.16")] - [CCode (cname = "C_", cheader_filename = "glib.h,glib/gi18n-lib.h")] - public static unowned string C_ (string context, [FormatArg] string str); - [Version (since = "2.18")] - [CCode (cname = "NC_", cheader_filename = "glib.h,glib/gi18n-lib.h")] - public static unowned string NC_ (string context, [FormatArg] string str); - [CCode (cname = "gettext", cheader_filename = "glib/gi18n-lib.h")] - public static unowned string gettext ([FormatArg] string str); - [CCode (cname = "ngettext", cheader_filename = "glib.h,glib/gi18n-lib.h")] - public static unowned string ngettext (string msgid, [FormatArg] string msgid_plural, ulong n); - [Version (since = "2.18")] - [CCode (cname = "g_dgettext", cheader_filename = "glib/gi18n-lib.h")] - public static unowned string dgettext (string? domain, [FormatArg] string msgid); - [Version (since = "2.26")] - [CCode (cname = "g_dcgettext", cheader_filename = "glib/gi18n-lib.h")] - public static unowned string dcgettext (string? domain, [FormatArg] string msgid, int category); - [Version (since = "2.18")] - [CCode (cname = "g_dngettext", cheader_filename = "glib/gi18n-lib.h")] - public static unowned string dngettext (string? domain, string msgid, [FormatArg] string msgid_plural, ulong n); - [Version (since = "2.16")] - [CCode (cname = "g_dpgettext", cheader_filename = "glib/gi18n-lib.h")] - public static unowned string dpgettext (string? domain, [FormatArg] string msgctxid, size_t msgidoffset); - [Version (since = "2.18")] - [CCode (cname = "g_dpgettext2", cheader_filename = "glib/gi18n-lib.h")] - public static unowned string dpgettext2 (string? domain, string context, [FormatArg] string msgid); - - [CCode (cname = "int", cprefix = "LC_", cheader_filename = "locale.h", has_type_id = false)] - public enum LocaleCategory { - ALL, - COLLATE, - CTYPE, - MESSAGES, - MONETARY, - NUMERIC, - TIME - } - - namespace Intl { - [CCode (cname = "setlocale", cheader_filename = "locale.h")] - public static unowned string? setlocale (LocaleCategory category = GLib.LocaleCategory.ALL, string? locale = ""); - [CCode (cname = "bindtextdomain", cheader_filename = "glib/gi18n-lib.h")] - public static unowned string? bindtextdomain (string domainname, string? dirname); - [CCode (cname = "textdomain", cheader_filename = "glib/gi18n-lib.h")] - public static unowned string? textdomain (string? domainname); - [CCode (cname = "bind_textdomain_codeset", cheader_filename = "glib/gi18n-lib.h")] - public static unowned string? bind_textdomain_codeset (string domainname, string? codeset); - [Version (since = "2.6")] - [CCode (cname = "g_get_language_names", array_length = false, array_null_terminated = true)] - public static unowned string[] get_language_names (); - [Version (since = "2.58")] - [CCode (cname = "g_get_language_names_with_category", array_length = false, array_null_terminated = true)] - public static unowned string[] get_language_names_with_category (string category_name); - [Version (since = "2.4")] - [CCode (cname = "g_strip_context", cheader_filename = "glib/gi18n-lib.h")] - public static unowned string strip_context (string msgid, string msgval); - } - - [Compact] - public class PatternSpec { - public PatternSpec (string pattern); - public bool equal (PatternSpec pspec); - [CCode (cname = "g_pattern_match")] - public bool match (uint string_length, string str, string? str_reversed); - [CCode (cname = "g_pattern_match_string")] - public bool match_string (string str); - [CCode (cname = "g_pattern_match_simple")] - public static bool match_simple (string pattern, string str); - } - - [CCode (lower_case_cprefix = "glib_version_")] - namespace Version { - [CCode (cname = "glib_major_version")] - public const uint major; - [CCode (cname = "glib_minor_version")] - public const uint minor; - [CCode (cname = "glib_micro_version")] - public const uint micro; - [CCode (cname = "glib_check_version")] - public static unowned string? check (uint required_major, uint required_minor = 0, uint required_micro = 0); - - [CCode (cname = "GLIB_MAJOR_VERSION")] - public const uint MAJOR; - [CCode (cname = "GLIB_MINOR_VERSION")] - public const uint MINOR; - [CCode (cname = "GLIB_MICRO_VERSION")] - public const uint MICRO; - [CCode (cname = "GLIB_CHECK_VERSION")] - public static bool CHECK (uint required_major, uint required_minor = 0, uint required_micro = 0); - - [CCode (cname = "G_ENCODE_VERSION")] - public static uint encode (uint major, uint minor); - - public const uint CUR_STABLE; - public const uint PREV_STABLE; - public const uint MIN_REQUIRED; - public const uint MAX_ALLOWED; - - public const uint @2_26; - public const uint @2_28; - public const uint @2_30; - public const uint @2_32; - public const uint @2_34; - public const uint @2_36; - public const uint @2_38; - public const uint @2_40; - public const uint @2_42; - public const uint @2_44; - public const uint @2_46; - public const uint @2_48; - public const uint @2_50; - public const uint @2_52; - public const uint @2_54; - public const uint @2_56; - public const uint @2_58; - public const uint @2_60; - public const uint @2_62; - public const uint @2_64; - - [CCode (cname = "glib_binary_age")] - public const uint binary_age; - [CCode (cname = "glib_interface_age")] - public const uint interface_age; - } - - namespace Win32 { - public enum OSType { - [CCode (cname = "G_WIN32_OS_ANY")] - ANY, - [CCode (cname = "G_WIN32_OS_WORKSTATION")] - WORKSTATION, - [CCode (cname = "G_WIN32_OS_SERVER")] - SERVER, - } - [Version (since = "2.44")] - public bool check_windows_version (int major, int minor, int spver, GLib.Win32.OSType os_type); - - public string error_message (int error); - public int ftruncate (int f, uint size); - public string getlocale (); - [Version (since = "2.16")] - public string get_package_installation_directory_of_module (void* hmodule); - public uint get_windows_version (); - [Version (since = "2.8")] - public string locale_filename_from_utf8 (string utf8filename); - [CCode (cname = "G_WIN32_HAVE_WIDECHAR_API")] - public bool have_widechar_api (); - [CCode (cname = "G_WIN32_IS_NT_BASED")] - public bool is_nt_based (); - [Version (since = "2.40")] - [CCode (array_length = false, array_null_terminated = true)] - public string[] get_command_line (); - - [CCode (cname = "G_WIN32_MSG_HANDLE")] - public const int MSG_HANDLE; - } - - [Compact] - [Immutable] - [Version (since = "2.24")] - [CCode (copy_function = "g_variant_type_copy", free_function = "g_variant_type_free", type_id = "G_TYPE_VARIANT_TYPE")] - public class VariantType { - [CCode (cname = "G_VARIANT_TYPE_BOOLEAN")] - public static VariantType BOOLEAN; - [CCode (cname = "G_VARIANT_TYPE_BYTE")] - public static VariantType BYTE; - [CCode (cname = "G_VARIANT_TYPE_INT16")] - public static VariantType INT16; - [CCode (cname = "G_VARIANT_TYPE_UINT16")] - public static VariantType UINT16; - [CCode (cname = "G_VARIANT_TYPE_INT32")] - public static VariantType INT32; - [CCode (cname = "G_VARIANT_TYPE_UINT32")] - public static VariantType UINT32; - [CCode (cname = "G_VARIANT_TYPE_INT64")] - public static VariantType INT64; - [CCode (cname = "G_VARIANT_TYPE_UINT64")] - public static VariantType UINT64; - [CCode (cname = "G_VARIANT_TYPE_HANDLE")] - public static VariantType HANDLE; - [CCode (cname = "G_VARIANT_TYPE_DOUBLE")] - public static VariantType DOUBLE; - [CCode (cname = "G_VARIANT_TYPE_STRING")] - public static VariantType STRING; - [CCode (cname = "G_VARIANT_TYPE_OBJECT_PATH")] - public static VariantType OBJECT_PATH; - [CCode (cname = "G_VARIANT_TYPE_SIGNATURE")] - public static VariantType SIGNATURE; - [CCode (cname = "G_VARIANT_TYPE_VARIANT")] - public static VariantType VARIANT; - [CCode (cname = "G_VARIANT_TYPE_UNIT")] - public static VariantType UNIT; - [CCode (cname = "G_VARIANT_TYPE_ANY")] - public static VariantType ANY; - [CCode (cname = "G_VARIANT_TYPE_BASIC")] - public static VariantType BASIC; - [CCode (cname = "G_VARIANT_TYPE_MAYBE")] - public static VariantType MAYBE; - [CCode (cname = "G_VARIANT_TYPE_ARRAY")] - public static VariantType ARRAY; - [CCode (cname = "G_VARIANT_TYPE_TUPLE")] - public static VariantType TUPLE; - [CCode (cname = "G_VARIANT_TYPE_DICT_ENTRY")] - public static VariantType DICT_ENTRY; - [CCode (cname = "G_VARIANT_TYPE_DICTIONARY")] - public static VariantType DICTIONARY; - [CCode (cname = "G_VARIANT_TYPE_STRING_ARRAY")] - public static VariantType STRING_ARRAY; - [CCode (cname = "G_VARIANT_TYPE_OBJECT_PATH_ARRAY")] - public static VariantType OBJECT_PATH_ARRAY; - [CCode (cname = "G_VARIANT_TYPE_BYTESTRING")] - public static VariantType BYTESTRING; - [CCode (cname = "G_VARIANT_TYPE_BYTESTRING_ARRAY")] - public static VariantType BYTESTRING_ARRAY; - [Version (since = "2.30")] - [CCode (cname = "G_VARIANT_TYPE_VARDICT")] - public static VariantType VARDICT; - - public static bool string_is_valid (string type_string); - public static bool string_scan (string type_string, char *limit, out char* endptr); - - public VariantType (string type_string); - public size_t get_string_length (); - public char* peek_string (); - public string dup_string (); - - public bool is_definite (); - public bool is_container (); - public bool is_basic (); - public bool is_maybe (); - public bool is_array (); - public bool is_tuple (); - public bool is_dict_entry (); - public bool is_variant (); - - public uint hash (); - public bool equal (VariantType other); - public bool is_subtype_of (VariantType supertype); - - public unowned VariantType element (); - public unowned VariantType first (); - public unowned VariantType next (); - public unowned VariantType n_items (); - public unowned VariantType key (); - public unowned VariantType value (); - - public VariantType.array (VariantType element); - public VariantType.maybe (VariantType element); - public VariantType.tuple (VariantType[] items); - public VariantType.dict_entry (VariantType key, VariantType value); - } - - [Compact] - [Version (since = "2.24")] - [CCode (ref_function = "g_variant_ref", unref_function = "g_variant_unref", ref_sink_function = "g_variant_ref_sink", type_id = "G_TYPE_VARIANT", marshaller_type_name = "VARIANT", param_spec_function = "g_param_spec_variant", get_value_function = "g_value_get_variant", set_value_function = "g_value_set_variant", take_value_function = "g_value_take_variant", type_signature = "v")] - public class Variant { - [CCode (has_type_id = false)] - public enum Class { - BOOLEAN, BYTE, INT16, UINT16, INT32, UINT32, INT64, - UINT64, HANDLE, DOUBLE, STRING, OBJECT_PATH, - SIGNATURE, VARIANT, MAYBE, ARRAY, TUPLE, DICT_ENTRY - } - - public unowned VariantType get_type (); - public unowned string get_type_string (); - public bool is_of_type (VariantType type); - public bool is_container (); - [Version (since = "2.26")] - public bool is_floating (); - public Class classify (); - [Version (since = "2.26")] - public int compare (Variant other); - - public Variant.boolean (bool value); - public Variant.byte (uint8 value); - public Variant.int16 (int16 value); - public Variant.uint16 (uint16 value); - public Variant.int32 (int32 value); - public Variant.uint32 (uint32 value); - public Variant.int64 (int64 value); - public Variant.uint64 (uint64 value); - public Variant.handle (int32 value); - public Variant.double (double value); - public Variant.string (string value); - [Version (since = "2.26")] - public Variant.bytestring (string value); - public Variant.object_path (string object_path); - public static bool is_object_path (string object_path); - public Variant.signature (string signature); - public static bool is_signature (string signature); - - public bool get_boolean (); - public uint8 get_byte (); - public int16 get_int16 (); - public uint16 get_uint16 (); - public int32 get_int32 (); - public uint32 get_uint32 (); - public int64 get_int64 (); - public uint64 get_uint64 (); - public int32 get_handle (); - public double get_double (); - public unowned string get_string (out size_t length = null); - public string dup_string (out size_t length = null); - [Version (since = "2.26")] - public unowned string get_bytestring (); - [Version (since = "2.26")] - public string dup_bytestring (out size_t length); - - public Variant.strv (string[] value); - [CCode (array_length_type = "size_t")] -#if VALA_0_26 - public (unowned string)[] get_strv (); -#else - public string*[] get_strv (); -#endif - [CCode (array_length_type = "size_t")] - public string[] dup_strv (); - - [Version (since = "2.26")] - public Variant.bytestring_array (string[] value); - [Version (since = "2.26")] - [CCode (array_length_type = "size_t")] -#if VALA_0_26 - public (unowned string)[] get_bytestring_array (); -#else - public string*[] get_bytestring_array (); -#endif - [Version (since = "2.26")] - [CCode (array_length_type = "size_t")] - public string[] dup_bytestring_array (); - - [Version (since = "2.30")] - public Variant.objv (string[] value); - [Version (since = "2.30")] - [CCode (array_length_type = "size_t")] -#if VALA_0_26 - public (unowned string)[] get_objv (); -#else - public string*[] get_objv (); -#endif - [Version (since = "2.30")] - [CCode (array_length_type = "size_t")] - public string[] dup_objv (); - - public Variant (string format, ...); - // note: the function changes its behaviour when end_ptr is null, so 'out char *' is wrong - public Variant.va (string format, char **end_ptr, va_list *app); - public void get (string format, ...); - public void get_va (string format, char **end_ptr, va_list *app); - - public Variant.variant (Variant value); - public Variant.maybe (VariantType? child_type, Variant? child); - public Variant.array (VariantType? child_type, Variant[] children); - [Version (since = "2.32")] - [CCode (simple_generics = true)] - public static Variant new_fixed_array (VariantType? element_type, [CCode (array_length_type = "gsize")] T[] elements, size_t element_size); - public Variant.tuple (Variant[] children); - public Variant.dict_entry (Variant key, Variant value); - public Variant get_variant (); - public Variant? get_maybe (); - - public size_t n_children (); - public Variant get_child_value (size_t index); - public void get_child (size_t index, string format_string, ...); - - [Version (since = "2.28")] - public Variant? lookup_value (string key, VariantType? expected_type); - [Version (since = "2.28")] - public bool lookup (string key, string format_string, ...); - - public size_t get_size (); - public void *get_data (); - public void store (void *data); - - public string print (bool type_annotate); - public StringBuilder print_string (StringBuilder? builder, bool type_annotate); - - public uint hash (); - public bool equal (Variant other); - - public Variant byteswap (); - public Variant get_normal_form (); - public bool is_normal_form (); - [CCode (returns_floating_reference = true, simple_generics = true)] - public static Variant new_from_data (VariantType type, uchar[] data, bool trusted, [CCode (destroy_notify_pos = 3.9)] owned T? owner = null); - - [CCode (cname = "g_variant_iter_new")] - public VariantIter iterator (); - - public static Variant parse (VariantType? type, string text, char *limit = null, char **endptr = null) throws GLib.VariantParseError; - public Variant.parsed (string format_string, ...); - - [Version (since = "2.34")] - public bool check_format_string (string format_string, bool copy_only); - - [Version (since = "2.36")] - public Variant.from_bytes (VariantType type, Bytes bytes, bool trusted); - [Version (since = "2.36")] - public Bytes get_data_as_bytes (); - - [Version (since = "2.38")] - public Variant.printf (string format_string, ...); - [Version (since = "2.38")] - public Variant.take_string (owned string str); - - [Version (since = "2.40")] - public static void parse_error_print_context (GLib.VariantParseError error, string source_str); - } - - [Version (since = "2.24")] - public errordomain VariantParseError { - FAILED, - BASIC_TYPE_EXPECTED, - CANNOT_INFER_TYPE, - DEFINITE_TYPE_EXPECTED, - INPUT_NOT_AT_END, - INVALID_CHARACTER, - INVALID_FORMAT_STRING, - INVALID_OBJECT_PATH, - INVALID_SIGNATURE, - INVALID_TYPE_STRING, - NO_COMMON_TYPE, - NUMBER_OUT_OF_RANGE, - NUMBER_TOO_BIG, - TYPE_ERROR, - UNEXPECTED_TOKEN, - UNKNOWN_KEYWORD, - UNTERMINATED_STRING_CONSTANT, - VALUE_EXPECTED, - [Version (since = "2.64")] - RECURSION; - public static GLib.Quark quark (); - } - - [Compact] - [Version (since = "2.24")] - public class VariantIter { - public VariantIter (Variant value); - public size_t n_children (); - public Variant? next_value (); - public bool next (string format_string, ...); - } - - [Compact] - [Version (since = "2.24")] - [CCode (ref_function = "g_variant_builder_ref", unref_function = "g_variant_builder_unref")] - public class VariantBuilder { - public VariantBuilder (VariantType type); - public void open (VariantType type); - public void close (); - public void add_value (Variant value); - public void add (string format_string, ...); - [CCode (returns_floating_reference = true)] - public Variant end (); - } - - [Version (since = "2.40")] - [Compact, CCode (ref_function = "g_variant_dict_ref", unref_function = "g_variant_dict_unref")] - public class VariantDict { - public VariantDict (GLib.Variant? from_asv = null); - public bool lookup (string key, string format_string, ...); - public GLib.Variant lookup_value (string key, GLib.VariantType expected_type); - public bool contains (string key); - public void insert (string key, string format_string, ...); - public void insert_value (string key, GLib.Variant value); - public bool remove (string key); - public void clear (); - [CCode (returns_floating_reference = true)] - public GLib.Variant end (); - } - - [CCode (cname = "char", const_cname = "const char", copy_function = "g_strdup", free_function = "g_free", cheader_filename = "stdlib.h,string.h,glib.h", type_id = "G_TYPE_STRING", marshaller_type_name = "STRING", param_spec_function = "g_param_spec_string", get_value_function = "g_value_get_string", set_value_function = "g_value_set_string", take_value_function = "g_value_take_string", type_signature = "o")] - public class ObjectPath : string { - [CCode (cname = "g_strdup")] - public ObjectPath (string path); - } - - [CCode (cname = "char", const_cname = "const char", copy_function = "g_strdup", free_function = "g_free", cheader_filename = "stdlib.h,string.h,glib.h", type_id = "G_TYPE_STRING", marshaller_type_name = "STRING", param_spec_function = "g_param_spec_string", get_value_function = "g_value_get_string", set_value_function = "g_value_set_string", take_value_function = "g_value_take_string")] - public class BusName : string { - [CCode (cname = "g_strdup")] - public BusName (string bus_name); - } - - [CCode (cname = "G_LIKELY", cheader_filename = "glib.h")] - public static bool likely (bool expression); - [CCode (cname = "G_UNLIKELY", cheader_filename = "glib.h")] - public static bool unlikely (bool expression); - [Version (since = "2.20")] - [CCode (cname = "G_STATIC_ASSERT", cheader_filename = "glib.h")] - public static void static_assert (bool expression); - - [CCode (simple_generics = true, cname = "g_qsort_with_data")] - private static void _qsort_with_data (T[] elems, size_t size, [CCode (type = "GCompareDataFunc")] GLib.CompareDataFunc compare_func); - - [CCode (cname = "_vala_g_qsort_with_data")] - public static void qsort_with_data (T[] elems, size_t size, [CCode (type = "GCompareDataFunc")] GLib.CompareDataFunc compare_func) { - _qsort_with_data (elems, size, (a, b) => { - return compare_func (*a, *b); - }); - } - - [Version (since = "2.54")] - public errordomain NumberParserError { - INVALID, - OUT_OF_BOUNDS; - public static GLib.Quark quark (); - } - - /* Unix-specific functions. All of these have to include glib-unix.h. */ - namespace Unix { - [Version (since = "2.30")] - [CCode (cheader_filename = "glib-unix.h", cname = "g_unix_signal_add_full")] - public static uint signal_add (int signum, owned GLib.SourceFunc handler, [CCode (pos = 0.9)] int priority = Priority.DEFAULT); - - [CCode (cheader_filename = "glib-unix.h", cname = "GSource")] - public class SignalSource : GLib.Source { - public SignalSource (int signum); - } - -#if UNIX - [Version (since = "2.64")] - [CCode (cheader_filename = "glib-unix.h")] - public static Posix.Passwd get_passwd_entry (string user_name) throws GLib.Error; -#endif - [Version (since = "2.30")] - [CCode (cheader_filename = "glib-unix.h")] - public static bool open_pipe ([CCode (array_length = false, array_null_terminated = false)] int[] fds, int flags) throws GLib.Error; - [Version (since = "2.30")] - [CCode (cheader_filename = "glib-unix.h")] - public static bool set_fd_nonblocking (int fd, bool nonblock) throws GLib.Error; - } - - [CCode (cname = "GUnicodeScript", cprefix = "G_UNICODE_SCRIPT_", has_type_id = false)] - public enum UnicodeScript { - INVALID_CODE, - COMMON, - INHERITED, - ARABIC, - ARMENIAN, - BENGALI, - BOPOMOFO, - CHEROKEE, - COPTIC, - CYRILLIC, - DESERET, - DEVANAGARI, - ETHIOPIC, - GEORGIAN, - GOTHIC, - GREEK, - GUJARATI, - GURMUKHI, - HAN, - HANGUL, - HEBREW, - HIRAGANA, - KANNADA, - KATAKANA, - KHMER, - LAO, - LATIN, - MALAYALAM, - MONGOLIAN, - MYANMAR, - OGHAM, - OLD_ITALIC, - ORIYA, - RUNIC, - SINHALA, - SYRIAC, - TAMIL, - TELUGU, - THAANA, - THAI, - TIBETAN, - CANADIAN_ABORIGINAL, - YI, - TAGALOG, - HANUNOO, - BUHID, - TAGBANWA, - - BRAILLE, - CYPRIOT, - LIMBU, - OSMANYA, - SHAVIAN, - LINEAR_B, - TAI_LE, - UGARITIC, - - NEW_TAI_LUE, - BUGINESE, - GLAGOLITIC, - TIFINAGH, - SYLOTI_NAGRI, - OLD_PERSIAN, - KHAROSHTHI, - - UNKNOWN, - BALINESE, - CUNEIFORM, - PHOENICIAN, - PHAGS_PA, - NKO, - - KAYAH_LI, - LEPCHA, - REJANG, - SUNDANESE, - SAURASHTRA, - CHAM, - OL_CHIKI, - VAI, - CARIAN, - LYCIAN, - LYDIAN, - - /* Unicode-5.2 additions */ - AVESTAN, /* Avst */ - BAMUM, /* Bamu */ - EGYPTIAN_HIEROGLYPHS, /* Egyp */ - IMPERIAL_ARAMAIC, /* Armi */ - INSCRIPTIONAL_PAHLAVI, /* Phli */ - INSCRIPTIONAL_PARTHIAN, /* Prti */ - JAVANESE, /* Java */ - KAITHI, /* Kthi */ - LISU, /* Lisu */ - MEETEI_MAYEK, /* Mtei */ - OLD_SOUTH_ARABIAN, /* Sarb */ - OLD_TURKIC, /* Orkh */ - SAMARITAN, /* Samr */ - TAI_THAM, /* Lana */ - TAI_VIET, /* Tavt */ - - /* Unicode-6.0 additions */ - BATAK, /* Batk */ - BRAHMI, /* Brah */ - MANDAIC, /* Mand */ - - /* Unicode-6.1 additions */ - CHAKMA, /* Cakm */ - MEROITIC_CURSIVE, /* Merc */ - MEROITIC_HIEROGLYPHS, /* Mero */ - MIAO, /* Plrd */ - SHARADA, /* Shrd */ - SORA_SOMPENG, /* Sora */ - TAKRI, /* Takr */ - - /* Unicode 7.0 additions */ - BASSA_VAH, /* Bass */ - CAUCASIAN_ALBANIAN, /* Aghb */ - DUPLOYAN, /* Dupl */ - ELBASAN, /* Elba */ - GRANTHA, /* Gran */ - KHOJKI, /* Khoj */ - KHUDAWADI, /* Sind */ - LINEAR_A, /* Lina */ - MAHAJANI, /* Mahj */ - MANICHAEAN, /* Manu */ - MENDE_KIKAKUI, /* Mend */ - MODI, /* Modi */ - MRO, /* Mroo */ - NABATAEAN, /* Nbat */ - OLD_NORTH_ARABIAN, /* Narb */ - OLD_PERMIC, /* Perm */ - PAHAWH_HMONG, /* Hmng */ - PALMYRENE, /* Palm */ - PAU_CIN_HAU, /* Pauc */ - PSALTER_PAHLAVI, /* Phlp */ - SIDDHAM, /* Sidd */ - TIRHUTA, /* Tirh */ - WARANG_CITI, /* Wara */ - - /* Unicode 8.0 additions */ - AHOM, /* Ahom */ - ANATOLIAN_HIEROGLYPHS, /* Hluw */ - HATRAN, /* Hatr */ - MULTANI, /* Mult */ - OLD_HUNGARIAN, /* Hung */ - SIGNWRITING, /* Sgnw */ - - /* Unicode 9.0 additions */ - ADLAM, /* Adlm */ - BHAIKSUKI, /* Bhks */ - MARCHEN, /* Marc */ - NEWA, /* Newa */ - OSAGE, /* Osge */ - TANGUT, /* Tang */ - - /* Unicode 10.0 additions */ - MASARAM_GONDI, /* Gonm */ - NUSHU, /* Nshu */ - SOYOMBO, /* Soyo */ - ZANABAZAR_SQUARE, /* Zanb */ - - /* Unicode 11.0 additions */ - DOGRA, /* Dogr */ - GUNJALA_GONDI, /* Gong */ - HANIFI_ROHINGYA, /* Rohg */ - MAKASAR, /* Maka */ - MEDEFAIDRIN, /* Medf */ - OLD_SOGDIAN, /* Sogo */ - SOGDIAN, /* Sogd */ - - /* Unicode 12.0 additions */ - ELYMAIC, /* Elym */ - NANDINAGARI, /* Nand */ - NYIAKENG_PUACHUE_HMONG, /* Rohg */ - WANCHO; /* Wcho */ - - [CCode (cname = "g_unicode_script_to_iso15924")] - public uint32 to_iso15924 (); - [CCode (cname = "g_unicode_script_from_iso15924")] - public static GLib.UnicodeScript from_iso15924 (uint32 iso15924); - } - - [CCode (cname = "GUnicodeType", cprefix = "G_UNICODE_", has_type_id = false)] - public enum UnicodeType { - CONTROL, - FORMAT, - UNASSIGNED, - PRIVATE_USE, - SURROGATE, - LOWERCASE_LETTER, - MODIFIER_LETTER, - OTHER_LETTER, - TITLECASE_LETTER, - UPPERCASE_LETTER, - COMBINING_MARK, - ENCLOSING_MARK, - NON_SPACING_MARK, - DECIMAL_NUMBER, - LETTER_NUMBER, - OTHER_NUMBER, - CONNECT_PUNCTUATION, - DASH_PUNCTUATION, - CLOSE_PUNCTUATION, - FINAL_PUNCTUATION, - INITIAL_PUNCTUATION, - OTHER_PUNCTUATION, - OPEN_PUNCTUATION, - CURRENCY_SYMBOL, - MODIFIER_SYMBOL, - MATH_SYMBOL, - OTHER_SYMBOL, - LINE_SEPARATOR, - PARAGRAPH_SEPARATOR, - SPACE_SEPARATOR - } - - [CCode (cname = "GUnicodeBreakType", cprefix = "G_UNICODE_BREAK_", has_type_id = false)] - public enum UnicodeBreakType { - MANDATORY, - CARRIAGE_RETURN, - LINE_FEED, - COMBINING_MARK, - SURROGATE, - ZERO_WIDTH_SPACE, - INSEPARABLE, - NON_BREAKING_GLUE, - CONTINGENT, - SPACE, - AFTER, - BEFORE, - BEFORE_AND_AFTER, - HYPHEN, - NON_STARTER, - OPEN_PUNCTUATION, - CLOSE_PUNCTUATION, - QUOTATION, - EXCLAMATION, - IDEOGRAPHIC, - NUMERIC, - INFIX_SEPARATOR, - SYMBOL, - ALPHABETIC, - PREFIX, - POSTFIX, - COMPLEX_CONTEXT, - AMBIGUOUS, - UNKNOWN, - NEXT_LINE, - WORD_JOINER, - HANGUL_L_JAMO, - HANGUL_V_JAMO, - HANGUL_T_JAMO, - HANGUL_LV_SYLLABLE, - HANGUL_LVT_SYLLABLE, - CLOSE_PARANTHESIS, - CONDITIONAL_JAPANESE_STARTER, - HEBREW_LETTER, - REGIONAL_INDICATOR, - EMOJI_BASE, - EMOJI_MODIFIER, - ZERO_WIDTH_JOINER - } - - [CCode (cname = "GNormalizeMode", cprefix = "G_NORMALIZE_", has_type_id = false)] - public enum NormalizeMode { - DEFAULT, - NFD, - DEFAULT_COMPOSE, - NFC, - ALL, - NFKD, - ALL_COMPOSE, - NFKC - } -} diff --git a/vapi/gnome-desktop-3.0.vapi b/vapi/gnome-desktop-3.0.vapi deleted file mode 100644 index 2fc87d243..000000000 --- a/vapi/gnome-desktop-3.0.vapi +++ /dev/null @@ -1,364 +0,0 @@ -/* gnome-desktop-3.0.vapi generated by vapigen, do not modify. */ - -[CCode (cprefix = "Gnome", gir_namespace = "GnomeDesktop", gir_version = "3.0", lower_case_cprefix = "gnome_")] -namespace Gnome { - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h", type_id = "gnome_bg_get_type ()")] - public class BG : GLib.Object { - [CCode (has_construct_function = false)] - public BG (); - public bool changes_with_time (); - public Gdk.Pixbuf create_frame_thumbnail (Gnome.DesktopThumbnailFactory factory, Gdk.Screen screen, int dest_width, int dest_height, int frame_num); - public Cairo.Surface create_surface (Gdk.Window window, int width, int height, bool root); - public Gdk.Pixbuf create_thumbnail (Gnome.DesktopThumbnailFactory factory, Gdk.Screen screen, int dest_width, int dest_height); - public void draw (Gdk.Pixbuf dest, Gdk.Screen screen, bool is_root); - public void get_color (GDesktop.BackgroundShading type, Gdk.Color primary, Gdk.Color secondary); - public unowned string get_filename (); - public bool get_image_size (Gnome.DesktopThumbnailFactory factory, int best_width, int best_height, int width, int height); - public GDesktop.BackgroundStyle get_placement (); - public static Cairo.Surface get_surface_from_root (Gdk.Screen screen); - public bool has_multiple_sizes (); - public bool is_dark (int dest_width, int dest_height); - public void load_from_preferences (GLib.Settings settings); - public void save_to_preferences (GLib.Settings settings); - public void set_color (GDesktop.BackgroundShading type, Gdk.Color primary, Gdk.Color secondary); - public void set_filename (string filename); - public void set_placement (GDesktop.BackgroundStyle placement); - public static void set_surface_as_root (Gdk.Screen screen, Cairo.Surface surface); - public static Gnome.BGCrossfade set_surface_as_root_with_crossfade (Gdk.Screen screen, Cairo.Surface surface); - public signal void changed (); - public signal void transitioned (); - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h", type_id = "gnome_bg_crossfade_get_type ()")] - public class BGCrossfade : GLib.Object { - [CCode (has_construct_function = false)] - public BGCrossfade (int width, int height); - public bool is_started (); - public bool set_end_surface (Cairo.Surface surface); - public bool set_start_surface (Cairo.Surface surface); - public void start (Gdk.Window window); - public void stop (); - [NoAccessorMethod] - public int height { get; construct; } - [NoAccessorMethod] - public int width { get; construct; } - public virtual signal void finished (GLib.Object window); - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h", type_id = "gnome_bg_slide_show_get_type ()")] - public class BGSlideShow : GLib.Object { - [CCode (has_construct_function = false)] - public BGSlideShow (string filename); - public void get_current_slide (int width, int height, out double progress, out double duration, out bool is_fixed, out unowned string file1, out unowned string file2); - public bool get_has_multiple_sizes (); - public int get_num_slides (); - public bool get_slide (int frame_number, int width, int height, out double progress, out double duration, out bool is_fixed, out unowned string file1, out unowned string file2); - public double get_start_time (); - public double get_total_duration (); - public bool load () throws GLib.Error; - public async void load_async (GLib.Cancellable? cancellable); - [NoAccessorMethod] - public string filename { owned get; construct; } - public bool has_multiple_sizes { get; } - public double start_time { get; } - public double total_duration { get; } - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h", type_id = "gnome_desktop_thumbnail_factory_get_type ()")] - public class DesktopThumbnailFactory : GLib.Object { - [CCode (has_construct_function = false)] - public DesktopThumbnailFactory (Gnome.DesktopThumbnailSize size); - public bool can_thumbnail (string uri, string mime_type, long mtime); - public void create_failed_thumbnail (string uri, long mtime); - public Gdk.Pixbuf generate_thumbnail (string uri, string mime_type); - public bool has_valid_failed_thumbnail (string uri, long mtime); - public string lookup (string uri, long mtime); - public void save_thumbnail (Gdk.Pixbuf thumbnail, string uri, long original_mtime); - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h", type_id = "gnome_idle_monitor_get_type ()")] - public class IdleMonitor : GLib.Object, GLib.Initable { - [CCode (has_construct_function = false)] - public IdleMonitor (); - public uint add_idle_watch (uint64 interval_msec, owned Gnome.IdleMonitorWatchFunc? callback); - public uint add_user_active_watch (owned Gnome.IdleMonitorWatchFunc? callback); - [CCode (has_construct_function = false)] - public IdleMonitor.for_device (Gdk.Device device) throws GLib.Error; - public uint64 get_idletime (); - public void remove_watch (uint id); - [NoAccessorMethod] - public Gdk.Device device { owned get; construct; } - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h", type_id = "gnome_pnp_ids_get_type ()")] - public class PnpIds : GLib.Object { - [CCode (has_construct_function = false)] - public PnpIds (); - public string get_pnp_id (string pnp_id); - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h", type_id = "gnome_rr_config_get_type ()")] - public class RRConfig : GLib.Object { - [CCode (has_construct_function = false)] - protected RRConfig (); - public bool applicable (Gnome.RRScreen screen) throws GLib.Error; - public bool apply (Gnome.RRScreen screen) throws GLib.Error; - public bool apply_persistent (Gnome.RRScreen screen) throws GLib.Error; - [CCode (has_construct_function = false)] - public RRConfig.current (Gnome.RRScreen screen) throws GLib.Error; - public bool ensure_primary (); - public bool equal (Gnome.RRConfig config2); - public bool get_clone (); - [CCode (array_length = false, array_null_terminated = true)] - public unowned Gnome.RROutputInfo[] get_outputs (); - public bool load_current () throws GLib.Error; - public bool match (Gnome.RRConfig config2); - public void sanitize (); - public void set_clone (bool clone); - public Gnome.RRScreen screen { construct; } - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gnome_rr_crtc_get_type ()")] - [Compact] - public class RRCrtc { - public bool can_drive_output (Gnome.RROutput output); - public unowned Gnome.RRMode get_current_mode (); - public Gnome.RRRotation get_current_rotation (); - public bool get_gamma (int size, out ushort red, out ushort green, out ushort blue); - public uint32 get_id (); - public void get_position (out int x, out int y); - public Gnome.RRRotation get_rotations (); - public bool set_gamma (int size, ushort red, ushort green, ushort blue); - public bool supports_rotation (Gnome.RRRotation rotation); - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gnome_rr_mode_get_type ()")] - [Compact] - public class RRMode { - public int get_freq (); - public uint get_height (); - public uint32 get_id (); - public bool get_is_tiled (); - public uint get_width (); - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gnome_rr_output_get_type ()")] - [Compact] - public class RROutput { - public bool can_clone (Gnome.RROutput clone); - public int get_backlight (); - public unowned Gnome.RRCrtc get_crtc (); - public unowned Gnome.RRMode get_current_mode (); - public unowned string get_display_name (); - public uint8 get_edid_data (size_t size); - public uint32 get_id (); - public void get_ids_from_edid (out string vendor, out string product, out string serial); - public bool get_is_primary (); - public bool get_is_underscanning (); - public int get_min_backlight_step (); - public unowned string get_name (); - public void get_physical_size (out int width_mm, out int height_mm); - public void get_position (out int x, out int y); - [CCode (array_length = false, array_null_terminated = true)] - public unowned Gnome.RRCrtc[] get_possible_crtcs (); - public unowned Gnome.RRMode get_preferred_mode (); - public bool is_builtin_display (); - [CCode (array_length = false, array_null_terminated = true)] - public unowned Gnome.RRMode[] list_modes (); - public bool set_backlight (int value) throws GLib.Error; - public bool supports_mode (Gnome.RRMode mode); - public bool supports_underscanning (); - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h", type_id = "gnome_rr_output_info_get_type ()")] - public class RROutputInfo : GLib.Object { - [CCode (has_construct_function = false)] - protected RROutputInfo (); - public double get_aspect_ratio (); - public unowned string get_display_name (); - public void get_geometry (out int x, out int y, out int width, out int height); - public unowned string get_name (); - public int get_preferred_height (); - public int get_preferred_width (); - public bool get_primary (); - public unowned string get_product (); - public int get_refresh_rate (); - public Gnome.RRRotation get_rotation (); - public unowned string get_serial (); - public bool get_underscanning (); - public unowned string get_vendor (); - public bool is_active (); - public bool is_connected (); - public bool is_primary_tile (); - public void set_active (bool active); - public void set_geometry (int x, int y, int width, int height); - public void set_primary (bool primary); - public void set_refresh_rate (int rate); - public void set_rotation (Gnome.RRRotation rotation); - public void set_underscanning (bool underscanning); - public bool supports_rotation (Gnome.RRRotation rotation); - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h", type_id = "gnome_rr_screen_get_type ()")] - public class RRScreen : GLib.Object, GLib.AsyncInitable, GLib.Initable { - [CCode (cname = "gnome_rr_screen_new_async", has_construct_function = false)] - public async RRScreen (Gdk.Screen screen) throws GLib.Error; - public unowned Gnome.RRCrtc get_crtc_by_id (uint32 id); - public bool get_dpms_mode (out Gnome.RRDpmsMode mode) throws GLib.Error; - public unowned Gnome.RROutput get_output_by_id (uint32 id); - public unowned Gnome.RROutput get_output_by_name (string name); - public void get_ranges (out int min_width, out int max_width, out int min_height, out int max_height); - [CCode (array_length = false, array_null_terminated = true)] - public unowned Gnome.RRMode[] list_clone_modes (); - [CCode (array_length = false, array_null_terminated = true)] - public unowned Gnome.RRCrtc[] list_crtcs (); - [CCode (array_length = false, array_null_terminated = true)] - public unowned Gnome.RRMode[] list_modes (); - [CCode (array_length = false, array_null_terminated = true)] - public unowned Gnome.RROutput[] list_outputs (); - public bool refresh () throws GLib.Error; - public bool set_dpms_mode (Gnome.RRDpmsMode mode) throws GLib.Error; - [NoAccessorMethod] - public Gnome.RRDpmsModeType dpms_mode { get; set; } - [NoAccessorMethod] - public Gdk.Screen gdk_screen { owned get; construct; } - public virtual signal void changed (); - public virtual signal void output_connected (void* output); - public virtual signal void output_disconnected (void* output); - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h", type_id = "gnome_wall_clock_get_type ()")] - public class WallClock : GLib.Object { - [CCode (has_construct_function = false)] - public WallClock (); - public unowned string get_clock (); - public unowned GLib.TimeZone get_timezone (); - public string string_for_datetime (GLib.DateTime now, GDesktop.ClockFormat clock_format, bool show_weekday, bool show_full_date, bool show_seconds); - public string clock { get; } - [NoAccessorMethod] - public bool time_only { get; set; } - public GLib.TimeZone timezone { get; } - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h", type_id = "gnome_xkb_info_get_type ()")] - public class XkbInfo : GLib.Object { - [CCode (has_construct_function = false)] - public XkbInfo (); - public unowned string description_for_group (string group_id); - public unowned string description_for_option (string group_id, string id); - public GLib.List get_all_layouts (); - public GLib.List get_all_option_groups (); - public GLib.List get_languages_for_layout (string layout_id); - public bool get_layout_info (string id, out unowned string display_name, out unowned string short_name, out unowned string xkb_layout, out unowned string xkb_variant); - public GLib.List get_layouts_for_country (string country_code); - public GLib.List get_layouts_for_language (string language_code); - public GLib.List get_options_for_group (string group_id); - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - [SimpleType] - public struct BGCrossfade_autoptr { - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - [SimpleType] - public struct BGSlideShow_autoptr { - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - [SimpleType] - public struct BG_autoptr { - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - [SimpleType] - public struct DesktopThumbnailFactory_autoptr { - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - [SimpleType] - public struct IdleMonitor_autoptr { - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - [SimpleType] - public struct PnpIds_autoptr { - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - [SimpleType] - public struct RRConfig_autoptr { - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - [SimpleType] - public struct RROutputInfo_autoptr { - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - [SimpleType] - public struct RRScreen_autoptr { - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - [SimpleType] - public struct WallClock_autoptr { - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - [SimpleType] - public struct XkbInfo_autoptr { - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h", cprefix = "GNOME_DESKTOP_THUMBNAIL_SIZE_", has_type_id = false)] - public enum DesktopThumbnailSize { - NORMAL, - LARGE - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h", cprefix = "GNOME_RR_DPMS_", has_type_id = false)] - public enum RRDpmsMode { - ON, - STANDBY, - SUSPEND, - OFF, - UNKNOWN - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h", cprefix = "GNOME_RR_DPMS_", type_id = "gnome_rr_dpms_mode_get_type ()")] - public enum RRDpmsModeType { - ON, - STANDBY, - SUSPEND, - OFF, - UNKNOWN - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h", cprefix = "GNOME_RR_", has_type_id = false)] - [Flags] - public enum RRRotation { - ROTATION_NEXT, - ROTATION_0, - ROTATION_90, - ROTATION_180, - ROTATION_270, - REFLECT_X, - REFLECT_Y - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h", cprefix = "GNOME_RR_ERROR_")] - public errordomain RRError { - UNKNOWN, - NO_RANDR_EXTENSION, - RANDR_ERROR, - BOUNDS_ERROR, - CRTC_ASSIGNMENT, - NO_MATCHING_CONFIG, - NO_DPMS_EXTENSION; - public static GLib.Quark quark (); - } - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h", instance_pos = 2.9)] - public delegate void IdleMonitorWatchFunc (Gnome.IdleMonitor monitor, uint id); - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h", cname = "GNOME_RR_CONNECTOR_TYPE_PANEL")] - public const string RR_CONNECTOR_TYPE_PANEL; - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - public static bool desktop_thumbnail_has_uri (Gdk.Pixbuf pixbuf, string uri); - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - public static bool desktop_thumbnail_is_valid (Gdk.Pixbuf pixbuf, string uri, long mtime); - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - [Version (deprecated = true, deprecated_since = "2.22")] - public static string desktop_thumbnail_md5 (string uri); - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - public static string desktop_thumbnail_path_for_uri (string uri, Gnome.DesktopThumbnailSize size); - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - public static Gdk.Pixbuf desktop_thumbnail_scale_down_pixbuf (Gdk.Pixbuf pixbuf, int dest_width, int dest_height); - [CCode (array_length = false, array_null_terminated = true, cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - public static string[] get_all_locales (); - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - public static string get_country_from_code (string code, string? translation); - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - public static string get_country_from_locale (string locale, string? translation); - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - public static bool get_input_source_from_locale (string locale, out unowned string type, out unowned string id); - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - public static string get_language_from_code (string code, string? translation); - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - public static string get_language_from_locale (string locale, string? translation); - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - public static bool language_has_translations (string code); - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - public static string normalize_locale (string locale); - [CCode (cheader_filename = "libgnome-desktop/gnome-bg-crossfade.h,libgnome-desktop/gnome-bg-slide-show.h,libgnome-desktop/gnome-bg.h,libgnome-desktop/gnome-desktop-thumbnail.h,libgnome-desktop/gnome-idle-monitor.h,libgnome-desktop/gnome-languages.h,libgnome-desktop/gnome-pnp-ids.h,libgnome-desktop/gnome-rr-config.h,libgnome-desktop/gnome-rr.h,libgnome-desktop/gnome-wall-clock.h,libgnome-desktop/gnome-xkb-info.h")] - public static bool parse_locale (string locale, out string language_codep, out string country_codep, out string codesetp, out string modifierp); -} diff --git a/vapi/graphene-gobject-1.0.vapi b/vapi/graphene-gobject-1.0.vapi deleted file mode 100644 index 69801535d..000000000 --- a/vapi/graphene-gobject-1.0.vapi +++ /dev/null @@ -1,691 +0,0 @@ -/* graphene-gobject-1.0.vapi generated by vapigen, do not modify. */ - -[CCode (cprefix = "Graphene", gir_namespace = "Graphene", gir_version = "1.0", lower_case_cprefix = "graphene_")] -namespace Graphene { - [CCode (cheader_filename = "graphene-gobject.h", cname = "graphene_box_t", type_id = "graphene_box_get_type ()")] - [Version (since = "1.2")] - public struct Box { - public bool contains_box (Graphene.Box b); - public bool contains_point (Graphene.Point3D point); - public static unowned Graphene.Box? empty (); - public bool equal (Graphene.Box b); - public Graphene.Box expand (Graphene.Point3D point); - public Graphene.Box expand_scalar (float scalar); - public Graphene.Box expand_vec3 (Graphene.Vec3 vec); - public Graphene.Sphere get_bounding_sphere (); - public Graphene.Point3D get_center (); - public float get_depth (); - public float get_height (); - public Graphene.Point3D get_max (); - public Graphene.Point3D get_min (); - public Graphene.Vec3 get_size (); - public void get_vertices ([CCode (array_length = false)] ref Graphene.Vec3 vertices[8]); - public float get_width (); - public static unowned Graphene.Box? infinite (); - public unowned Graphene.Box? init (Graphene.Point3D? min, Graphene.Point3D? max); - public unowned Graphene.Box? init_from_box (Graphene.Box src); - public unowned Graphene.Box? init_from_points ([CCode (array_length_cname = "n_points", array_length_pos = 0.5, array_length_type = "guint")] Graphene.Point3D[] points); - public unowned Graphene.Box? init_from_vec3 (Graphene.Vec3? min, Graphene.Vec3? max); - public unowned Graphene.Box? init_from_vectors ([CCode (array_length_cname = "n_vectors", array_length_pos = 0.5, array_length_type = "guint")] Graphene.Vec3[] vectors); - public bool intersection (Graphene.Box b, out Graphene.Box res); - public static unowned Graphene.Box? minus_one (); - public static unowned Graphene.Box? one (); - public static unowned Graphene.Box? one_minus_one (); - public Graphene.Box union (Graphene.Box b); - public static unowned Graphene.Box? zero (); - } - [CCode (cheader_filename = "graphene-gobject.h", cname = "graphene_euler_t", type_id = "graphene_euler_get_type ()")] - [Version (since = "1.2")] - public struct Euler { - public bool equal (Graphene.Euler b); - [Version (since = "1.10")] - public float get_alpha (); - [Version (since = "1.10")] - public float get_beta (); - [Version (since = "1.10")] - public float get_gamma (); - public Graphene.EulerOrder get_order (); - public float get_x (); - public float get_y (); - public float get_z (); - public unowned Graphene.Euler? init (float x, float y, float z); - public unowned Graphene.Euler? init_from_euler (Graphene.Euler? src); - public unowned Graphene.Euler? init_from_matrix (Graphene.Matrix? m, Graphene.EulerOrder order); - public unowned Graphene.Euler? init_from_quaternion (Graphene.Quaternion? q, Graphene.EulerOrder order); - [Version (since = "1.10")] - public unowned Graphene.Euler? init_from_radians (float x, float y, float z, Graphene.EulerOrder order); - public unowned Graphene.Euler? init_from_vec3 (Graphene.Vec3? v, Graphene.EulerOrder order); - public unowned Graphene.Euler? init_with_order (float x, float y, float z, Graphene.EulerOrder order); - public Graphene.Euler reorder (Graphene.EulerOrder order); - public Graphene.Matrix to_matrix (); - [Version (since = "1.10")] - public Graphene.Quaternion to_quaternion (); - public Graphene.Vec3 to_vec3 (); - } - [CCode (cheader_filename = "graphene-gobject.h", cname = "graphene_frustum_t", type_id = "graphene_frustum_get_type ()")] - [Version (since = "1.2")] - public struct Frustum { - public bool contains_point (Graphene.Point3D point); - [Version (since = "1.6")] - public bool equal (Graphene.Frustum b); - public void get_planes ([CCode (array_length = false)] ref Graphene.Plane planes[6]); - public unowned Graphene.Frustum? init (Graphene.Plane p0, Graphene.Plane p1, Graphene.Plane p2, Graphene.Plane p3, Graphene.Plane p4, Graphene.Plane p5); - public unowned Graphene.Frustum? init_from_frustum (Graphene.Frustum src); - public unowned Graphene.Frustum? init_from_matrix (Graphene.Matrix matrix); - public bool intersects_box (Graphene.Box box); - public bool intersects_sphere (Graphene.Sphere sphere); - } - [CCode (cheader_filename = "graphene-gobject.h", cname = "graphene_matrix_t", type_id = "graphene_matrix_get_type ()")] - public struct Matrix { - public bool decompose (out Graphene.Vec3 translate, out Graphene.Vec3 scale, out Graphene.Quaternion rotate, out Graphene.Vec3 shear, out Graphene.Vec4 perspective); - [Version (since = "1.0")] - public float determinant (); - [Version (since = "1.10")] - public bool equal (Graphene.Matrix b); - [Version (since = "1.10")] - public bool equal_fast (Graphene.Matrix b); - [Version (since = "1.0")] - public Graphene.Vec4 get_row (uint index_); - [Version (since = "1.0")] - public float get_value (uint row, uint col); - [Version (since = "1.0")] - public float get_x_scale (); - [Version (since = "1.10")] - public float get_x_translation (); - [Version (since = "1.0")] - public float get_y_scale (); - [Version (since = "1.10")] - public float get_y_translation (); - [Version (since = "1.0")] - public float get_z_scale (); - [Version (since = "1.10")] - public float get_z_translation (); - [Version (since = "1.0")] - public unowned Graphene.Matrix? init_from_2d (double xx, double yx, double xy, double yy, double x_0, double y_0); - [Version (since = "1.0")] - public unowned Graphene.Matrix? init_from_float ([CCode (array_length = false)] float v[16]); - [Version (since = "1.0")] - public unowned Graphene.Matrix? init_from_matrix (Graphene.Matrix src); - [Version (since = "1.0")] - public unowned Graphene.Matrix? init_from_vec4 (Graphene.Vec4 v0, Graphene.Vec4 v1, Graphene.Vec4 v2, Graphene.Vec4 v3); - [Version (since = "1.2")] - public unowned Graphene.Matrix? init_frustum (float left, float right, float bottom, float top, float z_near, float z_far); - [Version (since = "1.0")] - public unowned Graphene.Matrix? init_identity (); - [Version (since = "1.0")] - public unowned Graphene.Matrix? init_look_at (Graphene.Vec3 eye, Graphene.Vec3 center, Graphene.Vec3 up); - [Version (since = "1.0")] - public unowned Graphene.Matrix? init_ortho (float left, float right, float top, float bottom, float z_near, float z_far); - [Version (since = "1.0")] - public unowned Graphene.Matrix? init_perspective (float fovy, float aspect, float z_near, float z_far); - [Version (since = "1.0")] - public unowned Graphene.Matrix? init_rotate (float angle, Graphene.Vec3 axis); - [Version (since = "1.0")] - public unowned Graphene.Matrix? init_scale (float x, float y, float z); - [Version (since = "1.0")] - public unowned Graphene.Matrix? init_skew (float x_skew, float y_skew); - [Version (since = "1.0")] - public unowned Graphene.Matrix? init_translate (Graphene.Point3D p); - [Version (since = "1.0")] - public Graphene.Matrix interpolate (Graphene.Matrix b, double factor); - [Version (since = "1.0")] - public bool inverse (out Graphene.Matrix res); - [Version (since = "1.0")] - public bool is_2d (); - [Version (since = "1.0")] - public bool is_backface_visible (); - [Version (since = "1.0")] - public bool is_identity (); - [Version (since = "1.0")] - public bool is_singular (); - [Version (since = "1.0")] - public Graphene.Matrix multiply (Graphene.Matrix b); - [Version (since = "1.10")] - public bool near (Graphene.Matrix b, float epsilon); - [Version (since = "1.0")] - public Graphene.Matrix normalize (); - [Version (since = "1.0")] - public Graphene.Matrix perspective (float depth); - [Version (since = "1.0")] - public void print (); - [Version (since = "1.0")] - public Graphene.Point project_point (Graphene.Point p); - [Version (since = "1.2")] - public Graphene.Quad project_rect (Graphene.Rect r); - [Version (since = "1.0")] - public Graphene.Rect project_rect_bounds (Graphene.Rect r); - [Version (since = "1.0")] - public void rotate (float angle, Graphene.Vec3 axis); - [Version (since = "1.2")] - public void rotate_euler (Graphene.Euler e); - [Version (since = "1.2")] - public void rotate_quaternion (Graphene.Quaternion q); - [Version (since = "1.0")] - public void rotate_x (float angle); - [Version (since = "1.0")] - public void rotate_y (float angle); - [Version (since = "1.0")] - public void rotate_z (float angle); - [Version (since = "1.0")] - public void scale (float factor_x, float factor_y, float factor_z); - [Version (since = "1.0")] - public void skew_xy (float factor); - [Version (since = "1.0")] - public void skew_xz (float factor); - [Version (since = "1.0")] - public void skew_yz (float factor); - [Version (since = "1.0")] - public bool to_2d (out double xx, out double yx, out double xy, out double yy, out double x_0, out double y_0); - [Version (since = "1.0")] - public void to_float ([CCode (array_length = false)] ref float v[16]); - [Version (since = "1.0")] - public Graphene.Rect transform_bounds (Graphene.Rect r); - [Version (since = "1.2")] - public Graphene.Box transform_box (Graphene.Box b); - [Version (since = "1.0")] - public Graphene.Point transform_point (Graphene.Point p); - [Version (since = "1.2")] - public Graphene.Point3D transform_point3d (Graphene.Point3D p); - [Version (since = "1.4")] - public Graphene.Ray transform_ray (Graphene.Ray r); - [Version (since = "1.0")] - public Graphene.Quad transform_rect (Graphene.Rect r); - [Version (since = "1.2")] - public Graphene.Sphere transform_sphere (Graphene.Sphere s); - [Version (since = "1.0")] - public Graphene.Vec3 transform_vec3 (Graphene.Vec3 v); - [Version (since = "1.0")] - public Graphene.Vec4 transform_vec4 (Graphene.Vec4 v); - [Version (since = "1.0")] - public void translate (Graphene.Point3D pos); - [Version (since = "1.0")] - public Graphene.Matrix transpose (); - [Version (since = "1.2")] - public Graphene.Point3D unproject_point3d (Graphene.Matrix modelview, Graphene.Point3D point); - [Version (since = "1.0")] - public Graphene.Rect untransform_bounds (Graphene.Rect r, Graphene.Rect bounds); - [Version (since = "1.0")] - public bool untransform_point (Graphene.Point p, Graphene.Rect bounds, out Graphene.Point res); - } - [CCode (cheader_filename = "graphene-gobject.h", cname = "graphene_plane_t", type_id = "graphene_plane_get_type ()")] - [Version (since = "1.2")] - public struct Plane { - public float distance (Graphene.Point3D point); - public bool equal (Graphene.Plane b); - public float get_constant (); - public Graphene.Vec3 get_normal (); - public unowned Graphene.Plane? init (Graphene.Vec3? normal, float constant); - public unowned Graphene.Plane? init_from_plane (Graphene.Plane src); - public unowned Graphene.Plane? init_from_point (Graphene.Vec3 normal, Graphene.Point3D point); - public unowned Graphene.Plane? init_from_points (Graphene.Point3D a, Graphene.Point3D b, Graphene.Point3D c); - public unowned Graphene.Plane? init_from_vec4 (Graphene.Vec4 src); - public Graphene.Plane negate (); - public Graphene.Plane normalize (); - [Version (since = "1.10")] - public Graphene.Plane transform (Graphene.Matrix matrix, Graphene.Matrix? normal_matrix); - } - [CCode (cheader_filename = "graphene-gobject.h", cname = "graphene_point_t", type_id = "graphene_point_get_type ()")] - [Version (since = "1.0")] - public struct Point { - public float x; - public float y; - public float distance (Graphene.Point b, out float d_x, out float d_y); - public bool equal (Graphene.Point b); - public unowned Graphene.Point? init (float x, float y); - public unowned Graphene.Point? init_from_point (Graphene.Point src); - [Version (since = "1.4")] - public unowned Graphene.Point? init_from_vec2 (Graphene.Vec2 src); - public Graphene.Point interpolate (Graphene.Point b, double factor); - public bool near (Graphene.Point b, float epsilon); - [Version (since = "1.4")] - public Graphene.Vec2 to_vec2 (); - public static unowned Graphene.Point? zero (); - } - [CCode (cheader_filename = "graphene-gobject.h", cname = "graphene_point3d_t", lower_case_csuffix = "point3d", type_id = "graphene_point3d_get_type ()")] - [Version (since = "1.0")] - public struct Point3D { - public float x; - public float y; - public float z; - public Graphene.Point3D cross (Graphene.Point3D b); - [Version (since = "1.4")] - public float distance (Graphene.Point3D b, out Graphene.Vec3 delta); - public float dot (Graphene.Point3D b); - public bool equal (Graphene.Point3D b); - public unowned Graphene.Point3D? init (float x, float y, float z); - public unowned Graphene.Point3D? init_from_point (Graphene.Point3D src); - public unowned Graphene.Point3D? init_from_vec3 (Graphene.Vec3 v); - public Graphene.Point3D interpolate (Graphene.Point3D b, double factor); - public float length (); - public bool near (Graphene.Point3D b, float epsilon); - public Graphene.Point3D normalize (); - [Version (since = "1.4")] - public Graphene.Point3D normalize_viewport (Graphene.Rect viewport, float z_near, float z_far); - public Graphene.Point3D scale (float factor); - public Graphene.Vec3 to_vec3 (); - public static unowned Graphene.Point3D? zero (); - } - [CCode (cheader_filename = "graphene-gobject.h", cname = "graphene_quad_t", type_id = "graphene_quad_get_type ()")] - [Version (since = "1.0")] - public struct Quad { - public Graphene.Rect bounds (); - public bool contains (Graphene.Point p); - public unowned Graphene.Point? get_point (uint index_); - public unowned Graphene.Quad? init (Graphene.Point p1, Graphene.Point p2, Graphene.Point p3, Graphene.Point p4); - [Version (since = "1.2")] - public unowned Graphene.Quad? init_from_points ([CCode (array_length = false)] Graphene.Point points[4]); - public unowned Graphene.Quad? init_from_rect (Graphene.Rect r); - } - [CCode (cheader_filename = "graphene-gobject.h", cname = "graphene_quaternion_t", type_id = "graphene_quaternion_get_type ()")] - [Version (since = "1.0")] - public struct Quaternion { - [Version (since = "1.10")] - public Graphene.Quaternion add (Graphene.Quaternion b); - public float dot (Graphene.Quaternion b); - public bool equal (Graphene.Quaternion b); - public unowned Graphene.Quaternion? init (float x, float y, float z, float w); - public unowned Graphene.Quaternion? init_from_angle_vec3 (float angle, Graphene.Vec3 axis); - public unowned Graphene.Quaternion? init_from_angles (float deg_x, float deg_y, float deg_z); - [Version (since = "1.2")] - public unowned Graphene.Quaternion? init_from_euler (Graphene.Euler e); - public unowned Graphene.Quaternion? init_from_matrix (Graphene.Matrix m); - public unowned Graphene.Quaternion? init_from_quaternion (Graphene.Quaternion src); - public unowned Graphene.Quaternion? init_from_radians (float rad_x, float rad_y, float rad_z); - public unowned Graphene.Quaternion? init_from_vec4 (Graphene.Vec4 src); - public unowned Graphene.Quaternion? init_identity (); - public Graphene.Quaternion invert (); - [Version (since = "1.10")] - public Graphene.Quaternion multiply (Graphene.Quaternion b); - public Graphene.Quaternion normalize (); - [Version (since = "1.10")] - public Graphene.Quaternion scale (float factor); - public Graphene.Quaternion slerp (Graphene.Quaternion b, float factor); - public void to_angle_vec3 (out float angle, out Graphene.Vec3 axis); - [Version (since = "1.2")] - public void to_angles (out float deg_x, out float deg_y, out float deg_z); - public Graphene.Matrix to_matrix (); - [Version (since = "1.2")] - public void to_radians (out float rad_x, out float rad_y, out float rad_z); - public Graphene.Vec4 to_vec4 (); - } - [CCode (cheader_filename = "graphene-gobject.h", cname = "graphene_ray_t", type_id = "graphene_ray_get_type ()")] - [Version (since = "1.4")] - public struct Ray { - public bool equal (Graphene.Ray b); - public Graphene.Point3D get_closest_point_to_point (Graphene.Point3D p); - public Graphene.Vec3 get_direction (); - public float get_distance_to_plane (Graphene.Plane p); - public float get_distance_to_point (Graphene.Point3D p); - public Graphene.Point3D get_origin (); - public Graphene.Point3D get_position_at (float t); - public unowned Graphene.Ray? init (Graphene.Point3D? origin, Graphene.Vec3? direction); - public unowned Graphene.Ray? init_from_ray (Graphene.Ray src); - public unowned Graphene.Ray? init_from_vec3 (Graphene.Vec3? origin, Graphene.Vec3? direction); - [Version (since = "1.10")] - public Graphene.RayIntersectionKind intersect_box (Graphene.Box b, out float t_out); - [Version (since = "1.10")] - public Graphene.RayIntersectionKind intersect_sphere (Graphene.Sphere s, out float t_out); - [Version (since = "1.10")] - public Graphene.RayIntersectionKind intersect_triangle (Graphene.Triangle t, out float t_out); - [Version (since = "1.10")] - public bool intersects_box (Graphene.Box b); - [Version (since = "1.10")] - public bool intersects_sphere (Graphene.Sphere s); - [Version (since = "1.10")] - public bool intersects_triangle (Graphene.Triangle t); - } - [CCode (cheader_filename = "graphene-gobject.h", cname = "graphene_rect_t", type_id = "graphene_rect_get_type ()")] - [Version (since = "1.0")] - public struct Rect { - public Graphene.Point origin; - public Graphene.Size size; - public static Graphene.Rect? alloc (); - public bool contains_point (Graphene.Point p); - public bool contains_rect (Graphene.Rect b); - public bool equal (Graphene.Rect b); - [Version (since = "1.4")] - public Graphene.Rect expand (Graphene.Point p); - [Version (since = "1.10")] - public float get_area (); - public Graphene.Point get_bottom_left (); - public Graphene.Point get_bottom_right (); - public Graphene.Point get_center (); - public float get_height (); - public Graphene.Point get_top_left (); - public Graphene.Point get_top_right (); - [Version (since = "1.4")] - public void get_vertices ([CCode (array_length = false)] ref Graphene.Vec2 vertices[4]); - public float get_width (); - public float get_x (); - public float get_y (); - public unowned Graphene.Rect? init (float x, float y, float width, float height); - public unowned Graphene.Rect? init_from_rect (Graphene.Rect src); - public unowned Graphene.Rect? inset (float d_x, float d_y); - [Version (since = "1.4")] - public Graphene.Rect inset_r (float d_x, float d_y); - public Graphene.Rect interpolate (Graphene.Rect b, double factor); - public bool intersection (Graphene.Rect b, out Graphene.Rect res); - public unowned Graphene.Rect? normalize (); - [Version (since = "1.4")] - public Graphene.Rect normalize_r (); - public unowned Graphene.Rect? offset (float d_x, float d_y); - [Version (since = "1.4")] - public Graphene.Rect offset_r (float d_x, float d_y); - [Version (deprecated = true, deprecated_since = "1.10", since = "1.4")] - public Graphene.Rect round (); - [Version (since = "1.10")] - public Graphene.Rect round_extents (); - [Version (deprecated = true, deprecated_since = "1.4", since = "1.0")] - public unowned Graphene.Rect? round_to_pixel (); - [Version (since = "1.10")] - public Graphene.Rect scale (float s_h, float s_v); - public Graphene.Rect union (Graphene.Rect b); - [Version (since = "1.4")] - public static unowned Graphene.Rect? zero (); - } - [CCode (cheader_filename = "graphene-gobject.h", cname = "graphene_simd4f_t", has_type_id = false)] - public struct Simd4F { - } - [CCode (cheader_filename = "graphene-gobject.h", cname = "graphene_simd4x4f_t", has_type_id = false)] - public struct Simd4X4F { - } - [CCode (cheader_filename = "graphene-gobject.h", cname = "graphene_size_t", type_id = "graphene_size_get_type ()")] - [Version (since = "1.0")] - public struct Size { - public float width; - public float height; - public bool equal (Graphene.Size b); - public unowned Graphene.Size? init (float width, float height); - public unowned Graphene.Size? init_from_size (Graphene.Size src); - public Graphene.Size interpolate (Graphene.Size b, double factor); - public Graphene.Size scale (float factor); - public static unowned Graphene.Size? zero (); - } - [CCode (cheader_filename = "graphene-gobject.h", cname = "graphene_sphere_t", type_id = "graphene_sphere_get_type ()")] - [Version (since = "1.2")] - public struct Sphere { - public bool contains_point (Graphene.Point3D point); - public float distance (Graphene.Point3D point); - public bool equal (Graphene.Sphere b); - public Graphene.Box get_bounding_box (); - public Graphene.Point3D get_center (); - public float get_radius (); - public unowned Graphene.Sphere? init (Graphene.Point3D? center, float radius); - public unowned Graphene.Sphere? init_from_points ([CCode (array_length_cname = "n_points", array_length_pos = 0.5, array_length_type = "guint")] Graphene.Point3D[] points, Graphene.Point3D? center); - public unowned Graphene.Sphere? init_from_vectors ([CCode (array_length_cname = "n_vectors", array_length_pos = 0.5, array_length_type = "guint")] Graphene.Vec3[] vectors, Graphene.Point3D? center); - public bool is_empty (); - public Graphene.Sphere translate (Graphene.Point3D point); - } - [CCode (cheader_filename = "graphene-gobject.h", cname = "graphene_triangle_t", type_id = "graphene_triangle_get_type ()")] - [Version (since = "1.2")] - public struct Triangle { - public bool contains_point (Graphene.Point3D p); - public bool equal (Graphene.Triangle b); - public float get_area (); - public bool get_barycoords (Graphene.Point3D? p, out Graphene.Vec2 res); - public Graphene.Box get_bounding_box (); - public Graphene.Point3D get_midpoint (); - public Graphene.Vec3 get_normal (); - public Graphene.Plane get_plane (); - public void get_points (out Graphene.Point3D a, out Graphene.Point3D b, out Graphene.Point3D c); - [Version (since = "1.10")] - public bool get_uv (Graphene.Point3D? p, Graphene.Vec2 uv_a, Graphene.Vec2 uv_b, Graphene.Vec2 uv_c, out Graphene.Vec2 res); - public void get_vertices (out Graphene.Vec3 a, out Graphene.Vec3 b, out Graphene.Vec3 c); - [Version (since = "1.10")] - public unowned Graphene.Triangle? init_from_float ([CCode (array_length = false)] float a[3], [CCode (array_length = false)] float b[3], [CCode (array_length = false)] float c[3]); - public unowned Graphene.Triangle? init_from_point3d (Graphene.Point3D? a, Graphene.Point3D? b, Graphene.Point3D? c); - public unowned Graphene.Triangle? init_from_vec3 (Graphene.Vec3? a, Graphene.Vec3? b, Graphene.Vec3? c); - } - [CCode (cheader_filename = "graphene-gobject.h", cname = "graphene_vec2_t", type_id = "graphene_vec2_get_type ()")] - public struct Vec2 { - [Version (since = "1.0")] - public Graphene.Vec2 add (Graphene.Vec2 b); - [Version (since = "1.0")] - public Graphene.Vec2 divide (Graphene.Vec2 b); - [Version (since = "1.0")] - public float dot (Graphene.Vec2 b); - [Version (since = "1.2")] - public bool equal (Graphene.Vec2 v2); - [Version (since = "1.0")] - public float get_x (); - [Version (since = "1.0")] - public float get_y (); - [Version (since = "1.0")] - public unowned Graphene.Vec2? init (float x, float y); - [Version (since = "1.0")] - public unowned Graphene.Vec2? init_from_float ([CCode (array_length = false)] float src[2]); - [Version (since = "1.0")] - public unowned Graphene.Vec2? init_from_vec2 (Graphene.Vec2 src); - [Version (since = "1.10")] - public Graphene.Vec2 interpolate (Graphene.Vec2 v2, double factor); - [Version (since = "1.0")] - public float length (); - [Version (since = "1.0")] - public Graphene.Vec2 max (Graphene.Vec2 b); - [Version (since = "1.0")] - public Graphene.Vec2 min (Graphene.Vec2 b); - [Version (since = "1.0")] - public Graphene.Vec2 multiply (Graphene.Vec2 b); - [Version (since = "1.2")] - public bool near (Graphene.Vec2 v2, float epsilon); - [Version (since = "1.2")] - public Graphene.Vec2 negate (); - [Version (since = "1.0")] - public Graphene.Vec2 normalize (); - [Version (since = "1.0")] - public static unowned Graphene.Vec2? one (); - [Version (since = "1.2")] - public Graphene.Vec2 scale (float factor); - [Version (since = "1.0")] - public Graphene.Vec2 subtract (Graphene.Vec2 b); - [Version (since = "1.0")] - public void to_float ([CCode (array_length = false)] ref float dest[2]); - [Version (since = "1.0")] - public static unowned Graphene.Vec2? x_axis (); - [Version (since = "1.0")] - public static unowned Graphene.Vec2? y_axis (); - [Version (since = "1.0")] - public static unowned Graphene.Vec2? zero (); - } - [CCode (cheader_filename = "graphene-gobject.h", cname = "graphene_vec3_t", type_id = "graphene_vec3_get_type ()")] - public struct Vec3 { - [Version (since = "1.0")] - public Graphene.Vec3 add (Graphene.Vec3 b); - [Version (since = "1.0")] - public Graphene.Vec3 cross (Graphene.Vec3 b); - [Version (since = "1.0")] - public Graphene.Vec3 divide (Graphene.Vec3 b); - [Version (since = "1.0")] - public float dot (Graphene.Vec3 b); - [Version (since = "1.2")] - public bool equal (Graphene.Vec3 v2); - [Version (since = "1.0")] - public float get_x (); - [Version (since = "1.0")] - public Graphene.Vec2 get_xy (); - [Version (since = "1.0")] - public Graphene.Vec3 get_xy0 (); - [Version (since = "1.0")] - public Graphene.Vec4 get_xyz0 (); - [Version (since = "1.0")] - public Graphene.Vec4 get_xyz1 (); - [Version (since = "1.0")] - public Graphene.Vec4 get_xyzw (float w); - [Version (since = "1.0")] - public float get_y (); - [Version (since = "1.0")] - public float get_z (); - [Version (since = "1.0")] - public unowned Graphene.Vec3? init (float x, float y, float z); - [Version (since = "1.0")] - public unowned Graphene.Vec3? init_from_float ([CCode (array_length = false)] float src[3]); - [Version (since = "1.0")] - public unowned Graphene.Vec3? init_from_vec3 (Graphene.Vec3 src); - [Version (since = "1.10")] - public Graphene.Vec3 interpolate (Graphene.Vec3 v2, double factor); - [Version (since = "1.0")] - public float length (); - [Version (since = "1.0")] - public Graphene.Vec3 max (Graphene.Vec3 b); - [Version (since = "1.0")] - public Graphene.Vec3 min (Graphene.Vec3 b); - [Version (since = "1.0")] - public Graphene.Vec3 multiply (Graphene.Vec3 b); - [Version (since = "1.2")] - public bool near (Graphene.Vec3 v2, float epsilon); - [Version (since = "1.2")] - public Graphene.Vec3 negate (); - [Version (since = "1.0")] - public Graphene.Vec3 normalize (); - [Version (since = "1.0")] - public static unowned Graphene.Vec3? one (); - [Version (since = "1.2")] - public Graphene.Vec3 scale (float factor); - [Version (since = "1.0")] - public Graphene.Vec3 subtract (Graphene.Vec3 b); - [Version (since = "1.0")] - public void to_float ([CCode (array_length = false)] ref float dest[3]); - [Version (since = "1.0")] - public static unowned Graphene.Vec3? x_axis (); - [Version (since = "1.0")] - public static unowned Graphene.Vec3? y_axis (); - [Version (since = "1.0")] - public static unowned Graphene.Vec3? z_axis (); - [Version (since = "1.0")] - public static unowned Graphene.Vec3? zero (); - } - [CCode (cheader_filename = "graphene-gobject.h", cname = "graphene_vec4_t", type_id = "graphene_vec4_get_type ()")] - public struct Vec4 { - [Version (since = "1.0")] - public Graphene.Vec4 add (Graphene.Vec4 b); - [Version (since = "1.0")] - public Graphene.Vec4 divide (Graphene.Vec4 b); - [Version (since = "1.0")] - public float dot (Graphene.Vec4 b); - [Version (since = "1.2")] - public bool equal (Graphene.Vec4 v2); - [Version (since = "1.0")] - public float get_w (); - [Version (since = "1.0")] - public float get_x (); - [Version (since = "1.0")] - public Graphene.Vec2 get_xy (); - [Version (since = "1.0")] - public Graphene.Vec3 get_xyz (); - [Version (since = "1.0")] - public float get_y (); - [Version (since = "1.0")] - public float get_z (); - [Version (since = "1.0")] - public unowned Graphene.Vec4? init (float x, float y, float z, float w); - [Version (since = "1.0")] - public unowned Graphene.Vec4? init_from_float ([CCode (array_length = false)] float src[4]); - [Version (since = "1.0")] - public unowned Graphene.Vec4? init_from_vec2 (Graphene.Vec2 src, float z, float w); - [Version (since = "1.0")] - public unowned Graphene.Vec4? init_from_vec3 (Graphene.Vec3 src, float w); - [Version (since = "1.0")] - public unowned Graphene.Vec4? init_from_vec4 (Graphene.Vec4 src); - [Version (since = "1.10")] - public Graphene.Vec4 interpolate (Graphene.Vec4 v2, double factor); - [Version (since = "1.0")] - public float length (); - [Version (since = "1.0")] - public Graphene.Vec4 max (Graphene.Vec4 b); - [Version (since = "1.0")] - public Graphene.Vec4 min (Graphene.Vec4 b); - [Version (since = "1.0")] - public Graphene.Vec4 multiply (Graphene.Vec4 b); - [Version (since = "1.2")] - public bool near (Graphene.Vec4 v2, float epsilon); - [Version (since = "1.2")] - public Graphene.Vec4 negate (); - [Version (since = "1.0")] - public Graphene.Vec4 normalize (); - [Version (since = "1.0")] - public static unowned Graphene.Vec4? one (); - [Version (since = "1.2")] - public Graphene.Vec4 scale (float factor); - [Version (since = "1.0")] - public Graphene.Vec4 subtract (Graphene.Vec4 b); - [Version (since = "1.0")] - public void to_float ([CCode (array_length = false)] ref float dest[4]); - [Version (since = "1.0")] - public static unowned Graphene.Vec4? w_axis (); - [Version (since = "1.0")] - public static unowned Graphene.Vec4? x_axis (); - [Version (since = "1.0")] - public static unowned Graphene.Vec4? y_axis (); - [Version (since = "1.0")] - public static unowned Graphene.Vec4? z_axis (); - [Version (since = "1.0")] - public static unowned Graphene.Vec4? zero (); - } - [CCode (cheader_filename = "graphene-gobject.h", cname = "graphene_euler_order_t", cprefix = "GRAPHENE_EULER_ORDER_", has_type_id = false)] - [Version (since = "1.2")] - public enum EulerOrder { - DEFAULT, - XYZ, - YZX, - ZXY, - XZY, - YXZ, - ZYX, - SXYZ, - SXYX, - SXZY, - SXZX, - SYZX, - SYZY, - SYXZ, - SYXY, - SZXY, - SZXZ, - SZYX, - SZYZ, - RZYX, - RXYX, - RYZX, - RXZX, - RXZY, - RYZY, - RZXY, - RYXY, - RYXZ, - RZXZ, - RXYZ, - RZYZ - } - [CCode (cheader_filename = "graphene-gobject.h", cname = "graphene_ray_intersection_kind_t", cprefix = "GRAPHENE_RAY_INTERSECTION_KIND_", has_type_id = false)] - [Version (since = "1.10")] - public enum RayIntersectionKind { - NONE, - ENTER, - LEAVE - } - [CCode (cheader_filename = "graphene-gobject.h", cname = "GRAPHENE_HAS_GCC")] - public const int HAS_GCC; - [CCode (cheader_filename = "graphene-gobject.h", cname = "GRAPHENE_HAS_SCALAR")] - public const int HAS_SCALAR; - [CCode (cheader_filename = "graphene-gobject.h", cname = "GRAPHENE_HAS_SSE")] - public const int HAS_SSE; - [CCode (cheader_filename = "graphene-gobject.h", cname = "GRAPHENE_PI")] - public const double PI; - [CCode (cheader_filename = "graphene-gobject.h", cname = "GRAPHENE_PI_2")] - public const double PI_2; - [CCode (cheader_filename = "graphene-gobject.h", cname = "GRAPHENE_SIMD_S")] - public const string SIMD_S; - [CCode (cheader_filename = "graphene-gobject.h", cname = "GRAPHENE_VEC2_LEN")] - [Version (since = "1.0")] - public const int VEC2_LEN; - [CCode (cheader_filename = "graphene-gobject.h", cname = "GRAPHENE_VEC3_LEN")] - [Version (since = "1.0")] - public const int VEC3_LEN; - [CCode (cheader_filename = "graphene-gobject.h", cname = "GRAPHENE_VEC4_LEN")] - [Version (since = "1.0")] - public const int VEC4_LEN; - [CCode (cheader_filename = "graphene-gobject.h", cname = "false")] - public const int @false; - [CCode (cheader_filename = "graphene-gobject.h", cname = "true")] - public const int @true; -} diff --git a/vapi/gsettings-desktop-schemas.vapi b/vapi/gsettings-desktop-schemas.vapi deleted file mode 100644 index 912a9c8f2..000000000 --- a/vapi/gsettings-desktop-schemas.vapi +++ /dev/null @@ -1,194 +0,0 @@ -namespace GDesktop -{ - - [CCode (cheader_filename = "gsettings-desktop-schemas/gdesktop-enums.h", cprefix = "G_DESKTOP_PROXY_")] - public enum ProxyMode - { - NONE, - MANUAL, - AUTO - } - - [CCode (cheader_filename = "gsettings-desktop-schemas/gdesktop-enums.h", cprefix = "G_DESKTOP_TOOLBAR_")] - public enum ToolbarStyle - { - BOTH, - BOTH_HORIZ, - ICONS, - TEXT - } - - [CCode (cheader_filename = "gsettings-desktop-schemas/gdesktop-enums.h", cprefix = "G_DESKTOP_TOOLBAR_ICON_SIZE_")] - public enum ToolbarIconSize - { - SMALL, - LARGE - } - - [CCode (cheader_filename = "gsettings-desktop-schemas/gdesktop-enums.h", cprefix = "G_DESKTOP_BACKGROUND_STYLE_")] - public enum BackgroundStyle - { - NONE, - WALLPAPER, - CENTERED, - SCALED, - STRETCHED, - ZOOM, - SPANNED - } - - [CCode (cheader_filename = "gsettings-desktop-schemas/gdesktop-enums.h", cprefix = "G_DESKTOP_BACKGROUND_SHADING_")] - public enum BackgroundShading - { - SOLID, - VERTICAL, - HORIZONTAL - } - - [CCode (cheader_filename = "gsettings-desktop-schemas/gdesktop-enums.h", cprefix = "G_DESKTOP_MOUSE_DWELL_MODE_")] - public enum MouseDwellMode - { - WINDOW, - GESTURE - } - - [CCode (cheader_filename = "gsettings-desktop-schemas/gdesktop-enums.h", cprefix = "G_DESKTOP_MOUSE_DWELL_DIRECTION_")] - public enum MouseDwellDirection - { - LEFT, - RIGHT, - UP, - DOWN - } - - [CCode (cheader_filename = "gsettings-desktop-schemas/gdesktop-enums.h", cprefix = "G_DESKTOP_CLOCK_FORMAT_")] - public enum ClockFormat - { - 24H, - 12H - } - - [CCode (cheader_filename = "gsettings-desktop-schemas/gdesktop-enums.h", cprefix = "G_DESKTOP_SCREENSAVER_MODE_")] - public enum ScreensaverMode - { - BLANK_ONLY, - RANDOM, - SINGLE - } - - [CCode (cheader_filename = "gsettings-desktop-schemas/gdesktop-enums.h", cprefix = "G_DESKTOP_MAGNIFIER_MOUSE_TRACKING_MODE_")] - public enum MagnifierMouseTrackingMode - { - NONE, - CENTERED, - PROPORTIONAL, - PUSH - } - - [CCode (cheader_filename = "gsettings-desktop-schemas/gdesktop-enums.h", cprefix = "G_DESKTOP_MAGNIFIER_FOCUS_TRACKING_MODE_")] - public enum MagnifierFocusTrackingMode - { - NONE, - CENTERED, - PROPORTIONAL, - PUSH - } - - [CCode (cheader_filename = "gsettings-desktop-schemas/gdesktop-enums.h", cprefix = "G_DESKTOP_MAGNIFIER_CARET_TRACKING_MODE_")] - public enum MagnifierCaretTrackingMode - { - NONE, - CENTERED, - PROPORTIONAL, - PUSH - } - - [CCode (cheader_filename = "gsettings-desktop-schemas/gdesktop-enums.h", cprefix = "G_DESKTOP_MAGNIFIER_SCREEN_POSITION_")] - public enum MagnifierScreenPosition - { - NONE, - FULL_SCREEN, - TOP_HALF, - BOTTOM_HALF, - LEFT_HALF, - RIGHT_HALF, - } - - [CCode (cheader_filename = "gsettings-desktop-schemas/gdesktop-enums.h", cprefix = "G_DESKTOP_TITLEBAR_ACTION_")] - public enum TitlebarAction - { - TOGGLE_SHADE, - TOGGLE_MAXIMIZE, - TOGGLE_MAXIMIZE_HORIZONTALLY, - TOGGLE_MAXIMIZE_VERTICALLY, - MINIMIZE, - NONE, - LOWER, - MENU, - } - - [CCode (cheader_filename = "gsettings-desktop-schemas/gdesktop-enums.h", cprefix = "G_DESKTOP_FOCUS_MODE_")] - public enum FocusMode - { - CLICK, - SLOPPY, - MOUSE, - } - - [CCode (cheader_filename = "gsettings-desktop-schemas/gdesktop-enums.h", cprefix = "G_DESKTOP_FOCUS_NEW_WINDOWS_")] - public enum FocusNewWindows - { - SMART, - STRICT, - } - - [CCode (cheader_filename = "gsettings-desktop-schemas/gdesktop-enums.h", cprefix = "G_DESKTOP_VISUAL_BELL_")] - public enum VisualBellType - { - FULLSCREEN_FLASH, - FRAME_FLASH, - } - - [CCode (cheader_filename = "gsettings-desktop-schemas/gdesktop-enums.h", cprefix = "G_DESKTOP_LOCATION_ACCURACY_LEVEL_")] - public enum LocationAccuracyLevel - { - COUNTRY, - CITY, - NEIGHBORHOOD, - STREET, - EXACT - } - - [CCode (cheader_filename = "gsettings-desktop-schemas/gdesktop-enums.h", cprefix = "G_DESKTOP_TOUCHPAD_SCROLL_METHOD_")] - public enum TouchpadScrollMethod - { - DISABLED, - EDGE_SCROLLING, - TWO_FINGER_SCROLLING - } - - [CCode (cheader_filename = "gsettings-desktop-schemas/gdesktop-enums.h", cprefix = "G_DESKTOP_TOUCHPAD_HANDEDNESS_")] - public enum TouchpadHandedness - { - RIGHT, - LEFT, - MOUSE - } - - [CCode (cheader_filename = "gsettings-desktop-schemas/gdesktop-enums.h", cprefix = "G_DESKTOP_TOUCHPAD_CLICK_METHOD_")] - public enum TouchpadClickMethod - { - DEFAULT, - NONE, - AREAS, - FINGERS - } - - [CCode (cheader_filename = "gsettings-desktop-schemas/gdesktop-enums.h", cprefix = "G_DESKTOP_DEVICE_SEND_EVENTS_")] - public enum DeviceSendEvents - { - ENABLED, - DISABLED, - DISABLED_ON_EXTERNAL_MOUSE - } -}