diff options
author | Devin J. Pohly <djpohly@gmail.com> | 2017-10-10 11:30:36 -0500 |
---|---|---|
committer | Devin J. Pohly <djpohly@gmail.com> | 2018-02-25 21:53:24 -0600 |
commit | d5275012b45149a2a6e94679609aacca478221ad (patch) | |
tree | 881a9c32d0d617fc472e23836779a7379c97e875 /st.c | |
parent | 3518dba2a5fb57f601b74528ddeb67f173e4024b (diff) | |
download | st-d5275012b45149a2a6e94679609aacca478221ad.tar.gz st-d5275012b45149a2a6e94679609aacca478221ad.zip |
Move zoom functions into x.c
This makes x(un)loadfonts internal to x.c. Needed to reorder includes
and move a typedef to keep the compiler happy.
Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 36 |
1 files changed, 1 insertions, 35 deletions
@@ -31,8 +31,8 @@ | |||
31 | #define Glyph Glyph_ | 31 | #define Glyph Glyph_ |
32 | #define Font Font_ | 32 | #define Font Font_ |
33 | 33 | ||
34 | #include "win.h" | ||
35 | #include "st.h" | 34 | #include "st.h" |
35 | #include "win.h" | ||
36 | 36 | ||
37 | #if defined(__linux) | 37 | #if defined(__linux) |
38 | #include <pty.h> | 38 | #include <pty.h> |
@@ -128,9 +128,6 @@ static void clipcopy(const Arg *); | |||
128 | static void clippaste(const Arg *); | 128 | static void clippaste(const Arg *); |
129 | static void numlock(const Arg *); | 129 | static void numlock(const Arg *); |
130 | static void selpaste(const Arg *); | 130 | static void selpaste(const Arg *); |
131 | static void zoom(const Arg *); | ||
132 | static void zoomabs(const Arg *); | ||
133 | static void zoomreset(const Arg *); | ||
134 | static void printsel(const Arg *); | 131 | static void printsel(const Arg *); |
135 | static void printscreen(const Arg *) ; | 132 | static void printscreen(const Arg *) ; |
136 | static void iso14755(const Arg *); | 133 | static void iso14755(const Arg *); |
@@ -2574,37 +2571,6 @@ tresize(int col, int row) | |||
2574 | } | 2571 | } |
2575 | 2572 | ||
2576 | void | 2573 | void |
2577 | zoom(const Arg *arg) | ||
2578 | { | ||
2579 | Arg larg; | ||
2580 | |||
2581 | larg.f = usedfontsize + arg->f; | ||
2582 | zoomabs(&larg); | ||
2583 | } | ||
2584 | |||
2585 | void | ||
2586 | zoomabs(const Arg *arg) | ||
2587 | { | ||
2588 | xunloadfonts(); | ||
2589 | xloadfonts(usedfont, arg->f); | ||
2590 | cresize(0, 0); | ||
2591 | ttyresize(); | ||
2592 | redraw(); | ||
2593 | xhints(); | ||
2594 | } | ||
2595 | |||
2596 | void | ||
2597 | zoomreset(const Arg *arg) | ||
2598 | { | ||
2599 | Arg larg; | ||
2600 | |||
2601 | if (defaultfontsize > 0) { | ||
2602 | larg.f = defaultfontsize; | ||
2603 | zoomabs(&larg); | ||
2604 | } | ||
2605 | } | ||
2606 | |||
2607 | void | ||
2608 | resettitle(void) | 2574 | resettitle(void) |
2609 | { | 2575 | { |
2610 | xsettitle(opt_title ? opt_title : "st"); | 2576 | xsettitle(opt_title ? opt_title : "st"); |