mirror of
https://github.com/hyprwm/hyprwayland-scanner.git
synced 2024-11-26 10:55:59 +01:00
core: forward declare all used ifaces
This commit is contained in:
parent
3afed43647
commit
24cf55c957
1 changed files with 16 additions and 0 deletions
16
src/main.cpp
16
src/main.cpp
|
@ -255,6 +255,22 @@ struct wl_resource;
|
||||||
for (auto& iface : XMLDATA.ifaces) {
|
for (auto& iface : XMLDATA.ifaces) {
|
||||||
const auto IFACE_CLASS_NAME_CAMEL = camelize("C_" + iface.name);
|
const auto IFACE_CLASS_NAME_CAMEL = camelize("C_" + iface.name);
|
||||||
HEADER += std::format("\nclass {};", IFACE_CLASS_NAME_CAMEL);
|
HEADER += std::format("\nclass {};", IFACE_CLASS_NAME_CAMEL);
|
||||||
|
|
||||||
|
for (auto& rq : iface.requests) {
|
||||||
|
for (auto& arg : rq.args) {
|
||||||
|
if (!arg.interface.empty()) {
|
||||||
|
HEADER += std::format("\nclass {};", camelize("C_" + arg.interface));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto& rq : iface.events) {
|
||||||
|
for (auto& arg : rq.args) {
|
||||||
|
if (!arg.interface.empty()) {
|
||||||
|
HEADER += std::format("\nclass {};", camelize("C_" + arg.interface));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HEADER += "\n\n#ifndef HYPRWAYLAND_SCANNER_NO_INTERFACES\n";
|
HEADER += "\n\n#ifndef HYPRWAYLAND_SCANNER_NO_INTERFACES\n";
|
||||||
|
|
Loading…
Reference in a new issue