1 /* Copyright 2014 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.
6 /* From private/ppb_find_private.idl modified Wed Mar 19 13:42:13 2014. */
8 #ifndef PPAPI_C_PRIVATE_PPB_FIND_PRIVATE_H_
9 #define PPAPI_C_PRIVATE_PPB_FIND_PRIVATE_H_
11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_macros.h"
14 #include "ppapi/c/pp_point.h"
15 #include "ppapi/c/pp_rect.h"
16 #include "ppapi/c/pp_size.h"
17 #include "ppapi/c/pp_stdint.h"
19 #define PPB_FIND_PRIVATE_INTERFACE_0_3 "PPB_Find_Private;0.3"
20 #define PPB_FIND_PRIVATE_INTERFACE PPB_FIND_PRIVATE_INTERFACE_0_3
24 * This file defines the <code>PPB_Find_Private</code> interface.
29 * @addtogroup Interfaces
33 * This is a private interface for doing browser Find in the PDF plugin.
35 struct PPB_Find_Private_0_3
{
37 * Sets the instance of this plugin as the mechanism that will be used to
38 * handle find requests in the renderer. This will only succeed if the plugin
39 * is embedded within the content of the top level frame. Note that this will
40 * result in the renderer handing over all responsibility for doing find to
41 * the plugin and content from the rest of the page will not be searched.
44 * In the case that the plugin is loaded directly as the top level document,
45 * this function does not need to be called. In that case the plugin is
46 * assumed to handle find requests.
48 * There can only be one plugin which handles find requests. If a plugin calls
49 * this while an existing plugin is registered, the existing plugin will be
50 * de-registered and will no longer receive any requests.
52 void (*SetPluginToHandleFindRequests
)(PP_Instance instance
);
54 * Updates the number of find results for the current search term. If
55 * there are no matches 0 should be passed in. Only when the plugin has
56 * finished searching should it pass in the final count with final_result set
59 void (*NumberOfFindResultsChanged
)(PP_Instance instance
,
61 PP_Bool final_result
);
63 * Updates the index of the currently selected search item.
65 void (*SelectedFindResultChanged
)(PP_Instance instance
, int32_t index
);
67 * Updates the tickmarks on the scrollbar for the find request. |tickmarks|
68 * contains |count| PP_Rects indicating the tickmark ranges.
70 void (*SetTickmarks
)(PP_Instance instance
,
71 const struct PP_Rect tickmarks
[],
75 typedef struct PPB_Find_Private_0_3 PPB_Find_Private
;
80 #endif /* PPAPI_C_PRIVATE_PPB_FIND_PRIVATE_H_ */