Enum Class ContentProviders.CLIPBOARD_DATA
- All Implemented Interfaces:
Serializable, Comparable<ContentProviders.CLIPBOARD_DATA>, Constable
- Enclosing class:
ContentProviders
There are multiple clipboards in GTK, each with its own current contents
(providers). We use this enum to store our view of the state of each of these
clipboard types.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionThis contains the collection of data for each type of clipboard.private longThe collection of GdkContentProviders that this clipboard currently has assigned to it.private final longUsed to map the data passed through the serializers (from gdk_content_serializer_get_value) back to the clipboard data that value is referring to. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidclear()At the beginning of a set contents operation clear out any old data we have copied to the clipboard.fromDNDConstants(int clipboards) Return the DESTINATION instance matching the clipboards using the constantsDND.CLIPBOARDandDND.SELECTION_CLIPBOARDfromSourceId(long sourceId) Returns the clipboard data matching the given sourceIdReturns the enum constant of this class with the specified name.static ContentProviders.CLIPBOARD_DATA[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CLIPBOARD
-
PRIMARYCLIPBOARD
-
DRAG
-
-
Field Details
-
sourceId
private final long sourceIdUsed to map the data passed through the serializers (from gdk_content_serializer_get_value) back to the clipboard data that value is referring to. -
data
-
providers
private long providersThe collection of GdkContentProviders that this clipboard currently has assigned to it.
-
-
Constructor Details
-
CLIPBOARD_DATA
private CLIPBOARD_DATA(long id)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
fromDNDConstants
Return the DESTINATION instance matching the clipboards using the constantsDND.CLIPBOARDandDND.SELECTION_CLIPBOARD -
fromSourceId
Returns the clipboard data matching the given sourceId -
clear
void clear()At the beginning of a set contents operation clear out any old data we have copied to the clipboard. TODO call clear when we lose ownership of this clipboard by registering with https://docs.gtk.org/gdk4/signal.Clipboard.changed.html and then maybe checking https://docs.gtk.org/gdk4/method.Clipboard.is_local.html and if not local anymore then we should clear the data we placed.
-