Skip to content

Commit

Permalink
Merge branch 'brutal-org:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Daniel authored Aug 19, 2023
2 parents 2b4715d + 25f9a83 commit b673408
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion sources/libs/brutal-ui/button.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ void ui_button_repaint(UiView *self, Gfx *gfx)
{
if (self->flags & UI_VIEW_ENABLED)
{
gfx_fill_style(gfx, gfx_paint_fill(UI_COLOR_BLUE));
gfx_fill_style(gfx, gfx_paint_fill(UI_COLOR_BASE01));
}
else
{
Expand Down
11 changes: 11 additions & 0 deletions sources/libs/stdc-ansi/stdbool.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once

#ifndef __cplusplus

#define true 1
#define false 0
#define bool _Bool

#endif // __cplusplus

#define __bool_true_false_are_defined 1
4 changes: 2 additions & 2 deletions sources/srvs/window/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ static void wm_server_render_clients(WmServer *self, Gfx *gfx)
}

gfx_stroke_style(gfx, (GfxStroke){.pos = GFX_STOKE_INSIDE, .width = 1});
gfx_fill_style(gfx, gfx_paint_fill(UI_COLOR_BASE02));
gfx_fill_style(gfx, gfx_paint_fill(UI_COLOR_BASE01));
gfx_stroke(gfx);
}
}
Expand All @@ -168,7 +168,7 @@ void wm_server_render(WmServer *self)
gfx_push(gfx);
gfx_clip(gfx, dirty);

gfx_clear(gfx, GFX_GAINSBORO);
gfx_clear(gfx, gfx_hex(0x09090b));

wm_server_render_clients(self, gfx);
wm_server_render_cursor(self, gfx);
Expand Down
2 changes: 1 addition & 1 deletion sources/utils/test/brutal/fmt/format.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
expect_str_equal$(str$(EXPECTED), fmt_str$(test_use_alloc(), str$(FORMAT), __VA_ARGS__)); \
}

test$(fmt_format)
test$(fmt_format, TEST_DISABLED)
{
TEST_CASE("hello, world", "hello, world");
TEST_CASE("hello, world", "hello, {}", "world");
Expand Down
2 changes: 1 addition & 1 deletion sources/utils/test/brutal/fmt/printf.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
expect_str_equal$(str$(EXPECTED), fmt_sprintf(test_use_alloc(), str$(FORMAT), __VA_ARGS__)); \
}

test$(fmt_printf)
test$(fmt_printf, TEST_DISABLED)
{
TEST_CASE("hello world", "hello world", str$("world"));
TEST_CASE("hello world", "hello %s", "world");
Expand Down
6 changes: 3 additions & 3 deletions sources/utils/test/brutal/gfx/path.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

static char const *_logo = "M86 86L43 43L0 0H43H86V43V86ZM43 43L43 0L86 43H43ZM129 86C105.252 86 86 66.7482 86 43C86 19.2518 105.252 0 129 0C152.748 0 172 19.2518 172 43C172 66.7482 152.748 86 129 86ZM107.5 43C107.5 54.8741 117.126 64.5 129 64.5C140.874 64.5 150.5 54.8741 150.5 43C150.5 31.1259 140.874 21.5 129 21.5C117.126 21.5 107.5 31.1259 107.5 43ZM86 129C86 137.505 88.5219 145.818 93.2468 152.89C97.9717 159.961 104.687 165.472 112.545 168.727C120.402 171.981 129.048 172.833 137.389 171.174C145.73 169.515 153.392 165.419 159.406 159.406C165.419 153.392 169.515 145.73 171.174 137.389C172.833 129.048 171.981 120.402 168.727 112.545C165.472 104.687 159.961 97.9717 152.89 93.2468C145.818 88.5219 137.505 86 129 86H86H43V43L0 43L43 86H0V172H86V129ZM86 129H129V86L86 129ZM21.5 150.5V107.5H64.5V150.5H21.5Z";

test$(gfx_fill_path)
test$(gfx_fill_path, TEST_DISABLED)
{
gfx_origin(test_use_gfx(), m_vec2f(64, 64));
gfx_fill_style(test_use_gfx(), gfx_paint_fill(GFX_WHITE));
gfx_fill_svg(test_use_gfx(), str$(_logo), GFX_FILL_EVENODD);
}

test$(gfx_fill_path_rotated)
test$(gfx_fill_path_rotated, TEST_DISABLED)
{
MTrans2 trans = m_trans2_rotate(1 / 16.0);
gfx_origin(test_use_gfx(), m_vec2f(500, 300));
Expand All @@ -21,7 +21,7 @@ test$(gfx_fill_path_rotated)
gfx_fill_svg(test_use_gfx(), str$(_logo), GFX_FILL_EVENODD);
}

test$(gfx_stroke_path)
test$(gfx_stroke_path, TEST_DISABLED)
{
gfx_origin(test_use_gfx(), m_vec2f(64, 64));
gfx_fill_style(test_use_gfx(), gfx_paint_fill(GFX_WHITE));
Expand Down
6 changes: 3 additions & 3 deletions sources/utils/test/brutal/gfx/rect.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
#include <brutal-test>
#include <brutal-ui>

test$(gfx_fill_rect)
test$(gfx_fill_rect, TEST_DISABLED)
{
gfx_fill_style(test_use_gfx(), gfx_paint_fill(UI_COLOR_BASE02));

gfx_fill_rect(test_use_gfx(), m_rectf(10, 10, 512, 50), 0);
}

test$(gfx_fill_rect_rounded)
test$(gfx_fill_rect_rounded, TEST_DISABLED)
{
gfx_fill_style(test_use_gfx(), gfx_paint_fill(UI_COLOR_BASE02));

gfx_fill_rect(test_use_gfx(), m_rectf(10, 10, 512, 50), 32);
}

test$(gfx_fill_rect_gradient)
test$(gfx_fill_rect_gradient, TEST_DISABLED)
{
GfxGradient grad = {
.len = 5,
Expand Down
2 changes: 1 addition & 1 deletion sources/utils/test/brutal/gfx/text.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <brutal-test>
#include <brutal-ui>

test$(gfx_basic_text)
test$(gfx_basic_text, TEST_DISABLED)
{
gfx_fill_style(test_use_gfx(), gfx_paint_fill(UI_COLOR_BASE08));

Expand Down

0 comments on commit b673408

Please sign in to comment.