trying to rebuild AHIPrefs ReAction GUI

12 posts / 0 new
Last post
jabirulo
jabirulo's picture
Offline
Last seen: 2 weeks 5 days ago
Joined: 2013-05-30 00:53
trying to rebuild AHIPrefs ReAction GUI

Hi, I'm trying to rebuild AHIPrefs ReAction GUI from the "old" AHI SDK/sources (AHI gui_ca.c). I have almost remove all warnings, but can't get to complete the compilation, 'cos it uses

  1. struct List *BrowserNodesA( STRPTR * );
  2. struct List *ChooserLabelsA( STRPTR * );
  3. struct List *ChooserLabels( STRPTR, ... );
  4. void FreeBrowserNodes( struct List *);
  5. void FreeChooserLabels( struct List * );
  6. struct List *ClickTabsA( STRPTR * );
  7. struct List *ClickTabs( STRPTR, ... );
  8. void FreeClickTabs( struct List * );

from reaction_lib_protos.h, I copy&paster from ReAction Layout LayoutExample.c :-) and cloned to create 'struct List *ClickTabsA(STRPTR *)'
but I don't know how to "recreate"

  1. struct List *ChooserLabels( STRPTR, ... );
  2. struct List *ClickTabs( STRPTR, ... );

fuctions. Are they "doable"? Or where to look to try to find a replacement?
TIA

salass00
salass00's picture
Offline
Last seen: 6 months 1 week ago
Joined: 2011-02-03 11:27
Those shouldn't be too hard

Those shouldn't be too hard to do. As some of those functions are varargs stubs they will need to be implemented using VARARGS68K and va_#?() macros but that's not really much of a problem.

I began some work on replacements for these functions but ran into an unexpected problem:


error: ISO C requires a named argument before ‘...’

Apparently it's not possible to have a varargs function without at least one non-vararg argument. This is annoying but can at least be somewhat easily worked around by adding a dummy argument to all the varargs functions and adding some silly macros to hide it.

salass00
salass00's picture
Offline
Last seen: 6 months 1 week ago
Joined: 2011-02-03 11:27
There is a WIP version of my

There is a WIP version of my libreaction here:
https://dl.dropboxusercontent.com/u/26599983/libreaction.7z

ATM it only supports the ChooserLabelsA(), ChooserLabels() and FreeChooserLabels() functions.

salass00
salass00's picture
Offline
Last seen: 6 months 1 week ago
Joined: 2011-02-03 11:27
I just added the following

I just added the following functions:
- ClickTabsA()
- ClickTabs()
- FreeClickTabs()
- BrowserNodesA()
- BrowserNodes()
- FreeBrowserNodes()

If the functions you listed above are all that are needed then this should be enough to get it compiling and hopefully running too.

The download link is the same as I posted above.

salass00
salass00's picture
Offline
Last seen: 6 months 1 week ago
Joined: 2011-02-03 11:27
Just compiled AHI_CA

Just compiled AHI_CA myself:

https://dl.dropboxusercontent.com/u/26599983/ahi_ca.png

The clicktab isn't working correctly ATM so at least that needs looking into still.

jabirulo
jabirulo's picture
Offline
Last seen: 2 weeks 5 days ago
Joined: 2013-05-30 00:53
WOW!! that's good news. I

WOW!! that's good news.
I have in my ToDo list to try to recompile it too, with the help of the files you gave/put here (listbrowser, chooser,...), but lack of time.

It would be nice if in a "near future" we get AHI_ReAction prefs. :-)

AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonHD6570/SSD120GB/DVDRW :-P

salass00
salass00's picture
Offline
Last seen: 6 months 1 week ago
Joined: 2011-02-03 11:27
So it doesn't crash on

So it doesn't crash on startup the MySetGadgetAttrs() function needs to be changed to:

  1. VARARGS68K static void MySetGadgetAttrs(Object *gadget, ...) {
  2. VA_LIST tags;
  3. VA_START(tags, gadget);
  4. MySetGadgetAttrsA(gadget, VA_ARG(tags, struct TagItem *));
  5. VA_END(tags);
  6. }

And "#include " needs to be added to the include statements.

salass00
salass00's picture
Offline
Last seen: 6 months 1 week ago
Joined: 2011-02-03 11:27
Also Req() needs to be

Also Req() needs to be changed to:

  1. VARARGS68K static ULONG Req( UBYTE *gadgets, UBYTE *body, ... ) {
  2. struct EasyStruct req = {
  3. sizeof (struct EasyStruct), 0, NULL, NULL, NULL
  4. #ifdef __AMIGAOS4__
  5. , NULL, NULL
  6. #endif
  7. };
  8. ULONG rc;
  9. VA_LIST args;
  10. VA_START(args, body);
  11.  
  12. req.es_Title = (char *) msgTextProgramName;
  13. req.es_TextFormat = body;
  14. req.es_GadgetFormat = gadgets;
  15.  
  16. SetAttrs( WO_Window, WA_BusyPointer, TRUE, TAG_DONE);
  17. rc = EasyRequestArgs( Window, &req, NULL, VA_ARG(args, APTR) );
  18. SetAttrs( WO_Window, WA_BusyPointer, FALSE, TAG_DONE);
  19.  
  20. VA_END(args);
  21. return rc;
  22. }
salass00
salass00's picture
Offline
Last seen: 6 months 1 week ago
Joined: 2011-02-03 11:27
Martin Blom gave me write

Martin Blom gave me write access to the AHI SVN so I've committed my changes there directly now.

To get the source code and compile AHI_CA you just need to do (assuming that you are using a cross-compiler system):
svn co svn://svn.berlios.de/arp2/ahi/ahisrc/branches/BRANCH_6 ahisrc-6
cd ahisrc-6
./configure --host=ppc-amigaos
cd AHI
make AHI_CA

For a native compile you should probably do (not tested):
svn co svn://svn.berlios.de/arp2/ahi/ahisrc/branches/BRANCH_6 ahisrc-6
cd ahisrc-6
sh configure
cd AHI
gmake AHI_CA

salass00
salass00's picture
Offline
Last seen: 6 months 1 week ago
Joined: 2011-02-03 11:27
I fixed the problem with the

I fixed the problem with the clicktab not working.

I've uploaded a compile of the current version here for anyone who wants to test it:
https://dl.dropboxusercontent.com/u/26599983/ahi_ca-wip.7z

Note that it includes debug information so the executable is larger than it would be normally.

mritter0
mritter0's picture
Offline
Last seen: 2 years 5 months ago
Joined: 2014-04-21 21:15
@salass00 I, too, have been

@salass00

I, too, have been looking for a solution for the no longer supported on AmigaOS4 error. What are we supposed to do? What have people been doing to make chooser lists?

Were these just easy functions like:

  1. VOID
  2. SAK_ClearChooserList(struct List *List)
  3. {
  4. struct Node *Node, *NextNode;
  5.  
  6. Node=List->lh_Head;
  7. while(NextNode=Node->ln_Succ)
  8. {
  9. Remove(Node);
  10. Node=NextNode;
  11. }
  12. }

The link to your download is no longer valid. Could you re-upload it?

mritter0
mritter0's picture
Offline
Last seen: 2 years 5 months ago
Joined: 2014-04-21 21:15
Went and had some

Went and had some lunch....downloaded the file. Much like I thought.

Much like reactionlib.lha from Stephan Rupprecht.

I have asked about this before on EAB, why was it dropped? People obviously like the functions.

Log in or register to post comments