Mercurial > mplayer.hg
annotate Gui/mplayer/sw.c @ 19363:2e3981fa938c
Add support for 13k Voice (Qclp) in 3g2 files
Fix vorbis detection so that it doesn't misdetect other codecs
author | rtogni |
---|---|
date | Fri, 11 Aug 2006 22:57:33 +0000 |
parents | 0e1471d9da74 |
children |
rev | line source |
---|---|
1693 | 1 |
2 // sub window | |
3 | |
8864 | 4 #include <inttypes.h> |
5 | |
17144 | 6 #include "../config.h" |
7 #include "../libvo/x11_common.h" | |
8 #include "../libvo/fastmemcpy.h" | |
8864 | 9 |
17144 | 10 #include "app.h" |
11 #include "interface.h" | |
12 #include "../help_mp.h" | |
8055 | 13 #include "widgets.h" |
14 | |
6794 | 15 int mplSubRender = 0; |
1852 | 16 int SubVisible = 0; |
1812 | 17 |
8055 | 18 extern int boxMoved; |
19 extern int sx,sy; | |
20 extern int i,pot; | |
21 | |
8058 | 22 void mplSubDraw( void ) |
1693 | 23 { |
5919 | 24 if ( appMPlayer.subWindow.State == wsWindowClosed ) exit_player( MSGTR_Exit_quit ); |
25 | |
2045 | 26 if ( appMPlayer.subWindow.State == wsWindowFocusIn ) SubVisible++; |
8864 | 27 if ( appMPlayer.subWindow.State == wsWindowFocusOut && metacity_hack != 3 ) SubVisible--; |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
28 |
1852 | 29 if ( !appMPlayer.subWindow.Mapped || |
30 appMPlayer.subWindow.Visible == wsWindowNotVisible ) return; | |
1823 | 31 |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
32 if ( guiIntfStruct.Playing ) mplSubRender=0; |
1693 | 33 |
6794 | 34 if ( mplSubRender && appMPlayer.subWindow.State == wsWindowExpose ) |
1693 | 35 { |
2029 | 36 if ( appMPlayer.sub.Bitmap.Image ) wsPutImage( &appMPlayer.subWindow ); |
1693 | 37 } |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
38 appMPlayer.subWindow.State=0; |
1693 | 39 } |
40 | |
41 void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY ) | |
42 { | |
1812 | 43 static int mplSubMoved = 0; |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
44 static int msButton = 0; |
1812 | 45 |
8973 | 46 mplPBShow( X,Y ); |
47 | |
1693 | 48 switch( Button ) |
49 { | |
17087
4a56f15dee5f
Fix popup menu problems: GTK cannot get a grab while the button is down,
reimar
parents:
9625
diff
changeset
|
50 case wsRRMouseButton: |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
51 gtkShow( evShowPopUpMenu,NULL ); |
2980 | 52 break; |
6651 | 53 case wsPMMouseButton: |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
54 gtkShow( evHidePopUpMenu,NULL ); |
1693 | 55 mplShowMenu( RX,RY ); |
6651 | 56 msButton=wsPMMouseButton; |
1693 | 57 break; |
6651 | 58 case wsRMMouseButton: |
5919 | 59 mplHideMenu( RX,RY,1 ); |
1693 | 60 msButton=0; |
61 break; | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
62 // --- |
1693 | 63 case wsPLMouseButton: |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
64 gtkShow( evHidePopUpMenu,NULL ); |
1693 | 65 sx=X; sy=Y; |
66 msButton=wsPLMouseButton; | |
67 mplSubMoved=0; | |
68 break; | |
69 case wsMoveMouse: | |
70 switch ( msButton ) | |
71 { | |
72 case wsPLMouseButton: | |
73 mplSubMoved=1; | |
2854 | 74 if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,False,RX - sx,RY - sy ); |
1693 | 75 break; |
6651 | 76 case wsPMMouseButton: |
1693 | 77 mplMenuMouseHandle( X,Y,RX,RY ); |
78 break; | |
8973 | 79 default: mplPBShow( X,Y ); break; |
1693 | 80 } |
81 break; | |
82 case wsRLMouseButton: | |
5997
b5fb9a927bf3
add WM detection, and wm specific fullscreen code. (???)
pontscho
parents:
5919
diff
changeset
|
83 if ( ( !mplSubMoved )&&( appMPlayer.subWindow.isFullScreen ) ) |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
84 { |
6146 | 85 if( SubVisible++%2 ) wsMoveTopWindow( wsDisplay,appMPlayer.mainWindow.WindowID ); |
8864 | 86 else wsMoveTopWindow( wsDisplay,appMPlayer.subWindow.WindowID ); |
6623 | 87 } |
1693 | 88 msButton=0; |
89 mplSubMoved=0; | |
90 break; | |
91 } | |
92 } |