chiark / gitweb /
Imported Upstream version 1.0.0
[e16] / src / buttons.h
1 /*
2  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
3  * Copyright (C) 2004-2008 Kim Woelders
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a copy
6  * of this software and associated documentation files (the "Software"), to
7  * deal in the Software without restriction, including without limitation the
8  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9  * sell copies of the Software, and to permit persons to whom the Software is
10  * furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in
13  * all copies of the Software, its documentation and marketing & publicity
14  * materials, and acknowledgment shall be given in the documentation, materials
15  * and software packages that this Software was used.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20  * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24 #ifndef _BUTTONS_H_
25 #define _BUTTONS_H_
26
27 #include <X11/Xlib.h>
28 #include "eobj.h"
29 #include "etypes.h"
30
31 typedef void        (ButtonCbFunc) (EObj * eo, XEvent * ev, ActionClass * ac);
32
33 /* buttons.c */
34 Button             *ButtonCreate(const char *name, int id, const char *iclass,
35                                  const char *aclass, const char *tclass,
36                                  const char *label, int ontop, int flags,
37                                  int minw, int maxw, int minh, int maxh, int xo,
38                                  int yo, int xa, int xr, int ya, int yr,
39                                  int xsr, int xsa, int ysr, int ysa, char simg,
40                                  int desk, char sticky);
41 void                ButtonDestroy(Button * b);
42 Button             *ButtonFind(const char *name);
43 void                ButtonShow(Button * b);
44 void                ButtonHide(Button * b);
45 void                ButtonMoveToCoord(Button * b, int x, int y);
46 void                ButtonMoveRelative(Button * b, int dx, int dy);
47 void                ButtonSwallowInto(Button * b, EObj * eo);
48 void                ButtonSetCallback(Button * b, ButtonCbFunc * func,
49                                       EObj * eo);
50 int                 ButtonDoShowDefault(const Button * b);
51 int                 ButtonEmbedWindow(Button * ButtonToUse,
52                                       Window WindowToEmbed);
53
54 void                ButtonsForeach(int id, Desk * dsk,
55                                    void (*func) (Button * b));
56 void                ButtonsMoveStickyToDesk(Desk * d);
57 int                 ButtonsConfigLoad(FILE * fs);
58
59 #endif /* _BUTTONS_H_ */