Re: A question regarding gtk_clipboard_request_text
- From: "Nickolay V. Shmyrev" <nshmyrev yandex ru>
- To: "Wang, Yong Y" <yong y wang intel com>
- Cc: gtk-devel-list gnome org
- Subject: Re: A question regarding gtk_clipboard_request_text
- Date: Wed, 10 Aug 2005 23:39:10 +0400
В Срд, 10/08/2005 в 14:57 +0800, Wang, Yong Y пишет:
> Hi,
>
> I have a question regarding the function
> void gtk_clipboard_request_text (GtkClipboard *clipboard,
>
> GtkClipboardTextReceivedFunc callback,
> gpointer user_data);
>
> How long is the lifetime of the clipboard data we get via this
> function?
> Is it as long as the function call to GtkClipboardTextReceivedFunc?
>
> I wrote two test cases as below:
<snip>
> Is my understanding correct?
>
Yes, see
static void
request_text_received_func (GtkClipboard *clipboard,
GtkSelectionData *selection_data,
gpointer data)
in gtkclipboard.c there is string g_free (result).
the selection data is freed just after the exit of callback. It's better
to strdup it if you are planning to use this string later.
> Thanks
> Yong
>
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]