aboutsummaryrefslogtreecommitdiff
path: root/src/misc.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc.hh')
-rw-r--r--src/misc.hh102
1 files changed, 0 insertions, 102 deletions
diff --git a/src/misc.hh b/src/misc.hh
deleted file mode 100644
index 6d3a66c..0000000
--- a/src/misc.hh
+++ /dev/null
@@ -1,102 +0,0 @@
1// misc.hh for fluxbox
2// Copyright (c) 2001 Henrik Kinnunen (fluxgen@linuxmail.org)
3//
4// Permission is hereby granted, free of charge, to any person obtaining a
5// copy of this software and associated documentation files (the "Software"),
6// to deal in the Software without restriction, including without limitation
7// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8// and/or sell copies of the Software, and to permit persons to whom the
9// Software is furnished to do so, subject to the following conditions:
10//
11// The above copyright notice and this permission notice shall be included in
12// all copies or substantial portions of the Software.
13//
14// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE.
21
22#ifndef _MISC_HH_
23#define _MISC_HH_
24
25
26#ifdef HAVE_CONFIG_H
27# include "config.h"
28#endif //HAVE_CONFIG_H
29
30#include <X11/Xlib.h>
31
32class Misc
33{
34public:
35 typedef struct FFont
36 {
37 enum FontJustify {LEFT=0, RIGHT, CENTER};
38
39 XFontSet set;
40 XFontSetExtents *set_extents;
41 XFontStruct *fontstruct;
42 FontJustify justify;
43 } Font;
44
45static char *strdup(const char *);
46static char *expandFilename(const char *filename);
47
48static void DrawString(Display *display, Window w, GC gc, Misc::Font *font,
49 unsigned int text_w, unsigned int size_w,
50 unsigned int bevel_w, char *text);
51
52// ----------------------------------------------------------------------
53// xvertext, Copyright (c) 1992 Alan Richardson (mppa3@uk.ac.sussex.syma)
54// ----------------------------------------------------------------------
55
56 /* *** The font structures *** */
57
58 struct BitmapStruct {
59 int bit_w;
60 int bit_h;
61
62 Pixmap bm;
63 };
64
65 struct XRotCharStruct {
66 int ascent;
67 int descent;
68 int lbearing;
69 int rbearing;
70 int width;
71
72 BitmapStruct glyph;
73 };
74
75 struct XRotFontStruct {
76 int dir;
77 int height;
78 int max_ascent;
79 int max_descent;
80 int max_char;
81 int min_char;
82 char *name;
83
84 XFontStruct *xfontstruct;
85
86 Misc::XRotCharStruct per_char[95];
87 };
88static unsigned int XRotTextWidth(Misc::XRotFontStruct *rotfont, char *str, int len);
89static void XRotDrawString(Display *dpy, Misc::XRotFontStruct *rotfont, Drawable drawable,
90 GC gc, int x, int y, char *str, int len);
91
92static void DrawRotString(Display *display, Window w, GC gc, Misc::XRotFontStruct *font,
93 unsigned int align, unsigned int text_w,
94 unsigned int size_w, unsigned int size_h,
95 unsigned int bevel_w, char *text);
96
97static Misc::XRotFontStruct *Misc::XRotLoadFont(Display *dpy, char *fontname, float angle);
98static void Misc::XRotUnloadFont(Display *dpy, Misc::XRotFontStruct *rotfont);
99
100};
101
102#endif //_MISC_HH_