Sha256: b9a688a7a9cf0bee86bbe15a833dd617a1e2899fd4e8c774835238122a6cf21b

Contents?: true

Size: 931 Bytes

Versions: 5

Compression:

Stored size: 931 Bytes

Contents

module Watir
  module Win32
    # this will find the IEDialog.dll file in its build location
    @@iedialog_file = (File.expand_path(File.dirname(__FILE__) + '/..') + "/watir/IEDialog/Release/IEDialog.dll").gsub('/', '\\')

    GetUnknown = Win32API.new(@@iedialog_file, 'GetUnknown', ['l', 'p'], 'v')    
    User32 = DL.dlopen('user32')
    FindWindowEx = User32['FindWindowEx', 'LLLpp']    
    # method for this found in wet-winobj/wet/winobjects/WinUtils.rb
    GetWindow = User32['GetWindow', 'ILL']
    
    ## GetWindows Constants
    GW_HWNDFIRST = 0
    GW_HWNDLAST = 1
    GW_HWNDNEXT = 2
    GW_HWNDPREV = 3
    GW_OWNER = 4
    GW_CHILD = 5
    GW_ENABLEDPOPUP = 6
    GW_MAX = 6

    IsWindow = User32['IsWindow', 'II']
    # Does the window with the specified window handle (hwnd) exist?
    def self.window_exists? hwnd
      rtn, junk = IsWindow[hwnd]
      rtn == 1
    end
  end
end  

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
watir-1.5.3 watir/win32.rb
watir-1.5.4 watir/win32.rb
watir-1.5.5 watir/win32.rb
watir-1.6.2 lib/watir/win32.rb
watir-1.5.6 watir/win32.rb