Răsfoiți Sursa

refactors of iZpl. and some tries to squish bugs

LH 10 ani în urmă
părinte
comite
d327a22929

+ 3 - 3
iZpl/plugin.yml.template

@@ -1,8 +1,8 @@
 pluginbaseclass: path.to.class
 supportedoses:
-  -windows
+  - 'windows'
 # can be windows, mac or linux
 supportedarchitectures:
-  -'x86'
-  -'x64'
+  - 'x86'
+  - 'x64'
 # x86 or x64 valid

+ 17 - 2
iZpl/src/main/java/de/nplusc/izc/iZpl/API/IZPLApi.java

@@ -61,6 +61,11 @@ public class IZPLApi
     {
         return Main.getSelectedPlaybackPlugin();
     }
+    
+    /**
+     * Obtains the currently active UI-Module
+     * @return the active UI-Module
+     */
     public static UIPlugin getUIPlugin()
     {
         return Main.getSelectedUIPlugin();
@@ -83,16 +88,26 @@ public class IZPLApi
     private IZPLApi()
     {
     }
-    
+    /**
+     *  Obtains the List of the currently registered UI-Modules
+     * @return the list of the registered UIs
+     */
     public static List<UIPlugin> getDetectedUIPlugins()
     {
         return Main.getRegisteredUIs();
     }
-    
+    /**
+     * Obtains the List of the currently registered Playback-Backends
+     * @return List with the detected Backends
+     */
     public static List<PlaybackPlugin> getDetectedPlaybackPlugins()
     {
         return Main.getRegisteredPlayBackAdapters();
     }
+    /**
+     * Obtains the list of the currently detected skins
+     * @return List of the names of the registered Skins
+     */
     public static List<String> getAvailableSkins()
     {
         return Main.getDetectedSkins();

+ 16 - 0
iZpl/src/main/java/de/nplusc/izc/iZpl/API/NullUIPlugin.java

@@ -0,0 +1,16 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package de.nplusc.izc.iZpl.API;
+
+/**
+ * Provides a UI that only conists out of the Playlist managment. Use when you want to use the native Media player UI for playback control
+ * @author iZc <nplusc.de>
+ */
+public interface NullUIPlugin extends UIPlugin
+{
+    
+}

+ 3 - 7
iZpl/src/main/java/de/nplusc/izc/iZpl/GUI/IZPlGuiCommon.java → iZpl/src/main/java/de/nplusc/izc/iZpl/API/SkinnableUIPlugin.java

@@ -4,17 +4,13 @@
  * and open the template in the editor.
  */
 
-package de.nplusc.izc.iZpl.GUI;
-
-import de.nplusc.izc.iZpl.API.UIPlugin;
-import java.awt.Image;
+package de.nplusc.izc.iZpl.API;
 
 /**
  *
  * @author iZc <nplusc.de>
  */
-public interface IZPlGuiCommon extends UIPlugin
+public interface SkinnableUIPlugin extends UIPlugin
 {
-    
-
+    public boolean isSkinCompatible(String skinName);
 }

+ 2 - 2
iZpl/src/main/java/de/nplusc/izc/iZpl/GUI/IZplGUIDefault.java

@@ -6,7 +6,7 @@ package de.nplusc.izc.iZpl.GUI;
 
 import de.nplusc.izc.iZpl.API.IZPLApi;
 import de.nplusc.izc.iZpl.API.PlaybackPlugin;
-import de.nplusc.izc.iZpl.Main;
+import de.nplusc.izc.iZpl.API.UIPlugin;
 import java.awt.EventQueue;
 import java.awt.Image;
 import java.awt.event.ActionEvent;
@@ -25,7 +25,7 @@ import javax.swing.KeyStroke;
  *
  * @author LH
  */
-public class IZplGUIDefault extends javax.swing.JFrame implements IZPlGuiCommon,MouseListener
+public class IZplGUIDefault extends javax.swing.JFrame implements UIPlugin,MouseListener
 {
 
     /**

+ 11 - 2
iZpl/src/main/java/de/nplusc/izc/iZpl/GUI/IZplGUISkinnable.java

@@ -7,6 +7,7 @@ package de.nplusc.izc.iZpl.GUI;
 import com.sun.awt.AWTUtilities;
 import de.nplusc.izc.iZpl.API.IZPLApi;
 import de.nplusc.izc.iZpl.API.PlaybackPlugin;
+import de.nplusc.izc.iZpl.API.SkinnableUIPlugin;
 import de.nplusc.izc.tools.UiToolz.ComponentMover;
 import de.nplusc.izc.tools.UiToolz.HoloJPanel;
 import de.nplusc.izc.tools.UiToolz.HoloSliderUi;
@@ -47,7 +48,7 @@ import org.yaml.snakeyaml.Yaml;
  *
  * @author LH
  */
-public class IZplGUISkinnable extends JFrame implements IZPlGuiCommon, MouseListener, MouseMotionListener
+public class IZplGUISkinnable extends JFrame implements SkinnableUIPlugin, MouseListener, MouseMotionListener
 {
     private boolean initialized;
     public static final int BUTTON_NONE_ID = 0;
@@ -231,6 +232,7 @@ public class IZplGUISkinnable extends JFrame implements IZPlGuiCommon, MouseList
                 selectedPlaybackPlugin.connectToPlayer();
                 selectedPlaybackPlugin.skipTitle();
                 connected = true;
+                seekBar.setVisible(true);//fickdich
             }
             if (playing)
             {
@@ -747,5 +749,12 @@ public class IZplGUISkinnable extends JFrame implements IZPlGuiCommon, MouseList
     @Override
     public void prepareUpgrade()
     {
-    };
+    }
+    
+    
+    @Override
+    public boolean isSkinCompatible(String skinName)
+    {
+        return true;
+    }
 }

+ 1 - 0
iZplPlugins/WMP/.gitignore

@@ -0,0 +1 @@
+auxy

+ 9 - 0
iZplPlugins/WMP/build.gradle

@@ -0,0 +1,9 @@
+apply plugin:'java'
+
+
+dependencies
+{
+	compile fileTree(dir: 'lib', include: '*.jar')
+	compile(project(':iZpl'))
+}
+

+ 99 - 0
iZplPlugins/WMP/src/main/java/de/nplusc/izpl/plugins/wmp/WMPNAtive.java

@@ -0,0 +1,99 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package de.nplusc.izpl.plugins.wmp;
+
+import de.nplusc.izc.iZpl.API.PlayListItem;
+import de.nplusc.izc.iZpl.API.PlaybackPlugin;
+import java.io.File;
+import org.eclipse.swt.layout.*;
+import org.eclipse.swt.*;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.swt.ole.win32.*; 
+/**
+ *
+ * @author iZc <nplusc.de>
+ */
+public class WMPNAtive implements PlaybackPlugin
+{
+    
+    
+    
+    
+    
+    @Override
+    public void setTitleToPlay(PlayListItem i)
+    {
+        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+    }
+
+    @Override
+    public int getLengthInSeconds()
+    {
+        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+    }
+
+    @Override
+    public int getPosition()
+    {
+        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+    }
+
+    @Override
+    public void seek(int sekunde)
+    {
+        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+    }
+
+    @Override
+    public void skipTitle()
+    {
+        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+    }
+
+    @Override
+    public void play()
+    {
+        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+    }
+
+    @Override
+    public void pause()
+    {
+        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+    }
+
+    @Override
+    public PlayListItem getCurrentTitle()
+    {
+        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+    }
+
+    @Override
+    public void connectToPlayer()
+    {
+        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+    }
+
+    @Override
+    public String getPluginName()
+    {
+        return "WMP ActiveX Interface";
+    }
+
+    @Override
+    public void initializePlugin()
+    {
+        //TODO EXTRACT NATIVES
+    }
+
+    @Override
+    public void prepareUpgrade()
+    {
+        //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+    }
+    
+}

+ 1 - 1
settings.gradle

@@ -1 +1 @@
-include 'ToolKit','iZpl',  'izsetup','WPCMgr','UpidTK', 'izstreamer', 'LogBlockHeatMapper','DefaultUIFile','iZlaunch','iZpaqSFX','MazeViewer','TWPUtil'
+include 'ToolKit','iZpl',  'izsetup','WPCMgr','UpidTK', 'izstreamer', 'LogBlockHeatMapper','DefaultUIFile','iZlaunch','iZpaqSFX','MazeViewer','TWPUtil',":iZplPlugins:WMP"