@@ -7,7 +7,7 @@ use fltk::{
77 window,
88} ;
99use fltk_webview_sys as wv;
10- use std:: { os :: raw , sync:: Arc } ;
10+ use std:: sync:: Arc ;
1111pub use wv:: SizeHint ;
1212pub use wv:: Webview ;
1313
@@ -33,21 +33,12 @@ impl FromFltkWindow for Webview {
3333 extern "system" {
3434 pub fn SetFocus ( child : * mut ( ) ) -> * mut ( ) ;
3535 pub fn CoInitializeEx ( pvReserved : * mut ( ) , dwCoInit : u32 ) -> i32 ;
36- pub fn SendMessageW (
37- hwnd : * mut ( ) ,
38- msg : u32 ,
39- wparam : usize ,
40- lparam : isize ,
41- ) -> isize ;
42- }
43- const COINIT_APARTMENTTHREADED : u32 = 0x2 ;
44- const WM_SIZE : u32 = 0x0005 ;
45- CoInitializeEx ( std:: ptr:: null_mut ( ) , COINIT_APARTMENTTHREADED ) ;
46- inner = wv:: webview_create ( debug as i32 , std:: ptr:: null_mut ( ) ) ;
47- wv:: webview_set_size ( inner, win. w ( ) , win. h ( ) , 3 ) ;
48- let wv_hwnd = wv:: webview_get_window ( inner) ;
49- // Manually set the webview window as a child and position it
50- extern "system" {
36+ // pub fn SendMessageW(
37+ // hwnd: *mut (),
38+ // msg: u32,
39+ // wparam: usize,
40+ // lparam: isize,
41+ // ) -> isize;
5142 pub fn SetParent ( child : * mut ( ) , parent : * mut ( ) ) -> * mut ( ) ;
5243 pub fn SetWindowPos (
5344 hwnd : * mut ( ) ,
@@ -58,9 +49,16 @@ impl FromFltkWindow for Webview {
5849 cy : i32 ,
5950 flags : u32 ,
6051 ) -> i32 ;
61- pub fn GetWindowLongW ( hwnd : * mut ( ) , index : i32 ) -> i32 ;
52+ // pub fn GetWindowLongW(hwnd: *mut (), index: i32) -> i32;
6253 pub fn SetWindowLongW ( hwnd : * mut ( ) , index : i32 , new_long : i32 ) -> i32 ;
6354 }
55+ const COINIT_APARTMENTTHREADED : u32 = 0x2 ;
56+ // const WM_SIZE: u32 = 0x0005;
57+ CoInitializeEx ( std:: ptr:: null_mut ( ) , COINIT_APARTMENTTHREADED ) ;
58+ inner = wv:: webview_create ( debug as i32 , std:: ptr:: null_mut ( ) ) ;
59+ wv:: webview_set_size ( inner, win. w ( ) , win. h ( ) , 3 ) ;
60+ let wv_hwnd = wv:: webview_get_window ( inner) ;
61+ // Manually set the webview window as a child and position it
6462 const GWL_STYLE : i32 = -16 ;
6563 const WS_CHILD : i32 = 0x40000000 ;
6664 const WS_VISIBLE : i32 = 0x10000000 ;
0 commit comments