Added Gallery functions to the C API