NextPrevUpTopContentsIndex

define-objc-struct

Macro
Summary

Defines a foreign structure for use with Objective-C.

Package

objc

Signature

define-objc-struct ( name option* ) slot*

option ::= (:foreign-name foreign-name )

| (:typedef-name typedef-name )

slot ::= ( slot-name slot-type )

Arguments

name

A symbol naming the foreign structure type.

foreign-name

A string giving the foreign structure name.

typedef-name

A symbol naming a foreign structure type alias.

slot-name

A symbol naming the foreign slot.

slot-type

An FLI type descriptor for the foreign slot.

Description

The macro define-objc-struct defines a foreign structure type called (:struct name ) with the given slot s. In addition, the type becomes an Objective-C type that can be used with invoke-into and define-objc-method or define-objc-class-method.

The foreign-name must be specified to allow the Objective-C runtime system to identify the type.

If typedef-name is specified,it allows that symbol to be used in place of (:struct name ) when using the type in a define-objc-method or define-objc-class-method form.

Example

 

See also

invoke-into
define-objc-method
define-objc-class-method


LispWorks Objective-C and Cocoa Interface User Guide and Reference Manual - 4 Apr 2005

NextPrevUpTopContentsIndex