예제 #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;
                    }
                }
            }
예제 #5
0
	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
파일: PixbufCache.cs 프로젝트: GNOME/f-spot
 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;
                    }
                }
            }