Sha256: 09a85e44a0f4900cda5a1f7ffc14cca428b527ad85bb71d862e8847a874cb253

Contents?: true

Size: 1.46 KB

Versions: 14

Compression:

Stored size: 1.46 KB

Contents

VALUE rb_cWXRect;

namespace RubyWX {
namespace Rect {

VALUE _alloc(VALUE self)
{
    return wrap(new wxRect());
}

/*
 * call-seq:
 *   inspect -> String
 *
 * Human-readable description.
 * ===Return value
 * String
*/
VALUE _inspect(VALUE self)
{
    return rb_sprintf( "%s(%d, %d, %d, %d)",
        rb_obj_classname( self ),
        FIX2INT(_getX(self)),
        FIX2INT(_getY(self)),
        FIX2INT(_getWidth(self)),
        FIX2INT(_getHeight(self)));
}

} // namespace Rect
} // namespace RubyWX


/*
 * call-seq:
 *   hello_world -> String
 *
 * Human-readable description.
 * ===Return value
 * String
*/
VALUE _hello_world(VALUE self)
{
    return rb_sprintf( "%s(%d, %d, %d, %d)",
        rb_obj_classname( self ),
        FIX2INT(_getX(self)),
        FIX2INT(_getY(self)),
        FIX2INT(_getWidth(self)),
        FIX2INT(_getHeight(self)));
}

/* Arrays are ordered, integer-indexed collections of any object.
 * Array indexing starts at 0, as in C or Java.  A negative index is
 * assumed to be relative to the end of the array---that is, an index of -1
 * indicates the last element of the array, -2 is the next to last
 * element in the array, and so on.
 */

void Init_Rect()
{
    using namespace RubyWX::Rect;
    rb_cWXRect = rb_define_class("Rect",rb_cObject);

    rb_define_alloc_func(rb_cWXRect,_alloc);

    rb_define_method(rb_cWXRect,"inspect",RUBY_METHOD_FUNC(_inspect),0);
    rb_define_method(rb_cWXRect,"hello_world",RUBY_METHOD_FUNC(_hello_world),0);

}

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
yard-0.9.24 spec/parser/examples/namespace.cpp.txt
yard-0.9.23 spec/parser/examples/namespace.cpp.txt
yard-0.9.22 spec/parser/examples/namespace.cpp.txt
yard-0.9.21 spec/parser/examples/namespace.cpp.txt
yard-0.9.20 spec/parser/examples/namespace.cpp.txt
yard-0.9.19 spec/parser/examples/namespace.cpp.txt
yard-0.9.16 spec/parser/examples/namespace.cpp.txt
yard-0.9.15 spec/parser/examples/namespace.cpp.txt
yard-0.9.14 spec/parser/examples/namespace.cpp.txt
yard-0.9.13 spec/parser/examples/namespace.cpp.txt
yard-0.9.12 spec/parser/examples/namespace.cpp.txt
yard-0.9.11 spec/parser/examples/namespace.cpp.txt
yard-0.9.10 spec/parser/examples/namespace.cpp.txt
yard-0.9.9 spec/parser/examples/namespace.cpp.txt