github.com/ckxng/wakeup@v0.0.0-20190105202853-90356a5f5a15/include/capi/cef_frame_capi.h (about) 1 // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. 2 // 3 // Redistribution and use in source and binary forms, with or without 4 // modification, are permitted provided that the following conditions are 5 // met: 6 // 7 // * Redistributions of source code must retain the above copyright 8 // notice, this list of conditions and the following disclaimer. 9 // * Redistributions in binary form must reproduce the above 10 // copyright notice, this list of conditions and the following disclaimer 11 // in the documentation and/or other materials provided with the 12 // distribution. 13 // * Neither the name of Google Inc. nor the name Chromium Embedded 14 // Framework nor the names of its contributors may be used to endorse 15 // or promote products derived from this software without specific prior 16 // written permission. 17 // 18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 // 30 // --------------------------------------------------------------------------- 31 // 32 // This file was generated by the CEF translator tool and should not edited 33 // by hand. See the translator.README.txt file in the tools directory for 34 // more information. 35 // 36 37 #ifndef CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_ 38 #define CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_ 39 #pragma once 40 41 #ifdef __cplusplus 42 extern "C" { 43 #endif 44 45 #include "include/capi/cef_base_capi.h" 46 #include "include/capi/cef_dom_capi.h" 47 #include "include/capi/cef_request_capi.h" 48 #include "include/capi/cef_stream_capi.h" 49 #include "include/capi/cef_string_visitor_capi.h" 50 51 struct _cef_browser_t; 52 struct _cef_v8context_t; 53 54 /// 55 // Structure used to represent a frame in the browser window. When used in the 56 // browser process the functions of this structure may be called on any thread 57 // unless otherwise indicated in the comments. When used in the render process 58 // the functions of this structure may only be called on the main thread. 59 /// 60 typedef struct _cef_frame_t { 61 /// 62 // Base structure. 63 /// 64 cef_base_t base; 65 66 /// 67 // True if this object is currently attached to a valid frame. 68 /// 69 int (CEF_CALLBACK *is_valid)(struct _cef_frame_t* self); 70 71 /// 72 // Execute undo in this frame. 73 /// 74 void (CEF_CALLBACK *undo)(struct _cef_frame_t* self); 75 76 /// 77 // Execute redo in this frame. 78 /// 79 void (CEF_CALLBACK *redo)(struct _cef_frame_t* self); 80 81 /// 82 // Execute cut in this frame. 83 /// 84 void (CEF_CALLBACK *cut)(struct _cef_frame_t* self); 85 86 /// 87 // Execute copy in this frame. 88 /// 89 void (CEF_CALLBACK *copy)(struct _cef_frame_t* self); 90 91 /// 92 // Execute paste in this frame. 93 /// 94 void (CEF_CALLBACK *paste)(struct _cef_frame_t* self); 95 96 /// 97 // Execute delete in this frame. 98 /// 99 void (CEF_CALLBACK *del)(struct _cef_frame_t* self); 100 101 /// 102 // Execute select all in this frame. 103 /// 104 void (CEF_CALLBACK *select_all)(struct _cef_frame_t* self); 105 106 /// 107 // Save this frame's HTML source to a temporary file and open it in the 108 // default text viewing application. This function can only be called from the 109 // browser process. 110 /// 111 void (CEF_CALLBACK *view_source)(struct _cef_frame_t* self); 112 113 /// 114 // Retrieve this frame's HTML source as a string sent to the specified 115 // visitor. 116 /// 117 void (CEF_CALLBACK *get_source)(struct _cef_frame_t* self, 118 struct _cef_string_visitor_t* visitor); 119 120 /// 121 // Retrieve this frame's display text as a string sent to the specified 122 // visitor. 123 /// 124 void (CEF_CALLBACK *get_text)(struct _cef_frame_t* self, 125 struct _cef_string_visitor_t* visitor); 126 127 /// 128 // Load the request represented by the |request| object. 129 /// 130 void (CEF_CALLBACK *load_request)(struct _cef_frame_t* self, 131 struct _cef_request_t* request); 132 133 /// 134 // Load the specified |url|. 135 /// 136 void (CEF_CALLBACK *load_url)(struct _cef_frame_t* self, 137 const cef_string_t* url); 138 139 /// 140 // Load the contents of |string_val| with the specified dummy |url|. |url| 141 // should have a standard scheme (for example, http scheme) or behaviors like 142 // link clicks and web security restrictions may not behave as expected. 143 /// 144 void (CEF_CALLBACK *load_string)(struct _cef_frame_t* self, 145 const cef_string_t* string_val, const cef_string_t* url); 146 147 /// 148 // Execute a string of JavaScript code in this frame. The |script_url| 149 // parameter is the URL where the script in question can be found, if any. The 150 // renderer may request this URL to show the developer the source of the 151 // error. The |start_line| parameter is the base line number to use for error 152 // reporting. 153 /// 154 void (CEF_CALLBACK *execute_java_script)(struct _cef_frame_t* self, 155 const cef_string_t* code, const cef_string_t* script_url, 156 int start_line); 157 158 /// 159 // Returns true (1) if this is the main (top-level) frame. 160 /// 161 int (CEF_CALLBACK *is_main)(struct _cef_frame_t* self); 162 163 /// 164 // Returns true (1) if this is the focused frame. 165 /// 166 int (CEF_CALLBACK *is_focused)(struct _cef_frame_t* self); 167 168 /// 169 // Returns the name for this frame. If the frame has an assigned name (for 170 // example, set via the iframe "name" attribute) then that value will be 171 // returned. Otherwise a unique name will be constructed based on the frame 172 // parent hierarchy. The main (top-level) frame will always have an NULL name 173 // value. 174 /// 175 // The resulting string must be freed by calling cef_string_userfree_free(). 176 cef_string_userfree_t (CEF_CALLBACK *get_name)(struct _cef_frame_t* self); 177 178 /// 179 // Returns the globally unique identifier for this frame. 180 /// 181 int64 (CEF_CALLBACK *get_identifier)(struct _cef_frame_t* self); 182 183 /// 184 // Returns the parent of this frame or NULL if this is the main (top-level) 185 // frame. 186 /// 187 struct _cef_frame_t* (CEF_CALLBACK *get_parent)(struct _cef_frame_t* self); 188 189 /// 190 // Returns the URL currently loaded in this frame. 191 /// 192 // The resulting string must be freed by calling cef_string_userfree_free(). 193 cef_string_userfree_t (CEF_CALLBACK *get_url)(struct _cef_frame_t* self); 194 195 /// 196 // Returns the browser that this frame belongs to. 197 /// 198 struct _cef_browser_t* (CEF_CALLBACK *get_browser)(struct _cef_frame_t* self); 199 200 /// 201 // Get the V8 context associated with the frame. This function can only be 202 // called from the render process. 203 /// 204 struct _cef_v8context_t* (CEF_CALLBACK *get_v8context)( 205 struct _cef_frame_t* self); 206 207 /// 208 // Visit the DOM document. This function can only be called from the render 209 // process. 210 /// 211 void (CEF_CALLBACK *visit_dom)(struct _cef_frame_t* self, 212 struct _cef_domvisitor_t* visitor); 213 } cef_frame_t; 214 215 216 #ifdef __cplusplus 217 } 218 #endif 219 220 #endif // CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_