diff options
Diffstat (limited to 'amiga/os3support.c')
-rw-r--r-- | amiga/os3support.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/amiga/os3support.c b/amiga/os3support.c index f69df1508..3b42685a5 100644 --- a/amiga/os3support.c +++ b/amiga/os3support.c @@ -26,9 +26,13 @@ #include <inttypes.h> #include <stdarg.h> #include <stdio.h> + #include <proto/exec.h> #include <proto/intuition.h> #include <proto/dos.h> +#include <proto/utility.h> + +#include <intuition/gadgetclass.h> #define SUCCESS (TRUE) #define FAILURE (FALSE) @@ -93,6 +97,32 @@ uint32 GetAttrs(Object *obj, Tag tag1, ...) return i; } +ULONG RefreshSetGadgetAttrsA(struct Gadget *g, struct Window *w, struct Requester *r, struct TagItem *tags) +{ + ULONG retval; + BOOL changedisabled = FALSE; + BOOL disabled; + + if (w) { + if (FindTagItem(GA_Disabled,tags)) { + changedisabled = TRUE; + disabled = g->Flags & GFLG_DISABLED; + } + } + retval = SetGadgetAttrsA(g,w,r,tags); + if (w && (retval || (changedisabled && disabled != (g->Flags & GFLG_DISABLED)))) { + RefreshGList(g,w,r,1); + retval = 1; + } + return retval; +} + +ULONG RefreshSetGadgetAttrs(struct Gadget *g, struct Window *w, struct Requester *r, Tag tag1, ...) +{ + return RefreshSetGadgetAttrsA(g,w,r,(struct TagItem *) &tag1); +} + + /* Utility */ struct FormatContext { |