Example #1
0
        if opt in ('-s', '--source-dir'):
            source_dirs.append(arg)
        if opt in ('-a', '--with-annotations'):
            with_annotations = True
        if opt in ('-p', '--with-properties'):
            with_properties = True
        if opt in ('-n', '--no-since'):
            docextract.no_since = True
        if opt in ('-i', '--no-signals'):
            with_signals = False
        if opt in ('-e', '--no-enums'):
            with_enums = False
    if len(args) != 0:
        usage()

    docs = docextract.extract(source_dirs);
    docextract.extract_tmpl(source_dirs, docs); #Try the tmpl sgml files too.

    # print d.docs

    if docs:

        print("<root>")

        for name, value in sorted(docs.items()):
            # Get the type of comment block ('function', 'signal' or
            # 'property') (the value is a GtkDoc).
            block_type = value.get_type()

            # Skip signals if the option was not specified.
            if block_type == 'signal' and not with_signals:
Example #2
0
 def add_sourcedirs(self, source_dirs):
     self.docs = docextract.extract(source_dirs, self.docs)
Example #3
0
    with_annotations = False
    with_signals = False
    with_properties = False
    for opt, arg in opts:
        if opt in ('-s', '--source-dir'):
            source_dirs.append(arg)
        if opt in ('-a', '--with-annotations'):
            with_annotations = True
        if opt in ('-p', '--with-properties'):
            with_properties = True
        if opt in ('-i', '--with-signals'):
            with_signals = True
    if len(args) != 0:
        usage()

    docs = docextract.extract(source_dirs)
    docextract.extract_tmpl(source_dirs, docs)
    #Try the tmpl sgml files too.

    # print d.docs

    if docs:

        print "<root>"

        for name, value in sorted(docs.items()):
            # Get the type of comment block ('function', 'signal' or
            # 'property') (the value is a GtkDoc).
            block_type = value.get_type()

            # Skip signals if the option was not specified.
Example #4
0
        elif opt in ('-p', '--with-properties'):
            with_properties = True
        elif opt in ('-c', '--with-sections'):
            with_sections = True
        elif opt in ('-r', '--no-recursion'):
            docextract.no_recursion = True
        elif opt in ('-n', '--no-since'):
            docextract.no_since = True
        elif opt in ('-i', '--no-signals'):
            with_signals = False
        elif opt in ('-e', '--no-enums'):
            with_enums = False
    if len(args) != 0:
        usage()

    docs = docextract.extract(source_dirs, exclude_files);
    docextract.extract_tmpl(source_dirs, exclude_files, docs); #Try the tmpl sgml files too.

    # print d.docs

    if docs:

        print("<root>")

        for name, value in sorted(docs.items()):
            # Get the type of comment block ('function', 'signal',
            # 'property', 'section' or 'enum') (the value is a GtkDoc).
            block_type = value.get_type()

            # Skip signals if the option was not specified.
            if block_type == 'signal' and not with_signals:
Example #5
0
        elif opt in ('-p', '--with-properties'):
            with_properties = True
        elif opt in ('-c', '--with-sections'):
            with_sections = True
        elif opt in ('-r', '--no-recursion'):
            docextract.no_recursion = True
        elif opt in ('-n', '--no-since'):
            docextract.no_since = True
        elif opt in ('-i', '--no-signals'):
            with_signals = False
        elif opt in ('-e', '--no-enums'):
            with_enums = False
    if len(args) != 0:
        usage()

    docs = docextract.extract(source_dirs, exclude_files)
    docextract.extract_tmpl(source_dirs, exclude_files, docs)
    #Try the tmpl sgml files too.

    # print d.docs

    if docs:

        print("<root>")

        for name, value in sorted(docs.items()):
            # Get the type of comment block ('function', 'signal',
            # 'property', 'section' or 'enum') (the value is a GtkDoc).
            block_type = value.get_type()

            # Skip signals if the option was not specified.
Example #6
0
 def add_sourcedirs(self, source_dirs):
     self.docs = docextract.extract(source_dirs, self.docs)
        codegendir = sys.argv[i]
        del sys.argv[i]
    elif arg.startswith('--codegendir='):
        codegendir = arg.split('=', 2)[1]
        del sys.argv[i]
    else:
        i += 1
if codegendir:
    sys.path.insert(0, codegendir)
del codegendir

# Load it
import docextract, defsparser, override, definitions, string


docs = docextract.extract(doc_dirs)

p = defsparser.DefsParser(defs_file)

p.startParsing()
# create list of class
c_class_list = []
for obj in p.objects:
   c_class_list.append(get_c_name(obj.c_name))

add_override_methods(p)

f = file(wrap_file)
wrap_file_cont = f.read()
override_file_cont = ""
override = override.Overrides()