home *** CD-ROM | disk | FTP | other *** search
/ Kyūkyoku!! X68000 Emulator / X68000Book.dat / mac / OLS / X68000 / Ko-Window / kow142s.lzh / wsrv / parts.h < prev    next >
C/C++ Source or Header  |  1990-03-17  |  3KB  |  119 lines

  1.  
  2. typedef struct {
  3.         int        x1, y1, x2, y2 ;
  4.     }
  5.         ClipPart ;
  6.  
  7. typedef    struct    {
  8.         ClipPart    clip ;
  9.     }
  10.         ClipClass ;
  11.  
  12.  
  13. #define    DirectionX    1
  14. #define    DirectionY    2
  15.  
  16. typedef    struct    {
  17.         int        dir ;
  18.         int        width ;
  19.         int        length ;
  20.         int        min, max ;
  21.         int        top ;
  22.         int        size ;
  23.     }
  24.         SliderPart ;
  25.  
  26. typedef    struct    {
  27.         ClipPart    clip ;
  28.         SliderPart    slider ;
  29.     }
  30.         SliderClass ;
  31.  
  32.  
  33. typedef    struct    {
  34.         int        step ;
  35.     }
  36.         ScrollerPart ;
  37.  
  38. typedef    struct    {
  39.         ClipPart        clip ;
  40.         SliderPart        slider ;
  41.         ScrollerPart    scroller ;
  42.     }
  43.         ScrollerClass ;
  44.  
  45. typedef    struct    {
  46.         int            maxh, maxv ;
  47.         int            attr ;
  48.         int            font ;
  49.         int            tabgap ;
  50.         int            cx, cy ;
  51.         char        *buf ;
  52.     }
  53.         TextMapPart ;
  54.  
  55. typedef    struct    {
  56.         ClipPart    clip ;
  57.         TextMapPart    text ;
  58.     }
  59.         TextMapClass ;
  60.  
  61. typedef    struct    {
  62.         Sheet    sheet ;
  63.     }
  64.         BitMapPart ;
  65.  
  66. typedef    struct    {
  67.         ClipPart    clip ;
  68.         BitMapPart    bit ;
  69.     }
  70.         BitMapClass ;
  71.  
  72. typedef    struct    {
  73.         int        x, y ;
  74.         char    *str ;
  75.         int        max ;
  76.         int        attr ;
  77.         int        font ;
  78.         int        tabgap ;
  79.         int        cur ;
  80.     }
  81.         InputClass ;
  82.  
  83. /*
  84.     proto -e clip.c slider.c scroller.c textmap.c > temp
  85.     proto -e input.c > temp
  86. */
  87. extern    void    ClipSet( ClipClass*, int, int, int, int );
  88. extern    void    ClipMove( ClipClass*, int, int );
  89. extern    int        ClipInner( ClipClass*, int, int );
  90. extern    void    ClipGetSize( ClipClass*, int*, int* );
  91. extern    int        ClipOverlap( ClipClass*, ClipClass*, ClipClass* );
  92.  
  93. extern    void    SliderSet( SliderClass*, int, int, int, int, int, int, int );
  94. extern    int        SliderGetCurrentPosition( SliderClass* );
  95. extern    int        SliderGetPosition( SliderClass*, int, int );
  96. extern    int        SliderSetPosition( DrawBuf*, SliderClass*, int, int );
  97. extern    int        SliderSetDraw( DrawBuf*, SliderClass* );
  98.  
  99. extern    void    ScrollerSet( ScrollerClass*, int, int, int, int, int, int, int, int );
  100. extern    int        ScrollerGetPosition( ScrollerClass*, int, int );
  101. extern    int        ScrollerSetDraw( DrawBuf*, ScrollerClass* );
  102.  
  103. extern    void    TextMapSet( TextMapClass*, char*, int, int, int, int, int, int );
  104. extern    TextMapClass    *TextMapOpen( int, int, int, int, int, int );
  105. extern    void    TextMapClose( TextMapClass* );
  106. extern    void    TextMapSetAttr( TextMapClass*, int, int, int );
  107. extern    int        TextMapSetDraw( DrawBuf*, TextMapClass*, int, int );
  108. extern    void    TextMapClear( TextMapClass* );
  109. extern    void    TextMapCursor( TextMapClass*, int );
  110. extern    void    TextMapLocate( TextMapClass*, int, int );
  111. extern    int        TextMapPutString( DrawBuf*, TextMapClass*, char* );
  112.  
  113. extern    InputClass    *WindowInputOpen( int, int, char*, int );
  114. extern    void    WindowInputSet( InputClass*, int, int, char*, int );
  115. extern    void    WindowInputClose( InputClass* );
  116. extern    void    WindowInputSetAttr( InputClass*, int, int, int );
  117. extern    int        WindowInputSetDraw( DrawBuf*, InputClass* );
  118. extern    int        WindowInputString( DrawBuf*, InputClass*, int );
  119.