Expand description
Rust GIO bindings
Rust bindings and wrappers for GIO, part of gtk-rs-core.
GIO 2.48 is the lowest supported version for the underlying library.
Minimum supported Rust version
Currently, the minimum supported Rust version is 1.56.0.
Documentation
Using
We recommend using crates from crates.io, as demonstrated here.
If you want to track the bleeding edge, use the git dependency instead:
[dependencies]
gio = { git = "https://github.com/gtk-rs/gtk-rs-core.git", package = "gio" }
Avoid mixing versioned and git crates like this:
# This will not compile
[dependencies]
gio = "0.13"
gio = { git = "https://github.com/gtk-rs/gtk-rs-core.git", package = "gio" }
See Also
License
gio is available under the MIT License, please refer to it.
Re-exports
pub use ffi;pub use glib;
Modules
- Traits and essential types intended for blanket imports.
Macros
- Include gresources generated with compile_resources and register with glib.
pathis relative toOUTDIR.
Structs
Actionrepresents a single named action.ActionGrouprepresents a group of actions. Actions can be used to expose functionality in a structured way, either from one part of a program to another, or to the outside world. Action groups are often used together with aMenuModelthat provides additional representation data for displaying the actions to the user, e.g. in a menu.- The GActionMap interface is implemented by
ActionGroupimplementations that operate by containing a number of namedActioninstances, such asSimpleActionGroup. AppInfoandAppLaunchContextare used for describing and launching applications installed on the system.- Flags used when creating a
AppInfo. AppInfoMonitoris a very simple object used for monitoring the app info database for changes (ie: newly installed or removed applications).- Integrating the launch with the launching application. This is used to handle for instance startup notification and launching the new application on the same screen as the launching window.
- A
Applicationis the foundation of an application. It wraps some low-level platform-specific services and is intended to act as the foundation for higher-level application classes such asGtkApplicationorMxApplication. In general, you should not use this class outside of a higher level framework. ApplicationCommandLinerepresents a command-line invocation of an application. It is created byApplicationand emitted in thesignal::Application::command-linesignal and virtual function.- Flags used to define the behaviour of a
Application. AskPasswordFlagsare used to request specific information from the user, or to notify the user of their choices in an authentication situation.- Provides a base class for implementing asynchronous function results.
- Buffered input stream implements
FilterInputStreamand provides for buffered reads. - Buffered output stream implements
FilterOutputStreamand provides for buffered writes. - Flags used in
g_bus_own_name(). - Flags used in
g_bus_watch_name(). BytesIconspecifies an image held in memory in a common format (usually png) to be used as icon.- GCancellable is a thread-safe operation cancellation stack used throughout GIO to allow for cancellation of synchronous and asynchronous operations.
CharsetConverteris an implementation ofConverterbased on GIConv.Converteris implemented by objects that convert binary data in various ways. The conversion can be stateful and may fail at any place.- Flags used when calling a
ConverterExtManual::convert(). - Converter input stream implements
InputStreamand allows conversion of data of various types during reading. - Converter output stream implements
OutputStreamand allows conversion of data of various types during reading. - The
Credentialstype is a reference-counted wrapper for native credentials. This information is typically used for identifying, authenticating and authorizing other processes. DBusActionGroupis an implementation of theActionGroupinterface that can be used as a proxy for an action group that is exported over D-Bus withDBusConnection::export_action_group().- Information about an argument for a method or a signal.
- The
DBusAuthObservertype provides a mechanism for participating in how aDBusServer(or aDBusConnection) authenticates remote peers. Simply instantiate aDBusAuthObserverand connect to the signals you are interested in. Note that new signals may be added in the future - Flags used in
DBusConnection::call()and similar APIs. - Capabilities negotiated with the remote peer.
- The
DBusConnectiontype is used for D-Bus connections to remote peers such as a message buses. It is a low-level API that offers a lot of flexibility. For instance, it lets you establish a connection over any transport that can by represented as aIOStream. - Flags used when creating a new
DBusConnection. - The
DBusInterfacetype is the base type for D-Bus interfaces both on the service side (seeDBusInterfaceSkeleton) and client side (seeDBusProxy). - Information about a D-Bus interface.
- Abstract base class for D-Bus interfaces on the service side.
- Flags describing the behavior of a
DBusInterfaceSkeletoninstance. DBusMenuModelis an implementation ofMenuModelthat can be used as a proxy for a menu model that is exported over D-Bus withDBusConnection::export_menu_model().- A type for representing D-Bus messages that can be sent or received on a
DBusConnection. - Message flags used in
DBusMessage. - Information about a method on an D-Bus interface.
- Instances of the
DBusMethodInvocationclass are used when handling D-Bus method calls. It provides a way to asynchronously return results and errors. - Information about nodes in a remote object hierarchy.
- The
DBusObjecttype is the base type for D-Bus objects on both the service side (seeGDBusObjectSkeleton) and the client side (seeGDBusObjectProxy). It is essentially just a container of interfaces. - Information about a D-Bus property on a D-Bus interface.
- Flags used when constructing an instance of a
DBusProxyderived class. - Flags used when sending
GDBusMessageson aDBusConnection. DBusServeris a helper for listening to and accepting D-Bus connections. This can be used to create a new D-Bus server, allowing two peers to use the D-Bus protocol for their own specialized communication. A server instance provided in this way will not perform message routing or implement the org.freedesktop.DBus interface.- Flags used when creating a
DBusServer. - Flags used when subscribing to signals via
DBusConnection::signal_subscribe(). - Information about a signal on a D-Bus interface.
- Data input stream implements
InputStreamand includes functions for reading structured data directly from a binary input stream. - Data output stream implements
OutputStreamand includes functions for writing data directly to an output stream. - DebugController
v2_72DebugControlleris an interface to expose control of debugging features and debug output. - DebugControllerDBus
v2_72DebugControllerDBusis an implementation ofDebugControllerwhich exposes debug settings as a D-Bus object. - DesktopAppInfoNon-Windows and non-macOS
DesktopAppInfois an implementation ofAppInfobased on desktop files. Drive- this represent a piece of hardware connected to the machine. It’s generally only created for removable hardware or hardware with removable media.- Flags used when starting a drive.
Emblemis an implementation ofIconthat supports having an emblem, which is an icon with additional properties. It can than be added to aEmblemedIcon.EmblemedIconis an implementation ofIconthat supports adding an emblem to an icon. Adding multiple emblems to an icon is ensured viaEmblemedIconExt::add_emblem().Fileis a high level abstraction for manipulating files on a virtual file system.GFilesare lightweight, immutable objects that do no I/O upon creation. It is necessary to understand thatFileobjects do not represent files, merely an identifier for a file. All file content I/O is implemented as streaming operations (seeInputStreamandOutputStream).- Information about a specific attribute.
- Flags specifying the behaviour of an attribute.
- Acts as a lightweight registry for possible valid file attributes. The registry stores Key-Value pair formats as
GFileAttributeInfos. - Determines if a string matches a file attribute.
- Flags used when copying or moving files.
- Flags used when an operation may create a file.
FileEnumeratorallows you to operate on a set ofGFiles, returning aFileInfostructure for each file enumerated (e.g.FileExt::enumerate_children()will return aFileEnumeratorfor each of the children within a directory).- GFileIOStream provides io streams that both read and write to the same file handle.
FileIconspecifies an icon by pointing to an image file to be used as icon.- Functionality for manipulating basic metadata for files.
FileInfoimplements methods for getting information that all files should contain, and allows for manipulation of extended attributes. - GFileInputStream provides input streams that take their content from a file.
- Flags that can be used with
FileExtManual::measure_disk_usage(). - Monitors a file or directory for changes.
- Flags used to set what a
FileMonitorwill watch for. - GFileOutputStream provides output streams that write their content to a file.
- Flags used when querying a
FileInfo. - Completes partial file and directory names given a partial string by looking in the file system for clues. Can return a list of possible completion strings for widget implementations.
- Base class for input stream implementations that perform some kind of filtering operation on a base stream. Typical examples of filtering operations are character set conversion, compression and byte order flipping.
- Base class for output stream implementations that perform some kind of filtering operation on a base stream. Typical examples of filtering operations are character set conversion, compression and byte order flipping.
- The implementation of an
IOExtensionPoint.IOExtensionis an opaque data structure and can only be accessed using the following functions. - An extension point provides a mechanism to extend the functionality of a library or application. Each extension point is identified by a name, and it may optionally require that any implementation must be of a certain type.
IOExtensionPointis an opaque data structure and can only be accessed using the following functions. - Builder for extension points.
- GIOStream represents an object that has both read and write streams. Generally the two streams act as separate input and output streams, but they share some common resources and state. For instance, for seekable streams, both streams may use the same position.
- GIOStreamSpliceFlags determine how streams should be spliced.
Iconis a very minimal interface for icons. It provides functions for checking the equality of two icons, hashing of icons and serializing an icon to and from strings.InetAddressrepresents an IPv4 or IPv6 internet address. UseResolverExt::lookup_by_name()orResolverExt::lookup_by_name_async()to look up theInetAddressfor a hostname. UseResolverExt::lookup_by_address()orResolverExt::lookup_by_address_async()to look up the hostname for aInetAddress.InetAddressMaskrepresents a range of IPv4 or IPv6 addresses described by a base address and a length indicating how many bits of the base address are relevant for matching purposes. These are often given in string form. Eg, “10.0.0.0/8”, or “fe80::/10”.- An IPv4 or IPv6 socket address; that is, the combination of a
InetAddressand a port number. Initableis implemented by objects that can fail during initialization. If an object implements this interface then it must be initialized as the first thing after construction, either viaInitableExt::init()orAsyncInitableExt::init_async()(the latter is only available if it also implementsAsyncInitable).InputStreamhas functions to read from a stream (InputStreamExtManual::read()), to close a stream (InputStreamExt::close()) and to skip some content (InputStreamExt::skip()).ListModelis an interface that represents a mutable list ofGObjects. Its main intention is as a model for various widgets in user interfaces, such as list views, but it can also be used as a convenient method of returning lists of data, with support for updates.- Extends the
Iconinterface and adds the ability to load icons from streams. LocalTaskprovides idiomatic access to gio’sGTaskAPI, for instance by being generic over their value type, while not completely departing from the underlying C API.LocalTaskdoes not require its value to beSendandSyncand thus is useful to to implement gio style asynchronous tasks that run in the glib main loop. If you need to run tasks in threads see theTasktype.MemoryInputStreamis a class for using arbitrary memory chunks as input for GIO streaming input operations.- MemoryMonitor
v2_64MemoryMonitorwill monitor system memory and suggest to the application when to free memory so as to leave more room for other applications. It is implemented on Linux using the Low Memory Monitor (API documentation). MemoryOutputStreamis a class for using arbitrary memory chunks as output for GIO streaming output operations.MenuAttributeIteris an opaque structure type. You must access it using the functions below.MenuItemis an opaque structure type. You must access it using the functions below.MenuLinkIteris an opaque structure type. You must access it using the functions below.MenuModelrepresents the contents of a menu – an ordered list of menu items. The items are associated with actions, which can be activated through them. Items can be grouped in sections, and may have submenus associated with them. Both items and sections usually have some representation data, such as labels or icons. The type of the associated action (ie whether it is stateful, and what kind of state it has) can influence the representation of the item.- Flags used when mounting a mount.
MountOperationprovides a mechanism for interacting with the user. It can be used for authenticating mountable operations, such as loop mounting files, hard drive partitions or server locations. It can also be used to ask the user questions or show a list of applications preventing unmount or eject operations from completing.- Flags used when an unmounting a mount.
NetworkAddressprovides an easy way to resolve a hostname and then attempt to connect to that host, handling the possibility of multiple IP addresses and multiple address families.NetworkMonitorprovides an easy-to-use cross-platform API for monitoring network connectivity. On Linux, the available implementations are based on the kernel’s netlink interface and on NetworkManager.- Like
NetworkAddressdoes with hostnames,NetworkServiceprovides an easy way to resolve a SRV record, and then attempt to connect to one of the hosts that implements that service, handling service priority/weighting, multiple IP addresses, and multiple address families. Notificationis a mechanism for creating a notification to be shown to the user – typically as a pop-up notification presented by the desktop environment shell.OutputStreamhas functions to write to a stream (OutputStreamExt::write()), to close a stream (OutputStreamExt::close()) and to flush pending writes (OutputStreamExt::flush()).- GOutputStreamSpliceFlags determine how streams should be spliced.
- A
Permissionrepresents the status of the caller’s permission to perform a certain action. PollableInputStreamis implemented byGInputStreamsthat can be polled for readiness to read. This can be used when interfacing with a non-GIO API that expects UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.PollableOutputStreamis implemented byGOutputStreamsthat can be polled for readiness to write. This can be used when interfacing with a non-GIO API that expects UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.- PowerProfileMonitor
v2_70PowerProfileMonitormakes it possible for applications as well as OS components to monitor system power profiles and act upon them. It currently only exports whether the system is in “Power Saver” mode (known as “Low Power” mode on some systems). - A
PropertyActionis a way to get aActionwith a state value reflecting and controlling the value of aglib::Objectproperty. - A
Proxyhandles connecting to a remote host via a given type of proxy server. It is implemented by the ‘gio-proxy’ extension point. The extensions are named after their proxy protocol name. As an example, a SOCKS5 proxy implementation can be retrieved with the name ‘socks5’ using the functionIOExtensionPoint::extension_by_name(). - Support for proxied
InetSocketAddress. ProxyResolverprovides synchronous and asynchronous network proxy resolution.ProxyResolveris used withinSocketClientthrough the methodSocketConnectableExt::proxy_enumerate().- The GRemoteActionGroup interface is implemented by
ActionGroupinstances that either transmit action invocations to other processes or receive action invocations in the local process from other processes. Resolverprovides cancellable synchronous and asynchronous DNS resolution, for hostnames (ResolverExt::lookup_by_address(),ResolverExt::lookup_by_name()and their async variants) and SRV (service) records (ResolverExt::lookup_service()).- Flags to modify lookup behavior.
- Applications and libraries often contain binary or textual data that is really part of the application, rather than user data. For instance
GtkBuilder.ui files, splashscreen images, GMenu markup XML, CSS files, icons, etc. These are often shipped as files in$datadir/appname, or manually included as literal strings in the code. - GResourceLookupFlags determine how resource path lookups are handled.
Seekableis implemented by streams (implementations ofInputStreamorOutputStream) that support seeking.- The
Settingsclass provides a convenient API for storing and retrieving application settings. - The
SettingsBackendinterface defines a generic interface for non-strictly-typed data that is stored in a hierarchy. To implement an alternative storage backend forSettings, you need to implement theSettingsBackendinterface and then make it implement the extension pointSETTINGS_BACKEND_EXTENSION_POINT_NAME. - Flags used when creating a binding. These flags determine in which direction the binding works. The default is to synchronize in both directions.
- The
SettingsSchemaSourceandSettingsSchemaAPIs provide a mechanism for advanced control over the loading of schemas and a mechanism for introspecting their content. SettingsSchemaKeyis an opaque data structure and can only be accessed using the following functions.- This is an opaque structure type. You may not access it directly.
- A
SimpleActionis the obvious simple implementation of theActioninterface. This is the easiest way to create an action for purposes of adding it to aSimpleActionGroup. SimpleActionGroupis a hash table filled withActionobjects, implementing theActionGroupandActionMapinterfaces.- GSimpleIOStream creates a
IOStreamfrom an arbitraryInputStreamandOutputStream. This allows any pair of input and output streams to be used withIOStreammethods. SimplePermissionis a trivial implementation ofPermissionthat represents a permission that is either always or never allowed. The value is given at construction and doesn’t change.SimpleProxyResolveris a simpleProxyResolverimplementation that handles a single default proxy, multiple URI-scheme-specific proxies, and a list of hosts that proxies should not be used for.- A
Socketis a low-level networking primitive. It is a more or less direct mapping of the BSD socket API in a portable GObject based API. It supports both the UNIX socket implementations and winsock2 on Windows. SocketAddressis the equivalent of struct sockaddr in the BSD sockets API. This is an abstract class; useInetSocketAddressfor internet sockets, orUnixSocketAddressfor UNIX domain sockets.SocketAddressEnumeratoris an enumerator type forSocketAddressinstances. It is returned by enumeration functions such asSocketConnectableExt::enumerate(), which returns aSocketAddressEnumeratorto list eachSocketAddresswhich could be used to connect to thatSocketConnectable.SocketClientis a lightweight high-level utility class for connecting to a network host using a connection oriented socket type.- Objects that describe one or more potential socket endpoints implement
SocketConnectable. Callers can then useSocketConnectableExt::enumerate()to get aSocketAddressEnumeratorto try out each socket address in turn until one succeeds, as shown in the sample code below. SocketConnectionis aIOStreamfor a connected socket. They can be created either bySocketClientwhen connecting to a host, or bySocketListenerwhen accepting a new client.- A
SocketListeneris an object that keeps track of a set of server sockets and helps you accept sockets from any of the socket, either sync or async. - A
SocketServiceis an object that represents a service that is provided to the network or over local sockets. When a new connection is made to the service thesignal::SocketService::incomingsignal is emitted. - SRV (service) records are used by some network protocols to provide service-specific aliasing and load-balancing. For example, XMPP (Jabber) uses SRV records to locate the XMPP server for a domain; rather than connecting directly to “example.com” or assuming a specific server hostname like “xmpp.example.com”, an XMPP client would look up the “xmpp-client” SRV record for “example.com”, and then connect to whatever host was pointed to by that record.
Subprocessallows the creation of and interaction with child processes.- Flags to define the behaviour of a
Subprocess. - This class contains a set of options for launching child processes, such as where its standard input and output will be directed, the argument list, the environment, and more.
Taskprovides idiomatic access to gio’sGTaskAPI, for instance by being generic over their value type, while not completely departing from the underlying C API.TaskisSendandSyncand requires its value to also beSendandSync, thus is useful to to implement gio style asynchronous tasks that run in threads. If you need to only run tasks in glib main loop see theLocalTasktype.- This is the subclass of
SocketConnectionthat is created for TCP/IP sockets. ThemedIconis an implementation ofIconthat supports icon themes.ThemedIconcontains a list of all of the icons present in an icon theme, so that icons can be looked up quickly.ThemedIcondoes not provide actual pixmaps for icons, just the icon names. Ideally something likegtk_icon_theme_choose_icon()should be used to resolve the list of names so that fallback icons work nicely with themes that inherit other themes.- A
ThreadedSocketServiceis a simple subclass ofSocketServicethat handles incoming connections by creating a worker thread and dispatching the connection to it by emitting thesignal::ThreadedSocketService::runsignal in the new thread. - TLS (Transport Layer Security, aka SSL) and DTLS backend.
- A certificate used for TLS authentication and encryption. This can represent either a certificate only (eg, the certificate received by a client from a server), or the combination of a certificate and a private key (which is needed when acting as a
TlsServerConnection). - A set of flags describing TLS certification validation. This can be used to describe why a particular certificate was rejected (for example, in
signal::TlsConnection::accept-certificate). TlsClientConnectionis the client-side subclass ofTlsConnection, representing a client-side TLS connection.TlsConnectionis the base TLS connection class type, which wraps aIOStreamand provides TLS encryption on top of it. Its subclasses,TlsClientConnectionandTlsServerConnection, implement client-side and server-side TLS, respectively.TlsDatabaseis used to look up certificates and other information from a certificate or key store. It is an abstract base class which TLS library specific subtypes override.- Flags for
TlsDatabaseExt::verify_chain(). TlsFileDatabaseis implemented byTlsDatabaseobjects which load their certificate information from a file. It is an interface which TLS library specific subtypes implement.TlsInteractionprovides a mechanism for the TLS connection and database code to interact with the user. It can be used to ask the user for passwords.- Holds a password used in TLS.
- Various flags for the password.
TlsServerConnectionis the server-side subclass ofTlsConnection, representing a server-side TLS connection.- UnixFDListUnixA
UnixFDListcontains a list of file descriptors. It owns the file descriptors that it contains, closing them when finalized. - UnixInputStreamUnix
UnixInputStreamimplementsInputStreamfor reading from a UNIX file descriptor, including asynchronous operations. (If the file descriptor refers to a socket or pipe, this will usepoll()to do asynchronous I/O. If it refers to a regular file, it will fall back to doing asynchronous I/O in another thread.) - UnixMountEntryUnix and
v2_54Defines a Unix mount entry (e.g.<filename>/media/cdrom</filename>). This corresponds roughly to a mtab entry. - UnixMountPointUnix and
v2_54Defines a Unix mount point (e.g.<filename>/dev</filename>). This corresponds roughly to a fstab entry. - UnixOutputStreamUnix
UnixOutputStreamimplementsOutputStreamfor writing to a UNIX file descriptor, including asynchronous operations. (If the file descriptor refers to a socket or pipe, this will usepoll()to do asynchronous I/O. If it refers to a regular file, it will fall back to doing asynchronous I/O in another thread.) - Support for UNIX-domain (also known as local) sockets.
- Entry point for using GIO functionality.
VolumeMonitoris for listing the user interesting devices and volumes on the computer. In other words, what a file selector or file manager would show in a sidebar.ZlibCompressoris an implementation ofConverterthat compresses data using zlib.ZlibDecompressoris an implementation ofConverterthat decompresses data compressed with zlib.
Enums
- An enumeration for well-known message buses.
- Results returned from
ConverterExtManual::convert(). - Enumeration describing different kinds of native credential types.
- Enumeration used to describe the byte order of a D-Bus message.
- Header fields used in
DBusMessage. - Message types used in
DBusMessage. DataStreamByteOrderis used to ensure proper endianness of streaming data sources across various machine architectures.DataStreamNewlineTypeis used when checking for or setting the line endings for a given file.- Enumeration describing how a drive can be started/stopped.
- GEmblemOrigin is used to add information about the origin of the emblem to
Emblem. - Used by
FileExt::set_attributes_from_info()when setting file attributes. - The data types for file attributes.
- Specifies what type of event a monitor event is.
- Indicates the file’s on-disk type.
- Error codes returned by GIO functions.
- Memory availability warning levels.
MountOperationResultis returned as a result when a request for information is send by the mounting operation.- The host’s network connectivity state, as reported by
NetworkMonitor. - Priority levels for
GNotifications. PasswordSaveis used to indicate the lifespan of a saved password.- The type of record that
ResolverExt::lookup_records()orResolverExt::lookup_records_async()should retrieve. The records are returned as lists ofglib::Varianttuples. Each record type has different values in the variant tuples returned. - Describes an event occurring on a
SocketClient. See thesignal::SocketClient::eventsignal for more details. - The protocol family of a
SocketAddress. (These values are identical to the system definesAF_INET,AF_INET6andAF_UNIX, if available.) - Describes an event occurring on a
SocketListener. See thesignal::SocketListener::eventsignal for more details. - A protocol identifier is specified when creating a
Socket, which is a family/type specific identifier, where 0 means the default protocol for the particular family/type. - Flags used when creating a
Socket. Some protocols may not implement all the socket types. - The client authentication mode for a
TlsServerConnection. - The type of TLS channel binding data to retrieve from
TlsConnectionorGDtlsConnection, as documented by RFC 5929. Thetls-unique-for-telnetbinding type is not currently implemented. - An error code used with
G_TLS_ERRORin aglib::Errorreturned from a TLS-related routine. TlsInteractionResultis returned by various functions inTlsInteractionwhen finishing an interaction request.- TlsProtocolVersion
v2_70The TLS or DTLS protocol version used by aTlsConnectionorGDtlsConnection. The integer values of these versions are sequential to ensure newer known protocol versions compare greater than older known versions. Any known DTLS protocol version will compare greater than any SSL or TLS protocol version. The protocol version may beUnknownif the TLS backend supports a newer protocol version that GLib does not yet know about. This means that it’s possible for an unknown DTLS protocol version to compare less than the TLS protocol versions. - When to allow rehandshaking. See
TlsConnectionExt::set_rehandshake_mode(). - The type of name used by a
UnixSocketAddress.Pathindicates a traditional unix domain socket bound to a filesystem path.Anonymousindicates a socket not bound to any name (eg, a client-side socket, or a socket created withsocketpair()). - Used to select the type of data format to use for
ZlibDecompressorandZlibCompressor.
Statics
- Extension point for debug control functionality. See [Extending GIO][extending-gio].
- The string used to obtain a Unix device path with
DriveExt::identifier(). - A key in the “access” namespace for checking deletion privileges.
- A key in the “access” namespace for getting execution privileges.
- A key in the “access” namespace for getting read privileges.
- A key in the “access” namespace for checking renaming privileges.
- A key in the “access” namespace for checking trashing privileges.
- A key in the “access” namespace for getting write privileges.
- A key in the “dos” namespace for checking if the file’s archive flag is set.
- A key in the “dos” namespace for checking if the file is a NTFS mount point (a volume mount or a junction point).
- A key in the “dos” namespace for checking if the file’s backup flag is set.
- A key in the “dos” namespace for getting the file NTFS reparse tag.
- A key in the “etag” namespace for getting the value of the file’s entity tag.
- A key in the “filesystem” namespace for getting the number of bytes of free space left on the file system.
- A key in the “filesystem” namespace for checking if the file system is read only.
- A key in the “filesystem” namespace for checking if the file system is remote.
- A key in the “filesystem” namespace for getting the total size (in bytes) of the file system, used in
FileExt::query_filesystem_info(). - A key in the “filesystem” namespace for getting the file system’s type.
- A key in the “filesystem” namespace for getting the number of bytes used by data on the file system.
- A key in the “filesystem” namespace for hinting a file manager application whether it should preview (e.g. thumbnail) files on the file system.
- A key in the “gvfs” namespace that gets the name of the current GVFS backend in use.
- A key in the “id” namespace for getting a file identifier.
- A key in the “id” namespace for getting the file system identifier.
- A key in the “mountable” namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected.
- A key in the “mountable” namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable.
- A key in the “mountable” namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled.
- A key in the “mountable” namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started.
- A key in the “mountable” namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started degraded.
- A key in the “mountable” namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped.
- A key in the “mountable” namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is unmountable.
- A key in the “mountable” namespace for getting the HAL UDI for the mountable file.
- A key in the “mountable” namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is automatically polled for media.
- A key in the “mountable” namespace for getting the
DriveStartStopType. - A key in the “mountable” namespace for getting the unix device.
- A key in the “mountable” namespace for getting the unix device file.
- A key in the “owner” namespace for getting the file owner’s group.
- A key in the “owner” namespace for getting the user name of the file’s owner.
- A key in the “owner” namespace for getting the real name of the user that owns the file.
- A key in the “preview” namespace for getting a
Iconthat can be used to get preview of the file. - A key in the “recent” namespace for getting time, when the metadata for the file in
recent:///was last changed. - A key in the “selinux” namespace for getting the file’s SELinux context.
- A key in the “standard” namespace for getting the amount of disk space that is consumed by the file (in bytes).
- A key in the “standard” namespace for getting the content type of the file.
- A key in the “standard” namespace for getting the copy name of the file.
- A key in the “standard” namespace for getting the description of the file.
- A key in the “standard” namespace for getting the display name of the file.
- A key in the “standard” namespace for edit name of the file.
- A key in the “standard” namespace for getting the fast content type.
- A key in the “standard” namespace for getting the icon for the file.
- A key in the “standard” namespace for checking if a file is a backup file.
- A key in the “standard” namespace for checking if a file is hidden.
- A key in the “standard” namespace for checking if the file is a symlink. Typically the actual type is something else, if we followed the symlink to get the type.
- A key in the “standard” namespace for checking if a file is virtual.
- A key in the “standard” namespace for checking if a file is volatile. This is meant for opaque, non-POSIX-like backends to indicate that the URI is not persistent. Applications should look at
FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGETfor the persistent URI. - A key in the “standard” namespace for getting the name of the file.
- A key in the “standard” namespace for getting the file’s size (in bytes).
- A key in the “standard” namespace for setting the sort order of a file.
- A key in the “standard” namespace for getting the symbolic icon for the file.
- A key in the “standard” namespace for getting the symlink target, if the file is a symlink.
- A key in the “standard” namespace for getting the target URI for the file, in the case of
FileType::ShortcutorFileType::Mountablefiles. - A key in the “standard” namespace for storing file types.
- A key in the “thumbnail” namespace for checking if thumbnailing failed.
- A key in the “thumbnail” namespace for checking whether the thumbnail is outdated.
- A key in the “thumbnail” namespace for getting the path to the thumbnail image.
- A key in the “time” namespace for getting the time the file was last accessed.
- A key in the “time” namespace for getting the microseconds of the time the file was last accessed.
- A key in the “time” namespace for getting the time the file was last changed.
- A key in the “time” namespace for getting the microseconds of the time the file was last changed.
- A key in the “time” namespace for getting the time the file was created.
- A key in the “time” namespace for getting the microseconds of the time the file was created.
- A key in the “time” namespace for getting the time the file was last modified.
- A key in the “time” namespace for getting the microseconds of the time the file was last modified.
- A key in the “trash” namespace for getting the deletion date and time of a file inside the
trash:///folder. - A key in the “trash” namespace for getting the number of (toplevel) items that are present in the
trash:///folder. - A key in the “trash” namespace for getting the original path of a file inside the
trash:///folder before it was trashed. - A key in the “unix” namespace for getting the number of blocks allocated for the file.
- A key in the “unix” namespace for getting the block size for the file system.
- A key in the “unix” namespace for getting the device id of the device the file is located on (see
stat()documentation). - A key in the “unix” namespace for getting the group ID for the file.
- A key in the “unix” namespace for getting the inode of the file.
- A key in the “unix” namespace for checking if the file represents a UNIX mount point.
- A key in the “unix” namespace for getting the mode of the file (e.g. whether the file is a regular file, symlink, etc).
- A key in the “unix” namespace for getting the number of hard links for a file.
- A key in the “unix” namespace for getting the device ID for the file (if it is a special file).
- A key in the “unix” namespace for getting the user ID for the file.
- Extension point for memory usage monitoring functionality. See [Extending GIO][extending-gio].
- The menu item attribute which holds the action name of the item. Action names are namespaced with an identifier for the action group in which the action resides. For example, “win.” for window-specific actions and “app.” for application-wide actions.
- The menu item attribute that holds the namespace for all action names in menus that are linked from this item.
- The menu item attribute which holds the icon of the item.
- The menu item attribute which holds the label of the item.
- The menu item attribute which holds the target with which the item’s action will be activated.
- The name of the link that associates a menu item with a section. The linked menu will usually be shown in place of the menu item, using the item’s label as a header.
- The name of the link that associates a menu item with a submenu.
- Extension point for network status monitoring functionality. See [Extending GIO][extending-gio].
- Extension point for power profile usage monitoring functionality. See [Extending GIO][extending-gio].
- Extension point for proxy functionality. See [Extending GIO][extending-gio].
- Extension point for proxy resolving functionality. See [Extending GIO][extending-gio].
- Extension point for
SettingsBackendfunctionality. - Extension point for TLS functionality via
TlsBackend. See [Extending GIO][extending-gio]. - The purpose used to verify the client certificate in a TLS connection. Used by TLS servers.
- The purpose used to verify the server certificate in a TLS connection. This is the most common purpose in use. Used by TLS clients.
- Extension point for
Vfsfunctionality. See [Extending GIO][extending-gio]. - The string used to obtain the volume class with
VolumeExt::identifier(). - The string used to obtain a Hal UDI with
VolumeExt::identifier(). - The string used to obtain a filesystem label with
VolumeExt::identifier(). - The string used to obtain a NFS mount with
VolumeExt::identifier(). - The string used to obtain a Unix device path with
VolumeExt::identifier(). - The string used to obtain a UUID with
VolumeExt::identifier(). - Extension point for volume monitor functionality. See [Extending GIO][extending-gio].
Functions
- Asynchronously connects to the message bus specified by
bus_type. - Synchronously connects to the message bus specified by
bus_type. Note that the returned object may shared with other callers, e.g. if two separate parts of a process calls this function with the samebus_type, they will share the same object. - Starts acquiring
nameon the bus specified bybus_typeand callsname_acquired_handlerandname_lost_handlerwhen the name is acquired respectively lost. Callbacks will be invoked in the [thread-default main context][g-main-context-push-thread-default] of the thread you are calling this function from. - Starts watching
nameon the bus specified bybus_typeand callsname_appeared_handlerandname_vanished_handlerwhen the name is known to have an owner respectively known to lose its owner. Callbacks will be invoked in the [thread-default main context][g-main-context-push-thread-default] of the thread you are calling this function from. - Call from build script to run
glib-compile-resourcesto generate compiled gresources to embed in binary with resources_register_include.targetis relative toOUT_DIR. - Checks if a content type can be executable. Note that for instance things like text files can be executables (i.e. scripts and batch files).
- Compares two content types for equality.
- Tries to find a content type based on the mime type name.
- Gets the human readable description of the content type.
- Gets the generic icon name for a content type.
- Gets the icon for a content type.
- Get the list of directories which MIME data is loaded from. See
content_type_set_mime_dirs()for details. - Gets the mime type for the content type, if one is registered.
- Gets the symbolic icon for a content type.
- Tries to guess the type of the tree with root
root, by looking at the files it contains. The result is an array of content types, with the best guess coming first. - Determines if
type_is a subset ofsupertype. - Checks if the content type is the generic “unknown” type. On UNIX this is the “application/octet-stream” mimetype, while on win32 it is “*” and on OSX it is a dynamic type or octet-stream.
- Set the list of directories used by GIO to load the MIME database. If
dirsisNone, the directories used are the default: - Gets a list of strings containing all the registered content types known to the system. The list and its data should be freed using
g_list_free_full (list, g_free). - Escape
stringso it can appear in a D-Bus address as the value part of a key-value pair. - Synchronously looks up the D-Bus address for the well-known message bus instance specified by
bus_type. This may involve using various platform specific mechanisms. - Asynchronously connects to an endpoint specified by
addressand sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation.addressmust be in the D-Bus address format. - Synchronously connects to an endpoint specified by
addressand sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation.addressmust be in the D-Bus address format. - This is a language binding friendly version of
g_dbus_escape_object_path_bytestring(). - Generate a D-Bus GUID that can be used with e.g.
DBusConnection::new(). - Checks if
stringis a D-Bus address. - dbus_is_error_name
v2_70Check whetherstringis a valid D-Bus error name. - Checks if
stringis a D-Bus GUID. - Checks if
stringis a valid D-Bus interface name. - Checks if
stringis a valid D-Bus member (e.g. signal or method) name. - Checks if
stringis a valid D-Bus bus name (either unique or well-known). - Like
dbus_is_address()but also checks if the library supports the transports instringand that key/value pairs for each transport are valid. See the specification of the D-Bus address format. - Checks if
stringis a valid D-Bus unique bus name. - Converts errno.h error codes into GIO error codes. The fallback value
IOErrorEnum::Failedis returned for error codes not currently handled (but note that future GLib releases may return a more specific value instead). - Scans all the modules in the specified directory, ensuring that any extension point implemented by a module is registered.
- Creates a keyfile-backed
SettingsBackend. - Creates a memory-backed
SettingsBackend. - Creates a readonly
SettingsBackend. - Returns all the names of children at the specified
pathin the set of globally registered resources. The return result is aNoneterminated list of strings which should be released withg_strfreev(). - Looks for a file at the specified
pathin the set of globally registered resources and if found returns information about it. - Looks for a file at the specified
pathin the set of globally registered resources and returns aglib::Bytesthat lets you directly access the data in memory. - Looks for a file at the specified
pathin the set of globally registered resources and returns aInputStreamthat lets you read the data. - Registers the resource with the process-global set of resources. Once a resource is registered the files in it can be accessed with the global resource lookup functions like
resources_lookup_data(). - Unregisters the resource from the process-global set of resources.
- Determines if
mount_pathis considered an implementation of the OS. This is primarily used for hiding mountable and mounted volumes that only are used in the OS and has little to no relevance to the casual user. - unix_is_system_device_pathUnix and
v2_56Determines ifdevice_pathis considered a block device path which is only used in implementation of the OS. This is primarily used for hiding mounted volumes that are intended as APIs for programs to read, and system administrators at a shell; rather than something that should, for example, appear in a GUI. For example, the Linux/procfilesystem. - unix_is_system_fs_typeUnix and
v2_56Determines iffs_typeis considered a type of file system which is only used in implementation of the OS. This is primarily used for hiding mounted volumes that are intended as APIs for programs to read, and system administrators at a shell; rather than something that should, for example, appear in a GUI. For example, the Linux/procfilesystem.