Ejemplo n.º 1
0
void uiMenuInit( void )
{

 if ( !guiApp.menuIsPresent ) return;

 guiApp.menu.x=0;
 guiApp.menu.y=0;

 if ( ( menuDrawBuffer = calloc( 1,guiApp.menu.Bitmap.ImageSize ) ) == NULL )
  {
    mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[menu] " MSGTR_GUI_MSG_MemoryErrorWindow );
   gtkMessageBox( MSGBOX_FATAL,"[menu] " MSGTR_GUI_MSG_MemoryErrorWindow );
   return;
  }

 wsWindowCreate( &guiApp.menuWindow,
 guiApp.menu.x,guiApp.menu.y,guiApp.menu.width,guiApp.menu.height,
 wsOverredirect|wsHideFrame|wsMaxSize|wsMinSize|wsHideWindow,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,"MPlayer menu" );

 mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[menu] menuWindow ID: 0x%x\n",(int)guiApp.menuWindow.WindowID );

 wsWindowShape( &guiApp.menuWindow,guiApp.menu.Mask.Image );

 guiApp.menuWindow.DrawHandler=uiMenuDraw;
 guiApp.menuWindow.MouseHandler=uiMenuMouse;
// guiApp.menuWindow.KeyHandler=guiApp.mainWindow.KeyHandler;
 uiMenuRender=True; wsWindowRedraw( &guiApp.menuWindow );
}
Ejemplo n.º 2
0
void uiVideoInit (void)
{
  wsWindowCreate(&guiApp.videoWindow, guiApp.video.x, guiApp.video.y, guiApp.video.width, guiApp.video.height, wsShowFrame | wsHideWindow | wsAspect, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, "MPlayer - Video");
  mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[video] videoWindow ID: 0x%x\n", (int) guiApp.videoWindow.WindowID);
  wsWindowIcon(wsDisplay, guiApp.videoWindow.WindowID, &guiIcon);
  if (guiApp.video.Bitmap.Image)
  {
    wsImageResize(&guiApp.videoWindow, guiApp.video.Bitmap.Width, guiApp.video.Bitmap.Height);
    wsImageRender(&guiApp.videoWindow, guiApp.video.Bitmap.Image);
  }
  wsXDNDMakeAwareness(&guiApp.videoWindow);
  guiApp.videoWindow.DrawHandler = uiVideoDraw;
  guiApp.videoWindow.MouseHandler = uiVideoMouse;
  guiApp.videoWindow.KeyHandler = guiApp.mainWindow.KeyHandler;
  guiApp.videoWindow.DNDHandler = guiApp.mainWindow.DNDHandler;
}
Ejemplo n.º 3
0
void uiMainInit (void)
{
  mainDrawBuffer = malloc(guiApp.main.Bitmap.ImageSize);

  if (!mainDrawBuffer)
  {
    gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_NEMDB);
    mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
  }

  wsWindowCreate(&guiApp.mainWindow, guiApp.main.x, guiApp.main.y, guiApp.main.width, guiApp.main.height, (guiApp.mainDecoration ? wsShowFrame : 0 ) | wsMinSize | wsMaxSize | wsHideWindow, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, MPlayer);
  mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[main] mainWindow ID: 0x%x\n", (int) guiApp.mainWindow.WindowID);
  wsWindowShape(&guiApp.mainWindow, guiApp.main.Mask.Image);
  wsWindowIcon(wsDisplay, guiApp.mainWindow.WindowID, &guiIcon);
  wsXDNDMakeAwareness(&guiApp.mainWindow);

  guiApp.mainWindow.DrawHandler = uiMainDraw;
  guiApp.mainWindow.MouseHandler = uiMainMouse;
  guiApp.mainWindow.KeyHandler = uiMainKey;
  guiApp.mainWindow.DNDHandler = uiMainDND;
}