コード例 #1
0
ファイル: color.go プロジェクト: bluepeppers/allegro
func CreateColorHTML(html string) Color {
	cs := C.CString(html)
	defer C.free(unsafe.Pointer(cs))

	return Color(C.al_color_html(cs))
}
コード例 #2
0
ファイル: color.go プロジェクト: b1naryth1ef/allegro
func Html(s string) *allegro.Color {
	hs := C.CString(s)
	defer C.free(unsafe.Pointer(hs))
	r := C.al_color_html(hs)
	return (*allegro.Color)(unsafe.Pointer(&r))
}