Skip to content

Commit

Permalink
start working on a ui
Browse files Browse the repository at this point in the history
  • Loading branch information
annacrombie committed Dec 4, 2024
1 parent e214858 commit 0256ee8
Show file tree
Hide file tree
Showing 12 changed files with 2,209 additions and 0 deletions.
13 changes: 13 additions & 0 deletions include/ui.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* SPDX-FileCopyrightText: Stone Tickle <[email protected]>
* SPDX-License-Identifier: GPL-3.0-only
*/

#ifndef MUON_UI_H
#define MUON_UI_H

#include <stdbool.h>

bool ui_main(void);

#endif
1,016 changes: 1,016 additions & 0 deletions include/ui/IconsFontAwesome5.h

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions include/ui/imconfig.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/*
* SPDX-FileCopyrightText: Stone Tickle <[email protected]>
* SPDX-License-Identifier: GPL-3.0-only
*/
9 changes: 9 additions & 0 deletions include/ui/inspector.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* SPDX-FileCopyrightText: Stone Tickle <[email protected]>
* SPDX-License-Identifier: GPL-3.0-only
*/

#ifndef MUON_UI_INSPECTOR_H
#define MUON_UI_INSPECTOR_H
void ui_inspector_window(void);
#endif
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ project(
'warning_level': '3',
'buildtype': 'debug',
'default_library': 'static',
'cpp_std': 'c++11',
},
)

Expand Down
5 changes: 5 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,8 @@ option(
type: 'string',
value: 'https://git.sr.ht/~lattis/meson-tests',
)
option(
'ui',
type: 'feature',
value: 'disabled',
)
12 changes: 12 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "platform/path.h"
#include "platform/run_cmd.h"
#include "tracy.h"
#include "ui.h"
#include "version.h"
#include "vsenv.h"

Expand Down Expand Up @@ -1088,6 +1089,16 @@ cmd_meson(uint32_t argc, uint32_t argi, char *const argv[])
return res;
}

static bool
cmd_ui(uint32_t argc, uint32_t argi, char *const argv[])
{
OPTSTART("") {
}
OPTEND(argv[argi], "", "", 0, 0);

return ui_main();
}

static bool
cmd_main(uint32_t argc, uint32_t argi, char *argv[])
{
Expand All @@ -1107,6 +1118,7 @@ cmd_main(uint32_t argc, uint32_t argi, char *argv[])
{ "subprojects", cmd_subprojects, "manage subprojects" },
{ "summary", cmd_summary, "print a configured project's summary" },
{ "test", cmd_test, "run tests" },
{ "ui", cmd_ui, "ui" },
{ "version", cmd_version, "print version information" },
{ 0 },
};
Expand Down
6 changes: 6 additions & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,9 @@ src += script_sources
subdir('external')
src += dep_sources
deps += external_deps

if get_option('ui').enabled()
subdir('ui')
else
src += files('ui_null.c')
endif
Loading

0 comments on commit 0256ee8

Please sign in to comment.