diff options
| author | Tom Black <[email protected]> | 2016-07-17 23:56:42 -0500 |
|---|---|---|
| committer | Tom Black <[email protected]> | 2016-07-17 23:56:42 -0500 |
| commit | 4adfbee49d31cb701663bc60aab4b1197f9afb28 (patch) | |
| tree | 213ee286910ca0b2b4595312fe1a1dbcba8c4d11 /ext | |
| parent | 543de7e0175cd162797415b579a1c7cba7d14f22 (diff) | |
| download | ruby2d-4adfbee49d31cb701663bc60aab4b1197f9afb28.tar.gz ruby2d-4adfbee49d31cb701663bc60aab4b1197f9afb28.zip | |
Add `close` to DSL
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/ruby2d/ruby2d.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/ruby2d/ruby2d.c b/ext/ruby2d/ruby2d.c index 0a727c9..d891c6a 100644 --- a/ext/ruby2d/ruby2d.c +++ b/ext/ruby2d/ruby2d.c @@ -271,6 +271,15 @@ static VALUE ruby2d_show(VALUE s) { /* + * Ruby2D::Window#close + */ +static VALUE ruby2d_close() { + S2D_Close(window); + return Qnil; +} + + +/* * Ruby C extension init */ void Init_ruby2d() { @@ -284,6 +293,9 @@ void Init_ruby2d() { // Ruby2D::Window#show rb_define_method(ruby2d_window_klass, "show", ruby2d_show, 0); + // Ruby2D::Window#close + rb_define_method(ruby2d_window_klass, "close", ruby2d_close, 0); + // Ruby2D::CData c_data_klass = rb_define_class_under(ruby2d_module, "CData", rb_cObject); } |
