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 * Copyright (C) 2010 Igalia S.L | 3 * Copyright (C) 2010 Igalia S.L |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // This enum needs to be in sync with the WebMenuItemTag enum in WebUIDelega
te.h and the | 51 // This enum needs to be in sync with the WebMenuItemTag enum in WebUIDelega
te.h and the |
52 // extra values in WebUIDelegatePrivate.h | 52 // extra values in WebUIDelegatePrivate.h |
53 enum ContextMenuAction { | 53 enum ContextMenuAction { |
54 ContextMenuItemTagNoAction=0, // This item is not actually in WebUIDeleg
ate.h | 54 ContextMenuItemTagNoAction=0, // This item is not actually in WebUIDeleg
ate.h |
55 ContextMenuItemTagOpenLinkInNewWindow=1, | 55 ContextMenuItemTagOpenLinkInNewWindow=1, |
56 ContextMenuItemTagDownloadLinkToDisk, | 56 ContextMenuItemTagDownloadLinkToDisk, |
57 ContextMenuItemTagCopyLinkToClipboard, | 57 ContextMenuItemTagCopyLinkToClipboard, |
58 ContextMenuItemTagOpenImageInNewWindow, | 58 ContextMenuItemTagOpenImageInNewWindow, |
59 ContextMenuItemTagDownloadImageToDisk, | 59 ContextMenuItemTagDownloadImageToDisk, |
60 ContextMenuItemTagCopyImageToClipboard, | 60 ContextMenuItemTagCopyImageToClipboard, |
61 #if PLATFORM(QT) || PLATFORM(GTK) | |
62 ContextMenuItemTagCopyImageUrlToClipboard, | |
63 #endif | |
64 ContextMenuItemTagOpenFrameInNewWindow, | 61 ContextMenuItemTagOpenFrameInNewWindow, |
65 ContextMenuItemTagCopy, | 62 ContextMenuItemTagCopy, |
66 ContextMenuItemTagGoBack, | 63 ContextMenuItemTagGoBack, |
67 ContextMenuItemTagGoForward, | 64 ContextMenuItemTagGoForward, |
68 ContextMenuItemTagStop, | 65 ContextMenuItemTagStop, |
69 ContextMenuItemTagReload, | 66 ContextMenuItemTagReload, |
70 ContextMenuItemTagCut, | 67 ContextMenuItemTagCut, |
71 ContextMenuItemTagPaste, | 68 ContextMenuItemTagPaste, |
72 #if PLATFORM(GTK) | |
73 ContextMenuItemTagDelete, | |
74 #endif | |
75 #if PLATFORM(GTK) || PLATFORM(QT) | |
76 ContextMenuItemTagSelectAll, | |
77 #endif | |
78 #if PLATFORM(GTK) | |
79 ContextMenuItemTagInputMethods, | |
80 ContextMenuItemTagUnicode, | |
81 ContextMenuItemTagUnicodeInsertLRMMark, | |
82 ContextMenuItemTagUnicodeInsertRLMMark, | |
83 ContextMenuItemTagUnicodeInsertLREMark, | |
84 ContextMenuItemTagUnicodeInsertRLEMark, | |
85 ContextMenuItemTagUnicodeInsertLROMark, | |
86 ContextMenuItemTagUnicodeInsertRLOMark, | |
87 ContextMenuItemTagUnicodeInsertPDFMark, | |
88 ContextMenuItemTagUnicodeInsertZWSMark, | |
89 ContextMenuItemTagUnicodeInsertZWJMark, | |
90 ContextMenuItemTagUnicodeInsertZWNJMark, | |
91 #endif | |
92 ContextMenuItemTagSpellingGuess, | 69 ContextMenuItemTagSpellingGuess, |
93 ContextMenuItemTagNoGuessesFound, | 70 ContextMenuItemTagNoGuessesFound, |
94 ContextMenuItemTagIgnoreSpelling, | 71 ContextMenuItemTagIgnoreSpelling, |
95 ContextMenuItemTagLearnSpelling, | 72 ContextMenuItemTagLearnSpelling, |
96 ContextMenuItemTagOther, | 73 ContextMenuItemTagOther, |
97 ContextMenuItemTagSearchInSpotlight, | 74 ContextMenuItemTagSearchInSpotlight, |
98 ContextMenuItemTagSearchWeb, | 75 ContextMenuItemTagSearchWeb, |
99 ContextMenuItemTagLookUpInDictionary, | 76 ContextMenuItemTagLookUpInDictionary, |
100 ContextMenuItemTagOpenWithDefaultApplication, | 77 ContextMenuItemTagOpenWithDefaultApplication, |
101 ContextMenuItemPDFActualSize, | 78 ContextMenuItemPDFActualSize, |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 enum ContextMenuItemType { | 147 enum ContextMenuItemType { |
171 ActionType, | 148 ActionType, |
172 CheckableActionType, | 149 CheckableActionType, |
173 SeparatorType, | 150 SeparatorType, |
174 SubmenuType | 151 SubmenuType |
175 }; | 152 }; |
176 | 153 |
177 #if ENABLE(CONTEXT_MENUS) | 154 #if ENABLE(CONTEXT_MENUS) |
178 #if PLATFORM(MAC) | 155 #if PLATFORM(MAC) |
179 typedef NSMenuItem* PlatformMenuItemDescription; | 156 typedef NSMenuItem* PlatformMenuItemDescription; |
180 #elif PLATFORM(QT) | |
181 struct PlatformMenuItemDescription { | |
182 PlatformMenuItemDescription() | |
183 : type(ActionType), | |
184 action(ContextMenuItemTagNoAction), | |
185 checked(false), | |
186 enabled(true) | |
187 {} | |
188 | |
189 ContextMenuItemType type; | |
190 ContextMenuAction action; | |
191 String title; | |
192 QList<ContextMenuItem> subMenuItems; | |
193 bool checked; | |
194 bool enabled; | |
195 }; | |
196 #elif PLATFORM(GTK) | |
197 typedef GtkMenuItem* PlatformMenuItemDescription; | |
198 #elif PLATFORM(CHROMIUM) | 157 #elif PLATFORM(CHROMIUM) |
199 struct PlatformMenuItemDescription { | 158 struct PlatformMenuItemDescription { |
200 PlatformMenuItemDescription() | 159 PlatformMenuItemDescription() |
201 : type(ActionType) | 160 : type(ActionType) |
202 , action(ContextMenuItemTagNoAction) | 161 , action(ContextMenuItemTagNoAction) |
203 , checked(false) | 162 , checked(false) |
204 , enabled(true) { } | 163 , enabled(true) { } |
205 ContextMenuItemType type; | 164 ContextMenuItemType type; |
206 ContextMenuAction action; | 165 ContextMenuAction action; |
207 String title; | 166 String title; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 #else | 239 #else |
281 PlatformMenuItemDescription m_platformDescription; | 240 PlatformMenuItemDescription m_platformDescription; |
282 #endif | 241 #endif |
283 #endif // USE(CROSS_PLATFORM_CONTEXT_MENUS) | 242 #endif // USE(CROSS_PLATFORM_CONTEXT_MENUS) |
284 }; | 243 }; |
285 | 244 |
286 #endif // ENABLE(CONTEXT_MENUS) | 245 #endif // ENABLE(CONTEXT_MENUS) |
287 } | 246 } |
288 | 247 |
289 #endif // ContextMenuItem_h | 248 #endif // ContextMenuItem_h |
OLD | NEW |