[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Consolidation of image support in new image.c file.
From: |
YAMAMOTO Mitsuharu |
Subject: |
Re: Consolidation of image support in new image.c file. |
Date: |
Fri, 12 Mar 2004 07:16:17 +0900 (JST) |
>>>>> On Wed, 10 Mar 2004 21:57:37 -0800, Steven Tamm <address@hidden> said:
> I also could not bootstrap (or make for that matter): Some code was
> left lying around macfns.c that defines Qjpeg and the like and
> sys/stat.h wasn't included in image.c for OSX.
> I checked in the following changes that make it compile (don't know
> if it works yet... still bootstrapping):
With the following change, I could do make bootstrap in Mac OS X.
YAMAMOTO Mitsuharu
address@hidden
Index: src/dispextern.h
===================================================================
RCS file: /cvsroot/emacs/emacs/src/dispextern.h,v
retrieving revision 1.167
diff -c -r1.167 dispextern.h
*** src/dispextern.h 11 Mar 2004 11:17:27 -0000 1.167
--- src/dispextern.h 11 Mar 2004 21:26:39 -0000
***************
*** 50,66 ****
--- 50,73 ----
#ifdef HAVE_X_WINDOWS
typedef struct x_display_info Display_Info;
+ typedef XImage * XImagePtr;
+ typedef XImagePtr XImagePtr_or_DC;
#define NativeRectangle XRectangle
#endif
#ifdef HAVE_NTGUI
#include "w32gui.h"
typedef struct w32_display_info Display_Info;
+ typedef XImage *XImagePtr;
+ typedef HDC XImagePtr_or_DC;
#endif
#ifdef HAVE_CARBON
#include "macgui.h"
typedef struct mac_display_info Display_Info;
+ /* Mac equivalent of XImage. */
+ typedef Pixmap XImagePtr;
+ typedef XImagePtr XImagePtr_or_DC;
#endif
#ifndef NativeRectangle
***************
*** 2623,2631 ****
int lookup_image P_ ((struct frame *, Lisp_Object));
unsigned long image_background P_ ((struct image *, struct frame *,
! XImage *ximg));
int image_background_transparent P_ ((struct image *, struct frame *,
! XImage *mask));
#endif
--- 2630,2638 ----
int lookup_image P_ ((struct frame *, Lisp_Object));
unsigned long image_background P_ ((struct image *, struct frame *,
! XImagePtr_or_DC ximg));
int image_background_transparent P_ ((struct image *, struct frame *,
! XImagePtr_or_DC mask));
#endif
Index: src/image.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/image.c,v
retrieving revision 1.3
diff -c -r1.3 image.c
*** src/image.c 11 Mar 2004 05:56:41 -0000 1.3
--- src/image.c 11 Mar 2004 21:26:50 -0000
***************
*** 49,56 ****
#define COLOR_TABLE_SUPPORT 1
typedef struct x_bitmap_record Bitmap_Record;
- typedef XImage * XImagePtr;
- typedef XImagePtr XImagePtr_or_DC;
#define GET_PIXEL(ximg, x, y) XGetPixel(ximg, x, y)
#define NO_PIXMAP None
#define PNG_BG_COLOR_SHIFT 0
--- 49,54 ----
***************
*** 69,76 ****
#undef COLOR_TABLE_SUPPORT
typedef struct w32_bitmap_record Bitmap_Record;
- typedef XImage *XImagePtr;
- typedef HDC XImagePtr_or_DC;
#define GET_PIXEL(ximg, x, y) GetPixel(ximg, x, y)
#define NO_PIXMAP 0
#define PNG_BG_COLOR_SHIFT 0
--- 67,72 ----
***************
*** 103,114 ****
/* MAC_TODO : Color tables on Mac. */
#undef COLOR_TABLE_SUPPORT
- /* Mac equivalent of XImage. */
- typedef Pixmap XImagePtr;
#define ZPixmap 0 /* arbitrary */
typedef struct mac_bitmap_record Bitmap_Record;
- typedef XImagePtr XImagePtr_or_DC;
#define GET_PIXEL(ximg, x, y) XGetPixel(ximg, x, y)
#define NO_PIXMAP 0
#define PNG_BG_COLOR_SHIFT 8
--- 99,107 ----
Index: src/macfns.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/macfns.c,v
retrieving revision 1.30
diff -c -r1.30 macfns.c
*** src/macfns.c 11 Mar 2004 05:56:41 -0000 1.30
--- src/macfns.c 11 Mar 2004 21:26:59 -0000
***************
*** 172,192 ****
extern int mac_initialized;
- /* Functions in macterm.c. */
- extern void x_set_window_size (struct frame *, int, int, int);
- extern void x_make_frame_visible (struct frame *);
- extern struct mac_display_info *mac_term_init (Lisp_Object, char *, char *);
- extern struct font_info *x_get_font_info (FRAME_PTR, int);
- extern struct font_info *x_load_font (struct frame *, char *, int);
- extern void x_find_ccl_program (struct font_info *);
- extern struct font_info *x_query_font (struct frame *, char *);
- extern void mac_initialize ();
- extern Pixmap XCreatePixmap (Display *, WindowPtr, unsigned int, unsigned
int, unsigned int);
- extern Pixmap XCreatePixmapFromBitmapData (Display *, WindowPtr, char *,
unsigned int, unsigned int, unsigned long, unsigned long, unsigned int);
- extern void XFreePixmap (Display *, Pixmap);
- extern void XSetForeground (Display *, GC, unsigned long);
- extern void mac_draw_line_to_pixmap (Display *, Pixmap, GC, int, int, int,
int);
-
/* compare two strings ignoring case */
--- 172,177 ----
Index: src/macterm.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/macterm.c,v
retrieving revision 1.63
diff -c -r1.63 macterm.c
*** src/macterm.c 27 Feb 2004 23:47:13 -0000 1.63
--- src/macterm.c 11 Mar 2004 21:27:15 -0000
***************
*** 8262,8268 ****
{
Lisp_Object window;
- inev.kind = MOUSE_CLICK_EVENT;
XSETFRAME (inev.frame_or_window, mwp->mFP);
if (er.what == mouseDown)
mouse_tracking_in_progress
--- 8262,8267 ----
***************
*** 8285,8290 ****
--- 8284,8291 ----
);
break;
}
+ else
+ inev.kind = MOUSE_CLICK_EVENT;
}
#if USE_CARBON_EVENTS
Index: src/macterm.h
===================================================================
RCS file: /cvsroot/emacs/emacs/src/macterm.h,v
retrieving revision 1.12
diff -c -r1.12 macterm.h
*** src/macterm.h 11 Mar 2004 00:26:50 -0000 1.12
--- src/macterm.h 11 Mar 2004 21:27:17 -0000
***************
*** 240,245 ****
--- 240,251 ----
extern struct mac_display_info *mac_term_init ();
+ extern Lisp_Object x_list_fonts P_ ((struct frame *, Lisp_Object, int, int));
+ extern struct font_info *x_get_font_info P_ ((struct frame *f, int));
+ extern struct font_info *x_load_font P_ ((struct frame *, char *, int));
+ extern struct font_info *x_query_font P_ ((struct frame *, char *));
+ extern void x_find_ccl_program P_ ((struct font_info *));
+
/* When Emacs uses a tty window, tty_display in frame.c points to an
x_output struct . */
struct x_output
***************
*** 564,569 ****
--- 570,591 ----
void activate_scroll_bars (FRAME_PTR);
void deactivate_scroll_bars (FRAME_PTR);
+
+ /* Defined in macterm.c. */
+
+ extern void x_set_window_size P_ ((struct frame *, int, int, int));
+ extern void x_make_frame_visible P_ ((struct frame *));
+ extern void mac_initialize P_ ((void));
+ extern Pixmap XCreatePixmap P_ ((Display *, WindowPtr, unsigned int,
+ unsigned int, unsigned int));
+ extern Pixmap XCreatePixmapFromBitmapData P_ ((Display *, WindowPtr, char *,
+ unsigned int, unsigned int,
+ unsigned long, unsigned long,
+ unsigned int));
+ extern void XFreePixmap P_ ((Display *, Pixmap));
+ extern void XSetForeground P_ ((Display *, GC, unsigned long));
+ extern void mac_draw_line_to_pixmap P_ ((Display *, Pixmap, GC, int, int,
+ int, int));
#define FONT_TYPE_FOR_UNIBYTE(font, ch) 0
#define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0