Changeset 2021
- Timestamp:
- Nov 18, 2007, 10:44:10 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/ruby/README
r2009 r2021 1 1 /* $Id$ */ /** \page libcaca-ruby Libcaca ruby bindings 2 2 3 This a Ruby binding for libcucul , libcaca will be added later.3 This a Ruby binding for libcucul and libcaca. 4 4 5 5 There is no real documentation but "methods" on any object should help you :) 6 6 7 The objects availableare :7 The classes available for libcucul are : 8 8 9 9 - Cucul::Canvas (functions that have a cucul_canvas_t* as first argument) … … 13 13 - Cucul::Font (functions that have a cucul_font_t* as first argument) 14 14 * The constructor can currently only accept the name of a builtin font 15 16 The classes available for libcaca are : 17 18 - Caca::Display 19 - Caca::Event 20 - Caca::Event::Key 21 - Caca::Event::Key::Press 22 - Caca::Event::Key::Release 23 - Caca::Event::Mouse 24 - Caca::Event::Mouse::Press 25 - Caca::Event::Mouse::Release 26 - Caca::Event::Mouse::Motion 27 - Caca::Event::Resize 28 - Caca::Event::Quit 15 29 16 30 The character set conversion functions are not available yet in the binding. … … 43 57 Cucul::Canvas.ancestors[1].instance_methods 44 58 => ["attr=", "blit", "clear", "create_frame", "cursor_x", "cursor_y", 45 "d raw_box", "draw_circle", "draw_cp437_box", "draw_ellipse",59 "dither_bitmap", "draw_box", "draw_circle", "draw_cp437_box", "draw_ellipse", 46 60 "draw_line", "draw_polyline", "draw_thin_box", "draw_thin_ellipse", 47 61 "draw_thin_line", "draw_thin_polyline", "draw_thin_triangle", … … 79 93 \endcode 80 94 95 \code 96 irb(main):007:0> Caca::Display.instance_methods.sort - 97 Caca::Display.ancestors[1].instance_methods 98 => ["get_event", "height", "mouse=", "mouse_x", "mouse_y", "refresh", 99 "set_mouse", "set_time", "set_title", "time", "time=", "title=", "width"] 100 \endcode 101 102 \code 103 irb(main):008:0> Caca::Event.constants 104 => ["Key", "Quit", "TYPE", "Mouse", "Resize"] 105 \endcode 106 107 \code 108 irb(main):009:0> Caca::Event::Key.instance_methods - Caca::Event::Key.ancestors[1].instance_methods 109 => ["ch", "utf32", "utf8"] 110 \endcode 111 112 \code 113 irb(main):010:0> Caca::Event::Key.instance_methods - Caca::Event::Mouse.ancestors[1].instance_methods 114 => ["ch", "utf32", "utf8"] 115 \endcode 116 117 \code 118 irb(main):011:0> Caca::Event::Mouse.instance_methods - Caca::Event::Mouse.ancestors[1].instance_methods 119 => ["button", "x", "y"] 120 \endcode 121 122 \code 123 irb(main):018:0> Caca::Event::Resize.instance_methods - Caca::Event::Resize.ancestors[1].instance_methods 124 => ["w", "h"] 125 \endcode 126 81 127 And here are sample uses : 82 128 … … 112 158 \endcode 113 159 160 And now a real one: 161 162 \code 163 require 'caca' 164 d = Caca::Display.new(Cucul::Canvas.new(20,10)) 165 d.title = "Test !" 166 while((e = d.get_event(Caca::Event, -1)) && 167 ! e.kind_of?(Caca::Event::Quit)) 168 p e 169 d.refresh 170 end 171 \endcode 172 114 173 */
Note: See TracChangeset
for help on using the changeset viewer.