File: window.patch

package info (click to toggle)
aconnectgui 0.9.0rc2-1-11
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 320 kB
  • sloc: cpp: 1,232; makefile: 26
file content (221 lines) | stat: -rw-r--r-- 5,396 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
Description: Migrate to FLTK 1.3 
Bug-Debian: https://bugs.debian.org/974629
Author: Bastian Germann <bage@debian.org>
Last-Update: 2023-10-10
Forwarded: https://github.com/radiganm/aconnectgui/issues/2

diff -u aconnectgui-0.9.0rc2-1/src/Connection.cxx aconnectgui-0.9.0rc2-1/src/Connection.cxx
--- aconnectgui-0.9.0rc2-1/src/Connection.cxx
+++ aconnectgui-0.9.0rc2-1/src/Connection.cxx
@@ -25,7 +25,7 @@
 
 int Connection::handle(int e)
 {
-	Window* window = (Window*) parent()->parent();
+	ACGWindow* window = (ACGWindow*) parent()->parent();
 	
 	if (e==FL_PUSH) {
 		if (window->IsDisconnecting()) {
diff -u aconnectgui-0.9.0rc2-1/src/Window.cxx aconnectgui-0.9.0rc2-1/src/Window.cxx
--- aconnectgui-0.9.0rc2-1/src/Window.cxx
+++ aconnectgui-0.9.0rc2-1/src/Window.cxx
@@ -16,7 +16,7 @@
 
 int aconnect_main(int argc,char** argv);
 
-void Window::Connect(int client,int port,int clientB,int portB)
+void ACGWindow::Connect(int client,int port,int clientB,int portB)
 {
 	Connector *a = 0,*b = 0;
 	
@@ -29,7 +29,7 @@
 	}
 }		
 
-void Window::Disconnect(
+void ACGWindow::Disconnect(
 int fromClientId,int fromPortId,int toClientId,int toPortId)
 {
 Connection* c = mConnections->Find(
@@ -45,7 +45,7 @@
 	}
 }
 
-void Window::Disconnect(Connection* c)
+void ACGWindow::Disconnect(Connection* c)
 {
 	mConnections->remove(c);
 	mConnections->redraw();
@@ -58,7 +58,7 @@
 	mConnections->redraw();
 }
 
-void Window::Connect(Connector* a,Connector* b)
+void ACGWindow::Connect(Connector* a,Connector* b)
 {
 	a->Unselect();
 	b->Unselect();
@@ -80,12 +80,12 @@
 	mConnections->Unclutter();
 }
 
-int Window::IsLegal(Connector* a,Connector* b)
+int ACGWindow::IsLegal(Connector* a,Connector* b)
 {
 	return a->Type()!=b->Type();
 }
 
-Client* Window::AddClient(snd_seq_client_info_t* cinfo)
+Client* ACGWindow::AddClient(snd_seq_client_info_t* cinfo)
 {
 	// some of this code should be in Window
 	Client* c= mClients->FindClient(snd_seq_client_info_get_client(cinfo));
@@ -107,7 +107,7 @@
 	}
 	return mCurClient;
 }
-Port* Window::AddPort(snd_seq_port_info_t* pinfo)
+Port* ACGWindow::AddPort(snd_seq_port_info_t* pinfo)
 {
 	// some of this code should be in Window
 	int dy = mCurClient->y()+mCurClient->h();
@@ -129,7 +129,7 @@
 	return mCurPort;
 }
 
-bool Window::HandleConnect(Connector* a,Connector* b)
+bool ACGWindow::HandleConnect(Connector* a,Connector* b)
 {
 	int argc;
 	char* argv[16];
@@ -147,7 +147,7 @@
 	return (aconnect_main(argc,argv)==0);
 }
 
-bool Window::HandleDisconnect(Connection* c)
+bool ACGWindow::HandleDisconnect(Connection* c)
 {
 	int argc;
 	char* argv[16];
@@ -169,7 +169,7 @@
 	return (aconnect_main(argc,argv)==0);
 }
 
-Window::Window():Fl_Window(300,33,"ALSA Sequencer")
+ACGWindow::ACGWindow():Fl_Window(300,33,"ALSA Sequencer")
 {
 	mClients = new Clients(0,33,140,0);
 	mConnections = new Connections(140,33,160,0);
@@ -253,13 +253,13 @@
 	snd_seq_nonblock(mHandle, 1);
 }
 
-Window::~Window()
+ACGWindow::~ACGWindow()
 {
 	snd_seq_close(mHandle);
 }
 
 
-void Window::Timeout(void)
+void ACGWindow::Timeout(void)
 {
 	int count;
 	snd_seq_event_t *ev;
@@ -347,10 +347,10 @@
 		}
 	} while (ev);
 
-	Fl::add_timeout(0.1,Window::TimeoutStatic,this);
+	Fl::add_timeout(0.1,ACGWindow::TimeoutStatic,this);
 }
 
-Window* patchbay = 0;
+ACGWindow* patchbay = 0;
 
 int main()
 {
@@ -359,7 +359,7 @@
 	
 	Fl::get_system_colors();
 	
-	patchbay = new Window;
+	patchbay = new ACGWindow;
 
 	/* NB the concept of input of aconnect and the  classes is reverse...
 	*/
@@ -380,7 +380,7 @@
 
 	patchbay->show();
 
-	Fl::add_timeout(0.1,Window::TimeoutStatic,patchbay);
+	Fl::add_timeout(0.1,ACGWindow::TimeoutStatic,patchbay);
 
 	Fl::run();
 }
diff -u aconnectgui-0.9.0rc2-1/src/Window.hxx aconnectgui-0.9.0rc2-1/src/Window.hxx
--- aconnectgui-0.9.0rc2-1/src/Window.hxx
+++ aconnectgui-0.9.0rc2-1/src/Window.hxx
@@ -12,7 +12,7 @@
 
 #include <alsa/asoundlib.h>
 
-class Window:public Fl_Window
+class ACGWindow:public Fl_Window
 {
 private:
 	Connections* mConnections;
@@ -32,8 +32,8 @@
 	int mClientId;
 
 public:
-	Window();
-	~Window();
+	ACGWindow();
+	~ACGWindow();
 
 	Connections* GetConnections(void) { return mConnections; }
 
@@ -74,7 +74,7 @@
 	
 	static void TimeoutStatic(void* ptr)
 	{
-		((Window*)ptr)->Timeout();
+		((ACGWindow*)ptr)->Timeout();
 	}
 	
 	void Timeout(void);
diff -u aconnectgui-0.9.0rc2-1/src/aconnect.cxx aconnectgui-0.9.0rc2-1/src/aconnect.cxx
--- aconnectgui-0.9.0rc2-1/src/aconnect.cxx
+++ aconnectgui-0.9.0rc2-1/src/aconnect.cxx
@@ -30,7 +30,7 @@
 
 #ifdef ACONNECT_GUI
 #include "Window.hxx"
-extern Window* patchbay;
+extern ACGWindow* patchbay;
 #endif
 
 static void error_handler(const char *file, int line, const char *function, int err, const char *fmt, ...)
@@ -127,7 +127,7 @@
 				patchbay->FindOutput(addr->client, addr->port);
 			if (output)
 			{
-				patchbay->Window::Connect(output,patchbay->GetCurPort()->Input());
+				patchbay->ACGWindow::Connect(output,patchbay->GetCurPort()->Input());
 			}
 		}
 #else
only in patch2:
unchanged:
--- aconnectgui-0.9.0rc2-1.orig/src/Client.cxx
+++ aconnectgui-0.9.0rc2-1/src/Client.cxx
@@ -158,7 +158,7 @@
 	static Connector* a,*b,*prev;
 	static Connection* c=0;
 
-	Window* patchbay = ((Window*)parent());
+	ACGWindow* patchbay = ((ACGWindow*)parent());
 	Connections* connections = patchbay->GetConnections();
 
 	if (e==FL_PUSH && patchbay->IsConnecting()) {