ADDED src/hid/OHDualSenseGamepad+Private.h Index: src/hid/OHDualSenseGamepad+Private.h ================================================================== --- /dev/null +++ src/hid/OHDualSenseGamepad+Private.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2008-2024 Jonathan Schleifer + * + * All rights reserved. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License version 3.0 only, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * version 3.0 for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * version 3.0 along with this program. If not, see + * . + */ + +#import "OHDualSenseGamepad.h" + +#if defined(OF_LINUX) && defined(OF_HAVE_FILES) +# import "OHEvdevGameController.h" +#endif + +OF_ASSUME_NONNULL_BEGIN + +#if defined(OF_LINUX) && defined(OF_HAVE_FILES) +@interface OHDualSenseGamepad () +@end +#endif + +OF_ASSUME_NONNULL_END Index: src/hid/OHDualSenseGamepad.h ================================================================== --- src/hid/OHDualSenseGamepad.h +++ src/hid/OHDualSenseGamepad.h @@ -16,26 +16,19 @@ * version 3.0 along with this program. If not, see * . */ #import "OHExtendedGamepad.h" -#if defined(OF_LINUX) && defined(OF_HAVE_FILES) -# import "OHEvdevGameController.h" -#endif OF_ASSUME_NONNULL_BEGIN /** * @class OHDualSenseGamepad OHDualSenseGamepad.h ObjFWHID/ObjFWHID.h * * @brief A Sony DualSense gamepad. */ -@interface OHDualSenseGamepad: OFObject +@interface OHDualSenseGamepad: OFObject { OFDictionary OF_GENERIC(OFString *, OHGameControllerButton *) *_buttons; OFDictionary OF_GENERIC(OFString *, OHGameControllerDirectionalPad *) *_directionalPads; } Index: src/hid/OHDualSenseGamepad.m ================================================================== --- src/hid/OHDualSenseGamepad.m +++ src/hid/OHDualSenseGamepad.m @@ -18,10 +18,11 @@ */ #include "config.h" #import "OHDualSenseGamepad.h" +#import "OHDualSenseGamepad+Private.h" #import "OFDictionary.h" #import "OHEmulatedGameControllerTriggerButton.h" #import "OHGameControllerAxis.h" #import "OHGameControllerButton.h" #import "OHGameControllerDirectionalPad.h" ADDED src/hid/OHDualShock4Gamepad+Private.h Index: src/hid/OHDualShock4Gamepad+Private.h ================================================================== --- /dev/null +++ src/hid/OHDualShock4Gamepad+Private.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2008-2024 Jonathan Schleifer + * + * All rights reserved. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License version 3.0 only, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * version 3.0 for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * version 3.0 along with this program. If not, see + * . + */ + +#import "OHDualShock4Gamepad.h" + +#if defined(OF_LINUX) && defined(OF_HAVE_FILES) +# import "OHEvdevGameController.h" +#endif + +OF_ASSUME_NONNULL_BEGIN + +#if defined(OF_LINUX) && defined(OF_HAVE_FILES) +@interface OHDualShock4Gamepad () +@end +#endif + +OF_ASSUME_NONNULL_END Index: src/hid/OHDualShock4Gamepad.h ================================================================== --- src/hid/OHDualShock4Gamepad.h +++ src/hid/OHDualShock4Gamepad.h @@ -16,26 +16,19 @@ * version 3.0 along with this program. If not, see * . */ #import "OHExtendedGamepad.h" -#if defined(OF_LINUX) && defined(OF_HAVE_FILES) -# import "OHEvdevGameController.h" -#endif OF_ASSUME_NONNULL_BEGIN /** * @class OHDualShock4Gamepad OHDualShock4Gamepad.h ObjFWHID/ObjFWHID.h * * @brief A Sony DualShock 4 gamepad. */ -@interface OHDualShock4Gamepad: OFObject +@interface OHDualShock4Gamepad: OFObject { OFDictionary OF_GENERIC(OFString *, OHGameControllerButton *) *_buttons; OFDictionary OF_GENERIC(OFString *, OHGameControllerDirectionalPad *) *_directionalPads; } Index: src/hid/OHDualShock4Gamepad.m ================================================================== --- src/hid/OHDualShock4Gamepad.m +++ src/hid/OHDualShock4Gamepad.m @@ -18,10 +18,11 @@ */ #include "config.h" #import "OHDualShock4Gamepad.h" +#import "OHDualShock4Gamepad+Private.h" #import "OFDictionary.h" #import "OHEmulatedGameControllerTriggerButton.h" #import "OHGameControllerAxis.h" #import "OHGameControllerButton.h" #import "OHGameControllerDirectionalPad.h" Index: src/hid/OHEvdevGameController.m ================================================================== --- src/hid/OHEvdevGameController.m +++ src/hid/OHEvdevGameController.m @@ -30,20 +30,27 @@ #import "OFFileManager.h" #import "OFLocale.h" #import "OFNumber.h" #import "OHDualSenseGamepad.h" +#import "OHDualSenseGamepad+Private.h" #import "OHDualShock4Gamepad.h" +#import "OHDualShock4Gamepad+Private.h" #import "OHEvdevExtendedGamepad.h" #import "OHExtendedN64Controller.h" #import "OHGameControllerAxis+Private.h" #import "OHGameControllerAxis.h" #import "OHGameControllerButton.h" #import "OHGameControllerProfile.h" #import "OHLeftJoyCon.h" +#import "OHLeftJoyCon+Private.h" +#import "OHN64Controller.h" +#import "OHN64Controller+Private.h" #import "OHRightJoyCon.h" +#import "OHRightJoyCon+Private.h" #import "OHStadiaGamepad.h" +#import "OHStadiaGamepad+Private.h" #include #include #import "OFInitializationFailedException.h" Index: src/hid/OHExtendedN64Controller.m ================================================================== --- src/hid/OHExtendedN64Controller.m +++ src/hid/OHExtendedN64Controller.m @@ -18,10 +18,11 @@ */ #include "config.h" #import "OHExtendedN64Controller.h" +#import "OHN64Controller+Private.h" #import "OFDictionary.h" #import "OHGameControllerButton.h" #if defined(OF_LINUX) && defined(OF_HAVE_FILES) # include ADDED src/hid/OHLeftJoyCon+Private.h Index: src/hid/OHLeftJoyCon+Private.h ================================================================== --- /dev/null +++ src/hid/OHLeftJoyCon+Private.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2008-2024 Jonathan Schleifer + * + * All rights reserved. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License version 3.0 only, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * version 3.0 for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * version 3.0 along with this program. If not, see + * . + */ + +#import "OHLeftJoyCon.h" + +#if defined(OF_LINUX) && defined(OF_HAVE_FILES) +# import "OHEvdevGameController.h" +#endif + +OF_ASSUME_NONNULL_BEGIN + +#if defined(OF_LINUX) && defined(OF_HAVE_FILES) +@interface OHLeftJoyCon () +@end +#endif + +OF_ASSUME_NONNULL_END Index: src/hid/OHLeftJoyCon.h ================================================================== --- src/hid/OHLeftJoyCon.h +++ src/hid/OHLeftJoyCon.h @@ -16,26 +16,19 @@ * version 3.0 along with this program. If not, see * . */ #import "OHGameControllerProfile.h" -#if defined(OF_LINUX) && defined(OF_HAVE_FILES) -# import "OHEvdevGameController.h" -#endif OF_ASSUME_NONNULL_BEGIN /** * @class OHLeftJoyCon OHLeftJoyCon.h ObjFWHID/ObjFWHID.h * * @brief A left Nintendo Switch Joy-Con. */ -@interface OHLeftJoyCon: OFObject +@interface OHLeftJoyCon: OFObject { OFDictionary OF_GENERIC(OFString *, OHGameControllerButton *) *_buttons; OFDictionary OF_GENERIC(OFString *, OHGameControllerDirectionalPad *) *_directionalPads; } Index: src/hid/OHLeftJoyCon.m ================================================================== --- src/hid/OHLeftJoyCon.m +++ src/hid/OHLeftJoyCon.m @@ -18,10 +18,11 @@ */ #include "config.h" #import "OHLeftJoyCon.h" +#import "OHLeftJoyCon+Private.h" #import "OFDictionary.h" #import "OHGameControllerAxis.h" #import "OHGameControllerButton.h" #import "OHGameControllerDirectionalPad.h" ADDED src/hid/OHN64Controller+Private.h Index: src/hid/OHN64Controller+Private.h ================================================================== --- /dev/null +++ src/hid/OHN64Controller+Private.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2008-2024 Jonathan Schleifer + * + * All rights reserved. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License version 3.0 only, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * version 3.0 for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * version 3.0 along with this program. If not, see + * . + */ + +#import "OHN64Controller.h" + +#if defined(OF_LINUX) && defined(OF_HAVE_FILES) +# import "OHEvdevGameController.h" +#endif + +OF_ASSUME_NONNULL_BEGIN + +#if defined(OF_LINUX) && defined(OF_HAVE_FILES) +@interface OHN64Controller () +@end +#endif + +OF_ASSUME_NONNULL_END Index: src/hid/OHN64Controller.h ================================================================== --- src/hid/OHN64Controller.h +++ src/hid/OHN64Controller.h @@ -16,26 +16,19 @@ * version 3.0 along with this program. If not, see * . */ #import "OHGameControllerProfile.h" -#if defined(OF_LINUX) && defined(OF_HAVE_FILES) -# import "OHEvdevGameController.h" -#endif OF_ASSUME_NONNULL_BEGIN /** * @class OHN64Controller OHN64Controller.h ObjFWHID/ObjFWHID.h * * @brief A Nintendo 64 controller. */ -@interface OHN64Controller: OFObject +@interface OHN64Controller: OFObject { OFDictionary OF_GENERIC(OFString *, OHGameControllerButton *) *_buttons; OFDictionary OF_GENERIC(OFString *, OHGameControllerDirectionalPad *) *_directionalPads; } Index: src/hid/OHN64Controller.m ================================================================== --- src/hid/OHN64Controller.m +++ src/hid/OHN64Controller.m @@ -18,10 +18,11 @@ */ #include "config.h" #import "OHN64Controller.h" +#import "OHN64Controller+Private.h" #import "OFDictionary.h" #import "OHGameControllerAxis.h" #import "OHGameControllerButton.h" #import "OHGameControllerDirectionalPad.h" ADDED src/hid/OHRightJoyCon+Private.h Index: src/hid/OHRightJoyCon+Private.h ================================================================== --- /dev/null +++ src/hid/OHRightJoyCon+Private.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2008-2024 Jonathan Schleifer + * + * All rights reserved. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License version 3.0 only, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * version 3.0 for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * version 3.0 along with this program. If not, see + * . + */ + +#import "OHRightJoyCon.h" + +#if defined(OF_LINUX) && defined(OF_HAVE_FILES) +# import "OHEvdevGameController.h" +#endif + +OF_ASSUME_NONNULL_BEGIN + +#if defined(OF_LINUX) && defined(OF_HAVE_FILES) +@interface OHRightJoyCon () +@end +#endif + +OF_ASSUME_NONNULL_END Index: src/hid/OHRightJoyCon.h ================================================================== --- src/hid/OHRightJoyCon.h +++ src/hid/OHRightJoyCon.h @@ -16,26 +16,19 @@ * version 3.0 along with this program. If not, see * . */ #import "OHGameControllerProfile.h" -#if defined(OF_LINUX) && defined(OF_HAVE_FILES) -# import "OHEvdevGameController.h" -#endif OF_ASSUME_NONNULL_BEGIN /** * @class OHRightJoyCon OHRightJoyCon.h ObjFWHID/ObjFWHID.h * * @brief A right Nintendo Switch Joy-Con. */ -@interface OHRightJoyCon: OFObject +@interface OHRightJoyCon: OFObject { OFDictionary OF_GENERIC(OFString *, OHGameControllerButton *) *_buttons; OFDictionary OF_GENERIC(OFString *, OHGameControllerDirectionalPad *) *_directionalPads; } Index: src/hid/OHRightJoyCon.m ================================================================== --- src/hid/OHRightJoyCon.m +++ src/hid/OHRightJoyCon.m @@ -18,10 +18,11 @@ */ #include "config.h" #import "OHRightJoyCon.h" +#import "OHRightJoyCon+Private.h" #import "OFDictionary.h" #import "OHGameControllerAxis.h" #import "OHGameControllerButton.h" #import "OHGameControllerDirectionalPad.h" ADDED src/hid/OHStadiaGamepad+Private.h Index: src/hid/OHStadiaGamepad+Private.h ================================================================== --- /dev/null +++ src/hid/OHStadiaGamepad+Private.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2008-2024 Jonathan Schleifer + * + * All rights reserved. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License version 3.0 only, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * version 3.0 for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * version 3.0 along with this program. If not, see + * . + */ + +#import "OHStadiaGamepad.h" + +#if defined(OF_LINUX) && defined(OF_HAVE_FILES) +# import "OHEvdevGameController.h" +#endif + +OF_ASSUME_NONNULL_BEGIN + +#if defined(OF_LINUX) && defined(OF_HAVE_FILES) +@interface OHStadiaGamepad () +@end +#endif + +OF_ASSUME_NONNULL_END Index: src/hid/OHStadiaGamepad.h ================================================================== --- src/hid/OHStadiaGamepad.h +++ src/hid/OHStadiaGamepad.h @@ -16,26 +16,19 @@ * version 3.0 along with this program. If not, see * . */ #import "OHExtendedGamepad.h" -#if defined(OF_LINUX) && defined(OF_HAVE_FILES) -# import "OHEvdevGameController.h" -#endif OF_ASSUME_NONNULL_BEGIN /** * @class OHStadiaGamepad OHStadiaGamepad.h ObjFWHID/ObjFWHID.h * * @brief A Stadia gamepad. */ -@interface OHStadiaGamepad: OFObject +@interface OHStadiaGamepad: OFObject { OFDictionary OF_GENERIC(OFString *, OHGameControllerButton *) *_buttons; OFDictionary OF_GENERIC(OFString *, OHGameControllerDirectionalPad *) *_directionalPads; } Index: src/hid/OHStadiaGamepad.m ================================================================== --- src/hid/OHStadiaGamepad.m +++ src/hid/OHStadiaGamepad.m @@ -18,10 +18,11 @@ */ #include "config.h" #import "OHStadiaGamepad.h" +#import "OHStadiaGamepad+Private.h" #import "OFDictionary.h" #import "OHEmulatedGameControllerTriggerButton.h" #import "OHGameControllerAxis.h" #import "OHGameControllerButton.h" #import "OHGameControllerDirectionalPad.h"