Beispiel #1
0
// GetUserSpecialDir is a wrapper around g_get_user_special_dir().  A
// non-nil error is returned in the case that g_get_user_special_dir()
// returns NULL to differentiate between NULL and an empty string.
func GetUserSpecialDir(directory UserDirectory) (string, error) {
	c := C.g_get_user_special_dir(C.GUserDirectory(directory))
	if c == nil {
		return "", errNilPtr
	}
	return C.GoString((*C.char)(c)), nil
}
Beispiel #2
0
func GetUserSpecialDir(directory UserDirectory) string {
	result := C.g_get_user_special_dir(C.GUserDirectory(directory))
	return C.GoString(C.to_charptr(result))
}
Beispiel #3
0
	UNICODE_DASH_PUNCTUATION    = C.GUnicodeType(C.G_UNICODE_DASH_PUNCTUATION)
	UNICODE_CLOSE_PUNCTUATION   = C.GUnicodeType(C.G_UNICODE_CLOSE_PUNCTUATION)
	UNICODE_FINAL_PUNCTUATION   = C.GUnicodeType(C.G_UNICODE_FINAL_PUNCTUATION)
	UNICODE_INITIAL_PUNCTUATION = C.GUnicodeType(C.G_UNICODE_INITIAL_PUNCTUATION)
	UNICODE_OTHER_PUNCTUATION   = C.GUnicodeType(C.G_UNICODE_OTHER_PUNCTUATION)
	UNICODE_OPEN_PUNCTUATION    = C.GUnicodeType(C.G_UNICODE_OPEN_PUNCTUATION)
	UNICODE_CURRENCY_SYMBOL     = C.GUnicodeType(C.G_UNICODE_CURRENCY_SYMBOL)
	UNICODE_MODIFIER_SYMBOL     = C.GUnicodeType(C.G_UNICODE_MODIFIER_SYMBOL)
	UNICODE_MATH_SYMBOL         = C.GUnicodeType(C.G_UNICODE_MATH_SYMBOL)
	UNICODE_OTHER_SYMBOL        = C.GUnicodeType(C.G_UNICODE_OTHER_SYMBOL)
	UNICODE_LINE_SEPARATOR      = C.GUnicodeType(C.G_UNICODE_LINE_SEPARATOR)
	UNICODE_PARAGRAPH_SEPARATOR = C.GUnicodeType(C.G_UNICODE_PARAGRAPH_SEPARATOR)
	UNICODE_SPACE_SEPARATOR     = C.GUnicodeType(C.G_UNICODE_SPACE_SEPARATOR)

	// UserDirectory
	USER_DIRECTORY_DESKTOP      = C.GUserDirectory(C.G_USER_DIRECTORY_DESKTOP)
	USER_DIRECTORY_DOCUMENTS    = C.GUserDirectory(C.G_USER_DIRECTORY_DOCUMENTS)
	USER_DIRECTORY_DOWNLOAD     = C.GUserDirectory(C.G_USER_DIRECTORY_DOWNLOAD)
	USER_DIRECTORY_MUSIC        = C.GUserDirectory(C.G_USER_DIRECTORY_MUSIC)
	USER_DIRECTORY_PICTURES     = C.GUserDirectory(C.G_USER_DIRECTORY_PICTURES)
	USER_DIRECTORY_PUBLIC_SHARE = C.GUserDirectory(C.G_USER_DIRECTORY_PUBLIC_SHARE)
	USER_DIRECTORY_TEMPLATES    = C.GUserDirectory(C.G_USER_DIRECTORY_TEMPLATES)
	USER_DIRECTORY_VIDEOS       = C.GUserDirectory(C.G_USER_DIRECTORY_VIDEOS)
	USER_N_DIRECTORIES          = C.GUserDirectory(C.G_USER_N_DIRECTORIES)

	// VariantClass
	VARIANT_CLASS_BOOLEAN     = C.GVariantClass(C.G_VARIANT_CLASS_BOOLEAN)
	VARIANT_CLASS_BYTE        = C.GVariantClass(C.G_VARIANT_CLASS_BYTE)
	VARIANT_CLASS_INT16       = C.GVariantClass(C.G_VARIANT_CLASS_INT16)
	VARIANT_CLASS_UINT16      = C.GVariantClass(C.G_VARIANT_CLASS_UINT16)
	VARIANT_CLASS_INT32       = C.GVariantClass(C.G_VARIANT_CLASS_INT32)