view lib-src/leditcfns.c @ 1778:1f18bfe28e2f

* termhooks.h (mouse_position_hook): Doc fix. (set_vertical_scrollbar_hook): This doesn't return anything any more, and doesn't take a struct scrollbar * argument any more. (condemn_scrollbars_hook, redeem_scrollbar_hook, judge_scrollbars_hook): Doc fixes. * term.c (mouse_position_hook): Doc fix. (set_vertical_scrollbar_hook): This doesn't return anything any more. Doc fixes. * keyboard.c (kbd_buffer_get_event): Receive the scrollbar's window from *mouse_position_hook and pass it to make_lispy_movement, instead of working with a pointer to a struct scrollbar. (make_lispy_event): We don't need a window_from_scrollbar function anymore; we are given the window directly in *EVENT. Unify the code which generates text-area mouse clicks and scrollbar clicks; use the same code to distinguish clicks from drags on the scrollbar as in the text area. Distinguish clicks from drags by storing a copy of the lispy position list returned as part of the event. (button_down_location): Make this a lisp vector, rather than an array of random structures. (struct mouse_position): Remove this; it's been replaced by a lisp list. (make_lispy_movement): Accept the scrollbar's window as a parameter, rather than the scrollbar itself. If FRAME is zero, assume that the other arguments are garbage. (syms_of_keyboard): No need to staticpro each window of button_down_location now; just initialize and staticpro it. * window.c (window_from_scrollbar): Function deleted; no longer needed. * xdisp.c (redisplay_window): Just pass the window to set_vertical_scrollbar hook; don't pass the scrollbar object too. * xterm.c (XTmouse_position): Don't return a pointer to the scrollbar for scrollbar motion; instead, return the scrollbar's window. * keyboard.c (apply_modifiers): Don't assume that the Qevent_kind property of BASE is set when we first create the new modified symbol. Check that the Qevent_kind property is properly set each time we return any symbol. * termhooks.h (struct input_event): Replace the frame member with a Lisp_Object member by the name of frame_or_window. Doc fixes. Remove the scrollbar member; instead, use frame_or_window to hold the window whose scrollbar was clicked. * keyboard.c (kbd_buffer_store_event, kbd_buffer_get_event, make_lispy_event): Adjust references to frame member of struct input_event to use frame_or_window now. * xterm.c (construct_mouse_click, XTread_socket): Same. * keyboard.c (kbd_buffer_frames): Renamed to kbd_buffer_frame_or_window, and made to exist even when MULTI_FRAME isn't defined; single-frame systems might have scrollbars. Use it to GCPRO the frame_or_window field in the event queue. (kbd_buffer_store_event, kbd_buffer_get_event, stuff_buffered_input): Set and clear the appropriate element of kbd_buffer_frame_or_window, whether or not MULTI_FRAME is #defined. (read_avail_input): When reading characters directly from stdin, set the frame_or_window field of the event appropriately, depending on whether or not MULTI_FRAME is #defined. (Fdiscard_input, init_keyboard): Zap kbd_buffer_frame_or_window, not kbd_buffer_frames. (syms_of_keyboard): Initialize and staticpro kbd_buffer_frame_or_window, whether or not MULTI_FRAME is #defined. * keyboard.c (head_table): Make Qscrollbar_movement have a Qevent_kind property of Qmouse_movement, not Qscrollbar_movement. * keyboard.c (read_key_sequence): If we decide to throw away a mouse event which has prefix symbols (`mode-line', `vertical-scrollbar', etcetera), remember that we may have to unwind two characters, not just one. * keyboard.c (read_key_sequence): Doc fixes. * keyboard.c (kbd_buffer_store_event): Fix reversed sense of test for focus redirection. * keyboard.c (read_char): Don't echo mouse movements.
author Jim Blandy <jimb@redhat.com>
date Thu, 14 Jan 1993 15:11:19 +0000
parents da530eb93c1a
children 695cf19ef79e
line wrap: on
line source

#include <sgtty.h>
#include <signal.h>
#define STRLEN 100
static char str[STRLEN+1] = "%?emacs"; /* extra char for the null */

switch_to_proc(){
    char *ptr = str;
    while (*ptr) ioctl(0, TIOCSTI, ptr++);
    ioctl(0, TIOCSTI, "\n");
    kill(getpid(), SIGTSTP);
    }

set_proc_str(ptr) char *ptr; {
    if (strlen(ptr) <= STRLEN)
	strcpy(str, ptr);
    else
	printf("string too long for set-proc-str: %s\n", ptr);
    }