summaryrefslogtreecommitdiff
path: root/src/globals.h
diff options
context:
space:
mode:
authorsabetts <sabetts>2006-04-20 02:10:02 +0000
committersabetts <sabetts>2006-04-20 02:10:02 +0000
commitb7bb91712d275065bb4b2440fd0867d9299da94c (patch)
tree20fffc9fd31e077b23a44fedd3480c70c84b332a /src/globals.h
parent91a86a505d76d9a4a0b89ddaaefa631a660c4835 (diff)
downloadratpoison-b7bb91712d275065bb4b2440fd0867d9299da94c.zip
* src/split.c (show_frame_message): use XmbDrawString and XmbTextEscapement
* src/screen.c (init_screen): don't include the font in the gc * src/ratpoison.h: include Xlocale.h * src/manage.c (get_wmname): support i18n characters * src/main.c (init_defaults): call load_query_font_set and set_extents_of_fontset (main): call setlocale (clean_up): call XFreeFontSet (set_extents_of_fontset): new function (load_query_font_set): likewise * src/input.c (update_input_window): use XmbTextEscapement and XmbDrawString * src/globals.h (FONT_HEIGHT): use rp_font_ascent and rp_font_descent (MAX_FONT_WIDTH): use rp_font_width new globals rp_font_ascent, rp_font_descent, rp_font_width * src/globals.c: new globals rp_font_ascent, rp_font_descent, rp_font_width * src/data.h (struct rp_defaults): font is a XFontSet * src/bar.c (max_line_length): call XmbTextEscapement (draw_string): call XmbDrawString (get_mark_box): call XmbTextEscapement * src/actions.c (read_frame): call XmbTextEscapement (cmd_license): likewise (read_frame): call XmbDrawString (cmd_license): likewise (cmd_help): likewise (update_gc): don't include the font (set_font): call load_query_font_set
Diffstat (limited to 'src/globals.h')
-rw-r--r--src/globals.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/globals.h b/src/globals.h
index a2d466f..d80e31a 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -27,8 +27,8 @@
#define RET_SUCCESS 1
#define RET_FAILURE 0
-#define FONT_HEIGHT(f) ((f)->max_bounds.ascent + (f)->max_bounds.descent)
-#define MAX_FONT_WIDTH(f) ((f)->max_bounds.width)
+#define FONT_HEIGHT(f) (rp_font_ascent + rp_font_descent)
+#define MAX_FONT_WIDTH(f) (rp_font_width)
#define WIN_EVENTS (StructureNotifyMask | PropertyChangeMask | ColormapChangeMask | FocusChangeMask)
/* EMPTY is used when a frame doesn't contain a window, or a window
@@ -67,6 +67,9 @@ extern struct list_head rp_children;
extern struct rp_defaults defaults;
+/* Cached font info. */
+extern int rp_font_ascent, rp_font_descent, rp_font_width;
+
/* The prefix key also known as the command character under screen. */
extern struct rp_key prefix_key;