home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_progs / prog-asm / talincod.lha / talincode.lha / yfunctions.h < prev   
Encoding:
C/C++ Source or Header  |  1992-03-19  |  4.3 KB  |  113 lines

  1. /* ======================================================================== *
  2.                     yfunctions.h - prototypes for y.lib
  3.                                    By Talin.
  4.                 Compiled under Manx 5.0 with large code/data
  5.  * ======================================================================== */
  6.  
  7. struct impDraw;
  8.  
  9.     /* resident-able replacement for cli_parse() */
  10. LONG _xcli_parse(struct Process *,char *,long,char *,long,char **,long);
  11.  
  12.     /* Easy wrapper function for Examine that gets real file name */
  13. LONG GetLockName(BPTR lock,char *buffer,LONG length);
  14.  
  15.     /* used for layout, gets string lengths for array of text */
  16. int ArrayTextLength(char **, UWORD *, int, struct TextFont *);
  17.  
  18.     /* used for button layout */
  19. int CalcTotalSpace(UWORD *, int, int, int, int, int);
  20.  
  21.     /* used for button layout */
  22. int ArrangeSpacing(int, UWORD *, UWORD *, int, int, int, int, int, int);
  23.  
  24.     /* break up string delimited by '|' or CR into smaller strings */
  25. int BreakString(char *text, char *array[], int maxstrings);
  26.  
  27.     /* count nodes in a list */
  28. LONG CountNodes(struct MinList *list);
  29.  
  30.     /* sort of an "OpenWindowSafetly" -- handles multiple windows on same port */
  31. void InstallWindowPort(struct Window *w,LONG idcmpflags,struct MsgPort *userport);
  32.  
  33.     /* my version of CloseWindowSafely() */
  34. void CloseWindowSafely(struct Window *win);
  35.  
  36.     /* get the visible area of a virtual (or normal) screen */
  37. void GetDClip(struct Screen *s, struct IBox *result);
  38.  
  39.     /* draw bevel box, quickly */
  40. void ThinBevel(struct RastPort *rp, struct IBox *, LONG, LONG);
  41.  
  42.     /* draw bevel box with thicker sides */
  43. void QuickBevel(struct RastPort *rp, struct IBox *, LONG, LONG);
  44.  
  45.     /* give it a screen pointer and it fill in the pubname */
  46. void GetPubScreenName (struct Screen * scr, char *buffer, int maxlen);
  47.  
  48.     /* safe rectfill with relative width and height (and mac-style pixel math) */
  49. void PaintRect(struct RastPort *rp,SHORT x, SHORT y, SHORT w, SHORT h);
  50.  
  51.     /* safe rectfill with relative width and height (and mac-style pixel math) */
  52. void PaintIBox(struct RastPort *rp, struct IBox *b);
  53. #pragma regcall( PaintIBox(a1,a0) )
  54.  
  55.     /*     Fill in an IBox with the specified coordinates */
  56. struct IBox *SetRect(struct IBox *b, WORD top, WORD left, WORD width, WORD height);
  57.  
  58.     /* determine if a point is inside of an IBox */
  59. BOOL PtInRect(struct IBox *b,SHORT x, SHORT y);
  60. #pragma regcall( PtInRect(a1,d0,d1) )
  61.  
  62.     /* expand or shrink an IBox on all sides, and return IBox address */
  63. struct IBox *ExpandIBox(struct IBox *b, int dx, int dy);
  64. #pragma regcall( ExpandIBox(a1,d0,d1) )
  65.  
  66.     /*     Constrain the size and position of a rectangle to fit inside another one */
  67. struct IBox *RectFit(struct IBox *outer, struct IBox *inner,struct IBox *result);
  68. #pragma regcall( RectFit(a0,a1,a2) )
  69.  
  70.     /*     Adjust rectangle to have positive width and height, and return address */
  71. struct IBox *NormalizeRect(struct IBox *b);
  72. #pragma regcall( NormalizeRect(a0) )
  73.  
  74.     /*     Surround two rectangles with a larger rectangle, and return result */
  75. struct IBox *UnionRect(struct IBox *a, struct IBox *b, struct IBox *c);
  76. #pragma regcall( UnionRect(a0,a1,a2) )
  77.  
  78.     /*     Calculate the intersection of two rectangles (return TRUE if any) */
  79. BOOL SectRect(struct IBox *a, struct IBox *b, struct IBox *c);
  80. #pragma regcall( SectRect(a0,a1,a2) )
  81.  
  82.     /*     Constrain the size and position of a rectangle to fit inside another one */
  83. BOOL RectOverlap(struct IBox *a, struct IBox *b);
  84. #pragma regcall( RectOverlap(a0,a1) )
  85.  
  86.     /* compute window-relative box for gadgets */
  87. void SetupGadgetBox(struct Gadget *gadget,struct IBox *domain, struct IBox *box);
  88.  
  89.     /* compute gadget-relative box for image classes */
  90. void SetupImageIBox(struct IBox *box, struct Image *img, struct impDraw *msg);
  91.  
  92.     /* case insensitive substring finder */
  93. char *str_subi(char *str1,char *str2);
  94.  
  95.     /* write text to clipboard */
  96. int WriteClipText(char *text, int length);
  97.  
  98.     /* read text from clipboard */
  99. int ReadClipText(char *text, int maxlength);
  100.  
  101.     /* taken from alib -- boopsi dispatch functions */
  102. ULONG DoMethodA( Object *obj, Msg *message );
  103. ULONG DoMethod( Object *obj, unsigned long MethodID, ... );
  104. ULONG DoSuperMethodA( struct IClass *cl, Object *obj, Msg *message );
  105. ULONG DoSuperMethod( struct IClass *cl, Object *obj, unsigned long MethodID, ... );
  106.  
  107.     /* convert a 2.0 Screen Mode name into a Mode ID # */
  108. LONG GetModeIDByName(char *name);
  109.  
  110.     /* Call a Hook function */
  111. int HookCall(struct Hook *hook,long *msg,void *params);
  112. #pragma regcall( HookCall(a0,a1,a2) )
  113.