diff --git a/projects/C/osdialog-example/.gitignore b/projects/C/osdialog-example/.gitignore new file mode 100644 index 0000000..ed4e21b --- /dev/null +++ b/projects/C/osdialog-example/.gitignore @@ -0,0 +1,6 @@ +# xmake +.xmake/ +build/ + +# 3rd party +third/ diff --git a/projects/C/osdialog-example/README.md b/projects/C/osdialog-example/README.md new file mode 100644 index 0000000..641b3d1 --- /dev/null +++ b/projects/C/osdialog-example/README.md @@ -0,0 +1 @@ +https://github.com/AndrewBelt/osdialog.git diff --git a/projects/C/osdialog-example/include/osdialog.h b/projects/C/osdialog-example/include/osdialog.h new file mode 120000 index 0000000..ab61ef2 --- /dev/null +++ b/projects/C/osdialog-example/include/osdialog.h @@ -0,0 +1 @@ +../third/osdialog/osdialog.h \ No newline at end of file diff --git a/projects/C/osdialog-example/src/main.c b/projects/C/osdialog-example/src/main.c new file mode 100644 index 0000000..2002311 --- /dev/null +++ b/projects/C/osdialog-example/src/main.c @@ -0,0 +1,18 @@ +#include + +#include "osdialog.h" + +int main(int argc, char const *argv[]) { + int res; + + res = osdialog_message(OSDIALOG_INFO, OSDIALOG_OK, "Info こんにちは"); + printf("Result: %d\n", res); + + res = osdialog_message(OSDIALOG_WARNING, OSDIALOG_OK_CANCEL, "Warning こんにちは"); + printf("Result: %d\n", res); + + res = osdialog_message(OSDIALOG_ERROR, OSDIALOG_YES_NO, "Error こんにちは"); + printf("Result: %d\n", res); + + return 0; +} diff --git a/projects/C/osdialog-example/src/osdialog.c b/projects/C/osdialog-example/src/osdialog.c new file mode 120000 index 0000000..a07f251 --- /dev/null +++ b/projects/C/osdialog-example/src/osdialog.c @@ -0,0 +1 @@ +../third/osdialog/osdialog.c \ No newline at end of file diff --git a/projects/C/osdialog-example/src/osdialog_zenity.c b/projects/C/osdialog-example/src/osdialog_zenity.c new file mode 120000 index 0000000..02c8fd3 --- /dev/null +++ b/projects/C/osdialog-example/src/osdialog_zenity.c @@ -0,0 +1 @@ +../third/osdialog/osdialog_zenity.c \ No newline at end of file diff --git a/projects/C/osdialog-example/xmake.lua b/projects/C/osdialog-example/xmake.lua new file mode 100644 index 0000000..27a6324 --- /dev/null +++ b/projects/C/osdialog-example/xmake.lua @@ -0,0 +1,9 @@ +set_project("osdialog-example") +set_languages("c99") +add_rules("mode.release") + +add_includedirs("include") + +target("osdialog-example") + set_kind("binary") + add_files("src/*.c")