a580e12000-09-27Fredrik Hübinette (Hubbe) #pike __REAL_VERSION__
a20af62000-09-26Fredrik Hübinette (Hubbe) 
a2ae782003-10-10Henrik Grubbström (Grubba) #if constant(GTK.Widget)
379c0b2001-06-10Henrik Grubbström (Grubba) 
7f663a2000-03-10Per Hedbor #define INDEX(x) GTK[x]
3c8bb61999-11-07Per Hedbor 
cbe40e2003-11-11Henrik Grubbström (Grubba) //! @decl import GTK
7f663a2000-03-10Per Hedbor object Atom = class
3c8bb61999-11-07Per Hedbor { mapping atoms = ([]); class fake_atom { object ra; string n; object get_atom() { if(ra) return ra;
7f663a2000-03-10Per Hedbor  return ra = GTK->Gdk_Atom( n, 0 );
3c8bb61999-11-07Per Hedbor  } string get_name() { return get_atom()->get_name(); } void create(string q) { n = q; } } object `[](string what) { if(atoms[what]) return atoms[what]; return atoms[what] = fake_atom( what ); } }(); mixed `[](string what) {
f2d7a62002-02-14Martin Nilsson  if(what == "_module_value") return UNDEFINED;
3c8bb61999-11-07Per Hedbor  if(what == "Atom") return Atom; if(!zero_type(INDEX("Gdk"+what))) return INDEX("Gdk"+what); if(!zero_type(INDEX("GDK_"+what))) return INDEX("GDK_"+what);
7f663a2000-03-10Per Hedbor  if(!zero_type(INDEX("GDK_"+upper_case(GTK->unsillycaps(what))))) return INDEX("GDK_"+upper_case(GTK->unsillycaps(what)));
f2d7a62002-02-14Martin Nilsson  return UNDEFINED;
bdf3c11999-12-08Per Hedbor // return GDKSupport[what];
3c8bb61999-11-07Per Hedbor }
379c0b2001-06-10Henrik Grubbström (Grubba) 
a2ae782003-10-10Henrik Grubbström (Grubba) #endif /* constant(GTK.Widget) */