Annotation of researchv9/jtools/src/blitblt/buttons.c, revision 1.1

1.1     ! root        1: #include <jerq.h>
        !             2: 
        !             3: #define        UP      0
        !             4: #define        DOWN    1
        !             5: 
        !             6: lbuttons(updown)
        !             7: int updown;
        !             8: {
        !             9:        Rectangle r, s, kbdrect();
        !            10: 
        !            11:        while((button123()!=0) != updown){
        !            12:                checkshape(0);
        !            13:                wait(MOUSE);
        !            14:        }
        !            15: 
        !            16:        switch (button123()) {
        !            17:                case 4:
        !            18:                        return 1;
        !            19:                case 2:
        !            20:                        return 2;
        !            21:                case 1:
        !            22:                        return 3;
        !            23:        }
        !            24:        return 0;
        !            25: }
        !            26: 
        !            27: lexit3()       /* return true if button3 is clicked */
        !            28: {
        !            29:        extern Cursor skull; Cursor *prev; int lexit;
        !            30:        prev=cursswitch(&skull);
        !            31:        lexit=lbuttons(DOWN); lbuttons(UP);
        !            32:        cursswitch(prev);
        !            33:        return(lexit == 3);
        !            34: }

unix.superglobalmegacorp.com

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