Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1394127

Browse files
committed
Initial NodeInfo.cpp, load Mime first
1 parent1441554 commit1394127

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

‎bindings/storage/NodeInfo.cpp‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
#include<pybind11/operators.h>
55

66
#include<NodeInfo.h>
7+
#include<Bitmap.h>
78

89
namespacepy= pybind11;
910
usingnamespaceBPrivate;
1011
usingnamespaceBPrivate::Storage;
1112
usingnamespaceBPrivate::Storage::Mime;
1213

13-
voiddefine_NodeInfo(py::module_& m)
14+
PYBIND11_MODULE(NodeInfo, m)
1415
{
1516
py::class_<BNodeInfo>(m,"BNodeInfo")
1617
.def(py::init(),"")
@@ -19,15 +20,15 @@ py::class_<BNodeInfo>(m, "BNodeInfo")
1920
.def("InitCheck", &BNodeInfo::InitCheck,"")
2021
.def("GetType", &BNodeInfo::GetType,"",py::arg("type"))
2122
.def("SetType", &BNodeInfo::SetType,"",py::arg("type"))
22-
.def("GetIcon", py::overload_cast<BBitmap *, icon_size>(&BNodeInfo::GetIcon),"",py::arg("icon"),py::arg("which")=B_LARGE_ICON)
23+
.def("GetIcon", py::overload_cast<BBitmap *, icon_size>(&BNodeInfo::GetIcon, py::const_),"",py::arg("icon"),py::arg("which")=B_LARGE_ICON)
2324
.def("SetIcon", py::overload_cast<const BBitmap *, icon_size>(&BNodeInfo::SetIcon),"",py::arg("icon"),py::arg("which")=B_LARGE_ICON)
24-
.def("GetIcon", py::overload_cast<unsignedchar,size_t *, type_code *>(&BNodeInfo::GetIcon),"",py::arg("data"),py::arg("size"),py::arg("type"))
25-
.def("SetIcon", py::overload_cast<unsignedchar,size_t>(&BNodeInfo::SetIcon),"",py::arg("data"),py::arg("size"))
25+
//.def("GetIcon", py::overload_cast<unsigned char, size_t *, type_code *>(&BNodeInfo::GetIcon, py::const_), "", py::arg("data"), py::arg("size"), py::arg("type"))
26+
.def("SetIcon", py::overload_cast<const uint8*,size_t>(&BNodeInfo::SetIcon),"",py::arg("data"),py::arg("size"))
2627
.def("GetPreferredApp", &BNodeInfo::GetPreferredApp,"",py::arg("signature"),py::arg("verb")=B_OPEN)
2728
.def("SetPreferredApp", &BNodeInfo::SetPreferredApp,"",py::arg("signature"),py::arg("verb")=B_OPEN)
2829
.def("GetAppHint", &BNodeInfo::GetAppHint,"",py::arg("ref"))
2930
.def("SetAppHint", &BNodeInfo::SetAppHint,"",py::arg("ref"))
30-
.def("GetTrackerIcon", py::overload_cast<BBitmap *, icon_size>(&BNodeInfo::GetTrackerIcon),"",py::arg("icon"),py::arg("which")=B_LARGE_ICON)
31+
.def("GetTrackerIcon", py::overload_cast<BBitmap *, icon_size>(&BNodeInfo::GetTrackerIcon, py::const_),"",py::arg("icon"),py::arg("which")=B_LARGE_ICON)
3132
.def_static("GetTrackerIcon", py::overload_cast<const entry_ref *, BBitmap *, icon_size>(&BNodeInfo::GetTrackerIcon),"",py::arg("ref"),py::arg("icon"),py::arg("which")=B_LARGE_ICON)
3233
;
3334

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp