diff options
| author | Kim F. Storm | 2003-03-31 20:35:09 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2003-03-31 20:35:09 +0000 |
| commit | 6d9063478ad19c0773e369726fde7b250cda363d (patch) | |
| tree | 977cf5e78438d789c9a3fe5789daf1acd0668b79 /src | |
| parent | c900f2919218c1db645927ae398c9cfc3c1dd9a9 (diff) | |
| download | emacs-6d9063478ad19c0773e369726fde7b250cda363d.tar.gz emacs-6d9063478ad19c0773e369726fde7b250cda363d.zip | |
* w32fns.c (Qauto_raise, Qauto_lower, ...): Remove vars for frame
parameters now defined in frame.h and frame.c.
(Vx_resource_name): Remove. Use generic var.
(enum x_frame_parms): Remove (bogus, unused enum).
(check_x_display_info): Make non-static (for frame.c).
(struct x_frame_parm_table, x_frame_parms): Remove.
(init_x_parm_symbols, x_set_frame_parameters, x_report_frame_params)
(x_set_line_spacing, x_set_screen_gamma, x_icon_type, x_set_font)
(x_set_border_width, x_set_internal_border_width, x_set_visibility)
(x_change_window_heights, x_set_autoraise, x_set_autolower)
(x_set_vertical_scroll_bars, x_set_scroll_bar_width)
(validate_x_resource_name, Fx_get_resource, x_get_resource_string)
(x_default_parameter, Fx_parse_geometry, x_figure_window_size):
Remove. Use generic functions instead.
(enum resource_types): Remove.
(x_set_scroll_bar_default_width): New global function (for frame.c).
(Fx_create_frame): Depend on x_figure_window_size to add space for
toolbar and setup size_hint_flags.
(w32_frame_parm_handlers): New table for redisplay_interface.
(syms_of_w32fns): Don't intern/staticpro removed vars.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32fns.c | 1457 |
1 files changed, 51 insertions, 1406 deletions
diff --git a/src/w32fns.c b/src/w32fns.c index 3c63d83d4a9..2793259b2ff 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -141,9 +141,6 @@ Lisp_Object Vw32_mouse_move_interval; | |||
| 141 | /* Flag to indicate if XBUTTON events should be passed on to Windows. */ | 141 | /* Flag to indicate if XBUTTON events should be passed on to Windows. */ |
| 142 | int w32_pass_extra_mouse_buttons_to_system; | 142 | int w32_pass_extra_mouse_buttons_to_system; |
| 143 | 143 | ||
| 144 | /* The name we're using in resource queries. */ | ||
| 145 | Lisp_Object Vx_resource_name; | ||
| 146 | |||
| 147 | /* Non nil if no window manager is in use. */ | 144 | /* Non nil if no window manager is in use. */ |
| 148 | Lisp_Object Vx_no_window_manager; | 145 | Lisp_Object Vx_no_window_manager; |
| 149 | 146 | ||
| @@ -199,36 +196,9 @@ Lisp_Object Vw32_charset_info_alist; | |||
| 199 | #define VIETNAMESE_CHARSET 163 | 196 | #define VIETNAMESE_CHARSET 163 |
| 200 | #endif | 197 | #endif |
| 201 | 198 | ||
| 202 | Lisp_Object Qauto_raise; | ||
| 203 | Lisp_Object Qauto_lower; | ||
| 204 | Lisp_Object Qborder_color; | ||
| 205 | Lisp_Object Qborder_width; | ||
| 206 | extern Lisp_Object Qbox; | ||
| 207 | Lisp_Object Qcursor_color; | ||
| 208 | Lisp_Object Qcursor_type; | ||
| 209 | Lisp_Object Qgeometry; | ||
| 210 | Lisp_Object Qicon_left; | ||
| 211 | Lisp_Object Qicon_top; | ||
| 212 | Lisp_Object Qicon_type; | ||
| 213 | Lisp_Object Qicon_name; | ||
| 214 | Lisp_Object Qinternal_border_width; | ||
| 215 | Lisp_Object Qleft; | ||
| 216 | Lisp_Object Qright; | ||
| 217 | Lisp_Object Qmouse_color; | ||
| 218 | Lisp_Object Qnone; | 199 | Lisp_Object Qnone; |
| 219 | Lisp_Object Qparent_id; | ||
| 220 | Lisp_Object Qscroll_bar_width; | ||
| 221 | Lisp_Object Qsuppress_icon; | 200 | Lisp_Object Qsuppress_icon; |
| 222 | Lisp_Object Qundefined_color; | 201 | Lisp_Object Qundefined_color; |
| 223 | Lisp_Object Qvertical_scroll_bars; | ||
| 224 | Lisp_Object Qvisibility; | ||
| 225 | Lisp_Object Qwindow_id; | ||
| 226 | Lisp_Object Qx_frame_parameter; | ||
| 227 | Lisp_Object Qx_resource_name; | ||
| 228 | Lisp_Object Quser_position; | ||
| 229 | Lisp_Object Quser_size; | ||
| 230 | Lisp_Object Qscreen_gamma; | ||
| 231 | Lisp_Object Qline_spacing; | ||
| 232 | Lisp_Object Qcenter; | 202 | Lisp_Object Qcenter; |
| 233 | Lisp_Object Qcancel_timer; | 203 | Lisp_Object Qcancel_timer; |
| 234 | Lisp_Object Qhyper; | 204 | Lisp_Object Qhyper; |
| @@ -269,14 +239,6 @@ Lisp_Object Qw32_charset_mac; | |||
| 269 | Lisp_Object Qw32_charset_unicode; | 239 | Lisp_Object Qw32_charset_unicode; |
| 270 | #endif | 240 | #endif |
| 271 | 241 | ||
| 272 | Lisp_Object Qfullscreen; | ||
| 273 | Lisp_Object Qfullwidth; | ||
| 274 | Lisp_Object Qfullheight; | ||
| 275 | Lisp_Object Qfullboth; | ||
| 276 | |||
| 277 | extern Lisp_Object Qtop; | ||
| 278 | extern Lisp_Object Qdisplay; | ||
| 279 | |||
| 280 | /* State variables for emulating a three button mouse. */ | 242 | /* State variables for emulating a three button mouse. */ |
| 281 | #define LMOUSE 1 | 243 | #define LMOUSE 1 |
| 282 | #define MMOUSE 2 | 244 | #define MMOUSE 2 |
| @@ -311,14 +273,8 @@ static unsigned menu_free_timer = 0; | |||
| 311 | 273 | ||
| 312 | /* The below are defined in frame.c. */ | 274 | /* The below are defined in frame.c. */ |
| 313 | 275 | ||
| 314 | extern Lisp_Object Qheight, Qminibuffer, Qname, Qonly, Qwidth; | ||
| 315 | extern Lisp_Object Qunsplittable, Qmenu_bar_lines, Qbuffer_predicate, Qtitle; | ||
| 316 | extern Lisp_Object Qtool_bar_lines; | ||
| 317 | |||
| 318 | extern Lisp_Object Vwindow_system_version; | 276 | extern Lisp_Object Vwindow_system_version; |
| 319 | 277 | ||
| 320 | Lisp_Object Qface_set_after_frame_default; | ||
| 321 | |||
| 322 | #ifdef GLYPH_DEBUG | 278 | #ifdef GLYPH_DEBUG |
| 323 | int image_cache_refcount, dpyinfo_refcount; | 279 | int image_cache_refcount, dpyinfo_refcount; |
| 324 | #endif | 280 | #endif |
| @@ -377,7 +333,7 @@ check_x_frame (frame) | |||
| 377 | nil stands for the selected frame--or, if that is not a w32 frame, | 333 | nil stands for the selected frame--or, if that is not a w32 frame, |
| 378 | the first display on the list. */ | 334 | the first display on the list. */ |
| 379 | 335 | ||
| 380 | static struct w32_display_info * | 336 | struct w32_display_info * |
| 381 | check_x_display_info (frame) | 337 | check_x_display_info (frame) |
| 382 | Lisp_Object frame; | 338 | Lisp_Object frame; |
| 383 | { | 339 | { |
| @@ -654,48 +610,13 @@ x_destroy_all_bitmaps (dpyinfo) | |||
| 654 | dpyinfo->bitmaps_last = 0; | 610 | dpyinfo->bitmaps_last = 0; |
| 655 | } | 611 | } |
| 656 | 612 | ||
| 657 | /* Connect the frame-parameter names for W32 frames | ||
| 658 | to the ways of passing the parameter values to the window system. | ||
| 659 | |||
| 660 | The name of a parameter, as a Lisp symbol, | ||
| 661 | has an `x-frame-parameter' property which is an integer in Lisp | ||
| 662 | but can be interpreted as an `enum x_frame_parm' in C. */ | ||
| 663 | |||
| 664 | enum x_frame_parm | ||
| 665 | { | ||
| 666 | X_PARM_FOREGROUND_COLOR, | ||
| 667 | X_PARM_BACKGROUND_COLOR, | ||
| 668 | X_PARM_MOUSE_COLOR, | ||
| 669 | X_PARM_CURSOR_COLOR, | ||
| 670 | X_PARM_BORDER_COLOR, | ||
| 671 | X_PARM_ICON_TYPE, | ||
| 672 | X_PARM_FONT, | ||
| 673 | X_PARM_BORDER_WIDTH, | ||
| 674 | X_PARM_INTERNAL_BORDER_WIDTH, | ||
| 675 | X_PARM_NAME, | ||
| 676 | X_PARM_AUTORAISE, | ||
| 677 | X_PARM_AUTOLOWER, | ||
| 678 | X_PARM_VERT_SCROLL_BAR, | ||
| 679 | X_PARM_VISIBILITY, | ||
| 680 | X_PARM_MENU_BAR_LINES | ||
| 681 | }; | ||
| 682 | |||
| 683 | |||
| 684 | struct x_frame_parm_table | ||
| 685 | { | ||
| 686 | char *name; | ||
| 687 | void (*setter) P_ ((struct frame *, Lisp_Object, Lisp_Object)); | ||
| 688 | }; | ||
| 689 | |||
| 690 | BOOL my_show_window P_ ((struct frame *, HWND, int)); | 613 | BOOL my_show_window P_ ((struct frame *, HWND, int)); |
| 691 | void my_set_window_pos P_ ((HWND, HWND, int, int, int, int, UINT)); | 614 | void my_set_window_pos P_ ((HWND, HWND, int, int, int, int, UINT)); |
| 692 | static Lisp_Object unwind_create_frame P_ ((Lisp_Object)); | 615 | static Lisp_Object unwind_create_frame P_ ((Lisp_Object)); |
| 693 | static Lisp_Object unwind_create_tip_frame P_ ((Lisp_Object)); | 616 | static Lisp_Object unwind_create_tip_frame P_ ((Lisp_Object)); |
| 694 | static void x_change_window_heights P_ ((Lisp_Object, int)); | 617 | |
| 695 | /* TODO: Native Input Method support; see x_create_im. */ | 618 | /* TODO: Native Input Method support; see x_create_im. */ |
| 696 | void x_set_foreground_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 619 | void x_set_foreground_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 697 | static void x_set_line_spacing P_ ((struct frame *, Lisp_Object, Lisp_Object)); | ||
| 698 | static void x_set_fullscreen P_ ((struct frame *, Lisp_Object, Lisp_Object)); | ||
| 699 | void x_set_background_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 620 | void x_set_background_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 700 | void x_set_mouse_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 621 | void x_set_mouse_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 701 | void x_set_cursor_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 622 | void x_set_cursor_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| @@ -703,380 +624,15 @@ void x_set_border_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); | |||
| 703 | void x_set_cursor_type P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 624 | void x_set_cursor_type P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 704 | void x_set_icon_type P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 625 | void x_set_icon_type P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 705 | void x_set_icon_name P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 626 | void x_set_icon_name P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 706 | void x_set_font P_ ((struct frame *, Lisp_Object, Lisp_Object)); | ||
| 707 | static void x_set_fringe_width P_ ((struct frame *, Lisp_Object, Lisp_Object)); | ||
| 708 | void x_set_border_width P_ ((struct frame *, Lisp_Object, Lisp_Object)); | ||
| 709 | void x_set_internal_border_width P_ ((struct frame *, Lisp_Object, | ||
| 710 | Lisp_Object)); | ||
| 711 | void x_explicitly_set_name P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 627 | void x_explicitly_set_name P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 712 | void x_set_autoraise P_ ((struct frame *, Lisp_Object, Lisp_Object)); | ||
| 713 | void x_set_autolower P_ ((struct frame *, Lisp_Object, Lisp_Object)); | ||
| 714 | void x_set_vertical_scroll_bars P_ ((struct frame *, Lisp_Object, | ||
| 715 | Lisp_Object)); | ||
| 716 | void x_set_visibility P_ ((struct frame *, Lisp_Object, Lisp_Object)); | ||
| 717 | void x_set_menu_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 628 | void x_set_menu_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 718 | void x_set_scroll_bar_width P_ ((struct frame *, Lisp_Object, Lisp_Object)); | ||
| 719 | void x_set_title P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 629 | void x_set_title P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 720 | void x_set_unsplittable P_ ((struct frame *, Lisp_Object, Lisp_Object)); | ||
| 721 | void x_set_tool_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 630 | void x_set_tool_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 722 | static void x_set_screen_gamma P_ ((struct frame *, Lisp_Object, Lisp_Object)); | ||
| 723 | static void x_edge_detection P_ ((struct frame *, struct image *, Lisp_Object, | 631 | static void x_edge_detection P_ ((struct frame *, struct image *, Lisp_Object, |
| 724 | Lisp_Object)); | 632 | Lisp_Object)); |
| 725 | 633 | ||
| 726 | static struct x_frame_parm_table x_frame_parms[] = | ||
| 727 | { | ||
| 728 | {"auto-raise", x_set_autoraise}, | ||
| 729 | {"auto-lower", x_set_autolower}, | ||
| 730 | {"background-color", x_set_background_color}, | ||
| 731 | {"border-color", x_set_border_color}, | ||
| 732 | {"border-width", x_set_border_width}, | ||
| 733 | {"cursor-color", x_set_cursor_color}, | ||
| 734 | {"cursor-type", x_set_cursor_type}, | ||
| 735 | {"font", x_set_font}, | ||
| 736 | {"foreground-color", x_set_foreground_color}, | ||
| 737 | {"icon-name", x_set_icon_name}, | ||
| 738 | {"icon-type", x_set_icon_type}, | ||
| 739 | {"internal-border-width", x_set_internal_border_width}, | ||
| 740 | {"menu-bar-lines", x_set_menu_bar_lines}, | ||
| 741 | {"mouse-color", x_set_mouse_color}, | ||
| 742 | {"name", x_explicitly_set_name}, | ||
| 743 | {"scroll-bar-width", x_set_scroll_bar_width}, | ||
| 744 | {"title", x_set_title}, | ||
| 745 | {"unsplittable", x_set_unsplittable}, | ||
| 746 | {"vertical-scroll-bars", x_set_vertical_scroll_bars}, | ||
| 747 | {"visibility", x_set_visibility}, | ||
| 748 | {"tool-bar-lines", x_set_tool_bar_lines}, | ||
| 749 | {"screen-gamma", x_set_screen_gamma}, | ||
| 750 | {"line-spacing", x_set_line_spacing}, | ||
| 751 | {"left-fringe", x_set_fringe_width}, | ||
| 752 | {"right-fringe", x_set_fringe_width}, | ||
| 753 | {"fullscreen", x_set_fullscreen}, | ||
| 754 | }; | ||
| 755 | 634 | ||
| 756 | /* Attach the `x-frame-parameter' properties to | ||
| 757 | the Lisp symbol names of parameters relevant to W32. */ | ||
| 758 | |||
| 759 | void | ||
| 760 | init_x_parm_symbols () | ||
| 761 | { | ||
| 762 | int i; | ||
| 763 | |||
| 764 | for (i = 0; i < sizeof (x_frame_parms) / sizeof (x_frame_parms[0]); i++) | ||
| 765 | Fput (intern (x_frame_parms[i].name), Qx_frame_parameter, | ||
| 766 | make_number (i)); | ||
| 767 | } | ||
| 768 | 635 | ||
| 769 | /* Really try to move where we want to be in case of fullscreen. Some WMs | ||
| 770 | moves the window where we tell them. Some (mwm, twm) moves the outer | ||
| 771 | window manager window there instead. | ||
| 772 | Try to compensate for those WM here. */ | ||
| 773 | static void | ||
| 774 | x_fullscreen_move (f, new_top, new_left) | ||
| 775 | struct frame *f; | ||
| 776 | int new_top; | ||
| 777 | int new_left; | ||
| 778 | { | ||
| 779 | if (new_top != f->output_data.w32->top_pos | ||
| 780 | || new_left != f->output_data.w32->left_pos) | ||
| 781 | { | ||
| 782 | int move_x = new_left; | ||
| 783 | int move_y = new_top; | ||
| 784 | |||
| 785 | f->output_data.w32->want_fullscreen |= FULLSCREEN_MOVE_WAIT; | ||
| 786 | x_set_offset (f, move_x, move_y, 1); | ||
| 787 | } | ||
| 788 | } | ||
| 789 | |||
| 790 | /* Change the parameters of frame F as specified by ALIST. | ||
| 791 | If a parameter is not specially recognized, do nothing; | ||
| 792 | otherwise call the `x_set_...' function for that parameter. */ | ||
| 793 | |||
| 794 | void | ||
| 795 | x_set_frame_parameters (f, alist) | ||
| 796 | FRAME_PTR f; | ||
| 797 | Lisp_Object alist; | ||
| 798 | { | ||
| 799 | Lisp_Object tail; | ||
| 800 | |||
| 801 | /* If both of these parameters are present, it's more efficient to | ||
| 802 | set them both at once. So we wait until we've looked at the | ||
| 803 | entire list before we set them. */ | ||
| 804 | int width, height; | ||
| 805 | |||
| 806 | /* Same here. */ | ||
| 807 | Lisp_Object left, top; | ||
| 808 | |||
| 809 | /* Same with these. */ | ||
| 810 | Lisp_Object icon_left, icon_top; | ||
| 811 | |||
| 812 | /* Record in these vectors all the parms specified. */ | ||
| 813 | Lisp_Object *parms; | ||
| 814 | Lisp_Object *values; | ||
| 815 | int i, p; | ||
| 816 | int left_no_change = 0, top_no_change = 0; | ||
| 817 | int icon_left_no_change = 0, icon_top_no_change = 0; | ||
| 818 | int fullscreen_is_being_set = 0; | ||
| 819 | |||
| 820 | struct gcpro gcpro1, gcpro2; | ||
| 821 | |||
| 822 | i = 0; | ||
| 823 | for (tail = alist; CONSP (tail); tail = Fcdr (tail)) | ||
| 824 | i++; | ||
| 825 | |||
| 826 | parms = (Lisp_Object *) alloca (i * sizeof (Lisp_Object)); | ||
| 827 | values = (Lisp_Object *) alloca (i * sizeof (Lisp_Object)); | ||
| 828 | |||
| 829 | /* Extract parm names and values into those vectors. */ | ||
| 830 | |||
| 831 | i = 0; | ||
| 832 | for (tail = alist; CONSP (tail); tail = Fcdr (tail)) | ||
| 833 | { | ||
| 834 | Lisp_Object elt; | ||
| 835 | |||
| 836 | elt = Fcar (tail); | ||
| 837 | parms[i] = Fcar (elt); | ||
| 838 | values[i] = Fcdr (elt); | ||
| 839 | i++; | ||
| 840 | } | ||
| 841 | /* TAIL and ALIST are not used again below here. */ | ||
| 842 | alist = tail = Qnil; | ||
| 843 | |||
| 844 | GCPRO2 (*parms, *values); | ||
| 845 | gcpro1.nvars = i; | ||
| 846 | gcpro2.nvars = i; | ||
| 847 | |||
| 848 | /* There is no need to gcpro LEFT, TOP, ICON_LEFT, or ICON_TOP, | ||
| 849 | because their values appear in VALUES and strings are not valid. */ | ||
| 850 | top = left = Qunbound; | ||
| 851 | icon_left = icon_top = Qunbound; | ||
| 852 | |||
| 853 | /* Provide default values for HEIGHT and WIDTH. */ | ||
| 854 | if (FRAME_NEW_WIDTH (f)) | ||
| 855 | width = FRAME_NEW_WIDTH (f); | ||
| 856 | else | ||
| 857 | width = FRAME_WIDTH (f); | ||
| 858 | |||
| 859 | if (FRAME_NEW_HEIGHT (f)) | ||
| 860 | height = FRAME_NEW_HEIGHT (f); | ||
| 861 | else | ||
| 862 | height = FRAME_HEIGHT (f); | ||
| 863 | |||
| 864 | /* Process foreground_color and background_color before anything else. | ||
| 865 | They are independent of other properties, but other properties (e.g., | ||
| 866 | cursor_color) are dependent upon them. */ | ||
| 867 | /* Process default font as well, since fringe widths depends on it. */ | ||
| 868 | for (p = 0; p < i; p++) | ||
| 869 | { | ||
| 870 | Lisp_Object prop, val; | ||
| 871 | |||
| 872 | prop = parms[p]; | ||
| 873 | val = values[p]; | ||
| 874 | if (EQ (prop, Qforeground_color) | ||
| 875 | || EQ (prop, Qbackground_color) | ||
| 876 | || EQ (prop, Qfont) | ||
| 877 | || EQ (prop, Qfullscreen)) | ||
| 878 | { | ||
| 879 | register Lisp_Object param_index, old_value; | ||
| 880 | |||
| 881 | old_value = get_frame_param (f, prop); | ||
| 882 | fullscreen_is_being_set |= EQ (prop, Qfullscreen); | ||
| 883 | |||
| 884 | if (NILP (Fequal (val, old_value))) | ||
| 885 | { | ||
| 886 | store_frame_param (f, prop, val); | ||
| 887 | |||
| 888 | param_index = Fget (prop, Qx_frame_parameter); | ||
| 889 | if (NATNUMP (param_index) | ||
| 890 | && (XFASTINT (param_index) | ||
| 891 | < sizeof (x_frame_parms)/sizeof (x_frame_parms[0]))) | ||
| 892 | (*x_frame_parms[XINT (param_index)].setter)(f, val, old_value); | ||
| 893 | } | ||
| 894 | } | ||
| 895 | } | ||
| 896 | |||
| 897 | /* Now process them in reverse of specified order. */ | ||
| 898 | for (i--; i >= 0; i--) | ||
| 899 | { | ||
| 900 | Lisp_Object prop, val; | ||
| 901 | |||
| 902 | prop = parms[i]; | ||
| 903 | val = values[i]; | ||
| 904 | |||
| 905 | if (EQ (prop, Qwidth) && NUMBERP (val)) | ||
| 906 | width = XFASTINT (val); | ||
| 907 | else if (EQ (prop, Qheight) && NUMBERP (val)) | ||
| 908 | height = XFASTINT (val); | ||
| 909 | else if (EQ (prop, Qtop)) | ||
| 910 | top = val; | ||
| 911 | else if (EQ (prop, Qleft)) | ||
| 912 | left = val; | ||
| 913 | else if (EQ (prop, Qicon_top)) | ||
| 914 | icon_top = val; | ||
| 915 | else if (EQ (prop, Qicon_left)) | ||
| 916 | icon_left = val; | ||
| 917 | else if (EQ (prop, Qforeground_color) | ||
| 918 | || EQ (prop, Qbackground_color) | ||
| 919 | || EQ (prop, Qfont) | ||
| 920 | || EQ (prop, Qfullscreen)) | ||
| 921 | /* Processed above. */ | ||
| 922 | continue; | ||
| 923 | else | ||
| 924 | { | ||
| 925 | register Lisp_Object param_index, old_value; | ||
| 926 | |||
| 927 | old_value = get_frame_param (f, prop); | ||
| 928 | |||
| 929 | store_frame_param (f, prop, val); | ||
| 930 | |||
| 931 | param_index = Fget (prop, Qx_frame_parameter); | ||
| 932 | if (NATNUMP (param_index) | ||
| 933 | && (XFASTINT (param_index) | ||
| 934 | < sizeof (x_frame_parms)/sizeof (x_frame_parms[0]))) | ||
| 935 | (*x_frame_parms[XINT (param_index)].setter)(f, val, old_value); | ||
| 936 | } | ||
| 937 | } | ||
| 938 | |||
| 939 | /* Don't die if just one of these was set. */ | ||
| 940 | if (EQ (left, Qunbound)) | ||
| 941 | { | ||
| 942 | left_no_change = 1; | ||
| 943 | if (f->output_data.w32->left_pos < 0) | ||
| 944 | left = Fcons (Qplus, Fcons (make_number (f->output_data.w32->left_pos), Qnil)); | ||
| 945 | else | ||
| 946 | XSETINT (left, f->output_data.w32->left_pos); | ||
| 947 | } | ||
| 948 | if (EQ (top, Qunbound)) | ||
| 949 | { | ||
| 950 | top_no_change = 1; | ||
| 951 | if (f->output_data.w32->top_pos < 0) | ||
| 952 | top = Fcons (Qplus, Fcons (make_number (f->output_data.w32->top_pos), Qnil)); | ||
| 953 | else | ||
| 954 | XSETINT (top, f->output_data.w32->top_pos); | ||
| 955 | } | ||
| 956 | |||
| 957 | /* If one of the icon positions was not set, preserve or default it. */ | ||
| 958 | if (EQ (icon_left, Qunbound) || ! INTEGERP (icon_left)) | ||
| 959 | { | ||
| 960 | icon_left_no_change = 1; | ||
| 961 | icon_left = Fcdr (Fassq (Qicon_left, f->param_alist)); | ||
| 962 | if (NILP (icon_left)) | ||
| 963 | XSETINT (icon_left, 0); | ||
| 964 | } | ||
| 965 | if (EQ (icon_top, Qunbound) || ! INTEGERP (icon_top)) | ||
| 966 | { | ||
| 967 | icon_top_no_change = 1; | ||
| 968 | icon_top = Fcdr (Fassq (Qicon_top, f->param_alist)); | ||
| 969 | if (NILP (icon_top)) | ||
| 970 | XSETINT (icon_top, 0); | ||
| 971 | } | ||
| 972 | |||
| 973 | if (FRAME_VISIBLE_P (f) && fullscreen_is_being_set) | ||
| 974 | { | ||
| 975 | /* If the frame is visible already and the fullscreen parameter is | ||
| 976 | being set, it is too late to set WM manager hints to specify | ||
| 977 | size and position. | ||
| 978 | Here we first get the width, height and position that applies to | ||
| 979 | fullscreen. We then move the frame to the appropriate | ||
| 980 | position. Resize of the frame is taken care of in the code after | ||
| 981 | this if-statement. */ | ||
| 982 | int new_left, new_top; | ||
| 983 | |||
| 984 | x_fullscreen_adjust (f, &width, &height, &new_top, &new_left); | ||
| 985 | x_fullscreen_move (f, new_top, new_left); | ||
| 986 | } | ||
| 987 | |||
| 988 | /* Don't set these parameters unless they've been explicitly | ||
| 989 | specified. The window might be mapped or resized while we're in | ||
| 990 | this function, and we don't want to override that unless the lisp | ||
| 991 | code has asked for it. | ||
| 992 | |||
| 993 | Don't set these parameters unless they actually differ from the | ||
| 994 | window's current parameters; the window may not actually exist | ||
| 995 | yet. */ | ||
| 996 | { | ||
| 997 | Lisp_Object frame; | ||
| 998 | |||
| 999 | check_frame_size (f, &height, &width); | ||
| 1000 | |||
| 1001 | XSETFRAME (frame, f); | ||
| 1002 | |||
| 1003 | if (width != FRAME_WIDTH (f) | ||
| 1004 | || height != FRAME_HEIGHT (f) | ||
| 1005 | || FRAME_NEW_HEIGHT (f) || FRAME_NEW_WIDTH (f)) | ||
| 1006 | Fset_frame_size (frame, make_number (width), make_number (height)); | ||
| 1007 | |||
| 1008 | if ((!NILP (left) || !NILP (top)) | ||
| 1009 | && ! (left_no_change && top_no_change) | ||
| 1010 | && ! (NUMBERP (left) && XINT (left) == f->output_data.w32->left_pos | ||
| 1011 | && NUMBERP (top) && XINT (top) == f->output_data.w32->top_pos)) | ||
| 1012 | { | ||
| 1013 | int leftpos = 0; | ||
| 1014 | int toppos = 0; | ||
| 1015 | |||
| 1016 | /* Record the signs. */ | ||
| 1017 | f->output_data.w32->size_hint_flags &= ~ (XNegative | YNegative); | ||
| 1018 | if (EQ (left, Qminus)) | ||
| 1019 | f->output_data.w32->size_hint_flags |= XNegative; | ||
| 1020 | else if (INTEGERP (left)) | ||
| 1021 | { | ||
| 1022 | leftpos = XINT (left); | ||
| 1023 | if (leftpos < 0) | ||
| 1024 | f->output_data.w32->size_hint_flags |= XNegative; | ||
| 1025 | } | ||
| 1026 | else if (CONSP (left) && EQ (XCAR (left), Qminus) | ||
| 1027 | && CONSP (XCDR (left)) | ||
| 1028 | && INTEGERP (XCAR (XCDR (left)))) | ||
| 1029 | { | ||
| 1030 | leftpos = - XINT (XCAR (XCDR (left))); | ||
| 1031 | f->output_data.w32->size_hint_flags |= XNegative; | ||
| 1032 | } | ||
| 1033 | else if (CONSP (left) && EQ (XCAR (left), Qplus) | ||
| 1034 | && CONSP (XCDR (left)) | ||
| 1035 | && INTEGERP (XCAR (XCDR (left)))) | ||
| 1036 | { | ||
| 1037 | leftpos = XINT (XCAR (XCDR (left))); | ||
| 1038 | } | ||
| 1039 | |||
| 1040 | if (EQ (top, Qminus)) | ||
| 1041 | f->output_data.w32->size_hint_flags |= YNegative; | ||
| 1042 | else if (INTEGERP (top)) | ||
| 1043 | { | ||
| 1044 | toppos = XINT (top); | ||
| 1045 | if (toppos < 0) | ||
| 1046 | f->output_data.w32->size_hint_flags |= YNegative; | ||
| 1047 | } | ||
| 1048 | else if (CONSP (top) && EQ (XCAR (top), Qminus) | ||
| 1049 | && CONSP (XCDR (top)) | ||
| 1050 | && INTEGERP (XCAR (XCDR (top)))) | ||
| 1051 | { | ||
| 1052 | toppos = - XINT (XCAR (XCDR (top))); | ||
| 1053 | f->output_data.w32->size_hint_flags |= YNegative; | ||
| 1054 | } | ||
| 1055 | else if (CONSP (top) && EQ (XCAR (top), Qplus) | ||
| 1056 | && CONSP (XCDR (top)) | ||
| 1057 | && INTEGERP (XCAR (XCDR (top)))) | ||
| 1058 | { | ||
| 1059 | toppos = XINT (XCAR (XCDR (top))); | ||
| 1060 | } | ||
| 1061 | |||
| 1062 | |||
| 1063 | /* Store the numeric value of the position. */ | ||
| 1064 | f->output_data.w32->top_pos = toppos; | ||
| 1065 | f->output_data.w32->left_pos = leftpos; | ||
| 1066 | |||
| 1067 | f->output_data.w32->win_gravity = NorthWestGravity; | ||
| 1068 | |||
| 1069 | /* Actually set that position, and convert to absolute. */ | ||
| 1070 | x_set_offset (f, leftpos, toppos, -1); | ||
| 1071 | } | ||
| 1072 | |||
| 1073 | if ((!NILP (icon_left) || !NILP (icon_top)) | ||
| 1074 | && ! (icon_left_no_change && icon_top_no_change)) | ||
| 1075 | x_wm_set_icon_position (f, XINT (icon_left), XINT (icon_top)); | ||
| 1076 | } | ||
| 1077 | |||
| 1078 | UNGCPRO; | ||
| 1079 | } | ||
| 1080 | 636 | ||
| 1081 | /* Store the screen positions of frame F into XPTR and YPTR. | 637 | /* Store the screen positions of frame F into XPTR and YPTR. |
| 1082 | These are the positions of the containing window manager window, | 638 | These are the positions of the containing window manager window, |
| @@ -1106,57 +662,6 @@ x_real_positions (f, xptr, yptr) | |||
| 1106 | *yptr = pt.y; | 662 | *yptr = pt.y; |
| 1107 | } | 663 | } |
| 1108 | 664 | ||
| 1109 | /* Insert a description of internally-recorded parameters of frame X | ||
| 1110 | into the parameter alist *ALISTPTR that is to be given to the user. | ||
| 1111 | Only parameters that are specific to W32 | ||
| 1112 | and whose values are not correctly recorded in the frame's | ||
| 1113 | param_alist need to be considered here. */ | ||
| 1114 | |||
| 1115 | void | ||
| 1116 | x_report_frame_params (f, alistptr) | ||
| 1117 | struct frame *f; | ||
| 1118 | Lisp_Object *alistptr; | ||
| 1119 | { | ||
| 1120 | char buf[16]; | ||
| 1121 | Lisp_Object tem; | ||
| 1122 | |||
| 1123 | /* Represent negative positions (off the top or left screen edge) | ||
| 1124 | in a way that Fmodify_frame_parameters will understand correctly. */ | ||
| 1125 | XSETINT (tem, f->output_data.w32->left_pos); | ||
| 1126 | if (f->output_data.w32->left_pos >= 0) | ||
| 1127 | store_in_alist (alistptr, Qleft, tem); | ||
| 1128 | else | ||
| 1129 | store_in_alist (alistptr, Qleft, Fcons (Qplus, Fcons (tem, Qnil))); | ||
| 1130 | |||
| 1131 | XSETINT (tem, f->output_data.w32->top_pos); | ||
| 1132 | if (f->output_data.w32->top_pos >= 0) | ||
| 1133 | store_in_alist (alistptr, Qtop, tem); | ||
| 1134 | else | ||
| 1135 | store_in_alist (alistptr, Qtop, Fcons (Qplus, Fcons (tem, Qnil))); | ||
| 1136 | |||
| 1137 | store_in_alist (alistptr, Qborder_width, | ||
| 1138 | make_number (f->output_data.w32->border_width)); | ||
| 1139 | store_in_alist (alistptr, Qinternal_border_width, | ||
| 1140 | make_number (f->output_data.w32->internal_border_width)); | ||
| 1141 | store_in_alist (alistptr, Qleft_fringe, | ||
| 1142 | make_number (f->output_data.w32->left_fringe_width)); | ||
| 1143 | store_in_alist (alistptr, Qright_fringe, | ||
| 1144 | make_number (f->output_data.w32->right_fringe_width)); | ||
| 1145 | store_in_alist (alistptr, Qscroll_bar_width, | ||
| 1146 | make_number (FRAME_HAS_VERTICAL_SCROLL_BARS (f) | ||
| 1147 | ? FRAME_SCROLL_BAR_PIXEL_WIDTH(f) | ||
| 1148 | : 0)); | ||
| 1149 | sprintf (buf, "%ld", (long) FRAME_W32_WINDOW (f)); | ||
| 1150 | store_in_alist (alistptr, Qwindow_id, | ||
| 1151 | build_string (buf)); | ||
| 1152 | store_in_alist (alistptr, Qicon_name, f->icon_name); | ||
| 1153 | FRAME_SAMPLE_VISIBILITY (f); | ||
| 1154 | store_in_alist (alistptr, Qvisibility, | ||
| 1155 | (FRAME_VISIBLE_P (f) ? Qt | ||
| 1156 | : FRAME_ICONIFIED_P (f) ? Qicon : Qnil)); | ||
| 1157 | store_in_alist (alistptr, Qdisplay, | ||
| 1158 | XCAR (FRAME_W32_DISPLAY_INFO (f)->name_list_element)); | ||
| 1159 | } | ||
| 1160 | 665 | ||
| 1161 | 666 | ||
| 1162 | DEFUN ("w32-define-rgb-color", Fw32_define_rgb_color, | 667 | DEFUN ("w32-define-rgb-color", Fw32_define_rgb_color, |
| @@ -2004,64 +1509,6 @@ x_decode_color (f, arg, def) | |||
| 2004 | return def; | 1509 | return def; |
| 2005 | } | 1510 | } |
| 2006 | 1511 | ||
| 2007 | /* Change the `line-spacing' frame parameter of frame F. OLD_VALUE is | ||
| 2008 | the previous value of that parameter, NEW_VALUE is the new value. */ | ||
| 2009 | |||
| 2010 | static void | ||
| 2011 | x_set_line_spacing (f, new_value, old_value) | ||
| 2012 | struct frame *f; | ||
| 2013 | Lisp_Object new_value, old_value; | ||
| 2014 | { | ||
| 2015 | if (NILP (new_value)) | ||
| 2016 | f->extra_line_spacing = 0; | ||
| 2017 | else if (NATNUMP (new_value)) | ||
| 2018 | f->extra_line_spacing = XFASTINT (new_value); | ||
| 2019 | else | ||
| 2020 | Fsignal (Qerror, Fcons (build_string ("Invalid line-spacing"), | ||
| 2021 | Fcons (new_value, Qnil))); | ||
| 2022 | if (FRAME_VISIBLE_P (f)) | ||
| 2023 | redraw_frame (f); | ||
| 2024 | } | ||
| 2025 | |||
| 2026 | |||
| 2027 | /* Change the `fullscreen' frame parameter of frame F. OLD_VALUE is | ||
| 2028 | the previous value of that parameter, NEW_VALUE is the new value. */ | ||
| 2029 | |||
| 2030 | static void | ||
| 2031 | x_set_fullscreen (f, new_value, old_value) | ||
| 2032 | struct frame *f; | ||
| 2033 | Lisp_Object new_value, old_value; | ||
| 2034 | { | ||
| 2035 | if (NILP (new_value)) | ||
| 2036 | f->output_data.w32->want_fullscreen = FULLSCREEN_NONE; | ||
| 2037 | else if (EQ (new_value, Qfullboth)) | ||
| 2038 | f->output_data.w32->want_fullscreen = FULLSCREEN_BOTH; | ||
| 2039 | else if (EQ (new_value, Qfullwidth)) | ||
| 2040 | f->output_data.w32->want_fullscreen = FULLSCREEN_WIDTH; | ||
| 2041 | else if (EQ (new_value, Qfullheight)) | ||
| 2042 | f->output_data.w32->want_fullscreen = FULLSCREEN_HEIGHT; | ||
| 2043 | } | ||
| 2044 | |||
| 2045 | |||
| 2046 | /* Change the `screen-gamma' frame parameter of frame F. OLD_VALUE is | ||
| 2047 | the previous value of that parameter, NEW_VALUE is the new value. */ | ||
| 2048 | |||
| 2049 | static void | ||
| 2050 | x_set_screen_gamma (f, new_value, old_value) | ||
| 2051 | struct frame *f; | ||
| 2052 | Lisp_Object new_value, old_value; | ||
| 2053 | { | ||
| 2054 | if (NILP (new_value)) | ||
| 2055 | f->gamma = 0; | ||
| 2056 | else if (NUMBERP (new_value) && XFLOATINT (new_value) > 0) | ||
| 2057 | /* The value 0.4545 is the normal viewing gamma. */ | ||
| 2058 | f->gamma = 1.0 / (0.4545 * XFLOATINT (new_value)); | ||
| 2059 | else | ||
| 2060 | Fsignal (Qerror, Fcons (build_string ("Invalid screen-gamma"), | ||
| 2061 | Fcons (new_value, Qnil))); | ||
| 2062 | |||
| 2063 | clear_face_cache (0); | ||
| 2064 | } | ||
| 2065 | 1512 | ||
| 2066 | 1513 | ||
| 2067 | /* Functions called only from `x_set_frame_param' | 1514 | /* Functions called only from `x_set_frame_param' |
| @@ -2313,11 +1760,13 @@ x_set_cursor_color (f, arg, oldval) | |||
| 2313 | /* Set the border-color of frame F to pixel value PIX. | 1760 | /* Set the border-color of frame F to pixel value PIX. |
| 2314 | Note that this does not fully take effect if done before | 1761 | Note that this does not fully take effect if done before |
| 2315 | F has a window. */ | 1762 | F has a window. */ |
| 1763 | |||
| 2316 | void | 1764 | void |
| 2317 | x_set_border_pixel (f, pix) | 1765 | x_set_border_pixel (f, pix) |
| 2318 | struct frame *f; | 1766 | struct frame *f; |
| 2319 | int pix; | 1767 | int pix; |
| 2320 | { | 1768 | { |
| 1769 | |||
| 2321 | f->output_data.w32->border_pixel = pix; | 1770 | f->output_data.w32->border_pixel = pix; |
| 2322 | 1771 | ||
| 2323 | if (FRAME_W32_WINDOW (f) != 0 && f->output_data.w32->border_width > 0) | 1772 | if (FRAME_W32_WINDOW (f) != 0 && f->output_data.w32->border_width > 0) |
| @@ -2387,21 +1836,6 @@ x_set_icon_type (f, arg, oldval) | |||
| 2387 | UNBLOCK_INPUT; | 1836 | UNBLOCK_INPUT; |
| 2388 | } | 1837 | } |
| 2389 | 1838 | ||
| 2390 | /* Return non-nil if frame F wants a bitmap icon. */ | ||
| 2391 | |||
| 2392 | Lisp_Object | ||
| 2393 | x_icon_type (f) | ||
| 2394 | FRAME_PTR f; | ||
| 2395 | { | ||
| 2396 | Lisp_Object tem; | ||
| 2397 | |||
| 2398 | tem = assq_no_quit (Qicon_type, f->param_alist); | ||
| 2399 | if (CONSP (tem)) | ||
| 2400 | return XCDR (tem); | ||
| 2401 | else | ||
| 2402 | return Qnil; | ||
| 2403 | } | ||
| 2404 | |||
| 2405 | void | 1839 | void |
| 2406 | x_set_icon_name (f, arg, oldval) | 1840 | x_set_icon_name (f, arg, oldval) |
| 2407 | struct frame *f; | 1841 | struct frame *f; |
| @@ -2451,160 +1885,7 @@ x_set_icon_name (f, arg, oldval) | |||
| 2451 | #endif | 1885 | #endif |
| 2452 | } | 1886 | } |
| 2453 | 1887 | ||
| 2454 | extern Lisp_Object x_new_font (); | ||
| 2455 | extern Lisp_Object x_new_fontset(); | ||
| 2456 | |||
| 2457 | void | ||
| 2458 | x_set_font (f, arg, oldval) | ||
| 2459 | struct frame *f; | ||
| 2460 | Lisp_Object arg, oldval; | ||
| 2461 | { | ||
| 2462 | Lisp_Object result; | ||
| 2463 | Lisp_Object fontset_name; | ||
| 2464 | Lisp_Object frame; | ||
| 2465 | int old_fontset = FRAME_FONTSET(f); | ||
| 2466 | |||
| 2467 | CHECK_STRING (arg); | ||
| 2468 | |||
| 2469 | fontset_name = Fquery_fontset (arg, Qnil); | ||
| 2470 | |||
| 2471 | BLOCK_INPUT; | ||
| 2472 | result = (STRINGP (fontset_name) | ||
| 2473 | ? x_new_fontset (f, SDATA (fontset_name)) | ||
| 2474 | : x_new_font (f, SDATA (arg))); | ||
| 2475 | UNBLOCK_INPUT; | ||
| 2476 | |||
| 2477 | if (EQ (result, Qnil)) | ||
| 2478 | error ("Font `%s' is not defined", SDATA (arg)); | ||
| 2479 | else if (EQ (result, Qt)) | ||
| 2480 | error ("The characters of the given font have varying widths"); | ||
| 2481 | else if (STRINGP (result)) | ||
| 2482 | { | ||
| 2483 | if (STRINGP (fontset_name)) | ||
| 2484 | { | ||
| 2485 | /* Fontset names are built from ASCII font names, so the | ||
| 2486 | names may be equal despite there was a change. */ | ||
| 2487 | if (old_fontset == FRAME_FONTSET (f)) | ||
| 2488 | return; | ||
| 2489 | } | ||
| 2490 | else if (!NILP (Fequal (result, oldval))) | ||
| 2491 | return; | ||
| 2492 | |||
| 2493 | store_frame_param (f, Qfont, result); | ||
| 2494 | recompute_basic_faces (f); | ||
| 2495 | } | ||
| 2496 | else | ||
| 2497 | abort (); | ||
| 2498 | |||
| 2499 | do_pending_window_change (0); | ||
| 2500 | |||
| 2501 | /* Don't call `face-set-after-frame-default' when faces haven't been | ||
| 2502 | initialized yet. This is the case when called from | ||
| 2503 | Fx_create_frame. In that case, the X widget or window doesn't | ||
| 2504 | exist either, and we can end up in x_report_frame_params with a | ||
| 2505 | null widget which gives a segfault. */ | ||
| 2506 | if (FRAME_FACE_CACHE (f)) | ||
| 2507 | { | ||
| 2508 | XSETFRAME (frame, f); | ||
| 2509 | call1 (Qface_set_after_frame_default, frame); | ||
| 2510 | } | ||
| 2511 | } | ||
| 2512 | |||
| 2513 | static void | ||
| 2514 | x_set_fringe_width (f, new_value, old_value) | ||
| 2515 | struct frame *f; | ||
| 2516 | Lisp_Object new_value, old_value; | ||
| 2517 | { | ||
| 2518 | compute_fringe_widths (f, 1); | ||
| 2519 | } | ||
| 2520 | |||
| 2521 | void | ||
| 2522 | x_set_border_width (f, arg, oldval) | ||
| 2523 | struct frame *f; | ||
| 2524 | Lisp_Object arg, oldval; | ||
| 2525 | { | ||
| 2526 | CHECK_NUMBER (arg); | ||
| 2527 | |||
| 2528 | if (XINT (arg) == f->output_data.w32->border_width) | ||
| 2529 | return; | ||
| 2530 | |||
| 2531 | if (FRAME_W32_WINDOW (f) != 0) | ||
| 2532 | error ("Cannot change the border width of a window"); | ||
| 2533 | |||
| 2534 | f->output_data.w32->border_width = XINT (arg); | ||
| 2535 | } | ||
| 2536 | |||
| 2537 | void | ||
| 2538 | x_set_internal_border_width (f, arg, oldval) | ||
| 2539 | struct frame *f; | ||
| 2540 | Lisp_Object arg, oldval; | ||
| 2541 | { | ||
| 2542 | int old = f->output_data.w32->internal_border_width; | ||
| 2543 | |||
| 2544 | CHECK_NUMBER (arg); | ||
| 2545 | f->output_data.w32->internal_border_width = XINT (arg); | ||
| 2546 | if (f->output_data.w32->internal_border_width < 0) | ||
| 2547 | f->output_data.w32->internal_border_width = 0; | ||
| 2548 | |||
| 2549 | if (f->output_data.w32->internal_border_width == old) | ||
| 2550 | return; | ||
| 2551 | |||
| 2552 | if (FRAME_W32_WINDOW (f) != 0) | ||
| 2553 | { | ||
| 2554 | x_set_window_size (f, 0, f->width, f->height); | ||
| 2555 | SET_FRAME_GARBAGED (f); | ||
| 2556 | do_pending_window_change (0); | ||
| 2557 | } | ||
| 2558 | else | ||
| 2559 | SET_FRAME_GARBAGED (f); | ||
| 2560 | } | ||
| 2561 | |||
| 2562 | void | ||
| 2563 | x_set_visibility (f, value, oldval) | ||
| 2564 | struct frame *f; | ||
| 2565 | Lisp_Object value, oldval; | ||
| 2566 | { | ||
| 2567 | Lisp_Object frame; | ||
| 2568 | XSETFRAME (frame, f); | ||
| 2569 | |||
| 2570 | if (NILP (value)) | ||
| 2571 | Fmake_frame_invisible (frame, Qt); | ||
| 2572 | else if (EQ (value, Qicon)) | ||
| 2573 | Ficonify_frame (frame); | ||
| 2574 | else | ||
| 2575 | Fmake_frame_visible (frame); | ||
| 2576 | } | ||
| 2577 | |||
| 2578 | 1888 | ||
| 2579 | /* Change window heights in windows rooted in WINDOW by N lines. */ | ||
| 2580 | |||
| 2581 | static void | ||
| 2582 | x_change_window_heights (window, n) | ||
| 2583 | Lisp_Object window; | ||
| 2584 | int n; | ||
| 2585 | { | ||
| 2586 | struct window *w = XWINDOW (window); | ||
| 2587 | |||
| 2588 | XSETFASTINT (w->top, XFASTINT (w->top) + n); | ||
| 2589 | XSETFASTINT (w->height, XFASTINT (w->height) - n); | ||
| 2590 | |||
| 2591 | if (INTEGERP (w->orig_top)) | ||
| 2592 | XSETFASTINT (w->orig_top, XFASTINT (w->orig_top) + n); | ||
| 2593 | if (INTEGERP (w->orig_height)) | ||
| 2594 | XSETFASTINT (w->orig_height, XFASTINT (w->orig_height) - n); | ||
| 2595 | |||
| 2596 | /* Handle just the top child in a vertical split. */ | ||
| 2597 | if (!NILP (w->vchild)) | ||
| 2598 | x_change_window_heights (w->vchild, n); | ||
| 2599 | |||
| 2600 | /* Adjust all children in a horizontal split. */ | ||
| 2601 | for (window = w->hchild; !NILP (window); window = w->next) | ||
| 2602 | { | ||
| 2603 | w = XWINDOW (window); | ||
| 2604 | x_change_window_heights (window, n); | ||
| 2605 | } | ||
| 2606 | } | ||
| 2607 | |||
| 2608 | void | 1889 | void |
| 2609 | x_set_menu_bar_lines (f, value, oldval) | 1890 | x_set_menu_bar_lines (f, value, oldval) |
| 2610 | struct frame *f; | 1891 | struct frame *f; |
| @@ -2683,7 +1964,7 @@ x_set_tool_bar_lines (f, value, oldval) | |||
| 2683 | } | 1964 | } |
| 2684 | 1965 | ||
| 2685 | FRAME_TOOL_BAR_LINES (f) = nlines; | 1966 | FRAME_TOOL_BAR_LINES (f) = nlines; |
| 2686 | x_change_window_heights (root_window, delta); | 1967 | change_window_heights (root_window, delta); |
| 2687 | adjust_glyphs (f); | 1968 | adjust_glyphs (f); |
| 2688 | 1969 | ||
| 2689 | /* We also have to make sure that the internal border at the top of | 1970 | /* We also have to make sure that the internal border at the top of |
| @@ -2848,269 +2129,21 @@ x_set_title (f, name, old_name) | |||
| 2848 | UNBLOCK_INPUT; | 2129 | UNBLOCK_INPUT; |
| 2849 | } | 2130 | } |
| 2850 | } | 2131 | } |
| 2851 | |||
| 2852 | void | ||
| 2853 | x_set_autoraise (f, arg, oldval) | ||
| 2854 | struct frame *f; | ||
| 2855 | Lisp_Object arg, oldval; | ||
| 2856 | { | ||
| 2857 | f->auto_raise = !EQ (Qnil, arg); | ||
| 2858 | } | ||
| 2859 | |||
| 2860 | void | ||
| 2861 | x_set_autolower (f, arg, oldval) | ||
| 2862 | struct frame *f; | ||
| 2863 | Lisp_Object arg, oldval; | ||
| 2864 | { | ||
| 2865 | f->auto_lower = !EQ (Qnil, arg); | ||
| 2866 | } | ||
| 2867 | |||
| 2868 | void | ||
| 2869 | x_set_unsplittable (f, arg, oldval) | ||
| 2870 | struct frame *f; | ||
| 2871 | Lisp_Object arg, oldval; | ||
| 2872 | { | ||
| 2873 | f->no_split = !NILP (arg); | ||
| 2874 | } | ||
| 2875 | 2132 | ||
| 2876 | void | ||
| 2877 | x_set_vertical_scroll_bars (f, arg, oldval) | ||
| 2878 | struct frame *f; | ||
| 2879 | Lisp_Object arg, oldval; | ||
| 2880 | { | ||
| 2881 | if ((EQ (arg, Qleft) && FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (f)) | ||
| 2882 | || (EQ (arg, Qright) && FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f)) | ||
| 2883 | || (NILP (arg) && FRAME_HAS_VERTICAL_SCROLL_BARS (f)) | ||
| 2884 | || (!NILP (arg) && ! FRAME_HAS_VERTICAL_SCROLL_BARS (f))) | ||
| 2885 | { | ||
| 2886 | FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = NILP (arg) ? | ||
| 2887 | vertical_scroll_bar_none : | ||
| 2888 | /* Put scroll bars on the right by default, as is conventional | ||
| 2889 | on MS-Windows. */ | ||
| 2890 | EQ (Qleft, arg) | ||
| 2891 | ? vertical_scroll_bar_left | ||
| 2892 | : vertical_scroll_bar_right; | ||
| 2893 | |||
| 2894 | /* We set this parameter before creating the window for the | ||
| 2895 | frame, so we can get the geometry right from the start. | ||
| 2896 | However, if the window hasn't been created yet, we shouldn't | ||
| 2897 | call x_set_window_size. */ | ||
| 2898 | if (FRAME_W32_WINDOW (f)) | ||
| 2899 | x_set_window_size (f, 0, FRAME_WIDTH (f), FRAME_HEIGHT (f)); | ||
| 2900 | do_pending_window_change (0); | ||
| 2901 | } | ||
| 2902 | } | ||
| 2903 | 2133 | ||
| 2904 | void | 2134 | x_set_scroll_bar_default_width (f) |
| 2905 | x_set_scroll_bar_width (f, arg, oldval) | ||
| 2906 | struct frame *f; | 2135 | struct frame *f; |
| 2907 | Lisp_Object arg, oldval; | ||
| 2908 | { | 2136 | { |
| 2909 | int wid = FONT_WIDTH (f->output_data.w32->font); | 2137 | int wid = FONT_WIDTH (f->output_data.w32->font); |
| 2910 | 2138 | ||
| 2911 | if (NILP (arg)) | 2139 | FRAME_SCROLL_BAR_PIXEL_WIDTH (f) = GetSystemMetrics (SM_CXVSCROLL); |
| 2912 | { | 2140 | FRAME_SCROLL_BAR_COLS (f) = (FRAME_SCROLL_BAR_PIXEL_WIDTH (f) + |
| 2913 | FRAME_SCROLL_BAR_PIXEL_WIDTH (f) = GetSystemMetrics (SM_CXVSCROLL); | 2141 | wid - 1) / wid; |
| 2914 | FRAME_SCROLL_BAR_COLS (f) = (FRAME_SCROLL_BAR_PIXEL_WIDTH (f) + | ||
| 2915 | wid - 1) / wid; | ||
| 2916 | if (FRAME_W32_WINDOW (f)) | ||
| 2917 | x_set_window_size (f, 0, FRAME_WIDTH (f), FRAME_HEIGHT (f)); | ||
| 2918 | do_pending_window_change (0); | ||
| 2919 | } | ||
| 2920 | else if (INTEGERP (arg) && XINT (arg) > 0 | ||
| 2921 | && XFASTINT (arg) != FRAME_SCROLL_BAR_PIXEL_WIDTH (f)) | ||
| 2922 | { | ||
| 2923 | FRAME_SCROLL_BAR_PIXEL_WIDTH (f) = XFASTINT (arg); | ||
| 2924 | FRAME_SCROLL_BAR_COLS (f) = (FRAME_SCROLL_BAR_PIXEL_WIDTH (f) | ||
| 2925 | + wid-1) / wid; | ||
| 2926 | if (FRAME_W32_WINDOW (f)) | ||
| 2927 | x_set_window_size (f, 0, FRAME_WIDTH (f), FRAME_HEIGHT (f)); | ||
| 2928 | do_pending_window_change (0); | ||
| 2929 | } | ||
| 2930 | change_frame_size (f, 0, FRAME_WIDTH (f), 0, 0, 0); | ||
| 2931 | XWINDOW (FRAME_SELECTED_WINDOW (f))->cursor.hpos = 0; | ||
| 2932 | XWINDOW (FRAME_SELECTED_WINDOW (f))->cursor.x = 0; | ||
| 2933 | } | 2142 | } |
| 2143 | |||
| 2934 | 2144 | ||
| 2935 | /* Subroutines of creating a frame. */ | 2145 | /* Subroutines of creating a frame. */ |
| 2936 | 2146 | ||
| 2937 | /* Make sure that Vx_resource_name is set to a reasonable value. | ||
| 2938 | Fix it up, or set it to `emacs' if it is too hopeless. */ | ||
| 2939 | |||
| 2940 | static void | ||
| 2941 | validate_x_resource_name () | ||
| 2942 | { | ||
| 2943 | int len = 0; | ||
| 2944 | /* Number of valid characters in the resource name. */ | ||
| 2945 | int good_count = 0; | ||
| 2946 | /* Number of invalid characters in the resource name. */ | ||
| 2947 | int bad_count = 0; | ||
| 2948 | Lisp_Object new; | ||
| 2949 | int i; | ||
| 2950 | |||
| 2951 | if (STRINGP (Vx_resource_name)) | ||
| 2952 | { | ||
| 2953 | unsigned char *p = SDATA (Vx_resource_name); | ||
| 2954 | int i; | ||
| 2955 | |||
| 2956 | len = SBYTES (Vx_resource_name); | ||
| 2957 | |||
| 2958 | /* Only letters, digits, - and _ are valid in resource names. | ||
| 2959 | Count the valid characters and count the invalid ones. */ | ||
| 2960 | for (i = 0; i < len; i++) | ||
| 2961 | { | ||
| 2962 | int c = p[i]; | ||
| 2963 | if (! ((c >= 'a' && c <= 'z') | ||
| 2964 | || (c >= 'A' && c <= 'Z') | ||
| 2965 | || (c >= '0' && c <= '9') | ||
| 2966 | || c == '-' || c == '_')) | ||
| 2967 | bad_count++; | ||
| 2968 | else | ||
| 2969 | good_count++; | ||
| 2970 | } | ||
| 2971 | } | ||
| 2972 | else | ||
| 2973 | /* Not a string => completely invalid. */ | ||
| 2974 | bad_count = 5, good_count = 0; | ||
| 2975 | |||
| 2976 | /* If name is valid already, return. */ | ||
| 2977 | if (bad_count == 0) | ||
| 2978 | return; | ||
| 2979 | |||
| 2980 | /* If name is entirely invalid, or nearly so, use `emacs'. */ | ||
| 2981 | if (good_count == 0 | ||
| 2982 | || (good_count == 1 && bad_count > 0)) | ||
| 2983 | { | ||
| 2984 | Vx_resource_name = build_string ("emacs"); | ||
| 2985 | return; | ||
| 2986 | } | ||
| 2987 | |||
| 2988 | /* Name is partly valid. Copy it and replace the invalid characters | ||
| 2989 | with underscores. */ | ||
| 2990 | |||
| 2991 | Vx_resource_name = new = Fcopy_sequence (Vx_resource_name); | ||
| 2992 | |||
| 2993 | for (i = 0; i < len; i++) | ||
| 2994 | { | ||
| 2995 | int c = SREF (new, i); | ||
| 2996 | if (! ((c >= 'a' && c <= 'z') | ||
| 2997 | || (c >= 'A' && c <= 'Z') | ||
| 2998 | || (c >= '0' && c <= '9') | ||
| 2999 | || c == '-' || c == '_')) | ||
| 3000 | SSET (new, i, '_'); | ||
| 3001 | } | ||
| 3002 | } | ||
| 3003 | |||
| 3004 | |||
| 3005 | extern char *x_get_string_resource (); | ||
| 3006 | |||
| 3007 | DEFUN ("x-get-resource", Fx_get_resource, Sx_get_resource, 2, 4, 0, | ||
| 3008 | doc: /* Return the value of ATTRIBUTE, of class CLASS, from the X defaults database. | ||
| 3009 | This uses `INSTANCE.ATTRIBUTE' as the key and `Emacs.CLASS' as the | ||
| 3010 | class, where INSTANCE is the name under which Emacs was invoked, or | ||
| 3011 | the name specified by the `-name' or `-rn' command-line arguments. | ||
| 3012 | |||
| 3013 | The optional arguments COMPONENT and SUBCLASS add to the key and the | ||
| 3014 | class, respectively. You must specify both of them or neither. | ||
| 3015 | If you specify them, the key is `INSTANCE.COMPONENT.ATTRIBUTE' | ||
| 3016 | and the class is `Emacs.CLASS.SUBCLASS'. */) | ||
| 3017 | (attribute, class, component, subclass) | ||
| 3018 | Lisp_Object attribute, class, component, subclass; | ||
| 3019 | { | ||
| 3020 | register char *value; | ||
| 3021 | char *name_key; | ||
| 3022 | char *class_key; | ||
| 3023 | |||
| 3024 | CHECK_STRING (attribute); | ||
| 3025 | CHECK_STRING (class); | ||
| 3026 | |||
| 3027 | if (!NILP (component)) | ||
| 3028 | CHECK_STRING (component); | ||
| 3029 | if (!NILP (subclass)) | ||
| 3030 | CHECK_STRING (subclass); | ||
| 3031 | if (NILP (component) != NILP (subclass)) | ||
| 3032 | error ("x-get-resource: must specify both COMPONENT and SUBCLASS or neither"); | ||
| 3033 | |||
| 3034 | validate_x_resource_name (); | ||
| 3035 | |||
| 3036 | /* Allocate space for the components, the dots which separate them, | ||
| 3037 | and the final '\0'. Make them big enough for the worst case. */ | ||
| 3038 | name_key = (char *) alloca (SBYTES (Vx_resource_name) | ||
| 3039 | + (STRINGP (component) | ||
| 3040 | ? SBYTES (component) : 0) | ||
| 3041 | + SBYTES (attribute) | ||
| 3042 | + 3); | ||
| 3043 | |||
| 3044 | class_key = (char *) alloca ((sizeof (EMACS_CLASS) - 1) | ||
| 3045 | + SBYTES (class) | ||
| 3046 | + (STRINGP (subclass) | ||
| 3047 | ? SBYTES (subclass) : 0) | ||
| 3048 | + 3); | ||
| 3049 | |||
| 3050 | /* Start with emacs.FRAMENAME for the name (the specific one) | ||
| 3051 | and with `Emacs' for the class key (the general one). */ | ||
| 3052 | strcpy (name_key, SDATA (Vx_resource_name)); | ||
| 3053 | strcpy (class_key, EMACS_CLASS); | ||
| 3054 | |||
| 3055 | strcat (class_key, "."); | ||
| 3056 | strcat (class_key, SDATA (class)); | ||
| 3057 | |||
| 3058 | if (!NILP (component)) | ||
| 3059 | { | ||
| 3060 | strcat (class_key, "."); | ||
| 3061 | strcat (class_key, SDATA (subclass)); | ||
| 3062 | |||
| 3063 | strcat (name_key, "."); | ||
| 3064 | strcat (name_key, SDATA (component)); | ||
| 3065 | } | ||
| 3066 | |||
| 3067 | strcat (name_key, "."); | ||
| 3068 | strcat (name_key, SDATA (attribute)); | ||
| 3069 | |||
| 3070 | value = x_get_string_resource (check_x_display_info (Qnil)->xrdb, | ||
| 3071 | name_key, class_key); | ||
| 3072 | |||
| 3073 | if (value != (char *) 0) | ||
| 3074 | return build_string (value); | ||
| 3075 | else | ||
| 3076 | return Qnil; | ||
| 3077 | } | ||
| 3078 | |||
| 3079 | /* Used when C code wants a resource value. */ | ||
| 3080 | |||
| 3081 | char * | ||
| 3082 | x_get_resource_string (attribute, class) | ||
| 3083 | char *attribute, *class; | ||
| 3084 | { | ||
| 3085 | char *name_key; | ||
| 3086 | char *class_key; | ||
| 3087 | struct frame *sf = SELECTED_FRAME (); | ||
| 3088 | |||
| 3089 | /* Allocate space for the components, the dots which separate them, | ||
| 3090 | and the final '\0'. */ | ||
| 3091 | name_key = (char *) alloca (SBYTES (Vinvocation_name) | ||
| 3092 | + strlen (attribute) + 2); | ||
| 3093 | class_key = (char *) alloca ((sizeof (EMACS_CLASS) - 1) | ||
| 3094 | + strlen (class) + 2); | ||
| 3095 | |||
| 3096 | sprintf (name_key, "%s.%s", | ||
| 3097 | SDATA (Vinvocation_name), | ||
| 3098 | attribute); | ||
| 3099 | sprintf (class_key, "%s.%s", EMACS_CLASS, class); | ||
| 3100 | |||
| 3101 | return x_get_string_resource (FRAME_X_DISPLAY_INFO (sf)->xrdb, | ||
| 3102 | name_key, class_key); | ||
| 3103 | } | ||
| 3104 | |||
| 3105 | /* Types we might convert a resource string into. */ | ||
| 3106 | enum resource_types | ||
| 3107 | { | ||
| 3108 | RES_TYPE_NUMBER, | ||
| 3109 | RES_TYPE_FLOAT, | ||
| 3110 | RES_TYPE_BOOLEAN, | ||
| 3111 | RES_TYPE_STRING, | ||
| 3112 | RES_TYPE_SYMBOL | ||
| 3113 | }; | ||
| 3114 | 2147 | ||
| 3115 | /* Return the value of parameter PARAM. | 2148 | /* Return the value of parameter PARAM. |
| 3116 | 2149 | ||
| @@ -3130,295 +2163,8 @@ w32_get_arg (alist, param, attribute, class, type) | |||
| 3130 | char *class; | 2163 | char *class; |
| 3131 | enum resource_types type; | 2164 | enum resource_types type; |
| 3132 | { | 2165 | { |
| 3133 | register Lisp_Object tem; | 2166 | return x_get_arg (check_x_display_info (Qnil), |
| 3134 | 2167 | alist, param, attribute, class, type); | |
| 3135 | tem = Fassq (param, alist); | ||
| 3136 | if (EQ (tem, Qnil)) | ||
| 3137 | tem = Fassq (param, Vdefault_frame_alist); | ||
| 3138 | if (EQ (tem, Qnil)) | ||
| 3139 | { | ||
| 3140 | |||
| 3141 | if (attribute) | ||
| 3142 | { | ||
| 3143 | tem = Fx_get_resource (build_string (attribute), | ||
| 3144 | build_string (class), | ||
| 3145 | Qnil, Qnil); | ||
| 3146 | |||
| 3147 | if (NILP (tem)) | ||
| 3148 | return Qunbound; | ||
| 3149 | |||
| 3150 | switch (type) | ||
| 3151 | { | ||
| 3152 | case RES_TYPE_NUMBER: | ||
| 3153 | return make_number (atoi (SDATA (tem))); | ||
| 3154 | |||
| 3155 | case RES_TYPE_FLOAT: | ||
| 3156 | return make_float (atof (SDATA (tem))); | ||
| 3157 | |||
| 3158 | case RES_TYPE_BOOLEAN: | ||
| 3159 | tem = Fdowncase (tem); | ||
| 3160 | if (!strcmp (SDATA (tem), "on") | ||
| 3161 | || !strcmp (SDATA (tem), "true")) | ||
| 3162 | return Qt; | ||
| 3163 | else | ||
| 3164 | return Qnil; | ||
| 3165 | |||
| 3166 | case RES_TYPE_STRING: | ||
| 3167 | return tem; | ||
| 3168 | |||
| 3169 | case RES_TYPE_SYMBOL: | ||
| 3170 | /* As a special case, we map the values `true' and `on' | ||
| 3171 | to Qt, and `false' and `off' to Qnil. */ | ||
| 3172 | { | ||
| 3173 | Lisp_Object lower; | ||
| 3174 | lower = Fdowncase (tem); | ||
| 3175 | if (!strcmp (SDATA (lower), "on") | ||
| 3176 | || !strcmp (SDATA (lower), "true")) | ||
| 3177 | return Qt; | ||
| 3178 | else if (!strcmp (SDATA (lower), "off") | ||
| 3179 | || !strcmp (SDATA (lower), "false")) | ||
| 3180 | return Qnil; | ||
| 3181 | else | ||
| 3182 | return Fintern (tem, Qnil); | ||
| 3183 | } | ||
| 3184 | |||
| 3185 | default: | ||
| 3186 | abort (); | ||
| 3187 | } | ||
| 3188 | } | ||
| 3189 | else | ||
| 3190 | return Qunbound; | ||
| 3191 | } | ||
| 3192 | return Fcdr (tem); | ||
| 3193 | } | ||
| 3194 | |||
| 3195 | /* Record in frame F the specified or default value according to ALIST | ||
| 3196 | of the parameter named PROP (a Lisp symbol). | ||
| 3197 | If no value is specified for PROP, look for an X default for XPROP | ||
| 3198 | on the frame named NAME. | ||
| 3199 | If that is not found either, use the value DEFLT. */ | ||
| 3200 | |||
| 3201 | static Lisp_Object | ||
| 3202 | x_default_parameter (f, alist, prop, deflt, xprop, xclass, type) | ||
| 3203 | struct frame *f; | ||
| 3204 | Lisp_Object alist; | ||
| 3205 | Lisp_Object prop; | ||
| 3206 | Lisp_Object deflt; | ||
| 3207 | char *xprop; | ||
| 3208 | char *xclass; | ||
| 3209 | enum resource_types type; | ||
| 3210 | { | ||
| 3211 | Lisp_Object tem; | ||
| 3212 | |||
| 3213 | tem = w32_get_arg (alist, prop, xprop, xclass, type); | ||
| 3214 | if (EQ (tem, Qunbound)) | ||
| 3215 | tem = deflt; | ||
| 3216 | x_set_frame_parameters (f, Fcons (Fcons (prop, tem), Qnil)); | ||
| 3217 | return tem; | ||
| 3218 | } | ||
| 3219 | |||
| 3220 | DEFUN ("x-parse-geometry", Fx_parse_geometry, Sx_parse_geometry, 1, 1, 0, | ||
| 3221 | doc: /* Parse an X-style geometry string STRING. | ||
| 3222 | Returns an alist of the form ((top . TOP), (left . LEFT) ... ). | ||
| 3223 | The properties returned may include `top', `left', `height', and `width'. | ||
| 3224 | The value of `left' or `top' may be an integer, | ||
| 3225 | or a list (+ N) meaning N pixels relative to top/left corner, | ||
| 3226 | or a list (- N) meaning -N pixels relative to bottom/right corner. */) | ||
| 3227 | (string) | ||
| 3228 | Lisp_Object string; | ||
| 3229 | { | ||
| 3230 | int geometry, x, y; | ||
| 3231 | unsigned int width, height; | ||
| 3232 | Lisp_Object result; | ||
| 3233 | |||
| 3234 | CHECK_STRING (string); | ||
| 3235 | |||
| 3236 | geometry = XParseGeometry ((char *) SDATA (string), | ||
| 3237 | &x, &y, &width, &height); | ||
| 3238 | |||
| 3239 | result = Qnil; | ||
| 3240 | if (geometry & XValue) | ||
| 3241 | { | ||
| 3242 | Lisp_Object element; | ||
| 3243 | |||
| 3244 | if (x >= 0 && (geometry & XNegative)) | ||
| 3245 | element = Fcons (Qleft, Fcons (Qminus, Fcons (make_number (-x), Qnil))); | ||
| 3246 | else if (x < 0 && ! (geometry & XNegative)) | ||
| 3247 | element = Fcons (Qleft, Fcons (Qplus, Fcons (make_number (x), Qnil))); | ||
| 3248 | else | ||
| 3249 | element = Fcons (Qleft, make_number (x)); | ||
| 3250 | result = Fcons (element, result); | ||
| 3251 | } | ||
| 3252 | |||
| 3253 | if (geometry & YValue) | ||
| 3254 | { | ||
| 3255 | Lisp_Object element; | ||
| 3256 | |||
| 3257 | if (y >= 0 && (geometry & YNegative)) | ||
| 3258 | element = Fcons (Qtop, Fcons (Qminus, Fcons (make_number (-y), Qnil))); | ||
| 3259 | else if (y < 0 && ! (geometry & YNegative)) | ||
| 3260 | element = Fcons (Qtop, Fcons (Qplus, Fcons (make_number (y), Qnil))); | ||
| 3261 | else | ||
| 3262 | element = Fcons (Qtop, make_number (y)); | ||
| 3263 | result = Fcons (element, result); | ||
| 3264 | } | ||
| 3265 | |||
| 3266 | if (geometry & WidthValue) | ||
| 3267 | result = Fcons (Fcons (Qwidth, make_number (width)), result); | ||
| 3268 | if (geometry & HeightValue) | ||
| 3269 | result = Fcons (Fcons (Qheight, make_number (height)), result); | ||
| 3270 | |||
| 3271 | return result; | ||
| 3272 | } | ||
| 3273 | |||
| 3274 | /* Calculate the desired size and position of this window, | ||
| 3275 | and return the flags saying which aspects were specified. | ||
| 3276 | |||
| 3277 | This function does not make the coordinates positive. */ | ||
| 3278 | |||
| 3279 | #define DEFAULT_ROWS 40 | ||
| 3280 | #define DEFAULT_COLS 80 | ||
| 3281 | |||
| 3282 | static int | ||
| 3283 | x_figure_window_size (f, parms) | ||
| 3284 | struct frame *f; | ||
| 3285 | Lisp_Object parms; | ||
| 3286 | { | ||
| 3287 | register Lisp_Object tem0, tem1, tem2; | ||
| 3288 | long window_prompting = 0; | ||
| 3289 | |||
| 3290 | /* Default values if we fall through. | ||
| 3291 | Actually, if that happens we should get | ||
| 3292 | window manager prompting. */ | ||
| 3293 | SET_FRAME_WIDTH (f, DEFAULT_COLS); | ||
| 3294 | f->height = DEFAULT_ROWS; | ||
| 3295 | /* Window managers expect that if program-specified | ||
| 3296 | positions are not (0,0), they're intentional, not defaults. */ | ||
| 3297 | f->output_data.w32->top_pos = 0; | ||
| 3298 | f->output_data.w32->left_pos = 0; | ||
| 3299 | |||
| 3300 | /* Ensure that old new_width and new_height will not override the | ||
| 3301 | values set here. */ | ||
| 3302 | FRAME_NEW_WIDTH (f) = 0; | ||
| 3303 | FRAME_NEW_HEIGHT (f) = 0; | ||
| 3304 | |||
| 3305 | tem0 = w32_get_arg (parms, Qheight, 0, 0, RES_TYPE_NUMBER); | ||
| 3306 | tem1 = w32_get_arg (parms, Qwidth, 0, 0, RES_TYPE_NUMBER); | ||
| 3307 | tem2 = w32_get_arg (parms, Quser_size, 0, 0, RES_TYPE_NUMBER); | ||
| 3308 | if (! EQ (tem0, Qunbound) || ! EQ (tem1, Qunbound)) | ||
| 3309 | { | ||
| 3310 | if (!EQ (tem0, Qunbound)) | ||
| 3311 | { | ||
| 3312 | CHECK_NUMBER (tem0); | ||
| 3313 | f->height = XINT (tem0); | ||
| 3314 | } | ||
| 3315 | if (!EQ (tem1, Qunbound)) | ||
| 3316 | { | ||
| 3317 | CHECK_NUMBER (tem1); | ||
| 3318 | SET_FRAME_WIDTH (f, XINT (tem1)); | ||
| 3319 | } | ||
| 3320 | if (!NILP (tem2) && !EQ (tem2, Qunbound)) | ||
| 3321 | window_prompting |= USSize; | ||
| 3322 | else | ||
| 3323 | window_prompting |= PSize; | ||
| 3324 | } | ||
| 3325 | |||
| 3326 | f->output_data.w32->vertical_scroll_bar_extra | ||
| 3327 | = (!FRAME_HAS_VERTICAL_SCROLL_BARS (f) | ||
| 3328 | ? 0 | ||
| 3329 | : FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0 | ||
| 3330 | ? FRAME_SCROLL_BAR_PIXEL_WIDTH (f) | ||
| 3331 | : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.w32->font))); | ||
| 3332 | |||
| 3333 | compute_fringe_widths (f, 0); | ||
| 3334 | |||
| 3335 | f->output_data.w32->pixel_width = CHAR_TO_PIXEL_WIDTH (f, f->width); | ||
| 3336 | f->output_data.w32->pixel_height = CHAR_TO_PIXEL_HEIGHT (f, f->height); | ||
| 3337 | |||
| 3338 | tem0 = w32_get_arg (parms, Qtop, 0, 0, RES_TYPE_NUMBER); | ||
| 3339 | tem1 = w32_get_arg (parms, Qleft, 0, 0, RES_TYPE_NUMBER); | ||
| 3340 | tem2 = w32_get_arg (parms, Quser_position, 0, 0, RES_TYPE_NUMBER); | ||
| 3341 | if (! EQ (tem0, Qunbound) || ! EQ (tem1, Qunbound)) | ||
| 3342 | { | ||
| 3343 | if (EQ (tem0, Qminus)) | ||
| 3344 | { | ||
| 3345 | f->output_data.w32->top_pos = 0; | ||
| 3346 | window_prompting |= YNegative; | ||
| 3347 | } | ||
| 3348 | else if (CONSP (tem0) && EQ (XCAR (tem0), Qminus) | ||
| 3349 | && CONSP (XCDR (tem0)) | ||
| 3350 | && INTEGERP (XCAR (XCDR (tem0)))) | ||
| 3351 | { | ||
| 3352 | f->output_data.w32->top_pos = - XINT (XCAR (XCDR (tem0))); | ||
| 3353 | window_prompting |= YNegative; | ||
| 3354 | } | ||
| 3355 | else if (CONSP (tem0) && EQ (XCAR (tem0), Qplus) | ||
| 3356 | && CONSP (XCDR (tem0)) | ||
| 3357 | && INTEGERP (XCAR (XCDR (tem0)))) | ||
| 3358 | { | ||
| 3359 | f->output_data.w32->top_pos = XINT (XCAR (XCDR (tem0))); | ||
| 3360 | } | ||
| 3361 | else if (EQ (tem0, Qunbound)) | ||
| 3362 | f->output_data.w32->top_pos = 0; | ||
| 3363 | else | ||
| 3364 | { | ||
| 3365 | CHECK_NUMBER (tem0); | ||
| 3366 | f->output_data.w32->top_pos = XINT (tem0); | ||
| 3367 | if (f->output_data.w32->top_pos < 0) | ||
| 3368 | window_prompting |= YNegative; | ||
| 3369 | } | ||
| 3370 | |||
| 3371 | if (EQ (tem1, Qminus)) | ||
| 3372 | { | ||
| 3373 | f->output_data.w32->left_pos = 0; | ||
| 3374 | window_prompting |= XNegative; | ||
| 3375 | } | ||
| 3376 | else if (CONSP (tem1) && EQ (XCAR (tem1), Qminus) | ||
| 3377 | && CONSP (XCDR (tem1)) | ||
| 3378 | && INTEGERP (XCAR (XCDR (tem1)))) | ||
| 3379 | { | ||
| 3380 | f->output_data.w32->left_pos = - XINT (XCAR (XCDR (tem1))); | ||
| 3381 | window_prompting |= XNegative; | ||
| 3382 | } | ||
| 3383 | else if (CONSP (tem1) && EQ (XCAR (tem1), Qplus) | ||
| 3384 | && CONSP (XCDR (tem1)) | ||
| 3385 | && INTEGERP (XCAR (XCDR (tem1)))) | ||
| 3386 | { | ||
| 3387 | f->output_data.w32->left_pos = XINT (XCAR (XCDR (tem1))); | ||
| 3388 | } | ||
| 3389 | else if (EQ (tem1, Qunbound)) | ||
| 3390 | f->output_data.w32->left_pos = 0; | ||
| 3391 | else | ||
| 3392 | { | ||
| 3393 | CHECK_NUMBER (tem1); | ||
| 3394 | f->output_data.w32->left_pos = XINT (tem1); | ||
| 3395 | if (f->output_data.w32->left_pos < 0) | ||
| 3396 | window_prompting |= XNegative; | ||
| 3397 | } | ||
| 3398 | |||
| 3399 | if (!NILP (tem2) && ! EQ (tem2, Qunbound)) | ||
| 3400 | window_prompting |= USPosition; | ||
| 3401 | else | ||
| 3402 | window_prompting |= PPosition; | ||
| 3403 | } | ||
| 3404 | |||
| 3405 | if (f->output_data.w32->want_fullscreen != FULLSCREEN_NONE) | ||
| 3406 | { | ||
| 3407 | int left, top; | ||
| 3408 | int width, height; | ||
| 3409 | |||
| 3410 | /* It takes both for some WM:s to place it where we want */ | ||
| 3411 | window_prompting = USPosition | PPosition; | ||
| 3412 | x_fullscreen_adjust (f, &width, &height, &top, &left); | ||
| 3413 | f->width = width; | ||
| 3414 | f->height = height; | ||
| 3415 | f->output_data.w32->pixel_width = CHAR_TO_PIXEL_WIDTH (f, f->width); | ||
| 3416 | f->output_data.w32->pixel_height = CHAR_TO_PIXEL_HEIGHT (f, f->height); | ||
| 3417 | f->output_data.w32->left_pos = left; | ||
| 3418 | f->output_data.w32->top_pos = top; | ||
| 3419 | } | ||
| 3420 | |||
| 3421 | return window_prompting; | ||
| 3422 | } | 2168 | } |
| 3423 | 2169 | ||
| 3424 | 2170 | ||
| @@ -5538,6 +4284,7 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 5538 | 4284 | ||
| 5539 | /* Note that Windows does support scroll bars. */ | 4285 | /* Note that Windows does support scroll bars. */ |
| 5540 | FRAME_CAN_HAVE_SCROLL_BARS (f) = 1; | 4286 | FRAME_CAN_HAVE_SCROLL_BARS (f) = 1; |
| 4287 | |||
| 5541 | /* By default, make scrollbars the system standard width. */ | 4288 | /* By default, make scrollbars the system standard width. */ |
| 5542 | f->scroll_bar_pixel_width = GetSystemMetrics (SM_CXVSCROLL); | 4289 | f->scroll_bar_pixel_width = GetSystemMetrics (SM_CXVSCROLL); |
| 5543 | 4290 | ||
| @@ -5691,52 +4438,7 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 5691 | f->output_data.w32->hourglass_cursor = w32_load_cursor (IDC_WAIT); | 4438 | f->output_data.w32->hourglass_cursor = w32_load_cursor (IDC_WAIT); |
| 5692 | f->output_data.w32->horizontal_drag_cursor = w32_load_cursor (IDC_SIZEWE); | 4439 | f->output_data.w32->horizontal_drag_cursor = w32_load_cursor (IDC_SIZEWE); |
| 5693 | 4440 | ||
| 5694 | /* Add the tool-bar height to the initial frame height so that the | 4441 | window_prompting = x_figure_window_size (f, parms, 1); |
| 5695 | user gets a text display area of the size he specified with -g or | ||
| 5696 | via .Xdefaults. Later changes of the tool-bar height don't | ||
| 5697 | change the frame size. This is done so that users can create | ||
| 5698 | tall Emacs frames without having to guess how tall the tool-bar | ||
| 5699 | will get. */ | ||
| 5700 | if (FRAME_TOOL_BAR_LINES (f)) | ||
| 5701 | { | ||
| 5702 | int margin, relief, bar_height; | ||
| 5703 | |||
| 5704 | relief = (tool_bar_button_relief >= 0 | ||
| 5705 | ? tool_bar_button_relief | ||
| 5706 | : DEFAULT_TOOL_BAR_BUTTON_RELIEF); | ||
| 5707 | |||
| 5708 | if (INTEGERP (Vtool_bar_button_margin) | ||
| 5709 | && XINT (Vtool_bar_button_margin) > 0) | ||
| 5710 | margin = XFASTINT (Vtool_bar_button_margin); | ||
| 5711 | else if (CONSP (Vtool_bar_button_margin) | ||
| 5712 | && INTEGERP (XCDR (Vtool_bar_button_margin)) | ||
| 5713 | && XINT (XCDR (Vtool_bar_button_margin)) > 0) | ||
| 5714 | margin = XFASTINT (XCDR (Vtool_bar_button_margin)); | ||
| 5715 | else | ||
| 5716 | margin = 0; | ||
| 5717 | |||
| 5718 | bar_height = DEFAULT_TOOL_BAR_IMAGE_HEIGHT + 2 * margin + 2 * relief; | ||
| 5719 | f->height += (bar_height + CANON_Y_UNIT (f) - 1) / CANON_Y_UNIT (f); | ||
| 5720 | } | ||
| 5721 | |||
| 5722 | window_prompting = x_figure_window_size (f, parms); | ||
| 5723 | |||
| 5724 | if (window_prompting & XNegative) | ||
| 5725 | { | ||
| 5726 | if (window_prompting & YNegative) | ||
| 5727 | f->output_data.w32->win_gravity = SouthEastGravity; | ||
| 5728 | else | ||
| 5729 | f->output_data.w32->win_gravity = NorthEastGravity; | ||
| 5730 | } | ||
| 5731 | else | ||
| 5732 | { | ||
| 5733 | if (window_prompting & YNegative) | ||
| 5734 | f->output_data.w32->win_gravity = SouthWestGravity; | ||
| 5735 | else | ||
| 5736 | f->output_data.w32->win_gravity = NorthWestGravity; | ||
| 5737 | } | ||
| 5738 | |||
| 5739 | f->output_data.w32->size_hint_flags = window_prompting; | ||
| 5740 | 4442 | ||
| 5741 | tem = w32_get_arg (parms, Qunsplittable, 0, 0, RES_TYPE_BOOLEAN); | 4443 | tem = w32_get_arg (parms, Qunsplittable, 0, 0, RES_TYPE_BOOLEAN); |
| 5742 | f->no_split = minibuffer_only || EQ (tem, Qt); | 4444 | f->no_split = minibuffer_only || EQ (tem, Qt); |
| @@ -14153,7 +12855,7 @@ x_create_tip_frame (dpyinfo, parms, text) | |||
| 14153 | f->output_data.w32->dwStyle = WS_BORDER | WS_POPUP | WS_DISABLED; | 12855 | f->output_data.w32->dwStyle = WS_BORDER | WS_POPUP | WS_DISABLED; |
| 14154 | f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window; | 12856 | f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window; |
| 14155 | 12857 | ||
| 14156 | window_prompting = x_figure_window_size (f, parms); | 12858 | window_prompting = x_figure_window_size (f, parms, 0); |
| 14157 | 12859 | ||
| 14158 | /* No fringes on tip frame. */ | 12860 | /* No fringes on tip frame. */ |
| 14159 | f->output_data.w32->fringes_extra = 0; | 12861 | f->output_data.w32->fringes_extra = 0; |
| @@ -14161,23 +12863,6 @@ x_create_tip_frame (dpyinfo, parms, text) | |||
| 14161 | f->output_data.w32->left_fringe_width = 0; | 12863 | f->output_data.w32->left_fringe_width = 0; |
| 14162 | f->output_data.w32->right_fringe_width = 0; | 12864 | f->output_data.w32->right_fringe_width = 0; |
| 14163 | 12865 | ||
| 14164 | if (window_prompting & XNegative) | ||
| 14165 | { | ||
| 14166 | if (window_prompting & YNegative) | ||
| 14167 | f->output_data.w32->win_gravity = SouthEastGravity; | ||
| 14168 | else | ||
| 14169 | f->output_data.w32->win_gravity = NorthEastGravity; | ||
| 14170 | } | ||
| 14171 | else | ||
| 14172 | { | ||
| 14173 | if (window_prompting & YNegative) | ||
| 14174 | f->output_data.w32->win_gravity = SouthWestGravity; | ||
| 14175 | else | ||
| 14176 | f->output_data.w32->win_gravity = NorthWestGravity; | ||
| 14177 | } | ||
| 14178 | |||
| 14179 | f->output_data.w32->size_hint_flags = window_prompting; | ||
| 14180 | |||
| 14181 | BLOCK_INPUT; | 12866 | BLOCK_INPUT; |
| 14182 | my_create_tip_window (f); | 12867 | my_create_tip_window (f); |
| 14183 | UNBLOCK_INPUT; | 12868 | UNBLOCK_INPUT; |
| @@ -15189,6 +13874,42 @@ If the underlying system call fails, value is nil. */) | |||
| 15189 | Initialization | 13874 | Initialization |
| 15190 | ***********************************************************************/ | 13875 | ***********************************************************************/ |
| 15191 | 13876 | ||
| 13877 | /* Keep this list in the same order as frame_parms in frame.c. | ||
| 13878 | Use 0 for unsupported frame parameters. */ | ||
| 13879 | |||
| 13880 | frame_parm_handler w32_frame_parm_handlers[] = | ||
| 13881 | { | ||
| 13882 | x_set_autoraise, | ||
| 13883 | x_set_autolower, | ||
| 13884 | x_set_background_color, | ||
| 13885 | x_set_border_color, | ||
| 13886 | x_set_border_width, | ||
| 13887 | x_set_cursor_color, | ||
| 13888 | x_set_cursor_type, | ||
| 13889 | x_set_font, | ||
| 13890 | x_set_foreground_color, | ||
| 13891 | x_set_icon_name, | ||
| 13892 | x_set_icon_type, | ||
| 13893 | x_set_internal_border_width, | ||
| 13894 | x_set_menu_bar_lines, | ||
| 13895 | x_set_mouse_color, | ||
| 13896 | x_explicitly_set_name, | ||
| 13897 | x_set_scroll_bar_width, | ||
| 13898 | x_set_title, | ||
| 13899 | x_set_unsplittable, | ||
| 13900 | x_set_vertical_scroll_bars, | ||
| 13901 | x_set_visibility, | ||
| 13902 | x_set_tool_bar_lines, | ||
| 13903 | 0, /* x_set_scroll_bar_foreground, */ | ||
| 13904 | 0, /* x_set_scroll_bar_background, */ | ||
| 13905 | x_set_screen_gamma, | ||
| 13906 | x_set_line_spacing, | ||
| 13907 | x_set_fringe_width, | ||
| 13908 | x_set_fringe_width, | ||
| 13909 | 0, /* x_set_wait_for_wm, */ | ||
| 13910 | x_set_fullscreen, | ||
| 13911 | }; | ||
| 13912 | |||
| 15192 | void | 13913 | void |
| 15193 | syms_of_w32fns () | 13914 | syms_of_w32fns () |
| 15194 | { | 13915 | { |
| @@ -15199,76 +13920,16 @@ syms_of_w32fns () | |||
| 15199 | 13920 | ||
| 15200 | w32_visible_system_caret_hwnd = NULL; | 13921 | w32_visible_system_caret_hwnd = NULL; |
| 15201 | 13922 | ||
| 15202 | Qauto_raise = intern ("auto-raise"); | ||
| 15203 | staticpro (&Qauto_raise); | ||
| 15204 | Qauto_lower = intern ("auto-lower"); | ||
| 15205 | staticpro (&Qauto_lower); | ||
| 15206 | Qborder_color = intern ("border-color"); | ||
| 15207 | staticpro (&Qborder_color); | ||
| 15208 | Qborder_width = intern ("border-width"); | ||
| 15209 | staticpro (&Qborder_width); | ||
| 15210 | Qcursor_color = intern ("cursor-color"); | ||
| 15211 | staticpro (&Qcursor_color); | ||
| 15212 | Qcursor_type = intern ("cursor-type"); | ||
| 15213 | staticpro (&Qcursor_type); | ||
| 15214 | Qgeometry = intern ("geometry"); | ||
| 15215 | staticpro (&Qgeometry); | ||
| 15216 | Qicon_left = intern ("icon-left"); | ||
| 15217 | staticpro (&Qicon_left); | ||
| 15218 | Qicon_top = intern ("icon-top"); | ||
| 15219 | staticpro (&Qicon_top); | ||
| 15220 | Qicon_type = intern ("icon-type"); | ||
| 15221 | staticpro (&Qicon_type); | ||
| 15222 | Qicon_name = intern ("icon-name"); | ||
| 15223 | staticpro (&Qicon_name); | ||
| 15224 | Qinternal_border_width = intern ("internal-border-width"); | ||
| 15225 | staticpro (&Qinternal_border_width); | ||
| 15226 | Qleft = intern ("left"); | ||
| 15227 | staticpro (&Qleft); | ||
| 15228 | Qright = intern ("right"); | ||
| 15229 | staticpro (&Qright); | ||
| 15230 | Qmouse_color = intern ("mouse-color"); | ||
| 15231 | staticpro (&Qmouse_color); | ||
| 15232 | Qnone = intern ("none"); | 13923 | Qnone = intern ("none"); |
| 15233 | staticpro (&Qnone); | 13924 | staticpro (&Qnone); |
| 15234 | Qparent_id = intern ("parent-id"); | ||
| 15235 | staticpro (&Qparent_id); | ||
| 15236 | Qscroll_bar_width = intern ("scroll-bar-width"); | ||
| 15237 | staticpro (&Qscroll_bar_width); | ||
| 15238 | Qsuppress_icon = intern ("suppress-icon"); | 13925 | Qsuppress_icon = intern ("suppress-icon"); |
| 15239 | staticpro (&Qsuppress_icon); | 13926 | staticpro (&Qsuppress_icon); |
| 15240 | Qundefined_color = intern ("undefined-color"); | 13927 | Qundefined_color = intern ("undefined-color"); |
| 15241 | staticpro (&Qundefined_color); | 13928 | staticpro (&Qundefined_color); |
| 15242 | Qvertical_scroll_bars = intern ("vertical-scroll-bars"); | ||
| 15243 | staticpro (&Qvertical_scroll_bars); | ||
| 15244 | Qvisibility = intern ("visibility"); | ||
| 15245 | staticpro (&Qvisibility); | ||
| 15246 | Qwindow_id = intern ("window-id"); | ||
| 15247 | staticpro (&Qwindow_id); | ||
| 15248 | Qx_frame_parameter = intern ("x-frame-parameter"); | ||
| 15249 | staticpro (&Qx_frame_parameter); | ||
| 15250 | Qx_resource_name = intern ("x-resource-name"); | ||
| 15251 | staticpro (&Qx_resource_name); | ||
| 15252 | Quser_position = intern ("user-position"); | ||
| 15253 | staticpro (&Quser_position); | ||
| 15254 | Quser_size = intern ("user-size"); | ||
| 15255 | staticpro (&Quser_size); | ||
| 15256 | Qscreen_gamma = intern ("screen-gamma"); | ||
| 15257 | staticpro (&Qscreen_gamma); | ||
| 15258 | Qline_spacing = intern ("line-spacing"); | ||
| 15259 | staticpro (&Qline_spacing); | ||
| 15260 | Qcenter = intern ("center"); | 13929 | Qcenter = intern ("center"); |
| 15261 | staticpro (&Qcenter); | 13930 | staticpro (&Qcenter); |
| 15262 | Qcancel_timer = intern ("cancel-timer"); | 13931 | Qcancel_timer = intern ("cancel-timer"); |
| 15263 | staticpro (&Qcancel_timer); | 13932 | staticpro (&Qcancel_timer); |
| 15264 | Qfullscreen = intern ("fullscreen"); | ||
| 15265 | staticpro (&Qfullscreen); | ||
| 15266 | Qfullwidth = intern ("fullwidth"); | ||
| 15267 | staticpro (&Qfullwidth); | ||
| 15268 | Qfullheight = intern ("fullheight"); | ||
| 15269 | staticpro (&Qfullheight); | ||
| 15270 | Qfullboth = intern ("fullboth"); | ||
| 15271 | staticpro (&Qfullboth); | ||
| 15272 | 13933 | ||
| 15273 | Qhyper = intern ("hyper"); | 13934 | Qhyper = intern ("hyper"); |
| 15274 | staticpro (&Qhyper); | 13935 | staticpro (&Qhyper); |
| @@ -15306,9 +13967,6 @@ syms_of_w32fns () | |||
| 15306 | QCmask = intern (":mask"); | 13967 | QCmask = intern (":mask"); |
| 15307 | staticpro (&QCmask); | 13968 | staticpro (&QCmask); |
| 15308 | 13969 | ||
| 15309 | Qface_set_after_frame_default = intern ("face-set-after-frame-default"); | ||
| 15310 | staticpro (&Qface_set_after_frame_default); | ||
| 15311 | |||
| 15312 | Fput (Qundefined_color, Qerror_conditions, | 13970 | Fput (Qundefined_color, Qerror_conditions, |
| 15313 | Fcons (Qundefined_color, Fcons (Qerror, Qnil))); | 13971 | Fcons (Qundefined_color, Fcons (Qerror, Qnil))); |
| 15314 | Fput (Qundefined_color, Qerror_message, | 13972 | Fput (Qundefined_color, Qerror_message, |
| @@ -15439,8 +14097,6 @@ If this variable is non-nil, Emacs will pass them on, allowing the | |||
| 15439 | system to handle them. */); | 14097 | system to handle them. */); |
| 15440 | w32_pass_extra_mouse_buttons_to_system = 0; | 14098 | w32_pass_extra_mouse_buttons_to_system = 0; |
| 15441 | 14099 | ||
| 15442 | init_x_parm_symbols (); | ||
| 15443 | |||
| 15444 | DEFVAR_LISP ("x-bitmap-file-path", &Vx_bitmap_file_path, | 14100 | DEFVAR_LISP ("x-bitmap-file-path", &Vx_bitmap_file_path, |
| 15445 | doc: /* List of directories to search for window system bitmap files. */); | 14101 | doc: /* List of directories to search for window system bitmap files. */); |
| 15446 | Vx_bitmap_file_path = decode_env_path ((char *) 0, "PATH"); | 14102 | Vx_bitmap_file_path = decode_env_path ((char *) 0, "PATH"); |
| @@ -15451,15 +14107,6 @@ Changing the value does not affect existing frames | |||
| 15451 | unless you set the mouse color. */); | 14107 | unless you set the mouse color. */); |
| 15452 | Vx_pointer_shape = Qnil; | 14108 | Vx_pointer_shape = Qnil; |
| 15453 | 14109 | ||
| 15454 | DEFVAR_LISP ("x-resource-name", &Vx_resource_name, | ||
| 15455 | doc: /* The name Emacs uses to look up resources; for internal use only. | ||
| 15456 | `x-get-resource' uses this as the first component of the instance name | ||
| 15457 | when requesting resource values. | ||
| 15458 | Emacs initially sets `x-resource-name' to the name under which Emacs | ||
| 15459 | was invoked, or to the value specified with the `-name' or `-rn' | ||
| 15460 | switches, if present. */); | ||
| 15461 | Vx_resource_name = Qnil; | ||
| 15462 | |||
| 15463 | Vx_nontext_pointer_shape = Qnil; | 14110 | Vx_nontext_pointer_shape = Qnil; |
| 15464 | 14111 | ||
| 15465 | Vx_mode_pointer_shape = Qnil; | 14112 | Vx_mode_pointer_shape = Qnil; |
| @@ -15634,7 +14281,6 @@ versions of Windows) characters. */); | |||
| 15634 | Qw32_charset_unicode = intern ("w32-charset-unicode"); | 14281 | Qw32_charset_unicode = intern ("w32-charset-unicode"); |
| 15635 | #endif | 14282 | #endif |
| 15636 | 14283 | ||
| 15637 | defsubr (&Sx_get_resource); | ||
| 15638 | #if 0 /* TODO: Port to W32 */ | 14284 | #if 0 /* TODO: Port to W32 */ |
| 15639 | defsubr (&Sx_change_window_property); | 14285 | defsubr (&Sx_change_window_property); |
| 15640 | defsubr (&Sx_delete_window_property); | 14286 | defsubr (&Sx_delete_window_property); |
| @@ -15657,7 +14303,6 @@ versions of Windows) characters. */); | |||
| 15657 | defsubr (&Sx_display_visual_class); | 14303 | defsubr (&Sx_display_visual_class); |
| 15658 | defsubr (&Sx_display_backing_store); | 14304 | defsubr (&Sx_display_backing_store); |
| 15659 | defsubr (&Sx_display_save_under); | 14305 | defsubr (&Sx_display_save_under); |
| 15660 | defsubr (&Sx_parse_geometry); | ||
| 15661 | defsubr (&Sx_create_frame); | 14306 | defsubr (&Sx_create_frame); |
| 15662 | defsubr (&Sx_open_connection); | 14307 | defsubr (&Sx_open_connection); |
| 15663 | defsubr (&Sx_close_connection); | 14308 | defsubr (&Sx_close_connection); |