Modules
ADT Database GTK2 GUI IP PiJAX Public Sql Stdio Subversion System Tools Xosd lua v4l2 wx
Recent Changes
Public.Parser.XML2 1.50
Public.ZeroMQ 1.1
Public.Template.Mustache 1.0
Public.Protocols.XMPP 1.4
Sql.Provider.jdbc 1.0
Popular Downloads
Public.Parser.JSON2 1.0
Public.Parser.JSON 0.2
GTK2 2.23
Public.Web.FCGI 1.8
Public.Parser.XML2 1.48
|
Module Information
GTK2
Viewing contents of GTK2-2.23/GDK2.pmod
#pike __REAL_VERSION__
#if constant(GTK2) && constant(GTK2.Widget)
#define INDEX(x) GTK2[x]
//! @decl import GTK
//! @decl constant Atom
object Atom = class
{
mapping atoms = ([]);
class fake_atom
{
object ra;
string n;
object get_atom()
{
if(ra) return ra;
return ra = GTK2->Gdk_Atom( n, 0 );
}
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)
{
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(GTK2->unsillycaps(what)))))
return INDEX("GDK_"+upper_case(GTK2->unsillycaps(what)));
return UNDEFINED;
// return GDKSupport[what];
}
#else /* constant(GTK2.Widget) */
constant this_program_does_not_exist=1;
#endif
|
|
|