1 /* Functions for the mswindows window system.
2 Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
3 Copyright (C) 1995, 1996 Ben Wing.
5 This file is part of XEmacs.
7 XEmacs is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 2, or (at your option) any
12 XEmacs is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 You should have received a copy of the GNU General Public License
18 along with XEmacs; see the file COPYING. If not, write to
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
22 /* Synched up with: Not synched with FSF. */
26 Ultimately based on FSF.
27 Substantially rewritten for XEmacs by Ben Wing.
28 Rewritten for mswindows by Jonathan Harris, November 1997 for 21.0.
35 #include "console-msw.h"
36 #include "glyphs-msw.h"
40 #include "redisplay.h"
43 #define MSWINDOWS_FRAME_STYLE (WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW)
44 #define MSWINDOWS_POPUP_STYLE (WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_POPUP \
45 | WS_CAPTION | WS_BORDER | WS_SYSMENU | WS_MINIMIZEBOX)
47 #define MSWINDOWS_FRAME_EXSTYLE WS_EX_OVERLAPPEDWINDOW
48 #define MSWINDOWS_POPUP_EXSTYLE WS_EX_PALETTEWINDOW
50 /* Default popup left top corner offset from the same
51 corner of the parent frame, in pixel */
52 #define POPUP_OFFSET 30
54 /* Default popup size, in characters */
55 #define POPUP_WIDTH 30
56 #define POPUP_HEIGHT 10
58 /* Default popup size, in characters */
59 #define DEFAULT_FRAME_WIDTH 80
60 #define DEFAULT_FRAME_HEIGHT 35
63 #define ADJR_MENUFLAG TRUE
65 #define ADJR_MENUFLAG FALSE
68 /* Default properties to use when creating frames. */
69 Lisp_Object Vdefault_mswindows_frame_plist;
70 Lisp_Object Vmswindows_use_system_frame_size_defaults;
72 /* This does not need to be GC protected, as it holds a
73 frame Lisp_Object already protected by Fmake_frame */
74 Lisp_Object Vmswindows_frame_being_created;
77 mswindows_init_frame_1 (struct frame *f, Lisp_Object props)
79 Lisp_Object initially_unmapped;
80 Lisp_Object name, height, width, popup, top, left;
81 Lisp_Object frame_obj = Qnil;
83 XEMACS_RECT_WH rect_default;
85 HWND hwnd, hwnd_parent;
87 /* Pick up relevant properties */
88 initially_unmapped = Fplist_get (props, Qinitially_unmapped, Qnil);
89 name = Fplist_get (props, Qname, Qnil);
91 popup = Fplist_get (props, Qpopup, Qnil);
93 popup = Fselected_frame (Qnil);
95 left = Fplist_get (props, Qleft, Qnil);
99 top = Fplist_get (props, Qtop, Qnil);
103 width = Fplist_get (props, Qwidth, Qnil);
107 height = Fplist_get (props, Qheight, Qnil);
111 f->frame_data = xnew_and_zero (struct mswindows_frame);
112 FRAME_MSWINDOWS_TARGET_RECT (f) = xnew_and_zero (XEMACS_RECT_WH);
114 FRAME_MSWINDOWS_TARGET_RECT (f)->left = NILP (left) ? -1 : abs (XINT (left));
115 FRAME_MSWINDOWS_TARGET_RECT (f)->top = NILP (top) ? -1 : abs (XINT (top));
116 FRAME_MSWINDOWS_TARGET_RECT (f)->width = NILP (width) ? -1 :
118 FRAME_MSWINDOWS_TARGET_RECT (f)->height = NILP (height) ? -1 :
121 /* Misc frame stuff */
122 FRAME_MSWINDOWS_DATA(f)->button2_need_lbutton = 0;
123 FRAME_MSWINDOWS_DATA(f)->button2_need_rbutton = 0;
124 FRAME_MSWINDOWS_DATA(f)->button2_is_down = 0;
125 FRAME_MSWINDOWS_DATA(f)->ignore_next_lbutton_up = 0;
126 FRAME_MSWINDOWS_DATA(f)->ignore_next_rbutton_up = 0;
127 FRAME_MSWINDOWS_DATA(f)->sizing = 0;
128 FRAME_MSWINDOWS_MENU_HASHTABLE(f) = Qnil;
130 FRAME_MSWINDOWS_TOOLBAR_HASHTABLE(f) = Fmake_hashtable (make_int (50),
134 /* Will initialize these in WM_SIZE handler. We cannot do it now,
135 because we do not know what is CW_USEDEFAULT height and width */
137 FRAME_HEIGHT (f) = 0;
138 FRAME_PIXWIDTH (f) = 0;
139 FRAME_PIXHEIGHT (f) = 0;
143 style = MSWINDOWS_FRAME_STYLE;
144 exstyle = MSWINDOWS_FRAME_EXSTYLE;
147 rect_default.left = rect_default.top = CW_USEDEFAULT;
148 rect_default.width = rect_default.height = CW_USEDEFAULT;
152 style = MSWINDOWS_POPUP_STYLE;
153 exstyle = MSWINDOWS_POPUP_EXSTYLE;
155 CHECK_MSWINDOWS_FRAME (popup);
156 hwnd_parent = FRAME_MSWINDOWS_HANDLE (XFRAME (popup));
157 assert (IsWindow (hwnd_parent));
159 /* We cannot use CW_USEDEFAULT when creating a popup window.
160 So by default, we offset the new popup 30 pixels right
161 and down from its parent, and give it size of 30x10 characters.
162 These dimensions look adequate on both high and low res monitors */
163 GetWindowRect (hwnd_parent, &rect);
164 rect_default.left = rect.left + POPUP_OFFSET;
165 rect_default.top = rect.top + POPUP_OFFSET;
166 char_to_real_pixel_size (f, POPUP_WIDTH, POPUP_HEIGHT,
167 &rect_default.width, &rect_default.height);
170 AdjustWindowRectEx(&rect, style, ADJR_MENUFLAG, exstyle);
172 XSETFRAME (frame_obj, f);
174 Vmswindows_frame_being_created = frame_obj;
176 hwnd = CreateWindowEx (exstyle,
178 STRINGP(f->name) ? XSTRING_DATA(f->name) :
179 (STRINGP(name) ? XSTRING_DATA(name) : XEMACS_CLASS),
181 rect_default.left, rect_default.top,
182 rect_default.width, rect_default.height,
183 hwnd_parent, NULL, NULL, NULL);
185 Vmswindows_frame_being_created = Qnil;
188 error ("System call to create frame failed");
190 FRAME_MSWINDOWS_HANDLE(f) = hwnd;
192 SetWindowLong (hwnd, XWL_FRAMEOBJ, (LONG)LISP_TO_VOID(frame_obj));
193 FRAME_MSWINDOWS_DC(f) = GetDC (hwnd);
194 FRAME_MSWINDOWS_CDC(f) = CreateCompatibleDC (FRAME_MSWINDOWS_CDC(f));
195 SetTextAlign (FRAME_MSWINDOWS_DC(f), TA_BASELINE | TA_LEFT | TA_NOUPDATECP);
199 mswindows_init_frame_2 (struct frame *f, Lisp_Object props)
201 if (NILP (Vmswindows_use_system_frame_size_defaults))
203 /* I don't think anything can set the frame size before this
204 since we don't have X resources. This may change if we look
205 at the registry. Even so these values can get overridden
207 XEMACS_RECT_WH dest = { -1, -1, DEFAULT_FRAME_WIDTH,
208 DEFAULT_FRAME_HEIGHT };
209 mswindows_size_frame_internal (f, &dest);
213 /* Called after frame's properties are set */
215 mswindows_init_frame_3 (struct frame *f)
217 /* Don't do this earlier or we get a WM_PAINT before the frame is ready.
218 * The SW_x parameter in the first call that an app makes to ShowWindow is
219 * ignored, and the parameter specified in the caller's STARTUPINFO is
220 * substituted instead. That parameter is SW_HIDE if we were started by
221 * runemacs, so call this twice. #### runemacs is evil */
222 ShowWindow (FRAME_MSWINDOWS_HANDLE(f), SW_SHOWNORMAL);
223 ShowWindow (FRAME_MSWINDOWS_HANDLE(f), SW_SHOWNORMAL);
224 SetForegroundWindow (FRAME_MSWINDOWS_HANDLE(f));
225 DragAcceptFiles (FRAME_MSWINDOWS_HANDLE(f), TRUE);
229 mswindows_after_init_frame (struct frame *f, int first_on_device,
230 int first_on_console)
232 /* Windows, unlike X, is very synchronous. After the initial
233 frame is created, it will never be displayed, except for
234 hollow border, unless we start pumping messages. Load progress
235 messages show in the bottom of the hollow frame, which is ugly.
236 We redipsplay the initial frame here, so modeline and root window
239 if (first_on_console)
244 mswindows_mark_frame (struct frame *f, void (*markobj) (Lisp_Object))
246 ((markobj) (FRAME_MSWINDOWS_MENU_HASHTABLE (f)));
248 ((markobj) (FRAME_MSWINDOWS_TOOLBAR_HASHTABLE (f)));
253 mswindows_focus_on_frame (struct frame *f)
255 SetForegroundWindow (FRAME_MSWINDOWS_HANDLE(f));
259 mswindows_delete_frame (struct frame *f)
263 DeleteDC(FRAME_MSWINDOWS_CDC(f));
264 ReleaseDC(FRAME_MSWINDOWS_HANDLE(f), FRAME_MSWINDOWS_DC(f));
265 DestroyWindow(FRAME_MSWINDOWS_HANDLE(f));
266 xfree (f->frame_data);
272 mswindows_set_frame_size (struct frame *f, int width, int height)
275 rect.left = rect.top = 0;
277 rect.bottom = height;
279 AdjustWindowRectEx (&rect,
280 GetWindowLong (FRAME_MSWINDOWS_HANDLE(f), GWL_STYLE),
281 GetMenu (FRAME_MSWINDOWS_HANDLE(f)) != NULL,
282 GetWindowLong (FRAME_MSWINDOWS_HANDLE(f), GWL_EXSTYLE));
284 if (IsIconic (FRAME_MSWINDOWS_HANDLE(f)) || IsZoomed (FRAME_MSWINDOWS_HANDLE(f)))
285 ShowWindow (FRAME_MSWINDOWS_HANDLE(f), SW_RESTORE);
287 SetWindowPos (FRAME_MSWINDOWS_HANDLE(f), NULL,
288 0, 0, rect.right-rect.left, rect.bottom-rect.top,
289 SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSENDCHANGING | SWP_NOMOVE);
293 mswindows_set_frame_position (struct frame *f, int xoff, int yoff)
295 SetWindowPos (FRAME_MSWINDOWS_HANDLE(f), NULL,
297 SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSENDCHANGING | SWP_NOSIZE);
301 mswindows_make_frame_visible (struct frame *f)
304 ShowWindow (FRAME_MSWINDOWS_HANDLE(f), SW_RESTORE);
306 ShowWindow (FRAME_MSWINDOWS_HANDLE(f), SW_SHOWNORMAL);
312 mswindows_make_frame_invisible (struct frame *f)
314 ShowWindow (FRAME_MSWINDOWS_HANDLE(f), SW_HIDE);
319 mswindows_frame_totally_visible_p (struct frame *f)
321 RECT rc_me, rc_other, rc_temp;
322 HWND hwnd = FRAME_MSWINDOWS_HANDLE(f);
324 /* We test against not a whole window rectangle, only agaist its
325 client part. So, if non-client are is covered and client area is
326 not, we return true. */
327 GetClientRect (hwnd, &rc_me);
328 MapWindowPoints (hwnd, HWND_DESKTOP, (LPPOINT)&rc_me, 2);
330 /* First see if we're off the desktop */
331 GetWindowRect (GetDesktopWindow(), &rc_other);
332 UnionRect(&rc_temp, &rc_me, &rc_other);
333 if (!EqualRect (&rc_temp, &rc_other))
336 /* Then see if any window above us obscures us */
337 while ((hwnd = GetWindow (hwnd, GW_HWNDPREV)) != NULL)
338 if (IsWindowVisible (hwnd))
340 GetWindowRect (hwnd, &rc_other);
341 if (IntersectRect(&rc_temp, &rc_me, &rc_other))
349 mswindows_frame_visible_p (struct frame *f)
351 return IsWindowVisible (FRAME_MSWINDOWS_HANDLE(f))
352 && !IsIconic (FRAME_MSWINDOWS_HANDLE(f));
357 mswindows_iconify_frame (struct frame *f)
359 ShowWindow (FRAME_MSWINDOWS_HANDLE(f), SW_MINIMIZE);
365 mswindows_frame_iconified_p (struct frame *f)
367 return IsIconic (FRAME_MSWINDOWS_HANDLE(f));
371 mswindows_set_frame_icon (struct frame *f)
373 if (IMAGE_INSTANCEP (f->icon)
374 && IMAGE_INSTANCE_PIXMAP_TYPE_P (XIMAGE_INSTANCE (f->icon)))
376 if (!XIMAGE_INSTANCE_MSWINDOWS_ICON (f->icon))
378 mswindows_initialize_image_instance_icon (XIMAGE_INSTANCE (f->icon),
382 SetClassLong (FRAME_MSWINDOWS_HANDLE (f), GCL_HICON,
383 (LONG) XIMAGE_INSTANCE_MSWINDOWS_ICON (f->icon));
388 mswindows_set_frame_pointer (struct frame *f)
390 if (IMAGE_INSTANCEP (f->pointer)
391 && IMAGE_INSTANCE_TYPE (XIMAGE_INSTANCE (f->pointer)) == IMAGE_POINTER)
393 SetClassLong (FRAME_MSWINDOWS_HANDLE (f), GCL_HCURSOR,
394 (LONG) XIMAGE_INSTANCE_MSWINDOWS_ICON (f->pointer));
399 mswindows_set_mouse_position (struct window *w, int x, int y)
401 struct frame *f = XFRAME (w->frame);
404 pt.x = w->pixel_left + x;
405 pt.y = w->pixel_top + y;
406 ClientToScreen (FRAME_MSWINDOWS_HANDLE(f), &pt);
407 SetCursorPos (pt.x, pt.y);
411 mswindows_get_mouse_position (struct device *d, Lisp_Object *frame, int *x, int *y)
418 /* What's under cursor? */
419 hwnd = WindowFromPoint (pt);
423 /* Get grandest parent of the window */
426 while ((hwnd_parent = GetParent (hwnd)) != NULL)
430 /* Make sure it belongs to us */
431 if (GetWindowThreadProcessId (hwnd, NULL) != GetCurrentThreadId ())
434 /* And that the window is an XEmacs frame */
436 char class_name [sizeof(XEMACS_CLASS) + 1];
437 if (!GetClassName (hwnd, class_name, sizeof(XEMACS_CLASS))
438 || strcmp (class_name, XEMACS_CLASS) != 0)
443 ScreenToClient (hwnd, &pt);
444 VOID_TO_LISP (*frame, GetWindowLong (hwnd, XWL_FRAMEOBJ));
451 mswindows_raise_frame (struct frame *f)
453 BringWindowToTop (FRAME_MSWINDOWS_HANDLE(f));
454 /* XXX Should we do SetWindowForeground too ? */
458 mswindows_lower_frame (struct frame *f)
460 SetWindowPos (FRAME_MSWINDOWS_HANDLE(f), HWND_BOTTOM, 0, 0, 0, 0,
461 SWP_NOSIZE | SWP_NOMOVE | SWP_NOSENDCHANGING);
465 mswindows_set_title_from_bufbyte (struct frame *f, Bufbyte *title)
467 unsigned int new_checksum = hash_string (title, strlen (title));
468 if (new_checksum != FRAME_MSWINDOWS_TITLE_CHECKSUM(f))
470 FRAME_MSWINDOWS_TITLE_CHECKSUM(f) = new_checksum;
471 SetWindowText (FRAME_MSWINDOWS_HANDLE(f), title);
476 mswindows_frame_property (struct frame *f, Lisp_Object property)
478 if (EQ (Qleft, property) || EQ (Qtop, property))
481 GetWindowRect (FRAME_MSWINDOWS_HANDLE(f), &rc);
482 return make_int (EQ (Qtop, property) ? rc.top : rc.left);
488 mswindows_internal_frame_property_p (struct frame *f, Lisp_Object property)
490 return EQ (property, Qleft)
491 || EQ (property, Qtop);
492 /* #### frame-x.c has also this. Why?
493 || STRINGP (property);
498 mswindows_frame_properties (struct frame *f)
500 Lisp_Object props = Qnil;
502 GetWindowRect (FRAME_MSWINDOWS_HANDLE(f), &rc);
504 props = cons3 (Qtop, make_int (rc.top), props);
505 props = cons3 (Qleft, make_int (rc.left), props);
511 mswindows_set_frame_properties (struct frame *f, Lisp_Object plist)
514 int width = -1, height = -1;
515 BOOL width_specified_p = FALSE;
516 BOOL height_specified_p = FALSE;
517 BOOL x_specified_p = FALSE;
518 BOOL y_specified_p = FALSE;
521 /* Extract the properties from plist */
522 for (tail = plist; !NILP (tail); tail = Fcdr (Fcdr (tail)))
524 Lisp_Object prop = Fcar (tail);
525 Lisp_Object val = Fcar (Fcdr (tail));
529 /* Kludge to handle the font property. */
530 if (EQ (prop, Qfont))
532 /* If the value is not a string we silently ignore it. */
535 Lisp_Object frm, font_spec;
538 font_spec = Fget (Fget_face (Qdefault), Qfont, Qnil);
540 Fadd_spec_to_specifier (font_spec, val, frm, Qnil, Qnil);
541 update_frame_face_values (f);
544 else if (EQ (prop, Qwidth))
548 width_specified_p = TRUE;
550 else if (EQ (prop, Qheight))
554 height_specified_p = TRUE;
556 else if (EQ (prop, Qleft))
560 x_specified_p = TRUE;
562 else if (EQ (prop, Qtop))
566 y_specified_p = TRUE;
571 /* Now we've extracted the properties, apply them.
572 Do not apply geometric properties during frame creation. This
573 is excessive anyways, and this loses becuase WM_SIZE has not
574 been sent yet, so frame width and height fields are not initialized.
576 unfortunately WM_SIZE loses as well since the resize is only
577 applied once and the first time WM_SIZE is applied not everything
578 is initialised in the frame (toolbars for instance). enabling
579 this always makes no visible difference and fixes a whole host of
580 bugs (and is more consistent with X) so I am going to reenable it.
582 if ( FRAME_PIXWIDTH (f) && FRAME_PIXHEIGHT (f)
583 && (width_specified_p || height_specified_p || x_specified_p || y_specified_p))
585 XEMACS_RECT_WH dest = { x, y, width, height };
587 mswindows_size_frame_internal (f, &dest);
591 void mswindows_size_frame_internal (struct frame* f, XEMACS_RECT_WH* dest)
594 int pixel_width, pixel_height;
595 int size_p = (dest->width >=0 || dest->height >=0);
596 int move_p = (dest->top >=0 || dest->left >=0);
598 char_to_real_pixel_size (f, dest->width, dest->height, &pixel_width, &pixel_height);
601 pixel_width = FRAME_PIXWIDTH (f);
602 if (dest->height < 0)
603 pixel_height = FRAME_PIXHEIGHT (f);
605 GetWindowRect (FRAME_MSWINDOWS_HANDLE(f), &rect);
607 dest->left = rect.left;
609 dest->top = rect.top;
611 rect.left = rect.top = 0;
612 rect.right = pixel_width;
613 rect.bottom = pixel_height;
615 AdjustWindowRectEx (&rect,
616 GetWindowLong (FRAME_MSWINDOWS_HANDLE(f), GWL_STYLE),
617 GetMenu (FRAME_MSWINDOWS_HANDLE(f)) != NULL,
618 GetWindowLong (FRAME_MSWINDOWS_HANDLE(f), GWL_EXSTYLE));
620 if (IsIconic (FRAME_MSWINDOWS_HANDLE(f))
621 || IsZoomed (FRAME_MSWINDOWS_HANDLE(f)))
622 ShowWindow (FRAME_MSWINDOWS_HANDLE(f), SW_RESTORE);
624 SetWindowPos (FRAME_MSWINDOWS_HANDLE(f), NULL,
625 dest->left, dest->top, rect.right - rect.left, rect.bottom - rect.top,
626 SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSENDCHANGING
627 | (size_p ? 0 : SWP_NOSIZE)
628 | (move_p ? 0 : SWP_NOMOVE));
632 mswindows_get_frame_parent (struct frame *f)
634 HWND hwnd = FRAME_MSWINDOWS_HANDLE(f);
635 hwnd = GetParent (hwnd);
639 VOID_TO_LISP (parent, GetWindowLong (hwnd, XWL_FRAMEOBJ));
640 assert (FRAME_MSWINDOWS_P (XFRAME (parent)));
648 mswindows_update_frame_external_traits (struct frame* frm, Lisp_Object name)
653 mswindows_frame_size_fixed_p (struct frame *f)
655 /* Frame size cannot change if the frame is maximized */
656 return IsZoomed (FRAME_MSWINDOWS_HANDLE (f));
660 console_type_create_frame_mswindows (void)
663 CONSOLE_HAS_METHOD (mswindows, init_frame_1);
664 CONSOLE_HAS_METHOD (mswindows, init_frame_2);
665 CONSOLE_HAS_METHOD (mswindows, init_frame_3);
666 CONSOLE_HAS_METHOD (mswindows, after_init_frame);
667 CONSOLE_HAS_METHOD (mswindows, mark_frame);
668 CONSOLE_HAS_METHOD (mswindows, focus_on_frame);
669 CONSOLE_HAS_METHOD (mswindows, delete_frame);
670 CONSOLE_HAS_METHOD (mswindows, get_mouse_position);
671 CONSOLE_HAS_METHOD (mswindows, set_mouse_position);
672 CONSOLE_HAS_METHOD (mswindows, raise_frame);
673 CONSOLE_HAS_METHOD (mswindows, lower_frame);
674 CONSOLE_HAS_METHOD (mswindows, make_frame_visible);
675 CONSOLE_HAS_METHOD (mswindows, make_frame_invisible);
676 CONSOLE_HAS_METHOD (mswindows, iconify_frame);
677 CONSOLE_HAS_METHOD (mswindows, set_frame_size);
678 CONSOLE_HAS_METHOD (mswindows, set_frame_position);
679 CONSOLE_HAS_METHOD (mswindows, frame_property);
680 CONSOLE_HAS_METHOD (mswindows, internal_frame_property_p);
681 CONSOLE_HAS_METHOD (mswindows, frame_properties);
682 CONSOLE_HAS_METHOD (mswindows, set_frame_properties);
683 CONSOLE_HAS_METHOD (mswindows, set_title_from_bufbyte);
684 /* CONSOLE_HAS_METHOD (mswindows, set_icon_name_from_bufbyte); */
685 CONSOLE_HAS_METHOD (mswindows, frame_visible_p);
686 CONSOLE_HAS_METHOD (mswindows, frame_totally_visible_p);
687 CONSOLE_HAS_METHOD (mswindows, frame_iconified_p);
688 CONSOLE_HAS_METHOD (mswindows, set_frame_pointer);
689 CONSOLE_HAS_METHOD (mswindows, set_frame_icon);
690 CONSOLE_HAS_METHOD (mswindows, get_frame_parent);
691 CONSOLE_HAS_METHOD (mswindows, update_frame_external_traits);
692 CONSOLE_HAS_METHOD (mswindows, frame_size_fixed_p);
696 syms_of_frame_mswindows (void)
701 vars_of_frame_mswindows (void)
703 /* Needn't staticpro -- see comment above. */
704 Vmswindows_frame_being_created = Qnil;
706 DEFVAR_LISP ("mswindows-use-system-frame-size-defaults", &Vmswindows_use_system_frame_size_defaults /*
707 Controls whether to use system or XEmacs defaults for frame size.
708 If nil then reasonable defaults are used for intial frame sizes. If t
709 then the system will choose default sizes for the frame.
711 Vmswindows_use_system_frame_size_defaults = Qnil;
713 DEFVAR_LISP ("default-mswindows-frame-plist", &Vdefault_mswindows_frame_plist /*
714 Plist of default frame-creation properties for mswindows frames.
715 These override what is specified in `default-frame-plist', but are
716 overridden by the arguments to the particular call to `make-frame'.
718 Note: In many cases, properties of a frame are available as specifiers
719 instead of through the frame-properties mechanism.
721 Here is a list of recognized frame properties, other than those
722 documented in `set-frame-properties' (they can be queried and
723 set at any time, except as otherwise noted):
725 initially-unmapped If non-nil, the frame will not be visible
726 when it is created. In this case, you
727 need to call `make-frame-visible' to make
729 popup If non-nil, it should be a frame, and this
730 frame will be created as a "popup" frame
731 whose parent is the given frame. This
732 will make the window manager treat the
733 frame as a dialog box, which may entail
734 doing different things (e.g. not asking
735 for positioning, and not iconifying
736 separate from its parent).
737 top Y position (in pixels) of the upper-left
738 outermost corner of the frame (i.e. the
739 upper-left of the window-manager
741 left X position (in pixels) of the upper-left
742 outermost corner of the frame (i.e. the
743 upper-left of the window-manager
746 See also `default-frame-plist', which specifies properties which apply
747 to all frames, not just mswindows frames.
749 Vdefault_mswindows_frame_plist = Qnil;
751 mswindows_console_methods->device_specific_frame_props =
752 &Vdefault_mswindows_frame_plist;