annotate Gui/mplayer/sw.h @ 3903:16c96a2353e8

added test for inet_pton()
author pl
date Sun, 30 Dec 2001 19:38:28 +0000
parents e518999fa7e7
children b1a2469e78ac
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
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
4 int mplSubRender = 1;
1852
58dd326fcc4a fix xshape, mixer, fullscreen, etc
pontscho
parents: 1841
diff changeset
5 int SubVisible = 0;
1812
d2d6a26ddb02 majd fix play&stop&pause&redraw
pontscho
parents: 1798
diff changeset
6
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
7 void mplSubDraw( wsParamDisplay )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
8 {
2045
deb4aff05c44 fix other bugs
pontscho
parents: 2030
diff changeset
9 if ( appMPlayer.subWindow.State == wsWindowFocusIn ) SubVisible++;
2851
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
10
1852
58dd326fcc4a fix xshape, mixer, fullscreen, etc
pontscho
parents: 1841
diff changeset
11 if ( !appMPlayer.subWindow.Mapped ||
58dd326fcc4a fix xshape, mixer, fullscreen, etc
pontscho
parents: 1841
diff changeset
12 appMPlayer.subWindow.Visible == wsWindowNotVisible ) return;
1823
a6c67352ccac fix some bug.
pontscho
parents: 1815
diff changeset
13
1852
58dd326fcc4a fix xshape, mixer, fullscreen, etc
pontscho
parents: 1841
diff changeset
14 if ( mplShMem->Playing )
2851
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
15 {
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
16 vo_expose=1;
1812
d2d6a26ddb02 majd fix play&stop&pause&redraw
pontscho
parents: 1798
diff changeset
17 mplSubRender=0;
1798
ddeafb1dbc73 fix sub redraw
pontscho
parents: 1781
diff changeset
18 }
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
19
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
20 if ( mplSubRender )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
21 {
2029
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
22 if ( appMPlayer.sub.Bitmap.Image ) wsPutImage( &appMPlayer.subWindow );
2025
0653e90b3118 some bug fix, and sub window render speed up.. 10l kola ? :)
pontscho
parents: 1858
diff changeset
23 // XFlush( wsDisplay );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
24 }
2851
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
25 appMPlayer.subWindow.State=0;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
26 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
27
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
28 void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
29 {
1812
d2d6a26ddb02 majd fix play&stop&pause&redraw
pontscho
parents: 1798
diff changeset
30 static int mplSubMoved = 0;
2851
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
31 static int msButton = 0;
1812
d2d6a26ddb02 majd fix play&stop&pause&redraw
pontscho
parents: 1798
diff changeset
32
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
33 mplMouseTimer=mplMouseTimerConst;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
34 wsVisibleMouse( &appMPlayer.subWindow,wsShowMouseCursor );
2980
c4b6dc8bb554 fix middle menu hideing bug
pontscho
parents: 2902
diff changeset
35
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
36
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
37 switch( Button )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
38 {
2902
d47cbcdce1a8 rewrite some header meg jol csinaltam menu -t koepso gombra gonosz mod ( bocs, tom, nem angol).
pontscho
parents: 2854
diff changeset
39 case wsPMMouseButton:
3075
11b02bd1de45 bocs, elfelejtettem feltenni :)
pontscho
parents: 3054
diff changeset
40 #ifdef USE_DVDREAD
3054
9507f90d8254 add half dvd support for gui
pontscho
parents: 2980
diff changeset
41 memcpy( &gtkShMem->DVD,&mplShMem->DVD,sizeof( mplDVDStruct ) );
3075
11b02bd1de45 bocs, elfelejtettem feltenni :)
pontscho
parents: 3054
diff changeset
42 #endif
2980
c4b6dc8bb554 fix middle menu hideing bug
pontscho
parents: 2902
diff changeset
43 gtkSendMessage( evShowPopUpMenu );
c4b6dc8bb554 fix middle menu hideing bug
pontscho
parents: 2902
diff changeset
44 break;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
45 case wsPRMouseButton:
2980
c4b6dc8bb554 fix middle menu hideing bug
pontscho
parents: 2902
diff changeset
46 if ( gtkShMem->visiblepopupmenu ) gtkSendMessage( evHidePopUpMenu );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
47 mplShowMenu( RX,RY );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
48 msButton=wsPRMouseButton;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
49 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
50 case wsRRMouseButton:
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
51 mplHideMenu( RX,RY );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
52 msButton=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
53 break;
2851
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
54 // ---
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
55 case wsPLMouseButton:
3477
9e7289fdc471 ize ... majd gabu ide irja. ilyen fullscreenben mouse button press - re jon elo main window.
pontscho
parents: 3075
diff changeset
56 if ( appMPlayer.subWindow.isFullScreen )
9e7289fdc471 ize ... majd gabu ide irja. ilyen fullscreenben mouse button press - re jon elo main window.
pontscho
parents: 3075
diff changeset
57 {
3478
e518999fa7e7 fs windows switch fix
pontscho
parents: 3477
diff changeset
58 if( ++SubVisible%2 ) wsMoveTopWindow( &appMPlayer.mainWindow );
e518999fa7e7 fs windows switch fix
pontscho
parents: 3477
diff changeset
59 else wsMoveTopWindow( &appMPlayer.subWindow );
e518999fa7e7 fs windows switch fix
pontscho
parents: 3477
diff changeset
60 mplSubMoved=1;
3477
9e7289fdc471 ize ... majd gabu ide irja. ilyen fullscreenben mouse button press - re jon elo main window.
pontscho
parents: 3075
diff changeset
61 break;
9e7289fdc471 ize ... majd gabu ide irja. ilyen fullscreenben mouse button press - re jon elo main window.
pontscho
parents: 3075
diff changeset
62 }
2980
c4b6dc8bb554 fix middle menu hideing bug
pontscho
parents: 2902
diff changeset
63 if ( gtkShMem->visiblepopupmenu ) gtkSendMessage( evHidePopUpMenu );
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;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
75 case wsPRMouseButton:
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 mplMouseTimer=mplMouseTimerConst;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
78 break;
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:
2030
68dbb349566e mwm fullscreen bug fixed (?)
pontscho
parents: 2029
diff changeset
82 // if ( ( !mplSubMoved )&&( ( SubVisible++%2 ) ) ) wsMoveTopWindow( &appMPlayer.mainWindow );
68dbb349566e mwm fullscreen bug fixed (?)
pontscho
parents: 2029
diff changeset
83 if ( !mplSubMoved )
2851
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
84 {
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
85 if( SubVisible++%2 )
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
86 {
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
87 wsMoveTopWindow( &appMPlayer.mainWindow );
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
88 fprintf( stderr,"[sw] MAIN TOP\n" );
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
89 }
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
90 else
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
91 {
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
92 wsMoveTopWindow( &appMPlayer.subWindow );
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
93 fprintf( stderr,"[sw] SUB TOP\n" );
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
94 }
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
95 }
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
96 msButton=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
97 mplSubMoved=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
98 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
99 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
100 }