Fix segfault setting MenuFace pixmap style for menus.
[fvwm.git] / modules / FvwmWharf / Wharf.h
blob072d72bcab0796943e215d22904922f384b15270
1 /* -*-c-*- */
2 #include "config.h"
3 #include "libs/fvwmlib.h"
5 /*
7 * Subroutine Prototypes
9 */
10 extern void CreateWindow(void);
11 extern void CreateVizWindow(void);
12 extern Pixel GetColor(char *name);
13 extern void RedrawWindow(Window *win, int firstbutton, int newbutton, int num_rows, int num_columns);
14 extern void match_string(char *tline);
15 #ifdef ENABLE_SOUND
16 extern void bind_sound(char *tline);
17 extern void PlaySound(int event);
18 #endif
19 extern void Loop(void);
20 extern void ParseOptions(char *);
21 extern char *safemalloc(int length);
22 extern void change_window_name(char *str);
23 extern int My_XNextEvent(Display *dpy, XEvent *event);
24 extern RETSIGTYPE DeadPipe(int nonsense);
25 extern Bool LoadIconFile(int button,int ico);
26 extern void CreateIconWindow(int button, Window *win);
27 extern void ConfigureIconWindow(int button,int row, int column, int colorset);
28 extern int GetXPMGradient(int button, int from[3], int to[3], int maxcols,
29 int type);
30 extern void GetXPMColorset(int button, int colorset);
31 extern int GetSolidXPM(int button, Pixel pixel);
32 extern Bool Pushed;
33 extern Bool ForceSize;
34 extern void DrawOutline(Drawable d, int w, int h);
35 void process_message(unsigned long type,unsigned long *body);
36 void my_send_clientmessage (Window w, Atom a, Time timestamp);
37 void swallow(unsigned long *body);
38 void ConstrainSize (XSizeHints *hints, int *widthp, int *height);
39 void MapFolder(int folder, int *LastMapped, int base_x, int base_y, int row, int col);
40 void CloseFolder(int folder);
41 void OpenFolder(int folder,int x, int y, int w, int h, int direction);
42 void RedrawPushed(Window *win, int i, int j);
43 void RedrawUnpushed(Window *win, int i, int j);
44 void RedrawUnpushedOutline(Window *win, int i,int j);
45 void RedrawPushedOutline(Window *win, int i, int j);
46 void CreateShadowGC(void);
47 extern Display *dpy; /* which display are we talking to */
48 extern Window Root;
49 extern Window main_win;
50 extern int screen;
51 extern Pixel back_pix, fore_pix;
52 extern GC NormalGC, HiReliefGC, HiInnerGC;
53 extern GC MaskGC;
54 extern int BUTTONWIDTH, BUTTONHEIGHT;
55 extern XFontStruct *font;
56 #define MAX_BUTTONS 100
57 #define BACK_BUTTON 100
59 #define MAX_OVERLAY 3
61 #define BUTTON_ARRAY_LN 102
62 #define FOLDER_ARRAY_LN 10
64 #define ICON_WIN_WIDTH 48
65 #define ICON_WIN_HEIGHT 48
67 #define ISMAPPED 0
68 #define NOTMAPPED 1
70 typedef struct icon_info {
71 char *file;
72 int w, h;
73 Pixmap icon, mask, alpha;
74 int depth;
75 } icon_info;
77 struct button_info
79 char *action;
80 char *title;
81 int iconno;
82 icon_info icons[MAX_OVERLAY];
84 Pixmap completeIcon; /* icon with background */
85 Window IconWin;
86 Window *parent;
87 XSizeHints hints;
88 char *hangon;
89 char up;
90 char swallow;
91 char maxsize;
92 char module;
93 int folder;
94 #ifdef ENABLE_DND
95 char *drop_action;
96 #endif
99 struct folder_info
101 Window win; /* Window of the Folder */
102 int firstbutton; /* index to Buttons, starting at end */
103 int count; /* count folded buttons */
104 int mapped; /* is the window visible or not ?? */
105 int cols; /* either 1 or me.count */
106 int rows; /* either me.count or 1 */
107 int direction; /* direction of the folder */
110 extern struct button_info Buttons[MAX_BUTTONS+2];
111 extern struct folder_info Folders[FOLDER_ARRAY_LN];
113 extern char *imagePath;