Branch: Tag:

2000-03-10

2000-03-10 04:49:47 by Per Hedbor <ph@opera.com>

No need to inherit GTK, just index it instead.. Works better (at least right now)

Rev: lib/modules/GDK.pmod:1.7

1: - inherit GTK; - #define INDEX(x) predef::`->(this_object(),(x)) + #define INDEX(x) GTK[x]      object Atom = class   {
12:    object get_atom()    {    if(ra) return ra; -  return ra = Gdk_Atom( n, 0 ); +  return ra = GTK->Gdk_Atom( n, 0 );    }    string get_name()    {
35:   mixed `[](string what)   {    if(what == "_module_value") return ([])[0]; -  +     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); -  if(!zero_type(INDEX("GDK_"+upper_case(GTK.unsillycaps(what))))) -  return INDEX("GDK_"+upper_case(GTK.unsillycaps(what))); +  if(!zero_type(INDEX("GDK_"+upper_case(GTK->unsillycaps(what))))) +  return INDEX("GDK_"+upper_case(GTK->unsillycaps(what)));    return ([])[0];   // return GDKSupport[what];   }