Commit 609d3219 authored by ROOL's avatar ROOL 🤖
Browse files

This commit was manufactured by cvs2git to create tag 'initial'.

Sprout from master 1999-11-16 14:48:43 UTC Stewart Brodie <sbrodie@gitlab.riscosopen.org> '  Import of assembler headers which declare Toolbox SWI symbols.'
Delete:
    !MkClean,fd7
    !MkExpHdr,fd7
    !MkExpLib,fd7
    Makefile
    VersionNum
    c/debug
    c/mem
    c/messages
    c/objsupport
    c/rmensure
    c/slist
    c/string32
    h/colpicker
    h/const
    h/debug
    h/macros
    h/mem
    h/messages
    h/objsupport
    h/os
    h/rmensure
    h/services
    h/slist
    h/string32
    h/style
    h/toolboxmem
    h/twimp
    objects/h/DCS
    objects/h/Quit
    objects/h/colourdbox
    objects/h/colourmenu
    objects/h/fileinfo
    objects/h/fontdbox
    objects/h/fontmenu
    objects/h/generic
    objects/h/iconbar
    objects/h/menu
    objects/h/printdbox
    objects/h/proginfo
    objects/h/saveas
    objects/h/scale
    objects/h/toolbox
    objects/h/window
    s/toolboxmem
parent cb30a819
/* 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.
*/
/* File: os.h
* Purpose: C interface to RiscOS
* Author: Timothy G Roddis
* History: 7-Feb-94: TGR: created
*
*/
#ifndef __os_h
#define __os_h
typedef struct
{
unsigned int low,high; /* This is actually only a 5-byte value, with 4 bytes in low */
} os_UTC;
#define os_SpriteOp_SelectSprite 24
#define os_SpriteOp_SetPointerShape 36
#define os_SpriteOp_ReadInfo 40
#define os_Module_LookupModuleName 18
#endif
/* 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.
*/
/* File: rmensure.h
* Purpose: ensuring a module is loaded
* Author: IDJ
* History: 24-Jun-94: IDJ: created
*/
extern _kernel_oserror *rmensure (char *module_name, char *file_name, char *module_version);
/* 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.
*/
/* File: services.h
* Purpose: service call numbers
* Author: Ian Johnson
* History: 11-Aug-93: IDJ: created
*
*/
#ifndef __services_h
#define __services_h
#define Service_Memory 0x11
#define Service_Reset 0x27
#define Service_StartWimp 0x49
#define Service_WimpCloseDown 0x53
#define Service_FilterManagerInstalled 0x87
#define Service_DynamicAreaRenumber 0x92
#endif
/* 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.
*/
typedef struct _SLIST {
struct _SLIST *next;
int members[255];
} SList;
void *slist_add_new(void **_head,int size,char *tag);
void slist_delete_member(void **_head,void *member);
void *slist_find_member(void **_head,int field, int value);
void *slist_find_matched_member(void **_head,int (*func)(void *list,int value), int value);
void slist_delete_and_call(void **_head,void (*func)(void *value));
/* 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.
*/
/* File: string32.h
* Purpose: strings terminated by char < 32
* Author: Timothy Roddis
* History: 24-Jan-94: IDJ: created from original TGR sources
*/
/* Strings passed to the toolbox might be terminated with any control character ... */
extern void string_copy (char *dst_txt, char *src_txt);
/*
* copy a ctrl-terminated string to a buffer big enough to
* hold the result (no length checking).
*/
extern char *string_copy_chk (char *dst_txt, char *src_txt, int max_len);
/*
* copy a ctrl-terminated string to a buffer checking it is big enough to
* hold the result. Return NULL and nul-terminate, if dst buffer not
* big enough.
*/
extern int string_length (char *txt);
/*
* return length of ctrl-terminated string
*/
extern void string_to_buffer (char *dst_txt, char *src_txt, int *max_len);
/*
* general purpose routine to fill in a user-supplied buffer (and report
* number of bytes written), or just report size of buffer needed.
* If buffer is supplied (dst_txt != 0), then *max_len gives size of supplied
* buffer; if this is not large enough, don't return an error, but return
* size of bufer required!
*/
/* 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.
*/
/* Title: style.h
* Purpose: Constants defined by the RISC OS 3 Style Guide
* Author: IDJ
* History: 03-Nov-93: created
* 07-Mar-94: CSM: Removed RJUSTIFY from label flags
* 13-Jun-94: NK : display fields now unfilled
* 06-Jun-97: PW : Added writable icons without borders for Daytona
* 24-Jun-97: PW : Changed slider look for Daytona
*/
#ifndef __style_h
#define __style_h
#ifndef __wimp_h
#include "twimp.h"
#endif
/* --- Iconbar Icons --- */
#define style_ICONBAR_FORECOL 7 /* black text */
#define style_ICONBAR_BACKCOL 1 /* v. light grey background */
#define style_ICONBAR_TEXT_AND_SPRITE_YMAX 84 /* OS Units */
#define style_ICONBAR_TEXT_AND_SPRITE_GAP 4 /* OS Units gap between text and base of sprite */
#define style_ICONBAR_TEXT_AND_SPRITE_TEXT_HEIGHT 32 /* OS Units height of text */
#define style_ICONBAR_TEXT_AND_SPRITE_BASE (-16) /* base line of text&sprite icon */
#define style_ICONBAR_TEXT_AND_SPRITE_TYPE wimp_BUTTON_CLICK
#define style_ICONBAR_TEXT_AND_SPRITE_ICONFLAGS (wimp_ICONFLAGS_TEXT |\
wimp_ICONFLAGS_SPRITE |\
wimp_ICONFLAGS_HCENTRE |\
wimp_ICONFLAGS_INDIRECT |\
(wimp_ICONFLAGS_FORECOL * style_ICONBAR_FORECOL) |\
(wimp_ICONFLAGS_BACKCOL * style_ICONBAR_BACKCOL) |\
(wimp_ICONFLAGS_BUTTON_TYPE * style_ICONBAR_TEXT_AND_SPRITE_TYPE)\
)
#define style_ICONBAR_SPRITE_YMAX 68 /* OS Units */
#define style_ICONBAR_SPRITE_BASE 0 /* base of sprite only icon */
#define style_ICONBAR_SPRITE_TYPE wimp_BUTTON_CLICK
#define style_ICONBAR_SPRITE_ICONFLAGS (wimp_ICONFLAGS_SPRITE |\
wimp_ICONFLAGS_HCENTRE |\
wimp_ICONFLAGS_VCENTRE |\
wimp_ICONFLAGS_INDIRECT |\
(wimp_ICONFLAGS_BUTTON_TYPE * style_ICONBAR_SPRITE_TYPE)\
)
/* --- Windows --- */
#define style_WINDOW_TITLE_FORECOL 7 /* black text */
#define style_WINDOW_TITLE_BACKCOL 2 /* grey background */
#define style_WINDOW_TITLE_HIGHLIGHTED 12 /* cream title bar when selected */
#define style_WINDOW_OUTER_SCROLL 3 /* dark grey backgrnd for scroll bar */
#define style_WINDOW_INNER_SCROLL 1 /* light grey scroll sausage */
#define style_WINDOW_STAGGER 48 /* offset of subsequent windows after first
window is opened in centre of screen */
/* --- Menus --- */
#define style_MENU_TITLE_FORECOL 7 /* black text */
#define style_MENU_TITLE_BACKCOL 2 /* grey background */
#define style_MENU_ENTRY_FORECOL 7 /* black text */
#define style_MENU_ENTRY_BACKCOL 0 /* white backgnd for entries */
#define style_MENU_ENTRY_HEIGHT 44 /* entries are 44 OS units high */
#define style_MENU_ENTRY_GAP 0 /* no gap between menu entries */
#define style_MENU_OFFSET 64 /* open menu 64 OS units to left of pointer */
#define style_MENU_ICONBAR_BASE 96 /* base of iconbar menu is 96 OS units from bottom of screen */
/* --- Gadgets (buttons in dialogue boxes) --- */
#define style_INTER_GADGET_SPACE 8 /* OS Units space between gadgets in a dbox */
#define style_ACTION_BUTTON_HEIGHT 52 /* OS Units */
#define style_ACTION_BUTTON_FORECOL 7 /* black text */
#define style_ACTION_BUTTON_BACKCOL 1 /* v. light grey background */
#define style_ACTION_BUTTON_TYPE wimp_BUTTON_CLICK
#define style_ACTION_BUTTON_CENTERING (wimp_ICONFLAGS_HCENTRE | wimp_ICONFLAGS_VCENTRE)
#define style_ACTION_BUTTON_ICONFLAGS (wimp_ICONFLAGS_TEXT |\
wimp_ICONFLAGS_HAS_BORDER |\
style_ACTION_BUTTON_CENTERING |\
wimp_ICONFLAGS_FILLED |\
wimp_ICONFLAGS_INDIRECT |\
(wimp_ICONFLAGS_BUTTON_TYPE * style_ACTION_BUTTON_TYPE) |\
(wimp_ICONFLAGS_FORECOL * style_ACTION_BUTTON_FORECOL) |\
(wimp_ICONFLAGS_BACKCOL * style_ACTION_BUTTON_BACKCOL)\
)
#define style_ACTION_BUTTON_VALIDSTR "R5,3;F17;AA~A"
#define style_DEFAULT_ACTION_HEIGHT 68 /* OS Units */
#define style_DEFAULT_ACTION_FORECOL 7 /* black text */
#define style_DEFAULT_ACTION_BACKCOL 1 /* v. light grey background */
#define style_DEFAULT_ACTION_TYPE wimp_BUTTON_CLICK
#define style_DEFAULT_ACTION_CENTERING (wimp_ICONFLAGS_HCENTRE | wimp_ICONFLAGS_VCENTRE)
#define style_DEFAULT_ACTION_ICONFLAGS (wimp_ICONFLAGS_TEXT |\
wimp_ICONFLAGS_HAS_BORDER |\
style_DEFAULT_ACTION_CENTERING |\
wimp_ICONFLAGS_FILLED |\
wimp_ICONFLAGS_INDIRECT |\
(wimp_ICONFLAGS_BUTTON_TYPE * style_DEFAULT_ACTION_TYPE) |\
(wimp_ICONFLAGS_FORECOL * style_DEFAULT_ACTION_FORECOL) |\
(wimp_ICONFLAGS_BACKCOL * style_DEFAULT_ACTION_BACKCOL)\
)
#define style_DEFAULT_ACTION_VALIDSTR "R6,3;AA~A"
#define style_RADIO_BUTTON_HEIGHT 44 /* OS Units */
#define style_RADIO_BUTTON_FORECOL 7 /* black text */
#define style_RADIO_BUTTON_TYPE wimp_BUTTON_CLICK
#define style_RADIO_BUTTON_TEXT_ICONFLAGS (wimp_ICONFLAGS_TEXT |\
wimp_ICONFLAGS_VCENTRE |\
wimp_ICONFLAGS_INDIRECT |\
(wimp_ICONFLAGS_BUTTON_TYPE * style_RADIO_BUTTON_TYPE) |\
(wimp_ICONFLAGS_FORECOL * style_RADIO_BUTTON_FORECOL) |\
(wimp_ICONFLAGS_FORECOL * style_RADIO_BUTTON_FORECOL)\
)
#define style_RADIO_BUTTON_TEXT_VALIDSTR "f17"
#define style_RADIO_BUTTON_BUTTON_ICONFLAGS (wimp_ICONFLAGS_TEXT |\
wimp_ICONFLAGS_SPRITE |\
wimp_ICONFLAGS_VCENTRE |\
wimp_ICONFLAGS_INDIRECT |\
(wimp_ICONFLAGS_BUTTON_TYPE * style_RADIO_BUTTON_TYPE) |\
(wimp_ICONFLAGS_FORECOL * style_RADIO_BUTTON_FORECOL)\
)
#define style_RADIO_BUTTON_BUTTON_VALIDSTR "Sradiooff,radioon"
#define style_OPTION_BUTTON_HEIGHT 44 /* OS Units */
#define style_OPTION_BUTTON_FORECOL 7 /* black text */
#define style_OPTION_BUTTON_BACKCOL 1 /* light grey, necessary since icon is semi-filled */
#define style_OPTION_BUTTON_TYPE wimp_BUTTON_CLICK
#define style_OPTION_BUTTON_TEXT_ICONFLAGS (wimp_ICONFLAGS_TEXT |\
wimp_ICONFLAGS_VCENTRE |\
wimp_ICONFLAGS_INDIRECT |\
(wimp_ICONFLAGS_BUTTON_TYPE * style_OPTION_BUTTON_TYPE) |\
(wimp_ICONFLAGS_FORECOL * style_OPTION_BUTTON_FORECOL) |\
(wimp_ICONFLAGS_BACKCOL * style_OPTION_BUTTON_BACKCOL) \
)
#define style_OPTION_BUTTON_TEXT_VALIDSTR "f17"
#define style_OPTION_BUTTON_BUTTON_ICONFLAGS (wimp_ICONFLAGS_TEXT |\
wimp_ICONFLAGS_VCENTRE |\
wimp_ICONFLAGS_SPRITE |\
wimp_ICONFLAGS_INDIRECT |\
(wimp_ICONFLAGS_BUTTON_TYPE * style_OPTION_BUTTON_TYPE) |\
(wimp_ICONFLAGS_FORECOL * style_OPTION_BUTTON_FORECOL) |\
(wimp_ICONFLAGS_BACKCOL * style_OPTION_BUTTON_BACKCOL) \
)
#define style_OPTION_BUTTON_BUTTON_VALIDSTR "Soptoff,opton"
#define style_WRITABLE_FIELD_HEIGHT 68 /* OS Units */
#define style_WRITABLE_FIELD_FORECOL 7 /* black text */
#define style_WRITABLE_FIELD_BACKCOL 0 /* white background */
#define style_WRITABLE_FIELD_TYPE wimp_BUTTON_WRITABLE
#ifdef DAYTONA_BUILD
#define style_WRITABLE_FIELD_ICONFLAGS (wimp_ICONFLAGS_TEXT |\
wimp_ICONFLAGS_VCENTRE |\
wimp_ICONFLAGS_FILLED |\
wimp_ICONFLAGS_INDIRECT |\
(wimp_ICONFLAGS_BUTTON_TYPE * style_WRITABLE_FIELD_TYPE) |\
(wimp_ICONFLAGS_FORECOL * style_WRITABLE_FIELD_FORECOL) |\
(wimp_ICONFLAGS_BACKCOL * style_WRITABLE_FIELD_BACKCOL)\
)
#else
#define style_WRITABLE_FIELD_ICONFLAGS (wimp_ICONFLAGS_TEXT |\
wimp_ICONFLAGS_HAS_BORDER |\
wimp_ICONFLAGS_VCENTRE |\
wimp_ICONFLAGS_FILLED |\
wimp_ICONFLAGS_INDIRECT |\
(wimp_ICONFLAGS_BUTTON_TYPE * style_WRITABLE_FIELD_TYPE) |\
(wimp_ICONFLAGS_FORECOL * style_WRITABLE_FIELD_FORECOL) |\
(wimp_ICONFLAGS_BACKCOL * style_WRITABLE_FIELD_BACKCOL)\
)
#endif /* DAYTONA_BUILD */
#ifdef THICK_WRITABLE_BORDERS
#define style_WRITABLE_FIELD_VALIDSTR "Pptr_write;R5;C//0/0/0/0" /* NOT Ktar! */
#else
#define style_WRITABLE_FIELD_VALIDSTR "Pptr_write" /* NOT Ktar! */
#endif
#define style_DISPLAY_FIELD_HEIGHT 52 /* OS Units */
#define style_DISPLAY_FIELD_FORECOL 7 /* black text */
#define style_DISPLAY_FIELD_BACKCOL 1 /* v. light grey background */
#define style_DISPLAY_FIELD_TYPE wimp_BUTTON_NEVER
#define style_DISPLAY_FIELD_ICONFLAGS (wimp_ICONFLAGS_TEXT |\
wimp_ICONFLAGS_HAS_BORDER |\
wimp_ICONFLAGS_VCENTRE |\
wimp_ICONFLAGS_FILLED |\
wimp_ICONFLAGS_INDIRECT |\
(wimp_ICONFLAGS_BUTTON_TYPE * style_DISPLAY_FIELD_TYPE) |\
(wimp_ICONFLAGS_FORECOL * style_DISPLAY_FIELD_FORECOL) |\
(wimp_ICONFLAGS_BACKCOL * style_DISPLAY_FIELD_BACKCOL)\
)
#define style_DISPLAY_FIELD_VALIDSTR "R2;f17" /* make sure colours are ok when we come to ff */
#ifdef DAYTONA_BUILD
#define style_SLIDER_BORDERSIZE 4
#define style_HSLIDER_WELL_BACKCOL 7 /* black */
#define style_HSLIDER_WELL_TYPE wimp_BUTTON_NEVER
#define style_HSLIDER_WELL_ICONFLAGS (wimp_ICONFLAGS_FILLED |\
(wimp_ICONFLAGS_BUTTON_TYPE * style_HSLIDER_WELL_TYPE) |\
(wimp_ICONFLAGS_BACKCOL * style_HSLIDER_WELL_BACKCOL)\
)
#define style_HSLIDER_WELL_VALIDSTR ""
#else /* DAYTONA_BUILD */
#define style_SLIDER_BORDERSIZE 12
//#define style_HSLIDER_HEIGHT 40 /* OS Units */
//#define style_HSLIDER_WELL_HEIGHT 40 /* OS Units */
#define style_HSLIDER_WELL_BACKCOL 1 /* v. light grey */
#define style_HSLIDER_WELL_TYPE wimp_BUTTON_NEVER
#define style_HSLIDER_WELL_ICONFLAGS (wimp_ICONFLAGS_HAS_BORDER |\
wimp_ICONFLAGS_TEXT |\
wimp_ICONFLAGS_INDIRECT |\
(wimp_ICONFLAGS_BUTTON_TYPE * style_HSLIDER_WELL_TYPE) |\
(wimp_ICONFLAGS_BACKCOL * style_HSLIDER_WELL_BACKCOL)\
)
#define style_HSLIDER_WELL_VALIDSTR "R2"
#endif /* DAYTONA_BUILD */
#define style_HSLIDER_BACKGND_HEIGHT 16 /* OS Units */
#define style_HSLIDER_BACKGND_BACKCOL 0 /* white */
#define style_HSLIDER_BACKGND_TYPE wimp_BUTTON_CLICK_DRAG
#define style_HSLIDER_BACKGND_ICONFLAGS (wimp_ICONFLAGS_FILLED |\
(wimp_ICONFLAGS_BUTTON_TYPE * style_HSLIDER_BACKGND_TYPE) |\
(wimp_ICONFLAGS_BACKCOL * style_HSLIDER_BACKGND_BACKCOL)\
)
#define style_HSLIDER_VALUE_HEIGHT 16 /* OS Units */
#define style_HSLIDER_VALUE_BACKCOL 5 /* grey as default - can be different - style guide does not define colour */
#define style_HSLIDER_VALUE_TYPE wimp_BUTTON_CLICK_DRAG
#define style_HSLIDER_VALUE_ICONFLAGS (wimp_ICONFLAGS_FILLED |\
(wimp_ICONFLAGS_BUTTON_TYPE * style_HSLIDER_VALUE_TYPE) |\
(wimp_ICONFLAGS_BACKCOL * style_HSLIDER_VALUE_BACKCOL)\
)
//#define style_VSLIDER_WIDTH 20 /* OS Units */
//#define style_VSLIDER_WELL_WIDTH 20 /* OS Units */
#ifdef DAYTONA_BUILD
#define style_VSLIDER_WELL_BACKCOL 7 /* black */
#define style_VSLIDER_WELL_TYPE wimp_BUTTON_NEVER
#define style_VSLIDER_WELL_ICONFLAGS (wimp_ICONFLAGS_FILLED |\
(wimp_ICONFLAGS_BUTTON_TYPE * style_HSLIDER_WELL_TYPE) |\
(wimp_ICONFLAGS_BACKCOL * style_HSLIDER_WELL_BACKCOL)\
)
#define style_VSLIDER_WELL_VALIDSTR ""
#else /* DAYTONA_BUILD */
#define style_VSLIDER_WELL_BACKCOL 1 /* v. light grey */
#define style_VSLIDER_WELL_TYPE wimp_BUTTON_NEVER
#define style_VSLIDER_WELL_ICONFLAGS (wimp_ICONFLAGS_HAS_BORDER |\
wimp_ICONFLAGS_TEXT |\
wimp_ICONFLAGS_INDIRECT |\
(wimp_ICONFLAGS_BUTTON_TYPE * style_VSLIDER_WELL_TYPE) |\
(wimp_ICONFLAGS_BACKCOL * style_VSLIDER_WELL_BACKCOL)\
)
#define style_VSLIDER_WELL_VALIDSTR "R2"
#endif /* DAYTONA_BUILD */
#define style_VSLIDER_BACKGND_WIDTH 16 /* OS Units */
#define style_VSLIDER_BACKGND_BACKCOL 0 /* white */
#define style_VSLIDER_BACKGND_TYPE wimp_BUTTON_CLICK_DRAG
#define style_VSLIDER_BACKGND_ICONFLAGS (wimp_ICONFLAGS_FILLED |\
(wimp_ICONFLAGS_BUTTON_TYPE * style_VSLIDER_BACKGND_TYPE) |\
(wimp_ICONFLAGS_BACKCOL * style_VSLIDER_BACKGND_BACKCOL)\
)
#define style_VSLIDER_VALUE_WIDTH 16 /* OS Units */
#define style_VSLIDER_VALUE_BACKCOL 5 /* grey as default - can be different - style guide does not define colour */
#define style_VSLIDER_VALUE_TYPE wimp_BUTTON_CLICK_DRAG
#define style_VSLIDER_VALUE_ICONFLAGS (wimp_ICONFLAGS_FILLED |\
(wimp_ICONFLAGS_BUTTON_TYPE * style_VSLIDER_VALUE_TYPE) |\
(wimp_ICONFLAGS_BACKCOL * style_VSLIDER_VALUE_BACKCOL)\
)
#define style_ADJUSTER_ARROW_HEIGHT 32 /* OS Units */
#define style_ADJUSTER_ARROW_WIDTH 32 /* OS Units */
#define style_ADJUSTER_ARROW_GAP 8 /* OS Units */
#define style_ADJUSTER_ARROW_DOWN_VALIDSTR "R5;sdown,pdown"
#define style_ADJUSTER_ARROW_UP_VALIDSTR "R5;sup,pup"
#define style_ADJUSTER_ARROW_LEFT_VALIDSTR "R5;sleft,pleft"
#define style_ADJUSTER_ARROW_RIGHT_VALIDSTR "R5;sright,pright"
#define style_ADJUSTER_ARROW_TYPE wimp_BUTTON_AUTO_REPEAT
#define style_ADJUSTER_ARROW_ICONFLAGS (wimp_ICONFLAGS_TEXT |\
wimp_ICONFLAGS_SPRITE |\
wimp_ICONFLAGS_HCENTRE |\
wimp_ICONFLAGS_VCENTRE |\
wimp_ICONFLAGS_INDIRECT |\
(wimp_ICONFLAGS_BUTTON_TYPE * style_ADJUSTER_ARROW_TYPE)\
)
#define style_POPUP_MENU_HEIGHT 44 /* OS Units */
#define style_POPUP_MENU_WIDTH 44 /* OS Units */
#define style_POPUP_MENU_TYPE wimp_BUTTON_CLICK
#define style_POPUP_MENU_ICONFLAGS (wimp_ICONFLAGS_TEXT |\
wimp_ICONFLAGS_SPRITE |\
wimp_ICONFLAGS_HCENTRE |\
wimp_ICONFLAGS_VCENTRE |\
wimp_ICONFLAGS_INDIRECT |\
(wimp_ICONFLAGS_BUTTON_TYPE * style_POPUP_MENU_TYPE)\
)
#define style_POPUP_MENU_VALIDSTR "R5;sgright,pgright"
#define style_TEXT_LABEL_MAX_WIDTH 40 /* OS Units */
#define style_TEXT_LABEL_FORECOL 7 /* black text */
#define style_TEXT_LABEL_TYPE wimp_BUTTON_NEVER
#define style_TEXT_LABEL_ICONFLAGS (wimp_ICONFLAGS_TEXT |\
wimp_ICONFLAGS_INDIRECT |\
(wimp_ICONFLAGS_BUTTON_TYPE * style_TEXT_LABEL_TYPE) |\
(wimp_ICONFLAGS_FORECOL * style_TEXT_LABEL_FORECOL)\
)
#endif
/* Copyright 1998 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.
*/
/* Title: toolboxmem.h
* Purpose: Veneers onto Toolbox memory allocation SWIs
* Author: Kevin Bracey
* History: 22-Nov-96: KJB: created
*/
#ifndef __toolboxmem_h
#define __toolboxmem_h
extern void *toolbox_memory_alloc(size_t);
extern void *toolbox_memory_extend(void *, int);
extern void toolbox_memory_free(void *);
#endif
/* 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.
*/
/* Title: wimp.h
* Purpose: C interface to RISC OS Wimp routines.
* Author: IDJ
* History: 16-Sep-93: IDJ: created
* 25-Nov-96: EPW: Updated structures for nested window support
*/
# ifndef __wimp_h
# define __wimp_h
#ifndef __toolbox_h
#include "objects.toolbox.h"
#endif
#include "kernel.h"
#define wimp_ENULL 0
#define wimp_EREDRAW 1
#define wimp_EOPEN 2
#define wimp_ECLOSE 3
#define wimp_EPTR_LEAVE 4
#define wimp_EPTR_ENTER 5
#define wimp_EBUT 6
#define wimp_EUSER_DRAG 7
#define wimp_EKEY 8
#define wimp_EMENU 9
#define wimp_ESCROLL 10
#define wimp_ELOSE_CARET 11
#define wimp_EGAIN_CARET 12
#define wimp_EPOLL_WORD 13
#define wimp_ESEND 17
#define wimp_ESEND_WANT_ACK 18
#define wimp_EACK 19
#define wimp_ETOOLBOX_EVENT 0x200
#define wimp_EMNULL (1 << wimp_ENULL)
#define wimp_EMREDRAW (1 << wimp_EREDRAW)
#define wimp_EMOPEN (1 << wimp_EOPEN)
#define wimp_EMCLOSE (1 << wimp_ECLOSE)
#define wimp_EMPTR_LEAVE (1 << wimp_EPTR_LEAVE)
#define wimp_EMPTR_ENTER (1 << wimp_EPTR_ENTER)
#define wimp_EMBUT (1 << wimp_EBUT)
#define wimp_EMUSER_DRAG (1 << wimp_EUSER_DRAG)
#define wimp_EMKEY (1 << wimp_EKEY)
#define wimp_EMMENU (1 << wimp_EMENU)
#define wimp_EMSCROLL (1 << wimp_ESCROLL)
#define wimp_EMLOSE_CARET (1 << wimp_ELOSE_CARET)
#define wimp_EMGAIN_CARET (1 << wimp_EGAIN_CARET)
#define wimp_EMPOLL_WORD (1 << wimp_EPOLL_WORD)
#define wimp_EMSEND (1 << wimp_ESEND)
#define wimp_EMSEND_WANT_ACK (1 << wimp_ESEND_WANT_ACK)
#define wimp_EMACK (1 << wimp_EACK)
/* --- wimp colours --- */
#define wimp_BLACK 7
#define wimp_VERY_LIGHT_GREY 1
/* --- wimp icons --- */
#define wimp_ICONBAR (-2)
/* button types */
#define wimp_BUTTON_NEVER 0
#define wimp_BUTTON_ALWAYS 1
#define wimp_BUTTON_AUTO_REPEAT 2
#define wimp_BUTTON_CLICK 3
#define wimp_BUTTON_RELEASE 4
#define wimp_BUTTON_DOUBLE_CLICK 5
#define wimp_BUTTON_CLICK_DRAG 6
#define wimp_BUTTON_RELEASE_DRAG 7
#define wimp_BUTTON_DOUBLE_DRAG 8
#define wimp_BUTTON_MENU_ICON 9
#define wimp_BUTTON_DOUBLE_CLICK_DRAG 10
#define wimp_BUTTON_RADIO 11
#define wimp_BUTTON_WRITE_CLICK_DRAG 14
#define wimp_BUTTON_WRITABLE 15
/* icon flags */
#define wimp_ICONFLAGS_TEXT 0x00000001
#define wimp_ICONFLAGS_SPRITE 0x00000002
#define wimp_ICONFLAGS_HAS_BORDER 0x00000004
#define wimp_ICONFLAGS_HCENTRE 0x00000008
#define wimp_ICONFLAGS_VCENTRE 0x00000010
#define wimp_ICONFLAGS_FILLED 0x00000020
#define wimp_ICONFLAGS_ANTI_ALIASED 0x00000040
#define wimp_ICONFLAGS_NEEDS_HELP 0x00000080
#define wimp_ICONFLAGS_INDIRECT 0x00000100
#define wimp_ICONFLAGS_RJUSTIFY 0x00000200
#define wimp_ICONFLAGS_NO_CANCEL 0x00000400
#define wimp_ICONFLAGS_HALF_SIZE 0x00000800
#define wimp_ICONFLAGS_BUTTON_TYPE 0x00001000 /* multiply by button type you want */
#define wimp_ICONFLAGS_ESG 0x00010000 /* multiply by ESG you want */
#define wimp_ICONFLAGS_INVERT 0x00200000
#define wimp_ICONFLAGS_FADED 0x00400000
#define wimp_ICONFLAGS_DELETED 0x00800000
#define wimp_ICONFLAGS_FORECOL 0x01000000U /* multiply by colour you want */
#define wimp_ICONFLAGS_BACKCOL 0x10000000U /* multiply by colour you want */
typedef struct
{
int xmin, ymin, xmax, ymax;
} wimp_Bbox;
typedef union
{
char text[12]; /* up to 12 bytes of text */
char sprite_name[12]; /* up to 12 bytes of sprite name */
struct
{
union
{
char *name;
void *sprite_ptr;
} sprite;
void *sprite_area; /* 0->use the common sprite area */
/* 1->use the wimp sprite area */
int name_len; /* if 0, then use sprite.sprite_ptr */
} indirect_sprite;
struct
{
char *buffer; /* pointer to text buffer */
char *valid_string; /* pointer to validation string */
int buff_len; /* length of text buffer */
} indirect_text;
struct
{
char *buffer; /* pointer to text buffer */
char *valid_string; /* pointer to validation string */
int buff_len; /* length of text buffer */
} indirect_text_and_sprite;
} wimp_IconData;
typedef struct
{
wimp_Bbox bbox; /* icon's bounding box */
unsigned int flags; /* icon's flags word */
wimp_IconData data; /* icon's data (12 bytes) */
} wimp_Icon;
typedef struct
{
int window_handle;
int icon_handle;
} wimp_IconDelete;
typedef struct
{
int window_handle;
wimp_Icon icon;
} wimp_IconCreate;
typedef struct
{
int window_handle;
int icon_handle;
unsigned int EOR_word;
unsigned int clear_word;
} wimp_SetIconState;
typedef struct
{
int window_handle ;
int icon_handle ;
wimp_Icon icon ;
} wimp_GetIconState ;
/* --- Wimp menus --- */
#define wimp_KeepMenu 0x5045454b /* 'KEEP' (take note, Ian) */
#define wimp_MENUFLAGS_TICKED 0x00000001
#define wimp_MENUFLAGS_DOTTED_LINE 0x00000002
#define wimp_MENUFLAGS_WRITABLE 0x00000004
#define wimp_MENUFLAGS_SUBMENU_MESSAGE 0x00000008
#define wimp_MENUFLAGS_SUBMENU_OPENABLE 0x00000010
#define wimp_MENUFLAGS_LAST_ITEM 0x00000080
#define wimp_MENUFLAGS_TITLE_INDIRECT 0x00000100
typedef struct
{
wimp_IconData title;
char title_fgnd;
char title_bgnd;
char worka_fgnd;
char worka_bgnd;
int width;
int height;
int vert_gap;
} wimp_MenuHeader;
typedef struct
{
wimp_MenuHeader hdr;
/* items come here in memory */
} wimp_Menu;
typedef struct
{
int flags;
wimp_Menu *submenu;
int icon_flags;
wimp_IconData icon_data;
} wimp_MenuEntry;
#define wimp_menu_entry(m, i) (((wimp_MenuEntry*)(&m->hdr + 1)) + i)
/* --- wimp Windows --- */
typedef struct
{
wimp_Bbox box; /* screen coords of work area */
int scx,
scy; /* scroll bar positions */
int behind; /* handle to open window behind, or -1 if top */
int flags; /* word of flag bits */
char colours[8]; /* colours */
wimp_Bbox ex; /* maximum extent of work area */
int title_flags; /* icon flags for title bar */
int work_area_flags; /* just button type relevant */
void *sprite_area; /* sprite area pointer for window */
int min_size; /* two 16-bit OS-unit fields, giving min size of window. 0->use title. */
wimp_IconData title; /* title icon data */
int nicons; /* no. of icons in window */
/* icon defs follow here in memory */
} wimp_Window;
/* window flags */
#define wimp_WINDOWFLAGS_OLD_HAS_TITLE 0x00000001 /* deprecated */
#define wimp_WINDOWFLAGS_MOVEABLE 0x00000002
#define wimp_WINDOWFLAGS_OLD_VSCROLLBAR 0x00000004 /* deprecated */
#define wimp_WINDOWFLAGS_OLD_HSCROLLBAR 0x00000008 /* deprecated */
#define wimp_WINDOWFLAGS_AUTOREDRAW 0x00000010
#define wimp_WINDOWFLAGS_PANE 0x00000020
#define wimp_WINDOWFLAGS_ALLOW_OFF_SCREEN 0x00000040
#define wimp_WINDOWFLAGS_OLD_NO_BACK_NO_CLOSE 0x00000080 /* deprecated */
#define wimp_WINDOWFLAGS_CLICK_SCROLL_REQUEST 0x00000100
#define wimp_WINDOWFLAGS_AUTOREPEAT_SCROLL_REQUEST 0x00000200
#define wimp_WINDOWFLAGS_GCOL 0x00000400
#define wimp_WINDOWFLAGS_BACKDROP 0x00000800
#define wimp_WINDOWFLAGS_HOT_KEYS 0x00001000
#define wimp_WINDOWFLAGS_FORCE_ON_SCREEN 0x00002000
#define wimp_WINDOWFLAGS_IGNORE_RIGHT_EXTENT 0x00004000
#define wimp_WINDOWFLAGS_IGNORE_LOWER_EXTENT 0x00008000
#define wimp_WINDOWFLAGS_OPEN 0x00010000
#define wimp_WINDOWFLAGS_FULLY_VISIBLE 0x00020000
#define wimp_WINDOWFLAGS_FULL_SIZE 0x00040000
#define wimp_WINDOWFLAGS_TOGGLE_REQUEST 0x00080000
#define wimp_WINDOWFLAGS_INPUT_FOCUS 0x00100000
#define wimp_WINDOWFLAGS_FORCE_ONCE_ON_SCREEN 0x00200000
#define wimp_WINDOWFLAGS_RESERVED1 0x00400000
#define wimp_WINDOWFLAGS_RESERVED2 0x00800000
#define wimp_WINDOWFLAGS_HAS_BACK_ICON 0x01000000
#define wimp_WINDOWFLAGS_HAS_CLOSE_ICON 0x02000000
#define wimp_WINDOWFLAGS_HAS_TITLE_BAR 0x04000000
#define wimp_WINDOWFLAGS_HAS_TOGGLE_ICON 0x08000000
#define wimp_WINDOWFLAGS_HAS_VSCROLLBAR 0x10000000
#define wimp_WINDOWFLAGS_HAS_ADJUST_SIZE_ICON 0x20000000
#define wimp_WINDOWFLAGS_HAS_HSCROLLBAR 0x40000000
#define wimp_WINDOWFLAGS_USE_NEW_FLAGS 0x80000000
typedef struct
{
int window_handle; /* handle of window to open */
wimp_Bbox visible_area; /* visible area coords */
int scx,
scy; /* scroll offsets */
int behind; /* handle to open window behind */
} wimp_OpenWindow;
typedef struct
{
int window_handle; /* handle of window to open */
wimp_Bbox visible_area; /* visible area coords */
int scx,
scy; /* scroll offsets */
int behind; /* handle to open window behind */
/* The following requires nested window support in the Wimp */
int window_flags;
} wimp_NestedOpenWindow;
#define wimp_OpenWindow_TopOfStack (-1)
#define wimp_OpenWindow_BottomOfStack (-2)
#define wimp_OpenWindow_BehindBackDrop (-3)
typedef struct
{
wimp_OpenWindow open;
int flags; /* as passed to Wimp_CreateWindow */
} wimp_GetWindowState;
typedef struct
{
int window_handle;
wimp_Window window;
} wimp_GetWindowInfo;
typedef struct
{
int window_handle;
wimp_Bbox box;
} wimp_GetWindowOutline;
typedef struct
{
int window_handle;
int icon_handle;
int x_caret_offset;
int y_caret_offset;
int caret_height;
int caret_index;
} wimp_SetCaretPosition,
wimp_GetCaretPosition;
/* --- wimp Pointers --- */
/* for sprite op 36 */
#define wimp_POINTER_SHAPEFLAGS_SHAPE_NUMBER 0x00000001
#define wimp_POINTER_SHAPEFLAGS_NOT_SET_SHAPE 0x00000010
#define wimp_POINTER_SHAPEFLAGS_NOT_SET_PALETTE 0x00000020
#define wimp_POINTER_SHAPEFLAGS_NOT_PROG_SHAPE_NUM 0x00000040
/* --- wimp pointer info --- */
typedef struct
{
int x;
int y;
int button_state;
int window_handle;
int icon_handle;
} wimp_PointerInfo;
/* --- wimp RGB word --- */
typedef struct
{
char reserved;
char red;
char green;
char blue;
} wimp_RGB;
/* --- wimp palette block --- */
typedef struct
{
wimp_RGB colour[16];
wimp_RGB border;
wimp_RGB pointer[3];
} wimp_PaletteBlock;
/* --- wimp message numbers --- */
#define wimp_MQUIT 0
#define wimp_MDATA_SAVE 1
#define wimp_MDATA_SAVE_ACK 2
#define wimp_MDATA_LOAD 3
#define wimp_MDATA_LOAD_ACK 4
#define wimp_MDATA_OPEN 5
#define wimp_MRAM_FETCH 6
#define wimp_MRAM_TRANSMIT 7
#define wimp_MPRE_QUIT 8
#define wimp_MPALETTE_CHANGE 9
#define wimp_MSAVE_DESKTOP 10
#define wimp_MSHUT_DOWN 14
#define wimp_MSET_PRINTER 0x80147
#define wimp_MFILER_OPEN_DIR 0x400
#define wimp_MFILER_CLOSE_DIR 0x401
#define wimp_MFILER_OPEN_DIR_AT 0x402
#define wimp_MFILER_SELECTION_DIRECTORY 0x403
#define wimp_MFILER_ADD_SELECTION 0x404
#define wimp_MFILER_ACTION 0x405
#define wimp_MFILER_CONTROL_ACTION 0x406
#define wimp_MFILER_SELECTION 0x407
#define wimp_MNOTIFY 0x40040
#define wimp_MMENU_WARNING 0x400c0
#define wimp_MMODE_CHANGE 0x400c1
#define wimp_MTASK_INITIALISE 0x400c2
#define wimp_MTASK_CLOSE_DOWN 0x400c3
#define wimp_MSLOT_SIZE 0x400c4
#define wimp_MSET_SLOT 0x400c5
#define wimp_MTASK_NAME_RQ 0x400c6
#define wimp_MTASK_NAME_IS 0x400c7
#define wimp_MTASK_STARTED 0x400c8
#define wimp_MMENUS_DELETED 0x400c9
#define wimp_MHELP_REQUEST 0x502
#define wimp_MHELP_REPLY 0x503
#define wimp_MTOOLBOX_EVENT Toolbox_SWIChunkBase
typedef struct
{
int size; /* 20<=size<=256, multiple of 4 */
int task_handle; /* task handle of sender (filled in by wimp) */
int my_ref; /* unique ref number (filled in by wimp) */
int your_ref; /* (0==>none) if non-zero, acknowledge */
int action; /* message action code */
} wimp_MsgHdr;
typedef struct
{
int mouse_x;
int mouse_y;
int buttons;
int window_handle;
int icon_handle;
} wimp_HelpRequest;
typedef struct
{
char text[236];
} wimp_HelpReply;
typedef struct
{
wimp_Menu *submenu;
int x;
int y;
char data[256-sizeof(wimp_MsgHdr)-sizeof(wimp_Menu*)-sizeof(int)-sizeof(int)];
} wimp_MenuWarning;
typedef struct {
int window_handle;
int icon_handle;
int x;
int y;
int approx_size;
int filetype;
char filename [256-sizeof(wimp_MsgHdr)-6*sizeof(int)];
} wimp_DataSave, wimp_DataSaveAck, wimp_DataLoad, wimp_DataLoadAck;
/* The filename is a proposed leafname in Message_DataSave but a full pathname in later life.
In Risc OS 3 there is some extra information, word aligned, after the end of the full pathname
for Message_DataLoad block which is not indicated by the above data structure.
*/
typedef struct {
void *address;
int no_bytes;
} wimp_RAMFetch, wimp_RAMTransmit;
/* In a RAMFetch, no_bytes is the buffer length, for the Transmit it is the number of copied bytes.
*/
#define wimp_MAX_MSG_DATA_SIZE (sizeof(wimp_Message)-sizeof(wimp_MsgHdr))
typedef struct
{
wimp_MsgHdr hdr;
union
{
char chars[236];
int words[59];
wimp_HelpRequest help_request;
wimp_HelpReply help_reply;
wimp_MenuWarning menu_warning;
ToolboxEventMsg toolbox_event_msg;
wimp_DataSave data_save;
wimp_DataSaveAck data_save_ack;
wimp_DataLoad data_load;
wimp_DataLoadAck data_load_ack;
wimp_RAMFetch ram_fetch;
wimp_RAMTransmit ram_transmit;
} data;
} wimp_Message;
/* --- mouse clicks --- */
#define wimp_ADJUST_BUTTON 0x00000001
#define wimp_MENU_BUTTON 0x00000002
#define wimp_SELECT_BUTTON 0x00000004
typedef struct
{
int window_handle;
} wimp_RedrawWindowRequest;
typedef struct
{
wimp_OpenWindow open_block;
} wimp_OpenWindowRequest;
typedef struct
{
int window_handle;
} wimp_CloseWindowRequest;
typedef struct
{
int window_handle;
} wimp_PointerLeavingWindow;
typedef struct
{
int window_handle;
} wimp_PointerEnteringWindow;
typedef struct
{
int x;
int y;
int buttons;
int window_handle;
int icon_handle;
} wimp_MouseClick;
typedef struct
{
wimp_Bbox box;
} wimp_UserDragBox;
typedef struct
{
wimp_GetCaretPosition caret;
int key_code;
} wimp_KeyPressed;
typedef struct
{
int items[256];
} wimp_MenuSelection;
typedef struct
{
wimp_OpenWindow open_block;
int x_scroll_direction;
int y_scroll_direction;
} wimp_ScrollRequest;
typedef struct
{
wimp_GetCaretPosition caret;
} wimp_LoseCaret,
wimp_GainCaret;
typedef struct
{
int poll_word_address;
int poll_word_contents;
} wimp_PollWordNonZero;
typedef wimp_Message wimp_UserMessageAcknowledge;
typedef union
{
wimp_RedrawWindowRequest redraw_window_request;
wimp_OpenWindowRequest open_window_request;
wimp_CloseWindowRequest close_window_request;
wimp_PointerLeavingWindow pointer_leaving_window;
wimp_PointerEnteringWindow pointer_entering_window;
wimp_MouseClick mouse_click;
wimp_UserDragBox user_drag_box;
wimp_KeyPressed key_pressed;
wimp_MenuSelection menu_selection;
wimp_ScrollRequest scroll_request;
wimp_LoseCaret lose_caret;
wimp_GainCaret gain_caret;
wimp_PollWordNonZero pollword_nonzero;
wimp_UserMessageAcknowledge user_message_acknowledge;
wimp_Message msg;
ToolboxEvent toolbox_event;
} wimp_PollBlock;
/* type used to pass information to Wimp_DragBox (see PRM 3-145) */
typedef struct _drag_box {
int wimp_window;
int drag_type;
wimp_Bbox dragging_box;
wimp_Bbox parent_box;
int *workspace;
void (*draw)();
void (*remove)();
void (*move)();
} DragBox;
/* type used to pass/get info for Wimp_GetWindowState */
typedef struct _window_info {
int window;
wimp_Bbox visible;
int scx,scy;
int infront;
int flags;
} WindowState;
typedef struct _redraw_window {
int window;
wimp_Bbox visible;
int scx,scy;
wimp_Bbox current;
} WindowRedraw;
_kernel_oserror *wimp_initialise (int version,
char *name,
int *messages,
int *cversion,
int *task);
_kernel_oserror *wimp_create_window (wimp_Window *defn, int *handle);
_kernel_oserror *wimp_create_icon (int priority,
wimp_IconCreate *defn,
int *handle);
typedef struct {
int handle;
}wimp_DeleteWindow;
_kernel_oserror *wimp_delete_window (wimp_DeleteWindow *block);
_kernel_oserror *wimp_delete_icon (wimp_IconDelete *block);
_kernel_oserror *wimp_open_window (wimp_OpenWindow *show);
_kernel_oserror *wimp_open_window2 (wimp_NestedOpenWindow *show,
int parent_handle,
unsigned int alignment_flags);
_kernel_oserror *wimp_close_window (int *window_handle);
_kernel_oserror *wimp_poll (int mask,
wimp_PollBlock *block,
int *pollword,
int *event_code);
_kernel_oserror *wimp_redraw_window (WindowRedraw *block, int *more);
_kernel_oserror *wimp_update_window (WindowRedraw *block, int *more);
_kernel_oserror *wimp_get_rectangle (WindowRedraw *block, int *more);
_kernel_oserror *wimp_get_window_state (wimp_GetWindowState *state);
_kernel_oserror *wimp_get_window_state2 (wimp_GetWindowState *state,
int *parent_handle,
unsigned int *alignment_flags);
_kernel_oserror *wimp_get_window_info (wimp_GetWindowInfo *block);
_kernel_oserror *wimp_set_icon_state (wimp_SetIconState *block);
_kernel_oserror *wimp_get_icon_state (wimp_GetIconState *block);
_kernel_oserror *wimp_get_pointer_info (wimp_PointerInfo *block);
#define CancelDrag 0
_kernel_oserror *wimp_drag_box (DragBox *block);
_kernel_oserror *wimp_force_redraw (int window_handle,
int xmin,
int ymin,
int xmax,
int ymax);
_kernel_oserror *wimp_force_title_redraw (int window_handle);
_kernel_oserror *wimp_set_caret_position (int window_handle,
int icon_handle,
int xoffset,
int yoffset,
int height,
int index);
_kernel_oserror *wimp_get_caret_position (wimp_GetCaretPosition *block);
#define CloseMenu ((void *) -1)
_kernel_oserror *wimp_create_menu (void * handle,
int x,int y);
_kernel_oserror *wimp_decode_menu (void *data,
int *selections,
char *buffer);
_kernel_oserror *wimp_which_icon (int window_handle,
int *icons,
unsigned int mask,
unsigned int match);
_kernel_oserror *wimp_set_extent (int window_handle, wimp_Bbox *area);
_kernel_oserror *wimp_set_pointer_shape (int shape,
void *data,
int width,
int height,
int activex,
int activey);
_kernel_oserror *wimp_open_template (char *name);
_kernel_oserror *wimp_close_template (void);
_kernel_oserror *wimp_load_template (_kernel_swi_regs *regs);
_kernel_oserror *wimp_process_key (int keycode);
_kernel_oserror *wimp_close_down (int th);
_kernel_oserror *wimp_start_task (char *cl, int *handle);
int wimp_report_error (_kernel_oserror *er,
int flags,
char *name,
char *sprite,
void *area,
char *buttons);
_kernel_oserror *wimp_get_window_outline (wimp_GetWindowOutline *block);
_kernel_oserror *wimp_pollidle (int mask,
wimp_PollBlock *block,
int time,
int *pollword,
int *event_code);
_kernel_oserror *wimp_plot_icon (wimp_Icon *block);
_kernel_oserror *wimp_set_mode (int mode);
typedef struct {
unsigned int colours[16];
unsigned int border;
unsigned int pointer1;
unsigned int pointer2;
unsigned int pointer3;
} Palette;
_kernel_oserror *wimp_set_palette (Palette *palette);
_kernel_oserror *wimp_read_palette (Palette *palette);
_kernel_oserror *wimp_set_colour (int colour);
_kernel_oserror *wimp_send_message (int code,
void *block,
int handle,
int icon,
int *th);
_kernel_oserror *wimp_create_submenu (void * handle,
int x,int y);
typedef struct {
int r3;
int r4;
int r5;
int r6;
int r7;
}SpriteParams;
_kernel_oserror *wimp_sprite_op (int code,
char *name,
SpriteParams *p);
_kernel_oserror *wimp_base_of_sprites (void **rom,
void **ram);
_kernel_oserror *wimp_block_copy (int handle,
int sxmin,
int symin,
int sxmax,
int symax,
int dxmin,
int dymin);
_kernel_oserror *wimp_slot_size (int current,
int next,
int *current,
int *next,
int *free);
/* readpixtrans and claimfreememory not supported */
_kernel_oserror *wimp_command_window (int type);
_kernel_oserror *wimp_text_colour (int colour);
_kernel_oserror *wimp_transfer_block (int sh,
void *sbuf,
int dh,
void *dbuf,
int size);
typedef struct {
int r0;
int r1;
} WimpSysInfo;
_kernel_oserror *wimp_read_sys_info (int reason,
WimpSysInfo *results);
_kernel_oserror *wimp_set_font_colours (int fore,
int back);
_kernel_oserror *wimp_get_menu_state (int report,
int *state,
int window,
int icon);
/* no filter manager interface */
/* do not use these in toolbox applications */
_kernel_oserror *wimp_add_messages (int *list);
_kernel_oserror *wimp_remove_messages (int *list);
_kernel_oserror *wimp_set_colour_mapping (int which_palette,
int *bpp1,
int *bpp2,
int *bpp4);
_kernel_oserror *wimp_text_op (_kernel_swi_regs *regs);
/* no extend or set watchdog state */
_kernel_oserror *wimp_resize_icon (int window,
int icon,
int xmin,
int ymin,
int xmax,
int ymax);
#endif
/* 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.
*/
/* File: DCS.h
* Purpose: client-visible information for the DCS Object class
* Author: Ian Johnson
* History: 8-Dec-93: IDJ: created
*
*/
#ifndef __DCS_h
#define __DCS_h
#include "objects.window.h"
/* ----------------------------------------- DCS templates ----------------------------------------- */
/* flags */
#define DCS_GenerateAboutToBeShown 0x00000001
#define DCS_GenerateDialogueCompleted 0x00000002
/* template definition */
typedef struct
{
int flags;
char * title;
int max_title;
char * message;
int max_message;
char * window;
} DCSTemplate;
/* ------------------------------ DCS SWIs and Toolbox_MiscOp reason codes ------------------------- */
#define DCS_SWIChunkBase 0x82a80
#define DCS_ObjectClass DCS_SWIChunkBase
#define DCS_ClassSWI (DCS_SWIChunkBase + 0)
#define DCS_PostFilter (DCS_SWIChunkBase + 1)
#define DCS_PreFilter (DCS_SWIChunkBase + 2)
/* miscop reason codes */
#define DCS_GetWindowID 0
#define DCS_SetMessage 1
#define DCS_GetMessage 2
#define DCS_SetTitle 3
#define DCS_GetTitle 4
/* ----------------------------------------- DCS Toolbox Events ------------------------------------ */
/* event codes */
#define DCS_AboutToBeShown (DCS_SWIChunkBase+0)
#define DCS_Discard (DCS_SWIChunkBase+1)
#define DCS_Save (DCS_SWIChunkBase+2)
#define DCS_DialogueCompleted (DCS_SWIChunkBase+3)
#define DCS_Cancel (DCS_SWIChunkBase+4)
typedef struct
{
ToolboxEventHeader hdr;
int r2;
union
{
TopLeft top_left;
WindowShowObjectBlock full_spec;
} r3;
} DCSAboutToBeShownEvent;
typedef struct
{
ToolboxEventHeader hdr;
} DCSDiscardEvent;
typedef struct
{
ToolboxEventHeader hdr;
} DCSSaveEvent;
typedef struct
{
ToolboxEventHeader hdr;
} DCSDialogueCompletedEvent;
typedef struct
{
ToolboxEventHeader hdr;
} DCSCancelEvent;
/* ----------------------------------------- DCS Error Numbers ------------------------------------- */
#define DCS_ErrorBase (Program_Error | 0x0080b100)
#define DCS_NoMemory (DCS_ErrorBase+0x01)
#define DCS_TasksActive (DCS_ErrorBase+0x02)
#endif
/* 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.
*/
/* File: Quit.h
* Purpose: client-visible information for the Quit Object class
* Author: Ian Johnson
* History: 8-Dec-93: IDJ: created
*
*/
#ifndef __Quit_h
#define __Quit_h
#ifndef __toolbox_h
#include "objects.toolbox.h"
#endif
/* ----------------------------------------- Quit templates ----------------------------------------- */
/* flags */
#define Quit_GenerateAboutToBeShown 0x00000001
#define Quit_GenerateDialogueCompleted 0x00000002
/* template definition */
typedef struct
{
int flags;
char * title;
int max_title;
char * message;
int max_message;
char * window;
} QuitTemplate;
/* ------------------------------ Quit SWIs and Toolbox_MiscOp reason codes ------------------------- */
#define Quit_SWIChunkBase 0x82a90 /* &10 + DCSSWIChunk */
#define Quit_ObjectClass Quit_SWIChunkBase
#define Quit_ClassSWI (Quit_SWIChunkBase + 0)
#define Quit_PostFilter (Quit_SWIChunkBase + 1 - 0x10)
#define Quit_PreFilter (Quit_SWIChunkBase + 2 - 0x10) /* same as DCS */
/* miscop reason codes */
#define Quit_GetWindowID 0
#define Quit_SetMessage 1
#define Quit_GetMessage 2
#define Quit_SetTitle 3
#define Quit_GetTitle 4
/* ----------------------------------------- Quit Toolbox Events ------------------------------------ */
/* event codes */
#define Quit_AboutToBeShown (Quit_SWIChunkBase+0) /* remember these are just on from DCS */
#define Quit_Quit (Quit_SWIChunkBase+1)
#define Quit_DialogueCompleted (Quit_SWIChunkBase+2)
#define Quit_Cancel (Quit_SWIChunkBase+3)
typedef struct
{
ToolboxEventHeader hdr;
int r2;
union
{
TopLeft top_left;
WindowShowObjectBlock full_spec;
} r3;
} QuitAboutToBeShownEvent;
/* ----------------------------------------- Quit Error Numbers ------------------------------------- */
#endif
/* 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.
*/
/* File: colourdbox.h
* Purpose: ColourDbox Objects
* Author: Timothy G Roddis
* History: 4-Mar-94: TGR: created
*
*/
#ifndef __ColourDbox_h
#define __ColourDbox_h
#ifndef __os_h
#include "os.h"
#endif
#ifndef __window_h
#include "objects.window.h"
#endif
#ifndef __wimp_h
#include "twimp.h"
#endif
/* ColourDbox Templates **************************************************************************/
/* flags */
#define ColourDbox_GenerateShowEvent 0x00000001
#define ColourDbox_GenerateHideEvent 0x00000002
#define ColourDbox_IncludeNoneButton 0x00000004
#define ColourDbox_SelectNoneButton 0x00000008
/* templates */
typedef struct
{
unsigned int flags;
char *title;
int max_title;
/* char *help_message;
int max_help;
*/ unsigned int colour;
} ColourDboxTemplate;
/* ColourDbox SWI calls **************************************************************************/
#define ColourDbox_SWIChunkBase 0x829c0
#define ColourDbox_ObjectClass ColourDbox_SWIChunkBase
#define ColourDbox_ClassSWI (ColourDbox_SWIChunkBase + 0)
#define ColourDbox_PostFilter (ColourDbox_SWIChunkBase + 1)
#define ColourDbox_PreFilter (ColourDbox_SWIChunkBase + 2)
/* ColourDbox Methods ****************************************************************************/
#define ColourDbox_GetWimpHandle 0
#define ColourDbox_GetDialogueHandle 1
#define ColourDbox_SetColour 2
#define ColourDbox_GetColour 3
#define ColourDbox_SetColourModel 4
#define ColourDbox_GetColourModel 5
#define ColourDbox_SetNoneAvailable 6
#define ColourDbox_GetNoneAvailable 7
#define ColourDbox_SetHelpMessage 8
#define ColourDbox_GetHelpMessage 9
/* ColourDbox Toolbox Events *********************************************************************/
#define ColourDbox_AboutToBeShown ColourDbox_SWIChunkBase
#define ColourDbox_DialogueCompleted (ColourDbox_SWIChunkBase + 1)
#define ColourDbox_ColourSelected (ColourDbox_SWIChunkBase + 2)
typedef struct {
ToolboxEventHeader hdr;
int show_type;
union {
struct {
int x,y;
} coords;
WindowShowObjectBlock full;
} info;
} ColourDbox_AboutToBeShown_Event;
typedef struct {
ToolboxEventHeader hdr;
} ColourDbox_DialogueCompleted_Event;
typedef struct {
ToolboxEventHeader hdr;
unsigned int colour_block[(212/4)];
} ColourDbox_ColourSelected_Event;
/* ColourDbox Errors *****************************************************************************/
#define ColourDbox_ErrorBase (Program_Error | 0x0080AE00)
#define ColourDbox_AllocFailed (ColourDbox_ErrorBase+0x01)
#define ColourDbox_ShortBuffer (ColourDbox_ErrorBase+0x02)
#define ColourDbox_NoSuchTask (ColourDbox_ErrorBase+0x11)
#define ColourDbox_NoSuchMethod (ColourDbox_ErrorBase+0x12)
#define ColourDbox_NoSuchMiscOpMethod (ColourDbox_ErrorBase+0x13)
#define ColourDbox_TasksActive (ColourDbox_ErrorBase+0x00)
#endif
/* 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.
*/
/* File: colourmenu.h
* Purpose: Colour Menu Objects
* Author: Timothy G Roddis
* History: 10-Jan-94: TGR: created
*
*/
#ifndef __colourmenu_h
#define __colourmenu_h
#ifndef __toolbox_h
#include "objects.toolbox.h"
#endif
/* Colour Menu Templates ************************************************************************/
typedef struct
{
int flags;
char *title;
int max_title;
int colour;
} ColourMenuTemplate;
#define ColourMenu_GenerateShowEvent 0x00000001
#define ColourMenu_GenerateHideEvent 0x00000002
#define ColourMenu_NoneEntry 0x00000004
/* Colour Menu SWI calls ************************************************************************/
#define ColourMenu_SWIChunkBase 0x82980
#define ColourMenu_ObjectClass ColourMenu_SWIChunkBase
#define ColourMenu_ClassSWI (ColourMenu_SWIChunkBase + 0)
#define ColourMenu_PostFilter (ColourMenu_SWIChunkBase + 1)
#define ColourMenu_PreFilter (ColourMenu_SWIChunkBase + 2)
/* Colour Menu Methods **************************************************************************/
#define ColourMenu_SetColour 0
#define ColourMenu_GetColour 1
#define ColourMenu_SetNoneAvailable 2
#define ColourMenu_GetNoneAvailable 3
#define ColourMenu_SetTitle 4
#define ColourMenu_GetTitle 5
/* Colour Menu Toolbox Events *******************************************************************/
#define ColourMenu_AboutToBeShown ColourMenu_SWIChunkBase
#define ColourMenu_HasBeenHidden (ColourMenu_SWIChunkBase + 1)
#define ColourMenu_Selection (ColourMenu_SWIChunkBase + 2)
typedef struct {
ToolboxEventHeader hdr;
int show_type;
int x,y;
} ColourMenu_AboutToBeShown_Event;
typedef struct {
ToolboxEventHeader hdr;
} ColourMenu_HasBeenHidden_Event;
typedef struct {
ToolboxEventHeader hdr;
int colour;
} ColourMenu_Selection_Event;
/* Colour Menu Errors ****************************************************************************/
#define ColourMenu_ErrorBase (Program_Error | 0x0080AD00)
#define ColourMenu_AllocFailed (ColourMenu_ErrorBase+0x01)
#define ColourMenu_ShortBuffer (ColourMenu_ErrorBase+0x02)
#define ColourMenu_NoSuchTask (ColourMenu_ErrorBase+0x11)
#define ColourMenu_NoSuchMethod (ColourMenu_ErrorBase+0x12)
#define ColourMenu_NoSuchMiscOpMethod (ColourMenu_ErrorBase+0x13)
#define ColourMenu_TasksActive (ColourMenu_ErrorBase+0x00)
#endif
/* 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.
*/
/* File: fileinfo.h
* Purpose: FileInfo Objects
* Author: Timothy G Roddis
* History: 7-Feb-94: TGR: created
*
*/
#ifndef __FileInfo_h
#define __FileInfo_h
#ifndef __os_h
#include "os.h"
#endif
#ifndef __window_h
#include "objects.window.h"
#endif
#ifndef __wimp_h
#include "twimp.h"
#endif
/* FileInfo SWI calls ****************************************************************************/
#define FileInfo_SWIChunkBase 0x82ac0
#define FileInfo_ObjectClass FileInfo_SWIChunkBase
#define FileInfo_ClassSWI (FileInfo_SWIChunkBase + 0)
#define FileInfo_PostFilter (FileInfo_SWIChunkBase + 1)
#define FileInfo_PreFilter (FileInfo_SWIChunkBase + 2)
/* FileInfo Templates ****************************************************************************/
/* flags */
#define FileInfo_GenerateShowEvent 0x00000001
#define FileInfo_GenerateHideEvent 0x00000002
/* templates */
typedef struct
{
int flags;
char *title;
int max_title;
int modified;
int filetype;
char *filename;
int filesize;
os_UTC date;
char *window;
} FileInfoTemplate;
/* component IDs */
#define FileInfo_ComponentIDBase (FileInfo_SWIChunkBase<<4)
#define FileInfo_DisplayField_Date (FileInfo_ComponentIDBase)
#define FileInfo_DisplayField_FileSize (FileInfo_ComponentIDBase + 1)
#define FileInfo_DisplayField_FileName (FileInfo_ComponentIDBase + 2)
#define FileInfo_DisplayField_FileType (FileInfo_ComponentIDBase + 3)
#define FileInfo_DisplayField_Modified (FileInfo_ComponentIDBase + 4)
#define FileInfo_Button_FileType (FileInfo_ComponentIDBase + 5)
/* FileInfo Methods ******************************************************************************/
#define FileInfo_GetWindowID 0
#define FileInfo_SetModified 1
#define FileInfo_GetModified 2
#define FileInfo_SetFileType 3
#define FileInfo_GetFileType 4
#define FileInfo_SetFileName 5
#define FileInfo_GetFileName 6
#define FileInfo_SetFileSize 7
#define FileInfo_GetFileSize 8
#define FileInfo_SetDate 9
#define FileInfo_GetDate 10
#define FileInfo_SetTitle 11
#define FileInfo_GetTitle 12
/* FileInfo Toolbox Events ***********************************************************************/
#define FileInfo_AboutToBeShown FileInfo_SWIChunkBase
#define FileInfo_DialogueCompleted (FileInfo_SWIChunkBase + 1)
typedef struct {
ToolboxEventHeader hdr;
int show_type;
union {
struct {
int x,y;
} coords;
WindowShowObjectBlock full;
} info;
} FileInfo_AboutToBeShown_Event;
typedef struct {
ToolboxEventHeader hdr;
} FileInfo_DialogueCompleted_Event;
/* FileInfo Errors *******************************************************************************/
#define FileInfo_ErrorBase (Program_Error | 0x0080B200)
#define FileInfo_AllocFailed (FileInfo_ErrorBase+0x01)
#define FileInfo_ShortBuffer (FileInfo_ErrorBase+0x02)
#define FileInfo_NoSuchTask (FileInfo_ErrorBase+0x11)
#define FileInfo_NoSuchMethod (FileInfo_ErrorBase+0x12)
#define FileInfo_NoSuchMiscOpMethod (FileInfo_ErrorBase+0x13)
#define FileInfo_TasksActive (FileInfo_ErrorBase+0x00)
#endif
/* 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.
*/
/* File: fontdbox.h
* Purpose: FontDbox Objects
* Author: Timothy G Roddis
* History: 2-Mar-94: TGR: created
*
*/
#ifndef __FontDbox_h
#define __FontDbox_h
#ifndef __os_h
#include "os.h"
#endif
#ifndef __window_h
#include "objects.window.h"
#endif
#ifndef __wimp_h
#include "twimp.h"
#endif
/* FontDbox SWI calls *******************************************************************************/
#define FontDbox_SWIChunkBase 0x82a00
#define FontDbox_ObjectClass FontDbox_SWIChunkBase
#define FontDbox_ClassSWI (FontDbox_SWIChunkBase + 0)
#define FontDbox_PostFilter (FontDbox_SWIChunkBase + 1)
#define FontDbox_PreFilter (FontDbox_SWIChunkBase + 2)
/* FontDbox SWI flags ***************************************************************************/
#define FontDbox_SetSize_Height 1
#define FontDbox_SetSize_Aspect 2
/* FontDbox Templates *******************************************************************************/
/* flags */
#define FontDbox_GenerateShowEvent 0x00000001
#define FontDbox_GenerateHideEvent 0x00000002
#define FontDbox_IncludeSystemFont 0x00000004
/* templates */
typedef struct
{
int flags;
char *title;
int max_title;
char *initial_font;
int initial_height;
int initial_aspect;
char *try_string;
char *window;
} FontDboxTemplate;
/* component IDs */
#define FontDbox_ComponentIDBase (FontDbox_SWIChunkBase<<4)
#define FontDbox_ActionButton_Apply (FontDbox_ComponentIDBase)
#define FontDbox_ActionButton_Cancel (FontDbox_ComponentIDBase + 1)
#define FontDbox_ActionButton_Try (FontDbox_ComponentIDBase + 2)
#define FontDbox_WritableField_TryString (FontDbox_ComponentIDBase + 3)
#define FontDbox_NumberRange_AspectRatio (FontDbox_ComponentIDBase + 4)
#define FontDbox_NumberRange_Height (FontDbox_ComponentIDBase + 5)
#define FontDbox_ActionButton_StandardSize(A) (FontDbox_ComponentIDBase + (A+6)) /* For 0 <= A <= 9 */
#define FontDbox_StringSet_Style (FontDbox_ComponentIDBase + 16)
#define FontDbox_StringSet_Weight (FontDbox_ComponentIDBase + 17)
#define FontDbox_StringSet_Font (FontDbox_ComponentIDBase + 18)
/* FontDbox Methods *********************************************************************************/
#define FontDbox_GetWindowID 0
#define FontDbox_SetFont 1
#define FontDbox_GetFont 2
#define FontDbox_SetSize 3
#define FontDbox_GetSize 4
#define FontDbox_SetTryString 5
#define FontDbox_GetTryString 6
#define FontDbox_SetTitle 7
#define FontDbox_GetTitle 8
/* FontDbox Toolbox Events **************************************************************************/
#define FontDbox_AboutToBeShown FontDbox_SWIChunkBase
#define FontDbox_DialogueCompleted (FontDbox_SWIChunkBase + 1)
#define FontDbox_ApplyFont (FontDbox_SWIChunkBase + 2)
typedef struct {
ToolboxEventHeader hdr;
int show_type;
union {
struct {
int x,y;
} coords;
WindowShowObjectBlock full;
} info;
} FontDbox_AboutToBeShown_Event;
typedef struct {
ToolboxEventHeader hdr;
} FontDbox_DialogueCompleted_Event;
typedef struct {
ToolboxEventHeader hdr;
unsigned int height;
unsigned int aspect;
char font[208];
} FontDbox_ApplyFont_Event;
/* FontDbox Errors **********************************************************************************/
#define FontDbox_ErrorBase (Program_Error | 0x0080AF00)
#define FontDbox_AllocFailed (FontDbox_ErrorBase+0x01)
#define FontDbox_ShortBuffer (FontDbox_ErrorBase+0x02)
#define FontDbox_NoSuchTask (FontDbox_ErrorBase+0x11)
#define FontDbox_NoSuchMethod (FontDbox_ErrorBase+0x12)
#define FontDbox_NoSuchMiscOpMethod (FontDbox_ErrorBase+0x13)
#define FontDbox_NoSuchFont (FontDbox_ErrorBase+0x14)
#define FontDbox_NoFonts (FontDbox_ErrorBase+0x21)
#define FontDbox_NotPersistent (FontDbox_ErrorBase+0x22)
#define FontDbox_OutOfMessageSpace (FontDbox_ErrorBase+0x31)
#define FontDbox_TasksActive (FontDbox_ErrorBase+0x00)
#endif
/* 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.
*/
/* File: fontmenu.h
* Purpose: Font Menu Objects
* Author: Timothy G Roddis
* History: 10-Jan-94: TGR: created
*
*/
#ifndef __fontmenu_h
#define __fontmenu_h
#ifndef __toolbox_h
#include "objects.toolbox.h"
#endif
/* Font Menu Templates **************************************************************************/
#define FontMenu_GenerateShowEvent 0x00000001
#define FontMenu_GenerateHideEvent 0x00000002
#define FontMenu_SystemFont 0x00000004
typedef struct
{
int flags;
char *ticked_font;
} FontMenuTemplate;
/* Font Menu SWI calls **************************************************************************/
#define FontMenu_SWIChunkBase 0x82a40
#define FontMenu_ObjectClass FontMenu_SWIChunkBase
#define FontMenu_ClassSWI (FontMenu_SWIChunkBase + 0)
#define FontMenu_PostFilter (FontMenu_SWIChunkBase + 1)
#define FontMenu_PreFilter (FontMenu_SWIChunkBase + 2)
/* Font Menu Methods ****************************************************************************/
#define FontMenu_SetFont 0
#define FontMenu_GetFont 1
/* Font Menu Toolbox Events *********************************************************************/
#define FontMenu_AboutToBeShown FontMenu_SWIChunkBase
#define FontMenu_HasBeenHidden (FontMenu_SWIChunkBase + 1)
#define FontMenu_Selection (FontMenu_SWIChunkBase + 2)
typedef struct {
ToolboxEventHeader hdr;
int show_type;
int x,y;
} FontMenu_AboutToBeShown_Event;
typedef struct {
ToolboxEventHeader hdr;
} FontMenu_HasBeenHidden_Event;
typedef struct {
ToolboxEventHeader hdr;
char font_id[216];
} FontMenu_Selection_Event;
/* Font Menu Errors ******************************************************************************/
#define FontMenu_ErrorBase (Program_Error | 0x0080B000)
#define FontMenu_AllocFailed (FontMenu_ErrorBase+0x01)
#define FontMenu_ShortBuffer (FontMenu_ErrorBase+0x02)
#define FontMenu_NoSuchTask (FontMenu_ErrorBase+0x11)
#define FontMenu_NoSuchMethod (FontMenu_ErrorBase+0x12)
#define FontMenu_NoSuchMiscOpMethod (FontMenu_ErrorBase+0x13)
#define FontMenu_TasksActive (FontMenu_ErrorBase+0x00)
#endif
/* 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.
*/
/* File: generic.h
* Purpose: client-visible information for the generic Object class
* Author: Ian Johnson
* History: 8-Dec-93: IDJ: created
*
*/
#ifndef __generic_h
#define __generic_h
/* ----------------------------------------- Generic templates ----------------------------------------- */
/* flags */
/* template definition */
typedef struct
{
int flags;
} GenericTemplate;
/* ------------------------------ Generic SWIs and Toolbox_MiscOp reason codes ------------------------- */
#define Generic_SWIChunkBase 0x82840
#define Generic_ObjectClass Generic_SWIChunkBase
#define Generic_ClassSWI (Generic_SWIChunkBase + 0)
#define Generic_PostFilter (Generic_SWIChunkBase + 1)
#define Generic_PreFilter (Generic_SWIChunkBase + 2)
/* miscop reason codes */
/* ----------------------------------------- Generic Toolbox Events ------------------------------------ */
/* event codes */
/* ----------------------------------------- Generic Error Numbers ------------------------------------- */
#endif
/* 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.
*/
/* File: iconbar.h
* Purpose: Iconbar Icon Objects
* Author: Ian Johnson
* History: 8-Dec-93: IDJ: created
*
*/
#ifndef __iconbar_h
#define __iconbar_h
#ifndef __toolbox_h
#include "objects.toolbox.h"
#endif
/* ----------------------------------------- Iconbar templates ----------------------------------------- */
/* flags */
#define Iconbar_GenerateSelectAboutToBeShown 0x00000001
#define Iconbar_GenerateAdjustAboutToBeShown 0x00000002
#define Iconbar_ShowSelectTransient 0x00000004
#define Iconbar_ShowAdjustTransient 0x00000008
#define Iconbar_HasText 0x00000010 /* resreved bit - not settable by client */
#define Iconbar_GenerateSelectClickedEvent 0x00000020
#define Iconbar_GenerateAdjustClickedEvent 0x00000040
#define Iconbar_ShowSelectCentred 0x00000080
#define Iconbar_ShowAdjustCentred 0x00000100
#define Iconbar_ShowSelectAtPointer 0x00000200
#define Iconbar_ShowAdjustAtPointer 0x00000400
#define Iconbar_ValidFlags 0x000007ef
/* template definition */
typedef struct
{
int flags;
int position;
int priority;
char *sprite_name;
int max_sprite;
char *text;
int max_text_len;
char *menu;
int select_event;
int adjust_event;
char *select_show;
char *adjust_show;
char *help_message;
int max_help;
} IconbarTemplate;
/* ------------------------------ Iconbar SWIs and Toolbox_MiscOp reason codes ------------------------- */
#define Iconbar_SWIChunkBase 0x82900
#define Iconbar_ObjectClass Iconbar_SWIChunkBase
#define Iconbar_ClassSWI (Iconbar_SWIChunkBase + 0)
#define Iconbar_PostFilter (Iconbar_SWIChunkBase + 1)
#define Iconbar_PreFilter (Iconbar_SWIChunkBase + 2)
/* miscop reason codes */
#define Iconbar_GetIconHandle 0
#define Iconbar_SetMenu 1
#define Iconbar_GetMenu 2
#define Iconbar_SetEvent 3
#define Iconbar_GetEvent 4
#define Iconbar_SetShow 5
#define Iconbar_GetShow 6
#define Iconbar_SetHelpMessage 7
#define Iconbar_GetHelpMessage 8
#define Iconbar_SetText 9
#define Iconbar_GetText 10
#define Iconbar_SetSprite 11
#define Iconbar_GetSprite 12
/* flags for Iconbar_SetEvent */
#define Iconbar_SetEvent_Select 0x00000001
#define Iconbar_SetEvent_Adjust 0x00000002
/* flags for Iconbar_SetShow */
#define Iconbar_SetShow_Select 0x00000001
#define Iconbar_SetShow_Adjust 0x00000002
/* ----------------------------------------- Iconbar Toolbox Events ------------------------------------ */
/* event codes */
#define Iconbar_Clicked (Iconbar_SWIChunkBase + 0)
#define Iconbar_SelectAboutToBeShown (Iconbar_SWIChunkBase + 1)
#define Iconbar_AdjustAboutToBeShown (Iconbar_SWIChunkBase + 2)
/* clicked event block */
#define Iconbar_Clicked_Adjust 0x00000001
#define Iconbar_Clicked_Select 0x00000004
typedef struct
{
ToolboxEventHeader hdr;
} IconbarClickedEvent;
/* object about to be shown on SELECT/ADJUST click */
typedef struct
{
ToolboxEventHeader hdr;
ObjectID id;
} IconbarAboutToBeShownEvent;
/* ----------------------------------------- Iconbar Error Numbers ------------------------------------- */
#define Iconbar_ErrorBase (Program_Error | 0x80ab00)
#define Iconbar_AllocFailed (Iconbar_ErrorBase+0x01)
#define Iconbar_ShortBuffer (Iconbar_ErrorBase+0x02)
#define Iconbar_BadObjectVersion (Iconbar_ErrorBase+0x03)
#define Iconbar_BadFlags (Iconbar_ErrorBase+0x04)
#define Iconbar_NoSuchTask (Iconbar_ErrorBase+0x11)
#define Iconbar_NoSuchMethod (Iconbar_ErrorBase+0x12)
#define Iconbar_NoSuchMiscOpMethod (Iconbar_ErrorBase+0x13)
#define Iconbar_WrongShowType (Iconbar_ErrorBase+0x14)
#define Iconbar_NoText (Iconbar_ErrorBase+0x20)
#define Iconbar_TasksActive (Iconbar_ErrorBase+0x21)
#endif
/* 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.
*/
/* File: menu.h
* Purpose: Menu Objects
* Author: Timothy G Roddis
* History: 8-Dec-93: TGR: created
*
*/
#ifndef __menu_h
#define __menu_h
#ifndef __toolbox_h
#include "objects.toolbox.h"
#endif
/* Menu Templates *******************************************************************************/
/* flags */
#define Menu_GenerateShowEvent 0x00000001
#define Menu_GenerateHideEvent 0x00000002
#define Menu_Entry_Ticked 0x00000001
#define Menu_Entry_DottedLine 0x00000002
#define Menu_Entry_Faded 0x00000100
#define Menu_Entry_IsSprite 0x00000200
#define Menu_Entry_SubMenu 0x00000400
#define Menu_Entry_GenerateSubMenuEvent 0x00000800
#define Menu_Entry_ClickShowTransient 0x00001000
#define Menu_Entry_ClickShowCentred 0x00002000
#define Menu_Entry_ClickShowAtPointer 0x00004000
/* templates */
typedef struct
{
int flags;
char *title;
int max_title;
char *help_message;
int max_help;
int num_entries;
} MenuTemplateHeader101;
typedef struct
{
int flags;
char *title;
int max_title;
char *help_message;
int max_help;
int show_event;
int hide_event;
int num_entries;
} MenuTemplateHeader102, MenuTemplateHeader; /* move name 'MenuTemplateHeader' to current version's struct upon update */
typedef struct
{
int flags;
ComponentID component_id;
char *text;
int max_text;
char *click_show;
char *submenu_show;
int submenu_event;
int click_event;
char *help_message;
int max_entry_help;
} MenuTemplateEntry;
typedef struct {
MenuTemplateHeader hdr;
/* array of entries follows in memory (as defined below) */
} MenuTemplate;
/* access to templates */
/* #define menu_template_entry(m, i) (((MenuTemplateEntry*)(&m->hdr + 1)) + i)*/
/* Menu SWI calls *******************************************************************************/
#define Menu_SWIChunkBase 0x828c0
#define Menu_ObjectClass Menu_SWIChunkBase
#define Menu_ClassSWI (Menu_SWIChunkBase + 0)
#define Menu_PostFilter (Menu_SWIChunkBase + 1)
#define Menu_PreFilter (Menu_SWIChunkBase + 2)
#define Menu_UpdateTree (Menu_SWIChunkBase + 3)
/* Menu Methods *********************************************************************************/
#define Menu_SetTick 0
#define Menu_GetTick 1
#define Menu_SetFade 2
#define Menu_GetFade 3
#define Menu_SetEntryText 4
#define Menu_GetEntryText 5
#define Menu_SetEntrySprite 6
#define Menu_GetEntrySprite 7
#define Menu_SetSubMenuShow 8
#define Menu_GetSubMenuShow 9
#define Menu_SetSubMenuEvent 10
#define Menu_GetSubMenuEvent 11
#define Menu_SetClickShow 12
#define Menu_GetClickShow 13
#define Menu_SetClickEvent 14
#define Menu_GetClickEvent 15
#define Menu_SetHelpMessage 16
#define Menu_GetHelpMessage 17
#define Menu_SetEntryHelpMessage 18
#define Menu_GetEntryHelpMessage 19
#define Menu_AddEntry 20
#define Menu_RemoveEntry 21
#define Menu_GetHeight 22
#define Menu_GetWidth 23
#define Menu_SetTitle 24
#define Menu_GetTitle 25
/* Menu Toolbox Events **************************************************************************/
#define Menu_AboutToBeShown Menu_SWIChunkBase
#define Menu_HasBeenHidden (Menu_SWIChunkBase + 1)
#define Menu_SubMenu (Menu_SWIChunkBase + 2)
#define Menu_Selection (Menu_SWIChunkBase + 3)
typedef struct {
ToolboxEventHeader hdr;
int show_type;
int x,y;
} Menu_AboutToBeShown_Event;
typedef struct {
ToolboxEventHeader hdr;
} Menu_HasBeenHidden_Event;
typedef struct {
ToolboxEventHeader hdr;
int x,y;
} Menu_SubMenu_Event;
typedef struct {
ToolboxEventHeader hdr;
} Menu_Selection_Event;
/* Menu Errors **********************************************************************************/
#define Menu_ErrorBase (Program_Error | 0x0080AA00)
#define Menu_AllocFailed (Menu_ErrorBase+0x01)
#define Menu_ShortBuffer (Menu_ErrorBase+0x02)
#define Menu_NoSuchTask (Menu_ErrorBase+0x11)
#define Menu_NoSuchMethod (Menu_ErrorBase+0x12)
#define Menu_NoSuchMiscOpMethod (Menu_ErrorBase+0x13)
#define Menu_NoSuchComponent (Menu_ErrorBase+0x14)
#define Menu_SpriteNotText (Menu_ErrorBase+0x21)
#define Menu_TextNotSprite (Menu_ErrorBase+0x22)
#define Menu_NoTopMenu (Menu_ErrorBase+0x31)
#define Menu_UnknownSubMenu (Menu_ErrorBase+0x32)
#define Menu_NoSpriteName (Menu_ErrorBase+0x33)
#define Menu_TasksActive (Menu_ErrorBase+0x00)
#endif
/* 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.
*/
/* File: printdbox.h
* Purpose: PrintDbox Objects
* Author: Timothy G Roddis
* History: 25-May-94: TGR: created
*
*/
#ifndef __PrintDbox_h
#define __PrintDbox_h
#ifndef __os_h
#include "os.h"
#endif
#ifndef __window_h
#include "objects.window.h"
#endif
#ifndef __wimp_h
#include "twimp.h"
#endif
/* PrintDbox SWI calls ****************************************************************************/
#define PrintDbox_SWIChunkBase 0x82b00
#define PrintDbox_ObjectClass PrintDbox_SWIChunkBase
#define PrintDbox_ClassSWI (PrintDbox_SWIChunkBase + 0)
#define PrintDbox_PostFilter (PrintDbox_SWIChunkBase + 1)
#define PrintDbox_PreFilter (PrintDbox_SWIChunkBase + 2)
/* PrintDbox Templates ****************************************************************************/
/* flags */
#define PrintDbox_GenerateShowEvent 0x00000001
#define PrintDbox_GenerateHideEvent 0x00000002
#define PrintDbox_GenerateShowSetupEvent 0x00000004
#define PrintDbox_IncludeAllFromTo 0x00000008
#define PrintDbox_IncludeCopies 0x00000010
#define PrintDbox_IncludeScale 0x00000020
#define PrintDbox_IncludeOrientation 0x00000040
#define PrintDbox_IncludeSave 0x00000080
#define PrintDbox_IncludeSetUp 0x00000100
#define PrintDbox_IncludeDraft 0x00000200
#define PrintDbox_SelectFromTo 0x00000400
#define PrintDbox_SelectSideways 0x00000800
#define PrintDbox_SelectDraft 0x00001000
/* templates */
typedef struct
{
int flags;
int from;
int to;
int copies;
int scale;
char *further_options;
char *window;
} PrintDboxTemplate;
/* display field component IDs */
#define PrintDbox_ComponentIDBase (PrintDbox_SWIChunkBase<<4)
#define PrintDbox_ActionButton_Print (PrintDbox_ComponentIDBase)
#define PrintDbox_ActionButton_Save (PrintDbox_ComponentIDBase + 1)
#define PrintDbox_ActionButton_Cancel (PrintDbox_ComponentIDBase + 2)
#define PrintDbox_RadioButton_FromTo (PrintDbox_ComponentIDBase + 3)
#define PrintDbox_RadioButton_All (PrintDbox_ComponentIDBase + 4)
#define PrintDbox_WritableField_From (PrintDbox_ComponentIDBase + 5)
#define PrintDbox_WritableField_To (PrintDbox_ComponentIDBase + 6)
#define PrintDbox_NumberRange_Copies (PrintDbox_ComponentIDBase + 7)
#define PrintDbox_NumberRange_Scale (PrintDbox_ComponentIDBase + 8)
#define PrintDbox_RadioButton_Upright (PrintDbox_ComponentIDBase + 9)
#define PrintDbox_RadioButton_Sideways (PrintDbox_ComponentIDBase + 10)
#define PrintDbox_OptionButton_Draft (PrintDbox_ComponentIDBase + 11)
#define PrintDbox_ActionButton_SetUp (PrintDbox_ComponentIDBase + 12)
#define PrintDbox_Label_To (PrintDbox_ComponentIDBase + 13)
#define PrintDbox_Label_Copies (PrintDbox_ComponentIDBase + 14)
#define PrintDbox_Label_Scale (PrintDbox_ComponentIDBase + 15)
#define PrintDbox_Label_Percent (PrintDbox_ComponentIDBase + 16)
/* PrintDbox Methods ******************************************************************************/
#define PrintDbox_GetWindowID 0
#define PrintDbox_SetPageRange 1
#define PrintDbox_GetPageRange 2
#define PrintDbox_SetCopies 3
#define PrintDbox_GetCopies 4
#define PrintDbox_SetScale 5
#define PrintDbox_GetScale 6
#define PrintDbox_SetOrientation 7
#define PrintDbox_GetOrientation 8
#define PrintDbox_GetTitle 9
#define PrintDbox_SetDraft 10
#define PrintDbox_GetDraft 11
/* PrintDbox Toolbox Events ***********************************************************************/
#define PrintDbox_AboutToBeShown PrintDbox_SWIChunkBase
#define PrintDbox_DialogueCompleted (PrintDbox_SWIChunkBase + 1)
#define PrintDbox_SetUpAboutToBeShown (PrintDbox_SWIChunkBase + 2)
#define PrintDbox_Save (PrintDbox_SWIChunkBase + 3)
#define PrintDbox_SetUp (PrintDbox_SWIChunkBase + 4)
#define PrintDbox_Print (PrintDbox_SWIChunkBase + 5)
#define PrintDboxEvents_PrintSave_Sideways 0x00000001
#define PrintDboxEvents_PrintSave_Draft 0x00000002
typedef struct {
ToolboxEventHeader hdr;
int show_type;
union {
struct {
int x,y;
} coords;
WindowShowObjectBlock full;
} info;
} PrintDbox_AboutToBeShown_Event;
typedef struct {
ToolboxEventHeader hdr;
} PrintDbox_DialogueCompleted_Event;
typedef struct {
ToolboxEventHeader hdr;
ObjectID object_id;
int show_type;
union {
struct {
int x,y;
} coords;
WindowShowObjectBlock full;
} info;
} PrintDbox_SetUpAboutToBeShown_Event;
typedef struct {
ToolboxEventHeader hdr;
int start_page;
int finish_page;
int copies;
int scale_factor;
} PrintDbox_Save_Event;
typedef struct {
ToolboxEventHeader hdr;
} PrintDbox_SetUp_Event;
typedef struct {
ToolboxEventHeader hdr;
int start_page;
int finish_page;
int copies;
int scale_factor;
} PrintDbox_Print_Event;
/* PrintDbox Errors *******************************************************************************/
#define PrintDbox_ErrorBase (Program_Error | 0x0080B300)
#define PrintDbox_AllocFailed (PrintDbox_ErrorBase+0x01)
#define PrintDbox_ShortBuffer (PrintDbox_ErrorBase+0x02)
#define PrintDbox_NoSuchTask (PrintDbox_ErrorBase+0x11)
#define PrintDbox_NoSuchMethod (PrintDbox_ErrorBase+0x12)
#define PrintDbox_NoSuchMiscOpMethod (PrintDbox_ErrorBase+0x13)
#define PrintDbox_TasksActive (PrintDbox_ErrorBase+0x00)
#endif
/* 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.
*/
/* File: proginfo.h
* Purpose: ProgInfo Objects
* Author: Timothy G Roddis
* History: 14-Feb-94: TGR: created
* 12-Dec-97: SNB: Altered template and added new URI/event methods.
*
*/
#ifndef __ProgInfo_h
#define __ProgInfo_h
#ifndef __os_h
#include "os.h"
#endif
#ifndef __window_h
#include "objects.window.h"
#endif
#ifndef __wimp_h
#include "twimp.h"
#endif
/* ProgInfo SWI calls ****************************************************************************/
#define ProgInfo_SWIChunkBase 0x82b40
#define ProgInfo_ObjectClass ProgInfo_SWIChunkBase
#define ProgInfo_ClassSWI (ProgInfo_SWIChunkBase + 0)
#define ProgInfo_PostFilter (ProgInfo_SWIChunkBase + 1)
#define ProgInfo_PreFilter (ProgInfo_SWIChunkBase + 2)
/* ProgInfo Templates ****************************************************************************/
/* flags */
#define ProgInfo_GenerateShowEvent 0x00000001
#define ProgInfo_GenerateHideEvent 0x00000002
#define ProgInfo_IncludeLicenceType 0x00000004
#define ProgInfo_IncludeWebPageButton 0x00000008
#define ProgInfo_GenerateLaunchEvent 0x00000010
/* templates */
typedef struct
{
int flags;
char *title;
int max_title;
char *purpose;
char *author;
int licence_type;
char *version;
char *window;
char *uri;
int event;
} ProgInfoTemplate;
/* display field component IDs */
#define ProgInfo_ComponentIDBase (ProgInfo_SWIChunkBase<<4)
#define ProgInfo_DisplayField_Name (ProgInfo_ComponentIDBase)
#define ProgInfo_DisplayField_Purpose (ProgInfo_ComponentIDBase + 1)
#define ProgInfo_DisplayField_Author (ProgInfo_ComponentIDBase + 2)
#define ProgInfo_DisplayField_LicenceType (ProgInfo_ComponentIDBase + 3)
#define ProgInfo_DisplayField_Version (ProgInfo_ComponentIDBase + 4)
#define ProgInfo_Label_Name (ProgInfo_ComponentIDBase + 5)
#define ProgInfo_Label_Purpose (ProgInfo_ComponentIDBase + 6)
#define ProgInfo_Label_Author (ProgInfo_ComponentIDBase + 7)
#define ProgInfo_Label_LicenceType (ProgInfo_ComponentIDBase + 8)
#define ProgInfo_Label_Version (ProgInfo_ComponentIDBase + 9)
#define ProgInfo_ActionButton_WebPage (ProgInfo_ComponentIDBase + 10)
/* ProgInfo Methods ******************************************************************************/
#define ProgInfo_GetWindowID 0
#define ProgInfo_SetVersion 1
#define ProgInfo_GetVersion 2
#define ProgInfo_SetLicenceType 3
#define ProgInfo_GetLicenceType 4
#define ProgInfo_SetTitle 5
#define ProgInfo_GetTitle 6
#define ProgInfo_SetUri 7
#define ProgInfo_GetUri 8
#define ProgInfo_SetWebEvent 9
#define ProgInfo_GetWebEvent 10
/* ProgInfo Toolbox Events ***********************************************************************/
#define ProgInfo_AboutToBeShown ProgInfo_SWIChunkBase
#define ProgInfo_DialogueCompleted (ProgInfo_SWIChunkBase + 1)
#define ProgInfo_LaunchWebPage (ProgInfo_SWIChunkBase + 2)
typedef struct {
ToolboxEventHeader hdr;
int show_type;
union {
struct {
int x,y;
} coords;
WindowShowObjectBlock full;
} info;
} ProgInfo_AboutToBeShown_Event;
typedef struct {
ToolboxEventHeader hdr;
} ProgInfo_DialogueCompleted_Event;
typedef struct {
ToolboxEventHeader hdr;
} ProgInfo_LaunchWebPage_Event;
/* ProgInfo Errors *******************************************************************************/
#define ProgInfo_ErrorBase (Program_Error | 0x0080B400)
#define ProgInfo_AllocFailed (ProgInfo_ErrorBase+0x01)
#define ProgInfo_ShortBuffer (ProgInfo_ErrorBase+0x02)
#define ProgInfo_NoSuchTask (ProgInfo_ErrorBase+0x11)
#define ProgInfo_NoSuchMethod (ProgInfo_ErrorBase+0x12)
#define ProgInfo_NoSuchMiscOpMethod (ProgInfo_ErrorBase+0x13)
#define ProgInfo_TasksActive (ProgInfo_ErrorBase+0x00)
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment