Gjsify LogoGjsify Logo

#UniqueMessageData contains the data passed between instances of a #UniqueApp. The #UniqueMessageData structure received inside the signal handlers for UniqueApp::message-received is guaranteed to contain the #GdkScreen, the workspace and the startup notification id of the instance sending the message.

record

Hierarchy

  • MessageData

Index

Constructors

  • Creates a new #UniqueMessageData structure. This structure holds the message data passed between running instances with unique_app_send_message().

    Returns MessageData

Properties

name: string

Methods

  • free(): void
  • get(): [number, number]
  • Retrieves the raw contents of message_data set using unique_messaget_data_set().

    returned string is owned by the #UniqueMessageData and should never be modified or freed

    Returns [number, number]

  • getFilename(): string
  • Retrieves the filename set with unique_message_data_set_filename().

    filename. Use g_free() to free the resources used by the returned value.

    Returns string

  • Returns a pointer to the screen from where the message came. You can use gtk_window_set_screen() to move windows or dialogs to the right screen. This field is always set by the Unique library.

    Returns Gdk.Screen

  • getStartupId(): string
  • Retrieves the startup notification id set inside message_data. This field is always set by the Unique library.

    owned by the #UniqueMessageData structure and should not be modified or freed

    Returns string

  • getText(): string
  • Retrieves the text set using unique_message_data_set_text().

    Returns string

  • getUris(): string[]
  • Retrieves a %NULL-terminated string vector containing the URIs set with unique_message_data_set_uris().

    %NULL-terminated list of URIs. Use g_strfreev() to free it.

    Returns string[]

  • getWorkspace(): number
  • Retrieves the workspace number from where the message came. This field is always set by the Unique library.

    Returns number

  • set(data: number, length: number): void
  • Sets data as the payload of message_data. Any other data is removed from the message data. If data is %NULL, a length of -1 will unset the payload, while a length of 0 will set the payload to an empty string.

    You can use unique_message_data_get() to retrieve the data.

    Parameters

    • data: number

      binary blob to set, or %NULL

    • length: number

      length of data

    Returns void

  • setFilename(filename: string): void
  • Sets filename as the contents of message_data.

    Parameters

    • filename: string

      a filename

    Returns void

  • setText(str: string, length: number): boolean
  • Sets str as the plain text payload of message_data, converting it to UTF-8 if needed. If length is -1, the length of the string will be used. Use unique_message_data_get_text() to retrieve the text.

    Parameters

    • str: string

      plain text to be set as payload

    • length: number

      length of the text, or -1

    Returns boolean

  • setUris(uris: string[]): boolean
  • Converts uris to a valid URI list and sets it as payload of message_data. You can use unique_message_data_get_uris() to retrieve the list from a #UniqueMessageData.

    Parameters

    • uris: string[]

      a list of URIs in a %NULL-terminated string vector

    Returns boolean

  • Creates a new #UniqueMessageData structure. This structure holds the message data passed between running instances with unique_app_send_message().

    Returns MessageData

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