PreviousUpNext

15.3.760  src/lib/x-kit/xclient/src/window/draw-imp-old.api

## draw-imp-old.api
#
# The newworld replacements for this api are:
#
#     src/lib/x-kit/xclient/src/window/xserver-ximp.api
#     src/lib/x-kit/xclient/src/window/windowsystem-to-xserver.pkg

# Compiled by:
#     src/lib/x-kit/xclient/xclient-internals.sublib


# Compiled by:
#     src/lib/x-kit/xclient/xclient-internals.sublib


# This api is implemented in:
#
#     src/lib/x-kit/xclient/src/window/draw-imp-old.pkg

stipulate
    include package   threadkit;                        # threadkit                             is from   src/lib/src/lib/thread-kit/src/core-thread-kit/threadkit.pkg
    #
    package g2d =  geometry2d;                          # geometry2d                            is from   src/lib/std/2d/geometry2d.pkg
    package p2g =  pen_to_gcontext_imp_old;             # pen_to_gcontext_imp_old               is from   src/lib/x-kit/xclient/src/window/pen-to-gcontext-imp-old.pkg
    package pg  =  pen_guts;                            # pen_guts                              is from   src/lib/x-kit/xclient/src/window/pen-guts.pkg
    package vu8 =  vector_of_one_byte_unts;             # vector_of_one_byte_unts               is from   src/lib/std/src/vector-of-one-byte-unts.pkg
    package xok =  xsocket_old;                         # xsocket_old                           is from   src/lib/x-kit/xclient/src/wire/xsocket-old.pkg
    package xt  =  xtypes;                              # xtypes                                is from   src/lib/x-kit/xclient/src/wire/xtypes.pkg
herein

    api Draw_Imp_Old {
        #
        package s: api {
            #
            Mapped_State
              = HOSTWINDOW_IS_NOW_UNMAPPED
              | HOSTWINDOW_IS_NOW_MAPPED
              | FIRST_EXPOSE
              ;
        };

        package t: api {
            #
            Poly_Text
             = TEXT  (Int, String)
             | FONT  xt::Font_Id
             ;
        };

        package o: api {
            Draw_Opcode
             = POLY_POINT     (Bool, List( g2d::Point ))
             | POLY_LINE      (Bool, List( g2d::Point ))
             | FILL_POLY      (xt::Shape, Bool, List( g2d::Point ))
             | POLY_SEG       List( g2d::Line  )
             | POLY_BOX       List( g2d::Box   )
             | POLY_FILL_BOX  List( g2d::Box   )
             | POLY_ARC       List( g2d::Arc64 )
             | POLY_FILL_ARC  List( g2d::Arc64 )
             | COPY_AREA
                   ( g2d::Point,
                     xt::Xid,
                     g2d::Box,
                     Oneshot_Maildrop (Void -> List( g2d::Box ) )
                   )
             | COPY_PLANE
                   ( g2d::Point,
                     xt::Xid,
                     g2d::Box,
                     Int,
                     Oneshot_Maildrop (Void -> List( g2d::Box ) )
                   )
             | COPY_PMAREA   (g2d::Point, xt::Xid, g2d::Box)
             | COPY_PMPLANE  (g2d::Point, xt::Xid, g2d::Box, Int)
             | CLEAR_AREA     g2d::Box
             | PUT_IMAGE
                 {
                   to_point:  g2d::Point,
                   size:      g2d::Size,
                   depth:     Int,
                   lpad:      Int,
                   format:    xt::Image_Format,
                   data:      vu8::Vector
                 }
             | POLY_TEXT8   (xt::Font_Id, g2d::Point, List(t::Poly_Text))
             | IMAGE_TEXT8  (xt::Font_Id, g2d::Point, String)
             ;
        };

        package i: api {
            #
            Destroy_Item
             = WINDOW  xt::Window_Id
             | PIXMAP  xt::Pixmap_Id
             ;
        };

        package d: api {
            #
            Draw_Op
              = DRAW
                  { to:    xt::Xid,
                    pen:   pg::Pen,
                    op:    o::Draw_Opcode
                  }

              | DESTROY    i::Destroy_Item
              | FLUSH      Oneshot_Maildrop( Void )             # Used (only) by  drawable_of_rw_pixmap() and make_unbuffered_drawable()  in  src/lib/x-kit/xclient/src/window/draw-types-old.pkg 
              | THREAD_ID  Oneshot_Maildrop( Int  )             # Used for debugging.
              ;
        };

        make_draw_imp
          :
          ( Mailop( s::Mapped_State ),                          # Used to tell draw_imp when its window is un/mapped.
            p2g::Pen_To_Gcontext_Imp,
            xok::Xsocket
          )
          ->
          d::Draw_Op
          ->
          Void;

    };
end;                            # stipulate



## COPYRIGHT (c) 1990, 1991 by John H. Reppy.  See SMLNJ-COPYRIGHT file for details.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext