57 |
vertical_scroll_bar_right |
vertical_scroll_bar_right |
58 |
}; |
}; |
59 |
|
|
60 |
|
enum text_cursor_kinds |
61 |
|
{ |
62 |
|
DEFAULT_CURSOR = -2, |
63 |
|
NO_CURSOR = -1, |
64 |
|
FILLED_BOX_CURSOR, |
65 |
|
HOLLOW_BOX_CURSOR, |
66 |
|
BAR_CURSOR, |
67 |
|
HBAR_CURSOR |
68 |
|
}; |
69 |
|
|
70 |
#if !defined(MSDOS) && !defined(WINDOWSNT) && !defined(MAC_OS) |
#if !defined(MSDOS) && !defined(WINDOWSNT) && !defined(MAC_OS) |
71 |
|
|
72 |
#if !defined(HAVE_X_WINDOWS) |
#if !defined(HAVE_X_WINDOWS) |
150 |
or modified with modify-frame-parameters. */ |
or modified with modify-frame-parameters. */ |
151 |
Lisp_Object param_alist; |
Lisp_Object param_alist; |
152 |
|
|
153 |
/* List of scroll bars on this frame. |
/* List of scroll bars on this frame. |
154 |
Actually, we don't specify exactly what is stored here at all; the |
Actually, we don't specify exactly what is stored here at all; the |
155 |
scroll bar implementation code can use it to store anything it likes. |
scroll bar implementation code can use it to store anything it likes. |
156 |
This field is marked by the garbage collector. It is here |
This field is marked by the garbage collector. It is here |
215 |
be used for output. */ |
be used for output. */ |
216 |
unsigned glyphs_initialized_p : 1; |
unsigned glyphs_initialized_p : 1; |
217 |
|
|
218 |
|
#if defined (USE_GTK) |
219 |
|
/* Nonzero means using a tool bar that comes from the toolkit. */ |
220 |
|
int external_tool_bar; |
221 |
|
#endif |
222 |
|
|
223 |
/* Margin at the top of the frame. Used to display the tool-bar. */ |
/* Margin at the top of the frame. Used to display the tool-bar. */ |
224 |
int tool_bar_lines; |
int tool_bar_lines; |
225 |
|
|
226 |
int n_tool_bar_items; |
int n_tool_bar_items; |
227 |
|
|
228 |
/* A buffer for decode_mode_line. */ |
/* A buffer for decode_mode_line. */ |
229 |
char *decode_mode_spec_buffer; |
char *decode_mode_spec_buffer; |
230 |
|
|
253 |
|
|
254 |
/* A structure of auxiliary data used for displaying the contents. |
/* A structure of auxiliary data used for displaying the contents. |
255 |
struct x_output is used for X window frames; |
struct x_output is used for X window frames; |
256 |
it is defined in xterm.h. |
it is defined in xterm.h. |
257 |
struct w32_output is used for W32 window frames; |
struct w32_output is used for W32 window frames; |
258 |
it is defined in w32term.h. */ |
it is defined in w32term.h. */ |
259 |
union output_data |
union output_data |
275 |
/* Number of lines of menu bar. */ |
/* Number of lines of menu bar. */ |
276 |
int menu_bar_lines; |
int menu_bar_lines; |
277 |
|
|
278 |
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS) |
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS) \ |
279 |
|
|| defined (USE_GTK) |
280 |
/* Nonzero means using a menu bar that comes from the X toolkit. */ |
/* Nonzero means using a menu bar that comes from the X toolkit. */ |
281 |
int external_menu_bar; |
int external_menu_bar; |
282 |
#endif |
#endif |
325 |
/* True if frame actually has a minibuffer window on it. |
/* True if frame actually has a minibuffer window on it. |
326 |
0 if using a minibuffer window that isn't on this frame. */ |
0 if using a minibuffer window that isn't on this frame. */ |
327 |
char has_minibuffer; |
char has_minibuffer; |
328 |
|
|
329 |
/* 0 means, if this frame has just one window, |
/* 0 means, if this frame has just one window, |
330 |
show no modeline for that window. */ |
show no modeline for that window. */ |
331 |
char wants_modeline; |
char wants_modeline; |
338 |
actually display them on this frame. */ |
actually display them on this frame. */ |
339 |
enum vertical_scroll_bar_type vertical_scroll_bar_type; |
enum vertical_scroll_bar_type vertical_scroll_bar_type; |
340 |
|
|
341 |
|
/* What kind of text cursor should we draw in the future? |
342 |
|
This should always be filled_box_cursor or bar_cursor. */ |
343 |
|
enum text_cursor_kinds desired_cursor; |
344 |
|
|
345 |
|
/* Width of bar cursor (if we are using that). */ |
346 |
|
int cursor_width; |
347 |
|
|
348 |
|
/* What kind of text cursor should we draw when the cursor blinks off? |
349 |
|
This can be filled_box_cursor or bar_cursor or no_cursor. */ |
350 |
|
enum text_cursor_kinds blink_off_cursor; |
351 |
|
|
352 |
|
/* Width of bar cursor (if we are using that) for blink-off state. */ |
353 |
|
int blink_off_cursor_width; |
354 |
|
|
355 |
/* Non-0 means raise this frame to the top of the heap when selected. */ |
/* Non-0 means raise this frame to the top of the heap when selected. */ |
356 |
char auto_raise; |
char auto_raise; |
357 |
|
|
463 |
These lines are counted in FRAME_HEIGHT. */ |
These lines are counted in FRAME_HEIGHT. */ |
464 |
#define FRAME_MENU_BAR_LINES(f) (f)->menu_bar_lines |
#define FRAME_MENU_BAR_LINES(f) (f)->menu_bar_lines |
465 |
|
|
466 |
|
/* Nonzero if this frame should display a tool bar |
467 |
|
in a way that does not use any text lines. */ |
468 |
|
#if defined (USE_GTK) |
469 |
|
#define FRAME_EXTERNAL_TOOL_BAR(f) (f)->external_tool_bar |
470 |
|
#else |
471 |
|
#define FRAME_EXTERNAL_TOOL_BAR(f) 0 |
472 |
|
#endif |
473 |
|
|
474 |
/* Number of lines of frame F used for the tool-bar. */ |
/* Number of lines of frame F used for the tool-bar. */ |
475 |
|
|
476 |
#define FRAME_TOOL_BAR_LINES(f) (f)->tool_bar_lines |
#define FRAME_TOOL_BAR_LINES(f) (f)->tool_bar_lines |
477 |
|
|
478 |
|
|
479 |
/* Lines above the top-most window in frame F. */ |
/* Lines above the top-most window in frame F. */ |
480 |
|
|
481 |
#define FRAME_TOP_MARGIN(F) \ |
#define FRAME_TOP_MARGIN(F) \ |
483 |
|
|
484 |
/* Nonzero if this frame should display a menu bar |
/* Nonzero if this frame should display a menu bar |
485 |
in a way that does not use any text lines. */ |
in a way that does not use any text lines. */ |
486 |
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS) |
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS) \ |
487 |
|
|| defined (USE_GTK) |
488 |
#define FRAME_EXTERNAL_MENU_BAR(f) (f)->external_menu_bar |
#define FRAME_EXTERNAL_MENU_BAR(f) (f)->external_menu_bar |
489 |
#else |
#else |
490 |
#define FRAME_EXTERNAL_MENU_BAR(f) 0 |
#define FRAME_EXTERNAL_MENU_BAR(f) 0 |
525 |
/* The currently selected window of the window tree of frame F. */ |
/* The currently selected window of the window tree of frame F. */ |
526 |
#define FRAME_SELECTED_WINDOW(f) (f)->selected_window |
#define FRAME_SELECTED_WINDOW(f) (f)->selected_window |
527 |
|
|
528 |
#define FRAME_INSERT_COST(f) (f)->insert_line_cost |
#define FRAME_INSERT_COST(f) (f)->insert_line_cost |
529 |
#define FRAME_DELETE_COST(f) (f)->delete_line_cost |
#define FRAME_DELETE_COST(f) (f)->delete_line_cost |
530 |
#define FRAME_INSERTN_COST(f) (f)->insert_n_lines_cost |
#define FRAME_INSERTN_COST(f) (f)->insert_n_lines_cost |
531 |
#define FRAME_DELETEN_COST(f) (f)->delete_n_lines_cost |
#define FRAME_DELETEN_COST(f) (f)->delete_n_lines_cost |
532 |
#define FRAME_MESSAGE_BUF(f) (f)->message_buf |
#define FRAME_MESSAGE_BUF(f) (f)->message_buf |
611 |
#define FRAME_MENU_BAR_ITEMS(f) ((f)->menu_bar_items) |
#define FRAME_MENU_BAR_ITEMS(f) ((f)->menu_bar_items) |
612 |
#define FRAME_COST_BAUD_RATE(f) ((f)->cost_calculation_baud_rate) |
#define FRAME_COST_BAUD_RATE(f) ((f)->cost_calculation_baud_rate) |
613 |
|
|
614 |
|
#define FRAME_DESIRED_CURSOR(f) ((f)->desired_cursor) |
615 |
|
#define FRAME_BLINK_OFF_CURSOR(f) ((f)->blink_off_cursor) |
616 |
|
#define FRAME_CURSOR_WIDTH(f) ((f)->cursor_width) |
617 |
|
#define FRAME_BLINK_OFF_CURSOR_WIDTH(f) ((f)->blink_off_cursor_width) |
618 |
|
|
619 |
/* Return a pointer to the face cache of frame F. */ |
/* Return a pointer to the face cache of frame F. */ |
620 |
|
|
621 |
#define FRAME_FACE_CACHE(F) (F)->face_cache |
#define FRAME_FACE_CACHE(F) (F)->face_cache |
623 |
/* Return the size of message_buf of the frame F. We multiply the |
/* Return the size of message_buf of the frame F. We multiply the |
624 |
width of the frame by 4 because multi-byte form may require at most |
width of the frame by 4 because multi-byte form may require at most |
625 |
4-byte for a character. */ |
4-byte for a character. */ |
626 |
|
|
627 |
#define FRAME_MESSAGE_BUF_SIZE(f) (((int) (f)->width) * 4) |
#define FRAME_MESSAGE_BUF_SIZE(f) (((int) (f)->width) * 4) |
628 |
|
|
629 |
/* Emacs's redisplay code could become confused if a frame's |
/* Emacs's redisplay code could become confused if a frame's |
649 |
Also, if a frame used to be invisible, but has just become visible, |
Also, if a frame used to be invisible, but has just become visible, |
650 |
it must be marked as garbaged, since redisplay hasn't been keeping |
it must be marked as garbaged, since redisplay hasn't been keeping |
651 |
up its contents. */ |
up its contents. */ |
652 |
|
|
653 |
#define FRAME_SAMPLE_VISIBILITY(f) \ |
#define FRAME_SAMPLE_VISIBILITY(f) \ |
654 |
(((f)->async_visible && (f)->visible != (f)->async_visible) ? \ |
(((f)->async_visible && (f)->visible != (f)->async_visible) ? \ |
655 |
SET_FRAME_GARBAGED (f) : 0, \ |
SET_FRAME_GARBAGED (f) : 0, \ |
674 |
loop will set FRAME_VAR, a Lisp_Object, to each frame in |
loop will set FRAME_VAR, a Lisp_Object, to each frame in |
675 |
Vframe_list in succession and execute the statement. LIST_VAR |
Vframe_list in succession and execute the statement. LIST_VAR |
676 |
should be a Lisp_Object too; it is used to iterate through the |
should be a Lisp_Object too; it is used to iterate through the |
677 |
Vframe_list. |
Vframe_list. |
678 |
|
|
679 |
This macro is a holdover from a time when multiple frames weren't always |
This macro is a holdover from a time when multiple frames weren't always |
680 |
supported. An alternate definition of the macro would expand to |
supported. An alternate definition of the macro would expand to |
687 |
list_var = XCDR (list_var)) |
list_var = XCDR (list_var)) |
688 |
|
|
689 |
|
|
690 |
extern Lisp_Object Qframep, Qframe_live_p, Qicon; |
extern Lisp_Object Qframep, Qframe_live_p; |
|
extern Lisp_Object Qleft_fringe, Qright_fringe; |
|
691 |
|
|
692 |
extern struct frame *last_nonminibuf_frame; |
extern struct frame *last_nonminibuf_frame; |
693 |
|
|
707 |
extern Lisp_Object Vterminal_frame; |
extern Lisp_Object Vterminal_frame; |
708 |
|
|
709 |
extern Lisp_Object Vmouse_highlight; |
extern Lisp_Object Vmouse_highlight; |
710 |
|
|
711 |
|
enum text_cursor_kinds get_specified_cursor_type P_ ((Lisp_Object, int *)); |
712 |
|
enum text_cursor_kinds get_window_cursor_type P_ ((struct window *, int *, int *)); |
713 |
|
|
714 |
/* Device-independent scroll bar stuff. */ |
/* Device-independent scroll bar stuff. */ |
715 |
|
|
730 |
|
|
731 |
/* Return the height in lines of the vertical scroll bar in w. If the |
/* Return the height in lines of the vertical scroll bar in w. If the |
732 |
window has a mode line, don't make the scroll bar extend that far. */ |
window has a mode line, don't make the scroll bar extend that far. */ |
733 |
|
|
734 |
#define WINDOW_VERTICAL_SCROLL_BAR_HEIGHT(w) (window_internal_height (w)) |
#define WINDOW_VERTICAL_SCROLL_BAR_HEIGHT(w) (window_internal_height (w)) |
735 |
|
|
736 |
/* The currently selected frame. */ |
/* The currently selected frame. */ |
778 |
(FRAME_WINDOW_P (F) ? FRAME_X_LEFT_FRINGE_WIDTH (F) : 0) |
(FRAME_WINDOW_P (F) ? FRAME_X_LEFT_FRINGE_WIDTH (F) : 0) |
779 |
#define FRAME_RIGHT_FRINGE_WIDTH(F) \ |
#define FRAME_RIGHT_FRINGE_WIDTH(F) \ |
780 |
(FRAME_WINDOW_P (F) ? FRAME_X_RIGHT_FRINGE_WIDTH (F) : 0) |
(FRAME_WINDOW_P (F) ? FRAME_X_RIGHT_FRINGE_WIDTH (F) : 0) |
781 |
|
|
782 |
#else /* not HAVE_WINDOW_SYSTEM */ |
#else /* not HAVE_WINDOW_SYSTEM */ |
783 |
|
|
784 |
#define FRAME_FRINGE_WIDTH(F) 0 |
#define FRAME_FRINGE_WIDTH(F) 0 |
787 |
#define FRAME_RIGHT_FRINGE_WIDTH(F) 0 |
#define FRAME_RIGHT_FRINGE_WIDTH(F) 0 |
788 |
|
|
789 |
#endif /* not HAVE_WINDOW_SYSTEM */ |
#endif /* not HAVE_WINDOW_SYSTEM */ |
790 |
|
|
791 |
|
|
792 |
|
|
793 |
|
|
802 |
/* Convert canonical value X to pixels. F is the frame whose |
/* Convert canonical value X to pixels. F is the frame whose |
803 |
canonical char width is to be used. X must be a Lisp integer or |
canonical char width is to be used. X must be a Lisp integer or |
804 |
float. Value is a C integer. */ |
float. Value is a C integer. */ |
805 |
|
|
806 |
#define PIXEL_X_FROM_CANON_X(F, X) \ |
#define PIXEL_X_FROM_CANON_X(F, X) \ |
807 |
(INTEGERP (X) \ |
(INTEGERP (X) \ |
808 |
? XINT (X) * CANON_X_UNIT (F) \ |
? XINT (X) * CANON_X_UNIT (F) \ |
809 |
: (int) (XFLOAT_DATA (X) * CANON_X_UNIT (F))) |
: (int) (XFLOAT_DATA (X) * CANON_X_UNIT (F))) |
810 |
|
|
811 |
/* Convert canonical value Y to pixels. F is the frame whose |
/* Convert canonical value Y to pixels. F is the frame whose |
812 |
canonical character height is to be used. X must be a Lisp integer |
canonical character height is to be used. X must be a Lisp integer |
813 |
or float. Value is a C integer. */ |
or float. Value is a C integer. */ |
814 |
|
|
815 |
#define PIXEL_Y_FROM_CANON_Y(F, Y) \ |
#define PIXEL_Y_FROM_CANON_Y(F, Y) \ |
816 |
(INTEGERP (Y) \ |
(INTEGERP (Y) \ |
817 |
? XINT (Y) * CANON_Y_UNIT (F) \ |
? XINT (Y) * CANON_Y_UNIT (F) \ |
835 |
#define CANON_Y_FROM_PIXEL_Y(F, Y) \ |
#define CANON_Y_FROM_PIXEL_Y(F, Y) \ |
836 |
((Y) % CANON_Y_UNIT (F) \ |
((Y) % CANON_Y_UNIT (F) \ |
837 |
? make_float ((double) (Y) / CANON_Y_UNIT (F)) \ |
? make_float ((double) (Y) / CANON_Y_UNIT (F)) \ |
838 |
: make_number ((Y) / CANON_Y_UNIT (F))) |
: make_number ((Y) / CANON_Y_UNIT (F))) |
839 |
|
|
840 |
|
|
841 |
|
/*********************************************************************** |
842 |
|
Frame Parameters |
843 |
|
***********************************************************************/ |
844 |
|
|
845 |
|
extern Lisp_Object Qauto_raise, Qauto_lower; |
846 |
|
extern Lisp_Object Qborder_color, Qborder_width; |
847 |
|
extern Lisp_Object Qbuffer_predicate, Qbuffer_list; |
848 |
|
extern Lisp_Object Qcursor_color, Qcursor_type; |
849 |
|
extern Lisp_Object Qfont; |
850 |
|
extern Lisp_Object Qbackground_color, Qforeground_color; |
851 |
|
extern Lisp_Object Qicon, Qicon_name, Qicon_type, Qicon_left, Qicon_top; |
852 |
|
extern Lisp_Object Qinternal_border_width; |
853 |
|
extern Lisp_Object Qmenu_bar_lines, Qtool_bar_lines; |
854 |
|
extern Lisp_Object Qmouse_color; |
855 |
|
extern Lisp_Object Qname, Qtitle; |
856 |
|
extern Lisp_Object Qparent_id; |
857 |
|
extern Lisp_Object Qunsplittable, Qvisibility; |
858 |
|
extern Lisp_Object Qscroll_bar_width, Qvertical_scroll_bars; |
859 |
|
extern Lisp_Object Qscroll_bar_foreground, Qscroll_bar_background; |
860 |
|
extern Lisp_Object Qscreen_gamma; |
861 |
|
extern Lisp_Object Qline_spacing; |
862 |
|
extern Lisp_Object Qwait_for_wm; |
863 |
|
extern Lisp_Object Qfullscreen; |
864 |
|
|
865 |
|
extern Lisp_Object Qleft_fringe, Qright_fringe; |
866 |
|
extern Lisp_Object Qheight, Qwidth; |
867 |
|
extern Lisp_Object Qminibuffer, Qmodeline; |
868 |
|
extern Lisp_Object Qonly; |
869 |
|
extern Lisp_Object Qx, Qw32, Qmac, Qpc; |
870 |
|
extern Lisp_Object Qvisible; |
871 |
|
extern Lisp_Object Qdisplay_type; |
872 |
|
extern Lisp_Object Qbackground_mode; |
873 |
|
|
874 |
|
extern Lisp_Object Qx_resource_name; |
875 |
|
|
876 |
|
extern Lisp_Object Qleft, Qright, Qtop, Qbox; |
877 |
|
extern Lisp_Object Qdisplay; |
878 |
|
|
879 |
|
#ifdef HAVE_WINDOW_SYSTEM |
880 |
|
|
881 |
|
/* The class of this X application. */ |
882 |
|
#define EMACS_CLASS "Emacs" |
883 |
|
|
884 |
|
enum |
885 |
|
{ |
886 |
|
/* Values used as a bit mask, BOTH == WIDTH | HEIGHT. */ |
887 |
|
FULLSCREEN_NONE = 0, |
888 |
|
FULLSCREEN_WIDTH = 1, |
889 |
|
FULLSCREEN_HEIGHT = 2, |
890 |
|
FULLSCREEN_BOTH = 3, |
891 |
|
FULLSCREEN_WAIT = 4, |
892 |
|
FULLSCREEN_MOVE_WAIT = 8, |
893 |
|
}; |
894 |
|
|
895 |
|
|
896 |
|
/* These are in xterm.c, w32term.c, etc. */ |
897 |
|
|
898 |
|
extern void x_set_scroll_bar_default_width P_ ((struct frame *)); |
899 |
|
extern void x_set_offset P_ ((struct frame *, int, int, int)); |
900 |
|
extern void x_wm_set_icon_position P_ ((struct frame *, int, int)); |
901 |
|
|
902 |
|
extern Lisp_Object x_new_font P_ ((struct frame *, char *)); |
903 |
|
extern Lisp_Object x_new_fontset P_ ((struct frame *, char *)); |
904 |
|
|
905 |
|
|
906 |
|
/* These are in frame.c */ |
907 |
|
|
908 |
|
extern Lisp_Object Vx_resource_name; |
909 |
|
extern Lisp_Object Vx_resource_class; |
910 |
|
|
911 |
|
|
912 |
|
extern Lisp_Object Qface_set_after_frame_default; |
913 |
|
|
914 |
|
extern void x_fullscreen_adjust P_ ((struct frame *f, int *, int *, |
915 |
|
int *, int *)); |
916 |
|
|
917 |
|
extern void x_set_frame_parameters P_ ((struct frame *, Lisp_Object)); |
918 |
|
extern void x_report_frame_params P_ ((struct frame *, Lisp_Object *)); |
919 |
|
|
920 |
|
extern void x_set_fullscreen P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
921 |
|
extern void x_set_line_spacing P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
922 |
|
extern void x_set_screen_gamma P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
923 |
|
extern void x_set_font P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
924 |
|
extern void x_set_fringe_width P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
925 |
|
extern void x_set_border_width P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
926 |
|
extern void x_set_internal_border_width P_ ((struct frame *, Lisp_Object, |
927 |
|
Lisp_Object)); |
928 |
|
extern void x_set_visibility P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
929 |
|
extern void x_set_autoraise P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
930 |
|
extern void x_set_autolower P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
931 |
|
extern void x_set_unsplittable P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
932 |
|
extern void x_set_vertical_scroll_bars P_ ((struct frame *, Lisp_Object, |
933 |
|
Lisp_Object)); |
934 |
|
extern void x_set_scroll_bar_width P_ ((struct frame *, Lisp_Object, |
935 |
|
Lisp_Object)); |
936 |
|
|
937 |
|
extern Lisp_Object x_icon_type P_ ((struct frame *)); |
938 |
|
|
939 |
|
extern int x_figure_window_size P_ ((struct frame *, Lisp_Object, int)); |
940 |
|
|
941 |
|
|
942 |
|
extern void validate_x_resource_name P_ ((void)); |
943 |
|
|
944 |
|
#endif /* HAVE_WINDOW_SYSTEM */ |
945 |
|
|
946 |
#endif /* not EMACS_FRAME_H */ |
#endif /* not EMACS_FRAME_H */ |