Example #1
0
// AppChooserDialogNewForContentType() is a wrapper around gtk_app_chooser_dialog_new_for_content_type().
func AppChooserDialogNewForContentType(parent *Window, flags DialogFlags, content_type string) (*AppChooserDialog, error) {
	cstr := C.CString(content_type)
	defer C.free(unsafe.Pointer(cstr))
	c := C.gtk_app_chooser_dialog_new_for_content_type(parent.native(), C.GtkDialogFlags(flags), (*C.gchar)(cstr))
	if c == nil {
		return nil, nilPtrErr
	}
	return wrapAppChooserDialog(wrapObject(unsafe.Pointer(c))), nil
}
Example #2
0
	DEBUG_NO_CSS_CACHE   = C.GtkDebugFlag(C.GTK_DEBUG_NO_CSS_CACHE)
	DEBUG_BASELINES      = C.GtkDebugFlag(C.GTK_DEBUG_BASELINES)
	DEBUG_PIXEL_CACHE    = C.GtkDebugFlag(C.GTK_DEBUG_PIXEL_CACHE)
	DEBUG_NO_PIXEL_CACHE = C.GtkDebugFlag(C.GTK_DEBUG_NO_PIXEL_CACHE)
	DEBUG_INTERACTIVE    = C.GtkDebugFlag(C.GTK_DEBUG_INTERACTIVE)
	DEBUG_TOUCHSCREEN    = C.GtkDebugFlag(C.GTK_DEBUG_TOUCHSCREEN)
	DEBUG_ACTIONS        = C.GtkDebugFlag(C.GTK_DEBUG_ACTIONS)

	// DestDefaults
	DEST_DEFAULT_MOTION    = C.GtkDestDefaults(C.GTK_DEST_DEFAULT_MOTION)
	DEST_DEFAULT_HIGHLIGHT = C.GtkDestDefaults(C.GTK_DEST_DEFAULT_HIGHLIGHT)
	DEST_DEFAULT_DROP      = C.GtkDestDefaults(C.GTK_DEST_DEFAULT_DROP)
	DEST_DEFAULT_ALL       = C.GtkDestDefaults(C.GTK_DEST_DEFAULT_ALL)

	// DialogFlags
	DIALOG_MODAL               = C.GtkDialogFlags(C.GTK_DIALOG_MODAL)
	DIALOG_DESTROY_WITH_PARENT = C.GtkDialogFlags(C.GTK_DIALOG_DESTROY_WITH_PARENT)
	DIALOG_USE_HEADER_BAR      = C.GtkDialogFlags(C.GTK_DIALOG_USE_HEADER_BAR)

	// FileFilterFlags
	FILE_FILTER_FILENAME     = C.GtkFileFilterFlags(C.GTK_FILE_FILTER_FILENAME)
	FILE_FILTER_URI          = C.GtkFileFilterFlags(C.GTK_FILE_FILTER_URI)
	FILE_FILTER_DISPLAY_NAME = C.GtkFileFilterFlags(C.GTK_FILE_FILTER_DISPLAY_NAME)
	FILE_FILTER_MIME_TYPE    = C.GtkFileFilterFlags(C.GTK_FILE_FILTER_MIME_TYPE)

	// IconLookupFlags
	ICON_LOOKUP_NO_SVG           = C.GtkIconLookupFlags(C.GTK_ICON_LOOKUP_NO_SVG)
	ICON_LOOKUP_FORCE_SVG        = C.GtkIconLookupFlags(C.GTK_ICON_LOOKUP_FORCE_SVG)
	ICON_LOOKUP_USE_BUILTIN      = C.GtkIconLookupFlags(C.GTK_ICON_LOOKUP_USE_BUILTIN)
	ICON_LOOKUP_GENERIC_FALLBACK = C.GtkIconLookupFlags(C.GTK_ICON_LOOKUP_GENERIC_FALLBACK)
	ICON_LOOKUP_FORCE_SIZE       = C.GtkIconLookupFlags(C.GTK_ICON_LOOKUP_FORCE_SIZE)