[gtksourceviewmm] Codegen fixes.



commit 45111a49936b1049d6c5ec663a8a2c87d7ca76b9
Author: Krzesimir Nowak <qdlacz gmail com>
Date:   Sun Mar 27 15:51:15 2011 +0200

    Codegen fixes.
    
    * codegen/extradefs/generate_extra_defs_gtksourceview.cc: Use proper
    GType macros.
    * codegen/m4/convert_gtksourceview.m4: Ran source_truncate.pl on it
    and fixed enum conversions.

 .../extradefs/generate_extra_defs_gtksourceview.cc |   44 ++++----
 codegen/m4/convert_gtksourceview.m4                |  116 ++++++++++----------
 codegen/m4/filelist.am                             |    3 +-
 3 files changed, 82 insertions(+), 81 deletions(-)
---
diff --git a/codegen/extradefs/generate_extra_defs_gtksourceview.cc b/codegen/extradefs/generate_extra_defs_gtksourceview.cc
index f0e72bf..8b47bc3 100644
--- a/codegen/extradefs/generate_extra_defs_gtksourceview.cc
+++ b/codegen/extradefs/generate_extra_defs_gtksourceview.cc
@@ -49,28 +49,28 @@ int main (int argc, char *argv[])
 {
   gtk_init(&argc, &argv);
 
-  std::cout << get_defs (GTK_TYPE_SOURCE_BUFFER)
-            << get_defs (GTK_TYPE_SOURCE_COMPLETION)
-            << get_defs (GTK_TYPE_SOURCE_COMPLETION_CONTEXT)
-            << get_defs (GTK_TYPE_SOURCE_COMPLETION_INFO)
-            << get_defs (GTK_TYPE_SOURCE_COMPLETION_ITEM)
-            << get_defs (GTK_TYPE_SOURCE_COMPLETION_PROPOSAL)
-            << get_defs (GTK_TYPE_SOURCE_COMPLETION_PROVIDER)
-            << get_defs (GTK_TYPE_SOURCE_GUTTER)
-            << get_defs (GTK_TYPE_SOURCE_GUTTER_RENDERER)
-            << get_defs (GTK_TYPE_SOURCE_GUTTER_RENDERER_PIXBUF)
-            << get_defs (GTK_TYPE_SOURCE_GUTTER_RENDERER_TEXT)
-            << get_defs (GTK_TYPE_SOURCE_LANGUAGE)
-            << get_defs (GTK_TYPE_SOURCE_LANGUAGE_MANAGER)
-            << get_defs (GTK_TYPE_SOURCE_MARK)
-            << get_defs (GTK_TYPE_SOURCE_MARK_ATTRIBUTES)
-            << get_defs (GTK_TYPE_SOURCE_PRINT_COMPOSITOR)
-            << get_defs (GTK_TYPE_SOURCE_STYLE)
-            << get_defs (GTK_TYPE_SOURCE_STYLE_SCHEME)
-            << get_defs (GTK_TYPE_SOURCE_STYLE_SCHEME_MANAGER)
-            << get_defs (GTK_TYPE_SOURCE_UNDO_MANAGER)
-            << get_defs (GTK_TYPE_SOURCE_VIEW)
+  std::cout << get_defs (GTK_SOURCE_TYPE_BUFFER)
+            << get_defs (GTK_SOURCE_TYPE_COMPLETION)
+            << get_defs (GTK_SOURCE_TYPE_COMPLETION_CONTEXT)
+            << get_defs (GTK_SOURCE_TYPE_COMPLETION_INFO)
+            << get_defs (GTK_SOURCE_TYPE_COMPLETION_ITEM)
+            << get_defs (GTK_SOURCE_TYPE_COMPLETION_PROPOSAL)
+            << get_defs (GTK_SOURCE_TYPE_COMPLETION_PROVIDER)
+            << get_defs (GTK_SOURCE_TYPE_GUTTER)
+            << get_defs (GTK_SOURCE_TYPE_GUTTER_RENDERER)
+            << get_defs (GTK_SOURCE_TYPE_GUTTER_RENDERER_PIXBUF)
+            << get_defs (GTK_SOURCE_TYPE_GUTTER_RENDERER_TEXT)
+            << get_defs (GTK_SOURCE_TYPE_LANGUAGE)
+            << get_defs (GTK_SOURCE_TYPE_LANGUAGE_MANAGER)
+            << get_defs (GTK_SOURCE_TYPE_MARK)
+            << get_defs (GTK_SOURCE_TYPE_MARK_ATTRIBUTES)
+            << get_defs (GTK_SOURCE_TYPE_PRINT_COMPOSITOR)
+            << get_defs (GTK_SOURCE_TYPE_STYLE)
+            << get_defs (GTK_SOURCE_TYPE_STYLE_SCHEME)
+            << get_defs (GTK_SOURCE_TYPE_STYLE_SCHEME_MANAGER)
+            << get_defs (GTK_SOURCE_TYPE_UNDO_MANAGER)
+            << get_defs (GTK_SOURCE_TYPE_VIEW)
 
-            << get_defs (GTK_TYPE_SOURCE_COMPLETION_WORDS);
+            << get_defs (GTK_SOURCE_TYPE_COMPLETION_WORDS);
   return 0;
 }
diff --git a/codegen/m4/convert_gtksourceview.m4 b/codegen/m4/convert_gtksourceview.m4
index f0e8ff6..4a66520 100644
--- a/codegen/m4/convert_gtksourceview.m4
+++ b/codegen/m4/convert_gtksourceview.m4
@@ -13,106 +13,106 @@
 #
 
 
-# GtkSourceBuffer -> Gsv::SourceBuffer
-_CONVERSION(`GtkSourceBuffer*',`Glib::RefPtr<SourceBuffer>',`Glib::wrap($3)')
+# GtkSourceBuffer -> Gsv::Buffer
+_CONVERSION(`GtkSourceBuffer*',`Glib::RefPtr<Buffer>',`Glib::wrap($3)')
 
 
-# Gsv::SourceBuffer -> GtkSourceBuffer
-_CONVERSION(`const Glib::RefPtr<SourceBuffer>&',`GtkSourceBuffer*',__CONVERT_REFPTR_TO_P)
+# Gsv::Buffer -> GtkSourceBuffer
+_CONVERSION(`const Glib::RefPtr<Buffer>&',`GtkSourceBuffer*',__CONVERT_REFPTR_TO_P)
 
 
-# GtkSourceCompletion -> Gsv::SourceCompletion
-_CONVERSION(`GtkSourceCompletion*',`Glib::RefPtr<SourceCompletion>',`Glib::wrap($3)')
+# GtkSourceCompletion -> Gsv::Completion
+_CONVERSION(`GtkSourceCompletion*',`Glib::RefPtr<Completion>',`Glib::wrap($3)')
 
 
-# GtkSourceCompletionContext -> Gsv::SourceCompletionContext
-_CONVERSION(`GtkSourceCompletionContext*',`Glib::RefPtr<SourceCompletionContext>',`Glib::wrap($3)')
+# GtkSourceCompletionContext -> Gsv::CompletionContext
+_CONVERSION(`GtkSourceCompletionContext*',`Glib::RefPtr<CompletionContext>',`Glib::wrap($3)')
 
 
-# Gsv::SourceCompletionContext -> GtkSourceCompletionContext
-_CONVERSION(`const Glib::RefPtr<SourceCompletionContext>&',`GtkSourceCompletionContext*',`Glib::unwrap($3)')
-_CONVERSION(`const Glib::RefPtr<const SourceCompletionContext>&',`GtkSourceCompletionContext*',`const_cast<GtkSourceCompletionContext*>(Glib::unwrap($3))')
+# Gsv::CompletionContext -> GtkSourceCompletionContext
+_CONVERSION(`const Glib::RefPtr<CompletionContext>&',`GtkSourceCompletionContext*',`Glib::unwrap($3)')
+_CONVERSION(`const Glib::RefPtr<const CompletionContext>&',`GtkSourceCompletionContext*',`const_cast<GtkSourceCompletionContext*>(Glib::unwrap($3))')
 
 
-# GtkSourceCompletionInfo -> Gsv::SourceCompletionInfo
-_CONVERSION(`GtkSourceCompletionInfo*',`SourceCompletionInfo*',`Glib::wrap($3)')
+# GtkSourceCompletionInfo -> Gsv::CompletionInfo
+_CONVERSION(`GtkSourceCompletionInfo*',`CompletionInfo*',`Glib::wrap($3)')
 
 
-# Gsv::SourceCompletionInfo -> GtkSourceCompletionInfo
-_CONVERSION(`const SourceCompletionInfo&',`GtkSourceCompletionInfo*',`const_cast<GtkSourceCompletionInfo*>(($3).gobj())')
+# Gsv::CompletionInfo -> GtkSourceCompletionInfo
+_CONVERSION(`const CompletionInfo&',`GtkSourceCompletionInfo*',`const_cast<GtkSourceCompletionInfo*>(($3).gobj())')
 
 
-# Gsv::SourceCompletionProposal -> GtkSourceCompletionProposal
-_CONVERSION(`const Glib::RefPtr<const SourceCompletionProposal>&',`GtkSourceCompletionProposal*',`const_cast<GtkSourceCompletionProposal*>(Glib::unwrap($3))')
-_CONVERSION(`const Glib::RefPtr<SourceCompletionProposal>&',`GtkSourceCompletionProposal*',`Glib::unwrap($3)')
+# Gsv::CompletionProposal -> GtkSourceCompletionProposal
+_CONVERSION(`const Glib::RefPtr<const CompletionProposal>&',`GtkSourceCompletionProposal*',`const_cast<GtkSourceCompletionProposal*>(Glib::unwrap($3))')
+_CONVERSION(`const Glib::RefPtr<CompletionProposal>&',`GtkSourceCompletionProposal*',`Glib::unwrap($3)')
 
 
-# Gsv::SourceCompletionProvider -> GtkSourceCompletionProvider
-_CONVERSION(`const Glib::RefPtr<SourceCompletionProvider>&',`GtkSourceCompletionProvider*',`Glib::unwrap($3)')
+# Gsv::CompletionProvider -> GtkSourceCompletionProvider
+_CONVERSION(`const Glib::RefPtr<CompletionProvider>&',`GtkSourceCompletionProvider*',`Glib::unwrap($3)')
 
 
-# GtkSourceGutter -> Gsv::SourceGutter
-_CONVERSION(`GtkSourceGutter*',`Glib::RefPtr<SourceGutter>',`Glib::wrap($3)')
+# GtkSourceGutter -> Gsv::Gutter
+_CONVERSION(`GtkSourceGutter*',`Glib::RefPtr<Gutter>',`Glib::wrap($3)')
 
 
-# Gsv::SourceGutterRenderer -> GtkSourceGutterRenderer
-_CONVERSION(`SourceGutterRenderer*',`GtkSourceGutterRenderer*',`($3)->gobj()')
+# Gsv::GutterRenderer -> GtkSourceGutterRenderer
+_CONVERSION(`GutterRenderer*',`GtkSourceGutterRenderer*',`($3)->gobj()')
 
 
-# GtkSourceLanguage -> Gsv::SourceLanguage
-_CONVERSION(`GtkSourceLanguage*',`Glib::RefPtr<SourceLanguage>',`Glib::wrap($3)')
+# GtkSourceLanguage -> Gsv::Language
+_CONVERSION(`GtkSourceLanguage*',`Glib::RefPtr<Language>',`Glib::wrap($3)')
 
 
-# Gsv::SourceLanguage -> GtkSourceLanguage
-_CONVERSION(`const Glib::RefPtr<SourceLanguage>&',`GtkSourceLanguage*',`Glib::unwrap($3)')
+# Gsv::Language -> GtkSourceLanguage
+_CONVERSION(`const Glib::RefPtr<Language>&',`GtkSourceLanguage*',`Glib::unwrap($3)')
 
 
-# GtkSourceLanguageManager -> Gsv::SourceLanguageManager
-_CONVERSION(`GtkSourceLanguageManager*',`Glib::RefPtr<SourceLanguageManager>',`Glib::wrap($3)')
+# GtkSourceLanguageManager -> Gsv::LanguageManager
+_CONVERSION(`GtkSourceLanguageManager*',`Glib::RefPtr<LanguageManager>',`Glib::wrap($3)')
 
 
-# GtkSourceMark -> Gsv::SourceMark
-_CONVERSION(`GtkSourceMark*',`Glib::RefPtr<SourceMark>',`Glib::wrap($3)')
+# GtkSourceMark -> Gsv::Mark
+_CONVERSION(`GtkSourceMark*',`Glib::RefPtr<Gsv::Mark>',`Glib::wrap($3)')
 
 
-# Gsv::SourceMark -> GtkSourceMark
-_CONVERSION(`const Glib::RefPtr<SourceMark>&',`GtkSourceMark*',`Glib::unwrap($3)')
+# Gsv::Mark -> GtkSourceMark
+_CONVERSION(`const Glib::RefPtr<Mark>&',`GtkSourceMark*',`Glib::unwrap($3)')
 
 
-# GtkSourceMarkAttributes -> Gsv::SourceMarkAttributes
-_CONVERSION(`'GtkSourceMarkAttributes*,`Glib::RefPtr<SourceMarkAttributes>',`Glib::wrap($3)')
+# GtkSourceMarkAttributes -> Gsv::MarkAttributes
+_CONVERSION(`'GtkSourceMarkAttributes*,`Glib::RefPtr<MarkAttributes>',`Glib::wrap($3)')
 
 
-# Gsv::SourceMarkAttributes -> GtkSourceMarkAttributes
-_CONVERSION(`const Glib::RefPtr<SourceMarkAttributes>&',`GtkSourceMarkAttributes*',`Glib::unwrap($3)')
+# Gsv::MarkAttributes -> GtkSourceMarkAttributes
+_CONVERSION(`const Glib::RefPtr<MarkAttributes>&',`GtkSourceMarkAttributes*',`Glib::unwrap($3)')
 
 
-# GtkSourceStyle -> Gsv::SourceStyle
-_CONVERSION(`GtkSourceStyle*',`Glib::RefPtr<SourceStyle>',`Glib::wrap($3)')
+# GtkSourceStyle -> Gsv::Style
+_CONVERSION(`GtkSourceStyle*',`Glib::RefPtr<Style>',`Glib::wrap($3)')
 
 
-# GtkSourceStyleScheme -> Gsv::SourceStyleScheme
-_CONVERSION(`GtkSourceStyleScheme*',`Glib::RefPtr<SourceStyleScheme>',`Glib::wrap($3)')
+# GtkSourceStyleScheme -> Gsv::StyleScheme
+_CONVERSION(`GtkSourceStyleScheme*',`Glib::RefPtr<StyleScheme>',`Glib::wrap($3)')
 
 
-# Gsv::SourceStyleScheme -> GtkSourceStyleScheme
-_CONVERSION(`const Glib::RefPtr<SourceStyleScheme>&',`GtkSourceStyleScheme*',`Glib::unwrap($3)')
+# Gsv::StyleScheme -> GtkSourceStyleScheme
+_CONVERSION(`const Glib::RefPtr<StyleScheme>&',`GtkSourceStyleScheme*',`Glib::unwrap($3)')
 
 
-# GtkSourceStyleSchemeManager -> Gsv::SourceStyleSchemeManager
-_CONVERSION(`GtkSourceStyleSchemeManager*',`Glib::RefPtr<SourceStyleSchemeManager>',`Glib::wrap($3)')
+# GtkSourceStyleSchemeManager -> Gsv::StyleSchemeManager
+_CONVERSION(`GtkSourceStyleSchemeManager*',`Glib::RefPtr<StyleSchemeManager>',`Glib::wrap($3)')
 
 
-# GtkSourceUndoManager -> Gsv::SourceUndoManager
-_CONVERSION(`GtkSourceUndoManager*',`Glib::RefPtr<SourceUndoManager>',`Glib::wrap($3)')
+# GtkSourceUndoManager -> Gsv::UndoManager
+_CONVERSION(`GtkSourceUndoManager*',`Glib::RefPtr<UndoManager>',`Glib::wrap($3)')
 
 
-# Gsv::SourceUndoManager -> GtkSourceUndoManager
-_CONVERSION(`const Glib::RefPtr<const SourceUndoManager>&',`GtkSourceUndoManager*',`const_cast<GtkSourceUndoManager*>(Glib::unwrap($3))')
+# Gsv::UndoManager -> GtkSourceUndoManager
+_CONVERSION(`const Glib::RefPtr<const UndoManager>&',`GtkSourceUndoManager*',`const_cast<GtkSourceUndoManager*>(Glib::unwrap($3))')
 
 
-# GtkSourceView -> Gsv::SourceView
-_CONVERSION(`GtkSourceView*',`SourceView*',`Glib::wrap($3)')
+# GtkSourceView -> Gsv::View
+_CONVERSION(`GtkSourceView*',`View*',`Glib::wrap($3)')
 
 
 #
@@ -120,9 +120,9 @@ _CONVERSION(`GtkSourceView*',`SourceView*',`Glib::wrap($3)')
 #
 
 
-_CONV_ENUM(Gtk,SourceSmartHomeEndType)
-_CONV_ENUM(Gtk,SourceDrawSpacesFlags)
-_CONV_ENUM(Gtk,SourceCompletionActivation)
-_CONV_ENUM(Gtk,SourceBracketMatchType)
-_CONV_ENUM(Gtk,SourceGutterRendererState)
-_CONV_ENUM(Gtk,SourceGutterRendererAlignmentMode)
+_CONV_ENUM(GtkSource,SmartHomeEndType)
+_CONV_ENUM(GtkSource,DrawSpacesFlags)
+_CONV_ENUM(GtkSource,CompletionActivation)
+_CONV_ENUM(GtkSource,BracketMatchType)
+_CONV_ENUM(GtkSource,GutterRendererState)
+_CONV_ENUM(GtkSource,GutterRendererAlignmentMode)
diff --git a/codegen/m4/filelist.am b/codegen/m4/filelist.am
index 96b9925..c388562 100644
--- a/codegen/m4/filelist.am
+++ b/codegen/m4/filelist.am
@@ -1,2 +1,3 @@
-files_codegen_m4 = convert_gtksourceview.m4	\
+files_codegen_m4 =			\
+	convert_gtksourceview.m4	\
 	convert.m4



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