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