diff --git a/archived/monomac_documentation_api_design.md b/archived/monomac_documentation_api_design.md index 3d8af8ca..100cfb91 100644 --- a/archived/monomac_documentation_api_design.md +++ b/archived/monomac_documentation_api_design.md @@ -116,13 +116,13 @@ Major Namespaces ### MonoMac.ObjCRuntime -The [MonoMac.ObjCRuntime](http://docs.go-mono.com/MonoMac.ObjCRuntime) namespace allows developers to bridge the worlds between C# and Objective-C. +The [MonoMac.ObjCRuntime](http://docs.go-mono.com/?link=N:MonoMac.ObjCRuntime) namespace allows developers to bridge the worlds between C# and Objective-C. ### MonoMac.Foundation -The [MonoMac.Foundation](http://docs.go-mono.com/MonoMac.Foundation) namespace provides the basic data types designed to interoperate with the Objective-C Foundation framework that is part of Mac OS X and is the base for object oriented programming in Objective-C. +The [MonoMac.Foundation](http://docs.go-mono.com/?link=N:MonoMac.Foundation) namespace provides the basic data types designed to interoperate with the Objective-C Foundation framework that is part of Mac OS X and is the base for object oriented programming in Objective-C. -MonoMac mirrors in C# the hierarchy of classes from Objective-C. For example, the Objective-C base class [NSObject](http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40003706) is usable from C# via [MonoMac.Foundation.NSObject](http://docs.go-mono.com/MonoMac.Foundation.NSObject). +MonoMac mirrors in C# the hierarchy of classes from Objective-C. For example, the Objective-C base class [NSObject](http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40003706) is usable from C# via [MonoMac.Foundation.NSObject](http://docs.go-mono.com/?link=T:MonoMac.Foundation.NSObject). Although this namespace provides bindings for the underlying Objective-C Foundation types, in a few cases we have mapped the underlying types to .NET types. For example: @@ -133,13 +133,13 @@ For more details on binding APIs see the [MonoMac Binding Generator](/MonoMac/Do #### NSObject -The [NSObject](http://docs.go-mono.com/MonoMac.Foundation.NSObject) type is the foundation for all the Objective-C bindings. MonoMac types mirror two classes of types from the OS X Cocoa APIs: the C types (typically referred to as CoreFoundation types) and the Objective-C types (these all derive from the NSObject class). +The [NSObject](http://docs.go-mono.com/?link=T:MonoMac.Foundation.NSObject) type is the foundation for all the Objective-C bindings. MonoMac types mirror two classes of types from the OS X Cocoa APIs: the C types (typically referred to as CoreFoundation types) and the Objective-C types (these all derive from the NSObject class). -For each type that mirrors an unmanaged type, it is possible to obtain the native object through the [Handle](http://docs.go-mono.com/MonoMac.Foundation.NSObject.Handle) +For each type that mirrors an unmanaged type, it is possible to obtain the native object through the [Handle](http://docs.go-mono.com/?link=T:MonoMac.Foundation.NSObject.Handle) -While Mono will provide garbage collection for all of your objects, we made the *MonoMac.Foundation.NSObject'* implement the [System.IDisposable](http://docs.go-mono.com/System.IDisposable) interface. This means that you can explicitly release the resources of any given NSObject without having to wait for the Garbage Collector to kick-in. This is important when you are using heavy NSObjects, for example, NSImages that might hold pointers to large blocks of data. +While Mono will provide garbage collection for all of your objects, we made the *MonoMac.Foundation.NSObject'* implement the [System.IDisposable](http://docs.go-mono.com/?link=T:System.IDisposable) interface. This means that you can explicitly release the resources of any given NSObject without having to wait for the Garbage Collector to kick-in. This is important when you are using heavy NSObjects, for example, NSImages that might hold pointers to large blocks of data. -If your type needs to perform deterministic finalization, override the [http://docs.go-mono.com/MonoMac.Foundation.NSObject.Dispose%20(bool)](http://docs.go-mono.com/MonoMac.Foundation.NSObject.Dispose%20(bool)) NSObject.Dispose(bool) method]. The parameter to Dispose is *bool disposing*, and if set to *true* it means that your Dispose method is being called because the user explicitly called *Dispose()* on the object. If the value is false, this means that your Dispose(bool disposing) method is being called from the finalizer on the finalizer thread. +If your type needs to perform deterministic finalization, override the [http://docs.go-mono.com/?link=M:MonoMac.Foundation.NSObject.Dispose%20(bool)](http://docs.go-mono.com/?link=M:MonoMac.Foundation.NSObject.Dispose%20(bool)) NSObject.Dispose(bool) method]. The parameter to Dispose is *bool disposing*, and if set to *true* it means that your Dispose method is being called because the user explicitly called *Dispose()* on the object. If the value is false, this means that your Dispose(bool disposing) method is being called from the finalizer on the finalizer thread. #### PreserveAttribute @@ -153,13 +153,13 @@ You can apply this attribute on every member of a type, or on the type itself. I ### MonoMac.AppKit -The [MonoMac.AppKit](http://docs.go-mono.com/MonoMac.AppKit) namespace contains a one to one mapping to all of the UI components that make up Cocoa in the form of C# classes. The API has been modified to follow the conventions used in the C# language. +The [MonoMac.AppKit](http://docs.go-mono.com/?link=N:MonoMac.AppKit) namespace contains a one to one mapping to all of the UI components that make up Cocoa in the form of C# classes. The API has been modified to follow the conventions used in the C# language. C# delegates are provided for common operations. See the [delegates](#delegates) section for more information. ### OpenGL -For OpenGL we use the [MonoMac.OpenGL](http://docs.go-mono.com/MonoMac.OpenGL) namespace, an object-oriented binding to OpenGL based on [OpenTK](http://opentk.org) that has been modified to use CoreGraphics data types and structures as well as only exposing the functionality that is available on Mac OS X. +For OpenGL we use the [MonoMac.OpenGL](http://docs.go-mono.com/?link=N:MonoMac.OpenGL) namespace, an object-oriented binding to OpenGL based on [OpenTK](http://opentk.org) that has been modified to use CoreGraphics data types and structures as well as only exposing the functionality that is available on Mac OS X. Binding Design -------------- @@ -224,9 +224,9 @@ For example, consider the [WebView](http://developer.apple.com/library/mac/docum For many types, MonoMac will automatically create an appropriate delegate which will forward the e.g. *WebFrameLoadDelegate* calls onto C# events. For *WebView*: -- The [webView:didStartProvisionalLoadForFrame:](http://developer.apple.com/library/mac/documentation/Cocoa/Reference/WebKit/Protocols/WebFrameLoadDelegate_Protocol/Reference/Reference.html#//apple_ref/doc/uid/TP40003828) method is mapped to the [WebView.StartedProvisionalLoad](http://docs.go-mono.com/MonoMac.WebKit.WebView.StartedProvisionalLoad) event. -- The [webView:didFinishLoadForFrame:](http://developer.apple.com/library/mac/documentation/Cocoa/Reference/WebKit/Protocols/WebFrameLoadDelegate_Protocol/Reference/Reference.html#//apple_ref/doc/uid/TP40003828) method is mapped to the [WebView.FinishedLoad](http://docs.go-mono.com/MonoMac.WebKit.WebView.FinishedLoad) event. -- The [webView:didFailLoadWithError:forFrame:](http://developer.apple.com/library/mac/documentation/Cocoa/Reference/WebKit/Protocols/WebFrameLoadDelegate_Protocol/Reference/Reference.html#//apple_ref/doc/uid/TP40003828) method is mapped to the [WebView.FailedLoadWithError](http://docs.go-mono.com/MonoMac.WebKit.WebView.FailedLoadWithError) event. +- The [webView:didStartProvisionalLoadForFrame:](http://developer.apple.com/library/mac/documentation/Cocoa/Reference/WebKit/Protocols/WebFrameLoadDelegate_Protocol/Reference/Reference.html#//apple_ref/doc/uid/TP40003828) method is mapped to the [WebView.StartedProvisionalLoad](http://docs.go-mono.com/?link=E:MonoMac.WebKit.WebView.StartedProvisionalLoad) event. +- The [webView:didFinishLoadForFrame:](http://developer.apple.com/library/mac/documentation/Cocoa/Reference/WebKit/Protocols/WebFrameLoadDelegate_Protocol/Reference/Reference.html#//apple_ref/doc/uid/TP40003828) method is mapped to the [WebView.FinishedLoad](http://docs.go-mono.com/?link=E:MonoMac.WebKit.WebView.FinishedLoad) event. +- The [webView:didFailLoadWithError:forFrame:](http://developer.apple.com/library/mac/documentation/Cocoa/Reference/WebKit/Protocols/WebFrameLoadDelegate_Protocol/Reference/Reference.html#//apple_ref/doc/uid/TP40003828) method is mapped to the [WebView.FailedLoadWithError](http://docs.go-mono.com/?link=E:MonoMac.WebKit.WebView.FailedLoadWithError) event. For example, this simple program times the time it takes to load a web view: @@ -259,7 +259,7 @@ The NSTextField's TextShouldEndEditing property in this case takes as an argumen #### Strongly typed via a Delegate property -If you would prefer not to use events, you can provide your own [WebFrameLoadDelegate](http://docs.go-mono.com/MonoMac.WebKit.WebFrameLoadDelegate) subclass and assign it to the [WebView.FrameLoadDelegate](http://docs.go-mono.com/MonoMac.WebKit.WebView.FrameLoadDelegate) property. Once *WebView.FrameLoadDelegate* has been assigned, the *WebView* event dispatch mechanism will no longer function, and the WebFrameLoadDelegate methods will be invoked when the corresponding events occur. +If you would prefer not to use events, you can provide your own [WebFrameLoadDelegate](http://docs.go-mono.com/?link=T:MonoMac.WebKit.WebFrameLoadDelegate) subclass and assign it to the [WebView.FrameLoadDelegate](http://docs.go-mono.com/?link=T:MonoMac.WebKit.WebView.FrameLoadDelegate) property. Once *WebView.FrameLoadDelegate* has been assigned, the *WebView* event dispatch mechanism will no longer function, and the WebFrameLoadDelegate methods will be invoked when the corresponding events occur. For example, this simple type records the time it takes to load a web view: @@ -290,13 +290,13 @@ The above will create a *WebView* and it will instruct it to send messages to an This pattern is also used to control behavior for certain controls. *TODO: Example.* -The pattern is also used to provide the data on demand for a few controls. For example the [NSTableView](http://docs.go-mono.com/MonoMac.AppKit.NSTableView) control is a powerful table rendering control and both the look and the contents are driven by an instace of a [NSTableViewDataSource](http://docs.go-mono.com/MonoMac.AppKit.NSTableViewDataSource) set in the [NSTableView.DataSource](http://docs.go-mono.com/MonoMac.AppKit.NSTableView.DataSource) property. +The pattern is also used to provide the data on demand for a few controls. For example the [NSTableView](http://docs.go-mono.com/?link=T:MonoMac.AppKit.NSTableView) control is a powerful table rendering control and both the look and the contents are driven by an instace of a [NSTableViewDataSource](http://docs.go-mono.com/?link=T:MonoMac.AppKit.NSTableViewDataSource) set in the [NSTableView.DataSource](http://docs.go-mono.com/?link=T:MonoMac.AppKit.NSTableView.DataSource) property. #### Loosely typed via the WeakDelegate property In addition to the strongly typed property, there is also a weak typed delegate that allows the developer to bind things differently if desired. Everywhere where a strongly typed *Delegate* property is exposed in MonoMac's binding a corresponding *WeakDelegate* property is also exposed. -When using the *WeakDelegate* you are responsible for properly decorating your class using the [ExportAttribute](http://docs.go-mono.com/MonoMac.Foundation.ExportAttribute) attribute to specify the selector. For example: +When using the *WeakDelegate* you are responsible for properly decorating your class using the [ExportAttribute](http://docs.go-mono.com/?link=T:MonoMac.Foundation.ExportAttribute) attribute to specify the selector. For example: ``` csharp class Notifier : NSObject { @@ -443,7 +443,7 @@ This is done in a few steps: The steps (1) through (3) are covered in Apple's documentation for building interfaces with Interface Builder. -When using MonoMac your application will need to create a class that derives from [NSViewController](http://docs.go-mono.com/MonoMac.AppKit.NSViewController) and implement it like this: +When using MonoMac your application will need to create a class that derives from [NSViewController](http://docs.go-mono.com/?link=T:MonoMac.AppKit.NSViewController) and implement it like this: ``` csharp public class MyViewController : NSViewController { @@ -483,7 +483,7 @@ You do not need to worry about this when using MonoDevelop and InterfaceBuilder. A core concept of Objective-C programming are selectors. You will often come across APIs that require you to pass a selector, or expects your code to respond to a selector. -Creating new selectors in C# is very easy, you just create a new instance of the [MonoMac.ObjCRuntime.Selector](http://docs.go-mono.com/MonoMac.ObjCRuntime.Selector) class and use the result in any place in the API that requires it. For example: +Creating new selectors in C# is very easy, you just create a new instance of the [MonoMac.ObjCRuntime.Selector](http://docs.go-mono.com/?link=T:MonoMac.ObjCRuntime.Selector) class and use the result in any place in the API that requires it. For example: ``` csharp var selector_add = new Selector ("add:plus:"); diff --git a/archived/monomac_documentation_api_design_nsstring.md b/archived/monomac_documentation_api_design_nsstring.md index bfe828db..bebf7dff 100644 --- a/archived/monomac_documentation_api_design_nsstring.md +++ b/archived/monomac_documentation_api_design_nsstring.md @@ -11,7 +11,7 @@ MonoMac/Documentation/API Design/NSString NSString ======== -The design of MonoMac calls for the use of the native .NET string type for string manipulation in C# and other .NET programming languages and to expose *string* as the data type exposed by the API instead of the [NSString](http://docs.go-mono.com/MonoMac.Foundation.NSString) data type. +The design of MonoMac calls for the use of the native .NET string type for string manipulation in C# and other .NET programming languages and to expose *string* as the data type exposed by the API instead of the [NSString](http://docs.go-mono.com/?link=T:MonoMac.Foundation.NSString) data type. This means that developers should not have to keep strings that are intended to be used for calling into the MonoMac API in special types, they can keep using Mono's *System.String* for all of the operations, and whenever an API in MonoMac requires a string, our API binding takes care of marshalling the information. @@ -19,7 +19,7 @@ For example, the Objective-C *PlaceholderString* property on a NSTextFieldCell i - (NSString *)placeholderString -This is [exposed in MonoMac as](http://docs.go-mono.com/MonoMac.AppKit.NSTextFieldCell.PlaceholderString): +This is [exposed in MonoMac as](http://docs.go-mono.com/?link=P:MonoMac.AppKit.NSTextFieldCell.PlaceholderString): ``` csharp class NSTextFieldCell { diff --git a/archived/monomac_documentation_binding_new_objectivec_types.md b/archived/monomac_documentation_binding_new_objectivec_types.md index a3fef1e4..6850e26d 100644 --- a/archived/monomac_documentation_binding_new_objectivec_types.md +++ b/archived/monomac_documentation_binding_new_objectivec_types.md @@ -297,8 +297,8 @@ The following table shows how you should map types from the Objective-C and Coco > |CGPoint|System.Drawing.PointF| > |CGSize|System.Drawing.SizeF| > |CGFloat|float| -> |CoreFoundation types (CF\*)|[MonoMac.CoreFoundation](http://docs.go-mono.com/MonoMac.CoreFoundation).CF\*| -> |Foundation Types (NS\*)|[MonoMac.Foundation](http://docs.go-mono.com/MonoMac.Foundation).NS\*| +> |CoreFoundation types (CF\*)|[MonoMac.CoreFoundation](http://docs.go-mono.com/?link=N:MonoMac.CoreFoundation).CF\*| +> |Foundation Types (NS\*)|[MonoMac.Foundation](http://docs.go-mono.com/?link=N:MonoMac.Foundation).NS\*| > ### Arrays diff --git a/archived/monomac_documentation_binding_new_objectivec_types_binding_details.md b/archived/monomac_documentation_binding_new_objectivec_types_binding_details.md index d03d4c10..013ecbf4 100644 --- a/archived/monomac_documentation_binding_new_objectivec_types_binding_details.md +++ b/archived/monomac_documentation_binding_new_objectivec_types_binding_details.md @@ -13,11 +13,11 @@ Binding Details These are the details of how the binding takes place. -It is possible to use the [[Register](http://docs.go-mono.com/MonoMac.Foundation.RegisterAttribute)] attribute, [[Export](http://docs.go-mono.com/MonoMac.Foundation.ExportAttribute)] attribute, and manual Objective-C selector invocation together to manually bind new (previously unbound) Objective-C types. +It is possible to use the [[Register](http://docs.go-mono.com/?link=T:MonoMac.Foundation.RegisterAttribute)] attribute, [[Export](http://docs.go-mono.com/?link=T:MonoMac.Foundation.ExportAttribute)] attribute, and manual Objective-C selector invocation together to manually bind new (previously unbound) Objective-C types. -First, find a type that you wish to bind. For discussion purposes (and simplicity), we'll bind the [NSEnumerator](http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSEnumerator_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40003654) type (which has already been bound in [MonoMac.Foundation.NSEnumerator](http://docs.go-mono.com/MonoMac.Foundation.NSEnumerator); the implementation below is just for example purposes). +First, find a type that you wish to bind. For discussion purposes (and simplicity), we'll bind the [NSEnumerator](http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSEnumerator_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40003654) type (which has already been bound in [MonoMac.Foundation.NSEnumerator](http://docs.go-mono.com/?link=T:MonoMac.Foundation.NSEnumerator); the implementation below is just for example purposes). -Second, we need to create the C# type. We'll likely want to place this into a namespace; since Objective-C doesn't support namespaces, we'll need to use the [Register] attribute to change the type name that MonoTouch will register with the Objective-C runtime. The C# type must also inherit from [MonoMac.Foundation.NSObject](http://docs.go-mono.com/MonoMac.Foundation.NSObject): +Second, we need to create the C# type. We'll likely want to place this into a namespace; since Objective-C doesn't support namespaces, we'll need to use the [Register] attribute to change the type name that MonoTouch will register with the Objective-C runtime. The C# type must also inherit from [MonoMac.Foundation.NSObject](http://docs.go-mono.com/?link=T:MonoMac.Foundation.NSObject): ``` csharp namespace MonoMac.Example.Binding { @@ -29,7 +29,7 @@ namespace MonoMac.Example.Binding { } ``` -Third, review the Objective-C documentation and create [MonoMac.ObjCRuntime.Selector](http://docs.go-mono.com/MonoMac.ObjCRuntime.Selector) instances for each selector you wish to use. Place these within the class body: +Third, review the Objective-C documentation and create [MonoMac.ObjCRuntime.Selector](http://docs.go-mono.com/?link=T:MonoMac.ObjCRuntime.Selector) instances for each selector you wish to use. Place these within the class body: ``` csharp static Selector selInit = new Selector("init"); @@ -55,7 +55,7 @@ public NSEnumerator(IntPtr handle) } ``` -Fifth, provide methods for each of the Selectors declared in Step 3. These will use objc_msgSend() to invoke the selector on the native object. Note the use of [Runtime.GetNSObject()](http://docs.go-mono.com/MonoMac.ObjCRuntime.Runtime.GetNSObject%20(System.IntPtr)) to convert an IntPtr into an appropriately typed NSObject (sub-)type. If you want the method to be callable from Objective-C code, the member *must* be **virtual**. +Fifth, provide methods for each of the Selectors declared in Step 3. These will use objc_msgSend() to invoke the selector on the native object. Note the use of [Runtime.GetNSObject()](http://docs.go-mono.com/?link=M:MonoMac.ObjCRuntime.Runtime.GetNSObject%20(System.IntPtr)) to convert an IntPtr into an appropriately typed NSObject (sub-)type. If you want the method to be callable from Objective-C code, the member *must* be **virtual**. ``` csharp [Export("nextObject")] diff --git a/archived/monomacnew.md b/archived/monomacnew.md index 68691f21..0d3e742c 100644 --- a/archived/monomacnew.md +++ b/archived/monomacnew.md @@ -12,7 +12,7 @@ MonoMacNew Getting Started -[API Documentation](http://docs.go-mono.com/N:MonoMac) +[API Documentation](http://docs.go-mono.com/?link=N:MonoMac) \