annotate src/macgui.h @ 65165:2a21167e759e

*** empty log message ***
author John Wiegley <johnw@newartisans.com>
date Fri, 26 Aug 2005 22:37:16 +0000
parents a0d1312ede66
children bd6366e3f520 2d92f5c9d6ae
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
1 /* Definitions and headers for communication on the Mac OS.
64770
a0d1312ede66 Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents: 64423
diff changeset
2 Copyright (C) 2000, 2001, 2002, 2003, 2004,
a0d1312ede66 Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents: 64423
diff changeset
3 2005 Free Software Foundation, Inc.
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
4
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
5 This file is part of GNU Emacs.
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
6
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
7 GNU Emacs is free software; you can redistribute it and/or modify
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
8 it under the terms of the GNU General Public License as published by
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
9 the Free Software Foundation; either version 2, or (at your option)
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
10 any later version.
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
11
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
12 GNU Emacs is distributed in the hope that it will be useful,
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
15 GNU General Public License for more details.
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
16
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
18 along with GNU Emacs; see the file COPYING. If not, write to
64084
a8fa7c632ee4 Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 61927
diff changeset
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
a8fa7c632ee4 Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 61927
diff changeset
20 Boston, MA 02110-1301, USA. */
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
21
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
22 /* Contributed by Andrew Choi (akochoi@mac.com). */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
23
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
24 #ifndef EMACS_MACGUI_H
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
25 #define EMACS_MACGUI_H
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
26
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
27 typedef int Display; /* fix later */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
28
60634
d936edb2f62e (XrmDatabase): Typedef to Lisp_Object.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 60622
diff changeset
29 typedef Lisp_Object XrmDatabase;
50363
6bc35dcf692b (XrmDatabase): New (dummy) typedef.
Kim F. Storm <storm@cua.dk>
parents: 50301
diff changeset
30
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
31 typedef unsigned long Time;
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
32
60362
f69bf8238a7e [!MAC_OSX && HAVE_CARBON]: Include Carbon.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 59718
diff changeset
33 #ifdef HAVE_CARBON
f69bf8238a7e [!MAC_OSX && HAVE_CARBON]: Include Carbon.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 59718
diff changeset
34 #undef Z
f69bf8238a7e [!MAC_OSX && HAVE_CARBON]: Include Carbon.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 59718
diff changeset
35 #ifdef MAC_OSX
61927
89f644173276 [HAVE_CARBON && MAC_OSX]: Don't undefine/define mktime
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 61657
diff changeset
36 #if ! HAVE_MKTIME || BROKEN_MKTIME
54150
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
37 #undef mktime
61927
89f644173276 [HAVE_CARBON && MAC_OSX]: Don't undefine/define mktime
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 61657
diff changeset
38 #endif
54150
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
39 #undef DEBUG
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
40 #undef free
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
41 #undef malloc
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
42 #undef realloc
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
43 /* Macros max and min defined in lisp.h conflict with those in
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
44 precompiled header Carbon.h. */
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
45 #undef max
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
46 #undef min
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
47 #undef init_process
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
48 #include <Carbon/Carbon.h>
61927
89f644173276 [HAVE_CARBON && MAC_OSX]: Don't undefine/define mktime
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 61657
diff changeset
49 #if ! HAVE_MKTIME || BROKEN_MKTIME
57425
0867872551d9 macterm.c (x_raise_frame): Add BLOCK_INPUT around SelectWindow
Steven Tamm <steventamm@mac.com>
parents: 55851
diff changeset
50 #undef mktime
0867872551d9 macterm.c (x_raise_frame): Add BLOCK_INPUT around SelectWindow
Steven Tamm <steventamm@mac.com>
parents: 55851
diff changeset
51 #define mktime emacs_mktime
61927
89f644173276 [HAVE_CARBON && MAC_OSX]: Don't undefine/define mktime
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 61657
diff changeset
52 #endif
54150
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
53 #undef free
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
54 #define free unexec_free
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
55 #undef malloc
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
56 #define malloc unexec_malloc
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
57 #undef realloc
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
58 #define realloc unexec_realloc
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
59 #undef min
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
60 #define min(a, b) ((a) < (b) ? (a) : (b))
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
61 #undef max
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
62 #define max(a, b) ((a) > (b) ? (a) : (b))
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
63 #undef init_process
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
64 #define init_process emacs_init_process
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
65 #undef INFINITY
60362
f69bf8238a7e [!MAC_OSX && HAVE_CARBON]: Include Carbon.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 59718
diff changeset
66 #else /* not MAC_OSX */
f69bf8238a7e [!MAC_OSX && HAVE_CARBON]: Include Carbon.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 59718
diff changeset
67 #undef SIGHUP
f69bf8238a7e [!MAC_OSX && HAVE_CARBON]: Include Carbon.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 59718
diff changeset
68 #define OLDP2C 1
f69bf8238a7e [!MAC_OSX && HAVE_CARBON]: Include Carbon.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 59718
diff changeset
69 #include <Carbon.h>
f69bf8238a7e [!MAC_OSX && HAVE_CARBON]: Include Carbon.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 59718
diff changeset
70 #endif /* not MAC_OSX */
f69bf8238a7e [!MAC_OSX && HAVE_CARBON]: Include Carbon.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 59718
diff changeset
71 #undef Z
f69bf8238a7e [!MAC_OSX && HAVE_CARBON]: Include Carbon.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 59718
diff changeset
72 #define Z (current_buffer->text->z)
f69bf8238a7e [!MAC_OSX && HAVE_CARBON]: Include Carbon.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 59718
diff changeset
73 #else /* not HAVE_CARBON */
54150
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
74 #include <QuickDraw.h> /* for WindowPtr */
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
75 #include <QDOffscreen.h> /* for GWorldPtr */
60622
005d5b72126b [!TARGET_API_MAC_CARBON]: Include Appearance.h and Controls.h. Use
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 60362
diff changeset
76 #include <Appearance.h> /* for ThemeCursor */
59146
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
77 #include <Windows.h>
60622
005d5b72126b [!TARGET_API_MAC_CARBON]: Include Appearance.h and Controls.h. Use
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 60362
diff changeset
78 #include <Controls.h>
55851
f1d6a507dcfd Support Tooltips with the Carbon emacs port.
Steven Tamm <steventamm@mac.com>
parents: 54150
diff changeset
79 #include <Gestalt.h>
60362
f69bf8238a7e [!MAC_OSX && HAVE_CARBON]: Include Carbon.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 59718
diff changeset
80 #endif /* not HAVE_CARBON */
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
81
59146
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
82 typedef WindowPtr Window;
54150
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
83 typedef GWorldPtr Pixmap;
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
84
55851
f1d6a507dcfd Support Tooltips with the Carbon emacs port.
Steven Tamm <steventamm@mac.com>
parents: 54150
diff changeset
85 #define Cursor ThemeCursor
f1d6a507dcfd Support Tooltips with the Carbon emacs port.
Steven Tamm <steventamm@mac.com>
parents: 54150
diff changeset
86 #define No_Cursor (-1)
f1d6a507dcfd Support Tooltips with the Carbon emacs port.
Steven Tamm <steventamm@mac.com>
parents: 54150
diff changeset
87
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
88 #define FACE_DEFAULT (~0)
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
89
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
90
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
91 /* Emulate XCharStruct. */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
92 typedef struct _XCharStruct
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
93 {
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
94 int rbearing;
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
95 int lbearing;
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
96 int width;
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
97 int ascent;
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
98 int descent;
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
99 } XCharStruct;
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
100
59718
d4cb255b034d * dispextern.h (struct glyph_string): New members clip_head and
Steven Tamm <steventamm@mac.com>
parents: 59146
diff changeset
101 #define STORE_XCHARSTRUCT(xcs, w, bds) \
d4cb255b034d * dispextern.h (struct glyph_string): New members clip_head and
Steven Tamm <steventamm@mac.com>
parents: 59146
diff changeset
102 ((xcs).width = (w), \
d4cb255b034d * dispextern.h (struct glyph_string): New members clip_head and
Steven Tamm <steventamm@mac.com>
parents: 59146
diff changeset
103 (xcs).lbearing = (bds).left, \
d4cb255b034d * dispextern.h (struct glyph_string): New members clip_head and
Steven Tamm <steventamm@mac.com>
parents: 59146
diff changeset
104 (xcs).rbearing = (bds).right, \
d4cb255b034d * dispextern.h (struct glyph_string): New members clip_head and
Steven Tamm <steventamm@mac.com>
parents: 59146
diff changeset
105 (xcs).ascent = -(bds).top, \
d4cb255b034d * dispextern.h (struct glyph_string): New members clip_head and
Steven Tamm <steventamm@mac.com>
parents: 59146
diff changeset
106 (xcs).descent = (bds).bottom)
d4cb255b034d * dispextern.h (struct glyph_string): New members clip_head and
Steven Tamm <steventamm@mac.com>
parents: 59146
diff changeset
107
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
108 struct MacFontStruct {
61657
8af99087c1e5 (MacFontStruct): Remove member `fontname'. Add member `full_name'.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 60634
diff changeset
109 char *full_name;
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
110
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
111 short mac_fontnum; /* font number of font used in this window */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
112 int mac_fontsize; /* size of font */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
113 short mac_fontface; /* plain, bold, italics, etc. */
61657
8af99087c1e5 (MacFontStruct): Remove member `fontname'. Add member `full_name'.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 60634
diff changeset
114 #if TARGET_API_MAC_CARBON
8af99087c1e5 (MacFontStruct): Remove member `fontname'. Add member `full_name'.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 60634
diff changeset
115 int mac_scriptcode; /* Mac OS script code for font used */
8af99087c1e5 (MacFontStruct): Remove member `fontname'. Add member `full_name'.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 60634
diff changeset
116 #else
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
117 short mac_scriptcode; /* Mac OS script code for font used */
61657
8af99087c1e5 (MacFontStruct): Remove member `fontname'. Add member `full_name'.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 60634
diff changeset
118 #endif
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
119
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
120 #if 0
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
121 SInt16 mFontNum; /* font number of font used in this window */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
122 short mScriptCode; /* Mac OS script code for font used */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
123 int mFontSize; /* size of font */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
124 Style mFontFace; /* plain, bold, italics, etc. */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
125 int mHeight; /* height of one line of text in pixels */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
126 int mWidth; /* width of one character in pixels */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
127 int mAscent;
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
128 int mDescent;
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
129 int mLeading;
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
130 char mTwoByte; /* true for two-byte font */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
131 #endif /* 0 */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
132
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
133 /* from Xlib.h */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
134 #if 0
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
135 XExtData *ext_data; /* hook for extension to hang data */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
136 Font fid; /* Font id for this font */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
137 unsigned direction; /* hint about the direction font is painted */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
138 #endif /* 0 */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
139 unsigned min_char_or_byte2;/* first character */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
140 unsigned max_char_or_byte2;/* last character */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
141 unsigned min_byte1; /* first row that exists */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
142 unsigned max_byte1; /* last row that exists */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
143 #if 0
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
144 Bool all_chars_exist; /* flag if all characters have nonzero size */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
145 unsigned default_char; /* char to print for undefined character */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
146 int n_properties; /* how many properties there are */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
147 XFontProp *properties; /* pointer to array of additional properties */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
148 #endif /* 0 */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
149 XCharStruct min_bounds; /* minimum bounds over all existing char */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
150 XCharStruct max_bounds; /* maximum bounds over all existing char */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
151 XCharStruct *per_char; /* first_char to last_char information */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
152 int ascent; /* logical extent above baseline for spacing */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
153 int descent; /* logical decent below baseline for spacing */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
154 };
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
155
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
156 typedef struct MacFontStruct MacFontStruct;
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
157 typedef struct MacFontStruct XFontStruct;
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
158
50156
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
159 /* Structure borrowed from Xlib.h to represent two-byte characters. */
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
160
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
161 typedef struct {
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
162 unsigned char byte1;
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
163 unsigned char byte2;
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
164 } XChar2b;
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
165
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
166 #define STORE_XCHAR2B(chp, b1, b2) \
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
167 ((chp)->byte1 = (b1), (chp)->byte2 = (b2))
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
168
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
169 #define XCHAR2B_BYTE1(chp) \
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
170 ((chp)->byte1)
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
171
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
172 #define XCHAR2B_BYTE2(chp) \
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
173 ((chp)->byte2)
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
174
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
175
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
176 /* Emulate X GC's by keeping color and font info in a structure. */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
177 typedef struct _XGCValues
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
178 {
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
179 unsigned long foreground;
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
180 unsigned long background;
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
181 XFontStruct *font;
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
182 } XGCValues;
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
183
64423
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
184 typedef struct _XGC
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
185 {
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
186 /* Original value. */
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
187 XGCValues xgcv;
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
188
64423
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
189 /* Cached data members follow. */
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
190
64423
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
191 /* QuickDraw foreground color. */
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
192 RGBColor fore_color;
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
193
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
194 /* QuickDraw background color. */
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
195 RGBColor back_color;
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
196 } *GC;
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
197
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
198 #define GCForeground (1L<<2)
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
199 #define GCBackground (1L<<3)
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
200 #define GCFont (1L<<14)
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
201 #define GCGraphicsExposures 0
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
202
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
203 /* Bit Gravity */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
204
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
205 #define ForgetGravity 0
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
206 #define NorthWestGravity 1
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
207 #define NorthGravity 2
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
208 #define NorthEastGravity 3
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
209 #define WestGravity 4
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
210 #define CenterGravity 5
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
211 #define EastGravity 6
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
212 #define SouthWestGravity 7
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
213 #define SouthGravity 8
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
214 #define SouthEastGravity 9
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
215 #define StaticGravity 10
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
216
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
217 #define NoValue 0x0000
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
218 #define XValue 0x0001
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
219 #define YValue 0x0002
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
220 #define WidthValue 0x0004
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
221 #define HeightValue 0x0008
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
222 #define AllValues 0x000F
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
223 #define XNegative 0x0010
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
224 #define YNegative 0x0020
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
225
59146
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
226 typedef struct {
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
227 long flags; /* marks which fields in this structure are defined */
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
228 #if 0
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
229 int x, y; /* obsolete for new window mgrs, but clients */
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
230 int width, height; /* should set so old wm's don't mess up */
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
231 #endif
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
232 int min_width, min_height;
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
233 #if 0
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
234 int max_width, max_height;
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
235 #endif
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
236 int width_inc, height_inc;
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
237 #if 0
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
238 struct {
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
239 int x; /* numerator */
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
240 int y; /* denominator */
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
241 } min_aspect, max_aspect;
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
242 #endif
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
243 int base_width, base_height; /* added by ICCCM version 1 */
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
244 #if 0
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
245 int win_gravity; /* added by ICCCM version 1 */
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
246 #endif
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
247 } XSizeHints;
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
248
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
249 #define USPosition (1L << 0) /* user specified x, y */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
250 #define USSize (1L << 1) /* user specified width, height */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
251
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
252 #define PPosition (1L << 2) /* program specified position */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
253 #define PSize (1L << 3) /* program specified size */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
254 #define PMinSize (1L << 4) /* program specified minimum size */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
255 #define PMaxSize (1L << 5) /* program specified maximum size */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
256 #define PResizeInc (1L << 6) /* program specified resize increments */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
257 #define PAspect (1L << 7) /* program specified min and max aspect ratios */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
258 #define PBaseSize (1L << 8) /* program specified base for incrementing */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
259 #define PWinGravity (1L << 9) /* program specified window gravity */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
260
50221
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
261 typedef struct {
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
262 int x, y;
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
263 unsigned width, height;
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
264 } XRectangle;
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
265
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
266 #define NativeRectangle Rect
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
267
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
268 #define CONVERT_TO_XRECT(xr,nr) \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
269 ((xr).x = (nr).left, \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
270 (xr).y = (nr).top, \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
271 (xr).width = ((nr).right - (nr).left), \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
272 (xr).height = ((nr).bottom - (nr).top))
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
273
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
274 #define CONVERT_FROM_XRECT(xr,nr) \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
275 ((nr).left = (xr).x, \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
276 (nr).top = (xr).y, \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
277 (nr).right = ((xr).x + (xr).width), \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
278 (nr).bottom = ((xr).y + (xr).height))
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
279
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
280 #define STORE_NATIVE_RECT(nr,x,y,width,height) \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
281 ((nr).left = (x), \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
282 (nr).top = (y), \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
283 (nr).right = ((nr).left + (width)), \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
284 (nr).bottom = ((nr).top + (height)))
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
285
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
286 #endif /* EMACS_MACGUI_H */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
287
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 50363
diff changeset
288 /* arch-tag: 5a0da49a-35e2-418b-a58c-8a55778ae849
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 50363
diff changeset
289 (do not change this comment) */