Skip to content

Commit 057de8e

Browse files
committed
Update, add hotkeys, video player.
1 parent ac1e5f3 commit 057de8e

File tree

44 files changed

+945
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+945
-18
lines changed

build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,13 @@ project(':jphp-game-ext') {
174174
}
175175
}
176176

177+
project(':jphp-desktop-hotkey-ext') {
178+
dependencies {
179+
compile "org.develnext.jphp:jphp-runtime:$jphpVersion"
180+
compile fileTree(dir: 'lib', include: ['*.jar'])
181+
}
182+
}
183+
177184
project(':jphp-systemtray-ext') {
178185
dependencies {
179186
compile (project(':jphp-gui-ext')) {
@@ -237,6 +244,7 @@ project(':develnext') {
237244
provided project(':develnext-bundles/dn-pgsql-bundle')
238245
provided project(':develnext-bundles/dn-game2d-bundle')
239246
provided project(':develnext-bundles/dn-systemtray-bundle')
247+
provided project(':develnext-bundles/dn-hotkey-bundle')
240248
//provided project(':develnext-bundles/dn-controlfx-bundle')
241249

242250
// stubs.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name=Hot Key
2+
description=Пакет для добавления системных горячих клавиш (hotkey).
3+
descriptionFile=develnext/bundle/hotkey/description.html
4+
group=system
5+
icon=develnext/bundle/hotkey/hotkey48.png
6+
7+
class=develnext\\bundle\\hotkey\\HotKeyBundle
8+
author=DevelNext
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
project.version = ''
3+
4+
repositories {
5+
mavenLocal()
6+
jcenter()
7+
mavenCentral()
8+
}
9+
10+
sourceSets {
11+
main.resources.srcDirs = ['src']
12+
}
13+
14+
dependencies {
15+
compile project(':jphp-desktop-hotkey-ext')
16+
}
529 Bytes
Loading
578 Bytes
Loading
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
develnext\bundle\mail\MailBundle
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
namespace develnext\bundle\hotkey;
3+
4+
use develnext\bundle\hotkey\components\HotKeyComponent;
5+
use ide\bundle\AbstractBundle;
6+
use ide\bundle\AbstractJarBundle;
7+
use ide\formats\ScriptModuleFormat;
8+
use ide\Ide;
9+
use ide\project\behaviours\GuiFrameworkProjectBehaviour;
10+
use ide\project\Project;
11+
use php\lib\fs;
12+
13+
class HotKeyBundle extends AbstractJarBundle
14+
{
15+
function getName()
16+
{
17+
return "HotKey";
18+
}
19+
20+
function getDescription()
21+
{
22+
return "";
23+
}
24+
25+
public function isAvailable(Project $project)
26+
{
27+
return $project->hasBehaviour(GuiFrameworkProjectBehaviour::class);
28+
}
29+
30+
public function onAdd(Project $project, AbstractBundle $owner = null)
31+
{
32+
parent::onAdd($project, $owner);
33+
34+
$format = Ide::get()->getRegisteredFormat(ScriptModuleFormat::class);
35+
36+
if ($format) {
37+
$format->register(new HotKeyComponent());
38+
}
39+
}
40+
41+
public function onRemove(Project $project, AbstractBundle $owner = null)
42+
{
43+
parent::onRemove($project, $owner);
44+
45+
$format = Ide::get()->getRegisteredFormat(ScriptModuleFormat::class);
46+
47+
if ($format) {
48+
$format->unregister(new HotKeyComponent());
49+
}
50+
}
51+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?php
2+
namespace develnext\bundle\hotkey\components;
3+
4+
use ide\scripts\AbstractScriptComponent;
5+
use script\HotKeyScript;
6+
7+
class HotKeyComponent extends AbstractScriptComponent
8+
{
9+
public function isOrigin($any)
10+
{
11+
return $any instanceof HotKeyComponent;
12+
}
13+
14+
/**
15+
* @return string
16+
*/
17+
public function getName()
18+
{
19+
return 'Горачая клавиша';
20+
}
21+
22+
public function getIcon()
23+
{
24+
return 'develnext/bundle/hotkey/hotkey16.png';
25+
}
26+
27+
public function getIdPattern()
28+
{
29+
return "hotkey%s";
30+
}
31+
32+
public function getGroup()
33+
{
34+
return 'Системное';
35+
}
36+
37+
/**
38+
* @return string
39+
*/
40+
public function getType()
41+
{
42+
return HotKeyScript::class;
43+
}
44+
45+
public function getDescription()
46+
{
47+
return '';
48+
}
49+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<element extends="ide\scripts\elements\AbstractComponent">
2+
<init>
3+
<property code="key" value="" />
4+
</init>
5+
6+
<properties>
7+
<property code="key" name="Сочетание клавиш" editor="text" tooltip="Сочетание горячих клавиш, например Ctrl + Shift + K или Alt + F7" />
8+
</properties>
9+
10+
<eventTypes>
11+
<eventType code="action" name="Выполнение" kind="ObjectEvent" icon="icons/ok16.png" />
12+
</eventTypes>
13+
</element>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<ul>
2+
<li>Горячая клавиша (модульный компонент)</li>
3+
<li>php\desktop\HotKeyManager <i>(класс)</i></li>
4+
</ul>

0 commit comments

Comments
 (0)