int BEE::Timeline::print() { std::string action_string = get_action_string(); std::stringstream s; s << "Timeline { " "\n id " << id << "\n name " << name << "\n path " << path << "\n start_frame " << start_frame << "\n position_frame " << position_frame << "\n is_looping " << is_looping << "\n action_list\n" << debug_indent(action_string, 2) << "\n}\n"; game->messenger_send({"engine", "resource"}, BEE_MESSAGE_INFO, s.str()); return 0; }
extern SANE_Status control_option (SANE_Handle handle, const SANE_Option_Descriptor *option, SANE_Int index, SANE_Action action, void *value, int *ret) { SANE_Status status; char *old_value; switch (option->type) { case SANE_TYPE_BOOL: old_value = o_printf (*((SANE_Bool *) value) ? "SANE_TRUE" : "SANE_FALSE"); break; case SANE_TYPE_INT: old_value = o_printf ("%d", *((SANE_Int *) value)); break; case SANE_TYPE_FIXED: old_value = o_printf ("%f", SANE_UNFIX (*((SANE_Fixed *) value))); break; case SANE_TYPE_STRING: old_value = o_printf ("\"%s\"", (char *) value); break; default: old_value = o_strdup ("?"); break; } status = sane_control_option (handle, index, action, value, ret); switch (option->type) { case SANE_TYPE_BOOL: o_log(DEBUGM, "sane_control_option (%d, %s, %s) -> (%s, %s)", index, get_action_string (action), *((SANE_Bool *) value) ? "SANE_TRUE" : "SANE_FALSE", get_status_string (status), old_value); break; case SANE_TYPE_INT: o_log(DEBUGM, "sane_control_option (%d, %s, %d) -> (%s, %s)", index, get_action_string (action), *((SANE_Int *) value), get_status_string (status), old_value); break; case SANE_TYPE_FIXED: o_log(DEBUGM, "sane_control_option (%d, %s, %f) -> (%s, %s)", index, get_action_string (action), SANE_UNFIX (*((SANE_Fixed *) value)), get_status_string (status), old_value); break; case SANE_TYPE_STRING: o_log(DEBUGM, "sane_control_option (%d, %s, \"%s\") -> (%s, %s)", index, get_action_string (action), (char *) value, get_status_string (status), old_value); break; default: break; } free (old_value); if (status != SANE_STATUS_GOOD) o_log(WARNING, "Error setting option %s: %s", option->name, sane_strstatus(status)); return status; }