don't include dlfcn.h on win32
[dia.git] / lib / diamenu.h
blobb94b2a4d35cc8ab268ca5ede6462cca4ab4a8300
1 /* Dia -- an diagram creation/manipulation program
2 * Copyright (C) 1999 Alexander Larsson
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 #ifndef DIAMENU_H
19 #define DIAMENU_H
21 #include "diatypes.h"
22 #include "object.h"
24 /* Flags for DiaMenuItem->active */
25 #define DIAMENU_ACTIVE (1<<0)
26 #define DIAMENU_TOGGLE (1<<1)
27 #define DIAMENU_TOGGLE_ON (1<<2)
29 /* Note: The returned change is already applied. */
30 typedef ObjectChange *(*DiaMenuCallback)(Object *obj, Point *pos, gpointer data);
32 struct _DiaMenuItem {
33 char *text;
34 DiaMenuCallback callback;
35 gpointer callback_data;
36 int active; /* Actually flags now, but keeps name for compatibility */
37 /* Private for app: */
38 void *app_data; /* init to NULL */
41 typedef void (*DiaMenuAppDataFree) (DiaMenu *menu);
43 struct _DiaMenu {
44 char *title;
45 int num_items;
46 DiaMenuItem *items;
47 /* Private for app: */
48 void *app_data; /* init to NULL */
49 DiaMenuAppDataFree app_data_free;
52 #endif /*DIAMENU_H*/