示例#1
0
文件: attributes.go 项目: DaviWei/iup
func SetAttributeId(ih *Ihandle, name string, id int, value string) {
	cName := C.CString(name)
	defer C.free(unsafe.Pointer(cName))

	cValue := C.CString(value)
	defer C.free(unsafe.Pointer(cValue))

	C.IupSetAttributeId((*C.Ihandle)(ih), cName, C.int(id), cValue)
}
示例#2
0
文件: handle.go 项目: visualfc/go-iup
func (h *Handle) SetAttributeDataId(name string, id int, value uintptr) {
	cname := NewCS(name)
	defer FreeCS(cname)
	C.IupSetAttributeId(h.p, cname, C.int(id), (*C.char)(unsafe.Pointer(value)))
}