The stick2xyz Documentation 1.14.1
|
#include "pane2dgraypriv.h"
#include "pane2dgray.h"
#include "pane2dgray16.h"
#include "pane2drgb.h"
#include "pane2drgb16.h"
Go to the source code of this file.
int mod_pane2d_addref | ( | pane2d_handle | pane | ) |
This function adds a reference to an allocated Pane 2-D handle.
[in] | pane | The handle to operate on. |
>0 | The new number of references to the handle. |
-1 | If an error occured. errno will be set to: EINVAL if pane is NULL. EDEADLK if the function would have deadlocked the thread. |
Definition at line 296 of file pane2dgray.c.
References pane2dgray16_addref(), pane2dgray_addref(), pane2drgb16_addref(), and pane2drgb_addref().
pane2d_handle mod_pane2d_alloc | ( | int | x, |
int | y | ||
) |
Allocates a new Pane 2-D handle. This function does not allocate a handle with multithread support.
[in] | x | The maximum x coordinate allowed. |
[in] | y | The maximum y coordinate allowed. |
pane2d_handle | The newly allocated handle. |
NULL | If the function fails, usually due to lack of memory. |
Definition at line 785 of file pane2dgray.c.
References pane2dgray16_alloc(), pane2dgray_alloc(), pane2drgb16_alloc(), and pane2drgb_alloc().
pane2d_handle mod_pane2d_alloc_multithread | ( | int | x, |
int | y, | ||
size_t | maxthreads, | ||
uint32_t | typesallowed | ||
) |
Allocates a new Pane 2-D handle with multithread support for the dupimage and dupdata functions.
[in] | x | The maximum x coordinate allowed. |
[in] | y | The maximum y coordinate allowed. |
[in] | maxthreads | The maximum number of threads anticipated to use the handle. |
[in] | typesallowed | Sets types allowed to allocate using STICK2XYZ_PANE2D_ALLOC_*. If unsure, this can be set to STICK2XYZ_PANE2D_ALLOC_ALL. Setting specific types besides ALL is intended to help save on memory. |
pane2d_handle | The newly allocated handle. |
NULL | If the function fails, usually due to lack of memory or the module was not compiled with multithread support. |
Definition at line 819 of file pane2dgray.c.
References pane2dgray16_alloc_multithread(), pane2dgray_alloc_multithread(), pane2drgb16_alloc_multithread(), and pane2drgb_alloc_multithread().
int mod_pane2d_can_multithread | ( | void | ) |
This function tells the caller whether or not the module was compiled with multithread support.
1 | If the module was compiled with multithread support. |
0 | If the module was not compiled with multithread support. |
Definition at line 209 of file pane2dgray.c.
References pane2dgray16_can_multithread(), pane2dgray_can_multithread(), pane2drgb16_can_multithread(), and pane2drgb_can_multithread().
int mod_pane2d_candraw | ( | pane2d_handle | pane | ) |
This function returns a boolean value indicating whether the calling thread can or can not draw on the Pane 2-D handle.
[in] | pane | The handle to operate on. |
1 | If the calling thread can draw on the handle. |
0 | If the calling thread can not draw on the handle, or the parameter was NULL. |
Definition at line 384 of file pane2dgray.c.
References pane2dgray16_candraw(), pane2dgray_candraw(), pane2drgb16_candraw(), and pane2drgb_candraw().
int mod_pane2d_changeaccesscontrol | ( | pane2d_handle | pane, |
void * | hthread, | ||
int | hthreadsize, | ||
uint32_t | flags | ||
) |
This function is a multipurpose access control changing function.
[in] | pane | The handle to operate on. |
[in] | hthread | On Windows, this will be an array to HANDLE objects. On other platforms, this will be an array to thrd_t variables. When threads.h is not available, this is a void * because in the situation outside of Windows, no supported multithreading mechanism is available. |
[in] | hthreadsize | The number of elements that is in hthread. |
[in] | flags | Bitwise OR'ed flags to indicate what to do. |
STICK2XYZ_PANE2D_ACCESSCTRL_ADDREF Adds a reference count to the Pane 2-D handle.
STICK2XYZ_PANE2D_ACCESSCTRL_CHANGEOWNER Changes the owner of the Pane 2-D handle.
STICK2XYZ_PANE2D_ACCESSCTRL_NONBLOCK Makes the function run asyncronously.
STICK2XYZ_PANE2D_ACCESSCTRL_ACLDRAWSET Changes the access rights to the Pane 2-D handle regarding the ability to draw. Setting hthreadsize to -1 will give all threads write access, and setting hthreadsize to 0 will deny all threads write access.
1 | On success. |
0 | If an error occured. errno will be set to: EINVAL if pane is NULL. EDEADLK if the function would have deadlocked the thread. ENOSYS if the module was compiled without multithreading support. EACCES if the calling thread does not own the handle. |
Definition at line 587 of file pane2dgray.c.
References pane2dgray16_changeaccesscontrol(), pane2dgray_changeaccesscontrol(), pane2drgb16_changeaccesscontrol(), and pane2drgb_changeaccesscontrol().
int mod_pane2d_changeowningthread | ( | pane2d_handle | pane, |
void * | newthread, | ||
int | addref | ||
) |
This function allows the owning thread to pass ownership of a given handle to another thread.
[in] | pane | The handle to operate on. |
[in] | newthread | On Windows, this will be a HANDLE object. On other platforms, this will be a thrd_t. When threads.h is not available, this is a void * because in the situation outside of Windows, no supported multithreading mechanism is available. |
[in] | addref | If TRUE, increments the reference count by 1. This can save you from having to call an addref function seperately. A reference is not added if the function fails. |
1 | On success. |
0 | If an error occured. errno will be set to: EINVAL if pane is NULL. EDEADLK if the function would have deadlocked the thread. ENOSYS if the module was compiled without multithreading support. EACCES if the calling thread does not own the handle. |
Definition at line 642 of file pane2dgray.c.
References pane2dgray16_changeowningthread(), pane2dgray_changeowningthread(), pane2drgb16_changeowningthread(), and pane2drgb_changeowningthread().
void mod_pane2d_clear | ( | pane2d_handle | pane | ) |
Clears the image data in a Pane 2-D handle to pure white.
[in] | pane | The Pane 2-D handle to clear the image data on. |
Definition at line 839 of file pane2dgray.c.
References pane2dgray16_clear(), pane2dgray_clear(), pane2drgb16_clear(), and pane2drgb_clear().
uint32_t mod_pane2d_colortype | ( | void | ) |
Obtains the bitwise integer of what type of color is used in the Pane 2-D module. This is used to determine whether the module stores color or grayscale information.
STICK2XYZ_PANE2D_COLORTYPE_GRAY | If the image created by the module is in grayscale format. |
STICK2XYZ_PANE2D_COLORTYPE_RGB | If the image created by the module is in RGB format. |
STICK2XYZ_PANE2D_COLORTYPE_ALPHA | If the image created by the module has alpha information. This type is bitwise or'ed, so it is not the only type returned. |
STICK2XYZ_PANE2D_COLORTYPE_16BIT | If the image created by the module is internally stored in 16 bits per channel. This type is bitwise or'ed, so it is not the only type returned. |
Definition at line 1227 of file pane2dgray.c.
References pane2dgray16_colortype(), pane2dgray_colortype(), pane2drgb16_colortype(), and pane2drgb_colortype().
stick2xyz_pctchar mod_pane2d_desc | ( | void | ) |
Returns the the internally stored module short description.
stick2xyz_pctchar | The constant module short description. |
Definition at line 126 of file pane2dgray.c.
References pane2dgray16_desc(), pane2dgray_desc(), pane2drgb16_desc(), and pane2drgb_desc().
void mod_pane2d_drawcircle | ( | pane2d_handle | pane, |
int | d, | ||
int | x, | ||
int | y, | ||
int | r | ||
) |
Draws a circle with a center at x1,y1, r pixels long.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | d | The density of the line. |
[in] | x | The x coordinate of the center. |
[in] | y | The y coordinate of the center. |
[in] | r | The radius (how far maximum to travel from the center point) |
Definition at line 1537 of file pane2dgray.c.
References pane2dgray16_drawcircle(), pane2dgray_drawcircle(), pane2drgb16_drawcircle(), and pane2drgb_drawcircle().
void mod_pane2d_drawellipse | ( | pane2d_handle | pane, |
int | d, | ||
int | x, | ||
int | y, | ||
int | rx, | ||
int | ry | ||
) |
Draws an ellipse starting at x1,y1, rx and ry pixels long.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | d | The density of the line. |
[in] | x | The x coordinate of the center. |
[in] | y | The y coordinate of the center. |
[in] | rx | The radius (how far x max. to travel from the center point) |
[in] | ry | The radius (how far y max. to travel from the center point) |
Definition at line 1598 of file pane2dgray.c.
References pane2dgray16_drawellipse(), pane2dgray_drawellipse(), pane2drgb16_drawellipse(), and pane2drgb_drawellipse().
void mod_pane2d_drawline | ( | pane2d_handle | pane, |
int | d, | ||
int | x1, | ||
int | y1, | ||
int | x2, | ||
int | y2 | ||
) |
Draws a line starting at x1,y1 and ending at x2,y2.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | d | The density of the line. |
[in] | x1 | The starting x1 coordinate. |
[in] | y1 | The starting y1 coordinate. |
[in] | x2 | The ending x2 coordinate. |
[in] | y2 | The ending y2 coordinate. |
Definition at line 1507 of file pane2dgray.c.
References pane2dgray16_drawline(), pane2dgray_drawline(), pane2drgb16_drawline(), and pane2drgb_drawline().
void mod_pane2d_drawpixel | ( | pane2d_handle | pane, |
int | x, | ||
int | y | ||
) |
Draws a pixel at x,y.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | x | The x coordinate. |
[in] | y | The y coordinate. |
Definition at line 1482 of file pane2dgray.c.
References pane2dgray16_drawpixel(), pane2dgray_drawpixel(), pane2drgb16_drawpixel(), and pane2drgb_drawpixel().
void mod_pane2d_drawrect | ( | pane2d_handle | pane, |
int | d, | ||
int | x1, | ||
int | y1, | ||
int | x2, | ||
int | y2 | ||
) |
Draws a rectangle starting at x1,y1 and ending at x2,y2.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | d | The density of the line. |
[in] | x1 | The starting x1 coordinate. |
[in] | y1 | The starting y1 coordinate. |
[in] | x2 | The ending x2 coordinate. |
[in] | y2 | The ending y2 coordinate. |
Definition at line 1663 of file pane2dgray.c.
References pane2dgray16_drawrect(), pane2dgray_drawrect(), pane2drgb16_drawrect(), and pane2drgb_drawrect().
void mod_pane2d_drawrighttriangle | ( | pane2d_handle | pane, |
int | d, | ||
int | x1, | ||
int | y1, | ||
int | x2, | ||
int | y2, | ||
int | b | ||
) |
Draws a triangle with a 90 degree angle on a side.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | d | The density of the line. |
[in] | x1 | The x1 coordinate. |
[in] | y1 | The y1 coordinate. |
[in] | x2 | The x2 coordinate. |
[in] | y2 | The y2 coordinate. |
[in] | b | 1 if the 90 degree is to be on the top, 0 otherwise. |
Definition at line 1874 of file pane2dgray.c.
References pane2dgray16_drawrighttriangle(), pane2dgray_drawrighttriangle(), pane2drgb16_drawrighttriangle(), and pane2drgb_drawrighttriangle().
void mod_pane2d_drawsquare | ( | pane2d_handle | pane, |
int | d, | ||
int | l, | ||
int | x1, | ||
int | y1 | ||
) |
Draws a square starting at x1,y1 and ending at a x2,y2 as determined by l.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | d | The density of the line. |
[in] | l | The length of each side. |
[in] | x1 | The starting x1 coordinate. |
[in] | y1 | The starting y1 coordinate. |
Definition at line 1726 of file pane2dgray.c.
References pane2dgray16_drawsquare(), pane2dgray_drawsquare(), pane2drgb16_drawsquare(), and pane2drgb_drawsquare().
void mod_pane2d_drawtriangle | ( | pane2d_handle | pane, |
int | d, | ||
int | x1, | ||
int | y1, | ||
int | x2, | ||
int | y2, | ||
int | x3, | ||
int | y3 | ||
) |
Draws a triangle with lines starting at x1,y1, moving on to x2,y2, and ending at a x3,y3.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | d | The density of the line. |
[in] | x1 | The x1 coordinate. |
[in] | y1 | The y1 coordinate. |
[in] | x2 | The x2 coordinate. |
[in] | y2 | The y2 coordinate. |
[in] | x3 | The x3 coordinate. |
[in] | y3 | The y3 coordinate. |
Definition at line 1792 of file pane2dgray.c.
References pane2dgray16_drawtriangle(), pane2dgray_drawtriangle(), pane2drgb16_drawtriangle(), and pane2drgb_drawtriangle().
void mod_pane2d_drawtworighttriangles | ( | pane2d_handle | pane, |
int | d, | ||
int | x1, | ||
int | y1, | ||
int | x2, | ||
int | y2 | ||
) |
Draws a triangle with a 90 degree angle on a side.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | d | The density of the line. |
[in] | x1 | The x1 coordinate. |
[in] | y1 | The y1 coordinate. |
[in] | x2 | The x2 coordinate. |
[in] | y2 | The y2 coordinate. |
Definition at line 1944 of file pane2dgray.c.
References pane2dgray16_drawtworighttriangles(), pane2dgray_drawtworighttriangles(), pane2drgb16_drawtworighttriangles(), and pane2drgb_drawtworighttriangles().
uint8_t ** mod_pane2d_dupdata | ( | pane2d_handle | pane, |
int | padding | ||
) |
Duplicates image data stored in a Pane 2-D handle.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | padding | The extra amount of bytes to pad onto the result. |
uint8_t** | The duplicated image data. |
NULL | If out of memory or STICK2XYZ_PANE2D_VERTEX_NODRAW is set. |
Definition at line 1253 of file pane2dgray.c.
References pane2dgray16_dupdata(), pane2dgray_dupdata(), pane2drgb16_dupdata(), and pane2drgb_dupdata().
uint16_t * mod_pane2d_dupdata16p | ( | pane2d_handle | pane, |
int | padding | ||
) |
Duplicates image data stored in a Pane 2-D handle in 16 bits.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | padding | The extra amount of bytes to pad onto the result. |
uint8_t** | The duplicated image data. |
NULL | If out of memory or STICK2XYZ_PANE2D_VERTEX_NODRAW is set. |
Definition at line 1400 of file pane2dgray.c.
References pane2dgray16_dupdata16p(), pane2dgray_dupdata16p(), pane2drgb16_dupdata16p(), and pane2drgb_dupdata16p().
uint8_t * mod_pane2d_dupdatap | ( | pane2d_handle | pane, |
int | padding | ||
) |
Duplicates image data stored in a Pane 2-D handle in 8 bits.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | padding | The extra amount of bytes to pad onto the result. |
uint8_t** | The duplicated image data. |
NULL | If out of memory or STICK2XYZ_PANE2D_VERTEX_NODRAW is set. |
Definition at line 1359 of file pane2dgray.c.
References pane2dgray16_dupdatap(), pane2dgray_dupdatap(), pane2drgb16_dupdatap(), and pane2drgb_dupdatap().
int mod_pane2d_dupfunc_getlist | ( | uint32_t | typerequested, |
struct pane2d_dupgen_funcs * | dest | ||
) |
Fills in a structure with pointers to functions that are for allocating and freeing image data from a Pane 2-D handle. This function is typically called by an Output 2-D module.
[in] | typerequested | Must be STICK2XYZ_PANE2D_REQUEST_UINT8PP, STICK2XYZ_PANE2D_REQUEST_UINT8P, STICK2XYZ_PANE2D_REQUEST_UINT16PP, or STICK2XYZ_PANE2D_REQUEST_UINT16P |
[out] | dest | The structure to fill in. |
Definition at line 1459 of file pane2dgray.c.
References pane2dgray16_dupfunc_getlist(), pane2dgray_dupfunc_getlist(), pane2drgb16_dupfunc_getlist(), and pane2drgb_dupfunc_getlist().
uint8_t ** mod_pane2d_dupimage | ( | pane2d_handle | pane, |
int | padding | ||
) |
Duplicates image data stored in a Pane 2-D handle in 8 bits.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | padding | The extra amount of bytes to pad onto the result. |
uint8_t** | The duplicated image data. |
NULL | If out of memory or STICK2XYZ_PANE2D_VERTEX_NODRAW is set. |
Definition at line 1277 of file pane2dgray.c.
References pane2dgray16_dupimage(), pane2dgray_dupimage(), pane2drgb16_dupimage(), and pane2drgb_dupimage().
uint16_t ** mod_pane2d_dupimage16 | ( | pane2d_handle | pane, |
int | padding | ||
) |
Duplicates image data stored in a Pane 2-D handle in 16 bits.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | padding | The extra amount of bytes to pad onto the result. |
uint8_t** | The duplicated image data. |
NULL | If out of memory or STICK2XYZ_PANE2D_VERTEX_NODRAW is set. |
Definition at line 1318 of file pane2dgray.c.
References pane2dgray16_dupimage16(), pane2dgray_dupimage16(), pane2drgb16_dupimage16(), and pane2drgb_dupimage16().
void mod_pane2d_dupxy | ( | pane2d_handle | pane, |
int * | x, | ||
int * | y | ||
) |
Duplicates the maximum x and y coordinates stored in a Pane 2-D handle.
[in] | pane | The Pane 2-D handle to operate on. |
[out] | x | The receiver of the maximum x coordinate. |
[out] | y | The receiver of the maximum y coordinate. |
Definition at line 1436 of file pane2dgray.c.
References pane2dgray16_dupxy(), pane2dgray_dupxy(), pane2drgb16_dupxy(), and pane2drgb_dupxy().
void * mod_pane2d_eventreleased | ( | pane2d_handle | pane | ) |
This function returns a duplicate handle or descriptor to the event object that is signaled when the Pane 2-D handle is being deallocated.
[in] | pane | The handle to query. |
HANDLE | The duplicate handle to the event object. |
int | The duplicate descriptor to the event object. The return value of the function is an int on Linux builds. |
NULL | If DuplicateHandle() failed. |
-1 | If dup() failed. |
Definition at line 680 of file pane2dgray.c.
References pane2dgray16_eventreleased(), pane2dgray_eventreleased(), pane2drgb16_eventreleased(), and pane2drgb_eventreleased().
void mod_pane2d_fillcircle | ( | pane2d_handle | pane, |
pane2d_texture_handle | src, | ||
int | x, | ||
int | y, | ||
int | r | ||
) |
Draws a circle with a center at x1,y1, r pixels long.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | src | The source picture to copy from. If NULL, the black character will be used. |
[in] | x | The x coordinate of the center. |
[in] | y | The y coordinate of the center. |
[in] | r | The radius (how far maximum to travel from the center point) |
Definition at line 1567 of file pane2dgray.c.
References pane2dgray16_fillcircle(), pane2dgray_fillcircle(), pane2drgb16_fillcircle(), and pane2drgb_fillcircle().
void mod_pane2d_fillellipse | ( | pane2d_handle | pane, |
pane2d_texture_handle | src, | ||
int | x, | ||
int | y, | ||
int | rx, | ||
int | ry | ||
) |
Draws an ellipse starting at x1,y1, rx and ry pixels long.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | src | The source picture to copy from. If NULL, the black character will be used. |
[in] | x | The x coordinate of the center. |
[in] | y | The y coordinate of the center. |
[in] | rx | The radius (how far x max. to travel from the center point) |
[in] | ry | The radius (how far y max. to travel from the center point) |
Definition at line 1631 of file pane2dgray.c.
References pane2dgray16_fillellipse(), pane2dgray_fillellipse(), pane2drgb16_fillellipse(), and pane2drgb_fillellipse().
void mod_pane2d_fillrect | ( | pane2d_handle | pane, |
pane2d_texture_handle | src, | ||
int | x1, | ||
int | y1, | ||
int | x2, | ||
int | y2 | ||
) |
Draws a filled rectangle starting at x1,y1 and ending at x2,y2.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | src | The source picture to copy from. If NULL, the black character will be used. |
[in] | x1 | The starting x1 coordinate. |
[in] | y1 | The starting y1 coordinate. |
[in] | x2 | The ending x2 coordinate. |
[in] | y2 | The ending y2 coordinate. |
Definition at line 1696 of file pane2dgray.c.
References pane2dgray16_fillrect(), pane2dgray_fillrect(), pane2drgb16_fillrect(), and pane2drgb_fillrect().
void mod_pane2d_fillrighttriangle | ( | pane2d_handle | pane, |
pane2d_texture_handle | src, | ||
int | x1, | ||
int | y1, | ||
int | x2, | ||
int | y2, | ||
int | b | ||
) |
Draws a triangle with a 90 degree angle on a side. Then the function fills in the triangle with the designated picture.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | src | The source picture to copy from. If NULL, the black character will be used. |
[in] | x1 | The x1 coordinate. |
[in] | y1 | The y1 coordinate. |
[in] | x2 | The x2 coordinate. |
[in] | y2 | The y2 coordinate. |
[in] | b | 1 if the 90 degree is to be on the top, 0 otherwise. |
Definition at line 1911 of file pane2dgray.c.
References pane2dgray16_fillrighttriangle(), pane2dgray_fillrighttriangle(), pane2drgb16_fillrighttriangle(), and pane2drgb_fillrighttriangle().
void mod_pane2d_fillsquare | ( | pane2d_handle | pane, |
pane2d_texture_handle | src, | ||
int | l, | ||
int | x1, | ||
int | y1 | ||
) |
Draws a square starting at x1,y1 and ending at a x2,y2 as determined by l.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | src | The source picture to copy from. If NULL, the black character will be used. |
[in] | l | The length of each side. |
[in] | x1 | The starting x1 coordinate. |
[in] | y1 | The starting y1 coordinate. |
Definition at line 1756 of file pane2dgray.c.
References pane2dgray16_fillsquare(), pane2dgray_fillsquare(), pane2drgb16_fillsquare(), and pane2drgb_fillsquare().
void mod_pane2d_filltriangle | ( | pane2d_handle | pane, |
pane2d_texture_handle | src, | ||
int | x1, | ||
int | y1, | ||
int | x2, | ||
int | y2, | ||
int | x3, | ||
int | y3 | ||
) |
Draws a triangle with lines starting at x1,y1, moving on to x2,y2, and ending at a x3,y3. Then the function fills in the triangle with the designated picture.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | src | The source picture to copy from. If NULL, the black character will be used. |
[in] | x1 | The x1 coordinate. |
[in] | y1 | The y1 coordinate. |
[in] | x2 | The x2 coordinate. |
[in] | y2 | The y2 coordinate. |
[in] | x3 | The x3 coordinate. |
[in] | y3 | The y3 coordinate. |
Definition at line 1834 of file pane2dgray.c.
References pane2dgray16_filltriangle(), pane2dgray_filltriangle(), pane2drgb16_filltriangle(), and pane2drgb_filltriangle().
void mod_pane2d_free | ( | pane2d_handle | pane | ) |
Deallocates a Pane 2-D handle.
[in] | pane | The Pane 2-D handle to deallocate. |
Definition at line 857 of file pane2dgray.c.
References pane2dgray16_free(), pane2dgray_free(), pane2drgb16_free(), and pane2drgb_free().
void mod_pane2d_freedata16p | ( | pane2d_handle | pane, |
uint16_t * | image | ||
) |
Frees image data created from a call to mod_pane2d_dupdata16p
[in] | pane | The Pane 2-D handle that the image was created from. |
[in] | image | The image data to free. |
Definition at line 1417 of file pane2dgray.c.
References pane2dgray16_freedata16p(), pane2dgray_freedata16p(), pane2drgb16_freedata16p(), and pane2drgb_freedata16p().
void mod_pane2d_freedatap | ( | pane2d_handle | pane, |
uint8_t * | image | ||
) |
Frees image data created from a call to mod_pane2d_dupdatap
[in] | pane | The Pane 2-D handle that the image was created from. |
[in] | image | The image data to free. |
Definition at line 1376 of file pane2dgray.c.
References pane2dgray16_freedatap(), pane2dgray_freedatap(), pane2drgb16_freedatap(), and pane2drgb_freedatap().
BOOL mod_pane2d_freedrawaclinfo_windows | ( | pane2d_handle | pane, |
struct pane2d_drawacl * | src | ||
) |
This function frees ACL data from the provided structure.
[in] | pane | The handle to operate on. |
[in,out] | src | The structure with ACL data to free. |
TRUE | On success. |
FALSE | On error. |
Definition at line 465 of file pane2dgray.c.
References pane2dgray16_freedrawaclinfo_windows(), pane2dgray_freedrawaclinfo_windows(), pane2drgb16_freedrawaclinfo_windows(), and pane2drgb_freedrawaclinfo_windows().
void mod_pane2d_freeimage | ( | pane2d_handle | pane, |
uint8_t ** | image | ||
) |
Frees image data created from a call to mod_pane2d_dupimage
[in] | pane | The Pane 2-D handle that the image was created from. |
[in] | image | The image data to free. |
Definition at line 1294 of file pane2dgray.c.
References pane2dgray16_freeimage(), pane2dgray_freeimage(), pane2drgb16_freeimage(), and pane2drgb_freeimage().
void mod_pane2d_freeimage16 | ( | pane2d_handle | pane, |
uint16_t ** | image | ||
) |
Frees image data created from a call to mod_pane2d_dupimage16
[in] | pane | The Pane 2-D handle that the image was created from. |
[in] | image | The image data to free. |
Definition at line 1335 of file pane2dgray.c.
References pane2dgray16_freeimage16(), pane2dgray_freeimage16(), pane2drgb16_freeimage16(), and pane2drgb_freeimage16().
int mod_pane2d_get_bpp | ( | void | ) |
This function returns the bits per pixel (bpp) that the module stores image data in.
int | The bpp of the module. |
Definition at line 250 of file pane2dgray.c.
References pane2dgray16_get_bpp(), pane2dgray_get_bpp(), pane2drgb16_get_bpp(), and pane2drgb_get_bpp().
BOOL mod_pane2d_getdrawaclinfo_windows | ( | pane2d_handle | pane, |
struct pane2d_drawacl * | dest | ||
) |
This function gets the draw writing ACL from a Pane 2-D handle.
[in] | pane | The handle to operate on. |
[in,out] | dest | The structure to fill the ACL info with. |
TRUE | On success. |
FALSE | On error. |
Definition at line 441 of file pane2dgray.c.
References pane2dgray16_getdrawaclinfo_windows(), pane2dgray_getdrawaclinfo_windows(), pane2drgb16_getdrawaclinfo_windows(), and pane2drgb_getdrawaclinfo_windows().
DWORD mod_pane2d_getownerinfo_windows | ( | pane2d_handle | pane, |
LPHANDLE | destvar | ||
) |
This function is a Windows specific function that retrieves the owning thread's id and can also return a duplicated handle to the stored thread handle. The duplicate thread handle will have the SYNCHRONIZE and THREAD_QUERY_LIMITED_INFORMATION rights.
[in] | pane | The handle to query. |
[out] | destvar | An optional parameter to store the duplicated thread handle in. Set to NULL if not desired. |
>0 | If the function was able to get the thread id. The function will set the pointer in destvar to NULL if DuplicateHandle() fails. |
0 | If pane is NULL or the module denies access. This value is not returned if DuplicateHandle() fails. |
Definition at line 415 of file pane2dgray.c.
References pane2dgray16_getownerinfo_windows(), pane2dgray_getownerinfo_windows(), pane2drgb16_getownerinfo_windows(), and pane2drgb_getownerinfo_windows().
void mod_pane2d_getref | ( | pane2d_handle | pane, |
int * | refcount, | ||
int * | refwaiting | ||
) |
This function retrieves the reference counts from an allocated Pane 2-D handle.
[in] | pane | The handle to query. |
[out] | refcount | A pointer to an integer for the reference count. |
[out] | refwaiting | A pointer to an integer for the reference waiting count. |
Definition at line 276 of file pane2dgray.c.
References pane2dgray16_getref(), pane2dgray_getref(), pane2drgb16_getref(), and pane2drgb_getref().
int mod_pane2d_init | ( | int | multithread | ) |
This optional function is called when the module is initialized. This function allows you to return a count of references to the module.
[in] | multithread | 1 if program is running with multiple threads, 0 if program is running single threaded. |
0 | on error. |
1 | any positive integer means success. |
Definition at line 2021 of file pane2dgray.c.
int mod_pane2d_is_multithreaded | ( | pane2d_handle | pane | ) |
This function tells the caller whether a handle is allocated with multithreading enabled.
[in] | pane | The handle to query. |
1 | If the handle is using the multithreading mechanism. |
0 | If the handle is not using the multithreading mechanism, or the module was compiled without multithread support. |
Definition at line 230 of file pane2dgray.c.
References pane2dgray16_is_multithreaded(), pane2dgray_is_multithreaded(), pane2drgb16_is_multithreaded(), and pane2drgb_is_multithreaded().
int mod_pane2d_isowner | ( | pane2d_handle | pane | ) |
This function returns a boolean value indicating whether or not the calling thread owns the handle.
[in] | pane | The handle to operate on. |
1 | If the calling thread owns the handle. |
0 | If the calling thread does not own the handle, or the parameter was NULL. |
Definition at line 361 of file pane2dgray.c.
References pane2dgray16_isowner(), pane2dgray_isowner(), pane2drgb16_isowner(), and pane2drgb_isowner().
void mod_pane2d_lang | ( | stick2xyz_print_ptr | newval | ) |
Changes the pointer type of the language pack calling function.
[in] | newval | The new function pointer to store. |
Definition at line 1996 of file pane2dgray.c.
References pane2dgray16_lang(), pane2dgray_lang(), pane2drgb16_lang(), and pane2drgb_lang().
stick2xyz_pctchar mod_pane2d_name | ( | void | ) |
Returns the internally stored UNIX module name.
stick2xyz_pctchar | The constant UNIX module name. |
Definition at line 111 of file pane2dgray.c.
References pane2dgray16_name(), pane2dgray_name(), pane2drgb16_name(), and pane2drgb_name().
void mod_pane2d_print_segment | ( | pane2d_handle | pane, |
int | use_rgb | ||
) |
Prints out some information about the image stored in a Pane 2-D handle.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | use_rgb | 1 if output is to represent RGB values, 0 otherwise. |
Definition at line 1970 of file pane2dgray.c.
References pane2dgray16_print_segment(), pane2dgray_print_segment(), pane2drgb16_print_segment(), and pane2drgb_print_segment().
int mod_pane2d_release | ( | void | ) |
This optional function is called when the module is being unloaded. This function allows you to run any cleanup code independent of the operating system's way of notifying the module.
0 | when module is ready to be unloaded. |
1 | any positive integer means module is not ready to be unloaded. |
Definition at line 2036 of file pane2dgray.c.
int mod_pane2d_releaseref | ( | pane2d_handle | pane, |
int | asyncrelease, | ||
int | shutdown | ||
) |
This function subtracts a reference from an allocated Pane 2-D handle. When the reference count is zero, the handle is freed (deallocated).
[in] | pane | The handle to operate on. |
[in] | asyncrelease | If 0, the function will block while waiting for other threads with a reference to call release. If 1, the function does not block. This parameter is ignored on handles allocated without multithreading. |
[in] | shutdown | Per the note, should always be 0 when the calling thread is not the owner of the handle. This parameter is ignored on handles allocated without multithreading. |
>0 | If there are still references to other threads. |
0 | If the handle is completely deallocated. |
-1 | If an error occured. errno will be set to: EINVAL if pane is NULL. EDEADLK if the function would have deadlocked the thread. EACCES if shutdown is TRUE and the thread does not own the handle. |
Definition at line 340 of file pane2dgray.c.
References pane2dgray16_releaseref(), pane2dgray_releaseref(), pane2drgb16_releaseref(), and pane2drgb_releaseref().
void mod_pane2d_set_tty | ( | void * | fildescout, |
void * | fildescerr | ||
) |
This function sets the file descriptors for writing to the terminal.
By default, the library uses stdout and stderr.
This function was introduced in version 1.5.0.
[in] | fildescout | The file descriptor (FILE *) for stdout. |
[in] | fildescerr | The file descriptor (FILE *) for stderr. |
Definition at line 190 of file pane2dgray.c.
References pane2dgray16_set_tty(), pane2dgray_set_tty(), pane2drgb16_set_tty(), and pane2drgb_set_tty().
int mod_pane2d_sigterm | ( | pane2d_sigterm_ready | func, |
int | modnumber | ||
) |
This optional function is called when the program receives signal SIGTERM.
[in] | func | The function for the module to call when ready for program exit, if 0 is returned by the module. |
[in] | modnumber | The module number in the dynamic or static array. This number is the parameter when calling func. |
1 | module is ready to be unloaded. |
0 | module is not ready to be unloaded. |
Definition at line 2068 of file pane2dgray.c.
int mod_pane2d_termwaituntilowner | ( | pane2d_handle | pane | ) |
This function causes waiting for mod_pane2d_waituntilowner to fail as interrupted. This function is a polite way for an owning thread to indicate that it is unable to complete the changing of ownership to another thread.
[in] | pane | The handle to operate on. |
1 | If the function sets the termination of wait on owner change. |
0 | If an error occured. errno will be set to: EINVAL if pane is NULL. EDEADLK if the function would have deadlocked the thread. ENOSYS if the module was compiled without multithreading support. EACCES if the calling thread does not own the handle. |
Definition at line 531 of file pane2dgray.c.
References pane2dgray16_termwaituntilowner(), pane2dgray_termwaituntilowner(), pane2drgb16_termwaituntilowner(), and pane2drgb_termwaituntilowner().
uint64_t mod_pane2d_texture_add_gray | ( | pane2d_handle | pane, |
uint8_t | gray, | ||
uint8_t | alpha, | ||
pane2d_texture_handle * | dest | ||
) |
Creates a texture with a background 8-bit grayscale color.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | gray | The grayscale color in 0xXX to use as background. |
[in] | alpha | The alpha value to assign. This is used for transparency. If transparency is not needed, this can be set to 0xFF, or 255. |
[out] | dest | A pointer to a location in memory to receive the handle to the new texture. If you do not need the handle right away, this can be set to NULL. |
>0 | If the add is successful, the ID number of the texture is returned. |
0 | If an error occured. |
Definition at line 995 of file pane2dgray.c.
References pane2dgray16_texture_add_gray(), pane2dgray_texture_add_gray(), pane2drgb16_texture_add_gray(), and pane2drgb_texture_add_gray().
uint64_t mod_pane2d_texture_add_gray16 | ( | pane2d_handle | pane, |
uint16_t | gray, | ||
uint16_t | alpha, | ||
pane2d_texture_handle * | dest | ||
) |
Creates a texture with a background 16-bit grayscale color.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | gray | The grayscale color in 0xXXXX to use as background. |
[in] | alpha | The alpha value to assign. This is used for transparency. If transparency is not needed, this can be set to 0xFFFF, or 65535. |
[out] | dest | A pointer to a location in memory to receive the handle to the new texture. If you do not need the handle right away, this can be set to NULL. |
>0 | If the add is successful, the ID number of the texture is returned. |
0 | If an error occured. |
Definition at line 1030 of file pane2dgray.c.
References pane2dgray16_texture_add_gray16(), pane2dgray_texture_add_gray16(), pane2drgb16_texture_add_gray16(), and pane2drgb_texture_add_gray16().
uint64_t mod_pane2d_texture_add_rgb | ( | pane2d_handle | pane, |
uint8_t | red, | ||
uint8_t | green, | ||
uint8_t | blue, | ||
uint8_t | alpha, | ||
pane2d_texture_handle * | dest | ||
) |
Creates a texture with a background 8-bit RGB color.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | red | The red color in 0xXX to use as background. |
[in] | green | The green color in 0xXX to use as background. |
[in] | blue | The blue color in 0xXX to use as background. |
[in] | alpha | The alpha value to assign. This is used for transparency. If transparency is not needed, this can be set to 0xFF, or 255. |
[out] | dest | A pointer to a location in memory to receive the handle to the new texture. If you do not need the handle right away, this can be set to NULL. |
>0 | If the add is successful, the ID number of the texture is returned. |
0 | If an error occured. |
Definition at line 1073 of file pane2dgray.c.
References pane2dgray16_texture_add_rgb(), pane2dgray_texture_add_rgb(), pane2drgb16_texture_add_rgb(), and pane2drgb_texture_add_rgb().
uint64_t mod_pane2d_texture_add_rgb16 | ( | pane2d_handle | pane, |
uint16_t | red, | ||
uint16_t | green, | ||
uint16_t | blue, | ||
uint16_t | alpha, | ||
pane2d_texture_handle * | dest | ||
) |
Creates a texture with a background 16-bit RGB color.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | red | The red color in 0xXXXX to use as background. |
[in] | green | The green color in 0xXXXX to use as background. |
[in] | blue | The blue color in 0xXXXX to use as background. |
[in] | alpha | The alpha value to assign. This is used for transparency. If transparency is not needed, this can be set to 0xFFFF, or 65535. |
[out] | dest | A pointer to a location in memory to receive the handle to the new texture. If you do not need the handle right away, this can be set to NULL. |
>0 | If the add is successful, the ID number of the texture is returned. |
0 | If an error occured. |
Definition at line 1126 of file pane2dgray.c.
References pane2dgray16_texture_add_rgb16(), pane2dgray_texture_add_rgb16(), pane2drgb16_texture_add_rgb16(), and pane2drgb_texture_add_rgb16().
void mod_pane2d_texture_clear | ( | pane2d_handle | pane | ) |
Clears the array of textures in a Pane 2-D handle.
[in] | pane | The Pane 2-D handle to operate on. |
Definition at line 1192 of file pane2dgray.c.
References pane2dgray16_texture_clear(), pane2dgray_texture_clear(), pane2drgb16_texture_clear(), and pane2drgb_texture_clear().
int mod_pane2d_texture_enum | ( | pane2d_handle | pane, |
pane2d_texture_handle * | dest, | ||
uint64_t | number | ||
) |
Retrieves a texture item from the array as a handle.
[in] | pane | The Pane 2-D handle to operate on. |
[out] | dest | The pointer to a location of memory to store the handle to the texture enum. |
[in] | number | The item number to retrieve from the array. Note that this has to be 1 for the first item in the array since 0 is not a valid texture item number. |
1 | If the element exists. |
0 | If the element does not exist or is out of bounds. |
Definition at line 1169 of file pane2dgray.c.
References pane2dgray16_texture_enum(), pane2dgray_texture_enum(), pane2drgb16_texture_enum(), and pane2drgb_texture_enum().
int mod_pane2d_type | ( | void | ) |
Returns the integer describing the module type.
The possible values are:
ASCII Modules:
STICK2XYZ_MODTYPE_PANE2D_DEBUG
UNICODE Modules:
STICK2XYZ_MODTYPE_PANE2D_UNICODE
STICK2XYZ_MODTYPE_PANE2D_UNICODE_DEBUG
int | The module type as described above. |
Definition at line 170 of file pane2dgray.c.
References pane2dgray16_type(), pane2dgray_type(), pane2drgb16_type(), and pane2drgb_type().
void mod_pane2d_version | ( | int * | dest | ) |
Sets up the major, minor, and revision numbers into three integers.
[out] | dest | An array of three integers to receive the module data. |
Definition at line 141 of file pane2dgray.c.
References pane2dgray16_version(), pane2dgray_version(), pane2drgb16_version(), and pane2drgb_version().
int mod_pane2d_vertex_get | ( | pane2d_handle | pane, |
int | elm, | ||
struct pane2d_vertex_elm * | dest | ||
) |
Retrieves an item from the vertex array.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | elm | The element number to retrieve. |
[out] | dest | The memory location to receive the pointer data. |
1 | If the element exists. |
0 | If the element does not exist or is out of bounds. |
Definition at line 925 of file pane2dgray.c.
References pane2dgray16_vertex_get(), pane2dgray_vertex_get(), pane2drgb16_vertex_get(), and pane2drgb_vertex_get().
int mod_pane2d_vertex_get_v2 | ( | pane2d_handle | pane, |
int | elm, | ||
struct pane2d_vertex_elm_v2 * | dest | ||
) |
Retrieves an item from the vertex array. This function also retrieves the texture handle.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | elm | The element number to retrieve. |
[out] | dest | The memory location to receive the pointer data. |
1 | If the element exists. |
0 | If the element does not exist or is out of bounds. |
Definition at line 960 of file pane2dgray.c.
References pane2dgray16_vertex_get_v2(), pane2dgray_vertex_get_v2(), pane2drgb16_vertex_get_v2(), and pane2drgb_vertex_get_v2().
uint32_t mod_pane2d_vertex_getopts | ( | pane2d_handle | pane | ) |
Gets the bit-wise vertex options.
[in] | pane | The Pane 2-D handle to operate on. |
uint32_t | The stored vertex options. |
Definition at line 875 of file pane2dgray.c.
References pane2dgray16_vertex_getopts(), pane2dgray_vertex_getopts(), pane2drgb16_vertex_getopts(), and pane2drgb_vertex_getopts().
void mod_pane2d_vertex_setopts | ( | pane2d_handle | pane, |
uint32_t | newopts | ||
) |
Sets the bit-wise vertex options.
[in] | pane | The Pane 2-D handle to operate on. |
[in] | newopts | The new vertex options to store. |
Definition at line 896 of file pane2dgray.c.
References pane2dgray16_vertex_setopts(), pane2dgray_vertex_setopts(), pane2drgb16_vertex_setopts(), and pane2drgb_vertex_setopts().
int mod_pane2d_waituntilowner | ( | pane2d_handle | pane, |
int | addref | ||
) |
This function blocks until the calling thread owns the given handle. If the owning thread abandoned the handle (terminated without deallocating the handle) on the Windows build, the function will have the calling thread take over the given handle.
[in] | pane | The handle to operate on. |
[in] | addref | If TRUE, Increments the reference count by 1. This can save you from having to call an addref function seperately. A reference is not added if the function fails. |
1 | When calling thread now owns the handle. |
0 | If an error occured. errno will be set to: EINVAL if pane is NULL. EDEADLK if the function would have deadlocked the thread. ENOSYS if the module was compiled without multithreading support. EDEADLK for this function means that the handle is being shut down by the owning thread. EINTR if mod_pane2d_termwaituntilowner was called successfully. |
Definition at line 505 of file pane2dgray.c.
References pane2dgray16_waituntilowner(), pane2dgray_waituntilowner(), pane2drgb16_waituntilowner(), and pane2drgb_waituntilowner().