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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
1
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
2 // sub window
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
3
8864
b8c271750450 - sync with x11_common
pontscho
parents: 8058
diff changeset
4 #include <inttypes.h>
b8c271750450 - sync with x11_common
pontscho
parents: 8058
diff changeset
5
17144
0e1471d9da74 Unify include paths, -I.. is in CFLAGS.
diego
parents: 17087
diff changeset
6 #include "../config.h"
0e1471d9da74 Unify include paths, -I.. is in CFLAGS.
diego
parents: 17087
diff changeset
7 #include "../libvo/x11_common.h"
0e1471d9da74 Unify include paths, -I.. is in CFLAGS.
diego
parents: 17087
diff changeset
8 #include "../libvo/fastmemcpy.h"
8864
b8c271750450 - sync with x11_common
pontscho
parents: 8058
diff changeset
9
17144
0e1471d9da74 Unify include paths, -I.. is in CFLAGS.
diego
parents: 17087
diff changeset
10 #include "app.h"
0e1471d9da74 Unify include paths, -I.. is in CFLAGS.
diego
parents: 17087
diff changeset
11 #include "interface.h"
0e1471d9da74 Unify include paths, -I.. is in CFLAGS.
diego
parents: 17087
diff changeset
12 #include "../help_mp.h"
8055
79ddb7291765 not needed
pontscho
parents: 8048
diff changeset
13 #include "widgets.h"
79ddb7291765 not needed
pontscho
parents: 8048
diff changeset
14
6794
77980ab4e296 - add preferences support (first try)
pontscho
parents: 6651
diff changeset
15 int mplSubRender = 0;
1852
58dd326fcc4a fix xshape, mixer, fullscreen, etc
pontscho
parents: 1841
diff changeset
16 int SubVisible = 0;
1812
d2d6a26ddb02 majd fix play&stop&pause&redraw
pontscho
parents: 1798
diff changeset
17
8055
79ddb7291765 not needed
pontscho
parents: 8048
diff changeset
18 extern int boxMoved;
79ddb7291765 not needed
pontscho
parents: 8048
diff changeset
19 extern int sx,sy;
79ddb7291765 not needed
pontscho
parents: 8048
diff changeset
20 extern int i,pot;
79ddb7291765 not needed
pontscho
parents: 8048
diff changeset
21
8058
9246adcf95f0 cosmetic
pontscho
parents: 8055
diff changeset
22 void mplSubDraw( void )
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
23 {
5919
60cf2bca993f some bug fix
pontscho
parents: 5651
diff changeset
24 if ( appMPlayer.subWindow.State == wsWindowClosed ) exit_player( MSGTR_Exit_quit );
60cf2bca993f some bug fix
pontscho
parents: 5651
diff changeset
25
2045
deb4aff05c44 fix other bugs
pontscho
parents: 2030
diff changeset
26 if ( appMPlayer.subWindow.State == wsWindowFocusIn ) SubVisible++;
8864
b8c271750450 - sync with x11_common
pontscho
parents: 8058
diff changeset
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
58dd326fcc4a fix xshape, mixer, fullscreen, etc
pontscho
parents: 1841
diff changeset
29 if ( !appMPlayer.subWindow.Mapped ||
58dd326fcc4a fix xshape, mixer, fullscreen, etc
pontscho
parents: 1841
diff changeset
30 appMPlayer.subWindow.Visible == wsWindowNotVisible ) return;
1823
a6c67352ccac fix some bug.
pontscho
parents: 1815
diff changeset
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
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
33
6794
77980ab4e296 - add preferences support (first try)
pontscho
parents: 6651
diff changeset
34 if ( mplSubRender && appMPlayer.subWindow.State == wsWindowExpose )
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
35 {
2029
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
36 if ( appMPlayer.sub.Bitmap.Image ) wsPutImage( &appMPlayer.subWindow );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
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
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
39 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
40
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
41 void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
42 {
1812
d2d6a26ddb02 majd fix play&stop&pause&redraw
pontscho
parents: 1798
diff changeset
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
d2d6a26ddb02 majd fix play&stop&pause&redraw
pontscho
parents: 1798
diff changeset
45
8973
0a665389cf2b - add playbar
pontscho
parents: 8864
diff changeset
46 mplPBShow( X,Y );
0a665389cf2b - add playbar
pontscho
parents: 8864
diff changeset
47
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
48 switch( Button )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
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
c4b6dc8bb554 fix middle menu hideing bug
pontscho
parents: 2902
diff changeset
52 break;
6651
8f49c75a2824 - add icon (nice, but very ugly hakk:)
pontscho
parents: 6623
diff changeset
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
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
55 mplShowMenu( RX,RY );
6651
8f49c75a2824 - add icon (nice, but very ugly hakk:)
pontscho
parents: 6623
diff changeset
56 msButton=wsPMMouseButton;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
57 break;
6651
8f49c75a2824 - add icon (nice, but very ugly hakk:)
pontscho
parents: 6623
diff changeset
58 case wsRMMouseButton:
5919
60cf2bca993f some bug fix
pontscho
parents: 5651
diff changeset
59 mplHideMenu( RX,RY,1 );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
60 msButton=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
61 break;
2851
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
62 // ---
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
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
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
65 sx=X; sy=Y;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
66 msButton=wsPLMouseButton;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
67 mplSubMoved=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
68 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
69 case wsMoveMouse:
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
70 switch ( msButton )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
71 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
72 case wsPLMouseButton:
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
73 mplSubMoved=1;
2854
fd44ecf77f8d move bug meg fileload bug fixed asszem.
pontscho
parents: 2851
diff changeset
74 if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,False,RX - sx,RY - sy );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
75 break;
6651
8f49c75a2824 - add icon (nice, but very ugly hakk:)
pontscho
parents: 6623
diff changeset
76 case wsPMMouseButton:
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
77 mplMenuMouseHandle( X,Y,RX,RY );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
78 break;
8973
0a665389cf2b - add playbar
pontscho
parents: 8864
diff changeset
79 default: mplPBShow( X,Y ); break;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
80 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
81 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
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
b9651eb9749e fix some gtk bug...
pontscho
parents: 5997
diff changeset
85 if( SubVisible++%2 ) wsMoveTopWindow( wsDisplay,appMPlayer.mainWindow.WindowID );
8864
b8c271750450 - sync with x11_common
pontscho
parents: 8058
diff changeset
86 else wsMoveTopWindow( wsDisplay,appMPlayer.subWindow.WindowID );
6623
7bc4c6ba9485 add -audiofile support for gui
pontscho
parents: 6622
diff changeset
87 }
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
88 msButton=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
89 mplSubMoved=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
90 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
91 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
92 }