annotate Gui/mplayer/sw.c @ 9440:c54fb9b3cdd5

enable vidix for ppc
author alex
date Sat, 15 Feb 2003 21:51:24 +0000
parents 0a665389cf2b
children bc24dd70c6e2
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
b8c271750450 - sync with x11_common
pontscho
parents: 8058
diff changeset
6 #include "../../config.h"
b8c271750450 - sync with x11_common
pontscho
parents: 8058
diff changeset
7 #include "../../libvo/x11_common.h"
b8c271750450 - sync with x11_common
pontscho
parents: 8058
diff changeset
8
8055
79ddb7291765 not needed
pontscho
parents: 8048
diff changeset
9 #include "../app.h"
79ddb7291765 not needed
pontscho
parents: 8048
diff changeset
10 #include "../interface.h"
79ddb7291765 not needed
pontscho
parents: 8048
diff changeset
11 #include "../../help_mp.h"
79ddb7291765 not needed
pontscho
parents: 8048
diff changeset
12 #include "widgets.h"
79ddb7291765 not needed
pontscho
parents: 8048
diff changeset
13
6794
77980ab4e296 - add preferences support (first try)
pontscho
parents: 6651
diff changeset
14 int mplSubRender = 0;
1852
58dd326fcc4a fix xshape, mixer, fullscreen, etc
pontscho
parents: 1841
diff changeset
15 int SubVisible = 0;
1812
d2d6a26ddb02 majd fix play&stop&pause&redraw
pontscho
parents: 1798
diff changeset
16
8055
79ddb7291765 not needed
pontscho
parents: 8048
diff changeset
17 extern int boxMoved;
79ddb7291765 not needed
pontscho
parents: 8048
diff changeset
18 extern int sx,sy;
79ddb7291765 not needed
pontscho
parents: 8048
diff changeset
19 extern int i,pot;
79ddb7291765 not needed
pontscho
parents: 8048
diff changeset
20
8058
9246adcf95f0 cosmetic
pontscho
parents: 8055
diff changeset
21 void mplSubDraw( void )
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
22 {
5919
60cf2bca993f some bug fix
pontscho
parents: 5651
diff changeset
23 if ( appMPlayer.subWindow.State == wsWindowClosed ) exit_player( MSGTR_Exit_quit );
60cf2bca993f some bug fix
pontscho
parents: 5651
diff changeset
24
2045
deb4aff05c44 fix other bugs
pontscho
parents: 2030
diff changeset
25 if ( appMPlayer.subWindow.State == wsWindowFocusIn ) SubVisible++;
8864
b8c271750450 - sync with x11_common
pontscho
parents: 8058
diff changeset
26 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
27
1852
58dd326fcc4a fix xshape, mixer, fullscreen, etc
pontscho
parents: 1841
diff changeset
28 if ( !appMPlayer.subWindow.Mapped ||
58dd326fcc4a fix xshape, mixer, fullscreen, etc
pontscho
parents: 1841
diff changeset
29 appMPlayer.subWindow.Visible == wsWindowNotVisible ) return;
1823
a6c67352ccac fix some bug.
pontscho
parents: 1815
diff changeset
30
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4797
diff changeset
31 if ( guiIntfStruct.Playing ) mplSubRender=0;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
32
6794
77980ab4e296 - add preferences support (first try)
pontscho
parents: 6651
diff changeset
33 if ( mplSubRender && appMPlayer.subWindow.State == wsWindowExpose )
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
34 {
2029
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
35 if ( appMPlayer.sub.Bitmap.Image ) wsPutImage( &appMPlayer.subWindow );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
36 }
2851
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
37 appMPlayer.subWindow.State=0;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
38 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
39
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
40 void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
41 {
1812
d2d6a26ddb02 majd fix play&stop&pause&redraw
pontscho
parents: 1798
diff changeset
42 static int mplSubMoved = 0;
2851
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
43 static int msButton = 0;
1812
d2d6a26ddb02 majd fix play&stop&pause&redraw
pontscho
parents: 1798
diff changeset
44
8973
0a665389cf2b - add playbar
pontscho
parents: 8864
diff changeset
45 mplPBShow( X,Y );
0a665389cf2b - add playbar
pontscho
parents: 8864
diff changeset
46
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
47 switch( Button )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
48 {
6651
8f49c75a2824 - add icon (nice, but very ugly hakk:)
pontscho
parents: 6623
diff changeset
49 case wsPRMouseButton:
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4797
diff changeset
50 gtkShow( evShowPopUpMenu,NULL );
2980
c4b6dc8bb554 fix middle menu hideing bug
pontscho
parents: 2902
diff changeset
51 break;
6651
8f49c75a2824 - add icon (nice, but very ugly hakk:)
pontscho
parents: 6623
diff changeset
52 case wsPMMouseButton:
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4797
diff changeset
53 gtkShow( evHidePopUpMenu,NULL );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
54 mplShowMenu( RX,RY );
6651
8f49c75a2824 - add icon (nice, but very ugly hakk:)
pontscho
parents: 6623
diff changeset
55 msButton=wsPMMouseButton;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
56 break;
6651
8f49c75a2824 - add icon (nice, but very ugly hakk:)
pontscho
parents: 6623
diff changeset
57 case wsRMMouseButton:
5919
60cf2bca993f some bug fix
pontscho
parents: 5651
diff changeset
58 mplHideMenu( RX,RY,1 );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
59 msButton=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
60 break;
2851
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
61 // ---
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
62 case wsPLMouseButton:
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4797
diff changeset
63 gtkShow( evHidePopUpMenu,NULL );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
64 sx=X; sy=Y;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
65 msButton=wsPLMouseButton;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
66 mplSubMoved=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
67 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
68 case wsMoveMouse:
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
69 switch ( msButton )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
70 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
71 case wsPLMouseButton:
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
72 mplSubMoved=1;
2854
fd44ecf77f8d move bug meg fileload bug fixed asszem.
pontscho
parents: 2851
diff changeset
73 if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,False,RX - sx,RY - sy );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
74 break;
6651
8f49c75a2824 - add icon (nice, but very ugly hakk:)
pontscho
parents: 6623
diff changeset
75 case wsPMMouseButton:
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
76 mplMenuMouseHandle( X,Y,RX,RY );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
77 break;
8973
0a665389cf2b - add playbar
pontscho
parents: 8864
diff changeset
78 default: mplPBShow( X,Y ); break;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
79 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
80 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
81 case wsRLMouseButton:
5997
b5fb9a927bf3 add WM detection, and wm specific fullscreen code. (???)
pontscho
parents: 5919
diff changeset
82 if ( ( !mplSubMoved )&&( appMPlayer.subWindow.isFullScreen ) )
2851
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
83 {
6146
b9651eb9749e fix some gtk bug...
pontscho
parents: 5997
diff changeset
84 if( SubVisible++%2 ) wsMoveTopWindow( wsDisplay,appMPlayer.mainWindow.WindowID );
8864
b8c271750450 - sync with x11_common
pontscho
parents: 8058
diff changeset
85 else wsMoveTopWindow( wsDisplay,appMPlayer.subWindow.WindowID );
6623
7bc4c6ba9485 add -audiofile support for gui
pontscho
parents: 6622
diff changeset
86 }
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
87 msButton=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
88 mplSubMoved=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
89 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
90 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
91 }