summaryrefslogtreecommitdiffstats
path: root/o3d/plugin
diff options
context:
space:
mode:
authorfransiskusx@google.com <fransiskusx@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-17 17:16:19 +0000
committerfransiskusx@google.com <fransiskusx@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-17 17:16:19 +0000
commit6c8577f2d7ee2c6aebdb3c3c689a7242ee0f167d (patch)
tree889f49da1748664fac2cc420c0d13e6d45e4b651 /o3d/plugin
parent26d81d7f2d515cbf3babe720f79b1c2b89646100 (diff)
downloadchromium_src-6c8577f2d7ee2c6aebdb3c3c689a7242ee0f167d.zip
chromium_src-6c8577f2d7ee2c6aebdb3c3c689a7242ee0f167d.tar.gz
chromium_src-6c8577f2d7ee2c6aebdb3c3c689a7242ee0f167d.tar.bz2
Further integration of 2D mode. This change supports calltype=v, transparancy, and image transformation.
Currently only support Linux and compiled when renderer = cairo. TEST= I compiled with renderer = cairo and it worked. Also I compiled with renderer = gl and it worked. BUG=none Review URL: http://codereview.chromium.org/3315023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59811 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/plugin')
-rw-r--r--o3d/plugin/idl/idl.gyp9
-rw-r--r--o3d/plugin/idl/layer.idl74
2 files changed, 83 insertions, 0 deletions
diff --git a/o3d/plugin/idl/idl.gyp b/o3d/plugin/idl/idl.gyp
index a6eb6c3..1a16027 100644
--- a/o3d/plugin/idl/idl.gyp
+++ b/o3d/plugin/idl/idl.gyp
@@ -13,6 +13,15 @@
'idl_files': [
'<!@(python get_idl_files.py)',
],
+ 'conditions': [
+ ['renderer == "cairo"',
+ {
+ 'idl_files': [
+ 'layer.idl',
+ ],
+ },
+ ],
+ ],
},
'target_defaults': {
'include_dirs': [
diff --git a/o3d/plugin/idl/layer.idl b/o3d/plugin/idl/layer.idl
new file mode 100644
index 0000000..9525783
--- /dev/null
+++ b/o3d/plugin/idl/layer.idl
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2010, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+namespace o3d {
+
+namespace o2d {
+
+%[
+ Layer defines a container for a layer of scene.
+ It enables JavaScript to manipulate the layer.
+%]
+[nocpp, include="core/cross/cairo/layer.h"] class Layer : ParamObject {
+ %[
+ Translate the object from its current coordinate.
+
+ \param x amount to translate in x.
+ \param y amount to translate in y.
+ %]
+ void Translate(float x, float y);
+
+ %[
+ Scale the size of the object.
+
+ \param x amount to scale in the x dimension.
+ \param y amount to scale in the y dimension.
+ %]
+ void Scale(float x, float y);
+
+ %[
+ Set the transparancy of the object.
+
+ \param alpha amount of the transparancy.
+ %]
+ void SetAlpha(float alpha);
+
+ %[
+ Set the texture for this object.
+
+ \param texture the texture to assign.
+ %]
+ void SetTexture(Texture? texture);
+}; // Layer
+
+} // namespace o2d
+
+} // namespace o3d