| OLD | NEW |
| 1 # | 1 # |
| 2 # WebKit IDL parser | 2 # WebKit IDL parser |
| 3 # | 3 # |
| 4 # Copyright (C) 2005 Nikolas Zimmermann <wildfox@kde.org> | 4 # Copyright (C) 2005 Nikolas Zimmermann <wildfox@kde.org> |
| 5 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | 5 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
| 6 # Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 6 # Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
| 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
| 8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. | 8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 9 # Copyright (C) 2013 Samsung Electronics. All rights reserved. |
| 9 # | 10 # |
| 10 # This library is free software; you can redistribute it and/or | 11 # This library is free software; you can redistribute it and/or |
| 11 # modify it under the terms of the GNU Library General Public | 12 # modify it under the terms of the GNU Library General Public |
| 12 # License as published by the Free Software Foundation; either | 13 # License as published by the Free Software Foundation; either |
| 13 # version 2 of the License, or (at your option) any later version. | 14 # version 2 of the License, or (at your option) any later version. |
| 14 # | 15 # |
| 15 # This library is distributed in the hope that it will be useful, | 16 # This library is distributed in the hope that it will be useful, |
| 16 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 17 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 18 # Library General Public License for more details. | 19 # Library General Public License for more details. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 } | 81 } |
| 81 | 82 |
| 82 my $interfaces = $idlDocument->interfaces; | 83 my $interfaces = $idlDocument->interfaces; |
| 83 foreach my $interface (@$interfaces) { | 84 foreach my $interface (@$interfaces) { |
| 84 print "Generating bindings code for IDL interface \"" . $interface->name
. "\"...\n" if $verbose; | 85 print "Generating bindings code for IDL interface \"" . $interface->name
. "\"...\n" if $verbose; |
| 85 $codeGenerator->GenerateInterface($interface, $defines); | 86 $codeGenerator->GenerateInterface($interface, $defines); |
| 86 $codeGenerator->WriteData($interface, $useOutputDir, $useOutputHeadersDi
r); | 87 $codeGenerator->WriteData($interface, $useOutputDir, $useOutputHeadersDi
r); |
| 87 } | 88 } |
| 88 } | 89 } |
| 89 | 90 |
| 91 sub IsCallbackInterfaceFromFile |
| 92 { |
| 93 my $object = shift; |
| 94 my $interfaceName = shift; |
| 95 |
| 96 my $idlFile = $object->IDLFileForInterface($interfaceName) |
| 97 or die("Could NOT find IDL file for interface \"$interfaceName\"!\n"); |
| 98 |
| 99 open FILE, "<", $idlFile; |
| 100 my @lines = <FILE>; |
| 101 close FILE; |
| 102 |
| 103 my $fileContents = join('', @lines); |
| 104 return ($fileContents =~ /callback\s+interface\s+(\w+)/gs); |
| 105 } |
| 106 |
| 90 1; | 107 1; |
| OLD | NEW |