home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Programming / powerd / modules.lha / modules / render / renderhooks.m < prev   
Encoding:
Text File  |  2000-09-26  |  3.3 KB  |  92 lines

  1. /*
  2. **    $VER: renderhooks.h 18.2 (5.3.97)
  3. **
  4. **    render.library definitions for callback hooks
  5. */
  6. MODULE    'utility/hooks'
  7.  
  8. /******************************************************************************
  9.  
  10.     Progress Hook Message
  11.  
  12.     Whenever your progress hook is called, your function
  13.     receives a pointer to this structure in a1. Check the
  14.     message type and proceed accordingly.
  15.  
  16.     Also, you get a pointer to the object of concern in a2.
  17.     Warning: This is intended for identification only. You
  18.     are NOT allowed to perform operations inside your hook
  19.     function that could modify this object. If you try to
  20.     do so, your code will run into a deadlock.
  21.  
  22.     Your progress hook has to return TRUE or FALSE
  23.     for continuation respective abortion.
  24.  
  25. ******************************************************************************/
  26. OBJECT RND_ProgressMessage
  27.     Type:ULONG,     /* type of message, see below      */
  28.     Count:ULONG,    /* number to be displayed...       */
  29.     Total:ULONG     /* ...inside this range of numbers */
  30.  
  31. /******************************************************************************
  32.  
  33.     Types of progress messages
  34.  
  35.     Neither depend on a certain number of calls nor on
  36.     calls in a specific order. It's up to the library
  37.     to decide
  38.     - how often to call your progress hook
  39.     - in what order to submit different types of messages
  40.     - in what step rate to call your progress hook
  41.     - whether to call your progress hook at all
  42.  
  43. ******************************************************************************/
  44. /* number of lines added to a histogram.
  45.        a2 is a pointer to the histogram. */
  46. CONST    PMSGTYPE_LINES_ADDED=1
  47. /* number of colors chosen during quantization.
  48.        a2 is a pointer to the histogram. */
  49. CONST    PMSGTYPE_COLORS_CHOSEN=2
  50. /* number of histogram entries adapted to the palette.
  51.        a2 is a pointer to the histogram. */
  52. CONST    PMSGTYPE_COLORS_ADAPTED=3
  53. /* number of lines rendered to a palette.
  54.        a2 is a pointer to the palette. */
  55. CONST    PMSGTYPE_LINES_RENDERED=4
  56. /* number of lines converted.
  57.        a2 is NULL. */
  58. CONST    PMSGTYPE_LINES_CONVERTED=5
  59. /******************************************************************************
  60.  
  61.     Line Hook Message
  62.  
  63.     This hook is executed by functions such as Render() once
  64.     before and once after converting a line.
  65.  
  66.     When your line hook is called, your function receives a
  67.     pointer to this structure in a1. Check the message type and
  68.     proceed accordingly. Also, you get a pointer to the object
  69.     of concern in a2. This is either the source or destination
  70.     buffer.
  71.  
  72.     This allows you to draw, save, convert etc. while rendering,
  73.     and to save memory. Specify RND_DestWidth = 0 to render into
  74.     a single-line buffer, and RND_SourceWidth = 0 to fetch from a
  75.     single-line buffer.
  76.  
  77.     Your line hook has to return TRUE or FALSE
  78.     for continuation respective abortion.
  79.  
  80. ******************************************************************************/
  81. OBJECT RND_LineMessage
  82.     Type:ULONG,    /* type of message, see below */
  83.     Row:ULONG      /* the row number being processed */
  84.  
  85. /* just completed a line. a2 is a pointer to the rendered data.
  86.    You may read from this buffer. */
  87. CONST    LMSGTYPE_LINE_RENDERED=6
  88. /* now converting a new line. a2 is a pointer to the source buffer
  89.    where the input is expected. You may write to this buffer. */
  90. CONST    LMSGTYPE_LINE_FETCH=7
  91. /*****************************************************************************/
  92.