Removed objc_msgSend_uint().
This commit is contained in:
parent
bf1e7aae42
commit
ba2c1d6d20
|
@ -38,7 +38,7 @@ uintptr_t objc_msgSend_uintret_noargs(id obj, SEL sel)
|
|||
return (uintptr_t) ((NSUInteger) objc_msgSend(obj, sel));
|
||||
}
|
||||
|
||||
id _objc_msgSend_uint(id obj, SEL sel, uintptr_t a)
|
||||
id objc_msgSend_uint(id obj, SEL sel, uintptr_t a)
|
||||
{
|
||||
return objc_msgSend(obj, sel, (NSUInteger) a);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ func _msgBox(primarytext string, secondarytext string, style uintptr, button0 st
|
|||
box := C.objc_msgSend_noargs(_NSAlert, _new)
|
||||
C.objc_msgSend_id(box, _setMessageText, toNSString(primarytext))
|
||||
C.objc_msgSend_id(box, _setInformativeText, toNSString(secondarytext))
|
||||
objc_msgSend_uint(box, _setAlertStyle, style)
|
||||
C.objc_msgSend_uint(box, _setAlertStyle, C.uintptr_t(style))
|
||||
C.objc_msgSend_id(box, _addButtonWithTitle, toNSString(button0))
|
||||
C.objc_msgSend_noargs(box, _runModal)
|
||||
ret <- struct{}{}
|
||||
|
|
|
@ -100,12 +100,13 @@ func insertListboxArrayBefore(array C.id, what string, before int) {
|
|||
}
|
||||
|
||||
func deleteListboxArray(array C.id, index int) {
|
||||
objc_msgSend_uint(array, _removeObjectAtArrangedObjectIndex, uintptr(index))
|
||||
C.objc_msgSend_uint(array, _removeObjectAtArrangedObjectIndex,
|
||||
C.uintptr_t(index))
|
||||
}
|
||||
|
||||
func indexListboxArray(array C.id, index int) string {
|
||||
array = C.objc_msgSend_noargs(array, _arrangedObjects)
|
||||
dict := objc_msgSend_uint(array, _objectAtIndex, uintptr(index))
|
||||
dict := C.objc_msgSend_uint(array, _objectAtIndex, C.uintptr_t(index))
|
||||
return fromListboxItem(dict)
|
||||
}
|
||||
|
||||
|
|
|
@ -66,10 +66,6 @@ func objc_msgSend_rect(obj C.id, sel C.SEL, x int, y int, w int, h int) C.id {
|
|||
C.int64_t(x), C.int64_t(y), C.int64_t(w), C.int64_t(h))
|
||||
}
|
||||
|
||||
func objc_msgSend_uint(obj C.id, sel C.SEL, a uintptr) C.id {
|
||||
return C._objc_msgSend_uint(obj, sel, C.uintptr_t(a))
|
||||
}
|
||||
|
||||
func objc_msgSend_rect_bool(obj C.id, sel C.SEL, x int, y int, w int, h int, b C.BOOL) C.id {
|
||||
return C._objc_msgSend_rect_bool(obj, sel,
|
||||
C.int64_t(x), C.int64_t(y), C.int64_t(w), C.int64_t(h),
|
||||
|
|
|
@ -86,7 +86,7 @@ m1(str, char *) /* TODO Go string? */
|
|||
m1(id, id)
|
||||
extern id _objc_msgSend_rect(id obj, SEL sel, int64_t x, int64_t y, int64_t w, int64_t h);
|
||||
m1(sel, SEL)
|
||||
extern id _objc_msgSend_uint(id obj, SEL sel, uintptr_t a);
|
||||
extern id objc_msgSend_uint(id obj, SEL sel, uintptr_t a);
|
||||
m1(ptr, void *)
|
||||
m1(bool, BOOL)
|
||||
extern id objc_msgSend_int(id obj, SEL sel, intptr_t a);
|
||||
|
|
|
@ -137,7 +137,7 @@ var classTypes = [nctypes]*classData{
|
|||
// NSControl requires that we specify a frame; dummy frame for now
|
||||
button = objc_msgSend_rect(button, _initWithFrame,
|
||||
0, 0, 100, 100)
|
||||
objc_msgSend_uint(button, _setBezelStyle, 1) // NSRoundedBezelStyle
|
||||
C.objc_msgSend_uint(button, _setBezelStyle, C.uintptr_t(1)) // NSRoundedBezelStyle
|
||||
C.objc_msgSend_id(button, _setTarget, appDelegate)
|
||||
C.objc_msgSend_sel(button, _setAction, _buttonClicked)
|
||||
// by default the button uses the wrong text size
|
||||
|
@ -156,7 +156,7 @@ var classTypes = [nctypes]*classData{
|
|||
checkbox := objc_alloc(_NSButton)
|
||||
checkbox = objc_msgSend_rect(checkbox, _initWithFrame,
|
||||
0, 0, 100, 100)
|
||||
objc_msgSend_uint(checkbox, _setButtonType, 3) // NSSwitchButton
|
||||
C.objc_msgSend_uint(checkbox, _setButtonType, C.uintptr_t(3)) // NSSwitchButton
|
||||
addControl(parentWindow, checkbox)
|
||||
return checkbox
|
||||
},
|
||||
|
@ -268,7 +268,7 @@ var classTypes = [nctypes]*classData{
|
|||
0, 0, 100, 100)
|
||||
// TODO really int?
|
||||
C.objc_msgSend_int(pbar, _setStyle, 0) // NSProgressIndicatorBarStyle
|
||||
objc_msgSend_uint(pbar, _setControlSize, 0) // NSRegularControlSize
|
||||
C.objc_msgSend_uint(pbar, _setControlSize, C.uintptr_t(0)) // NSRegularControlSize
|
||||
C.objc_msgSend_bool(pbar, _setIndeterminate, C.BOOL(C.NO))
|
||||
addControl(parentWindow, pbar)
|
||||
return pbar
|
||||
|
|
Loading…
Reference in New Issue