diff options
| -rw-r--r-- | api/GenerateHeaderFiles.cpp | 20 | ||||
| -rw-r--r-- | api/GenerateHtmlDocumentation.cpp | 258 | ||||
| -rw-r--r-- | api/Scanner.h | 2 | ||||
| -rw-r--r-- | api/Specification.cpp | 8 | ||||
| -rw-r--r-- | api/Specification.h | 7 | ||||
| -rw-r--r-- | api/Utilities.cpp | 27 | ||||
| -rw-r--r-- | scriptc/rs_allocation_data.rsh | 49 | ||||
| -rw-r--r-- | scriptc/rs_atomic.rsh | 41 | ||||
| -rw-r--r-- | scriptc/rs_convert.rsh | 3 | ||||
| -rw-r--r-- | scriptc/rs_core.rsh | 3 | ||||
| -rw-r--r-- | scriptc/rs_debug.rsh | 3 | ||||
| -rw-r--r-- | scriptc/rs_for_each.rsh | 15 | ||||
| -rw-r--r-- | scriptc/rs_graphics.rsh | 75 | ||||
| -rw-r--r-- | scriptc/rs_io.rsh | 7 | ||||
| -rw-r--r-- | scriptc/rs_math.rsh | 75 | ||||
| -rw-r--r-- | scriptc/rs_matrix.rsh | 135 | ||||
| -rw-r--r-- | scriptc/rs_object_info.rsh | 47 | ||||
| -rw-r--r-- | scriptc/rs_object_types.rsh | 3 | ||||
| -rw-r--r-- | scriptc/rs_quaternion.rsh | 65 | ||||
| -rw-r--r-- | scriptc/rs_time.rsh | 9 | ||||
| -rw-r--r-- | scriptc/rs_value_types.rsh | 23 | ||||
| -rw-r--r-- | scriptc/rs_vector_math.rsh | 3 |
22 files changed, 467 insertions, 411 deletions
diff --git a/api/GenerateHeaderFiles.cpp b/api/GenerateHeaderFiles.cpp index eb4c9dd8..db94b404 100644 --- a/api/GenerateHeaderFiles.cpp +++ b/api/GenerateHeaderFiles.cpp @@ -72,7 +72,8 @@ static void writeVersionGuardEnd(GeneratedFile* file, VersionInfo info) { } static void writeComment(GeneratedFile* file, const string& name, const string& briefComment, - const vector<string>& comment, bool closeBlock) { + const vector<string>& comment, bool addDeprecatedWarning, + bool closeBlock) { if (briefComment.empty() && comment.size() == 0) { return; } @@ -81,6 +82,10 @@ static void writeComment(GeneratedFile* file, const string& name, const string& *file << " * " << name << ": " << briefComment << "\n"; *file << " *\n"; } + if (addDeprecatedWarning) { + *file << " * DEPRECATED. Do not use.\n"; + *file << " *\n"; + } for (size_t ct = 0; ct < comment.size(); ct++) { string s = stripHtml(comment[ct]); s = stringReplace(s, "@", ""); @@ -97,7 +102,8 @@ static void writeComment(GeneratedFile* file, const string& name, const string& static void writeConstantComment(GeneratedFile* file, const Constant& constant) { const string name = constant.getName(); - writeComment(file, name, constant.getSummary(), constant.getDescription(), true); + writeComment(file, name, constant.getSummary(), constant.getDescription(), + constant.deprecated(), true); } static void writeConstantSpecification(GeneratedFile* file, const ConstantSpecification& spec) { @@ -171,7 +177,7 @@ static void writeTypeSpecification(GeneratedFile* file, const TypeSpecification& static void writeTypeComment(GeneratedFile* file, const Type& type) { const string name = type.getName(); - writeComment(file, name, type.getSummary(), type.getDescription(), true); + writeComment(file, name, type.getSummary(), type.getDescription(), type.deprecated(), true); } static void writeFunctionPermutation(GeneratedFile* file, const FunctionSpecification& spec, @@ -268,7 +274,8 @@ static void writeFunctionPermutation(GeneratedFile* file, const FunctionSpecific static void writeFunctionComment(GeneratedFile* file, const Function& function) { // Write the generic documentation. - writeComment(file, function.getName(), function.getSummary(), function.getDescription(), false); + writeComment(file, function.getName(), function.getSummary(), function.getDescription(), + function.deprecated(), false); // Comment the parameters. if (function.someParametersAreDocumented()) { @@ -276,7 +283,7 @@ static void writeFunctionComment(GeneratedFile* file, const Function& function) *file << " * Parameters:\n"; for (auto p : function.getParameters()) { if (!p->documentation.empty()) { - *file << " * " << p->name << " " << p->documentation << "\n"; + *file << " * " << p->name << ": " << p->documentation << "\n"; } } } @@ -310,7 +317,8 @@ static bool writeHeaderFile(const string& directory, const SpecFile& specFile) { // Write the comments that start the file. file.writeNotices(); writeComment(&file, headerFileName, specFile.getBriefDescription(), - specFile.getFullDescription(), true); + specFile.getFullDescription(), false, true); + file << "\n"; // Write the ifndef that prevents the file from being included twice. const string guard = makeGuardString(headerFileName); diff --git a/api/GenerateHtmlDocumentation.cpp b/api/GenerateHtmlDocumentation.cpp index a9e4d438..1de53289 100644 --- a/api/GenerateHtmlDocumentation.cpp +++ b/api/GenerateHtmlDocumentation.cpp @@ -81,8 +81,8 @@ static void writeHtmlHeader(GeneratedFile* file) { } static void writeHtmlFooter(GeneratedFile* file) { - *file << "</div> <!-- end body-content -->\n" - "</body></html>\n"; + //*file << "</div>n" + *file << "<!-- end body-content -->\n</body></html>\n"; } // If prefix starts input, copy it to stream and remove it from input. @@ -244,14 +244,13 @@ static bool generateHtmlParagraphs(GeneratedFile* file, const vector<string>& de return true; } -static void writeSummaryTableStart(GeneratedFile* file, const char* label, bool labelIsHeading) { +static void writeSummaryTableStart(GeneratedFile* file, const string& label, bool labelIsHeading) { if (labelIsHeading) { - *file << "<h2 style='margin-bottom: 0px;'>" << label << "</h2><hr>\n"; + *file << "<h2 style='margin-bottom: 0px;'>" << label << "</h2><hr/>\n"; } - //#TODO promethods was the id. implication? - *file << "<table id='id" << label << "' class='jd-sumtable'><tbody>\n"; + *file << "<table class='jd-sumtable'><tbody>\n"; if (!labelIsHeading) { - *file << " <tr><th colspan='12'>" << label << "</th></tr>\n"; + *file << " <tr><th colspan='2'>" << label << "</th></tr>\n"; } } @@ -259,86 +258,83 @@ static void writeSummaryTableEnd(GeneratedFile* file) { *file << "</tbody></table>\n"; } -static void writeSummaryTableEntry(GeneratedFile* file, Constant* constant) { - if (constant->hidden()) { +enum DeprecatedSelector { + DEPRECATED_ONLY, + NON_DEPRECATED_ONLY, + ALL, +}; + +static void writeSummaryTableEntry(ostream* stream, Definition* definition, + DeprecatedSelector deprecatedSelector) { + if (definition->hidden()) { return; } - *file << " <tr class='alt-color api apilevel-1'>\n"; - *file << " <td class='jd-linkcol'><nobr>\n"; - *file << " <a href='" << constant->getUrl() << "'>" << constant->getName() - << "</a></nobr>\n"; - *file << " </td>\n"; - *file << " <td class='jd-descrcol' width='100%'><nobr>\n"; - *file << " " << constant->getSummary() << "\n"; - *file << " </td>\n"; - *file << " </tr>\n"; -} - -static void writeSummaryTableEntry(GeneratedFile* file, Type* type) { - if (type->hidden()) { + const bool deprecated = definition->deprecated(); + if ((deprecatedSelector == DEPRECATED_ONLY && !deprecated) || + (deprecatedSelector == NON_DEPRECATED_ONLY && deprecated)) { return; } - *file << " <tr class='alt-color api apilevel-1'>\n"; - *file << " <td class='jd-linkcol'><nobr>\n"; - *file << " <a href='" << type->getUrl() << "'>" << type->getName() << "</a></nobr>\n"; - *file << " </td>\n"; - *file << " <td class='jd-descrcol' width='100%'><nobr>\n"; - *file << " " << type->getSummary() << "\n"; - *file << " </td>\n"; - *file << " </tr>\n"; + + *stream << " <tr class='alt-color api apilevel-1'>\n"; + *stream << " <td class='jd-linkcol'>\n"; + *stream << " <a href='" << definition->getUrl() << "'>" << definition->getName() << "</a>\n"; + *stream << " </td>\n"; + *stream << " <td class='jd-descrcol' width='100%'>\n"; + *stream << " "; + if (deprecated) { + *stream << "<b>Deprecated</b>. "; + } + *stream << definition->getSummary() << "\n"; + *stream << " </td>\n"; + *stream << " </tr>\n"; } -static void writeSummaryTableEntry(GeneratedFile* file, Function* function) { - *file << " <tr class='alt-color api apilevel-1'>\n"; - *file << " <td class='jd-linkcol'>\n"; - *file << " <a href='" << function->getUrl() << "'>" << function->getName() << "</a>\n"; - *file << " </td>\n"; - *file << " <td class='jd-linkcol' width='100%'>\n"; // TODO jd-typecol - // *file << " <nobr><span class='sympad'></span></nobr>\n"; - *file << " <div class='jd-descrdiv'>\n"; - *file << " " << function->getSummary() << "\n"; - *file << " </div>\n"; - *file << " </td>\n"; - *file << " </tr>\n"; +static void writeSummaryTable(GeneratedFile* file, const ostringstream* entries, const char* name, + DeprecatedSelector deprecatedSelector, bool labelAsHeader) { + string s = entries->str(); + if (!s.empty()) { + string prefix; + if (deprecatedSelector == DEPRECATED_ONLY) { + prefix = "Deprecated "; + } + writeSummaryTableStart(file, prefix + name, labelAsHeader); + *file << s; + writeSummaryTableEnd(file); + } } static void writeSummaryTables(GeneratedFile* file, const map<string, Constant*>& constants, const map<string, Type*>& types, - const map<string, Function*>& functions, bool labelAsHeader) { - if (constants.size() > 0) { - writeSummaryTableStart(file, "Constants", labelAsHeader); - for (auto e : constants) { - writeSummaryTableEntry(file, e.second); - } - writeSummaryTableEnd(file); + const map<string, Function*>& functions, + DeprecatedSelector deprecatedSelector, bool labelAsHeader) { + ostringstream constantStream; + for (auto e : constants) { + writeSummaryTableEntry(&constantStream, e.second, deprecatedSelector); } + writeSummaryTable(file, &constantStream, "Constants", deprecatedSelector, labelAsHeader); - if (types.size() > 0) { - writeSummaryTableStart(file, "Types", labelAsHeader); - for (auto e : types) { - writeSummaryTableEntry(file, e.second); - } - writeSummaryTableEnd(file); + ostringstream typeStream; + for (auto e : types) { + writeSummaryTableEntry(&typeStream, e.second, deprecatedSelector); } + writeSummaryTable(file, &typeStream, "Types", deprecatedSelector, labelAsHeader); - if (functions.size() > 0) { - writeSummaryTableStart(file, "Functions", labelAsHeader); - for (auto e : functions) { - writeSummaryTableEntry(file, e.second); - } - writeSummaryTableEnd(file); + ostringstream functionStream; + for (auto e : functions) { + writeSummaryTableEntry(&functionStream, e.second, deprecatedSelector); } + writeSummaryTable(file, &functionStream, "Functions", deprecatedSelector, labelAsHeader); } static void writeHtmlVersionTag(GeneratedFile* file, VersionInfo info) { + ostringstream stream; if (info.intSize == 32) { - *file << "For 32 bits: "; + stream << "When compiling for 32 bits. "; } else if (info.intSize == 64) { - *file << "For 64 bits: "; + stream << "When compiling for 64 bits. "; } if (info.minVersion > 1 || info.maxVersion) { - *file << "<div>"; const char* mid = "<a " "href='http://developer.android.com/guide/topics/manifest/" @@ -346,64 +342,81 @@ static void writeHtmlVersionTag(GeneratedFile* file, VersionInfo info) { if (info.minVersion <= 1) { // No minimum if (info.maxVersion > 0) { - *file << "Removed from " << mid << info.maxVersion + 1; + stream << "Removed from " << mid << info.maxVersion + 1; } } else { if (info.maxVersion == 0) { // No maximum - *file << "Added in " << mid << info.minVersion; + stream << "Added in " << mid << info.minVersion; } else { - *file << mid << info.minVersion << " - " << info.maxVersion; + stream << mid << info.minVersion << " - " << info.maxVersion; } } - *file << "</a></div>\n"; + stream << "</a>"; + } + const string s = stream.str(); + if (!s.empty()) { + // TODO simplify + //*file << " <p>" << s << "</p>\n"; + *file << " " << s << "\n"; } } -static void writeDetailedType(GeneratedFile* file, const TypeSpecification* type) { + +static void writeDetailedTypeSpecification(GeneratedFile* file, const TypeSpecification* type) { switch (type->getKind()) { case SIMPLE: - *file << "Base type: " << type->getSimpleType() << "\n"; + *file << "<p>A typedef of: " << type->getSimpleType() + << " "; + writeHtmlVersionTag(file, type->getVersionInfo()); + *file << "</p>\n"; break; case ENUM: { - *file << "An enum<br>\n"; - *file << " <table class='jd-tagtable'><tbody>\n"; + *file << "<p>An enum with the following values: \n"; + writeHtmlVersionTag(file, type->getVersionInfo()); + *file << "</p>\n"; + *file << " <table class='jd-tagtable'><tbody>\n"; const vector<string>& values = type->getValues(); const vector<string>& valueComments = type->getValueComments(); for (size_t i = 0; i < values.size(); i++) { - *file << " <tr><th>" << values[i] << "</th>"; - if (valueComments.size() > i && !valueComments[i].empty()) { - *file << "<td>" << valueComments[i] << "</td>"; + *file << " <tr><th>" << values[i] << "</th><td>"; + if (valueComments.size() > i) { + *file << valueComments[i]; } - *file << "</tr>\n"; + *file << "</td></tr>\n"; } - *file << " </tbody></table>\n"; + *file << " </tbody></table><br/>\n"; break; } case STRUCT: { // TODO string mStructName; // The name found after the struct keyword - *file << "A structure<br>\n"; - *file << " <table class='jd-tagtable'><tbody>\n"; + *file << "<p>A structure with the following fields: "; + writeHtmlVersionTag(file, type->getVersionInfo()); + *file << "</p>\n"; + + *file << " <table class='jd-tagtable'><tbody>\n"; const vector<string>& fields = type->getFields(); const vector<string>& fieldComments = type->getFieldComments(); for (size_t i = 0; i < fields.size(); i++) { - *file << " <tr><th>" << fields[i] << "</th>"; + *file << " <tr><th>" << fields[i] << "</th><td>"; if (fieldComments.size() > i && !fieldComments[i].empty()) { - *file << "<td>" << fieldComments[i] << "</td>"; + *file << fieldComments[i]; } - *file << "</tr>\n"; + *file << "</td></tr>\n"; } - *file << " </tbody></table>\n"; + *file << " </tbody></table><br/>\n"; break; } } - writeHtmlVersionTag(file, type->getVersionInfo()); } -static void writeDetailedConstant(GeneratedFile* file, ConstantSpecification* c) { +static void writeDetailedConstantSpecification(GeneratedFile* file, ConstantSpecification* c) { + *file << " <tr><td>"; *file << "Value: " << c->getValue() << "\n"; writeHtmlVersionTag(file, c->getVersionInfo()); + *file << " </td></tr>\n"; + *file << "<br/>\n"; } static bool writeOverviewForFile(GeneratedFile* file, const SpecFile& specFile) { @@ -416,7 +429,8 @@ static bool writeOverviewForFile(GeneratedFile* file, const SpecFile& specFile) // Write the summary tables. // file << "<h2>Summary</h2>\n"; writeSummaryTables(file, specFile.getDocumentedConstants(), specFile.getDocumentedTypes(), - specFile.getDocumentedFunctions(), false); + specFile.getDocumentedFunctions(), NON_DEPRECATED_ONLY, false); + return success; } @@ -428,8 +442,7 @@ static bool generateOverview(const string& directory) { bool success = true; writeHtmlHeader(&file); - file << "<h1 itemprop='name'>Overview</h1>\n"; - // TODO Have the overview text here! + file << "<h1>Overview</h1>\n"; for (auto specFile : systemSpecification.getSpecFiles()) { if (!writeOverviewForFile(&file, *specFile)) { @@ -450,13 +463,30 @@ static bool generateAlphabeticalIndex(const string& directory) { writeHtmlHeader(&file); writeSummaryTables(&file, systemSpecification.getConstants(), systemSpecification.getTypes(), - systemSpecification.getFunctions(), true); + systemSpecification.getFunctions(), NON_DEPRECATED_ONLY, true); + + writeSummaryTables(&file, systemSpecification.getConstants(), systemSpecification.getTypes(), + systemSpecification.getFunctions(), DEPRECATED_ONLY, true); writeHtmlFooter(&file); file.close(); return true; } +static void writeDeprecatedWarning(GeneratedFile* file, Definition* definition) { + if (definition->deprecated()) { + *file << " <p><b>Deprecated.</b> "; + string s = definition->getDeprecatedMessage(); + convertDocumentationRefences(&s); + if (!s.empty()) { + *file << s; + } else { + *file << "Do not use."; + } + *file << "</p>\n"; + } +} + static bool writeDetailedConstant(GeneratedFile* file, Constant* constant) { if (constant->hidden()) { return true; @@ -465,7 +495,7 @@ static bool writeDetailedConstant(GeneratedFile* file, Constant* constant) { // TODO need names that distinguish fn.const. type // TODO had attr_android:... - *file << "<a name='android_rs:" << name << "'></a>\n"; + *file << "<a id='android_rs:" << name << "'></a>\n"; *file << "<div class='jd-details'>\n"; *file << " <h4 class='jd-details-title'>\n"; *file << " <span class='sympad'>" << name << "</span>\n"; @@ -474,17 +504,20 @@ static bool writeDetailedConstant(GeneratedFile* file, Constant* constant) { *file << " <div class='jd-details-descr'>\n"; *file << " <table class='jd-tagtable'><tbody>\n"; - for (auto f : constant->getSpecifications()) { - *file << " <tr><td>"; - writeDetailedConstant(file, f); - *file << " </td></tr>\n"; - *file << "<br/>\n"; + auto specifications = constant->getSpecifications(); + bool addSeparator = specifications.size() > 1; + for (auto spec : specifications) { + if (addSeparator) { + *file << " <h5 class='jd-tagtitle'>Variant:</h5>\n"; + } + writeDetailedConstantSpecification(file, spec); } *file << " </tbody></table>\n"; *file << " </div>\n"; *file << " <div class='jd-tagdata jd-tagdescr'>\n"; + writeDeprecatedWarning(file, constant); if (!generateHtmlParagraphs(file, constant->getDescription())) { return false; } @@ -503,7 +536,7 @@ static bool writeDetailedType(GeneratedFile* file, Type* type) { // TODO need names that distinguish fn.const. type // TODO had attr_android:... - *file << "<a name='android_rs:" << name << "'></a>\n"; + *file << "<a id='android_rs:" << name << "'></a>\n"; *file << "<div class='jd-details'>\n"; *file << " <h4 class='jd-details-title'>\n"; *file << " <span class='sympad'>" << name << "</span>\n"; @@ -511,25 +544,16 @@ static bool writeDetailedType(GeneratedFile* file, Type* type) { *file << " </h4>\n"; *file << " <div class='jd-details-descr'>\n"; - *file << " <h5 class='jd-tagtitle'>Variants</h5>\n"; - *file << " <table class='jd-tagtable'><tbody>\n"; - for (auto f : type->getSpecifications()) { - *file << " <tr><td>"; - writeDetailedType(file, f); - *file << " </td></tr>\n"; - *file << "<br/>\n"; + for (auto spec : type->getSpecifications()) { + writeDetailedTypeSpecification(file, spec); } - *file << " </tbody></table>\n"; - *file << " </div>\n"; - - *file << " <div class='jd-tagdata jd-tagdescr'>\n"; + writeDeprecatedWarning(file, type); if (!generateHtmlParagraphs(file, type->getDescription())) { return false; } - *file << " </div>\n"; - + *file << " </div>\n"; *file << "</div>\n"; *file << "\n"; return true; @@ -540,7 +564,7 @@ static bool writeDetailedFunction(GeneratedFile* file, Function* function) { // TODO need names that distinguish fn.const. type // TODO had attr_android:... - *file << "<a name='android_rs:" << name << "'></a>\n"; + *file << "<a id='android_rs:" << name << "'></a>\n"; *file << "<div class='jd-details'>\n"; *file << " <h4 class='jd-details-title'>\n"; *file << " <span class='sympad'>" << name << "</span>\n"; @@ -548,17 +572,17 @@ static bool writeDetailedFunction(GeneratedFile* file, Function* function) { *file << " </h4>\n"; *file << " <div class='jd-details-descr'>\n"; - *file << " <table class='jd-tagtable'><tbody>\n"; map<string, DetailedFunctionEntry> entries; if (!getUnifiedFunctionPrototypes(function, &entries)) { return false; } + *file << " <table class='jd-tagtable'><tbody>\n"; for (auto i : entries) { *file << " <tr>\n"; - *file << " <td>" << i.second.htmlDeclaration << "<td/>\n"; + *file << " <td>" << i.second.htmlDeclaration << "</td>\n"; *file << " <td>"; writeHtmlVersionTag(file, i.second.info); - *file << "</td>\n"; + *file << " </td>\n"; *file << " </tr>\n"; } *file << " </tbody></table>\n"; @@ -586,6 +610,7 @@ static bool writeDetailedFunction(GeneratedFile* file, Function* function) { } *file << " <div class='jd-tagdata jd-tagdescr'>\n"; + writeDeprecatedWarning(file, function); if (!generateHtmlParagraphs(file, function->getDescription())) { return false; } @@ -608,8 +633,7 @@ static bool writeDetailedDocumentationFile(const string& directory, const SpecFi file << "<br/>"; // Write the file documentation. - file << "<h1 itemprop='name'>" << specFile.getBriefDescription() - << "</h1>\n"; // TODO not sure about itemprop + file << "<h1>" << specFile.getBriefDescription() << "</h1>\n"; file << "<h2>Overview</h2>\n"; if (!generateHtmlParagraphs(&file, specFile.getFullDescription())) { @@ -621,7 +645,9 @@ static bool writeDetailedDocumentationFile(const string& directory, const SpecFi const auto& constants = specFile.getDocumentedConstants(); const auto& types = specFile.getDocumentedTypes(); const auto& functions = specFile.getDocumentedFunctions(); - writeSummaryTables(&file, constants, types, functions, false); + + writeSummaryTables(&file, constants, types, functions, NON_DEPRECATED_ONLY, false); + writeSummaryTables(&file, constants, types, functions, DEPRECATED_ONLY, false); // Write the full details of each constant, type, and function. if (!constants.empty()) { diff --git a/api/Scanner.h b/api/Scanner.h index 593ff493..c3d6f337 100644 --- a/api/Scanner.h +++ b/api/Scanner.h @@ -20,7 +20,7 @@ #include <fstream> #include <string> -class ParameterEntry; +struct ParameterEntry; class Scanner { private: diff --git a/api/Specification.cpp b/api/Specification.cpp index 92d14d61..fbbbc21f 100644 --- a/api/Specification.cpp +++ b/api/Specification.cpp @@ -214,7 +214,7 @@ void VersionInfo::scan(Scanner* scanner) { } } -Definition::Definition(const std::string& name) : mName(name), mHidden(false) { +Definition::Definition(const std::string& name) : mName(name), mDeprecated(false), mHidden(false) { } void Definition::scanDocumentationTags(Scanner* scanner, bool firstOccurence, @@ -223,6 +223,10 @@ void Definition::scanDocumentationTags(Scanner* scanner, bool firstOccurence, scanner->checkNoValue(); mHidden = true; } + if (scanner->findOptionalTag("deprecated:")) { + mDeprecated = true; + mDeprecatedMessage = scanner->getValue(); + } if (firstOccurence) { if (scanner->findTag("summary:")) { mSummary = scanner->getValue(); @@ -561,7 +565,7 @@ void FunctionSpecification::scanFunctionSpecification(Scanner* scanner, SpecFile FunctionPermutation::FunctionPermutation(Function* func, FunctionSpecification* spec, int replacementIndexes[MAX_REPLACEABLES], Scanner* scanner) - : mFunction(func), mReturn(nullptr), mInputCount(0), mOutputCount(0) { + : mReturn(nullptr), mInputCount(0), mOutputCount(0) { // We expand the strings now to make capitalization easier. The previous code preserved // the #n // markers just before emitting, which made capitalization difficult. diff --git a/api/Specification.h b/api/Specification.h index f5211f03..3fa1aa37 100644 --- a/api/Specification.h +++ b/api/Specification.h @@ -137,6 +137,8 @@ struct VersionInfo { class Definition { protected: std::string mName; + bool mDeprecated; // True if this API should not be used + std::string mDeprecatedMessage; // Optional specific warning if the API is deprecated bool mHidden; // True if it should not be documented std::string mSummary; // A one-line description std::vector<std::string> mDescription; // The comments to be included in the header @@ -146,6 +148,8 @@ public: Definition(const std::string& name); std::string getName() const { return mName; } + bool deprecated() const { return mDeprecated; } + std::string getDeprecatedMessage() const { return mDeprecatedMessage; } bool hidden() const { return mHidden; } std::string getSummary() const { return mSummary; } const std::vector<std::string>& getDescription() const { return mDescription; } @@ -340,7 +344,6 @@ private: */ std::string mUnexpandedName; ParameterEntry* mReturn; // The return type. The name should be empty. Owned. - int mReturnLineNumber; std::vector<ParameterEntry*> mParameters; // The parameters. Owned. std::vector<std::string> mInline; // The inline code to be included in the header @@ -391,8 +394,6 @@ public: */ class FunctionPermutation { private: - Function* mFunction; // NOT OWNED. - // These are the expanded version of those found on FunctionSpecification std::string mName; std::string mNameTrunk; // The name without any expansion, e.g. convert diff --git a/api/Utilities.cpp b/api/Utilities.cpp index b372b13a..6464ae17 100644 --- a/api/Utilities.cpp +++ b/api/Utilities.cpp @@ -39,7 +39,7 @@ const char LEGAL_NOTICE[] = " */\n\n"; const char AUTO_GENERATED_WARNING[] = - "Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime."; + "Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh."; string capitalize(const string& source) { int length = source.length(); @@ -95,28 +95,29 @@ bool charRemoved(char c, string* s) { } string stripHtml(const string& html) { - string s; - for (size_t start = 0; start < html.size(); start++) { - size_t lt = html.find('<', start); + string in = stringReplace(html, "<li>", "- "); + string out; + for (size_t start = 0; start < in.size(); start++) { + size_t lt = in.find('<', start); if (lt == string::npos) { - s += html.substr(start); + out += in.substr(start); break; } - s += html.substr(start, lt - start); - if (isalpha(html[lt + 1]) || html[lt + 1] == '/') { + out += in.substr(start, lt - start); + if (isalpha(in[lt + 1]) || in[lt + 1] == '/') { // It's an HTML tag. Search for the end. - start = html.find('>', lt + 1); + start = in.find('>', lt + 1); if (start == string::npos) { break; } } else { - s += '<'; + out += '<'; } } - s = stringReplace(s, ">", ">"); - s = stringReplace(s, "<", "<"); - s = stringReplace(s, " ", " "); - return s; + out = stringReplace(out, ">", ">"); + out = stringReplace(out, "<", "<"); + out = stringReplace(out, " ", " "); + return out; } string hashString(const string& s) { diff --git a/scriptc/rs_allocation_data.rsh b/scriptc/rs_allocation_data.rsh index 578e73c0..12d62a06 100644 --- a/scriptc/rs_allocation_data.rsh +++ b/scriptc/rs_allocation_data.rsh @@ -14,7 +14,7 @@ * limitations under the License. */ -// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime. +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. /* * rs_allocation_data.rsh: Allocation routines @@ -24,6 +24,7 @@ * Functions that can be used to query the characteristics of an allocation, * to set and get elements of the allocation. */ + #ifndef RENDERSCRIPT_RS_ALLOCATION_DATA_RSH #define RENDERSCRIPT_RS_ALLOCATION_DATA_RSH @@ -36,13 +37,13 @@ * the same allocation yields undefined results. * * Parameters: - * dstAlloc Allocation to copy data into. - * dstOff The offset of the first element to be copied in the destination allocation. - * dstMip Mip level in the destination allocation. - * count The number of elements to be copied. - * srcAlloc The source data allocation. - * srcOff The offset of the first element in data to be copied in the source allocation. - * srcMip Mip level in the source allocation. + * dstAlloc: Allocation to copy data into. + * dstOff: The offset of the first element to be copied in the destination allocation. + * dstMip: Mip level in the destination allocation. + * count: The number of elements to be copied. + * srcAlloc: The source data allocation. + * srcOff: The offset of the first element in data to be copied in the source allocation. + * srcMip: Mip level in the source allocation. */ #if (defined(RS_VERSION) && (RS_VERSION >= 14)) extern void __attribute__((overloadable)) @@ -59,18 +60,18 @@ extern void __attribute__((overloadable)) * the same allocation yields undefined results. * * Parameters: - * dstAlloc Allocation to copy data into. - * dstXoff X offset of the region to update in the destination allocation. - * dstYoff Y offset of the region to update in the destination allocation. - * dstMip Mip level in the destination allocation. - * dstFace Cubemap face of the destination allocation, ignored for allocations that aren't cubemaps. - * width Width of the incoming region to update. - * height Height of the incoming region to update. - * srcAlloc The source data allocation. - * srcXoff X offset in data of the source allocation. - * srcYoff Y offset in data of the source allocation. - * srcMip Mip level in the source allocation. - * srcFace Cubemap face of the source allocation, ignored for allocations that aren't cubemaps. + * dstAlloc: Allocation to copy data into. + * dstXoff: X offset of the region to update in the destination allocation. + * dstYoff: Y offset of the region to update in the destination allocation. + * dstMip: Mip level in the destination allocation. + * dstFace: Cubemap face of the destination allocation, ignored for allocations that aren't cubemaps. + * width: Width of the incoming region to update. + * height: Height of the incoming region to update. + * srcAlloc: The source data allocation. + * srcXoff: X offset in data of the source allocation. + * srcYoff: Y offset in data of the source allocation. + * srcMip: Mip level in the source allocation. + * srcFace: Cubemap face of the source allocation, ignored for allocations that aren't cubemaps. */ #if (defined(RS_VERSION) && (RS_VERSION >= 14)) extern void __attribute__((overloadable)) @@ -2475,10 +2476,10 @@ extern uchar __attribute__((overloadable)) * For 2D, use the float2 variant. * * Parameters: - * a allocation to sample from - * s sampler state - * location location to sample from - * lod mip level to sample from, for fractional values mip levels will be interpolated if RS_SAMPLER_LINEAR_MIP_LINEAR is used + * a: allocation to sample from + * s: sampler state + * location: location to sample from + * lod: mip level to sample from, for fractional values mip levels will be interpolated if RS_SAMPLER_LINEAR_MIP_LINEAR is used */ #if (defined(RS_VERSION) && (RS_VERSION >= 16)) extern float4 __attribute__((overloadable)) diff --git a/scriptc/rs_atomic.rsh b/scriptc/rs_atomic.rsh index 29c294a6..58ce1307 100644 --- a/scriptc/rs_atomic.rsh +++ b/scriptc/rs_atomic.rsh @@ -14,7 +14,7 @@ * limitations under the License. */ -// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime. +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. /* * rs_atomic.rsh: Atomic routines @@ -32,6 +32,7 @@ * threads. Updating globals should be done with atomic functions. If possible, * modify your algorithm to avoid them altogether. */ + #ifndef RENDERSCRIPT_RS_ATOMIC_RSH #define RENDERSCRIPT_RS_ATOMIC_RSH @@ -41,8 +42,8 @@ * Atomicly adds a value to the value at addr, i.e. *addr += value. * * Parameters: - * addr Address of the value to modify - * value Amount to add + * addr: Address of the value to modify + * value: Amount to add * * Returns: Old value */ @@ -63,8 +64,8 @@ extern int32_t __attribute__((overloadable)) * i.e. *addr &= value * * Parameters: - * addr Address of the value to modify - * value Value to and with + * addr: Address of the value to modify + * value: Value to and with * * Returns: Old value */ @@ -88,9 +89,9 @@ extern int32_t __attribute__((overloadable)) * by rsAtomicCas is compareValue. * * Parameters: - * addr The address to compare and replace if the compare passes. - * compareValue The value to test *addr against. - * newValue The value to write if the test passes. + * addr: The address to compare and replace if the compare passes. + * compareValue: The value to test *addr against. + * newValue: The value to write if the test passes. * * Returns: Old value */ @@ -110,7 +111,7 @@ extern uint32_t __attribute__((overloadable)) * Atomicly subtracts one from the value at addr. Equal to rsAtomicSub(addr, 1) * * Parameters: - * addr Address of the value to decrement + * addr: Address of the value to decrement * * Returns: Old value */ @@ -130,7 +131,7 @@ extern int32_t __attribute__((overloadable)) * Atomicly adds one to the value at addr. Equal to rsAtomicAdd(addr, 1) * * Parameters: - * addr Address of the value to increment + * addr: Address of the value to increment * * Returns: Old value */ @@ -151,8 +152,8 @@ extern int32_t __attribute__((overloadable)) * *addr = max(*addr, value) * * Parameters: - * addr Address of the value to modify - * value Comparison value + * addr: Address of the value to modify + * value: Comparison value * * Returns: Old value */ @@ -173,8 +174,8 @@ extern int32_t __attribute__((overloadable)) * *addr = min(*addr, value) * * Parameters: - * addr Address of the value to modify - * value Comparison value + * addr: Address of the value to modify + * value: Comparison value * * Returns: Old value */ @@ -195,8 +196,8 @@ extern int32_t __attribute__((overloadable)) * i.e. *addr |= value * * Parameters: - * addr Address of the value to modify - * value Value to or with + * addr: Address of the value to modify + * value: Value to or with * * Returns: Old value */ @@ -216,8 +217,8 @@ extern int32_t __attribute__((overloadable)) * Atomicly subtracts a value from the value at addr, i.e. *addr -= value * * Parameters: - * addr Address of the value to modify - * value Amount to subtract + * addr: Address of the value to modify + * value: Amount to subtract * * Returns: Old value */ @@ -238,8 +239,8 @@ extern int32_t __attribute__((overloadable)) * i.e. *addr ^= value * * Parameters: - * addr Address of the value to modify - * value Value to xor with + * addr: Address of the value to modify + * value: Value to xor with * * Returns: Old value */ diff --git a/scriptc/rs_convert.rsh b/scriptc/rs_convert.rsh index 4a94be23..eaa6c1aa 100644 --- a/scriptc/rs_convert.rsh +++ b/scriptc/rs_convert.rsh @@ -14,13 +14,14 @@ * limitations under the License. */ -// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime. +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. /* * rs_convert.rsh: Conversion functions * * TODO Add desc. */ + #ifndef RENDERSCRIPT_RS_CONVERT_RSH #define RENDERSCRIPT_RS_CONVERT_RSH diff --git a/scriptc/rs_core.rsh b/scriptc/rs_core.rsh index ff65d228..029667a2 100644 --- a/scriptc/rs_core.rsh +++ b/scriptc/rs_core.rsh @@ -14,7 +14,7 @@ * limitations under the License. */ -// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime. +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. /* * rs_core.rsh: TODO @@ -33,6 +33,7 @@ * Android framework APIs interact, see the RenderScript developer guide * and the RenderScript samples. */ + #ifndef RENDERSCRIPT_RS_CORE_RSH #define RENDERSCRIPT_RS_CORE_RSH diff --git a/scriptc/rs_debug.rsh b/scriptc/rs_debug.rsh index b6a6fb2a..d52590ea 100644 --- a/scriptc/rs_debug.rsh +++ b/scriptc/rs_debug.rsh @@ -14,7 +14,7 @@ * limitations under the License. */ -// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime. +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. /* * rs_debug.rsh: Utility debugging routines @@ -23,6 +23,7 @@ * not be used in shipping applications. All print a string and value pair to * the standard log. */ + #ifndef RENDERSCRIPT_RS_DEBUG_RSH #define RENDERSCRIPT_RS_DEBUG_RSH diff --git a/scriptc/rs_for_each.rsh b/scriptc/rs_for_each.rsh index 0a1e3a12..640b5305 100644 --- a/scriptc/rs_for_each.rsh +++ b/scriptc/rs_for_each.rsh @@ -14,13 +14,14 @@ * limitations under the License. */ -// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime. +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. /* * rs_for_each.rsh: TODO Add documentation * * TODO Add documentation */ + #ifndef RENDERSCRIPT_RS_FOR_EACH_RSH #define RENDERSCRIPT_RS_FOR_EACH_RSH @@ -75,12 +76,12 @@ typedef struct rs_script_call { * dimensions. * * Parameters: - * script The target script to call - * input The allocation to source data from - * output the allocation to write date into - * usrData The user defined params to pass to the root script. May be NULL. - * sc Extra control infomation used to select a sub-region of the allocation to be processed or suggest a walking strategy. May be NULL. - * usrDataLen The size of the userData structure. This will be used to perform a shallow copy of the data if necessary. + * script: The target script to call + * input: The allocation to source data from + * output: the allocation to write date into + * usrData: The user defined params to pass to the root script. May be NULL. + * sc: Extra control infomation used to select a sub-region of the allocation to be processed or suggest a walking strategy. May be NULL. + * usrDataLen: The size of the userData structure. This will be used to perform a shallow copy of the data if necessary. */ #if !defined(RS_VERSION) || (RS_VERSION <= 13) extern void __attribute__((overloadable)) diff --git a/scriptc/rs_graphics.rsh b/scriptc/rs_graphics.rsh index 67422903..190ec4db 100644 --- a/scriptc/rs_graphics.rsh +++ b/scriptc/rs_graphics.rsh @@ -14,7 +14,7 @@ * limitations under the License. */ -// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime. +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. /* * rs_graphics.rsh: RenderScript graphics API @@ -23,6 +23,7 @@ * * A set of graphics functions used by RenderScript. */ + #ifndef RENDERSCRIPT_RS_GRAPHICS_RSH #define RENDERSCRIPT_RS_GRAPHICS_RSH @@ -327,10 +328,10 @@ extern void __attribute__((overloadable)) * The Allocation must be a valid constant input for the Program. * * Parameters: - * ps program fragment object - * slot index of the constant buffer on the program - * c constants to bind - * pv program vertex object + * ps: program fragment object + * slot: index of the constant buffer on the program + * c: constants to bind + * pv: program vertex object */ #ifndef __LP64__ extern void __attribute__((overloadable)) @@ -356,7 +357,7 @@ extern void __attribute__((overloadable)) * Binds the font object to be used for all subsequent font rendering calls * * Parameters: - * font object to bind + * font: object to bind */ #ifndef __LP64__ extern void __attribute__((overloadable)) @@ -472,10 +473,10 @@ extern void __attribute__((overloadable)) * Otherwise the whole mesh is rendered. * * Parameters: - * ism mesh object to render - * primitiveIndex for meshes that contain multiple primitive groups this parameter specifies the index of the group to draw. - * start starting index in the range - * len number of indices to draw + * ism: mesh object to render + * primitiveIndex: for meshes that contain multiple primitive groups this parameter specifies the index of the group to draw. + * start: starting index in the range + * len: number of indices to draw */ #ifndef __LP64__ extern void __attribute__((overloadable)) @@ -560,10 +561,10 @@ extern uint __attribute__((overloadable)) * Sets the font color for all subsequent rendering calls * * Parameters: - * r red component - * g green component - * b blue component - * a alpha component + * r: red component + * g: green component + * b: blue component + * a: alpha component */ #ifndef __LP64__ extern void __attribute__((overloadable)) @@ -628,8 +629,8 @@ static inline void __attribute__((always_inline, overloadable)) * allocation if only the primitive is specified * * Parameters: - * m mesh to get data from - * index index of the index allocation + * m: mesh to get data from + * index: index of the index allocation * * Returns: allocation containing index data */ @@ -645,8 +646,8 @@ extern rs_allocation __attribute__((overloadable)) * rendered * * Parameters: - * m mesh to get data from - * index index of the primitive + * m: mesh to get data from + * index: index of the primitive * * Returns: primitive describing how the mesh is rendered */ @@ -662,7 +663,7 @@ extern rs_primitive __attribute__((overloadable)) * the number. * * Parameters: - * m mesh to get data from + * m: mesh to get data from * * Returns: number of primitive groups in the mesh. This would include simple primitives as well as allocations containing index data */ @@ -678,8 +679,8 @@ extern uint32_t __attribute__((overloadable)) * vertex data, e.g. positions, normals, texcoords * * Parameters: - * m mesh to get data from - * index index of the vertex allocation + * m: mesh to get data from + * index: index of the vertex allocation * * Returns: allocation containing vertex data */ @@ -695,7 +696,7 @@ extern rs_allocation __attribute__((overloadable)) * vertex data * * Parameters: - * m mesh to get data from + * m: mesh to get data from * * Returns: number of allocations in the mesh that contain vertex data */ @@ -720,7 +721,7 @@ extern void __attribute__((overloadable)) * would result in an error. * * Parameters: - * proj matrix to store the current projection matrix into + * proj: matrix to store the current projection matrix into */ #ifndef __LP64__ extern void __attribute__((overloadable)) @@ -733,7 +734,7 @@ extern void __attribute__((overloadable)) * would result in an error. * * Parameters: - * model model matrix + * model: model matrix */ #ifndef __LP64__ extern void __attribute__((overloadable)) @@ -746,7 +747,7 @@ extern void __attribute__((overloadable)) * would result in an error. * * Parameters: - * proj projection matrix + * proj: projection matrix */ #ifndef __LP64__ extern void __attribute__((overloadable)) @@ -759,7 +760,7 @@ extern void __attribute__((overloadable)) * would result in an error. * * Parameters: - * tex texture matrix + * tex: texture matrix */ #ifndef __LP64__ extern void __attribute__((overloadable)) @@ -770,7 +771,7 @@ extern void __attribute__((overloadable)) * Get program raster cull mode * * Parameters: - * pr program raster to query + * pr: program raster to query */ #ifndef __LP64__ #if (defined(RS_VERSION) && (RS_VERSION >= 16)) @@ -783,7 +784,7 @@ extern rs_cull_mode __attribute__((overloadable)) * Get program raster point sprite state * * Parameters: - * pr program raster to query + * pr: program raster to query */ #ifndef __LP64__ #if (defined(RS_VERSION) && (RS_VERSION >= 16)) @@ -796,7 +797,7 @@ extern bool __attribute__((overloadable)) * Get program store blend destination function * * Parameters: - * ps program store to query + * ps: program store to query */ #ifndef __LP64__ #if (defined(RS_VERSION) && (RS_VERSION >= 16)) @@ -809,7 +810,7 @@ extern rs_blend_dst_func __attribute__((overloadable)) * Get program store blend source function * * Parameters: - * ps program store to query + * ps: program store to query */ #ifndef __LP64__ #if (defined(RS_VERSION) && (RS_VERSION >= 16)) @@ -822,7 +823,7 @@ extern rs_blend_src_func __attribute__((overloadable)) * Get program store depth function * * Parameters: - * ps program store to query + * ps: program store to query */ #ifndef __LP64__ #if (defined(RS_VERSION) && (RS_VERSION >= 16)) @@ -835,7 +836,7 @@ extern rs_depth_func __attribute__((overloadable)) * Get program store alpha component color mask * * Parameters: - * ps program store to query + * ps: program store to query */ #ifndef __LP64__ #if (defined(RS_VERSION) && (RS_VERSION >= 16)) @@ -848,7 +849,7 @@ extern bool __attribute__((overloadable)) * Get program store blur component color mask * * Parameters: - * ps program store to query + * ps: program store to query */ #ifndef __LP64__ #if (defined(RS_VERSION) && (RS_VERSION >= 16)) @@ -861,7 +862,7 @@ extern bool __attribute__((overloadable)) * Get program store green component color mask * * Parameters: - * ps program store to query + * ps: program store to query */ #ifndef __LP64__ #if (defined(RS_VERSION) && (RS_VERSION >= 16)) @@ -874,7 +875,7 @@ extern bool __attribute__((overloadable)) * Get program store red component color mask * * Parameters: - * ps program store to query + * ps: program store to query */ #ifndef __LP64__ #if (defined(RS_VERSION) && (RS_VERSION >= 16)) @@ -887,7 +888,7 @@ extern bool __attribute__((overloadable)) * Get program store depth mask * * Parameters: - * ps program store to query + * ps: program store to query */ #ifndef __LP64__ #if (defined(RS_VERSION) && (RS_VERSION >= 16)) @@ -900,7 +901,7 @@ extern bool __attribute__((overloadable)) * Get program store dither state * * Parameters: - * ps program store to query + * ps: program store to query */ #ifndef __LP64__ #if (defined(RS_VERSION) && (RS_VERSION >= 16)) diff --git a/scriptc/rs_io.rsh b/scriptc/rs_io.rsh index d523f29b..7bb7a499 100644 --- a/scriptc/rs_io.rsh +++ b/scriptc/rs_io.rsh @@ -14,13 +14,14 @@ * limitations under the License. */ -// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime. +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. /* * rs_io.rsh: Input/output functions * * TODO Add documentation */ + #ifndef RENDERSCRIPT_RS_IO_RSH #define RENDERSCRIPT_RS_IO_RSH @@ -30,7 +31,7 @@ * Receive a new set of contents from the queue. * * Parameters: - * a allocation to work on + * a: allocation to work on */ #if (defined(RS_VERSION) && (RS_VERSION >= 16)) extern void __attribute__((overloadable)) @@ -43,7 +44,7 @@ extern void __attribute__((overloadable)) * Send the contents of the Allocation to the queue. * * Parameters: - * a allocation to work on + * a: allocation to work on */ #if (defined(RS_VERSION) && (RS_VERSION >= 16)) extern void __attribute__((overloadable)) diff --git a/scriptc/rs_math.rsh b/scriptc/rs_math.rsh index b812f071..f78a0e15 100644 --- a/scriptc/rs_math.rsh +++ b/scriptc/rs_math.rsh @@ -14,7 +14,7 @@ * limitations under the License. */ -// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime. +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. /* * rs_math.rsh: Mathematical functions @@ -41,11 +41,12 @@ * * Different precision/speed tradeoffs can be achieved by using three variants * of common math functions. Functions with a name starting with - * native_ may have custom hardware implementations with weaker precision, - * half_ may perform internal computations using 16 bit floats, and - * fast_ are n-dimensional space computations that may use 16 bit floats. + * - native_ may have custom hardware implementations with weaker precision, + * - half_ may perform internal computations using 16 bit floats, and + * - fast_ are n-dimensional space computations that may use 16 bit floats. * */ + #ifndef RENDERSCRIPT_RS_MATH_RSH #define RENDERSCRIPT_RS_MATH_RSH @@ -334,8 +335,8 @@ extern float4 __attribute__((const, overloadable)) * See also native_atan2(). * * Parameters: - * numerator The numerator - * denominator The denominator. Can be 0. + * numerator: The numerator + * denominator: The denominator. Can be 0. */ extern float __attribute__((const, overloadable)) atan2(float numerator, float denominator); @@ -359,8 +360,8 @@ extern float4 __attribute__((const, overloadable)) * See also native_atan2pi(). * * Parameters: - * numerator The numerator - * denominator The denominator. Can be 0. + * numerator: The numerator + * denominator: The denominator. Can be 0. */ extern float __attribute__((const, overloadable)) atan2pi(float numerator, float denominator); @@ -466,9 +467,9 @@ extern float4 __attribute__((const, overloadable)) * If min_value is greater than max_value, the results are undefined. * * Parameters: - * value Value to be clamped. - * min_value Lower bound, a scalar or matching vector. - * max_value High bound, must match the type of low. + * value: Value to be clamped. + * min_value: Lower bound, a scalar or matching vector. + * max_value: High bound, must match the type of low. */ extern float __attribute__((const, overloadable)) clamp(float value, float min_value, float max_value); @@ -1224,8 +1225,8 @@ extern float4 __attribute__((const, overloadable)) * fract(-1.3f, &val) returns 0.7f and sets val to -2.f. * * Parameters: - * v Input value. - * floor If floor is not null, *floor will be set to the floor of v. + * v: Input value. + * floor: If floor is not null, *floor will be set to the floor of v. */ extern float __attribute__((overloadable)) fract(float v, float* floor); @@ -1273,8 +1274,8 @@ static inline float4 __attribute__((const, overloadable)) * See ldexp() for the reverse operation. See also logb() and ilogb(). * * Parameters: - * v Input value. - * exponent If exponent is not null, *exponent will be set to the exponent of v. + * v: Input value. + * exponent: If exponent is not null, *exponent will be set to the exponent of v. */ extern float __attribute__((overloadable)) frexp(float v, int* exponent); @@ -1428,8 +1429,8 @@ extern int4 __attribute__((const, overloadable)) * See frexp() for the reverse operation. * * Parameters: - * mantissa The mantissa - * exponent The exponent, a single component or matching vector. + * mantissa: The mantissa + * exponent: The exponent, a single component or matching vector. */ extern float __attribute__((const, overloadable)) ldexp(float mantissa, int exponent); @@ -1461,7 +1462,7 @@ extern float4 __attribute__((const, overloadable)) * See also tgamma(). * * Parameters: - * sign_of_gamma If sign_of_gamma is not null, *sign_of_gamma will be set to -1.f if the gamma of v is negative, otherwise to 1.f. + * sign_of_gamma: If sign_of_gamma is not null, *sign_of_gamma will be set to -1.f if the gamma of v is negative, otherwise to 1.f. */ extern float __attribute__((const, overloadable)) lgamma(float v); @@ -2480,8 +2481,8 @@ extern float4 __attribute__((const, overloadable)) * Both components will have the same sign as x. For example, for an input of -3.72f, iret will be set to -3.f and .72f will be returned. * * Parameters: - * v Source value - * integral_part *integral_part will be set to the integral portion of the number. + * v: Source value + * integral_part: *integral_part will be set to the integral portion of the number. * * Returns: The floating point portion of the value. */ @@ -2503,7 +2504,7 @@ extern float4 __attribute__((overloadable)) * Returns a NaN value (Not a Number). * * Parameters: - * v Not used. + * v: Not used. */ extern float __attribute__((const, overloadable)) nan(uint v); @@ -2721,8 +2722,8 @@ extern float4 __attribute__((const, overloadable)) * See also atan2(). * * Parameters: - * numerator The numerator - * denominator The denominator. Can be 0. + * numerator: The numerator + * denominator: The denominator. Can be 0. */ #if (defined(RS_VERSION) && (RS_VERSION >= 21)) extern float __attribute__((const, overloadable)) @@ -2754,8 +2755,8 @@ extern float4 __attribute__((const, overloadable)) * See also atan2pi(). * * Parameters: - * numerator The numerator - * denominator The denominator. Can be 0. + * numerator: The numerator + * denominator: The denominator. Can be 0. */ #if (defined(RS_VERSION) && (RS_VERSION >= 21)) extern float __attribute__((const, overloadable)) @@ -3231,8 +3232,8 @@ extern float4 __attribute__((const, overloadable)) * See also powr(). * * Parameters: - * base Must be between 0.f and 256.f. The function is not accurate for values very close to zero. - * exponent Must be between -15.f and 15.f. + * base: Must be between 0.f and 256.f. The function is not accurate for values very close to zero. + * exponent: Must be between -15.f and 15.f. */ #if (defined(RS_VERSION) && (RS_VERSION >= 18)) extern float __attribute__((const, overloadable)) @@ -3370,8 +3371,8 @@ extern float4 __attribute__((const, overloadable)) * See also sincos(). * * Parameters: - * v The incoming value in radians. - * cos *cos will be set to the cosine value. + * v: The incoming value in radians. + * cos: *cos will be set to the cosine value. * * Returns: sine */ @@ -3689,9 +3690,9 @@ extern float4 __attribute__((const, overloadable)) * Example: remquo(-23.5f, 8.f, ") sets the lowest three bits of quot to 3 and the sign negative. It returns 0.5f. * * Parameters: - * numerator The numerator. - * denominator The denominator. - * quotient *quotient will be set to the integer quotient. + * numerator: The numerator. + * denominator: The denominator. + * quotient: *quotient will be set to the integer quotient. * * Returns: The remainder, precise only for the low three bits. */ @@ -3835,8 +3836,8 @@ extern float4 __attribute__((const, overloadable)) * See also native_sincos(). * * Parameters: - * v The incoming value in radians - * cos *cos will be set to the cosine value. + * v: The incoming value in radians + * cos: *cos will be set to the cosine value. * * Returns: sine of v */ @@ -4061,9 +4062,9 @@ extern float4 __attribute__((const, overloadable)) * Deprecated. Use clamp() instead. * * Parameters: - * amount The value to clamp - * low Lower bound - * high Upper bound + * amount: The value to clamp + * low: Lower bound + * high: Upper bound */ extern char __attribute__((const, always_inline, overloadable)) rsClamp(char amount, char low, char high); diff --git a/scriptc/rs_matrix.rsh b/scriptc/rs_matrix.rsh index 32496db8..169d2b2f 100644 --- a/scriptc/rs_matrix.rsh +++ b/scriptc/rs_matrix.rsh @@ -14,7 +14,7 @@ * limitations under the License. */ -// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime. +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. /* * rs_matrix.rsh: Matrix functions @@ -44,6 +44,7 @@ * on a matrix that already does a scaling, the resulting matrix when applied * to a vector will first do the translation then the scaling. */ + #ifndef RENDERSCRIPT_RS_MATRIX_RSH #define RENDERSCRIPT_RS_MATRIX_RSH @@ -53,13 +54,13 @@ * Computes 6 frustum planes from the view projection matrix * * Parameters: - * viewProj matrix to extract planes from - * left left plane - * right right plane - * top top plane - * bottom bottom plane - * near near plane - * far far plane + * viewProj: matrix to extract planes from + * left: left plane + * right: right plane + * top: top plane + * bottom: bottom plane + * near: near plane + * far: far plane */ static inline void __attribute__((always_inline, overloadable)) rsExtractFrustumPlanes(const rs_matrix4x4* viewProj, float4* left, float4* right, float4* top, @@ -113,13 +114,13 @@ static inline void __attribute__((always_inline, overloadable)) * Checks if a sphere is withing the 6 frustum planes * * Parameters: - * sphere float4 representing the sphere - * left left plane - * right right plane - * top top plane - * bottom bottom plane - * near near plane - * far far plane + * sphere: float4 representing the sphere + * left: left plane + * right: right plane + * top: top plane + * bottom: bottom plane + * near: near plane + * far: far plane */ static inline bool __attribute__((always_inline, overloadable)) rsIsSphereInFrustum(float4* sphere, float4* left, float4* right, float4* top, float4* bottom, @@ -159,9 +160,9 @@ static inline bool __attribute__((always_inline, overloadable)) * Warning: The order of the column and row parameters may be unexpected. * * Parameters: - * m The matrix to extract the element from. - * col The zero-based column of the element to be extracted. - * row The zero-based row of the element to extracted. + * m: The matrix to extract the element from. + * col: The zero-based column of the element to be extracted. + * row: The zero-based row of the element to extracted. */ extern float __attribute__((overloadable)) rsMatrixGet(const rs_matrix4x4* m, uint32_t col, uint32_t row); @@ -178,7 +179,7 @@ extern float __attribute__((overloadable)) * Returns true if the matrix was successfully inverted. * * Parameters: - * m The matrix to invert. + * m: The matrix to invert. */ extern bool __attribute__((overloadable)) rsMatrixInverse(rs_matrix4x4* m); @@ -190,7 +191,7 @@ extern bool __attribute__((overloadable)) * Returns true if the matrix was successfully inverted. * * Parameters: - * m The matrix to modify. + * m: The matrix to modify. */ extern bool __attribute__((overloadable)) rsMatrixInverseTranspose(rs_matrix4x4* m); @@ -215,9 +216,9 @@ extern bool __attribute__((overloadable)) * * * Parameters: - * destination The matrix to set. - * array The array of values to set the matrix to. These arrays should be 4, 9, or 16 floats long, depending on the matrix size. - * source The source matrix. + * destination: The matrix to set. + * array: The array of values to set the matrix to. These arrays should be 4, 9, or 16 floats long, depending on the matrix size. + * source: The source matrix. */ extern void __attribute__((overloadable)) rsMatrixLoad(rs_matrix4x4* destination, const float* array); @@ -254,7 +255,7 @@ extern void __attribute__((overloadable)) * created matrix using rsMatrixMultiply(). * * Parameters: - * m The matrix to set. + * m: The matrix to set. */ extern void __attribute__((overloadable)) rsMatrixLoadFrustum(rs_matrix4x4* m, float left, float right, float bottom, float top, @@ -266,7 +267,7 @@ extern void __attribute__((overloadable)) * Set the elements of a matrix to the identity matrix. * * Parameters: - * m The matrix to set. + * m: The matrix to set. */ extern void __attribute__((overloadable)) rsMatrixLoadIdentity(rs_matrix4x4* m); @@ -293,9 +294,9 @@ extern void __attribute__((overloadable)) * rsMatrixLoadMultiply (&m2l, &m2r, &m2l) works as expected. * * Parameters: - * m The matrix to set. - * lhs The left matrix of the product. - * rhs The right matrix of the product. + * m: The matrix to set. + * lhs: The left matrix of the product. + * rhs: The right matrix of the product. */ extern void __attribute__((overloadable)) rsMatrixLoadMultiply(rs_matrix4x4* m, const rs_matrix4x4* lhs, const rs_matrix4x4* rhs); @@ -320,7 +321,7 @@ extern void __attribute__((overloadable)) * See https://en.wikipedia.org/wiki/Orthographic_projection . * * Parameters: - * m The matrix to set. + * m: The matrix to set. */ extern void __attribute__((overloadable)) rsMatrixLoadOrtho(rs_matrix4x4* m, float left, float right, float bottom, float top, float near, @@ -335,11 +336,11 @@ extern void __attribute__((overloadable)) * created matrix using rsMatrixMultiply(). * * Parameters: - * m The matrix to set. - * fovy Field of view, in degrees along the Y axis. - * aspect Ratio of x / y. - * near The near clipping plane. - * far The far clipping plane. + * m: The matrix to set. + * fovy: Field of view, in degrees along the Y axis. + * aspect: Ratio of x / y. + * near: The near clipping plane. + * far: The far clipping plane. */ extern void __attribute__((overloadable)) rsMatrixLoadPerspective(rs_matrix4x4* m, float fovy, float aspect, float near, float far); @@ -356,11 +357,11 @@ extern void __attribute__((overloadable)) * See http://en.wikipedia.org/wiki/Rotation_matrix . * * Parameters: - * m The matrix to set. - * rot How much rotation to do, in degrees. - * x The x component of the vector that is the axis of rotation. - * y The y component of the vector that is the axis of rotation. - * z The z component of the vector that is the axis of rotation. + * m: The matrix to set. + * rot: How much rotation to do, in degrees. + * x: The x component of the vector that is the axis of rotation. + * y: The y component of the vector that is the axis of rotation. + * z: The z component of the vector that is the axis of rotation. */ extern void __attribute__((overloadable)) rsMatrixLoadRotate(rs_matrix4x4* m, float rot, float x, float y, float z); @@ -375,10 +376,10 @@ extern void __attribute__((overloadable)) * using rsMatrixMultiply(). * * Parameters: - * m The matrix to set. - * x The multiple to scale the x components by. - * y The multiple to scale the y components by. - * z The multiple to scale the z components by. + * m: The matrix to set. + * x: The multiple to scale the x components by. + * y: The multiple to scale the y components by. + * z: The multiple to scale the z components by. */ extern void __attribute__((overloadable)) rsMatrixLoadScale(rs_matrix4x4* m, float x, float y, float z); @@ -393,10 +394,10 @@ extern void __attribute__((overloadable)) * using rsMatrixMultiply(). * * Parameters: - * m The matrix to set. - * x The number to add to each x component. - * y The number to add to each y component. - * z The number to add to each z component. + * m: The matrix to set. + * x: The number to add to each x component. + * y: The number to add to each y component. + * z: The number to add to each z component. */ extern void __attribute__((overloadable)) rsMatrixLoadTranslate(rs_matrix4x4* m, float x, float y, float z); @@ -422,8 +423,8 @@ extern void __attribute__((overloadable)) * Starting with API 14, this function takes a const matrix as the first argument. * * Parameters: - * m The left matrix of the product and the matrix to be set. - * rhs The right matrix of the product. + * m: The left matrix of the product and the matrix to be set. + * rhs: The right matrix of the product. */ extern void __attribute__((overloadable)) rsMatrixMultiply(rs_matrix4x4* m, const rs_matrix4x4* rhs); @@ -506,11 +507,11 @@ extern float2 __attribute__((overloadable)) * the vector by the created matrix using rsMatrixMultiply(). * * Parameters: - * m The matrix to modify. - * rot How much rotation to do, in degrees. - * x The x component of the vector that is the axis of rotation. - * y The y component of the vector that is the axis of rotation. - * z The z component of the vector that is the axis of rotation. + * m: The matrix to modify. + * rot: How much rotation to do, in degrees. + * x: The x component of the vector that is the axis of rotation. + * y: The y component of the vector that is the axis of rotation. + * z: The z component of the vector that is the axis of rotation. */ extern void __attribute__((overloadable)) rsMatrixRotate(rs_matrix4x4* m, float rot, float x, float y, float z); @@ -528,10 +529,10 @@ extern void __attribute__((overloadable)) * the vector by the created matrix using rsMatrixMultiply(). * * Parameters: - * m The matrix to modify. - * x The multiple to scale the x components by. - * y The multiple to scale the y components by. - * z The multiple to scale the z components by. + * m: The matrix to modify. + * x: The multiple to scale the x components by. + * y: The multiple to scale the y components by. + * z: The multiple to scale the z components by. */ extern void __attribute__((overloadable)) rsMatrixScale(rs_matrix4x4* m, float x, float y, float z); @@ -544,10 +545,10 @@ extern void __attribute__((overloadable)) * Warning: The order of the column and row parameters may be unexpected. * * Parameters: - * m The matrix that will be modified. - * col The zero-based column of the element to be set. - * row The zero-based row of the element to be set. - * v The value to set. + * m: The matrix that will be modified. + * col: The zero-based column of the element to be set. + * row: The zero-based row of the element to be set. + * v: The value to set. */ extern void __attribute__((overloadable)) rsMatrixSet(rs_matrix4x4* m, uint32_t col, uint32_t row, float v); @@ -571,10 +572,10 @@ extern void __attribute__((overloadable)) * the vector by the created matrix using rsMatrixMultiply(). * * Parameters: - * m The matrix to modify. - * x The number to add to each x component. - * y The number to add to each y component. - * z The number to add to each z component. + * m: The matrix to modify. + * x: The number to add to each x component. + * y: The number to add to each y component. + * z: The number to add to each z component. */ extern void __attribute__((overloadable)) rsMatrixTranslate(rs_matrix4x4* m, float x, float y, float z); @@ -585,7 +586,7 @@ extern void __attribute__((overloadable)) * Transpose the matrix m in place. * * Parameters: - * m The matrix to transpose. + * m: The matrix to transpose. */ extern void __attribute__((overloadable)) rsMatrixTranspose(rs_matrix4x4* m); diff --git a/scriptc/rs_object_info.rsh b/scriptc/rs_object_info.rsh index 25ac326b..16828a37 100644 --- a/scriptc/rs_object_info.rsh +++ b/scriptc/rs_object_info.rsh @@ -14,7 +14,7 @@ * limitations under the License. */ -// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime. +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. /* * rs_object_info.rsh: Element functions @@ -22,9 +22,9 @@ * The term "element" is used a bit ambiguously in RenderScript, as both * the type of an item of an allocation and the instantiation of that type: * - * rs_element is a handle to a type specification, and + * - rs_element is a handle to a type specification, and * - * In functions like rsGetElementAt(), "element" means the instantiation + * - In functions like rsGetElementAt(), "element" means the instantiation * of the type, i.e. an item of an allocation. * * The functions below let you query the characteristics of the type specificiation. @@ -39,6 +39,7 @@ * Elements can also have a kind, which is semantic information used mostly to * interpret pixel data. */ + #ifndef RENDERSCRIPT_RS_OBJECT_INFO_RSH #define RENDERSCRIPT_RS_OBJECT_INFO_RSH @@ -99,7 +100,7 @@ extern uint32_t __attribute__((overloadable)) * Get the element object describing the allocation's layout * * Parameters: - * a allocation to get data from + * a: allocation to get data from * * Returns: element describing allocation layout */ @@ -194,8 +195,8 @@ extern rs_data_type __attribute__((overloadable)) * of sub-elements, an invalid handle is returned. * * Parameters: - * e Element to query - * index Index of the sub-element to return + * e: Element to query + * index: Index of the sub-element to return * * Returns: Sub-element at the given index */ @@ -212,8 +213,8 @@ extern rs_element __attribute__((overloadable)) * sub-element at the index. * * Parameters: - * e Element to query - * index Index of the sub-element + * e: Element to query + * index: Index of the sub-element * * Returns: Array size of the sub-element at the given index */ @@ -231,7 +232,7 @@ extern uint32_t __attribute__((overloadable)) * elements or the number of sub-elements otherwise. * * Parameters: - * e Element to get data from + * e: Element to get data from * * Returns: Number of sub-elements in this element */ @@ -247,10 +248,10 @@ extern uint32_t __attribute__((overloadable)) * at the specified index. * * Parameters: - * e Element to get data from - * index Index of the sub-element - * name Array to store the name into - * nameLength Length of the provided name array + * e: Element to get data from + * index: Index of the sub-element + * name: Array to store the name into + * nameLength: Length of the provided name array * * Returns: Number of characters actually written, excluding the null terminator */ @@ -266,8 +267,8 @@ extern uint32_t __attribute__((overloadable)) * sub-element name at index * * Parameters: - * e Element to get data from - * index Index of the sub-element to return + * e: Element to get data from + * index: Index of the sub-element to return * * Returns: Length of the sub-element name including the null terminator (size of buffer needed to write the name) */ @@ -281,8 +282,8 @@ extern uint32_t __attribute__((overloadable)) * the element * * Parameters: - * e Element to get data from - * index Index of the sub-element + * e: Element to get data from + * index: Index of the sub-element * * Returns: Offset in bytes of sub-element in this element at given index */ @@ -295,7 +296,7 @@ extern uint32_t __attribute__((overloadable)) * Returns the element's vector size * * Parameters: - * e Element to get data from + * e: Element to get data from * * Returns: Length of the element vector (for float2, float3, etc.) */ @@ -321,7 +322,7 @@ extern rs_allocation __attribute__((overloadable)) * Get sampler anisotropy * * Parameters: - * s sampler to query + * s: sampler to query * * Returns: anisotropy */ @@ -334,7 +335,7 @@ extern float __attribute__((overloadable)) * Get sampler magnification value * * Parameters: - * s sampler to query + * s: sampler to query * * Returns: magnification value */ @@ -347,7 +348,7 @@ extern rs_sampler_value __attribute__((overloadable)) * Get sampler minification value * * Parameters: - * s sampler to query + * s: sampler to query * * Returns: minification value */ @@ -360,7 +361,7 @@ extern rs_sampler_value __attribute__((overloadable)) * Get sampler wrap S value * * Parameters: - * s sampler to query + * s: sampler to query * * Returns: wrap S value */ @@ -373,7 +374,7 @@ extern rs_sampler_value __attribute__((overloadable)) * Get sampler wrap T value * * Parameters: - * s sampler to query + * s: sampler to query * * Returns: wrap T value */ diff --git a/scriptc/rs_object_types.rsh b/scriptc/rs_object_types.rsh index 982038dc..7df05614 100644 --- a/scriptc/rs_object_types.rsh +++ b/scriptc/rs_object_types.rsh @@ -14,13 +14,14 @@ * limitations under the License. */ -// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime. +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. /* * rs_object_types.rsh: Standard RenderScript types * * TODO desc. */ + #ifndef RENDERSCRIPT_RS_OBJECT_TYPES_RSH #define RENDERSCRIPT_RS_OBJECT_TYPES_RSH diff --git a/scriptc/rs_quaternion.rsh b/scriptc/rs_quaternion.rsh index c6ece96d..a9321c99 100644 --- a/scriptc/rs_quaternion.rsh +++ b/scriptc/rs_quaternion.rsh @@ -14,12 +14,13 @@ * limitations under the License. */ -// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime. +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. /* * rs_quaternion.rsh: Quaternion routines * */ + #ifndef RENDERSCRIPT_RS_QUATERNION_RSH #define RENDERSCRIPT_RS_QUATERNION_RSH @@ -27,8 +28,8 @@ * Add two quaternions * * Parameters: - * q destination quaternion to add to - * rhs right hand side quaternion to add + * q: destination quaternion to add to + * rhs: right hand side quaternion to add */ static inline void __attribute__((overloadable)) rsQuaternionAdd(rs_quaternion* q, const rs_quaternion* rhs) { @@ -42,7 +43,7 @@ static inline void __attribute__((overloadable)) * Conjugates the quaternion * * Parameters: - * q quaternion to conjugate + * q: quaternion to conjugate */ static inline void __attribute__((overloadable)) rsQuaternionConjugate(rs_quaternion* q) { @@ -55,8 +56,8 @@ static inline void __attribute__((overloadable)) * Dot product of two quaternions * * Parameters: - * q0 first quaternion - * q1 second quaternion + * q0: first quaternion + * q1: second quaternion * * Returns: dot product between q0 and q1 */ @@ -69,8 +70,8 @@ static inline float __attribute__((overloadable)) * Computes rotation matrix from the normalized quaternion * * Parameters: - * m resulting matrix - * q normalized quaternion + * m: resulting matrix + * q: normalized quaternion */ static inline void __attribute__((overloadable)) rsQuaternionGetMatrixUnit(rs_matrix4x4* m, const rs_quaternion* q) { @@ -101,11 +102,11 @@ static inline void __attribute__((overloadable)) * Loads a quaternion that represents a rotation about an arbitrary unit vector * * Parameters: - * q quaternion to set - * rot rot angle to rotate by - * x component of a vector - * y component of a vector - * z component of a vector + * q: quaternion to set + * rot: rot angle to rotate by + * x: component of a vector + * y: component of a vector + * z: component of a vector */ static inline void __attribute__((overloadable)) rsQuaternionLoadRotateUnit(rs_quaternion* q, float rot, float x, float y, float z) { @@ -123,12 +124,12 @@ static inline void __attribute__((overloadable)) * Set the quaternion from components or from another quaternion. * * Parameters: - * q destination quaternion - * w component - * x component - * y component - * z component - * rhs source quaternion + * q: destination quaternion + * w: component + * x: component + * y: component + * z: component + * rhs: source quaternion */ static inline void __attribute__((overloadable)) rsQuaternionSet(rs_quaternion* q, float w, float x, float y, float z) { @@ -151,11 +152,11 @@ static inline void __attribute__((overloadable)) * (doesn't have to be unit) * * Parameters: - * q quaternion to set - * rot angle to rotate by - * x component of a vector - * y component of a vector - * z component of a vector + * q: quaternion to set + * rot: angle to rotate by + * x: component of a vector + * y: component of a vector + * z: component of a vector */ static inline void __attribute__((overloadable)) rsQuaternionLoadRotate(rs_quaternion* q, float rot, float x, float y, float z) { @@ -173,7 +174,7 @@ static inline void __attribute__((overloadable)) * Normalizes the quaternion * * Parameters: - * q quaternion to normalize + * q: quaternion to normalize */ static inline void __attribute__((overloadable)) rsQuaternionNormalize(rs_quaternion* q) { @@ -191,9 +192,9 @@ static inline void __attribute__((overloadable)) * Multiply quaternion by a scalar or another quaternion * * Parameters: - * q destination quaternion - * s scalar - * rhs right hand side quaternion to multiply by + * q: destination quaternion + * s: scalar + * rhs: right hand side quaternion to multiply by */ static inline void __attribute__((overloadable)) rsQuaternionMultiply(rs_quaternion* q, float s) { @@ -219,10 +220,10 @@ static inline void __attribute__((overloadable)) * Performs spherical linear interpolation between two quaternions * * Parameters: - * q result quaternion from interpolation - * q0 first param - * q1 second param - * t how much to interpolate by + * q: result quaternion from interpolation + * q0: first param + * q1: second param + * t: how much to interpolate by */ static inline void __attribute__((overloadable)) rsQuaternionSlerp(rs_quaternion* q, const rs_quaternion* q0, const rs_quaternion* q1, float t) { diff --git a/scriptc/rs_time.rsh b/scriptc/rs_time.rsh index 3a4acf28..5f8721ae 100644 --- a/scriptc/rs_time.rsh +++ b/scriptc/rs_time.rsh @@ -14,13 +14,14 @@ * limitations under the License. */ -// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime. +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. /* * rs_time.rsh: RenderScript time routines * * This file contains RenderScript functions relating to time and date manipulation. */ + #ifndef RENDERSCRIPT_RS_TIME_RSH #define RENDERSCRIPT_RS_TIME_RSH @@ -70,8 +71,8 @@ extern float __attribute__((overloadable)) * is NULL, this function does nothing and returns NULL. * * Parameters: - * local Broken-down time. - * timer Input time as calendar time. + * local: Broken-down time. + * timer: Input time as calendar time. * * Returns: Pointer to broken-down time (same as input p local). */ @@ -84,7 +85,7 @@ extern rs_tm* __attribute__((overloadable)) * pointed to by this variable. If an error occurs, a value of -1 is returned. * * Parameters: - * timer Location to also store the returned calendar time. + * timer: Location to also store the returned calendar time. * * Returns: Seconds since the Epoch. */ diff --git a/scriptc/rs_value_types.rsh b/scriptc/rs_value_types.rsh index c19bd4ef..b64d7d7c 100644 --- a/scriptc/rs_value_types.rsh +++ b/scriptc/rs_value_types.rsh @@ -14,29 +14,30 @@ * limitations under the License. */ -// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime. +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. /* * rs_value_types.rsh: Standard RenderScript types * * Integers: - * 8 bit: char, int8_t - * 16 bit: short, int16_t - * 32 bit: int, in32_t - * 64 bit: long, long long, int64_t + * - 8 bit: char, int8_t + * - 16 bit: short, int16_t + * - 32 bit: int, in32_t + * - 64 bit: long, long long, int64_t * * Unsigned integers: - * 8 bit: uchar, uint8_t - * 16 bit: ushort, uint16_t - * 32 bit: uint, uint32_t - * 64 bit: ulong, uint64_t + * - 8 bit: uchar, uint8_t + * - 16 bit: ushort, uint16_t + * - 32 bit: uint, uint32_t + * - 64 bit: ulong, uint64_t * * Floating point: - * 32 bit: float - * 64 bit: double + * - 32 bit: float + * - 64 bit: double * * Vectors of length 2, 3, and 4 are supported for all the types above. */ + #ifndef RENDERSCRIPT_RS_VALUE_TYPES_RSH #define RENDERSCRIPT_RS_VALUE_TYPES_RSH diff --git a/scriptc/rs_vector_math.rsh b/scriptc/rs_vector_math.rsh index d82cd69a..d6c35b94 100644 --- a/scriptc/rs_vector_math.rsh +++ b/scriptc/rs_vector_math.rsh @@ -14,13 +14,14 @@ * limitations under the License. */ -// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime. +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. /* * rs_vector_math.rsh: TODO Add documentation * * TODO Add documentation */ + #ifndef RENDERSCRIPT_RS_VECTOR_MATH_RSH #define RENDERSCRIPT_RS_VECTOR_MATH_RSH |
