]> git.sesse.net Git - vlc/blob - modules/gui/skins/gtk2/gtk2_bitmap.h
* something will be visible soon, be patient...
[vlc] / modules / gui / skins / gtk2 / gtk2_bitmap.h
1 /*****************************************************************************
2  * gtk2_bitmap.h: GTK2 implementation of the Bitmap class
3  *****************************************************************************
4  * Copyright (C) 2003 VideoLAN
5  * $Id: gtk2_bitmap.h,v 1.2 2003/04/13 20:07:34 asmax Exp $
6  *
7  * Authors: Cyril Deguet     <asmax@videolan.org>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111,
22  * USA.
23  *****************************************************************************/
24
25
26 #ifndef VLC_GTK2_BITMAP
27 #define VLC_GTK2_BITMAP
28
29 //--- GTK2 -----------------------------------------------------------------
30 #include <gdk/gdk.h>
31
32 //--- GENERAL ---------------------------------------------------------------
33 #include <string>
34 using namespace std;
35
36 //---------------------------------------------------------------------------
37 struct intf_thread_t;
38 class Bitmap;
39 class Graphics;
40
41 //---------------------------------------------------------------------------
42 class GTK2Bitmap : public Bitmap
43 {
44     private:
45         GdkBitmap *bmpDC;
46
47     public:
48         // Constructors
49         GTK2Bitmap( intf_thread_t *p_intf, string FileName, int AColor );
50         GTK2Bitmap( intf_thread_t *p_intf, Graphics *from, int x, int y,
51                      int w, int h, int AColor );
52         GTK2Bitmap( intf_thread_t *p_intf, Bitmap *c );
53
54         // Destructor
55         virtual ~GTK2Bitmap();
56
57         virtual void DrawBitmap( int x, int y, int w, int h, int xRef, int yRef,
58                                  Graphics *dest );
59         virtual bool Hit( int x, int y );
60
61         virtual int  GetBmpPixel( int x, int y );
62         virtual void SetBmpPixel( int x, int y, int color );
63
64         GdkBitmap *GetBmpDC() { return bmpDC; }
65 };
66 //---------------------------------------------------------------------------
67
68 #endif