Mercurial > emacs
comparison src/term.c @ 109351:c8a969d13eda
merge trunk
| author | Kenichi Handa <handa@etlken> |
|---|---|
| date | Fri, 09 Jul 2010 15:55:27 +0900 |
| parents | 8cfee7d2955f |
| children | 3e07e13fe30a |
comparison
equal
deleted
inserted
replaced
| 109350:c11d07f3d731 | 109351:c8a969d13eda |
|---|---|
| 2131 doc: /* Return non-nil if the tty device TERMINAL can display colors. | 2131 doc: /* Return non-nil if the tty device TERMINAL can display colors. |
| 2132 | 2132 |
| 2133 TERMINAL can be a terminal object, a frame, or nil (meaning the | 2133 TERMINAL can be a terminal object, a frame, or nil (meaning the |
| 2134 selected frame's terminal). This function always returns nil if | 2134 selected frame's terminal). This function always returns nil if |
| 2135 TERMINAL does not refer to a text-only terminal. */) | 2135 TERMINAL does not refer to a text-only terminal. */) |
| 2136 (terminal) | 2136 (Lisp_Object terminal) |
| 2137 Lisp_Object terminal; | |
| 2138 { | 2137 { |
| 2139 struct terminal *t = get_tty_terminal (terminal, 0); | 2138 struct terminal *t = get_tty_terminal (terminal, 0); |
| 2140 if (!t) | 2139 if (!t) |
| 2141 return Qnil; | 2140 return Qnil; |
| 2142 else | 2141 else |
| 2149 doc: /* Return the number of colors supported by the tty device TERMINAL. | 2148 doc: /* Return the number of colors supported by the tty device TERMINAL. |
| 2150 | 2149 |
| 2151 TERMINAL can be a terminal object, a frame, or nil (meaning the | 2150 TERMINAL can be a terminal object, a frame, or nil (meaning the |
| 2152 selected frame's terminal). This function always returns 0 if | 2151 selected frame's terminal). This function always returns 0 if |
| 2153 TERMINAL does not refer to a text-only terminal. */) | 2152 TERMINAL does not refer to a text-only terminal. */) |
| 2154 (terminal) | 2153 (Lisp_Object terminal) |
| 2155 Lisp_Object terminal; | |
| 2156 { | 2154 { |
| 2157 struct terminal *t = get_tty_terminal (terminal, 0); | 2155 struct terminal *t = get_tty_terminal (terminal, 0); |
| 2158 if (!t) | 2156 if (!t) |
| 2159 return make_number (0); | 2157 return make_number (0); |
| 2160 else | 2158 else |
| 2334 doc: /* Return the type of the tty device that TERMINAL uses. | 2332 doc: /* Return the type of the tty device that TERMINAL uses. |
| 2335 Returns nil if TERMINAL is not on a tty device. | 2333 Returns nil if TERMINAL is not on a tty device. |
| 2336 | 2334 |
| 2337 TERMINAL can be a terminal object, a frame, or nil (meaning the | 2335 TERMINAL can be a terminal object, a frame, or nil (meaning the |
| 2338 selected frame's terminal). */) | 2336 selected frame's terminal). */) |
| 2339 (terminal) | 2337 (Lisp_Object terminal) |
| 2340 Lisp_Object terminal; | |
| 2341 { | 2338 { |
| 2342 struct terminal *t = get_terminal (terminal, 1); | 2339 struct terminal *t = get_terminal (terminal, 1); |
| 2343 | 2340 |
| 2344 if (t->type != output_termcap && t->type != output_msdos_raw) | 2341 if (t->type != output_termcap && t->type != output_msdos_raw) |
| 2345 return Qnil; | 2342 return Qnil; |
| 2354 doc: /* Return non-nil if TERMINAL is the controlling tty of the Emacs process. | 2351 doc: /* Return non-nil if TERMINAL is the controlling tty of the Emacs process. |
| 2355 | 2352 |
| 2356 TERMINAL can be a terminal object, a frame, or nil (meaning the | 2353 TERMINAL can be a terminal object, a frame, or nil (meaning the |
| 2357 selected frame's terminal). This function always returns nil if | 2354 selected frame's terminal). This function always returns nil if |
| 2358 TERMINAL is not on a tty device. */) | 2355 TERMINAL is not on a tty device. */) |
| 2359 (terminal) | 2356 (Lisp_Object terminal) |
| 2360 Lisp_Object terminal; | |
| 2361 { | 2357 { |
| 2362 struct terminal *t = get_terminal (terminal, 1); | 2358 struct terminal *t = get_terminal (terminal, 1); |
| 2363 | 2359 |
| 2364 if ((t->type != output_termcap && t->type != output_msdos_raw) | 2360 if ((t->type != output_termcap && t->type != output_msdos_raw) |
| 2365 || strcmp (t->display_info.tty->name, DEV_TTY) != 0) | 2361 || strcmp (t->display_info.tty->name, DEV_TTY) != 0) |
| 2375 no effect if used on a non-tty terminal. | 2371 no effect if used on a non-tty terminal. |
| 2376 | 2372 |
| 2377 TERMINAL can be a terminal object, a frame or nil (meaning the | 2373 TERMINAL can be a terminal object, a frame or nil (meaning the |
| 2378 selected frame's terminal). This function always returns nil if | 2374 selected frame's terminal). This function always returns nil if |
| 2379 TERMINAL does not refer to a text-only terminal. */) | 2375 TERMINAL does not refer to a text-only terminal. */) |
| 2380 (terminal) | 2376 (Lisp_Object terminal) |
| 2381 Lisp_Object terminal; | |
| 2382 { | 2377 { |
| 2383 struct terminal *t = get_terminal (terminal, 1); | 2378 struct terminal *t = get_terminal (terminal, 1); |
| 2384 | 2379 |
| 2385 if (t->type == output_termcap) | 2380 if (t->type == output_termcap) |
| 2386 t->display_info.tty->TS_enter_underline_mode = 0; | 2381 t->display_info.tty->TS_enter_underline_mode = 0; |
| 2406 | 2401 |
| 2407 `suspend-tty' does nothing if it is called on a device that is already | 2402 `suspend-tty' does nothing if it is called on a device that is already |
| 2408 suspended. | 2403 suspended. |
| 2409 | 2404 |
| 2410 A suspended tty may be resumed by calling `resume-tty' on it. */) | 2405 A suspended tty may be resumed by calling `resume-tty' on it. */) |
| 2411 (tty) | 2406 (Lisp_Object tty) |
| 2412 Lisp_Object tty; | |
| 2413 { | 2407 { |
| 2414 struct terminal *t = get_tty_terminal (tty, 1); | 2408 struct terminal *t = get_tty_terminal (tty, 1); |
| 2415 FILE *f; | 2409 FILE *f; |
| 2416 | 2410 |
| 2417 if (!t) | 2411 if (!t) |
| 2473 `resume-tty' does nothing if it is called on a device that is not | 2467 `resume-tty' does nothing if it is called on a device that is not |
| 2474 suspended. | 2468 suspended. |
| 2475 | 2469 |
| 2476 TTY may be a terminal object, a frame, or nil (meaning the selected | 2470 TTY may be a terminal object, a frame, or nil (meaning the selected |
| 2477 frame's terminal). */) | 2471 frame's terminal). */) |
| 2478 (tty) | 2472 (Lisp_Object tty) |
| 2479 Lisp_Object tty; | |
| 2480 { | 2473 { |
| 2481 struct terminal *t = get_tty_terminal (tty, 1); | 2474 struct terminal *t = get_tty_terminal (tty, 1); |
| 2482 int fd; | 2475 int fd; |
| 2483 | 2476 |
| 2484 if (!t) | 2477 if (!t) |
| 3146 | 3139 |
| 3147 DEFUN ("gpm-mouse-start", Fgpm_mouse_start, Sgpm_mouse_start, | 3140 DEFUN ("gpm-mouse-start", Fgpm_mouse_start, Sgpm_mouse_start, |
| 3148 0, 0, 0, | 3141 0, 0, 0, |
| 3149 doc: /* Open a connection to Gpm. | 3142 doc: /* Open a connection to Gpm. |
| 3150 Gpm-mouse can only be activated for one tty at a time. */) | 3143 Gpm-mouse can only be activated for one tty at a time. */) |
| 3151 () | 3144 (void) |
| 3152 { | 3145 { |
| 3153 struct frame *f = SELECTED_FRAME (); | 3146 struct frame *f = SELECTED_FRAME (); |
| 3154 struct tty_display_info *tty | 3147 struct tty_display_info *tty |
| 3155 = ((f)->output_method == output_termcap | 3148 = ((f)->output_method == output_termcap |
| 3156 ? (f)->terminal->display_info.tty : NULL); | 3149 ? (f)->terminal->display_info.tty : NULL); |
| 3194 } | 3187 } |
| 3195 | 3188 |
| 3196 DEFUN ("gpm-mouse-stop", Fgpm_mouse_stop, Sgpm_mouse_stop, | 3189 DEFUN ("gpm-mouse-stop", Fgpm_mouse_stop, Sgpm_mouse_stop, |
| 3197 0, 0, 0, | 3190 0, 0, 0, |
| 3198 doc: /* Close a connection to Gpm. */) | 3191 doc: /* Close a connection to Gpm. */) |
| 3199 () | 3192 (void) |
| 3200 { | 3193 { |
| 3201 struct frame *f = SELECTED_FRAME (); | 3194 struct frame *f = SELECTED_FRAME (); |
| 3202 struct tty_display_info *tty | 3195 struct tty_display_info *tty |
| 3203 = ((f)->output_method == output_termcap | 3196 = ((f)->output_method == output_termcap |
| 3204 ? (f)->terminal->display_info.tty : NULL); | 3197 ? (f)->terminal->display_info.tty : NULL); |
