home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / misc / RenderLib.lha / RenderLib / Include / render / renderhooks.i < prev   
Encoding:
Text File  |  1996-12-15  |  2.3 KB  |  94 lines

  1.     IFND RENDERHOOKS_I
  2. RENDERHOOKS_I    SET    1
  3. **
  4. **    $VER: renderhooks.i 15.0 (14.12.96)
  5. **
  6. **    render.library definitions for callback hooks
  7. **
  8. **    © 1996 TEK neosçientists
  9. **
  10.  
  11. ;------------------------------------------------------------------------
  12.  
  13.     IFND    EXEC_TYPES_I
  14.     include    "exec/types.i"
  15.     ENDC
  16.  
  17.     IFND    UTILITY_HOOKS_I
  18.     include    "utility/hooks.i"
  19.     ENDC
  20.  
  21. ;------------------------------------------------------------------------
  22. ;
  23. ;    Progress Hook Message
  24. ;
  25. ;    Whenever your progress hook is called, your function
  26. ;    receives a pointer to this structure in a1. Check the
  27. ;    message type and proceed accordingly.
  28. ;
  29. ;    Also, you get a pointer to the object of concern in a2.
  30. ;    Warning: This is intended for identification only. You
  31. ;    are NOT allowed to perform operations inside your hook
  32. ;    function that could modify this object. If you try to
  33. ;    do so, your code will run into a deadlock.
  34. ;
  35. ;    Your progress hook has to return TRUE or FALSE
  36. ;    for continuation respective abortion.
  37. ;
  38. ;------------------------------------------------------------------------
  39.  
  40.     STRUCTURE    RND_ProgressMessage,0
  41.         ULONG    RND_PMsg_type        ; type of message, see below
  42.         ULONG    RND_PMsg_count        ; number to be displayed...
  43.         ULONG    RND_PMsg_total        ; ...inside this range
  44.     LABEL        RND_PMsg_SIZEOF
  45.  
  46.  
  47. ;------------------------------------------------------------------------
  48. ;
  49. ;    Types of progress messages
  50. ;
  51. ;    Neither depend on a certain number of calls nor on
  52. ;    calls in a specific order. It's up to the library
  53. ;    to decide
  54. ;    - how often to call your progress hook
  55. ;    - in what order to submit different types of messages
  56. ;    - in what step rate to call your progress hook
  57. ;    - whether to call your progress hook at all
  58. ;
  59. ;------------------------------------------------------------------------
  60.  
  61.     ; number of lines added to a histogram.
  62.     ; a2 is a pointer to the histogram.
  63.  
  64. PMSGTYPE_LINES_ADDED        EQU    1
  65.  
  66.  
  67.     ; number of colors chosen during quantization.
  68.     ; a2 is a pointer to the histogram.
  69.  
  70. PMSGTYPE_COLORS_CHOSEN        EQU    2
  71.  
  72.  
  73.     ; number of histogram entries adapted to the palette.
  74.     ; a2 is a pointer to the histogram.
  75.  
  76. PMSGTYPE_COLORS_ADAPTED        EQU    3
  77.  
  78.  
  79.     ; number of lines rendered to a palette.
  80.     ; a2 is a pointer to the palette.
  81.  
  82. PMSGTYPE_LINES_RENDERED        EQU    4
  83.  
  84.  
  85.     ; number of lines converted.
  86.     ; a2 is NULL.
  87.  
  88. PMSGTYPE_LINES_CONVERTED    EQU    5
  89.  
  90.  
  91. ;------------------------------------------------------------------------
  92.  
  93.     ENDC
  94.