<?xml version="1.0" ?>
<kc>

<title>Wine Traffic</title>

<author contact="http://www.theshell.com/~vinn">Brian Vincent</author>
<issue num="285" date="29 Jul 2005 00:00:00 -0800" />
<intro> <p>This is the 285th issue of the Wine Weekly News publication.
Its main goal is to synthesize. It also serves to inform you of what's going on around Wine. Wine is an open source implementation of the Windows API on top of X and Unix.  Think of it as a Windows compatibility layer.  Wine does not require Microsoft Windows, as it is a completely alternative implementation consisting of 100% Microsoft-free code, but it can optionally use native system DLLs if they are available.   You can find more info at <a href="http://www.winehq.org">www.winehq.org</a></p> </intro>
<stats posts="243" size="861" contrib="76" multiples="45" lastweek="28">

<person posts="22" size="75" who="Dmitry Timoshkov" />
<person posts="19" size="46" who="Alexandre Julliard" />
<person posts="14" size="49" who="Oliver Stieber" />
<person posts="12" size="37" who="Tom Wickline" />
<person posts="11" size="33" who="Felix Nawothnig" />
<person posts="9" size="28" who="Paul Vriens" />
<person posts="8" size="52" who="Phil Krylov" />
<person posts="8" size="24" who="Robert Shearman" />
<person posts="8" size="22" who="Troy Rollo" />
<person posts="6" size="23" who="James Hawkins" />
<person posts="6" size="20" who="Frank Richter" />
<person posts="5" size="17" who="Rein Klazes" />
<person posts="4" size="13" who="Christian Britz" />
<person posts="4" size="12" who="Saulius Krasuckas" />
<person posts="6" size="15" who="Dimi Paun" />
<person posts="3" size="28" who="jean-marc DETREZ" />
<person posts="3" size="11" who="Mitchell Mebane" />
<person posts="3" size="10" who="Jeremy Newman" />
<person posts="3" size="10" who="Jacek Caban" />
<person posts="3" size="9" who="Andreas Mohr" />
<person posts="3" size="8" who="Raphael" />
<person posts="3" size="8" who="Steven Edwards" />
<person posts="3" size="8" who="Hiji" />
<person posts="6" size="14" who="Anssi Hannula" />
<person posts="3" size="7" who="Hans Leidekker" />
<person posts="3" size="7" who="James Liggett" />
<person posts="2" size="39" who="Michael Carlson" />
<person posts="2" size="9" who="Francois Gouget" />
<person posts="2" size="8" who="Daniel Remenak" />
<person posts="2" size="6" who="Uwe Bonnes" />
<person posts="2" size="6" who="Christoph Frick" />
<person posts="2" size="6" who="Joseph Garvin" />
<person posts="2" size="6" who="Jesse Allen" />
<person posts="2" size="6" who="Kuba Ober" />
<person posts="2" size="6" who="Peter Oberndorfer" />
<person posts="2" size="6" who="Jakob Eriksson" />
<person posts="2" size="5" who="Vitaliy Margolen" />
<person posts="2" size="5" who="Francois Gouget" />
<person posts="2" size="5" who="Thomas Weidenmueller" />
<person posts="2" size="5" who="Marcus Meissner" />
<person posts="2" size="4" who="Holger Dell" />
<person posts="2" size="4" who="Lionel Ulmer" />
<person posts="2" size="4" who="jstrupeni" />
<person posts="1" size="18" who="Hans Kristian Rosbach" />
<person posts="1" size="8" who="Holger Dell" />
<person posts="1" size="6" who="Vincent Rubiolo" />
<person posts="1" size="6" who="Andrew Neil Ramage" />
<person posts="1" size="5" who="Chris Morgan" />
<person posts="1" size="4" who="Joe Baker" />
<person posts="1" size="4" who="Glenn Wurster" />
<person posts="1" size="4" who="Marcelo Duarte" />
<person posts="1" size="3" who="Robert Lunnon" />
<person posts="1" size="3" who="Stefan D&#246;singer" />
<person posts="1" size="3" who="David Goodenough" />
<person posts="1" size="3" who="Christian Siegert" />
<person posts="1" size="3" who="Michael Stefaniuc" />
<person posts="1" size="3" who="Brian Vincent" />
<person posts="1" size="3" who="Ivan Lezhnev, Jr." />
<person posts="1" size="3" who="Tony Lambregts" />
<person posts="1" size="2" who="Stefan D&#246;singer" />
<person posts="1" size="2" who="Khe Siang Tan" />
<person posts="2" size="4" who="Filip Navara" />
<person posts="1" size="2" who="Chris Rankin" />
<person posts="1" size="2" who="Johannes Koch" />
<person posts="1" size="2" who="Bennie Kahler-Venter" />
<person posts="1" size="2" who="Paul Vriens" />
<person posts="1" size="2" who="John Connor" />
<person posts="1" size="2" who="Detlef Riekenberg" />
<person posts="1" size="2" who="Ivan Gyurdiev" />
<person posts="1" size="2" who="Jonathan Ernst" />
<person posts="1" size="2" who="Boaz Harrosh" />
<person posts="1" size="2" who="George Lober" />

</stats>
<section 
	title="News: Jeremy White Interview"
	subject="News"
	archive="http://www.linux-mag.com/content/view/2040/112/"
	posts="1"
	startdate="23 Jul 2005 00:00:00 -0800"
	enddate="29 Jul 2005 00:00:00 -0800"
>
<topic>News</topic>
<mention>Jeremy White</mention>
<mention>News</mention>

<p>Linux Magazine has a good 
<a href="http://www.linux-mag.com/content/view/2040/112/">interview</a>
with CodeWeaver's Jeremy White.  There's a lot of interesting stuff in
there, such as Longhorn, CXTest, and DRM issues.  From the interview:</p>
<quote who="Linux Magazine"><p>
<i>LM: So, first of all, give us a little background on the Installer Challenge.
</i>
</p><p>
Yeah, and basically the challenge is that we're trying to take Wine to that next level, we have for the last several years, really focused on a fairly small footprint of applications, making those work well and being glad and hoping that other things would work as well, collateral damage, as I like to call it.
</p><p>
Now what we're doing is taking the next step, and that is taking the first step towards taking Wine to the promised land, where we want it to be, which is where it runs everything and the first step is before you can try an application, you've got to be able to install it.
</p><p>
What we're doing right now, is we've spent a great deal of energy over the last year, sort of a lot of unsexy, dirty, nasty, grinding work that has the very sexy, exciting work that has the result that we believe many applications will install, and we believe that those that won't install will be very easy to get install.
</p><p>
We're very hopeful that with this, if we can get some community participation and community help that we can go from right now, where you have a 50-50 chance having an app install, maybe a bit less than that, to you're pretty sure that your app will install.

</p></quote>

</section>
<section 
	title="MSHTML Update"
	subject="Use Gecko to render HTML"
	archive="http://www.winehq.com/hypermail/wine-devel/2005/07/0841.html"
	posts="1"
	startdate="28 Jul 2005 00:00:00 -0800"
>
<topic>Status Updates</topic>
<p>Work continues on MSHTML for Wine.  For those of you just joining
us, Jacek Caban has been working for several months on implementing
this DLL.  Basically it's the web browser behind Internet Explorer.
Jacek has put together a pretty good description of everything on
the wiki under 
<a href="http://wiki.winehq.org/MozillaIntegration">MozillaIntegration</a>.
Jacek posted a large patch this week that got it closer to being a
reality and explained how it was implemented:</p>
<quote who="Jacek Caban"><p>

I've sent a patch that makes MSHTML use Gecko to render
HTML. Unfortunately, it uses Windows Gecko, not Linux
one. Alexandre wrote me that it's impossible to get perfect
support for XEmbed container, so, although my
implementation was enough for Gecko, it can't go to CVS
and I should use Windows one. So, as of now, support for
the Linux version went into trash and I've sent this patch.
Well, I don't give up with Linux version, I have another
idea, but that's not for the nearest future. One plus is that
the Windows version is much simpler...
</p><p>
Now it's time to write about this patch. For now it can use
Gecko installed with Mozilla Suite or Mozilla ActiveX
Control - it could use any Gecko-based product, but
we have to be able to search for it (every Gecko-based
product has its own registry settings for Gecko path). I'm
planning to add Firefox support, but it doesn't work yet
and I have to find why. If you think there should be support
for any other application, please let me know. As our
shdocvw still uses Mozilla ActiveX Control, I think it should
be preferred (it's the first one on the search list and it's
smallest). In future, when we'll implement shdocvw on top
on MSHTML and get rid of Mozilla ActiveX Control
dependency, I think it will be better to have a package like
wine-gecko with an installer, downloaded  automatically
when  needed (well, not automatically in MS sense, user will
be informed about it ;-) ). We need a very limited version
of Gecko, so it will be just small package.
</p><p>
What does this patch change? You may see IE working on
Gecko engine! Not much of its functionality is implemented
yet, but a HTML document is displayed. Soon there will be
more! To see how it works for your program, probably you
will have to set shdocvw to native (and usually urlmon,
maybe wininet) and mshtml as builtin.</p></quote>

<p>So, instead of a native Linux component using XEmbed 
we've got a Windows Gecko rendering engine.  Hopefully an
easy way to package this will be created to make it Just
Work on Linux.  The end result from a user perspective 
will hopefully be the same.  Then again.. who knows.. 
maybe Jacek's other idea will work out. 
</p>
</section>
<section 
	title="Force Feedback"
	subject="Re: DINPUT: Detect force feedback joysticks (FF #1)"
	archive="http://www.winehq.com/hypermail/wine-devel/2005/07/0819.html"
	posts="6"
	startdate="28 Jul 2005 00:00:00 -0800"
>
<topic>DirectX</topic>
<p>Daniel Remenak started working on an area no one else has
tackled yet - force feedback joysticks.  His third patch had
a nice description of how everything works:</p>

<quote who="Daniel Remenak"><p>


Changelog:
<ul>
Detect force-feedback-capable linux event device joysticks and return
DIDC_FORCEFEEDBACK when queried for capabilities.</ul>
</p><p>
This patch is exactly like try 2 except that this one actually works.
</p><p>
Changes from try 1:
<ol>
<li> Configure check has been changed from a custom compile check to an
AC_CHECK_MEMBERS.  I presume this is what Alexandre meant by "please
use the existing macros for checking structure fields;" if not, please
clarify.</li>
<li> An additional runtime check has been added to catch the case that
it is compiled on a kernel with full FF support but run on one without
it.  In this case, the number of simultaneous effects query will fail,
and the joystick will not be reported as FF.  The #ifdef is still
necessary to catch the opposite case.</li>
<li> Primary FF detection code has been moved from GetCapabilities to
Acquire.  Since the tests are getting more complex it's best to only
run them once, and store the results for use elsewhere.</li>
</ol></p><p>

To recap, this patch basically adds three things:
<ol>
<li> Configure checks for the availability of a new enough linux/input.h
to support force feedback.  This pretty much means any kernel 2.6 or
kernel 2.4.x with the ff patchset found at
http://sourceforge.net/projects/libff/.  Some of the structures were
changed without changing the version define, so this check is
necessary; although these structures are not yet used they will be in
later patches, and it's best not to report that the joystick is FF
unless it can actually handle FF effects.</li>
<li> The linuxinput dinput joystick driver tries to open the device in
read/write mode, and falls back to read-only (with no ff support) if
it fails.</li>
<li> The device is queried for the EV_FF capability bit and ffbits is
filled with the specific supported effect types.  If that all goes
well, DIDC_FORCEFEEDBACK is added to the device flags.</li>
</ol></p><p>
Autoheader and Autoconf will of course need to be run after this patch
is applied.
</p></quote>
<p>When version #1 of the patch came out, Alexandre had a question
regarding the configure checks Daniel had created,
<quote who="Alexandre Julliard">

Why do you need to check the structure since you are not using it?
Shouldn't you simply do a #ifdef on the ioctl code or whatever else
that you use and may not be defined?</quote></p>

<p>Daniel replied that it was to work around a kernel problem:</p>
<quote who="Daniel Remenak"><p>
Executive summary: In order for effects to be played, the correct
ff_effect structure will need to be present; if you can't play the
effects it's better not to detect the joystick as FF, because it's
really not.
</p><p>
The structure is not used *yet*, but will be.  There was an older
version of force feedback code before (in some of the stock 2.4
kernels) which had some of the same features (such as the EV_FF bit),
but has incompatible structures, and afaik there were never any force
feedback drivers written for it.  The newer interface has working
iForce (logitech, guillemot, et al) and MS sidewinder drivers written
for it, so that's the one I was targetting.  You can see them side by
side if you have linux/input.h from an unpatched late 2.4 kernel and a
2.6 kernel.</p></quote>

<p>Alexandre thought that was a good start,
<quote who="Alexandre Julliard">

Well, if the structure is required for the compile that's OK; but note
that you still need to check for the proper features at run-time, just
because the structure was present at compile time doesn't mean the
kernel supports it, since you can build on 2.6 and then run on 2.4.
Also please use the existing macros for checking structure fields.</quote></p>

<p>The macro comment in Daniel's patch description above references
Alexandre's comment.  Regarding MS Sidewinder support, Anssi Hannula
had some input regarding the development:</p>
<quote who="Anssi Hannula"><p>

Well, if you mean the Sidewinder Force Feedback 2, that driver seems to 
be only a stub. I am currently working on a new PID FF driver (which 
will cover that Sidewinder).
</p><p>
Also I'm planning some kernel internal FF interface updates and probably 
introducing FF interface to /dev/input/jsX also.
</p></quote>

<p>Daniel realized he had been mistaken,
<quote who="Daniel Remenak">
Yes, I saw your (perhaps old) patch for adding FF support to joydev
while I was doing some research before starting this project.  I was
under the impression that the current Sidewinder PID driver was
working, though...a bit of poking at the code tells me I was pretty
wrong :)  I use a Wingman Force personally, so I hadn't done much
looking at the PID side of things.</quote></p>

</section>
<section 
	title="Benchmarks"
	subject="Benchmark's on the Wiki"
	archive="http://www.winehq.com/hypermail/wine-devel/2005/07/0749.html"
	posts="34"
	startdate="26 Jul 2005 00:00:00 -0800"
	enddate="31 Jul 2005 00:00:00 -0800"
>
<topic>Testing</topic>
<mention>Mark</mention>

<p>Tom Wickline posted some benchmarks on the wiki:</p>
<quote who="Tom Wickline"><p>

I put the Benchmark results that I posted to wine-devel back in April
on the Wiki.
<a href="http://wiki.winehq.org/BenchMark">
http://wiki.winehq.org/BenchMark</a></p></quote>

<p>A long discussion then ensued about the format of the results.
What you'll see if you go to the page now is the result of a bunch of
changes to make it more readable.  If you look at the results, you'll
notice when it comes to IO Wine is generally faster than XP.  That's
offset by XP's faster graphics. 
</p>
</section>
<section 
	title="Cross-Compiling Wine"
	subject="cross-compiling for ARM"
	archive="http://www.winehq.com/hypermail/wine-devel/2005/07/0744.html"
	posts="2"
	startdate="26 Jul 2005 00:00:00 -0800"
>
<topic>Ports</topic>
<topic>Build Process</topic>
<mention>Hans Leidekker</mention>

<p>
Isn't it great when you ask a question on mailing list and someone
replies with an answer a few minutes later?  Isn't it especially great
when it's a slightly bizarre question that you don't expect anyone to
have a detailed answer for?  John Connor wanted to know about cross-compiling
Wine for ARM,

<quote who="John Connor">
Has anyone tried to cross-compile Wine for the ARM platform or is there
any documentation on how to do this?
</quote></p>

<p>Steven Edwards supplied a quick rundown of the steps:</p>
<quote who="Steven Edwards"><p>

I have but its been a day or two. You need two trees and to first build the 
Wine tools for your host platform and something like the following
<ul><code>

cd /usr/src/wine-tools<br />

./configure<br />
make tools</code></ul>
</p><p>
then in another tree
<ul><code>
cd /usr/src/wine<br />
./configure --build=armv4 --with-wine-tools=/usr/src/wine-tools
</code></ul></p><p>
Note there is no support for arm in Wineserver, kernel32 or ntdll so winelib 
won't run yet. Most everything else should compile as Winelib works on i386, 
PPC and SPARC. You might be able to get by stubbing the set_thread_context 
stuff out for simple apps.</p></quote>

<p>We sort of touched on this subject last winter in WWN
<a href="http://www.winehq.com/?issue=263#Compiling%20for%20Windows%20and%20Cross-Compiling">#263</a>.
The steps Steven covered were roughly the same as what Hans Leidekker 
described, namely building the tools and using the <tt>--with-wine-tools</tt> 
option.  Ports to other architectures come up once in while, but it's 
a difficult undertaking.  It will be interesting to see if an ARM port
can get off the ground.</p>
</section>
<section 
	title="Theming Work"
	subject="Theming &amp; code duplication"
	archive="http://www.winehq.com/hypermail/wine-devel/2005/07/0778.html"
	posts="5"
	startdate="27 Jul 2005 00:00:00 -0800"
	enddate="29 Jul 2005 00:00:00 -0800"
>
<topic>Controls</topic>
<mention>Rob Shearman</mention>

<p>Frank Richter has been working a lot on theming.  The initial
patches have been going in over the past few weeks.  He ran into
an issue this week regarding how to go about working on controls:</p>
<quote who="Frank Richter"><p>
somewhat recently I sent some code to wine-patches to add button
theming; if you have glanced at it, despite utilizing subclassing, code
was duplicated from the button code in user.
</p><p>
In particular, the themed button does its own state management. The
reason is that upon state changes, the user32 button control does some
repaints internally, ie calling the paint function directly - those
can't obviously be hooked by subclassing alone. In early versions I had
the themed button painted over after state-changing messages, but that
causes visible flickering (since the button is first painted in
"classic" style and the themed style is painted above that).
</p><p>
The basic problem - painting that is hard to hook into - will probably
also arise on other controls.
</p><p>
There are some ideas and approaches to deal with the problem that came
up (and the results from discussion with Kevin):
<ul>
<li> Ignore. Have ugly flickering.</li>
<li> Change the classic controls to use InvalidateRect() instead when
internal painting functions are called, so painting messages can be
hooked. That would deviate from native behaviour, though (and also
occasionally less efficient when the control just paints some change).</li>
<li> Use some magic message the control sends to itself to do some painting
which is then hooked. Makes things more complex, could cause
compatibility issues with apps that may not handle this message and is
incompatible with native.</li>
<li> Code duplication - e.g. in the case of buttons, do state management in
the themed class as well.</li>
<li> Static libraries - implement the standard controls in a static library
and allow for hooks to override painting (in C++ you'd use virtual
methods). Both user32 and comctl32 would link against that lib, and the
latter would provide alternative painting functions. Binarily equivalent
to code duplication, but not that bad in the source code. For me it
looks like a good compromise, though, Kevin noted that "Historically
static libs have not gone over very well".</li>
</ul></p><p>
I don't like the current code duplication for theming that much, but I'm
a bit unsure what else could be done. Perhaps you have some comments or
suggestions, and hopefully there will be some consent of what approach
would be best for Wine.</p></quote>

<p>Rob Shearman suggested another approach,
<quote who="Robert Shearman">

You could make the code to using RedrawWindow(... RDW_UPDATENOW), 
assuming that the paint functions it is calling are for the whole 
control, not a component of the control.</quote></p>

<p>Frank wasn't sure if that would be sufficient,
<quote who="Frank Richter">
Occasionally it does... afaics mostly stuff like just drawing the focus
rect or  checkboxes only draw the mark when the state changes... but
perhaps one could get away with repainting the whole control in this
case, though I fear that this would cause flickering again.</quote></p>

<p>Rob thought a small area around it could work,
<quote who="Robert Shearman">
In that case, you will have to retrieve the rectangle of the changed 
area and pass that rectangle to RedrawWindow.</quote></p>

<p>Frank didn't think Windows worked that way, though that doesn't
necessarily mean the approach wouldn't work,
<quote who="Frank Richter">
Though, that would mean that paint messages are emitted to the window?
IIRC last time I checked (with Spy++), there were no paint messages when
e.g. the state of a checkbox changed. So using RedrawWindow() may mean a
different behaviour than on native.
</quote></p>
</section></kc>
