clipboards under win32



I'm having a little difficulty understanding the concepts behind clipboards
in GTK.

I want to use these functions in a text editing app:

gtk_text_buffer_paste_clipboard()
gtk_text_buffer_copy_clipboard()
gtk_text_buffer_cut_clipboard()

but they all require a GtkClipboard object as an argument.  After searching
through the API docs, I found out that I could get the default
clipboard as an object by passing GDK_NONE as the GdkAtom argument to
gtk_clipboard_get(), but I still keep getting these errors when the program
starts:

(application.exe:612): GLib-GObject-CRITICAL **: gtype.c:2254:
initialization asser
tion failed, use g_type_init() prior to this function

(application.exe:612): Gtk-CRITICAL **: gtk_clipboard_get_for_display:
assertion `G
DK_IS_DISPLAY (display)' failed

and these ones whenever I use the cut, copy and paste functions:

(application.exe:612): Gtk-CRITICAL **: gtk_clipboard_set_with_data:
assertion `cli
pboard != NULL' failed

(application.exe:612): Gtk-CRITICAL **: gtk_clipboard_request_contents:
assertion `
clipboard != NULL' failed

Is the gtk_clipboard_get() function not working properly?  Do these
clipboard functions just requrire an X server?  What's the deal?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]