I32 enr_GetThemeName (const enr_Chart* chart, I32 idx, CHAR** name) { enr_App* app = chart ? chart->app : NULL; JCLArray* themes = app ? &app->themes : NULL; ChartTheme** theme = themes ? (ChartTheme**) ArrayGet (themes, idx) : NULL; if (theme == NULL) { return ENR_ERR_BADARG; } *name = (*theme)->name; return ENR_NOERR; }