Class: Win32::WindowManager::Window

Inherits:
Object
  • Object
show all
Defined in:
lib/Win32/WindowManager.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hwnd, style, ex_style, class_name, owner, window_manager) ⇒ Window

Returns a new instance of Window.



38
39
40
41
42
43
44
45
# File 'lib/Win32/WindowManager.rb', line 38

def initialize(hwnd, style, ex_style, class_name, owner, window_manager)
	@hwnd ||= hwnd
	@style ||= style
	@ex_style ||= ex_style
	@class_name ||= class_name
	@owner ||= owner
	@window_manager ||= window_manager
end

Instance Attribute Details

#class_nameObject (readonly)

Returns the value of attribute class_name.



37
38
39
# File 'lib/Win32/WindowManager.rb', line 37

def class_name
  @class_name
end

#ex_styleObject (readonly)

Returns the value of attribute ex_style.



37
38
39
# File 'lib/Win32/WindowManager.rb', line 37

def ex_style
  @ex_style
end

#hwndObject (readonly)

Returns the value of attribute hwnd.



37
38
39
# File 'lib/Win32/WindowManager.rb', line 37

def hwnd
  @hwnd
end

#ownerObject (readonly)

Returns the value of attribute owner.



37
38
39
# File 'lib/Win32/WindowManager.rb', line 37

def owner
  @owner
end

#styleObject (readonly)

Returns the value of attribute style.



37
38
39
# File 'lib/Win32/WindowManager.rb', line 37

def style
  @style
end

Class Method Details

.create(*args) ⇒ Object

create is here to allow another program to change how virtual desktops are created (use an object loaded off of disk instead of a freshly created one



32
33
34
# File 'lib/Win32/WindowManager.rb', line 32

def create(*args)
	Window.new(*args)
end

Instance Method Details

#==(other) ⇒ Object



59
60
61
62
# File 'lib/Win32/WindowManager.rb', line 59

def ==(other)
	return false unless other.kind_of?(self.class)
	return @hwnd == other.hwnd
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


64
65
66
# File 'lib/Win32/WindowManager.rb', line 64

def eql?(other)
	self == other
end

#hashObject



68
69
70
# File 'lib/Win32/WindowManager.rb', line 68

def hash
	@hwnd.hash
end

#hideObject



47
48
49
# File 'lib/Win32/WindowManager.rb', line 47

def hide
	@window_manager.hide_window(@hwnd)
end

#iconic?Boolean

Returns:

  • (Boolean)


55
56
57
# File 'lib/Win32/WindowManager.rb', line 55

def iconic?
	@window_manager.iconic?(@hwnd)
end

#showObject



51
52
53
# File 'lib/Win32/WindowManager.rb', line 51

def show
	@window_manager.show_window(@hwnd, iconic?)
end

#to_sObject



72
73
74
# File 'lib/Win32/WindowManager.rb', line 72

def to_s
	"#{@hwnd}-#{@class_name}"
end