mirror of
https://github.com/hyprwm/hyprwayland-scanner.git
synced 2025-01-10 04:39:49 +01:00
add no iface
This commit is contained in:
parent
85f1334c51
commit
b860f59da9
1 changed files with 34 additions and 26 deletions
14
src/main.cpp
14
src/main.cpp
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
bool waylandEnums = false;
|
bool waylandEnums = false;
|
||||||
bool clientCode = false;
|
bool clientCode = false;
|
||||||
|
bool noInterfaces = false;
|
||||||
|
|
||||||
struct SRequestArgument {
|
struct SRequestArgument {
|
||||||
std::string wlType;
|
std::string wlType;
|
||||||
|
@ -761,6 +762,7 @@ void {}::{}({}) {{
|
||||||
const auto MESSAGE_NAME_EVENTS = camelize(std::string{"_"} + "C_" + IFACE_NAME + "_events");
|
const auto MESSAGE_NAME_EVENTS = camelize(std::string{"_"} + "C_" + IFACE_NAME + "_events");
|
||||||
|
|
||||||
// message
|
// message
|
||||||
|
if (!noInterfaces) {
|
||||||
if (iface.requests.size() > 0) {
|
if (iface.requests.size() > 0) {
|
||||||
SOURCE += std::format(R"#(
|
SOURCE += std::format(R"#(
|
||||||
static const wl_message {}[] = {{
|
static const wl_message {}[] = {{
|
||||||
|
@ -793,14 +795,15 @@ static const wl_message {}[] = {{
|
||||||
|
|
||||||
// iface
|
// iface
|
||||||
SOURCE += std::format(R"#(
|
SOURCE += std::format(R"#(
|
||||||
const wl_interface {} = {{
|
const wl_interface {} = {{false
|
||||||
"{}", {},
|
"{}", {},
|
||||||
{}, {},
|
{}, {},
|
||||||
{}, {},
|
{}, {},
|
||||||
}};
|
}};
|
||||||
)#",
|
)#",
|
||||||
IFACE_WL_NAME, iface.name, iface.version, iface.requests.size(), (iface.requests.size() > 0 ? MESSAGE_NAME_REQUESTS : "nullptr"), iface.events.size(),
|
IFACE_WL_NAME, iface.name, iface.version, iface.requests.size(), (iface.requests.size() > 0 ? MESSAGE_NAME_REQUESTS : "nullptr"),
|
||||||
(iface.events.size() > 0 ? MESSAGE_NAME_EVENTS : "nullptr"));
|
iface.events.size(), (iface.events.size() > 0 ? MESSAGE_NAME_EVENTS : "nullptr"));
|
||||||
|
}
|
||||||
|
|
||||||
// protocol body
|
// protocol body
|
||||||
if (!clientCode) {
|
if (!clientCode) {
|
||||||
|
@ -906,6 +909,11 @@ int main(int argc, char** argv, char** envp) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (curarg == "--no-interfaces") {
|
||||||
|
noInterfaces = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (curarg == "--wayland-enums") {
|
if (curarg == "--wayland-enums") {
|
||||||
waylandEnums = true;
|
waylandEnums = true;
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue