Mercurial > mplayer.hg
changeset 35767:23e241430e9c
Cosmetic: Replace uiMenuInit().
author | ib |
---|---|
date | Thu, 24 Jan 2013 17:37:49 +0000 |
parents | 16ed8155439b |
children | 51a8ea7542a0 |
files | gui/ui/menu.c |
diffstat | 1 files changed, 30 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/ui/menu.c Thu Jan 24 17:36:42 2013 +0000 +++ b/gui/ui/menu.c Thu Jan 24 17:37:49 2013 +0000 @@ -94,6 +94,36 @@ wsWindowRedraw( &guiApp.menuWindow ); } +void uiMenuInit( void ) +{ + + if ( menuIsInitialized || !guiApp.menuIsPresent || !guiApp.menu.Bitmap.Image ) return; + + guiApp.menu.x=0; + guiApp.menu.y=0; + + if ( ( menuDrawBuffer = calloc( 1,guiApp.menu.Bitmap.ImageSize ) ) == NULL ) + { + mp_msg( MSGT_GPLAYER,MSGL_DBG2,MSGTR_NEMFMR ); + gtkMessageBox( GTK_MB_FATAL,MSGTR_NEMFMR ); + 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" ); + + wsWindowShape( &guiApp.menuWindow,guiApp.menu.Mask.Image ); + + mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[menu] menuWindow ID: 0x%x\n",(int)guiApp.menuWindow.WindowID ); + + menuIsInitialized=True; + guiApp.menuWindow.DrawHandler=uiMenuDraw; +// guiApp.menuWindow.MouseHandler=uiMenuMouse; +// guiApp.menuWindow.KeyHandler=uiMainKey; + uiMenuRender=True; wsWindowRedraw( &guiApp.menuWindow ); +} + void uiMenuShow( int mx,int my ) { int x,y; @@ -142,33 +172,3 @@ uiEventHandling( guiApp.menuItems[i].message,(float)w ); } } - -void uiMenuInit( void ) -{ - - if ( menuIsInitialized || !guiApp.menuIsPresent || !guiApp.menu.Bitmap.Image ) return; - - guiApp.menu.x=0; - guiApp.menu.y=0; - - if ( ( menuDrawBuffer = calloc( 1,guiApp.menu.Bitmap.ImageSize ) ) == NULL ) - { - mp_msg( MSGT_GPLAYER,MSGL_DBG2,MSGTR_NEMFMR ); - gtkMessageBox( GTK_MB_FATAL,MSGTR_NEMFMR ); - 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" ); - - wsWindowShape( &guiApp.menuWindow,guiApp.menu.Mask.Image ); - - mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[menu] menuWindow ID: 0x%x\n",(int)guiApp.menuWindow.WindowID ); - - menuIsInitialized=True; - guiApp.menuWindow.DrawHandler=uiMenuDraw; -// guiApp.menuWindow.MouseHandler=uiMenuMouse; -// guiApp.menuWindow.KeyHandler=uiMainKey; - uiMenuRender=True; wsWindowRedraw( &guiApp.menuWindow ); -}