forked from cztomczak/cefpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender_handler.cpp
More file actions
108 lines (85 loc) · 3.2 KB
/
render_handler.cpp
File metadata and controls
108 lines (85 loc) · 3.2 KB
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
// Copyright (c) 2013 CEF Python, see the Authors file.
// All rights reserved. Licensed under BSD 3-clause license.
// Project website: https://github.com/cztomczak/cefpython
#include "render_handler.h"
bool RenderHandler::GetRootScreenRect(CefRefPtr<CefBrowser> browser,
CefRect& rect)
{
REQUIRE_UI_THREAD();
return RenderHandler_GetRootScreenRect(browser, rect);
}
bool RenderHandler::GetViewRect(CefRefPtr<CefBrowser> browser,
CefRect& rect)
{
REQUIRE_UI_THREAD();
return RenderHandler_GetViewRect(browser, rect);
}
bool RenderHandler::GetScreenPoint(CefRefPtr<CefBrowser> browser,
int viewX,
int viewY,
int& screenX,
int& screenY)
{
REQUIRE_UI_THREAD();
return RenderHandler_GetScreenPoint(browser, viewX, viewY, screenX,
screenY);
}
bool RenderHandler::GetScreenInfo(CefRefPtr<CefBrowser> browser,
CefScreenInfo& screen_info)
{
REQUIRE_UI_THREAD();
return RenderHandler_GetScreenInfo(browser, screen_info);
}
void RenderHandler::OnPopupShow(CefRefPtr<CefBrowser> browser,
bool show)
{
REQUIRE_UI_THREAD();
RenderHandler_OnPopupShow(browser, show);
}
void RenderHandler::OnPopupSize(CefRefPtr<CefBrowser> browser,
const CefRect& rect)
{
REQUIRE_UI_THREAD();
RenderHandler_OnPopupSize(browser, rect);
}
void RenderHandler::OnPaint(CefRefPtr<CefBrowser> browser,
PaintElementType type,
const RectList& dirtyRects,
const void* buffer,
int width, int height)
{
REQUIRE_UI_THREAD();
RenderHandler_OnPaint(browser, type, const_cast<RectList&>(dirtyRects),
buffer, width, height);
}
void RenderHandler::OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
CursorType type,
const CefCursorInfo& custom_cursor_info)
{
REQUIRE_UI_THREAD();
RenderHandler_OnCursorChange(browser, cursor);
}
void RenderHandler::OnScrollOffsetChanged(CefRefPtr<CefBrowser> browser,
double x,
double y)
{
REQUIRE_UI_THREAD();
RenderHandler_OnScrollOffsetChanged(browser);
}
bool RenderHandler::StartDragging(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDragData> drag_data,
DragOperationsMask allowed_ops,
int x,
int y)
{
REQUIRE_UI_THREAD();
return RenderHandler_StartDragging(browser, drag_data,
allowed_ops, x, y);
}
void RenderHandler::UpdateDragCursor(CefRefPtr<CefBrowser> browser,
DragOperation operation)
{
REQUIRE_UI_THREAD();
RenderHandler_UpdateDragCursor(browser, operation);
}