mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-02-06 18:31:57 +08:00
expose the struct of BLOCKHEAP
This commit is contained in:
@@ -581,14 +581,29 @@ enum {
|
||||
* @{
|
||||
*/
|
||||
|
||||
struct _BLOCKHEAP;
|
||||
|
||||
/**
|
||||
* MiniGUI's private block data heap.
|
||||
*
|
||||
* \sa InitBlockDataHeap, DestroyBlockDataHeap
|
||||
*/
|
||||
typedef struct _BLOCKHEAP BLOCKHEAP;
|
||||
typedef struct _BLOCKHEAP {
|
||||
#ifdef _MGRM_THREADS
|
||||
pthread_mutex_t lock;
|
||||
#endif
|
||||
/** Size of one block element in bytes. */
|
||||
size_t sz_block;
|
||||
/** Size of the heap in blocks. */
|
||||
size_t sz_heap;
|
||||
/** The number of blocks extra allocated. */
|
||||
size_t nr_alloc;
|
||||
/** The size of usage bitmap in bytes. */
|
||||
size_t sz_usage_bmp;
|
||||
|
||||
/** The pointer to the pre-allocated heap. */
|
||||
unsigned char* heap;
|
||||
/** The pointer to the usage bitmap. */
|
||||
unsigned char* usage_bmp;
|
||||
} BLOCKHEAP;
|
||||
|
||||
/**
|
||||
* \var typedef BLOCKHEAP* PBLOCKHEAP
|
||||
@@ -614,9 +629,6 @@ typedef BLOCKHEAP* PBLOCKHEAP;
|
||||
*
|
||||
* \return TRUE on success, FALSE on error.
|
||||
*
|
||||
* \note This function does not return anything. You should check the \a heap
|
||||
* field of the \a heap structure.
|
||||
*
|
||||
* \sa BLOCKHEAP
|
||||
*/
|
||||
MG_EXPORT BOOL InitBlockDataHeap (PBLOCKHEAP heap,
|
||||
|
||||
@@ -52,6 +52,8 @@
|
||||
#ifndef GUI_BLOCKHEAP_H
|
||||
#define GUI_BLOCKHEAP_H
|
||||
|
||||
#ifndef _MGUI_GDI_H /* included in include/gdi.h */
|
||||
|
||||
struct _BLOCKHEAP {
|
||||
#ifdef _MGRM_THREADS
|
||||
pthread_mutex_t lock;
|
||||
@@ -71,8 +73,6 @@ struct _BLOCKHEAP {
|
||||
unsigned char* usage_bmp;
|
||||
};
|
||||
|
||||
#ifndef _MGUI_GDI_H /* included in include/gdi.h */
|
||||
|
||||
typedef struct _BLOCKHEAP BLOCKHEAP;
|
||||
typedef BLOCKHEAP* PBLOCKHEAP;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user