Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "assert.h" |
michael@0 | 7 | #include "ANPBase.h" |
michael@0 | 8 | #include <android/log.h> |
michael@0 | 9 | |
michael@0 | 10 | #define LOG(args...) __android_log_print(ANDROID_LOG_INFO, "GeckoPlugins" , ## args) |
michael@0 | 11 | #define ASSIGN(obj, name) (obj)->name = anp_matrix_##name |
michael@0 | 12 | |
michael@0 | 13 | /** Return a new identity matrix |
michael@0 | 14 | */ |
michael@0 | 15 | ANPMatrix* |
michael@0 | 16 | anp_matrix_newMatrix() |
michael@0 | 17 | { |
michael@0 | 18 | NOT_IMPLEMENTED(); |
michael@0 | 19 | return 0; |
michael@0 | 20 | } |
michael@0 | 21 | |
michael@0 | 22 | /** Delete a matrix previously allocated by newMatrix() |
michael@0 | 23 | */ |
michael@0 | 24 | void |
michael@0 | 25 | anp_matrix_deleteMatrix(ANPMatrix*) |
michael@0 | 26 | { |
michael@0 | 27 | NOT_IMPLEMENTED(); |
michael@0 | 28 | } |
michael@0 | 29 | |
michael@0 | 30 | |
michael@0 | 31 | ANPMatrixFlag |
michael@0 | 32 | anp_matrix_getFlags(const ANPMatrix*) |
michael@0 | 33 | { |
michael@0 | 34 | NOT_IMPLEMENTED(); |
michael@0 | 35 | return 0; |
michael@0 | 36 | } |
michael@0 | 37 | |
michael@0 | 38 | |
michael@0 | 39 | void |
michael@0 | 40 | anp_matrix_copy(ANPMatrix* dst, const ANPMatrix* src) |
michael@0 | 41 | { |
michael@0 | 42 | NOT_IMPLEMENTED(); |
michael@0 | 43 | } |
michael@0 | 44 | |
michael@0 | 45 | |
michael@0 | 46 | void |
michael@0 | 47 | anp_matrix_get3x3(const ANPMatrix*, float[9]) |
michael@0 | 48 | { |
michael@0 | 49 | NOT_IMPLEMENTED(); |
michael@0 | 50 | } |
michael@0 | 51 | |
michael@0 | 52 | void |
michael@0 | 53 | anp_matrix_set3x3(ANPMatrix*, const float[9]) |
michael@0 | 54 | { |
michael@0 | 55 | NOT_IMPLEMENTED(); |
michael@0 | 56 | } |
michael@0 | 57 | |
michael@0 | 58 | |
michael@0 | 59 | void |
michael@0 | 60 | anp_matrix_setIdentity(ANPMatrix*) |
michael@0 | 61 | { |
michael@0 | 62 | NOT_IMPLEMENTED(); |
michael@0 | 63 | } |
michael@0 | 64 | |
michael@0 | 65 | void |
michael@0 | 66 | anp_matrix_preTranslate(ANPMatrix*, float tx, float ty) |
michael@0 | 67 | { |
michael@0 | 68 | NOT_IMPLEMENTED(); |
michael@0 | 69 | } |
michael@0 | 70 | |
michael@0 | 71 | void |
michael@0 | 72 | anp_matrix_postTranslate(ANPMatrix*, float tx, float ty) |
michael@0 | 73 | { |
michael@0 | 74 | NOT_IMPLEMENTED(); |
michael@0 | 75 | } |
michael@0 | 76 | |
michael@0 | 77 | void |
michael@0 | 78 | anp_matrix_preScale(ANPMatrix*, float sx, float sy) |
michael@0 | 79 | { |
michael@0 | 80 | NOT_IMPLEMENTED(); |
michael@0 | 81 | } |
michael@0 | 82 | |
michael@0 | 83 | void |
michael@0 | 84 | anp_matrix_postScale(ANPMatrix*, float sx, float sy) |
michael@0 | 85 | { |
michael@0 | 86 | NOT_IMPLEMENTED(); |
michael@0 | 87 | } |
michael@0 | 88 | |
michael@0 | 89 | void |
michael@0 | 90 | anp_matrix_preSkew(ANPMatrix*, float kx, float ky) |
michael@0 | 91 | { |
michael@0 | 92 | NOT_IMPLEMENTED(); |
michael@0 | 93 | } |
michael@0 | 94 | |
michael@0 | 95 | void |
michael@0 | 96 | anp_matrix_postSkew(ANPMatrix*, float kx, float ky) |
michael@0 | 97 | { |
michael@0 | 98 | NOT_IMPLEMENTED(); |
michael@0 | 99 | } |
michael@0 | 100 | |
michael@0 | 101 | void |
michael@0 | 102 | anp_matrix_preRotate(ANPMatrix*, float degrees) |
michael@0 | 103 | { |
michael@0 | 104 | NOT_IMPLEMENTED(); |
michael@0 | 105 | } |
michael@0 | 106 | |
michael@0 | 107 | void |
michael@0 | 108 | anp_matrix_postRotate(ANPMatrix*, float degrees) |
michael@0 | 109 | { |
michael@0 | 110 | NOT_IMPLEMENTED(); |
michael@0 | 111 | } |
michael@0 | 112 | |
michael@0 | 113 | void |
michael@0 | 114 | anp_matrix_preConcat(ANPMatrix*, const ANPMatrix*) |
michael@0 | 115 | { |
michael@0 | 116 | NOT_IMPLEMENTED(); |
michael@0 | 117 | } |
michael@0 | 118 | |
michael@0 | 119 | void |
michael@0 | 120 | anp_matrix_postConcat(ANPMatrix*, const ANPMatrix*) |
michael@0 | 121 | { |
michael@0 | 122 | NOT_IMPLEMENTED(); |
michael@0 | 123 | } |
michael@0 | 124 | |
michael@0 | 125 | |
michael@0 | 126 | bool |
michael@0 | 127 | anp_matrix_invert(ANPMatrix* dst, const ANPMatrix* src) |
michael@0 | 128 | { |
michael@0 | 129 | NOT_IMPLEMENTED(); |
michael@0 | 130 | return false; |
michael@0 | 131 | } |
michael@0 | 132 | |
michael@0 | 133 | void |
michael@0 | 134 | anp_matrix_mapPoints(ANPMatrix*, float dst[], const float src[], |
michael@0 | 135 | int32_t count) |
michael@0 | 136 | { |
michael@0 | 137 | NOT_IMPLEMENTED(); |
michael@0 | 138 | } |
michael@0 | 139 | |
michael@0 | 140 | |
michael@0 | 141 | void InitMatrixInterface(ANPMatrixInterfaceV0 *i) { |
michael@0 | 142 | _assert(i->inSize == sizeof(*i)); |
michael@0 | 143 | ASSIGN(i, newMatrix); |
michael@0 | 144 | ASSIGN(i, deleteMatrix); |
michael@0 | 145 | ASSIGN(i, getFlags); |
michael@0 | 146 | ASSIGN(i, copy); |
michael@0 | 147 | ASSIGN(i, get3x3); |
michael@0 | 148 | ASSIGN(i, set3x3); |
michael@0 | 149 | ASSIGN(i, setIdentity); |
michael@0 | 150 | ASSIGN(i, preTranslate); |
michael@0 | 151 | ASSIGN(i, postTranslate); |
michael@0 | 152 | ASSIGN(i, preScale); |
michael@0 | 153 | ASSIGN(i, postScale); |
michael@0 | 154 | ASSIGN(i, preSkew); |
michael@0 | 155 | ASSIGN(i, postSkew); |
michael@0 | 156 | ASSIGN(i, preRotate); |
michael@0 | 157 | ASSIGN(i, postRotate); |
michael@0 | 158 | ASSIGN(i, preConcat); |
michael@0 | 159 | ASSIGN(i, postConcat); |
michael@0 | 160 | ASSIGN(i, invert); |
michael@0 | 161 | ASSIGN(i, mapPoints); |
michael@0 | 162 | } |
michael@0 | 163 | |
michael@0 | 164 |