added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / rom / workbench / workbenchcontrola.c
blobe81e1dd8fe5046f09a71335838cef81f8fa7e041
1 /*
2 Copyright © 1995-2007, 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
55 const struct TagItem *tstate = tags,
56 *tag;
57 BOOL rc = TRUE;
59 # define STORE(pointer, value) (pointer != NULL ? *pointer = (value) : (value))
61 while ((tag = NextTagItem(&tstate)) != NULL)
63 switch (tag->ti_Tag)
65 case WBCTRLA_IsOpen:
66 /* TODO: Do something... */
67 break;
69 case WBCTRLA_DuplicateSearchPath:
70 STORE
72 (BPTR *) tag->ti_Data,
73 DuplicateSearchPath(WorkbenchBase->wb_SearchPath)
75 break;
77 case WBCTRLA_FreeSearchPath:
78 FreeSearchPath((BPTR) tag->ti_Data);
79 break;
81 case WBCTRLA_GetDefaultStackSize:
82 STORE
84 (ULONG *) tag->ti_Data,
85 WorkbenchBase->wb_DefaultStackSize
87 break;
89 case WBCTRLA_SetDefaultStackSize:
90 WorkbenchBase->wb_DefaultStackSize = tag->ti_Data;
91 break;
93 case WBCTRLA_RedrawAppIcon:
94 /* TODO: Do something... */
95 break;
97 case WBCTRLA_GetProgramList:
98 /* TODO: Do something... */
99 break;
101 case WBCTRLA_FreeProgramList:
102 /* TODO: Do something... */
103 break;
105 case WBCTRLA_GetSelectedIconList:
106 /* TODO: Do something... */
107 break;
109 case WBCTRLA_FreeSelectedIconList:
110 /* TODO: Do something... */
111 break;
113 case WBCTRLA_GetOpenDrawerList:
114 /* TODO: Do something... */
115 break;
117 case WBCTRLA_FreeOpenDrawerList:
118 /* TODO: Do something... */
119 break;
121 case WBCTRLA_GetHiddenDeviceList:
122 /* TODO: Do something... */
123 break;
125 case WBCTRLA_FreeHiddenDeviceList:
126 /* TODO: Do something... */
127 break;
129 case WBCTRLA_AddHiddenDeviceName:
130 AddHiddenDevice((STRPTR) tag->ti_Data);
131 break;
133 case WBCTRLA_RemoveHiddenDeviceName:
134 RemoveHiddenDevice((STRPTR) tag->ti_Data);
135 break;
137 case WBCTRLA_GetTypeRestartTime:
138 STORE
140 (ULONG *) tag->ti_Data,
141 WorkbenchBase->wb_TypeRestartTime
143 break;
145 case WBCTRLA_SetTypeRestartTime:
146 WorkbenchBase->wb_TypeRestartTime = tag->ti_Data;
147 break;
151 return rc;
153 # undef STORE
155 AROS_LIBFUNC_EXIT
156 } /* WorkbenchControlA */