diff options
| author | Stefan Monnier | 2010-12-10 19:13:08 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2010-12-10 19:13:08 -0500 |
| commit | 2c302df3a13236bfbf8ea1b771d13618fcda8d71 (patch) | |
| tree | f26dc9f22861dc37610de319d05255de058c221b /src/frame.c | |
| parent | 0c747cb143fa227e78f350ac353d703f489209df (diff) | |
| parent | 175069efeb080517afefdd44a06f7a779ea8c25c (diff) | |
| download | emacs-2c302df3a13236bfbf8ea1b771d13618fcda8d71.tar.gz emacs-2c302df3a13236bfbf8ea1b771d13618fcda8d71.zip | |
Merge from trunk
Diffstat (limited to 'src/frame.c')
| -rw-r--r-- | src/frame.c | 68 |
1 files changed, 52 insertions, 16 deletions
diff --git a/src/frame.c b/src/frame.c index 04cc1ca07da..6cf46f1a0ba 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | /* Generic frame functions. | 1 | /* Generic frame functions. |
| 2 | Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, | 2 | |
| 3 | 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 3 | Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, |
| 4 | 2004, 2005, 2006, 2007, 2008, 2009, 2010 | ||
| 5 | Free Software Foundation, Inc. | ||
| 4 | 6 | ||
| 5 | This file is part of GNU Emacs. | 7 | This file is part of GNU Emacs. |
| 6 | 8 | ||
| @@ -201,11 +203,12 @@ Lisp_Object Vframe_list; | |||
| 201 | 203 | ||
| 202 | DEFUN ("framep", Fframep, Sframep, 1, 1, 0, | 204 | DEFUN ("framep", Fframep, Sframep, 1, 1, 0, |
| 203 | doc: /* Return non-nil if OBJECT is a frame. | 205 | doc: /* Return non-nil if OBJECT is a frame. |
| 204 | Value is t for a termcap frame (a character-only terminal), | 206 | Value is: |
| 205 | `x' for an Emacs frame that is really an X window, | 207 | t for a termcap frame (a character-only terminal), |
| 206 | `w32' for an Emacs frame that is a window on MS-Windows display, | 208 | 'x' for an Emacs frame that is really an X window, |
| 207 | `ns' for an Emacs frame on a GNUstep or Macintosh Cocoa display, | 209 | 'w32' for an Emacs frame that is a window on MS-Windows display, |
| 208 | `pc' for a direct-write MS-DOS frame. | 210 | 'ns' for an Emacs frame on a GNUstep or Macintosh Cocoa display, |
| 211 | 'pc' for a direct-write MS-DOS frame. | ||
| 209 | See also `frame-live-p'. */) | 212 | See also `frame-live-p'. */) |
| 210 | (Lisp_Object object) | 213 | (Lisp_Object object) |
| 211 | { | 214 | { |
| @@ -247,10 +250,18 @@ return values. */) | |||
| 247 | 250 | ||
| 248 | DEFUN ("window-system", Fwindow_system, Swindow_system, 0, 1, 0, | 251 | DEFUN ("window-system", Fwindow_system, Swindow_system, 0, 1, 0, |
| 249 | doc: /* The name of the window system that FRAME is displaying through. | 252 | doc: /* The name of the window system that FRAME is displaying through. |
| 250 | The value is a symbol---for instance, 'x' for X windows. | 253 | The value is a symbol: |
| 251 | The value is nil if Emacs is using a text-only terminal. | 254 | nil for a termcap frame (a character-only terminal), |
| 252 | 255 | 'x' for an Emacs frame that is really an X window, | |
| 253 | FRAME defaults to the currently selected frame. */) | 256 | 'w32' for an Emacs frame that is a window on MS-Windows display, |
| 257 | 'ns' for an Emacs frame on a GNUstep or Macintosh Cocoa display, | ||
| 258 | 'pc' for a direct-write MS-DOS frame. | ||
| 259 | |||
| 260 | FRAME defaults to the currently selected frame. | ||
| 261 | |||
| 262 | Use of this function as a predicate is deprecated. Instead, | ||
| 263 | use `display-graphic-p' or any of the other `display-*-p' | ||
| 264 | predicates which report frame's specific UI-related capabilities. */) | ||
| 254 | (Lisp_Object frame) | 265 | (Lisp_Object frame) |
| 255 | { | 266 | { |
| 256 | Lisp_Object type; | 267 | Lisp_Object type; |
| @@ -3300,7 +3311,7 @@ x_set_screen_gamma (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu | |||
| 3300 | void | 3311 | void |
| 3301 | x_set_font (struct frame *f, Lisp_Object arg, Lisp_Object oldval) | 3312 | x_set_font (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 3302 | { | 3313 | { |
| 3303 | Lisp_Object frame, font_object, font_param = Qnil; | 3314 | Lisp_Object font_object, font_param = Qnil; |
| 3304 | int fontset = -1; | 3315 | int fontset = -1; |
| 3305 | 3316 | ||
| 3306 | /* Set the frame parameter back to the old value because we may | 3317 | /* Set the frame parameter back to the old value because we may |
| @@ -4314,6 +4325,20 @@ frame_make_pointer_visible (void) | |||
| 4314 | } | 4325 | } |
| 4315 | } | 4326 | } |
| 4316 | 4327 | ||
| 4328 | DEFUN ("frame-pointer-visible-p", Fframe_pointer_visible_p, | ||
| 4329 | Sframe_pointer_visible_p, 0, 1, 0, | ||
| 4330 | doc: /* Return t if the mouse pointer displayed on FRAME is visible. | ||
| 4331 | Otherwise it returns nil. FRAME omitted or nil means the | ||
| 4332 | selected frame. This is useful when `make-pointer-invisible' is set. */) | ||
| 4333 | (Lisp_Object frame) | ||
| 4334 | { | ||
| 4335 | if (NILP (frame)) | ||
| 4336 | frame = selected_frame; | ||
| 4337 | |||
| 4338 | CHECK_FRAME (frame); | ||
| 4339 | |||
| 4340 | return (XFRAME (frame)->pointer_invisible ? Qnil : Qt); | ||
| 4341 | } | ||
| 4317 | 4342 | ||
| 4318 | 4343 | ||
| 4319 | /*********************************************************************** | 4344 | /*********************************************************************** |
| @@ -4538,12 +4563,24 @@ recursively). */); | |||
| 4538 | staticpro (&Qdelete_frame_functions); | 4563 | staticpro (&Qdelete_frame_functions); |
| 4539 | 4564 | ||
| 4540 | DEFVAR_LISP ("menu-bar-mode", &Vmenu_bar_mode, | 4565 | DEFVAR_LISP ("menu-bar-mode", &Vmenu_bar_mode, |
| 4541 | doc: /* Non-nil if Menu-Bar mode is enabled. */); | 4566 | doc: /* Non-nil if Menu-Bar mode is enabled. |
| 4567 | See the command `menu-bar-mode' for a description of this minor mode. | ||
| 4568 | Setting this variable directly does not take effect; | ||
| 4569 | either customize it (see the info node `Easy Customization') | ||
| 4570 | or call the function `menu-bar-mode'. */); | ||
| 4542 | Vmenu_bar_mode = Qt; | 4571 | Vmenu_bar_mode = Qt; |
| 4543 | 4572 | ||
| 4544 | DEFVAR_LISP ("tool-bar-mode", &Vtool_bar_mode, | 4573 | DEFVAR_LISP ("tool-bar-mode", &Vtool_bar_mode, |
| 4545 | doc: /* Non-nil if Tool-Bar mode is enabled. */); | 4574 | doc: /* Non-nil if Tool-Bar mode is enabled. |
| 4575 | See the command `tool-bar-mode' for a description of this minor mode. | ||
| 4576 | Setting this variable directly does not take effect; | ||
| 4577 | either customize it (see the info node `Easy Customization') | ||
| 4578 | or call the function `tool-bar-mode'. */); | ||
| 4579 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 4546 | Vtool_bar_mode = Qt; | 4580 | Vtool_bar_mode = Qt; |
| 4581 | #else | ||
| 4582 | Vtool_bar_mode = Qnil; | ||
| 4583 | #endif | ||
| 4547 | 4584 | ||
| 4548 | DEFVAR_KBOARD ("default-minibuffer-frame", Vdefault_minibuffer_frame, | 4585 | DEFVAR_KBOARD ("default-minibuffer-frame", Vdefault_minibuffer_frame, |
| 4549 | doc: /* Minibufferless frames use this frame's minibuffer. | 4586 | doc: /* Minibufferless frames use this frame's minibuffer. |
| @@ -4623,6 +4660,7 @@ automatically. See also `mouse-autoselect-window'. */); | |||
| 4623 | defsubr (&Sset_frame_width); | 4660 | defsubr (&Sset_frame_width); |
| 4624 | defsubr (&Sset_frame_size); | 4661 | defsubr (&Sset_frame_size); |
| 4625 | defsubr (&Sset_frame_position); | 4662 | defsubr (&Sset_frame_position); |
| 4663 | defsubr (&Sframe_pointer_visible_p); | ||
| 4626 | 4664 | ||
| 4627 | #ifdef HAVE_WINDOW_SYSTEM | 4665 | #ifdef HAVE_WINDOW_SYSTEM |
| 4628 | defsubr (&Sx_get_resource); | 4666 | defsubr (&Sx_get_resource); |
| @@ -4631,5 +4669,3 @@ automatically. See also `mouse-autoselect-window'. */); | |||
| 4631 | 4669 | ||
| 4632 | } | 4670 | } |
| 4633 | 4671 | ||
| 4634 | /* arch-tag: 7dbf2c69-9aad-45f8-8296-db893d6dd039 | ||
| 4635 | (do not change this comment) */ | ||