Browse Source

delegate GdkEvent object

PHP-GTK3
yggverse 5 months ago
parent
commit
3334d40975
  1. 18
      src/Abstract/Entity/Entry.php
  2. 6
      src/Entity/Browser/Container/Page/Navbar/Request.php
  3. 6
      src/Entity/Browser/Container/Page/Response/Query.php
  4. 6
      src/Entity/Browser/History/Container/Navbar/Filter.php

18
src/Abstract/Entity/Entry.php

@ -40,10 +40,12 @@ abstract class Entry @@ -40,10 +40,12 @@ abstract class Entry
$this->gtk->connect(
'activate',
function(
\GtkEntry $entry
\GtkEntry $entry,
\GdkEvent $event
) {
$this->_onActivate(
$entry
$entry,
$event
);
}
);
@ -75,17 +77,20 @@ abstract class Entry @@ -75,17 +77,20 @@ abstract class Entry
$this->gtk->connect(
'focus-out-event',
function (
\GtkEntry $entry
\GtkEntry $entry,
\GdkEvent $event
) {
$this->_onFocusOut(
$entry
$entry,
$event
);
}
);
}
abstract protected function _onActivate(
\GtkEntry $entry
\GtkEntry $entry,
\GdkEvent $event
): void;
abstract protected function _onKeyRelease(
@ -98,7 +103,8 @@ abstract class Entry @@ -98,7 +103,8 @@ abstract class Entry
): void;
abstract protected function _onFocusOut(
\GtkEntry $entry
\GtkEntry $entry,
\GdkEvent $event
): void;
public function setLength(

6
src/Entity/Browser/Container/Page/Navbar/Request.php

@ -11,7 +11,8 @@ class Request extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Page\Navb @@ -11,7 +11,8 @@ class Request extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Page\Navb
private ?int $_changed = null;
protected function _onActivate(
\GtkEntry $entry
\GtkEntry $entry,
\GdkEvent $event
): void
{
$this->navbar->page->open(
@ -58,7 +59,8 @@ class Request extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Page\Navb @@ -58,7 +59,8 @@ class Request extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Page\Navb
}
protected function _onFocusOut(
\GtkEntry $entry
\GtkEntry $entry,
\GdkEvent $event
): void
{}
}

6
src/Entity/Browser/Container/Page/Response/Query.php

@ -22,7 +22,8 @@ class Query extends \Yggverse\Yoda\Abstract\Entity\Entry @@ -22,7 +22,8 @@ class Query extends \Yggverse\Yoda\Abstract\Entity\Entry
}
protected function _onActivate(
\GtkEntry $entry
\GtkEntry $entry,
\GdkEvent $event
): void
{
$this->response->send();
@ -42,7 +43,8 @@ class Query extends \Yggverse\Yoda\Abstract\Entity\Entry @@ -42,7 +43,8 @@ class Query extends \Yggverse\Yoda\Abstract\Entity\Entry
{}
protected function _onFocusOut(
\GtkEntry $entry
\GtkEntry $entry,
\GdkEvent $event
): void
{}

6
src/Entity/Browser/History/Container/Navbar/Filter.php

@ -9,7 +9,8 @@ class Filter extends \Yggverse\Yoda\Abstract\Entity\Browser\History\Container\Na @@ -9,7 +9,8 @@ class Filter extends \Yggverse\Yoda\Abstract\Entity\Browser\History\Container\Na
protected string $_placeholder = 'Search in history...';
protected function _onActivate(
\GtkEntry $entry
\GtkEntry $entry,
\GdkEvent $event
): void
{
$this->navbar->container->content->search(
@ -33,7 +34,8 @@ class Filter extends \Yggverse\Yoda\Abstract\Entity\Browser\History\Container\Na @@ -33,7 +34,8 @@ class Filter extends \Yggverse\Yoda\Abstract\Entity\Browser\History\Container\Na
{}
protected function _onFocusOut(
\GtkEntry $entry
\GtkEntry $entry,
\GdkEvent $event
): void
{}
}
Loading…
Cancel
Save