mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-09 00:13:20 +02:00
2003-04-12 Alp Toker <alp@atoker.com>
* parser/gen_keysyms: Generates a C# Keys enum from the Gdk headers (gdkkeysyms.h) * gdk/Keys.cs: The generated Keys svn path=/trunk/gtk-sharp/; revision=13542
This commit is contained in:
parent
1b1c171b21
commit
403ed1ac68
@ -1,3 +1,9 @@
|
||||
2003-04-12 Alp Toker <alp@atoker.com>
|
||||
|
||||
* parser/gen_keysyms: Generates a C# Keys enum from the Gdk headers
|
||||
(gdkkeysyms.h)
|
||||
* gdk/Keys.cs: The generated Keys
|
||||
|
||||
2003-04-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
|
||||
|
||||
* glib/Object.cs:
|
||||
|
1342
gdk/Keys.cs
Normal file
1342
gdk/Keys.cs
Normal file
File diff suppressed because it is too large
Load Diff
28
parser/gen_keysyms
Executable file
28
parser/gen_keysyms
Executable file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/perl -w
|
||||
# Generates a C# Keys enum from the Gdk headers (gdkkeysyms.h)
|
||||
# Usage: ./gen_keysyms < gdkkeysyms.h > Keys.cs
|
||||
# Alp Toker <alp@atoker.com>
|
||||
|
||||
print "// Generated File. Do not modify.\n\n";
|
||||
print "namespace Gdk\n";
|
||||
print "{\n";
|
||||
print "\tpublic enum Keys {\n";
|
||||
|
||||
while(<>) {
|
||||
chomp;
|
||||
|
||||
if (m/^\W*#define\W+GDK_(\w+)\W+(\w+)\W*$/) {
|
||||
$key = $1;
|
||||
$value = $2;
|
||||
|
||||
# keys can't start with a digit
|
||||
if ($key =~ m/^\d.*$/) {
|
||||
$key = "Key_$key";
|
||||
}
|
||||
|
||||
print "\t\t$key = $value,\n";
|
||||
}
|
||||
}
|
||||
|
||||
print "\t}\n";
|
||||
print "}\n";
|
Loading…
Reference in New Issue
Block a user