hey guys,

i've started porting neko-systools to GTK for linux (and other OSs). In 
contrast to win/mac desktops, GTK has to be initialized once (gtk_init). I'm 
proposing an initialization method in the "misc" module, and a static variable 
in api.c a la:

  > static int _systools_is_initialized = 0;
  > static value misc_initialize() {
  >     if( _systools_is_initialized==0 ) {
  >             systools_misc_initialize(); 
  >             _systools_is_initialized = 1;
  >     }
  >     return val_null;
  > }
  > DEFINE_PRIM(misc_initialize,0);


any systools class requiring initialization would get an __init__ method like:

  >     private static function __init__() : Void {
  >             Misc.initialize();
  >     }


windows and mac's sytools_misc_initialize() would be an empty stub. is that a 
proper way to do this? any thoughts about it? if ok, i'd check this into svn.

-dan

-- 
http://0xDF.com/
http://iterative.org/

-- 
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to