Mercurial > mplayer.hg
annotate gui/mplayer/sw.c @ 24058:345b18b889c9
allow setting of ar from the commandline of configure
author | mhoffman |
---|---|
date | Thu, 16 Aug 2007 12:41:01 +0000 |
parents | 8b61dc798f48 |
children | 10dfbc523184 |
rev | line source |
---|---|
23077 | 1 |
2 // sub window | |
3 | |
4 #include <inttypes.h> | |
23305
22d3d12c6dfb
Include string.h for memcpy, fastmemcpy.h alone is not enough.
reimar
parents:
23154
diff
changeset
|
5 #include <string.h> |
23077 | 6 |
7 #include "../config.h" | |
8 #include "../libvo/x11_common.h" | |
9 | |
23154
e564b9cd7290
Fix several implicit declarations of functions warnings.
diego
parents:
23077
diff
changeset
|
10 #include "gmplayer.h" |
23077 | 11 #include "app.h" |
12 #include "interface.h" | |
13 #include "../help_mp.h" | |
14 #include "widgets.h" | |
15 | |
16 int mplSubRender = 0; | |
17 int SubVisible = 0; | |
18 | |
19 extern int boxMoved; | |
20 extern int sx,sy; | |
21 extern int i,pot; | |
22 | |
23 void mplSubDraw( void ) | |
24 { | |
25 if ( appMPlayer.subWindow.State == wsWindowClosed ) exit_player( MSGTR_Exit_quit ); | |
26 | |
27 if ( appMPlayer.subWindow.State == wsWindowFocusIn ) SubVisible++; | |
28 if ( appMPlayer.subWindow.State == wsWindowFocusOut && metacity_hack != 3 ) SubVisible--; | |
29 | |
30 if ( !appMPlayer.subWindow.Mapped || | |
31 appMPlayer.subWindow.Visible == wsWindowNotVisible ) return; | |
32 | |
33 if ( guiIntfStruct.Playing ) mplSubRender=0; | |
34 | |
35 if ( mplSubRender && appMPlayer.subWindow.State == wsWindowExpose ) | |
36 { | |
37 if ( appMPlayer.sub.Bitmap.Image ) wsPutImage( &appMPlayer.subWindow ); | |
38 } | |
39 appMPlayer.subWindow.State=0; | |
40 } | |
41 | |
42 void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY ) | |
43 { | |
44 static int mplSubMoved = 0; | |
45 static int msButton = 0; | |
46 | |
47 mplPBShow( X,Y ); | |
48 | |
49 switch( Button ) | |
50 { | |
51 case wsRRMouseButton: | |
52 gtkShow( evShowPopUpMenu,NULL ); | |
53 break; | |
54 case wsPMMouseButton: | |
55 gtkShow( evHidePopUpMenu,NULL ); | |
56 mplShowMenu( RX,RY ); | |
57 msButton=wsPMMouseButton; | |
58 break; | |
59 case wsRMMouseButton: | |
60 mplHideMenu( RX,RY,1 ); | |
61 msButton=0; | |
62 break; | |
63 // --- | |
64 case wsPLMouseButton: | |
65 gtkShow( evHidePopUpMenu,NULL ); | |
66 sx=X; sy=Y; | |
67 msButton=wsPLMouseButton; | |
68 mplSubMoved=0; | |
69 break; | |
70 case wsMoveMouse: | |
71 switch ( msButton ) | |
72 { | |
73 case wsPLMouseButton: | |
74 mplSubMoved=1; | |
75 if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,False,RX - sx,RY - sy ); | |
76 break; | |
77 case wsPMMouseButton: | |
78 mplMenuMouseHandle( X,Y,RX,RY ); | |
79 break; | |
80 default: mplPBShow( X,Y ); break; | |
81 } | |
82 break; | |
83 case wsRLMouseButton: | |
84 if ( ( !mplSubMoved )&&( appMPlayer.subWindow.isFullScreen ) ) | |
85 { | |
86 if( SubVisible++%2 ) wsMoveTopWindow( wsDisplay,appMPlayer.mainWindow.WindowID ); | |
87 else wsMoveTopWindow( wsDisplay,appMPlayer.subWindow.WindowID ); | |
88 } | |
89 msButton=0; | |
90 mplSubMoved=0; | |
91 break; | |
92 } | |
93 } |