예제 #1
0
/*
Converts a key name to a key value.

The names are the same as those in the
`gdk/gdkkeysyms.h` header file
but without the leading “GDK_KEY_”.
*/
func KeyvalFromName(keyval_name string) (return__ uint) {
	__cgo__keyval_name := (*C.gchar)(unsafe.Pointer(C.CString(keyval_name)))
	var __cgo__return__ C.guint
	__cgo__return__ = C.gdk_keyval_from_name(__cgo__keyval_name)
	C.free(unsafe.Pointer(__cgo__keyval_name))
	return__ = uint(__cgo__return__)
	return
}
예제 #2
0
파일: gdk.go 프로젝트: raichu/gotk3
// KeyvalFromName() is a wrapper around gdk_keyval_from_name().
func KeyvalFromName(keyvalName string) uint {
	str := (*C.gchar)(C.CString(keyvalName))
	defer C.free(unsafe.Pointer(str))
	return uint(C.gdk_keyval_from_name(str))
}