Site update, updated desklets: mailer 0.0.7 => 0.0.8
[adesklets.git] / src / xmenu.h
blob2df915a66e7061bf552d3cc2fa63c552773012e3
1 /*--- xmenu.h ------------------------------------------------------------------
2 Copyright (C) 2004, 2005 Sylvain Fourmanoit <syfou@users.sourceforge.net>
4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to
6 deal in the Software without restriction, including without limitation the
7 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8 sell copies of the Software, and to permit persons to whom the Software is
9 furnished to do so, subject to the following conditions:
11 The above copyright notice and this permission notice shall be included in
12 all copies of the Software and its documentation and acknowledgment shall be
13 given in the documentation and software packages that this Software was
14 used.
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 ------------------------------------------------------------------------------*/
23 /* X Windows menu API
26 /*----------------------------------------------------------------------------*/
27 #ifndef HAVE_XMENU_H
28 #define HAVE_XMENU_H
30 #ifndef HAVE_CONFIG_H
31 #error Autogenerated config.h should be used.
32 #endif
34 /*----------------------------------------------------------------------------*/
35 #include "config.h" /* Autoconf */
37 #include "xwindow.h" /* Graphic related headers */
38 #include "tree.h" /* Small tree API */
40 /*----------------------------------------------------------------------------*/
41 typedef struct s_xmenu {
42 tree * content; /* Menu content */
43 tree * pos; /* Position */
44 } xmenu;
46 /*----------------------------------------------------------------------------*/
47 xmenu * xmenu_init(void);
48 int xmenu_push_item(xmenu *, const char *);
49 int xmenu_push_submenu(xmenu *, const char *);
50 int xmenu_end_submenu(xmenu *);
51 char * const xmenu_fire(Display *, int, Window,
52 Imlib_Image, Imlib_Image, int, xmenu *);
53 xmenu * xmenu_free(xmenu *);
54 void * xmenu_vector_free_item(void *);
55 /*----------------------------------------------------------------------------*/
56 #endif