comparison src/xterm.c @ 30197:3237a5529020

(construct_mouse_click, x_scroll_bar_to_input_event) (x_scroll_bar_handle_click, SET_SAVED_MENU_EVENT, XTread_socket): Always set `arg' member of input_events. (construct_menu_click): Unused function removed.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 13 Jul 2000 23:43:30 +0000
parents 73181a26fc85
children 793f5a4e610b
comparison
equal deleted inserted replaced
30196:52c1b7a2e7a5 30197:3237a5529020
6135 : down_modifier)); 6135 : down_modifier));
6136 6136
6137 XSETINT (result->x, event->x); 6137 XSETINT (result->x, event->x);
6138 XSETINT (result->y, event->y); 6138 XSETINT (result->y, event->y);
6139 XSETFRAME (result->frame_or_window, f); 6139 XSETFRAME (result->frame_or_window, f);
6140 result->arg = Qnil;
6140 return Qnil; 6141 return Qnil;
6141 } 6142 }
6142
6143 #if 0 /* This function isn't called. --gerd */
6144
6145 /* Prepare a menu-event in *RESULT for placement in the input queue. */
6146
6147 static Lisp_Object
6148 construct_menu_click (result, event, f)
6149 struct input_event *result;
6150 XButtonEvent *event;
6151 struct frame *f;
6152 {
6153 /* Make the event type no_event; we'll change that when we decide
6154 otherwise. */
6155 result->kind = mouse_click;
6156 result->code = event->button - Button1;
6157 result->timestamp = event->time;
6158 result->modifiers = (x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f),
6159 event->state)
6160 | (event->type == ButtonRelease
6161 ? up_modifier
6162 : down_modifier));
6163
6164 XSETINT (result->x, event->x);
6165 XSETINT (result->y, -1);
6166 XSETFRAME (result->frame_or_window, f);
6167 }
6168
6169 #endif /* 0 */
6170 6143
6171 6144
6172 /* Function to report a mouse movement to the mainstream Emacs code. 6145 /* Function to report a mouse movement to the mainstream Emacs code.
6173 The input handler calls this. 6146 The input handler calls this.
6174 6147
7561 XSETFASTINT (window, ev->data.l[0]); 7534 XSETFASTINT (window, ev->data.l[0]);
7562 f = XFRAME (XWINDOW (window)->frame); 7535 f = XFRAME (XWINDOW (window)->frame);
7563 7536
7564 ievent->kind = scroll_bar_click; 7537 ievent->kind = scroll_bar_click;
7565 ievent->frame_or_window = window; 7538 ievent->frame_or_window = window;
7539 ievent->arg = Qnil;
7566 ievent->timestamp = XtLastTimestampProcessed (FRAME_X_DISPLAY (f)); 7540 ievent->timestamp = XtLastTimestampProcessed (FRAME_X_DISPLAY (f));
7567 ievent->part = ev->data.l[1]; 7541 ievent->part = ev->data.l[1];
7568 ievent->code = ev->data.l[2]; 7542 ievent->code = ev->data.l[2];
7569 ievent->x = make_number ((int) ev->data.l[3]); 7543 ievent->x = make_number ((int) ev->data.l[3]);
7570 ievent->y = make_number ((int) ev->data.l[4]); 7544 ievent->y = make_number ((int) ev->data.l[4]);
8607 event->xbutton.state) 8581 event->xbutton.state)
8608 | (event->type == ButtonRelease 8582 | (event->type == ButtonRelease
8609 ? up_modifier 8583 ? up_modifier
8610 : down_modifier)); 8584 : down_modifier));
8611 emacs_event->frame_or_window = bar->window; 8585 emacs_event->frame_or_window = bar->window;
8586 emacs_event->arg = Qnil;
8612 emacs_event->timestamp = event->xbutton.time; 8587 emacs_event->timestamp = event->xbutton.time;
8613 { 8588 {
8614 #if 0 8589 #if 0
8615 FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); 8590 FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
8616 int internal_height 8591 int internal_height
8962 bcopy (&event, f->output_data.x->saved_menu_event, size); \ 8937 bcopy (&event, f->output_data.x->saved_menu_event, size); \
8963 if (numchars >= 1) \ 8938 if (numchars >= 1) \
8964 { \ 8939 { \
8965 bufp->kind = menu_bar_activate_event; \ 8940 bufp->kind = menu_bar_activate_event; \
8966 XSETFRAME (bufp->frame_or_window, f); \ 8941 XSETFRAME (bufp->frame_or_window, f); \
8942 bufp->arg = Qnil; \
8967 bufp++; \ 8943 bufp++; \
8968 count++; \ 8944 count++; \
8969 numchars--; \ 8945 numchars--; \
8970 } \ 8946 } \
8971 } \ 8947 } \
9165 if (numchars == 0) 9141 if (numchars == 0)
9166 abort (); 9142 abort ();
9167 9143
9168 bufp->kind = delete_window_event; 9144 bufp->kind = delete_window_event;
9169 XSETFRAME (bufp->frame_or_window, f); 9145 XSETFRAME (bufp->frame_or_window, f);
9146 bufp->arg = Qnil;
9170 bufp++; 9147 bufp++;
9171 9148
9172 count += 1; 9149 count += 1;
9173 numchars -= 1; 9150 numchars -= 1;
9174 } 9151 }
9257 bufp->kind = selection_clear_event; 9234 bufp->kind = selection_clear_event;
9258 SELECTION_EVENT_DISPLAY (bufp) = eventp->display; 9235 SELECTION_EVENT_DISPLAY (bufp) = eventp->display;
9259 SELECTION_EVENT_SELECTION (bufp) = eventp->selection; 9236 SELECTION_EVENT_SELECTION (bufp) = eventp->selection;
9260 SELECTION_EVENT_TIME (bufp) = eventp->time; 9237 SELECTION_EVENT_TIME (bufp) = eventp->time;
9261 bufp->frame_or_window = Qnil; 9238 bufp->frame_or_window = Qnil;
9239 bufp->arg = Qnil;
9262 bufp++; 9240 bufp++;
9263 9241
9264 count += 1; 9242 count += 1;
9265 numchars -= 1; 9243 numchars -= 1;
9266 } 9244 }
9287 SELECTION_EVENT_SELECTION (bufp) = eventp->selection; 9265 SELECTION_EVENT_SELECTION (bufp) = eventp->selection;
9288 SELECTION_EVENT_TARGET (bufp) = eventp->target; 9266 SELECTION_EVENT_TARGET (bufp) = eventp->target;
9289 SELECTION_EVENT_PROPERTY (bufp) = eventp->property; 9267 SELECTION_EVENT_PROPERTY (bufp) = eventp->property;
9290 SELECTION_EVENT_TIME (bufp) = eventp->time; 9268 SELECTION_EVENT_TIME (bufp) = eventp->time;
9291 bufp->frame_or_window = Qnil; 9269 bufp->frame_or_window = Qnil;
9270 bufp->arg = Qnil;
9292 bufp++; 9271 bufp++;
9293 9272
9294 count += 1; 9273 count += 1;
9295 numchars -= 1; 9274 numchars -= 1;
9296 } 9275 }
9400 { 9379 {
9401 f->async_iconified = 1; 9380 f->async_iconified = 1;
9402 9381
9403 bufp->kind = iconify_event; 9382 bufp->kind = iconify_event;
9404 XSETFRAME (bufp->frame_or_window, f); 9383 XSETFRAME (bufp->frame_or_window, f);
9384 bufp->arg = Qnil;
9405 bufp++; 9385 bufp++;
9406 count++; 9386 count++;
9407 numchars--; 9387 numchars--;
9408 } 9388 }
9409 } 9389 }
9431 9411
9432 if (f->iconified) 9412 if (f->iconified)
9433 { 9413 {
9434 bufp->kind = deiconify_event; 9414 bufp->kind = deiconify_event;
9435 XSETFRAME (bufp->frame_or_window, f); 9415 XSETFRAME (bufp->frame_or_window, f);
9416 bufp->arg = Qnil;
9436 bufp++; 9417 bufp++;
9437 count++; 9418 count++;
9438 numchars--; 9419 numchars--;
9439 } 9420 }
9440 else if (! NILP (Vframe_list) 9421 else if (! NILP (Vframe_list)
9613 temp_index = 0; 9594 temp_index = 0;
9614 temp_buffer[temp_index++] = keysym; 9595 temp_buffer[temp_index++] = keysym;
9615 bufp->kind = non_ascii_keystroke; 9596 bufp->kind = non_ascii_keystroke;
9616 bufp->code = keysym; 9597 bufp->code = keysym;
9617 XSETFRAME (bufp->frame_or_window, f); 9598 XSETFRAME (bufp->frame_or_window, f);
9599 bufp->arg = Qnil;
9618 bufp->modifiers 9600 bufp->modifiers
9619 = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), 9601 = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f),
9620 modifiers); 9602 modifiers);
9621 bufp->timestamp = event.xkey.time; 9603 bufp->timestamp = event.xkey.time;
9622 bufp++; 9604 bufp++;
9633 temp_index = 0; 9615 temp_index = 0;
9634 temp_buffer[temp_index++] = copy_buffer[i]; 9616 temp_buffer[temp_index++] = copy_buffer[i];
9635 bufp->kind = ascii_keystroke; 9617 bufp->kind = ascii_keystroke;
9636 bufp->code = copy_buffer[i]; 9618 bufp->code = copy_buffer[i];
9637 XSETFRAME (bufp->frame_or_window, f); 9619 XSETFRAME (bufp->frame_or_window, f);
9620 bufp->arg = Qnil;
9638 bufp->modifiers 9621 bufp->modifiers
9639 = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), 9622 = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f),
9640 modifiers); 9623 modifiers);
9641 bufp->timestamp = event.xkey.time; 9624 bufp->timestamp = event.xkey.time;
9642 bufp++; 9625 bufp++;
9751 && GC_CONSP (Vframe_list) 9734 && GC_CONSP (Vframe_list)
9752 && !GC_NILP (XCDR (Vframe_list))) 9735 && !GC_NILP (XCDR (Vframe_list)))
9753 { 9736 {
9754 bufp->kind = FOCUS_IN_EVENT; 9737 bufp->kind = FOCUS_IN_EVENT;
9755 XSETFRAME (bufp->frame_or_window, f); 9738 XSETFRAME (bufp->frame_or_window, f);
9739 bufp->arg = Qnil;
9756 ++bufp, ++count, --numchars; 9740 ++bufp, ++count, --numchars;
9757 } 9741 }
9758 } 9742 }
9759 9743
9760 #ifdef HAVE_X_I18N 9744 #ifdef HAVE_X_I18N