Mercurial > mplayer.hg
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 |
rev | line source |
---|---|
1693 | 1 |
2 // sub window | |
3 | |
8864 | 4 #include <inttypes.h> |
5 | |
6 #include "../../config.h" | |
7 #include "../../libvo/x11_common.h" | |
8 | |
8055 | 9 #include "../app.h" |
10 #include "../interface.h" | |
11 #include "../../help_mp.h" | |
12 #include "widgets.h" | |
13 | |
6794 | 14 int mplSubRender = 0; |
1852 | 15 int SubVisible = 0; |
1812 | 16 |
8055 | 17 extern int boxMoved; |
18 extern int sx,sy; | |
19 extern int i,pot; | |
20 | |
8058 | 21 void mplSubDraw( void ) |
1693 | 22 { |
5919 | 23 if ( appMPlayer.subWindow.State == wsWindowClosed ) exit_player( MSGTR_Exit_quit ); |
24 | |
2045 | 25 if ( appMPlayer.subWindow.State == wsWindowFocusIn ) SubVisible++; |
8864 | 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 | 28 if ( !appMPlayer.subWindow.Mapped || |
29 appMPlayer.subWindow.Visible == wsWindowNotVisible ) return; | |
1823 | 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 | 32 |
6794 | 33 if ( mplSubRender && appMPlayer.subWindow.State == wsWindowExpose ) |
1693 | 34 { |
2029 | 35 if ( appMPlayer.sub.Bitmap.Image ) wsPutImage( &appMPlayer.subWindow ); |
1693 | 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 | 38 } |
39 | |
40 void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY ) | |
41 { | |
1812 | 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 | 44 |
8973 | 45 mplPBShow( X,Y ); |
46 | |
1693 | 47 switch( Button ) |
48 { | |
6651 | 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 | 51 break; |
6651 | 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 | 54 mplShowMenu( RX,RY ); |
6651 | 55 msButton=wsPMMouseButton; |
1693 | 56 break; |
6651 | 57 case wsRMMouseButton: |
5919 | 58 mplHideMenu( RX,RY,1 ); |
1693 | 59 msButton=0; |
60 break; | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
61 // --- |
1693 | 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 | 64 sx=X; sy=Y; |
65 msButton=wsPLMouseButton; | |
66 mplSubMoved=0; | |
67 break; | |
68 case wsMoveMouse: | |
69 switch ( msButton ) | |
70 { | |
71 case wsPLMouseButton: | |
72 mplSubMoved=1; | |
2854 | 73 if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,False,RX - sx,RY - sy ); |
1693 | 74 break; |
6651 | 75 case wsPMMouseButton: |
1693 | 76 mplMenuMouseHandle( X,Y,RX,RY ); |
77 break; | |
8973 | 78 default: mplPBShow( X,Y ); break; |
1693 | 79 } |
80 break; | |
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 | 84 if( SubVisible++%2 ) wsMoveTopWindow( wsDisplay,appMPlayer.mainWindow.WindowID ); |
8864 | 85 else wsMoveTopWindow( wsDisplay,appMPlayer.subWindow.WindowID ); |
6623 | 86 } |
1693 | 87 msButton=0; |
88 mplSubMoved=0; | |
89 break; | |
90 } | |
91 } |