aboutsummaryrefslogtreecommitdiffstatsci
path: root/Tests
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-11-21 18:48:52 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-11-21 18:48:52 +0100
commit4db409fdff013e3e4249d567e4d6fdb0ee877256 (patch)
tree3b985c0941fda237f60b2e5f9a63382327159fb9 /Tests
parenta1dca1431f685020df843162b805edee11e1929c (diff)
xcb backend
Diffstat (limited to 'Tests')
-rw-r--r--Tests/BasicTests.cs4
-rw-r--r--Tests/Tests.csproj1
-rw-r--r--Tests/keysyms.cs18
-rw-r--r--Tests/testCairoXLib.cs2
4 files changed, 15 insertions, 10 deletions
diff --git a/Tests/BasicTests.cs b/Tests/BasicTests.cs
index c13dd53d..02b6742d 100644
--- a/Tests/BasicTests.cs
+++ b/Tests/BasicTests.cs
@@ -16,9 +16,9 @@ namespace tests
app.KeyboardKeyDown += App_KeyboardKeyDown;
- //app.AddWidget (@"Interfaces/Divers/0.crow").DataSource = app;
+ app.AddWidget (@"Interfaces/Divers/0.crow").DataSource = app;
//app.AddWidget (@"Interfaces/Splitter/1.crow").DataSource = app;
- app.AddWidget (@"Interfaces/Container/0.crow").DataSource = app;
+ //app.AddWidget (@"Interfaces/Container/0.crow").DataSource = app;
//app.AddWidget (@"Interfaces/Divers/colorPicker.crow").DataSource = app;
//app.AddWidget ("Interfaces/Divers/perfMeasures.crow").DataSource = app;
diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj
index 7366607f..973930e7 100644
--- a/Tests/Tests.csproj
+++ b/Tests/Tests.csproj
@@ -101,7 +101,6 @@
<Compile Include="GraphicObjects\SimpleGauge.cs" />
<Compile Include="GraphicObjects\HexaContainer.cs" />
<Compile Include="GraphicObjects\TechBorder.cs" />
- <Compile Include="testCairoXLib.cs" />
<Compile Include="keysyms.cs" />
</ItemGroup>
<ItemGroup>
diff --git a/Tests/keysyms.cs b/Tests/keysyms.cs
index 430954fe..e33add92 100644
--- a/Tests/keysyms.cs
+++ b/Tests/keysyms.cs
@@ -33,16 +33,18 @@ namespace Tests
public static void Main(string[] args)
{
using (StreamWriter sw = new StreamWriter ("test.cs")) {
- using (StreamReader r = new StreamReader ("/usr/include/X11/keysymdef.h")) {
+ using (StreamReader r = new StreamReader ("/usr/include/xkbcommon/xkbcommon-keysyms.h")) {
bool skip = false;
int maxChar = 0;
sw.WriteLine ("/* autogenerated */");
sw.WriteLine ("using System;\n");
- sw.WriteLine ("namespace XLib");
+ sw.WriteLine ("namespace Crow.XCB");
sw.WriteLine ("{");
sw.WriteLine ("\t[Flags]");
sw.WriteLine ("\tpublic enum KeySym");
sw.WriteLine ("\t{");
+ r.ReadLine ();
+ r.ReadLine ();
while (!r.EndOfStream) {
string s = r.ReadLine ().Trim();
if (skip) {
@@ -59,13 +61,17 @@ namespace Tests
continue;
string[] tmp = s.Split (new char[] {' ', '\t'}, StringSplitOptions.RemoveEmptyEntries);
- if (tmp [1].Length > maxChar)
- maxChar = tmp [1].Length;
+ string keyName = tmp [1].Substring (8);
+ if (char.IsDigit (keyName [0]))
+ keyName = "key_" + keyName;
- int nbTab = tmp [1].Length / 4;
+ if (keyName.Length > maxChar)
+ maxChar = keyName.Length;
+
+ int nbTab = keyName.Length / 4;
nbTab = 8 - nbTab;
- sw.WriteLine ("\t\t{0}{1}= {2},", tmp[1],new String('\t',nbTab), tmp[2]);
+ sw.WriteLine ("\t\t{0}{1}= {2},", keyName, new String('\t',nbTab), tmp[2]);
}
sw.WriteLine ("\t}");
sw.WriteLine ("}");
diff --git a/Tests/testCairoXLib.cs b/Tests/testCairoXLib.cs
index 7d62a288..cb18d654 100644
--- a/Tests/testCairoXLib.cs
+++ b/Tests/testCairoXLib.cs
@@ -12,7 +12,7 @@ namespace testsCairoXLib
static internal IntPtr xHandle, xwinHnd;
static internal Int32 xScreen;
static IntPtr xLastEvent;
- static XLib.XErrorHandler errorHnd;
+ static XErrorHandler errorHnd;
static Pollfd[] pollfds;