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.
 
 
 
 
 
 

32 regels
790 B

  1. /*
  2. * libcaca 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 <caca.h>
  13. #include "caca-display.h"
  14. #include "caca-event.h"
  15. static VALUE get_version(VALUE self)
  16. {
  17. return rb_str_new2(caca_get_version());
  18. }
  19. void Init_caca()
  20. {
  21. VALUE mCaca = rb_define_module("Caca");
  22. rb_define_singleton_method(mCaca, "version", get_version, 0);
  23. Init_caca_display(mCaca);
  24. Init_caca_event(mCaca);
  25. }