This is the cocoas Reference Manual, version 0.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:46:36 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
cocoas
A toolkit library to help deal with CoreFoundation, Cocoa, and objc
Yukari Hafner <shinmera@tymoon.eu>
Yukari Hafner <shinmera@tymoon.eu>
(GIT https://github.com/shinmera/cocoas.git)
zlib
0.0.0
cffi
(system).
float-features
(system).
trivial-main-thread
(system).
package.lisp
(file).
low-level.lisp
(file).
types.lisp
(file).
classes.lisp
(file).
wrapper.lisp
(file).
documentation.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cocoas/cocoas.asd
cocoas/package.lisp
cocoas/low-level.lisp
cocoas/types.lisp
cocoas/classes.lisp
cocoas/wrapper.lisp
cocoas/documentation.lisp
cocoas/low-level.lisp
package.lisp
(file).
cocoas
(system).
app
(symbol macro).
array-get-count
(function).
array-get-value-at-index
(function).
call
(macro).
cfindex
(constant).
cgfloat
(constant).
class-add-method
(function).
class-allocate-class
(function).
class-get-method-implementation
(function).
class-get-name
(function).
class-get-superclass
(function).
class-register-class
(function).
class-replace-method
(function).
create-array
(function).
create-dictionary
(function).
create-number
(function).
create-set
(function).
create-string-with-cstring
(function).
default-run-loop-mode
(symbol macro).
dictionary-contains-key
(function).
dictionary-get-count
(function).
dictionary-get-keys-and-values
(function).
dictionary-get-value
(function).
free
(function).
get-class
(function).
nsinteger
(constant).
number-get-value
(function).
object-get-class
(function).
object-set-class
(function).
register-name
(function).
release
(function).
set-get-count
(function).
set-get-values
(function).
set-uncaught-exception-handler
(function).
string-get-cstring
(function).
string-get-cstring-ptr
(function).
string-get-length
(function).
%cache
(macro).
%var-accessor-app
(function).
(setf %var-accessor-app)
(function).
%var-accessor-default-run-loop-mode
(function).
(setf %var-accessor-default-run-loop-mode)
(function).
cocoas/types.lisp
low-level.lisp
(file).
cocoas
(system).
cfarray
(class).
cfdictionary
(class).
cfnumber
(class).
cfset
(class).
cfstring
(class).
free-translated-object
(method).
free-translated-object
(method).
nsstring
(class).
translate-from-foreign
(method).
translate-from-foreign
(method).
translate-from-foreign
(method).
translate-from-foreign
(method).
translate-from-foreign
(method).
translate-from-foreign
(method).
translate-from-foreign
(method).
translate-to-foreign
(method).
translate-to-foreign
(method).
translate-to-foreign
(method).
translate-to-foreign
(method).
translate-to-foreign
(method).
translate-to-foreign
(method).
translate-to-foreign
(method).
translate-to-foreign
(method).
translate-to-foreign
(method).
translate-to-foreign
(method).
translate-to-foreign
(method).
cfstring->string
(function).
cftype
(class).
internal-type
(reader method).
internal-type
(reader method).
internal-type
(reader method).
number-type
(reader method).
string->cfstring
(function).
cocoas/classes.lisp
types.lisp
(file).
cocoas
(system).
*classdefs*
(special variable).
define-objc-class
(macro).
define-objc-method
(macro).
encode-types
(function).
normalize-type
(function).
register-class
(function).
register-classes
(function).
cocoas/wrapper.lisp
classes.lisp
(file).
cocoas
(system).
define-objcfun
(macro).
define-objcmethod
(macro).
foundation-error
(function).
foundation-error
(condition).
init
(function).
name
(reader method).
process-event
(function).
reason
(reader method).
shutdown
(function).
with-foundation-objects
(macro).
with-main-loop
(macro).
with-objects
(macro).
*init*
(special variable).
to-method-name
(function).
cocoas/documentation.lisp
wrapper.lisp
(file).
cocoas
(system).
Packages are listed by definition order.
org.shirakumo.cocoas.cffi
common-lisp
.
app
(symbol macro).
array-get-count
(function).
array-get-value-at-index
(function).
call
(macro).
cfindex
(constant).
cgfloat
(constant).
class-add-method
(function).
class-allocate-class
(function).
class-get-method-implementation
(function).
class-get-name
(function).
class-get-superclass
(function).
class-register-class
(function).
class-replace-method
(function).
create-array
(function).
create-dictionary
(function).
create-number
(function).
create-set
(function).
create-string-with-cstring
(function).
default-run-loop-mode
(symbol macro).
dictionary-contains-key
(function).
dictionary-get-count
(function).
dictionary-get-keys-and-values
(function).
dictionary-get-value
(function).
free
(function).
get-class
(function).
nsinteger
(constant).
number-get-value
(function).
object-get-class
(function).
object-set-class
(function).
register-name
(function).
release
(function).
set-get-count
(function).
set-get-values
(function).
set-uncaught-exception-handler
(function).
string-get-cstring
(function).
string-get-cstring-ptr
(function).
string-get-length
(function).
%cache
(macro).
%var-accessor-app
(function).
(setf %var-accessor-app)
(function).
%var-accessor-default-run-loop-mode
(function).
(setf %var-accessor-default-run-loop-mode)
(function).
org.shirakumo.cocoas
common-lisp
.
cfarray
(class).
cfdictionary
(class).
cfnumber
(class).
cfset
(class).
cfstring
(class).
define-objcfun
(macro).
define-objcmethod
(macro).
foundation-error
(function).
foundation-error
(condition).
init
(function).
name
(generic reader).
nsstring
(class).
process-event
(function).
reason
(generic reader).
shutdown
(function).
with-foundation-objects
(macro).
with-main-loop
(macro).
with-objects
(macro).
*classdefs*
(special variable).
*init*
(special variable).
cfstring->string
(function).
cftype
(class).
define-objc-class
(macro).
define-objc-method
(macro).
encode-types
(function).
internal-type
(generic reader).
normalize-type
(function).
number-type
(generic reader).
register-class
(function).
register-classes
(function).
string->cfstring
(function).
to-method-name
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Macro to perform an Objective C call.
SELF must either be a string denoting a class name or a pointer to an
Objective C instance. METHOD must be a string naming the method to
call.
ARGS should be a list of alternating argument types and argument
values, and optionally the final return type, same as
CFFI:FOREIGN-FUNCALL. If the return type is not specified, it is
defaulted to ID.
The class and method name resolution happen once on first execute and are then cached at the call-site.
Defines an ObjC static class method/function.
CLASS should be the class name the method is defined on.
NAME should be the name of the method. It can be a list of the
lisp-side function name and the method name. If the method name is not
explicitly given, it is translated from the lisp name. To specify
colons in the name, you may use a slash instead. For instance, the
lisp-name
foo-bar/baz
is translated to
fooBar:baz
If the NAME is not a list, the class is automatically prepended to the
name of the resulting lisp function name, meaning
(define-objcfun "foo" bar ...)
Results in the defined lisp function being named FOO-BAR, but
(define-objcfun "foo" (bar) ...)
Results in the defined lisp function being named BAR.
RETTYPE should be the return type of the function. It can also be NIL,
in which case it is automatically replaced with OBJC:ID.
ARGS should be a body of list specifying the function arguments, with the argument name first and the type second, same as CFFI:DEFCFUN.
See CFFI:DEFCFUN
See DEFINE-OBJCMETHOD
Defines an ObjC instance method/function.
NAME should be the name of the method. It can be a list of the
lisp-side function name and the method name. If the method name is not
explicitly given, it is translated from the lisp name. To specify
colons in the name, you may use a slash instead. For instance, the
lisp-name
foo-bar/baz
is translated to
fooBar:baz
RETTYPE should be the return type of the function. It can also be NIL,
in which case it is automatically replaced with OBJC:ID.
ARGS should be a body of list specifying the function arguments, with the argument name first and the type second, same as CFFI:DEFCFUN.
See CFFI:DEFCFUN
See DEFINE-OBJCFUN
Bind a bunch of CoreFramework objects.
Automatically calls OBJC:RELEASE to deallocate the objects on exit. If an
object is bound to a null pointer, its failure form is returned.
Each binding may be a list of the variable name, initialiser form, and an optional failure form. If the failure form is not specified, an ERROR form is generated for you.
Runs BODY in the main thread.
MacOS requires GUI things to run on the main thread. Additionally,
system API calls frequently generate floating point traps which your
Lisp implementation will likely intercept. This also disables those to
ensure your application can run properly.
See FLOAT-FEATURES:WITH-FLOAT-TRAPS-MASKED
See TRIVIAL-MAIN-THREAD:WITH-BODY-IN-MAIN-THREAD
Bind a bunch of ObjC objects.
Automatically calls OBJC:FREE to deallocate the objects on exit. If an
object is bound to a null pointer, its failure form is returned.
Each binding may be a list of the variable name, initialiser form, and an optional failure form. If the failure form is not specified, an ERROR form is generated for you.
Function to call CoreFoundation’s dealloc on an object.
Initialises the libraries.
LIBS can be a set containing:
:FOUNDATION
:COCOA
:APPKIT
If LIBS is not specified, all libraries are loaded.
See SHUTDOWN
Process an event from the apps’ queue.
Returns true if an event was processed and NIL otherwise.
Function to call Objective C’s release on an object.
Cleans up the libraries.
See INIT
Returns the name for the foundation-error.
See FOUNDATION-ERROR (type)
foundation-error
)) ¶name
.
Returns the reason for the foundation-error, if any.
See FOUNDATION-ERROR (type)
foundation-error
)) ¶cfdictionary
)) ¶cffi
.
hash-table
) (type cfdictionary
)) ¶cffi
.
list
) (type cfdictionary
)) ¶cffi
.
Representation of an NSException error.
Signalled for uncaught NSExceptions.
See NAME
See REASON
error
.
CFFI type for CFSet translation.
An optional argument may specify how to translate the individual
pointer values of the array. Defaults to just :pointer.
Will translate to a vector and from a list or vector.
enhanced-foreign-type
.
Initarg | Value |
---|---|
:actual-type | (quote (pointer)) |
:internal-type
This slot is read-only.
CFFI type for CFDictionary translation.
Two optional arguments may specify how to translate the individual
pointer values of the dictionary keys and values respectively.
Defaults to just :pointer for both.
Will translate to a hash-table with an EQUAL test, and from a hash-table or alist.
enhanced-foreign-type
.
Initarg | Value |
---|---|
:actual-type | (quote (pointer)) |
:internal-type
This slot is read-only.
CFFI type for CFNumber translation.
An optional argument may specify the raw number type to use, which may
be one of the following:
:int8
:int16
:int32
:int64
:char
:short
:int
:long
:longlong
:float
:double
org.shirakumo.cocoas.cffi:cfindex
org.shirakumo.cocoas.cffi:nsinteger
org.shirakumo.cocoas.cffi:cgfloat
The actual lisp value will be coerced (as possible) to conform to the number type. If not specified, the default is org.shirakumo.cocoas.cffi:cgfloat
Initarg | Value |
---|---|
:actual-type | (quote (pointer)) |
:number-type
This slot is read-only.
CFFI type for CFSet translation.
An optional argument may specify how to translate the individual
pointer values of the set. Defaults to just :pointer.
Will translate to a list and from a list or vector.
enhanced-foreign-type
.
Initarg | Value |
---|---|
:actual-type | (quote (pointer)) |
:internal-type
This slot is read-only.
CFFI type for CFString translation.
Initarg | Value |
---|---|
:actual-type | (quote (pointer)) |
CFFI type for NSString translation.
enhanced-foreign-type
.
Initarg | Value |
---|---|
:actual-type | (quote (pointer)) |
cfdictionary
)) ¶automatically generated reader method
cfarray
)) ¶automatically generated reader method
enhanced-foreign-type
.
Initarg | Value |
---|---|
:actual-type | (quote (pointer)) |
Jump to: | %
(
A C D E F G I M N O P R S T W |
---|
Jump to: | %
(
A C D E F G I M N O P R S T W |
---|
Jump to: | *
A C D I N R S |
---|
Jump to: | *
A C D I N R S |
---|
Jump to: | C D F L N O P S T W |
---|
Jump to: | C D F L N O P S T W |
---|