mirror of
https://github.com/hyprwm/hyprwayland-scanner.git
synced 2024-11-27 07:55:58 +01:00
parent
c1e34fb2b7
commit
55c78a56c0
1 changed files with 10 additions and 4 deletions
14
src/main.cpp
14
src/main.cpp
|
@ -299,12 +299,19 @@ void parseHeader() {
|
||||||
const auto IFACE_NAME_CAMEL = camelize(iface.name);
|
const auto IFACE_NAME_CAMEL = camelize(iface.name);
|
||||||
const auto IFACE_CLASS_NAME_CAMEL = camelize((clientCode ? "CC_" : "C_") + iface.name);
|
const auto IFACE_CLASS_NAME_CAMEL = camelize((clientCode ? "CC_" : "C_") + iface.name);
|
||||||
|
|
||||||
// begin the class
|
if (!clientCode) {
|
||||||
HEADER += std::format(R"#(
|
HEADER += std::format(R"#(
|
||||||
struct {}DestroyWrapper {{
|
struct {}DestroyWrapper {{
|
||||||
wl_listener listener;
|
wl_listener listener;
|
||||||
{}* parent = nullptr;
|
{}* parent = nullptr;
|
||||||
}};
|
}};
|
||||||
|
)#",
|
||||||
|
IFACE_CLASS_NAME_CAMEL, IFACE_CLASS_NAME_CAMEL);
|
||||||
|
}
|
||||||
|
|
||||||
|
// begin the class
|
||||||
|
HEADER +=
|
||||||
|
std::format(R"#(
|
||||||
|
|
||||||
class {} {{
|
class {} {{
|
||||||
public:
|
public:
|
||||||
|
@ -312,8 +319,7 @@ class {} {{
|
||||||
~{}();
|
~{}();
|
||||||
|
|
||||||
)#",
|
)#",
|
||||||
IFACE_CLASS_NAME_CAMEL, IFACE_CLASS_NAME_CAMEL, IFACE_CLASS_NAME_CAMEL, IFACE_CLASS_NAME_CAMEL,
|
IFACE_CLASS_NAME_CAMEL, IFACE_CLASS_NAME_CAMEL, (clientCode ? "wl_resource*" : "wl_client* client, uint32_t version, uint32_t id"), IFACE_CLASS_NAME_CAMEL);
|
||||||
(clientCode ? "wl_resource*" : "wl_client* client, uint32_t version, uint32_t id"), IFACE_CLASS_NAME_CAMEL);
|
|
||||||
|
|
||||||
if (!clientCode) {
|
if (!clientCode) {
|
||||||
HEADER += std::format(R"#(
|
HEADER += std::format(R"#(
|
||||||
|
|
Loading…
Reference in a new issue