// Package gio was automatically generated by github.com/bnema/puregotk DO NOT EDIT package gio import ( "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/glib" ) var xContentTypeCanBeExecutable func(string) bool // Checks if a content type can be executable. Note that for instance // things like text files can be executables (i.e. scripts and batch files). func ContentTypeCanBeExecutable(TypeVar string) bool { cret := xContentTypeCanBeExecutable(TypeVar) return cret } var xContentTypeEquals func(string, string) bool // Compares two content types for equality. func ContentTypeEquals(Type1Var string, Type2Var string) bool { cret := xContentTypeEquals(Type1Var, Type2Var) return cret } var xContentTypeFromMimeType func(string) string // Tries to find a content type based on the mime type name. func ContentTypeFromMimeType(MimeTypeVar string) string { cret := xContentTypeFromMimeType(MimeTypeVar) return cret } var xContentTypeGetDescription func(string) string // Gets the human readable description of the content type. func ContentTypeGetDescription(TypeVar string) string { cret := xContentTypeGetDescription(TypeVar) return cret } var xContentTypeGetGenericIconName func(string) string // Gets the generic icon name for a content type. // // See the // [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) // specification for more on the generic icon name. func ContentTypeGetGenericIconName(TypeVar string) string { cret := xContentTypeGetGenericIconName(TypeVar) return cret } var xContentTypeGetIcon func(string) uintptr // Gets the icon for a content type. func ContentTypeGetIcon(TypeVar string) *IconBase { var cls *IconBase cret := xContentTypeGetIcon(TypeVar) if cret == 0 { return nil } cls = &IconBase{} cls.Ptr = cret return cls } var xContentTypeGetMimeDirs func() []string // Get the list of directories which MIME data is loaded from. See // g_content_type_set_mime_dirs() for details. func ContentTypeGetMimeDirs() []string { cret := xContentTypeGetMimeDirs() return cret } var xContentTypeGetMimeType func(string) string // Gets the mime type for the content type, if one is registered. func ContentTypeGetMimeType(TypeVar string) string { cret := xContentTypeGetMimeType(TypeVar) return cret } var xContentTypeGetSymbolicIcon func(string) uintptr // Gets the symbolic icon for a content type. func ContentTypeGetSymbolicIcon(TypeVar string) *IconBase { var cls *IconBase cret := xContentTypeGetSymbolicIcon(TypeVar) if cret == 0 { return nil } cls = &IconBase{} cls.Ptr = cret return cls } var xContentTypeGuess func(uintptr, []byte, uint, *bool) string // Guesses the content type based on example data. If the function is // uncertain, @result_uncertain will be set to %TRUE. Either @filename // or @data may be %NULL, in which case the guess will be based solely // on the other argument. func ContentTypeGuess(FilenameVar *string, DataVar []byte, DataSizeVar uint, ResultUncertainVar *bool) string { FilenameVarPtr := core.GStrdupNullable(FilenameVar) defer core.GFreeNullable(FilenameVarPtr) cret := xContentTypeGuess(FilenameVarPtr, DataVar, DataSizeVar, ResultUncertainVar) return cret } var xContentTypeGuessForTree func(uintptr) []string // Tries to guess the type of the tree with root @root, by // looking at the files it contains. The result is an array // of content types, with the best guess coming first. // // The types returned all have the form x-content/foo, e.g. // x-content/audio-cdda (for audio CDs) or x-content/image-dcf // (for a camera memory card). See the // [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) // specification for more on x-content types. // // This function is useful in the implementation of // g_mount_guess_content_type(). func ContentTypeGuessForTree(RootVar File) []string { cret := xContentTypeGuessForTree(RootVar.GoPointer()) return cret } var xContentTypeIsA func(string, string) bool // Determines if @type is a subset of @supertype. func ContentTypeIsA(TypeVar string, SupertypeVar string) bool { cret := xContentTypeIsA(TypeVar, SupertypeVar) return cret } var xContentTypeIsMimeType func(string, string) bool // Determines if @type is a subset of @mime_type. // Convenience wrapper around g_content_type_is_a(). func ContentTypeIsMimeType(TypeVar string, MimeTypeVar string) bool { cret := xContentTypeIsMimeType(TypeVar, MimeTypeVar) return cret } var xContentTypeIsUnknown func(string) bool // Checks if the content type is the generic "unknown" type. // On UNIX this is the "application/octet-stream" mimetype, // while on win32 it is "*" and on OSX it is a dynamic type // or octet-stream. func ContentTypeIsUnknown(TypeVar string) bool { cret := xContentTypeIsUnknown(TypeVar) return cret } var xContentTypeSetMimeDirs func([]string) // Set the list of directories used by GIO to load the MIME database. // If @dirs is %NULL, the directories used are the default: // // - the `mime` subdirectory of the directory in `$XDG_DATA_HOME` // - the `mime` subdirectory of every directory in `$XDG_DATA_DIRS` // // This function is intended to be used when writing tests that depend on // information stored in the MIME database, in order to control the data. // // Typically, in case your tests use %G_TEST_OPTION_ISOLATE_DIRS, but they // depend on the system’s MIME database, you should call this function // with @dirs set to %NULL before calling g_test_init(), for instance: // // |[<!-- language="C" --> // // // Load MIME data from the system // g_content_type_set_mime_dirs (NULL); // // Isolate the environment // g_test_init (&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL); // // … // // return g_test_run (); // // ]| func ContentTypeSetMimeDirs(DirsVar []string) { xContentTypeSetMimeDirs(DirsVar) } var xContentTypesGetRegistered func() *glib.List // Gets a list of strings containing all the registered content types // known to the system. The list and its data should be freed using // `g_list_free_full (list, g_free)`. func ContentTypesGetRegistered() *glib.List { cret := xContentTypesGetRegistered() return cret } func init() { core.SetPackageName("GIO", "gio-2.0") core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0"}) var libs []uintptr for _, libPath := range core.GetPaths("GIO") { lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } libs = append(libs, lib) } core.PuregoSafeRegister(&xContentTypeCanBeExecutable, libs, "g_content_type_can_be_executable") core.PuregoSafeRegister(&xContentTypeEquals, libs, "g_content_type_equals") core.PuregoSafeRegister(&xContentTypeFromMimeType, libs, "g_content_type_from_mime_type") core.PuregoSafeRegister(&xContentTypeGetDescription, libs, "g_content_type_get_description") core.PuregoSafeRegister(&xContentTypeGetGenericIconName, libs, "g_content_type_get_generic_icon_name") core.PuregoSafeRegister(&xContentTypeGetIcon, libs, "g_content_type_get_icon") core.PuregoSafeRegister(&xContentTypeGetMimeDirs, libs, "g_content_type_get_mime_dirs") core.PuregoSafeRegister(&xContentTypeGetMimeType, libs, "g_content_type_get_mime_type") core.PuregoSafeRegister(&xContentTypeGetSymbolicIcon, libs, "g_content_type_get_symbolic_icon") core.PuregoSafeRegister(&xContentTypeGuess, libs, "g_content_type_guess") core.PuregoSafeRegister(&xContentTypeGuessForTree, libs, "g_content_type_guess_for_tree") core.PuregoSafeRegister(&xContentTypeIsA, libs, "g_content_type_is_a") core.PuregoSafeRegister(&xContentTypeIsMimeType, libs, "g_content_type_is_mime_type") core.PuregoSafeRegister(&xContentTypeIsUnknown, libs, "g_content_type_is_unknown") core.PuregoSafeRegister(&xContentTypeSetMimeDirs, libs, "g_content_type_set_mime_dirs") core.PuregoSafeRegister(&xContentTypesGetRegistered, libs, "g_content_types_get_registered") }