Combined all the Objective-C headers into objc_darwin.h.

This commit is contained in:
Pietro Gagliardi 2014-05-16 06:49:29 -04:00
parent 402e73c307
commit ebcbaa129d
20 changed files with 81 additions and 98 deletions

View File

@ -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 {

View File

@ -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);

View File

@ -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>

View File

@ -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 (

View File

@ -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);

View File

@ -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>

View File

@ -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) {

View File

@ -1,4 +0,0 @@
/* 15 may 2014 */
extern void msgBox(id, id);
extern void msgBoxError(id, id);

View File

@ -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)

View File

@ -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"
/*

View File

@ -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);

View File

@ -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>

View File

@ -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

View File

@ -4,7 +4,6 @@ package ui
// #cgo LDFLAGS: -lobjc -framework Foundation -framework AppKit
// #include "objc_darwin.h"
// #include "prefsize_darwin.h"
import "C"
/*

View File

@ -1,5 +0,0 @@
/* 15 may 2014 */
extern struct xsize controlPrefSize(id);
extern struct xsize listboxPrefSize(id);
extern struct xsize pbarPrefSize(id);

View File

@ -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>

View File

@ -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 {

View File

@ -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);

View File

@ -1,6 +1,5 @@
// 12 may 2014
//#include "sysdata_darwin.h"
#include "objc_darwin.h"
#include <Foundation/NSGeometry.h>
#include <AppKit/NSWindow.h>

View File

@ -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()