GNU Emacs is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Emacs is distributed in the hope that it will be useful,
#define WHITE_PIX_DEFAULT(f) PALETTERGB(255,255,255)
#define FONT_WIDTH(f) \
- ((f)->bdf ? (f)->bdf->width : (f)->tm.tmAveCharWidth)
+ ((f)->bdf ? (f)->bdf->width : (f)->tm.tmMaxCharWidth)
#define FONT_HEIGHT(f) \
((f)->bdf ? (f)->bdf->height : (f)->tm.tmHeight)
#define FONT_BASE(f) \
((f)->bdf ? (f)->bdf->ury : (f)->tm.tmAscent)
#define FONT_DESCENT(f) \
((f)->bdf ? -((f)->bdf->lly) : (f)->tm.tmDescent)
-#define FONT_MAX_WIDTH(f) \
- ((f)->bdf ? (f)->bdf->width : (f)->tm.tmMaxCharWidth)
+#define FONT_AVG_WIDTH(f) \
+ ((f)->bdf ? (f)->bdf->width : (f)->tm.tmAveCharWidth)
#define CP_DEFAULT 1004
/* Special pseudo-codepages. */
/* Chain of all w32_display_info structures. */
struct w32_display_info *next;
+ /* The generic display parameters corresponding to this w32 display. */
+ struct terminal *terminal;
+
/* This is a cons cell of the form (NAME . FONT-LIST-CACHE).
The same cons cell also appears in x_display_name_list. */
Lisp_Object name_list_element;
char *w32_id_name;
/* The number of fonts actually stored in w32_font_table.
- font_table[n] is used and valid iff 0 <= n < n_fonts. 0 <=
+ font_table[n] is used and valid if 0 <= n < n_fonts. 0 <=
n_fonts <= font_table_size. and font_table[i].name != 0. */
int n_fonts;
diffs between X and w32 code. */
struct x_output
{
+#if 0 /* These are also defined in struct frame. Use that instead. */
PIX_TYPE background_pixel;
PIX_TYPE foreground_pixel;
+#endif
/* Keep track of focus. May be EXPLICIT if we received a FocusIn for this
frame, or IMPLICIT if we received an EnterNotify.
/* Default ASCII font of this frame. */
XFontStruct *font;
+#ifdef USE_FONT_BACKEND
+ struct font *fontp;
+#endif /* USE_FONT_BACKEND */
+
/* The baseline offset of the default ASCII font. */
int baseline_offset;
#define FRAME_W32_WINDOW(f) ((f)->output_data.w32->window_desc)
#define FRAME_X_WINDOW(f) ((f)->output_data.w32->window_desc)
-#define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.x->foreground_pixel)
-#define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.x->background_pixel)
#define FRAME_FONT(f) ((f)->output_data.w32->font)
#define FRAME_FONTSET(f) ((f)->output_data.w32->fontset)
#define FRAME_BASELINE_OFFSET(f) ((f)->output_data.w32->baseline_offset)
+#ifdef USE_FONT_BACKEND
+#define FRAME_FONT_OBJECT(f) ((f)->output_data.w32->fontp)
+#endif /* USE_FONT_BACKEND */
+
/* This gives the w32_display_info structure for the display F is on. */
#define FRAME_W32_DISPLAY_INFO(f) (&one_w32_display_info)
#define FRAME_X_DISPLAY_INFO(f) (&one_w32_display_info)
place where the user grabbed it. If the handle isn't currently
being dragged, this is Qnil. */
Lisp_Object dragging;
+
+ /* t if the background of the fringe that is adjacent to a scroll
+ bar is extended to the gap between the fringe and the bar. */
+ Lisp_Object fringe_extended_p;
};
/* The number of elements a vector holding a struct scroll_bar needs. */
extern void w32_clear_window ();
#define w32_fill_area(f,hdc,pix,x,y,nx,ny) \
-{ \
+do { \
RECT rect; \
rect.left = x; \
rect.top = y; \
rect.right = x + nx; \
rect.bottom = y + ny; \
w32_fill_rect (f,hdc,pix,&rect); \
-}
+} while (0)
#define w32_clear_rect(f,hdc,lprect) \
-w32_fill_rect (f,hdc,f->output_data.x->background_pixel,lprect)
+ w32_fill_rect (f, hdc, FRAME_BACKGROUND_PIXEL (f), lprect)
#define w32_clear_area(f,hdc,px,py,nx,ny) \
-w32_fill_area (f,hdc,f->output_data.x->background_pixel,px,py,nx,ny)
+ w32_fill_area (f, hdc, FRAME_BACKGROUND_PIXEL (f), px, py, nx, ny)
extern struct font_info *w32_load_font ();
extern void w32_unload_font ();
#define WM_XBUTTONDOWN (WM_MOUSEWHEEL + 1)
#define WM_XBUTTONUP (WM_MOUSEWHEEL + 2)
#endif /* WM_XBUTTONDOWN */
+#ifndef WM_MOUSEHWHEEL
+#define WM_MOUSEHWHEEL (WM_MOUSEWHEEL + 4)
+#endif /* WM_MOUSEHWHEEL */
+#ifndef WM_APPCOMMAND
+#define WM_APPCOMMAND 0x319
+#define GET_APPCOMMAND_LPARAM(lParam) (HIWORD(lParam) & 0x7fff)
+#endif
#define WM_EMACS_START (WM_USER + 1)
#define WM_EMACS_KILL (WM_EMACS_START + 0)
extern BOOL parse_button ();
+extern void w32_sys_ring_bell (struct frame *f);
+extern void x_delete_display (struct w32_display_info *dpyinfo);
+
/* Keypad command key support. W32 doesn't have virtual keys defined
for the function keys on the keypad (they are mapped to the standard
fuction keys), so we define our own. */