FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cefpython/cefpython/cef1/include/cef_browser.h at cefpython31 · pythonthings/cefpython · GitHub
pythonthings
cefpython
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cefpython
/
cefpython
/
cef1
/
include
/
cef_browser.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
344 lines (303 loc) · 10.4 KB
Breadcrumbs
cefpython
/
cefpython
/
cef1
/
include
/
cef_browser.h
Copy path
File metadata and controls
344 lines (303 loc) · 10.4 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
//
Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
//
//
Redistribution and use in source and binary forms, with or without
//
modification, are permitted provided that the following conditions are
//
met:
//
//
* Redistributions of source code must retain the above copyright
//
notice, this list of conditions and the following disclaimer.
//
* Redistributions in binary form must reproduce the above
//
copyright notice, this list of conditions and the following disclaimer
//
in the documentation and/or other materials provided with the
//
distribution.
//
* Neither the name of Google Inc. nor the name Chromium Embedded
//
Framework nor the names of its contributors may be used to endorse
//
or promote products derived from this software without specific prior
//
written permission.
//
//
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
//
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
//
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
//
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
//
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
//
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
//
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
//
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
//
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
//
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
---------------------------------------------------------------------------
//
//
The contents of this file must follow a specific format in order to
//
support the CEF translator tool. See the translator.README.txt file in the
//
tools directory for more information.
//
#
ifndef
CEF_INCLUDE_CEF_BROWSER_H_
#
define
CEF_INCLUDE_CEF_BROWSER_H_
#
pragma
once
#
include
"
include/cef_base.h
"
#
include
"
include/cef_frame.h
"
#
include
<
vector
>
class
CefClient
;
//
/
//
Class used to represent a browser window. The methods of this class may be
//
called on any thread unless otherwise indicated in the comments.
//
/
/*
--cef(source=library)--
*/
class
CefBrowser
:
public
virtual
CefBase {
public:
typedef
cef_key_type_t
KeyType;
typedef
cef_mouse_button_type_t
MouseButtonType;
typedef
cef_paint_element_type_t
PaintElementType;
//
/
//
Create a new browser window using the window parameters specified by
//
|windowInfo|. All values will be copied internally and the actual window
//
will be created on the UI thread. This method call will not block.
//
/
/*
--cef(optional_param=url)--
*/
static
bool
CreateBrowser
(CefWindowInfo& windowInfo,
CefRefPtr<CefClient> client,
const
CefString& url,
const
CefBrowserSettings& settings);
//
/
//
Create a new browser window using the window parameters specified by
//
|windowInfo|. This method should only be called on the UI thread.
//
/
/*
--cef(optional_param=url)--
*/
static
CefRefPtr<CefBrowser>
CreateBrowserSync
(CefWindowInfo& windowInfo,
CefRefPtr<CefClient> client,
const
CefString& url,
const
CefBrowserSettings& settings);
//
/
//
Call this method before destroying a contained browser window. This method
//
performs any internal cleanup that may be needed before the browser window
//
is destroyed.
//
/
/*
--cef()--
*/
virtual
void
ParentWindowWillClose
() =0;
//
/
//
Closes this browser window.
//
/
/*
--cef()--
*/
virtual
void
CloseBrowser
() =0;
//
/
//
Returns true if the browser can navigate backwards.
//
/
/*
--cef()--
*/
virtual
bool
CanGoBack
() =0;
//
/
//
Navigate backwards.
//
/
/*
--cef()--
*/
virtual
void
GoBack
() =0;
//
/
//
Returns true if the browser can navigate forwards.
//
/
/*
--cef()--
*/
virtual
bool
CanGoForward
() =0;
//
/
//
Navigate forwards.
//
/
/*
--cef()--
*/
virtual
void
GoForward
() =0;
//
/
//
Reload the current page.
//
/
/*
--cef()--
*/
virtual
void
Reload
() =0;
//
/
//
Reload the current page ignoring any cached data.
//
/
/*
--cef()--
*/
virtual
void
ReloadIgnoreCache
() =0;
//
/
//
Stop loading the page.
//
/
/*
--cef()--
*/
virtual
void
StopLoad
() =0;
//
/
//
Set focus for the browser window. If |enable| is true focus will be set to
//
the window. Otherwise, focus will be removed.
//
/
/*
--cef()--
*/
virtual
void
SetFocus
(
bool
enable) =0;
//
/
//
Retrieve the window handle for this browser.
//
/
/*
--cef()--
*/
virtual
CefWindowHandle
GetWindowHandle
() =0;
//
/
//
Retrieve the window handle of the browser that opened this browser. Will
//
return NULL for non-popup windows. This method can be used in combination
//
with custom handling of modal windows.
//
/
/*
--cef()--
*/
virtual
CefWindowHandle
GetOpenerWindowHandle
() =0;
//
/
//
Returns the globally unique identifier for this browser.
//
/
/*
--cef()--
*/
virtual
int
GetIdentifier
() =0;
//
/
//
Returns true if the window is a popup window.
//
/
/*
--cef()--
*/
virtual
bool
IsPopup
() =0;
//
Returns true if a document has been loaded in the browser.
/*
--cef()--
*/
virtual
bool
HasDocument
() =0;
//
/
//
Returns the client for this browser.
//
/
/*
--cef()--
*/
virtual
CefRefPtr<CefClient>
GetClient
() =0;
//
/
//
Returns the main (top-level) frame for the browser window.
//
/
/*
--cef()--
*/
virtual
CefRefPtr<CefFrame>
GetMainFrame
() =0;
//
/
//
Returns the focused frame for the browser window. This method should only
//
be called on the UI thread.
//
/
/*
--cef()--
*/
virtual
CefRefPtr<CefFrame>
GetFocusedFrame
() =0;
//
/
//
Returns the frame with the specified name, or NULL if not found. This
//
method should only be called on the UI thread.
//
/
/*
--cef()--
*/
virtual
CefRefPtr<CefFrame>
GetFrame
(
const
CefString& name) =0;
//
/
//
Returns the names of all existing frames. This method should only be called
//
on the UI thread.
//
/
/*
--cef()--
*/
virtual
void
GetFrameNames
(std::vector<CefString>& names) =0;
//
/
//
Search for |searchText|. |identifier| can be used to have multiple searches
//
running simultaniously. |forward| indicates whether to search forward or
//
backward within the page. |matchCase| indicates whether the search should
//
be case-sensitive. |findNext| indicates whether this is the first request
//
or a follow-up.
//
/
/*
--cef()--
*/
virtual
void
Find
(
int
identifier,
const
CefString& searchText,
bool
forward,
bool
matchCase,
bool
findNext) =0;
//
/
//
Cancel all searches that are currently going on.
//
/
/*
--cef()--
*/
virtual
void
StopFinding
(
bool
clearSelection) =0;
//
/
//
Get the current zoom level. The default zoom level is 0.0. This method can
//
only be called on the UI thread.
//
/
/*
--cef()--
*/
virtual
double
GetZoomLevel
() =0;
//
/
//
Change the zoom level to the specified value. Specify 0.0 to reset the
//
zoom level. The change will be applied asynchronously on the UI thread.
//
/
/*
--cef()--
*/
virtual
void
SetZoomLevel
(
double
zoomLevel) =0;
//
/
//
Clear the back/forward browsing history.
//
/
/*
--cef()--
*/
virtual
void
ClearHistory
() =0;
//
/
//
Open developer tools in its own window.
//
/
/*
--cef()--
*/
virtual
void
ShowDevTools
() =0;
//
/
//
Explicitly close the developer tools window if one exists for this browser
//
instance.
//
/
/*
--cef()--
*/
virtual
void
CloseDevTools
() =0;
//
/
//
Returns true if window rendering is disabled.
//
/
/*
--cef()--
*/
virtual
bool
IsWindowRenderingDisabled
() =0;
//
/
//
Get the size of the specified element. This method should only be called on
//
the UI thread.
//
/
/*
--cef()--
*/
virtual
bool
GetSize
(PaintElementType type,
int
& width,
int
& height) =0;
//
/
//
Set the size of the specified element. This method is only used when window
//
rendering is disabled.
//
/
/*
--cef()--
*/
virtual
void
SetSize
(PaintElementType type,
int
width,
int
height) =0;
//
/
//
Returns true if a popup is currently visible. This method should only be
//
called on the UI thread.
//
/
/*
--cef()--
*/
virtual
bool
IsPopupVisible
() =0;
//
/
//
Hide the currently visible popup, if any.
//
/
/*
--cef()--
*/
virtual
void
HidePopup
() =0;
//
/
//
Invalidate the |dirtyRect| region of the view. This method is only used
//
when window rendering is disabled and will result in a call to
//
HandlePaint().
//
/
/*
--cef()--
*/
virtual
void
Invalidate
(
const
CefRect& dirtyRect) =0;
//
/
//
Get the raw image data contained in the specified element without
//
performing validation. The specified |width| and |height| dimensions must
//
match the current element size. On Windows |buffer| must be width*height*4
//
bytes in size and represents a BGRA image with an upper-left origin. This
//
method should only be called on the UI thread.
//
/
/*
--cef()--
*/
virtual
bool
GetImage
(PaintElementType type,
int
width,
int
height,
void
* buffer) =0;
//
/
//
Send a key event to the browser.
//
/
/*
--cef()--
*/
virtual
void
SendKeyEvent
(KeyType type,
const
CefKeyInfo& keyInfo,
int
modifiers) =0;
//
/
//
Send a mouse click event to the browser. The |x| and |y| coordinates are
//
relative to the upper-left corner of the view.
//
/
/*
--cef()--
*/
virtual
void
SendMouseClickEvent
(
int
x,
int
y, MouseButtonType type,
bool
mouseUp,
int
clickCount) =0;
//
/
//
Send a mouse move event to the browser. The |x| and |y| coordinates are
//
relative to the upper-left corner of the view.
//
/
/*
--cef()--
*/
virtual
void
SendMouseMoveEvent
(
int
x,
int
y,
bool
mouseLeave) =0;
//
/
//
Send a mouse wheel event to the browser. The |x| and |y| coordinates are
//
relative to the upper-left corner of the view. The |deltaX| and |deltaY|
//
values represent the movement delta in the X and Y directions respectively.
//
/
/*
--cef()--
*/
virtual
void
SendMouseWheelEvent
(
int
x,
int
y,
int
deltaX,
int
deltaY) =0;
//
/
//
Send a focus event to the browser.
//
/
/*
--cef()--
*/
virtual
void
SendFocusEvent
(
bool
setFocus) =0;
//
/
//
Send a capture lost event to the browser.
//
/
/*
--cef()--
*/
virtual
void
SendCaptureLostEvent
() =0;
};
#
endif
//
CEF_INCLUDE_CEF_BROWSER_H_
Back
|
FazBrowse Home
|
New Git URL