use X11::Protocol; $x = X11::Protocol->new(); $x->init_extension('XC-MISC');
If supported by the server, X11::Protocol will load this module automatically when additional resource IDs are needed via the standard new_rsrc() interface. However, if you anticipate that a program will run for a long time and allocate many resources, it would be a good idea to initialize the extension at startup to verify its existence.
$x->XCMiscGetVersion => ($major, $minor) $x->XCMiscGetXIDRange => ($start_id, $count) $x->XCMiscGetXIDList($count) => ($count, @ids)