summaryrefslogtreecommitdiffstats
path: root/o3d/plugin
diff options
context:
space:
mode:
authorgman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-17 06:26:52 +0000
committergman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-17 06:26:52 +0000
commit1dc3ba84c3da4edfeaf22cedf65750533a20de00 (patch)
tree936325e6f2dd07667fc4161ac524f1ab076aa5bf /o3d/plugin
parent3d476cf047d6a463d5706f70bfdf5e3787f863ee (diff)
downloadchromium_src-1dc3ba84c3da4edfeaf22cedf65750533a20de00.zip
chromium_src-1dc3ba84c3da4edfeaf22cedf65750533a20de00.tar.gz
chromium_src-1dc3ba84c3da4edfeaf22cedf65750533a20de00.tar.bz2
adding svn:ignore properties to ignore .o3dtgz
files as well as scons-out etc... git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18599 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/plugin')
-rw-r--r--o3d/plugin/idl/client.idl6
-rw-r--r--o3d/plugin/idl/pack.idl8
-rw-r--r--o3d/plugin/mac/main_mac.mm22
-rw-r--r--o3d/plugin/o3d_binding.py16
4 files changed, 35 insertions, 17 deletions
diff --git a/o3d/plugin/idl/client.idl b/o3d/plugin/idl/client.idl
index 439f63b..fc92311 100644
--- a/o3d/plugin/idl/client.idl
+++ b/o3d/plugin/idl/client.idl
@@ -138,7 +138,7 @@ class Client {
\param id The id of the object to look for.
\return The object or null if a object with the given id is not found.
%]
- [const] ObjectBase? GetObjectById(Id id);
+ [const, noreturndocs] ObjectBase? GetObjectById(Id id);
%[
Searches the Client for objects of a particular name and type.
@@ -146,14 +146,14 @@ class Client {
\param class_name name of class to look for.
\return Array of objects found.
%]
- [const] ObjectArray GetObjects(String name, String class_name);
+ [const, noretundocs] ObjectArray GetObjects(String name, String class_name);
%[
Searches the Client for objects of a particular type.
\param class_name name of class to look for.
\return Array of objects found.
%]
- [const] ObjectArray GetObjectsByClassName(String class_name);
+ [const, noreturndocs] ObjectArray GetObjectsByClassName(String class_name);
%[
\var RenderMode,
diff --git a/o3d/plugin/idl/pack.idl b/o3d/plugin/idl/pack.idl
index 460d2c6..4e1e6d5 100644
--- a/o3d/plugin/idl/pack.idl
+++ b/o3d/plugin/idl/pack.idl
@@ -165,7 +165,7 @@ typedef ObjectBase[] ObjectArray;
\li o3d.TRSToMatrix4
\return The created object.
%]
- ObjectBase? CreateObject(String type_name);
+ [noreturndocs] ObjectBase? CreateObject(String type_name);
%[
Creates a new Texture2D object of the specified size and format and
@@ -234,7 +234,8 @@ typedef ObjectBase[] ObjectArray;
DrawPasses, etc...
\returns Array of Objects.
%]
- [const] ObjectArray GetObjects(String name, String class_type_name);
+ [const, noreturndocs]
+ ObjectArray GetObjects(String name, String class_type_name);
%[
Search the pack for all objects of a certain class
@@ -248,7 +249,8 @@ typedef ObjectBase[] ObjectArray;
DrawPasses, etc...
\returns Array of Objects.
%]
- [const] ObjectArray GetObjectsByClassName(String class_type_name);
+ [const, noreturndocs]
+ ObjectArray GetObjectsByClassName(String class_type_name);
%[
All the objects managed by this pack.
diff --git a/o3d/plugin/mac/main_mac.mm b/o3d/plugin/mac/main_mac.mm
index 17f1039..c9dcec0 100644
--- a/o3d/plugin/mac/main_mac.mm
+++ b/o3d/plugin/mac/main_mac.mm
@@ -903,7 +903,7 @@ extern "C" {
if (obj->drawing_model_ == NPDrawingModelOpenGL) {
CGLSetCurrentContext(obj->mac_cgl_context_);
- } else if (obj->mac_agl_context_ == NULL) { // setup AGL context
+ } else if (!had_a_window && obj->mac_agl_context_ == NULL) { // setup AGL context
AGLPixelFormat myAGLPixelFormat = NULL;
// We need to spec out a few similar but different sets of renderer
@@ -1075,8 +1075,10 @@ extern "C" {
// Renderer is already initialized from a previous call to this function,
// just update size and position and return.
if (had_a_window) {
- obj->renderer()->SetClientOriginOffset(gl_x_origin, gl_y_origin);
- obj->Resize(window->width, window->height);
+ if (obj->renderer()) {
+ obj->renderer()->SetClientOriginOffset(gl_x_origin, gl_y_origin);
+ obj->Resize(window->width, window->height);
+ }
return NPERR_NO_ERROR;
}
@@ -1094,22 +1096,22 @@ extern "C" {
::aglDestroyContext(obj->mac_agl_context_);
obj->mac_agl_context_ = NULL;
}
- return NPERR_NO_ERROR;
}
obj->client()->Init();
obj->client()->SetRenderOnDemandCallback(
new RenderOnDemandCallbackHandler(obj));
- obj->renderer()->SetClientOriginOffset(gl_x_origin, gl_y_origin);
- obj->Resize(window->width, window->height);
-
+ if (obj->renderer()) {
+ obj->renderer()->SetClientOriginOffset(gl_x_origin, gl_y_origin);
+ obj->Resize(window->width, window->height);
#ifdef CFTIMER
- // now that the grahics context is setup, add this instance to the timer
- // list so it gets drawn repeatedly
- gRenderTimer.AddInstance(instance);
+ // now that the grahics context is setup, add this instance to the timer
+ // list so it gets drawn repeatedly
+ gRenderTimer.AddInstance(instance);
#endif // CFTIMER
+ }
return NPERR_NO_ERROR;
}
diff --git a/o3d/plugin/o3d_binding.py b/o3d/plugin/o3d_binding.py
index 7d7490c..c0ae572 100644
--- a/o3d/plugin/o3d_binding.py
+++ b/o3d/plugin/o3d_binding.py
@@ -28,7 +28,6 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
"""o3d binding model module.
This module implements the glue functions for the o3d binding model, binding
@@ -300,6 +299,21 @@ def CppGetStatic(scope, type_defn, field):
cpp_utils.GetGetterName(field))
+def JSDocTypeString(type_defn):
+ """Gets the representation of a type in JSDoc notation.
+
+ Args:
+ type_defn: a Definition for the type.
+
+ Returns:
+ a string that is the JSDoc notation of type_defn.
+ """
+ type_defn = type_defn.GetFinalType()
+ type_stack = type_defn.GetParentScopeStack()
+ name = type_defn.name
+ return '!' + '.'.join([s.name for s in type_stack[1:]] + [name])
+
+
_binding_glue_header_template = string.Template('')