diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-01-20 00:06:08 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-01-20 00:06:08 +0000 |
commit | f3cf042184a6a4ff8bda7d3693e1a33bb2111023 (patch) | |
tree | d28b03851bfc36c0c7148762dbd12736192e0709 /amiga/os3support.c | |
parent | 0c526662b33697f2ebb132b5018494ec699da27f (diff) | |
download | netsurf-f3cf042184a6a4ff8bda7d3693e1a33bb2111023.tar.gz netsurf-f3cf042184a6a4ff8bda7d3693e1a33bb2111023.tar.bz2 |
RefreshSetGadgetAttrs replacement for OS3
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 { |