Commit 609d3219 authored by ROOL's avatar ROOL :robot:
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
No related merge requests found
/* 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!
*/
This diff is collapsed.
/* 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
This diff is collapsed.
/* 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
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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