Combined all the Objective-C headers into objc_darwin.h.
This commit is contained in:
parent
402e73c307
commit
ebcbaa129d
|
@ -11,7 +11,6 @@ import (
|
|||
// #include <stdlib.h>
|
||||
//// #include <HIToolbox/Events.h>
|
||||
// #include "objc_darwin.h"
|
||||
// #include "area_darwin.h"
|
||||
import "C"
|
||||
|
||||
func makeArea(parentWindow C.id, alternate bool, s *sysData) C.id {
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
/* 13 may 2014 */
|
||||
|
||||
extern id makeArea(void);
|
||||
extern void drawImage(void *, intptr_t, intptr_t, intptr_t, intptr_t, intptr_t);
|
||||
extern uintptr_t modifierFlags(id);
|
||||
extern struct xpoint getTranslatedEventPoint(id, id);
|
||||
extern intptr_t buttonNumber(id);
|
||||
extern intptr_t clickCount(id);
|
||||
extern uintptr_t pressedMouseButtons(void);
|
||||
extern uintptr_t keyCode(id);
|
|
@ -1,7 +1,6 @@
|
|||
// 13 may 2014
|
||||
|
||||
#include "objc_darwin.h"
|
||||
#include "area_darwin.h"
|
||||
#include "_cgo_export.h"
|
||||
#include <AppKit/NSView.h>
|
||||
#include <AppKit/NSTrackingArea.h>
|
||||
|
|
|
@ -18,7 +18,6 @@ This creates a class goAppDelegate that will be used as the delegate for /everyt
|
|||
// #cgo LDFLAGS: -lobjc -framework Foundation -framework AppKit
|
||||
// #include <stdlib.h>
|
||||
// #include "objc_darwin.h"
|
||||
// #include "delegateuitask_darwin.h"
|
||||
import "C"
|
||||
|
||||
var (
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
/* 13 may 2014 */
|
||||
|
||||
//#include "common_darwin.h"
|
||||
|
||||
extern id makeAppDelegate(void);
|
||||
extern id windowGetContentView(id);
|
||||
extern BOOL initCocoa(id);
|
||||
extern void douitask(id, void *);
|
||||
extern void breakMainLoop(void);
|
||||
extern void cocoaMainLoop(void);
|
|
@ -1,7 +1,6 @@
|
|||
// 13 may 2014
|
||||
|
||||
#include "objc_darwin.h"
|
||||
#include "delegateuitask_darwin.h"
|
||||
#include "_cgo_export.h"
|
||||
#include <Foundation/NSObject.h>
|
||||
#include <Foundation/NSValue.h>
|
||||
|
|
|
@ -8,7 +8,6 @@ import (
|
|||
|
||||
// #cgo LDFLAGS: -lobjc -framework Foundation -framework AppKit
|
||||
// #include "objc_darwin.h"
|
||||
// #include "dialog_darwin.h"
|
||||
import "C"
|
||||
|
||||
func _msgBox(primarytext string, secondarytext string, style uintptr) {
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
/* 15 may 2014 */
|
||||
|
||||
extern void msgBox(id, id);
|
||||
extern void msgBoxError(id, id);
|
|
@ -1,7 +1,6 @@
|
|||
// 15 may 2014
|
||||
|
||||
#include "objc_darwin.h"
|
||||
#include "dialog_darwin.h"
|
||||
#include <AppKit/NSAlert.h>
|
||||
|
||||
static void alert(NSString *primary, NSString *secondary, NSAlertStyle style)
|
||||
|
|
|
@ -21,7 +21,6 @@ TODO - change the name of some of these functions? specifically the functions th
|
|||
// #cgo LDFLAGS: -lobjc -framework Foundation -framework AppKit
|
||||
// #include <stdlib.h>
|
||||
// #include "objc_darwin.h"
|
||||
// #include "listbox_darwin.h"
|
||||
import "C"
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
// 13 may 2014
|
||||
|
||||
extern id toListboxItem(id, id);
|
||||
extern id fromListboxItem(id, id);
|
||||
extern id newListboxArray(void);
|
||||
extern void listboxArrayAppend(id, id);
|
||||
extern void listboxArrayInsertBefore(id, id, uintptr_t);
|
||||
extern void listboxArrayDelete(id, uintptr_t);
|
||||
extern id listboxArrayItemAt(id, uintptr_t);
|
||||
extern void bindListboxArray(id, id, id, id);
|
||||
extern id boundListboxArray(id, id);
|
||||
extern id makeListboxTableColumn(id);
|
||||
extern id listboxTableColumn(id, id);
|
||||
extern id makeListbox(id, BOOL);
|
||||
extern id listboxSelectedRowIndexes(id);
|
||||
extern uintptr_t listboxIndexesCount(id);
|
||||
extern uintptr_t listboxIndexesFirst(id);
|
||||
extern uintptr_t listboxIndexesNext(id, uintptr_t);
|
||||
extern intptr_t listboxLen(id);
|
||||
extern void listboxDeselectAll(id);
|
|
@ -1,7 +1,6 @@
|
|||
// 13 may 2014
|
||||
|
||||
#include "objc_darwin.h"
|
||||
#include "listbox_darwin.h"
|
||||
#include <Foundation/NSDictionary.h>
|
||||
#include <AppKit/NSArrayController.h>
|
||||
#include <AppKit/NSTableColumn.h>
|
||||
|
|
|
@ -39,4 +39,85 @@ extern id makeScrollView(id);
|
|||
extern void giveScrollViewBezelBorder(id);
|
||||
extern id scrollViewContent(id);
|
||||
|
||||
/* area_darwin.m */
|
||||
extern id makeArea(void);
|
||||
extern void drawImage(void *, intptr_t, intptr_t, intptr_t, intptr_t, intptr_t);
|
||||
extern uintptr_t modifierFlags(id);
|
||||
extern struct xpoint getTranslatedEventPoint(id, id);
|
||||
extern intptr_t buttonNumber(id);
|
||||
extern intptr_t clickCount(id);
|
||||
extern uintptr_t pressedMouseButtons(void);
|
||||
extern uintptr_t keyCode(id);
|
||||
|
||||
/* delegateuitask_darwin.m */
|
||||
extern id makeAppDelegate(void);
|
||||
extern id windowGetContentView(id);
|
||||
extern BOOL initCocoa(id);
|
||||
extern void douitask(id, void *);
|
||||
extern void breakMainLoop(void);
|
||||
extern void cocoaMainLoop(void);
|
||||
|
||||
/* dialog_darwin.m */
|
||||
extern void msgBox(id, id);
|
||||
extern void msgBoxError(id, id);
|
||||
|
||||
/* listbox_darwin.m */
|
||||
extern id toListboxItem(id, id);
|
||||
extern id fromListboxItem(id, id);
|
||||
extern id newListboxArray(void);
|
||||
extern void listboxArrayAppend(id, id);
|
||||
extern void listboxArrayInsertBefore(id, id, uintptr_t);
|
||||
extern void listboxArrayDelete(id, uintptr_t);
|
||||
extern id listboxArrayItemAt(id, uintptr_t);
|
||||
extern void bindListboxArray(id, id, id, id);
|
||||
extern id boundListboxArray(id, id);
|
||||
extern id makeListboxTableColumn(id);
|
||||
extern id listboxTableColumn(id, id);
|
||||
extern id makeListbox(id, BOOL);
|
||||
extern id listboxSelectedRowIndexes(id);
|
||||
extern uintptr_t listboxIndexesCount(id);
|
||||
extern uintptr_t listboxIndexesFirst(id);
|
||||
extern uintptr_t listboxIndexesNext(id, uintptr_t);
|
||||
extern intptr_t listboxLen(id);
|
||||
extern void listboxDeselectAll(id);
|
||||
|
||||
/* prefsize_darwin.m */
|
||||
extern struct xsize controlPrefSize(id);
|
||||
extern struct xsize listboxPrefSize(id);
|
||||
extern struct xsize pbarPrefSize(id);
|
||||
|
||||
/* sysdata_darwin.m */
|
||||
extern void addControl(id, id);
|
||||
extern void controlShow(id);
|
||||
extern void controlHide(id);
|
||||
extern void applyStandardControlFont(id);
|
||||
extern id makeWindow(id);
|
||||
extern void windowShow(id);
|
||||
extern void windowHide(id);
|
||||
extern void windowSetTitle(id, id);
|
||||
extern id windowTitle(id);
|
||||
extern id makeButton(void);
|
||||
extern void buttonSetTargetAction(id, id);
|
||||
extern void buttonSetText(id, id);
|
||||
extern id buttonText(id);
|
||||
extern id makeCheckbox(void);
|
||||
extern id makeCombobox(BOOL);
|
||||
extern id comboboxText(id, BOOL);
|
||||
extern void comboboxAppend(id, BOOL, id);
|
||||
extern void comboboxInsertBefore(id, BOOL, id, intptr_t);
|
||||
extern intptr_t comboboxSelectedIndex(id);
|
||||
extern void comboboxDelete(id, intptr_t);
|
||||
extern intptr_t comboboxLen(id);
|
||||
extern void comboboxSelectIndex(id, BOOL, intptr_t);
|
||||
extern id makeLineEdit(BOOL); /* TODO I accidentally left this as taking no arguments and clang didn't complain when compiling sysdata_darwin.m?! */
|
||||
extern void lineeditSetText(id, id);
|
||||
extern id lineeditText(id);
|
||||
extern id makeLabel(void);
|
||||
extern id makeProgressBar(void);
|
||||
extern void setRect(id, intptr_t, intptr_t, intptr_t, intptr_t);
|
||||
extern BOOL isCheckboxChecked(id);
|
||||
extern void windowSetContentSize(id, intptr_t, intptr_t);
|
||||
extern void setProgress(id, intptr_t);
|
||||
extern void setAreaSize(id, intptr_t, intptr_t);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -4,7 +4,6 @@ package ui
|
|||
|
||||
// #cgo LDFLAGS: -lobjc -framework Foundation -framework AppKit
|
||||
// #include "objc_darwin.h"
|
||||
// #include "prefsize_darwin.h"
|
||||
import "C"
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
/* 15 may 2014 */
|
||||
|
||||
extern struct xsize controlPrefSize(id);
|
||||
extern struct xsize listboxPrefSize(id);
|
||||
extern struct xsize pbarPrefSize(id);
|
|
@ -1,7 +1,6 @@
|
|||
// 15 may 2014
|
||||
|
||||
#include "objc_darwin.h"
|
||||
#include "prefsize_darwin.h"
|
||||
#include <AppKit/NSControl.h>
|
||||
#include <AppKit/NSScrollView.h>
|
||||
#include <AppKit/NSTableView.h>
|
||||
|
|
|
@ -9,7 +9,6 @@ import (
|
|||
|
||||
// #cgo LDFLAGS: -lobjc -framework Foundation -framework AppKit
|
||||
// #include "objc_darwin.h"
|
||||
// #include "sysdata_darwin.h"
|
||||
import "C"
|
||||
|
||||
type sysData struct {
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
/* 12 may 2014 */
|
||||
|
||||
//#include "common_darwin.h"
|
||||
|
||||
extern void addControl(id, id);
|
||||
extern void controlShow(id);
|
||||
extern void controlHide(id);
|
||||
extern void applyStandardControlFont(id);
|
||||
extern id makeWindow(id);
|
||||
extern void windowShow(id);
|
||||
extern void windowHide(id);
|
||||
extern void windowSetTitle(id, id);
|
||||
extern id windowTitle(id);
|
||||
extern id makeButton(void);
|
||||
extern void buttonSetTargetAction(id, id);
|
||||
extern void buttonSetText(id, id);
|
||||
extern id buttonText(id);
|
||||
extern id makeCheckbox(void);
|
||||
extern id makeCombobox(BOOL);
|
||||
extern id comboboxText(id, BOOL);
|
||||
extern void comboboxAppend(id, BOOL, id);
|
||||
extern void comboboxInsertBefore(id, BOOL, id, intptr_t);
|
||||
extern intptr_t comboboxSelectedIndex(id);
|
||||
extern void comboboxDelete(id, intptr_t);
|
||||
extern intptr_t comboboxLen(id);
|
||||
extern void comboboxSelectIndex(id, BOOL, intptr_t);
|
||||
extern id makeLineEdit(BOOL); // TODO I accidentally left this as taking no arguments and clang didn't complain when compiling sysdata_darwin.m?!
|
||||
extern void lineeditSetText(id, id);
|
||||
extern id lineeditText(id);
|
||||
extern id makeLabel(void);
|
||||
extern id makeProgressBar(void);
|
||||
extern void setRect(id, intptr_t, intptr_t, intptr_t, intptr_t);
|
||||
extern BOOL isCheckboxChecked(id);
|
||||
extern void windowSetContentSize(id, intptr_t, intptr_t);
|
||||
extern void setProgress(id, intptr_t);
|
||||
extern void setAreaSize(id, intptr_t, intptr_t);
|
|
@ -1,6 +1,5 @@
|
|||
// 12 may 2014
|
||||
|
||||
//#include "sysdata_darwin.h"
|
||||
#include "objc_darwin.h"
|
||||
#include <Foundation/NSGeometry.h>
|
||||
#include <AppKit/NSWindow.h>
|
||||
|
|
|
@ -10,7 +10,6 @@ import (
|
|||
|
||||
// #cgo LDFLAGS: -lobjc -framework Foundation -framework AppKit
|
||||
// #include "objc_darwin.h"
|
||||
// #include "delegateuitask_darwin.h"
|
||||
import "C"
|
||||
|
||||
var uitask chan func()
|
||||
|
|
Loading…
Reference in New Issue