Mir 1.0
Mir application programming interface
Modules engine

Modules

 EDIntensity
 
 EDPattern
 
 Example
 
 GLSFunc
 
 Image
 

Data Structures

struct  mir_module_t_
 
struct  mir_module_symbol_t_
 This structure is used to assign symbol names to module pointers. More...
 

Macros

#define MIR_MODULE_MAGIC_COOKIE   0x8d37077fUL /* crc32 for "Mir" */
 
#define MIR_MODULE_MAGIC_NUMBER_MAJOR   1
 
#define MIR_MODULE_MAGIC_NUMBER_MINOR   0 /* 0...n */
 
#define MIR_MODULE_STANDARD_STUFF
 

Typedefs

typedef struct mir_module_t_ mir_module_t
 
typedef struct mir_module_symbol_t_ mir_module_symbol_t
 This structure is used to assign symbol names to module pointers.
 

Detailed Description

Macro Definition Documentation

◆ MIR_MODULE_MAGIC_COOKIE

#define MIR_MODULE_MAGIC_COOKIE   0x8d37077fUL /* crc32 for "Mir" */

MIR_MODULE_MAGIC_NUMBER_MAJOR Major API changes that could cause compatibility problems for older modules such as structure size changes. No binary compatibility is possible across a change in the major version.

MIR_MODULE_MAGIC_NUMBER_MINOR Minor API changes that do not cause binary compatibility problems. Should be reset to 0 when upgrading MIR_MODULE_MAGIC_NUMBER_MAJOR.

◆ MIR_MODULE_STANDARD_STUFF

#define MIR_MODULE_STANDARD_STUFF
Value:
MIR_MODULE_MAGIC_NUMBER_MAJOR, \
MIR_MODULE_MAGIC_NUMBER_MINOR, \
NULL, \
NULL, \
MIR_MODULE_MAGIC_COOKIE

Module structure initializers

Initializer for the first few module slots, which are only really set up once we start running. Note that the first two slots provide a version check; this should allow us to deal with changes to the API. The major number should reflect changes to the API handler table itself or removal of functionality. The minor number should reflect additions of functionality to the existing API.

Use this in all standard modules.

The idea of magic numbers has been taken from Apache web server project.

Typedef Documentation

◆ mir_module_t

typedef struct mir_module_t_ mir_module_t

Module structure.