printf("Created window %p, size %dx%d\n", window, ww, hh);
jlong Java_vdr_mhp_awt_DFBWindowPeer_createDFBWindow(JNIEnv* env, jobject obj, jlong nativeLayer, jint x, jint y, jint width, jint height) {     IDirectFBDisplayLayer *layer = (IDirectFBDisplayLayer *)nativeLayer;     IDirectFBWindow       *window;     DFBWindowDescription  desc;     if (!layer)        layer=MhpOutput::System::self()->GetMainLayer();     printf("createDFBWindow %d, %d - %dx%d on layer %p ID %d\n", x, y, width, height, layer, layer->GetID());     /*if (getenv( "MHP_NO_ALPHA" ))          bgAlpha = 255;     if (bgAlpha < 255) {          desc.flags = DWDESC_CAPS;          desc.caps  = DWCAPS_ALPHACHANNEL;     }     else          desc.flags = 0;*/               desc.flags=(DFBWindowDescriptionFlags)0;          if (!getenv( "MHP_NO_ALPHA" )) {          DFB_ADD_WINDOW_DESC(desc.flags, DWDESC_CAPS);          desc.caps=DWCAPS_NONE;          DFB_ADD_WINDOW_CAPS(desc.caps, DWCAPS_ALPHACHANNEL);          DFB_ADD_WINDOW_CAPS(desc.caps, DWCAPS_DOUBLEBUFFER);     }     if (x >= 0) {          DFB_ADD_WINDOW_DESC(desc.flags, DWDESC_POSX);          desc.posx = x;     }     if (y >= 0) {          DFB_ADD_WINDOW_DESC(desc.flags, DWDESC_POSY);          desc.posy = y;     }     if (width > 0) {          DFB_ADD_WINDOW_DESC(desc.flags, DWDESC_WIDTH);          desc.width = width;     }     if (height > 0) {          DFB_ADD_WINDOW_DESC(desc.flags, DWDESC_HEIGHT);          desc.height = height;     }          try {          window=layer->CreateWindow(desc);     } catch (DFBException *e) {         printf("DirectFB: Error %s, %s\n", e->GetAction(), e->GetResult());         delete e;         return 0;     }      int ww,hh;window->GetSize(&ww, &hh);     printf("Created window %p, size %dx%d\n", window, ww, hh);          return (jlong )window;}