annotate Gui/mplayer/play.c @ 2118:b8a74eb96c04

typo fix
author gabucino
date Sun, 07 Oct 2001 09:46:40 +0000
parents deb4aff05c44
children 9582af160d04
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 #include <stdlib.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
3 #include <stdio.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
4
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
5 #include <unistd.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
6 #include <signal.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
7
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
8 int mplParent = 1;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
9
1765
29913c011d50 normal size
pontscho
parents: 1757
diff changeset
10 int moviex,moviey,moviewidth,movieheight;
1723
5e4214a7540e GUI stuff. now seeking works, and xmga renders to video window
arpi
parents: 1693
diff changeset
11
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
12 #include "../app.h"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
13
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
14 #include "../wm/ws.h"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
15 #include "../wm/wskeys.h"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
16 #include "../wm/widget.h"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
17
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
18 #include "../../config.h"
1884
d21f8afc7680 add to multi lang support
pontscho
parents: 1866
diff changeset
19 #include "../../help_mp.h"
1723
5e4214a7540e GUI stuff. now seeking works, and xmga renders to video window
arpi
parents: 1693
diff changeset
20 #include "../../libvo/x11_common.h"
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
21
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
22 #include "widgets.h"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
23 #include "./mplayer.h"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
24 #include "psignal.h"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
25 #include "play.h"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
26
1800
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
27 #include "../skin/skin.h"
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
28 #include "../error.h"
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
29
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
30 mplCommStruct * mplShMem;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
31 char * Filename = NULL;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
32
1723
5e4214a7540e GUI stuff. now seeking works, and xmga renders to video window
arpi
parents: 1693
diff changeset
33 extern float rel_seek_secs;
5e4214a7540e GUI stuff. now seeking works, and xmga renders to video window
arpi
parents: 1693
diff changeset
34 extern int abs_seek_pos;
5e4214a7540e GUI stuff. now seeking works, and xmga renders to video window
arpi
parents: 1693
diff changeset
35
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
36 void mplFullScreen( void )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
37 {
2029
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
38 static int sx,sy;
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
39 wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow );
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
40 if ( appMPlayer.subWindow.isFullScreen )
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
41 {
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
42 wsResizeWindow( &appMPlayer.subWindow,sx,sy );
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
43 wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y );
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
44 wsWindowDecoration( &appMPlayer.subWindow,appMPlayer.subWindow.Decorations );
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
45 appMPlayer.subWindow.isFullScreen=0;
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
46 }
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
47 else
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
48 {
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
49 sx=appMPlayer.subWindow.Width; sy=appMPlayer.subWindow.Height;
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
50 wsResizeWindow( &appMPlayer.subWindow,wsMaxX,wsMaxY );
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
51 wsMoveWindow( &appMPlayer.subWindow,0,0 );
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
52 wsWindowDecoration( &appMPlayer.subWindow,0 );
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
53 appMPlayer.subWindow.isFullScreen=1;
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
54 }
2045
deb4aff05c44 fix other bugs
pontscho
parents: 2029
diff changeset
55 if ( mplShMem->Playing ) wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 );
deb4aff05c44 fix other bugs
pontscho
parents: 2029
diff changeset
56 else wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
2029
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
57 wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow );
1756
9621e4d14c6d fullscreen fixed
pontscho
parents: 1747
diff changeset
58 mplResize( 0,0,appMPlayer.subWindow.Width,appMPlayer.subWindow.Height );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
59 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
60
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
61 extern int mplSubRender;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
62
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
63 void mplStop()
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
64 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
65 mplShMem->Playing=0;
1812
d2d6a26ddb02 majd fix play&stop&pause&redraw
pontscho
parents: 1804
diff changeset
66 mplShMem->TimeSec=0;
1825
1791c7930776 fix sizeof :))))
pontscho
parents: 1815
diff changeset
67 mplShMem->Position=0;
1888
1f1e98fbf3a7 add new sumbols
pontscho
parents: 1884
diff changeset
68 mplShMem->AudioType=0;
1953
041483da104e stop bug fix.
pontscho
parents: 1952
diff changeset
69 // if ( !mplShMem->Playing ) return;
1796
13ea5f992185 fix stop subimage
pontscho
parents: 1791
diff changeset
70 if ( !appMPlayer.subWindow.isFullScreen )
13ea5f992185 fix stop subimage
pontscho
parents: 1791
diff changeset
71 {
2025
0653e90b3118 some bug fix, and sub window render speed up.. 10l kola ? :)
pontscho
parents: 1953
diff changeset
72 wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height );
1796
13ea5f992185 fix stop subimage
pontscho
parents: 1791
diff changeset
73 wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y );
13ea5f992185 fix stop subimage
pontscho
parents: 1791
diff changeset
74 }
1797
d1aabeb7274f fix after stop redraw. vagy nem.
pontscho
parents: 1796
diff changeset
75 mplSubRender=1;
2045
deb4aff05c44 fix other bugs
pontscho
parents: 2029
diff changeset
76 wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
1953
041483da104e stop bug fix.
pontscho
parents: 1952
diff changeset
77 wsClearWindow( appMPlayer.subWindow );
1797
d1aabeb7274f fix after stop redraw. vagy nem.
pontscho
parents: 1796
diff changeset
78 wsPostRedisplay( &appMPlayer.subWindow );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
79 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
80
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
81 void mplPlay( void )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
82 {
1812
d2d6a26ddb02 majd fix play&stop&pause&redraw
pontscho
parents: 1804
diff changeset
83 if ( ( mplShMem->Filename[0] == 0 )||
1804
76b4f7bcd087 play->pause fix ?
pontscho
parents: 1802
diff changeset
84 ( mplShMem->Playing == 1 ) ) return;
76b4f7bcd087 play->pause fix ?
pontscho
parents: 1802
diff changeset
85 if ( mplShMem->Playing == 2 ) { mplPause(); return; }
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
86 mplShMem->Playing=1;
1791
2e86c5c8071e fix subvindov
pontscho
parents: 1784
diff changeset
87 mplSubRender=0;
1858
88a88d0a3f94 fix skin changing, xv fullscreen redraw bug, etc.
pontscho
parents: 1852
diff changeset
88 wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 );
88a88d0a3f94 fix skin changing, xv fullscreen redraw bug, etc.
pontscho
parents: 1852
diff changeset
89 wsClearWindow( appMPlayer.subWindow );
1852
58dd326fcc4a fix xshape, mixer, fullscreen, etc
pontscho
parents: 1850
diff changeset
90 wsPostRedisplay( &appMPlayer.subWindow );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
91 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
92
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
93 void mplPause( void )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
94 {
1804
76b4f7bcd087 play->pause fix ?
pontscho
parents: 1802
diff changeset
95 switch( mplShMem->Playing )
76b4f7bcd087 play->pause fix ?
pontscho
parents: 1802
diff changeset
96 {
76b4f7bcd087 play->pause fix ?
pontscho
parents: 1802
diff changeset
97 case 1: // playing
76b4f7bcd087 play->pause fix ?
pontscho
parents: 1802
diff changeset
98 mplShMem->Playing=2;
76b4f7bcd087 play->pause fix ?
pontscho
parents: 1802
diff changeset
99 btnModify( evPlaySwitchToPause,btnReleased );
76b4f7bcd087 play->pause fix ?
pontscho
parents: 1802
diff changeset
100 btnModify( evPauseSwitchToPlay,btnDisabled );
76b4f7bcd087 play->pause fix ?
pontscho
parents: 1802
diff changeset
101 break;
76b4f7bcd087 play->pause fix ?
pontscho
parents: 1802
diff changeset
102 case 2: // paused
76b4f7bcd087 play->pause fix ?
pontscho
parents: 1802
diff changeset
103 mplShMem->Playing=1;
76b4f7bcd087 play->pause fix ?
pontscho
parents: 1802
diff changeset
104 btnModify( evPlaySwitchToPause,btnDisabled );
76b4f7bcd087 play->pause fix ?
pontscho
parents: 1802
diff changeset
105 btnModify( evPauseSwitchToPlay,btnReleased );
76b4f7bcd087 play->pause fix ?
pontscho
parents: 1802
diff changeset
106 break;
76b4f7bcd087 play->pause fix ?
pontscho
parents: 1802
diff changeset
107 }
1815
eff8f3c200fa fix resize
pontscho
parents: 1812
diff changeset
108 mplSubRender=0;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
109 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
110
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
111 void mplResize( unsigned int X,unsigned int Y,unsigned int width,unsigned int height )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
112 {
1852
58dd326fcc4a fix xshape, mixer, fullscreen, etc
pontscho
parents: 1850
diff changeset
113 // printf( "----resize---> %dx%d --- \n",width,height );
1770
7e3136adcfb1 fix play->pause bug
pontscho
parents: 1765
diff changeset
114 vo_setwindowsize( width,height );
7e3136adcfb1 fix play->pause bug
pontscho
parents: 1765
diff changeset
115 vo_resize=1;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
116 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
117
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
118 void mplMPlayerInit( int argc,char* argv[], char *envp[] )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
119 {
1850
62b8e85865a2 Some changes to compile the GUI on solaris
jkeil
parents: 1829
diff changeset
120 struct sigaction sa;
62b8e85865a2 Some changes to compile the GUI on solaris
jkeil
parents: 1829
diff changeset
121
1825
1791c7930776 fix sizeof :))))
pontscho
parents: 1815
diff changeset
122 mplShMem=calloc( 1,sizeof( mplCommStruct ) );
1791c7930776 fix sizeof :))))
pontscho
parents: 1815
diff changeset
123 mplShMem->Balance=50.0f;
1850
62b8e85865a2 Some changes to compile the GUI on solaris
jkeil
parents: 1829
diff changeset
124 memset(&sa, 0, sizeof(sa));
62b8e85865a2 Some changes to compile the GUI on solaris
jkeil
parents: 1829
diff changeset
125 sa.sa_handler = mplMainSigHandler;
62b8e85865a2 Some changes to compile the GUI on solaris
jkeil
parents: 1829
diff changeset
126 sigaction( SIGTYPE,&sa,NULL );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
127 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
128
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
129 float mplGetPosition( void )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
130 { // return 0.0 ... 100.0
1729
d6c99f70449e fix hprogressbar
pontscho
parents: 1723
diff changeset
131 return mplShMem->Position;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
132 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
133
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
134 void mplRelSeek( float s )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
135 { // -+s
1723
5e4214a7540e GUI stuff. now seeking works, and xmga renders to video window
arpi
parents: 1693
diff changeset
136 rel_seek_secs=s; abs_seek_pos=0;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
137 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
138
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
139 void mplAbsSeek( float s )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
140 { // 0.0 ... 100.0
1723
5e4214a7540e GUI stuff. now seeking works, and xmga renders to video window
arpi
parents: 1693
diff changeset
141 rel_seek_secs=0.01*s; abs_seek_pos=3;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
142 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
143
1800
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
144 listItems tmpList;
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
145
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
146 void ChangeSkin( void )
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
147 {
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
148 int ret;
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
149 if ( !strcmp( skinName,gtkShMem->sb.name ) ) return;
1800
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
150 #ifdef DEBUG
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
151 dbprintf( 1,"[psignal] skin: %s\n",gtkShMem->sb.name );
1800
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
152 #endif
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
153
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
154 mainVisible=0;
1800
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
155
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
156 appInitStruct( &tmpList );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
157 skinAppMPlayer=&tmpList;
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
158 fntFreeFont();
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
159 ret=skinRead( gtkShMem->sb.name );
1800
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
160
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
161 appInitStruct( &tmpList );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
162 skinAppMPlayer=&appMPlayer;
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
163 appInitStruct( &appMPlayer );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
164 if ( !ret ) strcpy( skinName,gtkShMem->sb.name );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
165 skinRead( skinName );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
166 if ( ret )
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
167 {
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
168 mainVisible=1;
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
169 return;
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
170 }
1800
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
171
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
172 if ( appMPlayer.menuBase.Bitmap.Image )
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
173 {
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
174 if ( mplMenuDrawBuffer ) free( mplMenuDrawBuffer );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
175 if ( ( mplMenuDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.menuBase.Bitmap.ImageSize ) ) == NULL )
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
176 { message( False,MSGTR_NEMDB ); return; }
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
177 wsResizeWindow( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
178 wsResizeImage( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
179 }
1800
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
180
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
181 mplSkinChanged=1;
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
182 if ( appMPlayer.sub.Bitmap.Image ) wsResizeImage( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Width,appMPlayer.sub.Bitmap.Height );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
183 if ( !mplShMem->Playing )
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
184 {
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
185 mplSkinChanged=0;
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
186 if ( !appMPlayer.subWindow.isFullScreen )
1800
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
187 {
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
188 wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
189 wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
190 }
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
191 wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
192 wsClearWindow( appMPlayer.subWindow );
2025
0653e90b3118 some bug fix, and sub window render speed up.. 10l kola ? :)
pontscho
parents: 1953
diff changeset
193 if ( appMPlayer.sub.Bitmap.Image ) wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
194 mplSubRender=1; wsPostRedisplay( &appMPlayer.subWindow );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
195 }
1866
32b1bb50a0e8 some bug fix, and add decoration item to skin conffile. faszom(C)
pontscho
parents: 1861
diff changeset
196
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
197 if ( mplDrawBuffer ) free( mplDrawBuffer );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
198 if ( ( mplDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL )
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
199 { message( False,MSGTR_NEMDB ); return; }
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
200 wsVisibleWindow( &appMPlayer.mainWindow,wsHideWindow );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
201 wsResizeWindow( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
202 wsMoveWindow( &appMPlayer.mainWindow,appMPlayer.main.x,appMPlayer.main.y );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
203 wsResizeImage( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
204 wsSetShape( &appMPlayer.mainWindow,appMPlayer.main.Mask.Image );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
205 mainVisible=1; mplMainRender=1; wsPostRedisplay( &appMPlayer.mainWindow );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
206 wsWindowDecoration( &appMPlayer.mainWindow,appMPlayer.mainDecoration );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
207 wsVisibleWindow( &appMPlayer.mainWindow,wsShowWindow );
1866
32b1bb50a0e8 some bug fix, and add decoration item to skin conffile. faszom(C)
pontscho
parents: 1861
diff changeset
208
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
209 btnModify( evSetVolume,mplShMem->Volume );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
210 btnModify( evSetBalance,mplShMem->Balance );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
211 btnModify( evSetMoviePosition,mplShMem->Position );
1800
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
212 }
1802
82e77faa7341 async reply fix ?
pontscho
parents: 1800
diff changeset
213
82e77faa7341 async reply fix ?
pontscho
parents: 1800
diff changeset
214 void EventHandling( void )
82e77faa7341 async reply fix ?
pontscho
parents: 1800
diff changeset
215 {
1861
17660d830bcb upsz ... timer disabling fix, sorry
pontscho
parents: 1860
diff changeset
216 wsHandleEvents();mplTimerHandler(0); // handle GUI timer events
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
217 if ( mplShMem->SkinChange ) { ChangeSkin(); mplShMem->SkinChange=0; }
1802
82e77faa7341 async reply fix ?
pontscho
parents: 1800
diff changeset
218 }
1952
b55163894e30 compile bug fixed.
pontscho
parents: 1907
diff changeset
219
b55163894e30 compile bug fixed.
pontscho
parents: 1907
diff changeset
220 void mplResizeToMovieSize( unsigned int width,unsigned int height )
b55163894e30 compile bug fixed.
pontscho
parents: 1907
diff changeset
221 {
b55163894e30 compile bug fixed.
pontscho
parents: 1907
diff changeset
222 if ( !appMPlayer.subWindow.isFullScreen )
2025
0653e90b3118 some bug fix, and sub window render speed up.. 10l kola ? :)
pontscho
parents: 1953
diff changeset
223 {
1952
b55163894e30 compile bug fixed.
pontscho
parents: 1907
diff changeset
224 wsResizeWindow( &appMPlayer.subWindow,width,height );
2025
0653e90b3118 some bug fix, and sub window render speed up.. 10l kola ? :)
pontscho
parents: 1953
diff changeset
225 wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y );
0653e90b3118 some bug fix, and sub window render speed up.. 10l kola ? :)
pontscho
parents: 1953
diff changeset
226 }
1952
b55163894e30 compile bug fixed.
pontscho
parents: 1907
diff changeset
227 }