/* Copyright 1996 Acorn Computers Ltd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/****************************************************************************
 * This source file was written by Acorn Computers Limited. It is part of   *
 * the RISCOS library for writing applications in C for RISC OS. It may be  *
 * used freely in the creation of programs for Archimedes. It should be     *
 * used with Acorn's C Compiler Release 3 or later.                         *
 *                                                                          *
 ***************************************************************************/

/* Title:    dboxtcol.h
 * Purpose:  Display and entry of true colours
 *
 */

#ifndef __dboxtcol_h
#define __dboxtcol_h

#ifndef BOOL
#define BOOL int
#define TRUE 1
#define FALSE 0
#endif

typedef int dboxtcol_colour ;  /* colour as BBGGRRxx */

typedef void (*dboxtcol_colourhandler)(dboxtcol_colour col, void *handle);

#define dboxtcol_Transparent (-1)

/* ----------------------------- dboxtcol ----------------------------------
 * Description:   Displays a dialogue box to allow the editing of a true
 *                colour value.
 *
 * Parameters:    dboxtcol_colour *colour -- colour to be edited
 *                BOOL allow_transparent  -- enables selection of a
 *                                           "see-through" colour
 *                char *name -- title to put in dialogue box.
 *                dboxtcol_colourhandler proc -- function to act on the
 *                                               colour change.
 *                void *handle -- this is the handle passed to "proc".
 * Returns:       TRUE if colour edited, user clicks OK.
 * Other Info:    The dialogue box to be used should be the same as that
 *                used by !Paint to edit the palette. If the user clicks
 *                Select on OK then the "proc" is called and the dialogue box
 *                is closed. If the user right-clicks on OK then the "proc"
 *                is called and the dialogue box stays on the screen. This
 *                allows the client of this function to use "proc" to, say,
 *                change a sprites palette to reflect the edited colour value
 *                and then to cause a redraw of the sprite.
 *
 */

BOOL dboxtcol(dboxtcol_colour *colour /*inout*/, BOOL allow_transparent,
              char *name, dboxtcol_colourhandler proc, void *handle) ;

#endif

/* end dboxtcol.h */