Gjsify LogoGjsify Logo

Hierarchy

  • SelectionData

Index

Constructors

Properties

data: number
display: Gdk.Display
format: number
length: number
selection: Gdk.Atom
target: Gdk.Atom
type: Gdk.Atom
name: string

Methods

  • free(): void
  • Frees a #GtkSelectionData structure returned from gtk_selection_data_copy().

    Returns void

  • getData(): number
  • getFormat(): number
  • getLength(): number
  • Retrieves the length of the raw data of the selection.

    Returns number

  • getTargets(): [boolean, Gdk.Atom[]]
  • Gets the contents of selection_data as an array of targets. This can be used to interpret the results of getting the standard TARGETS target that is always supplied for any selection.

    Returns [boolean, Gdk.Atom[]]

  • getText(): number
  • Gets the contents of the selection data as a UTF-8 string.

    Returns number

  • getUris(): string[]
  • Gets the contents of the selection data as array of URIs.

    Returns string[]

  • set(type: Gdk.Atom, format: number, data: Uint8Array): void
  • Stores new data into a #GtkSelectionData object. Should only be called from a selection handler callback. Zero-terminates the stored data.

    Parameters

    • type: Gdk.Atom

      the type of selection data

    • format: number

      format (number of bits in a unit)

    • data: Uint8Array

      pointer to the data (will be copied)

    Returns void

  • setPixbuf(pixbuf: Pixbuf): boolean
  • Sets the contents of the selection from a #GdkPixbuf The pixbuf is converted to the form determined by selection_data->target.

    Parameters

    Returns boolean

  • setText(str: string, len: number): boolean
  • Sets the contents of the selection from a UTF-8 encoded string. The string is converted to the form determined by selection_data->target.

    Parameters

    • str: string

      a UTF-8 string

    • len: number

      the length of str, or -1 if str is nul-terminated.

    Returns boolean

  • setUris(uris: string[]): boolean
  • Sets the contents of the selection from a list of URIs. The string is converted to the form determined by selection_data->target.

    Parameters

    • uris: string[]

      a %NULL-terminated array of strings holding URIs

    Returns boolean

  • targetsIncludeImage(writable: boolean): boolean
  • Given a #GtkSelectionData object holding a list of targets, determines if any of the targets in targets can be used to provide a #GdkPixbuf.

    Parameters

    • writable: boolean

      whether to accept only targets for which GTK+ knows how to convert a pixbuf into the format

    Returns boolean

  • Given a #GtkSelectionData object holding a list of targets, determines if any of the targets in targets can be used to provide rich text.

    Parameters

    Returns boolean

  • targetsIncludeText(): boolean
  • Given a #GtkSelectionData object holding a list of targets, determines if any of the targets in targets can be used to provide text.

    Returns boolean

  • targetsIncludeUri(): boolean
  • Given a #GtkSelectionData object holding a list of targets, determines if any of the targets in targets can be used to provide a list or URIs.

    Returns boolean

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method