mirror of
https://github.com/hyprwm/hyprwayland-scanner.git
synced 2024-11-23 12:25: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_CLASS_NAME_CAMEL = camelize((clientCode ? "CC_" : "C_") + iface.name);
|
||||
|
||||
// begin the class
|
||||
HEADER += std::format(R"#(
|
||||
if (!clientCode) {
|
||||
HEADER += std::format(R"#(
|
||||
struct {}DestroyWrapper {{
|
||||
wl_listener listener;
|
||||
{}* parent = nullptr;
|
||||
}};
|
||||
)#",
|
||||
IFACE_CLASS_NAME_CAMEL, IFACE_CLASS_NAME_CAMEL);
|
||||
}
|
||||
|
||||
// begin the class
|
||||
HEADER +=
|
||||
std::format(R"#(
|
||||
|
||||
class {} {{
|
||||
public:
|
||||
|
@ -312,8 +319,7 @@ class {} {{
|
|||
~{}();
|
||||
|
||||
)#",
|
||||
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);
|
||||
IFACE_CLASS_NAME_CAMEL, IFACE_CLASS_NAME_CAMEL, (clientCode ? "wl_resource*" : "wl_client* client, uint32_t version, uint32_t id"), IFACE_CLASS_NAME_CAMEL);
|
||||
|
||||
if (!clientCode) {
|
||||
HEADER += std::format(R"#(
|
||||
|
|
Loading…
Reference in a new issue