aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32term.c
diff options
context:
space:
mode:
authorDmitry Antipov2012-08-06 14:24:26 +0400
committerDmitry Antipov2012-08-06 14:24:26 +0400
commit077288cf3f654776ee44bc9b56954c4e26b10d96 (patch)
tree00bbcb4dab9c879efde73a01786977b1c1364f67 /src/w32term.c
parent71688bd7f9169c12ea8be54e084470f19d44ce44 (diff)
downloademacs-077288cf3f654776ee44bc9b56954c4e26b10d96.tar.gz
emacs-077288cf3f654776ee44bc9b56954c4e26b10d96.zip
Separate read and write access to Lisp_Object slots of struct window.
* window.h (WGET, WSET): New macros similar to AREF and ASET. * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c: * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c: * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m: * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c: * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
Diffstat (limited to 'src/w32term.c')
-rw-r--r--src/w32term.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/w32term.c b/src/w32term.c
index 96072ac69e1..fc4522d56fd 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -649,7 +649,7 @@ static void
649x_update_window_end (struct window *w, int cursor_on_p, 649x_update_window_end (struct window *w, int cursor_on_p,
650 int mouse_face_overwritten_p) 650 int mouse_face_overwritten_p)
651{ 651{
652 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (WVAR (w, frame))); 652 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (WGET (w, frame)));
653 653
654 if (!w->pseudo_window_p) 654 if (!w->pseudo_window_p)
655 { 655 {
@@ -754,7 +754,7 @@ x_after_update_window_line (struct glyph_row *desired_row)
754 overhead is very small. */ 754 overhead is very small. */
755 if (windows_or_buffers_changed 755 if (windows_or_buffers_changed
756 && desired_row->full_width_p 756 && desired_row->full_width_p
757 && (f = XFRAME (WVAR (w, frame)), 757 && (f = XFRAME (WGET (w, frame)),
758 width = FRAME_INTERNAL_BORDER_WIDTH (f), 758 width = FRAME_INTERNAL_BORDER_WIDTH (f),
759 width != 0) 759 width != 0)
760 && (height = desired_row->visible_height, 760 && (height = desired_row->visible_height,
@@ -2718,7 +2718,7 @@ x_ins_del_lines (struct frame *f, int vpos, int n)
2718static void 2718static void
2719x_scroll_run (struct window *w, struct run *run) 2719x_scroll_run (struct window *w, struct run *run)
2720{ 2720{
2721 struct frame *f = XFRAME (WVAR (w, frame)); 2721 struct frame *f = XFRAME (WGET (w, frame));
2722 int x, y, width, height, from_y, to_y, bottom_y; 2722 int x, y, width, height, from_y, to_y, bottom_y;
2723 HWND hwnd = FRAME_W32_WINDOW (f); 2723 HWND hwnd = FRAME_W32_WINDOW (f);
2724 HRGN expect_dirty; 2724 HRGN expect_dirty;
@@ -3670,7 +3670,7 @@ x_scroll_bar_remove (struct scroll_bar *bar)
3670 my_destroy_window (f, SCROLL_BAR_W32_WINDOW (bar)); 3670 my_destroy_window (f, SCROLL_BAR_W32_WINDOW (bar));
3671 3671
3672 /* Dissociate this scroll bar from its window. */ 3672 /* Dissociate this scroll bar from its window. */
3673 WVAR (XWINDOW (bar->window), vertical_scroll_bar) = Qnil; 3673 WSET (XWINDOW (bar->window), vertical_scroll_bar, Qnil);
3674 3674
3675 UNBLOCK_INPUT; 3675 UNBLOCK_INPUT;
3676} 3676}
@@ -3683,7 +3683,7 @@ static void
3683w32_set_vertical_scroll_bar (struct window *w, 3683w32_set_vertical_scroll_bar (struct window *w,
3684 int portion, int whole, int position) 3684 int portion, int whole, int position)
3685{ 3685{
3686 struct frame *f = XFRAME (WVAR (w, frame)); 3686 struct frame *f = XFRAME (WGET (w, frame));
3687 struct scroll_bar *bar; 3687 struct scroll_bar *bar;
3688 int top, height, left, sb_left, width, sb_width; 3688 int top, height, left, sb_left, width, sb_width;
3689 int window_y, window_height; 3689 int window_y, window_height;
@@ -3723,7 +3723,7 @@ w32_set_vertical_scroll_bar (struct window *w,
3723 || WINDOW_RIGHT_MARGIN_COLS (w) == 0)); 3723 || WINDOW_RIGHT_MARGIN_COLS (w) == 0));
3724 3724
3725 /* Does the scroll bar exist yet? */ 3725 /* Does the scroll bar exist yet? */
3726 if (NILP (WVAR (w, vertical_scroll_bar))) 3726 if (NILP (WGET (w, vertical_scroll_bar)))
3727 { 3727 {
3728 HDC hdc; 3728 HDC hdc;
3729 BLOCK_INPUT; 3729 BLOCK_INPUT;
@@ -3745,7 +3745,7 @@ w32_set_vertical_scroll_bar (struct window *w,
3745 /* It may just need to be moved and resized. */ 3745 /* It may just need to be moved and resized. */
3746 HWND hwnd; 3746 HWND hwnd;
3747 3747
3748 bar = XSCROLL_BAR (WVAR (w, vertical_scroll_bar)); 3748 bar = XSCROLL_BAR (WGET (w, vertical_scroll_bar));
3749 hwnd = SCROLL_BAR_W32_WINDOW (bar); 3749 hwnd = SCROLL_BAR_W32_WINDOW (bar);
3750 3750
3751 /* If already correctly positioned, do nothing. */ 3751 /* If already correctly positioned, do nothing. */
@@ -3807,7 +3807,7 @@ w32_set_vertical_scroll_bar (struct window *w,
3807 3807
3808 w32_set_scroll_bar_thumb (bar, portion, position, whole); 3808 w32_set_scroll_bar_thumb (bar, portion, position, whole);
3809 3809
3810 XSETVECTOR (WVAR (w, vertical_scroll_bar), bar); 3810 XSETVECTOR (WGET (w, vertical_scroll_bar), bar);
3811} 3811}
3812 3812
3813 3813
@@ -3852,10 +3852,10 @@ w32_redeem_scroll_bar (struct window *window)
3852 struct frame *f; 3852 struct frame *f;
3853 3853
3854 /* We can't redeem this window's scroll bar if it doesn't have one. */ 3854 /* We can't redeem this window's scroll bar if it doesn't have one. */
3855 if (NILP (WVAR (window, vertical_scroll_bar))) 3855 if (NILP (WGET (window, vertical_scroll_bar)))
3856 abort (); 3856 abort ();
3857 3857
3858 bar = XSCROLL_BAR (WVAR (window, vertical_scroll_bar)); 3858 bar = XSCROLL_BAR (WGET (window, vertical_scroll_bar));
3859 3859
3860 /* Unlink it from the condemned list. */ 3860 /* Unlink it from the condemned list. */
3861 f = XFRAME (WINDOW_FRAME (window)); 3861 f = XFRAME (WINDOW_FRAME (window));
@@ -3863,11 +3863,11 @@ w32_redeem_scroll_bar (struct window *window)
3863 { 3863 {
3864 /* If the prev pointer is nil, it must be the first in one of 3864 /* If the prev pointer is nil, it must be the first in one of
3865 the lists. */ 3865 the lists. */
3866 if (EQ (FRAME_SCROLL_BARS (f), WVAR (window, vertical_scroll_bar))) 3866 if (EQ (FRAME_SCROLL_BARS (f), WGET (window, vertical_scroll_bar)))
3867 /* It's not condemned. Everything's fine. */ 3867 /* It's not condemned. Everything's fine. */
3868 return; 3868 return;
3869 else if (EQ (FRAME_CONDEMNED_SCROLL_BARS (f), 3869 else if (EQ (FRAME_CONDEMNED_SCROLL_BARS (f),
3870 WVAR (window, vertical_scroll_bar))) 3870 WGET (window, vertical_scroll_bar)))
3871 FSET (f, condemned_scroll_bars, bar->next); 3871 FSET (f, condemned_scroll_bars, bar->next);
3872 else 3872 else
3873 /* If its prev pointer is nil, it must be at the front of 3873 /* If its prev pointer is nil, it must be at the front of
@@ -4426,8 +4426,8 @@ w32_read_socket (struct terminal *terminal, int expected,
4426 create event iff we don't leave the 4426 create event iff we don't leave the
4427 selected frame. */ 4427 selected frame. */
4428 && (focus_follows_mouse 4428 && (focus_follows_mouse
4429 || (EQ (WVAR (XWINDOW (window), frame), 4429 || (EQ (WGET (XWINDOW (window), frame),
4430 WVAR (XWINDOW (selected_window), frame))))) 4430 WGET (XWINDOW (selected_window), frame)))))
4431 { 4431 {
4432 inev.kind = SELECT_WINDOW_EVENT; 4432 inev.kind = SELECT_WINDOW_EVENT;
4433 inev.frame_or_window = window; 4433 inev.frame_or_window = window;
@@ -5042,7 +5042,7 @@ static void
5042x_draw_bar_cursor (struct window *w, struct glyph_row *row, 5042x_draw_bar_cursor (struct window *w, struct glyph_row *row,
5043 int width, enum text_cursor_kinds kind) 5043 int width, enum text_cursor_kinds kind)
5044{ 5044{
5045 struct frame *f = XFRAME (WVAR (w, frame)); 5045 struct frame *f = XFRAME (WGET (w, frame));
5046 struct glyph *cursor_glyph; 5046 struct glyph *cursor_glyph;
5047 5047
5048 /* If cursor is out of bounds, don't draw garbage. This can happen 5048 /* If cursor is out of bounds, don't draw garbage. This can happen