/* 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