about summary refs log tree commit diff stats
Commit message (Expand)AuthorAgeFilesLines
...
| * core.actions: added dump_keybindings()hut2011-10-081-1/+36
| * ext.keybinding_parser: added <INSERT>hut2011-10-081-0/+1
| * defaults/apps: Added mplayer2hut2011-10-081-1/+8
| * gui.ansi: Added doctesthut2011-10-081-3/+34
| * ext.signals: fixed signals for python3.2hut2011-10-081-4/+4
| * ext.iter_tools: Added doctesthut2011-10-081-0/+15
| * Makefile: Fixed doctests for python3.2hut2011-10-081-1/+1
| * ext.direction: Added doctesthut2011-10-071-13/+25
| * ext.lazy_property: added doctesthut2011-10-071-6/+15
| * ext.signals: Fixed hidden bugs, added doctestshut2011-10-071-15/+175
| * Makefile: added `make test' back in.hut2011-10-071-1/+9
| * moved DELETE_WARNING constant from api to api.commandshut2011-10-072-2/+2
| * core.actions: Fixed crash when %f/%F macros are undefinedhut2011-10-071-6/+30
| * widgets.browserview: Try to fix crashhut2011-10-071-0/+5
| * merged ext.keybindings.py into ext.keybindings_parser.pyhut2011003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
 * See LICENSE file for license details.
 */

#include <X11/Xlib.h>
#include <X11/Xlocale.h>

typedef struct Brush Brush;
typedef struct Fnt Fnt;

struct Fnt {
	XFontStruct *xfont;
	XFontSet set;
	int ascent;
	int descent;
	int height;
};

struct Brush {
	GC gc;
	Drawable drawable;
	XRectangle rect;
	Fnt font;
	unsigned long bg;
	unsigned long fg;
	unsigned long border;
};

extern void draw(Display *dpy, Brush *b, Bool border, const char *text);
extern void loadcolors(Display *dpy, int screen, Brush *b,
		const char *bg, const char *fg, const char *bo);
extern void loadfont(Display *dpy, Fnt *font, const char *fontstr);
extern unsigned int textwidth_l(Fnt *font, char *text, unsigned int len);
extern unsigned int textwidth(Fnt *font, char *text);
='commitgraph'>| *
core.actions: expanduser in source_commandlist()hut2011-10-031-0/+1
| * core.environment: fixed crash induced by previous commithut2011-10-032-3/+4
| * core.environment: trying to fix garbage collection errorhut2011-10-031-5/+8
| * core.actions: REALLY fix that decoding errorhut2011-10-021-1/+8
| * defaults/rc.conf: key "v" toggles instead of sets markinghut2011-10-021-1/+1
| * core.actions: smarter open() in get_previewhut2011-10-021-1/+1
| * core.actions: fix decoding error when previewing some fileshut2011-10-021-1/+3
| * api.apps: fixed error messagehut2011-10-021-0/+2
| * core.actions: sanitize input of {set,enter,unset}_bookmarkhut2011-10-021-4/+4
| * Changed version to 1.5.0hut2011-10-024-13/+4