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 8
8
use Illuminate \Foundation \Events \Dispatchable ;
9
9
use Illuminate \Queue \SerializesModels ;
10
10
11
- class MenuBarContextMenuOpened implements ShouldBroadcastNow
11
+ class MenuBarRightClicked implements ShouldBroadcastNow
12
12
{
13
13
use Dispatchable, InteractsWithSockets, SerializesModels;
14
14
15
+ public function __construct (public array $ combo , public array $ bounds ) {}
16
+
15
17
public function broadcastOn ()
16
18
{
17
19
return [
Original file line number Diff line number Diff line change @@ -30,8 +30,6 @@ class MenuBar
30
30
31
31
protected bool $ alwaysOnTop = false ;
32
32
33
- protected ?string $ event = null ;
34
-
35
33
protected bool $ showDockIcon = false ;
36
34
37
35
protected Client $ client ;
@@ -97,13 +95,6 @@ public function alwaysOnTop($alwaysOnTop = true): self
97
95
return $ this ;
98
96
}
99
97
100
- public function event (string $ event ): self
101
- {
102
- $ this ->event = $ event ;
103
-
104
- return $ this ;
105
- }
106
-
107
98
public function withContextMenu (Menu $ menu ): self
108
99
{
109
100
$ this ->contextMenu = $ menu ;
@@ -131,7 +122,6 @@ public function toArray(): array
131
122
'onlyShowContextMenu ' => $ this ->onlyShowContextMenu ,
132
123
'contextMenu ' => ! is_null ($ this ->contextMenu ) ? $ this ->contextMenu ->toArray ()['submenu ' ] : null ,
133
124
'alwaysOnTop ' => $ this ->alwaysOnTop ,
134
- 'event ' => $ this ->event ,
135
125
];
136
126
}
137
127
}
You can’t perform that action at this time.
0 commit comments