New upstream version 0.4.5
This commit is contained in:
parent
f6dbe63aff
commit
04748e213f
|
|
@ -7,8 +7,35 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: cachix/install-nix-action@v25
|
- name: Install Nix
|
||||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
uses: nixbuild/nix-quick-install-action@v31
|
||||||
|
with:
|
||||||
|
nix_conf: |
|
||||||
|
keep-env-derivations = true
|
||||||
|
keep-outputs = true
|
||||||
|
|
||||||
|
- name: Restore and save Nix store
|
||||||
|
uses: nix-community/cache-nix-action@v6
|
||||||
|
with:
|
||||||
|
# restore and save a cache using this key
|
||||||
|
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
|
||||||
|
# if there's no cache hit, restore a cache by this prefix
|
||||||
|
restore-prefixes-first-match: nix-${{ runner.os }}-
|
||||||
|
# collect garbage until the Nix store size (in bytes) is at most this number
|
||||||
|
# before trying to save a new cache
|
||||||
|
# 1G = 1073741824
|
||||||
|
gc-max-store-size-linux: 1G
|
||||||
|
# do purge caches
|
||||||
|
purge: true
|
||||||
|
# purge all versions of the cache
|
||||||
|
purge-prefixes: nix-${{ runner.os }}-
|
||||||
|
# created more than this number of seconds ago
|
||||||
|
purge-created: 0
|
||||||
|
# or, last accessed more than this number of seconds ago
|
||||||
|
# relative to the start of the `Post Restore and save Nix store` phase
|
||||||
|
purge-last-accessed: 0
|
||||||
|
# except any version with the key that is the same as the `primary-key`
|
||||||
|
purge-primary-key: never
|
||||||
|
|
||||||
# not needed (yet)
|
# not needed (yet)
|
||||||
# - uses: cachix/cachix-action@v12
|
# - uses: cachix/cachix-action@v12
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ configure_package_config_file(
|
||||||
write_basic_package_version_file(
|
write_basic_package_version_file(
|
||||||
"hyprwayland-scanner-config-version.cmake"
|
"hyprwayland-scanner-config-version.cmake"
|
||||||
VERSION "${VERSION}"
|
VERSION "${VERSION}"
|
||||||
|
ARCH_INDEPENDENT
|
||||||
COMPATIBILITY AnyNewerVersion)
|
COMPATIBILITY AnyNewerVersion)
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,11 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1734119587,
|
"lastModified": 1748929857,
|
||||||
"narHash": "sha256-AKU6qqskl0yf2+JdRdD0cfxX4b9x3KKV5RqA6wijmPM=",
|
"narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "3566ab7246670a43abd2ffa913cc62dad9cdf7d5",
|
"rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
default = self.overlays.hyprwayland-scanner;
|
default = self.overlays.hyprwayland-scanner;
|
||||||
hyprwayland-scanner = final: prev: {
|
hyprwayland-scanner = final: prev: {
|
||||||
hyprwayland-scanner = final.callPackage ./nix/default.nix {
|
hyprwayland-scanner = final.callPackage ./nix/default.nix {
|
||||||
stdenv = final.gcc14Stdenv;
|
stdenv = final.gcc15Stdenv;
|
||||||
version = version + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
version = version + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
25
src/main.cpp
25
src/main.cpp
|
|
@ -661,6 +661,10 @@ static const void* {}[] = {{
|
||||||
SOURCE += std::format(" (void*){},\n", REQUEST_NAME);
|
SOURCE += std::format(" (void*){},\n", REQUEST_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((clientCode ? iface.events : iface.requests).empty()) {
|
||||||
|
SOURCE += " nullptr,\n";
|
||||||
|
}
|
||||||
|
|
||||||
SOURCE += "};\n";
|
SOURCE += "};\n";
|
||||||
|
|
||||||
// create events
|
// create events
|
||||||
|
|
@ -712,7 +716,7 @@ void {}::{}({}) {{
|
||||||
if (!pResource)
|
if (!pResource)
|
||||||
return{};{}
|
return{};{}
|
||||||
|
|
||||||
auto proxy = wl_proxy_marshal_flags((wl_proxy*)pResource, {}, {}, wl_proxy_get_version((wl_proxy*)pResource), {}{});{}
|
auto proxy = wl_proxy_marshal_flags(pResource, {}, {}, wl_proxy_get_version(pResource), {}{});{}
|
||||||
}}
|
}}
|
||||||
)#",
|
)#",
|
||||||
ptrRetType, IFACE_CLASS_NAME_CAMEL, EVENT_NAME, argsC, (ev.newIdType.empty() ? "" : " nullptr"),
|
ptrRetType, IFACE_CLASS_NAME_CAMEL, EVENT_NAME, argsC, (ev.newIdType.empty() ? "" : " nullptr"),
|
||||||
|
|
@ -818,7 +822,8 @@ static const wl_message {}[] = {{
|
||||||
// create type table
|
// create type table
|
||||||
const auto TYPE_TABLE_NAME = camelize(std::string{"_"} + "C_" + IFACE_NAME + "_" + rq.name + "_types");
|
const auto TYPE_TABLE_NAME = camelize(std::string{"_"} + "C_" + IFACE_NAME + "_" + rq.name + "_types");
|
||||||
|
|
||||||
SOURCE += std::format(" {{ \"{}\", \"{}\", {}}},\n", rq.name, argsToShort(rq.args, rq.since), rq.args.empty() ? "dummyTypes + 0" : TYPE_TABLE_NAME + " + 0");
|
SOURCE += std::format(" {{ .name = \"{}\", .signature = \"{}\", .types = {}}},\n", rq.name, argsToShort(rq.args, rq.since),
|
||||||
|
rq.args.empty() ? "dummyTypes + 0" : TYPE_TABLE_NAME + " + 0");
|
||||||
}
|
}
|
||||||
|
|
||||||
SOURCE += "};\n";
|
SOURCE += "};\n";
|
||||||
|
|
@ -833,7 +838,8 @@ static const wl_message {}[] = {{
|
||||||
// create type table
|
// create type table
|
||||||
const auto TYPE_TABLE_NAME = camelize(std::string{"_"} + "C_" + IFACE_NAME + "_" + ev.name + "_types");
|
const auto TYPE_TABLE_NAME = camelize(std::string{"_"} + "C_" + IFACE_NAME + "_" + ev.name + "_types");
|
||||||
|
|
||||||
SOURCE += std::format(" {{ \"{}\", \"{}\", {}}},\n", ev.name, argsToShort(ev.args, ev.since), ev.args.empty() ? "dummyTypes + 0" : TYPE_TABLE_NAME + " + 0");
|
SOURCE += std::format(" {{ .name = \"{}\", .signature = \"{}\", .types = {}}},\n", ev.name, argsToShort(ev.args, ev.since),
|
||||||
|
ev.args.empty() ? "dummyTypes + 0" : TYPE_TABLE_NAME + " + 0");
|
||||||
}
|
}
|
||||||
|
|
||||||
SOURCE += "};\n";
|
SOURCE += "};\n";
|
||||||
|
|
@ -842,9 +848,9 @@ static const wl_message {}[] = {{
|
||||||
// iface
|
// iface
|
||||||
SOURCE += std::format(R"#(
|
SOURCE += std::format(R"#(
|
||||||
const wl_interface {} = {{
|
const wl_interface {} = {{
|
||||||
"{}", {},
|
.name = "{}", .version = {},
|
||||||
{}, {},
|
.method_count = {}, .methods = {},
|
||||||
{}, {},
|
.event_count = {}, .events = {},
|
||||||
}};
|
}};
|
||||||
)#",
|
)#",
|
||||||
IFACE_WL_NAME, iface.name, iface.version, iface.requests.size(), (iface.requests.size() > 0 ? MESSAGE_NAME_REQUESTS : "nullptr"),
|
IFACE_WL_NAME, iface.name, iface.version, iface.requests.size(), (iface.requests.size() > 0 ? MESSAGE_NAME_REQUESTS : "nullptr"),
|
||||||
|
|
@ -854,8 +860,8 @@ const wl_interface {} = {{
|
||||||
// protocol body
|
// protocol body
|
||||||
if (!clientCode) {
|
if (!clientCode) {
|
||||||
SOURCE += std::format(R"#(
|
SOURCE += std::format(R"#(
|
||||||
{}::{}(wl_client* client, uint32_t version, uint32_t id) {{
|
{}::{}(wl_client* client, uint32_t version, uint32_t id) :
|
||||||
pResource = wl_resource_create(client, &{}, version, id);
|
pResource(wl_resource_create(client, &{}, version, id)) {{
|
||||||
|
|
||||||
if (!pResource)
|
if (!pResource)
|
||||||
return;
|
return;
|
||||||
|
|
@ -912,8 +918,7 @@ void {}::onDestroyCalled() {{
|
||||||
DTOR_FUNC = "wl_proxy_destroy(pResource)";
|
DTOR_FUNC = "wl_proxy_destroy(pResource)";
|
||||||
|
|
||||||
SOURCE += std::format(R"#(
|
SOURCE += std::format(R"#(
|
||||||
{}::{}(wl_proxy* resource) {{
|
{}::{}(wl_proxy* resource) : pResource(resource) {{
|
||||||
pResource = resource;
|
|
||||||
|
|
||||||
if (!pResource)
|
if (!pResource)
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue