Commit eb3609cd authored by Cyril Deguet's avatar Cyril Deguet

* now the skin module compiles AND links !

  (and segfaults... ;)
parent f3bcd927
......@@ -2,7 +2,7 @@
* text.cpp: Text control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: text.cpp,v 1.1 2003/03/18 02:21:47 ipkiss Exp $
* $Id: text.cpp,v 1.2 2003/04/12 22:50:42 asmax Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -48,10 +48,10 @@
// Scrolling : one for each OS
//---------------------------------------------------------------------------
#if defined( WIN32 )
//-----------------------------------------------------------------------
// Win32 methods
//-----------------------------------------------------------------------
#if defined( WIN32 )
void CALLBACK ScrollingTextTimer( HWND hwnd, UINT uMsg, UINT_PTR idEvent,
DWORD dwTime )
{
......@@ -76,6 +76,24 @@
}
//-----------------------------------------------------------------------
#else
//-----------------------------------------------------------------------
// Gtk2 methods
//-----------------------------------------------------------------------
void ControlText::StartScrolling()
{
/* FIXME: kluge */
/* SetTimer( ( (Win32Window *)ParentWindow )->GetHandle(), (UINT_PTR)this,
100, (TIMERPROC)ScrollingTextTimer );*/
}
//-----------------------------------------------------------------------
void ControlText::StopScrolling()
{
/* KillTimer( ( (Win32Window *)ParentWindow )->GetHandle(),
(UINT_PTR)this );*/
}
//-----------------------------------------------------------------------
#endif
//---------------------------------------------------------------------------
......
......@@ -2,7 +2,7 @@
* gtk2_api.cpp: Various gtk2-specific functions
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_api.cpp,v 1.1 2003/04/12 21:43:27 asmax Exp $
* $Id: gtk2_api.cpp,v 1.2 2003/04/12 22:50:42 asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
......@@ -32,7 +32,6 @@
#include "os_api.h"
#include "event.h" // for MAX_PARAM_SIZE
/*
//---------------------------------------------------------------------------
// Event API
......@@ -40,21 +39,21 @@
void OSAPI_SendMessage( Window *win, unsigned int message, unsigned int param1,
long param2 )
{
if( win == NULL )
/* if( win == NULL )
SendMessage( NULL, message, param1, param2 );
else
SendMessage( ( (Win32Window *)win )->GetHandle(), message, param1,
param2 );
param2 );*/
}
//---------------------------------------------------------------------------
void OSAPI_PostMessage( Window *win, unsigned int message, unsigned int param1,
long param2 )
{
if( win == NULL )
/* if( win == NULL )
PostMessage( NULL, message, param1, param2 );
else
PostMessage( ( (Win32Window *)win )->GetHandle(), message, param1,
param2 );
param2 );*/
}
//---------------------------------------------------------------------------
......@@ -66,7 +65,7 @@ void OSAPI_PostMessage( Window *win, unsigned int message, unsigned int param1,
//---------------------------------------------------------------------------
int OSAPI_GetNonTransparentColor( int c )
{
// Get desktop device context
/* // Get desktop device context
HDC DeskDC = GetWindowDC( GetDesktopWindow() );
// If color is black or color is same as black wether pixel color depth
......@@ -78,7 +77,7 @@ int OSAPI_GetNonTransparentColor( int c )
c = RGB(1, 0, 0);
}
ReleaseDC( GetDesktopWindow(), DeskDC );
return c;
return c;*/
}
//---------------------------------------------------------------------------
......@@ -90,37 +89,37 @@ int OSAPI_GetNonTransparentColor( int c )
//---------------------------------------------------------------------------
int OSAPI_GetTime()
{
return GetTickCount();
/* return GetTickCount();*/
}
//---------------------------------------------------------------------------
void OSAPI_GetScreenSize( int &w, int &h )
{
w = GetSystemMetrics(SM_CXSCREEN);
h = GetSystemMetrics(SM_CYSCREEN);
/* w = GetSystemMetrics(SM_CXSCREEN);
h = GetSystemMetrics(SM_CYSCREEN);*/
}
//---------------------------------------------------------------------------
void OSAPI_GetMousePos( int &x, int &y )
{
LPPOINT MousePos = new POINT;
/* LPPOINT MousePos = new POINT;
GetCursorPos( MousePos );
x = MousePos->x;
y = MousePos->y;
delete MousePos;
delete MousePos;*/
}
//---------------------------------------------------------------------------
string OSAPI_GetWindowTitle( Window *win )
{
char *buffer = new char[MAX_PARAM_SIZE];
/* char *buffer = new char[MAX_PARAM_SIZE];
GetWindowText( ((Win32Window *)win)->GetHandle(), buffer, MAX_PARAM_SIZE );
string Title = buffer;
delete buffer;
return Title;
return Title;*/
}
//---------------------------------------------------------------------------
bool OSAPI_RmDir( string path )
{
WIN32_FIND_DATA find;
/* WIN32_FIND_DATA find;
string File;
string FindFiles = path + "\\*.*";
HANDLE handle = FindFirstFile( (char *)FindFiles.c_str(), &find );
......@@ -154,7 +153,7 @@ bool OSAPI_RmDir( string path )
FindClose( handle );
RemoveDirectory( (char *)path.c_str() );
return true;
return true;*/
}
//---------------------------------------------------------------------------
*/
......@@ -2,7 +2,7 @@
* gtk2_dialog.cpp: GTK2 implementation of some dialog boxes
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_dialog.cpp,v 1.1 2003/04/12 21:43:27 asmax Exp $
* $Id: gtk2_dialog.cpp,v 1.2 2003/04/12 22:50:42 asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
......@@ -46,7 +46,7 @@ extern intf_thread_t *g_pIntf;
#include "event.h"
#include "os_api.h"
/*
//---------------------------------------------------------------------------
// Open file dialog box
//---------------------------------------------------------------------------
......@@ -61,7 +61,7 @@ GTK2OpenFileDialog::~GTK2OpenFileDialog()
//---------------------------------------------------------------------------
void GTK2OpenFileDialog::AddFilter( string name, string type )
{
unsigned int i;
/* unsigned int i;
for( i = 0; i < name.length(); i++ )
Filter[FilterLength++] = name[i];
......@@ -81,13 +81,13 @@ void GTK2OpenFileDialog::AddFilter( string name, string type )
Filter[FilterLength++] = '\0';
// Ending null character if this filter is the last
Filter[FilterLength] = '\0';
Filter[FilterLength] = '\0';*/
}
//---------------------------------------------------------------------------
bool GTK2OpenFileDialog::Open()
{
// Initailize dialog box
OPENFILENAME OpenFile;
/* OPENFILENAME OpenFile;
memset( &OpenFile, 0, sizeof( OpenFile ) );
OpenFile.lStructSize = sizeof( OPENFILENAME );
OpenFile.hwndOwner = NULL;
......@@ -180,7 +180,7 @@ bool GTK2OpenFileDialog::Open()
// Free memory
delete[] OpenFile.lpstrFile;
return true;
return true;*/
}
//---------------------------------------------------------------------------
......@@ -190,7 +190,7 @@ bool GTK2OpenFileDialog::Open()
//---------------------------------------------------------------------------
// CALLBACKs
//---------------------------------------------------------------------------
LRESULT CALLBACK LogWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam,
/*LRESULT CALLBACK LogWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam,
LPARAM lParam )
{
intf_thread_t *p_intf = (intf_thread_t *)GetWindowLongPtr( hwnd,
......@@ -246,7 +246,7 @@ DWORD CALLBACK LogWindowStream( DWORD_PTR dwCookie, LPBYTE pbBuff,
}
delete (string *)dwCookie;
return 0;
}
}*/
//---------------------------------------------------------------------------
......@@ -256,7 +256,7 @@ DWORD CALLBACK LogWindowStream( DWORD_PTR dwCookie, LPBYTE pbBuff,
//---------------------------------------------------------------------------
GTK2LogWindow::GTK2LogWindow( intf_thread_t *_p_intf ) : LogWindow( _p_intf )
{
hWindow = NULL;
/* hWindow = NULL;
hRichCtrl = NULL;
// Define window class
......@@ -299,30 +299,30 @@ GTK2LogWindow::GTK2LogWindow( intf_thread_t *_p_intf ) : LogWindow( _p_intf )
ChangeColor( RGB( 128, 128, 128 ) );
RtfHeader = "{\\rtf1 ";
Clear();
Clear();*/
}
//---------------------------------------------------------------------------
GTK2LogWindow::~GTK2LogWindow()
{
DestroyWindow( hRichCtrl );
DestroyWindow( hWindow );
/* DestroyWindow( hRichCtrl );
DestroyWindow( hWindow );*/
}
//---------------------------------------------------------------------------
void GTK2LogWindow::Clear()
{
EDITSTREAM *Stream;
/* EDITSTREAM *Stream;
Stream = new EDITSTREAM;
string *buffer = new string( RtfHeader );
Stream->dwCookie = (DWORD)buffer;
Stream->dwError = 0;
Stream->pfnCallback = (EDITSTREAMCALLBACK)LogWindowStream;
SendMessage( hRichCtrl, EM_STREAMIN, SF_RTF, (LPARAM)Stream );
SendMessage( hRichCtrl, EM_STREAMIN, SF_RTF, (LPARAM)Stream );*/
}
//---------------------------------------------------------------------------
void GTK2LogWindow::AddLine( string line )
{
// Initialize stream
EDITSTREAM *Stream;
/* EDITSTREAM *Stream;
string *buffer = new string( RtfHeader + line + "\\par }" );
Stream = new EDITSTREAM;
Stream->dwCookie = (DWORD)buffer;
......@@ -331,30 +331,30 @@ void GTK2LogWindow::AddLine( string line )
SendMessage( hRichCtrl, EM_STREAMIN, SF_RTF|SFF_SELECTION, (LPARAM)Stream );
SendMessage( hRichCtrl, WM_VSCROLL, SB_BOTTOM, 0 );
SendMessage( hRichCtrl, WM_VSCROLL, SB_BOTTOM, 0 );*/
}
//---------------------------------------------------------------------------
void GTK2LogWindow::ChangeColor( int color, bool bold )
{
CHARFORMAT format;
/* CHARFORMAT format;
memset(&format, 0, sizeof(CHARFORMAT));
format.cbSize = sizeof(CHARFORMAT);
format.dwMask = bold ? CFM_COLOR|CFM_BOLD : CFM_COLOR;
format.dwEffects = bold ? CFE_BOLD : 0;
format.crTextColor = color;
SendMessage( hRichCtrl, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&format );
SendMessage( hRichCtrl, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&format );*/
}
//---------------------------------------------------------------------------
void GTK2LogWindow::Show()
{
ShowWindow( hWindow, SW_SHOW );
Visible = true;
/* ShowWindow( hWindow, SW_SHOW );
Visible = true;*/
}
//---------------------------------------------------------------------------
void GTK2LogWindow::Hide()
{
ShowWindow( hWindow, SW_HIDE );
Visible = false;
/* ShowWindow( hWindow, SW_HIDE );
Visible = false;*/
}
//---------------------------------------------------------------------------
*/
......@@ -2,7 +2,7 @@
* gtk2_event.cpp: GTK2 implementation of the Event class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_event.cpp,v 1.1 2003/04/12 21:43:27 asmax Exp $
* $Id: gtk2_event.cpp,v 1.2 2003/04/12 22:50:42 asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
......@@ -39,26 +39,25 @@
#include "skin_common.h"
/*
//---------------------------------------------------------------------------
// VLC Event
//---------------------------------------------------------------------------
GTK2Event::GTK2Event( intf_thread_t *p_intf, string Desc, string shortcut )
: Event( p_intf, Desc, shortcut )
{
hWnd = NULL;
/* hWnd = NULL;*/
}
//---------------------------------------------------------------------------
GTK2Event::GTK2Event( intf_thread_t *p_intf, HWND hwnd, unsigned int msg,
GTK2Event::GTK2Event( intf_thread_t *p_intf, GdkWindow *gwnd, unsigned int msg,
unsigned int par1, long par2 ) : Event( p_intf, msg, par1, par2 )
{
hWnd = hwnd;
/* hWnd = hwnd;*/
}
//---------------------------------------------------------------------------
GTK2Event::GTK2Event( intf_thread_t *p_intf, Window *win, unsigned int msg,
unsigned int par1, long par2 ) : Event( p_intf, msg, par1, par2 )
{
hWnd = ( (GTK2Window *)win )->GetHandle();
/* hWnd = ( (GTK2Window *)win )->GetHandle();*/
}
//---------------------------------------------------------------------------
GTK2Event::~GTK2Event()
......@@ -67,7 +66,7 @@ GTK2Event::~GTK2Event()
//---------------------------------------------------------------------------
bool GTK2Event::SendEvent()
{
if( Message != VLC_NOTHING )
/* if( Message != VLC_NOTHING )
{
PostMessage( hWnd, Message, Param1, Param2 );
PostSynchroMessage();
......@@ -75,19 +74,19 @@ bool GTK2Event::SendEvent()
}
return true;
*/
}
//---------------------------------------------------------------------------
bool GTK2Event::IsEqual( Event *evt )
{
GTK2Event *WinEvt = (GTK2Event *)evt;
/* GTK2Event *WinEvt = (GTK2Event *)evt;
return( WinEvt->GetWindow() == hWnd && WinEvt->GetMessage() == Message &&
WinEvt->GetParam1() == Param1 && WinEvt->GetParam2() == Param2 );
WinEvt->GetParam1() == Param1 && WinEvt->GetParam2() == Param2 );*/
}
//---------------------------------------------------------------------------
void GTK2Event::CreateOSEvent( string para1, string para2, string para3 )
{
/*
// Find Parameters
switch( Message )
{
......@@ -104,17 +103,17 @@ void GTK2Event::CreateOSEvent( string para1, string para2, string para3 )
break;
}
*/
}
//---------------------------------------------------------------------------
HWND GTK2Event::GetWindowFromName( string name )
GdkWindow *GTK2Event::GetWindowFromName( string name )
{
GTK2Window *win = (GTK2Window *)
/* GTK2Window *win = (GTK2Window *)
p_intf->p_sys->p_theme->GetWindow( name );
if( win == NULL )
return NULL;
else
return win->GetHandle();
return win->GetHandle();*/
}
//---------------------------------------------------------------------------
*/
......@@ -2,7 +2,7 @@
* gtk2_font.cpp: GTK2 implementation of the Font class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_font.cpp,v 1.1 2003/04/12 21:43:27 asmax Exp $
* $Id: gtk2_font.cpp,v 1.2 2003/04/12 22:50:42 asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
......@@ -36,7 +36,7 @@
#include "gtk2_font.h"
/*
//---------------------------------------------------------------------------
// Font object
//---------------------------------------------------------------------------
......@@ -50,7 +50,7 @@ GTK2Font::~GTK2Font()
{
}
//---------------------------------------------------------------------------
void GTK2Font::AssignGTK2Font( HDC DC )
/*void GTK2Font::AssignGTK2Font( HDC DC )
{
// Create font
HGDIOBJ fontObj = CreateFont(
......@@ -75,17 +75,17 @@ void GTK2Font::AssignGTK2Font( HDC DC )
// Free memory
DeleteObject( fontObj );
}
}*/
//---------------------------------------------------------------------------
void GTK2Font::AssignFont( Graphics *dest )
{
{/*
HDC DC = ( (GTK2Graphics *)dest )->GetImageHandle();
AssignGTK2Font( DC );
AssignGTK2Font( DC );*/
}
//---------------------------------------------------------------------------
void GTK2Font::GetSize( string text, int &w, int &h )
{
// Get device context of screen
/* // Get device context of screen
HDC DeskDC = GetWindowDC( GetDesktopWindow() );
// Get size
......@@ -98,13 +98,13 @@ void GTK2Font::GetSize( string text, int &w, int &h )
h = rect->bottom - rect->top;
// Release screen device context
ReleaseDC( GetDesktopWindow(), DeskDC );
ReleaseDC( GetDesktopWindow(), DeskDC );*/
}
//---------------------------------------------------------------------------
void GTK2Font::GenericPrint( Graphics *dest, string text, int x, int y,
int w, int h, int align, int color )
{
HDC DC = ( (GTK2Graphics *)dest )->GetImageHandle();
/* HDC DC = ( (GTK2Graphics *)dest )->GetImageHandle();
// Set boundaries
LPRECT r = new RECT;
r->left = x;
......@@ -128,21 +128,20 @@ void GTK2Font::GenericPrint( Graphics *dest, string text, int x, int y,
SetTextColor( DC, 0 );
// Free memory
delete r;
delete r;*/
}
//---------------------------------------------------------------------------
void GTK2Font::Print( Graphics *dest, string text, int x, int y, int w,
int h, int align )
{
GenericPrint( dest, text, x, y, w, h, align, Color );
/* GenericPrint( dest, text, x, y, w, h, align, Color );*/
}
//---------------------------------------------------------------------------
void GTK2Font::PrintColor( Graphics *dest, string text, int x, int y, int w,
int h, int align, int color )
{
GenericPrint( dest, text, x, y, w, h, align, color );
/* GenericPrint( dest, text, x, y, w, h, align, color );*/
}
//---------------------------------------------------------------------------
*/
......@@ -2,7 +2,7 @@
* gtk2_graphics.cpp: GTK2 implementation of the Graphics and Region classes
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_graphics.cpp,v 1.1 2003/04/12 21:43:27 asmax Exp $
* $Id: gtk2_graphics.cpp,v 1.2 2003/04/12 22:50:42 asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
......@@ -33,13 +33,12 @@
#include "gtk2_graphics.h"
/*
//---------------------------------------------------------------------------
// GTK2 GRAPHICS
//---------------------------------------------------------------------------
GTK2Graphics::GTK2Graphics( int w, int h, Window *from ) : Graphics( w, h )
{
HBITMAP HImage ;
/* HBITMAP HImage ;
Image = CreateCompatibleDC( NULL );
if( from != NULL )
{
......@@ -52,32 +51,32 @@ GTK2Graphics::GTK2Graphics( int w, int h, Window *from ) : Graphics( w, h )
HImage = CreateCompatibleBitmap( Image, w, h );
}
SelectObject( Image, HImage );
DeleteObject( HImage );
DeleteObject( HImage );*/
}
//---------------------------------------------------------------------------
GTK2Graphics::~GTK2Graphics()
{
DeleteDC( Image );
/* DeleteDC( Image );*/
}
//---------------------------------------------------------------------------
void GTK2Graphics::CopyFrom( int dx, int dy, int dw, int dh, Graphics *Src,
int sx, int sy, int Flag )
{
BitBlt( Image, dx, dy, dw, dh, ( (GTK2Graphics *)Src )->GetImageHandle(),
sx, sy, Flag );
/* BitBlt( Image, dx, dy, dw, dh, ( (GTK2Graphics *)Src )->GetImageHandle(),
sx, sy, Flag );*/
}
*/
//---------------------------------------------------------------------------
/*void GTK2Graphics::CopyTo( Graphics *Dest, int dx, int dy, int dw, int dh,
int sx, int sy, int Flag )
{
BitBlt( ( (GTK2Graphics *)Dest )->GetImageHandle(), dx, dy, dw, dh, Image,
sx, sy, Flag );
}*//*
}*/
//---------------------------------------------------------------------------
void GTK2Graphics::DrawRect( int x, int y, int w, int h, int color )
{
LPRECT r = new RECT;
/* LPRECT r = new RECT;
HBRUSH Brush = CreateSolidBrush( color );
r->left = x;
r->top = y;
......@@ -85,12 +84,12 @@ void GTK2Graphics::DrawRect( int x, int y, int w, int h, int color )
r->bottom = y + h;
FillRect( Image, r, Brush );
DeleteObject( Brush );
delete r;
delete r;*/
}
//---------------------------------------------------------------------------
void GTK2Graphics::SetClipRegion( Region *rgn )
{
SelectClipRgn( Image, ( (GTK2Region *)rgn )->GetHandle() );
/* SelectClipRgn( Image, ( (GTK2Region *)rgn )->GetHandle() );*/
}
//---------------------------------------------------------------------------
......@@ -102,48 +101,48 @@ void GTK2Graphics::SetClipRegion( Region *rgn )
//---------------------------------------------------------------------------
GTK2Region::GTK2Region()
{
Rgn = CreateRectRgn( 0, 0, 0, 0 );
/* Rgn = CreateRectRgn( 0, 0, 0, 0 );*/
}
//---------------------------------------------------------------------------
GTK2Region::GTK2Region( int x, int y, int w, int h )
{
Rgn = CreateRectRgn( x, y, x + w, y + h );
/* Rgn = CreateRectRgn( x, y, x + w, y + h );*/
}
//---------------------------------------------------------------------------
GTK2Region::~GTK2Region()
{
DeleteObject( Rgn );
/* DeleteObject( Rgn );*/
}
//---------------------------------------------------------------------------
void GTK2Region::AddPoint( int x, int y )
{
AddRectangle( x, y, x + 1, y + 1 );
/* AddRectangle( x, y, x + 1, y + 1 );*/
}
//---------------------------------------------------------------------------
void GTK2Region::AddRectangle( int x, int y, int w, int h )
{
HRGN Buffer;
/* HRGN Buffer;
Buffer = CreateRectRgn( x, y, x + w, y + h );
CombineRgn( Rgn, Buffer, Rgn, 0x2 );
DeleteObject( Buffer );
DeleteObject( Buffer );*/
}
//---------------------------------------------------------------------------
void GTK2Region::AddElipse( int x, int y, int w, int h )
{
HRGN Buffer;
/* HRGN Buffer;
Buffer = CreateEllipticRgn( x, y, x + w, y + h );
CombineRgn( Rgn, Buffer, Rgn, 0x2 );
DeleteObject( Buffer );
DeleteObject( Buffer );*/
}
//---------------------------------------------------------------------------
void GTK2Region::Move( int x, int y )
{
OffsetRgn( Rgn, x, y );
/* OffsetRgn( Rgn, x, y );*/
}
//---------------------------------------------------------------------------
bool GTK2Region::Hit( int x, int y )
{
return PtInRegion( Rgn, x, y );
/* return PtInRegion( Rgn, x, y );*/
}
//---------------------------------------------------------------------------
*/
......@@ -2,7 +2,7 @@
* gtk2_run.cpp:
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_run.cpp,v 1.1 2003/04/12 21:43:27 asmax Exp $
* $Id: gtk2_run.cpp,v 1.2 2003/04/12 22:50:42 asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
......@@ -42,8 +42,6 @@
#include "vlcproc.h"
#if 0
//---------------------------------------------------------------------------
// Specific method
//---------------------------------------------------------------------------
......@@ -55,12 +53,12 @@ int SkinManage( intf_thread_t *p_intf );
//---------------------------------------------------------------------------
// REFRESH TIMER CALLBACK
//---------------------------------------------------------------------------
void CALLBACK RefreshTimer( HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime )
/*void CALLBACK RefreshTimer( HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime )
{
intf_thread_t *p_intf = (intf_thread_t *)GetWindowLongPtr( hwnd,
GWLP_USERDATA );
SkinManage( p_intf );
}
}*/
//---------------------------------------------------------------------------
......@@ -70,6 +68,7 @@ void CALLBACK RefreshTimer( HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime )
//---------------------------------------------------------------------------
void OSRun( intf_thread_t *p_intf )
{
#if 0
VlcProc *Proc = new VlcProc( p_intf );
MSG msg;
list<Window *>::const_iterator win;
......@@ -171,6 +170,7 @@ void OSRun( intf_thread_t *p_intf )
// Check if vlc is closing
Proc->IsClosing();
}
#endif
}
//---------------------------------------------------------------------------
bool IsVLCEvent( unsigned int msg )
......@@ -180,4 +180,3 @@ bool IsVLCEvent( unsigned int msg )
//---------------------------------------------------------------------------
#endif
......@@ -2,7 +2,7 @@
* gtk2_window.cpp: GTK2 implementation of the Window class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_window.cpp,v 1.1 2003/04/12 21:43:27 asmax Exp $
* $Id: gtk2_window.cpp,v 1.2 2003/04/12 22:50:42 asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
......@@ -46,29 +46,29 @@
#include "theme.h"
/*
//---------------------------------------------------------------------------
// Fading API
//---------------------------------------------------------------------------
#define LWA_COLORKEY 0x00000001
/*#define LWA_COLORKEY 0x00000001
#define LWA_ALPHA 0x00000002
typedef BOOL (WINAPI *SLWA)(HWND, COLORREF, BYTE, DWORD);
HMODULE hModule = LoadLibrary( "user32.dll" );
SLWA SetLayeredWindowAttributes =
(SLWA)GetProcAddress( hModule, "SetLayeredWindowAttributes" );
*/
//---------------------------------------------------------------------------
// Skinable Window
//---------------------------------------------------------------------------
GTK2Window::GTK2Window( intf_thread_t *p_intf, HWND hwnd, int x, int y,
GTK2Window::GTK2Window( intf_thread_t *p_intf, GdkWindow *gwnd, int x, int y,
bool visible, int transition, int normalalpha, int movealpha,
bool dragdrop )
: Window( p_intf, x, y, visible, transition, normalalpha, movealpha,
dragdrop )
{
// Set handles
hWnd = hwnd;
/* hWnd = hwnd;
// Set position parameters
CursorPos = new POINT;
......@@ -102,12 +102,12 @@ GTK2Window::GTK2Window( intf_thread_t *p_intf, HWND hwnd, int x, int y,
// register the listview as a drop target
RegisterDragDrop( hWnd, DropTarget );
}
*/
}
//---------------------------------------------------------------------------
GTK2Window::~GTK2Window()
{
delete CursorPos;
/* delete CursorPos;
delete WindowPos;
if( hWnd != NULL )
......@@ -126,24 +126,24 @@ GTK2Window::~GTK2Window()
// Uninitialize the OLE library
OleUninitialize();
}
*/
}
//---------------------------------------------------------------------------
void GTK2Window::OSShow( bool show )
{
if( show )
/* if( show )
{
ShowWindow( hWnd, SW_SHOW );
}
else
{
ShowWindow( hWnd, SW_HIDE );
}
}*/
}
//---------------------------------------------------------------------------
bool GTK2Window::ProcessOSEvent( Event *evt )
{
unsigned int msg = evt->GetMessage();
/* unsigned int msg = evt->GetMessage();
unsigned int p1 = evt->GetParam1();
int p2 = evt->GetParam2();
......@@ -201,21 +201,21 @@ bool GTK2Window::ProcessOSEvent( Event *evt )
default:
return false;
}
}*/
}
//---------------------------------------------------------------------------
void GTK2Window::SetTransparency( int Value )
{
if( Value > -1 )
/* if( Value > -1 )
Alpha = Value;
SetLayeredWindowAttributes( hWnd, 0, Alpha, LWA_ALPHA | LWA_COLORKEY );
UpdateWindow( hWnd );
UpdateWindow( hWnd );*/
}
//---------------------------------------------------------------------------
void GTK2Window::RefreshFromImage( int x, int y, int w, int h )
{
// Initialize painting
HDC DC = GetWindowDC( hWnd );
/* HDC DC = GetWindowDC( hWnd );
// Draw image on window
BitBlt( DC, x, y, w, h, ( (GTK2Graphics *)Image )->GetImageHandle(),
......@@ -223,12 +223,12 @@ void GTK2Window::RefreshFromImage( int x, int y, int w, int h )
// Release window device context
ReleaseDC( hWnd, DC );
*/
}
//---------------------------------------------------------------------------
void GTK2Window::WindowManualMove()
{
// Get mouse cursor position
/* // Get mouse cursor position
LPPOINT NewPos = new POINT;
GetCursorPos( NewPos );
......@@ -239,36 +239,36 @@ void GTK2Window::WindowManualMove()
// Free memory
delete[] NewPos;
*/
}
//---------------------------------------------------------------------------
void GTK2Window::WindowManualMoveInit()
{
GetCursorPos( CursorPos );
/* GetCursorPos( CursorPos );
WindowPos->x = Left;
WindowPos->y = Top;
WindowPos->y = Top;*/
}
//---------------------------------------------------------------------------
void GTK2Window::Move( int left, int top )
{
Left = left;
/* Left = left;
Top = top;
//SetWindowPos( hWnd, HWND_TOP, Left, Top, Width, Height,
// SWP_NOSIZE|SWP_NOREDRAW|SWP_NOZORDER );
MoveWindow( hWnd, Left, Top, Width, Height, false );
MoveWindow( hWnd, Left, Top, Width, Height, false );*/
}
//---------------------------------------------------------------------------
void GTK2Window::Size( int width, int height )
{
Width = width;
/* Width = width;
Height = height;
SetWindowPos( hWnd, HWND_TOP, Left, Top, Width, Height,
SWP_NOMOVE|SWP_NOREDRAW|SWP_NOZORDER );
SWP_NOMOVE|SWP_NOREDRAW|SWP_NOZORDER );*/
}
//---------------------------------------------------------------------------
void GTK2Window::ChangeToolTipText( string text )
{
if( text == "none" )
/* if( text == "none" )
{
if( ToolTipText != "none" )
{
......@@ -288,7 +288,7 @@ void GTK2Window::ChangeToolTipText( string text )
(LPARAM)(LPTOOLINFO)&ToolTipInfo );
}
}
*/
}
//---------------------------------------------------------------------------
*/
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