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

version» Context lines:

pike.git/lib/modules/Protocols.pmod/X.pmod/Extensions.pmod:17:    *    * 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__      //! an abstract class used to provide features for implimenting   //! X11 extensions. Provides no useful functionality on its own. - protected class extension + class Extension   {    object dpy;    int major, error, event;       void post_init() {}      //! initialize the extension.   //! @param d   //! An object of type Protocols.X.Xlib.Display    int init(object d)
pike.git/lib/modules/Protocols.pmod/X.pmod/Extensions.pmod:56:       }       void handle_event(mapping evnt)    {       }   }      class ScreenSaver +  //!   { -  inherit extension; +  inherit Extension;    constant name = "MIT-SCREEN-SAVER";         }      class Shape -  +  //!   { -  inherit extension; +  inherit Extension;       constant name = "SHAPE";    mapping shape_kind=([ "bounding":0, "clipping":1, "clip":1]);    mapping shape_op=(["set":0,"union":1,"intersect":2,"subtract":3,"invert":4 ]);          void post_init()    {    }    -  +  //!    void ShapeRectangles( object window, int xo, int yo,    string kind, string operation,    object(.Types.Rectangle)|    array(object(.Types.Rectangle)) rectangles )    {    int k = shape_kind[kind];    int o = shape_op[operation];    string rects = (objectp(rectangles)?rectangles->to_string():    (rectangles->to_string())*"");       object req = .Requests.ExtensionRequest( major, 0, 0 );    req->code = 1;    req->data = sprintf("%c%c\0\0%4c%2c%2c%s",o,k,window->id,xo,yo,rects);    dpy->send_request( req );    }    -  +  //!    void ShapeMask( object window, int xo, int yo,    string kind, string operation,    object|void source )    {    int k = shape_kind[kind];    int o = shape_op[operation];       object req = .Requests.ExtensionRequest( major, 0, 0 );    req->code = 2;    req->data =    sprintf("%c%c\0\0%4c%2c%2c%4c",o,k,window->id,xo,yo,source?source->id:0);    dpy->send_request( req );    }      // void ShapeCombine( object window, string kind, string operation,   // array (object) rectangles )   // {   //   // }    -  +  //!    void ShapeOffset( object window, string kind, int xo, int yo )    {    int k = shape_kind[kind];       object req = .Requests.ExtensionRequest( major, 0, 0 );    req->code = 4;    req->data = sprintf("%c\0\0\0%4c%2c%2c", k, window->id, xo, yo);    dpy->send_request( req );    }   
pike.git/lib/modules/Protocols.pmod/X.pmod/Extensions.pmod:152:      // mapping handle_event( mapping evnt )   // {   //   // }   }      //! Provides support for the X11 XTEST extension.   class XTEST   { -  inherit extension; +  inherit Extension;    constant name="XTEST";       mapping event_op = (["KeyPress": 2, "KeyRelease": 3, "ButtonPress": 4,    "ButtonRelease": 5, "MotionNotify": 6]);       //! Create object.    void create() {}       //! Initialize the XTEST extension. Returns 1 if successful.    //!