X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/b35f288d478ef137a4d9e8e5a6a5f368a86b01f5..8510724d46951d651a78424e12b93ccee100c665:/src/frame.h diff --git a/src/frame.h b/src/frame.h index 009cbd76da..9193da3edf 100644 --- a/src/frame.h +++ b/src/frame.h @@ -1,6 +1,6 @@ /* Define frame-object for GNU Emacs. Copyright (C) 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -24,6 +24,8 @@ along with GNU Emacs. If not, see . */ #ifndef EMACS_FRAME_H #define EMACS_FRAME_H +#include "dispextern.h" + /* Miscellanea. */ @@ -50,7 +52,8 @@ enum output_method output_x_window, output_msdos_raw, output_w32, - output_mac + output_mac, + output_ns }; enum vertical_scroll_bar_type @@ -237,7 +240,7 @@ struct frame auto-resize-tool-bar is set to grow-only. */ unsigned minimize_tool_bar_window_p : 1; -#if defined (USE_GTK) || defined (MAC_OS) +#if defined (USE_GTK) || defined (HAVE_NS) /* Nonzero means using a tool bar that comes from the toolkit. */ int external_tool_bar; #endif @@ -326,7 +329,7 @@ struct frame struct tty_output *tty; /* termchar.h */ struct x_output *x; /* xterm.h */ struct w32_output *w32; /* w32term.h */ - struct mac_output *mac; /* macterm.h */ + struct ns_output *ns; /* nsterm.h */ EMACS_INT nothing; } output_data; @@ -353,8 +356,8 @@ struct frame /* Number of lines of menu bar. */ int menu_bar_lines; -#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS) \ - || defined (USE_GTK) +#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ + || defined (HAVE_NS) || defined (USE_GTK) /* Nonzero means using a menu bar that comes from the X toolkit. */ unsigned int external_menu_bar : 1; #endif @@ -477,6 +480,12 @@ struct frame /* The baud rate that was used to calculate costs for this frame. */ int cost_calculation_baud_rate; + /* frame opacity + alpha[0]: alpha transparency of the active frame + alpha[1]: alpha transparency of inactive frames + Negative values mean not to change alpha. */ + double alpha[2]; + /* Exponent for gamma correction of colors. 1/(VIEWING_GAMMA * SCREEN_GAMMA) where viewing_gamma is 0.4545 and SCREEN_GAMMA is a frame parameter. 0 means don't do gamma correction. */ @@ -490,11 +499,7 @@ struct frame unsigned long foreground_pixel; }; -#ifdef MULTI_KBOARD #define FRAME_KBOARD(f) ((f)->terminal->kboard) -#else -#define FRAME_KBOARD(f) (&the_only_kboard) -#endif /* Return a pointer to the image cache of frame F. */ #define FRAME_IMAGE_CACHE(F) ((F)->terminal->image_cache) @@ -514,6 +519,7 @@ typedef struct frame *FRAME_PTR; #define FRAME_W32_P(f) ((f)->output_method == output_w32) #define FRAME_MSDOS_P(f) ((f)->output_method == output_msdos_raw) #define FRAME_MAC_P(f) ((f)->output_method == output_mac) +#define FRAME_NS_P(f) ((f)->output_method == output_ns) /* FRAME_WINDOW_P tests whether the frame is a window, and is defined to be the predicate for the window system being used. */ @@ -524,8 +530,8 @@ typedef struct frame *FRAME_PTR; #ifdef HAVE_NTGUI #define FRAME_WINDOW_P(f) FRAME_W32_P (f) #endif -#ifdef MAC_OS -#define FRAME_WINDOW_P(f) FRAME_MAC_P (f) +#ifdef HAVE_NS +#define FRAME_WINDOW_P(f) FRAME_NS_P(f) #endif #ifndef FRAME_WINDOW_P #define FRAME_WINDOW_P(f) (0) @@ -565,7 +571,7 @@ typedef struct frame *FRAME_PTR; /* Nonzero if this frame should display a tool bar in a way that does not use any text lines. */ -#if defined (USE_GTK) || defined (MAC_OS) +#if defined (USE_GTK) || defined (HAVE_NS) #define FRAME_EXTERNAL_TOOL_BAR(f) (f)->external_tool_bar #else #define FRAME_EXTERNAL_TOOL_BAR(f) 0 @@ -583,8 +589,8 @@ typedef struct frame *FRAME_PTR; /* Nonzero if this frame should display a menu bar in a way that does not use any text lines. */ -#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS) \ - || defined (USE_GTK) +#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ + || defined (HAVE_NS) || defined (USE_GTK) #define FRAME_EXTERNAL_MENU_BAR(f) (f)->external_menu_bar #else #define FRAME_EXTERNAL_MENU_BAR(f) 0 @@ -1033,12 +1039,13 @@ extern Lisp_Object Qline_spacing; extern Lisp_Object Qwait_for_wm; extern Lisp_Object Qfullscreen; extern Lisp_Object Qfont_backend; +extern Lisp_Object Qalpha; extern Lisp_Object Qleft_fringe, Qright_fringe; extern Lisp_Object Qheight, Qwidth; extern Lisp_Object Qminibuffer, Qmodeline; extern Lisp_Object Qonly; -extern Lisp_Object Qx, Qw32, Qmac, Qpc; +extern Lisp_Object Qx, Qw32, Qmac, Qpc, Qns; extern Lisp_Object Qvisible; extern Lisp_Object Qdisplay_type; extern Lisp_Object Qbackground_mode; @@ -1097,9 +1104,19 @@ extern Lisp_Object x_icon_type P_ ((struct frame *)); extern int x_figure_window_size P_ ((struct frame *, Lisp_Object, int)); +extern Lisp_Object Vframe_alpha_lower_limit; +extern void x_set_alpha P_ ((struct frame *, Lisp_Object, Lisp_Object)); extern void validate_x_resource_name P_ ((void)); +extern Lisp_Object display_x_get_resource (Display_Info *, + Lisp_Object attribute, + Lisp_Object class, + Lisp_Object component, + Lisp_Object subclass); + +extern Lisp_Object delete_frame P_ ((Lisp_Object, Lisp_Object)); + #endif /* HAVE_WINDOW_SYSTEM */ #endif /* not EMACS_FRAME_H */