![]() |
![]() |
![]() |
Moblin UI Toolkit Reference Manual | ![]() |
---|---|---|---|---|
MxClipboard; void (*MxClipboardCallbackFunc) (MxClipboard *clipboard, const gchar *text, gpointer user_data); MxClipboard* mx_clipboard_get_default (void); void mx_clipboard_get_text (MxClipboard *clipboard, MxClipboardCallbackFunc callback, gpointer user_data); void mx_clipboard_set_text (MxClipboard *clipboard, const gchar *text);
MxCliboard 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.
typedef struct _MxClipboard MxClipboard;
The contents of this structure is private and should only be accessed using the provided API.
void (*MxClipboardCallbackFunc) (MxClipboard *clipboard, const gchar *text, gpointer user_data);
Callback function called when text is retrieved from the clipboard.
clipboard : |
A MxClipboard |
text : |
text from the clipboard |
user_data : |
user data |
MxClipboard* mx_clipboard_get_default (void);
Get the global MxClipboard object that represents the clipboard.
Returns : | (transfer none): a MxClipboard owned by Mx and must not be unrefferenced or freed. |
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.
clipboard : |
A MxCliboard |
callback : |
function to be called when the text is retreived |
user_data : |
data to be passed to the callback |
void mx_clipboard_set_text (MxClipboard *clipboard, const gchar *text);
Sets text as the current contents of the clipboard.
clipboard : |
A MxClipboard |
text : |
text to copy to the clipboard |