diff options
| author | Stefan Monnier | 2008-03-27 21:15:21 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-03-27 21:15:21 +0000 |
| commit | 2806a18346b5cd80b3760fb3b0b83fa12707c11e (patch) | |
| tree | 99af7a29f53392a758443f6b3aafd3d715b5cad8 /src | |
| parent | eef6030820bba7530079acadb057c09d7133b8e9 (diff) | |
| download | emacs-2806a18346b5cd80b3760fb3b0b83fa12707c11e.tar.gz emacs-2806a18346b5cd80b3760fb3b0b83fa12707c11e.zip | |
(enum fullscreen_type): Give it a name. Move it before use.
(struct frame): Use bit fields for boolean vars.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/frame.h | 49 |
2 files changed, 29 insertions, 23 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f261a08b07b..d0a9dbb89a8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2008-03-27 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2008-03-27 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * frame.h (enum fullscreen_type): Give it a name. Move it before use. | ||
| 4 | (struct frame): Use bit fields for boolean vars. | ||
| 5 | |||
| 3 | * process.c (server_accept_connection): Simplify naming. | 6 | * process.c (server_accept_connection): Simplify naming. |
| 4 | (emacs_get_tty_pgrp): Use SDATA. | 7 | (emacs_get_tty_pgrp): Use SDATA. |
| 5 | 8 | ||
diff --git a/src/frame.h b/src/frame.h index 3b5a27f78a8..cb0916f7803 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -72,6 +72,17 @@ enum text_cursor_kinds | |||
| 72 | HBAR_CURSOR | 72 | HBAR_CURSOR |
| 73 | }; | 73 | }; |
| 74 | 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 | |||
| 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 | ||
| @@ -339,7 +350,7 @@ struct frame | |||
| 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; |
| @@ -347,11 +358,11 @@ struct frame | |||
| 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. |
| @@ -381,7 +392,10 @@ struct frame | |||
| 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. |
| @@ -393,37 +407,37 @@ struct frame | |||
| 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. */ |
| @@ -1041,17 +1055,6 @@ extern Lisp_Object Qdisplay; | |||
| 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 *)); |