diff --git a/appkit/controller.go b/appkit/controller.go new file mode 100644 index 0000000..8087b0c --- /dev/null +++ b/appkit/controller.go @@ -0,0 +1,80 @@ +// auto-generated code, do not modify +package appkit + +import ( + "unsafe" + + "github.com/hsiafan/cocoa/objc" +) + +var ControllerClass = _ControllerClass{objc.GetClass("NSController")} + +type _ControllerClass struct { + objc.Class +} + +type IController interface { + objc.IObject + ObjectDidBeginEditing(editor objc.IObject) + ObjectDidEndEditing(editor objc.IObject) + CommitEditing() bool + CommitEditingWithDelegate_DidCommitSelector_ContextInfo(delegate objc.IObject, didCommitSelector objc.Selector, contextInfo unsafe.Pointer) + DiscardEditing() + IsEditing() bool +} + +type Controller struct { + objc.Object +} + +func MakeController(ptr unsafe.Pointer) Controller { + return Controller{ + Object: objc.MakeObject(ptr), + } +} + +func (c_ Controller) Init() Controller { + rv := objc.CallMethod[Controller](c_, objc.GetSelector("init")) + return rv +} + +func (cc _ControllerClass) Alloc() Controller { + rv := objc.CallMethod[Controller](cc, objc.GetSelector("alloc")) + return rv +} + +func (cc _ControllerClass) New() Controller { + rv := objc.CallMethod[Controller](cc, objc.GetSelector("new")) + rv.Autorelease() + return rv +} + +func NewController() Controller { + return ControllerClass.New() +} + +func (c_ Controller) ObjectDidBeginEditing(editor objc.IObject) { + objc.CallMethod[objc.Void](c_, objc.GetSelector("objectDidBeginEditing:"), objc.ExtractPtr(editor)) +} + +func (c_ Controller) ObjectDidEndEditing(editor objc.IObject) { + objc.CallMethod[objc.Void](c_, objc.GetSelector("objectDidEndEditing:"), objc.ExtractPtr(editor)) +} + +func (c_ Controller) CommitEditing() bool { + rv := objc.CallMethod[bool](c_, objc.GetSelector("commitEditing")) + return rv +} + +func (c_ Controller) CommitEditingWithDelegate_DidCommitSelector_ContextInfo(delegate objc.IObject, didCommitSelector objc.Selector, contextInfo unsafe.Pointer) { + objc.CallMethod[objc.Void](c_, objc.GetSelector("commitEditingWithDelegate:didCommitSelector:contextInfo:"), objc.ExtractPtr(delegate), didCommitSelector, contextInfo) +} + +func (c_ Controller) DiscardEditing() { + objc.CallMethod[objc.Void](c_, objc.GetSelector("discardEditing")) +} + +func (c_ Controller) IsEditing() bool { + rv := objc.CallMethod[bool](c_, objc.GetSelector("isEditing")) + return rv +} diff --git a/appkit/object_controller.go b/appkit/object_controller.go new file mode 100644 index 0000000..b5203d4 --- /dev/null +++ b/appkit/object_controller.go @@ -0,0 +1,200 @@ +// auto-generated code, do not modify +package appkit + +import ( + "unsafe" + + "github.com/hsiafan/cocoa/foundation" + "github.com/hsiafan/cocoa/objc" +) + +var ObjectControllerClass = _ObjectControllerClass{objc.GetClass("NSObjectController")} + +type _ObjectControllerClass struct { + objc.Class +} + +type IObjectController interface { + IController + PrepareContent() + NewObject() objc.Object + AddObject(object objc.IObject) + RemoveObject(object objc.IObject) + Add(sender objc.IObject) + Remove(sender objc.IObject) + Fetch(sender objc.IObject) + ValidateUserInterfaceItem(item objc.IObject) bool + Content() objc.Object + SetContent(value objc.IObject) + AutomaticallyPreparesContent() bool + SetAutomaticallyPreparesContent(value bool) + ObjectClass() objc.Class + SetObjectClass(value objc.IClass) + CanAdd() bool + CanRemove() bool + IsEditable() bool + SetEditable(value bool) + EntityName() string + SetEntityName(value string) + UsesLazyFetching() bool + SetUsesLazyFetching(value bool) + FetchPredicate() foundation.Predicate + SetFetchPredicate(value foundation.IPredicate) + SelectedObjects() []objc.Object + Selection() objc.Object +} + +type ObjectController struct { + Controller +} + +func MakeObjectController(ptr unsafe.Pointer) ObjectController { + return ObjectController{ + Controller: MakeController(ptr), + } +} + +func (o_ ObjectController) InitWithContent(content objc.IObject) ObjectController { + rv := objc.CallMethod[ObjectController](o_, objc.GetSelector("initWithContent:"), objc.ExtractPtr(content)) + return rv +} + +func (o_ ObjectController) Init() ObjectController { + rv := objc.CallMethod[ObjectController](o_, objc.GetSelector("init")) + return rv +} + +func (oc _ObjectControllerClass) Alloc() ObjectController { + rv := objc.CallMethod[ObjectController](oc, objc.GetSelector("alloc")) + return rv +} + +func (oc _ObjectControllerClass) New() ObjectController { + rv := objc.CallMethod[ObjectController](oc, objc.GetSelector("new")) + rv.Autorelease() + return rv +} + +func NewObjectController() ObjectController { + return ObjectControllerClass.New() +} + +func (o_ ObjectController) PrepareContent() { + objc.CallMethod[objc.Void](o_, objc.GetSelector("prepareContent")) +} + +func (o_ ObjectController) NewObject() objc.Object { + rv := objc.CallMethod[objc.Object](o_, objc.GetSelector("newObject")) + rv.Autorelease() + return rv +} + +func (o_ ObjectController) AddObject(object objc.IObject) { + objc.CallMethod[objc.Void](o_, objc.GetSelector("addObject:"), objc.ExtractPtr(object)) +} + +func (o_ ObjectController) RemoveObject(object objc.IObject) { + objc.CallMethod[objc.Void](o_, objc.GetSelector("removeObject:"), objc.ExtractPtr(object)) +} + +func (o_ ObjectController) Add(sender objc.IObject) { + objc.CallMethod[objc.Void](o_, objc.GetSelector("add:"), objc.ExtractPtr(sender)) +} + +func (o_ ObjectController) Remove(sender objc.IObject) { + objc.CallMethod[objc.Void](o_, objc.GetSelector("remove:"), objc.ExtractPtr(sender)) +} + +func (o_ ObjectController) Fetch(sender objc.IObject) { + objc.CallMethod[objc.Void](o_, objc.GetSelector("fetch:"), objc.ExtractPtr(sender)) +} + +func (o_ ObjectController) ValidateUserInterfaceItem(item objc.IObject) bool { + rv := objc.CallMethod[bool](o_, objc.GetSelector("validateUserInterfaceItem:"), objc.ExtractPtr(item)) + return rv +} + +func (o_ ObjectController) Content() objc.Object { + rv := objc.CallMethod[objc.Object](o_, objc.GetSelector("content")) + return rv +} + +func (o_ ObjectController) SetContent(value objc.IObject) { + objc.CallMethod[objc.Void](o_, objc.GetSelector("setContent:"), objc.ExtractPtr(value)) +} + +func (o_ ObjectController) AutomaticallyPreparesContent() bool { + rv := objc.CallMethod[bool](o_, objc.GetSelector("automaticallyPreparesContent")) + return rv +} + +func (o_ ObjectController) SetAutomaticallyPreparesContent(value bool) { + objc.CallMethod[objc.Void](o_, objc.GetSelector("setAutomaticallyPreparesContent:"), value) +} + +// weak property +func (o_ ObjectController) ObjectClass() objc.Class { + rv := objc.CallMethod[objc.Class](o_, objc.GetSelector("objectClass")) + return rv +} + +// weak property +func (o_ ObjectController) SetObjectClass(value objc.IClass) { + objc.CallMethod[objc.Void](o_, objc.GetSelector("setObjectClass:"), objc.ExtractPtr(value)) +} + +func (o_ ObjectController) CanAdd() bool { + rv := objc.CallMethod[bool](o_, objc.GetSelector("canAdd")) + return rv +} + +func (o_ ObjectController) CanRemove() bool { + rv := objc.CallMethod[bool](o_, objc.GetSelector("canRemove")) + return rv +} + +func (o_ ObjectController) IsEditable() bool { + rv := objc.CallMethod[bool](o_, objc.GetSelector("isEditable")) + return rv +} + +func (o_ ObjectController) SetEditable(value bool) { + objc.CallMethod[objc.Void](o_, objc.GetSelector("setEditable:"), value) +} + +func (o_ ObjectController) EntityName() string { + rv := objc.CallMethod[string](o_, objc.GetSelector("entityName")) + return rv +} + +func (o_ ObjectController) SetEntityName(value string) { + objc.CallMethod[objc.Void](o_, objc.GetSelector("setEntityName:"), value) +} + +func (o_ ObjectController) UsesLazyFetching() bool { + rv := objc.CallMethod[bool](o_, objc.GetSelector("usesLazyFetching")) + return rv +} + +func (o_ ObjectController) SetUsesLazyFetching(value bool) { + objc.CallMethod[objc.Void](o_, objc.GetSelector("setUsesLazyFetching:"), value) +} + +func (o_ ObjectController) FetchPredicate() foundation.Predicate { + rv := objc.CallMethod[foundation.Predicate](o_, objc.GetSelector("fetchPredicate")) + return rv +} + +func (o_ ObjectController) SetFetchPredicate(value foundation.IPredicate) { + objc.CallMethod[objc.Void](o_, objc.GetSelector("setFetchPredicate:"), objc.ExtractPtr(value)) +} + +func (o_ ObjectController) SelectedObjects() []objc.Object { + rv := objc.CallMethod[[]objc.Object](o_, objc.GetSelector("selectedObjects")) + return rv +} + +func (o_ ObjectController) Selection() objc.Object { + rv := objc.CallMethod[objc.Object](o_, objc.GetSelector("selection")) + return rv +} diff --git a/appkit/tree_controller.go b/appkit/tree_controller.go new file mode 100644 index 0000000..beb008c --- /dev/null +++ b/appkit/tree_controller.go @@ -0,0 +1,276 @@ +// auto-generated code, do not modify +package appkit + +import ( + "unsafe" + + "github.com/hsiafan/cocoa/foundation" + "github.com/hsiafan/cocoa/objc" +) + +var TreeControllerClass = _TreeControllerClass{objc.GetClass("NSTreeController")} + +type _TreeControllerClass struct { + objc.Class +} + +type ITreeController interface { + IObjectController + RearrangeObjects() + SetSelectionIndexPath(indexPath foundation.IIndexPath) bool + SetSelectionIndexPaths(indexPaths []foundation.IIndexPath) bool + AddSelectionIndexPaths(indexPaths []foundation.IIndexPath) bool + RemoveSelectionIndexPaths(indexPaths []foundation.IIndexPath) bool + AddChild(sender objc.IObject) + Insert(sender objc.IObject) + InsertChild(sender objc.IObject) + InsertObject_AtArrangedObjectIndexPath(object objc.IObject, indexPath foundation.IIndexPath) + InsertObjects_AtArrangedObjectIndexPaths(objects []objc.IObject, indexPaths []foundation.IIndexPath) + RemoveObjectAtArrangedObjectIndexPath(indexPath foundation.IIndexPath) + RemoveObjectsAtArrangedObjectIndexPaths(indexPaths []foundation.IIndexPath) + MoveNode_ToIndexPath(node ITreeNode, indexPath foundation.IIndexPath) + MoveNodes_ToIndexPath(nodes []ITreeNode, startingIndexPath foundation.IIndexPath) + ChildrenKeyPathForNode(node ITreeNode) string + CountKeyPathForNode(node ITreeNode) string + LeafKeyPathForNode(node ITreeNode) string + SortDescriptors() []foundation.SortDescriptor + SetSortDescriptors(value []foundation.ISortDescriptor) + ArrangedObjects() TreeNode + SelectionIndexPath() foundation.IndexPath + SelectionIndexPaths() []foundation.IndexPath + SelectedNodes() []TreeNode + SelectsInsertedObjects() bool + SetSelectsInsertedObjects(value bool) + AvoidsEmptySelection() bool + SetAvoidsEmptySelection(value bool) + PreservesSelection() bool + SetPreservesSelection(value bool) + AlwaysUsesMultipleValuesMarker() bool + SetAlwaysUsesMultipleValuesMarker(value bool) + CanAddChild() bool + CanInsert() bool + CanInsertChild() bool + ChildrenKeyPath() string + SetChildrenKeyPath(value string) + CountKeyPath() string + SetCountKeyPath(value string) + LeafKeyPath() string + SetLeafKeyPath(value string) +} + +type TreeController struct { + ObjectController +} + +func MakeTreeController(ptr unsafe.Pointer) TreeController { + return TreeController{ + ObjectController: MakeObjectController(ptr), + } +} + +func (t_ TreeController) InitWithContent(content objc.IObject) TreeController { + rv := objc.CallMethod[TreeController](t_, objc.GetSelector("initWithContent:"), objc.ExtractPtr(content)) + return rv +} + +func (t_ TreeController) Init() TreeController { + rv := objc.CallMethod[TreeController](t_, objc.GetSelector("init")) + return rv +} + +func (tc _TreeControllerClass) Alloc() TreeController { + rv := objc.CallMethod[TreeController](tc, objc.GetSelector("alloc")) + return rv +} + +func (tc _TreeControllerClass) New() TreeController { + rv := objc.CallMethod[TreeController](tc, objc.GetSelector("new")) + rv.Autorelease() + return rv +} + +func NewTreeController() TreeController { + return TreeControllerClass.New() +} + +func (t_ TreeController) RearrangeObjects() { + objc.CallMethod[objc.Void](t_, objc.GetSelector("rearrangeObjects")) +} + +func (t_ TreeController) SetSelectionIndexPath(indexPath foundation.IIndexPath) bool { + rv := objc.CallMethod[bool](t_, objc.GetSelector("setSelectionIndexPath:"), objc.ExtractPtr(indexPath)) + return rv +} + +func (t_ TreeController) SetSelectionIndexPaths(indexPaths []foundation.IIndexPath) bool { + rv := objc.CallMethod[bool](t_, objc.GetSelector("setSelectionIndexPaths:"), indexPaths) + return rv +} + +func (t_ TreeController) AddSelectionIndexPaths(indexPaths []foundation.IIndexPath) bool { + rv := objc.CallMethod[bool](t_, objc.GetSelector("addSelectionIndexPaths:"), indexPaths) + return rv +} + +func (t_ TreeController) RemoveSelectionIndexPaths(indexPaths []foundation.IIndexPath) bool { + rv := objc.CallMethod[bool](t_, objc.GetSelector("removeSelectionIndexPaths:"), indexPaths) + return rv +} + +func (t_ TreeController) AddChild(sender objc.IObject) { + objc.CallMethod[objc.Void](t_, objc.GetSelector("addChild:"), objc.ExtractPtr(sender)) +} + +func (t_ TreeController) Insert(sender objc.IObject) { + objc.CallMethod[objc.Void](t_, objc.GetSelector("insert:"), objc.ExtractPtr(sender)) +} + +func (t_ TreeController) InsertChild(sender objc.IObject) { + objc.CallMethod[objc.Void](t_, objc.GetSelector("insertChild:"), objc.ExtractPtr(sender)) +} + +func (t_ TreeController) InsertObject_AtArrangedObjectIndexPath(object objc.IObject, indexPath foundation.IIndexPath) { + objc.CallMethod[objc.Void](t_, objc.GetSelector("insertObject:atArrangedObjectIndexPath:"), objc.ExtractPtr(object), objc.ExtractPtr(indexPath)) +} + +func (t_ TreeController) InsertObjects_AtArrangedObjectIndexPaths(objects []objc.IObject, indexPaths []foundation.IIndexPath) { + objc.CallMethod[objc.Void](t_, objc.GetSelector("insertObjects:atArrangedObjectIndexPaths:"), objects, indexPaths) +} + +func (t_ TreeController) RemoveObjectAtArrangedObjectIndexPath(indexPath foundation.IIndexPath) { + objc.CallMethod[objc.Void](t_, objc.GetSelector("removeObjectAtArrangedObjectIndexPath:"), objc.ExtractPtr(indexPath)) +} + +func (t_ TreeController) RemoveObjectsAtArrangedObjectIndexPaths(indexPaths []foundation.IIndexPath) { + objc.CallMethod[objc.Void](t_, objc.GetSelector("removeObjectsAtArrangedObjectIndexPaths:"), indexPaths) +} + +func (t_ TreeController) MoveNode_ToIndexPath(node ITreeNode, indexPath foundation.IIndexPath) { + objc.CallMethod[objc.Void](t_, objc.GetSelector("moveNode:toIndexPath:"), objc.ExtractPtr(node), objc.ExtractPtr(indexPath)) +} + +func (t_ TreeController) MoveNodes_ToIndexPath(nodes []ITreeNode, startingIndexPath foundation.IIndexPath) { + objc.CallMethod[objc.Void](t_, objc.GetSelector("moveNodes:toIndexPath:"), nodes, objc.ExtractPtr(startingIndexPath)) +} + +func (t_ TreeController) ChildrenKeyPathForNode(node ITreeNode) string { + rv := objc.CallMethod[string](t_, objc.GetSelector("childrenKeyPathForNode:"), objc.ExtractPtr(node)) + return rv +} + +func (t_ TreeController) CountKeyPathForNode(node ITreeNode) string { + rv := objc.CallMethod[string](t_, objc.GetSelector("countKeyPathForNode:"), objc.ExtractPtr(node)) + return rv +} + +func (t_ TreeController) LeafKeyPathForNode(node ITreeNode) string { + rv := objc.CallMethod[string](t_, objc.GetSelector("leafKeyPathForNode:"), objc.ExtractPtr(node)) + return rv +} + +func (t_ TreeController) SortDescriptors() []foundation.SortDescriptor { + rv := objc.CallMethod[[]foundation.SortDescriptor](t_, objc.GetSelector("sortDescriptors")) + return rv +} + +func (t_ TreeController) SetSortDescriptors(value []foundation.ISortDescriptor) { + objc.CallMethod[objc.Void](t_, objc.GetSelector("setSortDescriptors:"), value) +} + +func (t_ TreeController) ArrangedObjects() TreeNode { + rv := objc.CallMethod[TreeNode](t_, objc.GetSelector("arrangedObjects")) + return rv +} + +func (t_ TreeController) SelectionIndexPath() foundation.IndexPath { + rv := objc.CallMethod[foundation.IndexPath](t_, objc.GetSelector("selectionIndexPath")) + return rv +} + +func (t_ TreeController) SelectionIndexPaths() []foundation.IndexPath { + rv := objc.CallMethod[[]foundation.IndexPath](t_, objc.GetSelector("selectionIndexPaths")) + return rv +} + +func (t_ TreeController) SelectedNodes() []TreeNode { + rv := objc.CallMethod[[]TreeNode](t_, objc.GetSelector("selectedNodes")) + return rv +} + +func (t_ TreeController) SelectsInsertedObjects() bool { + rv := objc.CallMethod[bool](t_, objc.GetSelector("selectsInsertedObjects")) + return rv +} + +func (t_ TreeController) SetSelectsInsertedObjects(value bool) { + objc.CallMethod[objc.Void](t_, objc.GetSelector("setSelectsInsertedObjects:"), value) +} + +func (t_ TreeController) AvoidsEmptySelection() bool { + rv := objc.CallMethod[bool](t_, objc.GetSelector("avoidsEmptySelection")) + return rv +} + +func (t_ TreeController) SetAvoidsEmptySelection(value bool) { + objc.CallMethod[objc.Void](t_, objc.GetSelector("setAvoidsEmptySelection:"), value) +} + +func (t_ TreeController) PreservesSelection() bool { + rv := objc.CallMethod[bool](t_, objc.GetSelector("preservesSelection")) + return rv +} + +func (t_ TreeController) SetPreservesSelection(value bool) { + objc.CallMethod[objc.Void](t_, objc.GetSelector("setPreservesSelection:"), value) +} + +func (t_ TreeController) AlwaysUsesMultipleValuesMarker() bool { + rv := objc.CallMethod[bool](t_, objc.GetSelector("alwaysUsesMultipleValuesMarker")) + return rv +} + +func (t_ TreeController) SetAlwaysUsesMultipleValuesMarker(value bool) { + objc.CallMethod[objc.Void](t_, objc.GetSelector("setAlwaysUsesMultipleValuesMarker:"), value) +} + +func (t_ TreeController) CanAddChild() bool { + rv := objc.CallMethod[bool](t_, objc.GetSelector("canAddChild")) + return rv +} + +func (t_ TreeController) CanInsert() bool { + rv := objc.CallMethod[bool](t_, objc.GetSelector("canInsert")) + return rv +} + +func (t_ TreeController) CanInsertChild() bool { + rv := objc.CallMethod[bool](t_, objc.GetSelector("canInsertChild")) + return rv +} + +func (t_ TreeController) ChildrenKeyPath() string { + rv := objc.CallMethod[string](t_, objc.GetSelector("childrenKeyPath")) + return rv +} + +func (t_ TreeController) SetChildrenKeyPath(value string) { + objc.CallMethod[objc.Void](t_, objc.GetSelector("setChildrenKeyPath:"), value) +} + +func (t_ TreeController) CountKeyPath() string { + rv := objc.CallMethod[string](t_, objc.GetSelector("countKeyPath")) + return rv +} + +func (t_ TreeController) SetCountKeyPath(value string) { + objc.CallMethod[objc.Void](t_, objc.GetSelector("setCountKeyPath:"), value) +} + +func (t_ TreeController) LeafKeyPath() string { + rv := objc.CallMethod[string](t_, objc.GetSelector("leafKeyPath")) + return rv +} + +func (t_ TreeController) SetLeafKeyPath(value string) { + objc.CallMethod[objc.Void](t_, objc.GetSelector("setLeafKeyPath:"), value) +} diff --git a/generate/meta/AppKit/NSController.json b/generate/meta/AppKit/NSController.json new file mode 100644 index 0000000..5b45b74 --- /dev/null +++ b/generate/meta/AppKit/NSController.json @@ -0,0 +1,78 @@ +{ + "kind": "class", + "name": "NSController", + "module": "AppKit", + "parent": "objectivec.NSObject *", + "properties": [ + { + "name": "editing", + "read_only": true, + "getter_name": "isEditing", + "type": "BOOL" + } + ], + "methods": [ + { + "name": "objectDidBeginEditing", + "params": [ + { + "variable_name": "editor", + "type": "id" + } + ], + "return_type": "void" + }, + { + "name": "objectDidEndEditing", + "params": [ + { + "variable_name": "editor", + "type": "id" + } + ], + "return_type": "void" + }, + { + "name": "commitEditing", + "return_type": "BOOL" + }, + { + "name": "commitEditingWithDelegate", + "params": [ + { + "variable_name": "delegate", + "type": "objectivec.NSObject *" + }, + { + "name": "didCommitSelector", + "variable_name": "didCommitSelector", + "type": "SEL" + }, + { + "name": "contextInfo", + "variable_name": "contextInfo", + "type": "void *" + } + ], + "return_type": "void" + }, + { + "name": "discardEditing", + "return_type": "void" + }, + { + "name": "init", + "return_type": "instance" + }, + { + "name": "initWithCoder", + "params": [ + { + "variable_name": "coder", + "type": "Foundation.NSCoder *" + } + ], + "return_type": "instance" + } + ] +} diff --git a/generate/meta/AppKit/NSObjectController.json b/generate/meta/AppKit/NSObjectController.json new file mode 100644 index 0000000..260b4b4 --- /dev/null +++ b/generate/meta/AppKit/NSObjectController.json @@ -0,0 +1,148 @@ +{ + "kind": "class", + "name": "NSObjectController", + "module": "AppKit", + "parent": "AppKit.NSController *", + "properties": [ + { + "name": "content", + "type": "objectivec.NSObject *" + }, + { + "name": "automaticallyPreparesContent", + "type": "BOOL" + }, + { + "name": "objectClass", + "type": "objectivec.Class *", + "weak": true + }, + { + "name": "canAdd", + "read_only": true, + "type": "BOOL" + }, + { + "name": "canRemove", + "read_only": true, + "type": "BOOL" + }, + { + "name": "editable", + "getter_name": "isEditable", + "type": "BOOL" + }, + { + "name": "entityName", + "type": "NSString*" + }, + { + "name": "usesLazyFetching", + "type": "BOOL" + }, + { + "name": "fetchPredicate", + "type": "Foundation.NSPredicate *" + }, + { + "name": "selectedObjects", + "read_only": true, + "type": "NSArray *" + }, + { + "name": "selection", + "read_only": true, + "type": "objectivec.NSObject *" + } + ], + "methods": [ + { + "name": "initWithContent", + "params": [ + { + "variable_name": "content", + "type": "objectivec.NSObject *" + } + ], + "return_type": "instance" + }, + { + "name": "prepareContent", + "return_type": "void" + }, + { + "name": "newObject", + "return_type": "objectivec.NSObject *" + }, + { + "name": "addObject", + "params": [ + { + "variable_name": "object", + "type": "objectivec.NSObject *" + } + ], + "return_type": "void" + }, + { + "name": "removeObject", + "params": [ + { + "variable_name": "object", + "type": "objectivec.NSObject *" + } + ], + "return_type": "void" + }, + { + "name": "add", + "params": [ + { + "variable_name": "sender", + "type": "objectivec.NSObject *" + } + ], + "return_type": "void" + }, + { + "name": "remove", + "params": [ + { + "variable_name": "sender", + "type": "objectivec.NSObject *" + } + ], + "return_type": "void" + }, + { + "name": "fetch", + "params": [ + { + "variable_name": "sender", + "type": "objectivec.NSObject *" + } + ], + "return_type": "void" + }, + { + "name": "validateUserInterfaceItem", + "params": [ + { + "variable_name": "item", + "type": "id" + } + ], + "return_type": "BOOL" + }, + { + "name": "initWithCoder", + "params": [ + { + "variable_name": "coder", + "type": "Foundation.NSCoder *" + } + ], + "return_type": "instance" + } + ] +} diff --git a/generate/meta/AppKit/NSTreeController.json b/generate/meta/AppKit/NSTreeController.json new file mode 100644 index 0000000..d1b0095 --- /dev/null +++ b/generate/meta/AppKit/NSTreeController.json @@ -0,0 +1,290 @@ +{ + "kind": "class", + "name": "NSTreeController", + "module": "AppKit", + "parent": "AppKit.NSObjectController *", + "properties": [ + { + "name": "sortDescriptors", + "type": "NSArray *" + }, + { + "name": "content", + "type": "objectivec.NSObject *" + }, + { + "name": "arrangedObjects", + "read_only": true, + "type": "AppKit.NSTreeNode *" + }, + { + "name": "selectionIndexPath", + "read_only": true, + "type": "Foundation.NSIndexPath *" + }, + { + "name": "selectionIndexPaths", + "read_only": true, + "type": "NSArray *" + }, + { + "name": "selectedObjects", + "read_only": true, + "type": "NSArray *" + }, + { + "name": "selectedNodes", + "read_only": true, + "type": "NSArray *" + }, + { + "name": "selectsInsertedObjects", + "type": "BOOL" + }, + { + "name": "avoidsEmptySelection", + "type": "BOOL" + }, + { + "name": "preservesSelection", + "type": "BOOL" + }, + { + "name": "alwaysUsesMultipleValuesMarker", + "type": "BOOL" + }, + { + "name": "canAddChild", + "read_only": true, + "type": "BOOL" + }, + { + "name": "canInsert", + "read_only": true, + "type": "BOOL" + }, + { + "name": "canInsertChild", + "read_only": true, + "type": "BOOL" + }, + { + "name": "childrenKeyPath", + "type": "NSString*" + }, + { + "name": "countKeyPath", + "type": "NSString*" + }, + { + "name": "leafKeyPath", + "type": "NSString*" + } + ], + "methods": [ + { + "name": "rearrangeObjects", + "return_type": "void" + }, + { + "name": "setSelectionIndexPath", + "params": [ + { + "variable_name": "indexPath", + "type": "Foundation.NSIndexPath *" + } + ], + "return_type": "BOOL" + }, + { + "name": "setSelectionIndexPaths", + "params": [ + { + "variable_name": "indexPaths", + "type": "NSArray *" + } + ], + "return_type": "BOOL" + }, + { + "name": "addSelectionIndexPaths", + "params": [ + { + "variable_name": "indexPaths", + "type": "NSArray *" + } + ], + "return_type": "BOOL" + }, + { + "name": "removeSelectionIndexPaths", + "params": [ + { + "variable_name": "indexPaths", + "type": "NSArray *" + } + ], + "return_type": "BOOL" + }, + { + "name": "add", + "params": [ + { + "variable_name": "sender", + "type": "objectivec.NSObject *" + } + ], + "return_type": "void" + }, + { + "name": "addChild", + "params": [ + { + "variable_name": "sender", + "type": "objectivec.NSObject *" + } + ], + "return_type": "void" + }, + { + "name": "insert", + "params": [ + { + "variable_name": "sender", + "type": "objectivec.NSObject *" + } + ], + "return_type": "void" + }, + { + "name": "insertChild", + "params": [ + { + "variable_name": "sender", + "type": "objectivec.NSObject *" + } + ], + "return_type": "void" + }, + { + "name": "insertObject", + "params": [ + { + "variable_name": "object", + "type": "objectivec.NSObject *" + }, + { + "name": "atArrangedObjectIndexPath", + "variable_name": "indexPath", + "type": "Foundation.NSIndexPath *" + } + ], + "return_type": "void" + }, + { + "name": "insertObjects", + "params": [ + { + "variable_name": "objects", + "type": "NSArray *" + }, + { + "name": "atArrangedObjectIndexPaths", + "variable_name": "indexPaths", + "type": "NSArray *" + } + ], + "return_type": "void" + }, + { + "name": "remove", + "params": [ + { + "variable_name": "sender", + "type": "objectivec.NSObject *" + } + ], + "return_type": "void" + }, + { + "name": "removeObjectAtArrangedObjectIndexPath", + "params": [ + { + "variable_name": "indexPath", + "type": "Foundation.NSIndexPath *" + } + ], + "return_type": "void" + }, + { + "name": "removeObjectsAtArrangedObjectIndexPaths", + "params": [ + { + "variable_name": "indexPaths", + "type": "NSArray *" + } + ], + "return_type": "void" + }, + { + "name": "moveNode", + "params": [ + { + "variable_name": "node", + "type": "AppKit.NSTreeNode *" + }, + { + "name": "toIndexPath", + "variable_name": "indexPath", + "type": "Foundation.NSIndexPath *" + } + ], + "return_type": "void" + }, + { + "name": "moveNodes", + "params": [ + { + "variable_name": "nodes", + "type": "NSArray *" + }, + { + "name": "toIndexPath", + "variable_name": "startingIndexPath", + "type": "Foundation.NSIndexPath *" + } + ], + "return_type": "void" + }, + { + "name": "childrenKeyPathForNode", + "params": [ + { + "variable_name": "node", + "type": "AppKit.NSTreeNode *" + } + ], + "return_type": "NSString*" + }, + { + "name": "countKeyPathForNode", + "params": [ + { + "variable_name": "node", + "type": "AppKit.NSTreeNode *" + } + ], + "return_type": "NSString*" + }, + { + "name": "leafKeyPathForNode", + "params": [ + { + "variable_name": "node", + "type": "AppKit.NSTreeNode *" + } + ], + "return_type": "NSString*" + } + ] +}