diff --git a/dev/diff3to4/index.html b/dev/diff3to4/index.html index 281c13ff..fe2e0d3e 100644 --- a/dev/diff3to4/index.html +++ b/dev/diff3to4/index.html @@ -1,2 +1,2 @@ -Gtk.jl to Gtk4.jl · Gtk4.jl

Differences between Gtk.jl and Gtk4.jl

Gtk4.jl builds on and is very similar to Gtk.jl. Here is a summary of what's different.

Properties

GObject properties can still be set and accessed using get_gtk_property and set_gtk_property!. However, properties are now mapped onto Julia properties, so one can set a window title using win.title = "My title". Also, the submodule GAccessor no longer exists. In Gtk4.jl, getter and setter methods are in the main Gtk4 module, but most are not exported. Whereas in Gtk.jl one uses GAccessor.title(win, "My title") to set the title, in Gtk4.jl the equivalent is Gtk4.title(win, "My title").

Constants, enums, and flags

GTK constants in Gtk4.jl are in the main module instead of a Constants submodule.

In Gtk.jl, GTK's enum and flags constants are turned into integers. In Gtk4.jl, these are now mapped onto Julia enums, specifically the implementations CEnum.jl for enums and BitFlags.jl for flags. This improves understandability when a function returns an enum or flag, but the downside is the sometimes extreme length of the enum's name. To mitigate this, convert methods are defined for commonly used enums so that shorter symbols can be used instead of the full enum name. For example, :h can be used instead of Gtk4.Orientation_HORIZONTAL in GtkBox(orientation, spacing).

G_ contains automatically generated methods

In Gtk.jl, the submodule Gtk.GAccessor contains getter and setter methods, which often correspond to object properties. In Gtk4.jl, the submodule Gtk4.G_ contains automatically generated methods, which include all methods in GAccessor and many more. These methods directly call the C functions in libgtk and thus use 0-based indexing. Where possible, they translate between Julia types and C types, for example converting nothing to C_NULL and vice versa.

For consistency, the getter and setter methods in G_ keep their full names, including "set" and "get". For example, to set the title of a window in Gtk4.jl use G_.set_title(w, "text") rather than GAccessor.title(w, "text") as in Gtk.jl.

GObject and struct names

The equivalent of Gtk.ShortNames doesn't exist. All GObject types are mapped onto Julia types with the same name. Leaving out the namespace, as is done in the Python pygobject bindings, would have led to name collisions between Gtk types and Julia types or between Gtk and other GObject libraries.

No showall

In GTK 4, widgets are shown by default, so showall does not exist, and calling show is no longer necessary in most situations. Exceptions include GtkDialogs and GtkApplicationWindows.

No GtkContainer

In GTK 4, GtkContainer has been removed and most widgets derive directly from GtkWidget. Each class that can contain child widgets has its own functions for adding and/or removing them. In Gtk4.jl, collection interface methods like push! have been defined for containers that hold many widgets, such as GtkBox. For widgets that have one child, such as GtkWindow, getindex and setindex! have been defined, so that one can set a child widget using window[] = child.

Events

Events such as button presses are handled through "event controllers" in GTK 4.

Dialogs

Dialogs no longer have a run method that takes over the GLib main loop while waiting for the user's response.

For developers

All uses of mutable from GLib.MutableTypes should be replaced by Julia's Ref. The type of a GValue can be set using settype! rather than setindex!.

More information

The GTK docs have a migration guide with detailed recommendations for migrating C code from GTK version 3 to version 4. Much of that advice applies to Julia code.

+Gtk.jl to Gtk4.jl · Gtk4.jl

Differences between Gtk.jl and Gtk4.jl

Gtk4.jl builds on and is very similar to Gtk.jl. Here is a summary of what's different.

Properties

GObject properties can still be set and accessed using get_gtk_property and set_gtk_property!. However, properties are now mapped onto Julia properties, so one can set a window title using win.title = "My title". Also, the submodule GAccessor no longer exists. In Gtk4.jl, getter and setter methods are in the main Gtk4 module, but most are not exported. Whereas in Gtk.jl one uses GAccessor.title(win, "My title") to set the title, in Gtk4.jl the equivalent is Gtk4.title(win, "My title").

Constants, enums, and flags

GTK constants in Gtk4.jl are in the main module instead of a Constants submodule.

In Gtk.jl, GTK's enum and flags constants are turned into integers. In Gtk4.jl, these are now mapped onto Julia enums, specifically the implementations CEnum.jl for enums and BitFlags.jl for flags. This improves understandability when a function returns an enum or flag, but the downside is the sometimes extreme length of the enum's name. To mitigate this, convert methods are defined for commonly used enums so that shorter symbols can be used instead of the full enum name. For example, :h can be used instead of Gtk4.Orientation_HORIZONTAL in GtkBox(orientation, spacing).

G_ contains automatically generated methods

In Gtk.jl, the submodule Gtk.GAccessor contains getter and setter methods, which often correspond to object properties. In Gtk4.jl, the submodule Gtk4.G_ contains automatically generated methods, which include all methods in GAccessor and many more. These methods directly call the C functions in libgtk and thus use 0-based indexing. Where possible, they translate between Julia types and C types, for example converting nothing to C_NULL and vice versa.

For consistency, the getter and setter methods in G_ keep their full names, including "set" and "get". For example, to set the title of a window in Gtk4.jl use G_.set_title(w, "text") rather than GAccessor.title(w, "text") as in Gtk.jl.

GObject and struct names

The equivalent of Gtk.ShortNames doesn't exist. All GObject types are mapped onto Julia types with the same name. Leaving out the namespace, as is done in the Python pygobject bindings, would have led to name collisions between Gtk types and Julia types or between Gtk and other GObject libraries.

No showall

In GTK 4, widgets are shown by default, so showall does not exist, and calling show is no longer necessary in most situations. Exceptions include GtkDialogs and GtkApplicationWindows.

No GtkContainer

In GTK 4, GtkContainer has been removed and most widgets derive directly from GtkWidget. Each class that can contain child widgets has its own functions for adding and/or removing them. In Gtk4.jl, collection interface methods like push! have been defined for containers that hold many widgets, such as GtkBox. For widgets that have one child, such as GtkWindow, getindex and setindex! have been defined, so that one can set a child widget using window[] = child.

Events

Events such as button presses are handled through "event controllers" in GTK 4.

Dialogs

Dialogs no longer have a run method that takes over the GLib main loop while waiting for the user's response.

For developers

All uses of mutable from GLib.MutableTypes should be replaced by Julia's Ref. The type of a GValue can be set using settype! rather than setindex!.

More information

The GTK docs have a migration guide with detailed recommendations for migrating C code from GTK version 3 to version 4. Much of that advice applies to Julia code.

diff --git a/dev/doc/GI_reference/index.html b/dev/doc/GI_reference/index.html index 2e4cc310..e4a678be 100644 --- a/dev/doc/GI_reference/index.html +++ b/dev/doc/GI_reference/index.html @@ -5,4 +5,4 @@ Private = false

Private methods

Modules = [GI]
 Order   = [:module, :constant, :type, :function, :macro]
 Public  = false
-Private = true
+Private = true diff --git a/dev/doc/GLib_reference/index.html b/dev/doc/GLib_reference/index.html index b251ab17..1b6b4c23 100644 --- a/dev/doc/GLib_reference/index.html +++ b/dev/doc/GLib_reference/index.html @@ -1,2 +1,2 @@ -GLib Reference · Gtk4.jl

GLib Reference

Public interface

Gtk4.GLib.bind_propertyFunction
bind_property(source::GObject, source_property, target::GObject, target_property, flags = BindingFlags_DEFAULT)

Creates a binding between source_property on source and target_property on target. When source_property is changed, target_property will be updated to the same value. Returns a GBinding object that can be used to release the binding using unbind_property.

See also unbind_property.

Related GTK function: g_object_bind_property

source
Gtk4.GLib.g_idle_addFunction
g_idle_add(f, priority=PRIORITY_DEFAULT_IDLE)

Add a Julia function f that will be called when there are no higher priority GTK events to be processed. This function can be used from any thread. The optional priority argument, which is an integer, sets the priority of the event source (smaller is higher priority). The GLib main loop uses this priority value to decide what sources to handle next.

See also @idle_add.

Related GTK function: g_idle_add_full()

source
Gtk4.GLib.g_source_removeMethod
g_source_remove(id::Integer)

Remove the event source identified by id from the GLib main loop. The id is returned by g_idle_add and g_timeout_add. The main loop reuses id's so care should be taken that the source intended to be removed is still active.

Related GTK function: g_source_remove()

source
Gtk4.GLib.g_timeout_addFunction
g_timeout_add(f, interval, priority=PRIORITY_DEFAULT)

Add a function f that will be called every interval milliseconds by the GTK main loop. The function is expected to return a Cint. If it returns a nonzero value, the function will be called again after another interval milliseconds. Otherwise it will not be called again. The optional priority argument, which is an integer, sets the priority of the event source (smaller is higher priority). The GLib main loop uses this priority value to decide what sources to handle next.

This function returns an event source ID that can be used with g_source_remove to stop the timeout.

Related GTK function: g_timeout_add()

source
Gtk4.GLib.@idle_addMacro
@idle_add(ex)

Create a function from an expression ex that will be called when there are no higher priority GTK events to be processed. This function can be used from any thread.

See also g_idle_add.

Related GTK function: g_idle_add()

source

Private methods

Gtk4.GLib.propertyinfoMethod
propertyinfo(w::GObject, name)

Prints information about a property of the GObject w, including a brief description, its type, its default value, and its current value.

source
Gtk4.GLib.set_uv_loop_integrationFunction
set_uv_loop_integration(s = "auto")

Change Gtk4.jl's libuv loop integration setting. The argument s should be "auto" to use Gtk4.jl's default setting or "enabled" or "disabled" to override this. This setting will take effect after restarting Julia.

Enabling libuv loop integration may improve REPL response on some platforms (Mac) but negatively impacts multithreaded performance. This function has no effect when running on Windows.

source
Gtk4.GLib.stop_main_loopMethod
stop_main_loop()

Stops the default GLib main loop after the next iteration. Does not affect loop operation if GApplication's run() method is being used instead of GLib.start_main_loop().

See also start_main_loop.

source
Gtk4.GLib.waitforsignalMethod
waitforsignal(obj::GObject, signal)

Returns when a GObject's signal is emitted. Can be used to wait for a window to be closed.

source

Types

Gtk4.GLib.AskPasswordFlagsType

#GAskPasswordFlags are used to request specific information from the user, or to notify the user of their choices in an authentication situation.

Details can be found in the GTK docs.

source
Gtk4.GLib.DateDMYType

This enumeration isn't used in the API, but may be useful if you need to mark a number as a day, month, or year.

Details can be found in the GTK docs.

source
Gtk4.GLib.DateMonthType

Enumeration representing a month; values are %GDATEJANUARY, %GDATEFEBRUARY, etc. %GDATEBAD_MONTH is the invalid value.

Details can be found in the GTK docs.

source
Gtk4.GLib.DateWeekdayType

Enumeration representing a day of the week; %GDATEMONDAY, %GDATETUESDAY, etc. %GDATEBAD_WEEKDAY is an invalid weekday.

Details can be found in the GTK docs.

source
Gtk4.GLib.ErrorTypeType

The possible errors, used in the @verror field of #GTokenValue, when the token is a %GTOKEN_ERROR.

Details can be found in the GTK docs.

source
Gtk4.GLib.FileErrorType

Values corresponding to @errno codes returned from file operations on UNIX. Unlike @errno codes, GFileError values are available on all systems, even Windows. The exact meaning of each code depends on what sort of file operation you were performing; the UNIX documentation gives more details. The following error code descriptions come from the GNU C Library manual, and are under the copyright of that manual.

Details can be found in the GTK docs.

source
Gtk4.GLib.FilesystemPreviewTypeType

Indicates a hint from the file system whether files should be previewed in a file manager. Returned as the value of the key %GFILEATTRIBUTEFILESYSTEMUSE_PREVIEW.

Details can be found in the GTK docs.

source
Gtk4.GLib.GAppInfoMonitorType

#GAppInfoMonitor is a very simple object used for monitoring the app info database for changes (ie: newly installed or removed applications).

Details can be found in the GTK docs.

source
Gtk4.GLib.GAppLaunchContextType

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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GApplicationType

A #GApplication is 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 as #GtkApplication or #MxApplication. In general, you should not use this class outside of a higher level framework.

Details can be found in the GTK docs.

source
Gtk4.GLib.GApplicationCommandLineType

#GApplicationCommandLine represents a command-line invocation of an application. It is created by #GApplication and emitted in the #GApplication::command-line signal and virtual function.

Details can be found in the GTK docs.

source
Gtk4.GLib.GBindingType

#GBinding is the representation of a binding between a property on a #GObject instance (or source) and another property on another #GObject instance (or target).

Details can be found in the GTK docs.

source
Gtk4.GLib.GBytesType

A simple refcounted data type representing an immutable sequence of zero or more bytes from an unspecified origin.

Details can be found in the GTK docs.

source
Gtk4.GLib.GBytesIconType

#GBytesIcon specifies an image held in memory in a common format (usually png) to be used as icon.

Details can be found in the GTK docs.

source
Gtk4.GLib.GCancellableType

GCancellable is a thread-safe operation cancellation stack used throughout GIO to allow for cancellation of synchronous and asynchronous operations.

Details can be found in the GTK docs.

source
Gtk4.GLib.GCredentialsType

The #GCredentials type is a reference-counted wrapper for native credentials. This information is typically used for identifying, authenticating and authorizing other processes.

Details can be found in the GTK docs.

source
Gtk4.GLib.GDBusActionGroupType

#GDBusActionGroup is an implementation of the #GActionGroup interface that can be used as a proxy for an action group that is exported over D-Bus with gdbusconnectionexportaction_group().

Details can be found in the GTK docs.

source
Gtk4.GLib.GDBusAuthObserverType

The #GDBusAuthObserver type provides a mechanism for participating in how a #GDBusServer (or a #GDBusConnection) authenticates remote peers. Simply instantiate a #GDBusAuthObserver and connect to the signals you are interested in. Note that new signals may be added in the future

Details can be found in the GTK docs.

source
Gtk4.GLib.GDBusConnectionType

The #GDBusConnection type 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 a #GIOStream.

Details can be found in the GTK docs.

source
Gtk4.GLib.GDBusMenuModelType

#GDBusMenuModel is an implementation of #GMenuModel that can be used as a proxy for a menu model that is exported over D-Bus with gdbusconnectionexportmenu_model().

Details can be found in the GTK docs.

source
Gtk4.GLib.GDBusMethodInvocationType

Instances of the #GDBusMethodInvocation class are used when handling D-Bus method calls. It provides a way to asynchronously return results and errors.

Details can be found in the GTK docs.

source
Gtk4.GLib.GDBusObjectManagerServerType

#GDBusObjectManagerServer is used to export #GDBusObject instances using the standardized org.freedesktop.DBus.ObjectManager interface. For example, remote D-Bus clients can get all objects and properties in a single call. Additionally, any change in the object hierarchy is broadcast using signals. This means that D-Bus clients can keep caches up to date by only listening to D-Bus signals.

Details can be found in the GTK docs.

source
Gtk4.GLib.GDBusObjectProxyType

A #GDBusObjectProxy is an object used to represent a remote object with one or more D-Bus interfaces. Normally, you don't instantiate a #GDBusObjectProxy yourself - typically #GDBusObjectManagerClient is used to obtain it.

Details can be found in the GTK docs.

source
Gtk4.GLib.GDBusObjectSkeletonType

A #GDBusObjectSkeleton instance is essentially a group of D-Bus interfaces. The set of exported interfaces on the object may be dynamic and change at runtime.

Details can be found in the GTK docs.

source
Gtk4.GLib.GDBusProxyType

#GDBusProxy is a base class used for proxies to access a D-Bus interface on a remote object. A #GDBusProxy can be constructed for both well-known and unique names.

Details can be found in the GTK docs.

source
Gtk4.GLib.GDBusServerType

#GDBusServer is 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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GDataInputStreamType

Data input stream implements #GInputStream and includes functions for reading structured data directly from a binary input stream.

Details can be found in the GTK docs.

source
Gtk4.GLib.GDateType

Represents a day between January 1, Year 1 and a few thousand years in the future. None of its members should be accessed directly.

Details can be found in the GTK docs.

source
Gtk4.GLib.GEmblemType

#GEmblem is an implementation of #GIcon that supports having an emblem, which is an icon with additional properties. It can than be added to a #GEmblemedIcon.

Details can be found in the GTK docs.

source
Gtk4.GLib.GEmblemedIconType

#GEmblemedIcon is an implementation of #GIcon that supports adding an emblem to an icon. Adding multiple emblems to an icon is ensured via gemblemediconaddemblem().

Details can be found in the GTK docs.

source
Gtk4.GLib.GFileEnumeratorType

#GFileEnumerator allows you to operate on a set of #GFiles, returning a #GFileInfo structure for each file enumerated (e.g. gfileenumerate_children() will return a #GFileEnumerator for each of the children within a directory).

Details can be found in the GTK docs.

source
Gtk4.GLib.GFileInfoType

Functionality for manipulating basic metadata for files. #GFileInfo implements methods for getting information that all files should contain, and allows for manipulation of extended attributes.

Details can be found in the GTK docs.

source
Gtk4.GLib.GFilenameCompleterType

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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GFilterInputStreamType

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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GFilterOutputStreamType

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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GIOModuleType

Provides an interface and default functions for loading and unloading modules. This is used internally to make GIO extensible, but can also be used by others to implement module loading.

Details can be found in the GTK docs.

source
Gtk4.GLib.GIOStreamType

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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GInetAddressType

#GInetAddress represents an IPv4 or IPv6 internet address. Use gresolverlookupbyname() or gresolverlookupbynameasync() to look up the #GInetAddress for a hostname. Use gresolverlookupbyaddress() or gresolverlookupbyaddressasync() to look up the hostname for a #GInetAddress.

Details can be found in the GTK docs.

source
Gtk4.GLib.GInetAddressMaskType

#GInetAddressMask represents 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".

Details can be found in the GTK docs.

source
Gtk4.GLib.GInputStreamType

#GInputStream has functions to read from a stream (ginputstreamread()), to close a stream (ginputstreamclose()) and to skip some content (ginputstream_skip()).

Details can be found in the GTK docs.

source
Gtk4.GLib.GInputVectorType

Structure used for scatter/gather data input. You generally pass in an array of #GInputVectors and the operation will store the read data starting in the first buffer, switching to the next as needed.

Details can be found in the GTK docs.

source
Gtk4.GLib.GLogFieldType

Structure representing a single field in a structured log entry. See glogstructured() for details.

Details can be found in the GTK docs.

source
Gtk4.GLib.GMainContextType

The GMainContext struct is an opaque data type representing a set of sources to be handled in a main loop.

Details can be found in the GTK docs.

source
Gtk4.GLib.GMainLoopType

The GMainLoop struct is an opaque data type representing the main event loop of a GLib or GTK+ application.

Details can be found in the GTK docs.

source
Gtk4.GLib.GMappedFileType

The #GMappedFile represents a file mapping created with gmappedfile_new(). It has only private members and should not be accessed directly.

Details can be found in the GTK docs.

source
Gtk4.GLib.GMenuType

#GMenu is a simple implementation of #GMenuModel. You populate a #GMenu by adding #GMenuItem instances to it.

Details can be found in the GTK docs.

source
Gtk4.GLib.GMenuModelType

#GMenuModel represents 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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GMountOperationType

#GMountOperation provides 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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GNetworkAddressType

#GNetworkAddress provides 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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GNetworkServiceType

Like #GNetworkAddress does with hostnames, #GNetworkService provides 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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GNotificationType

#GNotification is a mechanism for creating a notification to be shown to the user – typically as a pop-up notification presented by the desktop environment shell.

Details can be found in the GTK docs.

source
Gtk4.GLib.GOptionEntryType

A GOptionEntry struct defines a single option. To have an effect, they must be added to a #GOptionGroup with goptioncontextaddmainentries() or goptiongroupadd_entries().

Details can be found in the GTK docs.

source
Gtk4.GLib.GOutputStreamType

#GOutputStream has functions to write to a stream (goutputstreamwrite()), to close a stream (goutputstreamclose()) and to flush pending writes (goutputstream_flush()).

Details can be found in the GTK docs.

source
Gtk4.GLib.GOutputVectorType

Structure used for scatter/gather data output. You generally pass in an array of #GOutputVectors and the operation will use all the buffers as if they were one buffer.

Details can be found in the GTK docs.

source
Gtk4.GLib.GPatternSpecType

A GPatternSpec struct is the 'compiled' form of a pattern. This structure is opaque and its fields cannot be accessed directly.

Details can be found in the GTK docs.

source
Gtk4.GLib.GPropertyActionType

A #GPropertyAction is a way to get a #GAction with a state value reflecting and controlling the value of a #GObject property.

Details can be found in the GTK docs.

source
Gtk4.GLib.GProxyAddressEnumeratorType

#GProxyAddressEnumerator is a wrapper around #GSocketAddressEnumerator which takes the #GSocketAddress instances returned by the #GSocketAddressEnumerator and wraps them in #GProxyAddress instances, using the given #GProxyAddressEnumerator:proxy-resolver.

Details can be found in the GTK docs.

source
Gtk4.GLib.GRegexType

The gregex*() functions implement regular expression pattern matching using syntax and semantics similar to Perl regular expression.

Details can be found in the GTK docs.

source
Gtk4.GLib.GResolverType

#GResolver provides cancellable synchronous and asynchronous DNS resolution, for hostnames (gresolverlookupbyaddress(), gresolverlookupbyname() and their async variants) and SRV (service) records (gresolverlookup_service()).

Details can be found in the GTK docs.

source
Gtk4.GLib.GResourceType

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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GScannerConfigType

Specifies the #GScanner parser configuration. Most settings can be changed during the parsing phase and will affect the lexical parsing of the next unpeeked token.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSettingsType

The #GSettings class provides a convenient API for storing and retrieving application settings.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSettingsBackendType

The #GSettingsBackend interface defines a generic interface for non-strictly-typed data that is stored in a hierarchy. To implement an alternative storage backend for #GSettings, you need to implement the #GSettingsBackend interface and then make it implement the extension point %GSETTINGSBACKENDEXTENSIONPOINT_NAME.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSettingsSchemaType

The #GSettingsSchemaSource and #GSettingsSchema APIs provide a mechanism for advanced control over the loading of schemas and a mechanism for introspecting their content.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSimpleActionType

A #GSimpleAction is the obvious simple implementation of the #GAction interface. This is the easiest way to create an action for purposes of adding it to a #GSimpleActionGroup.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSimpleIOStreamType

GSimpleIOStream creates a #GIOStream from an arbitrary #GInputStream and #GOutputStream. This allows any pair of input and output streams to be used with #GIOStream methods.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSimplePermissionType

#GSimplePermission is a trivial implementation of #GPermission that represents a permission that is either always or never allowed. The value is given at construction and doesn't change.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSimpleProxyResolverType

#GSimpleProxyResolver is a simple #GProxyResolver implementation that handles a single default proxy, multiple URI-scheme-specific proxies, and a list of hosts that proxies should not be used for.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSocketType

A #GSocket is 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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSocketAddressType

#GSocketAddress is the equivalent of struct sockaddr in the BSD sockets API. This is an abstract class; use #GInetSocketAddress for internet sockets, or #GUnixSocketAddress for UNIX domain sockets.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSocketAddressEnumeratorType

#GSocketAddressEnumerator is an enumerator type for #GSocketAddress instances. It is returned by enumeration functions such as gsocketconnectable_enumerate(), which returns a #GSocketAddressEnumerator to list each #GSocketAddress which could be used to connect to that #GSocketConnectable.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSocketClientType

#GSocketClient is a lightweight high-level utility class for connecting to a network host using a connection oriented socket type.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSocketConnectionType

#GSocketConnection is a #GIOStream for a connected socket. They can be created either by #GSocketClient when connecting to a host, or by #GSocketListener when accepting a new client.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSocketControlMessageType

A #GSocketControlMessage is a special-purpose utility message that can be sent to or received from a #GSocket. These types of messages are often called "ancillary data".

Details can be found in the GTK docs.

source
Gtk4.GLib.GSocketListenerType

A #GSocketListener is 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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSocketServiceType

A #GSocketService is 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 the #GSocketService::incoming signal is emitted.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSrvTargetType

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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSubprocessLauncherType

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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GTcpWrapperConnectionType

A #GTcpWrapperConnection can be used to wrap a #GIOStream that is based on a #GSocket, but which is not actually a #GSocketConnection. This is used by #GSocketClient so that it can always return a #GSocketConnection, even when the connection it has actually created is not directly a #GSocketConnection.

Details can be found in the GTK docs.

source
Gtk4.GLib.GThemedIconType

#GThemedIcon is an implementation of #GIcon that supports icon themes. #GThemedIcon contains a list of all of the icons present in an icon theme, so that icons can be looked up quickly. #GThemedIcon does not provide actual pixmaps for icons, just the icon names. Ideally something like gtkiconthemechooseicon() should be used to resolve the list of names so that fallback icons work nicely with themes that inherit other themes.

Details can be found in the GTK docs.

source
Gtk4.GLib.GThreadedSocketServiceType

A #GThreadedSocketService is a simple subclass of #GSocketService that handles incoming connections by creating a worker thread and dispatching the connection to it by emitting the #GThreadedSocketService::run signal in the new thread.

Details can be found in the GTK docs.

source
Gtk4.GLib.GTlsCertificateType

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 #GTlsServerConnection).

Details can be found in the GTK docs.

source
Gtk4.GLib.GTlsConnectionType

#GTlsConnection is the base TLS connection class type, which wraps a #GIOStream and provides TLS encryption on top of it. Its subclasses, #GTlsClientConnection and #GTlsServerConnection, implement client-side and server-side TLS, respectively.

Details can be found in the GTK docs.

source
Gtk4.GLib.GTlsDatabaseType

#GTlsDatabase is 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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GTlsInteractionType

#GTlsInteraction provides a mechanism for the TLS connection and database code to interact with the user. It can be used to ask the user for passwords.

Details can be found in the GTK docs.

source
Gtk4.GLib.GUnixCredentialsMessageType

This #GSocketControlMessage contains a #GCredentials instance. It may be sent using gsocketsendmessage() and received using gsocketreceivemessage() over UNIX sockets (ie: sockets in the %GSOCKETFAMILY_UNIX family).

Details can be found in the GTK docs.

source
Gtk4.GLib.GUriType

The #GUri type and related functions can be used to parse URIs into their components, and build valid URIs from individual components.

Details can be found in the GTK docs.

source
Gtk4.GLib.GVariantTypeType

This section introduces the GVariant type system. It is based, in large part, on the D-Bus type system, with two major changes and some minor lifting of restrictions. The D-Bus specification, therefore, provides a significant amount of information that is useful when working with GVariant.

Details can be found in the GTK docs.

source
Gtk4.GLib.GVolumeMonitorType

#GVolumeMonitor is 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.

Details can be found in the GTK docs.

source
Gtk4.GLib.IOErrorType

#GIOError is only used by the deprecated functions giochannelread(), giochannelwrite(), and giochannel_seek().

Details can be found in the GTK docs.

source
Gtk4.GLib.IOFlagsType

Specifies properties of a #GIOChannel. Some of the flags can only be read with giochannelgetflags(), but not changed with giochannelsetflags().

Details can be found in the GTK docs.

source
Gtk4.GLib.LogWriterOutputType

Return values from #GLogWriterFuncs to indicate whether the given log entry was successfully handled by the writer, or whether there was an error in handling it (and hence a fallback writer should be used).

Details can be found in the GTK docs.

source
Gtk4.GLib.MarkupCollectTypeType

A mixed enumerated type and flags field. You must specify one type (string, strdup, boolean, tristate). Additionally, you may optionally bitwise OR the type with the flag %GMARKUPCOLLECT_OPTIONAL.

Details can be found in the GTK docs.

source
Gtk4.GLib.NormalizeModeType

Defines how a Unicode string is transformed in a canonical form, standardizing such issues as whether a character with an accent is represented as a base character and combining accent or as a single precomposed character. Unicode strings should generally be normalized before comparing them.

Details can be found in the GTK docs.

source
Gtk4.GLib.OptionArgType

The #GOptionArg enum values determine which type of extra argument the options expect to find. If an option expects an extra argument, it can be specified in several ways; with a short option: -x arg, with a long option: --name arg or combined in a single argument: --name=arg.

Details can be found in the GTK docs.

source
Gtk4.GLib.ResolverRecordTypeType

The type of record that gresolverlookuprecords() or gresolverlookuprecords_async() should retrieve. The records are returned as lists of #GVariant tuples. Each record type has different values in the variant tuples returned.

Details can be found in the GTK docs.

source
Gtk4.GLib.SettingsBindFlagsType

Flags used when creating a binding. These flags determine in which direction the binding works. The default is to synchronize in both directions.

Details can be found in the GTK docs.

source
Gtk4.GLib.SignalMatchTypeType

The match types specify what gsignalhandlersblockmatched(), gsignalhandlersunblockmatched() and gsignalhandlersdisconnectmatched() match signals by.

Details can be found in the GTK docs.

source
Gtk4.GLib.SocketFamilyType

The protocol family of a #GSocketAddress. (These values are identical to the system defines %AFINET, %AFINET6 and %AF_UNIX, if available.)

Details can be found in the GTK docs.

source
Gtk4.GLib.SocketMsgFlagsType

Flags used in gsocketreceivemessage() and gsocketsendmessage(). The flags listed in the enum are some commonly available flags, but the values used for them are the same as on the platform, and any other flags are passed in/out as is. So to use a platform specific flag, just include the right system header and pass in the flag.

Details can be found in the GTK docs.

source
Gtk4.GLib.SocketProtocolType

A protocol identifier is specified when creating a #GSocket, which is a family/type specific identifier, where 0 means the default protocol for the particular family/type.

Details can be found in the GTK docs.

source
Gtk4.GLib.TlsCertificateFlagsType

A set of flags describing TLS certification validation. This can be used to describe why a particular certificate was rejected (for example, in #GTlsConnection::accept-certificate).

Details can be found in the GTK docs.

source
Gtk4.GLib.TlsProtocolVersionType

The TLS or DTLS protocol version used by a #GTlsConnection or #GDtlsConnection. 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 be %GTLSPROTOCOLVERSIONUNKNOWN if 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.

Details can be found in the GTK docs.

source
Gtk4.GLib.TraverseFlagsType

Specifies which nodes are visited during several of the tree functions, including gnodetraverse() and gnodefind().

Details can be found in the GTK docs.

source
Gtk4.GLib.TraverseTypeType

Specifies the type of traversal performed by gtreetraverse(), gnodetraverse() and gnodefind(). The different orders are illustrated here:

  • In order: A, B, C, D, E, F, G, H, I
  • Pre order: F, B, A, D, C, E, G, I, H
  • Post order: A, C, E, D, B, H, I, G, F
  • Level order: F, B, G, A, D, I, C, E, H

Details can be found in the GTK docs.

source
Gtk4.GLib.UnicodeScriptType

The #GUnicodeScript enumeration identifies different writing systems. The values correspond to the names as defined in the Unicode standard. The enumeration has been added in GLib 2.14, and is interchangeable with #PangoScript.

Details can be found in the GTK docs.

source
Gtk4.GLib.UnixSocketAddressTypeType

The type of name used by a #GUnixSocketAddress. %GUNIXSOCKETADDRESSPATH indicates a traditional unix domain socket bound to a filesystem path. %GUNIXSOCKETADDRESSANONYMOUS indicates a socket not bound to any name (eg, a client-side socket, or a socket created with socketpair()).

Details can be found in the GTK docs.

source
Gtk4.GLib.UriHideFlagsType

Flags describing what parts of the URI to hide in guritostringpartial(). Note that %GURIHIDEPASSWORD and %GURIHIDEAUTH_PARAMS will only work if the #GUri was parsed with the corresponding flags.

Details can be found in the GTK docs.

source
Gtk4.GLib.UserDirectoryType

These are logical ids for special directories which are defined depending on the platform used. You should use ggetuserspecialdir() to retrieve the full path associated to the logical id.

Details can be found in the GTK docs.

source

Constants

Gtk4.GLib.ASCII_DTOSTR_BUF_SIZEConstant

A good size for a buffer to be passed into gasciidtostr(). It is guaranteed to be enough for all output of that function on systems with 64bit IEEE-compatible doubles.

Details can be found in the GTK docs.

source
Gtk4.GLib.CSET_A_2_ZConstant

The set of uppercase ASCII alphabet characters. Used for specifying valid identifier characters in #GScannerConfig.

Details can be found in the GTK docs.

source
Gtk4.GLib.CSET_a_2_zConstant

The set of lowercase ASCII alphabet characters. Used for specifying valid identifier characters in #GScannerConfig.

Details can be found in the GTK docs.

source
Gtk4.GLib.DATALIST_FLAGS_MASKConstant

A bitmask that restricts the possible flags passed to gdatalistsetflags(). Passing a flags value where flags & ~GDATALISTFLAGSMASK != 0 is an error.

Details can be found in the GTK docs.

source
Gtk4.GLib.DBUS_METHOD_INVOCATION_HANDLEDConstant

The value returned by handlers of the signals generated by the gdbus-codegen tool to indicate that a method call has been handled by an implementation. It is equal to %TRUE, but using this macro is sometimes more readable.

Details can be found in the GTK docs.

source
Gtk4.GLib.DBUS_METHOD_INVOCATION_UNHANDLEDConstant

The value returned by handlers of the signals generated by the gdbus-codegen tool to indicate that a method call has not been handled by an implementation. It is equal to %FALSE, but using this macro is sometimes more readable.

Details can be found in the GTK docs.

source
Gtk4.GLib.FILE_ATTRIBUTE_STANDARD_IS_VOLATILEConstant

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 %GFILEATTRIBUTESTANDARDSYMLINK_TARGET for the persistent URI.

Details can be found in the GTK docs.

source
Gtk4.GLib.FILE_ATTRIBUTE_TIME_ACCESS_NSECConstant

A key in the "time" namespace for getting the nanoseconds of the time the file was last accessed. This should be used in conjunction with #GFILEATTRIBUTETIMEACCESS. Corresponding #GFileAttributeType is %GFILEATTRIBUTETYPEUINT32.

Details can be found in the GTK docs.

source
Gtk4.GLib.FILE_ATTRIBUTE_TIME_CHANGED_NSECConstant

A key in the "time" namespace for getting the nanoseconds of the time the file was last changed. This should be used in conjunction with #GFILEATTRIBUTETIMECHANGED. Corresponding #GFileAttributeType is %GFILEATTRIBUTETYPEUINT32.

Details can be found in the GTK docs.

source
Gtk4.GLib.FILE_ATTRIBUTE_TIME_CREATED_NSECConstant

A key in the "time" namespace for getting the nanoseconds of the time the file was created. This should be used in conjunction with #GFILEATTRIBUTETIMECREATED. Corresponding #GFileAttributeType is %GFILEATTRIBUTETYPEUINT32.

Details can be found in the GTK docs.

source
Gtk4.GLib.FILE_ATTRIBUTE_TIME_MODIFIED_NSECConstant

A key in the "time" namespace for getting the nanoseconds of the time the file was last modified. This should be used in conjunction with #GFILEATTRIBUTETIMEMODIFIED. Corresponding #GFileAttributeType is %GFILEATTRIBUTETYPEUINT32.

Details can be found in the GTK docs.

source
Gtk4.GLib.GINT16_FORMATConstant

This is the platform dependent conversion specifier for scanning and printing values of type #gint16. It is a string literal, but doesn't include the percent-sign, such that you can add precision and length modifiers between percent-sign and conversion specifier.

Details can be found in the GTK docs.

source
Gtk4.GLib.GINT16_MODIFIERConstant

The platform dependent length modifier for conversion specifiers for scanning and printing values of type #gint16 or #guint16. It is a string literal, but doesn't include the percent-sign, such that you can add precision and length modifiers between percent-sign and conversion specifier and append a conversion specifier.

Details can be found in the GTK docs.

source
Gtk4.GLib.GINT32_FORMATConstant

This is the platform dependent conversion specifier for scanning and printing values of type #gint32. See also %GGINT16FORMAT.

Details can be found in the GTK docs.

source
Gtk4.GLib.GINT32_MODIFIERConstant

The platform dependent length modifier for conversion specifiers for scanning and printing values of type #gint32 or #guint32. It is a string literal. See also %GGINT16MODIFIER.

Details can be found in the GTK docs.

source
Gtk4.GLib.GINT64_FORMATConstant

This is the platform dependent conversion specifier for scanning and printing values of type #gint64. See also %GGINT16FORMAT.

Details can be found in the GTK docs.

source
Gtk4.GLib.GINT64_MODIFIERConstant

The platform dependent length modifier for conversion specifiers for scanning and printing values of type #gint64 or #guint64. It is a string literal.

Details can be found in the GTK docs.

source
Gtk4.GLib.GINTPTR_MODIFIERConstant

The platform dependent length modifier for conversion specifiers for scanning and printing values of type #gintptr or #guintptr. It is a string literal.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSIZE_FORMATConstant

This is the platform dependent conversion specifier for scanning and printing values of type #gsize. See also %GGINT16FORMAT.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSIZE_MODIFIERConstant

The platform dependent length modifier for conversion specifiers for scanning and printing values of type #gsize. It is a string literal.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSSIZE_FORMATConstant

This is the platform dependent conversion specifier for scanning and printing values of type #gssize. See also %GGINT16FORMAT.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSSIZE_MODIFIERConstant

The platform dependent length modifier for conversion specifiers for scanning and printing values of type #gssize. It is a string literal.

Details can be found in the GTK docs.

source
Gtk4.GLib.GUINT16_FORMATConstant

This is the platform dependent conversion specifier for scanning and printing values of type #guint16. See also %GGINT16FORMAT

Details can be found in the GTK docs.

source
Gtk4.GLib.GUINT32_FORMATConstant

This is the platform dependent conversion specifier for scanning and printing values of type #guint32. See also %GGINT16FORMAT.

Details can be found in the GTK docs.

source
Gtk4.GLib.GUINT64_FORMATConstant

This is the platform dependent conversion specifier for scanning and printing values of type #guint64. See also %GGINT16FORMAT.

Details can be found in the GTK docs.

source
Gtk4.GLib.HOOK_FLAG_USER_SHIFTConstant

The position of the first bit which is not reserved for internal use be the #GHook implementation, i.e. 1 << G_HOOK_FLAG_USER_SHIFT is the first bit which can be used for application-defined flags.

Details can be found in the GTK docs.

source
Gtk4.GLib.KEY_FILE_DESKTOP_KEY_EXECConstant

A key under %GKEYFILEDESKTOPGROUP, whose value is a string giving the command line to execute. It is only valid for desktop entries with the Application type.

Details can be found in the GTK docs.

source
Gtk4.GLib.KEY_FILE_DESKTOP_KEY_PATHConstant

A key under %GKEYFILEDESKTOPGROUP, whose value is a string containing the working directory to run the program in. It is only valid for desktop entries with the Application type.

Details can be found in the GTK docs.

source
Gtk4.GLib.KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASSConstant

A key under %GKEYFILEDESKTOPGROUP, whose value is string identifying the WM class or name hint of a window that the application will create, which can be used to emulate Startup Notification with older applications.

Details can be found in the GTK docs.

source
Gtk4.GLib.KEY_FILE_DESKTOP_KEY_TRY_EXECConstant

A key under %GKEYFILEDESKTOPGROUP, whose value is a string giving the file name of a binary on disk used to determine if the program is actually installed. It is only valid for desktop entries with the Application type.

Details can be found in the GTK docs.

source
Gtk4.GLib.MENU_ATTRIBUTE_ACTIONConstant

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.

Details can be found in the GTK docs.

source
Gtk4.GLib.MENU_LINK_SECTIONConstant

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.

Details can be found in the GTK docs.

source
Gtk4.GLib.OPTION_REMAININGConstant

If a long option in the main group has this name, it is not treated as a regular option. Instead it collects all non-option arguments which would otherwise be left in argv. The option must be of type %GOPTIONARGCALLBACK, %GOPTIONARGSTRINGARRAY or %GOPTIONARGFILENAME_ARRAY.

Details can be found in the GTK docs.

source
Gtk4.GLib.POLLFD_FORMATConstant

A format specifier that can be used in printf()-style format strings when printing the @fd member of a #GPollFD.

Details can be found in the GTK docs.

source
Gtk4.GLib.TEST_OPTION_ISOLATE_DIRSConstant

Creates a unique temporary directory for each unit test and uses gsetuserdirs() to set XDG directories to point into subdirectories of it for the duration of the unit test. The directory tree is cleaned up after the test finishes successfully. Note that this doesn’t take effect until gtestrun() is called, so calls to (for example) ggetuserhome_dir() will return the system-wide value when made in a test program’s main() function.

Details can be found in the GTK docs.

source
Gtk4.GLib.VALUE_INTERNED_STRINGConstant

For string values, indicates that the string contained is canonical and will exist for the duration of the process. See gvaluesetinternedstring().

Details can be found in the GTK docs.

source
Gtk4.GLib.VALUE_NOCOPY_CONTENTSConstant

If passed to GVALUECOLLECT(), allocated data won't be copied but used verbatim. This does not affect ref-counted types like objects. This does not affect usage of gvaluecopy(), the data will be copied if it is not ref-counted.

Details can be found in the GTK docs.

source
Gtk4.GLib.VERSION_MIN_REQUIREDConstant

A macro that should be defined by the user prior to including the glib.h header. The definition should be one of the predefined GLib version macros: %GLIBVERSION226, %GLIBVERSION228,...

Details can be found in the GTK docs.

source
+GLib Reference · Gtk4.jl

GLib Reference

Public interface

Gtk4.GLib.bind_propertyFunction
bind_property(source::GObject, source_property, target::GObject, target_property, flags = BindingFlags_DEFAULT)

Creates a binding between source_property on source and target_property on target. When source_property is changed, target_property will be updated to the same value. Returns a GBinding object that can be used to release the binding using unbind_property.

See also unbind_property.

Related GTK function: g_object_bind_property

source
Gtk4.GLib.g_idle_addFunction
g_idle_add(f, priority=PRIORITY_DEFAULT_IDLE)

Add a Julia function f that will be called when there are no higher priority GTK events to be processed. This function can be used from any thread. The optional priority argument, which is an integer, sets the priority of the event source (smaller is higher priority). The GLib main loop uses this priority value to decide what sources to handle next.

See also @idle_add.

Related GTK function: g_idle_add_full()

source
Gtk4.GLib.g_source_removeMethod
g_source_remove(id::Integer)

Remove the event source identified by id from the GLib main loop. The id is returned by g_idle_add and g_timeout_add. The main loop reuses id's so care should be taken that the source intended to be removed is still active.

Related GTK function: g_source_remove()

source
Gtk4.GLib.g_timeout_addFunction
g_timeout_add(f, interval, priority=PRIORITY_DEFAULT)

Add a function f that will be called every interval milliseconds by the GTK main loop. The function is expected to return a Cint. If it returns a nonzero value, the function will be called again after another interval milliseconds. Otherwise it will not be called again. The optional priority argument, which is an integer, sets the priority of the event source (smaller is higher priority). The GLib main loop uses this priority value to decide what sources to handle next.

This function returns an event source ID that can be used with g_source_remove to stop the timeout.

Related GTK function: g_timeout_add()

source
Gtk4.GLib.@idle_addMacro
@idle_add(ex)

Create a function from an expression ex that will be called when there are no higher priority GTK events to be processed. This function can be used from any thread.

See also g_idle_add.

Related GTK function: g_idle_add()

source

Private methods

Gtk4.GLib.propertyinfoMethod
propertyinfo(w::GObject, name)

Prints information about a property of the GObject w, including a brief description, its type, its default value, and its current value.

source
Gtk4.GLib.set_uv_loop_integrationFunction
set_uv_loop_integration(s = "auto")

Change Gtk4.jl's libuv loop integration setting. The argument s should be "auto" to use Gtk4.jl's default setting or "enabled" or "disabled" to override this. This setting will take effect after restarting Julia.

Enabling libuv loop integration may improve REPL response on some platforms (Mac) but negatively impacts multithreaded performance. This function has no effect when running on Windows.

source
Gtk4.GLib.stop_main_loopMethod
stop_main_loop()

Stops the default GLib main loop after the next iteration. Does not affect loop operation if GApplication's run() method is being used instead of GLib.start_main_loop().

See also start_main_loop.

source
Gtk4.GLib.waitforsignalMethod
waitforsignal(obj::GObject, signal)

Returns when a GObject's signal is emitted. Can be used to wait for a window to be closed.

source

Types

Gtk4.GLib.AskPasswordFlagsType

#GAskPasswordFlags are used to request specific information from the user, or to notify the user of their choices in an authentication situation.

Details can be found in the GTK docs.

source
Gtk4.GLib.DateDMYType

This enumeration isn't used in the API, but may be useful if you need to mark a number as a day, month, or year.

Details can be found in the GTK docs.

source
Gtk4.GLib.DateMonthType

Enumeration representing a month; values are %GDATEJANUARY, %GDATEFEBRUARY, etc. %GDATEBAD_MONTH is the invalid value.

Details can be found in the GTK docs.

source
Gtk4.GLib.DateWeekdayType

Enumeration representing a day of the week; %GDATEMONDAY, %GDATETUESDAY, etc. %GDATEBAD_WEEKDAY is an invalid weekday.

Details can be found in the GTK docs.

source
Gtk4.GLib.ErrorTypeType

The possible errors, used in the @verror field of #GTokenValue, when the token is a %GTOKEN_ERROR.

Details can be found in the GTK docs.

source
Gtk4.GLib.FileErrorType

Values corresponding to @errno codes returned from file operations on UNIX. Unlike @errno codes, GFileError values are available on all systems, even Windows. The exact meaning of each code depends on what sort of file operation you were performing; the UNIX documentation gives more details. The following error code descriptions come from the GNU C Library manual, and are under the copyright of that manual.

Details can be found in the GTK docs.

source
Gtk4.GLib.FilesystemPreviewTypeType

Indicates a hint from the file system whether files should be previewed in a file manager. Returned as the value of the key %GFILEATTRIBUTEFILESYSTEMUSE_PREVIEW.

Details can be found in the GTK docs.

source
Gtk4.GLib.GAppInfoMonitorType

#GAppInfoMonitor is a very simple object used for monitoring the app info database for changes (ie: newly installed or removed applications).

Details can be found in the GTK docs.

source
Gtk4.GLib.GAppLaunchContextType

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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GApplicationType

A #GApplication is 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 as #GtkApplication or #MxApplication. In general, you should not use this class outside of a higher level framework.

Details can be found in the GTK docs.

source
Gtk4.GLib.GApplicationCommandLineType

#GApplicationCommandLine represents a command-line invocation of an application. It is created by #GApplication and emitted in the #GApplication::command-line signal and virtual function.

Details can be found in the GTK docs.

source
Gtk4.GLib.GBindingType

#GBinding is the representation of a binding between a property on a #GObject instance (or source) and another property on another #GObject instance (or target).

Details can be found in the GTK docs.

source
Gtk4.GLib.GBytesType

A simple refcounted data type representing an immutable sequence of zero or more bytes from an unspecified origin.

Details can be found in the GTK docs.

source
Gtk4.GLib.GBytesIconType

#GBytesIcon specifies an image held in memory in a common format (usually png) to be used as icon.

Details can be found in the GTK docs.

source
Gtk4.GLib.GCancellableType

GCancellable is a thread-safe operation cancellation stack used throughout GIO to allow for cancellation of synchronous and asynchronous operations.

Details can be found in the GTK docs.

source
Gtk4.GLib.GCredentialsType

The #GCredentials type is a reference-counted wrapper for native credentials. This information is typically used for identifying, authenticating and authorizing other processes.

Details can be found in the GTK docs.

source
Gtk4.GLib.GDBusActionGroupType

#GDBusActionGroup is an implementation of the #GActionGroup interface that can be used as a proxy for an action group that is exported over D-Bus with gdbusconnectionexportaction_group().

Details can be found in the GTK docs.

source
Gtk4.GLib.GDBusAuthObserverType

The #GDBusAuthObserver type provides a mechanism for participating in how a #GDBusServer (or a #GDBusConnection) authenticates remote peers. Simply instantiate a #GDBusAuthObserver and connect to the signals you are interested in. Note that new signals may be added in the future

Details can be found in the GTK docs.

source
Gtk4.GLib.GDBusConnectionType

The #GDBusConnection type 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 a #GIOStream.

Details can be found in the GTK docs.

source
Gtk4.GLib.GDBusMenuModelType

#GDBusMenuModel is an implementation of #GMenuModel that can be used as a proxy for a menu model that is exported over D-Bus with gdbusconnectionexportmenu_model().

Details can be found in the GTK docs.

source
Gtk4.GLib.GDBusMethodInvocationType

Instances of the #GDBusMethodInvocation class are used when handling D-Bus method calls. It provides a way to asynchronously return results and errors.

Details can be found in the GTK docs.

source
Gtk4.GLib.GDBusObjectManagerServerType

#GDBusObjectManagerServer is used to export #GDBusObject instances using the standardized org.freedesktop.DBus.ObjectManager interface. For example, remote D-Bus clients can get all objects and properties in a single call. Additionally, any change in the object hierarchy is broadcast using signals. This means that D-Bus clients can keep caches up to date by only listening to D-Bus signals.

Details can be found in the GTK docs.

source
Gtk4.GLib.GDBusObjectProxyType

A #GDBusObjectProxy is an object used to represent a remote object with one or more D-Bus interfaces. Normally, you don't instantiate a #GDBusObjectProxy yourself - typically #GDBusObjectManagerClient is used to obtain it.

Details can be found in the GTK docs.

source
Gtk4.GLib.GDBusObjectSkeletonType

A #GDBusObjectSkeleton instance is essentially a group of D-Bus interfaces. The set of exported interfaces on the object may be dynamic and change at runtime.

Details can be found in the GTK docs.

source
Gtk4.GLib.GDBusProxyType

#GDBusProxy is a base class used for proxies to access a D-Bus interface on a remote object. A #GDBusProxy can be constructed for both well-known and unique names.

Details can be found in the GTK docs.

source
Gtk4.GLib.GDBusServerType

#GDBusServer is 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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GDataInputStreamType

Data input stream implements #GInputStream and includes functions for reading structured data directly from a binary input stream.

Details can be found in the GTK docs.

source
Gtk4.GLib.GDateType

Represents a day between January 1, Year 1 and a few thousand years in the future. None of its members should be accessed directly.

Details can be found in the GTK docs.

source
Gtk4.GLib.GEmblemType

#GEmblem is an implementation of #GIcon that supports having an emblem, which is an icon with additional properties. It can than be added to a #GEmblemedIcon.

Details can be found in the GTK docs.

source
Gtk4.GLib.GEmblemedIconType

#GEmblemedIcon is an implementation of #GIcon that supports adding an emblem to an icon. Adding multiple emblems to an icon is ensured via gemblemediconaddemblem().

Details can be found in the GTK docs.

source
Gtk4.GLib.GFileEnumeratorType

#GFileEnumerator allows you to operate on a set of #GFiles, returning a #GFileInfo structure for each file enumerated (e.g. gfileenumerate_children() will return a #GFileEnumerator for each of the children within a directory).

Details can be found in the GTK docs.

source
Gtk4.GLib.GFileInfoType

Functionality for manipulating basic metadata for files. #GFileInfo implements methods for getting information that all files should contain, and allows for manipulation of extended attributes.

Details can be found in the GTK docs.

source
Gtk4.GLib.GFilenameCompleterType

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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GFilterInputStreamType

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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GFilterOutputStreamType

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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GIOModuleType

Provides an interface and default functions for loading and unloading modules. This is used internally to make GIO extensible, but can also be used by others to implement module loading.

Details can be found in the GTK docs.

source
Gtk4.GLib.GIOStreamType

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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GInetAddressType

#GInetAddress represents an IPv4 or IPv6 internet address. Use gresolverlookupbyname() or gresolverlookupbynameasync() to look up the #GInetAddress for a hostname. Use gresolverlookupbyaddress() or gresolverlookupbyaddressasync() to look up the hostname for a #GInetAddress.

Details can be found in the GTK docs.

source
Gtk4.GLib.GInetAddressMaskType

#GInetAddressMask represents 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".

Details can be found in the GTK docs.

source
Gtk4.GLib.GInputStreamType

#GInputStream has functions to read from a stream (ginputstreamread()), to close a stream (ginputstreamclose()) and to skip some content (ginputstream_skip()).

Details can be found in the GTK docs.

source
Gtk4.GLib.GInputVectorType

Structure used for scatter/gather data input. You generally pass in an array of #GInputVectors and the operation will store the read data starting in the first buffer, switching to the next as needed.

Details can be found in the GTK docs.

source
Gtk4.GLib.GLogFieldType

Structure representing a single field in a structured log entry. See glogstructured() for details.

Details can be found in the GTK docs.

source
Gtk4.GLib.GMainContextType

The GMainContext struct is an opaque data type representing a set of sources to be handled in a main loop.

Details can be found in the GTK docs.

source
Gtk4.GLib.GMainLoopType

The GMainLoop struct is an opaque data type representing the main event loop of a GLib or GTK+ application.

Details can be found in the GTK docs.

source
Gtk4.GLib.GMappedFileType

The #GMappedFile represents a file mapping created with gmappedfile_new(). It has only private members and should not be accessed directly.

Details can be found in the GTK docs.

source
Gtk4.GLib.GMenuType

#GMenu is a simple implementation of #GMenuModel. You populate a #GMenu by adding #GMenuItem instances to it.

Details can be found in the GTK docs.

source
Gtk4.GLib.GMenuModelType

#GMenuModel represents 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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GMountOperationType

#GMountOperation provides 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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GNetworkAddressType

#GNetworkAddress provides 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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GNetworkServiceType

Like #GNetworkAddress does with hostnames, #GNetworkService provides 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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GNotificationType

#GNotification is a mechanism for creating a notification to be shown to the user – typically as a pop-up notification presented by the desktop environment shell.

Details can be found in the GTK docs.

source
Gtk4.GLib.GOptionEntryType

A GOptionEntry struct defines a single option. To have an effect, they must be added to a #GOptionGroup with goptioncontextaddmainentries() or goptiongroupadd_entries().

Details can be found in the GTK docs.

source
Gtk4.GLib.GOutputStreamType

#GOutputStream has functions to write to a stream (goutputstreamwrite()), to close a stream (goutputstreamclose()) and to flush pending writes (goutputstream_flush()).

Details can be found in the GTK docs.

source
Gtk4.GLib.GOutputVectorType

Structure used for scatter/gather data output. You generally pass in an array of #GOutputVectors and the operation will use all the buffers as if they were one buffer.

Details can be found in the GTK docs.

source
Gtk4.GLib.GPatternSpecType

A GPatternSpec struct is the 'compiled' form of a pattern. This structure is opaque and its fields cannot be accessed directly.

Details can be found in the GTK docs.

source
Gtk4.GLib.GPropertyActionType

A #GPropertyAction is a way to get a #GAction with a state value reflecting and controlling the value of a #GObject property.

Details can be found in the GTK docs.

source
Gtk4.GLib.GProxyAddressEnumeratorType

#GProxyAddressEnumerator is a wrapper around #GSocketAddressEnumerator which takes the #GSocketAddress instances returned by the #GSocketAddressEnumerator and wraps them in #GProxyAddress instances, using the given #GProxyAddressEnumerator:proxy-resolver.

Details can be found in the GTK docs.

source
Gtk4.GLib.GRegexType

The gregex*() functions implement regular expression pattern matching using syntax and semantics similar to Perl regular expression.

Details can be found in the GTK docs.

source
Gtk4.GLib.GResolverType

#GResolver provides cancellable synchronous and asynchronous DNS resolution, for hostnames (gresolverlookupbyaddress(), gresolverlookupbyname() and their async variants) and SRV (service) records (gresolverlookup_service()).

Details can be found in the GTK docs.

source
Gtk4.GLib.GResourceType

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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GScannerConfigType

Specifies the #GScanner parser configuration. Most settings can be changed during the parsing phase and will affect the lexical parsing of the next unpeeked token.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSettingsType

The #GSettings class provides a convenient API for storing and retrieving application settings.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSettingsBackendType

The #GSettingsBackend interface defines a generic interface for non-strictly-typed data that is stored in a hierarchy. To implement an alternative storage backend for #GSettings, you need to implement the #GSettingsBackend interface and then make it implement the extension point %GSETTINGSBACKENDEXTENSIONPOINT_NAME.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSettingsSchemaType

The #GSettingsSchemaSource and #GSettingsSchema APIs provide a mechanism for advanced control over the loading of schemas and a mechanism for introspecting their content.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSimpleActionType

A #GSimpleAction is the obvious simple implementation of the #GAction interface. This is the easiest way to create an action for purposes of adding it to a #GSimpleActionGroup.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSimpleIOStreamType

GSimpleIOStream creates a #GIOStream from an arbitrary #GInputStream and #GOutputStream. This allows any pair of input and output streams to be used with #GIOStream methods.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSimplePermissionType

#GSimplePermission is a trivial implementation of #GPermission that represents a permission that is either always or never allowed. The value is given at construction and doesn't change.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSimpleProxyResolverType

#GSimpleProxyResolver is a simple #GProxyResolver implementation that handles a single default proxy, multiple URI-scheme-specific proxies, and a list of hosts that proxies should not be used for.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSocketType

A #GSocket is 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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSocketAddressType

#GSocketAddress is the equivalent of struct sockaddr in the BSD sockets API. This is an abstract class; use #GInetSocketAddress for internet sockets, or #GUnixSocketAddress for UNIX domain sockets.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSocketAddressEnumeratorType

#GSocketAddressEnumerator is an enumerator type for #GSocketAddress instances. It is returned by enumeration functions such as gsocketconnectable_enumerate(), which returns a #GSocketAddressEnumerator to list each #GSocketAddress which could be used to connect to that #GSocketConnectable.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSocketClientType

#GSocketClient is a lightweight high-level utility class for connecting to a network host using a connection oriented socket type.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSocketConnectionType

#GSocketConnection is a #GIOStream for a connected socket. They can be created either by #GSocketClient when connecting to a host, or by #GSocketListener when accepting a new client.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSocketControlMessageType

A #GSocketControlMessage is a special-purpose utility message that can be sent to or received from a #GSocket. These types of messages are often called "ancillary data".

Details can be found in the GTK docs.

source
Gtk4.GLib.GSocketListenerType

A #GSocketListener is 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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSocketServiceType

A #GSocketService is 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 the #GSocketService::incoming signal is emitted.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSrvTargetType

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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSubprocessLauncherType

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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GTcpWrapperConnectionType

A #GTcpWrapperConnection can be used to wrap a #GIOStream that is based on a #GSocket, but which is not actually a #GSocketConnection. This is used by #GSocketClient so that it can always return a #GSocketConnection, even when the connection it has actually created is not directly a #GSocketConnection.

Details can be found in the GTK docs.

source
Gtk4.GLib.GThemedIconType

#GThemedIcon is an implementation of #GIcon that supports icon themes. #GThemedIcon contains a list of all of the icons present in an icon theme, so that icons can be looked up quickly. #GThemedIcon does not provide actual pixmaps for icons, just the icon names. Ideally something like gtkiconthemechooseicon() should be used to resolve the list of names so that fallback icons work nicely with themes that inherit other themes.

Details can be found in the GTK docs.

source
Gtk4.GLib.GThreadedSocketServiceType

A #GThreadedSocketService is a simple subclass of #GSocketService that handles incoming connections by creating a worker thread and dispatching the connection to it by emitting the #GThreadedSocketService::run signal in the new thread.

Details can be found in the GTK docs.

source
Gtk4.GLib.GTlsCertificateType

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 #GTlsServerConnection).

Details can be found in the GTK docs.

source
Gtk4.GLib.GTlsConnectionType

#GTlsConnection is the base TLS connection class type, which wraps a #GIOStream and provides TLS encryption on top of it. Its subclasses, #GTlsClientConnection and #GTlsServerConnection, implement client-side and server-side TLS, respectively.

Details can be found in the GTK docs.

source
Gtk4.GLib.GTlsDatabaseType

#GTlsDatabase is 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.

Details can be found in the GTK docs.

source
Gtk4.GLib.GTlsInteractionType

#GTlsInteraction provides a mechanism for the TLS connection and database code to interact with the user. It can be used to ask the user for passwords.

Details can be found in the GTK docs.

source
Gtk4.GLib.GUnixCredentialsMessageType

This #GSocketControlMessage contains a #GCredentials instance. It may be sent using gsocketsendmessage() and received using gsocketreceivemessage() over UNIX sockets (ie: sockets in the %GSOCKETFAMILY_UNIX family).

Details can be found in the GTK docs.

source
Gtk4.GLib.GUriType

The #GUri type and related functions can be used to parse URIs into their components, and build valid URIs from individual components.

Details can be found in the GTK docs.

source
Gtk4.GLib.GVariantTypeType

This section introduces the GVariant type system. It is based, in large part, on the D-Bus type system, with two major changes and some minor lifting of restrictions. The D-Bus specification, therefore, provides a significant amount of information that is useful when working with GVariant.

Details can be found in the GTK docs.

source
Gtk4.GLib.GVolumeMonitorType

#GVolumeMonitor is 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.

Details can be found in the GTK docs.

source
Gtk4.GLib.IOErrorType

#GIOError is only used by the deprecated functions giochannelread(), giochannelwrite(), and giochannel_seek().

Details can be found in the GTK docs.

source
Gtk4.GLib.IOFlagsType

Specifies properties of a #GIOChannel. Some of the flags can only be read with giochannelgetflags(), but not changed with giochannelsetflags().

Details can be found in the GTK docs.

source
Gtk4.GLib.LogWriterOutputType

Return values from #GLogWriterFuncs to indicate whether the given log entry was successfully handled by the writer, or whether there was an error in handling it (and hence a fallback writer should be used).

Details can be found in the GTK docs.

source
Gtk4.GLib.MarkupCollectTypeType

A mixed enumerated type and flags field. You must specify one type (string, strdup, boolean, tristate). Additionally, you may optionally bitwise OR the type with the flag %GMARKUPCOLLECT_OPTIONAL.

Details can be found in the GTK docs.

source
Gtk4.GLib.NormalizeModeType

Defines how a Unicode string is transformed in a canonical form, standardizing such issues as whether a character with an accent is represented as a base character and combining accent or as a single precomposed character. Unicode strings should generally be normalized before comparing them.

Details can be found in the GTK docs.

source
Gtk4.GLib.OptionArgType

The #GOptionArg enum values determine which type of extra argument the options expect to find. If an option expects an extra argument, it can be specified in several ways; with a short option: -x arg, with a long option: --name arg or combined in a single argument: --name=arg.

Details can be found in the GTK docs.

source
Gtk4.GLib.ResolverRecordTypeType

The type of record that gresolverlookuprecords() or gresolverlookuprecords_async() should retrieve. The records are returned as lists of #GVariant tuples. Each record type has different values in the variant tuples returned.

Details can be found in the GTK docs.

source
Gtk4.GLib.SettingsBindFlagsType

Flags used when creating a binding. These flags determine in which direction the binding works. The default is to synchronize in both directions.

Details can be found in the GTK docs.

source
Gtk4.GLib.SignalMatchTypeType

The match types specify what gsignalhandlersblockmatched(), gsignalhandlersunblockmatched() and gsignalhandlersdisconnectmatched() match signals by.

Details can be found in the GTK docs.

source
Gtk4.GLib.SocketFamilyType

The protocol family of a #GSocketAddress. (These values are identical to the system defines %AFINET, %AFINET6 and %AF_UNIX, if available.)

Details can be found in the GTK docs.

source
Gtk4.GLib.SocketMsgFlagsType

Flags used in gsocketreceivemessage() and gsocketsendmessage(). The flags listed in the enum are some commonly available flags, but the values used for them are the same as on the platform, and any other flags are passed in/out as is. So to use a platform specific flag, just include the right system header and pass in the flag.

Details can be found in the GTK docs.

source
Gtk4.GLib.SocketProtocolType

A protocol identifier is specified when creating a #GSocket, which is a family/type specific identifier, where 0 means the default protocol for the particular family/type.

Details can be found in the GTK docs.

source
Gtk4.GLib.TlsCertificateFlagsType

A set of flags describing TLS certification validation. This can be used to describe why a particular certificate was rejected (for example, in #GTlsConnection::accept-certificate).

Details can be found in the GTK docs.

source
Gtk4.GLib.TlsProtocolVersionType

The TLS or DTLS protocol version used by a #GTlsConnection or #GDtlsConnection. 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 be %GTLSPROTOCOLVERSIONUNKNOWN if 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.

Details can be found in the GTK docs.

source
Gtk4.GLib.TraverseFlagsType

Specifies which nodes are visited during several of the tree functions, including gnodetraverse() and gnodefind().

Details can be found in the GTK docs.

source
Gtk4.GLib.TraverseTypeType

Specifies the type of traversal performed by gtreetraverse(), gnodetraverse() and gnodefind(). The different orders are illustrated here:

  • In order: A, B, C, D, E, F, G, H, I
  • Pre order: F, B, A, D, C, E, G, I, H
  • Post order: A, C, E, D, B, H, I, G, F
  • Level order: F, B, G, A, D, I, C, E, H

Details can be found in the GTK docs.

source
Gtk4.GLib.UnicodeScriptType

The #GUnicodeScript enumeration identifies different writing systems. The values correspond to the names as defined in the Unicode standard. The enumeration has been added in GLib 2.14, and is interchangeable with #PangoScript.

Details can be found in the GTK docs.

source
Gtk4.GLib.UnixSocketAddressTypeType

The type of name used by a #GUnixSocketAddress. %GUNIXSOCKETADDRESSPATH indicates a traditional unix domain socket bound to a filesystem path. %GUNIXSOCKETADDRESSANONYMOUS indicates a socket not bound to any name (eg, a client-side socket, or a socket created with socketpair()).

Details can be found in the GTK docs.

source
Gtk4.GLib.UriHideFlagsType

Flags describing what parts of the URI to hide in guritostringpartial(). Note that %GURIHIDEPASSWORD and %GURIHIDEAUTH_PARAMS will only work if the #GUri was parsed with the corresponding flags.

Details can be found in the GTK docs.

source
Gtk4.GLib.UserDirectoryType

These are logical ids for special directories which are defined depending on the platform used. You should use ggetuserspecialdir() to retrieve the full path associated to the logical id.

Details can be found in the GTK docs.

source

Constants

Gtk4.GLib.ASCII_DTOSTR_BUF_SIZEConstant

A good size for a buffer to be passed into gasciidtostr(). It is guaranteed to be enough for all output of that function on systems with 64bit IEEE-compatible doubles.

Details can be found in the GTK docs.

source
Gtk4.GLib.CSET_A_2_ZConstant

The set of uppercase ASCII alphabet characters. Used for specifying valid identifier characters in #GScannerConfig.

Details can be found in the GTK docs.

source
Gtk4.GLib.CSET_a_2_zConstant

The set of lowercase ASCII alphabet characters. Used for specifying valid identifier characters in #GScannerConfig.

Details can be found in the GTK docs.

source
Gtk4.GLib.DATALIST_FLAGS_MASKConstant

A bitmask that restricts the possible flags passed to gdatalistsetflags(). Passing a flags value where flags & ~GDATALISTFLAGSMASK != 0 is an error.

Details can be found in the GTK docs.

source
Gtk4.GLib.DBUS_METHOD_INVOCATION_HANDLEDConstant

The value returned by handlers of the signals generated by the gdbus-codegen tool to indicate that a method call has been handled by an implementation. It is equal to %TRUE, but using this macro is sometimes more readable.

Details can be found in the GTK docs.

source
Gtk4.GLib.DBUS_METHOD_INVOCATION_UNHANDLEDConstant

The value returned by handlers of the signals generated by the gdbus-codegen tool to indicate that a method call has not been handled by an implementation. It is equal to %FALSE, but using this macro is sometimes more readable.

Details can be found in the GTK docs.

source
Gtk4.GLib.FILE_ATTRIBUTE_STANDARD_IS_VOLATILEConstant

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 %GFILEATTRIBUTESTANDARDSYMLINK_TARGET for the persistent URI.

Details can be found in the GTK docs.

source
Gtk4.GLib.FILE_ATTRIBUTE_TIME_ACCESS_NSECConstant

A key in the "time" namespace for getting the nanoseconds of the time the file was last accessed. This should be used in conjunction with #GFILEATTRIBUTETIMEACCESS. Corresponding #GFileAttributeType is %GFILEATTRIBUTETYPEUINT32.

Details can be found in the GTK docs.

source
Gtk4.GLib.FILE_ATTRIBUTE_TIME_CHANGED_NSECConstant

A key in the "time" namespace for getting the nanoseconds of the time the file was last changed. This should be used in conjunction with #GFILEATTRIBUTETIMECHANGED. Corresponding #GFileAttributeType is %GFILEATTRIBUTETYPEUINT32.

Details can be found in the GTK docs.

source
Gtk4.GLib.FILE_ATTRIBUTE_TIME_CREATED_NSECConstant

A key in the "time" namespace for getting the nanoseconds of the time the file was created. This should be used in conjunction with #GFILEATTRIBUTETIMECREATED. Corresponding #GFileAttributeType is %GFILEATTRIBUTETYPEUINT32.

Details can be found in the GTK docs.

source
Gtk4.GLib.FILE_ATTRIBUTE_TIME_MODIFIED_NSECConstant

A key in the "time" namespace for getting the nanoseconds of the time the file was last modified. This should be used in conjunction with #GFILEATTRIBUTETIMEMODIFIED. Corresponding #GFileAttributeType is %GFILEATTRIBUTETYPEUINT32.

Details can be found in the GTK docs.

source
Gtk4.GLib.GINT16_FORMATConstant

This is the platform dependent conversion specifier for scanning and printing values of type #gint16. It is a string literal, but doesn't include the percent-sign, such that you can add precision and length modifiers between percent-sign and conversion specifier.

Details can be found in the GTK docs.

source
Gtk4.GLib.GINT16_MODIFIERConstant

The platform dependent length modifier for conversion specifiers for scanning and printing values of type #gint16 or #guint16. It is a string literal, but doesn't include the percent-sign, such that you can add precision and length modifiers between percent-sign and conversion specifier and append a conversion specifier.

Details can be found in the GTK docs.

source
Gtk4.GLib.GINT32_FORMATConstant

This is the platform dependent conversion specifier for scanning and printing values of type #gint32. See also %GGINT16FORMAT.

Details can be found in the GTK docs.

source
Gtk4.GLib.GINT32_MODIFIERConstant

The platform dependent length modifier for conversion specifiers for scanning and printing values of type #gint32 or #guint32. It is a string literal. See also %GGINT16MODIFIER.

Details can be found in the GTK docs.

source
Gtk4.GLib.GINT64_FORMATConstant

This is the platform dependent conversion specifier for scanning and printing values of type #gint64. See also %GGINT16FORMAT.

Details can be found in the GTK docs.

source
Gtk4.GLib.GINT64_MODIFIERConstant

The platform dependent length modifier for conversion specifiers for scanning and printing values of type #gint64 or #guint64. It is a string literal.

Details can be found in the GTK docs.

source
Gtk4.GLib.GINTPTR_MODIFIERConstant

The platform dependent length modifier for conversion specifiers for scanning and printing values of type #gintptr or #guintptr. It is a string literal.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSIZE_FORMATConstant

This is the platform dependent conversion specifier for scanning and printing values of type #gsize. See also %GGINT16FORMAT.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSIZE_MODIFIERConstant

The platform dependent length modifier for conversion specifiers for scanning and printing values of type #gsize. It is a string literal.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSSIZE_FORMATConstant

This is the platform dependent conversion specifier for scanning and printing values of type #gssize. See also %GGINT16FORMAT.

Details can be found in the GTK docs.

source
Gtk4.GLib.GSSIZE_MODIFIERConstant

The platform dependent length modifier for conversion specifiers for scanning and printing values of type #gssize. It is a string literal.

Details can be found in the GTK docs.

source
Gtk4.GLib.GUINT16_FORMATConstant

This is the platform dependent conversion specifier for scanning and printing values of type #guint16. See also %GGINT16FORMAT

Details can be found in the GTK docs.

source
Gtk4.GLib.GUINT32_FORMATConstant

This is the platform dependent conversion specifier for scanning and printing values of type #guint32. See also %GGINT16FORMAT.

Details can be found in the GTK docs.

source
Gtk4.GLib.GUINT64_FORMATConstant

This is the platform dependent conversion specifier for scanning and printing values of type #guint64. See also %GGINT16FORMAT.

Details can be found in the GTK docs.

source
Gtk4.GLib.HOOK_FLAG_USER_SHIFTConstant

The position of the first bit which is not reserved for internal use be the #GHook implementation, i.e. 1 << G_HOOK_FLAG_USER_SHIFT is the first bit which can be used for application-defined flags.

Details can be found in the GTK docs.

source
Gtk4.GLib.KEY_FILE_DESKTOP_KEY_EXECConstant

A key under %GKEYFILEDESKTOPGROUP, whose value is a string giving the command line to execute. It is only valid for desktop entries with the Application type.

Details can be found in the GTK docs.

source
Gtk4.GLib.KEY_FILE_DESKTOP_KEY_PATHConstant

A key under %GKEYFILEDESKTOPGROUP, whose value is a string containing the working directory to run the program in. It is only valid for desktop entries with the Application type.

Details can be found in the GTK docs.

source
Gtk4.GLib.KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASSConstant

A key under %GKEYFILEDESKTOPGROUP, whose value is string identifying the WM class or name hint of a window that the application will create, which can be used to emulate Startup Notification with older applications.

Details can be found in the GTK docs.

source
Gtk4.GLib.KEY_FILE_DESKTOP_KEY_TRY_EXECConstant

A key under %GKEYFILEDESKTOPGROUP, whose value is a string giving the file name of a binary on disk used to determine if the program is actually installed. It is only valid for desktop entries with the Application type.

Details can be found in the GTK docs.

source
Gtk4.GLib.MENU_ATTRIBUTE_ACTIONConstant

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.

Details can be found in the GTK docs.

source
Gtk4.GLib.MENU_LINK_SECTIONConstant

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.

Details can be found in the GTK docs.

source
Gtk4.GLib.OPTION_REMAININGConstant

If a long option in the main group has this name, it is not treated as a regular option. Instead it collects all non-option arguments which would otherwise be left in argv. The option must be of type %GOPTIONARGCALLBACK, %GOPTIONARGSTRINGARRAY or %GOPTIONARGFILENAME_ARRAY.

Details can be found in the GTK docs.

source
Gtk4.GLib.POLLFD_FORMATConstant

A format specifier that can be used in printf()-style format strings when printing the @fd member of a #GPollFD.

Details can be found in the GTK docs.

source
Gtk4.GLib.TEST_OPTION_ISOLATE_DIRSConstant

Creates a unique temporary directory for each unit test and uses gsetuserdirs() to set XDG directories to point into subdirectories of it for the duration of the unit test. The directory tree is cleaned up after the test finishes successfully. Note that this doesn’t take effect until gtestrun() is called, so calls to (for example) ggetuserhome_dir() will return the system-wide value when made in a test program’s main() function.

Details can be found in the GTK docs.

source
Gtk4.GLib.VALUE_INTERNED_STRINGConstant

For string values, indicates that the string contained is canonical and will exist for the duration of the process. See gvaluesetinternedstring().

Details can be found in the GTK docs.

source
Gtk4.GLib.VALUE_NOCOPY_CONTENTSConstant

If passed to GVALUECOLLECT(), allocated data won't be copied but used verbatim. This does not affect ref-counted types like objects. This does not affect usage of gvaluecopy(), the data will be copied if it is not ref-counted.

Details can be found in the GTK docs.

source
Gtk4.GLib.VERSION_MIN_REQUIREDConstant

A macro that should be defined by the user prior to including the glib.h header. The definition should be one of the predefined GLib version macros: %GLIBVERSION226, %GLIBVERSION228,...

Details can be found in the GTK docs.

source
diff --git a/dev/doc/reference/index.html b/dev/doc/reference/index.html index aedc0d3e..f9e35036 100644 --- a/dev/doc/reference/index.html +++ b/dev/doc/reference/index.html @@ -1,15 +1,15 @@ -Gtk4 Reference · Gtk4.jl

Gtk4 Reference

Public interface

Base.parentFunction
parent(w::GtkWidget)

Returns the parent widget of w, or nothing if the widget has not been set as the child of another widget (or is a toplevel widget, like a GtkWindow).

See also toplevel.

Related GTK function: gtk_widget_get_parent()

source
Gtk4.activateMethod
activate(w::GtkWidget)

Activates widgets like buttons, menu items, etc. that support being activated. Returns false if the widget is not activatable.

Related GTK function: gtk_widget_activate()

source
Gtk4.ask_dialogFunction
ask_dialog(question::AbstractString, parent = nothing; timeout = -1)

Create a dialog with a message question and two buttons "No" and "Yes". Returns true if "Yes" is selected and false if "No" is selected or the dialog (or its parent window parent) is closed. The optional input timeout (disabled by default) can be used to set a time in seconds after which the dialog will close and false will be returned.

source
Gtk4.bufferMethod
buffer(iter::Union{Ref{_GtkTextIter}, _GtkTextIter})

Returns the buffer associated with iter.

source
Gtk4.configure!Method
configure!(adj::GtkAdjustment; value = nothing, lower = nothing, upper = nothing, step_increment = nothing, page_increment = nothing, page_size = nothing)

Sets all properties of an adjustment, while only resulting in one emission of the changed signal. If an argument is nothing, it is not changed.

Related GTK function: gtk_adjustment_configure()

source
Gtk4.configure!Method
configure!(sb::GtkSpinButton; adj = nothing, climb_rate = nothing, digits = nothing)

Sets the adjustment adj, the climb_rate, and the number of digits of a GtkSpinButton. If an argument is nothing, it is not changed.

Related GTK function: gtk_spin_button_configure()

source
Gtk4.create_markMethod
create_mark(buffer::GtkTextBuffer, mark_name, it::TI, left_gravity::Bool)
-create_mark(buffer::GtkTextBuffer, it::TI)

Impements gtk_text_buffer_create_mark.

source
Gtk4.info_dialogFunction
info_dialog(message::AbstractString, parent = nothing; timeout = -1)

Create a dialog with an informational message message. Returns when the dialog (or its parent window parent) is closed. The optional input timeout (disabled by default) can be used to set a time in seconds after which the dialog will close and false will be returned.

source
Gtk4.input_dialogFunction
input_dialog(message::AbstractString, entry_default::AbstractString, buttons = (("Cancel", 0), ("Accept", 1)), parent = nothing; timeout = -1)

Create a dialog with a message message and a text entry. Returns the string in the entry when the "Accept" button is pressed, or entry_default if "Cancel" is pressed or the dialog or its parent window parent is closed. The optional input timeout (disabled by default) can be used to set a time in seconds after which the dialog will close and entry_default will be returned.

source
Gtk4.open_dialogFunction
open_dialog(title::AbstractString, parent = nothing, filters::Union{AbstractVector, Tuple} = String[]; timeout = -1, multiple = false, start_folder = "")

Create a dialog for choosing a file or folder to be opened. Returns the path chosen by the user, or "" if "Cancel" is pressed or the dialog or its parent window parent is closed. The dialog title is set using title. The argument filters can be used to show only directory contents that match certain file extensions.

Keyword arguments: timeout: The optional input timeout (disabled by default) can be used to set a time in seconds after which the dialog will close and "" will be returned. multiple: if true, multiple files can be selected, and a list of file paths is returned rather than a single path. start_folder: if set, the dialog will start out browsing a particular folder. Otherwise GTK will decide.

source
Gtk4.place_cursorMethod
place_cursor(buffer::GtkTextBuffer, it::_GtkTextIter)
-place_cursor(buffer::GtkTextBuffer, pos::Int)

Place the cursor at indicated position.

source
Gtk4.presentMethod
present(win::GtkWindow)
-present(win::GtkWindow, timestamp)

Presents a window to the user. Usually means move it to the front. According to the GTK docs, this function "should not be used" without including a timestamp for the user's request.

Related GTK function: gtk_window_present() Related GTK function: gtk_window_present_with_time()

source
Gtk4.save_dialogFunction
save_dialog(title::AbstractString, parent = nothing, filters::Union{AbstractVector, Tuple} = String[]; timeout = -1, start_folder = "")

Create a dialog for choosing a file to be saved to. Returns the path chosen by the user, or "" if "Cancel" is pressed or the dialog or its parent window parent is closed. The window title is set using title. The argument filters can be used to show only directory contents that match certain file extensions.

Keyword arguments: timeout: The optional input timeout (disabled by default) can be used to set a time in seconds after which the dialog will close and "" will be returned. start_folder: if set, the dialog will start out browsing a particular folder. Otherwise GTK will decide.

source
Gtk4.screen_sizeFunction
screen_size(widget=nothing)

Returns a tuple (width,height) that gives the primary monitor size for the display where widget is being displayed, or the default display if widget is unrealized or not given.

source
Gtk4.scroll_toMethod
scroll_to(view::GtkTextView, mark::GtkTextMark, within_margin::Real,
+Gtk4 Reference · Gtk4.jl

Gtk4 Reference

Public interface

Base.parentFunction
parent(w::GtkWidget)

Returns the parent widget of w, or nothing if the widget has not been set as the child of another widget (or is a toplevel widget, like a GtkWindow).

See also toplevel.

Related GTK function: gtk_widget_get_parent()

source
Gtk4.activateMethod
activate(w::GtkWidget)

Activates widgets like buttons, menu items, etc. that support being activated. Returns false if the widget is not activatable.

Related GTK function: gtk_widget_activate()

source
Gtk4.ask_dialogFunction
ask_dialog(question::AbstractString, parent = nothing; timeout = -1)

Create a dialog with a message question and two buttons "No" and "Yes". Returns true if "Yes" is selected and false if "No" is selected or the dialog (or its parent window parent) is closed. The optional input timeout (disabled by default) can be used to set a time in seconds after which the dialog will close and false will be returned.

source
Gtk4.bufferMethod
buffer(iter::Union{Ref{_GtkTextIter}, _GtkTextIter})

Returns the buffer associated with iter.

source
Gtk4.configure!Method
configure!(adj::GtkAdjustment; value = nothing, lower = nothing, upper = nothing, step_increment = nothing, page_increment = nothing, page_size = nothing)

Sets all properties of an adjustment, while only resulting in one emission of the changed signal. If an argument is nothing, it is not changed.

Related GTK function: gtk_adjustment_configure()

source
Gtk4.configure!Method
configure!(sb::GtkSpinButton; adj = nothing, climb_rate = nothing, digits = nothing)

Sets the adjustment adj, the climb_rate, and the number of digits of a GtkSpinButton. If an argument is nothing, it is not changed.

Related GTK function: gtk_spin_button_configure()

source
Gtk4.create_markMethod
create_mark(buffer::GtkTextBuffer, mark_name, it::TI, left_gravity::Bool)
+create_mark(buffer::GtkTextBuffer, it::TI)

Impements gtk_text_buffer_create_mark.

source
Gtk4.info_dialogFunction
info_dialog(message::AbstractString, parent = nothing; timeout = -1)

Create a dialog with an informational message message. Returns when the dialog (or its parent window parent) is closed. The optional input timeout (disabled by default) can be used to set a time in seconds after which the dialog will close and false will be returned.

source
Gtk4.input_dialogFunction
input_dialog(message::AbstractString, entry_default::AbstractString, buttons = (("Cancel", 0), ("Accept", 1)), parent = nothing; timeout = -1)

Create a dialog with a message message and a text entry. Returns the string in the entry when the "Accept" button is pressed, or entry_default if "Cancel" is pressed or the dialog or its parent window parent is closed. The optional input timeout (disabled by default) can be used to set a time in seconds after which the dialog will close and entry_default will be returned.

source
Gtk4.open_dialogFunction
open_dialog(title::AbstractString, parent = nothing, filters::Union{AbstractVector, Tuple} = String[]; timeout = -1, multiple = false, start_folder = "")

Create a dialog for choosing a file or folder to be opened. Returns the path chosen by the user, or "" if "Cancel" is pressed or the dialog or its parent window parent is closed. The dialog title is set using title. The argument filters can be used to show only directory contents that match certain file extensions.

Keyword arguments: timeout: The optional input timeout (disabled by default) can be used to set a time in seconds after which the dialog will close and "" will be returned. multiple: if true, multiple files can be selected, and a list of file paths is returned rather than a single path. start_folder: if set, the dialog will start out browsing a particular folder. Otherwise GTK will decide.

source
Gtk4.place_cursorMethod
place_cursor(buffer::GtkTextBuffer, it::_GtkTextIter)
+place_cursor(buffer::GtkTextBuffer, pos::Int)

Place the cursor at indicated position.

source
Gtk4.presentMethod
present(win::GtkWindow)
+present(win::GtkWindow, timestamp)

Presents a window to the user. Usually means move it to the front. According to the GTK docs, this function "should not be used" without including a timestamp for the user's request.

Related GTK function: gtk_window_present() Related GTK function: gtk_window_present_with_time()

source
Gtk4.save_dialogFunction
save_dialog(title::AbstractString, parent = nothing, filters::Union{AbstractVector, Tuple} = String[]; timeout = -1, start_folder = "")

Create a dialog for choosing a file to be saved to. Returns the path chosen by the user, or "" if "Cancel" is pressed or the dialog or its parent window parent is closed. The window title is set using title. The argument filters can be used to show only directory contents that match certain file extensions.

Keyword arguments: timeout: The optional input timeout (disabled by default) can be used to set a time in seconds after which the dialog will close and "" will be returned. start_folder: if set, the dialog will start out browsing a particular folder. Otherwise GTK will decide.

source
Gtk4.screen_sizeFunction
screen_size(widget=nothing)

Returns a tuple (width,height) that gives the primary monitor size for the display where widget is being displayed, or the default display if widget is unrealized or not given.

source
Gtk4.scroll_toMethod
scroll_to(view::GtkTextView, mark::GtkTextMark, within_margin::Real,
                use_align::Bool, xalign::Real, yalign::Real)
 
 scroll_to(view::GtkTextView, iter::TI, within_margin::Real,
-          use_align::Bool, xalign::Real, yalign::Real)

Implements gtk_text_view_scroll_to_mark and gtk_text_view_scroll_to_iter.

source
Gtk4.searchFunction
search(buffer::GtkTextBuffer, str::AbstractString, direction = :forward,
-    flag = GtkTextSearchFlags.GTK_TEXT_SEARCH_TEXT_ONLY)

Search text str in buffer in direction :forward or :backward starting from the cursor position in the buffer.

Returns a tuple (found, start, stop) where found indicates whether the search was successful and start and stop are _GtkTextIters containing the location of the match.

source
Gtk4.select_rangeMethod
select_range(buffer::GtkTextBuffer, ins::TI, bound::TI)
-select_range(buffer::GtkTextBuffer, range::GtkTextRange)

Select the text in buffer accorind to _GtkTextIter ins and bound.

Implements gtk_text_buffer_select_range.

source
Gtk4.selection_boundsMethod
selection_bounds(buffer::GtkTextBuffer)

Returns a tuple (selected, start, stop) indicating if text is selected in the buffer, and if so sets the _GtkTextIter start and stop to point to the selected text.

Implements gtk_text_buffer_get_selection_bounds.

source
Gtk4.widgetFunction
widget(c::GtkEventController)

Returns the widget associated with an event controller.

source
Gtk4.@load_builderMacro
@load_builder(b::GtkBuilder)

Loads all GtkBuildable objects from a GtkBuilder object and assigns them to Julia variables in the current scope. GtkBuilder ID's are mapped onto Julia variable names.

source

Private methods

Base.skipMethod
skip(iter::Ref{_GtkTextIter}, count::Integer, what::Symbol)

Moves iter according to the operation specified by what and count. Operations are :

  • :chars (gtk_text_iter_forward_chars)
  • :lines (gtk_text_iter_forward_lines)
  • :words (gtk_text_iter_forward_word_ends)
  • :word_cursor_positions (gtk_text_iter_forward_cursor_positions)
  • :sentences (gtk_text_iter_forward_sentence_ends)
  • :visible_words (gtk_text_iter_forward_visible_word_ends)
  • :visible_cursor_positions (gtk_text_iter_forward_visible_cursor_positions)
  • :visible_lines (gtk_text_iter_forward_visible_lines)
  • :line_ends (gtk_text_iter_forward_visible_lines)
source
Base.skipMethod
skip(iter::Ref{_GtkTextIter}, count::Integer)

Moves iter count characters. Returns a Bool indicating if the move was successful.

source
Base.skipMethod
skip(iter::Ref{_GtkTextIter}, what::Symbol)

Moves iter according to the operation specified by what. Operations are :

  • :forward_line (gtk_text_iter_forward_line)
  • :backward_line (gtk_text_iter_backward_line)
  • :forward_to_line_end (gtk_text_iter_forward_to_line_end)
  • :backward_word_start (gtk_text_iter_forward_word_end)
  • :forward_word_end (gtk_text_iter_backward_word_start)
  • :backward_sentence_start (gtk_text_iter_backward_sentence_start)
  • :forward_sentence_end (gtk_text_iter_forward_sentence_end)
source
Gtk4.backward_searchMethod
backward_search(iter::Ref{_GtkTextIter},
+          use_align::Bool, xalign::Real, yalign::Real)

Implements gtk_text_view_scroll_to_mark and gtk_text_view_scroll_to_iter.

source
Gtk4.searchFunction
search(buffer::GtkTextBuffer, str::AbstractString, direction = :forward,
+    flag = GtkTextSearchFlags.GTK_TEXT_SEARCH_TEXT_ONLY)

Search text str in buffer in direction :forward or :backward starting from the cursor position in the buffer.

Returns a tuple (found, start, stop) where found indicates whether the search was successful and start and stop are _GtkTextIters containing the location of the match.

source
Gtk4.select_rangeMethod
select_range(buffer::GtkTextBuffer, ins::TI, bound::TI)
+select_range(buffer::GtkTextBuffer, range::GtkTextRange)

Select the text in buffer accorind to _GtkTextIter ins and bound.

Implements gtk_text_buffer_select_range.

source
Gtk4.selection_boundsMethod
selection_bounds(buffer::GtkTextBuffer)

Returns a tuple (selected, start, stop) indicating if text is selected in the buffer, and if so sets the _GtkTextIter start and stop to point to the selected text.

Implements gtk_text_buffer_get_selection_bounds.

source
Gtk4.widgetFunction
widget(c::GtkEventController)

Returns the widget associated with an event controller.

source
Gtk4.@load_builderMacro
@load_builder(b::GtkBuilder)

Loads all GtkBuildable objects from a GtkBuilder object and assigns them to Julia variables in the current scope. GtkBuilder ID's are mapped onto Julia variable names.

source

Private methods

Base.skipMethod
skip(iter::Ref{_GtkTextIter}, count::Integer, what::Symbol)

Moves iter according to the operation specified by what and count. Operations are :

  • :chars (gtk_text_iter_forward_chars)
  • :lines (gtk_text_iter_forward_lines)
  • :words (gtk_text_iter_forward_word_ends)
  • :word_cursor_positions (gtk_text_iter_forward_cursor_positions)
  • :sentences (gtk_text_iter_forward_sentence_ends)
  • :visible_words (gtk_text_iter_forward_visible_word_ends)
  • :visible_cursor_positions (gtk_text_iter_forward_visible_cursor_positions)
  • :visible_lines (gtk_text_iter_forward_visible_lines)
  • :line_ends (gtk_text_iter_forward_visible_lines)
source
Base.skipMethod
skip(iter::Ref{_GtkTextIter}, count::Integer)

Moves iter count characters. Returns a Bool indicating if the move was successful.

source
Base.skipMethod
skip(iter::Ref{_GtkTextIter}, what::Symbol)

Moves iter according to the operation specified by what. Operations are :

  • :forward_line (gtk_text_iter_forward_line)
  • :backward_line (gtk_text_iter_backward_line)
  • :forward_to_line_end (gtk_text_iter_forward_to_line_end)
  • :backward_word_start (gtk_text_iter_forward_word_end)
  • :forward_word_end (gtk_text_iter_backward_word_start)
  • :backward_sentence_start (gtk_text_iter_backward_sentence_start)
  • :forward_sentence_end (gtk_text_iter_forward_sentence_end)
source
Gtk4.backward_searchMethod
backward_search(iter::Ref{_GtkTextIter},
     str::AbstractString, start::Ref{_GtkTextIter},
-    stop::Ref{_GtkTextIter}, limit::Ref{_GtkTextIter}, flag::Int32)

Implements gtk_text_iter_backward_search.

source
Gtk4.buffer_to_window_coordsFunction
buffer_to_window_coords(view::GtkTextView, buffer_x::Integer, buffer_y::Integer, wintype::Integer = 0)

Implements gtk_text_view_buffer_to_window_coords.

source
Gtk4.char_offsetMethod
char_offset(iter::Union{Ref{_GtkTextIter}, _GtkTextIter})

Returns the offset of iter (one-based index).

source
Gtk4.find_controllerMethod
find_controller(w::GtkWidget, ::Type{T}) where T <: GtkEventController

Returns an event controller of type T connected to a widget, or nothing if one doesn't exist. This function is intended for testing purposes (to simulate events) and is not recommended otherwise, as there is a performance penalty for creating a list of a widget's event controllers.

Related GTK function: gtk_widget_observe_controllers)

source
Gtk4.forward_searchMethod
forward_search(iter::Ref{_GtkTextIter},
+    stop::Ref{_GtkTextIter}, limit::Ref{_GtkTextIter}, flag::Int32)

Implements gtk_text_iter_backward_search.

source
Gtk4.buffer_to_window_coordsFunction
buffer_to_window_coords(view::GtkTextView, buffer_x::Integer, buffer_y::Integer, wintype::Integer = 0)

Implements gtk_text_view_buffer_to_window_coords.

source
Gtk4.char_offsetMethod
char_offset(iter::Union{Ref{_GtkTextIter}, _GtkTextIter})

Returns the offset of iter (one-based index).

source
Gtk4.find_controllerMethod
find_controller(w::GtkWidget, ::Type{T}) where T <: GtkEventController

Returns an event controller of type T connected to a widget, or nothing if one doesn't exist. This function is intended for testing purposes (to simulate events) and is not recommended otherwise, as there is a performance penalty for creating a list of a widget's event controllers.

Related GTK function: gtk_widget_observe_controllers)

source
Gtk4.forward_searchMethod
forward_search(iter::Ref{_GtkTextIter},
     str::AbstractString, start::Ref{_GtkTextIter},
-    stop::Ref{_GtkTextIter}, limit::Ref{_GtkTextIter}, flag::Int32)

Implements gtk_text_iter_forward_search.

source
Gtk4.monitorMethod
monitor(w::GtkWidget)

Gets the GdkMonitor where w is displayed, or nothing if the widget is not part of a widget hierarchy.

source
Gtk4.monitorsMethod
monitors()

Returns a list of GdkMonitors for the default GdkDisplay, or nothing if none are found.

source
Gtk4.window_to_buffer_coordsFunction
window_to_buffer_coords(view::GtkTextView, window_x::Integer, window_y::Integer, wintype::Integer = 2)

Implements gtk_text_view_window_to_buffer_coords.

source

Types

Gtk4.AlignType

Controls how a widget deals with extra space in a single dimension.

Details can be found in the GTK docs.

source
Gtk4.CornerTypeType

Specifies which corner a child widget should be placed in when packed into a GtkScrolledWindow.

Details can be found in the GTK docs.

source
Gtk4.DeviceToolTypeType

Indicates the specific type of tool being used being a tablet. Such as an airbrush, pencil, etc.

Details can be found in the GTK docs.

source
Gtk4.DragActionType

Used in GdkDrop and GdkDrag to indicate the actions that the destination can and should do with the dropped data.

Details can be found in the GTK docs.

source
Gtk4.FileChooserActionType

Describes whether a GtkFileChooser is being used to open existing files or to save to a possibly new file.

Details can be found in the GTK docs.

source
Gtk4.FilterChangeType

Describes changes in a filter in more detail and allows objects using the filter to optimize refiltering items.

Details can be found in the GTK docs.

source
Gtk4.GLAPIType

The list of the different APIs that GdkGLContext can potentially support.

Details can be found in the GTK docs.

source
Gtk4.GdkClipboardType

The GdkClipboard object represents data shared between applications or inside an application.

Details can be found in the GTK docs.

source
Gtk4.GdkContentProviderType

A GdkContentProvider is used to provide content for the clipboard or for drag-and-drop operations in a number of formats.

Details can be found in the GTK docs.

source
Gtk4.GdkDeviceType

The GdkDevice object represents an input device, such as a keyboard, a mouse, or a touchpad.

Details can be found in the GTK docs.

source
Gtk4.GdkDragType

The GdkDrag object represents the source of an ongoing DND operation.

Details can be found in the GTK docs.

source
Gtk4.GdkDropType

The GdkDrop object represents the target of an ongoing DND operation.

Details can be found in the GTK docs.

source
Gtk4.GdkEventType

GdkEvents are immutable data structures, created by GDK to represent windowing system events.

Details can be found in the GTK docs.

source
Gtk4.GdkFrameTimingsType

A GdkFrameTimings object holds timing information for a single frame of the application’s displays.

Details can be found in the GTK docs.

source
Gtk4.GdkMonitorType

GdkMonitor objects represent the individual outputs that are associated with a GdkDisplay.

Details can be found in the GTK docs.

source
Gtk4.GdkPopupLayoutType

The GdkPopupLayout struct contains information that is necessary position a [iface@Gdk.Popup] relative to its parent.

Details can be found in the GTK docs.

source
Gtk4.GdkRGBAType

A GdkRGBA is used to represent a color, in a way that is compatible with cairo’s notion of color.

Details can be found in the GTK docs.

source
Gtk4.GdkSeatType

The GdkSeat object represents a collection of input devices that belong to a user.

Details can be found in the GTK docs.

source
Gtk4.GdkToplevelLayoutType

The GdkToplevelLayout struct contains information that is necessary to present a sovereign window on screen.

Details can be found in the GTK docs.

source
Gtk4.GravityType

Defines the reference point of a surface and is used in GdkPopupLayout.

Details can be found in the GTK docs.

source
Gtk4.GskGLShaderType

A GskGLShader is a snippet of GLSL that is meant to run in the fragment shader of the rendering pipeline.

Details can be found in the GTK docs.

source
Gtk4.GskRenderNodeType

GskRenderNode is the basic block in a scene graph to be rendered using [class@Gsk.Renderer].

Details can be found in the GTK docs.

source
Gtk4.GskRendererType

GskRenderer is a class that renders a scene graph defined via a tree of [class@Gsk.RenderNode] instances.

Details can be found in the GTK docs.

source
Gtk4.GtkATContextType

GtkATContext is an abstract class provided by GTK to communicate to platform-specific assistive technologies API.

Details can be found in the GTK docs.

source
Gtk4.GtkBoxType

The GtkBox widget arranges child widgets into a single row or column.

Details can be found in the GTK docs.

source
Gtk4.GtkBuilderType

A GtkBuilder reads XML descriptions of a user interface and instantiates the described objects.

Details can be found in the GTK docs.

source
Gtk4.GtkButtonType

The GtkButton widget is generally used to trigger a callback function that is called when the button is pressed.

Details can be found in the GTK docs.

source
Gtk4.GtkCenterBoxType

GtkCenterBox arranges three children in a row, keeping the middle child centered as well as possible.

Details can be found in the GTK docs.

source
Gtk4.GtkComboBoxType

A GtkComboBox is a widget that allows the user to choose from a list of valid choices.

Details can be found in the GTK docs.

source
Gtk4.GtkConstraintType

GtkConstraint describes a constraint between attributes of two widgets, expressed as a linear equation.

Details can be found in the GTK docs.

source
Gtk4.GtkDialogType

Dialogs are a convenient way to prompt the user for a small amount of input.

Details can be found in the GTK docs.

source
Gtk4.GtkDropDownType

GtkDropDown is a widget that allows the user to choose an item from a list of options.

Details can be found in the GTK docs.

source
Gtk4.GtkEmojiChooserType

The GtkEmojiChooser is used by text widgets such as GtkEntry or GtkTextView to let users insert Emoji characters.

Details can be found in the GTK docs.

source
Gtk4.GtkExpanderType

GtkExpander allows the user to reveal its child by clicking on an expander triangle.

Details can be found in the GTK docs.

source
Gtk4.GtkFileChooserNativeType

GtkFileChooserNative is an abstraction of a dialog suitable for use with “File Open” or “File Save as” commands.

Details can be found in the GTK docs.

source
Gtk4.GtkFilterType

A GtkFilter object describes the filtering to be performed by a [class@Gtk.FilterListModel].

Details can be found in the GTK docs.

source
Gtk4.GtkFilterListModelType

GtkFilterListModel is a list model that filters the elements of the underlying model according to a GtkFilter.

Details can be found in the GTK docs.

source
Gtk4.GtkFixedType

GtkFixed places its child widgets at fixed positions and with fixed sizes.

Details can be found in the GTK docs.

source
Gtk4.GtkFrameType

GtkFrame is a widget that surrounds its child with a decorative frame and an optional label.

Details can be found in the GTK docs.

source
Gtk4.GtkGridType

GtkGrid is a container which arranges its child widgets in rows and columns.

Details can be found in the GTK docs.

source
Gtk4.GtkLockButtonType

GtkLockButton is a widget to obtain and revoke authorizations needed to operate the controls.

Details can be found in the GTK docs.

source
Gtk4.GtkOverlayType

GtkOverlay is a container which contains a single main child, on top of which it can place “overlay” widgets.

Details can be found in the GTK docs.

source
Gtk4.GtkPrintContextType

A GtkPrintContext encapsulates context information that is required when drawing pages for printing.

Details can be found in the GTK docs.

source
Gtk4.GtkRangeType

GtkRange is the common base class for widgets which visualize an adjustment.

Details can be found in the GTK docs.

source
Gtk4.GtkRecentDataType

Meta-data to be passed to gtkrecentmanageraddfull() when registering a recently used resource.

Details can be found in the GTK docs.

source
Gtk4.GtkRecentInfoType

GtkRecentInfo contains the metadata associated with an item in the recently used files list.

Details can be found in the GTK docs.

source
Gtk4.GtkRequestedSizeType

Represents a request of a screen object in a given orientation. These are primarily used in container implementations when allocating a natural size for children calling. See [func@distributenaturalallocation].

Details can be found in the GTK docs.

source
Gtk4.GtkStackType

GtkStack is a container which only shows one of its children at a time.

Details can be found in the GTK docs.

source
Gtk4.GtkStatusbarType

A GtkStatusbar widget is usually placed along the bottom of an application's main [class@Gtk.Window].

Details can be found in the GTK docs.

source
Gtk4.GtkTextMarkType

A GtkTextMark is a position in a GtkTextbuffer that is preserved across modifications.

Details can be found in the GTK docs.

source
Gtk4.GtkTreeIterType

The GtkTreeIter is the primary structure for accessing a GtkTreeModel. Models are expected to put a unique integer in the @stamp member, and put model-specific data in the three @user_data members.

Details can be found in the GTK docs.

source
Gtk4.GtkViewportType

GtkViewport implements scrollability for widgets that lack their own scrolling capabilities.

Details can be found in the GTK docs.

source
Gtk4.InputHintsType

Describes hints that might be taken into account by input methods or applications.

Details can be found in the GTK docs.

source
Gtk4.PolicyTypeType

Determines how the size should be computed to achieve the one of the visibility mode for the scrollbars.

Details can be found in the GTK docs.

source
Gtk4.PrintErrorType

Error codes that identify various errors that can occur while using the GTK printing support.

Details can be found in the GTK docs.

source
Gtk4.PrintStatusType

The status gives a rough indication of the completion of a running print operation.

Details can be found in the GTK docs.

source
Gtk4.ScrollablePolicyType

Defines the policy to be used in a scrollable widget when updating the scrolled window adjustments in a given orientation.

Details can be found in the GTK docs.

source
Gtk4.SizeGroupModeType

The mode of the size group determines the directions in which the size group affects the requested sizes of its component widgets.

Details can be found in the GTK docs.

source
Gtk4.SpinTypeType

The values of the GtkSpinType enumeration are used to specify the change to make in gtkspinbutton_spin().

Details can be found in the GTK docs.

source
Gtk4.SubpixelLayoutType

This enumeration describes how the red, green and blue components of physical pixels on an output device are laid out.

Details can be found in the GTK docs.

source
Gtk4.SymbolicColorType

The indexes of colors passed to symbolic color rendering, such as [vfunc@Gtk.SymbolicPaintable.snapshot_symbolic].

Details can be found in the GTK docs.

source
Gtk4.TextExtendSelectionType

Granularity types that extend the text selection. Use the GtkTextView::extend-selection signal to customize the selection.

Details can be found in the GTK docs.

source
Gtk4.TextViewLayerType

Used to reference the layers of GtkTextView for the purpose of customized drawing with the ::snapshot_layer vfunc.

Details can be found in the GTK docs.

source
Gtk4.TreeViewColumnSizingType

The sizing method the column uses to determine its width. Please note that %GTKTREEVIEWCOLUMNAUTOSIZE are inefficient for large views, and can make columns appear choppy.

Details can be found in the GTK docs.

source
Gtk4._GtkTextIterMethod
_GtkTextIter(text::GtkTextBuffer, char_offset::Integer)

Creates a _GtkTextIter with offset char_offset (one-based index).

source

Constants

Gtk4.BINARY_AGEConstant

Like [func@getbinaryage], but from the headers used at application compile time, rather than from the library linked against at application run time.

Details can be found in the GTK docs.

source
Gtk4.BUTTON_PRIMARYConstant

The primary button. This is typically the left mouse button, or the right button in a left-handed setup.

Details can be found in the GTK docs.

source
Gtk4.BUTTON_SECONDARYConstant

The secondary button. This is typically the right mouse button, or the left button in a left-handed setup.

Details can be found in the GTK docs.

source
Gtk4.EVENT_STOPConstant

Use this macro as the return value for stopping the propagation of an event handler.

Details can be found in the GTK docs.

source
Gtk4.INPUT_ERRORConstant

Constant to return from a signal handler for the ::input signal in case of conversion failure.

Details can be found in the GTK docs.

source
Gtk4.INTERFACE_AGEConstant

Like [func@getinterfaceage], but from the headers used at application compile time, rather than from the library linked against at application run time.

Details can be found in the GTK docs.

source
Gtk4.MAJOR_VERSIONConstant

Like [func@getmajorversion], but from the headers used at application compile time, rather than from the library linked against at application run time.

Details can be found in the GTK docs.

source
Gtk4.MICRO_VERSIONConstant

Like [func@getmicroversion], but from the headers used at application compile time, rather than from the library linked against at application run time.

Details can be found in the GTK docs.

source
Gtk4.MINOR_VERSIONConstant

Like [func@getminorversion], but from the headers used at application compile time, rather than from the library linked against at application run time.

Details can be found in the GTK docs.

source
Gtk4.PRINT_SETTINGS_OUTPUT_URIConstant

The key used by the “Print to file” printer to store the URI to which the output should be written. GTK itself supports only “file://” URIs.

Details can be found in the GTK docs.

source
Gtk4.PRIORITY_REDRAWConstant

This is the priority that the idle handler processing surface updates is given in the main loop.

Details can be found in the GTK docs.

source
+ stop::Ref{_GtkTextIter}, limit::Ref{_GtkTextIter}, flag::Int32)

Implements gtk_text_iter_forward_search.

source
Gtk4.monitorMethod
monitor(w::GtkWidget)

Gets the GdkMonitor where w is displayed, or nothing if the widget is not part of a widget hierarchy.

source
Gtk4.monitorsMethod
monitors()

Returns a list of GdkMonitors for the default GdkDisplay, or nothing if none are found.

source
Gtk4.window_to_buffer_coordsFunction
window_to_buffer_coords(view::GtkTextView, window_x::Integer, window_y::Integer, wintype::Integer = 2)

Implements gtk_text_view_window_to_buffer_coords.

source

Types

Gtk4.AlignType

Controls how a widget deals with extra space in a single dimension.

Details can be found in the GTK docs.

source
Gtk4.CornerTypeType

Specifies which corner a child widget should be placed in when packed into a GtkScrolledWindow.

Details can be found in the GTK docs.

source
Gtk4.DeviceToolTypeType

Indicates the specific type of tool being used being a tablet. Such as an airbrush, pencil, etc.

Details can be found in the GTK docs.

source
Gtk4.DragActionType

Used in GdkDrop and GdkDrag to indicate the actions that the destination can and should do with the dropped data.

Details can be found in the GTK docs.

source
Gtk4.FileChooserActionType

Describes whether a GtkFileChooser is being used to open existing files or to save to a possibly new file.

Details can be found in the GTK docs.

source
Gtk4.FilterChangeType

Describes changes in a filter in more detail and allows objects using the filter to optimize refiltering items.

Details can be found in the GTK docs.

source
Gtk4.GLAPIType

The list of the different APIs that GdkGLContext can potentially support.

Details can be found in the GTK docs.

source
Gtk4.GdkClipboardType

The GdkClipboard object represents data shared between applications or inside an application.

Details can be found in the GTK docs.

source
Gtk4.GdkContentProviderType

A GdkContentProvider is used to provide content for the clipboard or for drag-and-drop operations in a number of formats.

Details can be found in the GTK docs.

source
Gtk4.GdkDeviceType

The GdkDevice object represents an input device, such as a keyboard, a mouse, or a touchpad.

Details can be found in the GTK docs.

source
Gtk4.GdkDragType

The GdkDrag object represents the source of an ongoing DND operation.

Details can be found in the GTK docs.

source
Gtk4.GdkDropType

The GdkDrop object represents the target of an ongoing DND operation.

Details can be found in the GTK docs.

source
Gtk4.GdkEventType

GdkEvents are immutable data structures, created by GDK to represent windowing system events.

Details can be found in the GTK docs.

source
Gtk4.GdkFrameTimingsType

A GdkFrameTimings object holds timing information for a single frame of the application’s displays.

Details can be found in the GTK docs.

source
Gtk4.GdkMonitorType

GdkMonitor objects represent the individual outputs that are associated with a GdkDisplay.

Details can be found in the GTK docs.

source
Gtk4.GdkPopupLayoutType

The GdkPopupLayout struct contains information that is necessary position a [iface@Gdk.Popup] relative to its parent.

Details can be found in the GTK docs.

source
Gtk4.GdkRGBAType

A GdkRGBA is used to represent a color, in a way that is compatible with cairo’s notion of color.

Details can be found in the GTK docs.

source
Gtk4.GdkSeatType

The GdkSeat object represents a collection of input devices that belong to a user.

Details can be found in the GTK docs.

source
Gtk4.GdkToplevelLayoutType

The GdkToplevelLayout struct contains information that is necessary to present a sovereign window on screen.

Details can be found in the GTK docs.

source
Gtk4.GravityType

Defines the reference point of a surface and is used in GdkPopupLayout.

Details can be found in the GTK docs.

source
Gtk4.GskGLShaderType

A GskGLShader is a snippet of GLSL that is meant to run in the fragment shader of the rendering pipeline.

Details can be found in the GTK docs.

source
Gtk4.GskRenderNodeType

GskRenderNode is the basic block in a scene graph to be rendered using [class@Gsk.Renderer].

Details can be found in the GTK docs.

source
Gtk4.GskRendererType

GskRenderer is a class that renders a scene graph defined via a tree of [class@Gsk.RenderNode] instances.

Details can be found in the GTK docs.

source
Gtk4.GtkATContextType

GtkATContext is an abstract class provided by GTK to communicate to platform-specific assistive technologies API.

Details can be found in the GTK docs.

source
Gtk4.GtkBoxType

The GtkBox widget arranges child widgets into a single row or column.

Details can be found in the GTK docs.

source
Gtk4.GtkBuilderType

A GtkBuilder reads XML descriptions of a user interface and instantiates the described objects.

Details can be found in the GTK docs.

source
Gtk4.GtkButtonType

The GtkButton widget is generally used to trigger a callback function that is called when the button is pressed.

Details can be found in the GTK docs.

source
Gtk4.GtkCenterBoxType

GtkCenterBox arranges three children in a row, keeping the middle child centered as well as possible.

Details can be found in the GTK docs.

source
Gtk4.GtkComboBoxType

A GtkComboBox is a widget that allows the user to choose from a list of valid choices.

Details can be found in the GTK docs.

source
Gtk4.GtkConstraintType

GtkConstraint describes a constraint between attributes of two widgets, expressed as a linear equation.

Details can be found in the GTK docs.

source
Gtk4.GtkDialogType

Dialogs are a convenient way to prompt the user for a small amount of input.

Details can be found in the GTK docs.

source
Gtk4.GtkDropDownType

GtkDropDown is a widget that allows the user to choose an item from a list of options.

Details can be found in the GTK docs.

source
Gtk4.GtkEmojiChooserType

The GtkEmojiChooser is used by text widgets such as GtkEntry or GtkTextView to let users insert Emoji characters.

Details can be found in the GTK docs.

source
Gtk4.GtkExpanderType

GtkExpander allows the user to reveal its child by clicking on an expander triangle.

Details can be found in the GTK docs.

source
Gtk4.GtkFileChooserNativeType

GtkFileChooserNative is an abstraction of a dialog suitable for use with “File Open” or “File Save as” commands.

Details can be found in the GTK docs.

source
Gtk4.GtkFilterType

A GtkFilter object describes the filtering to be performed by a [class@Gtk.FilterListModel].

Details can be found in the GTK docs.

source
Gtk4.GtkFilterListModelType

GtkFilterListModel is a list model that filters the elements of the underlying model according to a GtkFilter.

Details can be found in the GTK docs.

source
Gtk4.GtkFixedType

GtkFixed places its child widgets at fixed positions and with fixed sizes.

Details can be found in the GTK docs.

source
Gtk4.GtkFrameType

GtkFrame is a widget that surrounds its child with a decorative frame and an optional label.

Details can be found in the GTK docs.

source
Gtk4.GtkGridType

GtkGrid is a container which arranges its child widgets in rows and columns.

Details can be found in the GTK docs.

source
Gtk4.GtkLockButtonType

GtkLockButton is a widget to obtain and revoke authorizations needed to operate the controls.

Details can be found in the GTK docs.

source
Gtk4.GtkOverlayType

GtkOverlay is a container which contains a single main child, on top of which it can place “overlay” widgets.

Details can be found in the GTK docs.

source
Gtk4.GtkPrintContextType

A GtkPrintContext encapsulates context information that is required when drawing pages for printing.

Details can be found in the GTK docs.

source
Gtk4.GtkRangeType

GtkRange is the common base class for widgets which visualize an adjustment.

Details can be found in the GTK docs.

source
Gtk4.GtkRecentDataType

Meta-data to be passed to gtkrecentmanageraddfull() when registering a recently used resource.

Details can be found in the GTK docs.

source
Gtk4.GtkRecentInfoType

GtkRecentInfo contains the metadata associated with an item in the recently used files list.

Details can be found in the GTK docs.

source
Gtk4.GtkRequestedSizeType

Represents a request of a screen object in a given orientation. These are primarily used in container implementations when allocating a natural size for children calling. See [func@distributenaturalallocation].

Details can be found in the GTK docs.

source
Gtk4.GtkStackType

GtkStack is a container which only shows one of its children at a time.

Details can be found in the GTK docs.

source
Gtk4.GtkStatusbarType

A GtkStatusbar widget is usually placed along the bottom of an application's main [class@Gtk.Window].

Details can be found in the GTK docs.

source
Gtk4.GtkTextMarkType

A GtkTextMark is a position in a GtkTextbuffer that is preserved across modifications.

Details can be found in the GTK docs.

source
Gtk4.GtkTreeIterType

The GtkTreeIter is the primary structure for accessing a GtkTreeModel. Models are expected to put a unique integer in the @stamp member, and put model-specific data in the three @user_data members.

Details can be found in the GTK docs.

source
Gtk4.GtkViewportType

GtkViewport implements scrollability for widgets that lack their own scrolling capabilities.

Details can be found in the GTK docs.

source
Gtk4.InputHintsType

Describes hints that might be taken into account by input methods or applications.

Details can be found in the GTK docs.

source
Gtk4.PolicyTypeType

Determines how the size should be computed to achieve the one of the visibility mode for the scrollbars.

Details can be found in the GTK docs.

source
Gtk4.PrintErrorType

Error codes that identify various errors that can occur while using the GTK printing support.

Details can be found in the GTK docs.

source
Gtk4.PrintStatusType

The status gives a rough indication of the completion of a running print operation.

Details can be found in the GTK docs.

source
Gtk4.ScrollablePolicyType

Defines the policy to be used in a scrollable widget when updating the scrolled window adjustments in a given orientation.

Details can be found in the GTK docs.

source
Gtk4.SizeGroupModeType

The mode of the size group determines the directions in which the size group affects the requested sizes of its component widgets.

Details can be found in the GTK docs.

source
Gtk4.SpinTypeType

The values of the GtkSpinType enumeration are used to specify the change to make in gtkspinbutton_spin().

Details can be found in the GTK docs.

source
Gtk4.SubpixelLayoutType

This enumeration describes how the red, green and blue components of physical pixels on an output device are laid out.

Details can be found in the GTK docs.

source
Gtk4.SymbolicColorType

The indexes of colors passed to symbolic color rendering, such as [vfunc@Gtk.SymbolicPaintable.snapshot_symbolic].

Details can be found in the GTK docs.

source
Gtk4.TextExtendSelectionType

Granularity types that extend the text selection. Use the GtkTextView::extend-selection signal to customize the selection.

Details can be found in the GTK docs.

source
Gtk4.TextViewLayerType

Used to reference the layers of GtkTextView for the purpose of customized drawing with the ::snapshot_layer vfunc.

Details can be found in the GTK docs.

source
Gtk4.TreeViewColumnSizingType

The sizing method the column uses to determine its width. Please note that %GTKTREEVIEWCOLUMNAUTOSIZE are inefficient for large views, and can make columns appear choppy.

Details can be found in the GTK docs.

source
Gtk4._GtkTextIterMethod
_GtkTextIter(text::GtkTextBuffer, char_offset::Integer)

Creates a _GtkTextIter with offset char_offset (one-based index).

source

Constants

Gtk4.BINARY_AGEConstant

Like [func@getbinaryage], but from the headers used at application compile time, rather than from the library linked against at application run time.

Details can be found in the GTK docs.

source
Gtk4.BUTTON_PRIMARYConstant

The primary button. This is typically the left mouse button, or the right button in a left-handed setup.

Details can be found in the GTK docs.

source
Gtk4.BUTTON_SECONDARYConstant

The secondary button. This is typically the right mouse button, or the left button in a left-handed setup.

Details can be found in the GTK docs.

source
Gtk4.EVENT_STOPConstant

Use this macro as the return value for stopping the propagation of an event handler.

Details can be found in the GTK docs.

source
Gtk4.INPUT_ERRORConstant

Constant to return from a signal handler for the ::input signal in case of conversion failure.

Details can be found in the GTK docs.

source
Gtk4.INTERFACE_AGEConstant

Like [func@getinterfaceage], but from the headers used at application compile time, rather than from the library linked against at application run time.

Details can be found in the GTK docs.

source
Gtk4.MAJOR_VERSIONConstant

Like [func@getmajorversion], but from the headers used at application compile time, rather than from the library linked against at application run time.

Details can be found in the GTK docs.

source
Gtk4.MICRO_VERSIONConstant

Like [func@getmicroversion], but from the headers used at application compile time, rather than from the library linked against at application run time.

Details can be found in the GTK docs.

source
Gtk4.MINOR_VERSIONConstant

Like [func@getminorversion], but from the headers used at application compile time, rather than from the library linked against at application run time.

Details can be found in the GTK docs.

source
Gtk4.PRINT_SETTINGS_OUTPUT_URIConstant

The key used by the “Print to file” printer to store the URI to which the output should be written. GTK itself supports only “file://” URIs.

Details can be found in the GTK docs.

source
Gtk4.PRIORITY_REDRAWConstant

This is the priority that the idle handler processing surface updates is given in the main loop.

Details can be found in the GTK docs.

source
diff --git a/dev/howto/async/index.html b/dev/howto/async/index.html index 1b1a5968..78e0f024 100644 --- a/dev/howto/async/index.html +++ b/dev/howto/async/index.html @@ -64,4 +64,4 @@ end end -win = GtkWindow(grid, "Distributed", 200, 200) +win = GtkWindow(grid, "Distributed", 200, 200) diff --git a/dev/howto/nonreplusage/index.html b/dev/howto/nonreplusage/index.html index 3ff90957..7775a221 100644 --- a/dev/howto/nonreplusage/index.html +++ b/dev/howto/nonreplusage/index.html @@ -30,4 +30,4 @@ Gtk4.signal_connect(activate, app, :activate) -run(app)

In the activate function, you can create your windows, widgets, etc. and connect them to signals. When all GtkApplicationWindows have been closed, the script will exit.

+run(app)

In the activate function, you can create your windows, widgets, etc. and connect them to signals. When all GtkApplicationWindows have been closed, the script will exit.

diff --git a/dev/index.html b/dev/index.html index 39489d99..6b1858b0 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · Gtk4.jl

Gtk4.jl

Julia Bindings for Gtk version 4.x.

Introduction

Gtk4.jl is a Julia package providing bindings for the Gtk library: https://www.gtk.org/

Complete Gtk documentation is available at https://www.gtk.org/docs/

Usage

History

This package was adapted from Gtk.jl, which was written by Jameson Nash and others and supported GTK versions 2 and 3. With version 4 there were so many changes to the GTK API that it would have been messy to try to support it and previous versions in the same package. Note that much of the GLib/GObject functionality that underlies GTK is largely the same code as in Gtk.jl. Some changes were made to try to take better advantage of GObject introspection or to remove old code that was no longer necessary in recent versions of Julia.

+Home · Gtk4.jl

Gtk4.jl

Julia Bindings for Gtk version 4.x.

Introduction

Gtk4.jl is a Julia package providing bindings for the Gtk library: https://www.gtk.org/

Complete Gtk documentation is available at https://www.gtk.org/docs/

Usage

History

This package was adapted from Gtk.jl, which was written by Jameson Nash and others and supported GTK versions 2 and 3. With version 4 there were so many changes to the GTK API that it would have been messy to try to support it and previous versions in the same package. Note that much of the GLib/GObject functionality that underlies GTK is largely the same code as in Gtk.jl. Some changes were made to try to take better advantage of GObject introspection or to remove old code that was no longer necessary in recent versions of Julia.

diff --git a/dev/manual/builder/index.html b/dev/manual/builder/index.html index b9b055eb..4a93fca0 100644 --- a/dev/manual/builder/index.html +++ b/dev/manual/builder/index.html @@ -15,4 +15,4 @@ </object> </interface>

In order to access the widgets from Julia we first create a GtkBuilder object that will serve as a connector between the XML definition and our Julia code.

b = GtkBuilder("path/to/myapp.ui")

Alternatively, if we store the above XML definition in a Julia string myapp we can initialize the builder by

b = GtkBuilder(myapp, -1)

Now we want to access a widget from the XML file in order to actually display it on the screen. To do so we can call

win = b["window1"]

for each widget we want to access in our Julia code. Widgets that we don't need to access from Julia, for example layout widgets like GtkBox that are being used only to arrange more interesting widgets for input or display, do not need to be loaded. You can thus see your builder as a kind of a widget store that you use when you need access to your widgets.

Note

If you are developing the code in a package you can get the package directory using the @__DIR__ macro. For instance, if your UI file is located at MyPackage/src/builder/myuifile.ui, you can get the full path using uifile = joinpath(@__DIR__, "builder", "myuifile.ui").

In Gtk4.jl a macro @load_builder is defined that iterates over the GtkWidgets in a GtkBuilder object and automatically assigns them to Julia variables with the same id. For example, if a GtkEntry with an id entry1 and two GtkButtons with id's button1 and button2 are present in myapp.ui, calling

@load_builder(GtkBuilder(filename="myapp.ui"))

is equivalent to

entry1 = b["entry1"]
 button1 = b["button1"]
-button2 = b["button2"]

Note that this only works for GtkWidgets that implement the interface GtkBuildable, which excludes some objects often defined in UI files, for example GtkAdjustment. Those objects will have to be fetched using calls to get_object.

Callbacks

The XML file lets us only describe the visual structure of our widgets and not their behavior when the using is interacting with it. For this reason, we will have to add callbacks to the widgets which we do in Julia code as it was described in Signals and Callbacks.

+button2 = b["button2"]

Note that this only works for GtkWidgets that implement the interface GtkBuildable, which excludes some objects often defined in UI files, for example GtkAdjustment. Those objects will have to be fetched using calls to get_object.

Callbacks

The XML file lets us only describe the visual structure of our widgets and not their behavior when the using is interacting with it. For this reason, we will have to add callbacks to the widgets which we do in Julia code as it was described in Signals and Callbacks.

diff --git a/dev/manual/canvas/index.html b/dev/manual/canvas/index.html index 3c82c928..4fa1bde5 100644 --- a/dev/manual/canvas/index.html +++ b/dev/manual/canvas/index.html @@ -41,4 +41,4 @@ screen = CairoMakie.Screen(f.scene, config, Gtk4.cairo_surface(canvas)) CairoMakie.resize!(f.scene, Gtk4.width(widget), Gtk4.height(widget)) CairoMakie.cairo_draw(screen, f.scene) -end

A more complicated example can be found in the "examples" subdirectory. For interactive plots, you can try Gtk4Makie.jl, which draws GLMakie plots onto GTK's GtkGLArea widget.

+end

A more complicated example can be found in the "examples" subdirectory. For interactive plots, you can try Gtk4Makie.jl, which draws GLMakie plots onto GTK's GtkGLArea widget.

diff --git a/dev/manual/combobox/index.html b/dev/manual/combobox/index.html index b90ae11a..333fb281 100644 --- a/dev/manual/combobox/index.html +++ b/dev/manual/combobox/index.html @@ -35,4 +35,4 @@ end win = GtkWindow("ComboBoxText Example",400,200) -push!(win, cb) +push!(win, cb) diff --git a/dev/manual/dialogs/index.html b/dev/manual/dialogs/index.html index 47a8dcfe..13f33356 100644 --- a/dev/manual/dialogs/index.html +++ b/dev/manual/dialogs/index.html @@ -24,4 +24,4 @@ if isdir(dir[]) # do something with dir -end

Custom dialogs

TODO

+end

Custom dialogs

TODO

diff --git a/dev/manual/gettingStarted/index.html b/dev/manual/gettingStarted/index.html index 912de839..a0100304 100644 --- a/dev/manual/gettingStarted/index.html +++ b/dev/manual/gettingStarted/index.html @@ -18,4 +18,4 @@ function on_button_clicked(w) println("The button has been clicked") end -signal_connect(on_button_clicked, b, "clicked") +signal_connect(on_button_clicked, b, "clicked") diff --git a/dev/manual/keyevents/index.html b/dev/manual/keyevents/index.html index 0ac672d1..7accf56d 100644 --- a/dev/manual/keyevents/index.html +++ b/dev/manual/keyevents/index.html @@ -37,4 +37,4 @@ event = Gtk4.current_event(controller) duration = Gtk4.time(event) - start_time # key press duration in milliseconds println("You released key ", keyval, " after time ", duration, " msec.") -end +end diff --git a/dev/manual/layout/index.html b/dev/manual/layout/index.html index 3c5612e8..26cbcb05 100644 --- a/dev/manual/layout/index.html +++ b/dev/manual/layout/index.html @@ -38,4 +38,4 @@ push!(s, GtkLabel("First label"), "id1", "Label 1") # first string is an id, second is a label push!(s, GtkLabel("Second label"), "id2", "Label 2") # widget can be retrieved using s[id]

Iterating over child widgets

For any of the widgets described above (or any GtkWidget that has children), you can iterate over all child widgets using

for w in widget
     myfunc(w)
-end
+end diff --git a/dev/manual/listtreeview/index.html b/dev/manual/listtreeview/index.html index 3107846d..a397b0c6 100644 --- a/dev/manual/listtreeview/index.html +++ b/dev/manual/listtreeview/index.html @@ -94,4 +94,4 @@ win = GtkWindow(tv, "Tree View") iter = Gtk4.iter_from_index(ts, [1]) -ts[iter,1] = "ONE" +ts[iter,1] = "ONE" diff --git a/dev/manual/methods/index.html b/dev/manual/methods/index.html index c494d43b..b400fe0b 100644 --- a/dev/manual/methods/index.html +++ b/dev/manual/methods/index.html @@ -1,2 +1,2 @@ -Automatically generated methods · Gtk4.jl

Automatically generated methods

Like Gtk.jl, the purpose of this package is to provide functions that wrap ccall's of GTK functions in a Julian and hopefully user friendly way. While in Gtk.jl these ccall's are handwritten, in Gtk4.jl most of the wrappers call automatically generated methods that contain the ccall's. If you don't see a particular functionality wrapped, you can call these autogenerated functions yourself by using a submodule G_ defined in each of the main modules (Gtk4, Pango, GLib, and GdkPixbufLib). The names of these functions and methods are intended to be easy to predict from the corresponding C library function names, and most are the same as in the pygobject bindings for GTK.

The autogenerated methods in G_, like the corresponding C functions, use 0-based indexing, while the more user-friendly wrappers outside G_ use 1-based indexing. Some types of methods are not yet supported. For example, methods involving callbacks must be wrapped by using ccall currently.

The following table lists a few examples that should give you an idea of how these work.

C functionGtk4.G_ Julia methodComments
void gtk_window_add_child (GtkWindow* window, GtkWidget* child)add_child (window::GtkWindow, child::GtkWidget)C arguments mapped directly onto Julia arguments
GtkStackPage* gtk_stack_add_child (GtkStack* stack, GtkWidget* child)add_child (stack::GtkStack, child::GtkWidget)many widgets have add_child methods, but we dispatch using the type of the first argument
void gtk_builder_add_from_file (GtkBuilder* builder, const gchar* filename, GError** error)add_from_file (builder::GtkBuilder, filename::AbstractString)if ccall fills GError argument, a Julia exception is thrown
guint gtk_get_major_version ()get_major_version ()Julia method returns a UInt32
void gtk_rgb_to_hsv (float r, float g, float b, float* h, float* s, float* v)rgb_to_hsv (r::Real, g::Real, b::Real)The arguments h, s, and v are outputs. Julia method returns (h, s, v)
gboolean gtk_tree_view_get_path_at_pos (GtkTreeView* tree_view, int x, int y, GtkTreePath** path, GtkTreeViewColumn** column, int* cell_x, int* cell_y)get_path_at_pos (instance::GtkTreeView, _x::Integer, _y::Integer)C function has a return value ret in addition to output arguments _path, _column, _cell_x, and _cell_y. The Julia method returns (ret, _path, _column, _cell_x, _cell_y)

If you are confused about what one of these automatically generated methods does, you can examine the code, which is defined in the src/gen directory. They are separated into "methods" (in an object-oriented sense, these are functions associated with a particular class) and "functions" (general C functions that aren't associated with a particular class). Constants and struct definitions are also generated using GObject introspection.

Constructors

Constructor methods in G_ are treated a little differently. They are named according to GObjectconstructorname, as in the following table:

C functionGtk4.G_ Julia methodComments
GtkWidget* gtk_window_new()Window_new()Returns a newly constructed GtkWindow
GtkWidget* gtk_scale_new_with_range(GtkOrientation orientation, double min, double max, double step)Scale_new_with_range(orientation, min, max, step)Example with arguments
+Automatically generated methods · Gtk4.jl

Automatically generated methods

Like Gtk.jl, the purpose of this package is to provide functions that wrap ccall's of GTK functions in a Julian and hopefully user friendly way. While in Gtk.jl these ccall's are handwritten, in Gtk4.jl most of the wrappers call automatically generated methods that contain the ccall's. If you don't see a particular functionality wrapped, you can call these autogenerated functions yourself by using a submodule G_ defined in each of the main modules (Gtk4, Pango, GLib, and GdkPixbufLib). The names of these functions and methods are intended to be easy to predict from the corresponding C library function names, and most are the same as in the pygobject bindings for GTK.

The autogenerated methods in G_, like the corresponding C functions, use 0-based indexing, while the more user-friendly wrappers outside G_ use 1-based indexing. Some types of methods are not yet supported. For example, methods involving callbacks must be wrapped by using ccall currently.

The following table lists a few examples that should give you an idea of how these work.

C functionGtk4.G_ Julia methodComments
void gtk_window_add_child (GtkWindow* window, GtkWidget* child)add_child (window::GtkWindow, child::GtkWidget)C arguments mapped directly onto Julia arguments
GtkStackPage* gtk_stack_add_child (GtkStack* stack, GtkWidget* child)add_child (stack::GtkStack, child::GtkWidget)many widgets have add_child methods, but we dispatch using the type of the first argument
void gtk_builder_add_from_file (GtkBuilder* builder, const gchar* filename, GError** error)add_from_file (builder::GtkBuilder, filename::AbstractString)if ccall fills GError argument, a Julia exception is thrown
guint gtk_get_major_version ()get_major_version ()Julia method returns a UInt32
void gtk_rgb_to_hsv (float r, float g, float b, float* h, float* s, float* v)rgb_to_hsv (r::Real, g::Real, b::Real)The arguments h, s, and v are outputs. Julia method returns (h, s, v)
gboolean gtk_tree_view_get_path_at_pos (GtkTreeView* tree_view, int x, int y, GtkTreePath** path, GtkTreeViewColumn** column, int* cell_x, int* cell_y)get_path_at_pos (instance::GtkTreeView, _x::Integer, _y::Integer)C function has a return value ret in addition to output arguments _path, _column, _cell_x, and _cell_y. The Julia method returns (ret, _path, _column, _cell_x, _cell_y)

If you are confused about what one of these automatically generated methods does, you can examine the code, which is defined in the src/gen directory. They are separated into "methods" (in an object-oriented sense, these are functions associated with a particular class) and "functions" (general C functions that aren't associated with a particular class). Constants and struct definitions are also generated using GObject introspection.

Constructors

Constructor methods in G_ are treated a little differently. They are named according to GObjectconstructorname, as in the following table:

C functionGtk4.G_ Julia methodComments
GtkWidget* gtk_window_new()Window_new()Returns a newly constructed GtkWindow
GtkWidget* gtk_scale_new_with_range(GtkOrientation orientation, double min, double max, double step)Scale_new_with_range(orientation, min, max, step)Example with arguments
diff --git a/dev/manual/properties/index.html b/dev/manual/properties/index.html index 8c2f4138..3dd7df84 100644 --- a/dev/manual/properties/index.html +++ b/dev/manual/properties/index.html @@ -18,4 +18,4 @@ julia> visible(win) false -julia> visible(win, true)

This sequence makes the window disappear and then reappear.

The most important accessors are exported from Gtk4 but the more obscure will have to be called including the module name. For example, the property resizable for a GtkWindow, which controls whether a user is allowed to resize the window, can be set using

julia> Gtk4.resizable(win, false)

Binding properties

Properties can be bound to one another through the GObject signal system using the method bind_property. For example, if one wanted the title of a window win2 to automatically track that of another window win1, one could use

julia> b = bind_property(win1, "title", win2, "title")

Now if one calls

julia> win1.title = "New title"

the title of win2 is automatically updated to the same value. The binding can be released using unbind_property(b).

+julia> visible(win, true)

This sequence makes the window disappear and then reappear.

The most important accessors are exported from Gtk4 but the more obscure will have to be called including the module name. For example, the property resizable for a GtkWindow, which controls whether a user is allowed to resize the window, can be set using

julia> Gtk4.resizable(win, false)

Binding properties

Properties can be bound to one another through the GObject signal system using the method bind_property. For example, if one wanted the title of a window win2 to automatically track that of another window win1, one could use

julia> b = bind_property(win1, "title", win2, "title")

Now if one calls

julia> win1.title = "New title"

the title of win2 is automatically updated to the same value. The binding can be released using unbind_property(b).

diff --git a/dev/manual/signals/index.html b/dev/manual/signals/index.html index 51c2c320..1e33e915 100644 --- a/dev/manual/signals/index.html +++ b/dev/manual/signals/index.html @@ -41,4 +41,4 @@ end

and then use the reported type in parameter_type_tuple.

@guarded

The "simple" callback interface includes protections against corrupting Gtk state from errors, but this @cfunction-based approach does not. Consequently, you may wish to use @guarded when writing these functions. (Canvas draw functions and mouse event-handling are called through this interface, which is why you should use @guarded there.) For functions that should return a value, you can specify the value to be returned on error as the first argument. For example:

    const unhandled = convert(Int32, false)
     @guarded unhandled function my_callback(widgetptr, ...)
         ...
-    end
+ end diff --git a/dev/manual/textwidgets/index.html b/dev/manual/textwidgets/index.html index edc74038..cfd596fc 100644 --- a/dev/manual/textwidgets/index.html +++ b/dev/manual/textwidgets/index.html @@ -8,4 +8,4 @@ str = ent.text

A maximum number of characters can be set using ent.max_length = 10.

Sometimes you might want to make the widget non-editable. This can be done using the call

# using the accessor method
 Gtk4.editable(GtkEditable(ent),false)
 # using the property system
-ent.editable = false

If you want to use the entry to retrieve passwords you can hide the visibility of the entered text. This can be achieved by calling

ent.visibility = false

To get notified by changes to the entry one can listen to the "changed" event.

Search Entry

A special variant of the entry that can be used as a search box is GtkSearchEntry. It is equipped with a button to clear the entry.

+ent.editable = false

If you want to use the entry to retrieve passwords you can hide the visibility of the entered text. This can be achieved by calling

ent.visibility = false

To get notified by changes to the entry one can listen to the "changed" event.

Search Entry

A special variant of the entry that can be used as a search box is GtkSearchEntry. It is equipped with a button to clear the entry.

diff --git a/dev/search/index.html b/dev/search/index.html index cd4f1b58..280548d6 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · Gtk4.jl

Loading search...

    +Search · Gtk4.jl

    Loading search...