[turbine] Make accessor functions take const ref to Context
Some checks are pending
Build / build (push) Waiting to run
Some checks are pending
Build / build (push) Waiting to run
This commit is contained in:
parent
f9512d72e8
commit
c0e96216ae
@ -33,15 +33,15 @@ void setWindowTitle(Context &ctx, ox::StringViewCR title) noexcept;
|
||||
void focusWindow(Context &ctx) noexcept;
|
||||
|
||||
[[nodiscard]]
|
||||
int getScreenWidth(Context &ctx) noexcept;
|
||||
int getScreenWidth(Context const &ctx) noexcept;
|
||||
|
||||
[[nodiscard]]
|
||||
int getScreenHeight(Context &ctx) noexcept;
|
||||
int getScreenHeight(Context const &ctx) noexcept;
|
||||
|
||||
[[nodiscard]]
|
||||
ox::Size getScreenSize(Context &ctx) noexcept;
|
||||
ox::Size getScreenSize(Context const &ctx) noexcept;
|
||||
|
||||
ox::Bounds getWindowBounds(Context &ctx) noexcept;
|
||||
ox::Bounds getWindowBounds(Context const &ctx) noexcept;
|
||||
|
||||
ox::Error setWindowBounds(Context &ctx, ox::Bounds const&bnds) noexcept;
|
||||
|
||||
|
@ -27,19 +27,19 @@ ox::Error initGfx(Context&) noexcept {
|
||||
void setWindowTitle(Context&, ox::StringViewCR) noexcept {
|
||||
}
|
||||
|
||||
int getScreenWidth(Context&) noexcept {
|
||||
int getScreenWidth(Context const&) noexcept {
|
||||
return 240;
|
||||
}
|
||||
|
||||
int getScreenHeight(Context&) noexcept {
|
||||
int getScreenHeight(Context const&) noexcept {
|
||||
return 160;
|
||||
}
|
||||
|
||||
ox::Size getScreenSize(Context&) noexcept {
|
||||
ox::Size getScreenSize(Context const&) noexcept {
|
||||
return {240, 160};
|
||||
}
|
||||
|
||||
ox::Bounds getWindowBounds(Context&) noexcept {
|
||||
ox::Bounds getWindowBounds(Context const&) noexcept {
|
||||
return {0, 0, 240, 160};
|
||||
}
|
||||
|
||||
|
@ -272,25 +272,25 @@ void focusWindow(Context &ctx) noexcept {
|
||||
glfwFocusWindow(ctx.window);
|
||||
}
|
||||
|
||||
int getScreenWidth(Context &ctx) noexcept {
|
||||
int getScreenWidth(Context const &ctx) noexcept {
|
||||
int w = 0, h = 0;
|
||||
glfwGetFramebufferSize(ctx.window, &w, &h);
|
||||
return w;
|
||||
}
|
||||
|
||||
int getScreenHeight(Context &ctx) noexcept {
|
||||
int getScreenHeight(Context const &ctx) noexcept {
|
||||
int w = 0, h = 0;
|
||||
glfwGetFramebufferSize(ctx.window, &w, &h);
|
||||
return h;
|
||||
}
|
||||
|
||||
ox::Size getScreenSize(Context &ctx) noexcept {
|
||||
ox::Size getScreenSize(Context const &ctx) noexcept {
|
||||
int w = 0, h = 0;
|
||||
glfwGetFramebufferSize(ctx.window, &w, &h);
|
||||
return {w, h};
|
||||
}
|
||||
|
||||
ox::Bounds getWindowBounds(Context &ctx) noexcept {
|
||||
ox::Bounds getWindowBounds(Context const &ctx) noexcept {
|
||||
ox::Bounds bnds;
|
||||
glfwGetWindowPos(ctx.window, &bnds.x, &bnds.y);
|
||||
glfwGetWindowSize(ctx.window, &bnds.width, &bnds.height);
|
||||
|
Loading…
x
Reference in New Issue
Block a user