diff options
Diffstat (limited to 'src/xfns.c')
| -rw-r--r-- | src/xfns.c | 101 |
1 files changed, 93 insertions, 8 deletions
diff --git a/src/xfns.c b/src/xfns.c index 7be2253cc3b..d8bf9747191 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -1120,6 +1120,14 @@ enum mouse_cursor { | |||
| 1120 | mouse_cursor_hand, | 1120 | mouse_cursor_hand, |
| 1121 | mouse_cursor_horizontal_drag, | 1121 | mouse_cursor_horizontal_drag, |
| 1122 | mouse_cursor_vertical_drag, | 1122 | mouse_cursor_vertical_drag, |
| 1123 | mouse_cursor_left_edge, | ||
| 1124 | mouse_cursor_top_left_corner, | ||
| 1125 | mouse_cursor_top_edge, | ||
| 1126 | mouse_cursor_top_right_corner, | ||
| 1127 | mouse_cursor_right_edge, | ||
| 1128 | mouse_cursor_bottom_right_corner, | ||
| 1129 | mouse_cursor_bottom_edge, | ||
| 1130 | mouse_cursor_bottom_left_corner, | ||
| 1123 | mouse_cursor_max | 1131 | mouse_cursor_max |
| 1124 | }; | 1132 | }; |
| 1125 | 1133 | ||
| @@ -1139,13 +1147,21 @@ struct mouse_cursor_types { | |||
| 1139 | 1147 | ||
| 1140 | /* This array must stay in sync with enum mouse_cursor above! */ | 1148 | /* This array must stay in sync with enum mouse_cursor above! */ |
| 1141 | static const struct mouse_cursor_types mouse_cursor_types[] = { | 1149 | static const struct mouse_cursor_types mouse_cursor_types[] = { |
| 1142 | { "text", &Vx_pointer_shape, XC_xterm }, | 1150 | { "text", &Vx_pointer_shape, XC_xterm }, |
| 1143 | { "nontext", &Vx_nontext_pointer_shape, XC_left_ptr }, | 1151 | { "nontext", &Vx_nontext_pointer_shape, XC_left_ptr }, |
| 1144 | { "hourglass", &Vx_hourglass_pointer_shape, XC_watch }, | 1152 | { "hourglass", &Vx_hourglass_pointer_shape, XC_watch }, |
| 1145 | { "modeline", &Vx_mode_pointer_shape, XC_xterm }, | 1153 | { "modeline", &Vx_mode_pointer_shape, XC_xterm }, |
| 1146 | { NULL, &Vx_sensitive_text_pointer_shape, XC_hand2 }, | 1154 | { NULL, &Vx_sensitive_text_pointer_shape, XC_hand2 }, |
| 1147 | { NULL, &Vx_window_horizontal_drag_shape, XC_sb_h_double_arrow }, | 1155 | { NULL, &Vx_window_horizontal_drag_shape, XC_sb_h_double_arrow }, |
| 1148 | { NULL, &Vx_window_vertical_drag_shape, XC_sb_v_double_arrow }, | 1156 | { NULL, &Vx_window_vertical_drag_shape, XC_sb_v_double_arrow }, |
| 1157 | { NULL, &Vx_window_left_edge_shape, XC_left_side }, | ||
| 1158 | { NULL, &Vx_window_top_left_corner_shape, XC_top_left_corner }, | ||
| 1159 | { NULL, &Vx_window_top_edge_shape, XC_top_side }, | ||
| 1160 | { NULL, &Vx_window_top_right_corner_shape, XC_top_right_corner }, | ||
| 1161 | { NULL, &Vx_window_right_edge_shape, XC_right_side }, | ||
| 1162 | { NULL, &Vx_window_bottom_right_corner_shape, XC_bottom_right_corner }, | ||
| 1163 | { NULL, &Vx_window_bottom_edge_shape, XC_bottom_side }, | ||
| 1164 | { NULL, &Vx_window_bottom_left_corner_shape, XC_bottom_left_corner }, | ||
| 1149 | }; | 1165 | }; |
| 1150 | 1166 | ||
| 1151 | struct mouse_cursor_data { | 1167 | struct mouse_cursor_data { |
| @@ -1296,6 +1312,14 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) | |||
| 1296 | INSTALL_CURSOR (hand_cursor, hand); | 1312 | INSTALL_CURSOR (hand_cursor, hand); |
| 1297 | INSTALL_CURSOR (horizontal_drag_cursor, horizontal_drag); | 1313 | INSTALL_CURSOR (horizontal_drag_cursor, horizontal_drag); |
| 1298 | INSTALL_CURSOR (vertical_drag_cursor, vertical_drag); | 1314 | INSTALL_CURSOR (vertical_drag_cursor, vertical_drag); |
| 1315 | INSTALL_CURSOR (left_edge_cursor, left_edge); | ||
| 1316 | INSTALL_CURSOR (top_left_corner_cursor, top_left_corner); | ||
| 1317 | INSTALL_CURSOR (top_edge_cursor, top_edge); | ||
| 1318 | INSTALL_CURSOR (top_right_corner_cursor, top_right_corner); | ||
| 1319 | INSTALL_CURSOR (right_edge_cursor, right_edge); | ||
| 1320 | INSTALL_CURSOR (bottom_right_corner_cursor, bottom_right_corner); | ||
| 1321 | INSTALL_CURSOR (bottom_edge_cursor, bottom_edge); | ||
| 1322 | INSTALL_CURSOR (bottom_left_corner_cursor, bottom_left_corner); | ||
| 1299 | 1323 | ||
| 1300 | #undef INSTALL_CURSOR | 1324 | #undef INSTALL_CURSOR |
| 1301 | 1325 | ||
| @@ -3814,6 +3838,8 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 3814 | "leftFringe", "LeftFringe", RES_TYPE_NUMBER); | 3838 | "leftFringe", "LeftFringe", RES_TYPE_NUMBER); |
| 3815 | x_default_parameter (f, parms, Qright_fringe, Qnil, | 3839 | x_default_parameter (f, parms, Qright_fringe, Qnil, |
| 3816 | "rightFringe", "RightFringe", RES_TYPE_NUMBER); | 3840 | "rightFringe", "RightFringe", RES_TYPE_NUMBER); |
| 3841 | x_default_parameter (f, parms, Qno_special_glyphs, Qnil, | ||
| 3842 | NULL, NULL, RES_TYPE_BOOLEAN); | ||
| 3817 | 3843 | ||
| 3818 | x_default_scroll_bar_color_parameter (f, parms, Qscroll_bar_foreground, | 3844 | x_default_scroll_bar_color_parameter (f, parms, Qscroll_bar_foreground, |
| 3819 | "scrollBarForeground", | 3845 | "scrollBarForeground", |
| @@ -5286,7 +5312,7 @@ Frames are listed from topmost (first) to bottommost (last). */) | |||
| 5286 | static void | 5312 | static void |
| 5287 | x_frame_restack (struct frame *f1, struct frame *f2, bool above_flag) | 5313 | x_frame_restack (struct frame *f1, struct frame *f2, bool above_flag) |
| 5288 | { | 5314 | { |
| 5289 | #ifdef USE_GTK | 5315 | #if defined (USE_GTK) && GTK_CHECK_VERSION (2, 18, 0) |
| 5290 | block_input (); | 5316 | block_input (); |
| 5291 | xg_frame_restack (f1, f2, above_flag); | 5317 | xg_frame_restack (f1, f2, above_flag); |
| 5292 | unblock_input (); | 5318 | unblock_input (); |
| @@ -6196,6 +6222,8 @@ x_create_tip_frame (struct x_display_info *dpyinfo, Lisp_Object parms) | |||
| 6196 | "cursorColor", "Foreground", RES_TYPE_STRING); | 6222 | "cursorColor", "Foreground", RES_TYPE_STRING); |
| 6197 | x_default_parameter (f, parms, Qborder_color, build_string ("black"), | 6223 | x_default_parameter (f, parms, Qborder_color, build_string ("black"), |
| 6198 | "borderColor", "BorderColor", RES_TYPE_STRING); | 6224 | "borderColor", "BorderColor", RES_TYPE_STRING); |
| 6225 | x_default_parameter (f, parms, Qno_special_glyphs, Qnil, | ||
| 6226 | NULL, NULL, RES_TYPE_BOOLEAN); | ||
| 6199 | 6227 | ||
| 6200 | /* Init faces before x_default_parameter is called for the | 6228 | /* Init faces before x_default_parameter is called for the |
| 6201 | scroll-bar-width parameter because otherwise we end up in | 6229 | scroll-bar-width parameter because otherwise we end up in |
| @@ -7486,6 +7514,7 @@ frame_parm_handler x_frame_parm_handlers[] = | |||
| 7486 | x_set_no_accept_focus, | 7514 | x_set_no_accept_focus, |
| 7487 | x_set_z_group, | 7515 | x_set_z_group, |
| 7488 | x_set_override_redirect, | 7516 | x_set_override_redirect, |
| 7517 | x_set_no_special_glyphs, | ||
| 7489 | }; | 7518 | }; |
| 7490 | 7519 | ||
| 7491 | void | 7520 | void |
| @@ -7564,6 +7593,62 @@ This variable takes effect when you create a new frame | |||
| 7564 | or when you set the mouse color. */); | 7593 | or when you set the mouse color. */); |
| 7565 | Vx_window_vertical_drag_shape = Qnil; | 7594 | Vx_window_vertical_drag_shape = Qnil; |
| 7566 | 7595 | ||
| 7596 | DEFVAR_LISP ("x-window-left-edge-cursor", | ||
| 7597 | Vx_window_left_edge_shape, | ||
| 7598 | doc: /* Pointer shape indicating a left x-window edge can be dragged. | ||
| 7599 | This variable takes effect when you create a new frame | ||
| 7600 | or when you set the mouse color. */); | ||
| 7601 | Vx_window_left_edge_shape = Qnil; | ||
| 7602 | |||
| 7603 | DEFVAR_LISP ("x-window-top-left-corner-cursor", | ||
| 7604 | Vx_window_top_left_corner_shape, | ||
| 7605 | doc: /* Pointer shape indicating a top left x-window corner can be dragged. | ||
| 7606 | This variable takes effect when you create a new frame | ||
| 7607 | or when you set the mouse color. */); | ||
| 7608 | Vx_window_top_left_corner_shape = Qnil; | ||
| 7609 | |||
| 7610 | DEFVAR_LISP ("x-window-top-edge-cursor", | ||
| 7611 | Vx_window_top_edge_shape, | ||
| 7612 | doc: /* Pointer shape indicating a top x-window edge can be dragged. | ||
| 7613 | This variable takes effect when you create a new frame | ||
| 7614 | or when you set the mouse color. */); | ||
| 7615 | Vx_window_top_edge_shape = Qnil; | ||
| 7616 | |||
| 7617 | DEFVAR_LISP ("x-window-top-right-corner-cursor", | ||
| 7618 | Vx_window_top_right_corner_shape, | ||
| 7619 | doc: /* Pointer shape indicating a top right x-window corner can be dragged. | ||
| 7620 | This variable takes effect when you create a new frame | ||
| 7621 | or when you set the mouse color. */); | ||
| 7622 | Vx_window_top_right_corner_shape = Qnil; | ||
| 7623 | |||
| 7624 | DEFVAR_LISP ("x-window-right-edge-cursor", | ||
| 7625 | Vx_window_right_edge_shape, | ||
| 7626 | doc: /* Pointer shape indicating a right x-window edge can be dragged. | ||
| 7627 | This variable takes effect when you create a new frame | ||
| 7628 | or when you set the mouse color. */); | ||
| 7629 | Vx_window_right_edge_shape = Qnil; | ||
| 7630 | |||
| 7631 | DEFVAR_LISP ("x-window-bottom-right-corner-cursor", | ||
| 7632 | Vx_window_bottom_right_corner_shape, | ||
| 7633 | doc: /* Pointer shape indicating a bottom right x-window corner can be dragged. | ||
| 7634 | This variable takes effect when you create a new frame | ||
| 7635 | or when you set the mouse color. */); | ||
| 7636 | Vx_window_bottom_right_corner_shape = Qnil; | ||
| 7637 | |||
| 7638 | DEFVAR_LISP ("x-window-bottom-edge-cursor", | ||
| 7639 | Vx_window_bottom_edge_shape, | ||
| 7640 | doc: /* Pointer shape indicating a bottom x-window edge can be dragged. | ||
| 7641 | This variable takes effect when you create a new frame | ||
| 7642 | or when you set the mouse color. */); | ||
| 7643 | Vx_window_bottom_edge_shape = Qnil; | ||
| 7644 | |||
| 7645 | DEFVAR_LISP ("x-window-bottom-left-corner-cursor", | ||
| 7646 | Vx_window_bottom_left_corner_shape, | ||
| 7647 | doc: /* Pointer shape indicating a bottom left x-window corner can be dragged. | ||
| 7648 | This variable takes effect when you create a new frame | ||
| 7649 | or when you set the mouse color. */); | ||
| 7650 | Vx_window_bottom_left_corner_shape = Qnil; | ||
| 7651 | |||
| 7567 | DEFVAR_LISP ("x-cursor-fore-pixel", Vx_cursor_fore_pixel, | 7652 | DEFVAR_LISP ("x-cursor-fore-pixel", Vx_cursor_fore_pixel, |
| 7568 | doc: /* A string indicating the foreground color of the cursor box. */); | 7653 | doc: /* A string indicating the foreground color of the cursor box. */); |
| 7569 | Vx_cursor_fore_pixel = Qnil; | 7654 | Vx_cursor_fore_pixel = Qnil; |