Commit efc013e5 authored by ROOL's avatar ROOL 🤖
Browse files

This commit was manufactured by cvs2git to create branch 'unlabeled-4.2.2'.

Sprout from master 1997-05-13 09:11:36 UTC Kevin Bracey <kbracey@gitlab.riscosopen.org> 'Spinner branch merged'
Delete:
    MakeDebug,fe1
    MakeROM
    Makefile
    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/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
parent 2dbbb658
/* 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
#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 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_ValidFlags 0x0000006f
/* 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
/* 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
*
*/
#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
/* templates */
typedef struct
{
int flags;
char *title;
int max_title;
char *purpose;
char *author;
int licence_type;
char *version;
char *window;
} 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)
/* 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
/* ProgInfo Toolbox Events ***********************************************************************/
#define ProgInfo_AboutToBeShown ProgInfo_SWIChunkBase
#define ProgInfo_DialogueCompleted (ProgInfo_SWIChunkBase + 1)
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;
/* 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
/* 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: saveas.h
* Purpose: SaveAs Objects
* Author: Timothy G Roddis
* History: 16-Feb-94: TGR: created
*
*/
#ifndef __SaveAs_h
#define __SaveAs_h
#ifndef __os_h
#include "os.h"
#endif
#ifndef __window_h
#include "objects.window.h"
#endif
#ifndef __wimp_h
#include "twimp.h"
#endif
/* SaveAs SWI calls *******************************************************************************/
#define SaveAs_SWIChunkBase 0x82bc0
#define SaveAs_ObjectClass SaveAs_SWIChunkBase
#define SaveAs_ClassSWI (SaveAs_SWIChunkBase + 0)
#define SaveAs_PostFilter (SaveAs_SWIChunkBase + 1)
#define SaveAs_PreFilter (SaveAs_SWIChunkBase + 2)
/* SaveAs Templates *******************************************************************************/
/* flags */
#define SaveAs_GenerateShowEvent 0x00000001
#define SaveAs_GenerateHideEvent 0x00000002
#define SaveAs_ExcludeSelectionButton 0x00000004
#define SaveAs_AutomaticRAMTransfer 0x00000008
#define SaveAs_ClientSupportsRAMTransfer 0x00000010
/* templates */
typedef struct
{
int flags;
char *filename;
int filetype;
char *title;
int max_title;
char *window;
} SaveAsTemplate;
/* component IDs */
#define SaveAs_ComponentIDBase (SaveAs_SWIChunkBase<<4)
#define SaveAs_Draggable_FileIcon (SaveAs_ComponentIDBase)
#define SaveAs_WritableField_FileName (SaveAs_ComponentIDBase + 1)
#define SaveAs_ActionButton_Cancel (SaveAs_ComponentIDBase + 2)
#define SaveAs_ActionButton_Save (SaveAs_ComponentIDBase + 3)
#define SaveAs_OptionButton_Selection (SaveAs_ComponentIDBase + 4)
/* SaveAs Methods *********************************************************************************/
#define SaveAs_GetWindowID 0
#define SaveAs_SetTitle 1
#define SaveAs_GetTitle 2
#define SaveAs_SetFileName 3
#define SaveAs_GetFileName 4
#define SaveAs_SetFileType 5
#define SaveAs_GetFileType 6
#define SaveAs_SetFileSize 7
#define SaveAs_GetFileSize 8
#define SaveAs_SelectionAvailable 9
#define SaveAs_SetDataAddress 10
#define SaveAs_BufferFilled 11
#define SaveAs_FileSaveCompleted 12
/* SaveAs Toolbox Events **************************************************************************/
#define SaveAs_AboutToBeShown SaveAs_SWIChunkBase
#define SaveAs_DialogueCompleted (SaveAs_SWIChunkBase + 1)
#define SaveAs_SaveToFile (SaveAs_SWIChunkBase + 2)
#define SaveAs_FillBuffer (SaveAs_SWIChunkBase + 3)
#define SaveAs_SaveCompleted (SaveAs_SWIChunkBase + 4)
typedef struct {
ToolboxEventHeader hdr;
int show_type;
union {
struct {
int x,y;
} coords;
WindowShowObjectBlock full;
} info;
} SaveAs_AboutToBeShown_Event;
typedef struct {
ToolboxEventHeader hdr;
} SaveAs_DialogueCompleted_Event;
typedef struct {
ToolboxEventHeader hdr;
char filename [212];
} SaveAs_SaveToFile_Event;
typedef struct {
ToolboxEventHeader hdr;
int size;
char *address;
int no_bytes;
} SaveAs_FillBuffer_Event;
typedef struct {
ToolboxEventHeader hdr;
int wimp_message_no;
char filename [208];
} SaveAs_SaveCompleted_Event;
/* SaveAs Errors **********************************************************************************/
#define SaveAs_ErrorBase 0x0080B600
#define SaveAs_Program_ErrorBase (Program_Error | SaveAs_ErrorBase)
#define SaveAs_TasksActive (SaveAs_Program_ErrorBase+0x00)
#define SaveAs_AllocFailed (SaveAs_Program_ErrorBase+0x01)
#define SaveAs_ShortBuffer (SaveAs_Program_ErrorBase+0x02)
#define SaveAs_FileNameTooLong (SaveAs_Program_ErrorBase+0x03)
#define SaveAs_NoSuchTask (SaveAs_Program_ErrorBase+0x11)
#define SaveAs_NoSuchMethod (SaveAs_Program_ErrorBase+0x12)
#define SaveAs_NoSuchMiscOpMethod (SaveAs_Program_ErrorBase+0x13)
#define SaveAs_NotType1 (SaveAs_Program_ErrorBase+0x21)
#define SaveAs_NotType3 (SaveAs_Program_ErrorBase+0x23)
#define SaveAs_BufferExceeded (SaveAs_Program_ErrorBase+0x31)
#define SaveAs_DataAddressUnset (SaveAs_Program_ErrorBase+0x32)
#define SaveAs_NotFullPath (SaveAs_ErrorBase+0x33)
#define SaveAs_SaveFailed (SaveAs_ErrorBase+0x34)
#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