You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

49 lines
2.0 KiB

  1. /*
  2. * libcucul Ruby bindings
  3. * Copyright (c) 2007 Pascal Terjan <pterjan@linuxfr.org>
  4. *
  5. * This library is free software. It comes without any warranty, to
  6. * the extent permitted by applicable law. You can redistribute it
  7. * and/or modify it under the terms of the Do What The Fuck You Want
  8. * To Public License, Version 2, as published by Sam Hocevar. See
  9. * http://sam.zoy.org/wtfpl/COPYING for more details.
  10. */
  11. #include <ruby.h>
  12. #include <cucul.h>
  13. #include "cucul-canvas.h"
  14. static VALUE mCucul;
  15. void Init_cucul()
  16. {
  17. mCucul = rb_define_module("Cucul");
  18. rb_define_const(mCucul, "BLACK", INT2FIX(CUCUL_BLACK));
  19. rb_define_const(mCucul, "BLUE", INT2FIX(CUCUL_BLUE));
  20. rb_define_const(mCucul, "GREEN", INT2FIX(CUCUL_GREEN));
  21. rb_define_const(mCucul, "CYAN", INT2FIX(CUCUL_CYAN));
  22. rb_define_const(mCucul, "RED", INT2FIX(CUCUL_RED));
  23. rb_define_const(mCucul, "MAGENTA", INT2FIX(CUCUL_MAGENTA));
  24. rb_define_const(mCucul, "BROWN", INT2FIX(CUCUL_BROWN));
  25. rb_define_const(mCucul, "LIGHTGRAY", INT2FIX(CUCUL_LIGHTGRAY));
  26. rb_define_const(mCucul, "DARKGRAY", INT2FIX(CUCUL_DARKGRAY));
  27. rb_define_const(mCucul, "LIGHTBLUE", INT2FIX(CUCUL_LIGHTBLUE));
  28. rb_define_const(mCucul, "LIGHTGREEN", INT2FIX(CUCUL_LIGHTGREEN));
  29. rb_define_const(mCucul, "LIGHTCYAN", INT2FIX(CUCUL_LIGHTCYAN));
  30. rb_define_const(mCucul, "LIGHTRED", INT2FIX(CUCUL_LIGHTRED));
  31. rb_define_const(mCucul, "LIGHTMAGENTA", INT2FIX(CUCUL_LIGHTMAGENTA));
  32. rb_define_const(mCucul, "YELLOW", INT2FIX(CUCUL_YELLOW));
  33. rb_define_const(mCucul, "WHITE", INT2FIX(CUCUL_WHITE));
  34. rb_define_const(mCucul, "DEFAULT", INT2FIX(CUCUL_DEFAULT));
  35. rb_define_const(mCucul, "TRANSPARENT", INT2FIX(CUCUL_TRANSPARENT));
  36. rb_define_const(mCucul, "BOLD", INT2FIX(CUCUL_BOLD));
  37. rb_define_const(mCucul, "ITALICS", INT2FIX(CUCUL_ITALICS));
  38. rb_define_const(mCucul, "UNDERLINE", INT2FIX(CUCUL_UNDERLINE));
  39. rb_define_const(mCucul, "BLINK", INT2FIX(CUCUL_BLINK));
  40. Init_cucul_canvas(mCucul);
  41. }