diff options
author | sanine-a <sanine.not@pm.me> | 2020-12-19 00:34:45 -0600 |
---|---|---|
committer | sanine-a <sanine.not@pm.me> | 2020-12-19 00:34:45 -0600 |
commit | 86e562d59eb26f305cb183d29b82123f944dd328 (patch) | |
tree | b641fd53364b2ad60af256eaf16811f8495c8922 /src/common.h | |
parent | 91b914bc0eb97a76f2c3a1caa64fdfde29ca16a1 (diff) |
add additional cairo texture config functions
Diffstat (limited to 'src/common.h')
-rw-r--r-- | src/common.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h index 13d3a14..57a9de2 100644 --- a/src/common.h +++ b/src/common.h @@ -202,6 +202,32 @@ typedef struct honey_lua_element { void honey_lua_push_element(lua_State* L, honey_lua_element element); +/** @brief Get an enum value from a string. + * + * This function expects the variadic arguments of the form STR1, VAL1, STR2, VAL2, ... + * + * @param[out] k The result of the conversion. + * @param[in] string The string to check. + * @param[in] n The number of variadic pairs provided. + * @param[in] ... Variadic arguments as described above. + * + * @returns true if the string parsed successfully; false otherwise. + */ +bool honey_string_to_enum(int* k, char* string, int n, ...); + +/** @brief Get an enum value from a string. + * + * This function expects the variadic arguments of the form STR1, VAL1, STR2, VAL2, ... + * + * @param[in] string The resulting string. + * @param[out] k The integer to check. + * @param[in] n The number of variadic pairs provided. + * @param[in] ... Variadic arguments as described above. + * + * @returns true if the integer parsed successfully; false otherwise. + */ +bool honey_enum_to_string(char** string, int k, int n, ...); + /** @brief Create and populate a lua table. * * This function expects a list of the form `type, name, element, type, name, element...`. |