Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ppapi / c / private / ppb_find_private.h
blob09ebab00137b480b043f734518ead6e2cb9d6141
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.
4 */
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
22 /**
23 * @file
24 * This file defines the <code>PPB_Find_Private</code> interface.
28 /**
29 * @addtogroup Interfaces
30 * @{
32 /**
33 * This is a private interface for doing browser Find in the PDF plugin.
35 struct PPB_Find_Private_0_3 {
36 /**
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);
53 /**
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
57 * to PP_TRUE.
59 void (*NumberOfFindResultsChanged)(PP_Instance instance,
60 int32_t total,
61 PP_Bool final_result);
62 /**
63 * Updates the index of the currently selected search item.
65 void (*SelectedFindResultChanged)(PP_Instance instance, int32_t index);
66 /**
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[],
72 uint32_t count);
75 typedef struct PPB_Find_Private_0_3 PPB_Find_Private;
76 /**
77 * @}
80 #endif /* PPAPI_C_PRIVATE_PPB_FIND_PRIVATE_H_ */