2013-06-10 13:00:35 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef WEBGLACTIVEINFO_H_
|
|
|
|
#define WEBGLACTIVEINFO_H_
|
|
|
|
|
2013-09-04 05:14:48 -07:00
|
|
|
#include "WebGLObjectModel.h"
|
2013-06-10 13:00:35 -07:00
|
|
|
#include "nsString.h"
|
2013-08-27 19:59:14 -07:00
|
|
|
#include "js/TypeDecls.h"
|
2013-06-10 13:00:35 -07:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
|
|
|
|
class WebGLActiveInfo MOZ_FINAL
|
|
|
|
{
|
|
|
|
public:
|
2013-09-04 05:14:43 -07:00
|
|
|
WebGLActiveInfo(GLint size, GLenum type, const nsACString& name) :
|
2013-06-10 13:00:35 -07:00
|
|
|
mSize(size),
|
|
|
|
mType(type),
|
|
|
|
mName(NS_ConvertASCIItoUTF16(name))
|
|
|
|
{}
|
|
|
|
|
|
|
|
// WebIDL attributes
|
|
|
|
|
2013-09-04 05:14:43 -07:00
|
|
|
GLint Size() const {
|
2013-06-10 13:00:35 -07:00
|
|
|
return mSize;
|
|
|
|
}
|
|
|
|
|
2013-09-04 05:14:43 -07:00
|
|
|
GLenum Type() const {
|
2013-06-10 13:00:35 -07:00
|
|
|
return mType;
|
|
|
|
}
|
|
|
|
|
|
|
|
void GetName(nsString& retval) const {
|
|
|
|
retval = mName;
|
|
|
|
}
|
|
|
|
|
2014-04-08 15:27:18 -07:00
|
|
|
JSObject* WrapObject(JSContext *cx);
|
2013-06-10 13:00:35 -07:00
|
|
|
|
2013-08-29 08:39:17 -07:00
|
|
|
NS_INLINE_DECL_REFCOUNTING(WebGLActiveInfo)
|
2013-06-10 13:00:35 -07:00
|
|
|
|
2014-04-04 09:27:02 -07:00
|
|
|
private:
|
|
|
|
// Private destructor, to discourage deletion outside of Release():
|
|
|
|
~WebGLActiveInfo()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-09-04 05:14:43 -07:00
|
|
|
GLint mSize;
|
|
|
|
GLenum mType;
|
2013-06-10 13:00:35 -07:00
|
|
|
nsString mName;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif
|