Mercurial > emacs
changeset 19714:72fa0e75a0fe
(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.
author | Geoff Voelker <voelker@cs.washington.edu> |
---|---|
date | Wed, 03 Sep 1997 01:13:25 +0000 |
parents | 043ccce224fb |
children | 639881f2750d |
files | src/w32term.h |
diffstat | 1 files changed, 39 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/src/w32term.h Wed Sep 03 01:07:37 1997 +0000 +++ b/src/w32term.h Wed Sep 03 01:13:25 1997 +0000 @@ -213,6 +213,9 @@ struct w32_output { + /* Menubar "widget" handle. */ + HMENU menubar_widget; + /* Original palette (used to deselect real palette after drawing) */ HPALETTE old_palette; @@ -312,6 +315,13 @@ /* Nonzero means tried already to make this frame visible. */ char asked_for_visible; + + /* Nonzero means menubar is currently active. */ + char menubar_active; + + /* Nonzero means menubar is about to become active, but should be + brought up to date first. */ + volatile char pending_menu_activation; }; /* Get at the computed faces of an X window frame. */ @@ -462,11 +472,12 @@ inset the handle boundaries from the scroll bar edges. */ #define VERTICAL_SCROLL_BAR_LEFT_BORDER (0) #define VERTICAL_SCROLL_BAR_RIGHT_BORDER (0) -#define VERTICAL_SCROLL_BAR_TOP_BORDER (0) -#define VERTICAL_SCROLL_BAR_BOTTOM_BORDER (0) +#define VERTICAL_SCROLL_BAR_TOP_BORDER (vertical_scroll_bar_top_border) +#define VERTICAL_SCROLL_BAR_BOTTOM_BORDER (vertical_scroll_bar_bottom_border) /* Minimum lengths for scroll bar handles, in pixels. */ -#define VERTICAL_SCROLL_BAR_MIN_HANDLE (0) +#define VERTICAL_SCROLL_BAR_MIN_HANDLE (vertical_scroll_bar_min_handle) + /* Manipulating pixel sizes and character sizes. @@ -577,6 +588,11 @@ extern XFontStruct *w32_load_font (); extern void w32_unload_font (); +/* Define for earlier versions of Visual C */ +#ifndef WM_MOUSEWHEEL +#define WM_MOUSEWHEEL (0x020A) +#endif /* WM_MOUSEWHEEL */ + #define WM_EMACS_START (WM_USER + 1) #define WM_EMACS_KILL (WM_EMACS_START + 0x00) #define WM_EMACS_CREATEWINDOW (WM_EMACS_START + 0x01) @@ -585,22 +601,17 @@ #define WM_EMACS_SHOWWINDOW (WM_EMACS_START + 0x04) #define WM_EMACS_SETWINDOWPOS (WM_EMACS_START + 0x05) #define WM_EMACS_DESTROYWINDOW (WM_EMACS_START + 0x06) +#define WM_EMACS_TRACKPOPUPMENU (WM_EMACS_START + 0x07) +#define WM_EMACS_SETFOCUS (WM_EMACS_START + 0x08) #define WM_EMACS_END (WM_EMACS_START + 0x10) -typedef struct { - HWND hwndAfter; - int x; - int y; - int cx; - int cy; - int flags; -} W32WindowPos; +#define WND_FONTWIDTH_INDEX (0) +#define WND_LINEHEIGHT_INDEX (4) +#define WND_BORDER_INDEX (8) +#define WND_SCROLLBAR_INDEX (12) +#define WND_BACKGROUND_INDEX (16) +#define WND_LAST_INDEX (20) -#define WND_X_UNITS_INDEX (0) -#define WND_Y_UNITS_INDEX (4) -#define WND_BACKGROUND_INDEX (8) - -#define WND_LAST_INDEX (16) #define WND_EXTRA_BYTES (WND_LAST_INDEX) extern DWORD dwWindowsThreadId; @@ -614,6 +625,17 @@ RECT rect; } W32Msg; +/* Structure for recording message when input thread must return a + result that depends on lisp thread to compute. Lisp thread can + complete deferred messages out of order. */ +typedef struct deferred_msg +{ + struct deferred_msg * next; + W32Msg w32msg; + LRESULT result; + int completed; +} deferred_msg; + extern CRITICAL_SECTION critsect; extern void init_crit (); @@ -629,6 +651,7 @@ extern BOOL get_next_msg (); extern BOOL post_msg (); +extern void complete_deferred_msg (HWND hwnd, UINT msg, LRESULT result); extern void wait_for_sync (); extern BOOL parse_button ();