annotate src/macgui.h @ 95304:300e5a5c5a17

Merge from gnus--devo--0 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1178
author Miles Bader <miles@gnu.org>
date Mon, 26 May 2008 06:57:27 +0000
parents 29adfc9354e7
children
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,
79759
fc2bcd2a8aad Add 2008 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 78260
diff changeset
3 2005, 2006, 2007, 2008 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
94994
29adfc9354e7 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 94615
diff changeset
7 GNU Emacs is free software: you can redistribute it and/or modify
44890
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
94994
29adfc9354e7 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 94615
diff changeset
9 the Free Software Foundation, either version 3 of the License, or
29adfc9354e7 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 94615
diff changeset
10 (at your option) any later version.
44890
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
94994
29adfc9354e7 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 94615
diff changeset
18 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
19
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
20 /* 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
21
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
22 #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
23 #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
24
75154
ad5ff45b52ef (Display): Typedef to opaque type.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 75098
diff changeset
25 typedef struct _XDisplay Display; /* opaque */
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
26
60634
d936edb2f62e (XrmDatabase): Typedef to Lisp_Object.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 60622
diff changeset
27 typedef Lisp_Object XrmDatabase;
50363
6bc35dcf692b (XrmDatabase): New (dummy) typedef.
Kim F. Storm <storm@cua.dk>
parents: 50301
diff changeset
28
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
29 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
30
60362
f69bf8238a7e [!MAC_OSX && HAVE_CARBON]: Include Carbon.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 59718
diff changeset
31 #ifdef HAVE_CARBON
f69bf8238a7e [!MAC_OSX && HAVE_CARBON]: Include Carbon.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 59718
diff changeset
32 #undef Z
f69bf8238a7e [!MAC_OSX && HAVE_CARBON]: Include Carbon.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 59718
diff changeset
33 #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
34 #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
35 #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
36 #endif
54150
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
37 #undef DEBUG
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
38 #undef free
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
39 #undef malloc
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
40 #undef realloc
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
41 /* 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
42 precompiled header Carbon.h. */
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
43 #undef max
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
44 #undef min
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
45 #undef init_process
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
46 #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
47 #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
48 #undef mktime
0867872551d9 macterm.c (x_raise_frame): Add BLOCK_INPUT around SelectWindow
Steven Tamm <steventamm@mac.com>
parents: 55851
diff changeset
49 #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
50 #endif
54150
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
51 #undef free
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
52 #define free unexec_free
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
53 #undef malloc
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
54 #define malloc unexec_malloc
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
55 #undef realloc
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
56 #define realloc unexec_realloc
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
57 #undef min
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
58 #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
59 #undef max
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
60 #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
61 #undef init_process
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
62 #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
63 #undef INFINITY
60362
f69bf8238a7e [!MAC_OSX && HAVE_CARBON]: Include Carbon.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 59718
diff changeset
64 #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
65 #undef SIGHUP
f69bf8238a7e [!MAC_OSX && HAVE_CARBON]: Include Carbon.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 59718
diff changeset
66 #define OLDP2C 1
f69bf8238a7e [!MAC_OSX && HAVE_CARBON]: Include Carbon.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 59718
diff changeset
67 #include <Carbon.h>
f69bf8238a7e [!MAC_OSX && HAVE_CARBON]: Include Carbon.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 59718
diff changeset
68 #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
69 #undef Z
f69bf8238a7e [!MAC_OSX && HAVE_CARBON]: Include Carbon.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 59718
diff changeset
70 #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
71 #else /* not HAVE_CARBON */
80452
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
72 #include <Quickdraw.h> /* for WindowRef */
54150
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
73 #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
74 #include <Appearance.h> /* for ThemeCursor */
59146
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
75 #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
76 #include <Controls.h>
55851
f1d6a507dcfd Support Tooltips with the Carbon emacs port.
Steven Tamm <steventamm@mac.com>
parents: 54150
diff changeset
77 #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
78 #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
79
70303
d7f3a82edf0a (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69432
diff changeset
80 /* Whether to use ATSUI (Apple Type Services for Unicode Imaging) for
d7f3a82edf0a (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69432
diff changeset
81 text drawing. */
90387
0aa60bfbc7ce (USE_ATSUI): Don't enable on emacs-unicode-2 branch.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 90386
diff changeset
82 #if 0 /* Don't enable by default on the emacs-unicode-2 branch. */
70303
d7f3a82edf0a (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69432
diff changeset
83 #ifndef USE_ATSUI
d7f3a82edf0a (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69432
diff changeset
84 #ifdef MAC_OSX
d7f3a82edf0a (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69432
diff changeset
85 #define USE_ATSUI 1
d7f3a82edf0a (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69432
diff changeset
86 #endif
d7f3a82edf0a (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69432
diff changeset
87 #endif
90387
0aa60bfbc7ce (USE_ATSUI): Don't enable on emacs-unicode-2 branch.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 90386
diff changeset
88 #endif
70303
d7f3a82edf0a (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69432
diff changeset
89
d7f3a82edf0a (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69432
diff changeset
90 /* Whether to use low-level Quartz 2D (aka Core Graphics) text drawing
d7f3a82edf0a (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69432
diff changeset
91 in preference to ATSUI for ASCII and Latin-1 characters. */
69432
c01e176bfcad [USE_ATSUI && MAC_OSX]: Define USE_CG_TEXT_DRAWING to 1.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69097
diff changeset
92 #ifndef USE_CG_TEXT_DRAWING
c01e176bfcad [USE_ATSUI && MAC_OSX]: Define USE_CG_TEXT_DRAWING to 1.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69097
diff changeset
93 #if USE_ATSUI && MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
c01e176bfcad [USE_ATSUI && MAC_OSX]: Define USE_CG_TEXT_DRAWING to 1.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69097
diff changeset
94 #define USE_CG_TEXT_DRAWING 1
c01e176bfcad [USE_ATSUI && MAC_OSX]: Define USE_CG_TEXT_DRAWING to 1.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69097
diff changeset
95 #endif
c01e176bfcad [USE_ATSUI && MAC_OSX]: Define USE_CG_TEXT_DRAWING to 1.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69097
diff changeset
96 #endif
c01e176bfcad [USE_ATSUI && MAC_OSX]: Define USE_CG_TEXT_DRAWING to 1.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69097
diff changeset
97
70303
d7f3a82edf0a (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69432
diff changeset
98 /* Whether to use Quartz 2D routines for drawing operations other than
d7f3a82edf0a (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69432
diff changeset
99 texts. */
69432
c01e176bfcad [USE_ATSUI && MAC_OSX]: Define USE_CG_TEXT_DRAWING to 1.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69097
diff changeset
100 #ifndef USE_CG_DRAWING
80389
f89745e778b8 Replace WindowPtr with WindowRef.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 79759
diff changeset
101 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020
69432
c01e176bfcad [USE_ATSUI && MAC_OSX]: Define USE_CG_TEXT_DRAWING to 1.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69097
diff changeset
102 #define USE_CG_DRAWING 1
c01e176bfcad [USE_ATSUI && MAC_OSX]: Define USE_CG_TEXT_DRAWING to 1.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69097
diff changeset
103 #endif
c01e176bfcad [USE_ATSUI && MAC_OSX]: Define USE_CG_TEXT_DRAWING to 1.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69097
diff changeset
104 #endif
c01e176bfcad [USE_ATSUI && MAC_OSX]: Define USE_CG_TEXT_DRAWING to 1.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69097
diff changeset
105
70494
6d9fbe4cfce7 (USE_MAC_FONT_PANEL): Define to 1 if USE_ATSUI is set
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 70303
diff changeset
106 /* Whether to use the standard Font Panel floating dialog. */
6d9fbe4cfce7 (USE_MAC_FONT_PANEL): Define to 1 if USE_ATSUI is set
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 70303
diff changeset
107 #ifndef USE_MAC_FONT_PANEL
6d9fbe4cfce7 (USE_MAC_FONT_PANEL): Define to 1 if USE_ATSUI is set
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 70303
diff changeset
108 #if USE_ATSUI && MAC_OS_X_VERSION_MAX_ALLOWED >= 1020
6d9fbe4cfce7 (USE_MAC_FONT_PANEL): Define to 1 if USE_ATSUI is set
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 70303
diff changeset
109 #define USE_MAC_FONT_PANEL 1
6d9fbe4cfce7 (USE_MAC_FONT_PANEL): Define to 1 if USE_ATSUI is set
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 70303
diff changeset
110 #endif
6d9fbe4cfce7 (USE_MAC_FONT_PANEL): Define to 1 if USE_ATSUI is set
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 70303
diff changeset
111 #endif
6d9fbe4cfce7 (USE_MAC_FONT_PANEL): Define to 1 if USE_ATSUI is set
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 70303
diff changeset
112
71177
cd3f4a38aae5 (USE_MAC_TSM): Set default to 1 on Mac OS X.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 70494
diff changeset
113 /* Whether to use Text Services Manager. */
cd3f4a38aae5 (USE_MAC_TSM): Set default to 1 on Mac OS X.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 70494
diff changeset
114 #ifndef USE_MAC_TSM
71503
fa67beba36e1 (USE_MAC_TSM) [TARGET_API_MAC_CARBON]: Set default to 1.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 71177
diff changeset
115 #if TARGET_API_MAC_CARBON
71177
cd3f4a38aae5 (USE_MAC_TSM): Set default to 1 on Mac OS X.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 70494
diff changeset
116 #define USE_MAC_TSM 1
cd3f4a38aae5 (USE_MAC_TSM): Set default to 1 on Mac OS X.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 70494
diff changeset
117 #endif
cd3f4a38aae5 (USE_MAC_TSM): Set default to 1 on Mac OS X.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 70494
diff changeset
118 #endif
cd3f4a38aae5 (USE_MAC_TSM): Set default to 1 on Mac OS X.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 70494
diff changeset
119
80389
f89745e778b8 Replace WindowPtr with WindowRef.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 79759
diff changeset
120 /* Whether to use HIToolbar. */
f89745e778b8 Replace WindowPtr with WindowRef.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 79759
diff changeset
121 #ifndef USE_MAC_TOOLBAR
f89745e778b8 Replace WindowPtr with WindowRef.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 79759
diff changeset
122 #if USE_CG_DRAWING && MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 && MAC_OS_X_VERSION_MIN_REQUIRED != 1020
f89745e778b8 Replace WindowPtr with WindowRef.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 79759
diff changeset
123 #define USE_MAC_TOOLBAR 1
f89745e778b8 Replace WindowPtr with WindowRef.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 79759
diff changeset
124 #endif
f89745e778b8 Replace WindowPtr with WindowRef.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 79759
diff changeset
125 #endif
f89745e778b8 Replace WindowPtr with WindowRef.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 79759
diff changeset
126
80514
fbe5484e7555 (CGFloat) [!CGFLOAT_DEFINED]: New typedef.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80452
diff changeset
127 #ifndef CGFLOAT_DEFINED
fbe5484e7555 (CGFloat) [!CGFLOAT_DEFINED]: New typedef.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80452
diff changeset
128 typedef float CGFloat;
fbe5484e7555 (CGFloat) [!CGFLOAT_DEFINED]: New typedef.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80452
diff changeset
129 #endif
fbe5484e7555 (CGFloat) [!CGFLOAT_DEFINED]: New typedef.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80452
diff changeset
130
80389
f89745e778b8 Replace WindowPtr with WindowRef.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 79759
diff changeset
131 typedef WindowRef Window;
80452
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
132 #if TARGET_API_MAC_CARBON
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
133 typedef ScrapRef Selection;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
134 #else
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
135 typedef int Selection;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
136 #endif
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
137 #define mac_set_window_title SetWindowTitleWithCFString
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
138 #define mac_set_window_modified SetWindowModified
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
139 #define mac_is_window_visible IsWindowVisible
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
140 #define mac_is_window_collapsed IsWindowCollapsed
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
141 #define mac_bring_window_to_front BringToFront
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
142 #define mac_send_window_behind SendBehind
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
143 #define mac_hide_window HideWindow
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
144 #define mac_show_window ShowWindow
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
145 #define mac_collapse_window CollapseWindow
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
146 #define mac_front_non_floating_window FrontNonFloatingWindow
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
147 #define mac_active_non_floating_window ActiveNonFloatingWindow
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
148 #define mac_activate_window ActivateWindow
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
149 #define mac_move_window_structure MoveWindowStructure
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
150 #define mac_move_window MoveWindow
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
151 #define mac_size_window SizeWindow
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
152 #define mac_get_global_mouse GetGlobalMouse
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
153 #define mac_is_window_toolbar_visible IsWindowToolbarVisible
80514
fbe5484e7555 (CGFloat) [!CGFLOAT_DEFINED]: New typedef.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80452
diff changeset
154 #define mac_rect_make(f, x, y, w, h) CGRectMake (x, y, w, h)
80546
5eb403dc8e20 (Pixmap) [USE_MAC_IMAGE_IO]: New definition for Image I/O.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80514
diff changeset
155
5eb403dc8e20 (Pixmap) [USE_MAC_IMAGE_IO]: New definition for Image I/O.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80514
diff changeset
156 #if USE_MAC_IMAGE_IO
5eb403dc8e20 (Pixmap) [USE_MAC_IMAGE_IO]: New definition for Image I/O.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80514
diff changeset
157 typedef struct _XImage
5eb403dc8e20 (Pixmap) [USE_MAC_IMAGE_IO]: New definition for Image I/O.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80514
diff changeset
158 {
5eb403dc8e20 (Pixmap) [USE_MAC_IMAGE_IO]: New definition for Image I/O.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80514
diff changeset
159 int width, height; /* size of image */
5eb403dc8e20 (Pixmap) [USE_MAC_IMAGE_IO]: New definition for Image I/O.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80514
diff changeset
160 char *data; /* pointer to image data */
5eb403dc8e20 (Pixmap) [USE_MAC_IMAGE_IO]: New definition for Image I/O.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80514
diff changeset
161 int bytes_per_line; /* accelarator to next line */
5eb403dc8e20 (Pixmap) [USE_MAC_IMAGE_IO]: New definition for Image I/O.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80514
diff changeset
162 int bits_per_pixel; /* bits per pixel (ZPixmap) */
5eb403dc8e20 (Pixmap) [USE_MAC_IMAGE_IO]: New definition for Image I/O.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80514
diff changeset
163 } *Pixmap;
5eb403dc8e20 (Pixmap) [USE_MAC_IMAGE_IO]: New definition for Image I/O.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80514
diff changeset
164 #else
54150
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
165 typedef GWorldPtr Pixmap;
80546
5eb403dc8e20 (Pixmap) [USE_MAC_IMAGE_IO]: New definition for Image I/O.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80514
diff changeset
166 #endif
54150
6c8849d06ab3 Inserting Yamomotosan's changes for MacOSX image support, better support
Steven Tamm <steventamm@mac.com>
parents: 52401
diff changeset
167
55851
f1d6a507dcfd Support Tooltips with the Carbon emacs port.
Steven Tamm <steventamm@mac.com>
parents: 54150
diff changeset
168 #define Cursor ThemeCursor
f1d6a507dcfd Support Tooltips with the Carbon emacs port.
Steven Tamm <steventamm@mac.com>
parents: 54150
diff changeset
169 #define No_Cursor (-1)
f1d6a507dcfd Support Tooltips with the Carbon emacs port.
Steven Tamm <steventamm@mac.com>
parents: 54150
diff changeset
170
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
171 #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
172
65251
bd6366e3f520 [!TARGET_API_MAC_CARBON] (GetPixDepth): New define.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64770
diff changeset
173 #if !TARGET_API_MAC_CARBON
bd6366e3f520 [!TARGET_API_MAC_CARBON] (GetPixDepth): New define.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64770
diff changeset
174 #define GetPixDepth(pmh) ((*(pmh))->pixelSize)
bd6366e3f520 [!TARGET_API_MAC_CARBON] (GetPixDepth): New define.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64770
diff changeset
175 #endif
bd6366e3f520 [!TARGET_API_MAC_CARBON] (GetPixDepth): New define.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64770
diff changeset
176
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
177
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
178 /* Emulate XCharStruct. */
70303
d7f3a82edf0a (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69432
diff changeset
179 /* If the sum of ascent and descent is negative, that means some
d7f3a82edf0a (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69432
diff changeset
180 special status specified by enum pcm_status. */
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
181 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
182 {
65720
ffb004cd9a2f (struct _XCharStruct): Each member now takes short value.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65251
diff changeset
183 short lbearing; /* origin to left edge of raster */
ffb004cd9a2f (struct _XCharStruct): Each member now takes short value.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65251
diff changeset
184 short rbearing; /* origin to right edge of raster */
ffb004cd9a2f (struct _XCharStruct): Each member now takes short value.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65251
diff changeset
185 short width; /* advance to next char's origin */
ffb004cd9a2f (struct _XCharStruct): Each member now takes short value.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65251
diff changeset
186 short ascent; /* baseline to top edge of raster */
ffb004cd9a2f (struct _XCharStruct): Each member now takes short value.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65251
diff changeset
187 short descent; /* baseline to bottom edge of raster */
ffb004cd9a2f (struct _XCharStruct): Each member now takes short value.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65251
diff changeset
188 #if 0
ffb004cd9a2f (struct _XCharStruct): Each member now takes short value.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65251
diff changeset
189 unsigned short attributes; /* per char flags (not predefined) */
ffb004cd9a2f (struct _XCharStruct): Each member now takes short value.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65251
diff changeset
190 #endif
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
191 } XCharStruct;
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
192
70303
d7f3a82edf0a (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69432
diff changeset
193 enum pcm_status
d7f3a82edf0a (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69432
diff changeset
194 {
d7f3a82edf0a (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69432
diff changeset
195 PCM_VALID = 0, /* pcm data is valid */
d7f3a82edf0a (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69432
diff changeset
196 PCM_INVALID = -1, /* pcm data is invalid */
d7f3a82edf0a (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69432
diff changeset
197 };
d7f3a82edf0a (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69432
diff changeset
198
59718
d4cb255b034d * dispextern.h (struct glyph_string): New members clip_head and
Steven Tamm <steventamm@mac.com>
parents: 59146
diff changeset
199 #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
200 ((xcs).width = (w), \
d4cb255b034d * dispextern.h (struct glyph_string): New members clip_head and
Steven Tamm <steventamm@mac.com>
parents: 59146
diff changeset
201 (xcs).lbearing = (bds).left, \
d4cb255b034d * dispextern.h (struct glyph_string): New members clip_head and
Steven Tamm <steventamm@mac.com>
parents: 59146
diff changeset
202 (xcs).rbearing = (bds).right, \
d4cb255b034d * dispextern.h (struct glyph_string): New members clip_head and
Steven Tamm <steventamm@mac.com>
parents: 59146
diff changeset
203 (xcs).ascent = -(bds).top, \
67732
caacdc1a999e (XCharStruct): Remove member `valid_p'.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 66840
diff changeset
204 (xcs).descent = (bds).bottom)
caacdc1a999e (XCharStruct): Remove member `valid_p'.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 66840
diff changeset
205
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
206 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
207 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
208
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
209 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
210 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
211 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
212 #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
213 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
214 #else
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
215 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
216 #endif
65771
3b00e34812bb (struct _XCharStruct): New member valid_p.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65720
diff changeset
217 #if USE_ATSUI
3b00e34812bb (struct _XCharStruct): New member valid_p.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65720
diff changeset
218 ATSUStyle mac_style; /* NULL if QuickDraw Text is used */
66840
8c0a6fb71ce1 (USE_CG_TEXT_DRAWING): New define.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65909
diff changeset
219 #if USE_CG_TEXT_DRAWING
8c0a6fb71ce1 (USE_CG_TEXT_DRAWING): New define.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65909
diff changeset
220 CGFontRef cg_font; /* NULL if ATSUI text drawing is used */
8c0a6fb71ce1 (USE_CG_TEXT_DRAWING): New define.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65909
diff changeset
221 CGGlyph *cg_glyphs; /* Likewise */
8c0a6fb71ce1 (USE_CG_TEXT_DRAWING): New define.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65909
diff changeset
222 #endif
65771
3b00e34812bb (struct _XCharStruct): New member valid_p.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65720
diff changeset
223 #endif
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
224
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
225 /* 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
226 #if 0
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
227 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
228 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
229 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
230 #endif /* 0 */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
231 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
232 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
233 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
234 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
235 #if 0
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
236 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
237 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
238 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
239 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
240 #endif /* 0 */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
241 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
242 XCharStruct max_bounds; /* maximum bounds over all existing char */
67732
caacdc1a999e (XCharStruct): Remove member `valid_p'.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 66840
diff changeset
243 union {
caacdc1a999e (XCharStruct): Remove member `valid_p'.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 66840
diff changeset
244 XCharStruct *per_char; /* first_char to last_char information */
70303
d7f3a82edf0a (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69432
diff changeset
245 XCharStruct **rows; /* first row to last row information */
67732
caacdc1a999e (XCharStruct): Remove member `valid_p'.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 66840
diff changeset
246 } bounds;
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
247 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
248 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
249 };
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
250
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
251 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
252 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
253
50156
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
254 /* 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
255
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
256 typedef struct {
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
257 unsigned char byte1;
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
258 unsigned char byte2;
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
259 } XChar2b;
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
260
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
261 #define STORE_XCHAR2B(chp, b1, b2) \
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
262 ((chp)->byte1 = (b1), (chp)->byte2 = (b2))
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
263
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
264 #define XCHAR2B_BYTE1(chp) \
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
265 ((chp)->byte1)
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
266
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
267 #define XCHAR2B_BYTE2(chp) \
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
268 ((chp)->byte2)
8ff568a30195 (XChar2b): Move typedef here for consolidation.
Kim F. Storm <storm@cua.dk>
parents: 47997
diff changeset
269
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
270
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
271 /* 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
272 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
273 {
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
274 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
275 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
276 XFontStruct *font;
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
277 } XGCValues;
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
278
64423
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
279 typedef struct _XGC
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
280 {
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
281 /* Original value. */
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
282 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
283
64423
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
284 /* 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
285
64423
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
286 /* QuickDraw foreground color. */
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
287 RGBColor fore_color;
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
288
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
289 /* QuickDraw background color. */
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
290 RGBColor back_color;
65909
d8fff61aaf2d (MAX_CLIP_RECTS): New define.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65771
diff changeset
291
75098
979156e19838 (struct _XGC) [USE_CG_DRAWING
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 71503
diff changeset
292 #if USE_CG_DRAWING && MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
979156e19838 (struct _XGC) [USE_CG_DRAWING
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 71503
diff changeset
293 /* Quartz 2D foreground color. */
979156e19838 (struct _XGC) [USE_CG_DRAWING
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 71503
diff changeset
294 CGColorRef cg_fore_color;
979156e19838 (struct _XGC) [USE_CG_DRAWING
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 71503
diff changeset
295
979156e19838 (struct _XGC) [USE_CG_DRAWING
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 71503
diff changeset
296 /* Quartz 2D background color. */
979156e19838 (struct _XGC) [USE_CG_DRAWING
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 71503
diff changeset
297 CGColorRef cg_back_color;
979156e19838 (struct _XGC) [USE_CG_DRAWING
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 71503
diff changeset
298 #endif
979156e19838 (struct _XGC) [USE_CG_DRAWING
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 71503
diff changeset
299
65909
d8fff61aaf2d (MAX_CLIP_RECTS): New define.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65771
diff changeset
300 #define MAX_CLIP_RECTS 2
69097
3be1a9b7b2e7 (struct _XGC) [!MAC_OSX || !USE_ATSUI]: New member n_clip_rects.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 68651
diff changeset
301 /* Number of clipping rectangles. */
3be1a9b7b2e7 (struct _XGC) [!MAC_OSX || !USE_ATSUI]: New member n_clip_rects.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 68651
diff changeset
302 int n_clip_rects;
3be1a9b7b2e7 (struct _XGC) [!MAC_OSX || !USE_ATSUI]: New member n_clip_rects.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 68651
diff changeset
303
3be1a9b7b2e7 (struct _XGC) [!MAC_OSX || !USE_ATSUI]: New member n_clip_rects.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 68651
diff changeset
304 /* QuickDraw clipping region. Ignored if n_clip_rects == 0. */
65909
d8fff61aaf2d (MAX_CLIP_RECTS): New define.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65771
diff changeset
305 RgnHandle clip_region;
d8fff61aaf2d (MAX_CLIP_RECTS): New define.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65771
diff changeset
306
70303
d7f3a82edf0a (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 69432
diff changeset
307 #if defined (MAC_OSX) && (USE_ATSUI || USE_CG_DRAWING)
65909
d8fff61aaf2d (MAX_CLIP_RECTS): New define.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65771
diff changeset
308 /* Clipping rectangles used in Quartz 2D drawing. The y-coordinate
d8fff61aaf2d (MAX_CLIP_RECTS): New define.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65771
diff changeset
309 is in QuickDraw's. */
d8fff61aaf2d (MAX_CLIP_RECTS): New define.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65771
diff changeset
310 CGRect clip_rects[MAX_CLIP_RECTS];
d8fff61aaf2d (MAX_CLIP_RECTS): New define.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 65771
diff changeset
311 #endif
64423
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
312 } *GC;
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
313
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
314 #define GCForeground (1L<<2)
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
315 #define GCBackground (1L<<3)
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
316 #define GCFont (1L<<14)
94a250aa72e0 (struct _XGC): New struct.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 64084
diff changeset
317 #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
318
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
319 /* Bit Gravity */
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
320
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
321 #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
322 #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
323 #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
324 #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
325 #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
326 #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
327 #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
328 #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
329 #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
330 #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
331 #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
332
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
333 #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
334 #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
335 #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
336 #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
337 #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
338 #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
339 #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
340 #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
341
59146
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
342 typedef struct {
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
343 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
344 #if 0
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
345 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
346 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
347 #endif
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
348 int min_width, min_height;
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
349 #if 0
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
350 int max_width, max_height;
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
351 #endif
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
352 int width_inc, height_inc;
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
353 #if 0
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
354 struct {
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
355 int x; /* numerator */
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
356 int y; /* denominator */
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
357 } min_aspect, max_aspect;
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
358 #endif
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
359 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
360 #if 0
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
361 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
362 #endif
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
363 } XSizeHints;
9bde7721ad0f * dispextern.h: Change HAVE_CARBON to MAC_OS.
Steven Tamm <steventamm@mac.com>
parents: 57425
diff changeset
364
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
365 #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
366 #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
367
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
368 #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
369 #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
370 #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
371 #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
372 #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
373 #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
374 #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
375 #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
376
50221
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
377 typedef struct {
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
378 int x, y;
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
379 unsigned width, height;
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
380 } XRectangle;
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
381
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
382 #define NativeRectangle Rect
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
383
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
384 #define CONVERT_TO_XRECT(xr,nr) \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
385 ((xr).x = (nr).left, \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
386 (xr).y = (nr).top, \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
387 (xr).width = ((nr).right - (nr).left), \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
388 (xr).height = ((nr).bottom - (nr).top))
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
389
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
390 #define CONVERT_FROM_XRECT(xr,nr) \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
391 ((nr).left = (xr).x, \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
392 (nr).top = (xr).y, \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
393 (nr).right = ((xr).x + (xr).width), \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
394 (nr).bottom = ((xr).y + (xr).height))
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
395
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
396 #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
397 ((nr).left = (x), \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
398 (nr).top = (y), \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
399 (nr).right = ((nr).left + (width)), \
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
400 (nr).bottom = ((nr).top + (height)))
609980fd9f79 (No_Cursor): Define as 0 for Mac.
Kim F. Storm <storm@cua.dk>
parents: 50156
diff changeset
401
80452
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
402 /* Definitions copied from lwlib.h */
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
403
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
404 typedef void * XtPointer;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
405
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
406 enum button_type
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
407 {
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
408 BUTTON_TYPE_NONE,
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
409 BUTTON_TYPE_TOGGLE,
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
410 BUTTON_TYPE_RADIO
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
411 };
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
412
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
413 /* This structure is based on the one in ../lwlib/lwlib.h, modified
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
414 for Mac OS. */
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
415 typedef struct _widget_value
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
416 {
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
417 /* name of widget */
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
418 Lisp_Object lname;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
419 char* name;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
420 /* value (meaning depend on widget type) */
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
421 char* value;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
422 /* keyboard equivalent. no implications for XtTranslations */
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
423 Lisp_Object lkey;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
424 char* key;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
425 /* Help string or nil if none.
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
426 GC finds this string through the frame's menu_bar_vector
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
427 or through menu_items. */
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
428 Lisp_Object help;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
429 /* true if enabled */
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
430 Boolean enabled;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
431 /* true if selected */
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
432 Boolean selected;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
433 /* The type of a button. */
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
434 enum button_type button_type;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
435 /* true if menu title */
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
436 Boolean title;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
437 #if 0
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
438 /* true if was edited (maintained by get_value) */
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
439 Boolean edited;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
440 /* true if has changed (maintained by lw library) */
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
441 change_type change;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
442 /* true if this widget itself has changed,
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
443 but not counting the other widgets found in the `next' field. */
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
444 change_type this_one_change;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
445 #endif
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
446 /* Contents of the sub-widgets, also selected slot for checkbox */
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
447 struct _widget_value* contents;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
448 /* data passed to callback */
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
449 XtPointer call_data;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
450 /* next one in the list */
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
451 struct _widget_value* next;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
452 #if 0
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
453 /* slot for the toolkit dependent part. Always initialize to NULL. */
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
454 void* toolkit_data;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
455 /* tell us if we should free the toolkit data slot when freeing the
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
456 widget_value itself. */
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
457 Boolean free_toolkit_data;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
458
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
459 /* we resource the widget_value structures; this points to the next
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
460 one on the free list if this one has been deallocated.
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
461 */
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
462 struct _widget_value *free_list;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
463 #endif
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
464 } widget_value;
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
465
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
466 #if MAC_OS8
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
467 #define M_APPLE 234
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
468 #define I_ABOUT 1
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
469
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
470 #define EXTRA_STACK_ALLOC (256 * 1024)
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
471
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
472 #define ARGV_STRING_LIST_ID 129
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
473 #define RAM_TOO_LARGE_ALERT_ID 129
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
474 #define ABOUT_ALERT_ID 128
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
475 #endif
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
476
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
477 #define DIALOG_LEFT_MARGIN (112)
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
478 #define DIALOG_TOP_MARGIN (24)
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
479 #define DIALOG_RIGHT_MARGIN (24)
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
480 #define DIALOG_BOTTOM_MARGIN (20)
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
481 #define DIALOG_MIN_INNER_WIDTH (338)
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
482 #define DIALOG_MAX_INNER_WIDTH (564)
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
483 #define DIALOG_BUTTON_BUTTON_HORIZONTAL_SPACE (12)
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
484 #define DIALOG_BUTTON_BUTTON_VERTICAL_SPACE (12)
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
485 #define DIALOG_BUTTON_MIN_WIDTH (68)
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
486 #define DIALOG_TEXT_MIN_HEIGHT (50)
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
487 #define DIALOG_TEXT_BUTTONS_VERTICAL_SPACE (10)
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
488 #define DIALOG_ICON_WIDTH (64)
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
489 #define DIALOG_ICON_HEIGHT (64)
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
490 #define DIALOG_ICON_LEFT_MARGIN (24)
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
491 #define DIALOG_ICON_TOP_MARGIN (15)
6d01fa145e93 [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 80389
diff changeset
492
44890
01b93e5e53a7 Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
parents:
diff changeset
493 #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
494
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 50363
diff changeset
495 /* arch-tag: 5a0da49a-35e2-418b-a58c-8a55778ae849
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 50363
diff changeset
496 (do not change this comment) */