~cszikszoy/do-plugins/pastebin

« back to all changes in this revision

Viewing changes to WindowManager/src/WindowItemSource.cs

  • Committer: djsiegel at gmail
  • Date: 2007-11-07 17:13:21 UTC
  • Revision ID: djsiegel@gmail.com-20071107171321-zgu46ukqlpdx1ypa
Initial files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// WindowItemSource.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 System.Collections.Generic;
25
 
 
26
 
using Do.Universe;
27
 
using Wnck;
28
 
 
29
 
namespace WindowManager
30
 
{
31
 
        public class WindowItemSource : IItemSource
32
 
        {
33
 
                List<IItem> items;
34
 
                
35
 
                public string Name {
36
 
                        get {
37
 
                                return "Generic Window Items";
38
 
                        }
39
 
                }
40
 
 
41
 
                public string Description {
42
 
                        get {
43
 
                                return "Useful Generically Understood Window Items";
44
 
                        }
45
 
                }
46
 
 
47
 
                public string Icon {
48
 
                        get {
49
 
                                return "gnome-window-manager";
50
 
                        }
51
 
                }
52
 
 
53
 
                public Type[] SupportedItemTypes {
54
 
                        get {
55
 
                                return new Type [] {
56
 
                                        typeof (GenericWindowItem)};
57
 
                        }
58
 
                }
59
 
 
60
 
                public ICollection<IItem> Items {
61
 
                        get {
62
 
                                return items;
63
 
                        }
64
 
                }
65
 
 
66
 
                public WindowItemSource ()
67
 
                {
68
 
                        items = new List<IItem> ();
69
 
                        
70
 
                        items.Add (new GenericWindowItem ("Current Window",
71
 
                                                          "The Currently Active Window",
72
 
                                                          "gnome-window-manager"));
73
 
                }
74
 
                
75
 
                public ICollection<IItem> ChildrenOfItem (IItem item)
76
 
                {
77
 
                        return null;
78
 
                }
79
 
 
80
 
                public void UpdateItems ()
81
 
                {
82
 
                        return;
83
 
                }
84
 
                
85
 
                
86
 
        }
87
 
        
88
 
        public class ScreenItemSource : IItemSource
89
 
        {
90
 
                List<IItem> items;
91
 
                
92
 
                public string Name {
93
 
                        get {
94
 
                                return "Window Screen Items";
95
 
                        }
96
 
                }
97
 
 
98
 
                public string Description {
99
 
                        get {
100
 
                                return "Actions you can do to your screens.";
101
 
                        }
102
 
                }
103
 
 
104
 
                public string Icon {
105
 
                        get {
106
 
                                return "desktop"; //fixme
107
 
                        }
108
 
                }
109
 
 
110
 
                public Type[] SupportedItemTypes {
111
 
                        get {
112
 
                                return new Type[] {
113
 
                                        typeof (IScreenItem) };
114
 
                        }
115
 
                }
116
 
 
117
 
                public ICollection<IItem> Items {
118
 
                        get {
119
 
                                items.Add (new ScreenItem ("Current Desktop", 
120
 
                                                           "Everything on the Current Desktop",
121
 
                                                           "desktop"));
122
 
                                
123
 
                                return items;
124
 
                        }
125
 
                }
126
 
 
127
 
                
128
 
                public ScreenItemSource()
129
 
                {
130
 
                        items = new List<IItem> ();
131
 
                }
132
 
 
133
 
                public ICollection<IItem> ChildrenOfItem (IItem item)
134
 
                {
135
 
                        return null;
136
 
                }
137
 
 
138
 
                public void UpdateItems ()
139
 
                {
140
 
                }
141
 
        }
142
 
}