~and471/+junk/do-with-docky

« back to all changes in this revision

Viewing changes to Do.Interface.Linux.Docky/src/Docky.Interface/DoInteropService.cs

  • Committer: rugby471 at gmail
  • Date: 2010-10-15 16:08:38 UTC
  • Revision ID: rugby471@gmail.com-20101015160838-z9m3utbf7bxzb5ty
reverted to before docky removal

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// DoInteropService.cs
 
2
// 
 
3
// Copyright (C) 2009 GNOME Do
 
4
//
 
5
// This program is free software: you can redistribute it and/or modify
 
6
// it under the terms of the GNU General Public License as published by
 
7
// the Free Software Foundation, either version 3 of the License, or
 
8
// (at your option) any later version.
 
9
//
 
10
// This program is distributed in the hope that it will be useful,
 
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
// GNU General Public License for more details.
 
14
//
 
15
// You should have received a copy of the GNU General Public License
 
16
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
17
//
 
18
 
 
19
using System;
 
20
 
 
21
using Do.Interface;
 
22
 
 
23
using Docky.Core;
 
24
 
 
25
namespace Docky.Interface
 
26
{
 
27
        
 
28
        
 
29
        public class DoInteropService : IDoInteropService
 
30
        {
 
31
                
 
32
                IDoController controller;
 
33
 
 
34
                public void SignalSummon ()
 
35
                {
 
36
                        if (Summoned != null)
 
37
                                Summoned (this, EventArgs.Empty);
 
38
                }
 
39
 
 
40
                public void SignalVanish ()
 
41
                {
 
42
                        if (Vanished != null)
 
43
                                Vanished (this, EventArgs.Empty);
 
44
                }
 
45
 
 
46
                public void SignalReset ()
 
47
                {
 
48
                        if (Reset != null)
 
49
                                Reset (this, EventArgs.Empty);
 
50
                }
 
51
 
 
52
                public void SignalResultsGrow ()
 
53
                {
 
54
                        if (ResultsGrow != null)
 
55
                                ResultsGrow (this, EventArgs.Empty);
 
56
                }
 
57
 
 
58
                public void SignalResultsShrink ()
 
59
                {
 
60
                        if (ResultsShrink != null)
 
61
                                ResultsShrink (this, EventArgs.Empty);
 
62
                }
 
63
                
 
64
                #region IDoInteropService implementation 
 
65
                
 
66
                public event EventHandler Summoned;
 
67
                
 
68
                public event EventHandler Vanished;
 
69
 
 
70
                public event EventHandler Reset;
 
71
                
 
72
                public event EventHandler ResultsGrow;
 
73
                
 
74
                public event EventHandler ResultsShrink;
 
75
 
 
76
                public void RequestClickOff ()
 
77
                {
 
78
                        controller.ButtonPressOffWindow ();
 
79
                }
 
80
                
 
81
                #endregion 
 
82
                
 
83
                public DoInteropService (IDoController controller)
 
84
                {
 
85
                        this.controller = controller;
 
86
                }
 
87
 
 
88
                #region IDisposable implementation 
 
89
                
 
90
                public void Dispose ()
 
91
                {
 
92
                        DockServices.UnregisterService (this);
 
93
                        controller = null;
 
94
                }
 
95
                
 
96
                #endregion 
 
97
                
 
98
        }
 
99
}