1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/canvas/src/WebGLActiveInfo.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,55 @@ 1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef WEBGLACTIVEINFO_H_ 1.10 +#define WEBGLACTIVEINFO_H_ 1.11 + 1.12 +#include "WebGLObjectModel.h" 1.13 +#include "nsString.h" 1.14 +#include "js/TypeDecls.h" 1.15 + 1.16 +namespace mozilla { 1.17 + 1.18 +class WebGLActiveInfo MOZ_FINAL 1.19 +{ 1.20 +public: 1.21 + WebGLActiveInfo(GLint size, GLenum type, const nsACString& name) : 1.22 + mSize(size), 1.23 + mType(type), 1.24 + mName(NS_ConvertASCIItoUTF16(name)) 1.25 + {} 1.26 + 1.27 + // WebIDL attributes 1.28 + 1.29 + GLint Size() const { 1.30 + return mSize; 1.31 + } 1.32 + 1.33 + GLenum Type() const { 1.34 + return mType; 1.35 + } 1.36 + 1.37 + void GetName(nsString& retval) const { 1.38 + retval = mName; 1.39 + } 1.40 + 1.41 + JSObject* WrapObject(JSContext *cx); 1.42 + 1.43 + NS_INLINE_DECL_REFCOUNTING(WebGLActiveInfo) 1.44 + 1.45 +private: 1.46 + // Private destructor, to discourage deletion outside of Release(): 1.47 + ~WebGLActiveInfo() 1.48 + { 1.49 + } 1.50 + 1.51 + GLint mSize; 1.52 + GLenum mType; 1.53 + nsString mName; 1.54 +}; 1.55 + 1.56 +} // namespace mozilla 1.57 + 1.58 +#endif