Esempio n. 1
0
//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)
}
Esempio n. 2
0
func (h *Handle) GetAttributeData(name string) uintptr {
	cname := NewCS(name)
	defer FreeCS(cname)
	return uintptr(unsafe.Pointer(C.IupGetAttribute(h.p, cname)))
}
Esempio n. 3
0
//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)
}
Esempio n. 4
0
//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)
}
Esempio n. 5
0
//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)
}
Esempio n. 6
0
//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))
}
Esempio n. 7
0
//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))
}
Esempio n. 8
0
//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)
}
Esempio n. 9
0
//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))
}
Esempio n. 10
0
//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))
}
Esempio n. 11
0
//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))
}
Esempio n. 12
0
//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))
}
Esempio n. 13
0
//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))
}
Esempio n. 14
0
//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)
}
Esempio n. 15
0
//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))
}
Esempio n. 16
0
//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)
}
Esempio n. 17
0
//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)
}
Esempio n. 18
0
//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))
}
Esempio n. 19
0
//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))
}
Esempio n. 20
0
//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)
}
Esempio n. 21
0
//export goIupActionCB
func goIupActionCB(ih unsafe.Pointer) int {
	h := (*C.Ihandle)(ih)
	f := *(*ActionFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_ACTION)))
	return f((*Ihandle)(ih))
}
Esempio n. 22
0
//export goIupTabChangePosCB
func goIupTabChangePosCB(ih unsafe.Pointer, new_pos, old_pos int) int {
	h := (*C.Ihandle)(ih)
	f := *(*TabChangePosFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_TABCHANGEPOS_CB)))
	return f((*Ihandle)(ih), new_pos, old_pos)
}
Esempio n. 23
0
//export goIupListActionCB
func goIupListActionCB(ih, text unsafe.Pointer, item, state int) int {
	h := (*C.Ihandle)(ih)
	f := *(*ListActionFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_LIST_ACTION)))
	goText := C.GoString((*C.char)(text))
	return f((*Ihandle)(ih), goText, int(item), int(state))
}
Esempio n. 24
0
func GetAttribute(ih *Ihandle, name string) string {
	cName := C.CString(name)
	defer C.free(unsafe.Pointer(cName))

	return C.GoString(C.IupGetAttribute((*C.Ihandle)(ih), cName))
}
Esempio n. 25
0
//export goIupCaretCB
func goIupCaretCB(ih unsafe.Pointer, lin, col, pos int) int {
	h := (*C.Ihandle)(ih)
	f := *(*CaretFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_CARET_CB)))
	return f((*Ihandle)(ih), int(lin), int(col), int(pos))
}
Esempio n. 26
0
//export goIupNewWindowCB
func goIupNewWindowCB(ih unsafe.Pointer, url unsafe.Pointer) int {
	h := (*C.Ihandle)(ih)
	f := *(*NewWindowFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_NEWWINDOW_CB)))
	goUrl := C.GoString((*C.char)(url))
	return f((*Ihandle)(ih), goUrl)
}
Esempio n. 27
0
//export goIupDblclickCB
func goIupDblclickCB(ih unsafe.Pointer, item int, text unsafe.Pointer) int {
	h := (*C.Ihandle)(ih)
	f := *(*DblclickFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_DBLCLICK_CB)))
	goText := C.GoString((*C.char)(text))
	return f((*Ihandle)(ih), int(item), goText)
}
Esempio n. 28
0
//export goIupErrorCB
func goIupErrorCB(ih unsafe.Pointer, url unsafe.Pointer) int {
	h := (*C.Ihandle)(ih)
	f := *(*ErrorFunc)(unsafe.Pointer(C.IupGetAttribute(h, C.GO_ERROR_CB)))
	goUrl := C.GoString((*C.char)(url))
	return f((*Ihandle)(ih), goUrl)
}
Esempio n. 29
0
func (h *Handle) GetAttribute(name string) string {
	cname := NewCS(name)
	defer FreeCS(cname)
	return FromCS(C.IupGetAttribute(h.p, cname))
}