Changeset 2077 for libcaca/trunk/ruby
- Timestamp:
- Nov 26, 2007, 8:07:52 AM (13 years ago)
- Location:
- libcaca/trunk/ruby
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/ruby/caca.c
r2019 r2077 16 16 #include "caca-event.h" 17 17 18 static VALUE get_version(VALUE self) 19 { 20 return rb_str_new2(caca_get_version()); 21 } 22 18 23 void Init_caca() 19 24 { 20 25 VALUE mCaca = rb_define_module("Caca"); 21 26 27 rb_define_singleton_method(mCaca, "version", get_version, 0); 28 22 29 Init_caca_display(mCaca); 23 30 Init_caca_event(mCaca); -
libcaca/trunk/ruby/cucul.c
r2008 r2077 17 17 #include "cucul-font.h" 18 18 19 static VALUE get_version(VALUE self) 20 { 21 return rb_str_new2(cucul_get_version()); 22 } 23 19 24 void Init_cucul() 20 25 { 21 26 VALUE mCucul = rb_define_module("Cucul"); 27 28 rb_define_singleton_method(mCucul, "version", get_version, 0); 22 29 23 30 rb_define_const(mCucul, "BLACK", INT2FIX(CUCUL_BLACK)); -
libcaca/trunk/ruby/ruby-caca.dox
r2048 r2077 25 25 irb(main):007:2> end 26 26 irb(main):008:1> end 27 \endcode 27 28 28 irb(main):009:0> Caca::Display.my_instance_methods 29 \code 30 irb(main):009:0> Caca.my_methods 31 => ["version"] 32 \endcode 33 34 \code 35 irb(main):010:0> Caca::Display.my_instance_methods 29 36 => ["get_event", "height", "mouse=", "mouse_x", "mouse_y", "refresh", 30 37 "set_mouse", "set_time", "set_title", "time", "time=", "title=", "width"] … … 32 39 33 40 \code 34 irb(main):01 0:0> Caca::Event.constants41 irb(main):011:0> Caca::Event.constants 35 42 => ["Key", "Quit", "TYPE", "Mouse", "Resize"] 36 43 \endcode 37 44 38 45 \code 39 irb(main):01 1:0> Caca::Event.my_instance_methods46 irb(main):012:0> Caca::Event.my_instance_methods 40 47 => ["quit?"] 41 48 \endcode 42 49 43 50 \code 44 irb(main):01 2:0> Caca::Event::Key.my_instance_methods51 irb(main):013:0> Caca::Event::Key.my_instance_methods 45 52 => ["ch", "utf32", "utf8"] 46 53 \endcode 47 54 48 55 \code 49 irb(main):01 3:0> Caca::Event::Mouse.my_instance_methods56 irb(main):014:0> Caca::Event::Mouse.my_instance_methods 50 57 => ["button", "x", "y"] 51 58 \endcode 52 59 53 60 \code 54 irb(main):01 4:0> Caca::Event::Resize.my_instance_methods61 irb(main):015:0> Caca::Event::Resize.my_instance_methods 55 62 => ["w", "h"] 56 63 \endcode -
libcaca/trunk/ruby/ruby-cucul.dox
r2048 r2077 21 21 irb(main):007:2> end 22 22 irb(main):008:1> end 23 \endcode 23 24 25 \code 24 26 irb(main):009:0> Cucul.constants 25 27 => ["BROWN", "BOLD", "GREEN", "LIGHTMAGENTA", "LIGHTBLUE", "BLINK", … … 30 32 31 33 \code 32 irb(main):010:0> Cucul::Canvas.my_methods 34 irb(main):010:0> Cucul.my_methods 35 => ["version"] 36 \endcode 37 38 \code 39 irb(main):011:0> Cucul::Canvas.my_methods 33 40 => ["export_list", "import_list"] 34 41 \endcode 35 42 36 43 \code 37 irb(main):0 03:0> Cucul::Canvas.my_instance_methods44 irb(main):012:0> Cucul::Canvas.my_instance_methods 38 45 => ["attr=", "blit", "clear", "create_frame", "cursor_x", "cursor_y", 39 46 "dither_bitmap", "draw_box", "draw_circle", "draw_cp437_box", "draw_ellipse", … … 52 59 53 60 \code 54 irb(main):0 04:0> Cucul::Font.my_methods61 irb(main):013:0> Cucul::Font.my_methods 55 62 => ["list"] 56 63 \endcode 57 64 58 65 \code 59 irb(main):0 05:0> Cucul::Font.my_instance_methods66 irb(main):014:0> Cucul::Font.my_instance_methods 60 67 => ["blocks", "height", "width"] 61 68 \endcode 62 69 63 70 \code 64 irb(main):0 06:0> Cucul::Dither.my_instance_methods71 irb(main):015:0> Cucul::Dither.my_instance_methods 65 72 => ["algorithm=", "algorithm_list", "antialias=", "antialias_list", 66 73 "brightness=", "charset=", "charset_list", "color=", "color_list",
Note: See TracChangeset
for help on using the changeset viewer.