mirror of https://github.com/mpv-player/mpv
cosmetic
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8059 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
478bb57c0a
commit
2a8b8d1d43
|
@ -14,10 +14,9 @@ endif
|
||||||
|
|
||||||
CFLAGS = $(OPTIMIZE) $(INCDIR) $(DEBUG)
|
CFLAGS = $(OPTIMIZE) $(INCDIR) $(DEBUG)
|
||||||
|
|
||||||
SRCS = wm/ws.c wm/wsxdnd.c app.c interface.c cfg.c \
|
SRCS = wm/ws.c wm/wsxdnd.c app.c interface.c cfg.c bitmap.c \
|
||||||
bitmap/bitmap.c \
|
|
||||||
skin/skin.c skin/font.c skin/cut.c \
|
skin/skin.c skin/font.c skin/cut.c \
|
||||||
mplayer/mplayer.c mplayer/widgets.c mplayer/play.c \
|
mplayer/widgets.c mplayer/play.c mplayer/mw.c mplayer/sw.c mplayer/menu.c \
|
||||||
mplayer/gtk/menu.c mplayer/gtk/mb.c mplayer/gtk/about.c mplayer/gtk/pl.c mplayer/gtk/sb.c mplayer/gtk/fs.c mplayer/gtk/opts.c mplayer/gtk/url.c mplayer/gtk/eq.c
|
mplayer/gtk/menu.c mplayer/gtk/mb.c mplayer/gtk/about.c mplayer/gtk/pl.c mplayer/gtk/sb.c mplayer/gtk/fs.c mplayer/gtk/opts.c mplayer/gtk/url.c mplayer/gtk/eq.c
|
||||||
OBJS = $(SRCS:.c=.o)
|
OBJS = $(SRCS:.c=.o)
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#ifndef __APPS_H
|
#ifndef __APPS_H
|
||||||
#define __APPS_H
|
#define __APPS_H
|
||||||
|
|
||||||
#include "bitmap/bitmap.h"
|
#include "bitmap.h"
|
||||||
#include "wm/ws.h"
|
#include "wm/ws.h"
|
||||||
#include "wm/wskeys.h"
|
#include "wm/wskeys.h"
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,20 @@
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include "ws.h"
|
#include "wm/ws.h"
|
||||||
#include "mplayer/play.h"
|
#include "wm/wsxdnd.h"
|
||||||
#include "interface.h"
|
#include "interface.h"
|
||||||
#include "skin/skin.h"
|
#include "skin/skin.h"
|
||||||
#include "mplayer/gtk/eq.h"
|
|
||||||
|
|
||||||
#include "../mplayer.h"
|
#include "mplayer/gtk/eq.h"
|
||||||
#include "mplayer/widgets.h"
|
#include "mplayer/widgets.h"
|
||||||
#include "mplayer/mplayer.h"
|
#include "mplayer/mplayer.h"
|
||||||
|
|
||||||
|
#include "../mplayer.h"
|
||||||
#include "app.h"
|
#include "app.h"
|
||||||
#include "cfg.h"
|
#include "cfg.h"
|
||||||
#include "../help_mp.h"
|
#include "../help_mp.h"
|
||||||
|
@ -27,9 +29,6 @@
|
||||||
#include "../libao2/audio_plugin.h"
|
#include "../libao2/audio_plugin.h"
|
||||||
#include "../libao2/eq.h"
|
#include "../libao2/eq.h"
|
||||||
|
|
||||||
#include <inttypes.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#ifdef USE_ICONV
|
#ifdef USE_ICONV
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -150,6 +149,8 @@ char * gconvert_uri_to_filename( char * str )
|
||||||
|
|
||||||
void guiInit( void )
|
void guiInit( void )
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
memset( &guiIntfStruct,0,sizeof( guiIntfStruct ) );
|
memset( &guiIntfStruct,0,sizeof( guiIntfStruct ) );
|
||||||
guiIntfStruct.Balance=50.0f;
|
guiIntfStruct.Balance=50.0f;
|
||||||
guiIntfStruct.StreamType=-1;
|
guiIntfStruct.StreamType=-1;
|
||||||
|
@ -165,7 +166,7 @@ void guiInit( void )
|
||||||
gtkInit();
|
gtkInit();
|
||||||
// --- initialize X
|
// --- initialize X
|
||||||
wsXInit( (void *)mDisplay );
|
wsXInit( (void *)mDisplay );
|
||||||
// ---
|
// --- load skin
|
||||||
skinDirInHome=get_path("Skin");
|
skinDirInHome=get_path("Skin");
|
||||||
skinMPlayerDir=DATADIR "/Skin";
|
skinMPlayerDir=DATADIR "/Skin";
|
||||||
printf("SKIN dir 1: '%s'\n",skinDirInHome);
|
printf("SKIN dir 1: '%s'\n",skinDirInHome);
|
||||||
|
@ -176,7 +177,83 @@ void guiInit( void )
|
||||||
case -1: mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_SKIN_SKINCFG_SkinNotFound,skinName ); exit( 0 );
|
case -1: mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_SKIN_SKINCFG_SkinNotFound,skinName ); exit( 0 );
|
||||||
case -2: mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_SKIN_SKINCFG_SkinCfgReadError,skinName ); exit( 0 );
|
case -2: mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_SKIN_SKINCFG_SkinCfgReadError,skinName ); exit( 0 );
|
||||||
}
|
}
|
||||||
mplInit( (void *)mDisplay );
|
// --- initialize windows
|
||||||
|
if ( ( mplDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL )
|
||||||
|
{
|
||||||
|
fprintf( stderr,MSGTR_NEMDB );
|
||||||
|
exit( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
wsCreateWindow( &appMPlayer.subWindow,
|
||||||
|
appMPlayer.sub.x,appMPlayer.sub.y,appMPlayer.sub.width,appMPlayer.sub.height,
|
||||||
|
wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsShowFrame|wsHideWindow,"ViDEO" );
|
||||||
|
|
||||||
|
wsDestroyImage( &appMPlayer.subWindow );
|
||||||
|
wsCreateImage( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Width,appMPlayer.sub.Bitmap.Height );
|
||||||
|
wsXDNDMakeAwareness(&appMPlayer.subWindow);
|
||||||
|
|
||||||
|
vo_setwindow( appMPlayer.subWindow.WindowID, appMPlayer.subWindow.wGC );
|
||||||
|
|
||||||
|
// i=wsHideFrame|wsMaxSize|wsHideWindow;
|
||||||
|
// if ( appMPlayer.mainDecoration ) i=wsShowFrame|wsMaxSize|wsHideWindow;
|
||||||
|
i=wsShowFrame|wsMaxSize|wsHideWindow;
|
||||||
|
wsCreateWindow( &appMPlayer.mainWindow,
|
||||||
|
appMPlayer.main.x,appMPlayer.main.y,appMPlayer.main.width,appMPlayer.main.height,
|
||||||
|
wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,i,"MPlayer" ); //wsMinSize|
|
||||||
|
|
||||||
|
wsSetShape( &appMPlayer.mainWindow,appMPlayer.main.Mask.Image );
|
||||||
|
wsXDNDMakeAwareness(&appMPlayer.mainWindow);
|
||||||
|
|
||||||
|
mplMenuInit();
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[main] Depth on screen: %d\n",wsDepthOnScreen );
|
||||||
|
mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[main] parent: 0x%x\n",(int)appMPlayer.mainWindow.WindowID );
|
||||||
|
mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[main] sub: 0x%x\n",(int)appMPlayer.subWindow.WindowID );
|
||||||
|
#endif
|
||||||
|
|
||||||
|
appMPlayer.mainWindow.ReDraw=(void *)mplMainDraw;
|
||||||
|
appMPlayer.mainWindow.MouseHandler=mplMainMouseHandle;
|
||||||
|
appMPlayer.mainWindow.KeyHandler=mplMainKeyHandle;
|
||||||
|
appMPlayer.mainWindow.DandDHandler=mplDandDHandler;
|
||||||
|
|
||||||
|
appMPlayer.subWindow.ReDraw=(void *)mplSubDraw;
|
||||||
|
appMPlayer.subWindow.MouseHandler=mplSubMouseHandle;
|
||||||
|
appMPlayer.subWindow.KeyHandler=mplMainKeyHandle;
|
||||||
|
appMPlayer.subWindow.DandDHandler=mplDandDHandler;
|
||||||
|
|
||||||
|
wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
|
||||||
|
wsClearWindow( appMPlayer.subWindow );
|
||||||
|
if ( appMPlayer.sub.Bitmap.Image ) wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
|
||||||
|
|
||||||
|
btnModify( evSetVolume,guiIntfStruct.Volume );
|
||||||
|
btnModify( evSetBalance,guiIntfStruct.Balance );
|
||||||
|
btnModify( evSetMoviePosition,guiIntfStruct.Position );
|
||||||
|
|
||||||
|
wsSetIcon( wsDisplay,appMPlayer.mainWindow.WindowID,guiIcon,guiIconMask );
|
||||||
|
wsSetIcon( wsDisplay,appMPlayer.subWindow.WindowID,guiIcon,guiIconMask );
|
||||||
|
|
||||||
|
guiIntfStruct.Playing=0;
|
||||||
|
|
||||||
|
if ( !appMPlayer.mainDecoration ) wsWindowDecoration( &appMPlayer.mainWindow,0 );
|
||||||
|
|
||||||
|
wsVisibleWindow( &appMPlayer.mainWindow,wsShowWindow );
|
||||||
|
#if 1
|
||||||
|
wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow );
|
||||||
|
|
||||||
|
{
|
||||||
|
XEvent xev;
|
||||||
|
do { XNextEvent( wsDisplay,&xev ); } while ( xev.type != MapNotify || xev.xmap.event != appMPlayer.subWindow.WindowID );
|
||||||
|
appMPlayer.subWindow.Mapped=wsMapped;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( fullscreen )
|
||||||
|
{
|
||||||
|
mplFullScreen();
|
||||||
|
btnModify( evFullScreen,btnPressed );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
mplSubRender=1;
|
||||||
// ---
|
// ---
|
||||||
|
|
||||||
if ( plCurrent && !filename ) mplSetFileName( plCurrent->path,plCurrent->name,STREAMTYPE_FILE );
|
if ( plCurrent && !filename ) mplSetFileName( plCurrent->path,plCurrent->name,STREAMTYPE_FILE );
|
||||||
|
|
|
@ -1,4 +1,15 @@
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
#include "../app.h"
|
||||||
|
#include "../../config.h"
|
||||||
|
#include "../../help_mp.h"
|
||||||
|
#include "../../mp_msg.h"
|
||||||
|
|
||||||
|
#include "widgets.h"
|
||||||
|
|
||||||
unsigned char * mplMenuDrawBuffer = NULL;
|
unsigned char * mplMenuDrawBuffer = NULL;
|
||||||
int mplMenuRender = 1;
|
int mplMenuRender = 1;
|
||||||
int mplMenuItem = -1;
|
int mplMenuItem = -1;
|
||||||
|
@ -7,7 +18,7 @@ int mplMenuX,mplMenuY;
|
||||||
|
|
||||||
void mplHideMenu( int mx,int my,int w );
|
void mplHideMenu( int mx,int my,int w );
|
||||||
|
|
||||||
void mplMenuDraw( wsParamDisplay )
|
void mplMenuDraw( void )
|
||||||
{
|
{
|
||||||
uint32_t * buf = NULL;
|
uint32_t * buf = NULL;
|
||||||
uint32_t * drw = NULL;
|
uint32_t * drw = NULL;
|
||||||
|
|
|
@ -1,108 +0,0 @@
|
||||||
|
|
||||||
#include <inttypes.h>
|
|
||||||
|
|
||||||
#include "../app.h"
|
|
||||||
#include "../skin/skin.h"
|
|
||||||
#include "../wm/ws.h"
|
|
||||||
#include "../wm/wsxdnd.h"
|
|
||||||
|
|
||||||
#include "../../config.h"
|
|
||||||
#include "../../help_mp.h"
|
|
||||||
#include "../../libvo/x11_common.h"
|
|
||||||
|
|
||||||
void mplEventHandling( int msg,float param );
|
|
||||||
|
|
||||||
extern void mplMainDraw( wsParamDisplay );
|
|
||||||
extern void mplEventHandling( int msg,float param );
|
|
||||||
extern void mplMainMouseHandle( int Button,int X,int Y,int RX,int RY );
|
|
||||||
extern void mplMainKeyHandle( int KeyCode,int Type,int Key );
|
|
||||||
extern void mplDandDHandler(int num,char** files);
|
|
||||||
extern void mplSubDraw( wsParamDisplay );
|
|
||||||
extern void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY );
|
|
||||||
|
|
||||||
#include "widgets.h"
|
|
||||||
#include "play.h"
|
|
||||||
#include "menu.h"
|
|
||||||
|
|
||||||
void mplInit( void * disp )
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if ( ( mplDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL )
|
|
||||||
{
|
|
||||||
fprintf( stderr,MSGTR_NEMDB );
|
|
||||||
exit( 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
wsCreateWindow( &appMPlayer.subWindow,
|
|
||||||
appMPlayer.sub.x,appMPlayer.sub.y,appMPlayer.sub.width,appMPlayer.sub.height,
|
|
||||||
wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsShowFrame|wsHideWindow,"ViDEO" );
|
|
||||||
|
|
||||||
wsDestroyImage( &appMPlayer.subWindow );
|
|
||||||
wsCreateImage( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Width,appMPlayer.sub.Bitmap.Height );
|
|
||||||
wsXDNDMakeAwareness(&appMPlayer.subWindow);
|
|
||||||
|
|
||||||
vo_setwindow( appMPlayer.subWindow.WindowID, appMPlayer.subWindow.wGC );
|
|
||||||
|
|
||||||
// i=wsHideFrame|wsMaxSize|wsHideWindow;
|
|
||||||
// if ( appMPlayer.mainDecoration ) i=wsShowFrame|wsMaxSize|wsHideWindow;
|
|
||||||
i=wsShowFrame|wsMaxSize|wsHideWindow;
|
|
||||||
wsCreateWindow( &appMPlayer.mainWindow,
|
|
||||||
appMPlayer.main.x,appMPlayer.main.y,appMPlayer.main.width,appMPlayer.main.height,
|
|
||||||
wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,i,"MPlayer" ); //wsMinSize|
|
|
||||||
|
|
||||||
wsSetShape( &appMPlayer.mainWindow,appMPlayer.main.Mask.Image );
|
|
||||||
wsXDNDMakeAwareness(&appMPlayer.mainWindow);
|
|
||||||
|
|
||||||
mplMenuInit();
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[main] Depth on screen: %d\n",wsDepthOnScreen );
|
|
||||||
mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[main] parent: 0x%x\n",(int)appMPlayer.mainWindow.WindowID );
|
|
||||||
mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[main] sub: 0x%x\n",(int)appMPlayer.subWindow.WindowID );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
appMPlayer.mainWindow.ReDraw=mplMainDraw;
|
|
||||||
appMPlayer.mainWindow.MouseHandler=mplMainMouseHandle;
|
|
||||||
appMPlayer.mainWindow.KeyHandler=mplMainKeyHandle;
|
|
||||||
appMPlayer.mainWindow.DandDHandler=mplDandDHandler;
|
|
||||||
|
|
||||||
appMPlayer.subWindow.ReDraw=mplSubDraw;
|
|
||||||
appMPlayer.subWindow.MouseHandler=mplSubMouseHandle;
|
|
||||||
appMPlayer.subWindow.KeyHandler=mplMainKeyHandle;
|
|
||||||
appMPlayer.subWindow.DandDHandler=mplDandDHandler;
|
|
||||||
|
|
||||||
wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
|
|
||||||
wsClearWindow( appMPlayer.subWindow );
|
|
||||||
if ( appMPlayer.sub.Bitmap.Image ) wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
|
|
||||||
|
|
||||||
btnModify( evSetVolume,guiIntfStruct.Volume );
|
|
||||||
btnModify( evSetBalance,guiIntfStruct.Balance );
|
|
||||||
btnModify( evSetMoviePosition,guiIntfStruct.Position );
|
|
||||||
|
|
||||||
wsSetIcon( wsDisplay,appMPlayer.mainWindow.WindowID,guiIcon,guiIconMask );
|
|
||||||
wsSetIcon( wsDisplay,appMPlayer.subWindow.WindowID,guiIcon,guiIconMask );
|
|
||||||
|
|
||||||
guiIntfStruct.Playing=0;
|
|
||||||
|
|
||||||
if ( !appMPlayer.mainDecoration ) wsWindowDecoration( &appMPlayer.mainWindow,0 );
|
|
||||||
|
|
||||||
wsVisibleWindow( &appMPlayer.mainWindow,wsShowWindow );
|
|
||||||
#if 1
|
|
||||||
wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow );
|
|
||||||
|
|
||||||
{
|
|
||||||
XEvent xev;
|
|
||||||
do { XNextEvent( wsDisplay,&xev ); } while ( xev.type != MapNotify || xev.xmap.event != appMPlayer.subWindow.WindowID );
|
|
||||||
appMPlayer.subWindow.Mapped=wsMapped;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( fullscreen )
|
|
||||||
{
|
|
||||||
mplFullScreen();
|
|
||||||
btnModify( evFullScreen,btnPressed );
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
mplSubRender=1;
|
|
||||||
}
|
|
||||||
|
|
|
@ -15,4 +15,18 @@ extern int mplMiddleMenu;
|
||||||
extern void mplInit( void * disp );
|
extern void mplInit( void * disp );
|
||||||
extern void mplEventHandling( int msg,float param );
|
extern void mplEventHandling( int msg,float param );
|
||||||
|
|
||||||
|
extern void mplMainDraw( void );
|
||||||
|
extern void mplEventHandling( int msg,float param );
|
||||||
|
extern void mplMainMouseHandle( int Button,int X,int Y,int RX,int RY );
|
||||||
|
extern void mplMainKeyHandle( int KeyCode,int Type,int Key );
|
||||||
|
extern void mplDandDHandler(int num,char** files);
|
||||||
|
|
||||||
|
extern void mplSubDraw( void );
|
||||||
|
extern void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY );
|
||||||
|
|
||||||
|
extern void mplMenuInit( void );
|
||||||
|
extern void mplHideMenu( int mx,int my,int w );
|
||||||
|
extern void mplShowMenu( int mx,int my );
|
||||||
|
extern void mplMenuMouseHandle( int X,int Y,int RX,int RY );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,9 +24,6 @@
|
||||||
#include "widgets.h"
|
#include "widgets.h"
|
||||||
|
|
||||||
extern unsigned int GetTimerMS( void );
|
extern unsigned int GetTimerMS( void );
|
||||||
extern void mplHideMenu( int mx,int my,int w );
|
|
||||||
extern void mplShowMenu( int mx,int my );
|
|
||||||
extern void mplMenuMouseHandle( int X,int Y,int RX,int RY );
|
|
||||||
|
|
||||||
unsigned char * mplDrawBuffer = NULL;
|
unsigned char * mplDrawBuffer = NULL;
|
||||||
int mplMainRender = 1;
|
int mplMainRender = 1;
|
||||||
|
@ -177,7 +174,7 @@ inline void PutImage( txSample * bf,int x,int y,int max,int ofs )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void mplMainDraw( wsParamDisplay )
|
void mplMainDraw( void )
|
||||||
{
|
{
|
||||||
wItem * item;
|
wItem * item;
|
||||||
txSample * image = NULL;
|
txSample * image = NULL;
|
||||||
|
|
|
@ -13,11 +13,7 @@ extern int boxMoved;
|
||||||
extern int sx,sy;
|
extern int sx,sy;
|
||||||
extern int i,pot;
|
extern int i,pot;
|
||||||
|
|
||||||
extern void mplHideMenu( int mx,int my,int w );
|
void mplSubDraw( void )
|
||||||
extern void mplShowMenu( int mx,int my );
|
|
||||||
extern void mplMenuMouseHandle( int X,int Y,int RX,int RY );
|
|
||||||
|
|
||||||
void mplSubDraw( wsParamDisplay )
|
|
||||||
{
|
{
|
||||||
if ( appMPlayer.subWindow.State == wsWindowClosed ) exit_player( MSGTR_Exit_quit );
|
if ( appMPlayer.subWindow.State == wsWindowClosed ) exit_player( MSGTR_Exit_quit );
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#ifndef _FONT_H
|
#ifndef _FONT_H
|
||||||
#define _FONT_H
|
#define _FONT_H
|
||||||
|
|
||||||
#include "../bitmap/bitmap.h"
|
#include "../bitmap.h"
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|
|
@ -609,12 +609,12 @@ Bool wsEvents( Display * display,XEvent * Event,XPointer arg )
|
||||||
}
|
}
|
||||||
expose:
|
expose:
|
||||||
wsWindowList[l]->State=i;
|
wsWindowList[l]->State=i;
|
||||||
if ( wsWindowList[l]->ReDraw ) wsWindowList[l]->ReDraw( wsDisplay,Event->xany.window );
|
if ( wsWindowList[l]->ReDraw ) wsWindowList[l]->ReDraw();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Expose:
|
case Expose:
|
||||||
wsWindowList[l]->State=wsWindowExpose;
|
wsWindowList[l]->State=wsWindowExpose;
|
||||||
if ( ( wsWindowList[l]->ReDraw )&&( !Event->xexpose.count ) ) wsWindowList[l]->ReDraw( wsDisplay,Event->xany.window );
|
if ( ( wsWindowList[l]->ReDraw )&&( !Event->xexpose.count ) ) wsWindowList[l]->ReDraw();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ConfigureNotify:
|
case ConfigureNotify:
|
||||||
|
@ -915,7 +915,7 @@ void wsPostRedisplay( wsTWindow * win )
|
||||||
if ( win->ReDraw )
|
if ( win->ReDraw )
|
||||||
{
|
{
|
||||||
win->State=wsWindowExpose;
|
win->State=wsWindowExpose;
|
||||||
win->ReDraw( wsDisplay,win->WindowID );
|
win->ReDraw();
|
||||||
XFlush( wsDisplay );
|
XFlush( wsDisplay );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,9 +93,7 @@
|
||||||
#define wsWMIceWM 3
|
#define wsWMIceWM 3
|
||||||
#define wsWMWMaker 4
|
#define wsWMWMaker 4
|
||||||
|
|
||||||
#define wsParamDisplay Display *dpy,Window w
|
typedef void (*wsTReDraw)( void );
|
||||||
|
|
||||||
typedef void (*wsTReDraw)( wsParamDisplay );
|
|
||||||
typedef void (*wsTReSize)( unsigned int X,unsigned int Y,unsigned int width,unsigned int height );
|
typedef void (*wsTReSize)( unsigned int X,unsigned int Y,unsigned int width,unsigned int height );
|
||||||
typedef void (*wsTIdle)( void );
|
typedef void (*wsTIdle)( void );
|
||||||
typedef void (*wsTKeyHandler)( int KeyCode,int Type,int Key );
|
typedef void (*wsTKeyHandler)( int KeyCode,int Type,int Key );
|
||||||
|
|
Loading…
Reference in New Issue