OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (C) 2013 Google Inc. All rights reserved. | 2 # Copyright (C) 2013 Google Inc. All rights reserved. |
3 # | 3 # |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
61 or name == 'Event' | 61 or name == 'Event' |
62 or name == 'Events' | 62 or name == 'Events' |
63 or name.startswith('UIEvent') | 63 or name.startswith('UIEvent') |
64 or name.startswith('CustomEvent') | 64 or name.startswith('CustomEvent') |
65 or name == 'KeyboardEvent' | 65 or name == 'KeyboardEvent' |
66 or name == 'MessageEvent' | 66 or name == 'MessageEvent' |
67 or name.startswith('MouseEvent') | 67 or name.startswith('MouseEvent') |
68 or name == 'TouchEvent') | 68 or name == 'TouchEvent') |
69 | 69 |
70 | 70 |
71 def create_event_deprecate_list(name): | 71 def create_event_deprecate_list(name): |
davve
2016/07/12 09:36:38
I suggest removing the create_event_deprecate_list
Shanmuga Pandi
2016/07/12 13:06:10
Done.
|
foolip
2016/07/12 09:35:06
Remove this and deprecate_name where it is used.
Shanmuga Pandi
2016/07/12 13:06:10
Done.
|
72 return (name == 'SVGZoomEvent' | 72 return False |
73 or name == 'SVGZoomEvents') | |
74 | 73 |
75 | 74 |
76 def measure_name(name): | 75 def measure_name(name): |
77 return 'DocumentCreateEvent' + name | 76 return 'DocumentCreateEvent' + name |
78 | 77 |
79 | 78 |
80 def deprecate_name(name): | 79 def deprecate_name(name): |
davve
2016/07/12 09:36:38
And this too, of course.
Shanmuga Pandi
2016/07/12 13:06:11
Done.
| |
81 if (name.startswith('SVGZoomEvent')): | |
82 return 'SVGZoomEvent' | |
83 return None | 80 return None |
84 | 81 |
85 | 82 |
86 class EventFactoryWriter(in_generator.Writer): | 83 class EventFactoryWriter(in_generator.Writer): |
87 defaults = { | 84 defaults = { |
88 'ImplementedAs': None, | 85 'ImplementedAs': None, |
89 'RuntimeEnabled': None, | 86 'RuntimeEnabled': None, |
90 } | 87 } |
91 default_parameters = { | 88 default_parameters = { |
92 'export': '', | 89 'export': '', |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
174 def generate_implementation(self): | 171 def generate_implementation(self): |
175 return { | 172 return { |
176 'namespace': self.namespace, | 173 'namespace': self.namespace, |
177 'suffix': self.suffix, | 174 'suffix': self.suffix, |
178 'events': self.in_file.name_dictionaries, | 175 'events': self.in_file.name_dictionaries, |
179 } | 176 } |
180 | 177 |
181 | 178 |
182 if __name__ == "__main__": | 179 if __name__ == "__main__": |
183 in_generator.Maker(EventFactoryWriter).main(sys.argv) | 180 in_generator.Maker(EventFactoryWriter).main(sys.argv) |
OLD | NEW |