~ubuntu-branches/debian/jessie/banshee-community-extensions/jessie

« back to all changes in this revision

Viewing changes to src/ClutterFlow/ClutterFlow/ClutterGenericButton.cs

  • Committer: Package Import Robot
  • Author(s): Chow Loong Jin
  • Date: 2011-09-20 18:45:46 UTC
  • mfrom: (1.2.9 upstream) (5.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20110920184546-3ahue2qplydc4t0e
Tags: 2.2.0-1
* [4940fab] Imported Upstream version 2.2.0
  + Notable bug fixes:
    - Karaoke: Fix crash when switching to Now Playing
    - Lyrics: Fix crash when switching to Now Playing

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
namespace ClutterFlow.Buttons
34
34
{
35
 
        public delegate void CreateTextureMethod (CairoTexture texture, int with_state);
36
 
        
37
 
        public class ClutterGenericButton : ClutterButton
38
 
        {
39
 
                CreateTextureMethod createTexture = null;
40
 
                
41
 
                public ClutterGenericButton(uint width, uint height, int state, CreateTextureMethod createTexture) : base (width, height, state, false)
42
 
                {
43
 
                        this.createTexture = createTexture;
44
 
                        Initialise ();
45
 
                }
46
 
 
47
 
                protected override void CreateTexture (Clutter.CairoTexture texture, int with_state)
48
 
                {
49
 
                        if (createTexture!=null) createTexture(texture, with_state);
50
 
                        else base.CreateTexture (texture, with_state);
51
 
                }
52
 
 
53
 
        }
 
35
    public delegate void CreateTextureMethod (CairoTexture texture, int with_state);
 
36
 
 
37
    public class ClutterGenericButton : ClutterButton
 
38
    {
 
39
        CreateTextureMethod createTexture = null;
 
40
 
 
41
        public ClutterGenericButton (uint width, uint height, int state, CreateTextureMethod createTexture) : base (width, height, state, false)
 
42
        {
 
43
            this.createTexture = createTexture;
 
44
            Initialise ();
 
45
        }
 
46
 
 
47
        protected override void CreateTexture (Clutter.CairoTexture texture, int with_state)
 
48
        {
 
49
            if (createTexture != null) {
 
50
                createTexture (texture, with_state);
 
51
            } else {
 
52
                base.CreateTexture (texture, with_state);
 
53
            }
 
54
        }
 
55
 
 
56
    }
54
57
}