Commit f70356eb authored by Cyril Deguet's avatar Cyril Deguet

* events aren't perfect yet, but it is better enough to commit

parent 58fe5c23
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* x11_bitmap.cpp: X11 implementation of the Bitmap class * x11_bitmap.cpp: X11 implementation of the Bitmap class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: x11_bitmap.cpp,v 1.5 2003/05/19 21:39:34 asmax Exp $ * $Id: x11_bitmap.cpp,v 1.6 2003/05/24 21:28:29 asmax Exp $
* *
* Authors: Cyril Deguet <asmax@videolan.org> * Authors: Cyril Deguet <asmax@videolan.org>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -135,13 +135,12 @@ void X11Bitmap::DrawBitmap( int x, int y, int w, int h, int xRef, int yRef, ...@@ -135,13 +135,12 @@ void X11Bitmap::DrawBitmap( int x, int y, int w, int h, int xRef, int yRef,
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
bool X11Bitmap::Hit( int x, int y) bool X11Bitmap::Hit( int x, int y)
{ {
// unsigned int c = (unsigned int)GetBmpPixel( x, y ); unsigned int c = (unsigned int)GetBmpPixel( x, y );
/* if( c == -1 || c == AlphaColor ) if( c == -1 || c == AlphaColor )
return false; return false;
else else
return true;*/ return true;
return true;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
int X11Bitmap::GetBmpPixel( int x, int y ) int X11Bitmap::GetBmpPixel( int x, int y )
...@@ -149,6 +148,7 @@ int X11Bitmap::GetBmpPixel( int x, int y ) ...@@ -149,6 +148,7 @@ int X11Bitmap::GetBmpPixel( int x, int y )
if( !Bmp || x < 0 || x >= Width || y < 0 || y >= Height ) if( !Bmp || x < 0 || x >= Width || y < 0 || y >= Height )
return -1; return -1;
return 42;
/* guchar *pixels; /* guchar *pixels;
int rowstride, offset; int rowstride, offset;
gboolean has_alpha; gboolean has_alpha;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* x11_run.cpp: * x11_run.cpp:
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: x11_run.cpp,v 1.7 2003/05/24 20:54:27 gbazin Exp $ * $Id: x11_run.cpp,v 1.8 2003/05/24 21:28:29 asmax Exp $
* *
* Authors: Cyril Deguet <asmax@videolan.org> * Authors: Cyril Deguet <asmax@videolan.org>
* *
...@@ -242,10 +242,9 @@ void ProcessEvent( intf_thread_t *p_intf, VlcProc *proc, XEvent *event ) ...@@ -242,10 +242,9 @@ void ProcessEvent( intf_thread_t *p_intf, VlcProc *proc, XEvent *event )
Window wnd = ((XAnyEvent *)event)->window; Window wnd = ((XAnyEvent *)event)->window;
// fprintf(stderr,"event %d %x\n", event->type, wnd);
// Create event to dispatch in windows // Create event to dispatch in windows
// Skin event // Skin event
if( event->type == ClientMessage ) if( event->type == ClientMessage )
{ {
msg = ( (XClientMessageEvent *)event )->data.l[0]; msg = ( (XClientMessageEvent *)event )->data.l[0];
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* x11_theme.cpp: X11 implementation of the Theme class * x11_theme.cpp: X11 implementation of the Theme class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: x11_theme.cpp,v 1.3 2003/05/19 21:39:34 asmax Exp $ * $Id: x11_theme.cpp,v 1.4 2003/05/24 21:28:29 asmax Exp $
* *
* Authors: Cyril Deguet <asmax@videolan.org> * Authors: Cyril Deguet <asmax@videolan.org>
* *
...@@ -170,8 +170,7 @@ void X11Theme::AddWindow( string name, int x, int y, bool visible, ...@@ -170,8 +170,7 @@ void X11Theme::AddWindow( string name, int x, int y, bool visible,
Window wnd = XCreateSimpleWindow( display, root, 0, 0, 1, 1, 0, 0, 0 ); Window wnd = XCreateSimpleWindow( display, root, 0, 0, 1, 1, 0, 0, 0 );
XSelectInput( display, wnd, ExposureMask| XSelectInput( display, wnd, ExposureMask|
KeyPressMask|KeyReleaseMask|ButtonPressMask|ButtonReleaseMask| KeyPressMask|KeyReleaseMask|ButtonPressMask|ButtonReleaseMask|
PointerMotionMask|PointerMotionHintMask|EnterWindowMask| PointerMotionMask|EnterWindowMask|LeaveWindowMask);
LeaveWindowMask);
// Changing decorations // Changing decorations
struct { struct {
...@@ -193,7 +192,7 @@ void X11Theme::AddWindow( string name, int x, int y, bool visible, ...@@ -193,7 +192,7 @@ void X11Theme::AddWindow( string name, int x, int y, bool visible,
// Display the window // Display the window
XMapRaised( display, wnd ); XMapRaised( display, wnd );
XFlush( display ); XSync( display, False );
WindowList.push_back( (SkinWindow *)new OSWindow( p_intf, wnd, x, y, WindowList.push_back( (SkinWindow *)new OSWindow( p_intf, wnd, x, y,
visible, fadetime, alpha, movealpha, dragdrop, name ) ) ; visible, fadetime, alpha, movealpha, dragdrop, name ) ) ;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* x11_window.cpp: X11 implementation of the Window class * x11_window.cpp: X11 implementation of the Window class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: x11_window.cpp,v 1.5 2003/05/19 21:39:34 asmax Exp $ * $Id: x11_window.cpp,v 1.6 2003/05/24 21:28:29 asmax Exp $
* *
* Authors: Cyril Deguet <asmax@videolan.org> * Authors: Cyril Deguet <asmax@videolan.org>
* *
...@@ -113,6 +113,9 @@ X11Window::X11Window( intf_thread_t *p_intf, Window wnd, int x, int y, ...@@ -113,6 +113,9 @@ X11Window::X11Window( intf_thread_t *p_intf, Window wnd, int x, int y,
gint mask = 0; gint mask = 0;
ToolTipWindow = gdk_window_new( gwnd, &attr, mask);*/ ToolTipWindow = gdk_window_new( gwnd, &attr, mask);*/
Open();
fprintf(stderr, "kludge in x11_window.cpp\n");
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
X11Window::~X11Window() X11Window::~X11Window()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment