Changeset ef59c8fc56b348a2e10cc795d5f616b06da258fd

Show
Ignore:
Timestamp:
04/30/03 23:16:24 (5 years ago)
Author:
Cyril Deguet <asmax@videolan.org>
git-committer:
Cyril Deguet <asmax@videolan.org> 1051737384 +0000
git-parent:

[c7b39fc63ac10a4712a0c9308da0274019b8763f]

git-author:
Cyril Deguet <asmax@videolan.org> 1051737384 +0000
Message:

* enable basic-skins for GTK2 (not tested yet ;)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • build-vlc

    r5023130 ref59c8f  
    77GTK2 gtk2 
    88SKINS skins 
     9BASIC_SKINS basic-skins 
    910FAMILIAR familiar 
    1011WXWINDOWS wxwindows 
  • config.in

    r50000c8 ref59c8f  
    1717dep_bool '   Gnome2 support' CONFIG_GNOME2 $CONFIG_GTK2 
    1818bool 'Skins module' CONFIG_SKINS 
     19bool 'Basic skins module (without wxWindows)' CONFIG_BASIC_SKINS 
    1920bool 'Familiar GTK+ support' CONFIG_FAMILIAR 
    2021bool 'wxWindows support' CONFIG_WXWINDOWS 
  • modules/gui/skins/gtk2/gtk2_run.cpp

    rf38481f ref59c8f  
    33 ***************************************************************************** 
    44 * Copyright (C) 2003 VideoLAN 
    5  * $Id: gtk2_run.cpp,v 1.21 2003/04/28 12:00:13 asmax Exp $ 
     5 * $Id: gtk2_run.cpp,v 1.22 2003/04/30 21:16:24 asmax Exp $ 
    66 * 
    77 * Authors: Cyril Deguet     <asmax@videolan.org> 
     
    3131 
    3232//--- WWWINDOWS ------------------------------------------------------------- 
     33#ifndef BASIC_SKINS 
    3334#include <wx/wx.h> 
     35#endif 
    3436 
    3537//--- VLC ------------------------------------------------------------------- 
     
    4749#include "../src/skin_common.h" 
    4850#include "../src/vlcproc.h" 
     51#ifndef BASIC_SKINS 
    4952#include "../src/wxdialogs.h" 
     53#endif 
    5054 
    5155// include the icon graphic 
     
    7074// Local classes declarations. 
    7175//--------------------------------------------------------------------------- 
     76#ifndef BASIC_SKINS 
    7277class Instance: public wxApp 
    7378{ 
     
    8388    CallBackObjects *callbackobj; 
    8489}; 
     90#endif 
    8591 
    8692 
     
    192198    proc->IsClosing(); 
    193199 
     200#ifndef BASIC_SKINS 
    194201    gtk_main_do_event( event ); 
     202#endif 
    195203 
    196204} 
     
    212220// Implementation of Instance class 
    213221//--------------------------------------------------------------------------- 
     222#ifndef BASIC_SKINS 
    214223Instance::Instance( ) 
    215224{ 
     
    242251    return TRUE; 
    243252} 
    244  
     253#endif 
    245254 
    246255 
     
    256265    callbackobj->Proc = new VlcProc( p_intf ); 
    257266 
     267#ifndef BASIC_SKINS 
    258268    wxTheApp = new Instance( p_intf, callbackobj ); 
    259  
    260269    wxEntry( 1, p_args ); 
    261      
     270#else 
     271    gdk_event_handler_set( GTK2Proc, (gpointer)callbackobj, NULL ); 
     272    // Add timer 
     273    g_timeout_add( 200, (GSourceFunc)RefreshTimer, (gpointer)p_intf ); 
     274#endif 
     275 
    262276    delete callbackobj; 
    263277} 
  • modules/gui/skins/src/window.cpp

    rf38481f ref59c8f  
    33 ***************************************************************************** 
    44 * Copyright (C) 2003 VideoLAN 
    5  * $Id: window.cpp,v 1.21 2003/04/28 12:00:14 asmax Exp $ 
     5 * $Id: window.cpp,v 1.22 2003/04/30 21:16:24 asmax Exp $ 
    66 * 
    77 * Authors: Olivier Teuli� <ipkiss@via.ecp.fr> 
     
    291291 
    292292    // Create Bitmap Buffer 
     293//    Graphics *Buffer = (Graphics *)new OSGraphics( p_intf, w, h, this ); 
    293294    Graphics *Buffer = (Graphics *)new OSGraphics( w, h, this ); 
    294295 
     
    491492        if( Image != NULL ) 
    492493            delete (OSGraphics *)Image; 
     494//        Image = (Graphics *)new OSGraphics( p_intf, w, h, this ); 
    493495        Image = (Graphics *)new OSGraphics( w, h, this ); 
    494  
    495496 
    496497        Size( w, h ); 
  • modules/gui/skins/x11/x11_bitmap.cpp

    r2396f46 ref59c8f  
    33 ***************************************************************************** 
    44 * Copyright (C) 2003 VideoLAN 
    5  * $Id: x11_bitmap.cpp,v 1.1 2003/04/28 14:32:57 asmax Exp $ 
     5 * $Id: x11_bitmap.cpp,v 1.2 2003/04/30 21:16:24 asmax Exp $ 
    66 * 
    77 * Authors: Cyril Deguet     <asmax@videolan.org> 
     
    147147    if( Bmp ) 
    148148    { 
    149 /*        GdkDrawable *destImg = ( (X11Graphics *)dest )->GetImage(); 
    150         GdkGC *destGC = ( (X11Graphics *)dest )->GetGC(); 
     149        Drawable destImg = ( (X11Graphics *)dest )->GetImage(); 
     150        GC destGC = ( (X11Graphics *)dest )->GetGC(); 
    151151 
    152         gdk_pixbuf_render_to_drawable( Bmp, destImg, destGC, x, y, xRef, yRef,  
    153                 w, h, GDK_RGB_DITHER_NORMAL, 0, 0);*/ 
     152        XCopyArea( display, Bmp, destImg, destGC, x, y, w, h, xRef, yRef ); 
    154153    } 
    155154} 
  • modules/gui/skins/x11/x11_graphics.cpp

    r2396f46 ref59c8f  
    33 ***************************************************************************** 
    44 * Copyright (C) 2003 VideoLAN 
    5  * $Id: x11_graphics.cpp,v 1.1 2003/04/28 14:32:57 asmax Exp $ 
     5 * $Id: x11_graphics.cpp,v 1.2 2003/04/30 21:16:24 asmax Exp $ 
    66 * 
    77 * Authors: Cyril Deguet     <asmax@videolan.org> 
     
    2929#include <X11/Xlib.h> 
    3030 
     31//--- VLC ----------------------------------------------------------------- 
     32#include <vlc/intf.h> 
     33 
    3134//--- SKIN ------------------------------------------------------------------ 
    3235#include "../src/graphics.h" 
     
    3437#include "../os_window.h" 
    3538#include "x11_graphics.h" 
     39#include "../src/skin_common.h" 
    3640 
    3741#include <stdio.h> 
     
    4145// X11 GRAPHICS 
    4246//--------------------------------------------------------------------------- 
    43 X11Graphics::X11Graphics( int w, int h, SkinWindow *from ) : Graphics( w, h ) 
     47X11Graphics::X11Graphics( intf_thread_t *p_intf, int w, int h, 
     48                          SkinWindow *from ) : Graphics( w, h ) 
    4449{ 
    45 /*    if( from != NULL ) 
     50    display = p_intf->p_sys->display; 
     51    int screen = DefaultScreen( display ); 
     52 
     53    if( from != NULL ) 
    4654    { 
    47         GdkWindow *fromWnd = ( (X11Window *)from )->GetHandle(); 
    48         Image = (GdkDrawable*) gdk_pixmap_new( fromWnd, w, h, -1 ); 
    49         Gc = gdk_gc_new( ( GdkDrawable* )fromWnd ); 
     55        Window fromWnd = ( (X11Window *)from )->GetHandle(); 
     56 
     57        XWindowAttributes attr; 
     58        XGetWindowAttributes( display, fromWnd, &attr); 
     59 
     60        Image = XCreatePixmap( display, fromWnd, w, h, attr.depth ); 
     61        Gc = DefaultGC( display, screen ); 
    5062    } 
    5163    else 
    5264    { 
    53         // FIXME: 8 -> screen depth 
    54         Image = (GdkDrawable*) gdk_pixmap_new( NULL, w, h, 16 ); 
    55         gdk_drawable_set_colormap( Image, gdk_colormap_get_system() ); 
    56         Gc = gdk_gc_new( Image ); 
    57    
     65        Window root = DefaultRootWindow( display ); 
     66        Image = XCreatePixmap( display, root, w, h, 
     67                               DefaultDepth( display, screen ) ); 
     68        Gc = DefaultGC( display, screen ); 
     69   
    5870 
    5971    // Set the background color to black 
    60     gdk_draw_rectangle( Image, Gc, TRUE, 0, 0, w, h );*/ 
     72 //   gdk_draw_rectangle( Image, Gc, TRUE, 0, 0, w, h ); 
    6173} 
    6274//--------------------------------------------------------------------------- 
     
    7082                              int sx, int sy, int Flag ) 
    7183{ 
    72 /*    gdk_draw_drawable( Image, Gc, (( X11Graphics* )Src )->GetImage(), 
    73             sx, sy, dx, dy, dw, dh );*/ 
     84    XCopyArea( display, (( X11Graphics* )Src )->GetImage(), Image, Gc,  
     85            sx, sy, dw, dh, dx, dy ); 
    7486} 
    7587//--------------------------------------------------------------------------- 
  • modules/gui/skins/x11/x11_graphics.h

    r2396f46 ref59c8f  
    33 ***************************************************************************** 
    44 * Copyright (C) 2003 VideoLAN 
    5  * $Id: x11_graphics.h,v 1.1 2003/04/28 14:32:57 asmax Exp $ 
     5 * $Id: x11_graphics.h,v 1.2 2003/04/30 21:16:24 asmax Exp $ 
    66 * 
    77 * Authors: Cyril Deguet     <asmax@via.ecp.fr> 
     
    4141{ 
    4242    protected: 
    43        /* Drawable *Image; 
    44         GdkGC *Gc;*/ 
     43        Display *display; 
     44        Drawable Image; 
     45        GC Gc; 
    4546 
    4647    public: 
    4748        // Constructor 
    48         X11Graphics( int w, int h, SkinWindow *from = NULL ); 
     49        X11Graphics( intf_thread_t *p_intf, int w, int h, SkinWindow *from = NULL ); 
    4950        // Destructor 
    5051        virtual ~X11Graphics(); 
     
    6162 
    6263        // Specific X11 methods 
    63 /*        GdkDrawable *GetImage() { return Image; }; 
    64         GdkGC *GetGC()    { return Gc; };*/ 
     64        Drawable GetImage() { return Image; }; 
     65        GC GetGC()    { return Gc; }; 
    6566}; 
    6667//---------------------------------------------------------------------------