Ying Wang | b335bb0 | 2011-11-29 10:23:55 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | /** @file rs_object.rsh |
| 18 | * \brief Object routines |
| 19 | * |
| 20 | * |
| 21 | */ |
| 22 | |
| 23 | #ifndef __RS_OBJECT_RSH__ |
| 24 | #define __RS_OBJECT_RSH__ |
| 25 | |
| 26 | |
| 27 | /** |
| 28 | * Copy reference to the specified object. |
| 29 | * |
| 30 | * @param dst |
| 31 | * @param src |
| 32 | */ |
| 33 | extern void __attribute__((overloadable)) |
| 34 | rsSetObject(rs_element *dst, rs_element src); |
| 35 | /** |
| 36 | * \overload |
| 37 | */ |
| 38 | extern void __attribute__((overloadable)) |
| 39 | rsSetObject(rs_type *dst, rs_type src); |
| 40 | /** |
| 41 | * \overload |
| 42 | */ |
| 43 | extern void __attribute__((overloadable)) |
| 44 | rsSetObject(rs_allocation *dst, rs_allocation src); |
| 45 | /** |
| 46 | * \overload |
| 47 | */ |
| 48 | extern void __attribute__((overloadable)) |
| 49 | rsSetObject(rs_sampler *dst, rs_sampler src); |
| 50 | /** |
| 51 | * \overload |
| 52 | */ |
| 53 | extern void __attribute__((overloadable)) |
| 54 | rsSetObject(rs_script *dst, rs_script src); |
| 55 | /** |
| 56 | * \overload |
| 57 | */ |
| 58 | extern void __attribute__((overloadable)) |
Ying Wang | 6099914 | 2013-01-07 13:59:36 -0800 | [diff] [blame^] | 59 | rsSetObject(rs_path *dst, rs_path src); |
| 60 | /** |
| 61 | * \overload |
| 62 | */ |
| 63 | extern void __attribute__((overloadable)) |
Ying Wang | b335bb0 | 2011-11-29 10:23:55 -0800 | [diff] [blame] | 64 | rsSetObject(rs_mesh *dst, rs_mesh src); |
| 65 | /** |
| 66 | * \overload |
| 67 | */ |
| 68 | extern void __attribute__((overloadable)) |
| 69 | rsSetObject(rs_program_fragment *dst, rs_program_fragment src); |
| 70 | /** |
| 71 | * \overload |
| 72 | */ |
| 73 | extern void __attribute__((overloadable)) |
| 74 | rsSetObject(rs_program_vertex *dst, rs_program_vertex src); |
| 75 | /** |
| 76 | * \overload |
| 77 | */ |
| 78 | extern void __attribute__((overloadable)) |
| 79 | rsSetObject(rs_program_raster *dst, rs_program_raster src); |
| 80 | /** |
| 81 | * \overload |
| 82 | */ |
| 83 | extern void __attribute__((overloadable)) |
| 84 | rsSetObject(rs_program_store *dst, rs_program_store src); |
| 85 | /** |
| 86 | * \overload |
| 87 | */ |
| 88 | extern void __attribute__((overloadable)) |
| 89 | rsSetObject(rs_font *dst, rs_font src); |
| 90 | |
| 91 | /** |
| 92 | * Sets the object to NULL. |
| 93 | * |
| 94 | * @return bool |
| 95 | */ |
| 96 | extern void __attribute__((overloadable)) |
| 97 | rsClearObject(rs_element *dst); |
| 98 | /** |
| 99 | * \overload |
| 100 | */ |
| 101 | extern void __attribute__((overloadable)) |
| 102 | rsClearObject(rs_type *dst); |
| 103 | /** |
| 104 | * \overload |
| 105 | */ |
| 106 | extern void __attribute__((overloadable)) |
| 107 | rsClearObject(rs_allocation *dst); |
| 108 | /** |
| 109 | * \overload |
| 110 | */ |
| 111 | extern void __attribute__((overloadable)) |
| 112 | rsClearObject(rs_sampler *dst); |
| 113 | /** |
| 114 | * \overload |
| 115 | */ |
| 116 | extern void __attribute__((overloadable)) |
| 117 | rsClearObject(rs_script *dst); |
| 118 | /** |
| 119 | * \overload |
| 120 | */ |
| 121 | extern void __attribute__((overloadable)) |
Ying Wang | 6099914 | 2013-01-07 13:59:36 -0800 | [diff] [blame^] | 122 | rsClearObject(rs_path *dst); |
| 123 | /** |
| 124 | * \overload |
| 125 | */ |
| 126 | extern void __attribute__((overloadable)) |
Ying Wang | b335bb0 | 2011-11-29 10:23:55 -0800 | [diff] [blame] | 127 | rsClearObject(rs_mesh *dst); |
| 128 | /** |
| 129 | * \overload |
| 130 | */ |
| 131 | extern void __attribute__((overloadable)) |
| 132 | rsClearObject(rs_program_fragment *dst); |
| 133 | /** |
| 134 | * \overload |
| 135 | */ |
| 136 | extern void __attribute__((overloadable)) |
| 137 | rsClearObject(rs_program_vertex *dst); |
| 138 | /** |
| 139 | * \overload |
| 140 | */ |
| 141 | extern void __attribute__((overloadable)) |
| 142 | rsClearObject(rs_program_raster *dst); |
| 143 | /** |
| 144 | * \overload |
| 145 | */ |
| 146 | extern void __attribute__((overloadable)) |
| 147 | rsClearObject(rs_program_store *dst); |
| 148 | /** |
| 149 | * \overload |
| 150 | */ |
| 151 | extern void __attribute__((overloadable)) |
| 152 | rsClearObject(rs_font *dst); |
| 153 | |
| 154 | |
| 155 | |
| 156 | /** |
| 157 | * Tests if the object is valid. Returns true if the object is valid, false if |
| 158 | * it is NULL. |
| 159 | * |
| 160 | * @return bool |
| 161 | */ |
| 162 | extern bool __attribute__((overloadable)) |
| 163 | rsIsObject(rs_element); |
| 164 | /** |
| 165 | * \overload |
| 166 | */ |
| 167 | extern bool __attribute__((overloadable)) |
| 168 | rsIsObject(rs_type); |
| 169 | /** |
| 170 | * \overload |
| 171 | */ |
| 172 | extern bool __attribute__((overloadable)) |
| 173 | rsIsObject(rs_allocation); |
| 174 | /** |
| 175 | * \overload |
| 176 | */ |
| 177 | extern bool __attribute__((overloadable)) |
| 178 | rsIsObject(rs_sampler); |
| 179 | /** |
| 180 | * \overload |
| 181 | */ |
| 182 | extern bool __attribute__((overloadable)) |
| 183 | rsIsObject(rs_script); |
| 184 | /** |
| 185 | * \overload |
| 186 | */ |
| 187 | extern bool __attribute__((overloadable)) |
Ying Wang | 6099914 | 2013-01-07 13:59:36 -0800 | [diff] [blame^] | 188 | rsIsObject(rs_path); |
| 189 | /** |
| 190 | * \overload |
| 191 | */ |
| 192 | extern bool __attribute__((overloadable)) |
Ying Wang | b335bb0 | 2011-11-29 10:23:55 -0800 | [diff] [blame] | 193 | rsIsObject(rs_mesh); |
| 194 | /** |
| 195 | * \overload |
| 196 | */ |
| 197 | extern bool __attribute__((overloadable)) |
| 198 | rsIsObject(rs_program_fragment); |
| 199 | /** |
| 200 | * \overload |
| 201 | */ |
| 202 | extern bool __attribute__((overloadable)) |
| 203 | rsIsObject(rs_program_vertex); |
| 204 | /** |
| 205 | * \overload |
| 206 | */ |
| 207 | extern bool __attribute__((overloadable)) |
| 208 | rsIsObject(rs_program_raster); |
| 209 | /** |
| 210 | * \overload |
| 211 | */ |
| 212 | extern bool __attribute__((overloadable)) |
| 213 | rsIsObject(rs_program_store); |
| 214 | /** |
| 215 | * \overload |
| 216 | */ |
| 217 | extern bool __attribute__((overloadable)) |
| 218 | rsIsObject(rs_font); |
| 219 | |
| 220 | #endif |