MxClipboard

MxClipboard — a simple representation of the X clipboard

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── MxClipboard

Description

MxClipboard is a very simple object representation of the clipboard available to applications. Text is always assumed to be UTF-8 and non-text items are not handled.

Functions

MxClipboardCallbackFunc ()

void
(*MxClipboardCallbackFunc) (MxClipboard *clipboard,
                            const gchar *text,
                            gpointer user_data);

Callback function called when text is retrieved from the clipboard.

Parameters

clipboard

A MxClipboard

 

text

text from the clipboard

 

user_data

user data

 

mx_clipboard_get_default ()

MxClipboard *
mx_clipboard_get_default (void);

Get the global MxClipboard object that represents the clipboard.

Returns

a MxClipboard owned by Mx and must not be unrefferenced or freed.

[transfer none]


mx_clipboard_get_text ()

void
mx_clipboard_get_text (MxClipboard *clipboard,
                       MxClipboardCallbackFunc callback,
                       gpointer user_data);

Request the data from the clipboard in text form. callback is executed when the data is retreived.

Parameters

clipboard

A MxClipboard

 

callback

function to be called when the text is retreived

 

user_data

data to be passed to the callback

 

mx_clipboard_set_text ()

void
mx_clipboard_set_text (MxClipboard *clipboard,
                       const gchar *text);

Sets text as the current contents of the clipboard.

Parameters

clipboard

A MxClipboard

 

text

text to copy to the clipboard

 

Types and Values

struct MxClipboard

struct MxClipboard;

The contents of this structure is private and should only be accessed using the provided API.


struct MxClipboardClass

struct MxClipboardClass {
  GObjectClass parent_class;

  /* padding for future expansion */
  void (*_padding_0) (void);
  void (*_padding_1) (void);
  void (*_padding_2) (void);
  void (*_padding_3) (void);
  void (*_padding_4) (void);
};