39.1.27
by Jason Smith
Add WindowManager plugin |
1 |
// WindowItem.cs
|
2 |
//
|
|
3 |
//GNOME Do is the legal property of its developers. Please refer to the
|
|
4 |
//COPYRIGHT file distributed with this
|
|
5 |
//source distribution.
|
|
6 |
//
|
|
7 |
// This program is free software; you can redistribute it and/or modify
|
|
8 |
// it under the terms of the GNU General Public License as published by
|
|
9 |
// the Free Software Foundation; either version 2 of the License, or
|
|
10 |
// (at your option) any later version.
|
|
11 |
//
|
|
12 |
// This program is distributed in the hope that it will be useful,
|
|
13 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15 |
// GNU General Public License for more details.
|
|
16 |
//
|
|
17 |
// You should have received a copy of the GNU General Public License
|
|
18 |
// along with this program; if not, write to the Free Software
|
|
19 |
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
20 |
//
|
|
21 |
//
|
|
22 |
||
23 |
using System; |
|
24 |
using Wnck; |
|
25 |
||
39.1.28
by Jason Smith
Update plugin |
26 |
using Do.Universe; |
27 |
||
39.1.27
by Jason Smith
Add WindowManager plugin |
28 |
namespace WindowManager |
29 |
{
|
|
39.1.50
by Jason Smith
Support GenericWindowItems |
30 |
public enum GenericWindowType |
31 |
{
|
|
32 |
CurrentWindow = 0, |
|
33 |
PreviousWindow = 1, |
|
34 |
CurrentApplication = 2, |
|
35 |
PreviousApplication = 3, |
|
36 |
}
|
|
37 |
||
39.1.28
by Jason Smith
Update plugin |
38 |
public class GenericWindowItem : IItem |
39 |
{
|
|
40 |
string name, description, icon; |
|
39.1.50
by Jason Smith
Support GenericWindowItems |
41 |
GenericWindowType windowType; |
39.1.28
by Jason Smith
Update plugin |
42 |
|
39.1.50
by Jason Smith
Support GenericWindowItems |
43 |
public GenericWindowItem (string name, string description, string icon, |
44 |
GenericWindowType windowType) |
|
39.1.28
by Jason Smith
Update plugin |
45 |
{
|
46 |
this.name = name; |
|
47 |
this.description = description; |
|
48 |
this.icon = icon; |
|
39.1.50
by Jason Smith
Support GenericWindowItems |
49 |
this.windowType = windowType; |
39.1.28
by Jason Smith
Update plugin |
50 |
}
|
51 |
||
52 |
public string Name { |
|
53 |
get { |
|
54 |
return name; |
|
55 |
}
|
|
56 |
}
|
|
57 |
||
58 |
public string Description { |
|
59 |
get { |
|
60 |
return description; |
|
61 |
}
|
|
62 |
}
|
|
63 |
||
64 |
public string Icon { |
|
65 |
get { |
|
66 |
return icon; |
|
67 |
}
|
|
68 |
}
|
|
69 |
||
39.1.50
by Jason Smith
Support GenericWindowItems |
70 |
public GenericWindowType WindowType { |
71 |
get { |
|
72 |
return windowType; |
|
73 |
}
|
|
74 |
}
|
|
39.1.28
by Jason Smith
Update plugin |
75 |
|
76 |
}
|
|
39.1.27
by Jason Smith
Add WindowManager plugin |
77 |
|
78 |
public class WindowItem : IWindowItem |
|
79 |
{
|
|
80 |
Wnck.Window window; |
|
81 |
string icon; |
|
82 |
||
83 |
public string Name { |
|
84 |
get { |
|
85 |
return window.Name; |
|
86 |
}
|
|
87 |
}
|
|
88 |
||
89 |
public string Description { |
|
90 |
get { |
|
91 |
return window.Name; |
|
92 |
}
|
|
93 |
}
|
|
94 |
||
95 |
public Wnck.Window Window { |
|
96 |
get { |
|
97 |
return window; |
|
98 |
}
|
|
99 |
}
|
|
100 |
||
101 |
public string Icon { |
|
102 |
get { |
|
103 |
return icon; |
|
104 |
}
|
|
105 |
}
|
|
106 |
||
107 |
public WindowItem(Window w, string icon) |
|
108 |
{
|
|
109 |
this.window = w; |
|
110 |
this.icon = icon; |
|
111 |
}
|
|
112 |
||
113 |
}
|
|
114 |
||
115 |
public class ScreenItem : IScreenItem |
|
116 |
{
|
|
117 |
string name, description, icon; |
|
118 |
||
119 |
public string Name { |
|
120 |
get { |
|
121 |
return name; |
|
122 |
}
|
|
123 |
}
|
|
124 |
||
125 |
public string Description { |
|
126 |
get { |
|
127 |
return description; |
|
128 |
}
|
|
129 |
}
|
|
130 |
||
131 |
public string Icon { |
|
132 |
get { |
|
133 |
return icon; |
|
134 |
}
|
|
135 |
}
|
|
136 |
||
137 |
||
138 |
public ScreenItem (string name, string description, string icon) |
|
139 |
{
|
|
140 |
this.name = name; |
|
141 |
this.icon = icon; |
|
142 |
this.description = description; |
|
143 |
}
|
|
144 |
}
|
|
145 |
}
|