aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGeoff Voelker1997-09-03 01:13:25 +0000
committerGeoff Voelker1997-09-03 01:13:25 +0000
commit8694f11b54030128f4a02c6497cb850c3e853a4a (patch)
treecccab161a5b68686d06e225c64fc1d4f46e07f0f /src
parent689004fa098a77e837676652eb658ddd5ac88674 (diff)
downloademacs-8694f11b54030128f4a02c6497cb850c3e853a4a.tar.gz
emacs-8694f11b54030128f4a02c6497cb850c3e853a4a.zip
(w32_output): New fields menubar_widget, menubar_active,
and pending_menu_activation. (VERTICAL_SCROLL_BAR_*): Use proportional scroll bar variables. (W32WindowPos): Delete definition. (WM_EMACS_SETFOCUS, WND_*_INDEX): New macros. (deferred_msg): New structure. (WM_MOUSEWHEEL): Define if not already defined. Necessary for pre VC5.0 distribution. (WM_EMACS_TRACKPOPUPMENU): New Macro.
Diffstat (limited to 'src')
-rw-r--r--src/w32term.h55
1 files changed, 39 insertions, 16 deletions
diff --git a/src/w32term.h b/src/w32term.h
index b6e7328cd40..c5372755c47 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -213,6 +213,9 @@ extern struct w32_display_info *w32_term_init ();
213 213
214struct w32_output 214struct w32_output
215{ 215{
216 /* Menubar "widget" handle. */
217 HMENU menubar_widget;
218
216 /* Original palette (used to deselect real palette after drawing) */ 219 /* Original palette (used to deselect real palette after drawing) */
217 HPALETTE old_palette; 220 HPALETTE old_palette;
218 221
@@ -312,6 +315,13 @@ struct w32_output
312 315
313 /* Nonzero means tried already to make this frame visible. */ 316 /* Nonzero means tried already to make this frame visible. */
314 char asked_for_visible; 317 char asked_for_visible;
318
319 /* Nonzero means menubar is currently active. */
320 char menubar_active;
321
322 /* Nonzero means menubar is about to become active, but should be
323 brought up to date first. */
324 volatile char pending_menu_activation;
315}; 325};
316 326
317/* Get at the computed faces of an X window frame. */ 327/* Get at the computed faces of an X window frame. */
@@ -462,11 +472,12 @@ struct scroll_bar {
462 inset the handle boundaries from the scroll bar edges. */ 472 inset the handle boundaries from the scroll bar edges. */
463#define VERTICAL_SCROLL_BAR_LEFT_BORDER (0) 473#define VERTICAL_SCROLL_BAR_LEFT_BORDER (0)
464#define VERTICAL_SCROLL_BAR_RIGHT_BORDER (0) 474#define VERTICAL_SCROLL_BAR_RIGHT_BORDER (0)
465#define VERTICAL_SCROLL_BAR_TOP_BORDER (0) 475#define VERTICAL_SCROLL_BAR_TOP_BORDER (vertical_scroll_bar_top_border)
466#define VERTICAL_SCROLL_BAR_BOTTOM_BORDER (0) 476#define VERTICAL_SCROLL_BAR_BOTTOM_BORDER (vertical_scroll_bar_bottom_border)
467 477
468/* Minimum lengths for scroll bar handles, in pixels. */ 478/* Minimum lengths for scroll bar handles, in pixels. */
469#define VERTICAL_SCROLL_BAR_MIN_HANDLE (0) 479#define VERTICAL_SCROLL_BAR_MIN_HANDLE (vertical_scroll_bar_min_handle)
480
470 481
471 482
472/* Manipulating pixel sizes and character sizes. 483/* Manipulating pixel sizes and character sizes.
@@ -577,6 +588,11 @@ w32_fill_area (f,hdc,f->output_data.w32->background_pixel,x,y,nx,ny)
577extern XFontStruct *w32_load_font (); 588extern XFontStruct *w32_load_font ();
578extern void w32_unload_font (); 589extern void w32_unload_font ();
579 590
591/* Define for earlier versions of Visual C */
592#ifndef WM_MOUSEWHEEL
593#define WM_MOUSEWHEEL (0x020A)
594#endif /* WM_MOUSEWHEEL */
595
580#define WM_EMACS_START (WM_USER + 1) 596#define WM_EMACS_START (WM_USER + 1)
581#define WM_EMACS_KILL (WM_EMACS_START + 0x00) 597#define WM_EMACS_KILL (WM_EMACS_START + 0x00)
582#define WM_EMACS_CREATEWINDOW (WM_EMACS_START + 0x01) 598#define WM_EMACS_CREATEWINDOW (WM_EMACS_START + 0x01)
@@ -585,22 +601,17 @@ extern void w32_unload_font ();
585#define WM_EMACS_SHOWWINDOW (WM_EMACS_START + 0x04) 601#define WM_EMACS_SHOWWINDOW (WM_EMACS_START + 0x04)
586#define WM_EMACS_SETWINDOWPOS (WM_EMACS_START + 0x05) 602#define WM_EMACS_SETWINDOWPOS (WM_EMACS_START + 0x05)
587#define WM_EMACS_DESTROYWINDOW (WM_EMACS_START + 0x06) 603#define WM_EMACS_DESTROYWINDOW (WM_EMACS_START + 0x06)
604#define WM_EMACS_TRACKPOPUPMENU (WM_EMACS_START + 0x07)
605#define WM_EMACS_SETFOCUS (WM_EMACS_START + 0x08)
588#define WM_EMACS_END (WM_EMACS_START + 0x10) 606#define WM_EMACS_END (WM_EMACS_START + 0x10)
589 607
590typedef struct { 608#define WND_FONTWIDTH_INDEX (0)
591 HWND hwndAfter; 609#define WND_LINEHEIGHT_INDEX (4)
592 int x; 610#define WND_BORDER_INDEX (8)
593 int y; 611#define WND_SCROLLBAR_INDEX (12)
594 int cx; 612#define WND_BACKGROUND_INDEX (16)
595 int cy; 613#define WND_LAST_INDEX (20)
596 int flags;
597} W32WindowPos;
598
599#define WND_X_UNITS_INDEX (0)
600#define WND_Y_UNITS_INDEX (4)
601#define WND_BACKGROUND_INDEX (8)
602 614
603#define WND_LAST_INDEX (16)
604#define WND_EXTRA_BYTES (WND_LAST_INDEX) 615#define WND_EXTRA_BYTES (WND_LAST_INDEX)
605 616
606extern DWORD dwWindowsThreadId; 617extern DWORD dwWindowsThreadId;
@@ -614,6 +625,17 @@ typedef struct W32Msg {
614 RECT rect; 625 RECT rect;
615} W32Msg; 626} W32Msg;
616 627
628/* Structure for recording message when input thread must return a
629 result that depends on lisp thread to compute. Lisp thread can
630 complete deferred messages out of order. */
631typedef struct deferred_msg
632{
633 struct deferred_msg * next;
634 W32Msg w32msg;
635 LRESULT result;
636 int completed;
637} deferred_msg;
638
617extern CRITICAL_SECTION critsect; 639extern CRITICAL_SECTION critsect;
618 640
619extern void init_crit (); 641extern void init_crit ();
@@ -629,6 +651,7 @@ extern int release_frame_dc (struct frame * f, HDC hDC);
629 651
630extern BOOL get_next_msg (); 652extern BOOL get_next_msg ();
631extern BOOL post_msg (); 653extern BOOL post_msg ();
654extern void complete_deferred_msg (HWND hwnd, UINT msg, LRESULT result);
632extern void wait_for_sync (); 655extern void wait_for_sync ();
633 656
634extern BOOL parse_button (); 657extern BOOL parse_button ();