2 Copyright © 1995-2002, The AROS Development Team. All rights reserved.
7 #include <aros/debug.h>
9 #include <exec/types.h>
10 #include <intuition/classes.h>
11 #include <intuition/classusr.h>
12 #include <libraries/mui.h>
14 #include "abstracticon.h"
15 #include "desktop_intern.h"
16 #include "iconclass.h"
18 #include <proto/exec.h>
19 #include <proto/intuition.h>
20 #include <proto/utility.h>
22 #include "desktop_intern_protos.h"
24 IPTR
abstractIconNew(Class
*cl
, Object
*obj
, struct opSet
*msg
)
27 struct AbstractIconClassData
*data
;
28 struct TagItem
*tag
, *tstate
= msg
->ops_AttrList
;
29 BOOL script
=FALSE
, pure
=FALSE
, archived
=FALSE
, readable
=FALSE
, writeable
=FALSE
, executable
=FALSE
, deleteable
=FALSE
;
32 while((tag
= NextTagItem(&tstate
)) != NULL
)
37 comment
= (UBYTE
*) tag
->ti_Data
;
40 script
= (BOOL
) tag
->ti_Data
;
43 pure
= (BOOL
) tag
->ti_Data
;
46 archived
= (BOOL
) tag
->ti_Data
;
49 readable
= (BOOL
) tag
->ti_Data
;
52 writeable
= (BOOL
) tag
->ti_Data
;
55 executable
= (BOOL
) tag
->ti_Data
;
58 deleteable
= (BOOL
) tag
->ti_Data
;
63 retval
= DoSuperMethodA(cl
, obj
, (Msg
) msg
);
68 data
=INST_DATA(cl
, obj
);
72 data
->archived
=archived
;
73 data
->readable
=readable
;
74 data
->writeable
=writeable
;
75 data
->executable
=executable
;
76 data
->deleteable
=deleteable
;
77 data
->comment
=comment
;
83 IPTR
abstractIconDispose(Class
*cl
, Object
*obj
, Msg msg
)
87 retval
=DoSuperMethodA(cl
, obj
, msg
);
92 IPTR
abstractIconGet(Class
*cl
, Object
*obj
, struct opGet
*msg
)
95 struct AbstractIconClassData
*data
;
97 data
=(struct AbstractIconClassData
*)INST_DATA(cl
, obj
);
99 switch(msg
->opg_AttrID
)
102 *msg
->opg_Storage
=(ULONG
)data
->comment
;
105 *msg
->opg_Storage
=(ULONG
)data
->script
;
108 *msg
->opg_Storage
=(ULONG
)data
->pure
;
111 *msg
->opg_Storage
=(ULONG
)data
->archived
;
114 *msg
->opg_Storage
=(ULONG
)data
->readable
;
117 *msg
->opg_Storage
=(ULONG
)data
->writeable
;
120 *msg
->opg_Storage
=(ULONG
)data
->executable
;
123 *msg
->opg_Storage
=(ULONG
)data
->deleteable
;
126 retval
=DoSuperMethodA(cl
, obj
, (Msg
)msg
);
133 IPTR
abstractIconSet(Class
*cl
, Object
*obj
, struct opSet
*msg
)
135 struct AbstractIconClassData
*data
;
137 struct TagItem
*tag
, *tstate
=msg
->ops_AttrList
;
140 data
=(struct AbstractIconClassData
*)INST_DATA(cl
, obj
);
142 while((tag
=NextTagItem(&tstate
)))
147 data
->comment
=(UBYTE
*)tag
->ti_Data
;
150 data
->script
=(BOOL
)tag
->ti_Data
;
153 data
->pure
=(BOOL
)tag
->ti_Data
;
156 data
->archived
=(BOOL
)tag
->ti_Data
;
159 data
->readable
=(BOOL
)tag
->ti_Data
;
162 data
->writeable
=(BOOL
)tag
->ti_Data
;
165 data
->executable
=(BOOL
)tag
->ti_Data
;
168 data
->deleteable
=(BOOL
)tag
->ti_Data
;
174 retval
=DoSuperMethodA(cl
, obj
, (Msg
) msg
);
179 BOOPSI_DISPATCHER(IPTR
, abstractIconDispatcher
, cl
, obj
, msg
)
183 switch (msg
->MethodID
)
186 retval
=abstractIconNew(cl
, obj
, (struct opSet
*)msg
);
189 retval
=abstractIconSet(cl
, obj
, (struct opSet
*)msg
);
192 retval
=abstractIconGet(cl
, obj
, (struct opGet
*)msg
);
195 retval
=abstractIconDispose(cl
, obj
, msg
);
198 retval
=DoSuperMethodA(cl
, obj
, msg
);
204 BOOPSI_DISPATCHER_END