1//--------------------------------------------------------------------------- 2// This file is generated by wxPython's SIP generator. Do not edit by hand. 3// 4// Copyright: (c) 2018 by Total Control Software 5// License: wxWindows License 6// 7// This file will be included by _adv.sip 8// 9//--------------------------------------------------------------------------- 10 11%ModuleHeaderCode 12#if !wxUSE_JOYSTICK 13class wxJoystick; 14 15class wxJoystick : public wxObject { 16public: 17 wxJoystick(int joystick=wxJOYSTICK1) 18 { wxPyRaiseNotImplemented(); } 19 20 virtual ~wxJoystick() 21 { } 22 23 int GetButtonState() const 24 { return 0; } 25 26 bool GetButtonState(unsigned int id) const 27 { return false; } 28 29 int GetManufacturerId() const 30 { return 0; } 31 32 int GetMovementThreshold() const 33 { return 0; } 34 35 int GetNumberAxes() const 36 { return 0; } 37 38 int GetNumberButtons() const 39 { return 0; } 40 41 int GetPOVCTSPosition() const 42 { return 0; } 43 44 int GetPOVPosition() const 45 { return 0; } 46 47 int GetPollingMax() const 48 { return 0; } 49 50 int GetPollingMin() const 51 { return 0; } 52 53 wxPoint GetPosition() const 54 { return wxDefaultPosition; } 55 56 int GetPosition(unsigned int axis) const 57 { return 0; } 58 59 int GetProductId() const 60 { return 0; } 61 62 wxString GetProductName() const 63 { return wxEmptyString; } 64 65 int GetRudderMax() const 66 { return 0; } 67 68 int GetRudderMin() const 69 { return 0; } 70 71 int GetRudderPosition() const 72 { return 0; } 73 74 int GetUMax() const 75 { return 0; } 76 77 int GetUMin() const 78 { return 0; } 79 80 int GetUPosition() const 81 { return 0; } 82 83 int GetVMax() const 84 { return 0; } 85 86 int GetVMin() const 87 { return 0; } 88 89 int GetVPosition() const 90 { return 0; } 91 92 int GetXMax() const 93 { return 0; } 94 95 int GetXMin() const 96 { return 0; } 97 98 int GetYMax() const 99 { return 0; } 100 101 int GetYMin() const 102 { return 0; } 103 104 int GetZMax() const 105 { return 0; } 106 107 int GetZMin() const 108 { return 0; } 109 110 int GetZPosition() const 111 { return 0; } 112 113 bool HasPOV() const 114 { return false; } 115 116 bool HasPOV4Dir() const 117 { return false; } 118 119 bool HasPOVCTS() const 120 { return false; } 121 122 bool HasRudder() const 123 { return false; } 124 125 bool HasU() const 126 { return false; } 127 128 bool HasV() const 129 { return false; } 130 131 bool HasZ() const 132 { return false; } 133 134 bool IsOk() const 135 { return false; } 136 137 bool ReleaseCapture() 138 { return false; } 139 140 bool SetCapture(wxWindow *win, int pollingFreq=0) 141 { return false; } 142 143 void SetMovementThreshold(int threshold) 144 { } 145 146 static int GetNumberJoysticks() 147 { wxPyRaiseNotImplemented(); return 0; } 148 149 int GetMaxButtons() const 150 { return 0; } 151 152 int GetMaxAxes() const 153 { return 0; } 154 155}; 156#endif //!wxUSE_JOYSTICK 157 158%End 159 160 161//--------------------------------------------------------------------------- 162 163class wxJoystick : wxObject 164{ 165 %Docstring 166 Joystick(joystick=wx.JOYSTICK1) 167 168 wxJoystick allows an application to control one or more joysticks. 169 %End 170 %TypeHeaderCode 171 #include <wx/joystick.h> 172 %End 173 174public: 175 wxJoystick( 176 int joystick = wxJOYSTICK1 177 ); 178 %PreMethodCode 179 if (!wxPyCheckForApp()) return NULL; 180 %End 181 182 virtual 183 ~wxJoystick(); 184 185 int GetButtonState() const; 186 %Docstring 187 GetButtonState() -> int 188 GetButtonState(id) -> bool 189 190 Returns the state of the joystick buttons. 191 %End 192 193 bool GetButtonState( 194 unsigned int id 195 ) const; 196 197 int GetManufacturerId() const; 198 %Docstring 199 GetManufacturerId() -> int 200 201 Returns the manufacturer id. 202 %End 203 204 int GetMovementThreshold() const; 205 %Docstring 206 GetMovementThreshold() -> int 207 208 Returns the movement threshold, the number of steps outside which the 209 joystick is deemed to have moved. 210 %End 211 212 int GetNumberAxes() const; 213 %Docstring 214 GetNumberAxes() -> int 215 216 Returns the number of axes for this joystick. 217 %End 218 219 int GetNumberButtons() const; 220 %Docstring 221 GetNumberButtons() -> int 222 223 Returns the number of buttons for this joystick. 224 %End 225 226 int GetPOVCTSPosition() const; 227 %Docstring 228 GetPOVCTSPosition() -> int 229 230 Returns the point-of-view position, expressed in continuous, one- 231 hundredth of a degree units. 232 %End 233 234 int GetPOVPosition() const; 235 %Docstring 236 GetPOVPosition() -> int 237 238 Returns the point-of-view position, expressed in continuous, one- 239 hundredth of a degree units, but limited to return 0, 9000, 18000 or 240 27000. 241 %End 242 243 int GetPollingMax() const; 244 %Docstring 245 GetPollingMax() -> int 246 247 Returns the maximum polling frequency. 248 %End 249 250 int GetPollingMin() const; 251 %Docstring 252 GetPollingMin() -> int 253 254 Returns the minimum polling frequency. 255 %End 256 257 wxPoint GetPosition() const; 258 %Docstring 259 GetPosition() -> wx.Point 260 GetPosition(axis) -> int 261 262 Returns the x, y position of the joystick. 263 %End 264 265 int GetPosition( 266 unsigned int axis 267 ) const; 268 269 int GetProductId() const; 270 %Docstring 271 GetProductId() -> int 272 273 Returns the product id for the joystick. 274 %End 275 276 wxString GetProductName() const; 277 %Docstring 278 GetProductName() -> String 279 280 Returns the product name for the joystick. 281 %End 282 283 int GetRudderMax() const; 284 %Docstring 285 GetRudderMax() -> int 286 287 Returns the maximum rudder position. 288 %End 289 290 int GetRudderMin() const; 291 %Docstring 292 GetRudderMin() -> int 293 294 Returns the minimum rudder position. 295 %End 296 297 int GetRudderPosition() const; 298 %Docstring 299 GetRudderPosition() -> int 300 301 Returns the rudder position. 302 %End 303 304 int GetUMax() const; 305 %Docstring 306 GetUMax() -> int 307 308 Returns the maximum U position. 309 %End 310 311 int GetUMin() const; 312 %Docstring 313 GetUMin() -> int 314 315 Returns the minimum U position. 316 %End 317 318 int GetUPosition() const; 319 %Docstring 320 GetUPosition() -> int 321 322 Gets the position of the fifth axis of the joystick, if it exists. 323 %End 324 325 int GetVMax() const; 326 %Docstring 327 GetVMax() -> int 328 329 Returns the maximum V position. 330 %End 331 332 int GetVMin() const; 333 %Docstring 334 GetVMin() -> int 335 336 Returns the minimum V position. 337 %End 338 339 int GetVPosition() const; 340 %Docstring 341 GetVPosition() -> int 342 343 Gets the position of the sixth axis of the joystick, if it exists. 344 %End 345 346 int GetXMax() const; 347 %Docstring 348 GetXMax() -> int 349 350 Returns the maximum x position. 351 %End 352 353 int GetXMin() const; 354 %Docstring 355 GetXMin() -> int 356 357 Returns the minimum x position. 358 %End 359 360 int GetYMax() const; 361 %Docstring 362 GetYMax() -> int 363 364 Returns the maximum y position. 365 %End 366 367 int GetYMin() const; 368 %Docstring 369 GetYMin() -> int 370 371 Returns the minimum y position. 372 %End 373 374 int GetZMax() const; 375 %Docstring 376 GetZMax() -> int 377 378 Returns the maximum z position. 379 %End 380 381 int GetZMin() const; 382 %Docstring 383 GetZMin() -> int 384 385 Returns the minimum z position. 386 %End 387 388 int GetZPosition() const; 389 %Docstring 390 GetZPosition() -> int 391 392 Returns the z position of the joystick. 393 %End 394 395 bool HasPOV() const; 396 %Docstring 397 HasPOV() -> bool 398 399 Returns true if the joystick has a point of view control. 400 %End 401 402 bool HasPOV4Dir() const; 403 %Docstring 404 HasPOV4Dir() -> bool 405 406 Returns true if the joystick point-of-view supports discrete values 407 (centered, forward, backward, left, and right). 408 %End 409 410 bool HasPOVCTS() const; 411 %Docstring 412 HasPOVCTS() -> bool 413 414 Returns true if the joystick point-of-view supports continuous degree 415 bearings. 416 %End 417 418 bool HasRudder() const; 419 %Docstring 420 HasRudder() -> bool 421 422 Returns true if there is a rudder attached to the computer. 423 %End 424 425 bool HasU() const; 426 %Docstring 427 HasU() -> bool 428 429 Returns true if the joystick has a U axis. 430 %End 431 432 bool HasV() const; 433 %Docstring 434 HasV() -> bool 435 436 Returns true if the joystick has a V axis. 437 %End 438 439 bool HasZ() const; 440 %Docstring 441 HasZ() -> bool 442 443 Returns true if the joystick has a Z axis. 444 %End 445 446 bool IsOk() const; 447 %Docstring 448 IsOk() -> bool 449 450 Returns true if the joystick is functioning. 451 %End 452 453 bool ReleaseCapture(); 454 %Docstring 455 ReleaseCapture() -> bool 456 457 Releases the capture set by SetCapture. 458 %End 459 460 bool SetCapture( 461 wxWindow * win, 462 int pollingFreq = 0 463 ); 464 %Docstring 465 SetCapture(win, pollingFreq=0) -> bool 466 467 Sets the capture to direct joystick events to win. 468 %End 469 470 void SetMovementThreshold( 471 int threshold 472 ); 473 %Docstring 474 SetMovementThreshold(threshold) 475 476 Sets the movement threshold, the number of steps outside which the 477 joystick is deemed to have moved. 478 %End 479 480 static 481 int GetNumberJoysticks(); 482 %Docstring 483 GetNumberJoysticks() -> int 484 485 Returns the number of joysticks currently attached to the computer. 486 %End 487 488 int GetMaxButtons() const; 489 %Docstring 490 GetMaxButtons() -> int 491 %End 492 493 int GetMaxAxes() const; 494 %Docstring 495 GetMaxAxes() -> int 496 %End 497 498 public: 499 500 501 %Property(name=ButtonState, get=GetButtonState) 502 %Property(name=ManufacturerId, get=GetManufacturerId) 503 %Property(name=MaxAxes, get=GetMaxAxes) 504 %Property(name=MaxButtons, get=GetMaxButtons) 505 %Property(name=MovementThreshold, get=GetMovementThreshold, set=SetMovementThreshold) 506 %Property(name=NumberAxes, get=GetNumberAxes) 507 %Property(name=NumberButtons, get=GetNumberButtons) 508 %Property(name=POVCTSPosition, get=GetPOVCTSPosition) 509 %Property(name=POVPosition, get=GetPOVPosition) 510 %Property(name=PollingMax, get=GetPollingMax) 511 %Property(name=PollingMin, get=GetPollingMin) 512 %Property(name=Position, get=GetPosition) 513 %Property(name=ProductId, get=GetProductId) 514 %Property(name=ProductName, get=GetProductName) 515 %Property(name=RudderMax, get=GetRudderMax) 516 %Property(name=RudderMin, get=GetRudderMin) 517 %Property(name=RudderPosition, get=GetRudderPosition) 518 %Property(name=UMax, get=GetUMax) 519 %Property(name=UMin, get=GetUMin) 520 %Property(name=UPosition, get=GetUPosition) 521 %Property(name=VMax, get=GetVMax) 522 %Property(name=VMin, get=GetVMin) 523 %Property(name=VPosition, get=GetVPosition) 524 %Property(name=XMax, get=GetXMax) 525 %Property(name=XMin, get=GetXMin) 526 %Property(name=YMax, get=GetYMax) 527 %Property(name=YMin, get=GetYMin) 528 %Property(name=ZMax, get=GetZMax) 529 %Property(name=ZMin, get=GetZMin) 530 %Property(name=ZPosition, get=GetZPosition) 531}; // end of class wxJoystick 532 533 534const int wxUSE_JOYSTICK; 535 536//--------------------------------------------------------------------------- 537 538