]> code.delx.au - gnu-emacs/blob - nextstep/README
Update HISTORY section in readme for the NextStep interface.
[gnu-emacs] / nextstep / README
1
2 NS -- the Cocoa interface for OS X and compatible systems
3 ---------------------------------------------------------
4
5 This directory contains files needed to build Emacs on system based on
6 NextStep (NS), including OS X (Mac) and GNUstep, using the Cocoa API.
7
8
9 HISTORY
10
11
12 The Nextstep (NS) interface of GNU Emacs was originally written in
13 1994 for NeXTSTEP systems running Emacs 19 and subsequently ported to
14 OpenStep and then Rhapsody, which became Mac OS X. In 2004 it was
15 adapted to GNUstep, a free OpenStep implementation, and in 2008 it was
16 merged to the GNU Emacs trunk and released with Emacs 23. Around the
17 same time a separate Mac-only port using the Carbon APIs and
18 descending from a 2001 MacOS 8/9 port of Emacs 21 was removed. (It
19 remains available externally under the name "mac".)
20
21
22 OVERVIEW OF COCOA AND OBJECTIVE-C
23
24 Cocoa is an API for the Objective-C language, an objective oriented
25 superset of C. Anybody with experience with iOS or modern OS X
26 application development should feel at home.
27
28 A method call in Objective-C differs from most other languages in the
29 fact that it doesn't have a normal name. Instead, the method name is
30 made up of the name of each parameter. An exception to this rule are
31 methods without parameters.
32
33 The following calls a method in the object `anObject'.
34
35 [anObject alpha:1 beta:2 gamma:3];
36
37 Classes are declared like the following:
38
39 @interface AClassName
40 {
41 // A class method.
42 + (TYPE)name1:(TYPE)param1
43
44 // An object method.
45 - (TYPE)name1:(TYPE)param1 name2:(TYPE)param2;
46 }
47 @end
48
49
50 GUIDELINES
51
52 * Adhere the to the FSF philosophy that a feature in GNU software
53 should not only be available on non-free systems.
54
55 * People with varying Cocoa and Objective-C skills will read and
56 modify the NS code over a long period of time. Keep the code simple
57 and avoid language constructs that makes the code hard to maintain.
58
59 * Don't use macros and types intended for the XCode Interface Builder,
60 like `IBAction'.
61
62 * The NS interface should work on all version of OS X from 10.6.8
63 (Snow Leopard) to the latest official release.
64
65 * Under OS X, it is possible to build Emacs using NS, X11, or console
66 only. A new OS X feature should work in all appropriate builds.
67
68
69 TRACING SUPPORT
70
71 The NS interface features a printf-based trace package that prints the
72 call tree of selected functions in the Cocoa interface, plus various
73 extra information. It can be enabled by uncommenting the line
74 defining `NSTRACE_ENABLED' in "nsterm.h". To enable more output,
75 uncomment the lines defining symbols starting with `NSTRACE_GROUP'.
76
77
78 GNUSTEP AND OTHER COMPATIBLE SYSTEMS
79
80 The NS interface works on system compatible with OS X, for example
81 GNUstep. Even though they are less frequently used, this is important
82 for a number of reasons:
83
84 * It supports the GNUstep project and provides an Emacs with the same
85 look-and-feel as the rest of the system.
86
87 * This allows other Emacs developers to test their changes on the NS
88 interface without having access to an OS X machine.
89
90 * If a feature in the NS interface work on free systems like GNUstep,
91 this meets the FSF requirement that features in GNU software should
92 not only be available on non-free systems.
93
94
95 SEE ALSO
96
97 The src/ns... files contains the C and Objective-C parts.
98
99 The lisp/term/ns-win.el file contains the lisp part of the NS
100 interface.
101
102 The INSTALL file in this directory for compilation instructions.
103
104 The WISHLIST file in this directory for a list of ideas for future
105 development of the NS interface.