1 | /* |
2 | * Copyright (C) 2013 Apple Inc. All rights reserved. |
3 | * |
4 | * Redistribution and use in source and binary forms, with or without |
5 | * modification, are permitted provided that the following conditions |
6 | * are met: |
7 | * 1. Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. |
9 | * 2. Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. |
12 | * |
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' |
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS |
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
23 | * THE POSSIBILITY OF SUCH DAMAGE. |
24 | */ |
25 | |
26 | #ifndef WKPageContextMenuClient_h |
27 | #define |
28 | |
29 | #include <WebKit/WKBase.h> |
30 | #include <WebKit/WKGeometry.h> |
31 | |
32 | #ifdef __cplusplus |
33 | extern "C" { |
34 | #endif |
35 | |
36 | typedef void (*)(WKPageRef page, WKArrayRef , WKArrayRef* , WKHitTestResultRef hitTestResult, WKTypeRef userData, const void* clientInfo); |
37 | typedef void (*)(WKPageRef page, WKArrayRef , WKContextMenuListenerRef listener, WKHitTestResultRef hitTestResult, WKTypeRef userData, const void* clientInfo); |
38 | typedef void (*)(WKPageRef page, WKContextMenuItemRef , const void* clientInfo); |
39 | typedef void (*)(WKPageRef page, const void* clientInfo); |
40 | typedef void (*)(WKPageRef page, WKPoint , WKArrayRef , const void* clientInfo); |
41 | typedef void (*)(WKPageRef page, const void* clientInfo); |
42 | |
43 | // Deprecated |
44 | typedef void (*)(WKPageRef page, WKArrayRef , WKArrayRef* , WKTypeRef userData, const void* clientInfo); |
45 | |
46 | typedef struct { |
47 | int ; |
48 | const void * ; |
49 | } ; |
50 | |
51 | typedef struct { |
52 | WKPageContextMenuClientBase ; |
53 | |
54 | // Version 0. |
55 | WKPageGetContextMenuFromProposedContextMenuCallback_deprecatedForUseWithV0 ; |
56 | WKPageCustomContextMenuItemSelectedCallback ; |
57 | } ; |
58 | |
59 | typedef struct { |
60 | WKPageContextMenuClientBase ; |
61 | |
62 | // Version 0. |
63 | WKPageGetContextMenuFromProposedContextMenuCallback_deprecatedForUseWithV0 ; |
64 | WKPageCustomContextMenuItemSelectedCallback ; |
65 | |
66 | // Version 1. |
67 | WKPageContextMenuDismissedCallback ; |
68 | } ; |
69 | |
70 | typedef struct { |
71 | WKPageContextMenuClientBase ; |
72 | |
73 | // Version 0. |
74 | WKPageGetContextMenuFromProposedContextMenuCallback_deprecatedForUseWithV0 ; |
75 | WKPageCustomContextMenuItemSelectedCallback ; |
76 | |
77 | // Version 1. |
78 | WKPageContextMenuDismissedCallback ; |
79 | |
80 | // Version 2. |
81 | WKPageGetContextMenuFromProposedContextMenuCallback ; |
82 | } ; |
83 | |
84 | typedef struct { |
85 | WKPageContextMenuClientBase ; |
86 | |
87 | // Version 0. |
88 | WKPageGetContextMenuFromProposedContextMenuCallback_deprecatedForUseWithV0 ; |
89 | WKPageCustomContextMenuItemSelectedCallback ; |
90 | |
91 | // Version 1. |
92 | WKPageContextMenuDismissedCallback ; |
93 | |
94 | // Version 2. |
95 | WKPageGetContextMenuFromProposedContextMenuCallback ; |
96 | |
97 | // Version 3. |
98 | WKPageShowContextMenuCallback ; |
99 | WKPageHideContextMenuCallback ; |
100 | } ; |
101 | |
102 | typedef struct { |
103 | WKPageContextMenuClientBase ; |
104 | |
105 | // Version 0. |
106 | WKPageGetContextMenuFromProposedContextMenuCallback_deprecatedForUseWithV0 ; |
107 | WKPageCustomContextMenuItemSelectedCallback ; |
108 | |
109 | // Version 1. |
110 | WKPageContextMenuDismissedCallback ; |
111 | |
112 | // Version 2. |
113 | WKPageGetContextMenuFromProposedContextMenuCallback ; |
114 | |
115 | // Version 3. |
116 | WKPageShowContextMenuCallback ; |
117 | WKPageHideContextMenuCallback ; |
118 | |
119 | // Version 4. |
120 | WKPageGetContextMenuFromProposedContextMenuCallbackAsync ; |
121 | |
122 | } ; |
123 | |
124 | #ifdef __cplusplus |
125 | } |
126 | #endif |
127 | |
128 | |
129 | #endif // WKPageContextMenuClient_h |
130 | |