Class: X11::Window

Inherits:
Object
  • Object
show all
Defined in:
lib/X11/window.rb

Overview

A simple helper class that makes requests where the target object is a specific window a bit more convenient

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dpy, wid) ⇒ Window

Returns a new instance of Window.



9
10
11
# File 'lib/X11/window.rb', line 9

def initialize(dpy,wid)
  @dpy, @wid = dpy,wid
end

Instance Attribute Details

#dpyObject (readonly)

Returns the value of attribute dpy.



7
8
9
# File 'lib/X11/window.rb', line 7

def dpy
  @dpy
end

#widObject (readonly)

Returns the value of attribute wid.



7
8
9
# File 'lib/X11/window.rb', line 7

def wid
  @wid
end

Class Method Details

.create(dpy) ⇒ Object



13
14
15
16
# File 'lib/X11/window.rb', line 13

def self.create(dpy, ...)
  wid = dpy.create_window(...)
  Window.new(dpy,wid)
end

Instance Method Details

#change_attributesObject



31
# File 'lib/X11/window.rb', line 31

def change_attributes(...)     = dpy.change_window_attributes(@wid,...)

#change_property(mode) ⇒ Object



27
# File 'lib/X11/window.rb', line 27

def change_property(mode, ...) = dpy.change_property(mode, @wid, ...)

#clear_area(arg) ⇒ Object



34
# File 'lib/X11/window.rb', line 34

def clear_area(arg, ...) = dpy.clear_area(arg, @wid, ...)

#configureObject



23
# File 'lib/X11/window.rb', line 23

def configure(...)             = dpy.configure_window(@wid, ...)

#create_gcObject



37
# File 'lib/X11/window.rb', line 37

def create_gc(...) = dpy.create_gc(@wid, ...)

#destroyObject



21
# File 'lib/X11/window.rb', line 21

def destroy                    = dpy.destroy_window(@wid)

#get_geometryObject



22
# File 'lib/X11/window.rb', line 22

def get_geometry               = dpy.get_geometry(@wid)

#get_propertyObject



24
# File 'lib/X11/window.rb', line 24

def get_property(...)          = dpy.get_property(@wid,...)

#get_window_attributesObject



30
# File 'lib/X11/window.rb', line 30

def get_window_attributes(...) = dpy.get_window_attributes(@wid,...)

#grab_button(arg) ⇒ Object



26
# File 'lib/X11/window.rb', line 26

def grab_button(arg,...)       = dpy.grab_button(arg, @wid, ...)

#grab_key(arg) ⇒ Object



25
# File 'lib/X11/window.rb', line 25

def grab_key(arg, ...)         = dpy.grab_key(arg, @wid, ...)

#image_text16Object



33
# File 'lib/X11/window.rb', line 33

def image_text16(...) = dpy.image_text16(@wid, ...)

#mapObject



19
# File 'lib/X11/window.rb', line 19

def map                        = dpy.map_window(@wid)

#poly_fill_rectangleObject



35
# File 'lib/X11/window.rb', line 35

def poly_fill_rectangle(...) = dpy.poly_fill_rectangle(@wid, ...)

#put_image(type) ⇒ Object



36
# File 'lib/X11/window.rb', line 36

def put_image(type, ...) = dpy.put_image(type, @wid, ...)

#query_treeObject



18
# File 'lib/X11/window.rb', line 18

def query_tree                 = dpy.query_tree(@wid)

#select_inputObject



29
# File 'lib/X11/window.rb', line 29

def select_input(...)          = dpy.select_input(@wid,...)

#set_input_focus(mode) ⇒ Object



28
# File 'lib/X11/window.rb', line 28

def set_input_focus(mode)      = dpy.set_input_focus(mode, @wid)

#unmapObject



20
# File 'lib/X11/window.rb', line 20

def unmap                      = dpy.unmap_window(@wid)