home *** CD-ROM | disk | FTP | other *** search
- /*
- ** $VER: renderhooks.h 18.2 (5.3.97)
- **
- ** render.library definitions for callback hooks
- */
- MODULE 'utility/hooks'
-
- /******************************************************************************
-
- Progress Hook Message
-
- Whenever your progress hook is called, your function
- receives a pointer to this structure in a1. Check the
- message type and proceed accordingly.
-
- Also, you get a pointer to the object of concern in a2.
- Warning: This is intended for identification only. You
- are NOT allowed to perform operations inside your hook
- function that could modify this object. If you try to
- do so, your code will run into a deadlock.
-
- Your progress hook has to return TRUE or FALSE
- for continuation respective abortion.
-
- ******************************************************************************/
- OBJECT RND_ProgressMessage
- Type:ULONG, /* type of message, see below */
- Count:ULONG, /* number to be displayed... */
- Total:ULONG /* ...inside this range of numbers */
-
- /******************************************************************************
-
- Types of progress messages
-
- Neither depend on a certain number of calls nor on
- calls in a specific order. It's up to the library
- to decide
- - how often to call your progress hook
- - in what order to submit different types of messages
- - in what step rate to call your progress hook
- - whether to call your progress hook at all
-
- ******************************************************************************/
- /* number of lines added to a histogram.
- a2 is a pointer to the histogram. */
- CONST PMSGTYPE_LINES_ADDED=1
- /* number of colors chosen during quantization.
- a2 is a pointer to the histogram. */
- CONST PMSGTYPE_COLORS_CHOSEN=2
- /* number of histogram entries adapted to the palette.
- a2 is a pointer to the histogram. */
- CONST PMSGTYPE_COLORS_ADAPTED=3
- /* number of lines rendered to a palette.
- a2 is a pointer to the palette. */
- CONST PMSGTYPE_LINES_RENDERED=4
- /* number of lines converted.
- a2 is NULL. */
- CONST PMSGTYPE_LINES_CONVERTED=5
- /******************************************************************************
-
- Line Hook Message
-
- This hook is executed by functions such as Render() once
- before and once after converting a line.
-
- When your line hook is called, your function receives a
- pointer to this structure in a1. Check the message type and
- proceed accordingly. Also, you get a pointer to the object
- of concern in a2. This is either the source or destination
- buffer.
-
- This allows you to draw, save, convert etc. while rendering,
- and to save memory. Specify RND_DestWidth = 0 to render into
- a single-line buffer, and RND_SourceWidth = 0 to fetch from a
- single-line buffer.
-
- Your line hook has to return TRUE or FALSE
- for continuation respective abortion.
-
- ******************************************************************************/
- OBJECT RND_LineMessage
- Type:ULONG, /* type of message, see below */
- Row:ULONG /* the row number being processed */
-
- /* just completed a line. a2 is a pointer to the rendered data.
- You may read from this buffer. */
- CONST LMSGTYPE_LINE_RENDERED=6
- /* now converting a new line. a2 is a pointer to the source buffer
- where the input is expected. You may write to this buffer. */
- CONST LMSGTYPE_LINE_FETCH=7
- /*****************************************************************************/
-