Class: Exerb::Win32::Struct::IconResEntry
- Defined in:
- lib/exerb/win32/struct/icon_res_entry.rb
Overview
#
Constant Summary collapse
- FORMAT =
'CCCCSSLS'
Instance Attribute Summary collapse
-
#bit_count ⇒ Object
Returns the value of attribute bit_count.
-
#bytes_in_res ⇒ Object
Returns the value of attribute bytes_in_res.
-
#color_count ⇒ Object
Returns the value of attribute color_count.
-
#height ⇒ Object
Returns the value of attribute height.
-
#image_offset ⇒ Object
Returns the value of attribute image_offset.
-
#planes ⇒ Object
Returns the value of attribute planes.
-
#reserved ⇒ Object
Returns the value of attribute reserved.
-
#width ⇒ Object
Returns the value of attribute width.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize ⇒ IconResEntry
constructor
A new instance of IconResEntry.
- #pack ⇒ Object
- #unpack(bin) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize ⇒ IconResEntry
Returns a new instance of IconResEntry.
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/exerb/win32/struct/icon_res_entry.rb', line 23 def initialize @width = 0 @height = 0 @color_count = 0 @reserved = 0 @planes = 0 @bit_count = 0 @bytes_in_res = 0 @image_offset = 0 end |
Instance Attribute Details
#bit_count ⇒ Object
Returns the value of attribute bit_count.
34 35 36 |
# File 'lib/exerb/win32/struct/icon_res_entry.rb', line 34 def bit_count @bit_count end |
#bytes_in_res ⇒ Object
Returns the value of attribute bytes_in_res.
34 35 36 |
# File 'lib/exerb/win32/struct/icon_res_entry.rb', line 34 def bytes_in_res @bytes_in_res end |
#color_count ⇒ Object
Returns the value of attribute color_count.
34 35 36 |
# File 'lib/exerb/win32/struct/icon_res_entry.rb', line 34 def color_count @color_count end |
#height ⇒ Object
Returns the value of attribute height.
34 35 36 |
# File 'lib/exerb/win32/struct/icon_res_entry.rb', line 34 def height @height end |
#image_offset ⇒ Object
Returns the value of attribute image_offset.
34 35 36 |
# File 'lib/exerb/win32/struct/icon_res_entry.rb', line 34 def image_offset @image_offset end |
#planes ⇒ Object
Returns the value of attribute planes.
34 35 36 |
# File 'lib/exerb/win32/struct/icon_res_entry.rb', line 34 def planes @planes end |
#reserved ⇒ Object
Returns the value of attribute reserved.
34 35 36 |
# File 'lib/exerb/win32/struct/icon_res_entry.rb', line 34 def reserved @reserved end |
#width ⇒ Object
Returns the value of attribute width.
34 35 36 |
# File 'lib/exerb/win32/struct/icon_res_entry.rb', line 34 def width @width end |
Instance Method Details
#pack ⇒ Object
36 37 38 |
# File 'lib/exerb/win32/struct/icon_res_entry.rb', line 36 def pack return [@width, @height, @color_count, @reserved, @planes, @bit_count, @bytes_in_res, @image_offset].pack(FORMAT) end |
#unpack(bin) ⇒ Object
40 41 42 43 |
# File 'lib/exerb/win32/struct/icon_res_entry.rb', line 40 def unpack(bin) @width, @height, @color_count, @reserved, @planes, @bit_count, @bytes_in_res, @image_offset = bin.unpack(FORMAT) return self end |