Bug 6921 - make PopplerFontInfo GObject
Summary: make PopplerFontInfo GObject
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: glib frontend (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-15 01:50 UTC by Kouhei Sutou
Modified: 2007-07-27 02:22 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
PopplerFontInfo provides GType. (3.88 KB, patch)
2006-05-15 01:54 UTC, Kouhei Sutou
Details | Splinter Review
add GObject to PopplerFontInfo (491 bytes, patch)
2006-05-18 11:54 UTC, Kouhei Sutou
Details | Splinter Review
updated for the current HEAD. (4.53 KB, patch)
2007-07-07 18:52 UTC, Kouhei Sutou
Details | Splinter Review

Description Kouhei Sutou 2006-05-15 01:50:57 UTC
We should make PopplerFontInfo GObject because PopplerFontInfo can't provide
GType for GBoxed. (Providing poppler_font_info_copy() is difficult.)
Comment 1 Kouhei Sutou 2006-05-15 01:54:42 UTC
Created attachment 5630 [details] [review]
PopplerFontInfo provides GType.

This patch breaks backward compatibility.
Comment 2 Kouhei Sutou 2006-05-18 11:54:24 UTC
Created attachment 5673 [details] [review]
add GObject to PopplerFontInfo

This patch includes missing diff in previous patch.
Comment 3 Kouhei Sutou 2007-07-07 18:52:48 UTC
Created attachment 10617 [details] [review]
updated for the current HEAD.

Is this request unreasonable?

I'm maintaining Ruby bindings for poppler-glib. To export poppler object to Ruby, I need to wrap poppler object by Ruby object.

A wrapper Ruby object copies wrapped poppler object or increments reference count of wrapped poppler object when a wrapper Ruby object is created. And a wrapper Ruby object free wrapped poppler object or decrements reference count of wrapped poppler object when a wrapper Ruby object is destroyed.

If poppler object has GType, it's easy to do that. Because Ruby/GLib (Ruby bindings for GLib and GObject) provides utility functions for that.


In this case, I need to wrap PopplerFontInfo object. To wrap the object, I need to copy or increments reference count. But PopplerFontInfo object is difficult to copy because we can't copy FontInfoScanner object (and it's costly). So I suggest that we make PopplerFontInfo GObject. Is this unreasonable?
Comment 4 Carlos Garcia Campos 2007-07-27 02:22:03 UTC
Hi Kouhei, sorry for the late reply. Of course it's reasonable and it even doesn't break the api. I've just applied your patch to cvs head. 

Thank you very much. 


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.