|
Roadmap |
Site sponsored by
IGEL
|
||
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [directfb-dev] Re: DFB++ / windows
In message <1073581899.2857.27.camel@localhost> Joseph Wenninger <jowenn@kde.org> wrote: > Hi > > I'm trying to create window with DFB++ 0.9.20. I've tried the > following code from the df_window.c example: > DFBWindowDescription desc; > desc.flags = ( DWDESC_POSX | DWDESC_POSY | > DWDESC_WIDTH | DWDESC_HEIGHT ); > > The problem is, that it looks like gcc in c++ mode treats enums > differently than in c mode (int <-> "real typ" ?). flags is defined as > DFBWindowDescriptionFlags flags; > which causes an error about an invalid cast from 'int' to > 'DFBWindowDescriptionFlags' > > Did nobody else try creating a window with the C++ API yet, or is there > a work around, that I'm missing (except changing the definition in > directfb.h to int/long), or a mistake on my side. desc.flags = DFBWindowDescriptionFlags( DWDESC_POSX | DWDESC_POSY | DWDESC_WIDTH | DWDESC_HEIGHT ); works for me. (I haven't looked it up, but it looks like enum -> int works, but not int -> enum, without an explicit cast.) For more dynamic flag manipulation, have a look at the DFB_ADD_DRAWING_FLAG and other similar macros in dfb++.h for an approach that should presumably be standard for DFB++. Regards, Simon -- Info: To unsubscribe send a mail to ecartis@directfb.org with "unsubscribe directfb-dev" as subject.
|
|
| directfb.org |
|
Development |
|
Old Archives |