3 # Copyright (C) 2009 Adam Dingle <adam@yorba.org>
5 # This file is part of WebKit
7 # This library is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU Library General Public
9 # License as published by the Free Software Foundation; either
10 # version 2 of the License, or (at your option) any later version.
12 # This library is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # Library General Public License for more details.
17 # You should have received a copy of the GNU Library General Public License
18 # aint with this library; see the file COPYING.LIB. If not, write to
19 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 # Boston, MA 02110-1301, USA.
23 my $classlist = <STDIN>;
25 my @classes = split / /, $classlist;
26 @classes = sort @classes;
29 /* This file is part of the WebKit open source project.
30 This file has been generated by gobject-generate-headers.pl. DO NOT MODIFY!
32 This library is free software; you can redistribute it and/or
33 modify it under the terms of the GNU Library General Public
34 License as published by the Free Software Foundation; either
35 version 2 of the License, or (at your option) any later version.
37 This library is distributed in the hope that it will be useful,
38 but WITHOUT ANY WARRANTY; without even the implied warranty of
39 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
40 Library General Public License for more details.
42 You should have received a copy of the GNU Library General Public License
43 along with this library; see the file COPYING.LIB. If not, write to
44 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
45 Boston, MA 02110-1301, USA.
50 my $outType = $ARGV[0];
52 if ($outType eq "defines") {
53 $header = "webkitdomdefines_h";
54 } elsif ($outType eq "gdom") {
55 $header = "webkitdom_h";
57 die "unknown output type";
60 print "#ifndef ${header}\n";
61 print "#define ${header}\n";
64 if ($outType eq "defines") {
65 foreach my $class (@classes) {
66 print "typedef struct _WebKitDOM${class} WebKitDOM${class};\n";
67 print "typedef struct _WebKitDOM${class}Class WebKitDOM${class}Class;\n";
70 } elsif ($outType eq "gdom") {
71 foreach my $class (@classes) {
72 print "#include <webkit/WebKitDOM${class}.h>\n";