diff options
author | Alan Third <alan@idiocy.org> | 2021-03-24 22:50:03 +0000 |
---|---|---|
committer | Alan Third <alan@idiocy.org> | 2021-04-03 23:06:44 +0100 |
commit | 4e1f92feb3a861f93b7a285715d03be930b41b91 (patch) | |
tree | 8511c057fba4eefecd7f32e0b346ae3d08a550d1 /src/frame.h | |
parent | b0d095b2cdff7b43ab3866a2d541d18e359a4125 (diff) | |
download | emacs-4e1f92feb3a861f93b7a285715d03be930b41b91.tar.gz emacs-4e1f92feb3a861f93b7a285715d03be930b41b91.tar.bz2 emacs-4e1f92feb3a861f93b7a285715d03be930b41b91.zip |
Implement frame-scale-factor
* src/frame.c (Fframe_scale_factor): New function.
(syms_of_frame): Add frame-scale-factor.
* src/frame.h: Add FRAME_SCALE_FACTOR.
* src/image.c: Move FRAME_SCALE_FACTOR to frame.h.
Diffstat (limited to 'src/frame.h')
-rw-r--r-- | src/frame.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/frame.h b/src/frame.h index 9ddcb4c6810..9963112036f 100644 --- a/src/frame.h +++ b/src/frame.h @@ -907,6 +907,13 @@ default_pixels_per_inch_y (void) (WINDOWP (f->minibuffer_window) \ && XFRAME (XWINDOW (f->minibuffer_window)->frame) == f) +/* Scale factor of frame F. */ +#if defined HAVE_NS +# define FRAME_SCALE_FACTOR(f) (FRAME_NS_P (f) ? ns_frame_scale_factor (f) : 1) +#else +# define FRAME_SCALE_FACTOR(f) 1; +#endif + /* Pixel width of frame F. */ #define FRAME_PIXEL_WIDTH(f) ((f)->pixel_width) |