Re: Gtk+ html backend (broadway win32?)



On Sun, 2011-04-10 at 16:00 +0200, Hans Breuer wrote:
> The Gtk+ html backend might be the killer feature motivating me to put more 
> effort in Dia's gtk3 porting. Getting it to compile on win32 was easy and I 
> could commit the initial bits soon.
> 
> Unfortunately the implementation appears to be relying on a Unix paradigm 
> (everything is a file) , which is not easily achievable for win32.
> If I understood the code correctly broadway_output_write_raw() uses 
> write(socket_fd,...) to send data over the network. On Windows file handles 
> are not interchangeable with winsock handles. The following code could 
> overcome that limitation here:
> 
> #ifndef G_OS_WIN32
>        res = write(output->fd, ptr, count);
> #else
>        res = send (output->fd, ptr, count, 0);
> #endif
> 
> But there are also libz compressed streams used by:
> 
> 	output->zfd = gzdopen(fd, "wb");
> 	res = gzwrite(output->zfd, ptr, count);
> 	gzclose (output->zfd);
> 
> which can not work as is on win32 (though it does compile;)).
> 
> I see two potential options in solving this:
>   1) changing the broadway backend to optionally only use
>      uncommpressed network streams

That would suck ass. We rely on the compression to get any form of
decent performance as we have to send all images as base64 encoded png
strings.

>   2) making use of gio streams in gdk-broadway, and implement the platform
>      specific bits in gio, where the network abstraction already lives.

This is the prefered way. Shouldn't be that hard as everything
(including zlib compression) is supported by gui. I even had it
partially done at some point but lost that work.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl redhat com            alexander larsson gmail com 
He's an uncontrollable crooked hairdresser who dotes on his loving old ma. 
She's a high-kicking red-headed journalist who can talk to animals. They fight 
crime! 



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