Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 3 additions & 38 deletions src/WebView.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class WebView
{
private $ffi;
private FFI $ffi;

private $webview;

Expand Down Expand Up @@ -40,96 +40,62 @@ public function __construct(
$this->webview = $this->ffi->webview_create((int)$this->debug, null);
}

/**
* @return FFI
*/
public function getFFI(): FFI
{
return $this->ffi;
}

/**
* @return mixed
*/
public function getWebview()
public function getWebview(): mixed
{
return $this->webview;
}


/**
* @return string
*/
public function getTitle(): string
{
return $this->title;
}

/**
* @param string $title
*/
public function setTitle(string $title): self
{
$this->title = $title;

return $this;
}

/**
* @return int
*/
public function getWidth(): int
{
return $this->width;
}

/**
* @param int $width
*/
public function setWidth(int $width): self
{
$this->width = $width;

return $this;
}

/**
* @return int
*/
public function getHeight(): int
{
return $this->height;
}

/**
* @param int $height
*/
public function setHeight(int $height): void
{
$this->height = $height;
}

/**
* @return WindowSizeHint
*/
public function getHint(): WindowSizeHint
{
return $this->hint;
}

/**
* @param WindowSizeHint $hint
*/
public function setHint(WindowSizeHint $hint): self
{
$this->hint = $hint;

return $this;
}

/**
* @return bool
*/
public function isDebug(): bool
{
return $this->debug;
Expand Down Expand Up @@ -214,7 +180,6 @@ public function terminate(): self
}

/**
* @return string
* @throws OsException
*/
private function getDefaultLibraryFile(): string
Expand All @@ -233,4 +198,4 @@ private function getDefaultLibraryFile(): string

return $this->libraryFile;
}
}
}