Mercurial > hg > xemacs-beta
comparison src/frame-tty.c @ 412:697ef44129c6 r21-2-14
Import from CVS: tag r21-2-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:20:41 +0200 |
parents | 74fd4e045ea6 |
children |
comparison
equal
deleted
inserted
replaced
411:12e008d41344 | 412:697ef44129c6 |
---|---|
31 #include "console-tty.h" | 31 #include "console-tty.h" |
32 #include "frame.h" | 32 #include "frame.h" |
33 | 33 |
34 #include "events.h" | 34 #include "events.h" |
35 | 35 |
36 #ifdef HAVE_GPM | |
37 #include <gpm.h> | |
38 #endif | |
39 | |
36 | 40 |
37 /* Default properties to use when creating frames. */ | 41 /* Default properties to use when creating frames. */ |
38 Lisp_Object Vdefault_tty_frame_plist; | 42 Lisp_Object Vdefault_tty_frame_plist; |
39 | 43 |
40 static void tty_raise_frame (struct frame *); | 44 static void tty_raise_frame (struct frame *); |
79 int first_on_console) | 83 int first_on_console) |
80 { | 84 { |
81 if (first_on_console) | 85 if (first_on_console) |
82 call1 (Qinit_post_tty_win, FRAME_CONSOLE (f)); | 86 call1 (Qinit_post_tty_win, FRAME_CONSOLE (f)); |
83 } | 87 } |
88 | |
89 #ifdef HAVE_GPM | |
90 static int | |
91 tty_get_mouse_position (struct device *d, Lisp_Object *frame, int *x, int *y) | |
92 { | |
93 Gpm_Event ev; | |
94 int num_buttons; | |
95 | |
96 num_buttons = Gpm_GetSnapshot(&ev); | |
97 *x = ev.x; | |
98 *y = ev.y; | |
99 *frame = DEVICE_SELECTED_FRAME (d); | |
100 return (1); | |
101 } | |
102 | |
103 static void | |
104 tty_set_mouse_position (struct window *w, int x, int y) | |
105 { | |
106 /* XXX | |
107 I couldn't find any GPM functions that set the mouse position. | |
108 Mr. Perry had left this function empty; that must be why. | |
109 karlheg | |
110 */ | |
111 } | |
112 | |
113 #endif | |
114 | |
84 | 115 |
85 /* Change from withdrawn state to mapped state. */ | 116 /* Change from withdrawn state to mapped state. */ |
86 static void | 117 static void |
87 tty_make_frame_visible (struct frame *f) | 118 tty_make_frame_visible (struct frame *f) |
88 { | 119 { |
190 console_type_create_frame_tty (void) | 221 console_type_create_frame_tty (void) |
191 { | 222 { |
192 CONSOLE_HAS_METHOD (tty, init_frame_1); | 223 CONSOLE_HAS_METHOD (tty, init_frame_1); |
193 CONSOLE_HAS_METHOD (tty, init_frame_3); | 224 CONSOLE_HAS_METHOD (tty, init_frame_3); |
194 CONSOLE_HAS_METHOD (tty, after_init_frame); | 225 CONSOLE_HAS_METHOD (tty, after_init_frame); |
226 #ifdef HAVE_GPM | |
227 CONSOLE_HAS_METHOD (tty, get_mouse_position); | |
228 CONSOLE_HAS_METHOD (tty, set_mouse_position); | |
229 #endif | |
195 CONSOLE_HAS_METHOD (tty, make_frame_visible); | 230 CONSOLE_HAS_METHOD (tty, make_frame_visible); |
196 CONSOLE_HAS_METHOD (tty, make_frame_invisible); | 231 CONSOLE_HAS_METHOD (tty, make_frame_invisible); |
197 CONSOLE_HAS_METHOD (tty, frame_visible_p); | 232 CONSOLE_HAS_METHOD (tty, frame_visible_p); |
198 CONSOLE_HAS_METHOD (tty, raise_frame); | 233 CONSOLE_HAS_METHOD (tty, raise_frame); |
199 CONSOLE_HAS_METHOD (tty, lower_frame); | 234 CONSOLE_HAS_METHOD (tty, lower_frame); |