Mercurial > emacs
comparison src/w32fns.c @ 109179:8cfee7d2955f
Convert DEFUNs to standard C.
* src/alloc.c: Convert DEFUNs to standard C.
* src/buffer.c:
* src/bytecode.c:
* src/callint.c:
* src/callproc.c:
* src/casefiddle.c:
* src/casetab.c:
* src/category.c:
* src/character.c:
* src/charset.c:
* src/chartab.c:
* src/cmds.c:
* src/coding.c:
* src/composite.c:
* src/data.c:
* src/dbusbind.c:
* src/dired.c:
* src/dispnew.c:
* src/doc.c:
* src/dosfns.c:
* src/editfns.c:
* src/emacs.c:
* src/eval.c:
* src/fileio.c:
* src/filelock.c:
* src/floatfns.c:
* src/fns.c:
* src/font.c:
* src/fontset.c:
* src/frame.c:
* src/fringe.c:
* src/image.c:
* src/indent.c:
* src/insdel.c:
* src/keyboard.c:
* src/keymap.c:
* src/lread.c:
* src/macros.c:
* src/marker.c:
* src/menu.c:
* src/minibuf.c:
* src/msdos.c:
* src/nsfns.m:
* src/nsmenu.m:
* src/nsselect.m:
* src/print.c:
* src/process.c:
* src/search.c:
* src/sound.c:
* src/syntax.c:
* src/term.c:
* src/terminal.c:
* src/textprop.c:
* src/undo.c:
* src/w16select.c:
* src/w32console.c:
* src/w32fns.c:
* src/w32font.c:
* src/w32menu.c:
* src/w32proc.c:
* src/w32select.c:
* src/window.c:
* src/xdisp.c:
* src/xfaces.c:
* src/xfns.c:
* src/xmenu.c:
* src/xselect.c:
* src/xsettings.c:
* src/xsmfns.c: Likewise.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Thu, 08 Jul 2010 14:25:08 -0700 |
parents | 750db9f3e6d8 |
children | 60516122d066 |
comparison
equal
deleted
inserted
replaced
109178:53f8ebcd9a97 | 109179:8cfee7d2955f |
---|---|
473 Sw32_define_rgb_color, 4, 4, 0, | 473 Sw32_define_rgb_color, 4, 4, 0, |
474 doc: /* Convert RGB numbers to a Windows color reference and associate with NAME. | 474 doc: /* Convert RGB numbers to a Windows color reference and associate with NAME. |
475 This adds or updates a named color to `w32-color-map', making it | 475 This adds or updates a named color to `w32-color-map', making it |
476 available for use. The original entry's RGB ref is returned, or nil | 476 available for use. The original entry's RGB ref is returned, or nil |
477 if the entry is new. */) | 477 if the entry is new. */) |
478 (red, green, blue, name) | 478 (Lisp_Object red, Lisp_Object green, Lisp_Object blue, Lisp_Object name) |
479 Lisp_Object red, green, blue, name; | |
480 { | 479 { |
481 Lisp_Object rgb; | 480 Lisp_Object rgb; |
482 Lisp_Object oldrgb = Qnil; | 481 Lisp_Object oldrgb = Qnil; |
483 Lisp_Object entry; | 482 Lisp_Object entry; |
484 | 483 |
760 {"LightGreen" , PALETTERGB (144,238,144)}, | 759 {"LightGreen" , PALETTERGB (144,238,144)}, |
761 }; | 760 }; |
762 | 761 |
763 DEFUN ("w32-default-color-map", Fw32_default_color_map, Sw32_default_color_map, | 762 DEFUN ("w32-default-color-map", Fw32_default_color_map, Sw32_default_color_map, |
764 0, 0, 0, doc: /* Return the default color map. */) | 763 0, 0, 0, doc: /* Return the default color map. */) |
765 () | 764 (void) |
766 { | 765 { |
767 int i; | 766 int i; |
768 colormap_t *pc = w32_color_map; | 767 colormap_t *pc = w32_color_map; |
769 Lisp_Object cmap; | 768 Lisp_Object cmap; |
770 | 769 |
4189 and do not specify a specific minibuffer window to use, | 4188 and do not specify a specific minibuffer window to use, |
4190 then `default-minibuffer-frame' must be a frame whose minibuffer can | 4189 then `default-minibuffer-frame' must be a frame whose minibuffer can |
4191 be shared by the new frame. | 4190 be shared by the new frame. |
4192 | 4191 |
4193 This function is an internal primitive--use `make-frame' instead. */) | 4192 This function is an internal primitive--use `make-frame' instead. */) |
4194 (parameters) | 4193 (Lisp_Object parameters) |
4195 Lisp_Object parameters; | |
4196 { | 4194 { |
4197 struct frame *f; | 4195 struct frame *f; |
4198 Lisp_Object frame, tem; | 4196 Lisp_Object frame, tem; |
4199 Lisp_Object name; | 4197 Lisp_Object name; |
4200 int minibuffer_only = 0; | 4198 int minibuffer_only = 0; |
4518 return xfocus; | 4516 return xfocus; |
4519 } | 4517 } |
4520 | 4518 |
4521 DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0, | 4519 DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0, |
4522 doc: /* Give FRAME input focus, raising to foreground if necessary. */) | 4520 doc: /* Give FRAME input focus, raising to foreground if necessary. */) |
4523 (frame) | 4521 (Lisp_Object frame) |
4524 Lisp_Object frame; | |
4525 { | 4522 { |
4526 x_focus_on_frame (check_x_frame (frame)); | 4523 x_focus_on_frame (check_x_frame (frame)); |
4527 return Qnil; | 4524 return Qnil; |
4528 } | 4525 } |
4529 | 4526 |
4530 | 4527 |
4531 DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, | 4528 DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, |
4532 doc: /* Internal function called by `color-defined-p', which see. */) | 4529 doc: /* Internal function called by `color-defined-p', which see. */) |
4533 (color, frame) | 4530 (Lisp_Object color, Lisp_Object frame) |
4534 Lisp_Object color, frame; | |
4535 { | 4531 { |
4536 XColor foo; | 4532 XColor foo; |
4537 FRAME_PTR f = check_x_frame (frame); | 4533 FRAME_PTR f = check_x_frame (frame); |
4538 | 4534 |
4539 CHECK_STRING (color); | 4535 CHECK_STRING (color); |
4544 return Qnil; | 4540 return Qnil; |
4545 } | 4541 } |
4546 | 4542 |
4547 DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0, | 4543 DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0, |
4548 doc: /* Internal function called by `color-values', which see. */) | 4544 doc: /* Internal function called by `color-values', which see. */) |
4549 (color, frame) | 4545 (Lisp_Object color, Lisp_Object frame) |
4550 Lisp_Object color, frame; | |
4551 { | 4546 { |
4552 XColor foo; | 4547 XColor foo; |
4553 FRAME_PTR f = check_x_frame (frame); | 4548 FRAME_PTR f = check_x_frame (frame); |
4554 | 4549 |
4555 CHECK_STRING (color); | 4550 CHECK_STRING (color); |
4565 return Qnil; | 4560 return Qnil; |
4566 } | 4561 } |
4567 | 4562 |
4568 DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0, | 4563 DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0, |
4569 doc: /* Internal function called by `display-color-p', which see. */) | 4564 doc: /* Internal function called by `display-color-p', which see. */) |
4570 (display) | 4565 (Lisp_Object display) |
4571 Lisp_Object display; | |
4572 { | 4566 { |
4573 struct w32_display_info *dpyinfo = check_x_display_info (display); | 4567 struct w32_display_info *dpyinfo = check_x_display_info (display); |
4574 | 4568 |
4575 if ((dpyinfo->n_planes * dpyinfo->n_cbits) <= 2) | 4569 if ((dpyinfo->n_planes * dpyinfo->n_cbits) <= 2) |
4576 return Qnil; | 4570 return Qnil; |
4583 doc: /* Return t if DISPLAY supports shades of gray. | 4577 doc: /* Return t if DISPLAY supports shades of gray. |
4584 Note that color displays do support shades of gray. | 4578 Note that color displays do support shades of gray. |
4585 The optional argument DISPLAY specifies which display to ask about. | 4579 The optional argument DISPLAY specifies which display to ask about. |
4586 DISPLAY should be either a frame or a display name (a string). | 4580 DISPLAY should be either a frame or a display name (a string). |
4587 If omitted or nil, that stands for the selected frame's display. */) | 4581 If omitted or nil, that stands for the selected frame's display. */) |
4588 (display) | 4582 (Lisp_Object display) |
4589 Lisp_Object display; | |
4590 { | 4583 { |
4591 struct w32_display_info *dpyinfo = check_x_display_info (display); | 4584 struct w32_display_info *dpyinfo = check_x_display_info (display); |
4592 | 4585 |
4593 if ((dpyinfo->n_planes * dpyinfo->n_cbits) <= 1) | 4586 if ((dpyinfo->n_planes * dpyinfo->n_cbits) <= 1) |
4594 return Qnil; | 4587 return Qnil; |
4600 Sx_display_pixel_width, 0, 1, 0, | 4593 Sx_display_pixel_width, 0, 1, 0, |
4601 doc: /* Return the width in pixels of DISPLAY. | 4594 doc: /* Return the width in pixels of DISPLAY. |
4602 The optional argument DISPLAY specifies which display to ask about. | 4595 The optional argument DISPLAY specifies which display to ask about. |
4603 DISPLAY should be either a frame or a display name (a string). | 4596 DISPLAY should be either a frame or a display name (a string). |
4604 If omitted or nil, that stands for the selected frame's display. */) | 4597 If omitted or nil, that stands for the selected frame's display. */) |
4605 (display) | 4598 (Lisp_Object display) |
4606 Lisp_Object display; | |
4607 { | 4599 { |
4608 struct w32_display_info *dpyinfo = check_x_display_info (display); | 4600 struct w32_display_info *dpyinfo = check_x_display_info (display); |
4609 | 4601 |
4610 return make_number (x_display_pixel_width (dpyinfo)); | 4602 return make_number (x_display_pixel_width (dpyinfo)); |
4611 } | 4603 } |
4614 Sx_display_pixel_height, 0, 1, 0, | 4606 Sx_display_pixel_height, 0, 1, 0, |
4615 doc: /* Return the height in pixels of DISPLAY. | 4607 doc: /* Return the height in pixels of DISPLAY. |
4616 The optional argument DISPLAY specifies which display to ask about. | 4608 The optional argument DISPLAY specifies which display to ask about. |
4617 DISPLAY should be either a frame or a display name (a string). | 4609 DISPLAY should be either a frame or a display name (a string). |
4618 If omitted or nil, that stands for the selected frame's display. */) | 4610 If omitted or nil, that stands for the selected frame's display. */) |
4619 (display) | 4611 (Lisp_Object display) |
4620 Lisp_Object display; | |
4621 { | 4612 { |
4622 struct w32_display_info *dpyinfo = check_x_display_info (display); | 4613 struct w32_display_info *dpyinfo = check_x_display_info (display); |
4623 | 4614 |
4624 return make_number (x_display_pixel_height (dpyinfo)); | 4615 return make_number (x_display_pixel_height (dpyinfo)); |
4625 } | 4616 } |
4628 0, 1, 0, | 4619 0, 1, 0, |
4629 doc: /* Return the number of bitplanes of DISPLAY. | 4620 doc: /* Return the number of bitplanes of DISPLAY. |
4630 The optional argument DISPLAY specifies which display to ask about. | 4621 The optional argument DISPLAY specifies which display to ask about. |
4631 DISPLAY should be either a frame or a display name (a string). | 4622 DISPLAY should be either a frame or a display name (a string). |
4632 If omitted or nil, that stands for the selected frame's display. */) | 4623 If omitted or nil, that stands for the selected frame's display. */) |
4633 (display) | 4624 (Lisp_Object display) |
4634 Lisp_Object display; | |
4635 { | 4625 { |
4636 struct w32_display_info *dpyinfo = check_x_display_info (display); | 4626 struct w32_display_info *dpyinfo = check_x_display_info (display); |
4637 | 4627 |
4638 return make_number (dpyinfo->n_planes * dpyinfo->n_cbits); | 4628 return make_number (dpyinfo->n_planes * dpyinfo->n_cbits); |
4639 } | 4629 } |
4642 0, 1, 0, | 4632 0, 1, 0, |
4643 doc: /* Return the number of color cells of DISPLAY. | 4633 doc: /* Return the number of color cells of DISPLAY. |
4644 The optional argument DISPLAY specifies which display to ask about. | 4634 The optional argument DISPLAY specifies which display to ask about. |
4645 DISPLAY should be either a frame or a display name (a string). | 4635 DISPLAY should be either a frame or a display name (a string). |
4646 If omitted or nil, that stands for the selected frame's display. */) | 4636 If omitted or nil, that stands for the selected frame's display. */) |
4647 (display) | 4637 (Lisp_Object display) |
4648 Lisp_Object display; | |
4649 { | 4638 { |
4650 struct w32_display_info *dpyinfo = check_x_display_info (display); | 4639 struct w32_display_info *dpyinfo = check_x_display_info (display); |
4651 HDC hdc; | 4640 HDC hdc; |
4652 int cap; | 4641 int cap; |
4653 | 4642 |
4672 0, 1, 0, | 4661 0, 1, 0, |
4673 doc: /* Return the maximum request size of the server of DISPLAY. | 4662 doc: /* Return the maximum request size of the server of DISPLAY. |
4674 The optional argument DISPLAY specifies which display to ask about. | 4663 The optional argument DISPLAY specifies which display to ask about. |
4675 DISPLAY should be either a frame or a display name (a string). | 4664 DISPLAY should be either a frame or a display name (a string). |
4676 If omitted or nil, that stands for the selected frame's display. */) | 4665 If omitted or nil, that stands for the selected frame's display. */) |
4677 (display) | 4666 (Lisp_Object display) |
4678 Lisp_Object display; | |
4679 { | 4667 { |
4680 struct w32_display_info *dpyinfo = check_x_display_info (display); | 4668 struct w32_display_info *dpyinfo = check_x_display_info (display); |
4681 | 4669 |
4682 return make_number (1); | 4670 return make_number (1); |
4683 } | 4671 } |
4685 DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0, | 4673 DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0, |
4686 doc: /* Return the "vendor ID" string of the W32 system (Microsoft). | 4674 doc: /* Return the "vendor ID" string of the W32 system (Microsoft). |
4687 The optional argument DISPLAY specifies which display to ask about. | 4675 The optional argument DISPLAY specifies which display to ask about. |
4688 DISPLAY should be either a frame or a display name (a string). | 4676 DISPLAY should be either a frame or a display name (a string). |
4689 If omitted or nil, that stands for the selected frame's display. */) | 4677 If omitted or nil, that stands for the selected frame's display. */) |
4690 (display) | 4678 (Lisp_Object display) |
4691 Lisp_Object display; | |
4692 { | 4679 { |
4693 return build_string ("Microsoft Corp."); | 4680 return build_string ("Microsoft Corp."); |
4694 } | 4681 } |
4695 | 4682 |
4696 DEFUN ("x-server-version", Fx_server_version, Sx_server_version, 0, 1, 0, | 4683 DEFUN ("x-server-version", Fx_server_version, Sx_server_version, 0, 1, 0, |
4700 release number. See also the function `x-server-vendor'. | 4687 release number. See also the function `x-server-vendor'. |
4701 | 4688 |
4702 The optional argument DISPLAY specifies which display to ask about. | 4689 The optional argument DISPLAY specifies which display to ask about. |
4703 DISPLAY should be either a frame or a display name (a string). | 4690 DISPLAY should be either a frame or a display name (a string). |
4704 If omitted or nil, that stands for the selected frame's display. */) | 4691 If omitted or nil, that stands for the selected frame's display. */) |
4705 (display) | 4692 (Lisp_Object display) |
4706 Lisp_Object display; | |
4707 { | 4693 { |
4708 return Fcons (make_number (w32_major_version), | 4694 return Fcons (make_number (w32_major_version), |
4709 Fcons (make_number (w32_minor_version), | 4695 Fcons (make_number (w32_minor_version), |
4710 Fcons (make_number (w32_build_number), Qnil))); | 4696 Fcons (make_number (w32_build_number), Qnil))); |
4711 } | 4697 } |
4713 DEFUN ("x-display-screens", Fx_display_screens, Sx_display_screens, 0, 1, 0, | 4699 DEFUN ("x-display-screens", Fx_display_screens, Sx_display_screens, 0, 1, 0, |
4714 doc: /* Return the number of screens on the server of DISPLAY. | 4700 doc: /* Return the number of screens on the server of DISPLAY. |
4715 The optional argument DISPLAY specifies which display to ask about. | 4701 The optional argument DISPLAY specifies which display to ask about. |
4716 DISPLAY should be either a frame or a display name (a string). | 4702 DISPLAY should be either a frame or a display name (a string). |
4717 If omitted or nil, that stands for the selected frame's display. */) | 4703 If omitted or nil, that stands for the selected frame's display. */) |
4718 (display) | 4704 (Lisp_Object display) |
4719 Lisp_Object display; | |
4720 { | 4705 { |
4721 return make_number (1); | 4706 return make_number (1); |
4722 } | 4707 } |
4723 | 4708 |
4724 DEFUN ("x-display-mm-height", Fx_display_mm_height, | 4709 DEFUN ("x-display-mm-height", Fx_display_mm_height, |
4725 Sx_display_mm_height, 0, 1, 0, | 4710 Sx_display_mm_height, 0, 1, 0, |
4726 doc: /* Return the height in millimeters of DISPLAY. | 4711 doc: /* Return the height in millimeters of DISPLAY. |
4727 The optional argument DISPLAY specifies which display to ask about. | 4712 The optional argument DISPLAY specifies which display to ask about. |
4728 DISPLAY should be either a frame or a display name (a string). | 4713 DISPLAY should be either a frame or a display name (a string). |
4729 If omitted or nil, that stands for the selected frame's display. */) | 4714 If omitted or nil, that stands for the selected frame's display. */) |
4730 (display) | 4715 (Lisp_Object display) |
4731 Lisp_Object display; | |
4732 { | 4716 { |
4733 struct w32_display_info *dpyinfo = check_x_display_info (display); | 4717 struct w32_display_info *dpyinfo = check_x_display_info (display); |
4734 HDC hdc; | 4718 HDC hdc; |
4735 int cap; | 4719 int cap; |
4736 | 4720 |
4746 DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0, | 4730 DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0, |
4747 doc: /* Return the width in millimeters of DISPLAY. | 4731 doc: /* Return the width in millimeters of DISPLAY. |
4748 The optional argument DISPLAY specifies which display to ask about. | 4732 The optional argument DISPLAY specifies which display to ask about. |
4749 DISPLAY should be either a frame or a display name (a string). | 4733 DISPLAY should be either a frame or a display name (a string). |
4750 If omitted or nil, that stands for the selected frame's display. */) | 4734 If omitted or nil, that stands for the selected frame's display. */) |
4751 (display) | 4735 (Lisp_Object display) |
4752 Lisp_Object display; | |
4753 { | 4736 { |
4754 struct w32_display_info *dpyinfo = check_x_display_info (display); | 4737 struct w32_display_info *dpyinfo = check_x_display_info (display); |
4755 | 4738 |
4756 HDC hdc; | 4739 HDC hdc; |
4757 int cap; | 4740 int cap; |
4770 doc: /* Return an indication of whether DISPLAY does backing store. | 4753 doc: /* Return an indication of whether DISPLAY does backing store. |
4771 The value may be `always', `when-mapped', or `not-useful'. | 4754 The value may be `always', `when-mapped', or `not-useful'. |
4772 The optional argument DISPLAY specifies which display to ask about. | 4755 The optional argument DISPLAY specifies which display to ask about. |
4773 DISPLAY should be either a frame or a display name (a string). | 4756 DISPLAY should be either a frame or a display name (a string). |
4774 If omitted or nil, that stands for the selected frame's display. */) | 4757 If omitted or nil, that stands for the selected frame's display. */) |
4775 (display) | 4758 (Lisp_Object display) |
4776 Lisp_Object display; | |
4777 { | 4759 { |
4778 return intern ("not-useful"); | 4760 return intern ("not-useful"); |
4779 } | 4761 } |
4780 | 4762 |
4781 DEFUN ("x-display-visual-class", Fx_display_visual_class, | 4763 DEFUN ("x-display-visual-class", Fx_display_visual_class, |
4785 `static-color', `pseudo-color', `true-color', or `direct-color'. | 4767 `static-color', `pseudo-color', `true-color', or `direct-color'. |
4786 | 4768 |
4787 The optional argument DISPLAY specifies which display to ask about. | 4769 The optional argument DISPLAY specifies which display to ask about. |
4788 DISPLAY should be either a frame or a display name (a string). | 4770 DISPLAY should be either a frame or a display name (a string). |
4789 If omitted or nil, that stands for the selected frame's display. */) | 4771 If omitted or nil, that stands for the selected frame's display. */) |
4790 (display) | 4772 (Lisp_Object display) |
4791 Lisp_Object display; | |
4792 { | 4773 { |
4793 struct w32_display_info *dpyinfo = check_x_display_info (display); | 4774 struct w32_display_info *dpyinfo = check_x_display_info (display); |
4794 Lisp_Object result = Qnil; | 4775 Lisp_Object result = Qnil; |
4795 | 4776 |
4796 if (dpyinfo->has_palette) | 4777 if (dpyinfo->has_palette) |
4809 Sx_display_save_under, 0, 1, 0, | 4790 Sx_display_save_under, 0, 1, 0, |
4810 doc: /* Return t if DISPLAY supports the save-under feature. | 4791 doc: /* Return t if DISPLAY supports the save-under feature. |
4811 The optional argument DISPLAY specifies which display to ask about. | 4792 The optional argument DISPLAY specifies which display to ask about. |
4812 DISPLAY should be either a frame or a display name (a string). | 4793 DISPLAY should be either a frame or a display name (a string). |
4813 If omitted or nil, that stands for the selected frame's display. */) | 4794 If omitted or nil, that stands for the selected frame's display. */) |
4814 (display) | 4795 (Lisp_Object display) |
4815 Lisp_Object display; | |
4816 { | 4796 { |
4817 return Qnil; | 4797 return Qnil; |
4818 } | 4798 } |
4819 | 4799 |
4820 int | 4800 int |
4889 1, 3, 0, doc: /* Open a connection to a server. | 4869 1, 3, 0, doc: /* Open a connection to a server. |
4890 DISPLAY is the name of the display to connect to. | 4870 DISPLAY is the name of the display to connect to. |
4891 Optional second arg XRM-STRING is a string of resources in xrdb format. | 4871 Optional second arg XRM-STRING is a string of resources in xrdb format. |
4892 If the optional third arg MUST-SUCCEED is non-nil, | 4872 If the optional third arg MUST-SUCCEED is non-nil, |
4893 terminate Emacs if we can't open the connection. */) | 4873 terminate Emacs if we can't open the connection. */) |
4894 (display, xrm_string, must_succeed) | 4874 (Lisp_Object display, Lisp_Object xrm_string, Lisp_Object must_succeed) |
4895 Lisp_Object display, xrm_string, must_succeed; | |
4896 { | 4875 { |
4897 unsigned char *xrm_option; | 4876 unsigned char *xrm_option; |
4898 struct w32_display_info *dpyinfo; | 4877 struct w32_display_info *dpyinfo; |
4899 | 4878 |
4900 /* If initialization has already been done, return now to avoid | 4879 /* If initialization has already been done, return now to avoid |
4978 DEFUN ("x-close-connection", Fx_close_connection, | 4957 DEFUN ("x-close-connection", Fx_close_connection, |
4979 Sx_close_connection, 1, 1, 0, | 4958 Sx_close_connection, 1, 1, 0, |
4980 doc: /* Close the connection to DISPLAY's server. | 4959 doc: /* Close the connection to DISPLAY's server. |
4981 For DISPLAY, specify either a frame or a display name (a string). | 4960 For DISPLAY, specify either a frame or a display name (a string). |
4982 If DISPLAY is nil, that stands for the selected frame's display. */) | 4961 If DISPLAY is nil, that stands for the selected frame's display. */) |
4983 (display) | 4962 (Lisp_Object display) |
4984 Lisp_Object display; | |
4985 { | 4963 { |
4986 struct w32_display_info *dpyinfo = check_x_display_info (display); | 4964 struct w32_display_info *dpyinfo = check_x_display_info (display); |
4987 int i; | 4965 int i; |
4988 | 4966 |
4989 if (dpyinfo->reference_count > 0) | 4967 if (dpyinfo->reference_count > 0) |
4998 return Qnil; | 4976 return Qnil; |
4999 } | 4977 } |
5000 | 4978 |
5001 DEFUN ("x-display-list", Fx_display_list, Sx_display_list, 0, 0, 0, | 4979 DEFUN ("x-display-list", Fx_display_list, Sx_display_list, 0, 0, 0, |
5002 doc: /* Return the list of display names that Emacs has connections to. */) | 4980 doc: /* Return the list of display names that Emacs has connections to. */) |
5003 () | 4981 (void) |
5004 { | 4982 { |
5005 Lisp_Object tail, result; | 4983 Lisp_Object tail, result; |
5006 | 4984 |
5007 result = Qnil; | 4985 result = Qnil; |
5008 for (tail = w32_display_name_list; CONSP (tail); tail = XCDR (tail)) | 4986 for (tail = w32_display_name_list; CONSP (tail); tail = XCDR (tail)) |
5011 return result; | 4989 return result; |
5012 } | 4990 } |
5013 | 4991 |
5014 DEFUN ("x-synchronize", Fx_synchronize, Sx_synchronize, 1, 2, 0, | 4992 DEFUN ("x-synchronize", Fx_synchronize, Sx_synchronize, 1, 2, 0, |
5015 doc: /* This is a noop on W32 systems. */) | 4993 doc: /* This is a noop on W32 systems. */) |
5016 (on, display) | 4994 (Lisp_Object on, Lisp_Object display) |
5017 Lisp_Object display, on; | |
5018 { | 4995 { |
5019 return Qnil; | 4996 return Qnil; |
5020 } | 4997 } |
5021 | 4998 |
5022 | 4999 |
5041 If VALUE is a string or FORMAT is nil or not given, FORMAT defaults to 8. | 5018 If VALUE is a string or FORMAT is nil or not given, FORMAT defaults to 8. |
5042 If OUTER_P is non-nil, the property is changed for the outer X window of | 5019 If OUTER_P is non-nil, the property is changed for the outer X window of |
5043 FRAME. Default is to change on the edit X window. | 5020 FRAME. Default is to change on the edit X window. |
5044 | 5021 |
5045 Value is VALUE. */) | 5022 Value is VALUE. */) |
5046 (prop, value, frame, type, format, outer_p) | 5023 (Lisp_Object prop, Lisp_Object value, Lisp_Object frame, Lisp_Object type, Lisp_Object format, Lisp_Object outer_p) |
5047 Lisp_Object prop, value, frame, type, format, outer_p; | |
5048 { | 5024 { |
5049 #if 0 /* TODO : port window properties to W32 */ | 5025 #if 0 /* TODO : port window properties to W32 */ |
5050 struct frame *f = check_x_frame (frame); | 5026 struct frame *f = check_x_frame (frame); |
5051 Atom prop_atom; | 5027 Atom prop_atom; |
5052 | 5028 |
5071 | 5047 |
5072 DEFUN ("x-delete-window-property", Fx_delete_window_property, | 5048 DEFUN ("x-delete-window-property", Fx_delete_window_property, |
5073 Sx_delete_window_property, 1, 2, 0, | 5049 Sx_delete_window_property, 1, 2, 0, |
5074 doc: /* Remove window property PROP from X window of FRAME. | 5050 doc: /* Remove window property PROP from X window of FRAME. |
5075 FRAME nil or omitted means use the selected frame. Value is PROP. */) | 5051 FRAME nil or omitted means use the selected frame. Value is PROP. */) |
5076 (prop, frame) | 5052 (Lisp_Object prop, Lisp_Object frame) |
5077 Lisp_Object prop, frame; | |
5078 { | 5053 { |
5079 #if 0 /* TODO : port window properties to W32 */ | 5054 #if 0 /* TODO : port window properties to W32 */ |
5080 | 5055 |
5081 struct frame *f = check_x_frame (frame); | 5056 struct frame *f = check_x_frame (frame); |
5082 Atom prop_atom; | 5057 Atom prop_atom; |
5099 1, 2, 0, | 5074 1, 2, 0, |
5100 doc: /* Value is the value of window property PROP on FRAME. | 5075 doc: /* Value is the value of window property PROP on FRAME. |
5101 If FRAME is nil or omitted, use the selected frame. Value is nil | 5076 If FRAME is nil or omitted, use the selected frame. Value is nil |
5102 if FRAME hasn't a property with name PROP or if PROP has no string | 5077 if FRAME hasn't a property with name PROP or if PROP has no string |
5103 value. */) | 5078 value. */) |
5104 (prop, frame) | 5079 (Lisp_Object prop, Lisp_Object frame) |
5105 Lisp_Object prop, frame; | |
5106 { | 5080 { |
5107 #if 0 /* TODO : port window properties to W32 */ | 5081 #if 0 /* TODO : port window properties to W32 */ |
5108 | 5082 |
5109 struct frame *f = check_x_frame (frame); | 5083 struct frame *f = check_x_frame (frame); |
5110 Atom prop_atom; | 5084 Atom prop_atom; |
5668 window, otherwise it is displayed at the mouse position, with offset | 5642 window, otherwise it is displayed at the mouse position, with offset |
5669 DY added (default is -10). | 5643 DY added (default is -10). |
5670 | 5644 |
5671 A tooltip's maximum size is specified by `x-max-tooltip-size'. | 5645 A tooltip's maximum size is specified by `x-max-tooltip-size'. |
5672 Text larger than the specified size is clipped. */) | 5646 Text larger than the specified size is clipped. */) |
5673 (string, frame, parms, timeout, dx, dy) | 5647 (Lisp_Object string, Lisp_Object frame, Lisp_Object parms, Lisp_Object timeout, Lisp_Object dx, Lisp_Object dy) |
5674 Lisp_Object string, frame, parms, timeout, dx, dy; | |
5675 { | 5648 { |
5676 struct frame *f; | 5649 struct frame *f; |
5677 struct window *w; | 5650 struct window *w; |
5678 int root_x, root_y; | 5651 int root_x, root_y; |
5679 struct buffer *old_buffer; | 5652 struct buffer *old_buffer; |
5898 | 5871 |
5899 | 5872 |
5900 DEFUN ("x-hide-tip", Fx_hide_tip, Sx_hide_tip, 0, 0, 0, | 5873 DEFUN ("x-hide-tip", Fx_hide_tip, Sx_hide_tip, 0, 0, 0, |
5901 doc: /* Hide the current tooltip window, if there is any. | 5874 doc: /* Hide the current tooltip window, if there is any. |
5902 Value is t if tooltip was open, nil otherwise. */) | 5875 Value is t if tooltip was open, nil otherwise. */) |
5903 () | 5876 (void) |
5904 { | 5877 { |
5905 int count; | 5878 int count; |
5906 Lisp_Object deleted, frame, timer; | 5879 Lisp_Object deleted, frame, timer; |
5907 struct gcpro gcpro1, gcpro2; | 5880 struct gcpro gcpro1, gcpro2; |
5908 | 5881 |
5994 doc: /* Read file name, prompting with PROMPT in directory DIR. | 5967 doc: /* Read file name, prompting with PROMPT in directory DIR. |
5995 Use a file selection dialog. | 5968 Use a file selection dialog. |
5996 Select DEFAULT-FILENAME in the dialog's file selection box, if | 5969 Select DEFAULT-FILENAME in the dialog's file selection box, if |
5997 specified. Ensure that file exists if MUSTMATCH is non-nil. | 5970 specified. Ensure that file exists if MUSTMATCH is non-nil. |
5998 If ONLY-DIR-P is non-nil, the user can only select directories. */) | 5971 If ONLY-DIR-P is non-nil, the user can only select directories. */) |
5999 (prompt, dir, default_filename, mustmatch, only_dir_p) | 5972 (Lisp_Object prompt, Lisp_Object dir, Lisp_Object default_filename, Lisp_Object mustmatch, Lisp_Object only_dir_p) |
6000 Lisp_Object prompt, dir, default_filename, mustmatch, only_dir_p; | |
6001 { | 5973 { |
6002 struct frame *f = SELECTED_FRAME (); | 5974 struct frame *f = SELECTED_FRAME (); |
6003 Lisp_Object file = Qnil; | 5975 Lisp_Object file = Qnil; |
6004 int count = SPECPDL_INDEX (); | 5976 int count = SPECPDL_INDEX (); |
6005 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6; | 5977 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6; |
6123 /* Moving files to the system recycle bin. | 6095 /* Moving files to the system recycle bin. |
6124 Used by `move-file-to-trash' instead of the default moving to ~/.Trash */ | 6096 Used by `move-file-to-trash' instead of the default moving to ~/.Trash */ |
6125 DEFUN ("system-move-file-to-trash", Fsystem_move_file_to_trash, | 6097 DEFUN ("system-move-file-to-trash", Fsystem_move_file_to_trash, |
6126 Ssystem_move_file_to_trash, 1, 1, 0, | 6098 Ssystem_move_file_to_trash, 1, 1, 0, |
6127 doc: /* Move file or directory named FILENAME to the recycle bin. */) | 6099 doc: /* Move file or directory named FILENAME to the recycle bin. */) |
6128 (filename) | 6100 (Lisp_Object filename) |
6129 Lisp_Object filename; | |
6130 { | 6101 { |
6131 Lisp_Object handler; | 6102 Lisp_Object handler; |
6132 Lisp_Object encoded_file; | 6103 Lisp_Object encoded_file; |
6133 Lisp_Object operation; | 6104 Lisp_Object operation; |
6134 | 6105 |
6186 to minimize), #xf120 to restore frame to original size, and #xf100 | 6157 to minimize), #xf120 to restore frame to original size, and #xf100 |
6187 to activate the menubar for keyboard access. #xf140 activates the | 6158 to activate the menubar for keyboard access. #xf140 activates the |
6188 screen saver if defined. | 6159 screen saver if defined. |
6189 | 6160 |
6190 If optional parameter FRAME is not specified, use selected frame. */) | 6161 If optional parameter FRAME is not specified, use selected frame. */) |
6191 (command, frame) | 6162 (Lisp_Object command, Lisp_Object frame) |
6192 Lisp_Object command, frame; | |
6193 { | 6163 { |
6194 FRAME_PTR f = check_x_frame (frame); | 6164 FRAME_PTR f = check_x_frame (frame); |
6195 | 6165 |
6196 CHECK_NUMBER (command); | 6166 CHECK_NUMBER (command); |
6197 | 6167 |
6240 | 6210 |
6241 0 - start hidden | 6211 0 - start hidden |
6242 1 - start normally | 6212 1 - start normally |
6243 3 - start maximized | 6213 3 - start maximized |
6244 6 - start minimized */) | 6214 6 - start minimized */) |
6245 (operation, document, parameters, show_flag) | 6215 (Lisp_Object operation, Lisp_Object document, Lisp_Object parameters, Lisp_Object show_flag) |
6246 Lisp_Object operation, document, parameters, show_flag; | |
6247 { | 6216 { |
6248 Lisp_Object current_dir; | 6217 Lisp_Object current_dir; |
6249 char *errstr; | 6218 char *errstr; |
6250 | 6219 |
6251 CHECK_STRING (document); | 6220 CHECK_STRING (document); |
6378 acceptable to `define-key' (e.g. [A-tab] for Alt-Tab). The meta | 6347 acceptable to `define-key' (e.g. [A-tab] for Alt-Tab). The meta |
6379 modifier is interpreted as Alt if `w32-alt-is-meta' is t, and hyper | 6348 modifier is interpreted as Alt if `w32-alt-is-meta' is t, and hyper |
6380 is always interpreted as the Windows modifier keys. | 6349 is always interpreted as the Windows modifier keys. |
6381 | 6350 |
6382 The return value is the hotkey-id if registered, otherwise nil. */) | 6351 The return value is the hotkey-id if registered, otherwise nil. */) |
6383 (key) | 6352 (Lisp_Object key) |
6384 Lisp_Object key; | |
6385 { | 6353 { |
6386 key = w32_parse_hot_key (key); | 6354 key = w32_parse_hot_key (key); |
6387 | 6355 |
6388 if (!NILP (key) && NILP (Fmemq (key, w32_grabbed_keys))) | 6356 if (!NILP (key) && NILP (Fmemq (key, w32_grabbed_keys))) |
6389 { | 6357 { |
6411 } | 6379 } |
6412 | 6380 |
6413 DEFUN ("w32-unregister-hot-key", Fw32_unregister_hot_key, | 6381 DEFUN ("w32-unregister-hot-key", Fw32_unregister_hot_key, |
6414 Sw32_unregister_hot_key, 1, 1, 0, | 6382 Sw32_unregister_hot_key, 1, 1, 0, |
6415 doc: /* Unregister KEY as a hot-key combination. */) | 6383 doc: /* Unregister KEY as a hot-key combination. */) |
6416 (key) | 6384 (Lisp_Object key) |
6417 Lisp_Object key; | |
6418 { | 6385 { |
6419 Lisp_Object item; | 6386 Lisp_Object item; |
6420 | 6387 |
6421 if (!INTEGERP (key)) | 6388 if (!INTEGERP (key)) |
6422 key = w32_parse_hot_key (key); | 6389 key = w32_parse_hot_key (key); |
6444 } | 6411 } |
6445 | 6412 |
6446 DEFUN ("w32-registered-hot-keys", Fw32_registered_hot_keys, | 6413 DEFUN ("w32-registered-hot-keys", Fw32_registered_hot_keys, |
6447 Sw32_registered_hot_keys, 0, 0, 0, | 6414 Sw32_registered_hot_keys, 0, 0, 0, |
6448 doc: /* Return list of registered hot-key IDs. */) | 6415 doc: /* Return list of registered hot-key IDs. */) |
6449 () | 6416 (void) |
6450 { | 6417 { |
6451 return Fdelq (Qnil, Fcopy_sequence (w32_grabbed_keys)); | 6418 return Fdelq (Qnil, Fcopy_sequence (w32_grabbed_keys)); |
6452 } | 6419 } |
6453 | 6420 |
6454 DEFUN ("w32-reconstruct-hot-key", Fw32_reconstruct_hot_key, | 6421 DEFUN ("w32-reconstruct-hot-key", Fw32_reconstruct_hot_key, |
6455 Sw32_reconstruct_hot_key, 1, 1, 0, | 6422 Sw32_reconstruct_hot_key, 1, 1, 0, |
6456 doc: /* Convert hot-key ID to a lisp key combination. | 6423 doc: /* Convert hot-key ID to a lisp key combination. |
6457 usage: (w32-reconstruct-hot-key ID) */) | 6424 usage: (w32-reconstruct-hot-key ID) */) |
6458 (hotkeyid) | 6425 (Lisp_Object hotkeyid) |
6459 Lisp_Object hotkeyid; | |
6460 { | 6426 { |
6461 int vk_code, w32_modifiers; | 6427 int vk_code, w32_modifiers; |
6462 Lisp_Object key; | 6428 Lisp_Object key; |
6463 | 6429 |
6464 CHECK_NUMBER (hotkeyid); | 6430 CHECK_NUMBER (hotkeyid); |
6488 Sw32_toggle_lock_key, 1, 2, 0, | 6454 Sw32_toggle_lock_key, 1, 2, 0, |
6489 doc: /* Toggle the state of the lock key KEY. | 6455 doc: /* Toggle the state of the lock key KEY. |
6490 KEY can be `capslock', `kp-numlock', or `scroll'. | 6456 KEY can be `capslock', `kp-numlock', or `scroll'. |
6491 If the optional parameter NEW-STATE is a number, then the state of KEY | 6457 If the optional parameter NEW-STATE is a number, then the state of KEY |
6492 is set to off if the low bit of NEW-STATE is zero, otherwise on. */) | 6458 is set to off if the low bit of NEW-STATE is zero, otherwise on. */) |
6493 (key, new_state) | 6459 (Lisp_Object key, Lisp_Object new_state) |
6494 Lisp_Object key, new_state; | |
6495 { | 6460 { |
6496 int vk_code; | 6461 int vk_code; |
6497 | 6462 |
6498 if (EQ (key, intern ("capslock"))) | 6463 if (EQ (key, intern ("capslock"))) |
6499 vk_code = VK_CAPITAL; | 6464 vk_code = VK_CAPITAL; |
6525 DEFUN ("w32-window-exists-p", Fw32_window_exists_p, Sw32_window_exists_p, | 6490 DEFUN ("w32-window-exists-p", Fw32_window_exists_p, Sw32_window_exists_p, |
6526 2, 2, 0, | 6491 2, 2, 0, |
6527 doc: /* Return non-nil if a window exists with the specified CLASS and NAME. | 6492 doc: /* Return non-nil if a window exists with the specified CLASS and NAME. |
6528 | 6493 |
6529 This is a direct interface to the Windows API FindWindow function. */) | 6494 This is a direct interface to the Windows API FindWindow function. */) |
6530 (class, name) | 6495 (Lisp_Object class, Lisp_Object name) |
6531 Lisp_Object class, name; | |
6532 { | 6496 { |
6533 HWND hnd; | 6497 HWND hnd; |
6534 | 6498 |
6535 if (!NILP (class)) | 6499 if (!NILP (class)) |
6536 CHECK_STRING (class); | 6500 CHECK_STRING (class); |
6555 %p Battery load percentage | 6519 %p Battery load percentage |
6556 %s Remaining time (to charge or discharge) in seconds | 6520 %s Remaining time (to charge or discharge) in seconds |
6557 %m Remaining time (to charge or discharge) in minutes | 6521 %m Remaining time (to charge or discharge) in minutes |
6558 %h Remaining time (to charge or discharge) in hours | 6522 %h Remaining time (to charge or discharge) in hours |
6559 %t Remaining time (to charge or discharge) in the form `h:min' */) | 6523 %t Remaining time (to charge or discharge) in the form `h:min' */) |
6560 () | 6524 (void) |
6561 { | 6525 { |
6562 Lisp_Object status = Qnil; | 6526 Lisp_Object status = Qnil; |
6563 | 6527 |
6564 SYSTEM_POWER_STATUS system_status; | 6528 SYSTEM_POWER_STATUS system_status; |
6565 if (GetSystemPowerStatus (&system_status)) | 6529 if (GetSystemPowerStatus (&system_status)) |
6659 doc: /* Return storage information about the file system FILENAME is on. | 6623 doc: /* Return storage information about the file system FILENAME is on. |
6660 Value is a list of floats (TOTAL FREE AVAIL), where TOTAL is the total | 6624 Value is a list of floats (TOTAL FREE AVAIL), where TOTAL is the total |
6661 storage of the file system, FREE is the free storage, and AVAIL is the | 6625 storage of the file system, FREE is the free storage, and AVAIL is the |
6662 storage available to a non-superuser. All 3 numbers are in bytes. | 6626 storage available to a non-superuser. All 3 numbers are in bytes. |
6663 If the underlying system call fails, value is nil. */) | 6627 If the underlying system call fails, value is nil. */) |
6664 (filename) | 6628 (Lisp_Object filename) |
6665 Lisp_Object filename; | |
6666 { | 6629 { |
6667 Lisp_Object encoded, value; | 6630 Lisp_Object encoded, value; |
6668 | 6631 |
6669 CHECK_STRING (filename); | 6632 CHECK_STRING (filename); |
6670 filename = Fexpand_file_name (filename, Qnil); | 6633 filename = Fexpand_file_name (filename, Qnil); |
6752 return value; | 6715 return value; |
6753 } | 6716 } |
6754 | 6717 |
6755 DEFUN ("default-printer-name", Fdefault_printer_name, Sdefault_printer_name, | 6718 DEFUN ("default-printer-name", Fdefault_printer_name, Sdefault_printer_name, |
6756 0, 0, 0, doc: /* Return the name of Windows default printer device. */) | 6719 0, 0, 0, doc: /* Return the name of Windows default printer device. */) |
6757 () | 6720 (void) |
6758 { | 6721 { |
6759 static char pname_buf[256]; | 6722 static char pname_buf[256]; |
6760 int err; | 6723 int err; |
6761 HANDLE hPrn; | 6724 HANDLE hPrn; |
6762 PRINTER_INFO_2 *ppi2 = NULL; | 6725 PRINTER_INFO_2 *ppi2 = NULL; |