示例#1
0
 public CacheEntry(PixbufCache cache, string path, object closure, int width, int height)
 {
     this.path         = path;
     this.width        = width;
     this.height       = height;
     this.data         = closure;
     this.Reload       = true;
     this.cache        = cache;
     cache.total_size += this.Size;
 }
示例#2
0
 public CacheEntry(PixbufCache cache, SafeUri uri, object closure, int width, int height)
 {
     Uri    = uri;
     Width  = width;
     Height = height;
     // Should this be this.data or Data?
     data              = closure;
     Reload            = true;
     this.cache        = cache;
     cache.total_size += Size;
 }
示例#3
0
            public void Dispose()
            {
                lock (this) {
                    if (!IsDisposed)
                    {
                        cache.total_size -= this.Size;
                    }

                    if (this.pixbuf != null)
                    {
                        this.pixbuf.Dispose();
                    }
                    this.pixbuf = null;
                    this.cache  = null;
                    this.path   = null;
                }
                System.GC.SuppressFinalize(this);
            }
示例#4
0
            protected virtual void Dispose(bool disposing)
            {
                lock (locker) {
                    if (disposed)
                    {
                        return;
                    }
                    disposed = true;

                    if (disposing)
                    {
                        cache.total_size -= Size;

                        if (pixbuf != null)
                        {
                            pixbuf.Dispose();
                            pixbuf = null;
                        }
                        cache = null;
                        Uri   = null;
                    }
                }
            }
	protected IconView () : base (null, null)
	{
		cache = new FSpot.PixbufCache ();
		cache.OnPixbufLoaded += HandlePixbufLoaded;

		ScrollAdjustmentsSet += new ScrollAdjustmentsSetHandler (HandleScrollAdjustmentsSet);
		
		ButtonPressEvent += new ButtonPressEventHandler (HandleButtonPressEvent);
		ButtonReleaseEvent += new ButtonReleaseEventHandler (HandleButtonReleaseEvent);
		KeyPressEvent += new KeyPressEventHandler (HandleKeyPressEvent);
		ScrollEvent += new ScrollEventHandler(HandleScrollEvent);

		Destroyed += HandleDestroyed;

		AddEvents ((int) EventMask.KeyPressMask
			   | (int) EventMask.KeyReleaseMask 
			   | (int) EventMask.PointerMotionMask);
		
		CanFocus = true;

		//FSpot.Global.ModifyColors (this);
	}
			public void Dispose ()
			{
				lock (this) {
					if (! IsDisposed)
						cache.total_size -= this.Size;

					if (this.pixbuf != null) {
						this.pixbuf.Dispose ();
						
					}
					this.pixbuf = null;
					this.cache = null;
					this.path = null;
				}
				System.GC.SuppressFinalize (this);
			}
			public CacheEntry (PixbufCache cache, string path, object closure, int width, int height)
			{
				this.path = path;
				this.width = width;
				this.height = height;
				this.data = closure;
				this.Reload = true;
				this.cache = cache;
				cache.total_size += this.Size;
			}
示例#8
0
 public CacheEntry(PixbufCache cache, SafeUri uri, object closure, int width, int height)
 {
     Uri = uri;
     Width = width;
     Height = height;
                     // Should this be this.data or Data?
     this.data = closure;
     Reload = true;
     this.cache = cache;
     cache.total_size += this.Size;
 }
 public CacheEntry(PixbufCache cache, SafeUri uri, object closure, int width, int height)
 {
     this.uri = uri;
     this.width = width;
     this.height = height;
     this.data = closure;
     this.Reload = true;
     this.cache = cache;
     cache.total_size += this.Size;
 }
示例#10
0
            protected virtual void Dispose(bool disposing)
            {
                lock (locker) {
                    if (disposed)
                        return;
                    disposed = true;

                    if (disposing) {
                        cache.total_size -= Size;

                        if (pixbuf != null) {
                            pixbuf.Dispose ();
                            pixbuf = null;
                        }
                        cache = null;
                        Uri = null;
                    }
                }
            }