1 // Copyright (c) 2022 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 // $hash=d5311ffa72e57d240f6963b1f45a278041bd33f4$ 37 // 38 39 #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_CAPI_H_ 40 #define CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_CAPI_H_ 41 #pragma once 42 43 #include "include/capi/views/cef_panel_delegate_capi.h" 44 #include "include/capi/views/cef_view_capi.h" 45 46 #ifdef __cplusplus 47 extern "C" { 48 #endif 49 50 struct _cef_box_layout_t; 51 struct _cef_fill_layout_t; 52 struct _cef_layout_t; 53 struct _cef_window_t; 54 55 /// 56 // A Panel is a container in the views hierarchy that can contain other Views as 57 // children. Methods must be called on the browser process UI thread unless 58 // otherwise indicated. 59 /// 60 typedef struct _cef_panel_t { 61 /// 62 // Base structure. 63 /// 64 cef_view_t base; 65 66 /// 67 // Returns this Panel as a Window or NULL if this is not a Window. 68 /// 69 struct _cef_window_t*(CEF_CALLBACK* as_window)(struct _cef_panel_t* self); 70 71 /// 72 // Set this Panel's Layout to FillLayout and return the FillLayout object. 73 /// 74 struct _cef_fill_layout_t*(CEF_CALLBACK* set_to_fill_layout)( 75 struct _cef_panel_t* self); 76 77 /// 78 // Set this Panel's Layout to BoxLayout and return the BoxLayout object. 79 /// 80 struct _cef_box_layout_t*(CEF_CALLBACK* set_to_box_layout)( 81 struct _cef_panel_t* self, 82 const struct _cef_box_layout_settings_t* settings); 83 84 /// 85 // Get the Layout. 86 /// 87 struct _cef_layout_t*(CEF_CALLBACK* get_layout)(struct _cef_panel_t* self); 88 89 /// 90 // Lay out the child Views (set their bounds based on sizing heuristics 91 // specific to the current Layout). 92 /// 93 void(CEF_CALLBACK* layout)(struct _cef_panel_t* self); 94 95 /// 96 // Add a child View. 97 /// 98 void(CEF_CALLBACK* add_child_view)(struct _cef_panel_t* self, 99 struct _cef_view_t* view); 100 101 /// 102 // Add a child View at the specified |index|. If |index| matches the result of 103 // GetChildCount() then the View will be added at the end. 104 /// 105 void(CEF_CALLBACK* add_child_view_at)(struct _cef_panel_t* self, 106 struct _cef_view_t* view, 107 int index); 108 109 /// 110 // Move the child View to the specified |index|. A negative value for |index| 111 // will move the View to the end. 112 /// 113 void(CEF_CALLBACK* reorder_child_view)(struct _cef_panel_t* self, 114 struct _cef_view_t* view, 115 int index); 116 117 /// 118 // Remove a child View. The View can then be added to another Panel. 119 /// 120 void(CEF_CALLBACK* remove_child_view)(struct _cef_panel_t* self, 121 struct _cef_view_t* view); 122 123 /// 124 // Remove all child Views. The removed Views will be deleted if the client 125 // holds no references to them. 126 /// 127 void(CEF_CALLBACK* remove_all_child_views)(struct _cef_panel_t* self); 128 129 /// 130 // Returns the number of child Views. 131 /// 132 size_t(CEF_CALLBACK* get_child_view_count)(struct _cef_panel_t* self); 133 134 /// 135 // Returns the child View at the specified |index|. 136 /// 137 struct _cef_view_t*( 138 CEF_CALLBACK* get_child_view_at)(struct _cef_panel_t* self, int index); 139 } cef_panel_t; 140 141 /// 142 // Create a new Panel. 143 /// 144 CEF_EXPORT cef_panel_t* cef_panel_create( 145 struct _cef_panel_delegate_t* delegate); 146 147 #ifdef __cplusplus 148 } 149 #endif 150 151 #endif // CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_CAPI_H_ 152