Index: src/QtCore/QtEvent.mm ================================================================== --- src/QtCore/QtEvent.mm +++ src/QtCore/QtEvent.mm @@ -52,17 +52,17 @@ [super dealloc]; } - (void)takeOwnership { - OF_ENSURE(!_ownsEvent); + OFEnsure(!_ownsEvent); _ownsEvent = true; } - (void)giveUpOwnership { - OF_ENSURE(_ownsEvent); + OFEnsure(_ownsEvent); _ownsEvent = false; } - (void)accept { Index: src/QtCore/QtObject.mm ================================================================== --- src/QtCore/QtObject.mm +++ src/QtCore/QtObject.mm @@ -56,17 +56,17 @@ [super dealloc]; } - (void)takeOwnership { - OF_ENSURE(!_ownsObject); + OFEnsure(!_ownsObject); _ownsObject = true; } - (void)giveUpOwnership { - OF_ENSURE(_ownsObject); + OFEnsure(_ownsObject); _ownsObject = false; } - (OFString *)objectName { @@ -239,9 +239,9 @@ return toOF(_qObject->thread()); } - (void)deleteLater { - OF_ENSURE(!_ownsObject); + OFEnsure(!_ownsObject); _qObject->deleteLater(); } @end Index: src/QtWidgets/QtAbstractButton.h ================================================================== --- src/QtWidgets/QtAbstractButton.h +++ src/QtWidgets/QtAbstractButton.h @@ -32,11 +32,11 @@ @property (nonatomic) int autoRepeatInterval; @property (nonatomic, getter=isCheckable) bool checkable; @property (nonatomic, getter=isChecked) bool checked; @property (nonatomic, getter=isDown) bool down; @property (nonatomic) QIcon icon; -@property (nonatomic) of_dimension_t iconSize; +@property (nonatomic) OFSize iconSize; @property (nonatomic) QKeySequence shortcut; @property (nonatomic, copy) OFString *text; @property (readonly, nonatomic) QButtonGroup *group; - (instancetype)initWithQWidget: (QWidget *)qWidget OF_UNAVAILABLE; Index: src/QtWidgets/QtAbstractButton.mm ================================================================== --- src/QtWidgets/QtAbstractButton.mm +++ src/QtWidgets/QtAbstractButton.mm @@ -122,16 +122,16 @@ - (void)setIcon: (QIcon)icon { toQt(self)->setIcon(icon); } -- (of_dimension_t)iconSize +- (OFSize)iconSize { return toOF(toQt(self)->iconSize()); } -- (void)setIconSize: (of_dimension_t)iconSize +- (void)setIconSize: (OFSize)iconSize { toQt(self)->setIconSize(toQt(iconSize).toSize()); } - (QKeySequence)shortcut Index: src/QtWidgets/QtApplication.h ================================================================== --- src/QtWidgets/QtApplication.h +++ src/QtWidgets/QtApplication.h @@ -27,11 +27,11 @@ @interface QtApplication: QtGUIApplication @property (readonly, nonatomic) QApplication *qApplication; @property (nonatomic) bool autoSIPEnabled; @property (nonatomic) int cursorFlashTime; @property (nonatomic) int doubleClickInterval; -@property (nonatomic) of_dimension_t globalStrut; +@property (nonatomic) OFSize globalStrut; @property (nonatomic) int keyboardInputInterval; @property (nonatomic) int startDragDistance; @property (nonatomic) int startDragTime; @property (nonatomic, copy) OFString *styleSheet; @property (nonatomic) int wheelScrollLines; Index: src/QtWidgets/QtApplication.mm ================================================================== --- src/QtWidgets/QtApplication.mm +++ src/QtWidgets/QtApplication.mm @@ -72,16 +72,16 @@ - (void)setDoubleClickInterval: (int)doubleClickInterval { toQt(self)->setDoubleClickInterval(doubleClickInterval); } -- (of_dimension_t)globalStrut +- (OFSize)globalStrut { return toOF(toQt(self)->globalStrut()); } -- (void)setGlobalStrut: (of_dimension_t)globalStrut +- (void)setGlobalStrut: (OFSize)globalStrut { toQt(self)->setGlobalStrut(toQt(globalStrut).toSize()); } - (int)keyboardInputInterval Index: src/QtWidgets/QtGraphicsWidget.h ================================================================== --- src/QtWidgets/QtGraphicsWidget.h +++ src/QtWidgets/QtGraphicsWidget.h @@ -33,26 +33,26 @@ @interface QtGraphicsWidget: QtGraphicsObject @property (readonly, nonatomic) QGraphicsWidget *qGraphicsWidget; @property (nonatomic) bool autoFillBackground; @property (nonatomic) Qt::FocusPolicy focusPolicy; -@property (nonatomic) of_rectangle_t geometry; +@property (nonatomic) OFRect geometry; @property (nonatomic) QGraphicsLayout *layout; @property (nonatomic) Qt::LayoutDirection layoutDirection; -@property (nonatomic) of_dimension_t maximumSize; -@property (nonatomic) of_dimension_t minimumSize; +@property (nonatomic) OFSize maximumSize; +@property (nonatomic) OFSize minimumSize; @property (nonatomic) QPalette palette; -@property (nonatomic) of_dimension_t preferredSize; -@property (readonly, nonatomic) of_dimension_t size; +@property (nonatomic) OFSize preferredSize; +@property (readonly, nonatomic) OFSize size; @property (nonatomic) QSizePolicy sizePolicy; @property (nonatomic) Qt::WindowFlags windowFlags; @property (copy, nonatomic) OFString *windowTitle; @property (readonly, nonatomic) OFArray OF_GENERIC(QtAction *) *actions; @property (readonly, nonatomic) bool isActiveWindow; @property (nonatomic) QStyle *style; -@property (readonly, nonatomic) of_rectangle_t windowFrameGeometry; -@property (readonly, nonatomic) of_rectangle_t windowFrameRect; +@property (readonly, nonatomic) OFRect windowFrameGeometry; +@property (readonly, nonatomic) OFRect windowFrameRect; - (instancetype)initWithQObject: (QObject *)qObject OF_UNAVAILABLE; - (instancetype)initWithQGraphicsWidget: (QGraphicsWidget *)qGraphicsWidget OF_DESIGNATED_INITIALIZER; - (void)addAction: (QtAction *)action; @@ -74,13 +74,12 @@ - (void)paintWindowFrameWithPainter: (QPainter *)painter option: (const QStyleOptionGraphicsItem *)option widget: (QtWidget *)widget; - (void)releaseShortcut: (int)ID; - (void)removeAction: (QtAction *)action; -- (void)resizeTo: (of_dimension_t)size; -- (void)setAttribute: (Qt::WidgetAttribute)attribute - to: (bool)on; +- (void)resizeTo: (OFSize)size; +- (void)setAttribute: (Qt::WidgetAttribute)attribute to: (bool)on; - (void)setContentsMarginsWithLeft: (qreal)left top: (qreal)top right: (qreal)right bottom: (qreal)bottom; - (void)setAutoRepeat: (bool)enabled Index: src/QtWidgets/QtGraphicsWidget.mm ================================================================== --- src/QtWidgets/QtGraphicsWidget.mm +++ src/QtWidgets/QtGraphicsWidget.mm @@ -66,16 +66,16 @@ - (void)setFocusPolicy: (Qt::FocusPolicy)focusPolicy { toQt(self)->setFocusPolicy(focusPolicy); } -- (of_rectangle_t)geometry +- (OFRect)geometry { return toOF(toQt(self)->geometry()); } -- (void)setGeometry: (of_rectangle_t)geometry +- (void)setGeometry: (OFRect)geometry { toQt(self)->setGeometry(toQt(geometry)); } - (QGraphicsLayout *)layout @@ -96,26 +96,26 @@ - (void)setLayoutDirection: (Qt::LayoutDirection)layoutDirection { toQt(self)->setLayoutDirection(layoutDirection); } -- (of_dimension_t)maximumSize +- (OFSize)maximumSize { return toOF(toQt(self)->maximumSize()); } -- (void)setMaximumSize: (of_dimension_t)maximumSize +- (void)setMaximumSize: (OFSize)maximumSize { toQt(self)->setMaximumSize(toQt(maximumSize)); } -- (of_dimension_t)minimumSize +- (OFSize)minimumSize { return toOF(toQt(self)->minimumSize()); } -- (void)setMinimumSize: (of_dimension_t)minimumSize +- (void)setMinimumSize: (OFSize)minimumSize { toQt(self)->setMinimumSize(toQt(minimumSize)); } - (QPalette)palette @@ -126,21 +126,21 @@ - (void)setPalette: (QPalette)palette { toQt(self)->setPalette(palette); } -- (of_dimension_t)preferredSize +- (OFSize)preferredSize { return toOF(toQt(self)->preferredSize()); } -- (void)setPreferredSize: (of_dimension_t)preferredSize +- (void)setPreferredSize: (OFSize)preferredSize { toQt(self)->setPreferredSize(toQt(preferredSize)); } -- (of_dimension_t)size +- (OFSize)size { return toOF(toQt(self)->size()); } - (QSizePolicy)sizePolicy @@ -203,16 +203,16 @@ - (void)setStyle: (QStyle *)style { toQt(self)->setStyle(style); } -- (of_rectangle_t)windowFrameGeometry +- (OFRect)windowFrameGeometry { return toOF(toQt(self)->windowFrameGeometry()); } -- (of_rectangle_t)windowFrameRect +- (OFRect)windowFrameRect { return toOF(toQt(self)->windowFrameRect()); } - (void)addAction: (QtAction *)action @@ -288,17 +288,16 @@ - (void)removeAction: (QtAction *)action { toQt(self)->removeAction(toQt(action)); } -- (void)resizeTo: (of_dimension_t)size +- (void)resizeTo: (OFSize)size { toQt(self)->resize(toQt(size)); } -- (void)setAttribute: (Qt::WidgetAttribute)attribute - to: (bool)on +- (void)setAttribute: (Qt::WidgetAttribute)attribute to: (bool)on { toQt(self)->setAttribute(attribute, on); } - (void)setContentsMarginsWithLeft: (qreal)left Index: src/QtWidgets/QtWidget.h ================================================================== --- src/QtWidgets/QtWidget.h +++ src/QtWidgets/QtWidget.h @@ -31,45 +31,45 @@ @property (readonly, nonatomic) QWidget *qWidget; @property (nonatomic) bool acceptDrops; @property (copy, nonatomic) OFString *accessibleDescription; @property (copy, nonatomic) OFString *accessibleName; @property (nonatomic) bool autoFillBackground; -@property (nonatomic) of_dimension_t baseSize; -@property (readonly, nonatomic) of_rectangle_t childrenRect; +@property (nonatomic) OFSize baseSize; +@property (readonly, nonatomic) OFRect childrenRect; @property (readonly, nonatomic) QRegion childrenRegion; @property (nonatomic) Qt::ContextMenuPolicy contextMenuPolicy; @property (nonatomic) QCursor cursor; @property (nonatomic, getter=isEnabled) bool enabled; @property (nonatomic) Qt::FocusPolicy focusPolicy; @property (nonatomic) const QFont &font; -@property (readonly, nonatomic) of_rectangle_t frameGeometry; -@property (readonly, nonatomic) of_dimension_t frameSize; +@property (readonly, nonatomic) OFRect frameGeometry; +@property (readonly, nonatomic) OFSize frameSize; @property (readonly, nonatomic, getter=isFullScreen) bool fullScreen; -@property (nonatomic) of_rectangle_t geometry; +@property (nonatomic) OFRect geometry; @property (readonly, nonatomic) int height; @property (nonatomic) Qt::InputMethodHints inputMethodHints; @property (readonly, nonatomic) bool isActiveWindow; @property (nonatomic) Qt::LayoutDirection layoutDirection; @property (nonatomic) QLocale locale; @property (readonly, nonatomic, getter=isMaximized) bool maximized; @property (nonatomic) int maximumHeight; -@property (nonatomic) of_dimension_t maximumSize; +@property (nonatomic) OFSize maximumSize; @property (nonatomic) int maximumWidth; @property (readonly, nonatomic, getter=isMinimized) bool minimized; @property (nonatomic) int minimumHeight; -@property (nonatomic) of_dimension_t minimumSize; -@property (readonly, nonatomic) of_dimension_t minimumSizeHint; +@property (nonatomic) OFSize minimumSize; +@property (readonly, nonatomic) OFSize minimumSizeHint; @property (nonatomic) int minimumWidth; @property (readonly, nonatomic, getter=isModal) bool modal; @property (nonatomic, getter=hasMouseTracking) bool mouseTracking; -@property (readonly, nonatomic) of_rectangle_t normalGeometry; +@property (readonly, nonatomic) OFRect normalGeometry; @property (nonatomic) const QPalette &palette; -@property (nonatomic, setter=moveToPosition:) of_point_t pos; -@property (readonly, nonatomic) of_rectangle_t rect; -@property (nonatomic, setter=resizeTo:) of_dimension_t size; -@property (readonly, nonatomic) of_dimension_t sizeHint; -@property (nonatomic) of_dimension_t sizeIncrement; +@property (nonatomic, setter=moveToPosition:) OFPoint pos; +@property (readonly, nonatomic) OFRect rect; +@property (nonatomic, setter=resizeTo:) OFSize size; +@property (readonly, nonatomic) OFSize sizeHint; +@property (nonatomic) OFSize sizeIncrement; @property (nonatomic) QSizePolicy sizePolicy; @property (copy, nonatomic) OFString *statusTip; @property (copy, nonatomic) OFString *styleSheet; @property (copy, nonatomic) OFString *toolTip; @property (nonatomic) int toolTipDuration; @@ -84,11 +84,11 @@ @property (nonatomic) double windowOpacity; @property (copy, nonatomic) OFString *windowTitle; @property (readonly, nonatomic) int x; @property (readonly, nonatomic) int y; @property (readonly, nonatomic) OFArray OF_GENERIC(QtAction *) *actions; -@property (readonly, nonatomic) of_rectangle_t contentsRect; +@property (readonly, nonatomic) OFRect contentsRect; @property (readonly, nonatomic) QtWidget *focusProxy; @property (readonly, nonatomic) QtWidget *focusWidget; @property (readonly, nonatomic, getter=isHidden) bool hidden; @property (readonly, nonatomic) bool isWindow; @property (readonly, nonatomic) QtWidget *nativeParentWidget; @@ -104,23 +104,22 @@ - (void)addAction: (QtAction *)action; - (void)addActions: (OFArray OF_GENERIC(QtAction *) *)actions; - (void)adjustSize; - (QPalette::ColorRole)backgroundRole; - (QBackingStore *)backingStore; -- (QtWidget *)childAt: (of_point_t)point; +- (QtWidget *)childAt: (OFPoint)point; - (void)clearFocus; - (void)clearMask; - (QMargins)contentsMargins; - (WId)effectiveWinID; - (void)ensurePolished; - (QFontInfo)fontInfo; - (QFontMetrics)fontMetrics; - (QPalette::ColorRole)foregroundRole; -- (QPixmap)grabRectangle: (of_rectangle_t)rectangle; +- (QPixmap)grabRectangle: (OFRect)rectangle; - (void)grabGesture: (Qt::GestureType)gesture; -- (void)grabGesture: (Qt::GestureType)gesture - flags: (Qt::GestureFlags)flags; +- (void)grabGesture: (Qt::GestureType)gesture flags: (Qt::GestureFlags)flags; - (void)grabKeyboard; - (void)grabMouse; - (void)grabMouseWithCursor: (const QCursor &)cursor; - (int)grabShortcutWithKey: (const QKeySequence &)key; - (int)grabShortcutWithKey: (const QKeySequence &)key @@ -132,62 +131,55 @@ #endif - (bool)hasFocus; - (bool)hasHeightForWidth; - (int)heightForWidth: (int)w; - (QVariant)queryInputMethod: (Qt::InputMethodQuery)query; -- (void)insertAction: (QtAction *)action - before: (QtAction *)before; +- (void)insertAction: (QtAction *)action before: (QtAction *)before; - (void)insertActions: (OFArray OF_GENERIC(QtAction *) *)actions before: (QtAction *)before; - (bool)isAncestorOf: (QtWidget *)child; - (bool)isEnabledTo: (QtWidget *)ancestor; - (bool)isVisibleTo: (QtWidget *)ancestor; -- (of_point_t)mapPosition: (of_point_t)pos - from: (QtWidget *)parent; -- (of_point_t)mapPositionFromGlobal: (of_point_t)pos; -- (of_point_t)mapPositionFromParent: (of_point_t)pos; -- (of_point_t)mapPosition: (of_point_t)pos - to: (QtWidget *)parent; -- (of_point_t)mapPositionToGlobal: (of_point_t)pos; -- (of_point_t)mapPositionToParent: (of_point_t)pos; +- (OFPoint)mapPosition: (OFPoint)pos from: (QtWidget *)parent; +- (OFPoint)mapPositionFromGlobal: (OFPoint)pos; +- (OFPoint)mapPositionFromParent: (OFPoint)pos; +- (OFPoint)mapPosition: (OFPoint)pos to: (QtWidget *)parent; +- (OFPoint)mapPositionToGlobal: (OFPoint)pos; +- (OFPoint)mapPositionToParent: (OFPoint)pos; - (QRegion)mask; - (void)overrideWindowFlags: (Qt::WindowFlags)flags; - (void)releaseKeyboard; - (void)releaseMouse; - (void)releaseShortcut: (int)ID; - (void)removeAction: (QtAction *)action; - (void)renderIntoPaintDevice: (QtObject *)target - targetOffset: (of_point_t)targetOffset + targetOffset: (OFPoint)targetOffset sourceRegion: (QRegion)sourceRegion; - (void)renderIntoPaintDevice: (QtObject *)target - targetOffset: (of_point_t)targetOffset + targetOffset: (OFPoint)targetOffset sourceRegion: (QRegion)sourceRegion flags: (QWidget::RenderFlags)renderFlags; - (void)renderIntoPainter: (QPainter *)target - targetOffset: (of_point_t)targetOffset + targetOffset: (OFPoint)targetOffset sourceRegion: (QRegion)sourceRegion; - (void)renderIntoPainter: (QPainter *)target - targetOffset: (of_point_t)targetOffset + targetOffset: (OFPoint)targetOffset sourceRegion: (QRegion)sourceRegion flags: (QWidget::RenderFlags)renderFlags; -- (void)repaintInRectangle: (of_rectangle_t)rect; +- (void)repaintInRectangle: (OFRect)rect; - (void)repaintInRegion: (const QRegion &)region; - (bool)restoreGeometry: (OFData *)geometry; - (OFData *)saveGeometry; -- (void)scrollRight: (int)dx - down: (int)dy; -- (void)scrollRight: (int)dx - down: (int)dy - inRectangle: (of_rectangle_t)rect; -- (void)setAttribute: (Qt::WidgetAttribute)attribute - to: (bool)on; +- (void)scrollRight: (int)dx down: (int)dy; +- (void)scrollRight: (int)dx down: (int)dy inRectangle: (OFRect)rect; +- (void)setAttribute: (Qt::WidgetAttribute)attribute to: (bool)on; - (void)setFocus: (Qt::FocusReason)reason; #ifdef QT_KEYPAD_NAVIGATION - (void)setEditFocus: (bool)enable; #endif - (void)setFixedHeight: (int)height; -- (void)setFixedSize: (of_dimension_t)size; +- (void)setFixedSize: (OFSize)size; - (void)setFixedWidth: (int)width; - (void)setFocusProxy: (QtWidget *)widget; - (void)setForegroundRole: (QPalette::ColorRole)role; - (void)setGraphicsEffect: (QGraphicsEffect *)effect; - (void)setLayout: (QLayout *)layout; @@ -209,11 +201,11 @@ - (bool)isUnderMouse; - (void)ungrabGesture: (Qt::GestureType)gesture; - (void)unsetCursor; - (void)unsetLayoutDirection; - (void)unsetLocale; -- (void)updateInRectangle: (of_rectangle_t)rect; +- (void)updateInRectangle: (OFRect)rect; - (void)updateInRegion: (const QRegion &)region; - (void)updateGeometry; - (QRegion)visibleRegion; - (WId)winID; - (QWindow *)windowHandle; Index: src/QtWidgets/QtWidget.mm ================================================================== --- src/QtWidgets/QtWidget.mm +++ src/QtWidgets/QtWidget.mm @@ -93,21 +93,21 @@ - (void)setAutoFillBackground: (bool)autoFillBackground { toQt(self)->setAutoFillBackground(autoFillBackground); } -- (of_dimension_t)baseSize +- (OFSize)baseSize { return toOF(toQt(self)->baseSize()); } -- (void)setBaseSize: (of_dimension_t)baseSize +- (void)setBaseSize: (OFSize)baseSize { toQt(self)->setBaseSize(toQt(baseSize).toSize()); } -- (of_rectangle_t)childrenRect +- (OFRect)childrenRect { return toOF(toQt(self)->childrenRect()); } - (QRegion)childrenRegion @@ -173,31 +173,31 @@ - (void)setFont: (const QFont &)font { toQt(self)->setFont(font); } -- (of_rectangle_t)frameGeometry +- (OFRect)frameGeometry { return toOF(toQt(self)->frameGeometry()); } -- (of_dimension_t)frameSize +- (OFSize)frameSize { return toOF(toQt(self)->frameSize()); } - (bool)isFullScreen { return toQt(self)->isFullScreen(); } -- (of_rectangle_t)geometry +- (OFRect)geometry { return toOF(toQt(self)->geometry()); } -- (void)setGeometry: (of_rectangle_t)geometry +- (void)setGeometry: (OFRect)geometry { toQt(self)->setGeometry(toQt(geometry).toRect()); } - (int)height @@ -263,16 +263,16 @@ - (void)setMaximumHeight: (int)maximumHeight { toQt(self)->setMaximumHeight(maximumHeight); } -- (of_dimension_t)maximumSize +- (OFSize)maximumSize { return toOF(toQt(self)->maximumSize()); } -- (void)setMaximumSize: (of_dimension_t)maximumSize +- (void)setMaximumSize: (OFSize)maximumSize { toQt(self)->setMaximumSize(toQt(maximumSize).toSize()); } - (int)maximumWidth @@ -298,21 +298,21 @@ - (void)setMinimumHeight: (int)minimumHeight { toQt(self)->setMinimumHeight(minimumHeight); } -- (of_dimension_t)minimumSize +- (OFSize)minimumSize { return toOF(toQt(self)->minimumSize()); } -- (void)setMinimumSize: (of_dimension_t)minimumSize +- (void)setMinimumSize: (OFSize)minimumSize { toQt(self)->setMinimumSize(toQt(minimumSize).toSize()); } -- (of_dimension_t)minimumSizeHint +- (OFSize)minimumSizeHint { return toOF(toQt(self)->minimumSizeHint()); } - (int)minimumWidth @@ -338,11 +338,11 @@ - (void)setMouseTracking: (bool)mouseTracking { toQt(self)->setMouseTracking(mouseTracking); } -- (of_rectangle_t)normalGeometry +- (OFRect)normalGeometry { return toOF(toQt(self)->normalGeometry()); } - (const QPalette &)palette @@ -353,46 +353,46 @@ - (void)setPalette: (const QPalette &)palette { toQt(self)->setPalette(palette); } -- (of_point_t)pos +- (OFPoint)pos { return toOF(toQt(self)->pos()); } -- (void)moveToPosition: (of_point_t)pos +- (void)moveToPosition: (OFPoint)pos { toQt(self)->move(toQt(pos)); } -- (of_rectangle_t)rect +- (OFRect)rect { return toOF(toQt(self)->rect()); } -- (of_dimension_t)size +- (OFSize)size { return toOF(toQt(self)->size()); } -- (void)resizeTo: (of_dimension_t)size +- (void)resizeTo: (OFSize)size { toQt(self)->resize(toQt(size).toSize()); } -- (of_dimension_t)sizeHint +- (OFSize)sizeHint { return toOF(toQt(self)->sizeHint()); } -- (of_dimension_t)sizeIncrement +- (OFSize)sizeIncrement { return toOF(toQt(self)->sizeIncrement()); } -- (void)setSizeIncrement: (of_dimension_t)sizeIncrement +- (void)setSizeIncrement: (OFSize)sizeIncrement { toQt(self)->setSizeIncrement(toQt(sizeIncrement).toSize()); } - (QSizePolicy)sizePolicy @@ -610,11 +610,11 @@ - (QBackingStore *)backingStore { return toQt(self)->backingStore(); } -- (QtWidget *)childAt: (of_point_t)point +- (QtWidget *)childAt: (OFPoint)point { return toOF(toQt(self)->childAt(toQt(point))); } - (void)clearFocus @@ -630,11 +630,11 @@ - (QMargins)contentsMargins { return toQt(self)->contentsMargins(); } -- (of_rectangle_t)contentsRect +- (OFRect)contentsRect { return toOF(toQt(self)->contentsRect()); } - (WId)effectiveWinID @@ -670,11 +670,11 @@ - (QPalette::ColorRole)foregroundRole { return toQt(self)->foregroundRole(); } -- (QPixmap)grabRectangle: (of_rectangle_t)rectangle +- (QPixmap)grabRectangle: (OFRect)rectangle { return toQt(self)->grab(toQt(rectangle).toRect()); } - (void)grabGesture: (Qt::GestureType)gesture @@ -786,38 +786,36 @@ - (bool)isWindow { return toQt(self)->isWindow(); } -- (of_point_t)mapPosition: (of_point_t)pos - from: (QtWidget *)parent +- (OFPoint)mapPosition: (OFPoint)pos from: (QtWidget *)parent { return toOF(toQt(self)->mapFrom(toQt(parent), toQt(pos))); } -- (of_point_t)mapPositionFromGlobal: (of_point_t)pos +- (OFPoint)mapPositionFromGlobal: (OFPoint)pos { return toOF(toQt(self)->mapFromGlobal(toQt(pos))); } -- (of_point_t)mapPositionFromParent: (of_point_t)pos +- (OFPoint)mapPositionFromParent: (OFPoint)pos { return toOF(toQt(self)->mapFromParent(toQt(pos))); } -- (of_point_t)mapPosition: (of_point_t)pos - to: (QtWidget *)parent +- (OFPoint)mapPosition: (OFPoint)pos to: (QtWidget *)parent { return toOF(toQt(self)->mapTo(toQt(parent), toQt(pos))); } -- (of_point_t)mapPositionToGlobal: (of_point_t)pos +- (OFPoint)mapPositionToGlobal: (OFPoint)pos { return toOF(toQt(self)->mapToGlobal(toQt(pos))); } -- (of_point_t)mapPositionToParent: (of_point_t)pos +- (OFPoint)mapPositionToParent: (OFPoint)pos { return toOF(toQt(self)->mapToParent(toQt(pos))); } - (QRegion)mask @@ -869,43 +867,43 @@ { toQt(self)->removeAction(toQt(action)); } - (void)renderIntoPaintDevice: (QtObject *)target - targetOffset: (of_point_t)targetOffset + targetOffset: (OFPoint)targetOffset sourceRegion: (QRegion)sourceRegion { toQt(self)->render([target qPaintDevice], toQt(targetOffset), sourceRegion); } - (void)renderIntoPaintDevice: (QtObject *)target - targetOffset: (of_point_t)targetOffset + targetOffset: (OFPoint)targetOffset sourceRegion: (QRegion)sourceRegion flags: (QWidget::RenderFlags)renderFlags { toQt(self)->render([target qPaintDevice], toQt(targetOffset), sourceRegion, renderFlags); } - (void)renderIntoPainter: (QPainter *)target - targetOffset: (of_point_t)targetOffset + targetOffset: (OFPoint)targetOffset sourceRegion: (QRegion)sourceRegion { toQt(self)->render(target, toQt(targetOffset), sourceRegion); } - (void)renderIntoPainter: (QPainter *)target - targetOffset: (of_point_t)targetOffset + targetOffset: (OFPoint)targetOffset sourceRegion: (QRegion)sourceRegion flags: (QWidget::RenderFlags)renderFlags { toQt(self)->render(target, toQt(targetOffset), sourceRegion, renderFlags); } -- (void)repaintInRectangle: (of_rectangle_t)rect +- (void)repaintInRectangle: (OFRect)rect { toQt(self)->repaint(toQt(rect).toRect()); } - (void)repaintInRegion: (const QRegion &)region @@ -921,25 +919,21 @@ - (OFData *)saveGeometry { return toOF(toQt(self)->saveGeometry()); } -- (void)scrollRight: (int)dx - down: (int)dy +- (void)scrollRight: (int)dx down: (int)dy { toQt(self)->scroll(dx, dy); } -- (void)scrollRight: (int)dx - down: (int)dy - inRectangle: (of_rectangle_t)rect +- (void)scrollRight: (int)dx down: (int)dy inRectangle: (OFRect)rect { toQt(self)->scroll(dx, dy, toQt(rect).toRect()); } -- (void)setAttribute: (Qt::WidgetAttribute)attribute - to: (bool)on +- (void)setAttribute: (Qt::WidgetAttribute)attribute to: (bool)on { toQt(self)->setAttribute(attribute, on); } #ifdef QT_KEYPAD_NAVIGATION @@ -952,11 +946,11 @@ - (void)setFixedHeight: (int)height { toQt(self)->setFixedHeight(height); } -- (void)setFixedSize: (of_dimension_t)size +- (void)setFixedSize: (OFSize)size { toQt(self)->setFixedSize(toQt(size).toSize()); } - (void)setFixedWidth: (int)width @@ -1060,11 +1054,11 @@ - (void)ungrabGesture: (Qt::GestureType)gesture { toQt(self)->ungrabGesture(gesture); } -- (void)updateInRectangle: (of_rectangle_t)rect +- (void)updateInRectangle: (OFRect)rect { toQt(self)->update(toQt(rect).toRect()); } - (void)updateInRegion: (const QRegion &)region Index: src/common/helpers.h ================================================================== --- src/common/helpers.h +++ src/common/helpers.h @@ -32,57 +32,56 @@ #import "QtThread.h" #import "QtWidget.h" namespace ObjQt { -static OF_INLINE of_point_t +static OF_INLINE OFPoint toOF(const QPoint &qPoint) { - return of_point(qPoint.x(), qPoint.y()); + return OFPointMake(qPoint.x(), qPoint.y()); } static OF_INLINE QPoint -toQt(const of_point_t &point) +toQt(const OFPoint &point) { return QPoint(point.x, point.y); } -static OF_INLINE of_dimension_t +static OF_INLINE OFSize toOF(const QSize &qSize) { - return of_dimension(qSize.width(), qSize.height()); + return OFSizeMake(qSize.width(), qSize.height()); } -static OF_INLINE of_dimension_t +static OF_INLINE OFSize toOF(const QSizeF &qSizeF) { - return of_dimension(qSizeF.width(), qSizeF.height()); + return OFSizeMake(qSizeF.width(), qSizeF.height()); } static OF_INLINE QSizeF -toQt(const of_dimension_t &dimension) +toQt(const OFSize &dimension) { return QSizeF(dimension.width, dimension.height); } -static OF_INLINE of_rectangle_t +static OF_INLINE OFRect toOF(const QRect &qRect) { - return of_rectangle(qRect.x(), qRect.y(), - qRect.width(), qRect.height()); + return OFRectMake(qRect.x(), qRect.y(), qRect.width(), qRect.height()); } -static OF_INLINE of_rectangle_t +static OF_INLINE OFRect toOF(const QRectF &qRectF) { - return of_rectangle(qRectF.x(), qRectF.y(), + return OFRectMake(qRectF.x(), qRectF.y(), qRectF.width(), qRectF.height()); } static OF_INLINE QRectF -toQt(const of_rectangle_t &rectangle) +toQt(const OFRect &rect) { - return QRectF(rectangle.origin.x, rectangle.origin.y, - rectangle.size.width, rectangle.size.height); + return QRectF(rect.origin.x, rect.origin.y, + rect.size.width, rect.size.height); } }