diff options
| author | Steven Tamm | 2004-02-26 17:46:48 +0000 |
|---|---|---|
| committer | Steven Tamm | 2004-02-26 17:46:48 +0000 |
| commit | e35644615b2a506daa457cbc5613ba8d16a46be6 (patch) | |
| tree | c9a8a5555b8bffd7808612c10958a1cd96a7a75f /src/macterm.h | |
| parent | af617d0febe392e1d55978df89a73f6c2fca74d4 (diff) | |
| download | emacs-e35644615b2a506daa457cbc5613ba8d16a46be6.tar.gz emacs-e35644615b2a506daa457cbc5613ba8d16a46be6.zip | |
Inserting Yamomotosan's changes for MacOSX image support, better support
of Asian fonts, and some long awaited header cleanup and centralization.
Diffstat (limited to 'src/macterm.h')
| -rw-r--r-- | src/macterm.h | 46 |
1 files changed, 16 insertions, 30 deletions
diff --git a/src/macterm.h b/src/macterm.h index b3fe53c86ea..17b8a0fb298 100644 --- a/src/macterm.h +++ b/src/macterm.h | |||
| @@ -23,45 +23,26 @@ Boston, MA 02111-1307, USA. */ | |||
| 23 | #include "macgui.h" | 23 | #include "macgui.h" |
| 24 | #include "frame.h" | 24 | #include "frame.h" |
| 25 | 25 | ||
| 26 | /* Include Carbon.h to define Cursor and Rect. */ | ||
| 27 | #ifdef HAVE_CARBON | ||
| 28 | #undef mktime | ||
| 29 | #undef DEBUG | ||
| 30 | #undef Z | ||
| 31 | #undef free | ||
| 32 | #undef malloc | ||
| 33 | #undef realloc | ||
| 34 | /* Macros max and min defined in lisp.h conflict with those in | ||
| 35 | precompiled header Carbon.h. */ | ||
| 36 | #undef max | ||
| 37 | #undef min | ||
| 38 | #undef init_process | ||
| 39 | #include <Carbon/Carbon.h> | ||
| 40 | #undef Z | ||
| 41 | #define Z (current_buffer->text->z) | ||
| 42 | #undef free | ||
| 43 | #define free unexec_free | ||
| 44 | #undef malloc | ||
| 45 | #define malloc unexec_malloc | ||
| 46 | #undef realloc | ||
| 47 | #define realloc unexec_realloc | ||
| 48 | #undef min | ||
| 49 | #define min(a, b) ((a) < (b) ? (a) : (b)) | ||
| 50 | #undef max | ||
| 51 | #define max(a, b) ((a) > (b) ? (a) : (b)) | ||
| 52 | #undef init_process | ||
| 53 | #define init_process emacs_init_process | ||
| 54 | #endif /* MAC_OSX */ | ||
| 55 | |||
| 56 | #define RGB_TO_ULONG(r, g, b) (((r) << 16) | ((g) << 8) | (b)) | 26 | #define RGB_TO_ULONG(r, g, b) (((r) << 16) | ((g) << 8) | (b)) |
| 57 | 27 | ||
| 58 | #define RED_FROM_ULONG(color) ((color) >> 16) | 28 | #define RED_FROM_ULONG(color) ((color) >> 16) |
| 59 | #define GREEN_FROM_ULONG(color) (((color) >> 8) & 0xff) | 29 | #define GREEN_FROM_ULONG(color) (((color) >> 8) & 0xff) |
| 60 | #define BLUE_FROM_ULONG(color) ((color) & 0xff) | 30 | #define BLUE_FROM_ULONG(color) ((color) & 0xff) |
| 61 | 31 | ||
| 32 | /* Do not change `* 0x101' in the following lines to `<< 8'. If | ||
| 33 | changed, image masks in 1-bit depth will not work. */ | ||
| 34 | #define RED16_FROM_ULONG(color) (RED_FROM_ULONG(color) * 0x101) | ||
| 35 | #define GREEN16_FROM_ULONG(color) (GREEN_FROM_ULONG(color) * 0x101) | ||
| 36 | #define BLUE16_FROM_ULONG(color) (BLUE_FROM_ULONG(color) * 0x101) | ||
| 37 | |||
| 62 | #define BLACK_PIX_DEFAULT(f) RGB_TO_ULONG(0,0,0) | 38 | #define BLACK_PIX_DEFAULT(f) RGB_TO_ULONG(0,0,0) |
| 63 | #define WHITE_PIX_DEFAULT(f) RGB_TO_ULONG(255,255,255) | 39 | #define WHITE_PIX_DEFAULT(f) RGB_TO_ULONG(255,255,255) |
| 64 | 40 | ||
| 41 | /* A black pixel in a mask bitmap/pixmap means ``draw a source | ||
| 42 | pixel''. A white pixel means ``retain the current pixel''. */ | ||
| 43 | #define PIX_MASK_DRAW(f) BLACK_PIX_DEFAULT(f) | ||
| 44 | #define PIX_MASK_RETAIN(f) WHITE_PIX_DEFAULT(f) | ||
| 45 | |||
| 65 | #define FONT_WIDTH(f) ((f)->max_bounds.width) | 46 | #define FONT_WIDTH(f) ((f)->max_bounds.width) |
| 66 | #define FONT_HEIGHT(f) ((f)->ascent + (f)->descent) | 47 | #define FONT_HEIGHT(f) ((f)->ascent + (f)->descent) |
| 67 | #define FONT_BASE(f) ((f)->ascent) | 48 | #define FONT_BASE(f) ((f)->ascent) |
| @@ -101,8 +82,13 @@ struct mac_display_info | |||
| 101 | /* Number of planes on this screen. */ | 82 | /* Number of planes on this screen. */ |
| 102 | int n_planes; | 83 | int n_planes; |
| 103 | 84 | ||
| 85 | /* Whether the screen supports color */ | ||
| 86 | int color_p; | ||
| 87 | |||
| 88 | #if 0 | ||
| 104 | /* Number of bits per pixel on this screen. */ | 89 | /* Number of bits per pixel on this screen. */ |
| 105 | int n_cbits; | 90 | int n_cbits; |
| 91 | #endif | ||
| 106 | 92 | ||
| 107 | /* Dimensions of this screen. */ | 93 | /* Dimensions of this screen. */ |
| 108 | int height, width; | 94 | int height, width; |