diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2018-11-04 11:01:00 -0500 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-11-09 18:42:36 +0100 |
commit | b5f97c9f5250907b689ad72cbeb292861aaf0c17 (patch) | |
tree | 2aa094aa6ba22116d451f08b2c25ba6b0bdb3107 /vcl/inc/WidgetThemeLibrary.hxx | |
parent | 53961bc1bebe1159936f177b7e70eb8fadb36cff (diff) |
LOK: custom widgets: reduce theme plugin API surface
Change-Id: I89dcf5a102be19fd1bc314a89538a121522f4a43
Diffstat (limited to 'vcl/inc/WidgetThemeLibrary.hxx')
-rw-r--r-- | vcl/inc/WidgetThemeLibrary.hxx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/vcl/inc/WidgetThemeLibrary.hxx b/vcl/inc/WidgetThemeLibrary.hxx index 9d916895d43b..84479af7bae5 100644 --- a/vcl/inc/WidgetThemeLibrary.hxx +++ b/vcl/inc/WidgetThemeLibrary.hxx @@ -11,11 +11,7 @@ #ifndef INCLUDED_VCL_INC_WIDGETTHEME_HXX #define INCLUDED_VCL_INC_WIDGETTHEME_HXX -/** - * This file expects cairo.h and the definition of - * the other types used here to be defined before - * including it. - */ +#include <cstdint> namespace vcl { @@ -76,6 +72,7 @@ struct WidgetDrawStyle struct ControlDrawParameters { + typedef struct _cairo cairo_t; ControlDrawParameters(cairo_t* i_pCairo, ControlPart i_ePart, ControlState i_eState) : nSize(sizeof(ControlDrawParameters)) , pCairo(i_pCairo) @@ -98,15 +95,20 @@ struct ControlDrawParameters typedef struct _WidgetThemeLibrary WidgetThemeLibrary; +typedef struct _rectangle +{ + long x, y; + long width, height; +} rectangle_t; + struct _WidgetThemeLibrary { uint32_t nSize; bool (*isNativeControlSupported)(ControlType eType, ControlPart ePart); bool (*getRegion)(ControlType eType, ControlPart ePart, ControlState eState, - const tools::Rectangle& rBoundingControlRegion, - tools::Rectangle& rNativeBoundingRegion, - tools::Rectangle& rNativeContentRegion); + const rectangle_t& rBoundingControlRegion, rectangle_t& rNativeBoundingRegion, + rectangle_t& rNativeContentRegion); bool (*drawPushButton)(ControlDrawParameters const& rParameters, long nWidth, long nHeight); bool (*drawRadiobutton)(ControlDrawParameters const& rParameters, long nWidth, long nHeight); |