summaryrefslogtreecommitdiffstats
path: root/Gui/wm
diff options
context:
space:
mode:
Diffstat (limited to 'Gui/wm')
-rw-r--r--Gui/wm/ws.c19
-rw-r--r--Gui/wm/ws.h2
-rw-r--r--Gui/wm/wsconv.c18
-rw-r--r--Gui/wm/wsconv.h16
4 files changed, 29 insertions, 26 deletions
diff --git a/Gui/wm/ws.c b/Gui/wm/ws.c
index 0aeb5ea25d..4adcb8efbc 100644
--- a/Gui/wm/ws.c
+++ b/Gui/wm/ws.c
@@ -18,9 +18,9 @@
#include <inttypes.h>
+#include "../../config.h"
#include "ws.h"
#include "wsconv.h"
-#include "../../config.h"
#include "../../postproc/rgb2rgb.h"
#include <X11/extensions/XShm.h>
@@ -381,9 +381,9 @@ void wsCreateWindow( wsTWindow * win,int X,int Y,int wX,int hY,int bW,int cV,uns
{
char buf[32]; int i;
sprintf( buf,"_%s_REMOTE",label );
- for( i=0;i<strlen( buf );i++ )
+ for( i=0;i < (int)strlen( buf );i++ )
if ( ( buf[i] >= 'a' )&&( buf[i] <= 'z' ) ) buf[i]=buf[i] - 32;
- for( i=0;i<strlen( buf );i++ )
+ for( i=0;i < (int)strlen( buf );i++ )
if ( buf[i] == ' ' ) buf[i]='_';
fprintf( stderr,"[ws] atomname: %s\n",buf );
win->AtomRemote=XInternAtom( wsDisplay,buf,False );
@@ -681,11 +681,11 @@ buttonreleased:
wsWindowList[l]->MouseHandler( i,Event->xbutton.x,Event->xbutton.y,Event->xmotion.x_root,Event->xmotion.y_root );
break;
- case GravityNotify:
+// case GravityNotify:
// #ifdef DEBUG
- fprintf( stderr,"[ws] window ( 0x%x ) gravity: %d,%d\n",wsWindowList[l]->WindowID,Event->xgravity.x,Event->xgravity.y );
+// fprintf( stderr,"[ws] window ( 0x%x ) gravity: %d,%d\n",wsWindowList[l]->WindowID,Event->xgravity.x,Event->xgravity.y );
// #endif
- break;
+// break;
case PropertyNotify:
// break;
@@ -730,8 +730,7 @@ buttonreleased:
Bool wsDummyEvents( Display * display,XEvent * Event,XPointer arg )
{ return True; }
-// mplTimerHandler(0); // handle timer event
-void wsHandleEvents(){
+void wsHandleEvents( void ){
// handle pending events
while ( XPending(wsDisplay) ){
XNextEvent( wsDisplay,&wsEvent );
@@ -740,6 +739,8 @@ void wsHandleEvents(){
}
}
+extern void mplTimerHandler( void );
+
void wsMainLoop( void )
{
int delay=20;
@@ -758,7 +759,7 @@ while(wsTrue){
wsEvents( wsDisplay,&wsEvent,NULL );
delay=0;
}
- mplTimerHandler(0); // handle timer event
+ mplTimerHandler(); // handle timer event
usleep(delay*1000); // FIXME!
if(delay<10*20) delay+=20; // pump up delay up to 0.2 sec (low activity)
}
diff --git a/Gui/wm/ws.h b/Gui/wm/ws.h
index ab8e0fb0df..8842b8c42f 100644
--- a/Gui/wm/ws.h
+++ b/Gui/wm/ws.h
@@ -194,6 +194,8 @@ extern int wsGetDepthOnScreen( void );
extern void wsDoExit( void );
extern void wsMainLoop( void );
+extern Bool wsEvents( Display * display,XEvent * Event,XPointer arg );
+extern void wsHandleEvents( void );
// ----------------------------------------------------------------------------------------------
// wsCrateWindow: create a new window on the screen.
diff --git a/Gui/wm/wsconv.c b/Gui/wm/wsconv.c
index dc32c6e3ba..5fd0376ab3 100644
--- a/Gui/wm/wsconv.c
+++ b/Gui/wm/wsconv.c
@@ -18,7 +18,7 @@ wsTConvFunc wsConvFunc = NULL;
#define SWAP_RGB_24(src,dst) dst[1]=src[0];dst[1]=src[1];dst[2]=src[0]
-void BGR8880_to_RGB555_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels)
+void BGR8880_to_RGB555_c( const unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels)
{
unsigned short pixel;
int i;
@@ -31,7 +31,7 @@ void BGR8880_to_RGB555_c( const unsigned char * in_pixels, unsigned char * out_p
}
}
-void BGR8880_to_BGR555_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels)
+void BGR8880_to_BGR555_c( const unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels)
{
unsigned short pixel;
int i;
@@ -44,7 +44,7 @@ void BGR8880_to_BGR555_c( const unsigned char * in_pixels, unsigned char * out_p
}
}
-void BGR8880_to_RGB565_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels)
+void BGR8880_to_RGB565_c( const unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels)
{
unsigned short pixel;
int i;
@@ -57,7 +57,7 @@ void BGR8880_to_RGB565_c( const unsigned char * in_pixels, unsigned char * out_p
}
}
-void BGR8880_to_BGR565_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels)
+void BGR8880_to_BGR565_c( const unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels)
{
unsigned short pixel;
int i;
@@ -70,7 +70,7 @@ void BGR8880_to_BGR565_c( const unsigned char * in_pixels, unsigned char * out_p
}
}
-void BGR8880_to_RGB888_c( const unsigned char * in_pixels, unsigned char * out_pixels,unsigned num_pixels )
+void BGR8880_to_RGB888_c( const unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels )
{
int i;
for(i = 0; i < num_pixels / 4; i++)
@@ -81,7 +81,7 @@ void BGR8880_to_RGB888_c( const unsigned char * in_pixels, unsigned char * out_p
}
}
-void BGR8880_to_BGR888_c( const unsigned char * in_pixels, unsigned char * out_pixels,unsigned num_pixels )
+void BGR8880_to_BGR888_c( const unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels )
{
int i;
for(i = 0; i < num_pixels / 4; i++)
@@ -92,7 +92,7 @@ void BGR8880_to_BGR888_c( const unsigned char * in_pixels, unsigned char * out_p
}
}
-void BGR8880_to_BGR8880_c( const unsigned char * in_pixels, unsigned char * out_pixels,unsigned num_pixels )
+void BGR8880_to_BGR8880_c( const unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels )
{
int i;
for(i = 0; i < num_pixels / 4; i++)
@@ -103,7 +103,7 @@ void BGR8880_to_BGR8880_c( const unsigned char * in_pixels, unsigned char * out_
}
}
-void BGR8880_to_RGB8880_c( const unsigned char * in_pixels, unsigned char * out_pixels,unsigned num_pixels )
+void BGR8880_to_RGB8880_c( const unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels )
{ memcpy( out_pixels,in_pixels,num_pixels ); }
/*
@@ -119,7 +119,7 @@ unsigned char * map_6_to_8[64];
#define RGB16_MIDDLE_MASK 0x07e0
#define RGB16_UPPER_MASK 0xf800
-void RGB565_to_RGB888_c( const unsigned char * in_pixels, unsigned char * out_pixels,unsigned num_pixels)
+void RGB565_to_RGB888_c( const unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels)
{
unsigned short in_pixel;
int i;
diff --git a/Gui/wm/wsconv.h b/Gui/wm/wsconv.h
index de7fee8b32..ec4177a94e 100644
--- a/Gui/wm/wsconv.h
+++ b/Gui/wm/wsconv.h
@@ -19,14 +19,14 @@
typedef void(*wsTConvFunc)( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels );
extern wsTConvFunc wsConvFunc;
-extern void BGR8880_to_RGB555_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels );
-extern void BGR8880_to_BGR555_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels );
-extern void BGR8880_to_RGB565_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels );
-extern void BGR8880_to_BGR565_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels );
-extern void BGR8880_to_RGB888_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels );
-extern void BGR8880_to_BGR888_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels );
-extern void BGR8880_to_BGR8880_c( const unsigned char * in_pixels, unsigned char * out_pixels,unsigned num_pixels );
-extern void BGR8880_to_RGB8880_c( const unsigned char * in_pixels, unsigned char * out_pixels,unsigned num_pixels );
+extern void BGR8880_to_RGB555_c( const unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels );
+extern void BGR8880_to_BGR555_c( const unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels );
+extern void BGR8880_to_RGB565_c( const unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels );
+extern void BGR8880_to_BGR565_c( const unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels );
+extern void BGR8880_to_RGB888_c( const unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels );
+extern void BGR8880_to_BGR888_c( const unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels );
+extern void BGR8880_to_BGR8880_c( const unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels );
+extern void BGR8880_to_RGB8880_c( const unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels );
#ifdef xHAVE_MMX
extern void BGR8880_to_RGB888_mmx( const unsigned char * in_pixels,unsigned char * out_pixels,unsigned num_pixels);