ContentFormats


Object Hierarchy:

Object hierarchy for ContentFormats

Description:

[ CCode ( ref_function = "gdk_content_formats_ref" , type_id = "gdk_content_formats_get_type ()" , unref_function = "gdk_content_formats_unref" ) ]
[ Compact ]
public class ContentFormats

This section describes the ContentFormats structure that is used to advertise and negotiate the format of content passed between different widgets, windows or applications using for example the clipboard or drag'n'drop.

GDK supports content in 2 forms: Type and mime type. Using Types is meant only for in-process content transfers. Mime types are meant to be used for data passing both in-process and out-of-process. The details of how data is passed is described in the documentation of the actual implementations.

A ContentFormats describes a set of possible formats content can be exchanged in. It is assumed that this set is ordered. Types are more important than mime types. Order between different Types or mime types is the order they were added in, most important first. Functions that care about order, such as union will describe in their documentation how they interpret that order, though in general the order of the first argument is considered the primary order of the result, followed by the order of further arguments.

For debugging purposes, the function to_string exists. It will print a comma-seperated formats of formats from most important to least important.

ContentFormats is an immutable struct. After creation, you cannot change the types it represents. Instead, new ContentFormats have to be created. The ContentFormatsBuilder structure is meant to help in this endeavor.


Namespace: Gdk
Package: gtk4

Content:

Creation methods:

Methods: