[Gtk-sharp-list] Wrapping GtkScintilla

The Source peter.bauwens@pandora.be
Tue, 02 Dec 2003 20:22:21 +0100


Hi,

I recently created a wrapper for the GtkScintilla component but some of
the function calls that were created behave rather weird. The call which
is used for setting style colors for example should (according to the
scintilla documentation) be passed an RGB color value. The values I pass
to the call somehow seem to get mangled. If I pass e.g. the value
0xFF0000 (beeing red) scintilla ends up displaying blue, which is
0x0000FF.

After playing around with the values and displaying them using the
Bitconverter class I noticed the bytes 00-01-02-03 are passed to
scintilla as 02-03-00-01. Swapping the bytes before passing the int
value to scintilla 'fixes' the problem.

The only thing i noticed is the mixed usage of int and gint in the
scintilla GTK Wrapper from which i try to generate the C# wrapper. For
now, the parameters declared as int seem to work just fine, the others
dont.

Does this have something to do with little versus big endian? Is this a
known problem? Can anybody point me in the right direction?

Thx, Peter Bauwens