english
version "1.0"
identify "wxyz"

# Copyright (c) 1998-1999 by Wayne C. Gramlich.
# All rights reserved.
#
# Permission to use, copy, modify, distribute, and sell this software
# for any purpose is hereby granted without fee provided that the above
# copyright notice and this permission are retained.  The author makes
# no representations about the suitability of this software for any purpose.
# It is provided "as is" without express or implied warranty.

module swit_clone

#: This module implements the clone portion of SWIT.


#: {clone} procedures:

procedure close@clone
    takes
	clone clone
    returns_nothing

    #: This procedure will close down {clone}.


procedure create@clone
    routine_types
	procedure initialize_call_back
	    takes clone
	    returns_nothing
    takes
	application application
	host_name string
	port_number unsigned
	remote_display string
	initialize_call_back initialize_call_back
    returns clone

    #: This procedure will create and return a {clone} of {application}
    #, connected to the SWIT server on port number {port_number} on
    #, the host named {host_name} and using the remote X11 display
    #, {remote_display}.


procedure destroy@clone
    takes
	clone clone
    returns_nothing

    #: This procedure will destroy {clone}.


procedure do_nothing@clone
    takes
	clone clone
    returns_nothing

    #: This procedure does nothing.


procedure exit@clone
    takes
	clone clone
    returns_nothing

    #: This procedure will cause {clone} to exit gracefully.

    #, swit server.


procedure increment@clone
    takes
	clone clone
    returns_nothing

    #: This procedure will increment the modification count for {clone}.


procedure line_process@clone
    takes
	clone clone
	line string
    returns_nothing

    #: This process will process {line} which has been returned from
    #, from {clone}.


procedure read_call_back@clone
    takes
	read_channel read_channel[clone]
    returns_nothing

    #: This procedure will process a read request for {read_channel}.


procedure tcl_command_send@clone
    takes
	clone clone
    returns_nothing

    #: This procedure will cause the current TCL command to be queued
    #, for sending.

    #, as we can:

procedure tcl_command_start@clone
    takes
	clone clone
    returns tcl_command

    #: This procedure will start a new TCL command to send to {clone}.
    #, The `new' {tcl_command} object is returned.


procedure uid_next@clone
    takes
	clone clone
    returns unsigned

    #: This procedure will create and return the next unique identifier
    #, from {clone}.  {clone} must be the master clone (i.e.
    #, {is_master_get}@({clone}) returns {true}.)


procedure update@clone
    takes
	clone clone
    returns_nothing

    #: This procedure will update all of the widgets in {clone} to be
    #, clones of the {clone}'s master.


procedure write_call_back@clone
    takes
	write_channel write_channel[clone]
    returns_nothing

    #: This procedure will process a write request for {write_channel}.