Skip to content
Merged
Show file tree
Hide file tree
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
23 changes: 23 additions & 0 deletions src/Events/MenuBar/MenuBarClicked.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace Native\Laravel\Events\MenuBar;

use Illuminate\Broadcasting\Channel;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;

class MenuBarClicked implements ShouldBroadcastNow
{
use Dispatchable, InteractsWithSockets, SerializesModels;

public function __construct(public array $combo, public array $bounds, public array $position) {}

public function broadcastOn()
{
return [
new Channel('nativephp'),
];
}
}
23 changes: 23 additions & 0 deletions src/Events/MenuBar/MenuBarDoubleClicked.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace Native\Laravel\Events\MenuBar;

use Illuminate\Broadcasting\Channel;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;

class MenuBarDoubleClicked implements ShouldBroadcastNow
{
use Dispatchable, InteractsWithSockets, SerializesModels;

public function __construct(public array $combo, public array $bounds) {}

public function broadcastOn()
{
return [
new Channel('nativephp'),
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;

class MenuBarContextMenuOpened implements ShouldBroadcastNow
class MenuBarRightClicked implements ShouldBroadcastNow
{
use Dispatchable, InteractsWithSockets, SerializesModels;

public function __construct(public array $combo, public array $bounds) {}

public function broadcastOn()
{
return [
Expand Down
10 changes: 0 additions & 10 deletions src/MenuBar/MenuBar.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ class MenuBar

protected bool $alwaysOnTop = false;

protected ?string $event = null;

protected bool $showDockIcon = false;

protected Client $client;
Expand Down Expand Up @@ -97,13 +95,6 @@ public function alwaysOnTop($alwaysOnTop = true): self
return $this;
}

public function event(string $event): self
{
$this->event = $event;

return $this;
}

public function withContextMenu(Menu $menu): self
{
$this->contextMenu = $menu;
Expand Down Expand Up @@ -131,7 +122,6 @@ public function toArray(): array
'onlyShowContextMenu' => $this->onlyShowContextMenu,
'contextMenu' => ! is_null($this->contextMenu) ? $this->contextMenu->toArray()['submenu'] : null,
'alwaysOnTop' => $this->alwaysOnTop,
'event' => $this->event,
];
}
}
Loading