Mercurial > emacs
comparison src/frame.h @ 93325:38e4e1858d46
(enum fullscreen_type): Give it a name. Move it before use.
(struct frame): Use bit fields for boolean vars.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 27 Mar 2008 21:15:21 +0000 |
parents | 4d9fc08769fa |
children | f8942531c106 |
comparison
equal
deleted
inserted
replaced
93324:41f9d37301a2 | 93325:38e4e1858d46 |
---|---|
69 FILLED_BOX_CURSOR, | 69 FILLED_BOX_CURSOR, |
70 HOLLOW_BOX_CURSOR, | 70 HOLLOW_BOX_CURSOR, |
71 BAR_CURSOR, | 71 BAR_CURSOR, |
72 HBAR_CURSOR | 72 HBAR_CURSOR |
73 }; | 73 }; |
74 | |
75 enum fullscreen_type | |
76 { | |
77 /* Values used as a bit mask, BOTH == WIDTH | HEIGHT. */ | |
78 FULLSCREEN_NONE = 0, | |
79 FULLSCREEN_WIDTH = 1, | |
80 FULLSCREEN_HEIGHT = 2, | |
81 FULLSCREEN_BOTH = 3, | |
82 FULLSCREEN_WAIT = 4 | |
83 }; | |
84 | |
74 | 85 |
75 #define FRAME_FOREGROUND_PIXEL(f) ((f)->foreground_pixel) | 86 #define FRAME_FOREGROUND_PIXEL(f) ((f)->foreground_pixel) |
76 #define FRAME_BACKGROUND_PIXEL(f) ((f)->background_pixel) | 87 #define FRAME_BACKGROUND_PIXEL(f) ((f)->background_pixel) |
77 | 88 |
78 struct terminal; | 89 struct terminal; |
337 | 348 |
338 /* The extra width (in pixels) currently allotted for fringes. */ | 349 /* The extra width (in pixels) currently allotted for fringes. */ |
339 int left_fringe_width, right_fringe_width; | 350 int left_fringe_width, right_fringe_width; |
340 | 351 |
341 /* See FULLSCREEN_ enum below */ | 352 /* See FULLSCREEN_ enum below */ |
342 int want_fullscreen; | 353 enum fullscreen_type want_fullscreen; |
343 | 354 |
344 /* Number of lines of menu bar. */ | 355 /* Number of lines of menu bar. */ |
345 int menu_bar_lines; | 356 int menu_bar_lines; |
346 | 357 |
347 #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS) \ | 358 #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS) \ |
348 || defined (USE_GTK) | 359 || defined (USE_GTK) |
349 /* Nonzero means using a menu bar that comes from the X toolkit. */ | 360 /* Nonzero means using a menu bar that comes from the X toolkit. */ |
350 int external_menu_bar; | 361 unsigned int external_menu_bar : 1; |
351 #endif | 362 #endif |
352 | 363 |
353 /* Nonzero if last attempt at redisplay on this frame was preempted. */ | 364 /* Nonzero if last attempt at redisplay on this frame was preempted. */ |
354 char display_preempted; | 365 unsigned char display_preempted : 1; |
355 | 366 |
356 /* visible is nonzero if the frame is currently displayed; we check | 367 /* visible is nonzero if the frame is currently displayed; we check |
357 it to see if we should bother updating the frame's contents. | 368 it to see if we should bother updating the frame's contents. |
358 DON'T SET IT DIRECTLY; instead, use FRAME_SET_VISIBLE. | 369 DON'T SET IT DIRECTLY; instead, use FRAME_SET_VISIBLE. |
359 | 370 |
379 These should probably be considered read-only by everyone except | 390 These should probably be considered read-only by everyone except |
380 FRAME_SAMPLE_VISIBILITY. | 391 FRAME_SAMPLE_VISIBILITY. |
381 | 392 |
382 These two are mutually exclusive. They might both be zero, if the | 393 These two are mutually exclusive. They might both be zero, if the |
383 frame has been made invisible without an icon. */ | 394 frame has been made invisible without an icon. */ |
384 char visible, iconified; | 395 unsigned char visible : 1; |
396 unsigned char iconified : 1; | |
397 | |
398 /* Let's not use bitfields for volatile variables. */ | |
385 | 399 |
386 /* Asynchronous input handlers change these, and | 400 /* Asynchronous input handlers change these, and |
387 FRAME_SAMPLE_VISIBILITY copies them into visible and iconified. | 401 FRAME_SAMPLE_VISIBILITY copies them into visible and iconified. |
388 See FRAME_SAMPLE_VISIBILITY, below. */ | 402 See FRAME_SAMPLE_VISIBILITY, below. */ |
389 volatile char async_visible, async_iconified; | 403 volatile char async_visible, async_iconified; |
391 /* Nonzero if this frame should be redrawn. */ | 405 /* Nonzero if this frame should be redrawn. */ |
392 volatile char garbaged; | 406 volatile char garbaged; |
393 | 407 |
394 /* True if frame actually has a minibuffer window on it. | 408 /* True if frame actually has a minibuffer window on it. |
395 0 if using a minibuffer window that isn't on this frame. */ | 409 0 if using a minibuffer window that isn't on this frame. */ |
396 char has_minibuffer; | 410 unsigned char has_minibuffer : 1; |
397 | 411 |
398 /* 0 means, if this frame has just one window, | 412 /* 0 means, if this frame has just one window, |
399 show no modeline for that window. */ | 413 show no modeline for that window. */ |
400 char wants_modeline; | 414 unsigned char wants_modeline : 1; |
401 | 415 |
402 /* Non-zero if the hardware device this frame is displaying on can | 416 /* Non-zero if the hardware device this frame is displaying on can |
403 support scroll bars. */ | 417 support scroll bars. */ |
404 char can_have_scroll_bars; | 418 char can_have_scroll_bars; |
405 | 419 |
406 /* Non-0 means raise this frame to the top of the heap when selected. */ | 420 /* Non-0 means raise this frame to the top of the heap when selected. */ |
407 char auto_raise; | 421 unsigned char auto_raise : 1; |
408 | 422 |
409 /* Non-0 means lower this frame to the bottom of the stack when left. */ | 423 /* Non-0 means lower this frame to the bottom of the stack when left. */ |
410 char auto_lower; | 424 unsigned char auto_lower : 1; |
411 | 425 |
412 /* True if frame's root window can't be split. */ | 426 /* True if frame's root window can't be split. */ |
413 char no_split; | 427 unsigned char no_split : 1; |
414 | 428 |
415 /* If this is set, then Emacs won't change the frame name to indicate | 429 /* If this is set, then Emacs won't change the frame name to indicate |
416 the current buffer, etcetera. If the user explicitly sets the frame | 430 the current buffer, etcetera. If the user explicitly sets the frame |
417 name, this gets set. If the user sets the name to Qnil, this is | 431 name, this gets set. If the user sets the name to Qnil, this is |
418 cleared. */ | 432 cleared. */ |
419 char explicit_name; | 433 unsigned char explicit_name : 1; |
420 | 434 |
421 /* Nonzero if size of some window on this frame has changed. */ | 435 /* Nonzero if size of some window on this frame has changed. */ |
422 char window_sizes_changed; | 436 unsigned char window_sizes_changed : 1; |
423 | 437 |
424 /* Nonzero if the mouse has moved on this display device | 438 /* Nonzero if the mouse has moved on this display device |
425 since the last time we checked. */ | 439 since the last time we checked. */ |
426 char mouse_moved; | 440 unsigned char mouse_moved :1; |
427 | 441 |
428 /* If can_have_scroll_bars is non-zero, this is non-zero if we should | 442 /* If can_have_scroll_bars is non-zero, this is non-zero if we should |
429 actually display them on this frame. */ | 443 actually display them on this frame. */ |
430 enum vertical_scroll_bar_type vertical_scroll_bar_type; | 444 enum vertical_scroll_bar_type vertical_scroll_bar_type; |
431 | 445 |
1039 #ifdef HAVE_WINDOW_SYSTEM | 1053 #ifdef HAVE_WINDOW_SYSTEM |
1040 | 1054 |
1041 /* The class of this X application. */ | 1055 /* The class of this X application. */ |
1042 #define EMACS_CLASS "Emacs" | 1056 #define EMACS_CLASS "Emacs" |
1043 | 1057 |
1044 enum | |
1045 { | |
1046 /* Values used as a bit mask, BOTH == WIDTH | HEIGHT. */ | |
1047 FULLSCREEN_NONE = 0, | |
1048 FULLSCREEN_WIDTH = 1, | |
1049 FULLSCREEN_HEIGHT = 2, | |
1050 FULLSCREEN_BOTH = 3, | |
1051 FULLSCREEN_WAIT = 4 | |
1052 }; | |
1053 | |
1054 | |
1055 /* These are in xterm.c, w32term.c, etc. */ | 1058 /* These are in xterm.c, w32term.c, etc. */ |
1056 | 1059 |
1057 extern void x_set_scroll_bar_default_width P_ ((struct frame *)); | 1060 extern void x_set_scroll_bar_default_width P_ ((struct frame *)); |
1058 extern void x_set_offset P_ ((struct frame *, int, int, int)); | 1061 extern void x_set_offset P_ ((struct frame *, int, int, int)); |
1059 extern void x_wm_set_icon_position P_ ((struct frame *, int, int)); | 1062 extern void x_wm_set_icon_position P_ ((struct frame *, int, int)); |