X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=src%2Fecore_x%2Frb_ecore_x.c;fp=src%2Fecore_x%2Frb_ecore_x.c;h=c23492c703d7b95f2a765e9876cd4de348fb64bc;hb=810fc05e89fcbdc679cb866b178d6036d1e67235;hp=0000000000000000000000000000000000000000;hpb=773ea0f0b86cf8d4c738d3147eebc9b24f68114a;p=ruby-ecore.git diff --git a/src/ecore_x/rb_ecore_x.c b/src/ecore_x/rb_ecore_x.c new file mode 100644 index 0000000..c23492c --- /dev/null +++ b/src/ecore_x/rb_ecore_x.c @@ -0,0 +1,54 @@ +/* + * $Id: rb_ecore_x.c 39 2004-07-25 13:13:57Z tilman $ + * + * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include + +#include + +#include "../ecore/rb_ecore.h" +#include "rb_ecore_x.h" +#include "rb_window.h" + +#ifdef DEBUG +static VALUE m_init (VALUE self) +{ + return INT2FIX (ecore_x_init ()); +} + +static VALUE m_shutdown (VALUE self) +{ + return INT2FIX (ecore_x_shutdown ()); +} +#endif + +void Init_ecore_x (void) +{ + rb_require ("ecore"); + + mX = rb_define_module_under (mEcore, "X"); + +#ifdef DEBUG + rb_define_module_function (mx, "init", m_init, 0); + rb_define_module_function (mx, "shutdown", m_shutdown, 0); +#endif + + Init_Window (); +} +