| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef PlatformMenuDescription_h | 26 #ifndef PlatformMenuDescription_h |
| 27 #define PlatformMenuDescription_h | 27 #define PlatformMenuDescription_h |
| 28 | 28 |
| 29 #if PLATFORM(MAC) | 29 #if PLATFORM(MAC) |
| 30 OBJC_CLASS NSMutableArray; | 30 OBJC_CLASS NSMutableArray; |
| 31 #elif PLATFORM(QT) | |
| 32 #include <qlist.h> | |
| 33 #elif PLATFORM(GTK) | |
| 34 typedef struct _GtkMenu GtkMenu; | |
| 35 #elif PLATFORM(CHROMIUM) | 31 #elif PLATFORM(CHROMIUM) |
| 36 #include <wtf/Vector.h> | 32 #include <wtf/Vector.h> |
| 37 #endif | 33 #endif |
| 38 | 34 |
| 39 namespace WebCore { | 35 namespace WebCore { |
| 40 | 36 |
| 41 #if !USE(CROSS_PLATFORM_CONTEXT_MENUS) | 37 #if !USE(CROSS_PLATFORM_CONTEXT_MENUS) |
| 42 #if PLATFORM(MAC) | 38 #if PLATFORM(MAC) |
| 43 typedef NSMutableArray* PlatformMenuDescription; | 39 typedef NSMutableArray* PlatformMenuDescription; |
| 44 #elif PLATFORM(QT) | |
| 45 class ContextMenuItem; | |
| 46 typedef const QList<ContextMenuItem>* PlatformMenuDescription; | |
| 47 #elif PLATFORM(GTK) | |
| 48 typedef GtkMenu* PlatformMenuDescription; | |
| 49 #elif PLATFORM(CHROMIUM) | 40 #elif PLATFORM(CHROMIUM) |
| 50 class ContextMenuItem; | 41 class ContextMenuItem; |
| 51 typedef const Vector<ContextMenuItem>* PlatformMenuDescription; | 42 typedef const Vector<ContextMenuItem>* PlatformMenuDescription; |
| 52 #else | 43 #else |
| 53 typedef void* PlatformMenuDescription; | 44 typedef void* PlatformMenuDescription; |
| 54 #endif | 45 #endif |
| 55 #else | 46 #else |
| 56 // FIXME: When more platforms switch over, and PlatformMenuDescription | 47 // FIXME: When more platforms switch over, and PlatformMenuDescription |
| 57 // is not used anymore, we should rename this header to PlatformContextMenu. | 48 // is not used anymore, we should rename this header to PlatformContextMenu. |
| 58 #if PLATFORM(WIN) | 49 #if PLATFORM(WIN) |
| 59 typedef HMENU PlatformContextMenu; | 50 typedef HMENU PlatformContextMenu; |
| 60 typedef MENUITEMINFO PlatformContextMenuItem; | 51 typedef MENUITEMINFO PlatformContextMenuItem; |
| 61 #else | 52 #else |
| 62 typedef void* PlatformContextMenu; | 53 typedef void* PlatformContextMenu; |
| 63 typedef void* PlatformContextMenuItem; | 54 typedef void* PlatformContextMenuItem; |
| 64 #endif | 55 #endif |
| 65 #endif // !USE(CROSS_PLATFORM_CONTEXT_MENUS) | 56 #endif // !USE(CROSS_PLATFORM_CONTEXT_MENUS) |
| 66 | 57 |
| 67 } // namespace | 58 } // namespace |
| 68 | 59 |
| 69 #endif // PlatformMenuDescription_h | 60 #endif // PlatformMenuDescription_h |
| OLD | NEW |