FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cefpython/src/drag_data.pyx at master · linesight/cefpython · GitHub
linesight
/
cefpython
Public
forked from
cztomczak/cefpython
Notifications
You must be signed in to change notification settings
Fork
2
Star
11
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cefpython
/
src
/
drag_data.pyx
Copy path
More file actions
More file actions
Latest commit
History
History
History
51 lines (38 loc) · 1.81 KB
Breadcrumbs
cefpython
/
src
/
drag_data.pyx
Copy path
File metadata and controls
51 lines (38 loc) · 1.81 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
#
Copyright (c) 2016 CEF Python, see the Authors file.
#
All rights reserved. Licensed under BSD 3-clause license.
#
Project website: https://github.com/cztomczak/cefpython
include
"
cefpython.pyx
"
cdef DragData_Init(CefRefPtr[CefDragData] cef_drag_data):
cdef DragData drag_data
=
DragData()
drag_data.cef_drag_data
=
cef_drag_data
return
drag_data
cdef
class
DragData:
cdef CefRefPtr[CefDragData] cef_drag_data
def
__init__
(
self
):
self
.cef_drag_data
=
CefDragData_Create()
self
.cef_drag_data.get().SetFragmentText(PyToCefStringValue(
"
none
"
))
self
.cef_drag_data.get().SetFragmentHtml(PyToCefStringValue(
"
none
"
))
self
.cef_drag_data.get().SetFragmentBaseURL(PyToCefStringValue(
"
"
))
cpdef py_bool IsLink(
self
):
return
self
.cef_drag_data.get().IsLink()
cpdef py_bool IsFragment(
self
):
return
self
.cef_drag_data.get().IsFragment()
cpdef py_string GetLinkUrl(
self
):
return
CefToPyString(
self
.cef_drag_data.get().GetLinkURL())
cpdef py_string GetLinkTitle(
self
):
return
CefToPyString(
self
.cef_drag_data.get().GetLinkTitle())
cpdef py_string GetFragmentText(
self
):
return
CefToPyString(
self
.cef_drag_data.get().GetFragmentText())
cpdef py_string GetFragmentHtml(
self
):
return
CefToPyString(
self
.cef_drag_data.get().GetFragmentHtml())
cpdef PyImage GetImage(
self
):
cdef CefRefPtr[CefImage] cef_image
=
\
self
.cef_drag_data.get().GetImage()
if
not
cef_image.get():
raise
Exception
(
"
Image is not available
"
)
return
PyImage_Init(cef_image)
cpdef
tuple
GetImageHotspot(
self
):
cdef CefPoint point
=
self
.cef_drag_data.get().GetImageHotspot()
return
point.x, point.y
cpdef py_bool HasImage(
self
):
return
self
.cef_drag_data.get().HasImage()
Back
|
FazBrowse Home
|
New Git URL