github.com/ckxng/wakeup@v0.0.0-20190105202853-90356a5f5a15/include/internal/cef_types_mac.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 #ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_MAC_H_ 32 #define CEF_INCLUDE_INTERNAL_CEF_TYPES_MAC_H_ 33 #pragma once 34 35 #include "include/internal/cef_build.h" 36 37 #if defined(OS_MACOSX) 38 #include "include/internal/cef_string.h" 39 40 // Handle types. 41 #ifdef __cplusplus 42 #ifdef __OBJC__ 43 @class NSCursor; 44 @class NSEvent; 45 @class NSView; 46 @class NSTextInputContext; 47 #else 48 class NSCursor; 49 class NSEvent; 50 struct NSView; 51 class NSTextInputContext; 52 #endif 53 #define cef_cursor_handle_t NSCursor* 54 #define cef_event_handle_t NSEvent* 55 #define cef_window_handle_t NSView* 56 #define cef_text_input_context_t NSTextInputContext* 57 #else 58 #define cef_cursor_handle_t void* 59 #define cef_event_handle_t void* 60 #define cef_window_handle_t void* 61 #define cef_text_input_context_t void* 62 #endif 63 64 #ifdef __cplusplus 65 extern "C" { 66 #endif 67 68 /// 69 // Structure representing CefExecuteProcess arguments. 70 /// 71 typedef struct _cef_main_args_t { 72 int argc; 73 char** argv; 74 } cef_main_args_t; 75 76 /// 77 // Class representing window information. 78 /// 79 typedef struct _cef_window_info_t { 80 cef_string_t window_name; 81 int x; 82 int y; 83 int width; 84 int height; 85 int hidden; 86 87 // NSView pointer for the parent view. 88 cef_window_handle_t parent_view; 89 90 // If window rendering is disabled no browser window will be created. Set 91 // |parent_view| to the window that will act as the parent for popup menus, 92 // dialog boxes, etc. 93 int window_rendering_disabled; 94 95 // Set to true to enable transparent painting. 96 int transparent_painting; 97 98 // NSView pointer for the new browser view. 99 cef_window_handle_t view; 100 } cef_window_info_t; 101 102 #ifdef __cplusplus 103 } 104 #endif 105 106 #endif // OS_MACOSX 107 108 #endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_MAC_H_