Annotation of researchv9/jtools/src/sunlib/t3.c, revision 1.1.1.1

1.1       root        1: /*
                      2:        sliderbar. tests mouse input and rectf
                      3: */
                      4: #include "jerq.h"
                      5: 
                      6: main (argc, argv)
                      7: char **argv;
                      8: {
                      9:        static oldx;
                     10: 
                     11:        request(KBD|MOUSE);
                     12:        initdisplay(argc, argv);
                     13:        for(;;){
                     14:                jnap(1);
                     15:                if(button1()){
                     16:                        if(oldx == mouse.xy.x)
                     17:                                continue;
                     18:                        if(oldx < mouse.xy.x){
                     19:                                rectf(&display, Rect(oldx, Drect.origin.y,
                     20:                                mouse.xy.x, Drect.corner.y), F_XOR);
                     21:                        }
                     22:                        else{
                     23:                                rectf(&display, Rect(mouse.xy.x,
                     24:                                Drect.origin.y, oldx, Drect.corner.y),
                     25:                                F_XOR);
                     26:                        }
                     27:                        oldx = mouse.xy.x;
                     28:                }
                     29:                else if(button23()) {
                     30:                        break;
                     31:                }
                     32:        }
                     33: }
                     34: 

unix.superglobalmegacorp.com

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