diff options
author | Pixel <pixel@nobis-crew.org> | 2009-11-04 11:56:41 -0800 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2009-11-04 11:59:33 -0800 |
commit | d577d991b97ae2b5ee1af23641bcffc3f83af5b2 (patch) | |
tree | 590639d50205d1bcfaff2a7d2dc6ebf3f373c7ed /iup/test/getcolor.c |
Initial import. Contains the im, cd and iup librairies, and a "working" Makefile for them under linux.
Diffstat (limited to 'iup/test/getcolor.c')
-rwxr-xr-x | iup/test/getcolor.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/iup/test/getcolor.c b/iup/test/getcolor.c new file mode 100755 index 0000000..02ceb8d --- /dev/null +++ b/iup/test/getcolor.c @@ -0,0 +1,28 @@ +#include <stdio.h> +#include <stdlib.h> + +#include "iup.h" +#include "iupcontrols.h" + +void GetColorTest(void) +{ + unsigned char r = 10, g = 100, b = 25; + if (IupGetColor(100, 100, &r, &g, &b)) + printf("RGB = %d, %d, %d Hex=[%.2X%.2X%.2X]\n", r, g, b, r, g, b); +} + + +#ifndef BIG_TEST +int main(int argc, char* argv[]) +{ + IupOpen(&argc, &argv); + + GetColorTest(); + + IupMainLoop(); + + IupClose(); + + return EXIT_SUCCESS; +} +#endif |