Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • 9.0
  • 8.0
  • 7.8
  • 7.6
  • 7.4
  • 7.2
  • 7.0
  • 0.6
  • rosuav/latex-markdown-renderer
  • rxnpatch/rxnpatch
  • marcus/gobject-introspection
  • rxnpatch/8.0
  • rosuav/pre-listening-ports
  • nt-tools
  • rosuav/async-annotations
  • rosuav/pgsql-ssl
  • rxnpatch/rxnpatch-broken/2023-10-06T094250
  • grubba/fdlib
  • grubba/wip/sakura/8.0
  • v8.0.1998
  • v8.0.1996
  • v8.0.1994
  • v8.0.1992
  • v8.0.1990
  • v8.0.1988
  • v8.0.1986
  • rxnpatch/clusters/8.0/2025-04-29T124414
  • rxnpatch/2025-04-29T124414
  • v8.0.1984
  • v8.0.1982
  • v8.0.1980
  • v8.0.1978
  • v8.0.1976
  • v8.0.1974
  • v8.0.1972
  • v8.0.1970
  • v8.0.1968
  • v8.0.1966
  • v8.0.1964
40 results

GDK2.pmod

Blame
  • GDK2.pmod 1002 B
    #pike __REAL_VERSION__
    #require constant(GTK2.Widget)
    
    #define INDEX(x) GTK2[x]
    
    //! @decl import GTK2
    
    //! @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(has_index(GTK2, "Gdk"+what))
        return INDEX("Gdk"+what);
      if(has_index(GTK2, "GDK_"+what))
        return INDEX("GDK_"+what);
      if(has_index(GTK2, "GDK_"+upper_case(GTK2->unsillycaps(what))))
        return INDEX("GDK_"+upper_case(GTK2->unsillycaps(what)));
      return UNDEFINED;
    //   return  GDKSupport[what];
    }