[Top][All Lists]

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

Mixing X and GNUstep

From: Raffael Herzog
Subject: Mixing X and GNUstep
Date: Fri, 11 Jul 2003 19:15:56 +0200


I'm learning GNUstep programming and thought a GNUstep frontend to Xine would be a relatively easy task for a first application - except one thing, which is very special about that: Embedding Xine into a GNUstep window.

I do the following to get the information I need for Xine:

 // use XGServer dynamically -> no need to link against gnustep-back
 Class xgServer = objc_get_class("XGServer");
 IMP imp = [xgServer methodForSelector: @selector(_windowWithTag:)];
 gswindow_device_t *dev = (gswindow_device_t *)imp(xgServer,
                                                   [window windowNumber]);
 xineVisual.display = dev->display;
 xineVisual.screen = dev->screen;
 xineVisual.d = dev->ident;

-> is there a cleaner way? I mean, this is now really hacking in the middle of the internals of the backend... :-/

When I run the program and make Xine display its logo, it appears for a short time, but then the program segfaults:

 2003-07-11 18:41:14.598 GSXine[2915] Class: 409ded00
 2003-07-11 18:41:14.603 GSXine[2915] imp: 409b0bbc
 2003-07-11 18:41:14.606 GSXine[2915] Display: 8194890
 2003-07-11 18:41:14.609 GSXine[2915] Screen: 0
 2003-07-11 18:41:14.612 GSXine[2915] Window ID: 5800025
 Benchmarking memcpy methods (smaller is better):
         glibc memcpy() : 716135828
         linux kernel memcpy() : 682846012
         MMX optimized memcpy() : 687281104
         MMXEXT optimized memcpy() : 444966988
         SSE optimized memcpy() : 422982120
 2003-07-11 18:41:17.185 GSXine[2915] Received an untrapped event
 Speicherzugriffsfehler (core dumped)

Any ideas what's going on there? Is my idea realisable at all?


 The difference between theory and practice is that in theory, there is
                no difference, but in practice, there is.

Raffael Herzog - address@hidden - http://www.raffael.ch - ICQ #67961355

reply via email to

[Prev in Thread] Current Thread [Next in Thread]