home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / amiga / programm / 17443 < prev    next >
Encoding:
Internet Message Format  |  1992-12-16  |  2.4 KB

  1. Path: sparky!uunet!vtserf!csugrad!jaker
  2. From: jaker@csugrad.cs.vt.edu (Jake Rose)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Sorry, can't learn from includes alone
  5. Message-ID: <BzDD8M.1FG@csugrad.cs.vt.edu>
  6. Date: 16 Dec 92 20:36:22 GMT
  7. References: <BzBy9v.Izp@usenet.ucs.indiana.edu>
  8. Organization: Virginia Tech Computer Science Dept, Blacksburg, VA
  9. Lines: 40
  10.  
  11. shulick@navajo.ucs.indiana.edu (Sam Hulick) writes:
  12.  
  13. >To those of you who said it's possible to learn 2.0 programming on the
  14. >includes... sorry.  Look at this:
  15.  
  16. >struct NewGadget
  17. >    {
  18. >    WORD ng_LeftEdge, ng_TopEdge;   /*  gadget position */
  19. >    WORD ng_Width, ng_Height;    /*  gadget size */
  20. >    UBYTE *ng_GadgetText;     /*  gadget label */
  21. >    struct TextAttr *ng_TextAttr;   /*  desired font for gadget label */
  22. >    UWORD ng_GadgetID;        /*  gadget ID */
  23. >    ULONG ng_Flags;        /*  see below */
  24. >    APTR ng_VisualInfo;       /*  Set to retval of GetVisualInfo() */
  25. >    APTR ng_UserData;         /*  gadget UserData */
  26. >    };
  27.  
  28. >What's ng_GadgetID supposed to do?  What should I set it to?  What's the
  29. >ng_UserData?  The includes do NOT explain these.  Isn't there some book
  30. >available that does?  For instance, Sybex put out an EXCELLENT book
  31. >called "Amiga Programmer's Handbook" which totally explains the Amiga C
  32. >functions (OS 1.3).. it explains what you should set certain things to,
  33. >etc. etc.  Is there some kind of book like this for OS 2.0?  I want to
  34. >make gadgets, but I have no clue without any good books.
  35.  
  36. The GadgetID is whatever you want it to be, as is the ng_UserData field.
  37. These are there so you can label your own Gadgets with whatever number you
  38. like and so you can attach other information to the gadget easily.  That's
  39. why they're not explained, I suppose.  You can learn to program the Amiga
  40. from the libraries book, the includes, and other peoples' source code.
  41.  
  42. >    // Amiga 3000   ___ \ Sam Hulick: shulick@indiana.edu (NeXTmail OK!)
  43. >   // 68030 25 MHz /__/\ \ My opinions wear combat boots.  Or whatever.
  44. >\\// OS 2.04       \__\/ / "Walk!  Not bloody likely.  I am going in a
  45. > \/                     / taxi."  --George Bernard Shaw
  46. -- 
  47. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  48. Jake Rose               :: Amazing but true: There is so much sand in Northern
  49. jaker@csugrad.cs.vt.edu :: Africa that if spread out it would cover the Sahara. 
  50. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  51.