Adding methods that allow to refresh when doing a private gadget. (?)
I'm trying to add my own method to a gadget that move something, and the drawing should be refreshed when I do that. I started having an enum for this i set to a struct that began with ULONG MethodID, and then i DoMethodA(o, &mystruct) ... then I manage it in the gadget class dispatcher. it's ok but it can't refresh by itself because it has no "GadgetInfo" to create a rastport with ObtainGIRPort(). as all gadget methods start with " ULONG MethodID; ULONG *attribs; struct GadgetInfo *gi", I figured it would be enough to have my method struct starting with that, and rather call DoGadgetMethod(o,wnidow,null,&mymethodstruct); ... but it doesnt create the GadgetInfo and this member is received NULL in the dispatcher, when the DoGadgetMethod() documentation says it should be there.
... any idea ?
I will rather stuck to doing method equivalent with attributes , because SetGadgetAttribs() will always pass a valid gadgetInfo to OM_SET.
But well, that's quite unclear, i'm really looking forward having my gadget doing things the right way with methods,
and I may have missed something.
Edit: ... some IA (brave search) says DoGadgetMethod() would only bother createing the GadgetInfo for methods he knows ... so basically adding your own methods to a gadget looks super limited by this: can't refresh, and so it looks like everything have to be managed with attributes.
Online Status
DoGadgetMethod() always adds gadgetinfo as the 2nd element - so right after the methodid. There is not attrib inbetween. That is only for OM_SET which is indeed special cased by DoGadgetMethod