added osdialog
example
This commit is contained in:
parent
ec0a08b198
commit
7b56082251
6
projects/C/osdialog-example/.gitignore
vendored
Normal file
6
projects/C/osdialog-example/.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
# xmake
|
||||
.xmake/
|
||||
build/
|
||||
|
||||
# 3rd party
|
||||
third/
|
1
projects/C/osdialog-example/README.md
Normal file
1
projects/C/osdialog-example/README.md
Normal file
@ -0,0 +1 @@
|
||||
https://github.com/AndrewBelt/osdialog.git
|
1
projects/C/osdialog-example/include/osdialog.h
Symbolic link
1
projects/C/osdialog-example/include/osdialog.h
Symbolic link
@ -0,0 +1 @@
|
||||
../third/osdialog/osdialog.h
|
18
projects/C/osdialog-example/src/main.c
Normal file
18
projects/C/osdialog-example/src/main.c
Normal file
@ -0,0 +1,18 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#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;
|
||||
}
|
1
projects/C/osdialog-example/src/osdialog.c
Symbolic link
1
projects/C/osdialog-example/src/osdialog.c
Symbolic link
@ -0,0 +1 @@
|
||||
../third/osdialog/osdialog.c
|
1
projects/C/osdialog-example/src/osdialog_zenity.c
Symbolic link
1
projects/C/osdialog-example/src/osdialog_zenity.c
Symbolic link
@ -0,0 +1 @@
|
||||
../third/osdialog/osdialog_zenity.c
|
9
projects/C/osdialog-example/xmake.lua
Normal file
9
projects/C/osdialog-example/xmake.lua
Normal file
@ -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")
|
Loading…
Reference in New Issue
Block a user