|
NAMING_CONVENTION
Naming convention used in WGAL
WGAL Naming ConventionWGAL utilizes a naming convention similar to that of OpenGL with minor differences. Note that until official release, naming convention is subject to change without any notice. TypesNames of WGAL types are prefixed with 'WGAL'. Apart from the prefix, the first letters of each internal words or abbreviations are capitalized. // 'I' of Int32 is capitalized WGALInt32 // 'U', which stands for 'unsigned', and 'I' of UInt32 are capitalized WGALUInt32 Pointer types are usually suffixed with 'Ptr'. Note that there are some exceptions. Except for a few predefined types, you have to use * for pointers. For complete list of predefined pointer types, please refer to WGAL Type Definition. Function pointer types are suffixed with 'Proc'. FunctionsNames of WGAL functions are prefixed with 'wgal'. Note that the prefix wgal is not capitalized. Apart from the prefix, the first letters of each internal words or abbreviations are capitalized. // 'C' of Clear is capitalized wgalClear(WGALColor) // 'L' of Load and 'I' of Image are capitalized wgalLoadImage(WGALCString) Sometimes a word composed of multiple words may be considered as a single word. // 'I' of Is and 'F' of Fullscreen are capitalized. // Note that Fullscreen is considered as a single word. wgalIsFullscreen() ConstantsNames of WGAL constants are prefixed with 'WGAL_'. All following letters are capitalized and spaces are represented as '_'. WGAL_BLEND_NONE WGAL_KC_ESCAPE Note the exception that shorthand constants of macros may or may not have prefixes. COLOR_RED MacrosNames of WGAL macros are similar to those of constants, while having no prefixes. COLOR_XRGB(r,g,b) BOOLEAN(x) |
Sign in to add a comment