![]() |
![]() |
![]() |
Netbook Toolkit Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
NbtkClipboard; void (*NbtkClipboardCallbackFunc) (NbtkClipboard *clipboard
,const gchar *text
,gpointer user_data
); NbtkClipboard* nbtk_clipboard_get_default (); void nbtk_clipboard_get_text (NbtkClipboard *clipboard
,NbtkClipboardCallbackFunc callback
,gpointer user_data
); void nbtk_clipboard_set_text (NbtkClipboard *clipboard
,const gchar *text
);
NbtkCliboard 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 _NbtkClipboard NbtkClipboard;
The contents of this structure is private and should only be accessed using the provided API.
void (*NbtkClipboardCallbackFunc) (NbtkClipboard *clipboard
,const gchar *text
,gpointer user_data
);
Callback function called when text is retrieved from the clipboard.
|
A NbtkClipboard |
|
text from the clipboard |
|
user data |
NbtkClipboard* nbtk_clipboard_get_default ();
Get the global NbtkClipboard object that represents the clipboard.
Returns : |
a NbtkClipboard owned by Nbtk and must not be unrefferenced or freed. |
void nbtk_clipboard_get_text (NbtkClipboard *clipboard
,NbtkClipboardCallbackFunc callback
,gpointer user_data
);
Request the data from the clipboard in text form. callback
is executed
when the data is retreived.
|
A NbtkCliboard |
|
function to be called when the text is retreived |
|
data to be passed to the callback |
void nbtk_clipboard_set_text (NbtkClipboard *clipboard
,const gchar *text
);
Sets text as the current contents of the clipboard.
|
A NbtkClipboard |
|
text to copy to the clipboard |