Annotation of 43BSDTahoe/new/X/CLUlib/vax/x_pixmap.clu, revision 1.1

1.1     ! root        1: % Copyright    Barbara Liskov    1985
        !             2: 
        !             3: x_pixmap = cluster is none, create, create_xy, create_z, tile, destroy, shape,
        !             4:                      get_id, equal, similar, copy
        !             5: 
        !             6: rep = int
        !             7: 
        !             8: none = proc () returns (cvt)
        !             9:     return(0)
        !            10:     end none
        !            11: 
        !            12: create = proc (mask: x_bitmap, fore, back: int) returns (cvt)
        !            13:           signals (error(string))
        !            14:     or: oreq, er: ereq := x_buf$get()
        !            15:     er.code := x_makepixmap
        !            16:     lr(er).l0 := b2i(mask)
        !            17:     er.s2 := fore
        !            18:     or.s3 := back
        !            19:     x_buf$receive()
        !            20:        resignal error
        !            21:     return(x_buf$get_lp0())
        !            22:     end create
        !            23: 
        !            24: create_xy = proc (width, height: int, bits: _wordvec) returns (cvt)
        !            25:              signals (error(string))
        !            26:     or: oreq, er: ereq := x_buf$get()
        !            27:     er.code := x_storepixmap + (XYFormat * 2**8)
        !            28:     er.s0 := height
        !            29:     or.s1 := width
        !            30:     x_buf$send_data(w2b(bits), 1,
        !            31:                    ((width + 15) / 16) * height * 2 * x_display$planes())
        !            32:     x_buf$receive()
        !            33:        resignal error
        !            34:     return(x_buf$get_lp0())
        !            35:     end create_xy
        !            36: 
        !            37: create_z = proc (width, height: int, bits: _wordvec) returns (cvt)
        !            38:             signals (error(string))
        !            39:     or: oreq, er: ereq := x_buf$get()
        !            40:     er.code := x_storepixmap + (ZFormat * 2**8)
        !            41:     er.s0 := height
        !            42:     or.s1 := width
        !            43:     z: int := width * height
        !            44:     if x_display$planes() > 8
        !            45:        then z := z + z end
        !            46:     x_buf$send_data(w2b(bits), 1, z)
        !            47:     x_buf$receive()
        !            48:        resignal error
        !            49:     return(x_buf$get_lp0())
        !            50:     end create_z
        !            51: 
        !            52: tile = proc (pixel: int) returns (cvt) signals (error(string))
        !            53:     or: oreq, er: ereq := x_buf$get()
        !            54:     er.code := x_makepixmap
        !            55:     lr(er).l0 := 0
        !            56:     er.s2 := pixel
        !            57:     x_buf$receive()
        !            58:        resignal error
        !            59:     return(x_buf$get_lp0())
        !            60:     end tile
        !            61: 
        !            62: destroy = proc (pix: cvt)
        !            63:     or: oreq, er: ereq := x_buf$get()
        !            64:     er.code := x_freepixmap
        !            65:     lr(er).l0 := pix
        !            66:     end destroy
        !            67: 
        !            68: shape = proc (width, height: int) returns (int, int) signals (error(string))
        !            69:     or: oreq, er: ereq := x_buf$get()
        !            70:     er.code := x_queryshape + (TileShape * 2**8)
        !            71:     er.s0 := height
        !            72:     or.s1 := width
        !            73:     x_buf$receive()
        !            74:        resignal error
        !            75:     return(x_buf$get_sp1(), x_buf$get_sp0())
        !            76:     end shape
        !            77: 
        !            78: get_id = proc (pix: cvt) returns (int)
        !            79:     return(pix)
        !            80:     end get_id
        !            81: 
        !            82: equal = proc (pix1, pix2: cvt) returns (bool)
        !            83:     return(pix1 = pix2)
        !            84:     end equal
        !            85: 
        !            86: similar = proc (pix1, pix2: cvt) returns (bool)
        !            87:     return(pix1 = pix2)
        !            88:     end similar
        !            89: 
        !            90: copy = proc (pix: cvt) returns (cvt)
        !            91:     return(pix)
        !            92:     end copy
        !            93: 
        !            94: end x_pixmap

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.