1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895
/// C++ type: <span style='color: green;'>```QScroller::Input```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#Input-enum">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>This enum contains an input device agnostic view of input events that are relevant for <a href="http://doc.qt.io/qt-5/qscroller.html">QScroller</a>.</p></div>
#[derive(Debug, PartialEq, Eq, Clone)]
#[repr(C)]
pub enum Input {
/// The user pressed the input device (e.g. <a href="http://doc.qt.io/qt-5/qevent.html#Type-enum">QEvent::MouseButtonPress</a>, <a href="http://doc.qt.io/qt-5/qevent.html#Type-enum">QEvent::GraphicsSceneMousePress</a>, <a href="http://doc.qt.io/qt-5/qevent.html#Type-enum">QEvent::TouchBegin</a>) (C++ enum variant: <span style='color: green;'>```InputPress = 1```</span>)
Press = 1,
/// The user moved the input device (e.g. <a href="http://doc.qt.io/qt-5/qevent.html#Type-enum">QEvent::MouseMove</a>, <a href="http://doc.qt.io/qt-5/qevent.html#Type-enum">QEvent::GraphicsSceneMouseMove</a>, <a href="http://doc.qt.io/qt-5/qevent.html#Type-enum">QEvent::TouchUpdate</a>) (C++ enum variant: <span style='color: green;'>```InputMove = 2```</span>)
Move = 2,
/// The user released the input device (e.g. <a href="http://doc.qt.io/qt-5/qevent.html#Type-enum">QEvent::MouseButtonRelease</a>, <a href="http://doc.qt.io/qt-5/qevent.html#Type-enum">QEvent::GraphicsSceneMouseRelease</a>, <a href="http://doc.qt.io/qt-5/qevent.html#Type-enum">QEvent::TouchEnd</a>) (C++ enum variant: <span style='color: green;'>```InputRelease = 3```</span>)
Release = 3,
}
/// C++ type: <span style='color: green;'>```QScroller```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>The <a href="http://doc.qt.io/qt-5/qscroller.html">QScroller</a> class enables kinetic scrolling for any scrolling widget or graphics item.</p>
/// <p>With kinetic scrolling, the user can push the widget in a given direction and it will continue to scroll in this direction until it is stopped either by the user or by friction. Aspects of inertia, friction and other physical concepts can be changed in order to fine-tune an intuitive user experience.</p>
/// <p>The <a href="http://doc.qt.io/qt-5/qscroller.html">QScroller</a> object is the object that stores the current position and scrolling speed and takes care of updates. <a href="http://doc.qt.io/qt-5/qscroller.html">QScroller</a> can be triggered by a flick gesture</p>
/// <pre class="cpp">
/// <span class="type"><a href="http://doc.qt.io/qt-5/qwidget.html">QWidget</a></span> <span class="operator">*</span>w <span class="operator">=</span> <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>;
/// <span class="type">QScroller</span><span class="operator">::</span>grabGesture(w<span class="operator">,</span> <span class="type">QScroller</span><span class="operator">::</span>LeftMouseButtonGesture);
///
/// </pre>
/// <p>or directly like this:</p>
/// <pre class="cpp">
/// <span class="type"><a href="http://doc.qt.io/qt-5/qwidget.html">QWidget</a></span> <span class="operator">*</span>w <span class="operator">=</span> <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>;
/// <span class="type">QScroller</span> <span class="operator">*</span>scroller <span class="operator">=</span> <span class="type">QScroller</span><span class="operator">::</span>scroller(w);
/// scroller<span class="operator">-</span><span class="operator">></span>scrollTo(<span class="type"><a href="http://doc.qt.io/qt-5/qpointf.html">QPointF</a></span>(<span class="number">100</span><span class="operator">,</span> <span class="number">100</span>));
///
/// </pre>
/// <p>The scrolled QObjects receive a <a href="http://doc.qt.io/qt-5/qscrollprepareevent.html">QScrollPrepareEvent</a> whenever the scroller needs to update its geometry information and a <a href="http://doc.qt.io/qt-5/qscrollevent.html">QScrollEvent</a> whenever the content of the object should actually be scrolled.</p>
/// <p>The scroller uses the global <a href="http://doc.qt.io/qt-5/qabstractanimation.html">QAbstractAnimation</a> timer to generate its QScrollEvents. This can be changed with <a href="http://doc.qt.io/qt-5/qscrollerproperties.html#ScrollMetric-enum">QScrollerProperties::FrameRate</a> on a per-<a href="http://doc.qt.io/qt-5/qscroller.html">QScroller</a> basis.</p>
/// <p>Several examples in the <code>scroller</code> examples directory show how <a href="http://doc.qt.io/qt-5/qscroller.html">QScroller</a>, <a href="http://doc.qt.io/qt-5/qscrollevent.html">QScrollEvent</a> and the scroller gesture can be used.</p>
/// <p>Even though this kinetic scroller has a large number of settings available via <a href="http://doc.qt.io/qt-5/qscrollerproperties.html">QScrollerProperties</a>, we recommend that you leave them all at their default, platform optimized values. Before changing them you can experiment with the <code>plot</code> example in the <code>scroller</code> examples directory.</p></div>
#[repr(C)]
pub struct Scroller(u8);
impl Scroller {
/// C++ method: <span style='color: green;'>```static QList<QScroller*> QScroller::activeScrollers()```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#activeScrollers">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns an application wide list of currently active <a href="http://doc.qt.io/qt-5/qscroller.html">QScroller</a> objects. Active <a href="http://doc.qt.io/qt-5/qscroller.html">QScroller</a> objects are in a <a href="http://doc.qt.io/qt-5/qscroller.html#state-prop">state</a>() that is not <a href="http://doc.qt.io/qt-5/qscroller.html#State-enum">QScroller::Inactive</a>. This function is useful when writing your own gesture recognizer.</p></div>
pub fn active_scrollers() -> ::list::ListScrollerMutPtr {
{
let mut object: ::list::ListScrollerMutPtr =
unsafe { ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized() };
unsafe {
::ffi::qt_widgets_c_QScroller_activeScrollers_to_output(&mut object);
}
object
}
}
/// C++ method: <span style='color: green;'>```QScroller::ensureVisible```</span>
///
/// This is an overloaded function. Available variants:
///
///
///
/// ## Variant 1
///
/// Rust arguments: ```fn ensure_visible(&mut self, (&::qt_core::rect_f::RectF, ::libc::c_double, ::libc::c_double)) -> ()```<br>
/// C++ method: <span style='color: green;'>```[slot] void QScroller::ensureVisible(const QRectF& rect, double xmargin, double ymargin)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#ensureVisible">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Starts scrolling so that the rectangle <i>rect</i> is visible inside the viewport with additional margins specified in pixels by <i>xmargin</i> and <i>ymargin</i> around the rect.</p>
/// <p>In cases where it is not possible to fit the rect plus margins inside the viewport the contents are scrolled so that as much as possible is visible from <i>rect</i>.</p>
/// <p>The scrolling speed is calculated so that the given position is reached after a platform-defined time span.</p>
/// <p>This function performs the actual scrolling by calling <a href="http://doc.qt.io/qt-5/qscroller.html#scrollTo">scrollTo</a>().</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qscroller.html#scrollTo">scrollTo</a>().</p></div>
///
/// ## Variant 2
///
/// Rust arguments: ```fn ensure_visible(&mut self, (&::qt_core::rect_f::RectF, ::libc::c_double, ::libc::c_double, ::libc::c_int)) -> ()```<br>
/// C++ method: <span style='color: green;'>```[slot] void QScroller::ensureVisible(const QRectF& rect, double xmargin, double ymargin, int scrollTime)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#ensureVisible-1">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>This is an overloaded function.</p>
/// <p>This version will reach its destination position in <i>scrollTime</i> milliseconds.</p></div>
pub fn ensure_visible<'largs, Args>(&'largs mut self, args: Args) -> ()
where Args: overloading::ScrollerEnsureVisibleArgs<'largs>
{
args.exec(self)
}
/// C++ method: <span style='color: green;'>```QPointF QScroller::finalPosition() const```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#finalPosition">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns the estimated final position for the current scroll movement. Returns the current position if the scroller state is not Scrolling. The result is undefined when the scroller state is Inactive.</p>
/// <p>The target position is in pixel.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qscroller.html#pixelPerMeter">pixelPerMeter</a>() and <a href="http://doc.qt.io/qt-5/qscroller.html#scrollTo">scrollTo</a>().</p></div>
pub fn final_position(&self) -> ::qt_core::point_f::PointF {
{
let mut object: ::qt_core::point_f::PointF =
unsafe { ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized() };
unsafe {
::ffi::qt_widgets_c_QScroller_finalPosition_to_output(self as *const ::scroller::Scroller, &mut object);
}
object
}
}
/// C++ method: <span style='color: green;'>```QScroller::grabGesture```</span>
///
/// This is an overloaded function. Available variants:
///
///
///
/// ## Variant 1
///
/// Rust arguments: ```fn grab_gesture(*mut ::qt_core::object::Object) -> ::qt_core::qt::GestureType```<br>
/// C++ method: <span style='color: green;'>```static Qt::GestureType QScroller::grabGesture(QObject* target)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#grabGesture">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Registers a custom scroll gesture recognizer, grabs it for the <i>target</i> and returns the resulting gesture type. If <i>scrollGestureType</i> is set to <a href="http://doc.qt.io/qt-5/qscroller.html#ScrollerGestureType-enum">TouchGesture</a> the gesture triggers on touch events. If it is set to one of <a href="http://doc.qt.io/qt-5/qscroller.html#ScrollerGestureType-enum">LeftMouseButtonGesture</a>, <a href="http://doc.qt.io/qt-5/qscroller.html#ScrollerGestureType-enum">RightMouseButtonGesture</a> or <a href="http://doc.qt.io/qt-5/qscroller.html#ScrollerGestureType-enum">MiddleMouseButtonGesture</a> it triggers on mouse events of the corresponding button.</p>
/// <p>Only one scroll gesture can be active on a single object at the same time. If you call this function twice on the same object, it will ungrab the existing gesture before grabbing the new one.</p>
/// <p><b>Note: </b>To avoid unwanted side-effects, mouse events are consumed while the gesture is triggered. Since the initial mouse press event is not consumed, the gesture sends a fake mouse release event at the global position <code>(INT_MIN, INT_MIN)</code>. This ensures that internal states of the widget that received the original mouse press are consistent.</p><p><b>See also </b><a href="http://doc.qt.io/qt-5/qscroller.html#ungrabGesture">ungrabGesture</a>() and <a href="http://doc.qt.io/qt-5/qscroller.html#grabbedGesture">grabbedGesture</a>().</p></div>
///
/// ## Variant 2
///
/// Rust arguments: ```fn grab_gesture((*mut ::qt_core::object::Object, ::scroller::ScrollerGestureType)) -> ::qt_core::qt::GestureType```<br>
/// C++ method: <span style='color: green;'>```static Qt::GestureType QScroller::grabGesture(QObject* target, QScroller::ScrollerGestureType gestureType = ?)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#grabGesture">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Registers a custom scroll gesture recognizer, grabs it for the <i>target</i> and returns the resulting gesture type. If <i>scrollGestureType</i> is set to <a href="http://doc.qt.io/qt-5/qscroller.html#ScrollerGestureType-enum">TouchGesture</a> the gesture triggers on touch events. If it is set to one of <a href="http://doc.qt.io/qt-5/qscroller.html#ScrollerGestureType-enum">LeftMouseButtonGesture</a>, <a href="http://doc.qt.io/qt-5/qscroller.html#ScrollerGestureType-enum">RightMouseButtonGesture</a> or <a href="http://doc.qt.io/qt-5/qscroller.html#ScrollerGestureType-enum">MiddleMouseButtonGesture</a> it triggers on mouse events of the corresponding button.</p>
/// <p>Only one scroll gesture can be active on a single object at the same time. If you call this function twice on the same object, it will ungrab the existing gesture before grabbing the new one.</p>
/// <p><b>Note: </b>To avoid unwanted side-effects, mouse events are consumed while the gesture is triggered. Since the initial mouse press event is not consumed, the gesture sends a fake mouse release event at the global position <code>(INT_MIN, INT_MIN)</code>. This ensures that internal states of the widget that received the original mouse press are consistent.</p><p><b>See also </b><a href="http://doc.qt.io/qt-5/qscroller.html#ungrabGesture">ungrabGesture</a>() and <a href="http://doc.qt.io/qt-5/qscroller.html#grabbedGesture">grabbedGesture</a>().</p></div>
pub unsafe fn grab_gesture<Args>(args: Args) -> ::qt_core::qt::GestureType
where Args: overloading::ScrollerGrabGestureArgs
{
args.exec()
}
/// C++ method: <span style='color: green;'>```static Qt::GestureType QScroller::grabbedGesture(QObject* target)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#grabbedGesture">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns the gesture type currently grabbed for the <i>target</i> or 0 if no gesture is grabbed.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qscroller.html#grabGesture">grabGesture</a>() and <a href="http://doc.qt.io/qt-5/qscroller.html#ungrabGesture">ungrabGesture</a>().</p></div>
pub unsafe fn grabbed_gesture(target: *mut ::qt_core::object::Object) -> ::qt_core::qt::GestureType {
::ffi::qt_widgets_c_QScroller_grabbedGesture(target)
}
/// C++ method: <span style='color: green;'>```QScroller::handleInput```</span>
///
/// This is an overloaded function. Available variants:
///
///
///
/// ## Variant 1
///
/// Rust arguments: ```fn handle_input(&mut self, (::scroller::Input, &::qt_core::point_f::PointF)) -> bool```<br>
/// C++ method: <span style='color: green;'>```bool QScroller::handleInput(QScroller::Input input, const QPointF& position)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#handleInput">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>This function is used by gesture recognizers to inform the scroller about a new input event. The scroller changes its internal <a href="http://doc.qt.io/qt-5/qscroller.html#state-prop">state</a>() according to the input event and its attached scroller properties. The scroller doesn't distinguish between the kind of input device the event came from. Therefore the event needs to be split into the <i>input</i> type, a <i>position</i> and a milli-second <i>timestamp</i>. The <i>position</i> needs to be in the target's coordinate system.</p>
/// <p>The return value is <code>true</code> if the event should be consumed by the calling filter or <code>false</code> if the event should be forwarded to the control.</p>
/// <p><b>Note: </b>Using <a href="http://doc.qt.io/qt-5/qscroller.html#grabGesture">grabGesture</a>() should be sufficient for most use cases.</p></div>
///
/// ## Variant 2
///
/// Rust arguments: ```fn handle_input(&mut self, (::scroller::Input, &::qt_core::point_f::PointF, i64)) -> bool```<br>
/// C++ method: <span style='color: green;'>```bool QScroller::handleInput(QScroller::Input input, const QPointF& position, qint64 timestamp = ?)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#handleInput">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>This function is used by gesture recognizers to inform the scroller about a new input event. The scroller changes its internal <a href="http://doc.qt.io/qt-5/qscroller.html#state-prop">state</a>() according to the input event and its attached scroller properties. The scroller doesn't distinguish between the kind of input device the event came from. Therefore the event needs to be split into the <i>input</i> type, a <i>position</i> and a milli-second <i>timestamp</i>. The <i>position</i> needs to be in the target's coordinate system.</p>
/// <p>The return value is <code>true</code> if the event should be consumed by the calling filter or <code>false</code> if the event should be forwarded to the control.</p>
/// <p><b>Note: </b>Using <a href="http://doc.qt.io/qt-5/qscroller.html#grabGesture">grabGesture</a>() should be sufficient for most use cases.</p></div>
pub fn handle_input<'largs, Args>(&'largs mut self, args: Args) -> bool
where Args: overloading::ScrollerHandleInputArgs<'largs>
{
args.exec(self)
}
/// C++ method: <span style='color: green;'>```static bool QScroller::hasScroller(QObject* target)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#hasScroller">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns <code>true</code> if a <a href="http://doc.qt.io/qt-5/qscroller.html">QScroller</a> object was already created for <i>target</i>; <code>false</code> otherwise.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qscroller.html#scroller">scroller</a>().</p></div>
pub unsafe fn has_scroller(target: *mut ::qt_core::object::Object) -> bool {
::ffi::qt_widgets_c_QScroller_hasScroller(target)
}
/// C++ method: <span style='color: green;'>```virtual const QMetaObject* QScroller::metaObject() const```</span>
///
///
pub fn meta_object(&self) -> *const ::qt_core::meta_object::MetaObject {
unsafe { ::ffi::qt_widgets_c_QScroller_metaObject(self as *const ::scroller::Scroller) }
}
/// C++ method: <span style='color: green;'>```QPointF QScroller::pixelPerMeter() const```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#pixelPerMeter">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns the pixel per meter metric for the scrolled widget.</p>
/// <p>The value is reported for both the x and y axis separately by using a <a href="http://doc.qt.io/qt-5/qpointf.html">QPointF</a>.</p>
/// <p><b>Note: </b>Please note that this value should be physically correct. The actual DPI settings that Qt returns for the display may be reported wrongly on purpose by the underlying windowing system, for example on <a href="http://doc.qt.io/qt-5/internationalization.html#macos">macOS</a>.</p></div>
pub fn pixel_per_meter(&self) -> ::qt_core::point_f::PointF {
{
let mut object: ::qt_core::point_f::PointF =
unsafe { ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized() };
unsafe {
::ffi::qt_widgets_c_QScroller_pixelPerMeter_to_output(self as *const ::scroller::Scroller, &mut object);
}
object
}
}
/// C++ method: <span style='color: green;'>```virtual int QScroller::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3)```</span>
///
///
pub unsafe fn qt_metacall(&mut self,
arg1: ::qt_core::meta_object::Call,
arg2: ::libc::c_int,
arg3: *mut *mut ::libc::c_void)
-> ::libc::c_int {
::ffi::qt_widgets_c_QScroller_qt_metacall(self as *mut ::scroller::Scroller, arg1, arg2, arg3)
}
/// C++ method: <span style='color: green;'>```virtual void* QScroller::qt_metacast(const char* arg1)```</span>
///
///
pub unsafe fn qt_metacast(&mut self, arg1: *const ::libc::c_char) -> *mut ::libc::c_void {
::ffi::qt_widgets_c_QScroller_qt_metacast(self as *mut ::scroller::Scroller, arg1)
}
/// C++ method: <span style='color: green;'>```[slot] void QScroller::resendPrepareEvent()```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#resendPrepareEvent">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>This function resends the <a href="http://doc.qt.io/qt-5/qscrollprepareevent.html">QScrollPrepareEvent</a>. Calling resendPrepareEvent triggers a <a href="http://doc.qt.io/qt-5/qscrollprepareevent.html">QScrollPrepareEvent</a> from the scroller. This allows the receiver to re-set content position and content size while scrolling. Calling this function while in the Inactive state is useless as the prepare event is sent again before scrolling starts.</p></div>
pub fn resend_prepare_event(&mut self) {
unsafe { ::ffi::qt_widgets_c_QScroller_resendPrepareEvent(self as *mut ::scroller::Scroller) }
}
/// C++ method: <span style='color: green;'>```QScroller::scrollTo```</span>
///
/// This is an overloaded function. Available variants:
///
///
///
/// ## Variant 1
///
/// Rust arguments: ```fn scroll_to(&mut self, &::qt_core::point_f::PointF) -> ()```<br>
/// C++ method: <span style='color: green;'>```[slot] void QScroller::scrollTo(const QPointF& pos)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#scrollTo">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Starts scrolling the widget so that point <i>pos</i> is at the top-left position in the viewport.</p>
/// <p>The behaviour when scrolling outside the valid scroll area is undefined. In this case the scroller might or might not overshoot.</p>
/// <p>The scrolling speed will be calculated so that the given position will be reached after a platform-defined time span.</p>
/// <p><i>pos</i> is given in viewport coordinates.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qscroller.html#ensureVisible">ensureVisible</a>().</p></div>
///
/// ## Variant 2
///
/// Rust arguments: ```fn scroll_to(&mut self, (&::qt_core::point_f::PointF, ::libc::c_int)) -> ()```<br>
/// C++ method: <span style='color: green;'>```[slot] void QScroller::scrollTo(const QPointF& pos, int scrollTime)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#scrollTo-1">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>This is an overloaded function.</p>
/// <p>This version will reach its destination position in <i>scrollTime</i> milliseconds.</p></div>
pub fn scroll_to<'largs, Args>(&'largs mut self, args: Args) -> ()
where Args: overloading::ScrollerScrollToArgs<'largs>
{
args.exec(self)
}
/// C++ method: <span style='color: green;'>```QScroller::scroller```</span>
///
/// This is an overloaded function. Available variants:
///
///
///
/// ## Variant 1
///
/// Rust arguments: ```fn scroller(*mut ::qt_core::object::Object) -> *mut ::scroller::Scroller```<br>
/// C++ method: <span style='color: green;'>```static QScroller* QScroller::scroller(QObject* target)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#scroller">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns the scroller for the given <i>target</i>. As long as the object exists this function will always return the same <a href="http://doc.qt.io/qt-5/qscroller.html">QScroller</a> instance. If no <a href="http://doc.qt.io/qt-5/qscroller.html">QScroller</a> exists for the <i>target</i>, one will implicitly be created. At no point more than one <a href="http://doc.qt.io/qt-5/qscroller.html">QScroller</a> will be active on an object.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qscroller.html#hasScroller">hasScroller</a>() and <a href="http://doc.qt.io/qt-5/qscroller.html#target">target</a>().</p></div>
///
/// ## Variant 2
///
/// Rust arguments: ```fn scroller(*const ::qt_core::object::Object) -> *const ::scroller::Scroller```<br>
/// C++ method: <span style='color: green;'>```static const QScroller* QScroller::scroller(const QObject* target)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#scroller-1">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>This is an overloaded function.</p>
/// <p>This is the const version of <a href="http://doc.qt.io/qt-5/qscroller.html#scroller">scroller</a>().</p></div>
pub unsafe fn scroller<Args>(args: Args) -> Args::ReturnType
where Args: overloading::ScrollerScrollerArgs
{
args.exec()
}
/// C++ method: <span style='color: green;'>```QScrollerProperties QScroller::scrollerProperties() const```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#scrollerProperties-prop">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>This property holds the scroller properties of this scroller. The properties are used by the QScroller to determine its scrolling behavior.</p>
/// <p><b>Access functions:</b></p>
/// <div class="table"><table class="alignedsummary">
/// <tbody><tr><td class="memItemLeft topAlign rightAlign"> QScrollerProperties </td><td class="memItemRight bottomAlign"><span class="name"><b>scrollerProperties</b></span>() const</td></tr>
/// <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setScrollerProperties</b></span>(const QScrollerProperties &<i>prop</i>)</td></tr>
/// </tbody></table></div>
/// <p><b>Notifier signal:</b></p>
/// <div class="table"><table class="alignedsummary">
/// <tbody><tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="http://doc.qt.io/qt-5/qscroller.html#scrollerPropertiesChanged">scrollerPropertiesChanged</a></b></span>(const QScrollerProperties &<i>newProperties</i>)</td></tr>
/// </tbody></table></div></div>
pub fn scroller_properties(&self) -> ::cpp_utils::CppBox<::scroller_properties::ScrollerProperties> {
let ffi_result =
unsafe { ::ffi::qt_widgets_c_QScroller_scrollerProperties_as_ptr(self as *const ::scroller::Scroller) };
unsafe { ::cpp_utils::CppBox::new(ffi_result) }
}
/// C++ method: <span style='color: green;'>```[slot] void QScroller::setScrollerProperties(const QScrollerProperties& prop)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#scrollerProperties-prop">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>This property holds the scroller properties of this scroller. The properties are used by the QScroller to determine its scrolling behavior.</p>
/// <p><b>Access functions:</b></p>
/// <div class="table"><table class="alignedsummary">
/// <tbody><tr><td class="memItemLeft topAlign rightAlign"> QScrollerProperties </td><td class="memItemRight bottomAlign"><span class="name"><b>scrollerProperties</b></span>() const</td></tr>
/// <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setScrollerProperties</b></span>(const QScrollerProperties &<i>prop</i>)</td></tr>
/// </tbody></table></div>
/// <p><b>Notifier signal:</b></p>
/// <div class="table"><table class="alignedsummary">
/// <tbody><tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="http://doc.qt.io/qt-5/qscroller.html#scrollerPropertiesChanged">scrollerPropertiesChanged</a></b></span>(const QScrollerProperties &<i>newProperties</i>)</td></tr>
/// </tbody></table></div></div>
pub fn set_scroller_properties(&mut self, prop: &::scroller_properties::ScrollerProperties) {
unsafe {
::ffi::qt_widgets_c_QScroller_setScrollerProperties(self as *mut ::scroller::Scroller,
prop as *const ::scroller_properties::ScrollerProperties)
}
}
/// C++ method: <span style='color: green;'>```QScroller::setSnapPositionsX```</span>
///
/// This is an overloaded function. Available variants:
///
///
///
/// ## Variant 1
///
/// Rust arguments: ```fn set_snap_positions_x(&mut self, &::qt_gui::list::ListCDouble) -> ()```<br>
/// C++ method: <span style='color: green;'>```void QScroller::setSnapPositionsX(const QList<double>& positions)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#setSnapPositionsX">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Set the snap positions for the horizontal axis to a list of <i>positions</i>. This overwrites all previously set snap positions and also a previously set snapping interval. Snapping can be deactivated by setting an empty list of positions.</p></div>
///
/// ## Variant 2
///
/// Rust arguments: ```fn set_snap_positions_x(&mut self, (::libc::c_double, ::libc::c_double)) -> ()```<br>
/// C++ method: <span style='color: green;'>```void QScroller::setSnapPositionsX(double first, double interval)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#setSnapPositionsX-1">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Set the snap positions for the horizontal axis to regular spaced intervals. The first snap position is at <i>first</i>. The next at <i>first</i> + <i>interval</i>. This can be used to implement a list header. This overwrites all previously set snap positions and also a previously set snapping interval. Snapping can be deactivated by setting an interval of 0.0</p></div>
pub fn set_snap_positions_x<'largs, Args>(&'largs mut self, args: Args) -> ()
where Args: overloading::ScrollerSetSnapPositionsXArgs<'largs>
{
args.exec(self)
}
/// C++ method: <span style='color: green;'>```QScroller::setSnapPositionsY```</span>
///
/// This is an overloaded function. Available variants:
///
///
///
/// ## Variant 1
///
/// Rust arguments: ```fn set_snap_positions_y(&mut self, &::qt_gui::list::ListCDouble) -> ()```<br>
/// C++ method: <span style='color: green;'>```void QScroller::setSnapPositionsY(const QList<double>& positions)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#setSnapPositionsY">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Set the snap positions for the vertical axis to a list of <i>positions</i>. This overwrites all previously set snap positions and also a previously set snapping interval. Snapping can be deactivated by setting an empty list of positions.</p></div>
///
/// ## Variant 2
///
/// Rust arguments: ```fn set_snap_positions_y(&mut self, (::libc::c_double, ::libc::c_double)) -> ()```<br>
/// C++ method: <span style='color: green;'>```void QScroller::setSnapPositionsY(double first, double interval)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#setSnapPositionsY-1">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Set the snap positions for the vertical axis to regular spaced intervals. The first snap position is at <i>first</i>. The next at <i>first</i> + <i>interval</i>. This overwrites all previously set snap positions and also a previously set snapping interval. Snapping can be deactivated by setting an interval of 0.0</p></div>
pub fn set_snap_positions_y<'largs, Args>(&'largs mut self, args: Args) -> ()
where Args: overloading::ScrollerSetSnapPositionsYArgs<'largs>
{
args.exec(self)
}
/// C++ method: <span style='color: green;'>```QScroller::State QScroller::state() const```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#state-prop">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>This property holds the state of the scroller.</p>
/// <p><b>Access functions:</b></p>
/// <div class="table"><table class="alignedsummary">
/// <tbody><tr><td class="memItemLeft topAlign rightAlign"> State </td><td class="memItemRight bottomAlign"><span class="name"><b>state</b></span>() const</td></tr>
/// </tbody></table></div>
/// <p><b>Notifier signal:</b></p>
/// <div class="table"><table class="alignedsummary">
/// <tbody><tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="http://doc.qt.io/qt-5/qscroller.html#stateChanged">stateChanged</a></b></span>(QScroller::State <i>newState</i>)</td></tr>
/// </tbody></table></div>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qscroller.html#State-enum">QScroller::State</a>.</p></div>
pub fn state(&self) -> ::scroller::State {
unsafe { ::ffi::qt_widgets_c_QScroller_state(self as *const ::scroller::Scroller) }
}
/// C++ method: <span style='color: green;'>```void QScroller::stop()```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#stop">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Stops the scroller and resets its state back to Inactive.</p></div>
pub fn stop(&mut self) {
unsafe { ::ffi::qt_widgets_c_QScroller_stop(self as *mut ::scroller::Scroller) }
}
/// C++ method: <span style='color: green;'>```QObject* QScroller::target() const```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#target">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns the target object of this scroller.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qscroller.html#hasScroller">hasScroller</a>() and <a href="http://doc.qt.io/qt-5/qscroller.html#scroller">scroller</a>().</p></div>
pub fn target(&self) -> *mut ::qt_core::object::Object {
unsafe { ::ffi::qt_widgets_c_QScroller_target(self as *const ::scroller::Scroller) }
}
/// C++ method: <span style='color: green;'>```static QString QScroller::tr(const char* s, const char* c, int n)```</span>
///
///
pub unsafe fn tr(s: *const ::libc::c_char, c: *const ::libc::c_char, n: ::libc::c_int) -> ::qt_core::string::String {
{
let mut object: ::qt_core::string::String =
::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized();
::ffi::qt_widgets_c_QScroller_tr_to_output(s, c, n, &mut object);
object
}
}
/// C++ method: <span style='color: green;'>```static QString QScroller::trUtf8(const char* s, const char* c, int n)```</span>
///
///
pub unsafe fn tr_utf8(s: *const ::libc::c_char,
c: *const ::libc::c_char,
n: ::libc::c_int)
-> ::qt_core::string::String {
{
let mut object: ::qt_core::string::String =
::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized();
::ffi::qt_widgets_c_QScroller_trUtf8_to_output(s, c, n, &mut object);
object
}
}
/// C++ method: <span style='color: green;'>```static void QScroller::ungrabGesture(QObject* target)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#ungrabGesture">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Ungrabs the gesture for the <i>target</i>. Does nothing if no gesture is grabbed.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qscroller.html#grabGesture">grabGesture</a>() and <a href="http://doc.qt.io/qt-5/qscroller.html#grabbedGesture">grabbedGesture</a>().</p></div>
pub unsafe fn ungrab_gesture(target: *mut ::qt_core::object::Object) {
::ffi::qt_widgets_c_QScroller_ungrabGesture(target)
}
/// C++ method: <span style='color: green;'>```QPointF QScroller::velocity() const```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#velocity">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns the current scrolling velocity in meter per second when the state is Scrolling or Dragging. Returns a zero velocity otherwise.</p>
/// <p>The velocity is reported for both the x and y axis separately by using a <a href="http://doc.qt.io/qt-5/qpointf.html">QPointF</a>.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qscroller.html#pixelPerMeter">pixelPerMeter</a>().</p></div>
pub fn velocity(&self) -> ::qt_core::point_f::PointF {
{
let mut object: ::qt_core::point_f::PointF =
unsafe { ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized() };
unsafe {
::ffi::qt_widgets_c_QScroller_velocity_to_output(self as *const ::scroller::Scroller, &mut object);
}
object
}
}
}
/// Types for accessing built-in Qt signals and slots present in this module
pub mod connection {
use ::cpp_utils::StaticCast;
/// Provides access to built-in Qt signals of `Scroller`.
pub struct Signals<'a>(&'a ::scroller::Scroller);
/// Represents a built-in Qt signal `QScroller::objectNameChanged`.
///
/// An object of this type can be created from `Scroller` with `object.signals().object_name_changed()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
///
/// An object of this type contains a reference to the original `Scroller` object.
pub struct ObjectNameChanged<'a>(&'a ::scroller::Scroller);
impl<'a> ::qt_core::connection::Receiver for ObjectNameChanged<'a> {
type Arguments = (&'static ::qt_core::string::String,);
fn object(&self) -> &::qt_core::object::Object {
self.0.static_cast()
}
fn receiver_id() -> &'static [u8] {
b"2objectNameChanged(const QString&)\0"
}
}
impl<'a> ::qt_core::connection::Signal for ObjectNameChanged<'a> {}
/// Represents a built-in Qt signal `QScroller::stateChanged`.
///
/// An object of this type can be created from `Scroller` with `object.signals().state_changed()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
///
/// An object of this type contains a reference to the original `Scroller` object.
pub struct StateChanged<'a>(&'a ::scroller::Scroller);
impl<'a> ::qt_core::connection::Receiver for StateChanged<'a> {
type Arguments = (::scroller::State,);
fn object(&self) -> &::qt_core::object::Object {
self.0.static_cast()
}
fn receiver_id() -> &'static [u8] {
b"2stateChanged(QScroller::State)\0"
}
}
impl<'a> ::qt_core::connection::Signal for StateChanged<'a> {}
/// Represents a built-in Qt signal `QScroller::scrollerPropertiesChanged`.
///
/// An object of this type can be created from `Scroller` with `object.signals().scroller_properties_changed()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
///
/// An object of this type contains a reference to the original `Scroller` object.
pub struct ScrollerPropertiesChanged<'a>(&'a ::scroller::Scroller);
impl<'a> ::qt_core::connection::Receiver for ScrollerPropertiesChanged<'a> {
type Arguments = (&'static ::scroller_properties::ScrollerProperties,);
fn object(&self) -> &::qt_core::object::Object {
self.0.static_cast()
}
fn receiver_id() -> &'static [u8] {
b"2scrollerPropertiesChanged(const QScrollerProperties&)\0"
}
}
impl<'a> ::qt_core::connection::Signal for ScrollerPropertiesChanged<'a> {}
impl<'a> Signals<'a> {
/// Returns an object representing a built-in Qt signal `QScroller::objectNameChanged`.
///
/// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
pub fn object_name_changed(&self) -> ObjectNameChanged {
ObjectNameChanged(self.0)
}
/// Returns an object representing a built-in Qt signal `QScroller::stateChanged`.
///
/// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
pub fn state_changed(&self) -> StateChanged {
StateChanged(self.0)
}
/// Returns an object representing a built-in Qt signal `QScroller::scrollerPropertiesChanged`.
///
/// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
pub fn scroller_properties_changed(&self) -> ScrollerPropertiesChanged {
ScrollerPropertiesChanged(self.0)
}
}
/// Provides access to built-in Qt slots of `Scroller`.
pub struct Slots<'a>(&'a ::scroller::Scroller);
/// Represents a built-in Qt slot `QScroller::setScrollerProperties`.
///
/// An object of this type can be created from `Scroller` with `object.slots().set_scroller_properties()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
///
/// An object of this type contains a reference to the original `Scroller` object.
pub struct SetScrollerProperties<'a>(&'a ::scroller::Scroller);
impl<'a> ::qt_core::connection::Receiver for SetScrollerProperties<'a> {
type Arguments = (&'static ::scroller_properties::ScrollerProperties,);
fn object(&self) -> &::qt_core::object::Object {
self.0.static_cast()
}
fn receiver_id() -> &'static [u8] {
b"1setScrollerProperties(const QScrollerProperties&)\0"
}
}
/// Represents a built-in Qt slot `QScroller::ensureVisible`.
///
/// An object of this type can be created from `Scroller` with `object.slots().ensure_visible_qt_core_rect_f_ref_c_double_c_double()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
///
/// An object of this type contains a reference to the original `Scroller` object.
pub struct EnsureVisibleQtCoreRectFRefCDoubleCDouble<'a>(&'a ::scroller::Scroller);
impl<'a> ::qt_core::connection::Receiver for EnsureVisibleQtCoreRectFRefCDoubleCDouble<'a> {
type Arguments = (&'static ::qt_core::rect_f::RectF, ::libc::c_double, ::libc::c_double);
fn object(&self) -> &::qt_core::object::Object {
self.0.static_cast()
}
fn receiver_id() -> &'static [u8] {
b"1ensureVisible(const QRectF&,double,double)\0"
}
}
/// Represents a built-in Qt slot `QScroller::ensureVisible`.
///
/// An object of this type can be created from `Scroller` with `object.slots().ensure_visible_qt_core_rect_f_ref_c_double_c_double_c_int()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
///
/// An object of this type contains a reference to the original `Scroller` object.
pub struct EnsureVisibleQtCoreRectFRefCDoubleCDoubleCInt<'a>(&'a ::scroller::Scroller);
impl<'a> ::qt_core::connection::Receiver for EnsureVisibleQtCoreRectFRefCDoubleCDoubleCInt<'a> {
type Arguments = (&'static ::qt_core::rect_f::RectF, ::libc::c_double, ::libc::c_double, ::libc::c_int);
fn object(&self) -> &::qt_core::object::Object {
self.0.static_cast()
}
fn receiver_id() -> &'static [u8] {
b"1ensureVisible(const QRectF&,double,double,int)\0"
}
}
/// Represents a built-in Qt slot `QScroller::resendPrepareEvent`.
///
/// An object of this type can be created from `Scroller` with `object.slots().resend_prepare_event()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
///
/// An object of this type contains a reference to the original `Scroller` object.
pub struct ResendPrepareEvent<'a>(&'a ::scroller::Scroller);
impl<'a> ::qt_core::connection::Receiver for ResendPrepareEvent<'a> {
type Arguments = ();
fn object(&self) -> &::qt_core::object::Object {
self.0.static_cast()
}
fn receiver_id() -> &'static [u8] {
b"1resendPrepareEvent()\0"
}
}
/// Represents a built-in Qt slot `QScroller::scrollTo`.
///
/// An object of this type can be created from `Scroller` with `object.slots().scroll_to_qt_core_point_f_ref()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
///
/// An object of this type contains a reference to the original `Scroller` object.
pub struct ScrollToQtCorePointFRef<'a>(&'a ::scroller::Scroller);
impl<'a> ::qt_core::connection::Receiver for ScrollToQtCorePointFRef<'a> {
type Arguments = (&'static ::qt_core::point_f::PointF,);
fn object(&self) -> &::qt_core::object::Object {
self.0.static_cast()
}
fn receiver_id() -> &'static [u8] {
b"1scrollTo(const QPointF&)\0"
}
}
/// Represents a built-in Qt slot `QScroller::scrollTo`.
///
/// An object of this type can be created from `Scroller` with `object.slots().scroll_to_qt_core_point_f_ref_c_int()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
///
/// An object of this type contains a reference to the original `Scroller` object.
pub struct ScrollToQtCorePointFRefCInt<'a>(&'a ::scroller::Scroller);
impl<'a> ::qt_core::connection::Receiver for ScrollToQtCorePointFRefCInt<'a> {
type Arguments = (&'static ::qt_core::point_f::PointF, ::libc::c_int);
fn object(&self) -> &::qt_core::object::Object {
self.0.static_cast()
}
fn receiver_id() -> &'static [u8] {
b"1scrollTo(const QPointF&,int)\0"
}
}
impl<'a> Slots<'a> {
/// Returns an object representing a built-in Qt slot `QScroller::setScrollerProperties`.
///
/// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
pub fn set_scroller_properties(&self) -> SetScrollerProperties {
SetScrollerProperties(self.0)
}
/// Returns an object representing a built-in Qt slot `QScroller::ensureVisible`.
///
/// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
pub fn ensure_visible_qt_core_rect_f_ref_c_double_c_double(&self) -> EnsureVisibleQtCoreRectFRefCDoubleCDouble {
EnsureVisibleQtCoreRectFRefCDoubleCDouble(self.0)
}
/// Returns an object representing a built-in Qt slot `QScroller::ensureVisible`.
///
/// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
pub fn ensure_visible_qt_core_rect_f_ref_c_double_c_double_c_int
(&self)
-> EnsureVisibleQtCoreRectFRefCDoubleCDoubleCInt {
EnsureVisibleQtCoreRectFRefCDoubleCDoubleCInt(self.0)
}
/// Returns an object representing a built-in Qt slot `QScroller::resendPrepareEvent`.
///
/// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
pub fn resend_prepare_event(&self) -> ResendPrepareEvent {
ResendPrepareEvent(self.0)
}
/// Returns an object representing a built-in Qt slot `QScroller::scrollTo`.
///
/// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
pub fn scroll_to_qt_core_point_f_ref(&self) -> ScrollToQtCorePointFRef {
ScrollToQtCorePointFRef(self.0)
}
/// Returns an object representing a built-in Qt slot `QScroller::scrollTo`.
///
/// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
pub fn scroll_to_qt_core_point_f_ref_c_int(&self) -> ScrollToQtCorePointFRefCInt {
ScrollToQtCorePointFRefCInt(self.0)
}
}
impl ::scroller::Scroller {
/// Provides access to built-in Qt signals of this type
pub fn signals(&self) -> Signals {
Signals(self)
}
/// Provides access to built-in Qt slots of this type
pub fn slots(&self) -> Slots {
Slots(self)
}
}
}
/// C++ type: <span style='color: green;'>```QScroller::ScrollerGestureType```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#ScrollerGestureType-enum">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>This enum contains the different gesture types that are supported by the <a href="http://doc.qt.io/qt-5/qscroller.html">QScroller</a> gesture recognizer.</p></div>
#[derive(Debug, PartialEq, Eq, Clone)]
#[repr(C)]
pub enum ScrollerGestureType {
/// The gesture recognizer will only trigger on touch events. Specifically it will react on single touch points when using a touch screen and dual touch points when using a touchpad. (C++ enum variant: <span style='color: green;'>```TouchGesture = 0```</span>)
Touch = 0,
/// The gesture recognizer will only trigger on left mouse button events. (C++ enum variant: <span style='color: green;'>```LeftMouseButtonGesture = 1```</span>)
LeftMouseButton = 1,
/// The gesture recognizer will only trigger on right mouse button events. (C++ enum variant: <span style='color: green;'>```RightMouseButtonGesture = 2```</span>)
RightMouseButton = 2,
/// The gesture recognizer will only trigger on middle mouse button events. (C++ enum variant: <span style='color: green;'>```MiddleMouseButtonGesture = 3```</span>)
MiddleMouseButton = 3,
}
/// C++ type: <span style='color: green;'>```QScroller::State```</span>
///
/// <a href="http://doc.qt.io/qt-5/qscroller.html#State-enum">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>This enum contains the different <a href="http://doc.qt.io/qt-5/qscroller.html">QScroller</a> states.</p></div>
#[derive(Debug, PartialEq, Eq, Clone)]
#[repr(C)]
pub enum State {
/// The scroller is not scrolling and nothing is pressed. (C++ enum variant: <span style='color: green;'>```Inactive = 0```</span>)
Inactive = 0,
/// A touch event was received or the mouse button was pressed but the scroll area is currently not dragged. (C++ enum variant: <span style='color: green;'>```Pressed = 1```</span>)
Pressed = 1,
/// The scroll area is currently following the touch point or mouse. (C++ enum variant: <span style='color: green;'>```Dragging = 2```</span>)
Dragging = 2,
/// The scroll area is moving on it's own. (C++ enum variant: <span style='color: green;'>```Scrolling = 3```</span>)
Scrolling = 3,
}
impl ::cpp_utils::StaticCast<::qt_core::object::Object> for ::scroller::Scroller {
fn static_cast_mut(&mut self) -> &mut ::qt_core::object::Object {
let ffi_result =
unsafe { ::ffi::qt_widgets_c_QScroller_G_static_cast_QObject_ptr(self as *mut ::scroller::Scroller) };
unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
}
fn static_cast(&self) -> &::qt_core::object::Object {
let ffi_result = unsafe { ::ffi::qt_widgets_c_QScroller_G_static_cast_QObject_ptr(self as *const ::scroller::Scroller as *mut ::scroller::Scroller) };
unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
}
}
impl ::cpp_utils::UnsafeStaticCast<::scroller::Scroller> for ::qt_core::object::Object {
unsafe fn static_cast_mut(&mut self) -> &mut ::scroller::Scroller {
let ffi_result =
::ffi::qt_widgets_c_QScroller_G_static_cast_QScroller_ptr(self as *mut ::qt_core::object::Object);
ffi_result.as_mut().expect("Attempted to convert null pointer to reference")
}
unsafe fn static_cast(&self) -> &::scroller::Scroller {
let ffi_result = ::ffi::qt_widgets_c_QScroller_G_static_cast_QScroller_ptr(self as *const ::qt_core::object::Object as *mut ::qt_core::object::Object);
ffi_result.as_ref().expect("Attempted to convert null pointer to reference")
}
}
impl ::std::ops::Deref for ::scroller::Scroller {
type Target = ::qt_core::object::Object;
fn deref(&self) -> &::qt_core::object::Object {
let ffi_result = unsafe { ::ffi::qt_widgets_c_QScroller_G_static_cast_QObject_ptr(self as *const ::scroller::Scroller as *mut ::scroller::Scroller) };
unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
}
}
impl ::std::ops::DerefMut for ::scroller::Scroller {
fn deref_mut(&mut self) -> &mut ::qt_core::object::Object {
let ffi_result =
unsafe { ::ffi::qt_widgets_c_QScroller_G_static_cast_QObject_ptr(self as *mut ::scroller::Scroller) };
unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
}
}
/// Types for emulating overloading for overloaded functions in this module
pub mod overloading {
/// This trait represents a set of arguments accepted by [Scroller::ensure_visible](../struct.Scroller.html#method.ensure_visible) method.
pub trait ScrollerEnsureVisibleArgs<'largs> {
fn exec(self, original_self: &'largs mut ::scroller::Scroller) -> ();
}
impl<'largs> ScrollerEnsureVisibleArgs<'largs>
for (&'largs ::qt_core::rect_f::RectF, ::libc::c_double, ::libc::c_double) {
fn exec(self, original_self: &'largs mut ::scroller::Scroller) -> () {
let rect = self.0;
let xmargin = self.1;
let ymargin = self.2;
unsafe {
::ffi::qt_widgets_c_QScroller_ensureVisible_rect_xmargin_ymargin(original_self as *mut ::scroller::Scroller,
rect as *const ::qt_core::rect_f::RectF,
xmargin,
ymargin)
}
}
}
impl<'largs> ScrollerEnsureVisibleArgs<'largs>
for (&'largs ::qt_core::rect_f::RectF, ::libc::c_double, ::libc::c_double, ::libc::c_int) {
fn exec(self, original_self: &'largs mut ::scroller::Scroller) -> () {
let rect = self.0;
let xmargin = self.1;
let ymargin = self.2;
let scroll_time = self.3;
unsafe { ::ffi::qt_widgets_c_QScroller_ensureVisible_rect_xmargin_ymargin_scrollTime(original_self as *mut ::scroller::Scroller, rect as *const ::qt_core::rect_f::RectF, xmargin, ymargin, scroll_time) }
}
}
/// This trait represents a set of arguments accepted by [Scroller::grab_gesture](../struct.Scroller.html#method.grab_gesture) method.
pub trait ScrollerGrabGestureArgs {
unsafe fn exec(self) -> ::qt_core::qt::GestureType;
}
impl ScrollerGrabGestureArgs for *mut ::qt_core::object::Object {
unsafe fn exec(self) -> ::qt_core::qt::GestureType {
let target = self;
::ffi::qt_widgets_c_QScroller_grabGesture_target(target)
}
}
impl ScrollerGrabGestureArgs for (*mut ::qt_core::object::Object, ::scroller::ScrollerGestureType) {
unsafe fn exec(self) -> ::qt_core::qt::GestureType {
let target = self.0;
let gesture_type = self.1;
::ffi::qt_widgets_c_QScroller_grabGesture_target_gestureType(target, gesture_type)
}
}
/// This trait represents a set of arguments accepted by [Scroller::handle_input](../struct.Scroller.html#method.handle_input) method.
pub trait ScrollerHandleInputArgs<'largs> {
fn exec(self, original_self: &'largs mut ::scroller::Scroller) -> bool;
}
impl<'largs> ScrollerHandleInputArgs<'largs> for (::scroller::Input, &'largs ::qt_core::point_f::PointF) {
fn exec(self, original_self: &'largs mut ::scroller::Scroller) -> bool {
let input = self.0;
let position = self.1;
unsafe {
::ffi::qt_widgets_c_QScroller_handleInput_input_position(original_self as *mut ::scroller::Scroller,
input,
position as *const ::qt_core::point_f::PointF)
}
}
}
impl<'largs> ScrollerHandleInputArgs<'largs> for (::scroller::Input, &'largs ::qt_core::point_f::PointF, i64) {
fn exec(self, original_self: &'largs mut ::scroller::Scroller) -> bool {
let input = self.0;
let position = self.1;
let timestamp = self.2;
unsafe { ::ffi::qt_widgets_c_QScroller_handleInput_input_position_timestamp(original_self as *mut ::scroller::Scroller, input, position as *const ::qt_core::point_f::PointF, timestamp) }
}
}
/// This trait represents a set of arguments accepted by [Scroller::scroll_to](../struct.Scroller.html#method.scroll_to) method.
pub trait ScrollerScrollToArgs<'largs> {
fn exec(self, original_self: &'largs mut ::scroller::Scroller) -> ();
}
impl<'largs> ScrollerScrollToArgs<'largs> for &'largs ::qt_core::point_f::PointF {
fn exec(self, original_self: &'largs mut ::scroller::Scroller) -> () {
let pos = self;
unsafe {
::ffi::qt_widgets_c_QScroller_scrollTo_pos(original_self as *mut ::scroller::Scroller,
pos as *const ::qt_core::point_f::PointF)
}
}
}
impl<'largs> ScrollerScrollToArgs<'largs> for (&'largs ::qt_core::point_f::PointF, ::libc::c_int) {
fn exec(self, original_self: &'largs mut ::scroller::Scroller) -> () {
let pos = self.0;
let scroll_time = self.1;
unsafe {
::ffi::qt_widgets_c_QScroller_scrollTo_pos_scrollTime(original_self as *mut ::scroller::Scroller,
pos as *const ::qt_core::point_f::PointF,
scroll_time)
}
}
}
/// This trait represents a set of arguments accepted by [Scroller::scroller](../struct.Scroller.html#method.scroller) method.
pub trait ScrollerScrollerArgs {
type ReturnType;
unsafe fn exec(self) -> Self::ReturnType;
}
impl ScrollerScrollerArgs for *mut ::qt_core::object::Object {
type ReturnType = *mut ::scroller::Scroller;
unsafe fn exec(self) -> *mut ::scroller::Scroller {
let target = self;
::ffi::qt_widgets_c_QScroller_scroller_QObject_ptr(target)
}
}
impl ScrollerScrollerArgs for *const ::qt_core::object::Object {
type ReturnType = *const ::scroller::Scroller;
unsafe fn exec(self) -> *const ::scroller::Scroller {
let target = self;
::ffi::qt_widgets_c_QScroller_scroller_const_QObject_ptr(target)
}
}
/// This trait represents a set of arguments accepted by [Scroller::set_snap_positions_x](../struct.Scroller.html#method.set_snap_positions_x) method.
pub trait ScrollerSetSnapPositionsXArgs<'largs> {
fn exec(self, original_self: &'largs mut ::scroller::Scroller) -> ();
}
impl<'largs> ScrollerSetSnapPositionsXArgs<'largs> for (::libc::c_double, ::libc::c_double) {
fn exec(self, original_self: &'largs mut ::scroller::Scroller) -> () {
let first = self.0;
let interval = self.1;
unsafe {
::ffi::qt_widgets_c_QScroller_setSnapPositionsX_first_interval(original_self as *mut ::scroller::Scroller,
first,
interval)
}
}
}
impl<'largs> ScrollerSetSnapPositionsXArgs<'largs> for &'largs ::qt_gui::list::ListCDouble {
fn exec(self, original_self: &'largs mut ::scroller::Scroller) -> () {
let positions = self;
unsafe {
::ffi::qt_widgets_c_QScroller_setSnapPositionsX_positions(original_self as *mut ::scroller::Scroller,
positions as *const ::qt_gui::list::ListCDouble)
}
}
}
/// This trait represents a set of arguments accepted by [Scroller::set_snap_positions_y](../struct.Scroller.html#method.set_snap_positions_y) method.
pub trait ScrollerSetSnapPositionsYArgs<'largs> {
fn exec(self, original_self: &'largs mut ::scroller::Scroller) -> ();
}
impl<'largs> ScrollerSetSnapPositionsYArgs<'largs> for (::libc::c_double, ::libc::c_double) {
fn exec(self, original_self: &'largs mut ::scroller::Scroller) -> () {
let first = self.0;
let interval = self.1;
unsafe {
::ffi::qt_widgets_c_QScroller_setSnapPositionsY_first_interval(original_self as *mut ::scroller::Scroller,
first,
interval)
}
}
}
impl<'largs> ScrollerSetSnapPositionsYArgs<'largs> for &'largs ::qt_gui::list::ListCDouble {
fn exec(self, original_self: &'largs mut ::scroller::Scroller) -> () {
let positions = self;
unsafe {
::ffi::qt_widgets_c_QScroller_setSnapPositionsY_positions(original_self as *mut ::scroller::Scroller,
positions as *const ::qt_gui::list::ListCDouble)
}
}
}
}