/[circus]/circus/modules/CircusFrame/frame.py
ViewVC logotype

Diff of /circus/modules/CircusFrame/frame.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by tvon, Mon Nov 18 04:04:50 2002 UTC revision 1.2 by tvon, Tue Nov 19 04:30:37 2002 UTC
# Line 23  from Xlib.protocol import event Line 23  from Xlib.protocol import event
23  from circus import module  from circus import module
24    
25  class MyModule(module.Module):  class MyModule(module.Module):
26      """Basic Window Frame class"""      """Test Window Frame class"""
27    
28      #my_actions = {"example_action" : "demo_action"}      my_actions = {
29      #my_events = [X.KeyPress, X.KeyRelease]          "win_move" : "move",
30            "win_toggle_maximize" : "win_toggle_maximize",
31            "win_toggle_shade" : "win_toggle_shade"
32            }
33    
34      def load(self):      def load(self):
35          gc = self.display.allocate_resource_id()          #white_color = self.display.screen().white_pixel
36          win = self.display.screen().root.create_window(100, 100, 200, 200, 10, 16)          #print white_color
37          win.map()          #gc = self.display.screen().root.create_gc()
38            #print gc
39            #self.display.screen().root.fill_rectangle(gc, 200, 200, 200, 200)
40            #self.display.flush()
41            #print self.display.screen().default_colormap.alloc_named_color('#00ff00')
42            for win in self.display.screen().root.query_tree().children:
43                for atom in win.list_properties():
44                    print self.display.get_atom_name(atom)
45                print ""
46                print win.get_wm_hints()
47                print ""
48                print win.get_wm_normal_hints()
49                print ""
50                print win.get_geometry().width
51                window = self.display.screen().root.create_window(
52                    win.get_geometry().x, win.get_geometry().y,
53                    win.get_geometry().width, win.get_geometry().height,
54                    2, self.display.screen().root_depth,
55                    X.InputOutput)
56                window.map()
57                win.reparent(window, 0, 0)
58            #win = self.display.screen().root.create_window(100, 100, 200, 200, 10, 16)
59            #win.map()
60    
61        def move(self, event):
62            win.configure(x = dest_x, y = dest_y)
63            
64      def unload(self):      def unload(self):
65          pass          pass
66    
67      def handle_event(self, event):      def handle_event(self, event):
68          pass          pass
69    
70        def win_toggle_maximize(self, win):
71            pass
72    
73        def win_toggle_shade(self, win):
74            pass
75    
76    
77    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26