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.

пре 17 година
пре 17 година
пре 17 година
пре 17 година
пре 17 година
пре 17 година
пре 17 година
пре 17 година
пре 17 година
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. #include "cucul-dither.h"
  15. #include "cucul-font.h"
  16. void Init_cucul()
  17. {
  18. VALUE mCucul = rb_define_module("Cucul");
  19. rb_define_const(mCucul, "BLACK", INT2FIX(CUCUL_BLACK));
  20. rb_define_const(mCucul, "BLUE", INT2FIX(CUCUL_BLUE));
  21. rb_define_const(mCucul, "GREEN", INT2FIX(CUCUL_GREEN));
  22. rb_define_const(mCucul, "CYAN", INT2FIX(CUCUL_CYAN));
  23. rb_define_const(mCucul, "RED", INT2FIX(CUCUL_RED));
  24. rb_define_const(mCucul, "MAGENTA", INT2FIX(CUCUL_MAGENTA));
  25. rb_define_const(mCucul, "BROWN", INT2FIX(CUCUL_BROWN));
  26. rb_define_const(mCucul, "LIGHTGRAY", INT2FIX(CUCUL_LIGHTGRAY));
  27. rb_define_const(mCucul, "DARKGRAY", INT2FIX(CUCUL_DARKGRAY));
  28. rb_define_const(mCucul, "LIGHTBLUE", INT2FIX(CUCUL_LIGHTBLUE));
  29. rb_define_const(mCucul, "LIGHTGREEN", INT2FIX(CUCUL_LIGHTGREEN));
  30. rb_define_const(mCucul, "LIGHTCYAN", INT2FIX(CUCUL_LIGHTCYAN));
  31. rb_define_const(mCucul, "LIGHTRED", INT2FIX(CUCUL_LIGHTRED));
  32. rb_define_const(mCucul, "LIGHTMAGENTA", INT2FIX(CUCUL_LIGHTMAGENTA));
  33. rb_define_const(mCucul, "YELLOW", INT2FIX(CUCUL_YELLOW));
  34. rb_define_const(mCucul, "WHITE", INT2FIX(CUCUL_WHITE));
  35. rb_define_const(mCucul, "DEFAULT", INT2FIX(CUCUL_DEFAULT));
  36. rb_define_const(mCucul, "TRANSPARENT", INT2FIX(CUCUL_TRANSPARENT));
  37. rb_define_const(mCucul, "BOLD", INT2FIX(CUCUL_BOLD));
  38. rb_define_const(mCucul, "ITALICS", INT2FIX(CUCUL_ITALICS));
  39. rb_define_const(mCucul, "UNDERLINE", INT2FIX(CUCUL_UNDERLINE));
  40. rb_define_const(mCucul, "BLINK", INT2FIX(CUCUL_BLINK));
  41. Init_cucul_canvas(mCucul);
  42. Init_cucul_dither(mCucul);
  43. Init_cucul_font(mCucul);
  44. }