comparison src/frame-tty.c @ 398:74fd4e045ea6 r21-2-29

Import from CVS: tag r21-2-29
author cvs
date Mon, 13 Aug 2007 11:13:30 +0200
parents 8626e4521993
children 697ef44129c6
comparison
equal deleted inserted replaced
397:f4aeb21a5bad 398:74fd4e045ea6
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
40 36
41 /* Default properties to use when creating frames. */ 37 /* Default properties to use when creating frames. */
42 Lisp_Object Vdefault_tty_frame_plist; 38 Lisp_Object Vdefault_tty_frame_plist;
43 39
44 static void tty_raise_frame (struct frame *); 40 static void tty_raise_frame (struct frame *);
83 int first_on_console) 79 int first_on_console)
84 { 80 {
85 if (first_on_console) 81 if (first_on_console)
86 call1 (Qinit_post_tty_win, FRAME_CONSOLE (f)); 82 call1 (Qinit_post_tty_win, FRAME_CONSOLE (f));
87 } 83 }
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
115 84
116 /* Change from withdrawn state to mapped state. */ 85 /* Change from withdrawn state to mapped state. */
117 static void 86 static void
118 tty_make_frame_visible (struct frame *f) 87 tty_make_frame_visible (struct frame *f)
119 { 88 {
221 console_type_create_frame_tty (void) 190 console_type_create_frame_tty (void)
222 { 191 {
223 CONSOLE_HAS_METHOD (tty, init_frame_1); 192 CONSOLE_HAS_METHOD (tty, init_frame_1);
224 CONSOLE_HAS_METHOD (tty, init_frame_3); 193 CONSOLE_HAS_METHOD (tty, init_frame_3);
225 CONSOLE_HAS_METHOD (tty, after_init_frame); 194 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
230 CONSOLE_HAS_METHOD (tty, make_frame_visible); 195 CONSOLE_HAS_METHOD (tty, make_frame_visible);
231 CONSOLE_HAS_METHOD (tty, make_frame_invisible); 196 CONSOLE_HAS_METHOD (tty, make_frame_invisible);
232 CONSOLE_HAS_METHOD (tty, frame_visible_p); 197 CONSOLE_HAS_METHOD (tty, frame_visible_p);
233 CONSOLE_HAS_METHOD (tty, raise_frame); 198 CONSOLE_HAS_METHOD (tty, raise_frame);
234 CONSOLE_HAS_METHOD (tty, lower_frame); 199 CONSOLE_HAS_METHOD (tty, lower_frame);