Gtk_drop_target versus gtk_drop_target_async

In my code I am using

const char *mimeTypes[]={"text/uri-list", NULL};
auto contentFormats = gdk_content_formats_new(mimeTypes, 1);
auto dropTarget =gtk_drop_target_async_new (contentFormats, actions);

This works fine most of the time. Nonetheless I would rather use the nonthreaded version

auto dropTarget = gtk_drop_target_new(Type, actions);

Does anyone know if it is possible to set up the contentFormats as a GType and how that is done? If you do know, it would be nice if you could share that piece of information.

Thanks.

Thanks to Matthias:

The clipboard example in gtk4-demo use GtkDropTarget and sets formats.

If anybody else has this doubt in mind.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.