File tree Expand file tree Collapse file tree 4 files changed +49
-11
lines changed Expand file tree Collapse file tree 4 files changed +49
-11
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Native \Laravel \Events \MenuBar ;
4+
5+ use Illuminate \Broadcasting \Channel ;
6+ use Illuminate \Broadcasting \InteractsWithSockets ;
7+ use Illuminate \Contracts \Broadcasting \ShouldBroadcastNow ;
8+ use Illuminate \Foundation \Events \Dispatchable ;
9+ use Illuminate \Queue \SerializesModels ;
10+
11+ class MenuBarClicked implements ShouldBroadcastNow
12+ {
13+ use Dispatchable, InteractsWithSockets, SerializesModels;
14+
15+ public function __construct (public array $ combo , public array $ bounds , public array $ position ) {}
16+
17+ public function broadcastOn ()
18+ {
19+ return [
20+ new Channel ('nativephp ' ),
21+ ];
22+ }
23+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Native \Laravel \Events \MenuBar ;
4+
5+ use Illuminate \Broadcasting \Channel ;
6+ use Illuminate \Broadcasting \InteractsWithSockets ;
7+ use Illuminate \Contracts \Broadcasting \ShouldBroadcastNow ;
8+ use Illuminate \Foundation \Events \Dispatchable ;
9+ use Illuminate \Queue \SerializesModels ;
10+
11+ class MenuBarDoubleClicked implements ShouldBroadcastNow
12+ {
13+ use Dispatchable, InteractsWithSockets, SerializesModels;
14+
15+ public function __construct (public array $ combo , public array $ bounds ) {}
16+
17+ public function broadcastOn ()
18+ {
19+ return [
20+ new Channel ('nativephp ' ),
21+ ];
22+ }
23+ }
Original file line number Diff line number Diff line change 88use Illuminate \Foundation \Events \Dispatchable ;
99use Illuminate \Queue \SerializesModels ;
1010
11- class MenuBarContextMenuOpened implements ShouldBroadcastNow
11+ class MenuBarRightClicked implements ShouldBroadcastNow
1212{
1313 use Dispatchable, InteractsWithSockets, SerializesModels;
1414
15+ public function __construct (public array $ combo , public array $ bounds ) {}
16+
1517 public function broadcastOn ()
1618 {
1719 return [
Original file line number Diff line number Diff line change @@ -30,8 +30,6 @@ class MenuBar
3030
3131 protected bool $ alwaysOnTop = false ;
3232
33- protected ?string $ event = null ;
34-
3533 protected bool $ showDockIcon = false ;
3634
3735 protected Client $ client ;
@@ -97,13 +95,6 @@ public function alwaysOnTop($alwaysOnTop = true): self
9795 return $ this ;
9896 }
9997
100- public function event (string $ event ): self
101- {
102- $ this ->event = $ event ;
103-
104- return $ this ;
105- }
106-
10798 public function withContextMenu (Menu $ menu ): self
10899 {
109100 $ this ->contextMenu = $ menu ;
@@ -131,7 +122,6 @@ public function toArray(): array
131122 'onlyShowContextMenu ' => $ this ->onlyShowContextMenu ,
132123 'contextMenu ' => ! is_null ($ this ->contextMenu ) ? $ this ->contextMenu ->toArray ()['submenu ' ] : null ,
133124 'alwaysOnTop ' => $ this ->alwaysOnTop ,
134- 'event ' => $ this ->event ,
135125 ];
136126 }
137127}
You can’t perform that action at this time.
0 commit comments