summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-07-27 06:16:37 -0400
committerColin Walters <walters@verbum.org>2010-08-31 16:05:56 -0400
commit36aa515f1036978ced8d4ffb808260844f7229e0 (patch)
tree93e06fb105a513a394365232bb632256f109dada /docs
parent552c1f1525e37a30376790151c1ba437776682c5 (diff)
downloadgobject-introspection-36aa515f1036978ced8d4ffb808260844f7229e0.tar.gz
Major rewrite
One of the first big changes in this rewrite is changing the Type object to have separate target_fundamental and target_giname properties, rather than just being strings. Previously in the scanner, it was awful because we used heuristics around strings. The ast.py is refactored so that not everything is a Node - that was a rather useless abstraction. Now, only things which can have a GIName are Node. E.g. Type and Field are no longer Node. More things were merged from glibast.py into ast.py, since it isn't a very useful split. transformer.py gains more intelligence and will e.g. turn GLib.List into a List() object earlier. The namespace processing is a lot cleaner now; since we parse the included .girs, we know the C prefix for each namespace, and have functions to parse both C type names (GtkFooBar) and symbols gtk_foo_bar into their symbols cleanly. Type resolution is much, much saner because we know Type(target_giname=Gtk.Foo) maps to the namespace Gtk. glibtransformer.py now just handles the XML processing from the dump, and a few miscellaneous things. The major heavy lifting now lives in primarytransformer.py, which is a combination of most of annotationparser.py and half of glibtransformer.py. annotationparser.py now literally just parses annotations; it's no longer in the business of e.g. guessing transfer too. finaltransformer.py is a new file which does post-analysis for "introspectability" mainly. girparser.c is fixed for some introspectable=0 processing.
Diffstat (limited to 'docs')
-rw-r--r--docs/g-ir-scanner.160
1 files changed, 21 insertions, 39 deletions
diff --git a/docs/g-ir-scanner.1 b/docs/g-ir-scanner.1
index 3b071e87..7e08d1d8 100644
--- a/docs/g-ir-scanner.1
+++ b/docs/g-ir-scanner.1
@@ -82,21 +82,30 @@ to pass the argument to this function to g_irepository_dump.
.B \--program-arg=ARG
Additional argument to pass to program for introspection.
.TP
-.B \--strip-prefix=PREFIX
-If this option is specified a prefix will be stripped from all functions.
-If not specified, the lower case version of the namespace will be used.
-Eg, a strip prefix of
-.B g_
-and a namespace set to
-.B GLib
-will export the function
-.B g_type_name
-as
-.B GLib.type_name.
+.B \--identifier-prefix=PREFIX
+This option may be specified multiple times. Each one
+gives a prefix that will be stripped from all C identifiers.
+If none specified, the namespace will be used.
+Eg, an identifier prefix of
+.B Foo
+will export the identifier
+.B typdef struct _FooBar FooBar;
+as
+.B Foo.Bar.
+.TP
+.B \--symbol-prefix=PREFIX
+This option may be specified multiple times. Each one
+gives a prefix that will be stripped from all C symbols.
+Eg, an symbol prefix of
+.B foo
+will export the symbol
+.B foo_bar_do_something
+as
+.B Foo.Bar.do_something.
.TP
.B \--output=FILENAME
Name of the file to output. Normally namespace + format extension.
-Eg, GLib.gir.
+Eg, GLib-2.0.gir.
.TP
.B \--pkg=PACKAGE
List of pkg-config packages to get compiler and linker flags from.
@@ -112,33 +121,6 @@ If not specified, the packages specified with --pkg= will be used.
.B \--verbose
Be verbose, include some debugging information.
.TP
-.B \--typelib-xml
-Convert the resulting xml to only output the types relevant
-to the typelib compiler. This is mainly useful for verifying the
-correctness of the typelib itself.
-.TP
-.B \--inject=FILENAME
-Injects a variant of a GIR file into the scanner. This is used to add
-custom functions to a GIR wrapping a library without modifying the upstream
-library itself. The Format of the inject file is similar to a GIR,
-but the root node is <injections> rather than <repository> and
-<inject path="..."> where ... is an xpath expression.
-
-Example:
-
- <inject path="namespace/class[@name='TestDrawable']">
- <method name="get_width" c:identifier="girepo_test_drawable_get_width">
- <return-value transfer-ownership="none">
- <type name="int" c:type="gint"/>
- </return-value>
- </method>
- </inject>
-
-The example above will add a new method called get_with to the TestDrawable class.
-.TP
-.B \--xpath-assertions=FILENAME
-Loads a list xpath assertions from FILENAME, this is useful for verifying
-that the GIR itself is properly generated.
.SH ENVIRONMENT VARIABLES
The g-ir-scanner uses the XDG_DATA_DIRS variable to check for dirs,
the gir's are located in XDG_DATA_DIRS/share/gir-1.0. It is normally