about summary refs log tree commit diff
path: root/calmwm.h
diff options
context:
space:
mode:
authorokan <okan>2012-12-17 02:28:45 +0000
committerokan <okan>2012-12-17 02:28:45 +0000
commit6900cd36121062f81f29ec3651aa1ee8807edbe1 (patch)
treebbbf15f9401923e29d45105572ce8727e74c3267 /calmwm.h
parenta3aaad2c187278b7ac1cf75cb03882dd3d20f29b (diff)
downloadcwm-6900cd36121062f81f29ec3651aa1ee8807edbe1.tar.gz
cwm-6900cd36121062f81f29ec3651aa1ee8807edbe1.tar.xz
cwm-6900cd36121062f81f29ec3651aa1ee8807edbe1.zip
non-trivial menu drawing rewrite, moving to Xft and solving various
font/color drawing issues; from Alexander Polakov
Diffstat (limited to 'calmwm.h')
-rw-r--r--calmwm.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/calmwm.h b/calmwm.h
index 38c3fee..bd0dbd7 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -84,14 +84,19 @@ union arg {
 	int	 i;
 };
 
+enum menucolor {
+	CWM_COLOR_MENU_FG,
+	CWM_COLOR_MENU_BG,
+	CWM_COLOR_MENU_FONT,
+	CWM_COLOR_MENU_FONT_SEL,
+	CWM_COLOR_MENU_MAX
+};
+
 enum cwmcolor {
 	CWM_COLOR_BORDER_ACTIVE,
 	CWM_COLOR_BORDER_INACTIVE,
 	CWM_COLOR_BORDER_GROUP,
 	CWM_COLOR_BORDER_UNGROUP,
-	CWM_COLOR_FG_MENU,
-	CWM_COLOR_BG_MENU,
-	CWM_COLOR_FONT,
 	CWM_COLOR_MAX
 };
 
@@ -208,13 +213,12 @@ struct screen_ctx {
 	Window			 rootwin;
 	Window			 menuwin;
 	struct color		 color[CWM_COLOR_MAX];
-	GC			 gc;
 	int			 cycling;
 	struct geom		 view; /* viewable area */
 	struct geom		 work; /* workable area, gap-applied */
 	struct gap		 gap;
 	struct cycle_entry_q	 mruq;
-	XftColor		 xftcolor;
+	XftColor		 xftcolor[CWM_COLOR_MENU_MAX];
 	XftDraw			*xftdraw;
 	XftFont			*font;
 	int			 xinerama_no;
@@ -289,6 +293,7 @@ struct conf {
 	int			 snapdist;
 	struct gap		 gap;
 	struct color		 color[CWM_COLOR_MAX];
+	char		 	*menucolor[CWM_COLOR_MENU_MAX];
 	char			 termpath[MAXPATHLEN];
 	char			 lockpath[MAXPATHLEN];
 #define	CONF_FONT			"sans-serif:pixelsize=14:bold"
@@ -445,10 +450,10 @@ void			 conf_ungrab(struct conf *, struct keybinding *);
 int			 font_ascent(struct screen_ctx *);
 int			 font_descent(struct screen_ctx *);
 void			 font_draw(struct screen_ctx *, const char *, int,
-			     Drawable, int, int);
+			     Drawable, int, int, int);
 u_int			 font_height(struct screen_ctx *);
 void			 font_init(struct screen_ctx *, const char *,
-			     const char *);
+			     const char **);
 int			 font_width(struct screen_ctx *, const char *, int);
 
 void			 xev_loop(void);
@@ -486,6 +491,7 @@ void			 xu_ewmh_net_desktop_names(struct screen_ctx *, char *, int);
 
 void			 xu_ewmh_net_wm_desktop(struct client_ctx *);
 
+void 			 xu_xorcolor(XRenderColor, XRenderColor, XRenderColor *);
 
 void			 u_exec(char *);
 void			 u_spawn(char *);