From: Duncan C. <dun...@us...> - 2005-03-27 12:59:16
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/apiGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15556/tools/apiGen Modified Files: ExcludeApi.hs Makefile gtk.ignore Log Message: Fix ExcludeApi / gtk.ignore bug in ApiGen program and add a bunch of internal functions to ignore when generating binding modules. Add a more detailed summary API coverage report. Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/Makefile,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Makefile 25 Mar 2005 19:14:55 -0000 1.11 +++ Makefile 27 Mar 2005 12:59:06 -0000 1.12 @@ -166,8 +166,8 @@ # # tools # -ApiGen : ApiGen.hs Api.hs Docs.hs FormatDocs.hs \ - Marshal.hs CodeGen.hs StringUtils.hs ModuleScan.hs MarshalFixup.hs +ApiGen : ApiGen.hs Api.hs Docs.hs FormatDocs.hs CodeGen.hs Marshal.hs \ + MarshalFixup.hs ModuleScan.hs ExcludeApi.hs StringUtils.hs $(HC) --make $< -o $@ HC=ghc Index: ExcludeApi.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/ExcludeApi.hs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ExcludeApi.hs 17 Feb 2005 13:51:35 -0000 1.1 +++ ExcludeApi.hs 27 Mar 2005 12:59:06 -0000 1.2 @@ -25,10 +25,18 @@ trim = takeWhile (not . isSpace) . dropWhile isSpace matcher :: [FilterSpec] -> (String -> Bool) -matcher spec = match - where excludeRegex = mkRegex $ concat $ intersperse "|" [ regex | Exclude regex <- spec ] - noExcludeRegex = mkRegex $ concat $ intersperse "|" [ regex | NotExclude regex <- spec ] - alwaysExcludeRegex = mkRegex $ concat $ intersperse "|" [ regex | AlwaysExclude regex <- spec ] - match line = not $ ((isJust $ matchRegex excludeRegex line) - && (not $ isJust $ matchRegex noExcludeRegex line)) - || (isJust $ matchRegex alwaysExcludeRegex line) +matcher spec line = match line + where excludeRegexFragments = [ regex | Exclude regex <- spec ] + noExcludeRegexFragments = [ regex | NotExclude regex <- spec ] + alwaysExcludeRegexFragments = [ regex | AlwaysExclude regex <- spec ] + + excludeRegex = mkRegex $ concat $ intersperse "|" excludeRegexFragments + noExcludeRegex = mkRegex $ concat $ intersperse "|" noExcludeRegexFragments + alwaysExcludeRegex = mkRegex $ concat $ intersperse "|" alwaysExcludeRegexFragments + + matchExclude line = isJust (matchRegex excludeRegex line) && not (null excludeRegexFragments) + matchNotExclude line = isJust (matchRegex noExcludeRegex line) && not (null noExcludeRegexFragments) + matchAlwaysExclude line = isJust (matchRegex alwaysExcludeRegex line) && not (null alwaysExcludeRegexFragments) + + match line = not $ (matchExclude line && (not $ matchNotExclude line)) + || matchAlwaysExclude line Index: gtk.ignore =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/gtk.ignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gtk.ignore 17 Feb 2005 13:51:35 -0000 1.1 +++ gtk.ignore 27 Mar 2005 12:59:06 -0000 1.2 @@ -6,3 +6,28 @@ #these are sometimes bound if necessary but otherwise we can ignore them exclude _ref$ exclude _unref$ + +#now just a whole bunch of specific ones: +exclude gtk_window_set_wmclass + +#internal widget functions: +exclude gtk_widget_unparent +exclude gtk_widget_map +exclude gtk_widget_unmap +exclude gtk_widget_realize +exclude gtk_widget_unrealize +exclude gtk_widget_queue_resize +exclude gtk_widget_queue_resize_no_redraw +exclude gtk_widget_size_request +exclude gtk_widget_get_child_requisition +exclude gtk_widget_size_allocate +exclude gtk_widget_event +exclude gtk_widget_set_state +exclude gtk_widget_set_parent +exclude gtk_widget_ensure_style +exclude gtk_widget_reset_rc_styles + +# C convenience functions +exclude gtk_widget_hide_on_delete +exclude gtk_widget_destroyed + |