Hi!
Actually, I translate the Gdk (basically needed for Gtk) to Pascal and I need help with the following C-Struct:
struct _GdkEventClient { ... GdkAtom message_type; gushort data_format; union { char b[20]; short s[10]; long l[5]; } data; };
How do I pass the union to a case-selector ?
Eike
On 1 Dec 2000, at 15:35, Eike Lange wrote:
Hi!
Actually, I translate the Gdk (basically needed for Gtk) to Pascal and I need help with the following C-Struct:
struct _GdkEventClient { ... GdkAtom message_type; gushort data_format; union { char b[20]; short s[10]; long l[5]; } data; };
How do I pass the union to a case-selector ?
This is what I would do - but then my C is not that good ;-)
type _GdkEventClient = record ... data_format: gushort ; case integer of 0 : (b : array [0..19] of char); 1 : (s : array [0..9] of short); 2 : (l : array [0..4] of long); end;
Best regards, The Chief --------- Prof. Abimbola Olowofoyeku, PhD (The African Chief) Email: African_Chief@bigfoot.com Author of Chief's Installer Pro v5.24 for Win32 http://www.bigfoot.com/~African_Chief/chief32.htm