[Iup-users] Suggestions (was: IUP compile error)
Antonio Scuri
scuri at tecgraf.puc-rio.br
Thu Oct 4 18:03:29 GMT+3 2007
> cairo_xlib_surface_create(XtDisplay(wid), XtWindow(wid), iupmot_visual, w,
h);
Try using:
XWindowAttributes wa;
Window wnd;
Display *dpy;
Visual visual;
dpy = (Display*)IupGetAttribute(ih, "XDISPLAY");
wnd = (Window)IupGetAttribute(ih, "XWINDOW");
XGetWindowAttributes(dpy, wnd, &wa);
visual = wa.visual;
You will need only X, no need for Xt.
> (2) There is something strange about IupUpdate in the Motif driver.
> This function is actually empty in the driver (at the end of "motif.c").
IupUpdate is fully working in IUP 3. But it depends on a function that is
not implemented in all Motif systems. When I release the final version of
2.6 I will try to find out which systems, and probably include its code from
IUP 3. It can be implemented as:
#ifndef IUP_MOTIF_NO_REDISPLAY
#include <Xm/Print.h>
#else
/* XmUpdateDisplay will only flush exposure events, will not force
an exposure. */
#define XmRedisplayWidget XmUpdateDisplay
#endif
void IupUpdate(Ihandle* ih)
{
if (ih->handle)
XmRedisplayWidget(ih->handle);
}
But in IUP 3 will also update its children.
> I think this is not the best possible separation. In my
> case, for instance, I do not want to use libiupcontrols
> because it requires me to link in libcd as well, nearly
> doubling the size of my application.
Why don't you try using CD instead of Cairo? What features in Cairo do you
see as more interesting?
(Not pushing you, just curious)
> It would be nice if I could still use IupCBox and IupSBox (I looked at the
code,
> and it does not seem to make any use of CD at all, so I
> believe these controls could easily be moved to libiup).
> Would it perhaps be an idea to put those controls that do not
> need libcd into libiup?
Yes I could do that. I guess it will be no harm. I'll let you know before
2.6 is released.
BTW, in IUP 3 some of the additional controls that are implemented with CD
will be migrated to native elements and naturally moved to the main library.
Thanks for the comments.
Best,
Scuri
More information about the iup-users
mailing list