Golang C.IupGetAttribute类(方法)实例源码

下面列出了Golang C.IupGetAttribute 类(方法)源码代码实例,从而了解它的用法。

作者:jcowga    项目:go-iu   
//export goIupCompletedCB
func goIupCompletedCB(ih unsafe.Pointer, url unsafe.Pointer) int {
	h := (*C.Ihandle)(ih)
	f := *(*CompletedFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_COMPLETED_CB)))
	goUrl := C.GoString((*C.char)(url))
	return f((*Ihandle)(ih), goUrl)
}

作者:visualf    项目:go-iu   
func (h *Handle) GetAttributeData(name string) uintptr {
	cname := NewCS(name)
	defer FreeCS(cname)
	return uintptr(unsafe.Pointer(C.IupGetAttribute(h.p, cname)))
}

作者:jcowga    项目:go-iu   
//export goIupSpinCB
func goIupSpinCB(ih unsafe.Pointer, inc int) int {
	h := (*C.Ihandle)(ih)
	f := *(*SpinFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_SPIN_CB)))
	return f((*Ihandle)(h), inc)
}

作者:jcowga    项目:go-iu   
//export goIupNavigateCB
func goIupNavigateCB(ih unsafe.Pointer, url unsafe.Pointer) int {
	h := (*C.Ihandle)(ih)
	f := *(*NavigateFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_NAVIGATE_CB)))
	goUrl := C.GoString((*C.char)(url))
	return f((*Ihandle)(ih), goUrl)
}

作者:jcowga    项目:go-iu   
//export goIupTextActionCB
func goIupTextActionCB(ih unsafe.Pointer, ch int, newValue unsafe.Pointer) int {
	h := (*C.Ihandle)(ih)
	f := *(*TextActionFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_ACTION)))
	goNewValue := C.GoString((*C.char)(newValue))
	return f((*Ihandle)(ih), ch, goNewValue)
}

作者:jcowga    项目:go-iu   
//export goIupTabChangeCB
func goIupTabChangeCB(ih, new_tab, old_tab unsafe.Pointer) int {
	h := (*C.Ihandle)(ih)
	f := *(*TabChangeFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_TABCHANGE_CB)))
	return f((*Ihandle)(ih), (*Ihandle)(new_tab), (*Ihandle)(old_tab))
}

作者:jcowga    项目:go-iu   
//export goIupKAnyCB
func goIupKAnyCB(ih unsafe.Pointer, c C.int) int {
	h := (*C.Ihandle)(ih)
	f := *(*KAnyFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_K_ANY_CB)))
	return f((*Ihandle)(ih), int(c))
}

作者:jcowga    项目:go-iu   
//export goIupMultiselectCB
func goIupMultiselectCB(ih, text unsafe.Pointer) int {
	h := (*C.Ihandle)(ih)
	f := *(*MultiselectFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_MULTISELECT_CB)))
	goText := C.GoString((*C.char)(text))
	return f((*Ihandle)(ih), goText)
}

作者:jcowga    项目:go-iu   
//export goIupEnterWindowCB
func goIupEnterWindowCB(ih unsafe.Pointer) int {
	h := (*C.Ihandle)(ih)
	f := *(*EnterWindowFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_ENTERWINDOW_CB)))
	return f((*Ihandle)(ih))
}

作者:jcowga    项目:go-iu   
//export goIupLeaveWindowCB
func goIupLeaveWindowCB(ih unsafe.Pointer) int {
	h := (*C.Ihandle)(ih)
	f := *(*LeaveWindowFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_LEAVEWINDOW_CB)))
	return f((*Ihandle)(ih))
}

作者:jcowga    项目:go-iu   
//export goIupKillFocusCB
func goIupKillFocusCB(ih unsafe.Pointer) int {
	h := (*C.Ihandle)(ih)
	f := *(*KillFocusFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_KILLFOCUS_CB)))
	return f((*Ihandle)(ih))
}

作者:jcowga    项目:go-iu   
//export goIupDestroyCB
func goIupDestroyCB(ih unsafe.Pointer) int {
	h := (*C.Ihandle)(ih)
	f := *(*DestroyFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_DESTROY_CB)))
	return f((*Ihandle)(ih))
}

作者:jcowga    项目:go-iu   
//export goIupUnmapCB
func goIupUnmapCB(ih unsafe.Pointer) int {
	h := (*C.Ihandle)(ih)
	f := *(*UnmapFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_UNMAP_CB)))
	return f((*Ihandle)(ih))
}

作者:jcowga    项目:go-iu   
//export goIupEditCB
func goIupEditCB(ih unsafe.Pointer, item int, text unsafe.Pointer) int {
	h := (*C.Ihandle)(ih)
	f := *(*EditFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_EDIT_CB)))
	goText := C.GoString((*C.char)(text))
	return f((*Ihandle)(ih), item, goText)
}

作者:jcowga    项目:go-iu   
//export goIupHelpCB
func goIupHelpCB(ih unsafe.Pointer) int {
	h := (*C.Ihandle)(ih)
	f := *(*HelpFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_HELP_CB)))
	return f((*Ihandle)(ih))
}

作者:jcowga    项目:go-iu   
//export goIupMotionCB
func goIupMotionCB(ih unsafe.Pointer, x, y int, status unsafe.Pointer) int {
	h := (*C.Ihandle)(ih)
	f := *(*MotionFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_MOTION_CB)))
	goStatus := C.GoString((*C.char)(status))
	return f((*Ihandle)(ih), x, y, goStatus)
}

作者:jcowga    项目:go-iu   
//export goIupButtonCB
func goIupButtonCB(ih unsafe.Pointer, button, pressed, x, y int, status unsafe.Pointer) int {
	h := (*C.Ihandle)(ih)
	f := *(*ButtonFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_BUTTON_CB)))
	goStatus := C.GoString((*C.char)(status))
	return f((*Ihandle)(ih), button, pressed, x, y, goStatus)
}

作者:jcowga    项目:go-iu   
//export goIupValueChangedCB
func goIupValueChangedCB(ih unsafe.Pointer) int {
	h := (*C.Ihandle)(ih)
	f := *(*ValueChangedFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_VALUECHANGED_CB)))
	return f((*Ihandle)(ih))
}

作者:jcowga    项目:go-iu   
//export goIupDropFilesCB
func goIupDropFilesCB(ih, filename unsafe.Pointer, num, x, y int) int {
	h := (*C.Ihandle)(ih)
	f := *(*DropFilesFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_DROPFILES_CB)))
	goFilename := C.GoString((*C.char)(filename))
	return f((*Ihandle)(h), goFilename, int(num), int(x), int(y))
}

作者:jcowga    项目:go-iu   
//export goIupToggleActionCB
func goIupToggleActionCB(ih unsafe.Pointer, state int) int {
	h := (*C.Ihandle)(ih)
	f := *(*ToggleActionFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_ACTION)))
	return f((*Ihandle)(ih), state)
}


问题


面经


文章

微信
公众号

扫码关注公众号