Class: Fzeet::ClientDC

Inherits:
Handle
  • Object
show all
Includes:
DCMethods
Defined in:
lib/fzeet/Common.rb

Instance Attribute Summary collapse

Attributes inherited from Handle

#handle

Instance Method Summary collapse

Methods included from DCMethods

#color, #color=, #fillRect, #line, #move, #select, #sms, #text

Methods inherited from Handle

#attach, #detach, #dup, instance, instance?, wrap

Constructor Details

#initialize(window) ⇒ ClientDC

Returns a new instance of ClientDC.



323
324
325
# File 'lib/fzeet/Common.rb', line 323

def initialize(window)
	@handle = Windows.DetonateLastError(FFI::Pointer::NULL, :GetDC, (@window = window).handle); attach
end

Instance Attribute Details

#windowObject (readonly)

Returns the value of attribute window.



327
328
329
# File 'lib/fzeet/Common.rb', line 327

def window
  @window
end

Instance Method Details

#disposeObject



329
# File 'lib/fzeet/Common.rb', line 329

def dispose; Windows.ReleaseDC(@window.handle, @handle); detach end