Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 11f33638bcce5efb863f0192b8f70f21 > files > 117

gtksourceviewmm3-doc-3.0.0-1.fc15.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>gtksourceviewmm: Migration from 2.0 to 3.0</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">gtksourceviewmm&#160;<span id="projectnumber">3.0.0</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<h1>Migration from 2.0 to 3.0 </h1> </div>
</div>
<div class="contents">
<div class="textblock"><p>This page lists some notable API/ABI breaks.</p>
<p>Probably not all were listed, but this is provided in hope that with help of this page migrating from gtksourceviewmm-2.0 to 3.0 won't be a cause of headaches.</p>
<ul>
<li>
Stuff marked as deprecated was removed of course. </li>
<li>
Removed Source prefix from all types, SOURCE_ prefix from all enum value names and source prefix from all file names. There is a helper script called source_truncate.pl in git repository in codegen directory to aid programmer in boring task of renaming everything. </li>
<li>
"source-mark-updated" signal in <a class="el" href="classGsv_1_1Buffer.html" title="Buffer object for View.">Gsv::Buffer</a> now takes <a class="elRef" href="../../../gtkmm-3.0/reference/html/classGtk_1_1TextMark.html">Gtk::TextMark</a> instead of Mark. </li>
<li>
Vfuncs in <a class="el" href="classGsv_1_1CompletionProposal.html" title="Completion proposal object.">Gsv::CompletionProposal</a>, <a class="el" href="classGsv_1_1CompletionProvider.html" title="Completion provider interface.">Gsv::CompletionProvider</a> and <a class="el" href="classGsv_1_1UndoManager.html" title="Undo manager interface for View.">Gsv::UndoManager</a> are now private. They shouldn't be called directly anyway - there are respective methods for this. </li>
<li>
Some methods now takes <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01202.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> instead of <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1ustring.html">Glib::ustring</a>. These are: <ul>
<li>
<a class="el" href="classGsv_1_1LanguageManager.html#a7ca7ee1059f086a01ef805ef5931486b" title="Gets the list directories where language manager looks for language files.">Gsv::LanguageManager::get_search_path()</a> </li>
<li>
<a class="el" href="classGsv_1_1LanguageManager.html#ac524730cff2f25a747f18deaf5e621f9" title="Sets the list of directories where the language manager looks for language files.">Gsv::LanguageManager::set_search_path()</a> </li>
<li>
<a class="el" href="classGsv_1_1LanguageManager.html#ae691cb6f6d331677225894641db360b0" title="Returns the ids of the available languages.">Gsv::LanguageManager::get_language_ids()</a> </li>
<li>
<a class="el" href="classGsv_1_1LanguageManager.html#a6bb00efcb29d98e69d8c70ca83e8dddf" title="Gets the Language identified by the given id in the language manager.">Gsv::LanguageManager::get_language()</a> </li>
<li>
<a class="el" href="classGsv_1_1LanguageManager.html#adf16d8729a9a604d0bac606cf058da0a" title="Picks a Language for given file name and content type, according to the information in lang files...">Gsv::LanguageManager::guess_language()</a> </li>
<li>
<a class="el" href="classGsv_1_1StyleSchemeManager.html#abba091f6530fc57678a8dc1003bd9c0a" title="Sets the list of directories where the manager looks for style scheme files.">Gsv::StyleSchemeManager::set_search_path()</a> </li>
<li>
<a class="el" href="classGsv_1_1StyleSchemeManager.html#a1137bd67ce073bc2768600b69c83b75c" title="Returns the current search path for the manager.">Gsv::StyleSchemeManager::get_search_path()</a> </li>
<li>
<a class="el" href="classGsv_1_1StyleSchemeManager.html#aefc03f29d856154e2b05c2e077908618" title="Appends path to the list of directories where the manager looks for style scheme files.">Gsv::StyleSchemeManager::append_search_path()</a> </li>
<li>
<a class="el" href="classGsv_1_1StyleSchemeManager.html#a3f7174b9d3baa1b6765b9b2be5c84f1f" title="Prepends path to the list of directories where the manager looks for style scheme files...">Gsv::StyleSchemeManager::prepend_search_path()</a> </li>
<li>
<a class="el" href="classGsv_1_1StyleSchemeManager.html#ab193fb63b61b64e2a88be1c87493a3dc" title="Looks up style scheme by id.">Gsv::StyleSchemeManager::get_scheme()</a> </li>
<li>
<a class="el" href="classGsv_1_1StyleSchemeManager.html#ae6fd9e8fa78bf322b24436ac0d89957f" title="Returns the ids of the available style schemes.">Gsv::StyleSchemeManager::get_scheme_ids()</a> </li>
</ul>
</li>
<li>
<a class="el" href="classGsv_1_1Mark.html" title="Mark class for Buffer.">Gsv::Mark</a>'s constructor with category and name has parameter order the same as C gtk_source_mark_new(). Previously parameter order was reversed, because name parameter could be omitted - it has a default value of empty string, which was interpreted as creating anonymous <a class="el" href="classGsv_1_1Mark.html" title="Mark class for Buffer.">Gsv::Mark</a>. Now there is separate constructor for creating anonymous SourceMarks. If there was: <div class="fragment"><pre class="fragment"> <a class="codeRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1RefPtr.html">Glib::RefPtr&lt;Gsv::Mark&gt;</a> sm (<a class="code" href="classGsv_1_1Mark.html#a8c554f25d8051ef306770ed5376f1094" title="Creates an anonymous text mark.">Gsv::Mark::create</a> (<span class="stringliteral">&quot;category&quot;</span>, <span class="stringliteral">&quot;name&quot;</span>));
</pre></div> Now should be: <div class="fragment"><pre class="fragment"> <a class="codeRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1RefPtr.html">Glib::RefPtr&lt;Gsv::Mark&gt;</a> sm (<a class="code" href="classGsv_1_1Mark.html#a8c554f25d8051ef306770ed5376f1094" title="Creates an anonymous text mark.">Gsv::Mark::create</a> (<span class="stringliteral">&quot;name&quot;</span>, <span class="stringliteral">&quot;category&quot;</span>));
</pre></div> If there was: <div class="fragment"><pre class="fragment"> <a class="codeRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1RefPtr.html">Glib::RefPtr&lt;Gsv::Mark&gt;</a> sm (<a class="code" href="classGsv_1_1Mark.html#a8c554f25d8051ef306770ed5376f1094" title="Creates an anonymous text mark.">Gsv::Mark::create</a> (<span class="stringliteral">&quot;category&quot;</span>));
</pre></div> Nothing needs to be changed. If there was: <div class="fragment"><pre class="fragment"> <a class="codeRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1RefPtr.html">Glib::RefPtr&lt;Gsv::Mark&gt;</a> sm (<a class="code" href="classGsv_1_1Mark.html#a8c554f25d8051ef306770ed5376f1094" title="Creates an anonymous text mark.">Gsv::Mark::create</a> (<span class="stringliteral">&quot;category&quot;</span>, <span class="stringliteral">&quot;&quot;</span>));
</pre></div> Now should be: <div class="fragment"><pre class="fragment"> <a class="codeRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1RefPtr.html">Glib::RefPtr&lt;Gsv::Mark&gt;</a> sm (<a class="code" href="classGsv_1_1Mark.html#a8c554f25d8051ef306770ed5376f1094" title="Creates an anonymous text mark.">Gsv::Mark::create</a> (<span class="stringliteral">&quot;category&quot;</span>));
</pre></div> </li>
<li>
If there is a code that somehow depended on <a class="el" href="classGsv_1_1StyleScheme.html" title="Object controlling appearance of View.">Gsv::StyleScheme</a> being a <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1Interface.html">Glib::Interface</a>, then this code is wrong, because it should always be a <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1Object.html">Glib::Object</a>. </li>
<li>
SourceIter is gone - all its features are now supported by <a class="elRef" href="../../../gtkmm-3.0/reference/html/classGtk_1_1TextIter.html">Gtk::TextIter</a>. </li>
<li>
<a class="el" href="classGsv_1_1Completion.html" title="Main Completion Object.">Gsv::Completion</a> is now a <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1Object.html">Glib::Object</a>, not <a class="elRef" href="../../../gtkmm-3.0/reference/html/classGtk_1_1Object.html">Gtk::Object</a>. So it should be used as Glib::RefPtr&lt;Gsv::Completion&gt; instead of plain <a class="el" href="classGsv_1_1Completion.html" title="Main Completion Object.">Gsv::Completion</a>. </li>
<li>
Namespace <b>gtksourceview</b> was renamed to <b>Gsv</b>. If there is a lot of code using <b>gtksourceview</b> namespace then a workaround would be creating a backward compatibility header and including it a place included by affected sources. A header could contain a lines like that: <div class="fragment"><pre class="fragment"><span class="preprocessor"> #ifndef GTKSOURCEVIEWMM_COMPAT_H</span>
<span class="preprocessor"></span><span class="preprocessor"> #define GTKSOURCEVIEWMM_COMPAT_H</span>
<span class="preprocessor"></span> <span class="keyword">namespace </span>gtksourceview = Gsv;
<span class="preprocessor"> #endif // GTKSOURCEVIEWMM_COMPAT_H</span>
</pre></div> </li>
<li>
Replaced <a class="elRef" href="../../../glibmm-2.4/reference/html/namespaceGlib.html">Glib</a>::*Handle&lt;&gt; with std::vector&lt;&gt; - that means that passing std::list&lt;&gt; or std::deque&lt;&gt; is now not supported. Affected methods are: <ul>
<li>
<a class="el" href="classGsv_1_1Buffer.html#a9f15695f071d4035c6e6066acc68444d" title="Returns the list of marks of the given category at line.">Gsv::Buffer::get_source_marks_at_line()</a> </li>
<li>
<a class="el" href="classGsv_1_1Buffer.html#a54c3f01e507936f763bae73588397592" title="Returns the list of marks of the given category at iter.">Gsv::Buffer::get_source_marks_at_iter()</a> </li>
<li>
<a class="el" href="classGsv_1_1Buffer.html#a4dcd97d6df6388179a3e5cdd101b8eaf" title="Get all defined context classes at iter.">Gsv::Buffer::get_context_classes_at_iter()</a> </li>
<li>
<a class="el" href="classGsv_1_1Completion.html#a91b2575d4b0255074df1aff469ce6ca7" title="Get list of providers registered on completion.">Gsv::Completion::get_providers()</a> </li>
<li>
<a class="el" href="classGsv_1_1Completion.html#a1e6d91624ab8e229db7f4fb921a61008" title="Starts a new completion with the specified CompletionContext and a list of potential candidate provid...">Gsv::Completion::show()</a> </li>
<li>
<a class="el" href="classGsv_1_1CompletionContext.html#ab50b8b9871c61748b85f9a6a3c081009" title="Providers can use this function to add proposals to the completion.">Gsv::CompletionContext::add_proposals()</a> </li>
<li>
<a class="el" href="classGsv_1_1Language.html#a3161fa1dce4f0af4fd4fdd6c598421a1" title="Returns the mime types associated to this language.">Gsv::Language::get_mime_types()</a> </li>
<li>
<a class="el" href="classGsv_1_1Language.html#a5b6dea625ec414f1000a33d5a38f2bde" title="Returns the globs associated to this language.">Gsv::Language::get_globs()</a> </li>
<li>
<a class="el" href="classGsv_1_1Language.html#a6b41ff4541ca063760001d7db0d6a662" title="Returns the ids of the styles defined by this language.">Gsv::Language::get_style_ids()</a> </li>
<li>
<a class="el" href="classGsv_1_1LanguageManager.html#a7ca7ee1059f086a01ef805ef5931486b" title="Gets the list directories where language manager looks for language files.">Gsv::LanguageManager::get_search_path()</a> </li>
<li>
<a class="el" href="classGsv_1_1LanguageManager.html#ac524730cff2f25a747f18deaf5e621f9" title="Sets the list of directories where the language manager looks for language files.">Gsv::LanguageManager::set_search_path()</a> </li>
<li>
<a class="el" href="classGsv_1_1LanguageManager.html#ae691cb6f6d331677225894641db360b0" title="Returns the ids of the available languages.">Gsv::LanguageManager::get_language_ids()</a> </li>
<li>
<a class="el" href="classGsv_1_1StyleScheme.html#a01e6a247249fb4c0b7919b049beaf518" title="Gets scheme authors.">Gsv::StyleScheme::get_authors()</a> </li>
<li>
<a class="el" href="classGsv_1_1StyleSchemeManager.html#a1137bd67ce073bc2768600b69c83b75c" title="Returns the current search path for the manager.">Gsv::StyleSchemeManager::get_search_path()</a> </li>
<li>
<a class="el" href="classGsv_1_1StyleSchemeManager.html#abba091f6530fc57678a8dc1003bd9c0a" title="Sets the list of directories where the manager looks for style scheme files.">Gsv::StyleSchemeManager::set_search_path()</a> </li>
<li>
<a class="el" href="classGsv_1_1StyleSchemeManager.html#ae6fd9e8fa78bf322b24436ac0d89957f" title="Returns the ids of the available style schemes.">Gsv::StyleSchemeManager::get_scheme_ids()</a> </li>
</ul>
</li>
<li>
<a class="el" href="classGsv_1_1Markup.html" title="It is just a class holding markup string.">Gsv::Markup</a> now has operator const void* instead of operator bool, so implicit casts to int are avoided. </li>
</ul>
</div></div>
<hr class="footer"/><address class="footer"><small>Generated on Wed Apr 6 2011 for gtksourceviewmm by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>