]> git.saurik.com Git - wxWidgets.git/commitdiff
Move HID stuff into both OSX builds. Add preliminary joystick for OSX
authorRyan Norton <wxprojects@comcast.net>
Mon, 14 Feb 2005 09:38:42 +0000 (09:38 +0000)
committerRyan Norton <wxprojects@comcast.net>
Mon, 14 Feb 2005 09:38:42 +0000 (09:38 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

20 files changed:
Makefile.in
aclocal.m4
autoconf_inc.m4
build/bakefiles/files.bkl
build/msw/makefile.bcc
build/msw/makefile.vc
build/msw/makefile.wat
configure
configure.in
include/wx/joystick.h
include/wx/mac/carbon/app.h
include/wx/mac/carbon/private/hid.h [deleted file]
include/wx/mac/corefoundation/hid.h [new file with mode: 0644]
include/wx/mac/corefoundation/joystick.h [new file with mode: 0644]
samples/joytest/joytest.cpp
src/mac/carbon/app.cpp
src/mac/carbon/hid.cpp [deleted file]
src/mac/carbon/joystick.cpp
src/mac/corefoundation/hid.cpp [new file with mode: 0644]
src/mac/corefoundation/hidjoystick.cpp [new file with mode: 0644]

index d09d2ad5742a9d59885083c47b8183f000e4c40f..1d684c184a5ab744068dcaec1b663dd952d31b31 100644 (file)
@@ -58,7 +58,6 @@ EXTRALIBS_ODBC = @EXTRALIBS_ODBC@
 EXTRALIBS_GUI = @EXTRALIBS_GUI@
 EXTRALIBS_OPENGL = @EXTRALIBS_OPENGL@
 EXTRALIBS_SDL = @EXTRALIBS_SDL@
-EXTRALIBS_GNOMEPRINT = @EXTRALIBS_GNOMEPRINT@
 HOST_SUFFIX = @HOST_SUFFIX@
 
 ### Variables: ###
@@ -429,6 +428,7 @@ ALL_BASE_SOURCES =  \
        src/mac/carbon/macnotfy.cpp \
        src/mac/carbon/morefilex/MoreFilesX.c \
        src/mac/corefoundation/cfstring.cpp \
+       src/mac/corefoundation/hid.cpp \
        src/mac/corefoundation/stdpaths_cf.cpp \
        src/os2/dir.cpp \
        src/os2/mimetype.cpp \
@@ -1109,8 +1109,7 @@ LOCALE_LINGUAS = ca cs da de el es fi fr hu id it ja nl pl ru sl sv tr uk zh zh_
 @COND_DEPS_TRACKING_1@CCC = $(top_builddir)./bk-deps $(CC)
 @COND_DEPS_TRACKING_0@CXXC = $(CXX)
 @COND_DEPS_TRACKING_1@CXXC = $(top_builddir)./bk-deps $(CXX)
-@COND_USE_PLUGINS_0@PLUGIN_ADV_EXTRALIBS = \
-@COND_USE_PLUGINS_0@   $(EXTRALIBS_SDL) $(EXTRALIBS_GNOMEPRINT)
+@COND_USE_PLUGINS_0@PLUGIN_ADV_EXTRALIBS = $(EXTRALIBS_SDL)
 @COND_USE_GUI_0@PORTNAME = base
 @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
 @COND_TOOLKIT_MAC@WXBASEPORT = _carbon
@@ -1228,6 +1227,7 @@ COND_TOOLKIT_COCOA_BASE_PLATFORM_HDR =  \
 @COND_TOOLKIT_COCOA@BASE_PLATFORM_HDR = $(COND_TOOLKIT_COCOA_BASE_PLATFORM_HDR)
 COND_TOOLKIT_MAC_BASE_PLATFORM_HDR =  \
        wx/mac/corefoundation/cfstring.h \
+       wx/mac/corefoundation/hid.h \
        wx/mac/corefoundation/stdpaths.h \
        wx/unix/stdpaths.h
 @COND_TOOLKIT_MAC@BASE_PLATFORM_HDR = $(COND_TOOLKIT_MAC_BASE_PLATFORM_HDR)
@@ -1450,6 +1450,7 @@ COND_TOOLKIT_GTK_GUI_HDR =  \
        wx/gtk/fontdlg.h \
        wx/gtk/frame.h \
        wx/gtk/gauge.h \
+       wx/gtk/gnome/gprint.h \
        wx/gtk/listbox.h \
        wx/gtk/mdi.h \
        wx/gtk/menu.h \
@@ -2050,14 +2051,15 @@ COND_TOOLKIT_WINCE_GUI_HDR =  \
        wx/msw/wince/textctrlce.h \
        wx/msw/wince/resources.h
 @COND_TOOLKIT_WINCE@GUI_HDR = $(COND_TOOLKIT_WINCE_GUI_HDR)
-@COND_TOOLKIT_COCOA@ADVANCED_PLATFORM_HDR = wx/cocoa/taskbar.h
+@COND_TOOLKIT_COCOA@ADVANCED_PLATFORM_HDR = \
+@COND_TOOLKIT_COCOA@   wx/cocoa/taskbar.h wx/mac/corefoundation/joystick.h
 @COND_TOOLKIT_GTK@ADVANCED_PLATFORM_HDR = \
 @COND_TOOLKIT_GTK@     wx/unix/joystick.h wx/unix/sound.h wx/unix/taskbarx11.h
 COND_TOOLKIT_MAC_ADVANCED_PLATFORM_HDR =  \
        wx/mac/carbon/drawer.h \
-       wx/mac/carbon/joystick.h \
        wx/mac/carbon/sound.h \
-       wx/mac/carbon/taskbarosx.h
+       wx/mac/carbon/taskbarosx.h \
+       wx/mac/corefoundation/joystick.h
 @COND_TOOLKIT_MAC@ADVANCED_PLATFORM_HDR = $(COND_TOOLKIT_MAC_ADVANCED_PLATFORM_HDR)
 @COND_TOOLKIT_MOTIF@ADVANCED_PLATFORM_HDR = \
 @COND_TOOLKIT_MOTIF@   wx/unix/joystick.h wx/unix/sound.h \
@@ -2467,6 +2469,7 @@ COND_PLATFORM_MACOS_1___BASE_PLATFORM_SRC_OBJECTS =  \
        monodll_macnotfy.o \
        monodll_MoreFilesX.o \
        monodll_cfstring.o \
+       monodll_hid.o \
        monodll_stdpaths_cf.o \
        monodll_DirectoryCopy.o \
        monodll_FSpCompat.o \
@@ -2525,6 +2528,7 @@ COND_TOOLKIT____BASE_MACOSX_SRC_OBJECTS =  \
        monodll_stdpaths.o \
        monodll_threadpsx.o \
        monodll_cfstring.o \
+       monodll_hid.o \
        monodll_stdpaths_cf.o
 @COND_TOOLKIT_@__BASE_MACOSX_SRC_OBJECTS = $(COND_TOOLKIT____BASE_MACOSX_SRC_OBJECTS)
 COND_TOOLKIT_COCOA___BASE_MACOSX_SRC_OBJECTS =  \
@@ -2537,6 +2541,7 @@ COND_TOOLKIT_COCOA___BASE_MACOSX_SRC_OBJECTS =  \
        monodll_stdpaths.o \
        monodll_threadpsx.o \
        monodll_cfstring.o \
+       monodll_hid.o \
        monodll_stdpaths_cf.o
 @COND_TOOLKIT_COCOA@__BASE_MACOSX_SRC_OBJECTS = $(COND_TOOLKIT_COCOA___BASE_MACOSX_SRC_OBJECTS)
 COND_TOOLKIT_GTK___BASE_MACOSX_SRC_OBJECTS =  \
@@ -2549,6 +2554,7 @@ COND_TOOLKIT_GTK___BASE_MACOSX_SRC_OBJECTS =  \
        monodll_stdpaths.o \
        monodll_threadpsx.o \
        monodll_cfstring.o \
+       monodll_hid.o \
        monodll_stdpaths_cf.o
 @COND_TOOLKIT_GTK@__BASE_MACOSX_SRC_OBJECTS = $(COND_TOOLKIT_GTK___BASE_MACOSX_SRC_OBJECTS)
 COND_TOOLKIT_MAC___BASE_MACOSX_SRC_OBJECTS =  \
@@ -2559,6 +2565,7 @@ COND_TOOLKIT_MAC___BASE_MACOSX_SRC_OBJECTS =  \
        monodll_macnotfy.o \
        monodll_MoreFilesX.o \
        monodll_cfstring.o \
+       monodll_hid.o \
        monodll_stdpaths_cf.o \
        monodll_baseunix.o \
        monodll_dlunix.o \
@@ -2574,6 +2581,7 @@ COND_TOOLKIT_MOTIF___BASE_MACOSX_SRC_OBJECTS =  \
        monodll_stdpaths.o \
        monodll_threadpsx.o \
        monodll_cfstring.o \
+       monodll_hid.o \
        monodll_stdpaths_cf.o
 @COND_TOOLKIT_MOTIF@__BASE_MACOSX_SRC_OBJECTS = $(COND_TOOLKIT_MOTIF___BASE_MACOSX_SRC_OBJECTS)
 COND_TOOLKIT_X11___BASE_MACOSX_SRC_OBJECTS =  \
@@ -2586,6 +2594,7 @@ COND_TOOLKIT_X11___BASE_MACOSX_SRC_OBJECTS =  \
        monodll_stdpaths.o \
        monodll_threadpsx.o \
        monodll_cfstring.o \
+       monodll_hid.o \
        monodll_stdpaths_cf.o
 @COND_TOOLKIT_X11@__BASE_MACOSX_SRC_OBJECTS = $(COND_TOOLKIT_X11___BASE_MACOSX_SRC_OBJECTS)
 @COND_PLATFORM_MACOSX_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS \
@@ -3260,6 +3269,7 @@ COND_TOOLKIT_GTK___GUI_SRC_OBJECTS =  \
        monodll_fontdlg.o \
        monodll_frame.o \
        monodll_gauge.o \
+       monodll_gprint.o \
        monodll_listbox.o \
        monodll_mdi.o \
        monodll_menu.o \
@@ -3318,7 +3328,6 @@ COND_TOOLKIT_MAC___GUI_SRC_OBJECTS =  \
        monodll_frame.o \
        monodll_gauge.o \
        monodll_gdiobj.o \
-       monodll_hid.o \
        monodll_icon.o \
        monodll_listbox.o \
        monodll_mdi.o \
@@ -3892,7 +3901,7 @@ COND_WXUNIV_1___ADVANCED_SRC_OBJECTS =  \
 @COND_PLATFORM_UNIX_1@__HTML_SRC_PLATFORM_OBJECTS = monodll_chm.o
 @COND_TOOLKIT_MSW@__HTML_SRC_PLATFORM_OBJECTS = monodll_helpbest.o
 @COND_PLATFORM_UNIX_1_USE_PLUGINS_0@__PLUGIN_ADV_SRC_OBJECTS \
-@COND_PLATFORM_UNIX_1_USE_PLUGINS_0@   = monodll_sound_sdl.o monodll_gprint.o
+@COND_PLATFORM_UNIX_1_USE_PLUGINS_0@   = monodll_sound_sdl.o
 COND_MONOLITHIC_1_SHARED_0___monolib___depname = \
        $(LIBDIRNAME)/$(LIBPREFIX)wx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)$(LIBEXT)
 @COND_MONOLITHIC_1_SHARED_0@__monolib___depname = $(COND_MONOLITHIC_1_SHARED_0___monolib___depname)
@@ -3910,6 +3919,7 @@ COND_PLATFORM_MACOS_1___BASE_PLATFORM_SRC_OBJECTS_1 =  \
        monolib_macnotfy.o \
        monolib_MoreFilesX.o \
        monolib_cfstring.o \
+       monolib_hid.o \
        monolib_stdpaths_cf.o \
        monolib_DirectoryCopy.o \
        monolib_FSpCompat.o \
@@ -3968,6 +3978,7 @@ COND_TOOLKIT____BASE_MACOSX_SRC_OBJECTS_1 =  \
        monolib_stdpaths.o \
        monolib_threadpsx.o \
        monolib_cfstring.o \
+       monolib_hid.o \
        monolib_stdpaths_cf.o
 @COND_TOOLKIT_@__BASE_MACOSX_SRC_OBJECTS_1 = $(COND_TOOLKIT____BASE_MACOSX_SRC_OBJECTS_1)
 COND_TOOLKIT_COCOA___BASE_MACOSX_SRC_OBJECTS_1 =  \
@@ -3980,6 +3991,7 @@ COND_TOOLKIT_COCOA___BASE_MACOSX_SRC_OBJECTS_1 =  \
        monolib_stdpaths.o \
        monolib_threadpsx.o \
        monolib_cfstring.o \
+       monolib_hid.o \
        monolib_stdpaths_cf.o
 @COND_TOOLKIT_COCOA@__BASE_MACOSX_SRC_OBJECTS_1 = $(COND_TOOLKIT_COCOA___BASE_MACOSX_SRC_OBJECTS_1)
 COND_TOOLKIT_GTK___BASE_MACOSX_SRC_OBJECTS_1 =  \
@@ -3992,6 +4004,7 @@ COND_TOOLKIT_GTK___BASE_MACOSX_SRC_OBJECTS_1 =  \
        monolib_stdpaths.o \
        monolib_threadpsx.o \
        monolib_cfstring.o \
+       monolib_hid.o \
        monolib_stdpaths_cf.o
 @COND_TOOLKIT_GTK@__BASE_MACOSX_SRC_OBJECTS_1 = $(COND_TOOLKIT_GTK___BASE_MACOSX_SRC_OBJECTS_1)
 COND_TOOLKIT_MAC___BASE_MACOSX_SRC_OBJECTS_1 =  \
@@ -4002,6 +4015,7 @@ COND_TOOLKIT_MAC___BASE_MACOSX_SRC_OBJECTS_1 =  \
        monolib_macnotfy.o \
        monolib_MoreFilesX.o \
        monolib_cfstring.o \
+       monolib_hid.o \
        monolib_stdpaths_cf.o \
        monolib_baseunix.o \
        monolib_dlunix.o \
@@ -4017,6 +4031,7 @@ COND_TOOLKIT_MOTIF___BASE_MACOSX_SRC_OBJECTS_1 =  \
        monolib_stdpaths.o \
        monolib_threadpsx.o \
        monolib_cfstring.o \
+       monolib_hid.o \
        monolib_stdpaths_cf.o
 @COND_TOOLKIT_MOTIF@__BASE_MACOSX_SRC_OBJECTS_1 = $(COND_TOOLKIT_MOTIF___BASE_MACOSX_SRC_OBJECTS_1)
 COND_TOOLKIT_X11___BASE_MACOSX_SRC_OBJECTS_1 =  \
@@ -4029,6 +4044,7 @@ COND_TOOLKIT_X11___BASE_MACOSX_SRC_OBJECTS_1 =  \
        monolib_stdpaths.o \
        monolib_threadpsx.o \
        monolib_cfstring.o \
+       monolib_hid.o \
        monolib_stdpaths_cf.o
 @COND_TOOLKIT_X11@__BASE_MACOSX_SRC_OBJECTS_1 = $(COND_TOOLKIT_X11___BASE_MACOSX_SRC_OBJECTS_1)
 @COND_PLATFORM_MACOSX_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS_1 \
@@ -4704,6 +4720,7 @@ COND_TOOLKIT_GTK___GUI_SRC_OBJECTS_1 =  \
        monolib_fontdlg.o \
        monolib_frame.o \
        monolib_gauge.o \
+       monolib_gprint.o \
        monolib_listbox.o \
        monolib_mdi.o \
        monolib_menu.o \
@@ -4762,7 +4779,6 @@ COND_TOOLKIT_MAC___GUI_SRC_OBJECTS_1 =  \
        monolib_frame.o \
        monolib_gauge.o \
        monolib_gdiobj.o \
-       monolib_hid.o \
        monolib_icon.o \
        monolib_listbox.o \
        monolib_mdi.o \
@@ -5337,7 +5353,7 @@ COND_WXUNIV_1___ADVANCED_SRC_OBJECTS_1 =  \
 @COND_PLATFORM_UNIX_1@__HTML_SRC_PLATFORM_OBJECTS_1 = monolib_chm.o
 @COND_TOOLKIT_MSW@__HTML_SRC_PLATFORM_OBJECTS_1 = monolib_helpbest.o
 @COND_PLATFORM_UNIX_1_USE_PLUGINS_0@__PLUGIN_ADV_SRC_OBJECTS_1 \
-@COND_PLATFORM_UNIX_1_USE_PLUGINS_0@   = monolib_sound_sdl.o monolib_gprint.o
+@COND_PLATFORM_UNIX_1_USE_PLUGINS_0@   = monolib_sound_sdl.o
 COND_MONOLITHIC_0_SHARED_1___basedll___depname = \
        $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIX)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3)
 @COND_MONOLITHIC_0_SHARED_1@__basedll___depname = $(COND_MONOLITHIC_0_SHARED_1___basedll___depname)
@@ -5390,6 +5406,7 @@ COND_PLATFORM_MACOS_1___BASE_PLATFORM_SRC_OBJECTS_2 =  \
        basedll_macnotfy.o \
        basedll_MoreFilesX.o \
        basedll_cfstring.o \
+       basedll_hid.o \
        basedll_stdpaths_cf.o \
        basedll_DirectoryCopy.o \
        basedll_FSpCompat.o \
@@ -5448,6 +5465,7 @@ COND_TOOLKIT____BASE_MACOSX_SRC_OBJECTS_2 =  \
        basedll_stdpaths.o \
        basedll_threadpsx.o \
        basedll_cfstring.o \
+       basedll_hid.o \
        basedll_stdpaths_cf.o
 @COND_TOOLKIT_@__BASE_MACOSX_SRC_OBJECTS_2 = $(COND_TOOLKIT____BASE_MACOSX_SRC_OBJECTS_2)
 COND_TOOLKIT_COCOA___BASE_MACOSX_SRC_OBJECTS_2 =  \
@@ -5460,6 +5478,7 @@ COND_TOOLKIT_COCOA___BASE_MACOSX_SRC_OBJECTS_2 =  \
        basedll_stdpaths.o \
        basedll_threadpsx.o \
        basedll_cfstring.o \
+       basedll_hid.o \
        basedll_stdpaths_cf.o
 @COND_TOOLKIT_COCOA@__BASE_MACOSX_SRC_OBJECTS_2 = $(COND_TOOLKIT_COCOA___BASE_MACOSX_SRC_OBJECTS_2)
 COND_TOOLKIT_GTK___BASE_MACOSX_SRC_OBJECTS_2 =  \
@@ -5472,6 +5491,7 @@ COND_TOOLKIT_GTK___BASE_MACOSX_SRC_OBJECTS_2 =  \
        basedll_stdpaths.o \
        basedll_threadpsx.o \
        basedll_cfstring.o \
+       basedll_hid.o \
        basedll_stdpaths_cf.o
 @COND_TOOLKIT_GTK@__BASE_MACOSX_SRC_OBJECTS_2 = $(COND_TOOLKIT_GTK___BASE_MACOSX_SRC_OBJECTS_2)
 COND_TOOLKIT_MAC___BASE_MACOSX_SRC_OBJECTS_2 =  \
@@ -5482,6 +5502,7 @@ COND_TOOLKIT_MAC___BASE_MACOSX_SRC_OBJECTS_2 =  \
        basedll_macnotfy.o \
        basedll_MoreFilesX.o \
        basedll_cfstring.o \
+       basedll_hid.o \
        basedll_stdpaths_cf.o \
        basedll_baseunix.o \
        basedll_dlunix.o \
@@ -5497,6 +5518,7 @@ COND_TOOLKIT_MOTIF___BASE_MACOSX_SRC_OBJECTS_2 =  \
        basedll_stdpaths.o \
        basedll_threadpsx.o \
        basedll_cfstring.o \
+       basedll_hid.o \
        basedll_stdpaths_cf.o
 @COND_TOOLKIT_MOTIF@__BASE_MACOSX_SRC_OBJECTS_2 = $(COND_TOOLKIT_MOTIF___BASE_MACOSX_SRC_OBJECTS_2)
 COND_TOOLKIT_X11___BASE_MACOSX_SRC_OBJECTS_2 =  \
@@ -5509,6 +5531,7 @@ COND_TOOLKIT_X11___BASE_MACOSX_SRC_OBJECTS_2 =  \
        basedll_stdpaths.o \
        basedll_threadpsx.o \
        basedll_cfstring.o \
+       basedll_hid.o \
        basedll_stdpaths_cf.o
 @COND_TOOLKIT_X11@__BASE_MACOSX_SRC_OBJECTS_2 = $(COND_TOOLKIT_X11___BASE_MACOSX_SRC_OBJECTS_2)
 @COND_PLATFORM_MACOSX_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS_2 \
@@ -5536,6 +5559,7 @@ COND_PLATFORM_MACOS_1___BASE_PLATFORM_SRC_OBJECTS_3 =  \
        baselib_macnotfy.o \
        baselib_MoreFilesX.o \
        baselib_cfstring.o \
+       baselib_hid.o \
        baselib_stdpaths_cf.o \
        baselib_DirectoryCopy.o \
        baselib_FSpCompat.o \
@@ -5594,6 +5618,7 @@ COND_TOOLKIT____BASE_MACOSX_SRC_OBJECTS_3 =  \
        baselib_stdpaths.o \
        baselib_threadpsx.o \
        baselib_cfstring.o \
+       baselib_hid.o \
        baselib_stdpaths_cf.o
 @COND_TOOLKIT_@__BASE_MACOSX_SRC_OBJECTS_3 = $(COND_TOOLKIT____BASE_MACOSX_SRC_OBJECTS_3)
 COND_TOOLKIT_COCOA___BASE_MACOSX_SRC_OBJECTS_3 =  \
@@ -5606,6 +5631,7 @@ COND_TOOLKIT_COCOA___BASE_MACOSX_SRC_OBJECTS_3 =  \
        baselib_stdpaths.o \
        baselib_threadpsx.o \
        baselib_cfstring.o \
+       baselib_hid.o \
        baselib_stdpaths_cf.o
 @COND_TOOLKIT_COCOA@__BASE_MACOSX_SRC_OBJECTS_3 = $(COND_TOOLKIT_COCOA___BASE_MACOSX_SRC_OBJECTS_3)
 COND_TOOLKIT_GTK___BASE_MACOSX_SRC_OBJECTS_3 =  \
@@ -5618,6 +5644,7 @@ COND_TOOLKIT_GTK___BASE_MACOSX_SRC_OBJECTS_3 =  \
        baselib_stdpaths.o \
        baselib_threadpsx.o \
        baselib_cfstring.o \
+       baselib_hid.o \
        baselib_stdpaths_cf.o
 @COND_TOOLKIT_GTK@__BASE_MACOSX_SRC_OBJECTS_3 = $(COND_TOOLKIT_GTK___BASE_MACOSX_SRC_OBJECTS_3)
 COND_TOOLKIT_MAC___BASE_MACOSX_SRC_OBJECTS_3 =  \
@@ -5628,6 +5655,7 @@ COND_TOOLKIT_MAC___BASE_MACOSX_SRC_OBJECTS_3 =  \
        baselib_macnotfy.o \
        baselib_MoreFilesX.o \
        baselib_cfstring.o \
+       baselib_hid.o \
        baselib_stdpaths_cf.o \
        baselib_baseunix.o \
        baselib_dlunix.o \
@@ -5643,6 +5671,7 @@ COND_TOOLKIT_MOTIF___BASE_MACOSX_SRC_OBJECTS_3 =  \
        baselib_stdpaths.o \
        baselib_threadpsx.o \
        baselib_cfstring.o \
+       baselib_hid.o \
        baselib_stdpaths_cf.o
 @COND_TOOLKIT_MOTIF@__BASE_MACOSX_SRC_OBJECTS_3 = $(COND_TOOLKIT_MOTIF___BASE_MACOSX_SRC_OBJECTS_3)
 COND_TOOLKIT_X11___BASE_MACOSX_SRC_OBJECTS_3 =  \
@@ -5655,6 +5684,7 @@ COND_TOOLKIT_X11___BASE_MACOSX_SRC_OBJECTS_3 =  \
        baselib_stdpaths.o \
        baselib_threadpsx.o \
        baselib_cfstring.o \
+       baselib_hid.o \
        baselib_stdpaths_cf.o
 @COND_TOOLKIT_X11@__BASE_MACOSX_SRC_OBJECTS_3 = $(COND_TOOLKIT_X11___BASE_MACOSX_SRC_OBJECTS_3)
 @COND_PLATFORM_MACOSX_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS_3 \
@@ -6337,6 +6367,7 @@ COND_TOOLKIT_GTK___GUI_SRC_OBJECTS_2 =  \
        coredll_fontdlg.o \
        coredll_frame.o \
        coredll_gauge.o \
+       coredll_gprint.o \
        coredll_listbox.o \
        coredll_mdi.o \
        coredll_menu.o \
@@ -6395,7 +6426,6 @@ COND_TOOLKIT_MAC___GUI_SRC_OBJECTS_2 =  \
        coredll_frame.o \
        coredll_gauge.o \
        coredll_gdiobj.o \
-       coredll_hid.o \
        coredll_icon.o \
        coredll_listbox.o \
        coredll_mdi.o \
@@ -7529,6 +7559,7 @@ COND_TOOLKIT_GTK___GUI_SRC_OBJECTS_3 =  \
        corelib_fontdlg.o \
        corelib_frame.o \
        corelib_gauge.o \
+       corelib_gprint.o \
        corelib_listbox.o \
        corelib_mdi.o \
        corelib_menu.o \
@@ -7587,7 +7618,6 @@ COND_TOOLKIT_MAC___GUI_SRC_OBJECTS_3 =  \
        corelib_frame.o \
        corelib_gauge.o \
        corelib_gdiobj.o \
-       corelib_hid.o \
        corelib_icon.o \
        corelib_listbox.o \
        corelib_mdi.o \
@@ -8179,7 +8209,7 @@ COND_WXUNIV_1___ADVANCED_SRC_OBJECTS_2 =  \
 @COND_TOOLKIT_MSW@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_2 \
 @COND_TOOLKIT_MSW@     = advdll_datectrl.o
 @COND_PLATFORM_UNIX_1_USE_PLUGINS_0@__PLUGIN_ADV_SRC_OBJECTS_2 \
-@COND_PLATFORM_UNIX_1_USE_PLUGINS_0@   = advdll_sound_sdl.o advdll_gprint.o
+@COND_PLATFORM_UNIX_1_USE_PLUGINS_0@   = advdll_sound_sdl.o
 COND_MONOLITHIC_0_SHARED_0_USE_GUI_1___advlib___depname = \
        $(LIBDIRNAME)/$(LIBPREFIX)wx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv-$(WX_RELEASE)$(HOST_SUFFIX)$(LIBEXT)
 @COND_MONOLITHIC_0_SHARED_0_USE_GUI_1@__advlib___depname = $(COND_MONOLITHIC_0_SHARED_0_USE_GUI_1___advlib___depname)
@@ -8220,7 +8250,7 @@ COND_WXUNIV_1___ADVANCED_SRC_OBJECTS_3 =  \
 @COND_TOOLKIT_MSW@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_3 \
 @COND_TOOLKIT_MSW@     = advlib_datectrl.o
 @COND_PLATFORM_UNIX_1_USE_PLUGINS_0@__PLUGIN_ADV_SRC_OBJECTS_3 \
-@COND_PLATFORM_UNIX_1_USE_PLUGINS_0@   = advlib_sound_sdl.o advlib_gprint.o
+@COND_PLATFORM_UNIX_1_USE_PLUGINS_0@   = advlib_sound_sdl.o
 COND_MONOLITHIC_0_SHARED_1_USE_GUI_1___mediadll___depname = \
        $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3)
 @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1@__mediadll___depname = $(COND_MONOLITHIC_0_SHARED_1_USE_GUI_1___mediadll___depname)
@@ -8549,7 +8579,8 @@ COND_WITH_PLUGIN_SDL_1___sound_sdl___depname = \
 @COND_PLATFORM_MACOSX_1@__MAC_LOWLEVEL_SRC_OBJECTS \
 @COND_PLATFORM_MACOSX_1@       = monodll_gsockosx.o monodll_utilsexc_cf.o
 @COND_TOOLKIT_COCOA@__ADVANCED_PLATFORM_SRC_OBJECTS = \
-@COND_TOOLKIT_COCOA@   monodll_taskbar.o monodll_taskbarcmn.o
+@COND_TOOLKIT_COCOA@   monodll_taskbar.o monodll_taskbarcmn.o \
+@COND_TOOLKIT_COCOA@   monodll_hidjoystick.o
 COND_TOOLKIT_GTK___ADVANCED_PLATFORM_SRC_OBJECTS =  \
        monodll_taskbarcmn.o \
        monodll_joystick.o \
@@ -8561,9 +8592,9 @@ COND_TOOLKIT_GTK___ADVANCED_PLATFORM_SRC_OBJECTS =  \
 COND_TOOLKIT_MAC___ADVANCED_PLATFORM_SRC_OBJECTS =  \
        monodll_taskbarcmn.o \
        monodll_drawer.o \
-       monodll_joystick.o \
        monodll_sound.o \
-       monodll_taskbar.o
+       monodll_taskbar.o \
+       monodll_hidjoystick.o
 @COND_TOOLKIT_MAC@__ADVANCED_PLATFORM_SRC_OBJECTS = $(COND_TOOLKIT_MAC___ADVANCED_PLATFORM_SRC_OBJECTS)
 COND_TOOLKIT_MOTIF___ADVANCED_PLATFORM_SRC_OBJECTS =  \
        monodll_taskbarcmn.o \
@@ -8587,7 +8618,8 @@ COND_TOOLKIT_X11___ADVANCED_PLATFORM_SRC_OBJECTS =  \
 @COND_PLATFORM_MACOSX_1@__MAC_LOWLEVEL_SRC_OBJECTS_0 \
 @COND_PLATFORM_MACOSX_1@       = monolib_gsockosx.o monolib_utilsexc_cf.o
 @COND_TOOLKIT_COCOA@__ADVANCED_PLATFORM_SRC_OBJECTS_0 = \
-@COND_TOOLKIT_COCOA@   monolib_taskbar.o monolib_taskbarcmn.o
+@COND_TOOLKIT_COCOA@   monolib_taskbar.o monolib_taskbarcmn.o \
+@COND_TOOLKIT_COCOA@   monolib_hidjoystick.o
 COND_TOOLKIT_GTK___ADVANCED_PLATFORM_SRC_OBJECTS_0 =  \
        monolib_taskbarcmn.o \
        monolib_joystick.o \
@@ -8599,9 +8631,9 @@ COND_TOOLKIT_GTK___ADVANCED_PLATFORM_SRC_OBJECTS_0 =  \
 COND_TOOLKIT_MAC___ADVANCED_PLATFORM_SRC_OBJECTS_0 =  \
        monolib_taskbarcmn.o \
        monolib_drawer.o \
-       monolib_joystick.o \
        monolib_sound.o \
-       monolib_taskbar.o
+       monolib_taskbar.o \
+       monolib_hidjoystick.o
 @COND_TOOLKIT_MAC@__ADVANCED_PLATFORM_SRC_OBJECTS_0 = $(COND_TOOLKIT_MAC___ADVANCED_PLATFORM_SRC_OBJECTS_0)
 COND_TOOLKIT_MOTIF___ADVANCED_PLATFORM_SRC_OBJECTS_0 =  \
        monolib_taskbarcmn.o \
@@ -8630,7 +8662,8 @@ COND_TOOLKIT_X11___ADVANCED_PLATFORM_SRC_OBJECTS_0 =  \
 @COND_PLATFORM_MACOSX_1@__MAC_LOWLEVEL_SRC_OBJECTS_9 \
 @COND_PLATFORM_MACOSX_1@       = corelib_gsockosx.o corelib_utilsexc_cf.o
 @COND_TOOLKIT_COCOA@__ADVANCED_PLATFORM_SRC_OBJECTS_8 = \
-@COND_TOOLKIT_COCOA@   advdll_taskbar.o advdll_taskbarcmn.o
+@COND_TOOLKIT_COCOA@   advdll_taskbar.o advdll_taskbarcmn.o \
+@COND_TOOLKIT_COCOA@   advdll_hidjoystick.o
 COND_TOOLKIT_GTK___ADVANCED_PLATFORM_SRC_OBJECTS_8 =  \
        advdll_taskbarcmn.o \
        advdll_joystick.o \
@@ -8642,9 +8675,9 @@ COND_TOOLKIT_GTK___ADVANCED_PLATFORM_SRC_OBJECTS_8 =  \
 COND_TOOLKIT_MAC___ADVANCED_PLATFORM_SRC_OBJECTS_8 =  \
        advdll_taskbarcmn.o \
        advdll_drawer.o \
-       advdll_joystick.o \
        advdll_sound.o \
-       advdll_taskbar.o
+       advdll_taskbar.o \
+       advdll_hidjoystick.o
 @COND_TOOLKIT_MAC@__ADVANCED_PLATFORM_SRC_OBJECTS_8 = $(COND_TOOLKIT_MAC___ADVANCED_PLATFORM_SRC_OBJECTS_8)
 @COND_TOOLKIT_MOTIF@__ADVANCED_PLATFORM_SRC_OBJECTS_8 = \
 @COND_TOOLKIT_MOTIF@   advdll_taskbarcmn.o advdll_joystick.o advdll_sound.o \
@@ -8660,7 +8693,8 @@ COND_TOOLKIT_MAC___ADVANCED_PLATFORM_SRC_OBJECTS_8 =  \
 @COND_TOOLKIT_X11@     advdll_taskbarcmn.o advdll_joystick.o advdll_sound.o \
 @COND_TOOLKIT_X11@     advdll_taskbarx11.o
 @COND_TOOLKIT_COCOA@__ADVANCED_PLATFORM_SRC_OBJECTS_9 = \
-@COND_TOOLKIT_COCOA@   advlib_taskbar.o advlib_taskbarcmn.o
+@COND_TOOLKIT_COCOA@   advlib_taskbar.o advlib_taskbarcmn.o \
+@COND_TOOLKIT_COCOA@   advlib_hidjoystick.o
 COND_TOOLKIT_GTK___ADVANCED_PLATFORM_SRC_OBJECTS_9 =  \
        advlib_taskbarcmn.o \
        advlib_joystick.o \
@@ -8672,9 +8706,9 @@ COND_TOOLKIT_GTK___ADVANCED_PLATFORM_SRC_OBJECTS_9 =  \
 COND_TOOLKIT_MAC___ADVANCED_PLATFORM_SRC_OBJECTS_9 =  \
        advlib_taskbarcmn.o \
        advlib_drawer.o \
-       advlib_joystick.o \
        advlib_sound.o \
-       advlib_taskbar.o
+       advlib_taskbar.o \
+       advlib_hidjoystick.o
 @COND_TOOLKIT_MAC@__ADVANCED_PLATFORM_SRC_OBJECTS_9 = $(COND_TOOLKIT_MAC___ADVANCED_PLATFORM_SRC_OBJECTS_9)
 @COND_TOOLKIT_MOTIF@__ADVANCED_PLATFORM_SRC_OBJECTS_9 = \
 @COND_TOOLKIT_MOTIF@   advlib_taskbarcmn.o advlib_joystick.o advlib_sound.o \
@@ -9946,6 +9980,9 @@ monodll_net.o: $(srcdir)/src/msw/wince/net.cpp $(MONODLL_ODEP)
 monodll_artgtk.o: $(srcdir)/src/gtk/artgtk.cpp $(MONODLL_ODEP)
        $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/gtk/artgtk.cpp
 
+monodll_gprint.o: $(srcdir)/src/gtk/gnome/gprint.cpp $(MONODLL_ODEP)
+       $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/gtk/gnome/gprint.cpp
+
 monodll_scrolwin.o: $(srcdir)/src/gtk/scrolwin.cpp $(MONODLL_ODEP)
        $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/gtk/scrolwin.cpp
 
@@ -9997,9 +10034,6 @@ monodll_aga.o: $(srcdir)/src/mac/carbon/aga.cpp $(MONODLL_ODEP)
 monodll_dccg.o: $(srcdir)/src/mac/carbon/dccg.cpp $(MONODLL_ODEP)
        $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/carbon/dccg.cpp
 
-monodll_hid.o: $(srcdir)/src/mac/carbon/hid.cpp $(MONODLL_ODEP)
-       $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/carbon/hid.cpp
-
 monodll_notebmac.o: $(srcdir)/src/mac/carbon/notebmac.cpp $(MONODLL_ODEP)
        $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/carbon/notebmac.cpp
 
@@ -10324,9 +10358,6 @@ monodll_xtixml.o: $(srcdir)/src/common/xtixml.cpp $(MONODLL_ODEP)
 monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP)
        $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/unix/sound_sdl.cpp
 
-monodll_gprint.o: $(srcdir)/src/gtk/gnome/gprint.cpp $(MONODLL_ODEP)
-       $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/gtk/gnome/gprint.cpp
-
 @COND_PLATFORM_UNIX_1@monodll_baseunix.o: $(srcdir)/src/unix/baseunix.cpp $(MONODLL_ODEP)
 @COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/unix/baseunix.cpp
 
@@ -10600,6 +10631,27 @@ monodll_gprint.o: $(srcdir)/src/gtk/gnome/gprint.cpp $(MONODLL_ODEP)
 @COND_PLATFORM_MACOS_1@monodll_cfstring.o: $(srcdir)/src/mac/corefoundation/cfstring.cpp $(MONODLL_ODEP)
 @COND_PLATFORM_MACOS_1@        $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/cfstring.cpp
 
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@monodll_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@   $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@monodll_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@monodll_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@   $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@monodll_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@   $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@monodll_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@monodll_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@      $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOS_1@monodll_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_MACOS_1@        $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
 @COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@monodll_stdpaths_cf.o: $(srcdir)/src/mac/corefoundation/stdpaths_cf.cpp $(MONODLL_ODEP)
 @COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@   $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/stdpaths_cf.cpp
 
@@ -13015,9 +13067,6 @@ monodll_gprint.o: $(srcdir)/src/gtk/gnome/gprint.cpp $(MONODLL_ODEP)
 @COND_TOOLKIT_MSW_USE_GUI_1@monodll_joystick.o: $(srcdir)/src/msw/joystick.cpp $(MONODLL_ODEP)
 @COND_TOOLKIT_MSW_USE_GUI_1@   $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/joystick.cpp
 
-@COND_TOOLKIT_MAC_USE_GUI_1@monodll_joystick.o: $(srcdir)/src/mac/carbon/joystick.cpp $(MONODLL_ODEP)
-@COND_TOOLKIT_MAC_USE_GUI_1@   $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/carbon/joystick.cpp
-
 @COND_TOOLKIT_MOTIF_USE_GUI_1@monodll_joystick.o: $(srcdir)/src/unix/joystick.cpp $(MONODLL_ODEP)
 @COND_TOOLKIT_MOTIF_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/unix/joystick.cpp
 
@@ -13030,6 +13079,12 @@ monodll_gprint.o: $(srcdir)/src/gtk/gnome/gprint.cpp $(MONODLL_ODEP)
 @COND_TOOLKIT_PM_USE_GUI_1@monodll_joystick.o: $(srcdir)/src/os2/joystick.cpp $(MONODLL_ODEP)
 @COND_TOOLKIT_PM_USE_GUI_1@    $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/os2/joystick.cpp
 
+@COND_TOOLKIT_MAC_USE_GUI_1@monodll_hidjoystick.o: $(srcdir)/src/mac/corefoundation/hidjoystick.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_MAC_USE_GUI_1@   $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hidjoystick.cpp
+
+@COND_TOOLKIT_COCOA_USE_GUI_1@monodll_hidjoystick.o: $(srcdir)/src/mac/corefoundation/hidjoystick.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hidjoystick.cpp
+
 @COND_TOOLKIT_MOTIF_USE_GUI_1@monodll_taskbarx11.o: $(srcdir)/src/unix/taskbarx11.cpp $(MONODLL_ODEP)
 @COND_TOOLKIT_MOTIF_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/unix/taskbarx11.cpp
 
@@ -13345,6 +13400,9 @@ monolib_net.o: $(srcdir)/src/msw/wince/net.cpp $(MONOLIB_ODEP)
 monolib_artgtk.o: $(srcdir)/src/gtk/artgtk.cpp $(MONOLIB_ODEP)
        $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/gtk/artgtk.cpp
 
+monolib_gprint.o: $(srcdir)/src/gtk/gnome/gprint.cpp $(MONOLIB_ODEP)
+       $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/gtk/gnome/gprint.cpp
+
 monolib_scrolwin.o: $(srcdir)/src/gtk/scrolwin.cpp $(MONOLIB_ODEP)
        $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/gtk/scrolwin.cpp
 
@@ -13396,9 +13454,6 @@ monolib_aga.o: $(srcdir)/src/mac/carbon/aga.cpp $(MONOLIB_ODEP)
 monolib_dccg.o: $(srcdir)/src/mac/carbon/dccg.cpp $(MONOLIB_ODEP)
        $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/carbon/dccg.cpp
 
-monolib_hid.o: $(srcdir)/src/mac/carbon/hid.cpp $(MONOLIB_ODEP)
-       $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/carbon/hid.cpp
-
 monolib_notebmac.o: $(srcdir)/src/mac/carbon/notebmac.cpp $(MONOLIB_ODEP)
        $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/carbon/notebmac.cpp
 
@@ -13723,9 +13778,6 @@ monolib_xtixml.o: $(srcdir)/src/common/xtixml.cpp $(MONOLIB_ODEP)
 monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP)
        $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/unix/sound_sdl.cpp
 
-monolib_gprint.o: $(srcdir)/src/gtk/gnome/gprint.cpp $(MONOLIB_ODEP)
-       $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/gtk/gnome/gprint.cpp
-
 @COND_PLATFORM_UNIX_1@monolib_baseunix.o: $(srcdir)/src/unix/baseunix.cpp $(MONOLIB_ODEP)
 @COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/unix/baseunix.cpp
 
@@ -13999,6 +14051,27 @@ monolib_gprint.o: $(srcdir)/src/gtk/gnome/gprint.cpp $(MONOLIB_ODEP)
 @COND_PLATFORM_MACOS_1@monolib_cfstring.o: $(srcdir)/src/mac/corefoundation/cfstring.cpp $(MONOLIB_ODEP)
 @COND_PLATFORM_MACOS_1@        $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/cfstring.cpp
 
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@monolib_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@   $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@monolib_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@monolib_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@   $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@monolib_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@   $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@monolib_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@monolib_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@      $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOS_1@monolib_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_MACOS_1@        $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
 @COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@monolib_stdpaths_cf.o: $(srcdir)/src/mac/corefoundation/stdpaths_cf.cpp $(MONOLIB_ODEP)
 @COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@   $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/stdpaths_cf.cpp
 
@@ -16414,9 +16487,6 @@ monolib_gprint.o: $(srcdir)/src/gtk/gnome/gprint.cpp $(MONOLIB_ODEP)
 @COND_TOOLKIT_MSW_USE_GUI_1@monolib_joystick.o: $(srcdir)/src/msw/joystick.cpp $(MONOLIB_ODEP)
 @COND_TOOLKIT_MSW_USE_GUI_1@   $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/joystick.cpp
 
-@COND_TOOLKIT_MAC_USE_GUI_1@monolib_joystick.o: $(srcdir)/src/mac/carbon/joystick.cpp $(MONOLIB_ODEP)
-@COND_TOOLKIT_MAC_USE_GUI_1@   $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/carbon/joystick.cpp
-
 @COND_TOOLKIT_MOTIF_USE_GUI_1@monolib_joystick.o: $(srcdir)/src/unix/joystick.cpp $(MONOLIB_ODEP)
 @COND_TOOLKIT_MOTIF_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/unix/joystick.cpp
 
@@ -16429,6 +16499,12 @@ monolib_gprint.o: $(srcdir)/src/gtk/gnome/gprint.cpp $(MONOLIB_ODEP)
 @COND_TOOLKIT_PM_USE_GUI_1@monolib_joystick.o: $(srcdir)/src/os2/joystick.cpp $(MONOLIB_ODEP)
 @COND_TOOLKIT_PM_USE_GUI_1@    $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/os2/joystick.cpp
 
+@COND_TOOLKIT_MAC_USE_GUI_1@monolib_hidjoystick.o: $(srcdir)/src/mac/corefoundation/hidjoystick.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_MAC_USE_GUI_1@   $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hidjoystick.cpp
+
+@COND_TOOLKIT_COCOA_USE_GUI_1@monolib_hidjoystick.o: $(srcdir)/src/mac/corefoundation/hidjoystick.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hidjoystick.cpp
+
 @COND_TOOLKIT_MOTIF_USE_GUI_1@monolib_taskbarx11.o: $(srcdir)/src/unix/taskbarx11.cpp $(MONOLIB_ODEP)
 @COND_TOOLKIT_MOTIF_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/unix/taskbarx11.cpp
 
@@ -16963,6 +17039,27 @@ basedll_uma.o: $(srcdir)/src/mac/carbon/uma.cpp $(BASEDLL_ODEP)
 @COND_PLATFORM_MACOS_1@basedll_cfstring.o: $(srcdir)/src/mac/corefoundation/cfstring.cpp $(BASEDLL_ODEP)
 @COND_PLATFORM_MACOS_1@        $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/cfstring.cpp
 
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@basedll_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(BASEDLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@   $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@basedll_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(BASEDLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@basedll_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(BASEDLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@   $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@basedll_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(BASEDLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@   $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@basedll_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(BASEDLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@basedll_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(BASEDLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@      $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOS_1@basedll_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(BASEDLL_ODEP)
+@COND_PLATFORM_MACOS_1@        $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
 @COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@basedll_stdpaths_cf.o: $(srcdir)/src/mac/corefoundation/stdpaths_cf.cpp $(BASEDLL_ODEP)
 @COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@   $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/stdpaths_cf.cpp
 
@@ -17485,6 +17582,27 @@ baselib_uma.o: $(srcdir)/src/mac/carbon/uma.cpp $(BASELIB_ODEP)
 @COND_PLATFORM_MACOS_1@baselib_cfstring.o: $(srcdir)/src/mac/corefoundation/cfstring.cpp $(BASELIB_ODEP)
 @COND_PLATFORM_MACOS_1@        $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/cfstring.cpp
 
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@baselib_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(BASELIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@   $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@baselib_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(BASELIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@baselib_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(BASELIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@   $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@baselib_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(BASELIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@   $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@baselib_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(BASELIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@baselib_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(BASELIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@      $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
+@COND_PLATFORM_MACOS_1@baselib_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(BASELIB_ODEP)
+@COND_PLATFORM_MACOS_1@        $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
+
 @COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@baselib_stdpaths_cf.o: $(srcdir)/src/mac/corefoundation/stdpaths_cf.cpp $(BASELIB_ODEP)
 @COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@   $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/stdpaths_cf.cpp
 
@@ -17638,6 +17756,9 @@ coredll_uma.o: $(srcdir)/src/mac/carbon/uma.cpp $(COREDLL_ODEP)
 coredll_artgtk.o: $(srcdir)/src/gtk/artgtk.cpp $(COREDLL_ODEP)
        $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/gtk/artgtk.cpp
 
+coredll_gprint.o: $(srcdir)/src/gtk/gnome/gprint.cpp $(COREDLL_ODEP)
+       $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/gtk/gnome/gprint.cpp
+
 coredll_scrolwin.o: $(srcdir)/src/gtk/scrolwin.cpp $(COREDLL_ODEP)
        $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/gtk/scrolwin.cpp
 
@@ -17689,9 +17810,6 @@ coredll_aga.o: $(srcdir)/src/mac/carbon/aga.cpp $(COREDLL_ODEP)
 coredll_dccg.o: $(srcdir)/src/mac/carbon/dccg.cpp $(COREDLL_ODEP)
        $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/mac/carbon/dccg.cpp
 
-coredll_hid.o: $(srcdir)/src/mac/carbon/hid.cpp $(COREDLL_ODEP)
-       $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/mac/carbon/hid.cpp
-
 coredll_notebmac.o: $(srcdir)/src/mac/carbon/notebmac.cpp $(COREDLL_ODEP)
        $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/mac/carbon/notebmac.cpp
 
@@ -20134,6 +20252,9 @@ corelib_uma.o: $(srcdir)/src/mac/carbon/uma.cpp $(CORELIB_ODEP)
 corelib_artgtk.o: $(srcdir)/src/gtk/artgtk.cpp $(CORELIB_ODEP)
        $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/gtk/artgtk.cpp
 
+corelib_gprint.o: $(srcdir)/src/gtk/gnome/gprint.cpp $(CORELIB_ODEP)
+       $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/gtk/gnome/gprint.cpp
+
 corelib_scrolwin.o: $(srcdir)/src/gtk/scrolwin.cpp $(CORELIB_ODEP)
        $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/gtk/scrolwin.cpp
 
@@ -20185,9 +20306,6 @@ corelib_aga.o: $(srcdir)/src/mac/carbon/aga.cpp $(CORELIB_ODEP)
 corelib_dccg.o: $(srcdir)/src/mac/carbon/dccg.cpp $(CORELIB_ODEP)
        $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/mac/carbon/dccg.cpp
 
-corelib_hid.o: $(srcdir)/src/mac/carbon/hid.cpp $(CORELIB_ODEP)
-       $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/mac/carbon/hid.cpp
-
 corelib_notebmac.o: $(srcdir)/src/mac/carbon/notebmac.cpp $(CORELIB_ODEP)
        $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/mac/carbon/notebmac.cpp
 
@@ -22612,9 +22730,6 @@ advdll_datectrl.o: $(srcdir)/src/msw/datectrl.cpp $(ADVDLL_ODEP)
 advdll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(ADVDLL_ODEP)
        $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/unix/sound_sdl.cpp
 
-advdll_gprint.o: $(srcdir)/src/gtk/gnome/gprint.cpp $(ADVDLL_ODEP)
-       $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/gtk/gnome/gprint.cpp
-
 advdll_calctrl.o: $(srcdir)/src/generic/calctrl.cpp $(ADVDLL_ODEP)
        $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/generic/calctrl.cpp
 
@@ -22708,9 +22823,6 @@ advdll_wizard.o: $(srcdir)/src/generic/wizard.cpp $(ADVDLL_ODEP)
 @COND_TOOLKIT_MSW@advdll_joystick.o: $(srcdir)/src/msw/joystick.cpp $(ADVDLL_ODEP)
 @COND_TOOLKIT_MSW@     $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/msw/joystick.cpp
 
-@COND_TOOLKIT_MAC@advdll_joystick.o: $(srcdir)/src/mac/carbon/joystick.cpp $(ADVDLL_ODEP)
-@COND_TOOLKIT_MAC@     $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/mac/carbon/joystick.cpp
-
 @COND_TOOLKIT_MOTIF@advdll_joystick.o: $(srcdir)/src/unix/joystick.cpp $(ADVDLL_ODEP)
 @COND_TOOLKIT_MOTIF@   $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/unix/joystick.cpp
 
@@ -22726,6 +22838,12 @@ advdll_wizard.o: $(srcdir)/src/generic/wizard.cpp $(ADVDLL_ODEP)
 @COND_TOOLKIT_MAC@advdll_drawer.o: $(srcdir)/src/mac/carbon/drawer.cpp $(ADVDLL_ODEP)
 @COND_TOOLKIT_MAC@     $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/mac/carbon/drawer.cpp
 
+@COND_TOOLKIT_MAC@advdll_hidjoystick.o: $(srcdir)/src/mac/corefoundation/hidjoystick.cpp $(ADVDLL_ODEP)
+@COND_TOOLKIT_MAC@     $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hidjoystick.cpp
+
+@COND_TOOLKIT_COCOA@advdll_hidjoystick.o: $(srcdir)/src/mac/corefoundation/hidjoystick.cpp $(ADVDLL_ODEP)
+@COND_TOOLKIT_COCOA@   $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hidjoystick.cpp
+
 @COND_TOOLKIT_MOTIF@advdll_taskbarx11.o: $(srcdir)/src/unix/taskbarx11.cpp $(ADVDLL_ODEP)
 @COND_TOOLKIT_MOTIF@   $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/unix/taskbarx11.cpp
 
@@ -22744,9 +22862,6 @@ advlib_datectrl.o: $(srcdir)/src/msw/datectrl.cpp $(ADVLIB_ODEP)
 advlib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(ADVLIB_ODEP)
        $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/unix/sound_sdl.cpp
 
-advlib_gprint.o: $(srcdir)/src/gtk/gnome/gprint.cpp $(ADVLIB_ODEP)
-       $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/gtk/gnome/gprint.cpp
-
 advlib_calctrl.o: $(srcdir)/src/generic/calctrl.cpp $(ADVLIB_ODEP)
        $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/generic/calctrl.cpp
 
@@ -22840,9 +22955,6 @@ advlib_wizard.o: $(srcdir)/src/generic/wizard.cpp $(ADVLIB_ODEP)
 @COND_TOOLKIT_MSW@advlib_joystick.o: $(srcdir)/src/msw/joystick.cpp $(ADVLIB_ODEP)
 @COND_TOOLKIT_MSW@     $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/msw/joystick.cpp
 
-@COND_TOOLKIT_MAC@advlib_joystick.o: $(srcdir)/src/mac/carbon/joystick.cpp $(ADVLIB_ODEP)
-@COND_TOOLKIT_MAC@     $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/mac/carbon/joystick.cpp
-
 @COND_TOOLKIT_MOTIF@advlib_joystick.o: $(srcdir)/src/unix/joystick.cpp $(ADVLIB_ODEP)
 @COND_TOOLKIT_MOTIF@   $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/unix/joystick.cpp
 
@@ -22858,6 +22970,12 @@ advlib_wizard.o: $(srcdir)/src/generic/wizard.cpp $(ADVLIB_ODEP)
 @COND_TOOLKIT_MAC@advlib_drawer.o: $(srcdir)/src/mac/carbon/drawer.cpp $(ADVLIB_ODEP)
 @COND_TOOLKIT_MAC@     $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/mac/carbon/drawer.cpp
 
+@COND_TOOLKIT_MAC@advlib_hidjoystick.o: $(srcdir)/src/mac/corefoundation/hidjoystick.cpp $(ADVLIB_ODEP)
+@COND_TOOLKIT_MAC@     $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hidjoystick.cpp
+
+@COND_TOOLKIT_COCOA@advlib_hidjoystick.o: $(srcdir)/src/mac/corefoundation/hidjoystick.cpp $(ADVLIB_ODEP)
+@COND_TOOLKIT_COCOA@   $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hidjoystick.cpp
+
 @COND_TOOLKIT_MOTIF@advlib_taskbarx11.o: $(srcdir)/src/unix/taskbarx11.cpp $(ADVLIB_ODEP)
 @COND_TOOLKIT_MOTIF@   $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/unix/taskbarx11.cpp
 
index 646ec9555160dd49b840cd907ac2af56635ded2d..310fb0910599dc5d8e849ec4d11cc4251f0b79c4 100644 (file)
@@ -1340,7 +1340,7 @@ AC_DEFUN([AC_BAKEFILE],
     AC_BAKEFILE_DEPS
     AC_BAKEFILE_RES_COMPILERS
 
-    BAKEFILE_BAKEFILE_M4_VERSION="0.1.7"
+    BAKEFILE_BAKEFILE_M4_VERSION="0.1.6"
    
     dnl includes autoconf_inc.m4:
     $1
index eb4bbd83ea12be0e56af29b82bbe4638aff7ccd7..2564dcef7bc0b7a99bd15ac0e0755ad4f8ffba76 100644 (file)
@@ -1,10 +1,10 @@
 dnl ### begin block 00_header[../../contrib/build/animate/animate.bkl,../../contrib/build/deprecated/deprecated.bkl,../../contrib/build/fl/fl.bkl,../../contrib/build/foldbar/foldbar.bkl,../../contrib/build/gizmos/gizmos.bkl,../../contrib/build/mmedia/mmedia.bkl,../../contrib/build/net/net.bkl,../../contrib/build/ogl/ogl.bkl,../../contrib/build/plot/plot.bkl,../../contrib/build/stc/stc.bkl,../../contrib/build/svg/svg.bkl,../../contrib/samples/animate/anitest.bkl,../../contrib/samples/deprecated/proplist/proplist.bkl,../../contrib/samples/deprecated/resource/resource.bkl,../../contrib/samples/deprecated/treelay/treelay.bkl,../../contrib/samples/fl/fl.bkl,../../contrib/samples/foldbar/foldpanelbar/foldtest.bkl,../../contrib/samples/gizmos/dynsash/dynsash.bkl,../../contrib/samples/gizmos/dynsash_switch/dynsash_switch.bkl,../../contrib/samples/gizmos/editlbox/editlbox.bkl,../../contrib/samples/gizmos/led/led.bkl,../../contrib/samples/gizmos/multicell/multicell.bkl,../../contrib/samples/gizmos/splittree/splittree.bkl,../../contrib/samples/mmedia/mmboard.bkl,../../contrib/samples/ogl/ogledit/ogledit.bkl,../../contrib/samples/ogl/studio/studio.bkl,../../contrib/samples/plot/plot.bkl,../../contrib/samples/stc/stctest.bkl,../../contrib/samples/svg/svgtest.bkl,../../contrib/utils/convertrc/convertrc.bkl,../../contrib/utils/wxrcedit/wxrcedit.bkl,../../demos/bombs/bombs.bkl,../../demos/dbbrowse/dbbrowse.bkl,../../demos/demos.bkl,../../demos/forty/forty.bkl,../../demos/fractal/fractal.bkl,../../demos/life/life.bkl,../../demos/poem/poem.bkl,../../samples/access/access.bkl,../../samples/advtip/advtip.bkl,../../samples/artprov/artprov.bkl,../../samples/calendar/calendar.bkl,../../samples/caret/caret.bkl,../../samples/checklst/checklst.bkl,../../samples/config/config.bkl,../../samples/console/console.bkl,../../samples/controls/controls.bkl,../../samples/db/db.bkl,../../samples/dialogs/dialogs.bkl,../../samples/dialup/dialup.bkl,../../samples/display/display.bkl,../../samples/dnd/dnd.bkl,../../samples/docview/docview.bkl,../../samples/docvwmdi/docvwmdi.bkl,../../samples/dragimag/dragimag.bkl,../../samples/drawing/drawing.bkl,../../samples/dynamic/dynamic.bkl,../../samples/erase/erase.bkl,../../samples/event/event.bkl,../../samples/except/except.bkl,../../samples/exec/exec.bkl,../../samples/font/font.bkl,../../samples/grid/grid.bkl,../../samples/help/help.bkl,../../samples/htlbox/htlbox.bkl,../../samples/html/about/about.bkl,../../samples/html/help/help.bkl,../../samples/html/helpview/helpview.bkl,../../samples/html/html_samples.bkl,../../samples/html/htmlctrl/htmlctrl.bkl,../../samples/html/printing/printing.bkl,../../samples/html/test/test.bkl,../../samples/html/virtual/virtual.bkl,../../samples/html/widget/widget.bkl,../../samples/html/zip/zip.bkl,../../samples/image/image.bkl,../../samples/internat/internat.bkl,../../samples/ipc/ipc.bkl,../../samples/joytest/joytest.bkl,../../samples/keyboard/keyboard.bkl,../../samples/layout/layout.bkl,../../samples/listbox/listbox.bkl,../../samples/listctrl/listctrl.bkl,../../samples/mdi/mdi.bkl,../../samples/mediaplayer/mediaplayer.bkl,../../samples/memcheck/memcheck.bkl,../../samples/menu/menu.bkl,../../samples/mfc/mfc.bkl,../../samples/minifram/minifram.bkl,../../samples/minimal/minimal.bkl,../../samples/mobile/mobile_samples.bkl,../../samples/mobile/styles/styles.bkl,../../samples/mobile/wxedit/wxedit.bkl,../../samples/multimon/multimon.bkl,../../samples/nativdlg/nativdlg.bkl,../../samples/notebook/notebook.bkl,../../samples/oleauto/oleauto.bkl,../../samples/opengl/cube/cube.bkl,../../samples/opengl/isosurf/isosurf.bkl,../../samples/opengl/opengl_samples.bkl,../../samples/opengl/penguin/penguin.bkl,../../samples/ownerdrw/ownerdrw.bkl,../../samples/png/png.bkl,../../samples/popup/popup.bkl,../../samples/printing/printing.bkl,../../samples/propsize/propsize.bkl,../../samples/regtest/regtest.bkl,../../samples/render/render.bkl,../../samples/richedit/richedit.bkl,../../samples/rotate/rotate.bkl,../../samples/rttitest/minimal.bkl,../../samples/sashtest/sashtest.bkl,../../samples/scroll/scroll.bkl,../../samples/scrollsub/scrollsub.bkl,../../samples/shaped/shaped.bkl,../../samples/sockets/sockets.bkl,../../samples/sound/sound.bkl,../../samples/splash/splash.bkl,../../samples/splitter/splitter.bkl,../../samples/statbar/statbar.bkl,../../samples/tab/tab.bkl,../../samples/taskbar/taskbar.bkl,../../samples/text/text.bkl,../../samples/thread/thread.bkl,../../samples/toolbar/toolbar.bkl,../../samples/treectrl/treectrl.bkl,../../samples/typetest/typetest.bkl,../../samples/validate/validate.bkl,../../samples/vscroll/vscroll.bkl,../../samples/widgets/widgets.bkl,../../samples/wizard/wizard.bkl,../../samples/wxmovie/minimal.bkl,../../samples/wxvideo/minimal.bkl,../../samples/xrc/xrcdemo.bkl,../../tests/test.bkl,../../utils/HelpGen/src/helpgen.bkl,../../utils/configtool/src/configtool.bkl,../../utils/emulator/src/emulator.bkl,../../utils/helpview/src/helpview.bkl,../../utils/hhp2cached/hhp2cached.bkl,../../utils/tex2rtf/src/tex2rtf.bkl,../../utils/utils.bkl,../../utils/wxrc/wxrc.bkl,wx.bkl] ###
 dnl
 dnl This macro was generated by
-dnl Bakefile 0.1.7 (http://bakefile.sourceforge.net)
+dnl Bakefile 0.1.6 (http://bakefile.sourceforge.net)
 dnl Do not modify, all changes will be overwritten!
 
-BAKEFILE_AUTOCONF_INC_M4_VERSION="0.1.7"
+BAKEFILE_AUTOCONF_INC_M4_VERSION="0.1.6"
 
 dnl ### begin block 10_AC_BAKEFILE_PRECOMP_HEADERS[../../contrib/build/animate/animate.bkl,../../contrib/build/deprecated/deprecated.bkl,../../contrib/build/fl/fl.bkl,../../contrib/build/foldbar/foldbar.bkl,../../contrib/build/gizmos/gizmos.bkl,../../contrib/build/mmedia/mmedia.bkl,../../contrib/build/net/net.bkl,../../contrib/build/ogl/ogl.bkl,../../contrib/build/plot/plot.bkl,../../contrib/build/svg/svg.bkl,../../tests/test.bkl,wx.bkl] ###
 AC_BAKEFILE_PRECOMP_HEADERS
index bd5889afdb7722071d2ea456f3186bb680b1a69e..7fbc9a56f61ac4b168673e12b3cf0ac5e623fba4 100644 (file)
@@ -129,10 +129,12 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
 <!-- Used on Mac OS CarbonLib, Mac OS X wxMac base, and Mac OS X darwin base -->
 <set var="BASE_COREFOUNDATION_SRC" hints="files">
     src/mac/corefoundation/cfstring.cpp
+    src/mac/corefoundation/hid.cpp
     src/mac/corefoundation/stdpaths_cf.cpp
 </set>
 <set var="BASE_COREFOUNDATION_HDR" hints="files">
     wx/mac/corefoundation/cfstring.h
+    wx/mac/corefoundation/hid.h
     wx/mac/corefoundation/stdpaths.h
 </set>
 
@@ -1678,10 +1680,14 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
     src/mac/corefoundation/utilsexc_cf.cpp
 </set>
 
+<set var="MAC_OSX_LOWLEVEL_HDR" hints="files">
+</set>
+
 <set var="MAC_LOWLEVEL_SRC" hints="files">
     <if cond="PLATFORM_MACOSX=='1'">$(MAC_OSX_LOWLEVEL_SRC)</if>
 </set>
 <set var="MAC_LOWLEVEL_HDR" hints="files">
+    <if cond="PLATFORM_MACOSX=='1'">$(MAC_OSX_LOWLEVEL_HDR)</if>
 </set>
 
 <set var="MAC_OSX_SRC" hints="files">
@@ -1733,7 +1739,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
     src/mac/carbon/frame.cpp
     src/mac/carbon/gauge.cpp
     src/mac/carbon/gdiobj.cpp
-    src/mac/carbon/hid.cpp
     src/mac/carbon/icon.cpp
     src/mac/carbon/listbox.cpp
     src/mac/carbon/mdi.cpp
@@ -2336,23 +2341,25 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
 <set var="ADVANCED_MAC_SRC" hints="files">
     src/common/taskbarcmn.cpp
     src/mac/carbon/drawer.cpp
-    src/mac/carbon/joystick.cpp
     src/mac/carbon/sound.cpp
     src/mac/carbon/taskbar.cpp
+    src/mac/corefoundation/hidjoystick.cpp
 </set>
 <set var="ADVANCED_MAC_HDR" hints="files">
     wx/mac/carbon/drawer.h
-    wx/mac/carbon/joystick.h
     wx/mac/carbon/sound.h
     wx/mac/carbon/taskbarosx.h
+    wx/mac/corefoundation/joystick.h
 </set>
 
 <set var="ADVANCED_COCOA_SRC" hints="files">
     src/cocoa/taskbar.mm
     src/common/taskbarcmn.cpp
+    src/mac/corefoundation/hidjoystick.cpp
 </set>
 <set var="ADVANCED_COCOA_HDR" hints="files">
     wx/cocoa/taskbar.h
+    wx/mac/corefoundation/joystick.h
 </set>
 
 <set var="ADVANCED_OS2_SRC" hints="files">
index 31c8a5ed96dc1254d8cd823091adc10f85e82ae5..f7463f185b008174d6c528a980f4871e48027920 100644 (file)
@@ -3157,7 +3157,7 @@ $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib: $(WXEXPAT_OBJECTS)
 !if "$(MONOLITHIC)" == "1" && "$(SHARED)" == "1"
 $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_bcc$(VENDORTAG).dll: $(OBJS)\monodll_dummy.obj  $(MONODLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib
        ilink32 -Tpd -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO)  -L$(LIBDIRNAME) @&&|
-       c0d32.obj $(MONODLL_OBJECTS),$@,, $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib  wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) ole2w32.lib oleacc.lib odbc32.lib       import32.lib cw32mt$(__RUNTIME_LIBS_3).lib,,
+       c0d32.obj $(MONODLL_OBJECTS),$@,, $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib  wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) ole2w32.lib oleacc.lib odbc32.lib      import32.lib cw32mt$(__RUNTIME_LIBS_3).lib,,
 |
        implib -f $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR) $@
 !endif
@@ -3221,7 +3221,7 @@ $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXD
 !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1"
 $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv_bcc$(VENDORTAG).dll: $(OBJS)\advdll_dummy.obj  $(ADVDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(__coredll___depname) $(__basedll___depname)
        ilink32 -Tpd -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO)  -L$(LIBDIRNAME) @&&|
-       c0d32.obj $(ADVDLL_OBJECTS),$@,, $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib  wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) ole2w32.lib oleacc.lib odbc32.lib  $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib   import32.lib cw32mt$(__RUNTIME_LIBS_3).lib,,
+       c0d32.obj $(ADVDLL_OBJECTS),$@,, $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib  wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) ole2w32.lib oleacc.lib odbc32.lib  $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib  import32.lib cw32mt$(__RUNTIME_LIBS_3).lib,,
 |
        implib -f $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv $@
 !endif
index aec0f5523f4e91283ab705c12e4519521421b823..a8c3ba35d3c0d36f3af3565610984ec5a045d851 100644 (file)
@@ -3791,7 +3791,7 @@ $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib: $(WXEXPAT_OBJECTS)
 !if "$(MONOLITHIC)" == "1" && "$(SHARED)" == "1"
 $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_vc$(VENDORTAG).dll: $(OBJS)\monodll_dummy.obj  $(MONODLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib
        link /DLL /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_28)  /LIBPATH:$(LIBDIRNAME) @<<
-       $(MONODLL_OBJECTS)  $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib  wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib oleacc.lib odbc32.lib       /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
+       $(MONODLL_OBJECTS)  $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib  wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib oleacc.lib odbc32.lib      /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
 <<
 !endif
 
@@ -3851,7 +3851,7 @@ $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXD
 !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1"
 $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv_vc$(VENDORTAG).dll: $(OBJS)\advdll_dummy.obj  $(ADVDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(__coredll___depname) $(__basedll___depname)
        link /DLL /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_28)  /LIBPATH:$(LIBDIRNAME) @<<
-       $(ADVDLL_OBJECTS)  $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib  wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib oleacc.lib odbc32.lib  $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib   /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib
+       $(ADVDLL_OBJECTS)  $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib  wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib oleacc.lib odbc32.lib  $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib  /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib
 <<
 !endif
 
index 99fbdb93837476f23cdc279f461deb6e02126682..e2fce31d04955ec4e1e24dfbbde553f4a3e6f452 100644 (file)
@@ -3311,7 +3311,7 @@ $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXD
        @%append $(OBJS)\monodll.lbc option caseexact
        @%append $(OBJS)\monodll.lbc $(LDFLAGS) $(__DEBUGINFO_2)  libpath $(LIBDIRNAME)
        @for %i in ($(MONODLL_OBJECTS)) do @%append $(OBJS)\monodll.lbc file %i
-       @for %i in ( $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib  wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE)  kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib      ) do @%append $(OBJS)\monodll.lbc library %i
+       @for %i in ( $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib  wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE)  kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib     ) do @%append $(OBJS)\monodll.lbc library %i
        @%append $(OBJS)\monodll.lbc
        @%append $(OBJS)\monodll.lbc system nt_dll
        wlink @$(OBJS)\monodll.lbc
@@ -3420,7 +3420,7 @@ $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXD
        @%append $(OBJS)\advdll.lbc option caseexact
        @%append $(OBJS)\advdll.lbc $(LDFLAGS) $(__DEBUGINFO_2)  libpath $(LIBDIRNAME)
        @for %i in ($(ADVDLL_OBJECTS)) do @%append $(OBJS)\advdll.lbc file %i
-       @for %i in ( $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib  wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE)  kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib  $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib  ) do @%append $(OBJS)\advdll.lbc library %i
+       @for %i in ( $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib  wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE)  kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib  $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib ) do @%append $(OBJS)\advdll.lbc library %i
        @%append $(OBJS)\advdll.lbc
        @%append $(OBJS)\advdll.lbc system nt_dll
        wlink @$(OBJS)\advdll.lbc
index f4804efc00c5bfdf1ec95c7eddce35467f4bb48c..a4110f2bd9109eed483286955d7b3057b4ddf903 100755 (executable)
--- a/configure
+++ b/configure
@@ -1024,7 +1024,7 @@ Optional Features:
   --enable-splines        use spline drawing code
   --enable-validators     use wxValidator and derived classes
   --enable-busyinfo       use wxBusyInfo
-  --enable-joystick       use wxJoystick (Linux only)
+  --enable-joystick       use wxJoystick
   --enable-metafiles      use wxMetaFile (Windows only)
   --enable-dragimage      use wxDragImage
   --enable-accessibility  enable accessibility support
 
 
 if test "$wxUSE_GUI" = "yes"; then
+          if test "$wxUSE_JOYSTICK" = "yes"; then
 
-    if test "$TOOLKIT" = "MAC" -o "$TOOLKIT" = "COCOA"; then
-        { echo "$as_me:$LINENO: WARNING: Joystick not yet supported under Mac OS X... disabled" >&5
-echo "$as_me: WARNING: Joystick not yet supported under Mac OS X... disabled" >&2;}
-        wxUSE_JOYSTICK=no
-     fi
-
-         if test "$TOOLKIT" != "MSW"; then
-        if test "$wxUSE_JOYSTICK" = "yes"; then
+                if test "$TOOLKIT" != "MAC" -a "$TOOLKIT" != "COCOA" -a "$TOOLKIT" != "MSW"; then
 
 for ac_header in linux/joystick.h
 do
@@ -37102,15 +37096,22 @@ done
                 { echo "$as_me:$LINENO: WARNING: Joystick not supported by this system... disabled" >&5
 echo "$as_me: WARNING: Joystick not supported by this system... disabled" >&2;}
             fi
+        else
+                      if test "$USE_DARWIN" != 1 -a "$TOOLKIT" != "MSW"; then
+                wxUSE_JOYSTICK=no
+                { echo "$as_me:$LINENO: WARNING: Joystick not supported by this system... disabled" >&5
+echo "$as_me: WARNING: Joystick not supported by this system... disabled" >&2;}
+           fi
         fi
-    fi
 
-    if test "$wxUSE_JOYSTICK" = "yes"; then
-        cat >>confdefs.h <<\_ACEOF
+
+        if test "$wxUSE_JOYSTICK" = "yes"; then
+            cat >>confdefs.h <<\_ACEOF
 #define wxUSE_JOYSTICK 1
 _ACEOF
 
-        SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS joytest"
+            SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS joytest"
+        fi
     fi
 fi
 
@@ -38874,7 +38875,7 @@ if test "$wxUSE_MAC" = 1 ; then
     fi
 fi
 if test "$wxUSE_COCOA" = 1 ; then
-    LDFLAGS="$LDFLAGS -framework Cocoa"
+    LDFLAGS="$LDFLAGS -framework IOKit -framework Cocoa"
     if test "$wxUSE_MEDIACTRL" = "yes"; then
         LDFLAGS="$LDFLAGS -framework QuickTime"
     fi
 
 
 
-    BAKEFILE_BAKEFILE_M4_VERSION="0.1.7"
+    BAKEFILE_BAKEFILE_M4_VERSION="0.1.6"
 
 
-BAKEFILE_AUTOCONF_INC_M4_VERSION="0.1.7"
+BAKEFILE_AUTOCONF_INC_M4_VERSION="0.1.6"
 
 
 
index 29564680919ad136d6b0831cbaf55f404af5160d..7414c66cd6ac46e05a7d72022da06625fe10bdd0 100644 (file)
@@ -1142,7 +1142,7 @@ WX_ARG_ENABLE(tooltips,    [  --enable-tooltips       use wxToolTip class], wxUS
 WX_ARG_ENABLE(splines,     [  --enable-splines        use spline drawing code], wxUSE_SPLINES)
 WX_ARG_ENABLE(validators,  [  --enable-validators     use wxValidator and derived classes], wxUSE_VALIDATORS)
 WX_ARG_ENABLE(busyinfo,    [  --enable-busyinfo       use wxBusyInfo], wxUSE_BUSYINFO)
-WX_ARG_ENABLE(joystick,    [  --enable-joystick       use wxJoystick (Linux only)], wxUSE_JOYSTICK)
+WX_ARG_ENABLE(joystick,    [  --enable-joystick       use wxJoystick], wxUSE_JOYSTICK)
 WX_ARG_ENABLE(metafile,    [  --enable-metafiles      use wxMetaFile (Windows only)], wxUSE_METAFILE)
 WX_ARG_ENABLE(dragimage,   [  --enable-dragimage      use wxDragImage], wxUSE_DRAGIMAGE)
 WX_ARG_ENABLE(accessibility,[  --enable-accessibility  enable accessibility support], wxUSE_ACCESSIBILITY)
@@ -5237,27 +5237,29 @@ dnl Joystick support
 dnl ---------------------------------------------------------------------------
 
 if test "$wxUSE_GUI" = "yes"; then
-
-    if test "$TOOLKIT" = "MAC" -o "$TOOLKIT" = "COCOA"; then
-        AC_MSG_WARN([Joystick not yet supported under Mac OS X... disabled])
-        wxUSE_JOYSTICK=no
-     fi
-    
      dnl under MSW we always have joystick support
-    if test "$TOOLKIT" != "MSW"; then
-        if test "$wxUSE_JOYSTICK" = "yes"; then
-            dnl joystick support is only for Linux 2.1.x or greater
+     if test "$wxUSE_JOYSTICK" = "yes"; then
+         
+        dnl joystick support is only for Linux 2.1.x or greater
+        if test "$TOOLKIT" != "MAC" -a "$TOOLKIT" != "COCOA" -a "$TOOLKIT" != "MSW"; then
             AC_CHECK_HEADERS(linux/joystick.h)
             if test "$ac_cv_header_linux_joystick_h" != "yes"; then
                 wxUSE_JOYSTICK=no
                 AC_MSG_WARN(Joystick not supported by this system... disabled)
             fi
+        else
+           dnl mac only available on darwin
+           if test "$USE_DARWIN" != 1 -a "$TOOLKIT" != "MSW"; then
+                wxUSE_JOYSTICK=no
+                AC_MSG_WARN(Joystick not supported by this system... disabled)           
+           fi            
         fi
-    fi
 
-    if test "$wxUSE_JOYSTICK" = "yes"; then
-        AC_DEFINE(wxUSE_JOYSTICK)
-        SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS joytest"
+
+        if test "$wxUSE_JOYSTICK" = "yes"; then
+            AC_DEFINE(wxUSE_JOYSTICK)
+            SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS joytest"
+        fi
     fi
 fi
 
@@ -6172,7 +6174,7 @@ if test "$wxUSE_MAC" = 1 ; then
     fi
 fi
 if test "$wxUSE_COCOA" = 1 ; then
-    LDFLAGS="$LDFLAGS -framework Cocoa"
+    LDFLAGS="$LDFLAGS -framework IOKit -framework Cocoa"
     if test "$wxUSE_MEDIACTRL" = "yes"; then
         LDFLAGS="$LDFLAGS -framework QuickTime"
     fi
index 3171fca87bcfb7e902d2b13fc4c533ea9ebbf946..c458f487b982f0f913f5242328e91d22de3bbe1d 100644 (file)
@@ -11,8 +11,8 @@
 #include "wx/unix/joystick.h"
 #elif defined(__WXX11__)
 #include "wx/unix/joystick.h"
-#elif defined(__WXMAC__)
-#include "wx/mac/joystick.h"
+#elif defined(__DARWIN__)
+#include "wx/mac/corefoundation/joystick.h"
 #elif defined(__WXPM__)
 #include "wx/os2/joystick.h"
 #endif
index 8267803af5c3cc6dc0d2507229a6732d3814f35e..e9d0760bb980c808029f508ee91cbe8285451075 100644 (file)
@@ -124,10 +124,6 @@ public:
     static bool           s_macHasDialogManager ;
     static long           s_macDialogManagerVersion ;
     
-    #ifdef __DARWIN__
-    static class wxHIDKeyboard* s_macHIDKeyboard;
-    #endif
-
     WXHRGN                m_macCursorRgn ;
     WXHRGN                m_macSleepRgn ;
     WXHRGN                m_macHelpRgn ;
diff --git a/include/wx/mac/carbon/private/hid.h b/include/wx/mac/carbon/private/hid.h
deleted file mode 100644 (file)
index cf43a80..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name:        hid.h
-// Purpose:     DARWIN HID layer for WX
-// Author:      Ryan Norton
-// Modified by:
-// Created:     11/11/2003
-// RCS-ID:      $Id$
-// Copyright:   (c) Ryan Norton
-// Licence:     wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-// ===========================================================================
-// declarations
-// ===========================================================================
-
-// ---------------------------------------------------------------------------
-// headers
-// ---------------------------------------------------------------------------
-
-#ifndef _WX_MACCARBONHID_H_
-#define _WX_MACCARBONHID_H_
-
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma interface "hid.h"
-#endif
-
-#include "wx/defs.h"
-
-
-// ---------------------------------------------------------------------------
-// definitions
-// ---------------------------------------------------------------------------
-
-//Mac OSX only
-#ifdef __DARWIN__
-
-#include <IOKit/IOKitLib.h>
-#include <IOKit/IOCFPlugIn.h>
-#include <IOKit/hid/IOHIDLib.h>
-#include <IOKit/hid/IOHIDKeys.h>
-#include <Kernel/IOKit/hidsystem/IOHIDUsageTables.h>
-
-#include <mach/mach.h>
-
-//Utility wrapper around CFArray
-class wxCFArray
-{
-public:
-       wxCFArray(CFTypeRef pData) : pArray((CFArrayRef) pData) {}
-       CFTypeRef operator [] (const int& nIndex) {return CFArrayGetValueAtIndex(pArray, nIndex); }
-       int Count() {return CFArrayGetCount(pArray);}
-private:
-       CFArrayRef pArray;
-};
-
-//
-//     A wrapper around OS X HID Manager procedures.
-//     The tutorial "Working With HID Class Device Interfaces" Is
-//     Quite good, as is the sample program associated with it 
-//  (Depite the author's protests!).
-class wxHIDDevice
-{
-public:
-       wxHIDDevice() : m_ppDevice(NULL), m_ppQueue(NULL), m_pCookies(NULL) {}
-       //kHIDPage_GenericDesktop
-       //kHIDUsage_GD_Joystick,kHIDUsage_GD_Mouse,kHIDUsage_GD_Keyboard
-       bool Create (const int& nClass = -1, const int& nType = -1);
-
-       inline void AddCookie(CFTypeRef Data, const int& i);
-       inline void AddCookieInQueue(CFTypeRef Data, const int& i);     
-       inline void InitCookies(const size_t& dwSize, bool bQueue = false);
-
-       //Must be implemented by derived classes
-       //builds the cookie array -
-       //first call InitCookies to initialize the cookie
-       //array, then AddCookie to add a cookie at a certain point in an array
-       virtual void BuildCookies(wxCFArray& Array) = 0;
-               
-       //checks to see whether the cookie at index nIndex is active (element value != 0)
-       bool IsActive(const int& nIndex);
-       
-       //closes the device and cleans the queue and cookies
-       virtual ~wxHIDDevice();
-private:
-       IOHIDDeviceInterface**  m_ppDevice; //this, essentially
-       IOHIDQueueInterface**   m_ppQueue;  //queue (if we want one)
-       IOHIDElementCookie*     m_pCookies; //cookies
-
-       const char*                     m_szName; //(product) name
-       mach_port_t                     m_pPort;
-};
-
-class wxHIDKeyboard : public wxHIDDevice
-{
-public:
-       bool Create();
-       virtual void BuildCookies(wxCFArray& Array);
-};
-
-#endif //__DARWIN__
-
-#endif 
-        //WX_MACCARBONHID_H
\ No newline at end of file
diff --git a/include/wx/mac/corefoundation/hid.h b/include/wx/mac/corefoundation/hid.h
new file mode 100644 (file)
index 0000000..52e661e
--- /dev/null
@@ -0,0 +1,108 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        hid.h
+// Purpose:     DARWIN HID layer for WX
+// Author:      Ryan Norton
+// Modified by:
+// Created:     11/11/2003
+// RCS-ID:      $Id$
+// Copyright:   (c) Ryan Norton
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+// ===========================================================================
+// declarations
+// ===========================================================================
+
+// ---------------------------------------------------------------------------
+// headers
+// ---------------------------------------------------------------------------
+
+#ifndef _WX_MACCARBONHID_H_
+#define _WX_MACCARBONHID_H_
+
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
+    #pragma interface "hid.h"
+#endif
+
+#include "wx/defs.h"
+
+
+// ---------------------------------------------------------------------------
+// definitions
+// ---------------------------------------------------------------------------
+
+//Mac OSX only
+#ifdef __DARWIN__
+
+#include <IOKit/IOKitLib.h>
+#include <IOKit/IOCFPlugIn.h>
+#include <IOKit/hid/IOHIDLib.h>
+#include <IOKit/hid/IOHIDKeys.h>
+#include <Kernel/IOKit/hidsystem/IOHIDUsageTables.h>
+
+#include <mach/mach.h>
+
+//Utility wrapper around CFArray
+class wxCFArray
+{
+public:
+       wxCFArray(CFTypeRef pData) : pArray((CFArrayRef) pData) {}
+       CFTypeRef operator [] (const int& nIndex) {return CFArrayGetValueAtIndex(pArray, nIndex); }
+       int Count() {return CFArrayGetCount(pArray);}
+private:
+       CFArrayRef pArray;
+};
+
+//
+//     A wrapper around OS X HID Manager procedures.
+//     The tutorial "Working With HID Class Device Interfaces" Is
+//     Quite good, as is the sample program associated with it 
+//  (Depite the author's protests!).
+class wxHIDDevice
+{
+public:
+       wxHIDDevice() : m_ppDevice(NULL), m_ppQueue(NULL), m_pCookies(NULL) {}
+       //kHIDPage_GenericDesktop
+       //kHIDUsage_GD_Joystick,kHIDUsage_GD_Mouse,kHIDUsage_GD_Keyboard
+       bool Create (int nClass = -1, int nType = -1, int nDev = 1);
+    
+    static int GetCount(int nClass = -1, int nType = -1);
+
+       void AddCookie(CFTypeRef Data, int i);
+       void AddCookieInQueue(CFTypeRef Data, int i);   
+       void InitCookies(size_t dwSize, bool bQueue = false);
+
+       //Must be implemented by derived classes
+       //builds the cookie array -
+       //first call InitCookies to initialize the cookie
+       //array, then AddCookie to add a cookie at a certain point in an array
+       virtual void BuildCookies(wxCFArray& Array) = 0;
+               
+       //checks to see whether the cookie at nIndex is active (element value != 0)
+       bool IsActive(int nIndex);
+    
+    //checks to see whether the cookie at nIndex exists
+    bool HasElement(int nIndex);
+       
+       //closes the device and cleans the queue and cookies
+       virtual ~wxHIDDevice();
+    
+protected:
+       IOHIDDeviceInterface**  m_ppDevice; //this, essentially
+       IOHIDQueueInterface**   m_ppQueue;  //queue (if we want one)
+       IOHIDElementCookie*     m_pCookies; //cookies
+
+       const char*                     m_szName; //(product) name
+       mach_port_t                     m_pPort;
+};
+
+class wxHIDKeyboard : public wxHIDDevice
+{
+public:
+       bool Create();
+       virtual void BuildCookies(wxCFArray& Array);
+};
+
+#endif //__DARWIN__
+
+#endif 
+        //WX_MACCARBONHID_H
\ No newline at end of file
diff --git a/include/wx/mac/corefoundation/joystick.h b/include/wx/mac/corefoundation/joystick.h
new file mode 100644 (file)
index 0000000..4243271
--- /dev/null
@@ -0,0 +1,95 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        joystick.h
+// Purpose:     wxJoystick class
+// Author:      Ryan Norton
+// Modified by:
+// Created:     2/13/2005
+// RCS-ID:      $Id$
+// Copyright:   (c) Ryan Norton
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_JOYSTICK_H_
+#define _WX_JOYSTICK_H_
+
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
+#pragma interface "joystick.h"
+#endif
+
+#include "wx/event.h"
+
+class WXDLLEXPORT wxJoystickThread;
+
+class WXDLLEXPORT wxJoystick: public wxObject
+{
+    DECLARE_DYNAMIC_CLASS(wxJoystick)
+ public:
+
+    wxJoystick(int joystick = wxJOYSTICK1);
+    virtual ~wxJoystick();
+
+    // Attributes
+    ////////////////////////////////////////////////////////////////////////////
+
+    wxPoint GetPosition() const;
+    int GetZPosition() const;
+    int GetButtonState() const;
+    int GetPOVPosition() const;
+    int GetPOVCTSPosition() const;
+    int GetRudderPosition() const;
+    int GetUPosition() const;
+    int GetVPosition() const;
+    int GetMovementThreshold() const;
+    void SetMovementThreshold(int threshold) ;
+
+    // Capabilities
+    ////////////////////////////////////////////////////////////////////////////
+
+    bool IsOk() const; // Checks that the joystick is functioning
+    int GetNumberJoysticks() const ;
+    int GetManufacturerId() const ;
+    int GetProductId() const ;
+    wxString GetProductName() const ;
+    int GetXMin() const;
+    int GetYMin() const;
+    int GetZMin() const;
+    int GetXMax() const;
+    int GetYMax() const;
+    int GetZMax() const;
+    int GetNumberButtons() const;
+    int GetNumberAxes() const;
+    int GetMaxButtons() const;
+    int GetMaxAxes() const;
+    int GetPollingMin() const;
+    int GetPollingMax() const;
+    int GetRudderMin() const;
+    int GetRudderMax() const;
+    int GetUMin() const;
+    int GetUMax() const;
+    int GetVMin() const;
+    int GetVMax() const;
+
+    bool HasRudder() const;
+    bool HasZ() const;
+    bool HasU() const;
+    bool HasV() const;
+    bool HasPOV() const;
+    bool HasPOV4Dir() const;
+    bool HasPOVCTS() const;
+
+    // Operations
+    ////////////////////////////////////////////////////////////////////////////
+
+    // pollingFreq = 0 means that movement events are sent when above the threshold.
+    // If pollingFreq > 0, events are received every this many milliseconds.
+    bool SetCapture(wxWindow* win, int pollingFreq = 0);
+    bool ReleaseCapture();
+
+protected:
+    int                 m_joystick;
+    wxJoystickThread*   m_thread;
+    class wxHIDJoystick* m_hid;
+};
+
+#endif
+    // _WX_JOYSTICK_H_
index ea875654998ab4a72449858eca9004803c4f569e..bb31b257a3bbfed0c9c27b6be38597bb1fcbb0ae 100644 (file)
@@ -85,6 +85,7 @@ bool MyApp::OnInit()
 
 #if wxUSE_STATUSBAR
     frame->CreateStatusBar();
+    frame->SetStatusText(wxT("Ready..."));
 #endif // wxUSE_STATUSBAR
 
     frame->CenterOnScreen();
index b219ed79e190eaffd9e2593edf0c27fdf1820731..efd5093945b99995030ff5d1217d2bf18df450bd 100644 (file)
@@ -59,8 +59,6 @@
 #  if defined(WXMAKINGDLL_CORE)
 #    include <mach-o/dyld.h>
 #  endif
-// include hid keyboard
-#  include "wx/mac/carbon/private/hid.h"
 #else
 #  include <Sound.h>
 #  include <Threads.h>
@@ -121,10 +119,6 @@ long      wxApp::s_macPreferencesMenuItemId = wxID_PREFERENCES ;
 long      wxApp::s_macExitMenuItemId = wxID_EXIT ;
 wxString  wxApp::s_macHelpMenuTitleName = wxT("&Help") ;
 
-#ifdef __DARWIN__
-    wxHIDKeyboard* wxApp::s_macHIDKeyboard = NULL;
-#endif
-
 // Normally we're not a plugin
 bool      wxApp::sm_isEmbedded = false;
 //----------------------------------------------------------------------
@@ -725,12 +719,6 @@ void wxApp::CleanUp()
 #  endif
 #endif
 
-#ifdef __DARWIN__
-    // clean up HID Keyboard
-    if (s_macHIDKeyboard)
-        delete s_macHIDKeyboard;
-#endif
-
     UMACleanupToolbox() ;
     if (s_macCursorRgn) {
         ::DisposeRgn((RgnHandle)s_macCursorRgn);
@@ -1179,18 +1167,9 @@ int wxMacKeyCodeToModifier(wxKeyCode key)
     }
 }
 
+#ifndef __DARWIN__
 bool wxGetKeyState(wxKeyCode key) //virtual key code if < 10.2.x, else see below
 {
-#ifdef __DARWIN__
-    // Startup HID keyboard for getting key codes on DARWIN
-    if (!wxApp::s_macHIDKeyboard)
-    {
-        wxApp::s_macHIDKeyboard = new wxHIDKeyboard();
-        wxApp::s_macHIDKeyboard->Create();
-    }
-
-       return wxApp::s_macHIDKeyboard->IsActive(key);
-#else
 //if OS X > 10.2 (i.e. 10.2.x)
 //a known apple bug prevents the system from determining led
 //states with GetKeys... can only determine caps lock led
@@ -1199,8 +1178,8 @@ bool wxGetKeyState(wxKeyCode key) //virtual key code if < 10.2.x, else see below
 //  KeyMapByteArray keymap; 
 //  GetKeys((BigEndianLong*)keymap);
 //  return !!(BitTst(keymap, (sizeof(KeyMapByteArray)*8) - iKey));
-#endif
 }
+#endif
 
 
 bool wxApp::MacSendKeyDownEvent( wxWindow* focus , long keymessage , long modifiers , long when , short wherex , short wherey )
diff --git a/src/mac/carbon/hid.cpp b/src/mac/carbon/hid.cpp
deleted file mode 100644 (file)
index 3dec1a4..0000000
+++ /dev/null
@@ -1,369 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name:        hid.cpp
-// Purpose:     DARWIN HID layer for WX Implementation
-// Author:      Ryan Norton
-// Modified by:
-// Created:     11/11/2003
-// RCS-ID:      $Id$
-// Copyright:   (c) Ryan Norton
-// Licence:     wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// ===========================================================================
-// declarations
-// ===========================================================================
-
-// ---------------------------------------------------------------------------
-// headers
-// ---------------------------------------------------------------------------
-
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "hid.h"
-#endif
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-    #pragma hdrstop
-#endif
-
-//DARWIN _ONLY_
-#ifdef __DARWIN__
-
-#include "wx/mac/carbon/private/hid.h"
-#include "wx/string.h"
-#include "wx/log.h"
-
-
-// ---------------------------------------------------------------------------
-// assertion macros
-// ---------------------------------------------------------------------------
-
-#define wxFORCECHECK_MSG(arg, msg)  \
-{\
-       if (arg) \
-       {\
-               wxLogSysError(wxString::Format(wxT("Message:%s\nHID: %s failed!"), wxT(msg), wxT(#arg)));\
-               return false;\
-       }\
-}
-#define wxIOCHECK(arg, msg)  wxFORCECHECK_MSG(arg != kIOReturnSuccess, msg)
-#define wxKERNCHECK(arg, msg) wxFORCECHECK_MSG(arg != KERN_SUCCESS, msg)
-#define wxSCHECK(arg, msg) wxFORCECHECK_MSG(arg != S_OK, msg)
-
-#ifdef __WXDEBUG___
-#      define wxVERIFY(arg)    wxASSERT(arg)
-#else
-#      define wxVERIFY(arg)    arg
-#endif
-
-/*
-void CFShowTypeIDDescription(CFTypeRef pData)
-{
-       if(!pData)
-       {
-               wxASSERT(false);
-               return;
-       }
-       
-       wxMessageBox(
-               CFStringGetCStringPtr(
-                       CFCopyTypeIDDescription(CFGetTypeID(pData)),CFStringGetSystemEncoding()
-                                                        )
-                               );      
-}
-*/
-
-// ============================================================================
-// implementation
-// ============================================================================
-
-// ---------------------------------------------------------------------------
-// wxHIDDevice
-// ---------------------------------------------------------------------------
-
-bool wxHIDDevice::Create (const int& nClass, const int& nType)
-{
-       //Create the mach port
-       wxIOCHECK(IOMasterPort(bootstrap_port, &m_pPort), "Could not create mach port");
-
-       //Dictionary that will hold first
-       //the matching dictionary for determining which kind of devices we want,
-       //then later some registry properties from an iterator (see below)
-       CFMutableDictionaryRef pDictionary;
-
-       //Create a dictionary
-       //The call to IOServiceMatching filters down the
-       //the services we want to hid services (and also eats the
-       //dictionary up for us (consumes one reference))
-       wxVERIFY((pDictionary = IOServiceMatching(kIOHIDDeviceKey)) != NULL );
-
-       //Here we'll filter down the services to what we want
-       if (nType != -1)
-       {
-               CFNumberRef pType = CFNumberCreate(kCFAllocatorDefault,
-                                                                       kCFNumberIntType, &nType);
-               CFDictionarySetValue(pDictionary, CFSTR(kIOHIDPrimaryUsageKey), pType);
-               CFRelease(pType);
-       }
-       if (nClass != -1)
-       {
-               CFNumberRef pClass = CFNumberCreate(kCFAllocatorDefault,
-                                                                       kCFNumberIntType, &nClass);
-               CFDictionarySetValue(pDictionary, CFSTR(kIOHIDPrimaryUsagePageKey), pClass);
-               CFRelease(pClass);
-       }
-
-       //Now get the maching services
-       io_iterator_t pIterator;
-       wxIOCHECK(IOServiceGetMatchingServices(m_pPort, pDictionary, &pIterator), "No Matching HID Services");
-       wxASSERT(pIterator != 0);
-
-       //Now we iterate through them
-       io_object_t pObject;
-       while ( (pObject = IOIteratorNext(pIterator)) != 0)
-       {
-               wxVERIFY(IORegistryEntryCreateCFProperties(pObject, &pDictionary,
-                                                                                       kCFAllocatorDefault, kNilOptions) == KERN_SUCCESS);
-
-               //Just for sanity :)
-               wxASSERT(CFGetTypeID(CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDProductKey))) == CFStringGetTypeID());
-                       
-               //Get [product] name
-               m_szName = CFStringGetCStringPtr        (
-                                               (CFStringRef) CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDProductKey)), 
-                                               CFStringGetSystemEncoding()
-                                                                               );
-
-               //
-               //Now the hard part - in order to scan things we need "cookies" -
-               //
-               wxCFArray CookieArray = CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDElementKey));
-               BuildCookies(CookieArray);
-               if (m_ppQueue != NULL)
-                       wxVERIFY((*m_ppQueue)->start(m_ppQueue) == S_OK);
-
-               //Create the interface (good grief - long function names!)
-               SInt32 nScore;
-               IOCFPlugInInterface** ppPlugin;
-               wxIOCHECK(IOCreatePlugInInterfaceForService(pObject, kIOHIDDeviceUserClientTypeID,
-                                                                                       kIOCFPlugInInterfaceID, &ppPlugin, &nScore), "");
-                                                                                          
-               //Now, the final thing we can check before we fall back to asserts
-               //(because the dtor only checks if the device is ok, so if anything
-               //fails from now on the dtor will delete the device anyway, so we can't break from this).
-                       
-               //Get the HID interface from the plugin to the mach port
-               wxSCHECK((*ppPlugin)->QueryInterface(ppPlugin,
-                                                       CFUUIDGetUUIDBytes(kIOHIDDeviceInterfaceID), (void**) &m_ppDevice), "");
-                                                       
-               //release the plugin
-               (*ppPlugin)->Release(ppPlugin);
-               
-               //open the HID interface...
-               wxVERIFY((*m_ppDevice)->open(m_ppDevice, 0) == S_OK);
-               
-               //cleanup
-               CFRelease(pDictionary);
-               IOObjectRelease(pObject);
-               break;
-       }
-       //iterator cleanup
-       IOObjectRelease(pIterator);
-               
-       return true;
-}//end Create()
-       
-void wxHIDDevice::AddCookie(CFTypeRef Data, const int& i)
-{
-       CFNumberGetValue(
-                               (CFNumberRef) CFDictionaryGetValue      ( (CFDictionaryRef) Data
-                                                                               , CFSTR(kIOHIDElementCookieKey)
-                                                                               ),      
-                               kCFNumberIntType,
-                               &m_pCookies[i]
-                               );
-}
-
-void wxHIDDevice::AddCookieInQueue(CFTypeRef Data, const int& i)
-{
-       AddCookie(Data, i);
-       wxVERIFY((*m_ppQueue)->addElement(m_ppQueue, m_pCookies[i], 0) == S_OK);//3rd Param flags (none yet)
-}
-       
-void wxHIDDevice::InitCookies(const size_t& dwSize, bool bQueue)
-{
-       m_pCookies = new IOHIDElementCookie[dwSize];
-       if (bQueue)
-       {
-               wxASSERT( m_ppQueue != NULL);
-               wxVERIFY(  (m_ppQueue = (*m_ppDevice)->allocQueue(m_ppDevice)) != NULL);
-               wxVERIFY(  (*m_ppQueue)->create(m_ppQueue, 0, 512) == S_OK); //Param 2, flags, none yet
-       }               
-}
-
-bool wxHIDDevice::IsActive(const int& nIndex)
-{
-       wxASSERT(m_pCookies[nIndex] != NULL);
-       IOHIDEventStruct Event;
-       (*m_ppDevice)->getElementValue(m_ppDevice, m_pCookies[nIndex], &Event);
-       return !!Event.value;
-}
-       
-
-wxHIDDevice::~wxHIDDevice()
-{
-       if (m_ppDevice != NULL)
-       {
-               (*m_ppDevice)->close(m_ppDevice);
-               (*m_ppDevice)->Release(m_ppDevice);
-               mach_port_deallocate(mach_task_self(), m_pPort);
-       }
-       
-       if (m_pCookies != NULL)
-       {
-               delete [] m_pCookies;
-               if (m_ppQueue != NULL)
-               {
-                       (*m_ppQueue)->stop(m_ppQueue);
-                       (*m_ppQueue)->dispose(m_ppQueue);
-                       (*m_ppQueue)->Release(m_ppQueue);
-               }
-       }
-}
-
-// ---------------------------------------------------------------------------
-// wxHIDKeyboard
-// ---------------------------------------------------------------------------
-
-enum
-{
-       WXK_RSHIFT = 400,
-       WXK_RALT,
-       WXK_RCONTROL,
-       WXK_RMENU
-       
-};
-
-bool wxHIDKeyboard::Create()
-{
-       return wxHIDDevice::Create(kHIDPage_GenericDesktop, kHIDUsage_GD_Keyboard);
-}
-
-void wxHIDKeyboard::BuildCookies(wxCFArray& Array)
-{
-       Array = CFDictionaryGetValue((CFDictionaryRef)Array[0], CFSTR(kIOHIDElementKey));
-       InitCookies(500);
-       int i,
-               nUsage;
-       for (i = 0; i < Array.Count(); ++i)
-       {
-               CFNumberGetValue(
-                       (CFNumberRef) CFDictionaryGetValue((CFDictionaryRef) Array[i], CFSTR(kIOHIDElementUsageKey)), 
-                               kCFNumberLongType, &nUsage);
-                       
-               if (nUsage >= kHIDUsage_KeyboardA && nUsage <= kHIDUsage_KeyboardZ)
-                       AddCookie(Array[i], 'A' + (nUsage - kHIDUsage_KeyboardA) );
-               else if (nUsage >= kHIDUsage_Keyboard1 && nUsage <= kHIDUsage_Keyboard9)
-                       AddCookie(Array[i], '1' + (nUsage - kHIDUsage_Keyboard1) );
-               else if (nUsage >= kHIDUsage_KeyboardF1 && nUsage <= kHIDUsage_KeyboardF12)
-                       AddCookie(Array[i], WXK_F1 + (nUsage - kHIDUsage_KeyboardF1) );
-               else if (nUsage >= kHIDUsage_KeyboardF13 && nUsage <= kHIDUsage_KeyboardF24)
-                       AddCookie(Array[i], WXK_F13 + (nUsage - kHIDUsage_KeyboardF13) );
-               else if (nUsage >= kHIDUsage_Keypad1 && nUsage <= kHIDUsage_Keypad9)
-                       AddCookie(Array[i], WXK_NUMPAD1 + (nUsage - kHIDUsage_Keypad1) );
-               else switch (nUsage)
-               {
-                       //0's (wx & ascii go 0-9, but HID goes 1-0)
-                       case kHIDUsage_Keyboard0:
-                               AddCookie(Array[i],'0');
-                               break;
-                       case kHIDUsage_Keypad0:
-                               AddCookie(Array[i],WXK_NUMPAD0);
-                               break;
-                               
-                       //Basic
-                       case kHIDUsage_KeyboardReturnOrEnter:
-                               AddCookie(Array[i], WXK_RETURN);
-                               break;
-                       case kHIDUsage_KeyboardEscape:
-                               AddCookie(Array[i], WXK_ESCAPE);
-                               break;
-                       case kHIDUsage_KeyboardDeleteOrBackspace:
-                               AddCookie(Array[i], WXK_BACK);
-                               break;
-                       case kHIDUsage_KeyboardTab:
-                               AddCookie(Array[i], WXK_TAB);
-                               break;
-                       case kHIDUsage_KeyboardSpacebar:
-                               AddCookie(Array[i], WXK_SPACE);
-                               break;
-                       case kHIDUsage_KeyboardPageUp:
-                               AddCookie(Array[i], WXK_PRIOR);
-                               break;
-                       case kHIDUsage_KeyboardEnd:
-                               AddCookie(Array[i], WXK_END);
-                               break;
-                       case kHIDUsage_KeyboardPageDown:
-                               AddCookie(Array[i], WXK_NEXT);
-                               break;
-                       case kHIDUsage_KeyboardRightArrow:
-                               AddCookie(Array[i], WXK_RIGHT);
-                               break;
-                       case kHIDUsage_KeyboardLeftArrow:
-                               AddCookie(Array[i], WXK_LEFT);
-                               break;
-                       case kHIDUsage_KeyboardDownArrow:
-                               AddCookie(Array[i], WXK_DOWN);
-                               break;
-                       case kHIDUsage_KeyboardUpArrow:
-                               AddCookie(Array[i], WXK_UP);
-                               break;
-                                               
-                       //LEDS
-                       case kHIDUsage_KeyboardCapsLock:
-                               AddCookie(Array[i],WXK_CAPITAL);
-                               break;
-                       case kHIDUsage_KeypadNumLock:
-                               AddCookie(Array[i],WXK_NUMLOCK);
-                               break;
-                       case kHIDUsage_KeyboardScrollLock:
-                               AddCookie(Array[i],WXK_SCROLL);
-                               break;
-                                       
-                       //Menu keys, Shift, other specials
-                       case kHIDUsage_KeyboardLeftControl:
-                               AddCookie(Array[i],WXK_CONTROL);
-                               break;
-                       case kHIDUsage_KeyboardLeftShift:
-                               AddCookie(Array[i],WXK_SHIFT);
-                               break;
-                       case kHIDUsage_KeyboardLeftAlt:
-                               AddCookie(Array[i],WXK_ALT);
-                               break;
-                       case kHIDUsage_KeyboardLeftGUI:
-                               AddCookie(Array[i],WXK_MENU);
-                               break;
-                       case kHIDUsage_KeyboardRightControl:
-                               AddCookie(Array[i],WXK_RCONTROL);
-                               break;
-                       case kHIDUsage_KeyboardRightShift:
-                               AddCookie(Array[i],WXK_RSHIFT);
-                               break;
-                       case kHIDUsage_KeyboardRightAlt:
-                               AddCookie(Array[i],WXK_RALT);
-                               break;
-                       case kHIDUsage_KeyboardRightGUI:
-                               AddCookie(Array[i],WXK_RMENU);
-                               break;
-                                               
-                       //Default       
-                       default:
-                       //not in wx keycodes - do nothing....
-                       break;
-               }
-       }
-}//end buildcookies
-
-#endif //__DARWIN__
index 8136d9e59b35a08a1bd17ffc7f2e8e9e0000a983..83ef3bf68dabbe2383d1bd0cd0bb68fdf2658ce3 100644 (file)
@@ -17,6 +17,8 @@
 
 #if wxUSE_JOYSTICK
 
+#if !defined (__WXMAC_OSX__)
+
 #include "wx/joystick.h"
 
 IMPLEMENT_DYNAMIC_CLASS(wxJoystick, wxObject)
@@ -281,6 +283,8 @@ bool wxJoystick::ReleaseCapture()
     return FALSE;
 }
 
+#endif 
+    // !OSX
 #endif
     // wxUSE_JOYSTICK
 
diff --git a/src/mac/corefoundation/hid.cpp b/src/mac/corefoundation/hid.cpp
new file mode 100644 (file)
index 0000000..735895b
--- /dev/null
@@ -0,0 +1,477 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        hid.cpp
+// Purpose:     DARWIN HID layer for WX Implementation
+// Author:      Ryan Norton
+// Modified by:
+// Created:     11/11/2003
+// RCS-ID:      $Id$
+// Copyright:   (c) Ryan Norton
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+// ===========================================================================
+// declarations
+// ===========================================================================
+
+// ---------------------------------------------------------------------------
+// headers
+// ---------------------------------------------------------------------------
+
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
+#pragma implementation "hid.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+//DARWIN _ONLY_
+#ifdef __DARWIN__
+
+#include "wx/mac/corefoundation/hid.h"
+#include "wx/string.h"
+#include "wx/log.h"
+
+
+// ---------------------------------------------------------------------------
+// assertion macros
+// ---------------------------------------------------------------------------
+
+#define wxFORCECHECK_MSG(arg, msg)  \
+{\
+       if (arg) \
+       {\
+               wxLogSysError(wxString::Format(wxT("Message:%s\nHID: %s failed!"), wxT(msg), wxT(#arg)));\
+               return false;\
+       }\
+}
+#define wxIOCHECK(arg, msg)  wxFORCECHECK_MSG(arg != kIOReturnSuccess, msg)
+#define wxKERNCHECK(arg, msg) wxFORCECHECK_MSG(arg != KERN_SUCCESS, msg)
+#define wxSCHECK(arg, msg) wxFORCECHECK_MSG(arg != S_OK, msg)
+
+#ifdef __WXDEBUG___
+#      define wxVERIFY(arg)    wxASSERT(arg)
+#else
+#      define wxVERIFY(arg)    arg
+#endif
+
+/*
+void CFShowTypeIDDescription(CFTypeRef pData)
+{
+       if(!pData)
+       {
+               wxASSERT(false);
+               return;
+       }
+       
+       wxMessageBox(
+               CFStringGetCStringPtr(
+                       CFCopyTypeIDDescription(CFGetTypeID(pData)),CFStringGetSystemEncoding()
+                                                        )
+                               );      
+}
+*/
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+// ---------------------------------------------------------------------------
+// wxHIDDevice
+// ---------------------------------------------------------------------------
+
+bool wxHIDDevice::Create (int nClass, int nType, int nDev)
+{
+       //Create the mach port
+       wxIOCHECK(IOMasterPort(bootstrap_port, &m_pPort), "Could not create mach port");
+
+       //Dictionary that will hold first
+       //the matching dictionary for determining which kind of devices we want,
+       //then later some registry properties from an iterator (see below)
+       CFMutableDictionaryRef pDictionary;
+
+       //Create a dictionary
+       //The call to IOServiceMatching filters down the
+       //the services we want to hid services (and also eats the
+       //dictionary up for us (consumes one reference))
+       wxVERIFY((pDictionary = IOServiceMatching(kIOHIDDeviceKey)) != NULL );
+
+       //Here we'll filter down the services to what we want
+       if (nType != -1)
+       {
+               CFNumberRef pType = CFNumberCreate(kCFAllocatorDefault,
+                                                                       kCFNumberIntType, &nType);
+               CFDictionarySetValue(pDictionary, CFSTR(kIOHIDPrimaryUsageKey), pType);
+               CFRelease(pType);
+       }
+       if (nClass != -1)
+       {
+               CFNumberRef pClass = CFNumberCreate(kCFAllocatorDefault,
+                                                                       kCFNumberIntType, &nClass);
+               CFDictionarySetValue(pDictionary, CFSTR(kIOHIDPrimaryUsagePageKey), pClass);
+               CFRelease(pClass);
+       }
+
+       //Now get the maching services
+       io_iterator_t pIterator;
+       wxIOCHECK(IOServiceGetMatchingServices(m_pPort, pDictionary, &pIterator), "No Matching HID Services");
+       wxASSERT(pIterator != 0);
+
+       //Now we iterate through them
+       io_object_t pObject;
+       while ( (pObject = IOIteratorNext(pIterator)) != 0)
+       {
+        if(--nDev != 0)
+            continue;
+            
+               wxVERIFY(IORegistryEntryCreateCFProperties(pObject, &pDictionary,
+                                                                                       kCFAllocatorDefault, kNilOptions) == KERN_SUCCESS);
+
+               //Just for sanity :)
+               wxASSERT(CFGetTypeID(CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDProductKey))) == CFStringGetTypeID());
+                       
+               //Get [product] name
+               m_szName = CFStringGetCStringPtr        (
+                                               (CFStringRef) CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDProductKey)), 
+                                               CFStringGetSystemEncoding()
+                                                                               );
+
+               //Create the interface (good grief - long function names!)
+               SInt32 nScore;
+               IOCFPlugInInterface** ppPlugin;
+               wxIOCHECK(IOCreatePlugInInterfaceForService(pObject, kIOHIDDeviceUserClientTypeID,
+                                                                                       kIOCFPlugInInterfaceID, &ppPlugin, &nScore), "");
+                                                                                          
+               //Now, the final thing we can check before we fall back to asserts
+               //(because the dtor only checks if the device is ok, so if anything
+               //fails from now on the dtor will delete the device anyway, so we can't break from this).
+                       
+               //Get the HID interface from the plugin to the mach port
+               wxSCHECK((*ppPlugin)->QueryInterface(ppPlugin,
+                                                       CFUUIDGetUUIDBytes(kIOHIDDeviceInterfaceID), (void**) &m_ppDevice), "");
+                                                       
+               //release the plugin
+               (*ppPlugin)->Release(ppPlugin);
+               
+               //open the HID interface...
+               wxVERIFY((*m_ppDevice)->open(m_ppDevice, 0) == S_OK);
+               
+               //
+               //Now the hard part - in order to scan things we need "cookies" -
+               //
+               wxCFArray CookieArray = CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDElementKey));
+               BuildCookies(CookieArray);
+               if (m_ppQueue != NULL)
+                       wxVERIFY((*m_ppQueue)->start(m_ppQueue) == S_OK);
+
+               //cleanup
+               CFRelease(pDictionary);
+               IOObjectRelease(pObject);
+               break;
+       }
+       //iterator cleanup
+       IOObjectRelease(pIterator);
+               
+       return true;
+}//end Create()
+       
+int wxHIDDevice::GetCount (int nClass, int nType)
+{
+       mach_port_t                     m_pPort;
+
+       //Create the mach port
+       wxIOCHECK(IOMasterPort(bootstrap_port, &m_pPort), "Could not create mach port");
+
+       //Dictionary that will hold first
+       //the matching dictionary for determining which kind of devices we want,
+       //then later some registry properties from an iterator (see below)
+       CFMutableDictionaryRef pDictionary;
+
+       //Create a dictionary
+       //The call to IOServiceMatching filters down the
+       //the services we want to hid services (and also eats the
+       //dictionary up for us (consumes one reference))
+       wxVERIFY((pDictionary = IOServiceMatching(kIOHIDDeviceKey)) != NULL );
+
+       //Here we'll filter down the services to what we want
+       if (nType != -1)
+       {
+               CFNumberRef pType = CFNumberCreate(kCFAllocatorDefault,
+                                                                       kCFNumberIntType, &nType);
+               CFDictionarySetValue(pDictionary, CFSTR(kIOHIDPrimaryUsageKey), pType);
+               CFRelease(pType);
+       }
+       if (nClass != -1)
+       {
+               CFNumberRef pClass = CFNumberCreate(kCFAllocatorDefault,
+                                                                       kCFNumberIntType, &nClass);
+               CFDictionarySetValue(pDictionary, CFSTR(kIOHIDPrimaryUsagePageKey), pClass);
+               CFRelease(pClass);
+       }
+
+       //Now get the maching services
+       io_iterator_t pIterator;
+       wxIOCHECK(IOServiceGetMatchingServices(m_pPort, pDictionary, &pIterator), "No Matching HID Services");
+       wxASSERT(pIterator != 0);
+
+       //Now we iterate through them
+       io_object_t pObject;
+    
+    int nCount = 0;
+    
+       while ( (pObject = IOIteratorNext(pIterator)) != 0)
+        ++nCount;
+       
+    //iterator cleanup
+       IOObjectRelease(pIterator);
+               
+       return nCount;
+}//end Create()
+
+void wxHIDDevice::AddCookie(CFTypeRef Data, int i)
+{
+       CFNumberGetValue(
+                               (CFNumberRef) CFDictionaryGetValue      ( (CFDictionaryRef) Data
+                                                                               , CFSTR(kIOHIDElementCookieKey)
+                                                                               ),      
+                               kCFNumberIntType,
+                               &m_pCookies[i]
+                               );
+}
+
+void wxHIDDevice::AddCookieInQueue(CFTypeRef Data, int i)
+{
+       AddCookie(Data, i);
+       wxVERIFY((*m_ppQueue)->addElement(m_ppQueue, m_pCookies[i], 0) == S_OK);//3rd Param flags (none yet)
+}
+       
+void wxHIDDevice::InitCookies(size_t dwSize, bool bQueue)
+{
+       m_pCookies = new IOHIDElementCookie[dwSize];
+       if (bQueue)
+       {
+               wxASSERT( m_ppQueue == NULL);
+               wxVERIFY(  (m_ppQueue = (*m_ppDevice)->allocQueue(m_ppDevice)) != NULL);
+               wxVERIFY(  (*m_ppQueue)->create(m_ppQueue, 0, 512) == S_OK); //Param 2, flags, none yet
+       }               
+}
+
+bool wxHIDDevice::IsActive(int nIndex)
+{
+       wxASSERT(m_pCookies[nIndex] != NULL);
+       IOHIDEventStruct Event;
+       (*m_ppDevice)->getElementValue(m_ppDevice, m_pCookies[nIndex], &Event);
+       return !!Event.value;
+}
+       
+bool wxHIDDevice::HasElement(int nIndex)
+{
+    return m_pCookies[nIndex] != NULL;
+}
+
+wxHIDDevice::~wxHIDDevice()
+{
+       if (m_ppDevice != NULL)
+       {
+               if (m_ppQueue != NULL)
+               {
+                       (*m_ppQueue)->stop(m_ppQueue);
+                       (*m_ppQueue)->dispose(m_ppQueue);
+                       (*m_ppQueue)->Release(m_ppQueue);
+               }
+               (*m_ppDevice)->close(m_ppDevice);
+               (*m_ppDevice)->Release(m_ppDevice);
+               mach_port_deallocate(mach_task_self(), m_pPort);
+       }
+       
+       if (m_pCookies != NULL)
+       {
+               delete [] m_pCookies;
+       }
+}
+
+// ---------------------------------------------------------------------------
+// wxHIDKeyboard
+// ---------------------------------------------------------------------------
+
+enum
+{
+       WXK_RSHIFT = 400,
+       WXK_RALT,
+       WXK_RCONTROL,
+       WXK_RMENU
+       
+};
+
+bool wxHIDKeyboard::Create()
+{
+       return wxHIDDevice::Create(kHIDPage_GenericDesktop, kHIDUsage_GD_Keyboard);
+}
+
+void wxHIDKeyboard::BuildCookies(wxCFArray& Array)
+{
+       Array = CFDictionaryGetValue((CFDictionaryRef)Array[0], CFSTR(kIOHIDElementKey));
+       InitCookies(500);
+       int i,
+               nUsage;
+       for (i = 0; i < Array.Count(); ++i)
+       {
+               CFNumberGetValue(
+                       (CFNumberRef) CFDictionaryGetValue((CFDictionaryRef) Array[i], CFSTR(kIOHIDElementUsageKey)), 
+                               kCFNumberLongType, &nUsage);
+                       
+               if (nUsage >= kHIDUsage_KeyboardA && nUsage <= kHIDUsage_KeyboardZ)
+                       AddCookie(Array[i], 'A' + (nUsage - kHIDUsage_KeyboardA) );
+               else if (nUsage >= kHIDUsage_Keyboard1 && nUsage <= kHIDUsage_Keyboard9)
+                       AddCookie(Array[i], '1' + (nUsage - kHIDUsage_Keyboard1) );
+               else if (nUsage >= kHIDUsage_KeyboardF1 && nUsage <= kHIDUsage_KeyboardF12)
+                       AddCookie(Array[i], WXK_F1 + (nUsage - kHIDUsage_KeyboardF1) );
+               else if (nUsage >= kHIDUsage_KeyboardF13 && nUsage <= kHIDUsage_KeyboardF24)
+                       AddCookie(Array[i], WXK_F13 + (nUsage - kHIDUsage_KeyboardF13) );
+               else if (nUsage >= kHIDUsage_Keypad1 && nUsage <= kHIDUsage_Keypad9)
+                       AddCookie(Array[i], WXK_NUMPAD1 + (nUsage - kHIDUsage_Keypad1) );
+               else switch (nUsage)
+               {
+                       //0's (wx & ascii go 0-9, but HID goes 1-0)
+                       case kHIDUsage_Keyboard0:
+                               AddCookie(Array[i],'0');
+                               break;
+                       case kHIDUsage_Keypad0:
+                               AddCookie(Array[i],WXK_NUMPAD0);
+                               break;
+                               
+                       //Basic
+                       case kHIDUsage_KeyboardReturnOrEnter:
+                               AddCookie(Array[i], WXK_RETURN);
+                               break;
+                       case kHIDUsage_KeyboardEscape:
+                               AddCookie(Array[i], WXK_ESCAPE);
+                               break;
+                       case kHIDUsage_KeyboardDeleteOrBackspace:
+                               AddCookie(Array[i], WXK_BACK);
+                               break;
+                       case kHIDUsage_KeyboardTab:
+                               AddCookie(Array[i], WXK_TAB);
+                               break;
+                       case kHIDUsage_KeyboardSpacebar:
+                               AddCookie(Array[i], WXK_SPACE);
+                               break;
+                       case kHIDUsage_KeyboardPageUp:
+                               AddCookie(Array[i], WXK_PRIOR);
+                               break;
+                       case kHIDUsage_KeyboardEnd:
+                               AddCookie(Array[i], WXK_END);
+                               break;
+                       case kHIDUsage_KeyboardPageDown:
+                               AddCookie(Array[i], WXK_NEXT);
+                               break;
+                       case kHIDUsage_KeyboardRightArrow:
+                               AddCookie(Array[i], WXK_RIGHT);
+                               break;
+                       case kHIDUsage_KeyboardLeftArrow:
+                               AddCookie(Array[i], WXK_LEFT);
+                               break;
+                       case kHIDUsage_KeyboardDownArrow:
+                               AddCookie(Array[i], WXK_DOWN);
+                               break;
+                       case kHIDUsage_KeyboardUpArrow:
+                               AddCookie(Array[i], WXK_UP);
+                               break;
+                                               
+                       //LEDS
+                       case kHIDUsage_KeyboardCapsLock:
+                               AddCookie(Array[i],WXK_CAPITAL);
+                               break;
+                       case kHIDUsage_KeypadNumLock:
+                               AddCookie(Array[i],WXK_NUMLOCK);
+                               break;
+                       case kHIDUsage_KeyboardScrollLock:
+                               AddCookie(Array[i],WXK_SCROLL);
+                               break;
+                                       
+                       //Menu keys, Shift, other specials
+                       case kHIDUsage_KeyboardLeftControl:
+                               AddCookie(Array[i],WXK_CONTROL);
+                               break;
+                       case kHIDUsage_KeyboardLeftShift:
+                               AddCookie(Array[i],WXK_SHIFT);
+                               break;
+                       case kHIDUsage_KeyboardLeftAlt:
+                               AddCookie(Array[i],WXK_ALT);
+                               break;
+                       case kHIDUsage_KeyboardLeftGUI:
+                               AddCookie(Array[i],WXK_MENU);
+                               break;
+                       case kHIDUsage_KeyboardRightControl:
+                               AddCookie(Array[i],WXK_RCONTROL);
+                               break;
+                       case kHIDUsage_KeyboardRightShift:
+                               AddCookie(Array[i],WXK_RSHIFT);
+                               break;
+                       case kHIDUsage_KeyboardRightAlt:
+                               AddCookie(Array[i],WXK_RALT);
+                               break;
+                       case kHIDUsage_KeyboardRightGUI:
+                               AddCookie(Array[i],WXK_RMENU);
+                               break;
+                                               
+                       //Default       
+                       default:
+                       //not in wx keycodes - do nothing....
+                       break;
+               }
+       }
+}//end buildcookies
+
+//
+// wxGetKeyState
+//
+
+#include "wx/utils.h"
+#include "wx/module.h"
+
+class wxHIDModule : public wxModule
+{
+    DECLARE_DYNAMIC_CLASS(wxHIDModule)
+    
+    public:
+        static wxHIDKeyboard* sm_keyboard;
+        
+        virtual bool OnInit()
+        {
+            sm_keyboard = NULL;
+            return true;
+        }
+        virtual void OnExit()
+        {
+            if (sm_keyboard)
+                delete sm_keyboard;
+        }
+};
+
+IMPLEMENT_DYNAMIC_CLASS(wxHIDModule, wxModule)
+
+wxHIDKeyboard* wxHIDModule::sm_keyboard;
+
+bool wxGetKeyState (wxKeyCode key)
+{
+    if (!wxHIDModule::sm_keyboard)
+    {
+        wxHIDModule::sm_keyboard = new wxHIDKeyboard();
+        bool bOK = wxHIDModule::sm_keyboard->Create();
+        wxASSERT(bOK);
+        if(!bOK)
+        {
+            delete wxHIDModule::sm_keyboard;
+            wxHIDModule::sm_keyboard = NULL;
+            return false;
+        }
+    }
+    
+    return wxHIDModule::sm_keyboard->IsActive(key);
+}
+
+#endif //__DARWIN__
diff --git a/src/mac/corefoundation/hidjoystick.cpp b/src/mac/corefoundation/hidjoystick.cpp
new file mode 100644 (file)
index 0000000..eacceb0
--- /dev/null
@@ -0,0 +1,505 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        joystick.cpp
+// Purpose:     wxJoystick class
+// Author:      Ryan Norton
+// Modified by:
+// Created:     2/13/2005
+// RCS-ID:      $Id$
+// Copyright:   (c) Ryan Norton
+// Licence:       wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
+#pragma implementation "joystick.h"
+#endif
+
+#include "wx/wxprec.h"
+
+#ifdef __DARWIN__
+
+#if wxUSE_JOYSTICK
+
+#include "wx/event.h"
+#include "wx/log.h"
+#include "wx/joystick.h"
+#include "wx/thread.h"
+#include "wx/window.h"
+
+#include "wx/mac/corefoundation/hid.h"
+
+#include <CoreServices/CoreServices.h>
+#include <mach/mach.h>
+#include <mach/mach_time.h>
+#include <unistd.h>
+
+enum {
+    wxJS_AXIS_X = 41,
+    wxJS_AXIS_Y,
+    wxJS_AXIS_Z,
+    wxJS_AXIS_RUDDER,
+    wxJS_AXIS_U,
+    wxJS_AXIS_V,
+
+    wxJS_AXIS_MAX = 32767,
+    wxJS_AXIS_MIN = -32767
+};
+
+class wxHIDJoystick : public wxHIDDevice
+{
+public:
+       bool Create(int nWhich);
+       virtual void BuildCookies(wxCFArray& Array);
+    IOHIDElementCookie* GetCookies() {return m_pCookies;}
+    
+    IOHIDQueueInterface** GetQueue() {return m_ppQueue;}
+};
+
+
+bool wxHIDJoystick::Create(int nWhich)
+{
+    int nJoysticks = GetCount(kHIDPage_GenericDesktop, kHIDUsage_GD_Joystick);
+    
+    if (nWhich <= nJoysticks)
+        return wxHIDDevice::Create(kHIDPage_GenericDesktop, kHIDUsage_GD_Joystick);
+    else
+        nWhich -= nJoysticks;
+    
+    int nGamePads = GetCount(kHIDPage_GenericDesktop, kHIDUsage_GD_GamePad);
+    
+    if (nWhich <= nGamePads)
+        return wxHIDDevice::Create(kHIDPage_GenericDesktop, kHIDUsage_GD_GamePad);
+    else
+        return false;
+}
+
+void wxHIDJoystick::BuildCookies(wxCFArray& Array)
+{
+       Array = CFDictionaryGetValue((CFDictionaryRef)Array[0], CFSTR(kIOHIDElementKey));
+       InitCookies(50, true);
+       int i,
+               nUsage,
+        nPage;
+       for (i = 0; i < Array.Count(); ++i)
+       {
+               CFNumberGetValue(
+                       (CFNumberRef) CFDictionaryGetValue((CFDictionaryRef) Array[i], CFSTR(kIOHIDElementUsageKey)), 
+                               kCFNumberLongType, &nUsage);
+                       
+               CFNumberGetValue(
+                       (CFNumberRef) CFDictionaryGetValue((CFDictionaryRef) Array[i], CFSTR(kIOHIDElementUsagePageKey)), 
+                               kCFNumberLongType, &nPage);
+
+               if (nPage == kHIDPage_Button && nUsage <= 40)
+                       AddCookieInQueue(Array[i], nUsage );
+               else if (nPage == kHIDPage_GenericDesktop)
+        {
+            switch(nUsage)
+            {
+                case kHIDUsage_GD_X:
+                    AddCookieInQueue(Array[i], wxJS_AXIS_X);
+                    break;                    
+                case kHIDUsage_GD_Y:
+                    AddCookieInQueue(Array[i], wxJS_AXIS_Y);
+                    break;
+                case kHIDUsage_GD_Z:
+                    AddCookieInQueue(Array[i], wxJS_AXIS_Z);
+                    break;
+                default:
+                    break;
+            }
+        }
+        else if (nPage == kHIDPage_Simulation && nUsage == kHIDUsage_Sim_Rudder)
+                       AddCookieInQueue(Array[i], wxJS_AXIS_RUDDER );
+       }
+}//end buildcookies
+
+
+
+
+IMPLEMENT_DYNAMIC_CLASS(wxJoystick, wxObject)
+
+
+////////////////////////////////////////////////////////////////////////////
+// Background thread for reading the joystick device
+////////////////////////////////////////////////////////////////////////////
+
+class wxJoystickThread : public wxThread
+{
+public:
+    wxJoystickThread(wxHIDJoystick* hid, int joystick);
+    void* Entry();
+
+private:
+    wxHIDJoystick*       m_hid;
+    int       m_joystick;
+    wxPoint   m_lastposition;
+    int       m_axe[15];
+    int       m_buttons;
+    wxWindow* m_catchwin;
+    int       m_polling;
+
+    friend class wxJoystick;
+};
+
+
+wxJoystickThread::wxJoystickThread(wxHIDJoystick* hid, int joystick)
+    : m_hid(hid),
+      m_joystick(joystick),
+      m_lastposition(wxDefaultPosition),
+      m_buttons(0),
+      m_catchwin(NULL),
+      m_polling(0)
+{
+    for (int i=0; i<15; i++)
+        m_axe[i] = 0;
+}
+
+
+#      define wxJSVERIFY(arg)  if(!(arg)) {wxLogSysError(wxT(#arg)); return NULL;}
+#      define wxJSASSERT(arg)  wxJSVERIFY(arg)
+
+void* wxJoystickThread::Entry()
+{
+    CFRunLoopSourceRef pRLSource = NULL;
+
+    wxJSVERIFY( (*m_hid->GetQueue())->createAsyncEventSource(m_hid->GetQueue(), &pRLSource) 
+                        == kIOReturnSuccess );
+    wxJSASSERT(pRLSource != NULL);
+
+    //attach runloop source to main run loop in thread
+    CFRunLoopRef pRL = CFRunLoopGetCurrent();  
+    CFRunLoopAddSource(pRL, pRLSource, kCFRunLoopDefaultMode);
+      
+//    wxJSVERIFY( (*m_hid->GetQueue())->start(m_hid->GetQueue()) == kIOReturnSuccess ); 
+    
+    double dTime;
+    IOHIDEventStruct hidevent;
+    AbsoluteTime bogustime = {0,0};
+    IOReturn ret;
+    
+    while(true)
+    {
+        if (TestDestroy())
+            break;
+
+        if (m_polling)
+            dTime = 0.0001 * m_polling;
+        else
+            dTime = 0.0001 * 10;  // check at least every 10 msec in blocking case
+
+        CFRunLoopRunInMode(kCFRunLoopDefaultMode, dTime, m_polling);        
+        
+        while (    (ret = (*m_hid->GetQueue())->getNextEvent(m_hid->GetQueue(), 
+                        &hidevent, bogustime, 0)) != kIOReturnUnderrun )
+        {
+            if (TestDestroy())
+                break;
+
+            wxJSASSERT(ret == kIOReturnSuccess);
+            wxJoystickEvent wxevent;
+            
+            int nIndex = 0;
+            IOHIDElementCookie* pCookies = m_hid->GetCookies();
+            while(nIndex < 50)
+            {
+                if(hidevent.elementCookie == pCookies[nIndex])
+                    break;
+            } 
+            wxASSERT(nIndex != 50);
+            
+            if (nIndex < 40)
+            {
+                if (hidevent.value)
+                {
+                    m_buttons |= (1 << nIndex);
+                    wxevent.SetEventType(wxEVT_JOY_BUTTON_DOWN);
+                }
+                else
+                {
+                    m_buttons &= ~(1 << nIndex);
+                    wxevent.SetEventType(wxEVT_JOY_BUTTON_UP);
+                }
+
+                wxevent.SetButtonChange(nIndex);
+            }
+            else if (nIndex == wxJS_AXIS_X)
+            {
+                m_lastposition.x = hidevent.value;
+                wxevent.SetEventType(wxEVT_JOY_MOVE);
+                m_axe[nIndex - 39] = hidevent.value;
+            }
+            else if (nIndex == wxJS_AXIS_Y)
+            {
+                m_lastposition.y = hidevent.value;
+                wxevent.SetEventType(wxEVT_JOY_MOVE);
+                m_axe[nIndex - 39] = hidevent.value;
+            }
+            else if (nIndex == wxJS_AXIS_Z)
+            {
+                wxevent.SetEventType(wxEVT_JOY_ZMOVE);
+                m_axe[nIndex - 39] = hidevent.value;
+            }
+            else
+                wxevent.SetEventType(wxEVT_JOY_MOVE);            
+
+            Nanoseconds timestamp = AbsoluteToNanoseconds(hidevent.timestamp);
+            
+            wxULongLong llTime(timestamp.hi, timestamp.lo);
+            
+            llTime /= 1000000;
+            
+            wxevent.SetTimestamp(llTime.GetValue());
+            wxevent.SetJoystick(m_joystick);
+            wxevent.SetButtonState(m_buttons);
+            wxevent.SetPosition(m_lastposition);
+            wxevent.SetZPosition(m_axe[3]);
+            wxevent.SetEventObject(m_catchwin);
+
+            if (m_catchwin)
+                m_catchwin->AddPendingEvent(wxevent);            
+        }
+    }
+    return NULL;
+}
+
+
+////////////////////////////////////////////////////////////////////////////
+
+wxJoystick::wxJoystick(int joystick)
+    : m_joystick(joystick),
+      m_thread(NULL)
+{
+    m_hid = new wxHIDJoystick();
+
+    if (m_hid->Create(m_joystick))
+    {
+        m_thread = new wxJoystickThread(m_hid, m_joystick);
+        m_thread->Create();
+        m_thread->Run();
+    }
+    else
+    {
+        delete m_hid;
+        m_hid = NULL;
+    }
+}
+
+
+wxJoystick::~wxJoystick()
+{
+    ReleaseCapture();
+    if (m_thread)
+        m_thread->Delete();  // It's detached so it will delete itself
+        
+    if (m_hid)
+        delete m_hid;
+}
+
+
+////////////////////////////////////////////////////////////////////////////
+// State
+////////////////////////////////////////////////////////////////////////////
+
+wxPoint wxJoystick::GetPosition() const
+{
+    wxPoint pos(wxDefaultPosition);
+    if (m_thread) pos = m_thread->m_lastposition;
+    return pos;
+}
+
+int wxJoystick::GetZPosition() const
+{
+    if (m_thread)
+        return m_thread->m_axe[wxJS_AXIS_Z];
+    return 0;
+}
+
+int wxJoystick::GetButtonState() const
+{
+    if (m_thread)
+        return m_thread->m_buttons;
+    return 0;
+}
+
+int wxJoystick::GetPOVPosition() const
+{      return -1;                              }
+
+int wxJoystick::GetPOVCTSPosition() const
+{      return -1;                              }
+
+int wxJoystick::GetRudderPosition() const
+{      
+    if (m_thread)
+        return m_thread->m_axe[wxJS_AXIS_RUDDER];
+    return 0;
+}
+
+int wxJoystick::GetUPosition() const
+{
+    if (m_thread)
+        return m_thread->m_axe[wxJS_AXIS_U];
+    return 0;
+}
+
+int wxJoystick::GetVPosition() const
+{
+    if (m_thread)
+        return m_thread->m_axe[wxJS_AXIS_V];
+    return 0;
+}
+
+int wxJoystick::GetMovementThreshold() const
+{      return 0;                               }
+
+void wxJoystick::SetMovementThreshold(int threshold)
+{                                                      }
+
+////////////////////////////////////////////////////////////////////////////
+// Capabilities
+////////////////////////////////////////////////////////////////////////////
+
+bool wxJoystick::IsOk() const
+{      return m_hid != NULL;   }
+
+int wxJoystick::GetNumberJoysticks() const
+{    return wxHIDDevice::GetCount(kHIDPage_GenericDesktop, kHIDUsage_GD_Joystick) +
+            wxHIDDevice::GetCount(kHIDPage_GenericDesktop, kHIDUsage_GD_GamePad);   }
+    
+int wxJoystick::GetManufacturerId() const
+{      return 0;                               }       
+
+int wxJoystick::GetProductId() const
+{      return 0;                               }
+
+wxString wxJoystick::GetProductName() const
+{      return wxT("unknown");  }
+
+int wxJoystick::GetXMin() const
+{      return wxJS_AXIS_MIN;   }
+
+int wxJoystick::GetYMin() const
+{      return wxJS_AXIS_MIN;   }
+
+int wxJoystick::GetZMin() const
+{      return wxJS_AXIS_MIN;   }
+
+int wxJoystick::GetXMax() const
+{      return wxJS_AXIS_MAX;   }
+
+int wxJoystick::GetYMax() const
+{      return wxJS_AXIS_MAX;   }
+
+int wxJoystick::GetZMax() const
+{      return wxJS_AXIS_MAX;   }
+
+int wxJoystick::GetNumberButtons() const
+{
+    int nCount = 0;
+    
+    for(int nIndex = 0; nIndex < 40; ++nIndex)
+    {
+        if(m_hid->HasElement(nIndex))
+            ++nCount;
+    }
+    
+    return nCount;
+}
+
+int wxJoystick::GetNumberAxes() const
+{
+    int nCount = 0;
+    
+    for(int nIndex = 40; nIndex < 50; ++nIndex)
+    {
+        if(m_hid->HasElement(nIndex))
+            ++nCount;
+    }
+    
+    return nCount;
+}
+
+//
+// internal
+//
+int wxJoystick::GetMaxButtons() const
+{      return 15;      }
+
+int wxJoystick::GetMaxAxes() const
+{      return 10;      }
+
+int wxJoystick::GetPollingMin() const
+{      return 10;      }
+
+int wxJoystick::GetPollingMax() const
+{      return 1000;    }
+
+int wxJoystick::GetRudderMin() const
+{      return wxJS_AXIS_MIN;   }
+
+int wxJoystick::GetRudderMax() const
+{      return wxJS_AXIS_MAX;   }
+
+int wxJoystick::GetUMin() const
+{      return wxJS_AXIS_MIN;   }
+
+int wxJoystick::GetUMax() const
+{      return wxJS_AXIS_MAX;   }
+
+int wxJoystick::GetVMin() const
+{      return wxJS_AXIS_MIN;   }
+
+int wxJoystick::GetVMax() const
+{      return wxJS_AXIS_MAX;   }
+
+bool wxJoystick::HasRudder() const
+{      return m_hid->HasElement(wxJS_AXIS_RUDDER);     }
+
+bool wxJoystick::HasZ() const
+{      return m_hid->HasElement(wxJS_AXIS_Z);  }
+
+bool wxJoystick::HasU() const
+{      return m_hid->HasElement(wxJS_AXIS_U);  }
+
+bool wxJoystick::HasV() const
+{      return m_hid->HasElement(wxJS_AXIS_V);  }
+
+bool wxJoystick::HasPOV() const
+{      return false;   }
+
+bool wxJoystick::HasPOV4Dir() const
+{      return false;   }
+
+bool wxJoystick::HasPOVCTS() const
+{      return false;   }
+
+////////////////////////////////////////////////////////////////////////////
+// Operations
+////////////////////////////////////////////////////////////////////////////
+
+bool wxJoystick::SetCapture(wxWindow* win, int pollingFreq)
+{
+    if (m_thread)
+    {
+        m_thread->m_catchwin = win;
+        m_thread->m_polling = pollingFreq;
+        return true;
+    }
+    return false;
+}
+
+bool wxJoystick::ReleaseCapture()
+{
+    if (m_thread)
+    {
+        m_thread->m_catchwin = NULL;
+        m_thread->m_polling = 0;
+        return true;
+    }
+    return false;
+}
+#endif
+    //OSX 
+    
+#endif
+    // wxUSE_JOYSTICK
+