comparison src/w32term.c @ 30199:298f10cd4ba5

(construct_mouse_click, construct_mouse_wheel) (construct_drag_n_drop, x_scroll_bar_handle_click) (w32_read_socket): Always set `arg' member of input_events.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 13 Jul 2000 23:44:20 +0000
parents 9c30c64ab61d
children 2c2a7ebd2c15
comparison
equal deleted inserted replaced
30198:f39367e12c14 30199:298f10cd4ba5
5516 int row, column; 5516 int row, column;
5517 5517
5518 XSETINT (result->x, LOWORD (msg->msg.lParam)); 5518 XSETINT (result->x, LOWORD (msg->msg.lParam));
5519 XSETINT (result->y, HIWORD (msg->msg.lParam)); 5519 XSETINT (result->y, HIWORD (msg->msg.lParam));
5520 XSETFRAME (result->frame_or_window, f); 5520 XSETFRAME (result->frame_or_window, f);
5521 result->arg = Qnil;
5521 } 5522 }
5522 } 5523 }
5523 5524
5524 static void 5525 static void
5525 construct_mouse_wheel (result, msg, f) 5526 construct_mouse_wheel (result, msg, f)
5536 p.y = HIWORD (msg->msg.lParam); 5537 p.y = HIWORD (msg->msg.lParam);
5537 ScreenToClient(msg->msg.hwnd, &p); 5538 ScreenToClient(msg->msg.hwnd, &p);
5538 XSETINT (result->x, p.x); 5539 XSETINT (result->x, p.x);
5539 XSETINT (result->y, p.y); 5540 XSETINT (result->y, p.y);
5540 XSETFRAME (result->frame_or_window, f); 5541 XSETFRAME (result->frame_or_window, f);
5542 result->arg = Qnil;
5541 } 5543 }
5542 5544
5543 static void 5545 static void
5544 construct_drag_n_drop (result, msg, f) 5546 construct_drag_n_drop (result, msg, f)
5545 struct input_event *result; 5547 struct input_event *result;
5586 5588
5587 DragFinish (hdrop); 5589 DragFinish (hdrop);
5588 5590
5589 XSETFRAME (frame, f); 5591 XSETFRAME (frame, f);
5590 result->frame_or_window = Fcons (frame, files); 5592 result->frame_or_window = Fcons (frame, files);
5593 result->arg = Qnil;
5591 } 5594 }
5592 5595
5593 5596
5594 /* Function to report a mouse movement to the mainstream Emacs code. 5597 /* Function to report a mouse movement to the mainstream Emacs code.
5595 The input handler calls this. 5598 The input handler calls this.
7187 emacs_event->kind = w32_scroll_bar_click; 7190 emacs_event->kind = w32_scroll_bar_click;
7188 emacs_event->code = 0; 7191 emacs_event->code = 0;
7189 /* not really meaningful to distinguish up/down */ 7192 /* not really meaningful to distinguish up/down */
7190 emacs_event->modifiers = msg->dwModifiers; 7193 emacs_event->modifiers = msg->dwModifiers;
7191 emacs_event->frame_or_window = bar->window; 7194 emacs_event->frame_or_window = bar->window;
7195 emacs_event->arg = Qnil;
7192 emacs_event->timestamp = msg->msg.time; 7196 emacs_event->timestamp = msg->msg.time;
7193 7197
7194 { 7198 {
7195 int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, XINT (bar->height)); 7199 int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, XINT (bar->height));
7196 int y; 7200 int y;
7504 visibility changes properly. */ 7508 visibility changes properly. */
7505 if (f->iconified) 7509 if (f->iconified)
7506 { 7510 {
7507 bufp->kind = deiconify_event; 7511 bufp->kind = deiconify_event;
7508 XSETFRAME (bufp->frame_or_window, f); 7512 XSETFRAME (bufp->frame_or_window, f);
7513 bufp->arg = Qnil;
7509 bufp++; 7514 bufp++;
7510 count++; 7515 count++;
7511 numchars--; 7516 numchars--;
7512 } 7517 }
7513 else if (! NILP(Vframe_list) 7518 else if (! NILP(Vframe_list)
7541 if (numchars == 0) 7546 if (numchars == 0)
7542 abort (); 7547 abort ();
7543 7548
7544 bufp->kind = language_change_event; 7549 bufp->kind = language_change_event;
7545 XSETFRAME (bufp->frame_or_window, f); 7550 XSETFRAME (bufp->frame_or_window, f);
7551 bufp->arg = Qnil;
7546 bufp->code = msg.msg.wParam; 7552 bufp->code = msg.msg.wParam;
7547 bufp->modifiers = msg.msg.lParam & 0xffff; 7553 bufp->modifiers = msg.msg.lParam & 0xffff;
7548 bufp++; 7554 bufp++;
7549 count++; 7555 count++;
7550 numchars--; 7556 numchars--;
7562 temp_buffer[temp_index++] = msg.msg.wParam; 7568 temp_buffer[temp_index++] = msg.msg.wParam;
7563 bufp->kind = non_ascii_keystroke; 7569 bufp->kind = non_ascii_keystroke;
7564 bufp->code = msg.msg.wParam; 7570 bufp->code = msg.msg.wParam;
7565 bufp->modifiers = msg.dwModifiers; 7571 bufp->modifiers = msg.dwModifiers;
7566 XSETFRAME (bufp->frame_or_window, f); 7572 XSETFRAME (bufp->frame_or_window, f);
7573 bufp->arg = Qnil;
7567 bufp->timestamp = msg.msg.time; 7574 bufp->timestamp = msg.msg.time;
7568 bufp++; 7575 bufp++;
7569 numchars--; 7576 numchars--;
7570 count++; 7577 count++;
7571 } 7578 }
7582 temp_buffer[temp_index++] = msg.msg.wParam; 7589 temp_buffer[temp_index++] = msg.msg.wParam;
7583 bufp->kind = ascii_keystroke; 7590 bufp->kind = ascii_keystroke;
7584 bufp->code = msg.msg.wParam; 7591 bufp->code = msg.msg.wParam;
7585 bufp->modifiers = msg.dwModifiers; 7592 bufp->modifiers = msg.dwModifiers;
7586 XSETFRAME (bufp->frame_or_window, f); 7593 XSETFRAME (bufp->frame_or_window, f);
7594 bufp->arg = Qnil;
7587 bufp->timestamp = msg.msg.time; 7595 bufp->timestamp = msg.msg.time;
7588 bufp++; 7596 bufp++;
7589 numchars--; 7597 numchars--;
7590 count++; 7598 count++;
7591 } 7599 }
7828 f->async_visible = 0; 7836 f->async_visible = 0;
7829 f->async_iconified = 1; 7837 f->async_iconified = 1;
7830 7838
7831 bufp->kind = iconify_event; 7839 bufp->kind = iconify_event;
7832 XSETFRAME (bufp->frame_or_window, f); 7840 XSETFRAME (bufp->frame_or_window, f);
7841 bufp->arg = Qnil;
7833 bufp++; 7842 bufp++;
7834 count++; 7843 count++;
7835 numchars--; 7844 numchars--;
7836 break; 7845 break;
7837 7846
7857 f->output_data.w32->left_pos = x; 7866 f->output_data.w32->left_pos = x;
7858 f->output_data.w32->top_pos = y; 7867 f->output_data.w32->top_pos = y;
7859 7868
7860 bufp->kind = deiconify_event; 7869 bufp->kind = deiconify_event;
7861 XSETFRAME (bufp->frame_or_window, f); 7870 XSETFRAME (bufp->frame_or_window, f);
7871 bufp->arg = Qnil;
7862 bufp++; 7872 bufp++;
7863 count++; 7873 count++;
7864 numchars--; 7874 numchars--;
7865 } 7875 }
7866 else if (! NILP (Vframe_list) 7876 else if (! NILP (Vframe_list)
7973 if (numchars == 0) 7983 if (numchars == 0)
7974 abort (); 7984 abort ();
7975 7985
7976 bufp->kind = delete_window_event; 7986 bufp->kind = delete_window_event;
7977 XSETFRAME (bufp->frame_or_window, f); 7987 XSETFRAME (bufp->frame_or_window, f);
7988 bufp->arg = Qnil;
7978 bufp++; 7989 bufp++;
7979 count++; 7990 count++;
7980 numchars--; 7991 numchars--;
7981 } 7992 }
7982 break; 7993 break;
7989 if (numchars == 0) 8000 if (numchars == 0)
7990 abort (); 8001 abort ();
7991 8002
7992 bufp->kind = menu_bar_activate_event; 8003 bufp->kind = menu_bar_activate_event;
7993 XSETFRAME (bufp->frame_or_window, f); 8004 XSETFRAME (bufp->frame_or_window, f);
8005 bufp->arg = Qnil;
7994 bufp++; 8006 bufp++;
7995 count++; 8007 count++;
7996 numchars--; 8008 numchars--;
7997 } 8009 }
7998 break; 8010 break;