/* $Revision Header *** Header built automatically - do not edit! ***********
 *
 *	(C) Copyright 1991 by Torsten Jürgeleit
 *
 *	Name .....: imports.h
 *	Created ..: Thursday 19-Dec-91 20:53:10
 *	Revision .: 0
 *
 *	Date        Author                 Comment
 *	=========   ====================   ====================
 *	19-Dec-91   Torsten Jürgeleit      Created this file!
 *
 ****************************************************************************
 *
 *	Imports, prototypes and pragmas for gadget functions
 *
 * $Revision Header ********************************************************/

	/* Imports */

IMPORT struct IntuitionBase  *IntuitionBase;
IMPORT struct Device         *ConsoleDevice;

IMPORT BYTE  hotkey_id[];	/* gadgets1.c */
IMPORT ULONG dec_table[];	/* texts/texts.c */

	/* Static prototypes - gadgets1.c */

struct IntuiMessage    *perform_gadget_action(struct ExtendedGadget  *egad,
					   struct IntuiMessage  *real_imsg);
struct IntuiMessage    *perform_hotkey_action(struct ExtendedGadget  *egad,
					   struct IntuiMessage  *real_imsg);
struct IntuiMessage    *create_intui_message(struct IntuiMessage  *real_imsg,
		     struct GadgetList  *gl,USHORT data_entry, ULONG value);
struct ExtendedGadget  *get_active_gadget(struct Window  *win);
struct ExtendedGadget  *get_hotkey_gadget(struct Window  *win,
							    USHORT hotkey);
USHORT remove_visible_gadget_lists(struct Window  *win,
						     struct MinList  *list);
struct GadgetList      *get_first_gadget_list(struct Window  *win);
VOID   display_visible_gadget_lists(struct Window  *win,
						     struct MinList  *list);
	/* Static pragmas - gadgets1.c */

#pragma regcall(perform_gadget_action(a0,a1))
#pragma regcall(perform_hotkey_action(a0,a1))
#pragma regcall(create_intui_message(a0,a1,d0,d1))
#pragma regcall(get_active_gadget(a0))
#pragma regcall(get_hotkey_gadget(a0,d0))
#pragma regcall(get_first_gadget_list(a0))
#pragma regcall(remove_visible_gadget_lists(a0,a1))
#pragma regcall(display_visible_gadget_lists(a0,a1))

	/* Static prototypes - gadgets2.c */

USHORT count_gadget_data_entries(struct GadgetData  *gd);
ULONG  get_gadget_buffer_size(struct GadgetList  *gl, struct GadgetData  *gd);
ULONG  get_image_buffer_size(struct GadgetList  *gl, struct GadgetData  *gd);
VOID   init_gadgets(struct GadgetList  *gl, struct GadgetData  *gd,
					      SHORT hoffset, SHORT voffset);
BYTE   *init_extended_gadget(struct ExtendedGadget  *egad, BYTE *buffer,
	  struct GadgetList  *gl, struct GadgetData  *gd, USHORT data_entry,
	       USHORT type, USHORT left_edge, USHORT top_edge, USHORT width,
							     USHORT height);
BYTE   *init_gadget_border(BYTE *buffer, struct RenderInfo  *ri,
				 struct ExtendedGadget  *egad, ULONG flags);
VOID   init_gadget_text(struct ExtendedGadget  *egad, BYTE *text,
				   USHORT width, USHORT height, ULONG flags,
					       struct TextAttr  *text_attr);
BYTE   *init_mx_text(struct ExtendedGadget  *egad, BYTE *buffer, BYTE *text,
				   USHORT width, USHORT height, ULONG flags,
					       struct TextAttr  *text_attr);
BOOL   check_gadget_image(struct Image  *image);
BYTE   *init_button_image(struct ExtendedGadget  *egad,
				      struct GadgetData  *gd, BYTE *buffer);
BYTE   *init_image_data(struct ExtendedGadget  *image, BYTE *buffer);

	/* Static pragmas - gadgets2.c */

#pragma regcall(count_gadget_data_entries(a0))
#pragma regcall(get_gadget_buffer_size(a0,a1))
#pragma regcall(get_image_buffer_size(a0,a1))
#pragma regcall(init_gadgets(a0,a1,d0,d1))
#pragma regcall(init_extended_gadget(a0,a1,a2,a3,d0,d1,d2,d3,d4,d5))
#pragma regcall(init_gadget_border(a0,a1,a2,d0))
#pragma regcall(init_gadget_text(a0,a1,d0,d1,d2,a2))
#pragma regcall(init_mx_text(a0,a1,a2,d0,d1,d2,a3))
#pragma regcall(check_gadget_image(a0))
#pragma regcall(init_button_image(a0,a1,a2))
#pragma regcall(init_image_data(a0,a1))

	/* Static prototypes - gadgets3.c */

VOID   refresh_gadget(struct ExtendedGadget  *egad);
VOID   change_gadget(struct ExtendedGadget  *egad);
BOOL   change_cycle_gadget(struct ExtendedGadget  *egad, ULONG qualifier);
LONG   pop_up_cycle_list(struct ExtendedGadget  *egad);
struct RastPort  *create_rast_port(USHORT width, USHORT height, USHORT depth);
VOID   free_rast_port(struct RastPort  *rp, USHORT width, USHORT height);
VOID   change_count_gadget(struct ExtendedGadget  *egad);
VOID   timer_delay(ULONG seconds, ULONG micros);
VOID   print_gadget_text(struct ExtendedGadget  *egad);
VOID   print_cycle_text(struct ExtendedGadget  *egad);
VOID   print_count_text(struct ExtendedGadget  *egad, BOOL print_new);
VOID   print_list_view_text(struct ExtendedGadget  *egad);

	/* Static pragmas - gadgets3.c */

#pragma regcall(refresh_gadget(a0))
#pragma regcall(change_gadget(a0))
#pragma regcall(change_cycle_gadget(a0,d0))
#pragma regcall(pop_up_cycle_list(a0))
#pragma regcall(create_rast_port(d0,d1,d2))
#pragma regcall(free_rast_port(a0,d0,d1))
#pragma regcall(change_count_gadget(a0))
#pragma regcall(timer_delay(d0,d1))
#pragma regcall(print_gadget_text(a0))
#pragma regcall(print_cycle_text(a0))
#pragma regcall(print_count_text(a0,d0))
#pragma regcall(print_list_view_text(a0))

	/* Static prototypes - gadgets4.asm */

USHORT calc_prop_body(ULONG max_num, ULONG size);
USHORT calc_prop_pot(ULONG max_num, ULONG size, ULONG num);
ULONG  get_prop_pos(ULONG max_num, ULONG size, USHORT pot_value);

	/* Static pragmas - gadgets4.asm */

#pragma regcall(calc_prop_body(d0,d1))
#pragma regcall(calc_prop_pot(d0,d1,d2))
#pragma regcall(get_prop_pos(d0,d1,d2))
