diff options
author | wm4 <wm4@nowhere> | 2015-01-01 23:07:46 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-01 23:08:15 +0100 |
commit | da4f7225796037b814919e79912cfaa7a9ddc113 (patch) | |
tree | 74b3ed6bcfdc5648ab03dcd656f67f7720610392 /DOCS/client_api_examples | |
parent | 9aa1d711479d4892e7f3c528dd48aad91f8a63de (diff) |
DOCS/client_api_examples: move all examples into their own subdirs
Also get rid of shared.h; it actually doesn't have much value. Just copy
the tiny function it contained into the 2 files which used it.
Diffstat (limited to 'DOCS/client_api_examples')
-rw-r--r-- | DOCS/client_api_examples/cocoa/cocoabasic.m (renamed from DOCS/client_api_examples/cocoabasic.m) | 14 | ||||
-rw-r--r-- | DOCS/client_api_examples/qt/qtexample.cpp (renamed from DOCS/client_api_examples/qtexample.cpp) | 0 | ||||
-rw-r--r-- | DOCS/client_api_examples/qt/qtexample.h (renamed from DOCS/client_api_examples/qtexample.h) | 0 | ||||
-rw-r--r-- | DOCS/client_api_examples/qt/qtexample.pro (renamed from DOCS/client_api_examples/qtexample.pro) | 0 | ||||
-rw-r--r-- | DOCS/client_api_examples/shared.h | 10 | ||||
-rw-r--r-- | DOCS/client_api_examples/simple/simple.c (renamed from DOCS/client_api_examples/simple.c) | 9 |
6 files changed, 20 insertions, 13 deletions
diff --git a/DOCS/client_api_examples/cocoabasic.m b/DOCS/client_api_examples/cocoa/cocoabasic.m index 9c3d23ef57..74f8f2e864 100644 --- a/DOCS/client_api_examples/cocoabasic.m +++ b/DOCS/client_api_examples/cocoa/cocoabasic.m @@ -3,8 +3,18 @@ // but that's not quite ready yet. // You may need a basic Info.plist and MainMenu.xib to make this work. -#include "../../libmpv/client.h" -#include "shared.h" +#include "libmpv/client.h" + +#include <stdio.h> +#include <stdlib.h> + +static inline void check_error(int status) +{ + if (status < 0) { + printf("mpv API error: %s\n", mpv_error_string(status)); + exit(1); + } +} #import <Cocoa/Cocoa.h> diff --git a/DOCS/client_api_examples/qtexample.cpp b/DOCS/client_api_examples/qt/qtexample.cpp index 756c206916..756c206916 100644 --- a/DOCS/client_api_examples/qtexample.cpp +++ b/DOCS/client_api_examples/qt/qtexample.cpp diff --git a/DOCS/client_api_examples/qtexample.h b/DOCS/client_api_examples/qt/qtexample.h index f59738cfbd..f59738cfbd 100644 --- a/DOCS/client_api_examples/qtexample.h +++ b/DOCS/client_api_examples/qt/qtexample.h diff --git a/DOCS/client_api_examples/qtexample.pro b/DOCS/client_api_examples/qt/qtexample.pro index 40a4d964e2..40a4d964e2 100644 --- a/DOCS/client_api_examples/qtexample.pro +++ b/DOCS/client_api_examples/qt/qtexample.pro diff --git a/DOCS/client_api_examples/shared.h b/DOCS/client_api_examples/shared.h deleted file mode 100644 index 027c03f1e9..0000000000 --- a/DOCS/client_api_examples/shared.h +++ /dev/null @@ -1,10 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -static inline void check_error(int status) -{ - if (status < 0) { - printf("mpv API error: %s\n", mpv_error_string(status)); - exit(1); - } -} diff --git a/DOCS/client_api_examples/simple.c b/DOCS/client_api_examples/simple/simple.c index 6dbc40506a..62fc9e8061 100644 --- a/DOCS/client_api_examples/simple.c +++ b/DOCS/client_api_examples/simple/simple.c @@ -3,7 +3,14 @@ #include <stdlib.h> #include "libmpv/client.h" -#include "shared.h" + +static inline void check_error(int status) +{ + if (status < 0) { + printf("mpv API error: %s\n", mpv_error_string(status)); + exit(1); + } +} int main(int argc, char *argv[]) { |