diff options
Diffstat (limited to 'src/frame.h')
| -rw-r--r-- | src/frame.h | 65 |
1 files changed, 29 insertions, 36 deletions
diff --git a/src/frame.h b/src/frame.h index 1d920d1a6bc..6a636ecec3f 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -161,10 +161,8 @@ struct frame | |||
| 161 | Usually it is nil. */ | 161 | Usually it is nil. */ |
| 162 | Lisp_Object title; | 162 | Lisp_Object title; |
| 163 | 163 | ||
| 164 | #if defined (HAVE_WINDOW_SYSTEM) | ||
| 165 | /* This frame's parent frame, if it has one. */ | 164 | /* This frame's parent frame, if it has one. */ |
| 166 | Lisp_Object parent_frame; | 165 | Lisp_Object parent_frame; |
| 167 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 168 | 166 | ||
| 169 | /* Last device to move over this frame. Any value that isn't a | 167 | /* Last device to move over this frame. Any value that isn't a |
| 170 | string means the "Virtual core pointer". */ | 168 | string means the "Virtual core pointer". */ |
| @@ -385,15 +383,8 @@ struct frame | |||
| 385 | zero if the frame has been made invisible without an icon. */ | 383 | zero if the frame has been made invisible without an icon. */ |
| 386 | 384 | ||
| 387 | /* Nonzero if the frame is currently displayed; we check | 385 | /* Nonzero if the frame is currently displayed; we check |
| 388 | it to see if we should bother updating the frame's contents. | 386 | it to see if we should bother updating the frame's contents. */ |
| 389 | 387 | unsigned visible : 1; | |
| 390 | On ttys and on Windows NT/9X, to avoid wasting effort updating | ||
| 391 | visible frames that are actually completely obscured by other | ||
| 392 | windows on the display, we bend the meaning of visible slightly: | ||
| 393 | if equal to 2, then the frame is obscured - we still consider | ||
| 394 | it to be "visible" as seen from lisp, but we don't bother | ||
| 395 | updating it. */ | ||
| 396 | unsigned visible : 2; | ||
| 397 | 388 | ||
| 398 | /* True if the frame is currently iconified. Do not | 389 | /* True if the frame is currently iconified. Do not |
| 399 | set this directly, use SET_FRAME_ICONIFIED instead. */ | 390 | set this directly, use SET_FRAME_ICONIFIED instead. */ |
| @@ -486,11 +477,11 @@ struct frame | |||
| 486 | 477 | ||
| 487 | /* The z-group this frame's window belongs to. */ | 478 | /* The z-group this frame's window belongs to. */ |
| 488 | ENUM_BF (z_group) z_group : 2; | 479 | ENUM_BF (z_group) z_group : 2; |
| 480 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 489 | 481 | ||
| 490 | /* Non-zero if display of truncation and continuation glyphs outside | 482 | /* Non-zero if display of truncation and continuation glyphs outside |
| 491 | the fringes is suppressed. */ | 483 | the fringes is suppressed. */ |
| 492 | bool_bf no_special_glyphs : 1; | 484 | bool_bf no_special_glyphs : 1; |
| 493 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 494 | 485 | ||
| 495 | /* True means set_window_size_hook requests can be processed for | 486 | /* True means set_window_size_hook requests can be processed for |
| 496 | this frame. */ | 487 | this frame. */ |
| @@ -740,7 +731,10 @@ struct frame | |||
| 740 | #ifdef HAVE_TEXT_CONVERSION | 731 | #ifdef HAVE_TEXT_CONVERSION |
| 741 | /* Text conversion state used by certain input methods. */ | 732 | /* Text conversion state used by certain input methods. */ |
| 742 | struct text_conversion_state conversion; | 733 | struct text_conversion_state conversion; |
| 743 | #endif | 734 | # endif |
| 735 | |||
| 736 | /* Z-order of child frames. */ | ||
| 737 | int z_order; | ||
| 744 | } GCALIGNED_STRUCT; | 738 | } GCALIGNED_STRUCT; |
| 745 | 739 | ||
| 746 | /* Most code should use these functions to set Lisp fields in struct frame. */ | 740 | /* Most code should use these functions to set Lisp fields in struct frame. */ |
| @@ -1021,9 +1015,11 @@ default_pixels_per_inch_y (void) | |||
| 1021 | does not have FRAME_DISPLAY_INFO. */ | 1015 | does not have FRAME_DISPLAY_INFO. */ |
| 1022 | #ifdef HAVE_WINDOW_SYSTEM | 1016 | #ifdef HAVE_WINDOW_SYSTEM |
| 1023 | #ifndef HAVE_ANDROID | 1017 | #ifndef HAVE_ANDROID |
| 1024 | # define MOUSE_HL_INFO(F) \ | 1018 | # define MOUSE_HL_INFO(F) \ |
| 1025 | (FRAME_WINDOW_P (F) \ | 1019 | (FRAME_WINDOW_P (F) \ |
| 1026 | ? &FRAME_DISPLAY_INFO(F)->mouse_highlight \ | 1020 | ? (FRAME_OUTPUT_DATA (F) \ |
| 1021 | ? &FRAME_DISPLAY_INFO (F)->mouse_highlight \ | ||
| 1022 | : NULL) \ | ||
| 1027 | : &(F)->output_data.tty->display_info->mouse_highlight) | 1023 | : &(F)->output_data.tty->display_info->mouse_highlight) |
| 1028 | #else | 1024 | #else |
| 1029 | /* There is no "struct tty_output" on Android at all. */ | 1025 | /* There is no "struct tty_output" on Android at all. */ |
| @@ -1176,9 +1172,6 @@ default_pixels_per_inch_y (void) | |||
| 1176 | && FRAME_X_VISIBLE (f))) | 1172 | && FRAME_X_VISIBLE (f))) |
| 1177 | #endif | 1173 | #endif |
| 1178 | 1174 | ||
| 1179 | /* True if frame F is currently visible but hidden. */ | ||
| 1180 | #define FRAME_OBSCURED_P(f) ((f)->visible > 1) | ||
| 1181 | |||
| 1182 | /* True if frame F is currently iconified. */ | 1175 | /* True if frame F is currently iconified. */ |
| 1183 | #define FRAME_ICONIFIED_P(f) (f)->iconified | 1176 | #define FRAME_ICONIFIED_P(f) (f)->iconified |
| 1184 | 1177 | ||
| @@ -1243,6 +1236,12 @@ default_pixels_per_inch_y (void) | |||
| 1243 | #define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT(f) ((void) (f), 0) | 1236 | #define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT(f) ((void) (f), 0) |
| 1244 | #endif /* HAVE_WINDOW_SYSTEM */ | 1237 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 1245 | 1238 | ||
| 1239 | INLINE struct frame * | ||
| 1240 | FRAME_PARENT_FRAME (struct frame *f) | ||
| 1241 | { | ||
| 1242 | return NILP (f->parent_frame) ? NULL : XFRAME (f->parent_frame); | ||
| 1243 | } | ||
| 1244 | |||
| 1246 | #if defined (HAVE_WINDOW_SYSTEM) | 1245 | #if defined (HAVE_WINDOW_SYSTEM) |
| 1247 | #define FRAME_UNDECORATED(f) ((f)->undecorated) | 1246 | #define FRAME_UNDECORATED(f) ((f)->undecorated) |
| 1248 | #ifdef HAVE_NTGUI | 1247 | #ifdef HAVE_NTGUI |
| @@ -1250,14 +1249,9 @@ default_pixels_per_inch_y (void) | |||
| 1250 | #else | 1249 | #else |
| 1251 | #define FRAME_OVERRIDE_REDIRECT(f) ((f)->override_redirect) | 1250 | #define FRAME_OVERRIDE_REDIRECT(f) ((f)->override_redirect) |
| 1252 | #endif | 1251 | #endif |
| 1253 | #define FRAME_PARENT_FRAME(f) \ | ||
| 1254 | (NILP ((f)->parent_frame) \ | ||
| 1255 | ? NULL \ | ||
| 1256 | : XFRAME ((f)->parent_frame)) | ||
| 1257 | #define FRAME_SKIP_TASKBAR(f) ((f)->skip_taskbar) | 1252 | #define FRAME_SKIP_TASKBAR(f) ((f)->skip_taskbar) |
| 1258 | #define FRAME_NO_FOCUS_ON_MAP(f) ((f)->no_focus_on_map) | 1253 | #define FRAME_NO_FOCUS_ON_MAP(f) ((f)->no_focus_on_map) |
| 1259 | #define FRAME_NO_ACCEPT_FOCUS(f) ((f)->no_accept_focus) | 1254 | #define FRAME_NO_ACCEPT_FOCUS(f) ((f)->no_accept_focus) |
| 1260 | #define FRAME_NO_SPECIAL_GLYPHS(f) ((f)->no_special_glyphs) | ||
| 1261 | #define FRAME_Z_GROUP(f) ((f)->z_group) | 1255 | #define FRAME_Z_GROUP(f) ((f)->z_group) |
| 1262 | #define FRAME_Z_GROUP_NONE(f) ((f)->z_group == z_group_none) | 1256 | #define FRAME_Z_GROUP_NONE(f) ((f)->z_group == z_group_none) |
| 1263 | #define FRAME_Z_GROUP_ABOVE(f) ((f)->z_group == z_group_above) | 1257 | #define FRAME_Z_GROUP_ABOVE(f) ((f)->z_group == z_group_above) |
| @@ -1272,11 +1266,9 @@ default_pixels_per_inch_y (void) | |||
| 1272 | #else /* not HAVE_WINDOW_SYSTEM */ | 1266 | #else /* not HAVE_WINDOW_SYSTEM */ |
| 1273 | #define FRAME_UNDECORATED(f) ((void) (f), 0) | 1267 | #define FRAME_UNDECORATED(f) ((void) (f), 0) |
| 1274 | #define FRAME_OVERRIDE_REDIRECT(f) ((void) (f), 0) | 1268 | #define FRAME_OVERRIDE_REDIRECT(f) ((void) (f), 0) |
| 1275 | #define FRAME_PARENT_FRAME(f) ((void) (f), NULL) | ||
| 1276 | #define FRAME_SKIP_TASKBAR(f) ((void) (f), 0) | 1269 | #define FRAME_SKIP_TASKBAR(f) ((void) (f), 0) |
| 1277 | #define FRAME_NO_FOCUS_ON_MAP(f) ((void) (f), 0) | 1270 | #define FRAME_NO_FOCUS_ON_MAP(f) ((void) (f), 0) |
| 1278 | #define FRAME_NO_ACCEPT_FOCUS(f) ((void) (f), 0) | 1271 | #define FRAME_NO_ACCEPT_FOCUS(f) ((void) (f), 0) |
| 1279 | #define FRAME_NO_SPECIAL_GLYPHS(f) ((void) (f), 0) | ||
| 1280 | #define FRAME_Z_GROUP(f) ((void) (f), z_group_none) | 1272 | #define FRAME_Z_GROUP(f) ((void) (f), z_group_none) |
| 1281 | #define FRAME_Z_GROUP_NONE(f) ((void) (f), true) | 1273 | #define FRAME_Z_GROUP_NONE(f) ((void) (f), true) |
| 1282 | #define FRAME_Z_GROUP_ABOVE(f) ((void) (f), false) | 1274 | #define FRAME_Z_GROUP_ABOVE(f) ((void) (f), false) |
| @@ -1284,6 +1276,8 @@ default_pixels_per_inch_y (void) | |||
| 1284 | #define FRAME_TOOLTIP_P(f) ((void) f, false) | 1276 | #define FRAME_TOOLTIP_P(f) ((void) f, false) |
| 1285 | #endif /* HAVE_WINDOW_SYSTEM */ | 1277 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 1286 | 1278 | ||
| 1279 | #define FRAME_NO_SPECIAL_GLYPHS(f) ((f)->no_special_glyphs) | ||
| 1280 | |||
| 1287 | /* Whether horizontal scroll bars are currently enabled for frame F. */ | 1281 | /* Whether horizontal scroll bars are currently enabled for frame F. */ |
| 1288 | #if USE_HORIZONTAL_SCROLL_BARS | 1282 | #if USE_HORIZONTAL_SCROLL_BARS |
| 1289 | #define FRAME_HAS_HORIZONTAL_SCROLL_BARS(f) \ | 1283 | #define FRAME_HAS_HORIZONTAL_SCROLL_BARS(f) \ |
| @@ -1445,9 +1439,8 @@ extern bool frame_garbaged; | |||
| 1445 | if some changes were applied to it while it wasn't visible (and hence | 1439 | if some changes were applied to it while it wasn't visible (and hence |
| 1446 | wasn't redisplayed). */ | 1440 | wasn't redisplayed). */ |
| 1447 | INLINE void | 1441 | INLINE void |
| 1448 | SET_FRAME_VISIBLE (struct frame *f, int v) | 1442 | SET_FRAME_VISIBLE (struct frame *f, bool v) |
| 1449 | { | 1443 | { |
| 1450 | eassert (0 <= v && v <= 2); | ||
| 1451 | if (v) | 1444 | if (v) |
| 1452 | { | 1445 | { |
| 1453 | if (v == 1 && f->visible != 1) | 1446 | if (v == 1 && f->visible != 1) |
| @@ -1504,13 +1497,14 @@ extern struct frame *decode_any_frame (Lisp_Object); | |||
| 1504 | extern struct frame *make_initial_frame (void); | 1497 | extern struct frame *make_initial_frame (void); |
| 1505 | extern struct frame *make_frame (bool); | 1498 | extern struct frame *make_frame (bool); |
| 1506 | #ifdef HAVE_WINDOW_SYSTEM | 1499 | #ifdef HAVE_WINDOW_SYSTEM |
| 1507 | extern struct frame *make_minibuffer_frame (void); | ||
| 1508 | extern struct frame *make_frame_without_minibuffer (Lisp_Object, | ||
| 1509 | struct kboard *, | ||
| 1510 | Lisp_Object); | ||
| 1511 | extern bool display_available (void); | 1500 | extern bool display_available (void); |
| 1512 | #endif | 1501 | #endif |
| 1513 | 1502 | ||
| 1503 | struct frame *make_minibuffer_frame (void); | ||
| 1504 | struct frame * | ||
| 1505 | make_frame_without_minibuffer (Lisp_Object mini_window, | ||
| 1506 | KBOARD *kb, Lisp_Object display); | ||
| 1507 | |||
| 1514 | INLINE bool | 1508 | INLINE bool |
| 1515 | window_system_available (struct frame *f) | 1509 | window_system_available (struct frame *f) |
| 1516 | { | 1510 | { |
| @@ -1522,6 +1516,8 @@ window_system_available (struct frame *f) | |||
| 1522 | } | 1516 | } |
| 1523 | 1517 | ||
| 1524 | extern WINDOW_SYSTEM_RETURN void check_window_system (struct frame *); | 1518 | extern WINDOW_SYSTEM_RETURN void check_window_system (struct frame *); |
| 1519 | void check_tty (struct frame *f); | ||
| 1520 | struct frame *decode_tty_frame (Lisp_Object frame); | ||
| 1525 | extern void frame_make_pointer_invisible (struct frame *); | 1521 | extern void frame_make_pointer_invisible (struct frame *); |
| 1526 | extern void frame_make_pointer_visible (struct frame *); | 1522 | extern void frame_make_pointer_visible (struct frame *); |
| 1527 | extern Lisp_Object delete_frame (Lisp_Object, Lisp_Object); | 1523 | extern Lisp_Object delete_frame (Lisp_Object, Lisp_Object); |
| @@ -1617,15 +1613,11 @@ FRAME_CHILD_FRAME_BORDER_WIDTH (struct frame *f) | |||
| 1617 | INLINE int | 1613 | INLINE int |
| 1618 | FRAME_INTERNAL_BORDER_WIDTH (struct frame *f) | 1614 | FRAME_INTERNAL_BORDER_WIDTH (struct frame *f) |
| 1619 | { | 1615 | { |
| 1620 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 1621 | return (FRAME_PARENT_FRAME(f) | 1616 | return (FRAME_PARENT_FRAME(f) |
| 1622 | ? (FRAME_CHILD_FRAME_BORDER_WIDTH(f) >= 0 | 1617 | ? (FRAME_CHILD_FRAME_BORDER_WIDTH(f) >= 0 |
| 1623 | ? FRAME_CHILD_FRAME_BORDER_WIDTH(f) | 1618 | ? FRAME_CHILD_FRAME_BORDER_WIDTH(f) |
| 1624 | : frame_dimension (f->internal_border_width)) | 1619 | : frame_dimension (f->internal_border_width)) |
| 1625 | : frame_dimension (f->internal_border_width)); | 1620 | : frame_dimension (f->internal_border_width)); |
| 1626 | #else | ||
| 1627 | return frame_dimension (f->internal_border_width); | ||
| 1628 | #endif | ||
| 1629 | } | 1621 | } |
| 1630 | 1622 | ||
| 1631 | /* Pixel-size of window divider lines. */ | 1623 | /* Pixel-size of window divider lines. */ |
| @@ -1880,7 +1872,6 @@ extern Lisp_Object gui_display_get_resource (Display_Info *, | |||
| 1880 | extern void set_frame_menubar (struct frame *f, bool deep_p); | 1872 | extern void set_frame_menubar (struct frame *f, bool deep_p); |
| 1881 | extern void frame_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); | 1873 | extern void frame_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); |
| 1882 | extern void free_frame_menubar (struct frame *); | 1874 | extern void free_frame_menubar (struct frame *); |
| 1883 | extern bool frame_ancestor_p (struct frame *af, struct frame *df); | ||
| 1884 | extern enum internal_border_part frame_internal_border_part (struct frame *f, int x, int y); | 1875 | extern enum internal_border_part frame_internal_border_part (struct frame *f, int x, int y); |
| 1885 | 1876 | ||
| 1886 | #if defined HAVE_X_WINDOWS | 1877 | #if defined HAVE_X_WINDOWS |
| @@ -1907,6 +1898,8 @@ gui_set_bitmap_icon (struct frame *f) | |||
| 1907 | #endif /* !HAVE_NS */ | 1898 | #endif /* !HAVE_NS */ |
| 1908 | #endif /* HAVE_WINDOW_SYSTEM */ | 1899 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 1909 | 1900 | ||
| 1901 | extern bool frame_ancestor_p (struct frame *af, struct frame *df); | ||
| 1902 | |||
| 1910 | INLINE void | 1903 | INLINE void |
| 1911 | flush_frame (struct frame *f) | 1904 | flush_frame (struct frame *f) |
| 1912 | { | 1905 | { |