wmshutdown: Destroy dialog window before shutting down. This is especially useful...
[dockapps.git] / wmhdplop / dockapp_imlib2.h
blob88ecc2dced8ec58bb622c72c868fbcb895aa27af
1 #ifndef DOCKAPP_IMLIB2_H
2 #define DOCKAPP_IMLIB2_H
4 #include <X11/Xlib.h>
5 #include <Imlib2.h>
6 #ifdef GKRELLM
7 #include <gdk/gdk.h>
8 #endif
9 /*
10 #ifndef GKRELLM
11 #define DOCK_WIDTH 64
12 #else
13 #define DOCK_WIDTH 60
14 #endif
15 #define DOCK_HEIGHT DOCK_WIDTH
17 typedef struct {
18 Display *display;
19 Window normalwin, iconwin, rootwin;
20 int iconwin_mapped, normalwin_mapped;
21 Window win; /* either normalwin or iconwin */
22 Visual *visual;
23 Colormap colormap;
24 int depth, screennum;
25 Imlib_Image bg, img; /* background picture, and "work" picture */
26 unsigned x0,y0,w,h; /* pos & dimensions of the "work" area */
27 unsigned win_width, win_height; /* size of dockapps (DOCK_WIDTH x DOCK_HEIGHT) */
28 Atom atom_WM_DELETE_WINDOW, atom_WM_PROTOCOLS;
29 } DockImlib2;
32 #define DOCKPREF_DISPLAY 1
33 #define DOCKPREF_GEOMETRY 2
34 typedef struct {
35 char **argv; int argc; /* this should be always set */
36 int flags; /* combination of DOCKPREF_xxx */
37 char *display;
38 char *geometry;
39 int dockapp_size;
40 } DockImlib2Prefs;
42 #define DOCKIMLIB2_VERSION "0.9.0"
44 #ifndef GKRELLM
45 DockImlib2* dockimlib2_setup(int x0, int y0, int w, int h, DockImlib2Prefs *p);
46 #else
47 DockImlib2* dockimlib2_gkrellm_setup(int x0, int y0, int w, int h, DockImlib2Prefs *p, GdkDrawable *gkdrawable);
48 void dockimlib2_gkrellm_xinit(DockImlib2 *dock, GdkDrawable *gkdrawable);
49 #endif
50 Imlib_Font *load_font(char *prefname, char **flist);
52 void dockimlib2_reset_imlib(DockImlib2 *dock);
54 void dockimlib2_render(DockImlib2 *dock);
55 const char *dockimlib2_last_loaded_font();
56 #endif