home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March B / SCO_CASTOR4RRT.iso / uccs / root.14 / udk / usr / add-on / include / sys / window.h < prev   
Encoding:
C/C++ Source or Header  |  1998-08-19  |  5.7 KB  |  163 lines

  1. /*
  2.  * Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved. 
  3.  *                                                                         
  4.  *        THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE               
  5.  *                   SANTA CRUZ OPERATION INC.                             
  6.  *                                                                         
  7.  *   The copyright notice above does not evidence any actual or intended   
  8.  *   publication of such source code.                                      
  9.  */
  10.  
  11. #ident    "@(#)libetitam:sys/window.h    1.1"
  12. /*
  13.     Unix Window System
  14.     User-Level Window Defs
  15.  
  16.  */
  17.  
  18. #ifndef WINDOW_H
  19. #define WINDOW_H
  20.  
  21. /* ioctls    */
  22. #define WIOC        ('W'<<8)
  23. #define WIOCGETD    (WIOC|1)    /* get window data        */
  24. #define WIOCSETD    (WIOC|2)    /* set window data        */
  25. #define WIOCLFONT    (WIOC|3)    /* load window font        */
  26. #define WIOCUFONT    (WIOC|4)    /* unload window font        */
  27. #define WIOCSELECT    (WIOC|5)    /* set keyboard window        */
  28. #define WIOCREAD    (WIOC|6)    /* read whole screen (32k)    */
  29. #define WIOCGETTEXT    (WIOC|7)    /* get window text info        */
  30. #define WIOCSETTEXT    (WIOC|8)    /* set window text info        */
  31. #define WIOCPGRP    (WIOC|9)    /* set window pgrp        */
  32. #define WIOCSYS        (WIOC|10)    /* set system window slot    */
  33. #define WIOCGETMOUSE    (WIOC|11)    /* get mouse info        */
  34. #define WIOCSETMOUSE    (WIOC|12)    /* set mouse info        */
  35. #define WIOCRASTOP    (WIOC|13)    /* user-level rastop        */
  36. #define WIOCGSYS    (WIOC|14)    /* get system window pgrp    */
  37. #define WIOCGCURR    (WIOC|15)    /* get current window number    */
  38. #define WIOCGPREV    (WIOC|16)    /* get previous window number    */
  39.  
  40. /* files, devices                            */
  41. #define WDEV        "/dev/w"    /* individual windows        */
  42. #define WFONT        "/etc/system.ft"/* system font            */
  43.  
  44. /* WIOCGET/SET TEXT params                        */
  45. #define WTXTPROMPT    0        /* prompt line            */
  46. #define WTXTCMD        1        /* command line            */
  47. #define WTXTLABEL    2        /* window label            */
  48. #define WTXTUSER    3        /* user-specific text        */
  49. #define WTXTSLK1    4        /* first of 2 SLK lines        */
  50. #define WTXTSLK2    5        /* second SLK line        */
  51.  
  52. #define WTXTNUM        6        /* there are 6 text slots/win    */
  53. #define WTXTLEN        81        /* each can be 80 chars + null    */
  54.  
  55. /* character attribute masks        */
  56. #define A_UNDERLINE    000000400000L
  57. #define A_REVERSE    000001000000L
  58. #define A_BOLD        000010000000L
  59. #define A_STRIKE    A_BOLD
  60. #define A_DIM        000004000000L
  61.  
  62. /* slots in syswin for WIOCGET/SET SYS                    */
  63. #define SYSWIN        3    /* number of sys wins    */
  64. #define SYSWMGR        0    /* window manager    */
  65. #define SYSPMGR        1    /* telephony manager    */
  66. #define SYSSMGR        2    /* status mgr        */
  67.  
  68. /* rastop source operators    */
  69. #define SRCSRC        0    /* source        */
  70. #define SRCPAT        1    /* pattern        */
  71. #define SRCAND        2    /* source & pattern    */
  72. #define SRCOR        3    /* source | pattern    */
  73. #define SRCXOR        4    /* source ^ pattern    */
  74. #define SRCMAX        4
  75.  
  76. /* rastop destination operators    */
  77. #define DSTSRC        0    /* srcop(src)        */
  78. #define DSTAND        1    /* srcop(src) & dst    */
  79. #define DSTOR        2    /* srcop(src) | dst    */
  80. #define DSTXOR        3    /* srcop(src) ^ dst    */
  81. #define DSTCAM        4    /* ~srcop(src) & dst    */
  82. #define DSTMAX        4
  83.  
  84. /* w_uflags    */
  85. #define NBORDER        0x1    /* borderless        */
  86. #define VCWIDTH        0x2    /* variable chr spacing    */
  87. #define BORDHSCROLL    0x4    /* border hscroll icons    */
  88. #define BORDVSCROLL    0x8    /* border vscroll icons    */
  89. #define BORDHELP    0x10    /* border help patch    */
  90. #define BORDCANCEL    0x20    /* border cancel patch    */
  91. #define BORDRESIZE    0x40    /* border re-size patch    */
  92. #define NBORDMOVE    0x80    /* no border move patch    */
  93. #define UNCOVERED    0x100    /* uncovered (RO)    */
  94. #define KBDWIN        0x200    /* keyboard (RO)    */
  95. #define NOCLEAR        0x400    /* don't clear on create*/
  96. #define NOSETUFLAGS    (UNCOVERED|KBDWIN)
  97.  
  98. /* basic params    */
  99. #define WTXTVS        12        /* text line height (sys font)    */
  100. #define WLINE(n)    ((n-1)*WTXTVS)
  101. #define YTXTPROMPT    WLINE(26)    /* prompts            */
  102. #define YTXTCMD        WLINE(27)    /* command/echo            */
  103. #define YTXTSLK1    WLINE(28)    /* screen labeled keys #1    */
  104. #define YTXTSLK2    WLINE(29)    /* screen labeled keys #2    */
  105.  
  106. #define WINWIDTH    720        /* logical area (for windows)    */
  107. #define WINHEIGHT    (348-4*WTXTVS)
  108.  
  109. struct uwdata                /* user window information    */
  110. {
  111.     unsigned short    uw_x;        /* upper-left-corner x (pixels)    */
  112.     unsigned short    uw_y;        /* upper-left-corner y (pixels)    */
  113.     unsigned short    uw_width;    /* width (pixels)        */
  114.     unsigned short    uw_height;    /* height (pixels)        */
  115.     unsigned short    uw_uflags;    /* various flags (see above)    */
  116.     unsigned char    uw_hs;        /* horizontal size (RO)        */
  117.     unsigned char    uw_vs;        /* vertical size (RO)        */
  118.     unsigned char    uw_baseline;    /* baseline (RO)        */
  119.     unsigned short    uw_cx;        /* current x position (RO)    */
  120.     unsigned short    uw_cy;        /* current y position (RO)    */
  121. };
  122.  
  123. struct utdata                /* user text data        */
  124. {
  125.     short        ut_num;        /* number (see above)        */
  126.     char        ut_text[WTXTLEN]; /* text            */
  127. };
  128.  
  129. #define    MSDOWN        0x1        /* when buttons go down        */
  130. #define MSUP        0x2        /* when buttons go up        */
  131. #define MSIN        0x4        /* when mouse is in rectangle    */
  132. #define MSOUT        0x8        /* when mouse is outside rect    */
  133. #define MSICON        0x10        /* load new mouse icon        */
  134.  
  135. struct umdata                /* user mouse data        */
  136. {
  137.     char        um_flags;    /* wakeup flags            */
  138.     short        um_x;        /* motion rectnalge        */
  139.     short        um_y;
  140.     short        um_w;
  141.     short        um_h;
  142.     struct icon    *um_icon;    /* ptr to icon if MSICON=1    */
  143. };
  144.  
  145. struct urdata                /* user rastop data        */
  146. {
  147.     unsigned short    *ur_srcbase;    /* ptr to source data        */
  148.     unsigned short    ur_srcwidth;    /* number bytes/row        */
  149.     unsigned short    *ur_dstbase;    /* ptr to dest data        */
  150.     unsigned short    ur_dstwidth;    /* number bytes/row        */
  151.     unsigned short    ur_srcx;    /* source x             */
  152.     unsigned short    ur_srcy;    /* source y            */
  153.     unsigned short    ur_dstx;    /* destination x        */
  154.     unsigned short    ur_dsty;    /* destination y        */
  155.     unsigned short    ur_width;    /* width            */
  156.     unsigned short    ur_height;    /* height            */
  157.     unsigned char    ur_srcop;    /* source operation        */
  158.     unsigned char    ur_dstop;    /* destination operation    */
  159.     unsigned short    *ur_pattern;    /* pattern pointer        */
  160. };
  161.  
  162. #endif /*WINDOW_H*/
  163.