Pepper_47_C_interfaces
Main Page
Modules
Classes
Files
File List
File Members
private
ppb_flash_menu.h
Go to the documentation of this file.
1
/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2
* Use of this source code is governed by a BSD-style license that can be
3
* found in the LICENSE file.
4
*/
5
6
/* From private/ppb_flash_menu.idl modified Thu Oct 20 13:57:04 2016. */
7
8
#ifndef PPAPI_C_PRIVATE_PPB_FLASH_MENU_H_
9
#define PPAPI_C_PRIVATE_PPB_FLASH_MENU_H_
10
11
#include "
ppapi/c/pp_bool.h
"
12
#include "
ppapi/c/pp_completion_callback.h
"
13
#include "
ppapi/c/pp_instance.h
"
14
#include "
ppapi/c/pp_macros.h
"
15
#include "
ppapi/c/pp_point.h
"
16
#include "
ppapi/c/pp_resource.h
"
17
#include "
ppapi/c/pp_stdint.h
"
18
19
/* Struct prototypes */
20
struct
PP_Flash_Menu
;
21
22
#define PPB_FLASH_MENU_INTERFACE_0_2 "PPB_Flash_Menu;0.2"
23
#define PPB_FLASH_MENU_INTERFACE PPB_FLASH_MENU_INTERFACE_0_2
24
25
/**
26
* @file
27
* This file defines the <code>PPB_Flash_Menu</code> interface.
28
*/
29
30
31
/**
32
* @addtogroup Enums
33
* @{
34
*/
35
/* Menu item type.
36
*
37
* TODO(viettrungluu): Radio items not supported yet. Will also probably want
38
* special menu items tied to clipboard access.
39
*/
40
typedef
enum
{
41
PP_FLASH_MENUITEM_TYPE_NORMAL
= 0,
42
PP_FLASH_MENUITEM_TYPE_CHECKBOX
= 1,
43
PP_FLASH_MENUITEM_TYPE_SEPARATOR
= 2,
44
PP_FLASH_MENUITEM_TYPE_SUBMENU
= 3
45
}
PP_Flash_MenuItem_Type
;
46
PP_COMPILE_ASSERT_SIZE_IN_BYTES
(
PP_Flash_MenuItem_Type
, 4);
47
/**
48
* @}
49
*/
50
51
/**
52
* @addtogroup Structs
53
* @{
54
*/
55
struct
PP_Flash_MenuItem
{
56
PP_Flash_MenuItem_Type
type
;
57
char
*
name
;
58
int32_t
id
;
59
PP_Bool
enabled
;
60
PP_Bool
checked
;
61
struct
PP_Flash_Menu
*
submenu
;
62
};
63
64
struct
PP_Flash_Menu
{
65
uint32_t
count
;
66
struct
PP_Flash_MenuItem
*
items
;
67
};
68
/**
69
* @}
70
*/
71
72
/**
73
* @addtogroup Interfaces
74
* @{
75
*/
76
struct
PPB_Flash_Menu_0_2
{
77
PP_Resource
(*
Create
)(
PP_Instance
instance_id,
78
const
struct
PP_Flash_Menu
* menu_data);
79
PP_Bool
(*
IsFlashMenu
)(
PP_Resource
resource_id);
80
/* Display a context menu at the given location. If the user selects an item,
81
* |selected_id| will be set to its |id| and the callback called with |PP_OK|.
82
* If the user dismisses the menu without selecting an item,
83
* |PP_ERROR_USERCANCEL| will be indicated.
84
*/
85
int32_t (*
Show
)(
PP_Resource
menu_id,
86
const
struct
PP_Point
* location,
87
int32_t* selected_id,
88
struct
PP_CompletionCallback
callback);
89
};
90
91
typedef
struct
PPB_Flash_Menu_0_2
PPB_Flash_Menu
;
92
/**
93
* @}
94
*/
95
96
#endif
/* PPAPI_C_PRIVATE_PPB_FLASH_MENU_H_ */
97
pp_macros.h
PPB_Flash_Menu_0_2::IsFlashMenu
PP_Bool(* IsFlashMenu)(PP_Resource resource_id)
Definition:
ppb_flash_menu.h:79
PP_Flash_Menu::items
struct PP_Flash_MenuItem * items
Definition:
ppb_flash_menu.h:66
PP_FLASH_MENUITEM_TYPE_CHECKBOX
Definition:
ppb_flash_menu.h:42
PPB_Flash_Menu_0_2::Create
PP_Resource(* Create)(PP_Instance instance_id, const struct PP_Flash_Menu *menu_data)
Definition:
ppb_flash_menu.h:77
PP_Flash_MenuItem::submenu
struct PP_Flash_Menu * submenu
Definition:
ppb_flash_menu.h:61
pp_point.h
PP_Flash_MenuItem
Definition:
ppb_flash_menu.h:55
pp_bool.h
pp_instance.h
PP_COMPILE_ASSERT_SIZE_IN_BYTES
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_Flash_MenuItem_Type, 4)
PP_Flash_MenuItem::checked
PP_Bool checked
Definition:
ppb_flash_menu.h:60
PP_Flash_MenuItem::id
int32_t id
Definition:
ppb_flash_menu.h:58
PP_Resource
int32_t PP_Resource
Definition:
pp_resource.h:40
pp_completion_callback.h
PP_Point
Definition:
pp_point.h:28
PP_FLASH_MENUITEM_TYPE_SUBMENU
Definition:
ppb_flash_menu.h:44
pp_resource.h
PP_Flash_Menu::count
uint32_t count
Definition:
ppb_flash_menu.h:65
PP_Flash_MenuItem_Type
PP_Flash_MenuItem_Type
Definition:
ppb_flash_menu.h:40
PPB_Flash_Menu_0_2
Definition:
ppb_flash_menu.h:76
pp_stdint.h
PP_Flash_MenuItem::type
PP_Flash_MenuItem_Type type
Definition:
ppb_flash_menu.h:56
PP_Instance
int32_t PP_Instance
Definition:
pp_instance.h:34
PPB_Flash_Menu_0_2::Show
int32_t(* Show)(PP_Resource menu_id, const struct PP_Point *location, int32_t *selected_id, struct PP_CompletionCallback callback)
Definition:
ppb_flash_menu.h:85
PP_FLASH_MENUITEM_TYPE_NORMAL
Definition:
ppb_flash_menu.h:41
PP_Bool
PP_Bool
Definition:
pp_bool.h:30
PP_Flash_MenuItem::enabled
PP_Bool enabled
Definition:
ppb_flash_menu.h:59
PP_Flash_Menu
Definition:
ppb_flash_menu.h:64
PP_FLASH_MENUITEM_TYPE_SEPARATOR
Definition:
ppb_flash_menu.h:43
PP_CompletionCallback
Definition:
pp_completion_callback.h:139
PP_Flash_MenuItem::name
char * name
Definition:
ppb_flash_menu.h:57
Generated on Wed Apr 5 2017 11:09:17 for Pepper_47_C_interfaces by
1.8.6