2024-09-18 20:33:29 +03:00
|
|
|
#[path = "browser/header.rs"] mod header;
|
|
|
|
#[path = "browser/main.rs"] mod main;
|
|
|
|
|
|
|
|
use gtk::{Application, ApplicationWindow};
|
|
|
|
|
2024-09-19 00:34:46 +03:00
|
|
|
pub fn new(
|
2024-09-19 00:37:54 +03:00
|
|
|
app: &Application,
|
|
|
|
width: i32,
|
|
|
|
height: i32
|
2024-09-19 00:34:46 +03:00
|
|
|
) -> ApplicationWindow
|
2024-09-18 20:33:29 +03:00
|
|
|
{
|
2024-09-19 00:34:46 +03:00
|
|
|
return ApplicationWindow::builder()
|
|
|
|
|
|
|
|
// Relate
|
|
|
|
.application(
|
|
|
|
app
|
|
|
|
)
|
|
|
|
|
|
|
|
// Tuneup
|
|
|
|
.default_width(
|
|
|
|
width
|
|
|
|
)
|
|
|
|
|
|
|
|
.default_height(
|
|
|
|
height
|
|
|
|
)
|
|
|
|
|
|
|
|
// Init components
|
|
|
|
.titlebar(
|
|
|
|
&header::new()
|
|
|
|
)
|
|
|
|
|
|
|
|
.child(
|
|
|
|
&main::new()
|
|
|
|
)
|
|
|
|
|
|
|
|
// Make
|
|
|
|
.build();
|
2024-09-18 20:33:29 +03:00
|
|
|
}
|