Mercurial > emacs
annotate src/nsterm.h @ 110710:deee083d1b01
* subr.el (booleanp): Return t instead of a list (Bug#7086).
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sat, 02 Oct 2010 21:11:20 -0400 |
parents | d6fc586a0872 |
children | 2186ab0af4a5 |
rev | line source |
---|---|
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
1 /* Definitions and headers for communication with NeXT/Open/GNUstep API. |
106815 | 2 Copyright (C) 1989, 1993, 2005, 2008, 2009, 2010 Free Software Foundation, Inc. |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
3 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
4 This file is part of GNU Emacs. |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
5 |
96692
6fad3f85eab7
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
96684
diff
changeset
|
6 GNU Emacs is free software: you can redistribute it and/or modify |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
7 it under the terms of the GNU General Public License as published by |
96692
6fad3f85eab7
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
96684
diff
changeset
|
8 the Free Software Foundation, either version 3 of the License, or |
6fad3f85eab7
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
96684
diff
changeset
|
9 (at your option) any later version. |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
10 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
11 GNU Emacs is distributed in the hope that it will be useful, |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
12 but WITHOUT ANY WARRANTY; without even the implied warranty of |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
14 GNU General Public License for more details. |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
15 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
16 You should have received a copy of the GNU General Public License |
96692
6fad3f85eab7
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
96684
diff
changeset
|
17 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
6fad3f85eab7
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
96684
diff
changeset
|
18 |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
19 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
20 #include "dispextern.h" |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
21 #include "frame.h" |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
22 #include "character.h" |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
23 #include "font.h" |
109653
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
24 #include "sysselect.h" |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
25 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
26 #ifdef HAVE_NS |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
27 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
28 #ifdef __OBJC__ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
29 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
30 /* ========================================================================== |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
31 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
32 The Emacs application |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
33 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
34 ========================================================================== */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
35 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
36 /* We override sendEvent: as a means to stop/start the event loop */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
37 @interface EmacsApp : NSApplication |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
38 { |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
39 } |
97198
cf43f4e3ecc8
clear warnings and clean up NS port
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
96870
diff
changeset
|
40 - (void)logNotification: (NSNotification *)notification; |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
41 - (void)sendEvent: (NSEvent *)theEvent; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
42 - (void)showPreferencesWindow: (id)sender; |
97198
cf43f4e3ecc8
clear warnings and clean up NS port
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
96870
diff
changeset
|
43 - (BOOL) openFile: (NSString *)fileName; |
cf43f4e3ecc8
clear warnings and clean up NS port
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
96870
diff
changeset
|
44 - (void)fd_handler: (NSTimer *) fdEntry; |
cf43f4e3ecc8
clear warnings and clean up NS port
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
96870
diff
changeset
|
45 - (void)timeout_handler: (NSTimer *)timedEntry; |
cf43f4e3ecc8
clear warnings and clean up NS port
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
96870
diff
changeset
|
46 - (BOOL)fulfillService: (NSString *)name withArg: (NSString *)arg; |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
47 @end |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
48 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
49 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
50 /* ========================================================================== |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
51 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
52 The main Emacs view |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
53 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
54 ========================================================================== */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
55 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
56 @class EmacsToolbar; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
57 |
105625
ecdd7b507a32
(NS_HAVE_NSINTEGER): Back out and augment with CGFloat, still needed under Tiger.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
105559
diff
changeset
|
58 @interface EmacsView : NSView <NSTextInput> /* 10.6+: NSWindowDelegate */ |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
59 { |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
60 char *old_title; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
61 BOOL windowClosing; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
62 NSString *workingText; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
63 BOOL processingCompose; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
64 @public |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
65 struct frame *emacsframe; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
66 int rows, cols; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
67 int scrollbarsNeedingUpdate; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
68 EmacsToolbar *toolbar; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
69 } |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
70 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
71 /* AppKit-side interface */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
72 - menuDown: sender; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
73 - toolbarClicked: (id)item; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
74 - toggleToolbar: (id)sender; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
75 - (void)keyDown: (NSEvent *)theEvent; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
76 - (void)mouseDown: (NSEvent *)theEvent; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
77 - (void)mouseUp: (NSEvent *)theEvent; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
78 - setMiniwindowImage: (BOOL)setMini; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
79 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
80 /* Emacs-side interface */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
81 - initFrameFromEmacs: (struct frame *) f; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
82 - (void) setRows: (int) r andColumns: (int) c; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
83 - (void) setWindowClosing: (BOOL)closing; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
84 - (EmacsToolbar *) toolbar; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
85 - (void) deleteWorkingText; |
97584
06f7d5858c5a
* nsfns.m (ns-read-file-name): Add casts to avoid warning. (ns-convert-utf8-nfd-to-nfc): Warn if cannot execute correctly. * nsfont.m (nsfont_draw): Compare indexed colors to 0, not nil. * nsterm.h (EmacsView-unlockFocusNeedsFlush:): Add declaration. (EmacsApp-cursor_blink_handler): Remove declaration. * nsterm.m (ns_draw_glyph_string): Update first conditional body to match 01 Feb 2008 changes in xterm.c. (ns_read_socket): Add cast to avoid warning. (EmacsApp-application:openFiles:): Don't call replyToOpenOrPrint: on GNUstep.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
97335
diff
changeset
|
86 |
06f7d5858c5a
* nsfns.m (ns-read-file-name): Add casts to avoid warning. (ns-convert-utf8-nfd-to-nfc): Warn if cannot execute correctly. * nsfont.m (nsfont_draw): Compare indexed colors to 0, not nil. * nsterm.h (EmacsView-unlockFocusNeedsFlush:): Add declaration. (EmacsApp-cursor_blink_handler): Remove declaration. * nsterm.m (ns_draw_glyph_string): Update first conditional body to match 01 Feb 2008 changes in xterm.c. (ns_read_socket): Add cast to avoid warning. (EmacsApp-application:openFiles:): Don't call replyToOpenOrPrint: on GNUstep.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
97335
diff
changeset
|
87 #ifdef NS_IMPL_GNUSTEP |
06f7d5858c5a
* nsfns.m (ns-read-file-name): Add casts to avoid warning. (ns-convert-utf8-nfd-to-nfc): Warn if cannot execute correctly. * nsfont.m (nsfont_draw): Compare indexed colors to 0, not nil. * nsterm.h (EmacsView-unlockFocusNeedsFlush:): Add declaration. (EmacsApp-cursor_blink_handler): Remove declaration. * nsterm.m (ns_draw_glyph_string): Update first conditional body to match 01 Feb 2008 changes in xterm.c. (ns_read_socket): Add cast to avoid warning. (EmacsApp-application:openFiles:): Don't call replyToOpenOrPrint: on GNUstep.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
97335
diff
changeset
|
88 /* Not declared, but useful. */ |
06f7d5858c5a
* nsfns.m (ns-read-file-name): Add casts to avoid warning. (ns-convert-utf8-nfd-to-nfc): Warn if cannot execute correctly. * nsfont.m (nsfont_draw): Compare indexed colors to 0, not nil. * nsterm.h (EmacsView-unlockFocusNeedsFlush:): Add declaration. (EmacsApp-cursor_blink_handler): Remove declaration. * nsterm.m (ns_draw_glyph_string): Update first conditional body to match 01 Feb 2008 changes in xterm.c. (ns_read_socket): Add cast to avoid warning. (EmacsApp-application:openFiles:): Don't call replyToOpenOrPrint: on GNUstep.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
97335
diff
changeset
|
89 - (void) unlockFocusNeedsFlush: (BOOL)needs; |
06f7d5858c5a
* nsfns.m (ns-read-file-name): Add casts to avoid warning. (ns-convert-utf8-nfd-to-nfc): Warn if cannot execute correctly. * nsfont.m (nsfont_draw): Compare indexed colors to 0, not nil. * nsterm.h (EmacsView-unlockFocusNeedsFlush:): Add declaration. (EmacsApp-cursor_blink_handler): Remove declaration. * nsterm.m (ns_draw_glyph_string): Update first conditional body to match 01 Feb 2008 changes in xterm.c. (ns_read_socket): Add cast to avoid warning. (EmacsApp-application:openFiles:): Don't call replyToOpenOrPrint: on GNUstep.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
97335
diff
changeset
|
90 #endif |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
91 @end |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
92 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
93 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
94 /* Small utility used for processing resize events under Cocoa. */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
95 @interface EmacsWindow : NSWindow |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
96 { |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
97 NSPoint grabOffset; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
98 } |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
99 @end |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
100 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
101 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
102 /* ========================================================================== |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
103 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
104 The main menu implementation |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
105 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
106 ========================================================================== */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
107 |
105625
ecdd7b507a32
(NS_HAVE_NSINTEGER): Back out and augment with CGFloat, still needed under Tiger.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
105559
diff
changeset
|
108 @interface EmacsMenu : NSMenu /* 10.6+: <NSMenuDelegate> */ |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
109 { |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
110 struct frame *frame; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
111 unsigned long keyEquivModMask; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
112 } |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
113 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
114 - initWithTitle: (NSString *)title frame: (struct frame *)f; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
115 - (void)setFrame: (struct frame *)f; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
116 - (void)menuNeedsUpdate: (NSMenu *)menu; /* (delegate method) */ |
109746
d6fc586a0872
Use const char* for -Wwrite_strings.
Jan D <jan.h.d@swipnet.se>
parents:
109654
diff
changeset
|
117 - (NSString *)parseKeyEquiv: (const char *)key; |
97198
cf43f4e3ecc8
clear warnings and clean up NS port
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
96870
diff
changeset
|
118 - (NSMenuItem *)addItemWithWidgetValue: (void *)wvptr; |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
119 - (void)fillWithWidgetValue: (void *)wvptr; |
109746
d6fc586a0872
Use const char* for -Wwrite_strings.
Jan D <jan.h.d@swipnet.se>
parents:
109654
diff
changeset
|
120 - (EmacsMenu *)addSubmenuWithTitle: (const char *)title forFrame: (struct frame *)f; |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
121 - (void) clear; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
122 - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
123 keymaps: (int)keymaps; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
124 @end |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
125 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
126 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
127 /* ========================================================================== |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
128 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
129 Toolbar |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
130 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
131 ========================================================================== */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
132 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
133 @class EmacsImage; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
134 |
105625
ecdd7b507a32
(NS_HAVE_NSINTEGER): Back out and augment with CGFloat, still needed under Tiger.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
105559
diff
changeset
|
135 @interface EmacsToolbar : NSToolbar /* 10.6+: <NSToolbarDelegate> */ |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
136 { |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
137 EmacsView *emacsView; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
138 NSMutableDictionary *identifierToItem; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
139 NSMutableArray *activeIdentifiers; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
140 NSArray *prevIdentifiers; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
141 unsigned long enablement, prevEnablement; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
142 } |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
143 - initForView: (EmacsView *)view withIdentifier: (NSString *)identifier; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
144 - (void) clearActive; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
145 - (BOOL) changed; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
146 - (void) addDisplayItemWithImage: (EmacsImage *)img idx: (int)idx |
109746
d6fc586a0872
Use const char* for -Wwrite_strings.
Jan D <jan.h.d@swipnet.se>
parents:
109654
diff
changeset
|
147 helpText: (const char *)help |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
148 enabled: (BOOL)enabled; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
149 /* delegate methods */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
150 - (NSToolbarItem *)toolbar: (NSToolbar *)toolbar |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
151 itemForItemIdentifier: (NSString *)itemIdentifier |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
152 willBeInsertedIntoToolbar: (BOOL)flag; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
153 - (NSArray *)toolbarDefaultItemIdentifiers: (NSToolbar *)toolbar; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
154 - (NSArray *)toolbarAllowedItemIdentifiers: (NSToolbar *)toolbar; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
155 @end |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
156 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
157 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
158 /* ========================================================================== |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
159 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
160 Message / question windows |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
161 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
162 ========================================================================== */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
163 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
164 @interface EmacsDialogPanel : NSPanel |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
165 { |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
166 NSTextField *command; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
167 NSTextField *title; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
168 NSMatrix *matrix; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
169 int rows, cols; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
170 } |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
171 - initFromContents: (Lisp_Object)menu isQuestion: (BOOL)isQ; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
172 - addButton: (char *)str value: (Lisp_Object)val row: (int)row; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
173 - addString: (char *)str row: (int)row; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
174 - addSplit; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
175 - (Lisp_Object)runDialogAt: (NSPoint)p; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
176 @end |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
177 |
105625
ecdd7b507a32
(NS_HAVE_NSINTEGER): Back out and augment with CGFloat, still needed under Tiger.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
105559
diff
changeset
|
178 @interface EmacsTooltip : NSObject /* 10.6+: <NSWindowDelegate> */ |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
179 { |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
180 NSWindow *win; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
181 NSTextField *textField; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
182 NSTimer *timer; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
183 } |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
184 - init; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
185 - (void) setText: (char *)text; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
186 - (void) showAtX: (int)x Y: (int)y for: (int)seconds; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
187 - (void) hide; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
188 - (BOOL) isActive; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
189 - (NSRect) frame; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
190 @end |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
191 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
192 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
193 /* ========================================================================== |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
194 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
195 File open/save panels |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
196 This and next override methods to work around OS X behavior of |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
197 restarting application loop when user dismisses panel. |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
198 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
199 ========================================================================== */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
200 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
201 @interface EmacsSavePanel : NSSavePanel |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
202 { |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
203 } |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
204 @end |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
205 @interface EmacsOpenPanel : NSOpenPanel |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
206 { |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
207 } |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
208 @end |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
209 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
210 @interface EmacsFileDelegate : NSObject |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
211 { |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
212 } |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
213 - (BOOL)panel: (id)sender isValidFilename: (NSString *)filename; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
214 - (BOOL)panel: (id)sender shouldShowFilename: (NSString *)filename; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
215 - (NSString *)panel: (id)sender userEnteredFilename: (NSString *)filename |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
216 confirmed: (BOOL)okFlag; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
217 @end |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
218 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
219 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
220 /* ========================================================================== |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
221 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
222 Images and stippling |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
223 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
224 ========================================================================== */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
225 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
226 @interface EmacsImage : NSImage |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
227 { |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
228 id imageListNext; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
229 int refCount; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
230 NSBitmapImageRep *bmRep; /* used for accessing pixel data */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
231 unsigned char *pixmapData[5]; /* shortcut to access pixel data */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
232 BOOL onTiger; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
233 NSColor *stippleMask; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
234 } |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
235 + allocInitFromFile: (Lisp_Object)file; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
236 - reference; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
237 - imageListSetNext: (id)arg; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
238 - imageListNext; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
239 - (void)dealloc; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
240 - initFromXBM: (unsigned char *)bits width: (int)w height: (int)h |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
241 flip: (BOOL)flip; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
242 - initFromSkipXBM: (unsigned char *)bits width: (int)w height: (int)h |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
243 flip: (BOOL)flip length: (int)length; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
244 - setXBMColor: (NSColor *)color; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
245 - initForXPMWithDepth: (int)depth width: (int)width height: (int)height; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
246 - (void)setPixmapData; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
247 - (unsigned long)getPixelAtX: (int)x Y: (int)y; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
248 - (void)setPixelAtX: (int)x Y: (int)y toRed: (unsigned char)r |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
249 green: (unsigned char)g blue: (unsigned char)b |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
250 alpha:(unsigned char)a; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
251 - (void)setAlphaAtX: (int)x Y: (int)y to: (unsigned char)a; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
252 - (NSColor *)stippleMask; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
253 @end |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
254 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
255 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
256 /* ========================================================================== |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
257 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
258 Scrollbars |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
259 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
260 ========================================================================== */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
261 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
262 @interface EmacsScroller : NSScroller |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
263 { |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
264 Lisp_Object win; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
265 struct frame *frame; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
266 NSResponder *prevResponder; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
267 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
268 /* offset to the bottom of knob of last mouse down */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
269 float last_mouse_offset; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
270 float min_portion; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
271 int pixel_height; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
272 int last_hit_part; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
273 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
274 BOOL condemned; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
275 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
276 /* optimize against excessive positioning calls generated by emacs */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
277 int em_position; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
278 int em_portion; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
279 int em_whole; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
280 } |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
281 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
282 - initFrame: (NSRect )r window: (Lisp_Object)win; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
283 - (void)setFrame: (NSRect)r; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
284 - (void)dealloc; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
285 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
286 - setPosition: (int) position portion: (int) portion whole: (int) whole; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
287 - (int) checkSamePosition: (int)position portion: (int)portion |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
288 whole: (int)whole; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
289 - (void) getMouseMotionPart: (int *)part window: (Lisp_Object *)window |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
290 x: (Lisp_Object *)x y: ( Lisp_Object *)y; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
291 - (void) sendScrollEventAtLoc: (float)loc fromEvent: (NSEvent *)e; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
292 - repeatScroll: (NSTimer *)sender; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
293 - condemn; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
294 - reprieve; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
295 - judge; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
296 @end |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
297 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
298 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
299 /* ========================================================================== |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
300 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
301 Rendering on Panther and above |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
302 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
303 ========================================================================== */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
304 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
305 #ifdef NS_IMPL_COCOA |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
306 /* rendering util */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
307 @interface EmacsGlyphStorage : NSObject <NSGlyphStorage> |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
308 { |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
309 @public |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
310 NSAttributedString *attrStr; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
311 NSMutableDictionary *dict; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
312 CGGlyph *cglyphs; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
313 unsigned long maxChar, maxGlyph; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
314 long i, len; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
315 } |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
316 - initWithCapacity: (unsigned long) c; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
317 - (void) setString: (NSString *)str font: (NSFont *)font; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
318 @end |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
319 #endif /* NS_IMPL_COCOA */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
320 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
321 extern NSArray *ns_send_types, *ns_return_types; |
105224
fbb7f0d7f16e
(ns_app_name): New extern variable.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
105082
diff
changeset
|
322 extern NSString *ns_app_name; |
97279
76ed169d532c
Dock menu customization, based on a patch by Ken Raeburn, plus some other fixes.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
97278
diff
changeset
|
323 extern EmacsMenu *mainMenu, *svcsMenu, *dockMenu; |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
324 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
325 /* Apple removed the declaration, but kept the implementation */ |
101330
eca9795f3903
* nsterm.h (EmacsApp-setAppleMenu:): Conditionalize more correctly on Tiger. * nsfns.m (ns_do_applescript): Conditionalize typeUTF16ExternalRepresentation on Tiger.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101321
diff
changeset
|
326 #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
327 @interface NSApplication (EmacsApp) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
328 - (void)setAppleMenu: (NSMenu *)menu; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
329 @end |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
330 #endif |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
331 |
105625
ecdd7b507a32
(NS_HAVE_NSINTEGER): Back out and augment with CGFloat, still needed under Tiger.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
105559
diff
changeset
|
332 #ifndef NS_HAVE_NSINTEGER |
ecdd7b507a32
(NS_HAVE_NSINTEGER): Back out and augment with CGFloat, still needed under Tiger.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
105559
diff
changeset
|
333 #if defined(__LP64__) && __LP64__ |
ecdd7b507a32
(NS_HAVE_NSINTEGER): Back out and augment with CGFloat, still needed under Tiger.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
105559
diff
changeset
|
334 typedef double CGFloat; |
ecdd7b507a32
(NS_HAVE_NSINTEGER): Back out and augment with CGFloat, still needed under Tiger.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
105559
diff
changeset
|
335 typedef long NSInteger; |
ecdd7b507a32
(NS_HAVE_NSINTEGER): Back out and augment with CGFloat, still needed under Tiger.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
105559
diff
changeset
|
336 typedef unsigned long NSUInteger; |
ecdd7b507a32
(NS_HAVE_NSINTEGER): Back out and augment with CGFloat, still needed under Tiger.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
105559
diff
changeset
|
337 #else |
ecdd7b507a32
(NS_HAVE_NSINTEGER): Back out and augment with CGFloat, still needed under Tiger.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
105559
diff
changeset
|
338 typedef float CGFloat; |
ecdd7b507a32
(NS_HAVE_NSINTEGER): Back out and augment with CGFloat, still needed under Tiger.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
105559
diff
changeset
|
339 typedef int NSInteger; |
ecdd7b507a32
(NS_HAVE_NSINTEGER): Back out and augment with CGFloat, still needed under Tiger.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
105559
diff
changeset
|
340 typedef unsigned int NSUInteger; |
ecdd7b507a32
(NS_HAVE_NSINTEGER): Back out and augment with CGFloat, still needed under Tiger.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
105559
diff
changeset
|
341 #endif /* not LP64 */ |
ecdd7b507a32
(NS_HAVE_NSINTEGER): Back out and augment with CGFloat, still needed under Tiger.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
105559
diff
changeset
|
342 #endif /* not NS_HAVE_NSINTEGER */ |
ecdd7b507a32
(NS_HAVE_NSINTEGER): Back out and augment with CGFloat, still needed under Tiger.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
105559
diff
changeset
|
343 |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
344 #endif /* __OBJC__ */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
345 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
346 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
347 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
348 /* ========================================================================== |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
349 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
350 Non-OO stuff |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
351 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
352 ========================================================================== */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
353 |
101490
cfaf6934d659
Changes to remove Feval calls from GUI under NS.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101399
diff
changeset
|
354 /* Special keycodes that we pass down the event chain */ |
cfaf6934d659
Changes to remove Feval calls from GUI under NS.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101399
diff
changeset
|
355 #define KEY_NS_POWER_OFF ((1<<28)|(0<<16)|1) |
cfaf6934d659
Changes to remove Feval calls from GUI under NS.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101399
diff
changeset
|
356 #define KEY_NS_OPEN_FILE ((1<<28)|(0<<16)|2) |
cfaf6934d659
Changes to remove Feval calls from GUI under NS.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101399
diff
changeset
|
357 #define KEY_NS_OPEN_TEMP_FILE ((1<<28)|(0<<16)|3) |
cfaf6934d659
Changes to remove Feval calls from GUI under NS.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101399
diff
changeset
|
358 #define KEY_NS_DRAG_FILE ((1<<28)|(0<<16)|4) |
cfaf6934d659
Changes to remove Feval calls from GUI under NS.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101399
diff
changeset
|
359 #define KEY_NS_DRAG_COLOR ((1<<28)|(0<<16)|5) |
cfaf6934d659
Changes to remove Feval calls from GUI under NS.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101399
diff
changeset
|
360 #define KEY_NS_DRAG_TEXT ((1<<28)|(0<<16)|6) |
cfaf6934d659
Changes to remove Feval calls from GUI under NS.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101399
diff
changeset
|
361 #define KEY_NS_CHANGE_FONT ((1<<28)|(0<<16)|7) |
cfaf6934d659
Changes to remove Feval calls from GUI under NS.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101399
diff
changeset
|
362 #define KEY_NS_OPEN_FILE_LINE ((1<<28)|(0<<16)|8) |
cfaf6934d659
Changes to remove Feval calls from GUI under NS.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101399
diff
changeset
|
363 #define KEY_NS_PUT_WORKING_TEXT ((1<<28)|(0<<16)|9) |
cfaf6934d659
Changes to remove Feval calls from GUI under NS.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101399
diff
changeset
|
364 #define KEY_NS_UNPUT_WORKING_TEXT ((1<<28)|(0<<16)|10) |
cfaf6934d659
Changes to remove Feval calls from GUI under NS.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101399
diff
changeset
|
365 #define KEY_NS_SPI_SERVICE_CALL ((1<<28)|(0<<16)|11) |
cfaf6934d659
Changes to remove Feval calls from GUI under NS.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101399
diff
changeset
|
366 #define KEY_NS_NEW_FRAME ((1<<28)|(0<<16)|12) |
cfaf6934d659
Changes to remove Feval calls from GUI under NS.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101399
diff
changeset
|
367 #define KEY_NS_TOGGLE_TOOLBAR ((1<<28)|(0<<16)|13) |
102560
291f6c889881
Unify shutdown handling under NS, via ns-power-off key event (where appropriate) and save-buffers-kill-emacs.
David Reitter <david.reitter@gmail.com>
parents:
101636
diff
changeset
|
368 #define KEY_NS_SHOW_PREFS ((1<<28)|(0<<16)|14) |
101490
cfaf6934d659
Changes to remove Feval calls from GUI under NS.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101399
diff
changeset
|
369 |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
370 /* could use list to store these, but rest of emacs has a big infrastructure |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
371 for managing a table of bitmap "records" */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
372 struct ns_bitmap_record |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
373 { |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
374 #ifdef __OBJC__ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
375 EmacsImage *img; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
376 #else |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
377 void *img; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
378 #endif |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
379 char *file; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
380 int refcount; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
381 int height, width, depth; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
382 }; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
383 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
384 /* this to map between emacs color indices and NSColor objects */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
385 struct ns_color_table |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
386 { |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
387 unsigned int size; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
388 unsigned int avail; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
389 #ifdef __OBJC__ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
390 NSColor **colors; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
391 NSMutableSet *empty_indices; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
392 #else |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
393 void **items; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
394 void *availIndices; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
395 #endif |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
396 }; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
397 #define NS_COLOR_CAPACITY 256 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
398 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
399 #define RGB_TO_ULONG(r, g, b) (((r) << 16) | ((g) << 8) | (b)) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
400 #define ARGB_TO_ULONG(a, r, g, b) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b)) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
401 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
402 #define ALPHA_FROM_ULONG(color) ((color) >> 24) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
403 #define RED_FROM_ULONG(color) (((color) >> 16) & 0xff) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
404 #define GREEN_FROM_ULONG(color) (((color) >> 8) & 0xff) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
405 #define BLUE_FROM_ULONG(color) ((color) & 0xff) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
406 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
407 /* Do not change `* 0x101' in the following lines to `<< 8'. If |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
408 changed, image masks in 1-bit depth will not work. */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
409 #define RED16_FROM_ULONG(color) (RED_FROM_ULONG(color) * 0x101) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
410 #define GREEN16_FROM_ULONG(color) (GREEN_FROM_ULONG(color) * 0x101) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
411 #define BLUE16_FROM_ULONG(color) (BLUE_FROM_ULONG(color) * 0x101) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
412 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
413 /* this extends font backend font */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
414 struct nsfont_info |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
415 { |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
416 struct font font; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
417 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
418 char *name; /* postscript name, uniquely identifies on NS systems */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
419 float width; /* this and following metrics stored as float rather than int */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
420 float height; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
421 float underpos; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
422 float underwidth; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
423 float size; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
424 #ifdef __OBJC__ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
425 NSFont *nsfont; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
426 /* cgfont and synthItal are used only on OS X 10.3+ */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
427 #if defined (NS_IMPL_COCOA) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
428 CGFontRef cgfont; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
429 #else /* GNUstep or OS X < 10.3 */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
430 void *cgfont; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
431 #endif |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
432 #else /* ! OBJC */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
433 void *nsfont; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
434 void *cgfont; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
435 #endif |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
436 char bold, ital; /* convenience flags */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
437 char synthItal; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
438 float voffset; /* mean of ascender/descender offsets */ |
101357
64413c753b62
Remove '23' comments that indicated code added during update from emacs-20 -> emacs-23.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101330
diff
changeset
|
439 XCharStruct max_bounds; |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
440 /* we compute glyph codes and metrics on-demand in blocks of 256 indexed |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
441 by hibyte, lobyte */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
442 unsigned short **glyphs; /* map unicode index to glyph */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
443 struct font_metrics **metrics; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
444 }; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
445 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
446 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
447 /* init'd in ns_initialize_display_info () */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
448 struct ns_display_info |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
449 { |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
450 /* Chain of all ns_display_info structures. */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
451 struct ns_display_info *next; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
452 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
453 /* The generic display parameters corresponding to this NS display. */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
454 struct terminal *terminal; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
455 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
456 /* This is a cons cell of the form (NAME . FONT-LIST-CACHE). |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
457 The same cons cell also appears in ns_display_name_list. */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
458 Lisp_Object name_list_element; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
459 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
460 /* The number of fonts loaded. */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
461 int n_fonts; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
462 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
463 /* Minimum width over all characters in all fonts in font_table. */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
464 int smallest_char_width; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
465 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
466 /* Minimum font height over all fonts in font_table. */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
467 int smallest_font_height; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
468 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
469 struct ns_bitmap_record *bitmaps; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
470 int bitmaps_size; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
471 int bitmaps_last; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
472 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
473 struct image_cache *image_cache; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
474 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
475 struct ns_color_table *color_table; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
476 |
101357
64413c753b62
Remove '23' comments that indicated code added during update from emacs-20 -> emacs-23.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101330
diff
changeset
|
477 /* DPI resolution of this screen */ |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
478 double resx, resy; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
479 |
101357
64413c753b62
Remove '23' comments that indicated code added during update from emacs-20 -> emacs-23.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101330
diff
changeset
|
480 /* Mask of things that cause the mouse to be grabbed */ |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
481 int grabbed; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
482 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
483 int n_planes; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
484 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
485 int color_p; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
486 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
487 Window root_window; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
488 |
101357
64413c753b62
Remove '23' comments that indicated code added during update from emacs-20 -> emacs-23.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101330
diff
changeset
|
489 /* Xism */ |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
490 XrmDatabase xrdb; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
491 |
101357
64413c753b62
Remove '23' comments that indicated code added during update from emacs-20 -> emacs-23.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101330
diff
changeset
|
492 /* The cursor to use for vertical scroll bars. */ |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
493 Cursor vertical_scroll_bar_cursor; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
494 |
101357
64413c753b62
Remove '23' comments that indicated code added during update from emacs-20 -> emacs-23.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101330
diff
changeset
|
495 /* most mouse face stuff moved in here as of 21+ (and reasonably so) */ |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
496 int mouse_face_beg_row, mouse_face_beg_col; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
497 int mouse_face_end_row, mouse_face_end_col; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
498 int mouse_face_beg_x, mouse_face_beg_y; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
499 int mouse_face_end_x, mouse_face_end_y; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
500 int mouse_face_past_end; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
501 Lisp_Object mouse_face_window; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
502 int mouse_face_face_id; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
503 int mouse_face_deferred_gc; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
504 Lisp_Object mouse_face_overlay; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
505 FRAME_PTR mouse_face_mouse_frame; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
506 int mouse_face_mouse_x, mouse_face_mouse_y; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
507 int mouse_face_defer; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
508 int mouse_face_hidden; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
509 int mouse_face_image_state; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
510 |
96870
30f1368d9cf6
* term/ns-win.el: Rename ns- functions/variables to the
Dan Nicolaescu <dann@ics.uci.edu>
parents:
96817
diff
changeset
|
511 struct frame *x_highlight_frame; |
30f1368d9cf6
* term/ns-win.el: Rename ns- functions/variables to the
Dan Nicolaescu <dann@ics.uci.edu>
parents:
96817
diff
changeset
|
512 struct frame *x_focus_frame; |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
513 }; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
514 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
515 /* This is a chain of structures for all the NS displays currently in use. */ |
96870
30f1368d9cf6
* term/ns-win.el: Rename ns- functions/variables to the
Dan Nicolaescu <dann@ics.uci.edu>
parents:
96817
diff
changeset
|
516 extern struct ns_display_info *x_display_list; |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
517 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
518 extern Lisp_Object ns_display_name_list; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
519 extern struct ns_display_info *ns_display_info_for_name (); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
520 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
521 struct ns_display_info *check_x_display_info (Lisp_Object frame); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
522 FRAME_PTR check_x_frame (Lisp_Object frame); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
523 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
524 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
525 struct ns_output |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
526 { |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
527 #ifdef __OBJC__ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
528 EmacsView *view; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
529 id miniimage; |
98458
5db459c2e438
* nsterm.h (ns_cursor_types, ns_output.desired_cursor_color)(ns_output.current_cursor, ns_output.desired_cursor) (ns_output.last_inactive, FRAME_CURSOR, FRAME_NEW_CURSOR) (FRAME_NEW_CURSOR_COLOR,): Remove. * nsfns.m (ns_set_cursor_color): Use FRAME_CURSOR_COLOR. (ns_lisp_to_cursor_type, ns_cursor_type_to_lisp): Use core emacs enumeration (HOLLOW_BOX_CURSOR, etc.). * nsterm.m (ns_frame_rehighlight): Remove commented code. (draw_window_cursor): Simplify code. (EmacsView-windowDidBecomeKey:,-windowDidResignKey:): Don't change cursor type. In latter, call rehighlight instead of doing updates manually. (EmacsPrefsController-setPanelFromValues,-setValuesFromPanel): Use core emacs cursor types. * xdisp.c (draw_glyphs): Don't call notice_overwritten_cursor() under NS.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
98228
diff
changeset
|
530 NSColor *cursor_color; |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
531 NSColor *foreground_color; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
532 NSColor *background_color; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
533 EmacsToolbar *toolbar; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
534 #else |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
535 void *view; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
536 void *miniimage; |
98458
5db459c2e438
* nsterm.h (ns_cursor_types, ns_output.desired_cursor_color)(ns_output.current_cursor, ns_output.desired_cursor) (ns_output.last_inactive, FRAME_CURSOR, FRAME_NEW_CURSOR) (FRAME_NEW_CURSOR_COLOR,): Remove. * nsfns.m (ns_set_cursor_color): Use FRAME_CURSOR_COLOR. (ns_lisp_to_cursor_type, ns_cursor_type_to_lisp): Use core emacs enumeration (HOLLOW_BOX_CURSOR, etc.). * nsterm.m (ns_frame_rehighlight): Remove commented code. (draw_window_cursor): Simplify code. (EmacsView-windowDidBecomeKey:,-windowDidResignKey:): Don't change cursor type. In latter, call rehighlight instead of doing updates manually. (EmacsPrefsController-setPanelFromValues,-setValuesFromPanel): Use core emacs cursor types. * xdisp.c (draw_glyphs): Don't call notice_overwritten_cursor() under NS.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
98228
diff
changeset
|
537 void *cursor_color; |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
538 void *foreground_color; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
539 void *background_color; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
540 void *toolbar; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
541 #endif |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
542 |
101357
64413c753b62
Remove '23' comments that indicated code added during update from emacs-20 -> emacs-23.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101330
diff
changeset
|
543 /* NSCursors init'ed in initFrameFromEmacs */ |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
544 Cursor text_cursor; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
545 Cursor nontext_cursor; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
546 Cursor modeline_cursor; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
547 Cursor hand_cursor; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
548 Cursor hourglass_cursor; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
549 Cursor horizontal_drag_cursor; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
550 |
101357
64413c753b62
Remove '23' comments that indicated code added during update from emacs-20 -> emacs-23.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101330
diff
changeset
|
551 /* NS-specific */ |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
552 Cursor current_pointer; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
553 |
101357
64413c753b62
Remove '23' comments that indicated code added during update from emacs-20 -> emacs-23.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101330
diff
changeset
|
554 /* lord knows why Emacs needs to know about our Window ids.. */ |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
555 Window window_desc, parent_desc; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
556 char explicit_parent; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
557 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
558 struct font *font; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
559 int baseline_offset; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
560 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
561 /* If a fontset is specified for this frame instead of font, this |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
562 value contains an ID of the fontset, else -1. */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
563 int fontset; /* only used with font_backend */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
564 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
565 Lisp_Object icon_top; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
566 Lisp_Object icon_left; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
567 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
568 /* The size of the extra width currently allotted for vertical |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
569 scroll bars, in pixels. */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
570 int vertical_scroll_bar_extra; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
571 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
572 /* The height of the titlebar decoration (included in NSWindow's frame). */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
573 int titlebar_height; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
574 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
575 /* The height of the toolbar if displayed, else 0. */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
576 int toolbar_height; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
577 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
578 /* This is the Emacs structure for the NS display this frame is on. */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
579 struct ns_display_info *display_info; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
580 }; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
581 |
101357
64413c753b62
Remove '23' comments that indicated code added during update from emacs-20 -> emacs-23.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101330
diff
changeset
|
582 /* this dummy decl needed to support TTYs */ |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
583 struct x_output |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
584 { |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
585 unsigned long background_pixel; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
586 unsigned long foreground_pixel; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
587 }; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
588 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
589 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
590 /* This gives the ns_display_info structure for the display F is on. */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
591 #define FRAME_NS_DISPLAY_INFO(f) ((f)->output_data.ns->display_info) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
592 /* the primacy of X must be constantly worked with... */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
593 #define FRAME_X_DISPLAY_INFO(f) ((f)->output_data.ns->display_info) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
594 #define FRAME_X_OUTPUT(f) ((f)->output_data.ns) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
595 #define FRAME_NS_WINDOW(f) ((f)->output_data.ns->window_desc) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
596 #define FRAME_X_WINDOW(f) ((f)->output_data.ns->window_desc) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
597 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
598 /* This is the `Display *' which frame F is on. */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
599 #define FRAME_NS_DISPLAY(f) (0) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
600 #define FRAME_X_DISPLAY(f) (0) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
601 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
602 #define FRAME_FOREGROUND_COLOR(f) ((f)->output_data.ns->foreground_color) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
603 #define FRAME_BACKGROUND_COLOR(f) ((f)->output_data.ns->background_color) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
604 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
605 #define FRAME_X_IMAGE_CACHE(F) FRAME_NS_DISPLAY_INFO ((F))->image_cache |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
606 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
607 #define NS_FACE_FOREGROUND(f) ((f)->foreground) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
608 #define NS_FACE_BACKGROUND(f) ((f)->background) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
609 #define FRAME_NS_TITLEBAR_HEIGHT(f) ((f)->output_data.ns->titlebar_height) |
109092
babf8e935ea8
Rename FRAME_NS_TOOLBAR_HEIGHT to FRAME_TOOLBAR_HEIGHT to aid common code.
Jan D <jan.h.d@swipnet.se>
parents:
107700
diff
changeset
|
610 #define FRAME_TOOLBAR_HEIGHT(f) ((f)->output_data.ns->toolbar_height) |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
611 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
612 #define FONT_WIDTH(f) ((f)->max_width) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
613 #define FONT_HEIGHT(f) ((f)->height) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
614 /*#define FONT_BASE(f) ((f)->ascent) */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
615 #define FONT_BASE(f) (((struct nsfont_info *)f)->max_bounds.ascent) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
616 /*#define FONT_DESCENT(f) ((f)->descent) */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
617 #define FONT_DESCENT(f) (((struct nsfont_info *)f)->max_bounds.descent) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
618 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
619 #define FRAME_DEFAULT_FACE(f) FACE_FROM_ID (f, DEFAULT_FACE_ID) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
620 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
621 #define FRAME_NS_VIEW(f) ((f)->output_data.ns->view) |
98458
5db459c2e438
* nsterm.h (ns_cursor_types, ns_output.desired_cursor_color)(ns_output.current_cursor, ns_output.desired_cursor) (ns_output.last_inactive, FRAME_CURSOR, FRAME_NEW_CURSOR) (FRAME_NEW_CURSOR_COLOR,): Remove. * nsfns.m (ns_set_cursor_color): Use FRAME_CURSOR_COLOR. (ns_lisp_to_cursor_type, ns_cursor_type_to_lisp): Use core emacs enumeration (HOLLOW_BOX_CURSOR, etc.). * nsterm.m (ns_frame_rehighlight): Remove commented code. (draw_window_cursor): Simplify code. (EmacsView-windowDidBecomeKey:,-windowDidResignKey:): Don't change cursor type. In latter, call rehighlight instead of doing updates manually. (EmacsPrefsController-setPanelFromValues,-setValuesFromPanel): Use core emacs cursor types. * xdisp.c (draw_glyphs): Don't call notice_overwritten_cursor() under NS.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
98228
diff
changeset
|
622 #define FRAME_CURSOR_COLOR(f) ((f)->output_data.ns->cursor_color) |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
623 #define FRAME_POINTER_TYPE(f) ((f)->output_data.ns->current_pointer) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
624 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
625 #define FRAME_FONT(f) ((f)->output_data.ns->font) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
626 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
627 #ifdef __OBJC__ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
628 #define XNS_SCROLL_BAR(vec) ((id) XSAVE_VALUE (vec)->pointer) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
629 #else |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
630 #define XNS_SCROLL_BAR(vec) XSAVE_VALUE (vec)->pointer |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
631 #endif |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
632 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
633 /* Compute pixel size for vertical scroll bars */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
634 #define NS_SCROLL_BAR_WIDTH(f) \ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
635 (FRAME_HAS_VERTICAL_SCROLL_BARS (f) \ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
636 ? rint (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0 \ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
637 ? FRAME_CONFIG_SCROLL_BAR_WIDTH (f) \ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
638 : (FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f))) \ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
639 : 0) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
640 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
641 /* Difference btwn char-column-calculated and actual SB widths. |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
642 This is only a concern for rendering when SB on left. */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
643 #define NS_SCROLL_BAR_ADJUST(w, f) \ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
644 (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w) ? \ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
645 (FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f) \ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
646 - NS_SCROLL_BAR_WIDTH (f)) : 0) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
647 |
96763
a27390a84360
change most cases of PENDING to TODO, some to FIXME or XXX
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
96759
diff
changeset
|
648 /* XXX: fix for GNUstep inconsistent accounting for titlebar */ |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
649 #ifdef NS_IMPL_GNUSTEP |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
650 #define NS_TOP_POS(f) ((f)->top_pos + 18) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
651 #else |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
652 #define NS_TOP_POS(f) ((f)->top_pos) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
653 #endif |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
654 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
655 #define FRAME_NS_FONT_TABLE(f) (FRAME_NS_DISPLAY_INFO (f)->font_table) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
656 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
657 #define FRAME_FONTSET(f) ((f)->output_data.ns->fontset) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
658 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
659 #define FRAME_SMALLEST_CHAR_WIDTH(f) \ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
660 (FRAME_NS_DISPLAY_INFO (f)->smallest_char_width) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
661 #define FRAME_SMALLEST_FONT_HEIGHT(f) \ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
662 (FRAME_NS_DISPLAY_INFO (f)->smallest_font_height) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
663 #define FONT_TYPE_FOR_UNIBYTE(font, ch) 0 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
664 #define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
665 #define FRAME_BASELINE_OFFSET(f) ((f)->output_data.ns->baseline_offset) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
666 #define BLACK_PIX_DEFAULT(f) 0x000000 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
667 #define WHITE_PIX_DEFAULT(f) 0xFFFFFF |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
668 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
669 /* First position where characters can be shown (instead of scrollbar, if |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
670 it is on left. */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
671 #define FIRST_CHAR_POSITION(f) \ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
672 (! (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f)) ? 0 \ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
673 : FRAME_SCROLL_BAR_COLS (f)) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
674 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
675 extern struct ns_display_info *ns_term_init (); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
676 extern void ns_term_shutdown (int sig); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
677 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
678 /* constants for text rendering */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
679 #define NS_DUMPGLYPH_NORMAL 0 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
680 #define NS_DUMPGLYPH_CURSOR 1 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
681 #define NS_DUMPGLYPH_FOREGROUND 2 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
682 #define NS_DUMPGLYPH_MOUSEFACE 3 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
683 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
684 |
96759
1e2f7aab70ba
* Makefile.in: Undef LIB_STANDARD before defining it to silence warning
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
96692
diff
changeset
|
685 EXFUN (Fx_display_grayscale_p, 1); |
1e2f7aab70ba
* Makefile.in: Undef LIB_STANDARD before defining it to silence warning
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
96692
diff
changeset
|
686 EXFUN (Fx_display_planes, 1); |
1e2f7aab70ba
* Makefile.in: Undef LIB_STANDARD before defining it to silence warning
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
96692
diff
changeset
|
687 |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
688 /* In nsfont, called from fontset.c */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
689 extern void nsfont_make_fontset_for_font (Lisp_Object name, |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
690 Lisp_Object font_object); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
691 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
692 /* In nsfont, for debugging */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
693 struct glyph_string; |
103346
33a87d18a1f6
nsterm.h (dump_glyphstring): Rename to ns_dump_glyphstring.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
102560
diff
changeset
|
694 void ns_dump_glyphstring (struct glyph_string *s); |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
695 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
696 /* Implemented in nsterm, published in or needed from nsfns. */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
697 extern Lisp_Object Qfontsize; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
698 extern Lisp_Object ns_list_fonts (FRAME_PTR f, Lisp_Object pattern, |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
699 int size, int maxnames); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
700 extern void ns_clear_frame (struct frame *f); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
701 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
702 extern const char *ns_xlfd_to_fontname (const char *xlfd); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
703 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
704 extern void check_ns (void); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
705 extern Lisp_Object ns_map_event_to_object (); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
706 extern Lisp_Object ns_string_from_pasteboard (); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
707 extern void ns_string_to_pasteboard (); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
708 extern void nxatoms_of_nsselect (); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
709 extern int ns_lisp_to_cursor_type (); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
710 extern Lisp_Object ns_cursor_type_to_lisp (int arg); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
711 extern Lisp_Object Qnone; |
107700
5860ffa0c5d9
Clean up unneeded ns_set_icon_type calls.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
712 extern void ns_set_name_as_filename (struct frame *f); |
5860ffa0c5d9
Clean up unneeded ns_set_icon_type calls.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
713 extern void ns_set_doc_edited (struct frame *f, Lisp_Object arg); |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
714 |
96759
1e2f7aab70ba
* Makefile.in: Undef LIB_STANDARD before defining it to silence warning
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
96692
diff
changeset
|
715 extern int |
109653
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
716 ns_defined_color (struct frame *f, |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
717 const char *name, |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
718 XColor *color_def, int alloc, |
96759
1e2f7aab70ba
* Makefile.in: Undef LIB_STANDARD before defining it to silence warning
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
96692
diff
changeset
|
719 char makeIndex); |
101636
6bbb2d204513
* nsterm.h (EmacsPrefsController.cursorBlinkSlider): Only define
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101490
diff
changeset
|
720 extern void |
6bbb2d204513
* nsterm.h (EmacsPrefsController.cursorBlinkSlider): Only define
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101490
diff
changeset
|
721 ns_query_color (void *col, XColor *color_def, int setPixel); |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
722 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
723 #ifdef __OBJC__ |
96759
1e2f7aab70ba
* Makefile.in: Undef LIB_STANDARD before defining it to silence warning
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
96692
diff
changeset
|
724 extern Lisp_Object ns_color_to_lisp (NSColor *col); |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
725 extern int ns_lisp_to_color (Lisp_Object color, NSColor **col); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
726 extern NSColor *ns_lookup_indexed_color (unsigned long idx, struct frame *f); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
727 extern unsigned long ns_index_color (NSColor *color, struct frame *f); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
728 extern void ns_free_indexed_color (unsigned long idx, struct frame *f); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
729 #endif |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
730 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
731 /* C access to ObjC functionality */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
732 extern void ns_release_object (void *obj); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
733 extern void ns_retain_object (void *obj); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
734 extern void *ns_alloc_autorelease_pool (); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
735 extern void ns_release_autorelease_pool (); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
736 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
737 /* in nsmenu */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
738 extern void update_frame_tool_bar (FRAME_PTR f); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
739 extern void free_frame_tool_bar (FRAME_PTR f); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
740 extern void find_and_call_menu_selection (FRAME_PTR f, |
97269
eed9154c9cad
(find_and_call_menu_selection): Fix prototype.
Chong Yidong <cyd@stupidchicken.com>
parents:
97209
diff
changeset
|
741 int menu_bar_items_used, Lisp_Object vector, void *client_data); |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
742 extern Lisp_Object find_and_return_menu_selection (FRAME_PTR f, |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
743 int keymaps, |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
744 void *client_data); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
745 extern Lisp_Object ns_popup_dialog (Lisp_Object position, Lisp_Object contents, |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
746 Lisp_Object header); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
747 |
109653
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
748 /* More prototypes that should be moved to a more general include file */ |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
749 extern void set_frame_menubar (struct frame *f, int first_time, int deep_p); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
750 extern void x_set_window_size (struct frame *f, int change_grav, |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
751 int cols, int rows); |
109653
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
752 extern void x_sync (struct frame *); |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
753 extern Lisp_Object x_get_focus_frame (struct frame *); |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
754 extern void x_set_mouse_position (struct frame *f, int h, int v); |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
755 extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
756 extern void x_make_frame_visible (struct frame *f); |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
757 extern void x_make_frame_invisible (struct frame *f); |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
758 extern void x_iconify_frame (struct frame *f); |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
759 extern int x_char_width (struct frame *f); |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
760 extern int x_char_height (struct frame *f); |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
761 extern int x_pixel_width (struct frame *f); |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
762 extern int x_pixel_height (struct frame *f); |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
763 extern void x_set_frame_alpha (struct frame *f); |
109654
d349244d7b08
Can't include menu.h in window.c for X targets.
Jan D <jan.h.d@swipnet.se>
parents:
109653
diff
changeset
|
764 extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); |
109653
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
765 extern void x_set_tool_bar_lines (struct frame *f, |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
766 Lisp_Object value, |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
767 Lisp_Object oldval); |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
768 extern void x_activate_menubar (struct frame *); |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
769 extern void free_frame_menubar (struct frame *); |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
770 |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
771 extern void ns_init_paths (void); |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
772 extern void syms_of_nsterm (void); |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
773 extern void syms_of_nsfns (void); |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
774 extern void syms_of_nsmenu (void); |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
775 extern void syms_of_nsselect (void); |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
776 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
777 /* From nsimage.m, needed in image.c */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
778 struct image; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
779 extern void *ns_image_from_XBM (unsigned char *bits, int width, int height); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
780 extern void *ns_image_for_XPM (int width, int height, int depth); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
781 extern void *ns_image_from_file (Lisp_Object file); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
782 extern int ns_load_image (struct frame *f, struct image *img, |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
783 Lisp_Object spec_file, Lisp_Object spec_data); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
784 extern int ns_image_width (void *img); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
785 extern int ns_image_height (void *img); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
786 extern unsigned long ns_get_pixel (void *img, int x, int y); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
787 extern void ns_put_pixel (void *img, int x, int y, unsigned long argb); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
788 extern void ns_set_alpha (void *img, int x, int y, unsigned char a); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
789 |
109099 | 790 extern int x_display_pixel_height (struct ns_display_info *); |
791 extern int x_display_pixel_width (struct ns_display_info *); | |
98228
8adf9be2900c
(ns_display_info): Remove `height' and `width' members.
Chong Yidong <cyd@stupidchicken.com>
parents:
97584
diff
changeset
|
792 |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
793 /* This in nsterm.m */ |
109653
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
794 extern int ns_select (int nfds, fd_set *readfds, fd_set *writefds, |
9cfca8c9fb07
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
Jan D <jan.h.d@swipnet.se>
parents:
109099
diff
changeset
|
795 fd_set *exceptfds, struct timeval *timeout); |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
796 extern unsigned long ns_get_rgb_color (struct frame *f, |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
797 float r, float g, float b, float a); |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
798 extern NSPoint last_mouse_motion_position; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
799 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
800 #ifdef NS_IMPL_GNUSTEP |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
801 extern char gnustep_base_version[]; /* version tracking */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
802 #endif |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
803 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
804 #define MINWIDTH 10 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
805 #define MINHEIGHT 10 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
806 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
807 /* Screen max coordinate |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
808 Using larger coordinates causes movewindow/placewindow to abort */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
809 #define SCREENMAX 16000 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
810 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
811 #define NS_SCROLL_BAR_WIDTH_DEFAULT [EmacsScroller scrollerWidth] |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
812 /* This is to match emacs on other platforms, ugly though it is. */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
813 #define NS_SELECTION_COLOR_DEFAULT @"LightGoldenrod2"; |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
814 #define RESIZE_HANDLE_SIZE 12 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
815 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
816 /* Little utility macros */ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
817 #define IN_BOUND(min, x, max) (((x) < (min)) \ |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
818 ? (min) : (((x)>(max)) ? (max) : (x))) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
819 #define SCREENMAXBOUND(x) (IN_BOUND (-SCREENMAX, x, SCREENMAX)) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
820 |
101357
64413c753b62
Remove '23' comments that indicated code added during update from emacs-20 -> emacs-23.
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
101330
diff
changeset
|
821 /* needed somewhere... */ |
96675
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
822 #define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0) |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
823 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
824 |
d45acf0c8d23
merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents:
diff
changeset
|
825 #endif /* HAVE_NS */ |
96684 | 826 |
827 /* arch-tag: 0a28b142-4ac1-4a81-a243-abcd82d9c4e5 | |
828 (do not change this comment) */ |