-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hideo-shell: Application can be started and create instances.
- Loading branch information
1 parent
9d424b7
commit e02e49b
Showing
32 changed files
with
174 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#include <grund-bus/api.h> | ||
#include <grund-shell/api.h> | ||
#include <karm-ui/_embed.h> | ||
|
||
namespace Karm::Ui::_Embed { | ||
|
||
Res<Strong<Host>> makeHost(Child) { | ||
notImplemented(); | ||
} | ||
|
||
struct Host : public Ui::ProxyNode<Host> { | ||
Rpc::Endpoint &_endpoint; | ||
Rpc::Port _shell; | ||
Grund::Shell::Api::Instance _instance; | ||
|
||
Host(Child child, Rpc::Endpoint &endpoint, Rpc::Port shell, Grund::Shell::Api::Instance surface) | ||
: Ui::ProxyNode<Host>(std::move(child)), _endpoint(endpoint), _shell(shell), _instance(surface) {} | ||
}; | ||
|
||
Async::Task<> runAsync(Sys::Context &ctx, Child root) { | ||
auto endpoint = Rpc::Endpoint::create(ctx); | ||
auto shell = co_trya$(endpoint.callAsync<Grund::Bus::Api::Locate>(Rpc::Port::BUS, "grund-shell"s)); | ||
auto size = root->size({1024, 720}, Hint::MIN); | ||
auto surface = co_trya$(endpoint.callAsync<Grund::Shell::Api::CreateInstance>(shell, size)); | ||
|
||
auto host = makeStrong<Host>(std::move(root), endpoint, shell, surface); | ||
|
||
while (true) { | ||
auto msg = co_trya$(endpoint.recvAsync()); | ||
logWarn("unsupported event: {}", msg.header()); | ||
} | ||
} | ||
|
||
} // namespace Karm::Ui::_Embed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"$schema": "https://schemas.cute.engineering/stable/cutekit.manifest.component.v1", | ||
"id": "impl-skift.ui", | ||
"type": "lib", | ||
"props": { | ||
"cpp-excluded": true | ||
}, | ||
"enableIf": { | ||
"sys": [ | ||
"skift" | ||
] | ||
}, | ||
"requires": [ | ||
"karm-rpc" | ||
], | ||
"provides": [ | ||
"karm-ui-impl" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
#pragma once | ||
|
||
#include <karm-sys/context.h> | ||
#include <karm-ui/host.h> | ||
|
||
namespace Karm::Ui::_Embed { | ||
|
||
Res<Strong<Host>> makeHost(Child root); | ||
|
||
Async::Task<> runAsync(Sys::Context &ctx, Child root); | ||
|
||
} // namespace Karm::Ui::_Embed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
] | ||
}, | ||
"requires": [ | ||
"grund-base", | ||
"karm-rpc", | ||
"karm-sys" | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"$schema": "https://schemas.cute.engineering/stable/cutekit.manifest.component.v1", | ||
"id": "grund-base", | ||
"type": "lib" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
] | ||
}, | ||
"requires": [ | ||
"grund-base", | ||
"karm-rpc", | ||
"karm-sys" | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
] | ||
}, | ||
"requires": [ | ||
"grund-base", | ||
"karm-rpc", | ||
"karm-sys" | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
] | ||
}, | ||
"requires": [ | ||
"grund-base", | ||
"karm-rpc", | ||
"karm-sys", | ||
"hal" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
] | ||
}, | ||
"requires": [ | ||
"grund-base", | ||
"karm-rpc", | ||
"karm-sys" | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
] | ||
}, | ||
"requires": [ | ||
"grund-base", | ||
"karm-rpc", | ||
"karm-sys" | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
] | ||
}, | ||
"requires": [ | ||
"grund-base", | ||
"karm-rpc", | ||
"karm-sys" | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
] | ||
}, | ||
"requires": [ | ||
"grund-base", | ||
"karm-rpc", | ||
"karm-sys" | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
] | ||
}, | ||
"requires": [ | ||
"grund-base", | ||
"karm-rpc", | ||
"karm-sys" | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
] | ||
}, | ||
"requires": [ | ||
"grund-base", | ||
"karm-rpc", | ||
"karm-sys" | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
#pragma once | ||
|
||
namespace Grund::Shell { | ||
#include <karm-math/vec.h> | ||
#include <karm-rpc/base.h> | ||
|
||
} // namespace Grund::Shell | ||
namespace Grund::Shell::Api { | ||
|
||
using Instance = usize; | ||
|
||
struct CreateInstance { | ||
using Response = Instance; | ||
Math::Vec2i size; | ||
}; | ||
|
||
} // namespace Grund::Shell::Api |
Oops, something went wrong.