pangomm r16 - in trunk: . pango/src



Author: murrayc
Date: Tue Aug 12 07:59:03 2008
New Revision: 16
URL: http://svn.gnome.org/viewvc/pangomm?rev=16&view=rev

Log:
2008-08-12  Murray Cumming  <murrayc murrayc com>

* pango/src/layoutrun.ccg:
* pango/src/layoutrun.hg: Wrap this with CLASS_BOXEDTYPE() instead of 
_CLASS_GENERIC(), because the PangoGlyphItem (of which PangoLayoutRun 
is a typedef) is a boxed type. This reduces the amount of code in .hg, 
while apparently not breaking API or ABI.
This should be renamed to GlyphItem when we can break ABI.

Modified:
   trunk/ChangeLog
   trunk/pango/src/layoutrun.ccg
   trunk/pango/src/layoutrun.hg

Modified: trunk/pango/src/layoutrun.ccg
==============================================================================
--- trunk/pango/src/layoutrun.ccg	(original)
+++ trunk/pango/src/layoutrun.ccg	Tue Aug 12 07:59:03 2008
@@ -22,28 +22,7 @@
 namespace Pango
 {
 
-LayoutRun::LayoutRun()
-{}
-
-LayoutRun::LayoutRun(const PangoLayoutRun* src)
-{
-  gobject_ = *src;
-}
-
 } /* namespace Pango */
 
 
-namespace Glib
-{
-
-Pango::LayoutRun& wrap(PangoLayoutRun* object)
-{
-  return *reinterpret_cast<Pango::LayoutRun*>(object);
-}
-
-const Pango::LayoutRun& wrap(const PangoLayoutRun* object)
-{
-  return *reinterpret_cast<const Pango::LayoutRun*>(object);
-}
 
-} /* namespace Glib */

Modified: trunk/pango/src/layoutrun.hg
==============================================================================
--- trunk/pango/src/layoutrun.hg	(original)
+++ trunk/pango/src/layoutrun.hg	Tue Aug 12 07:59:03 2008
@@ -42,13 +42,8 @@
  */
 class LayoutRun
 {
-  _CLASS_GENERIC(LayoutRun, PangoLayoutRun)
-
-protected:
-  LayoutRun();
-
-public:
-  explicit LayoutRun(const PangoLayoutRun* src);
+  _CLASS_BOXEDTYPE(LayoutRun, PangoGlyphItem, NONE, pango_glyph_item_copy, pango_glyph_item_free)
+  _IGNORE(pango_glyph_item_free, pango_glyph_item_copy)
 
   _WRAP_METHOD(GlyphItem split(const Glib::ustring& text, int split_index), pango_glyph_item_split)
 
@@ -64,27 +59,9 @@
    * @return A Pango::GlyphString object.
    */
   _MEMBER_GET(glyphs, glyphs, GlyphString, PangoGlyphString*)
-
-  /// Provides access to the underlying C GObject.  
-  PangoLayoutRun*       gobj()       { return &gobject_; }
-  /// Provides access to the underlying C GObject.
-  const PangoLayoutRun* gobj() const { return &gobject_; }
-
-protected:
-  PangoLayoutRun gobject_;
 };
 
 } /* namespace Pango */
 
 
-namespace Glib
-{
-
-/** @relates Pango::LayoutRun */
-Pango::LayoutRun& wrap(PangoLayoutRun* object);
-
-/** @relates Pango::LayoutRun */
-const Pango::LayoutRun& wrap(const PangoLayoutRun* object);
-
-} /* namepspace Glib */
 



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