summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
authornoelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-20 18:03:06 +0000
committernoelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-20 18:03:06 +0000
commitcfe868c0b603e604716a90597d7c85f9a1752a1b (patch)
tree0a2c4904d41ae133baff69af8d9669d6f12cbc64 /ppapi
parent1de74d0a96a2ffa6081c632ba7c51edf3992a899 (diff)
downloadchromium_src-cfe868c0b603e604716a90597d7c85f9a1752a1b.zip
chromium_src-cfe868c0b603e604716a90597d7c85f9a1752a1b.tar.gz
chromium_src-cfe868c0b603e604716a90597d7c85f9a1752a1b.tar.bz2
Minor updates to IDL to match changes in PPAPI headers.
This another round of minor changes in the IDL to bring it up to date with the checked in PPAPI 'C' headers. WRT testing, the CL needed to drive the test is still in flight. TEST= python idl_c_header.py --wcomment --srcroot=../api --dstroot=hdir ../api/*.idl BUG= http://code.google.com/p/chromium/issues/detail?id=76271 Review URL: http://codereview.chromium.org/7204019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89684 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/api/pp_completion_callback.idl2
-rw-r--r--ppapi/api/pp_input_event.idl23
-rw-r--r--ppapi/api/pp_var.idl50
-rw-r--r--ppapi/api/ppb_core.idl5
-rw-r--r--ppapi/api/ppb_var.idl9
-rw-r--r--ppapi/api/ppp_instance.idl15
6 files changed, 70 insertions, 34 deletions
diff --git a/ppapi/api/pp_completion_callback.idl b/ppapi/api/pp_completion_callback.idl
index b1fb8b3..5d37354 100644
--- a/ppapi/api/pp_completion_callback.idl
+++ b/ppapi/api/pp_completion_callback.idl
@@ -6,7 +6,7 @@
/* This file defines the completion callback type. */
/* The callback function. */
-typedef void PP_CompletionCallback_Func([in] mem_t user_data,
+typedef void PP_CompletionCallback_Func([inout] mem_t user_data,
[in] int32_t result);
/* Any method that takes a PP_CompletionCallback has the option of completing
diff --git a/ppapi/api/pp_input_event.idl b/ppapi/api/pp_input_event.idl
index fdb53a7..5086356 100644
--- a/ppapi/api/pp_input_event.idl
+++ b/ppapi/api/pp_input_event.idl
@@ -100,14 +100,16 @@ struct PP_InputEvent_Key {
* isn't lost"), 'R' character event, 'R' key up.
*/
struct PP_InputEvent_Character {
- /* A combination of the EVENT_MODIFIER flags. */
+ /** A combination of the EVENT_MODIFIER flags. */
uint32_t modifier;
- /* This value represents the typed character as a single null-terminated UTF-8
+
+ /**
+ * This value represents the typed character as a single null-terminated UTF-8
* character. Any unused bytes will be filled with null bytes. Since the
* maximum UTF-8 character is 4 bytes, there will always be at least one null
* at the end so you can treat this as a null-termianted UTF-8 string.
*/
- uint8_t[5] text;
+ char[5] text;
};
/* The PP_InputEvent_Mouse struct represents all mouse events except
@@ -215,13 +217,22 @@ struct PP_InputEvent_Wheel {
/* The PP_InputEvent struct represents all input events. */
struct PP_InputEvent {
- /* This value represents the type of the event. */
+ /** This value represents the type of the event. */
PP_InputEvent_Type type;
- /* This value represents the time that this event was generated. This value
+
+ /** This value ensure the time_stamp is aligned on an 8-byte boundary
+ * relative to the start of the struct. Some compilers align doubles
+ * on 8-byte boundaries for 32-bit x86, and some align on 4-byte boundaries.
+ */
+ int32_t padding;
+
+ /**
+ * This value represents the time that this event was generated. This value
* is not relative to any particular epoch; the most you can do is compare
* time stamps.
*/
PP_TimeTicks time_stamp;
- /* This value represents the event's specific data. */
+
+ /** This value represents the event type and its specific data. */
PP_InputEventData u;
};
diff --git a/ppapi/api/pp_var.idl b/ppapi/api/pp_var.idl
index b3139e2..f6f35e6 100644
--- a/ppapi/api/pp_var.idl
+++ b/ppapi/api/pp_var.idl
@@ -11,23 +11,67 @@
* within a PP_VAR structure.
*/
enum PP_VarType {
+ /*
+ * An undefined value.
+ */
PP_VARTYPE_UNDEFINED = 0,
+
+ /*
+ * A NULL value. This is similar to undefined, but JavaScript differentiates
+ * the two so we expose it here as well.
+ */
PP_VARTYPE_NULL = 1,
+
+ /*
+ * A boolean value, use the as_bool member of the var.
+ */
PP_VARTYPE_BOOL = 2,
+
+ /*
+ * A 32-bit integer value. Use the as_int member of the var.
+ */
PP_VARTYPE_INT32 = 3,
+
+ /*
+ * A double-precision floating point value. Use the as_double member of the
+ * var.
+ */
PP_VARTYPE_DOUBLE = 4,
+
+ /*
+ * The Var represents a string. The as_id field is used to identify the
+ * string, which may be created and retrieved from the PPB_Var interface.
+ */
PP_VARTYPE_STRING = 5,
- PP_VARTYPE_OBJECT = 6
+
+ /*
+ * Represents a JavaScript object. This vartype is not currently usable
+ * from plugins, although it is used internally for some tasks.
+ */
+ PP_VARTYPE_OBJECT = 6,
+
+ /*
+ * Arrays and dictionaries are not currently supported but will be added
+ * in future revisions. These objects are reference counted so be sure
+ * to properly AddRef/Release them as you would with strings to ensure your
+ * plugin will continue to work with future versions of the API.
+ */
+ PP_VARTYPE_ARRAY = 7,
+ PP_VARTYPE_DICTIONARY = 8
};
-/* The value of a Var. */
+
+/* This structure contains the various elements type within the PP_VAR. */
[union] struct PP_VarValue {
/* Value if type is PP_VARTYPE_BOOL. */
PP_Bool as_bool;
+
/* Value if type is PP_VARTYPE_INT32. */
int32_t as_int;
+
/* Value if type is PP_VARTYPE_DOUBLE. */
double_t as_double;
+
/* Internal ID for strings and objects. The identifier is an opaque handle
* assigned by the browser to the plugin. It is guaranteed never to be 0,
* so a plugin can initialize this ID to 0 to indicate a "NULL handle."
@@ -51,6 +95,8 @@ enum PP_VarType {
[passByValue] struct PP_Var {
/* Type. */
PP_VarType type;
+
/* Type-dependent value. */
PP_VarValue value;
};
+
diff --git a/ppapi/api/ppb_core.idl b/ppapi/api/ppb_core.idl
index 50ca87a..e28fb0a 100644
--- a/ppapi/api/ppb_core.idl
+++ b/ppapi/api/ppb_core.idl
@@ -5,7 +5,10 @@
/* Defines the core API. */
-/* {PENDING: describe PPB_CORE} */
+/*
+ * The PPB_Core interface contains pointers to functions related to memory
+ * management, time, and threads on the browser.
+ */
interface PPB_Core_0_3 {
/* Same as AddRefVar for Resources. */
void AddRefResource(
diff --git a/ppapi/api/ppb_var.idl b/ppapi/api/ppb_var.idl
index 17a39e2..828c608 100644
--- a/ppapi/api/ppb_var.idl
+++ b/ppapi/api/ppb_var.idl
@@ -57,13 +57,4 @@ interface PPB_Var_0_5 {
str_t VarToUtf8(
[in] PP_Var var,
[out] uint32_t len);
-
- /* Convert a variable to a different type using rules from ECMAScript
- * specification, section [9].
- * TODO(neb): Document what happens on failure.
- */
- PP_Var ConvertType(
- [in] PP_Instance instance,
- [in] PP_Var var,
- [in] PP_VarType new_type);
};
diff --git a/ppapi/api/ppp_instance.idl b/ppapi/api/ppp_instance.idl
index 4bc0ef1..d3ce47e 100644
--- a/ppapi/api/ppp_instance.idl
+++ b/ppapi/api/ppp_instance.idl
@@ -137,19 +137,4 @@ interface PPP_Instance_0_4 {
/* A PP_Resource an open PPB_URLLoader instance. */
[in] PP_Resource url_loader);
- /* This value represents a pointer to a function that returns a Var
- * representing the scriptable object for the given instance. Normally
- * this will be a PPP_Class object that exposes certain methods the page
- * may want to call.
- *
- * On Failure, the returned var should be a "void" var.
- *
- * The returned PP_Var should have a reference added for the caller, which
- * will be responsible for Release()ing that reference.
- *
- * Returns a PP_Var containing scriptable object.
- */
- PP_Var GetInstanceObject(
- /* A PP_Instance indentifying one instance of a module. */
- [in] PP_Instance instance);
};