Support rastport clipping rectangle for layerless rastports
[tangerine.git] / rom / workbench / workbenchcontrola.c
blob7a4168fca464901149305507d644cd524beec677
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Change global options and control the Workbench in various ways.
6 Lang: english
7 */
9 #include <exec/types.h>
10 #include <exec/ports.h>
11 #include <utility/tagitem.h>
12 #include <intuition/intuition.h>
14 #include "workbench_intern.h"
15 #include <workbench/workbench.h>
16 #include <proto/utility.h>
18 #include "support.h"
20 /*****************************************************************************
22 NAME */
24 #include <proto/workbench.h>
26 AROS_LH2(BOOL, WorkbenchControlA,
28 /* SYNOPSIS */
29 AROS_LHA(STRPTR, name, A0),
30 AROS_LHA(struct TagItem *, tags, A1),
32 /* LOCATION */
33 struct WorkbenchBase *, WorkbenchBase, 18, Workbench)
35 /* FUNCTION
37 INPUTS
39 RESULT
41 NOTES
43 EXAMPLE
45 BUGS
47 SEE ALSO
49 INTERNALS
51 ******************************************************************************/
53 AROS_LIBFUNC_INIT
54 AROS_LIBBASE_EXT_DECL(struct WorkbenchBase *, WorkbenchBase)
56 struct TagItem *tstate = tags,
57 *tag;
58 BOOL rc = TRUE;
60 # define STORE(pointer, value) (pointer != NULL ? *pointer = (value) : (value))
62 while ((tag = NextTagItem(&tstate)) != NULL)
64 switch (tag->ti_Tag)
66 case WBCTRLA_IsOpen:
67 /* TODO: Do something... */
68 break;
70 case WBCTRLA_DuplicateSearchPath:
71 STORE
73 (BPTR *) tag->ti_Data,
74 DuplicateSearchPath(WorkbenchBase->wb_SearchPath)
76 break;
78 case WBCTRLA_FreeSearchPath:
79 FreeSearchPath((BPTR) tag->ti_Data);
80 break;
82 case WBCTRLA_GetDefaultStackSize:
83 STORE
85 (ULONG *) tag->ti_Data,
86 WorkbenchBase->wb_DefaultStackSize
88 break;
90 case WBCTRLA_SetDefaultStackSize:
91 WorkbenchBase->wb_DefaultStackSize = tag->ti_Data;
92 break;
94 case WBCTRLA_RedrawAppIcon:
95 /* TODO: Do something... */
96 break;
98 case WBCTRLA_GetProgramList:
99 /* TODO: Do something... */
100 break;
102 case WBCTRLA_FreeProgramList:
103 /* TODO: Do something... */
104 break;
106 case WBCTRLA_GetSelectedIconList:
107 /* TODO: Do something... */
108 break;
110 case WBCTRLA_FreeSelectedIconList:
111 /* TODO: Do something... */
112 break;
114 case WBCTRLA_GetOpenDrawerList:
115 /* TODO: Do something... */
116 break;
118 case WBCTRLA_FreeOpenDrawerList:
119 /* TODO: Do something... */
120 break;
122 case WBCTRLA_GetHiddenDeviceList:
123 /* TODO: Do something... */
124 break;
126 case WBCTRLA_FreeHiddenDeviceList:
127 /* TODO: Do something... */
128 break;
130 case WBCTRLA_AddHiddenDeviceName:
131 AddHiddenDevice((STRPTR) tag->ti_Data);
132 break;
134 case WBCTRLA_RemoveHiddenDeviceName:
135 RemoveHiddenDevice((STRPTR) tag->ti_Data);
136 break;
138 case WBCTRLA_GetTypeRestartTime:
139 STORE
141 (ULONG *) tag->ti_Data,
142 WorkbenchBase->wb_TypeRestartTime
144 break;
146 case WBCTRLA_SetTypeRestartTime:
147 WorkbenchBase->wb_TypeRestartTime = tag->ti_Data;
148 break;
152 return rc;
154 # undef STORE
156 AROS_LIBFUNC_EXIT
157 } /* WorkbenchControlA */