Re: [gtk-osx-users] getting started with osx gtk developmnet



On 18/07/2012, at 11:38 AM, Sean Felipe Wolfe wrote:

> Hello everybody, I'm getting started working on an osx port of a GTK
> application called Geany --> http://geany.org .
> 
> I'm a junior / student level C developer just getting started but
> eager to learn more. For the Geany project, there are a couple things
> I'm trying to correct:
> 
> 1) for the osx version of the app, paste isn't working. Copy works, so
> I can copy and then paste outside the app, but pasting within the app
> doesn't get a response.

Hi Sean, 

Hard to say why without more detail. I can say that copy and paste is working 
within my application on OS X, so it isn't a platform limitation. Note however, 
https://bugzilla.gnome.org/show_bug.cgi?id=626499 re 
'gtk_clipboard_set_with_data() may be passed a function to be invoked when "the
clipboard contents are set again". This works as expected under win32 but not
under OS X.'

> 2) startup time -- right now it's taking 8-10 seconds to load up,
> whereas on other platforms it's under 2 seconds.

At a guess, that /may/ be because its using the freetype library for text, 
which I've known to faf around looking for fonts when it is first used
(IIRC this isn't when the library is linked into the image but 
when pango initialises a freetype fontmap (or whatever the relevant 
structure is)). 

How do you know if you're using it? From my notes: 

** At what point does pango_cairo choose the cairo font backend to render the font with? 

It depends on the font map the pango_cairo context was created with. 
The PangoCairoFontMap has a fonttype of cairo_font_type_t. 

We can therefore determine what sort of font back end is being used for a given context
by calling pango_cairo_font_map_get_font_type() on the context's fontmap. 

An alternative may be to simply run a profiler on it to see where its soaking
up the time. 


best, 
Richard. 


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