diff options
author | neb@chromium.org <neb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-30 17:37:54 +0000 |
---|---|---|
committer | neb@chromium.org <neb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-30 17:37:54 +0000 |
commit | 2272ed3505a36c7d1543f24b770ea85dcfee8640 (patch) | |
tree | 91bc7c2235c7d07b65f16e2b78f49382d863fb0b /ppapi/api/private/ppb_flash_menu.idl | |
parent | f917b80b0878fe92ca856696af2dc47a0f5e1c55 (diff) | |
download | chromium_src-2272ed3505a36c7d1543f24b770ea85dcfee8640.zip chromium_src-2272ed3505a36c7d1543f24b770ea85dcfee8640.tar.gz chromium_src-2272ed3505a36c7d1543f24b770ea85dcfee8640.tar.bz2 |
IDL version of PPAPI interfaces.
BUG=none
TEST=none yet... soon.
Review URL: http://codereview.chromium.org/6726041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79857 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/api/private/ppb_flash_menu.idl')
-rw-r--r-- | ppapi/api/private/ppb_flash_menu.idl | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/ppapi/api/private/ppb_flash_menu.idl b/ppapi/api/private/ppb_flash_menu.idl new file mode 100644 index 0000000..df6aa44 --- /dev/null +++ b/ppapi/api/private/ppb_flash_menu.idl @@ -0,0 +1,52 @@ +/* Copyright (c) 2011 The Chromium Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* PPB_Flash */ + +/* Menu item type. + * + * TODO(viettrungluu): Radio items not supported yet. Will also probably want + * special menu items tied to clipboard access. + */ +enum PP_Flash_MenuItem_Type { + PP_FLASH_MENUITEM_TYPE_NORMAL = 0, + PP_FLASH_MENUITEM_TYPE_CHECKBOX = 1, + PP_FLASH_MENUITEM_TYPE_SEPARATOR = 2, + PP_FLASH_MENUITEM_TYPE_SUBMENU = 3 +}; + +struct PP_Flash_MenuItem { + PP_Flash_MenuItem_Type type; + str_t name; + int32_t id; + PP_Bool enabled; + PP_Bool checked; + PP_Flash_Menu submenu; +}; + +struct PP_Flash_Menu { + uint32_t count; + [size_is(count)] PP_Flash_MenuItem[] items; +}; + +interface PPB_Flash_Menu_0_1 { + PP_Resource Create( + [in] PP_Instance instance_id, + [in] PP_Flash_Menu menu_data); + + PP_Bool IsFlashMenu( + [in] PP_Resource resource_id); + + /* Display a context menu at the given location. If the user selects an item, + * |selected_id| will be set to its |id| and the callback called with |PP_OK|. + * If the user dismisses the menu without selecting an item, + * |PP_ERROR_USERCANCEL| will be indicated. + */ + int32_t Show( + [in] PP_Resource menu_id, + [in] PP_Point location, + [out] int32_t selected_id, + [in] PP_CompletionCallback callback); +}; |