Commit e3564461 authored by Steven Tamm's avatar Steven Tamm

Inserting Yamomotosan's changes for MacOSX image support, better support

of Asian fonts, and some long awaited header cleanup and centralization.
parent af617d0f
This diff is collapsed.
......@@ -61,38 +61,8 @@ typedef struct w32_display_info Display_Info;
#ifdef HAVE_CARBON
#include "macgui.h"
typedef struct mac_display_info Display_Info;
/* Include Carbon.h to define Cursor and Rect. */
#undef mktime
#undef DEBUG
#undef Z
#undef free
#undef malloc
#undef realloc
/* Macros max and min defined in lisp.h conflict with those in
precompiled header Carbon.h. */
#undef max
#undef min
#undef init_process
#include <Carbon/Carbon.h>
#undef Z
#define Z (current_buffer->text->z)
#undef free
#define free unexec_free
#undef malloc
#define malloc unexec_malloc
#undef realloc
#define realloc unexec_realloc
#undef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#undef max
#define max(a, b) ((a) > (b) ? (a) : (b))
#undef init_process
#define init_process emacs_init_process
#endif
#ifndef NativeRectangle
#define NativeRectangle int
#endif
......
......@@ -1589,7 +1589,7 @@ main (argc, argv
init_vmsproc (); /* And this too. */
#endif /* VMS */
init_sys_modes (); /* Init system terminal modes (RAW or CBREAK, etc.). */
#if defined (HAVE_X_WINDOWS) || defined (WINDOWSNT)
#if defined (HAVE_X_WINDOWS) || defined (WINDOWSNT) || defined (HAVE_CARBON)
init_xfns ();
#endif /* HAVE_X_WINDOWS */
init_fns ();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -23,9 +23,6 @@ Boston, MA 02111-1307, USA. */
#ifndef EMACS_MACGUI_H
#define EMACS_MACGUI_H
typedef int Pixmap;
typedef int Bitmap;
typedef int Display; /* fix later */
typedef char * XrmDatabase; /* fix later */
......@@ -33,12 +30,43 @@ typedef char * XrmDatabase; /* fix later */
typedef unsigned long Time;
#if MAC_OSX
#undef mktime
#undef DEBUG
#undef Z
#undef free
#undef malloc
#undef realloc
/* Macros max and min defined in lisp.h conflict with those in
precompiled header Carbon.h. */
#undef max
#undef min
#undef init_process
#include <Carbon/Carbon.h>
#undef Z
#define Z (current_buffer->text->z)
#undef free
#define free unexec_free
#undef malloc
#define malloc unexec_malloc
#undef realloc
#define realloc unexec_realloc
#undef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#undef max
#define max(a, b) ((a) > (b) ? (a) : (b))
#undef init_process
#define init_process emacs_init_process
#undef INFINITY
typedef struct OpaqueWindowPtr* Window;
#else
#include <QuickDraw.h>
#include <QuickDraw.h> /* for WindowPtr */
#include <QDOffscreen.h> /* for GWorldPtr */
#include <Controls.h> /* for ControlHandle in xdisp.c */
typedef WindowPtr Window;
#endif
typedef GWorldPtr Pixmap;
#define FACE_DEFAULT (~0)
......
......@@ -35,34 +35,7 @@ Boston, MA 02111-1307, USA. */
#include "charset.h"
#include "coding.h"
#ifdef MAC_OSX
#undef mktime
#undef DEBUG
#undef Z
#undef free
#undef malloc
#undef realloc
/* Macros max and min defined in lisp.h conflict with those in
precompiled header Carbon.h. */
#undef max
#undef min
#undef init_process
#include <Carbon/Carbon.h>
#undef Z
#define Z (current_buffer->text->z)
#undef free
#define free unexec_free
#undef malloc
#define malloc unexec_malloc
#undef realloc
#define realloc unexec_realloc
#undef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#undef max
#define max(a, b) ((a) > (b) ? (a) : (b))
#undef init_process
#define init_process emacs_init_process
#else /* not MAC_OSX */
#ifndef MAC_OSX
#include <MacTypes.h>
#include <Menus.h>
#include <QuickDraw.h>
......
This diff is collapsed.
......@@ -23,45 +23,26 @@ Boston, MA 02111-1307, USA. */
#include "macgui.h"
#include "frame.h"
/* Include Carbon.h to define Cursor and Rect. */
#ifdef HAVE_CARBON
#undef mktime
#undef DEBUG
#undef Z
#undef free
#undef malloc
#undef realloc
/* Macros max and min defined in lisp.h conflict with those in
precompiled header Carbon.h. */
#undef max
#undef min
#undef init_process
#include <Carbon/Carbon.h>
#undef Z
#define Z (current_buffer->text->z)
#undef free
#define free unexec_free
#undef malloc
#define malloc unexec_malloc
#undef realloc
#define realloc unexec_realloc
#undef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#undef max
#define max(a, b) ((a) > (b) ? (a) : (b))
#undef init_process
#define init_process emacs_init_process
#endif /* MAC_OSX */
#define RGB_TO_ULONG(r, g, b) (((r) << 16) | ((g) << 8) | (b))
#define RED_FROM_ULONG(color) ((color) >> 16)
#define GREEN_FROM_ULONG(color) (((color) >> 8) & 0xff)
#define BLUE_FROM_ULONG(color) ((color) & 0xff)
/* Do not change `* 0x101' in the following lines to `<< 8'. If
changed, image masks in 1-bit depth will not work. */
#define RED16_FROM_ULONG(color) (RED_FROM_ULONG(color) * 0x101)
#define GREEN16_FROM_ULONG(color) (GREEN_FROM_ULONG(color) * 0x101)
#define BLUE16_FROM_ULONG(color) (BLUE_FROM_ULONG(color) * 0x101)
#define BLACK_PIX_DEFAULT(f) RGB_TO_ULONG(0,0,0)
#define WHITE_PIX_DEFAULT(f) RGB_TO_ULONG(255,255,255)
/* A black pixel in a mask bitmap/pixmap means ``draw a source
pixel''. A white pixel means ``retain the current pixel''. */
#define PIX_MASK_DRAW(f) BLACK_PIX_DEFAULT(f)
#define PIX_MASK_RETAIN(f) WHITE_PIX_DEFAULT(f)
#define FONT_WIDTH(f) ((f)->max_bounds.width)
#define FONT_HEIGHT(f) ((f)->ascent + (f)->descent)
#define FONT_BASE(f) ((f)->ascent)
......@@ -101,8 +82,13 @@ struct mac_display_info
/* Number of planes on this screen. */
int n_planes;
/* Whether the screen supports color */
int color_p;
#if 0
/* Number of bits per pixel on this screen. */
int n_cbits;
#endif
/* Dimensions of this screen. */
int height, width;
......
......@@ -247,7 +247,7 @@ Boston, MA 02111-1307, USA. */
page) to leave room at the end of the header for adding load
commands. Needed for dumping. 0x690 is the total size of 30
segment load commands (at 56 each). */
#define LD_SWITCH_SYSTEM_TEMACS -prebind -framework Carbon -lstdc++ -Xlinker -headerpad -Xlinker 690
#define LD_SWITCH_SYSTEM_TEMACS -prebind -framework Carbon -framework QuickTime -lstdc++ -Xlinker -headerpad -Xlinker 690
#define C_SWITCH_SYSTEM_TEMACS -Dtemacs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment