pike.git / lib / modules / Protocols.pmod / X.pmod / Atom.pmod

version» Context lines:

pike.git/lib/modules/Protocols.pmod/X.pmod/Atom.pmod:12:    * but WITHOUT ANY WARRANTY; without even the implied warranty of    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the    * GNU General Public License for more details.    *    * You should have received a copy of the GNU General Public License    * along with this program; if not, write to the Free Software    * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA    */      #pike __REAL_VERSION__ + //! Keep track of X11 atoms      class Atom -  + //!   {    object display;    string name;    int id;       void create(object d /*, int i, string|void n */)    {    display = d;    // id = i;    // name = n;
pike.git/lib/modules/Protocols.pmod/X.pmod/Atom.pmod:75:    {    error( "Atom.pending_intern->handle_reply: InternAtom failed!\n" );    }    atom->name = reply;    display->remember_atom(atom);    if (callback)    callback(atom);    }   }    - /* Keeps track of known atoms. * -  * Is inherited into Xlib.Display */ +    class atom_manager -  + //! Keeps track of known atoms. + //! Is inherited into Xlib.Display   {    mapping(int:object) atoms = ([ ]);    mapping(string:object) atom_table = ([ ]);       /* Defined in Xlib.display */    void send_async_request(object req, function callback);    array blocking_request(object req);       void remember_atom(object atom)    {
pike.git/lib/modules/Protocols.pmod/X.pmod/Atom.pmod:99:    atom_table[atom->name] = atom;    }       object InternAtom_req(string name)    {    object req = .Requests.InternAtom();    req->name = name;    return req;    }    -  /* Looks up the atom in local cache. If it is not present, -  * issue an asyncronous InternAtom request, and return 0 */ +  //! Looks up the atom in local cache. If it is not present, +  //! issue an asyncronous InternAtom request, and return 0    object InternAtom(string name, function|void callback)    {    if (atom_table[name])    return atom_table[name];       object atom = Atom(this);    atom->name = name;       object req = .Requests.InternAtom();    req->name = name;