[gtk-doc] style: add more classes and tweak styling



commit 4fb5f27bb3db0561927f8e4ad7d0e6f7f0a275bf
Author: Stefan Sauer <ensonic users sf net>
Date:   Fri Feb 14 22:28:46 2014 +0100

    style: add more classes and tweak styling
    
    Fix some bad uses of "c_punctuation". Also hide parameters for macros in toc.
    Apply "c_punctuation" to () in function pointers. Drop the 'c_punctuation' from
    the function doc heading.

 gtkdoc-mkdb.in  |   28 ++++++----------------------
 style/style.css |    6 +++++-
 2 files changed, 11 insertions(+), 23 deletions(-)
---
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index 35247b6..cc950c5 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -1462,23 +1462,7 @@ sub OutputMacro {
     $desc .= OutputSymbolExtraLinks($symbol);
 
     if (@fields) {
-        if (length ($symbol) < $SYMBOL_FIELD_WIDTH) {
-            $synop .= (' ' x ($SYMBOL_FIELD_WIDTH - length ($symbol)));
-        }
-
-        $synop .= "(";
-        for (my $i = 1; $i <= $#fields; $i += 2) {
-            my $field_name = $fields[$i];
-
-            if ($i == 1) {
-                $synop .= "$field_name";
-            } else {
-                $synop .= ",\n"
-                    . (' ' x ($SYMBOL_FIELD_WIDTH + $RETURN_TYPE_FIELD_WIDTH))
-                    . " $field_name";
-            }
-        }
-        $synop .= ")";
+        $synop .= "<phrase role=\"c_punctuation\">()</phrase>";
     }
     $synop .= "</entry></row>\n";
 
@@ -1541,7 +1525,7 @@ sub OutputTypedef {
     my $id = &CreateValidSGMLID ($symbol);
     my $condition = &MakeConditionDescription ($symbol);
     my $desc = "<refsect2 id=\"$id\" role=\"typedef\"$condition>\n<title>$symbol</title>\n";
-    my $synop = "<row><entry role=\"c_punctuation\">typedef</entry><entry role=\"function_name\"><link 
linkend=\"$id\">$symbol</link></entry></row>\n";
+    my $synop = "<row><entry role=\"typedef_keyword\">typedef</entry><entry role=\"function_name\"><link 
linkend=\"$id\">$symbol</link></entry></row>\n";
 
     $desc .= MakeIndexterms($symbol, $id);
     $desc .= "\n";
@@ -2106,7 +2090,7 @@ sub OutputVariable {
     } else {
         $type_output = "extern";
     }
-    my $synop = "<row><entry role=\"c_punctuation\">${type_output}</entry><entry 
role=\"function_name\"><link linkend=\"$id\">$symbol</link></entry></row>\n";
+    my $synop = "<row><entry role=\"variable_type\">${type_output}</entry><entry 
role=\"function_name\"><link linkend=\"$id\">$symbol</link></entry></row>\n";
 
     my $desc = "<refsect2 id=\"$id\" role=\"variable\"$condition>\n<title>$symbol</title>\n";
 
@@ -2166,9 +2150,9 @@ sub OutputFunction {
     my $char1 = my $char2 = my $char3 = "";
     if ($symbol_type eq 'USER_FUNCTION') {
         $indent_len += 3;
-        $char1 = "(";
+        $char1 = "<phrase role=\"c_punctuation\">(</phrase>";
         $char2 = "*";
-        $char3 = ")";
+        $char3 = "<phrase role=\"c_punctuation\">)</phrase>";
     }
 
     my ($symbol_output, $symbol_desc_output);
@@ -2183,7 +2167,7 @@ sub OutputFunction {
 
     my $synop = "<row><entry role=\"function_type\">${ret_type_output}</entry><entry 
role=\"function_name\">${symbol_output}&#160;<phrase role=\"c_punctuation\">()</phrase></entry></row>\n";
 
-    my $desc = "<refsect2 id=\"$id\" role=\"function\"$condition>\n<title>${symbol}&#160;<phrase 
role=\"c_punctuation\">()</phrase></title>\n";
+    my $desc = "<refsect2 id=\"$id\" role=\"function\"$condition>\n<title>${symbol}&#160;()</title>\n";
 
     $desc .= MakeIndexterms($symbol, $id);
     $desc .= "\n";
diff --git a/style/style.css b/style/style.css
index 9c17d50..705a5c9 100644
--- a/style/style.css
+++ b/style/style.css
@@ -191,13 +191,15 @@ div.informaltable table td, div.informaltable table th
 }
 
 .function_type,
+.variable_type,
 .property_type,
 .signal_type,
 .parameter_name,
 .struct_member_name,
 .union_member_name,
 .define_keyword,
-.datatype_keyword
+.datatype_keyword,
+.typedef_keyword
 {
   text-align: right;
 }
@@ -205,10 +207,12 @@ div.informaltable table td, div.informaltable table th
 /* dim non-primary columns */
 .c_punctuation,
 .function_type,
+.variable_type,
 .property_type,
 .signal_type,
 .define_keyword,
 .datatype_keyword,
+.typedef_keyword,
 .property_flags,
 .signal_flags,
 .parameter_annotations,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]