pike.git / lib / modules / GDK.pmod

version» Context lines:

pike.git/lib/modules/GDK.pmod:1:   #pike __REAL_VERSION__    + #if constant(GTK) && constant(GTK.Widget) +    #define INDEX(x) GTK[x]    -  + //! GDK wrapper module. + //! + //! This is a convenience module that is identical to either + //! either the @[GDK2] or the @[GDK1] module depending on + //! which (if any) of them is available. + //! + //! @seealso + //! @[GDK1], @[GDK2] +  + //! @decl import GTK +  + //! @decl constant Atom +    object Atom = class   {    mapping atoms = ([]);       class fake_atom    {    object ra;    string n;    object get_atom()    {
pike.git/lib/modules/GDK.pmod:28:    object `[](string what)    {    if(atoms[what])    return atoms[what];    return atoms[what] = fake_atom( what );    }   }();      mixed `[](string what)   { -  if(what == "_module_value") return ([])[0]; +  if(what == "_module_value") return UNDEFINED;    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))); -  return ([])[0]; +  return UNDEFINED;   // return GDKSupport[what];   } -  +  + #else /* constant(GTK.Widget) */ + constant this_program_does_not_exist=1; + #endif