diff --git a/DMX-2.0/AlsaSeqLib.AlsaTypes.cs b/DMX-2.0/AlsaSeqLib.AlsaTypes.cs index 5c00de8..d16cbbe 100644 --- a/DMX-2.0/AlsaSeqLib.AlsaTypes.cs +++ b/DMX-2.0/AlsaSeqLib.AlsaTypes.cs @@ -19,6 +19,7 @@ namespace DMX2 public const int SND_SEQ_PORT_SYSTEM_TIMER = 0; public const int SND_SEQ_PORT_SYSTEM_ANNOUNCE = 1; public const int SND_SEQ_QUERY_SUBS_READ = 0; + public const int SND_SEQ_QUERY_SUBS_WRITE = 1; public const int SND_SEQ_PORT_TYPE_APPLICATION = (1 << 20); public const byte SND_SEQ_CLIENT_SYSTEM = 0; public const byte SND_SEQ_ADDRESS_UNKNOWN = 253; @@ -242,11 +243,15 @@ namespace DMX2 [FieldOffset(16)] public snd_seq_result_t data_result; + [FieldOffset(16)] + public snd_seq_addr_t + data_addr; } static int _clientInfoSize; static int _portInfoSize; static int _subscriberInfoSize; + static int _query_subscribeInfoSize; static int GetClientInfoSize () { @@ -271,5 +276,12 @@ namespace DMX2 } return _subscriberInfoSize; } + static int GetQuerySubscribeInfoSize () + { + if (_query_subscribeInfoSize == 0) { + _query_subscribeInfoSize = Invoke.snd_seq_query_subscribe_sizeof (); + } + return _query_subscribeInfoSize; + } } } diff --git a/DMX-2.0/AlsaSeqLib.Invoke.cs b/DMX-2.0/AlsaSeqLib.Invoke.cs index 2d45535..e00f141 100644 --- a/DMX-2.0/AlsaSeqLib.Invoke.cs +++ b/DMX-2.0/AlsaSeqLib.Invoke.cs @@ -56,9 +56,18 @@ namespace DMX2 [DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)] public static extern void snd_seq_port_info_set_client (IntPtr info, int client); + [DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)] + public static extern void snd_seq_query_subscribe_set_client (IntPtr info, int client); + [DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)] public static extern void snd_seq_port_info_set_port (IntPtr info, int val); + [DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)] + public static extern void snd_seq_query_subscribe_set_port (IntPtr info, int val); + + [DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)] + public static extern void snd_seq_query_subscribe_set_index (IntPtr info, int _index); + [DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)] public static extern int snd_seq_query_next_port (IntPtr seq, IntPtr info); @@ -72,10 +81,10 @@ namespace DMX2 public static extern IntPtr snd_seq_port_info_get_name (IntPtr info); [DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr snd_seq_get_any_client_info (IntPtr seq, int client, IntPtr info); + public static extern int snd_seq_get_any_client_info (IntPtr seq, int client, IntPtr info); [DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr snd_seq_get_any_port_info (IntPtr seq, int client, int port, IntPtr info); + public static extern int snd_seq_get_any_port_info (IntPtr seq, int client, int port, IntPtr info); [DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr snd_seq_port_info_get_addr (IntPtr info); @@ -88,6 +97,14 @@ namespace DMX2 [DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)] public static extern int snd_seq_port_subscribe_sizeof (); + [DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)] + public static extern int snd_seq_query_subscribe_sizeof (); + + [DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)] + public static extern int snd_seq_query_subscribe_get_client (IntPtr info); + [DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)] + public static extern int snd_seq_query_subscribe_get_port (IntPtr info); + [DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)] public static extern uint snd_seq_port_info_get_capability (IntPtr info); @@ -107,9 +124,6 @@ namespace DMX2 [DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)] public static extern void snd_seq_query_subscribe_set_type (IntPtr info, int type); - [DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)] - public static extern void snd_seq_query_subscribe_set_index (IntPtr info, int index); - [DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)] public static extern int snd_seq_query_subscribe_get_index (IntPtr info); diff --git a/DMX-2.0/AlsaSeqLib.Wrappers.cs b/DMX-2.0/AlsaSeqLib.Wrappers.cs index b3fe84e..5357291 100644 --- a/DMX-2.0/AlsaSeqLib.Wrappers.cs +++ b/DMX-2.0/AlsaSeqLib.Wrappers.cs @@ -69,8 +69,6 @@ namespace DMX2 } } } - - public static snd_seq_addr_t PtrToSndSeqAddr (this IntPtr ptr) { try { diff --git a/DMX-2.0/AlsaSeqLib.cs b/DMX-2.0/AlsaSeqLib.cs index 35175f3..1705b52 100644 --- a/DMX-2.0/AlsaSeqLib.cs +++ b/DMX-2.0/AlsaSeqLib.cs @@ -171,7 +171,6 @@ namespace DMX2 public static IEnumerable EnumClients () { - using (PointerWrapper clientInfo = new PointerWrapper(GetClientInfoSize())) { Invoke.snd_seq_client_info_set_client(clientInfo.Pointer, -1); while (Invoke.snd_seq_query_next_client(seq_handle.Handle,clientInfo.Pointer)>=0) { @@ -180,10 +179,40 @@ namespace DMX2 } } + public static Client GetClientByID (int client) + { + using (PointerWrapper clientInfo = new PointerWrapper(GetClientInfoSize())) { + if (Invoke.snd_seq_get_any_client_info (seq_handle.Handle, client, clientInfo.Pointer) >= 0) { + return new Client (clientInfo); + } else + return null; + } + } + + public static Port GetPortByIDs(int client,int port){ + using (PointerWrapper portInfo = new PointerWrapper(GetPortInfoSize ())) { + if(Invoke.snd_seq_get_any_port_info(seq_handle.Handle,client,port,portInfo.Pointer) >= 0) { + return new Port(portInfo); + } + else + return null; + } + } + public static bool Connect(Port port) { - // TODO : detecter le sens et se connecter au port. - return false; + bool isInput = (port.Caps & SND_SEQ_PORT_CAP_WRITE) == SND_SEQ_PORT_CAP_WRITE; + bool isOutput = (port.Caps & SND_SEQ_PORT_CAP_READ) == SND_SEQ_PORT_CAP_READ; + + if (isInput) + if (!ConnectTo (port.ClientId, port.PortId)) + return false; + + if (isOutput) + if (!ConnectFrom (port.ClientId, port.PortId)) + return false; + + return true; } public static bool ConnectTo(int client, int port){ @@ -192,6 +221,24 @@ namespace DMX2 public static bool ConnectFrom(int client, int port){ return Invoke.snd_seq_connect_from(seq_handle.Handle,inport,client,port)==0; } + + /* + public static void GetConnections() + { + using(PointerWrapper subscribeInfo = new PointerWrapper(GetQuerySubscribeInfoSize())){ + int index=0; + Invoke.snd_seq_query_subscribe_set_client (subscribeInfo.Pointer,clientId); + Invoke.snd_seq_query_subscribe_set_port (subscribeInfo.Pointer,inport); + Invoke.snd_seq_query_subscribe_set_index(subscribeInfo.Pointer,index++); + Invoke.snd_seq_query_subscribe_set_type(subscribeInfo.Pointer,SND_SEQ_QUERY_SUBS_WRITE); + + while (Invoke.snd_seq_query_port_subscribers(seq_handle.Handle,subscribeInfo.Pointer) ==0){ + + //Console.WriteLine("Remote => {0}:{1}",rclient,rport); + Invoke.snd_seq_query_subscribe_set_index(subscribeInfo.Pointer,index++); + } + } + }*/ } } diff --git a/DMX-2.0/DMX-2.0.csproj b/DMX-2.0/DMX-2.0.csproj index 7ba6048..66f0255 100644 --- a/DMX-2.0/DMX-2.0.csproj +++ b/DMX-2.0/DMX-2.0.csproj @@ -161,6 +161,8 @@ + + diff --git a/DMX-2.0/GestionMidiUI.cs b/DMX-2.0/GestionMidiUI.cs new file mode 100644 index 0000000..a239cfe --- /dev/null +++ b/DMX-2.0/GestionMidiUI.cs @@ -0,0 +1,19 @@ +using System; + +namespace DMX2 +{ + public partial class GestionMidiUI : Gtk.Dialog + { + public GestionMidiUI () + { + this.Build (); + + } + protected void OnButtonCloseClicked (object sender, EventArgs e) + { + Destroy(); + } + + } +} + diff --git a/DMX-2.0/MainWindow.cs b/DMX-2.0/MainWindow.cs index 848da74..7630a2c 100644 --- a/DMX-2.0/MainWindow.cs +++ b/DMX-2.0/MainWindow.cs @@ -683,16 +683,12 @@ namespace DMX2 dDlg = new GestionDriversUI(); dDlg.ShowAll(); - dDlg.Destroyed += dDlgDestroyed; + dDlg.Destroyed += delegate { + dDlg = null; + }; //Conduite.Courante.Drivers.Add( new DriverBoitierV1()); - - } - void dDlgDestroyed (object sender, EventArgs e) - { - dDlg= null; - } protected void OnBtnPauseToggled (object sender, EventArgs e) { @@ -749,11 +745,13 @@ namespace DMX2 protected void OnInfoActionActivated (object sender, EventArgs e) { - if(aguiprocess!=null) + /*if(aguiprocess!=null) if(!aguiprocess.HasExited) return; - aguiprocess= Process.Start("aconnectgui"); + aguiprocess= Process.Start("aconnectgui");*/ + + } protected void OnAboutActionActivated (object sender, EventArgs e) @@ -762,8 +760,25 @@ namespace DMX2 About dlg = new About(); dlg.Show(); dlg.Run (); - } + } + GestionMidiUI mDlg=null; + + + protected void OnMidiActionActivated (object sender, EventArgs e) + { + if (mDlg != null) { + mDlg.Show(); + return; + } + + mDlg = new GestionMidiUI(); + mDlg.ShowAll(); + mDlg.Destroyed += delegate { + mDlg= null; + }; + } + } } \ No newline at end of file diff --git a/DMX-2.0/MidiEventProvider.cs b/DMX-2.0/MidiEventProvider.cs index 0a6a60d..2f143ee 100644 --- a/DMX-2.0/MidiEventProvider.cs +++ b/DMX-2.0/MidiEventProvider.cs @@ -60,6 +60,7 @@ namespace DMX2 Dictionary eventlist = new Dictionary(); + List midiPortAutoConnect = new List(); EventData last; internalEvent levent=null; bool connected=false; @@ -68,14 +69,31 @@ namespace DMX2 { manager.RegisterProvider (this); AlsaSeqLib.Init (); + // Connection au port d'annonce pour detection auto + //midiPortAutoConnect.Add("System:Announce"); + AlsaSeqLib.ConnectFrom(AlsaSeqLib.SND_SEQ_CLIENT_SYSTEM, AlsaSeqLib.SND_SEQ_PORT_SYSTEM_ANNOUNCE); + foreach (var cli in AlsaSeqLib.EnumClients()) { - Console.WriteLine(cli.Name); foreach(var p in cli.Ports){ - Console.WriteLine("Port {0} - {1} => caps {2}",p.PortId,p.Name,p.Caps); + PortDetected(cli,p); } } + } + void PortDetected (AlsaSeqLib.Client cli, AlsaSeqLib.Port p) + { + // Execute a chaque 'apparition' d'un port midi + + // teste si connection auto au port et connecte si besoin + + string fullportname = cli.Name + ':' + p.Name; + Console.WriteLine(fullportname); + if(midiPortAutoConnect.Contains(fullportname)) + AlsaSeqLib.Connect(p); + } + + public void SendEvent (AlsaSeqLib.snd_seq_event_t ev) { AlsaSeqLib.SendEventToSubscribers(ev); @@ -162,13 +180,19 @@ namespace DMX2 case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_CLOCK: case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_SENSING: continue; + case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_PORT_START: + PortDetected( + AlsaSeqLib.GetClientByID(evS.data_addr.client), + AlsaSeqLib.GetPortByIDs(evS.data_addr.client,evS.data_addr.port) + ); + continue; + //TODO : Regarder si d'autres controles interessants. default: id= null; #if DEBUG Info.Publish(string.Format ("event {0}", evS.type) ); // On affiche les evenements inconnus - Console.WriteLine(string.Format ("event {0}", evS.type) ); #endif continue; } diff --git a/DMX-2.0/gtk-gui/DMX2.GestionDriversUI.cs b/DMX-2.0/gtk-gui/DMX2.GestionDriversUI.cs index 3b404ce..635eefe 100644 --- a/DMX-2.0/gtk-gui/DMX2.GestionDriversUI.cs +++ b/DMX-2.0/gtk-gui/DMX2.GestionDriversUI.cs @@ -124,7 +124,7 @@ namespace DMX2 this.Child.ShowAll (); } this.DefaultWidth = 488; - this.DefaultHeight = 405; + this.DefaultHeight = 420; this.Show (); this.listeUsb.CursorChanged += new global::System.EventHandler (this.OnListeUsbCursorChanged); this.btnConnect.Clicked += new global::System.EventHandler (this.OnBtnConnectClicked); diff --git a/DMX-2.0/gtk-gui/DMX2.GestionMidiUI.cs b/DMX-2.0/gtk-gui/DMX2.GestionMidiUI.cs new file mode 100644 index 0000000..b93feaa --- /dev/null +++ b/DMX-2.0/gtk-gui/DMX2.GestionMidiUI.cs @@ -0,0 +1,171 @@ + +// This file has been generated by the GUI designer. Do not modify. +namespace DMX2 +{ + public partial class GestionMidiUI + { + private global::Gtk.HBox hbox2; + private global::Gtk.Label label1; + private global::Gtk.ScrolledWindow GtkScrolledWindow; + private global::Gtk.TreeView treeview1; + private global::Gtk.HBox hbox1; + private global::Gtk.Label label2; + private global::Gtk.Button button59; + private global::Gtk.Button button60; + private global::Gtk.ScrolledWindow GtkScrolledWindow1; + private global::Gtk.TreeView treeview2; + private global::Gtk.Button buttonClose; + + protected virtual void Build () + { + global::Stetic.Gui.Initialize (this); + // Widget DMX2.GestionMidiUI + this.Name = "DMX2.GestionMidiUI"; + this.Title = "Connexions Midi"; + this.WindowPosition = ((global::Gtk.WindowPosition)(4)); + // Internal child DMX2.GestionMidiUI.VBox + global::Gtk.VBox w1 = this.VBox; + w1.Name = "dialog1_VBox"; + w1.BorderWidth = ((uint)(2)); + // Container child dialog1_VBox.Gtk.Box+BoxChild + this.hbox2 = new global::Gtk.HBox (); + this.hbox2.Name = "hbox2"; + this.hbox2.Spacing = 6; + // Container child hbox2.Gtk.Box+BoxChild + this.label1 = new global::Gtk.Label (); + this.label1.Name = "label1"; + this.label1.LabelProp = "Ports Midi disponibles :"; + this.hbox2.Add (this.label1); + global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.label1])); + w2.Position = 0; + w2.Expand = false; + w2.Fill = false; + w1.Add (this.hbox2); + global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(w1 [this.hbox2])); + w3.Position = 0; + w3.Expand = false; + w3.Fill = false; + // Container child dialog1_VBox.Gtk.Box+BoxChild + this.GtkScrolledWindow = new global::Gtk.ScrolledWindow (); + this.GtkScrolledWindow.Name = "GtkScrolledWindow"; + this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1)); + // Container child GtkScrolledWindow.Gtk.Container+ContainerChild + this.treeview1 = new global::Gtk.TreeView (); + this.treeview1.CanFocus = true; + this.treeview1.Name = "treeview1"; + this.GtkScrolledWindow.Add (this.treeview1); + w1.Add (this.GtkScrolledWindow); + global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(w1 [this.GtkScrolledWindow])); + w5.Position = 1; + // Container child dialog1_VBox.Gtk.Box+BoxChild + this.hbox1 = new global::Gtk.HBox (); + this.hbox1.Name = "hbox1"; + this.hbox1.Spacing = 6; + // Container child hbox1.Gtk.Box+BoxChild + this.label2 = new global::Gtk.Label (); + this.label2.Name = "label2"; + this.label2.LabelProp = "Ports Midi connectés :"; + this.hbox1.Add (this.label2); + global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.label2])); + w6.Position = 0; + w6.Expand = false; + w6.Fill = false; + // Container child hbox1.Gtk.Box+BoxChild + this.button59 = new global::Gtk.Button (); + this.button59.CanFocus = true; + this.button59.Name = "button59"; + this.button59.UseUnderline = true; + // Container child button59.Gtk.Container+ContainerChild + global::Gtk.Alignment w7 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); + // Container child GtkAlignment.Gtk.Container+ContainerChild + global::Gtk.HBox w8 = new global::Gtk.HBox (); + w8.Spacing = 2; + // Container child GtkHBox.Gtk.Container+ContainerChild + global::Gtk.Image w9 = new global::Gtk.Image (); + w9.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-disconnect", global::Gtk.IconSize.Menu); + w8.Add (w9); + // Container child GtkHBox.Gtk.Container+ContainerChild + global::Gtk.Label w11 = new global::Gtk.Label (); + w11.LabelProp = "_Déconnecter"; + w11.UseUnderline = true; + w8.Add (w11); + w7.Add (w8); + this.button59.Add (w7); + this.hbox1.Add (this.button59); + global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.button59])); + w15.PackType = ((global::Gtk.PackType)(1)); + w15.Position = 2; + w15.Expand = false; + w15.Fill = false; + // Container child hbox1.Gtk.Box+BoxChild + this.button60 = new global::Gtk.Button (); + this.button60.CanFocus = true; + this.button60.Name = "button60"; + this.button60.UseUnderline = true; + // Container child button60.Gtk.Container+ContainerChild + global::Gtk.Alignment w16 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); + // Container child GtkAlignment.Gtk.Container+ContainerChild + global::Gtk.HBox w17 = new global::Gtk.HBox (); + w17.Spacing = 2; + // Container child GtkHBox.Gtk.Container+ContainerChild + global::Gtk.Image w18 = new global::Gtk.Image (); + w18.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-connect", global::Gtk.IconSize.Menu); + w17.Add (w18); + // Container child GtkHBox.Gtk.Container+ContainerChild + global::Gtk.Label w20 = new global::Gtk.Label (); + w20.LabelProp = "Connecter"; + w20.UseUnderline = true; + w17.Add (w20); + w16.Add (w17); + this.button60.Add (w16); + this.hbox1.Add (this.button60); + global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.button60])); + w24.PackType = ((global::Gtk.PackType)(1)); + w24.Position = 3; + w24.Expand = false; + w24.Fill = false; + w1.Add (this.hbox1); + global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(w1 [this.hbox1])); + w25.Position = 2; + w25.Expand = false; + w25.Fill = false; + // Container child dialog1_VBox.Gtk.Box+BoxChild + this.GtkScrolledWindow1 = new global::Gtk.ScrolledWindow (); + this.GtkScrolledWindow1.Name = "GtkScrolledWindow1"; + this.GtkScrolledWindow1.ShadowType = ((global::Gtk.ShadowType)(1)); + // Container child GtkScrolledWindow1.Gtk.Container+ContainerChild + this.treeview2 = new global::Gtk.TreeView (); + this.treeview2.CanFocus = true; + this.treeview2.Name = "treeview2"; + this.GtkScrolledWindow1.Add (this.treeview2); + w1.Add (this.GtkScrolledWindow1); + global::Gtk.Box.BoxChild w27 = ((global::Gtk.Box.BoxChild)(w1 [this.GtkScrolledWindow1])); + w27.Position = 3; + // Internal child DMX2.GestionMidiUI.ActionArea + global::Gtk.HButtonBox w28 = this.ActionArea; + w28.Name = "dialog1_ActionArea"; + w28.Spacing = 10; + w28.BorderWidth = ((uint)(5)); + w28.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); + // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild + this.buttonClose = new global::Gtk.Button (); + this.buttonClose.CanDefault = true; + this.buttonClose.CanFocus = true; + this.buttonClose.Name = "buttonClose"; + this.buttonClose.UseStock = true; + this.buttonClose.UseUnderline = true; + this.buttonClose.Label = "gtk-close"; + this.AddActionWidget (this.buttonClose, -7); + global::Gtk.ButtonBox.ButtonBoxChild w29 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w28 [this.buttonClose])); + w29.Expand = false; + w29.Fill = false; + if ((this.Child != null)) { + this.Child.ShowAll (); + } + this.DefaultWidth = 667; + this.DefaultHeight = 424; + this.Show (); + this.buttonClose.Clicked += new global::System.EventHandler (this.OnButtonCloseClicked); + } + } +} diff --git a/DMX-2.0/gtk-gui/DMX2.MainWindow.cs b/DMX-2.0/gtk-gui/DMX2.MainWindow.cs index db05e24..10b26ef 100644 --- a/DMX-2.0/gtk-gui/DMX2.MainWindow.cs +++ b/DMX-2.0/gtk-gui/DMX2.MainWindow.cs @@ -25,6 +25,8 @@ namespace DMX2 private global::Gtk.Action selectColorAction; private global::Gtk.Action aguiAction; private global::Gtk.Action aboutAction; + private global::Gtk.Action midiAction; + private global::Gtk.Action connectAction1; private global::Gtk.VBox vbox1; private global::Gtk.HBox hbox1; private global::Gtk.VBox vbox2; @@ -120,6 +122,11 @@ namespace DMX2 w1.Add (this.aguiAction, null); this.aboutAction = new global::Gtk.Action ("aboutAction", null, null, "gtk-about"); w1.Add (this.aboutAction, null); + this.midiAction = new global::Gtk.Action ("midiAction", null, null, "gtk-preferences"); + w1.Add (this.midiAction, null); + this.connectAction1 = new global::Gtk.Action ("connectAction1", "Connection Midi", null, "gtk-connect"); + this.connectAction1.ShortLabel = "Connection Midi"; + w1.Add (this.connectAction1, null); this.UIManager.InsertActionGroup (w1, 0); this.AddAccelGroup (this.UIManager.AccelGroup); this.Name = "DMX2.MainWindow"; @@ -423,7 +430,7 @@ namespace DMX2 global::Gtk.Box.BoxChild w74 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.evInfo])); w74.Position = 1; // Container child hbox4.Gtk.Box+BoxChild - this.UIManager.AddUiFromString (""); + this.UIManager.AddUiFromString (""); this.toolbar8 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar8"))); this.toolbar8.Name = "toolbar8"; this.toolbar8.ShowArrow = false; @@ -462,6 +469,7 @@ namespace DMX2 this.selectColorAction.Activated += new global::System.EventHandler (this.OnSelectColorActionActivated); this.aguiAction.Activated += new global::System.EventHandler (this.OnInfoActionActivated); this.aboutAction.Activated += new global::System.EventHandler (this.OnAboutActionActivated); + this.midiAction.Activated += new global::System.EventHandler (this.OnMidiActionActivated); this.btnGo.Clicked += new global::System.EventHandler (this.OnBtnGoClicked); this.btnGoBack.Clicked += new global::System.EventHandler (this.OnBtnGoBackClicked); this.btnAjoutLigne.Clicked += new global::System.EventHandler (this.OnBtnAjoutLigneClicked); diff --git a/DMX-2.0/gtk-gui/gui.stetic b/DMX-2.0/gtk-gui/gui.stetic index 4e6ae6e..da251ed 100644 --- a/DMX-2.0/gtk-gui/gui.stetic +++ b/DMX-2.0/gtk-gui/gui.stetic @@ -214,6 +214,18 @@ gtk-about + + Action + + gtk-preferences + + + + Action + Connection Midi + Connection Midi + gtk-connect + MainWindow @@ -548,8 +560,7 @@ celle selectionnée - - + @@ -1893,7 +1904,7 @@ au sequenceur - + CenterOnParent 1 @@ -3068,4 +3079,168 @@ trames DMX (ms) + + + Connexions Midi + CenterOnParent + 1 + False + + + + 2 + + + + 6 + + + + Ports Midi disponibles : + + + 0 + True + False + False + + + + + + + + + + + 0 + True + False + False + + + + + + In + + + + True + True + + + + + 1 + True + + + + + + 6 + + + + Ports Midi connectés : + + + 0 + True + False + False + + + + + + + + + True + TextAndIcon + stock:gtk-disconnect Menu + _Déconnecter + True + + + End + 2 + True + False + False + + + + + + True + TextAndIcon + stock:gtk-connect Menu + Connecter + True + + + End + 3 + True + False + False + + + + + 2 + True + False + False + + + + + + In + + + + True + True + + + + + 3 + True + + + + + + + + 10 + 5 + 1 + End + + + + True + True + True + StockItem + gtk-close + -7 + + gtk-close + + + False + False + + + + + \ No newline at end of file