Annotation of researchv10dc/630/man/src/p_man/man3/pt2win.3l, revision 1.1.1.1

1.1       root        1: .TH PT2WIN 3L "630 MTG"
                      2: .XE "point2window()"
                      3: .SH NAME
                      4: pt2win: point2window \- find process table address of a window
                      5: .SH SYNOPSIS
                      6: .ft B
                      7: #include <dmd.h>
                      8: .br
                      9: Proc \(**point2window (btn)
                     10: .br
                     11: int btn;
                     12: .SH DESCRIPTION
                     13: The
                     14: .I point2window
                     15: function implements the user interface for pointing to windows that
                     16: are used by the Reshape, Move, Top, etc. functions of the 630 MTG
                     17: main button 3 menu.
                     18: .PP
                     19: When
                     20: .I point2window
                     21: is called by an application program,
                     22: the mouse cursor changes to a target icon.
                     23: The function then busy waits for the user to move the mouse
                     24: cursor into a window and press the button specified by \fIbtn\fR.
                     25: When this happens, the mouse cursor will change back to the
                     26: previous mouse cursor, and the process table address of the window
                     27: pointed to will be returned.
                     28: .PP
                     29: The function will return (Proc *)0 if the user either clicks 
                     30: button \fIbtn\fR while the target is over background
                     31: texture or clicks a mouse button other than button \fIbtn\fR.
                     32: .SH EXAMPLE
                     33: The follow subroutine will flash a window pointed to with button 3.
                     34: Note that in the following code, \fIp->layer\fR is equivalent
                     35: to &\fIdisplay\fR for process p and that \fIp->rect\fR is equivalent
                     36: to \fIDrect\fR for process p.
                     37: .PP
                     38: .RS 3
                     39: .nf
                     40: .ft CM
                     41: #include <dmd.h>
                     42: 
                     43: flash()
                     44: {
                     45:        Proc *p;
                     46:        Proc *point2window();
                     47: 
                     48:        p = point2window(3);
                     49:        if(p) {
                     50:                rectf(p->layer, p->rect, F_XOR);
                     51:                nap(20);
                     52:                rectf(p->layer, p->rect, F_XOR);
                     53:        }
                     54: }
                     55: \fR
                     56: .fi
                     57: .RE
                     58: .SH SEE ALSO
                     59: globals(3R), rectf(3R), sleep(3R).

unix.superglobalmegacorp.com

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