From b3d077a9201d10f2243a7e187af93feb9bfd26ff Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 5 Feb 2019 20:27:56 +0200 Subject: hidpi cursors for macOS Change-Id: I39bdc93048733627a54c4f7b4b2e7df4f073ef25 Reviewed-on: https://gerrit.libreoffice.org/67424 Tested-by: Jenkins Reviewed-by: Noel Grandin --- icon-themes/colibre/vcl/res/hourglass.png | Bin 257 -> 0 bytes icon-themes/colibre/vcl/res/nesize.png | Bin 0 -> 312 bytes icon-themes/colibre/vcl/res/nwsize.png | Bin 0 -> 313 bytes icon-themes/colibre/vcl/res/sesize.png | Bin 0 -> 313 bytes icon-themes/colibre/vcl/res/swsize.png | Bin 0 -> 312 bytes icon-themes/colibre/vcl/res/wait.png | Bin 0 -> 257 bytes icon-themes/colibre/vcl/res/window_nesize.png | Bin 0 -> 312 bytes icon-themes/colibre/vcl/res/window_nwsize.png | Bin 0 -> 313 bytes icon-themes/colibre/vcl/res/window_sesize.png | Bin 0 -> 313 bytes icon-themes/colibre/vcl/res/window_swsize.png | Bin 0 -> 312 bytes icon-themes/colibre_svg/vcl/res/hourglass.svg | 1 - icon-themes/colibre_svg/vcl/res/wait.svg | 1 + icon-themes/karasa_jaga/vcl/res/hourglass.png | Bin 483 -> 0 bytes icon-themes/karasa_jaga/vcl/res/wait.svg | Bin 0 -> 483 bytes icon-themes/karasa_jaga_svg/vcl/res/hourglass.svg | 1 - icon-themes/karasa_jaga_svg/vcl/res/wait.svg | 1 + vcl/Package_osxres.mk | 66 ------ vcl/inc/bitmaps.hlst | 10 +- vcl/inc/cursor_hotspots.hxx | 169 ++++++++++++++ vcl/osx/res/cursors/ase.png | Bin 214 -> 0 bytes vcl/osx/res/cursors/asn.png | Bin 212 -> 0 bytes vcl/osx/res/cursors/asne.png | Bin 240 -> 0 bytes vcl/osx/res/cursors/asns.png | Bin 234 -> 0 bytes vcl/osx/res/cursors/asnswe.png | Bin 285 -> 0 bytes vcl/osx/res/cursors/asnw.png | Bin 246 -> 0 bytes vcl/osx/res/cursors/ass.png | Bin 222 -> 0 bytes vcl/osx/res/cursors/asse.png | Bin 243 -> 0 bytes vcl/osx/res/cursors/assw.png | Bin 236 -> 0 bytes vcl/osx/res/cursors/asw.png | Bin 212 -> 0 bytes vcl/osx/res/cursors/aswe.png | Bin 228 -> 0 bytes vcl/osx/res/cursors/chain.png | Bin 344 -> 0 bytes vcl/osx/res/cursors/chainnot.png | Bin 390 -> 0 bytes vcl/osx/res/cursors/chart.png | Bin 270 -> 0 bytes vcl/osx/res/cursors/copydata.png | Bin 336 -> 0 bytes vcl/osx/res/cursors/copydlnk.png | Bin 340 -> 0 bytes vcl/osx/res/cursors/copyf.png | Bin 329 -> 0 bytes vcl/osx/res/cursors/copyf2.png | Bin 344 -> 0 bytes vcl/osx/res/cursors/copyflnk.png | Bin 339 -> 0 bytes vcl/osx/res/cursors/crook.png | Bin 291 -> 0 bytes vcl/osx/res/cursors/crop.png | Bin 239 -> 0 bytes vcl/osx/res/cursors/darc.png | Bin 172 -> 0 bytes vcl/osx/res/cursors/dbezier.png | Bin 185 -> 0 bytes vcl/osx/res/cursors/dcapt.png | Bin 183 -> 0 bytes vcl/osx/res/cursors/dcirccut.png | Bin 185 -> 0 bytes vcl/osx/res/cursors/dconnect.png | Bin 183 -> 0 bytes vcl/osx/res/cursors/dellipse.png | Bin 176 -> 0 bytes vcl/osx/res/cursors/detectiv.png | Bin 268 -> 0 bytes vcl/osx/res/cursors/dfree.png | Bin 188 -> 0 bytes vcl/osx/res/cursors/dline.png | Bin 177 -> 0 bytes vcl/osx/res/cursors/dpie.png | Bin 183 -> 0 bytes vcl/osx/res/cursors/dpolygon.png | Bin 191 -> 0 bytes vcl/osx/res/cursors/drect.png | Bin 172 -> 0 bytes vcl/osx/res/cursors/dtext.png | Bin 174 -> 0 bytes vcl/osx/res/cursors/fill.png | Bin 255 -> 0 bytes vcl/osx/res/cursors/help.png | Bin 303 -> 0 bytes vcl/osx/res/cursors/hourglass.png | Bin 257 -> 0 bytes vcl/osx/res/cursors/hshear.png | Bin 223 -> 0 bytes vcl/osx/res/cursors/linkdata.png | Bin 348 -> 0 bytes vcl/osx/res/cursors/linkf.png | Bin 336 -> 0 bytes vcl/osx/res/cursors/magnify.png | Bin 282 -> 0 bytes vcl/osx/res/cursors/mirror.png | Bin 304 -> 0 bytes vcl/osx/res/cursors/movebw.png | Bin 320 -> 0 bytes vcl/osx/res/cursors/movedata.png | Bin 290 -> 0 bytes vcl/osx/res/cursors/movedlnk.png | Bin 318 -> 0 bytes vcl/osx/res/cursors/movef.png | Bin 294 -> 0 bytes vcl/osx/res/cursors/movef2.png | Bin 314 -> 0 bytes vcl/osx/res/cursors/moveflnk.png | Bin 307 -> 0 bytes vcl/osx/res/cursors/movept.png | Bin 275 -> 0 bytes vcl/osx/res/cursors/neswsize.png | Bin 312 -> 0 bytes vcl/osx/res/cursors/notallow.png | Bin 297 -> 0 bytes vcl/osx/res/cursors/nullptr.png | Bin 150 -> 0 bytes vcl/osx/res/cursors/nwsesize.png | Bin 313 -> 0 bytes vcl/osx/res/cursors/pen.png | Bin 351 -> 0 bytes vcl/osx/res/cursors/pivotcol.png | Bin 293 -> 0 bytes vcl/osx/res/cursors/pivotdel.png | Bin 264 -> 0 bytes vcl/osx/res/cursors/pivotfld.png | Bin 272 -> 0 bytes vcl/osx/res/cursors/pivotrow.png | Bin 295 -> 0 bytes vcl/osx/res/cursors/rotate.png | Bin 274 -> 0 bytes vcl/osx/res/cursors/tblsele.png | Bin 174 -> 0 bytes vcl/osx/res/cursors/tblsels.png | Bin 171 -> 0 bytes vcl/osx/res/cursors/tblselse.png | Bin 183 -> 0 bytes vcl/osx/res/cursors/tblselsw.png | Bin 183 -> 0 bytes vcl/osx/res/cursors/tblselw.png | Bin 174 -> 0 bytes vcl/osx/res/cursors/vshear.png | Bin 228 -> 0 bytes vcl/osx/res/cursors/vtext.png | Bin 164 -> 0 bytes vcl/osx/res/cursors/wshide.png | Bin 2878 -> 0 bytes vcl/osx/res/cursors/wsshow.png | Bin 2884 -> 0 bytes vcl/osx/saldata.cxx | 263 ++++++++++++---------- vcl/osx/salframe.cxx | 2 +- vcl/unx/gtk3/gtk3gtkdata.cxx | 131 +---------- 90 files changed, 326 insertions(+), 319 deletions(-) delete mode 100644 icon-themes/colibre/vcl/res/hourglass.png create mode 100644 icon-themes/colibre/vcl/res/nesize.png create mode 100644 icon-themes/colibre/vcl/res/nwsize.png create mode 100644 icon-themes/colibre/vcl/res/sesize.png create mode 100644 icon-themes/colibre/vcl/res/swsize.png create mode 100644 icon-themes/colibre/vcl/res/wait.png create mode 100644 icon-themes/colibre/vcl/res/window_nesize.png create mode 100644 icon-themes/colibre/vcl/res/window_nwsize.png create mode 100644 icon-themes/colibre/vcl/res/window_sesize.png create mode 100644 icon-themes/colibre/vcl/res/window_swsize.png delete mode 100644 icon-themes/colibre_svg/vcl/res/hourglass.svg create mode 100644 icon-themes/colibre_svg/vcl/res/wait.svg delete mode 100644 icon-themes/karasa_jaga/vcl/res/hourglass.png create mode 100644 icon-themes/karasa_jaga/vcl/res/wait.svg delete mode 100644 icon-themes/karasa_jaga_svg/vcl/res/hourglass.svg create mode 100644 icon-themes/karasa_jaga_svg/vcl/res/wait.svg create mode 100644 vcl/inc/cursor_hotspots.hxx delete mode 100644 vcl/osx/res/cursors/ase.png delete mode 100644 vcl/osx/res/cursors/asn.png delete mode 100644 vcl/osx/res/cursors/asne.png delete mode 100644 vcl/osx/res/cursors/asns.png delete mode 100644 vcl/osx/res/cursors/asnswe.png delete mode 100644 vcl/osx/res/cursors/asnw.png delete mode 100644 vcl/osx/res/cursors/ass.png delete mode 100644 vcl/osx/res/cursors/asse.png delete mode 100644 vcl/osx/res/cursors/assw.png delete mode 100644 vcl/osx/res/cursors/asw.png delete mode 100644 vcl/osx/res/cursors/aswe.png delete mode 100644 vcl/osx/res/cursors/chain.png delete mode 100644 vcl/osx/res/cursors/chainnot.png delete mode 100644 vcl/osx/res/cursors/chart.png delete mode 100644 vcl/osx/res/cursors/copydata.png delete mode 100644 vcl/osx/res/cursors/copydlnk.png delete mode 100644 vcl/osx/res/cursors/copyf.png delete mode 100644 vcl/osx/res/cursors/copyf2.png delete mode 100644 vcl/osx/res/cursors/copyflnk.png delete mode 100644 vcl/osx/res/cursors/crook.png delete mode 100644 vcl/osx/res/cursors/crop.png delete mode 100644 vcl/osx/res/cursors/darc.png delete mode 100644 vcl/osx/res/cursors/dbezier.png delete mode 100644 vcl/osx/res/cursors/dcapt.png delete mode 100644 vcl/osx/res/cursors/dcirccut.png delete mode 100644 vcl/osx/res/cursors/dconnect.png delete mode 100644 vcl/osx/res/cursors/dellipse.png delete mode 100644 vcl/osx/res/cursors/detectiv.png delete mode 100644 vcl/osx/res/cursors/dfree.png delete mode 100644 vcl/osx/res/cursors/dline.png delete mode 100644 vcl/osx/res/cursors/dpie.png delete mode 100644 vcl/osx/res/cursors/dpolygon.png delete mode 100644 vcl/osx/res/cursors/drect.png delete mode 100644 vcl/osx/res/cursors/dtext.png delete mode 100644 vcl/osx/res/cursors/fill.png delete mode 100644 vcl/osx/res/cursors/help.png delete mode 100644 vcl/osx/res/cursors/hourglass.png delete mode 100644 vcl/osx/res/cursors/hshear.png delete mode 100644 vcl/osx/res/cursors/linkdata.png delete mode 100644 vcl/osx/res/cursors/linkf.png delete mode 100644 vcl/osx/res/cursors/magnify.png delete mode 100644 vcl/osx/res/cursors/mirror.png delete mode 100644 vcl/osx/res/cursors/movebw.png delete mode 100644 vcl/osx/res/cursors/movedata.png delete mode 100644 vcl/osx/res/cursors/movedlnk.png delete mode 100644 vcl/osx/res/cursors/movef.png delete mode 100644 vcl/osx/res/cursors/movef2.png delete mode 100644 vcl/osx/res/cursors/moveflnk.png delete mode 100644 vcl/osx/res/cursors/movept.png delete mode 100644 vcl/osx/res/cursors/neswsize.png delete mode 100644 vcl/osx/res/cursors/notallow.png delete mode 100644 vcl/osx/res/cursors/nullptr.png delete mode 100644 vcl/osx/res/cursors/nwsesize.png delete mode 100644 vcl/osx/res/cursors/pen.png delete mode 100644 vcl/osx/res/cursors/pivotcol.png delete mode 100644 vcl/osx/res/cursors/pivotdel.png delete mode 100644 vcl/osx/res/cursors/pivotfld.png delete mode 100644 vcl/osx/res/cursors/pivotrow.png delete mode 100644 vcl/osx/res/cursors/rotate.png delete mode 100644 vcl/osx/res/cursors/tblsele.png delete mode 100644 vcl/osx/res/cursors/tblsels.png delete mode 100644 vcl/osx/res/cursors/tblselse.png delete mode 100644 vcl/osx/res/cursors/tblselsw.png delete mode 100644 vcl/osx/res/cursors/tblselw.png delete mode 100644 vcl/osx/res/cursors/vshear.png delete mode 100644 vcl/osx/res/cursors/vtext.png delete mode 100644 vcl/osx/res/cursors/wshide.png delete mode 100644 vcl/osx/res/cursors/wsshow.png diff --git a/icon-themes/colibre/vcl/res/hourglass.png b/icon-themes/colibre/vcl/res/hourglass.png deleted file mode 100644 index 822368d7c950..000000000000 Binary files a/icon-themes/colibre/vcl/res/hourglass.png and /dev/null differ diff --git a/icon-themes/colibre/vcl/res/nesize.png b/icon-themes/colibre/vcl/res/nesize.png new file mode 100644 index 000000000000..91b89b5803ec Binary files /dev/null and b/icon-themes/colibre/vcl/res/nesize.png differ diff --git a/icon-themes/colibre/vcl/res/nwsize.png b/icon-themes/colibre/vcl/res/nwsize.png new file mode 100644 index 000000000000..fc6a33288ef2 Binary files /dev/null and b/icon-themes/colibre/vcl/res/nwsize.png differ diff --git a/icon-themes/colibre/vcl/res/sesize.png b/icon-themes/colibre/vcl/res/sesize.png new file mode 100644 index 000000000000..fc6a33288ef2 Binary files /dev/null and b/icon-themes/colibre/vcl/res/sesize.png differ diff --git a/icon-themes/colibre/vcl/res/swsize.png b/icon-themes/colibre/vcl/res/swsize.png new file mode 100644 index 000000000000..91b89b5803ec Binary files /dev/null and b/icon-themes/colibre/vcl/res/swsize.png differ diff --git a/icon-themes/colibre/vcl/res/wait.png b/icon-themes/colibre/vcl/res/wait.png new file mode 100644 index 000000000000..822368d7c950 Binary files /dev/null and b/icon-themes/colibre/vcl/res/wait.png differ diff --git a/icon-themes/colibre/vcl/res/window_nesize.png b/icon-themes/colibre/vcl/res/window_nesize.png new file mode 100644 index 000000000000..91b89b5803ec Binary files /dev/null and b/icon-themes/colibre/vcl/res/window_nesize.png differ diff --git a/icon-themes/colibre/vcl/res/window_nwsize.png b/icon-themes/colibre/vcl/res/window_nwsize.png new file mode 100644 index 000000000000..fc6a33288ef2 Binary files /dev/null and b/icon-themes/colibre/vcl/res/window_nwsize.png differ diff --git a/icon-themes/colibre/vcl/res/window_sesize.png b/icon-themes/colibre/vcl/res/window_sesize.png new file mode 100644 index 000000000000..fc6a33288ef2 Binary files /dev/null and b/icon-themes/colibre/vcl/res/window_sesize.png differ diff --git a/icon-themes/colibre/vcl/res/window_swsize.png b/icon-themes/colibre/vcl/res/window_swsize.png new file mode 100644 index 000000000000..91b89b5803ec Binary files /dev/null and b/icon-themes/colibre/vcl/res/window_swsize.png differ diff --git a/icon-themes/colibre_svg/vcl/res/hourglass.svg b/icon-themes/colibre_svg/vcl/res/hourglass.svg deleted file mode 100644 index c5747c9d7fa0..000000000000 --- a/icon-themes/colibre_svg/vcl/res/hourglass.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/icon-themes/colibre_svg/vcl/res/wait.svg b/icon-themes/colibre_svg/vcl/res/wait.svg new file mode 100644 index 000000000000..c5747c9d7fa0 --- /dev/null +++ b/icon-themes/colibre_svg/vcl/res/wait.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icon-themes/karasa_jaga/vcl/res/hourglass.png b/icon-themes/karasa_jaga/vcl/res/hourglass.png deleted file mode 100644 index b8906abe5e85..000000000000 Binary files a/icon-themes/karasa_jaga/vcl/res/hourglass.png and /dev/null differ diff --git a/icon-themes/karasa_jaga/vcl/res/wait.svg b/icon-themes/karasa_jaga/vcl/res/wait.svg new file mode 100644 index 000000000000..b8906abe5e85 Binary files /dev/null and b/icon-themes/karasa_jaga/vcl/res/wait.svg differ diff --git a/icon-themes/karasa_jaga_svg/vcl/res/hourglass.svg b/icon-themes/karasa_jaga_svg/vcl/res/hourglass.svg deleted file mode 100644 index 546373d0e742..000000000000 --- a/icon-themes/karasa_jaga_svg/vcl/res/hourglass.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/icon-themes/karasa_jaga_svg/vcl/res/wait.svg b/icon-themes/karasa_jaga_svg/vcl/res/wait.svg new file mode 100644 index 000000000000..546373d0e742 --- /dev/null +++ b/icon-themes/karasa_jaga_svg/vcl/res/wait.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vcl/Package_osxres.mk b/vcl/Package_osxres.mk index 10451fec779e..dfbc35a9703c 100644 --- a/vcl/Package_osxres.mk +++ b/vcl/Package_osxres.mk @@ -13,72 +13,6 @@ $(eval $(call gb_Package_add_files_with_dir,vcl_osxres,Resources,\ MainMenu.nib/classes.nib \ MainMenu.nib/info.nib \ MainMenu.nib/keyedobjects.nib \ - cursors/ase.png \ - cursors/asn.png \ - cursors/asne.png \ - cursors/asns.png \ - cursors/asnswe.png \ - cursors/asnw.png \ - cursors/ass.png \ - cursors/asse.png \ - cursors/assw.png \ - cursors/asw.png \ - cursors/aswe.png \ - cursors/chain.png \ - cursors/chainnot.png \ - cursors/chart.png \ - cursors/copydata.png \ - cursors/copydlnk.png \ - cursors/copyf.png \ - cursors/copyf2.png \ - cursors/copyflnk.png \ - cursors/crook.png \ - cursors/crop.png \ - cursors/darc.png \ - cursors/dbezier.png \ - cursors/dcapt.png \ - cursors/dcirccut.png \ - cursors/dconnect.png \ - cursors/dellipse.png \ - cursors/detectiv.png \ - cursors/dfree.png \ - cursors/dline.png \ - cursors/dpie.png \ - cursors/dpolygon.png \ - cursors/drect.png \ - cursors/dtext.png \ - cursors/fill.png \ - cursors/help.png \ - cursors/hourglass.png \ - cursors/hshear.png \ - cursors/linkdata.png \ - cursors/linkf.png \ - cursors/magnify.png \ - cursors/mirror.png \ - cursors/movebw.png \ - cursors/movedata.png \ - cursors/movedlnk.png \ - cursors/movef.png \ - cursors/movef2.png \ - cursors/moveflnk.png \ - cursors/movept.png \ - cursors/neswsize.png \ - cursors/notallow.png \ - cursors/nullptr.png \ - cursors/nwsesize.png \ - cursors/pen.png \ - cursors/pivotcol.png \ - cursors/pivotdel.png \ - cursors/pivotfld.png \ - cursors/pivotrow.png \ - cursors/rotate.png \ - cursors/tblsele.png \ - cursors/tblsels.png \ - cursors/tblselse.png \ - cursors/tblselsw.png \ - cursors/tblselw.png \ - cursors/vshear.png \ - cursors/vtext.png \ )) # vim:set noet sw=4 ts=4: diff --git a/vcl/inc/bitmaps.hlst b/vcl/inc/bitmaps.hlst index 667bf76b3ade..b5242aa79794 100644 --- a/vcl/inc/bitmaps.hlst +++ b/vcl/inc/bitmaps.hlst @@ -183,7 +183,6 @@ #define RID_CURSOR_DRAW_TEXT "vcl/res/draw_text.png" #define RID_CURSOR_FILL "vcl/res/fill.png" #define RID_CURSOR_HELP "vcl/res/help.png" -#define RID_CURSOR_HOURGLASS "vcl/res/hourglass.png" #define RID_CURSOR_H_SHEAR "vcl/res/h_shear.png" #define RID_CURSOR_LINK_DATA "vcl/res/link_data.png" #define RID_CURSOR_LINK_FILE "vcl/res/link_file.png" @@ -215,6 +214,15 @@ #define RID_CURSOR_TEXT_VERTICAL "vcl/res/text_vertical.png" #define RID_CURSOR_HIDE_WHITESPACE "vcl/res/hide_whitespace.png" #define RID_CURSOR_SHOW_WHITESPACE "vcl/res/show_whitespace.png" +#define RID_CURSOR_WAIT "vcl/res/wait.png" +#define RID_CURSOR_NWSIZE "vcl/res/nwsize.png" +#define RID_CURSOR_NESIZE "vcl/res/nesize.png" +#define RID_CURSOR_SWSIZE "vcl/res/swsize.png" +#define RID_CURSOR_SESIZE "vcl/res/sesize.png" +#define RID_CURSOR_WINDOW_NWSIZE "vcl/res/window_nwsize.png" +#define RID_CURSOR_WINDOW_NESIZE "vcl/res/window_nesize.png" +#define RID_CURSOR_WINDOW_SWSIZE "vcl/res/window_swsize.png" +#define RID_CURSOR_WINDOW_SESIZE "vcl/res/window_sesize.png" #define CHEVRON "sfx2/res/chevron.png" diff --git a/vcl/inc/cursor_hotspots.hxx b/vcl/inc/cursor_hotspots.hxx new file mode 100644 index 000000000000..74a041ddd9ca --- /dev/null +++ b/vcl/inc/cursor_hotspots.hxx @@ -0,0 +1,169 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_VCL_INC_CURSOR_HOTSPOTS_HXX +#define INCLUDED_VCL_INC_CURSOR_HOTSPOTS_HXX + +#define help_curs_x_hot 0 +#define help_curs_y_hot 0 +#define pen_curs_x_hot 3 +#define pen_curs_y_hot 27 +#define nodrop_curs_x_hot 9 +#define nodrop_curs_y_hot 9 +#define magnify_curs_x_hot 12 +#define magnify_curs_y_hot 13 +#define rotate_curs_x_hot 15 +#define rotate_curs_y_hot 15 +#define hshear_curs_x_hot 15 +#define hshear_curs_y_hot 15 +#define vshear_curs_x_hot 15 +#define vshear_curs_y_hot 15 +#define drawline_curs_x_hot 7 +#define drawline_curs_y_hot 7 +#define drawrect_curs_x_hot 7 +#define drawrect_curs_y_hot 7 +#define drawpolygon_curs_x_hot 7 +#define drawpolygon_curs_y_hot 7 +#define drawbezier_curs_x_hot 7 +#define drawbezier_curs_y_hot 7 +#define drawarc_curs_x_hot 7 +#define drawarc_curs_y_hot 7 +#define drawpie_curs_x_hot 7 +#define drawpie_curs_y_hot 7 +#define drawcirclecut_curs_x_hot 7 +#define drawcirclecut_curs_y_hot 7 +#define drawellipse_curs_x_hot 7 +#define drawellipse_curs_y_hot 7 +#define drawconnect_curs_x_hot 7 +#define drawconnect_curs_y_hot 7 +#define drawtext_curs_x_hot 8 +#define drawtext_curs_y_hot 8 +#define mirror_curs_x_hot 14 +#define mirror_curs_y_hot 12 +#define crook_curs_x_hot 15 +#define crook_curs_y_hot 14 +#define crop_curs_x_hot 9 +#define crop_curs_y_hot 9 +#define movepoint_curs_x_hot 0 +#define movepoint_curs_y_hot 0 +#define movebezierweight_curs_x_hot 0 +#define movebezierweight_curs_y_hot 0 +#define drawfreehand_curs_x_hot 8 +#define drawfreehand_curs_y_hot 8 +#define drawcaption_curs_x_hot 8 +#define drawcaption_curs_y_hot 8 +#define movedata_curs_x_hot 1 +#define movedata_curs_y_hot 1 +#define copydata_curs_x_hot 1 +#define copydata_curs_y_hot 1 +#define linkdata_curs_x_hot 1 +#define linkdata_curs_y_hot 1 +#define movedlnk_curs_x_hot 1 +#define movedlnk_curs_y_hot 1 +#define copydlnk_curs_x_hot 1 +#define copydlnk_curs_y_hot 1 +#define movefile_curs_x_hot 9 +#define movefile_curs_y_hot 9 +#define copyfile_curs_x_hot 9 +#define copyfile_curs_y_hot 9 +#define linkfile_curs_x_hot 9 +#define linkfile_curs_y_hot 9 +#define moveflnk_curs_x_hot 9 +#define moveflnk_curs_y_hot 9 +#define copyflnk_curs_x_hot 9 +#define copyflnk_curs_y_hot 9 +#define movefiles_curs_x_hot 8 +#define movefiles_curs_y_hot 9 +#define copyfiles_curs_x_hot 8 +#define copyfiles_curs_y_hot 9 + +#define chart_curs_x_hot 15 +#define chart_curs_y_hot 16 +#define detective_curs_x_hot 12 +#define detective_curs_y_hot 13 +#define pivotcol_curs_x_hot 7 +#define pivotcol_curs_y_hot 5 +#define pivotfld_curs_x_hot 8 +#define pivotfld_curs_y_hot 7 +#define pivotrow_curs_x_hot 8 +#define pivotrow_curs_y_hot 7 +#define pivotdel_curs_x_hot 9 +#define pivotdel_curs_y_hot 8 + +#define chain_curs_x_hot 0 +#define chain_curs_y_hot 2 +#define chainnot_curs_x_hot 2 +#define chainnot_curs_y_hot 2 + +#define ase_curs_x_hot 19 +#define ase_curs_y_hot 16 +#define asn_curs_x_hot 16 +#define asn_curs_y_hot 12 +#define asne_curs_x_hot 21 +#define asne_curs_y_hot 10 +#define asns_curs_x_hot 15 +#define asns_curs_y_hot 15 +#define asnswe_curs_x_hot 15 +#define asnswe_curs_y_hot 15 +#define asnw_curs_x_hot 10 +#define asnw_curs_y_hot 10 +#define ass_curs_x_hot 15 +#define ass_curs_y_hot 19 +#define asse_curs_x_hot 21 +#define asse_curs_y_hot 21 +#define assw_curs_x_hot 10 +#define assw_curs_y_hot 21 +#define asw_curs_x_hot 12 +#define asw_curs_y_hot 15 +#define aswe_curs_x_hot 15 +#define aswe_curs_y_hot 15 +#define nullcurs_x_hot 2 +#define nullcurs_y_hot 2 + +#define fill_curs_x_hot 10 +#define fill_curs_y_hot 22 +#define vertcurs_curs_x_hot 8 +#define vertcurs_curs_y_hot 8 +#define tblsele_curs_x_hot 14 +#define tblsele_curs_y_hot 8 +#define tblsels_curs_x_hot 7 +#define tblsels_curs_y_hot 14 +#define tblselse_curs_x_hot 14 +#define tblselse_curs_y_hot 14 +#define tblselw_curs_x_hot 1 +#define tblselw_curs_y_hot 8 +#define tblselsw_curs_x_hot 1 +#define tblselsw_curs_y_hot 14 +#define hidewhitespace_curs_x_hot 0 +#define hidewhitespace_curs_y_hot 10 +#define showwhitespace_curs_x_hot 0 +#define showwhitespace_curs_y_hot 10 + +#define wait_curs_x_hot 10 +#define wait_curs_y_hot 10 +#define nwsize_curs_x_hot 10 +#define nwsize_curs_y_hot 10 +#define nesize_curs_x_hot 10 +#define nesize_curs_y_hot 10 +#define swsize_curs_x_hot 10 +#define swsize_curs_y_hot 10 +#define sesize_curs_x_hot 10 +#define sesize_curs_y_hot 10 +#define window_nwsize_curs_x_hot 10 +#define window_nwsize_curs_y_hot 10 +#define window_nesize_curs_x_hot 10 +#define window_nesize_curs_y_hot 10 +#define window_swsize_curs_x_hot 10 +#define window_swsize_curs_y_hot 10 +#define window_sesize_curs_x_hot 10 +#define window_sesize_curs_y_hot 10 + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/osx/res/cursors/ase.png b/vcl/osx/res/cursors/ase.png deleted file mode 100644 index a3a30e0bcdce..000000000000 Binary files a/vcl/osx/res/cursors/ase.png and /dev/null differ diff --git a/vcl/osx/res/cursors/asn.png b/vcl/osx/res/cursors/asn.png deleted file mode 100644 index 7a140b1ec926..000000000000 Binary files a/vcl/osx/res/cursors/asn.png and /dev/null differ diff --git a/vcl/osx/res/cursors/asne.png b/vcl/osx/res/cursors/asne.png deleted file mode 100644 index 311506aeb349..000000000000 Binary files a/vcl/osx/res/cursors/asne.png and /dev/null differ diff --git a/vcl/osx/res/cursors/asns.png b/vcl/osx/res/cursors/asns.png deleted file mode 100644 index 1c8950eb28bc..000000000000 Binary files a/vcl/osx/res/cursors/asns.png and /dev/null differ diff --git a/vcl/osx/res/cursors/asnswe.png b/vcl/osx/res/cursors/asnswe.png deleted file mode 100644 index aae5246fbbc0..000000000000 Binary files a/vcl/osx/res/cursors/asnswe.png and /dev/null differ diff --git a/vcl/osx/res/cursors/asnw.png b/vcl/osx/res/cursors/asnw.png deleted file mode 100644 index 9fd0036df077..000000000000 Binary files a/vcl/osx/res/cursors/asnw.png and /dev/null differ diff --git a/vcl/osx/res/cursors/ass.png b/vcl/osx/res/cursors/ass.png deleted file mode 100644 index bee09e736ad1..000000000000 Binary files a/vcl/osx/res/cursors/ass.png and /dev/null differ diff --git a/vcl/osx/res/cursors/asse.png b/vcl/osx/res/cursors/asse.png deleted file mode 100644 index d7883211d44f..000000000000 Binary files a/vcl/osx/res/cursors/asse.png and /dev/null differ diff --git a/vcl/osx/res/cursors/assw.png b/vcl/osx/res/cursors/assw.png deleted file mode 100644 index 0b0a496a52ec..000000000000 Binary files a/vcl/osx/res/cursors/assw.png and /dev/null differ diff --git a/vcl/osx/res/cursors/asw.png b/vcl/osx/res/cursors/asw.png deleted file mode 100644 index 5a4b9519e075..000000000000 Binary files a/vcl/osx/res/cursors/asw.png and /dev/null differ diff --git a/vcl/osx/res/cursors/aswe.png b/vcl/osx/res/cursors/aswe.png deleted file mode 100644 index b9c5afaac043..000000000000 Binary files a/vcl/osx/res/cursors/aswe.png and /dev/null differ diff --git a/vcl/osx/res/cursors/chain.png b/vcl/osx/res/cursors/chain.png deleted file mode 100644 index dbf069924d73..000000000000 Binary files a/vcl/osx/res/cursors/chain.png and /dev/null differ diff --git a/vcl/osx/res/cursors/chainnot.png b/vcl/osx/res/cursors/chainnot.png deleted file mode 100644 index 547703edf12c..000000000000 Binary files a/vcl/osx/res/cursors/chainnot.png and /dev/null differ diff --git a/vcl/osx/res/cursors/chart.png b/vcl/osx/res/cursors/chart.png deleted file mode 100644 index de5514006e1f..000000000000 Binary files a/vcl/osx/res/cursors/chart.png and /dev/null differ diff --git a/vcl/osx/res/cursors/copydata.png b/vcl/osx/res/cursors/copydata.png deleted file mode 100644 index b6202fd9144f..000000000000 Binary files a/vcl/osx/res/cursors/copydata.png and /dev/null differ diff --git a/vcl/osx/res/cursors/copydlnk.png b/vcl/osx/res/cursors/copydlnk.png deleted file mode 100644 index fab24c9f8f7c..000000000000 Binary files a/vcl/osx/res/cursors/copydlnk.png and /dev/null differ diff --git a/vcl/osx/res/cursors/copyf.png b/vcl/osx/res/cursors/copyf.png deleted file mode 100644 index 70546d0c0c22..000000000000 Binary files a/vcl/osx/res/cursors/copyf.png and /dev/null differ diff --git a/vcl/osx/res/cursors/copyf2.png b/vcl/osx/res/cursors/copyf2.png deleted file mode 100644 index b6f76051f10f..000000000000 Binary files a/vcl/osx/res/cursors/copyf2.png and /dev/null differ diff --git a/vcl/osx/res/cursors/copyflnk.png b/vcl/osx/res/cursors/copyflnk.png deleted file mode 100644 index 23561e484e36..000000000000 Binary files a/vcl/osx/res/cursors/copyflnk.png and /dev/null differ diff --git a/vcl/osx/res/cursors/crook.png b/vcl/osx/res/cursors/crook.png deleted file mode 100644 index 4378f8df8351..000000000000 Binary files a/vcl/osx/res/cursors/crook.png and /dev/null differ diff --git a/vcl/osx/res/cursors/crop.png b/vcl/osx/res/cursors/crop.png deleted file mode 100644 index 92a778ada31a..000000000000 Binary files a/vcl/osx/res/cursors/crop.png and /dev/null differ diff --git a/vcl/osx/res/cursors/darc.png b/vcl/osx/res/cursors/darc.png deleted file mode 100644 index 9772a1c6b85a..000000000000 Binary files a/vcl/osx/res/cursors/darc.png and /dev/null differ diff --git a/vcl/osx/res/cursors/dbezier.png b/vcl/osx/res/cursors/dbezier.png deleted file mode 100644 index 988498137e9a..000000000000 Binary files a/vcl/osx/res/cursors/dbezier.png and /dev/null differ diff --git a/vcl/osx/res/cursors/dcapt.png b/vcl/osx/res/cursors/dcapt.png deleted file mode 100644 index d1ef82818735..000000000000 Binary files a/vcl/osx/res/cursors/dcapt.png and /dev/null differ diff --git a/vcl/osx/res/cursors/dcirccut.png b/vcl/osx/res/cursors/dcirccut.png deleted file mode 100644 index cb4ed0e85ecd..000000000000 Binary files a/vcl/osx/res/cursors/dcirccut.png and /dev/null differ diff --git a/vcl/osx/res/cursors/dconnect.png b/vcl/osx/res/cursors/dconnect.png deleted file mode 100644 index e4a43bdbe021..000000000000 Binary files a/vcl/osx/res/cursors/dconnect.png and /dev/null differ diff --git a/vcl/osx/res/cursors/dellipse.png b/vcl/osx/res/cursors/dellipse.png deleted file mode 100644 index 319c4574c7c1..000000000000 Binary files a/vcl/osx/res/cursors/dellipse.png and /dev/null differ diff --git a/vcl/osx/res/cursors/detectiv.png b/vcl/osx/res/cursors/detectiv.png deleted file mode 100644 index abe93f263d4d..000000000000 Binary files a/vcl/osx/res/cursors/detectiv.png and /dev/null differ diff --git a/vcl/osx/res/cursors/dfree.png b/vcl/osx/res/cursors/dfree.png deleted file mode 100644 index 2de92942adde..000000000000 Binary files a/vcl/osx/res/cursors/dfree.png and /dev/null differ diff --git a/vcl/osx/res/cursors/dline.png b/vcl/osx/res/cursors/dline.png deleted file mode 100644 index 6afb670ef8a8..000000000000 Binary files a/vcl/osx/res/cursors/dline.png and /dev/null differ diff --git a/vcl/osx/res/cursors/dpie.png b/vcl/osx/res/cursors/dpie.png deleted file mode 100644 index 44a9474846b9..000000000000 Binary files a/vcl/osx/res/cursors/dpie.png and /dev/null differ diff --git a/vcl/osx/res/cursors/dpolygon.png b/vcl/osx/res/cursors/dpolygon.png deleted file mode 100644 index 847e6ad9bea5..000000000000 Binary files a/vcl/osx/res/cursors/dpolygon.png and /dev/null differ diff --git a/vcl/osx/res/cursors/drect.png b/vcl/osx/res/cursors/drect.png deleted file mode 100644 index ff3dcbba07b4..000000000000 Binary files a/vcl/osx/res/cursors/drect.png and /dev/null differ diff --git a/vcl/osx/res/cursors/dtext.png b/vcl/osx/res/cursors/dtext.png deleted file mode 100644 index ee375f0e47a0..000000000000 Binary files a/vcl/osx/res/cursors/dtext.png and /dev/null differ diff --git a/vcl/osx/res/cursors/fill.png b/vcl/osx/res/cursors/fill.png deleted file mode 100644 index 220641b9beb4..000000000000 Binary files a/vcl/osx/res/cursors/fill.png and /dev/null differ diff --git a/vcl/osx/res/cursors/help.png b/vcl/osx/res/cursors/help.png deleted file mode 100644 index e29c19eccd22..000000000000 Binary files a/vcl/osx/res/cursors/help.png and /dev/null differ diff --git a/vcl/osx/res/cursors/hourglass.png b/vcl/osx/res/cursors/hourglass.png deleted file mode 100644 index 822368d7c950..000000000000 Binary files a/vcl/osx/res/cursors/hourglass.png and /dev/null differ diff --git a/vcl/osx/res/cursors/hshear.png b/vcl/osx/res/cursors/hshear.png deleted file mode 100644 index b45beded2d93..000000000000 Binary files a/vcl/osx/res/cursors/hshear.png and /dev/null differ diff --git a/vcl/osx/res/cursors/linkdata.png b/vcl/osx/res/cursors/linkdata.png deleted file mode 100644 index 6432db0155b6..000000000000 Binary files a/vcl/osx/res/cursors/linkdata.png and /dev/null differ diff --git a/vcl/osx/res/cursors/linkf.png b/vcl/osx/res/cursors/linkf.png deleted file mode 100644 index e17107fec9ff..000000000000 Binary files a/vcl/osx/res/cursors/linkf.png and /dev/null differ diff --git a/vcl/osx/res/cursors/magnify.png b/vcl/osx/res/cursors/magnify.png deleted file mode 100644 index 4e73146b91e4..000000000000 Binary files a/vcl/osx/res/cursors/magnify.png and /dev/null differ diff --git a/vcl/osx/res/cursors/mirror.png b/vcl/osx/res/cursors/mirror.png deleted file mode 100644 index 8fac93f0b6df..000000000000 Binary files a/vcl/osx/res/cursors/mirror.png and /dev/null differ diff --git a/vcl/osx/res/cursors/movebw.png b/vcl/osx/res/cursors/movebw.png deleted file mode 100644 index 63bf76ad3942..000000000000 Binary files a/vcl/osx/res/cursors/movebw.png and /dev/null differ diff --git a/vcl/osx/res/cursors/movedata.png b/vcl/osx/res/cursors/movedata.png deleted file mode 100644 index 60ece8a53e59..000000000000 Binary files a/vcl/osx/res/cursors/movedata.png and /dev/null differ diff --git a/vcl/osx/res/cursors/movedlnk.png b/vcl/osx/res/cursors/movedlnk.png deleted file mode 100644 index 6951cd718d97..000000000000 Binary files a/vcl/osx/res/cursors/movedlnk.png and /dev/null differ diff --git a/vcl/osx/res/cursors/movef.png b/vcl/osx/res/cursors/movef.png deleted file mode 100644 index 97a01c88fa4d..000000000000 Binary files a/vcl/osx/res/cursors/movef.png and /dev/null differ diff --git a/vcl/osx/res/cursors/movef2.png b/vcl/osx/res/cursors/movef2.png deleted file mode 100644 index 2cdddb410aae..000000000000 Binary files a/vcl/osx/res/cursors/movef2.png and /dev/null differ diff --git a/vcl/osx/res/cursors/moveflnk.png b/vcl/osx/res/cursors/moveflnk.png deleted file mode 100644 index 53301ba58c50..000000000000 Binary files a/vcl/osx/res/cursors/moveflnk.png and /dev/null differ diff --git a/vcl/osx/res/cursors/movept.png b/vcl/osx/res/cursors/movept.png deleted file mode 100644 index 41945deb1916..000000000000 Binary files a/vcl/osx/res/cursors/movept.png and /dev/null differ diff --git a/vcl/osx/res/cursors/neswsize.png b/vcl/osx/res/cursors/neswsize.png deleted file mode 100644 index 91b89b5803ec..000000000000 Binary files a/vcl/osx/res/cursors/neswsize.png and /dev/null differ diff --git a/vcl/osx/res/cursors/notallow.png b/vcl/osx/res/cursors/notallow.png deleted file mode 100644 index df770a495194..000000000000 Binary files a/vcl/osx/res/cursors/notallow.png and /dev/null differ diff --git a/vcl/osx/res/cursors/nullptr.png b/vcl/osx/res/cursors/nullptr.png deleted file mode 100644 index 489636595bec..000000000000 Binary files a/vcl/osx/res/cursors/nullptr.png and /dev/null differ diff --git a/vcl/osx/res/cursors/nwsesize.png b/vcl/osx/res/cursors/nwsesize.png deleted file mode 100644 index fc6a33288ef2..000000000000 Binary files a/vcl/osx/res/cursors/nwsesize.png and /dev/null differ diff --git a/vcl/osx/res/cursors/pen.png b/vcl/osx/res/cursors/pen.png deleted file mode 100644 index 81b583086778..000000000000 Binary files a/vcl/osx/res/cursors/pen.png and /dev/null differ diff --git a/vcl/osx/res/cursors/pivotcol.png b/vcl/osx/res/cursors/pivotcol.png deleted file mode 100644 index 1c38b915b886..000000000000 Binary files a/vcl/osx/res/cursors/pivotcol.png and /dev/null differ diff --git a/vcl/osx/res/cursors/pivotdel.png b/vcl/osx/res/cursors/pivotdel.png deleted file mode 100644 index fbd663ee36c1..000000000000 Binary files a/vcl/osx/res/cursors/pivotdel.png and /dev/null differ diff --git a/vcl/osx/res/cursors/pivotfld.png b/vcl/osx/res/cursors/pivotfld.png deleted file mode 100644 index 04375de1efe6..000000000000 Binary files a/vcl/osx/res/cursors/pivotfld.png and /dev/null differ diff --git a/vcl/osx/res/cursors/pivotrow.png b/vcl/osx/res/cursors/pivotrow.png deleted file mode 100644 index 18ef0e8e59ba..000000000000 Binary files a/vcl/osx/res/cursors/pivotrow.png and /dev/null differ diff --git a/vcl/osx/res/cursors/rotate.png b/vcl/osx/res/cursors/rotate.png deleted file mode 100644 index a8137e077e56..000000000000 Binary files a/vcl/osx/res/cursors/rotate.png and /dev/null differ diff --git a/vcl/osx/res/cursors/tblsele.png b/vcl/osx/res/cursors/tblsele.png deleted file mode 100644 index a2da05e009d1..000000000000 Binary files a/vcl/osx/res/cursors/tblsele.png and /dev/null differ diff --git a/vcl/osx/res/cursors/tblsels.png b/vcl/osx/res/cursors/tblsels.png deleted file mode 100644 index ba20589c794f..000000000000 Binary files a/vcl/osx/res/cursors/tblsels.png and /dev/null differ diff --git a/vcl/osx/res/cursors/tblselse.png b/vcl/osx/res/cursors/tblselse.png deleted file mode 100644 index 4ee7f62b304b..000000000000 Binary files a/vcl/osx/res/cursors/tblselse.png and /dev/null differ diff --git a/vcl/osx/res/cursors/tblselsw.png b/vcl/osx/res/cursors/tblselsw.png deleted file mode 100644 index 11d7cb34d64d..000000000000 Binary files a/vcl/osx/res/cursors/tblselsw.png and /dev/null differ diff --git a/vcl/osx/res/cursors/tblselw.png b/vcl/osx/res/cursors/tblselw.png deleted file mode 100644 index 62813a975855..000000000000 Binary files a/vcl/osx/res/cursors/tblselw.png and /dev/null differ diff --git a/vcl/osx/res/cursors/vshear.png b/vcl/osx/res/cursors/vshear.png deleted file mode 100644 index b01cb6c935e1..000000000000 Binary files a/vcl/osx/res/cursors/vshear.png and /dev/null differ diff --git a/vcl/osx/res/cursors/vtext.png b/vcl/osx/res/cursors/vtext.png deleted file mode 100644 index dcc1080e5fcf..000000000000 Binary files a/vcl/osx/res/cursors/vtext.png and /dev/null differ diff --git a/vcl/osx/res/cursors/wshide.png b/vcl/osx/res/cursors/wshide.png deleted file mode 100644 index 0195b91cdb39..000000000000 Binary files a/vcl/osx/res/cursors/wshide.png and /dev/null differ diff --git a/vcl/osx/res/cursors/wsshow.png b/vcl/osx/res/cursors/wsshow.png deleted file mode 100644 index fe374643eb20..000000000000 Binary files a/vcl/osx/res/cursors/wsshow.png and /dev/null differ diff --git a/vcl/osx/saldata.cxx b/vcl/osx/saldata.cxx index fc13822f99d5..e0e974ff1f3d 100644 --- a/vcl/osx/saldata.cxx +++ b/vcl/osx/saldata.cxx @@ -24,6 +24,13 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include #import "apple_remote/RemoteMainController.h" @@ -114,134 +121,152 @@ void SalData::ensureThreadAutoreleasePool() } } -struct curs_ent -{ - const char* pBaseName; - const NSPoint aHotSpot; -}; -const o3tl::enumarray aCursorTab = +NSImage* load_icon_by_name(const OUString& rIconName) { -curs_ent{ nullptr, { 0, 0 } }, //PointerStyle::Arrow -{ "nullptr", { 16, 16 } }, //PointerStyle::Null -{ "hourglass", { 15, 15 } }, //PointerStyle::Wait -{ nullptr, { 0, 0 } }, //PointerStyle::Text -{ "help", { 0, 0 } }, //PointerStyle::Help -{ nullptr, { 0, 0 } }, //PointerStyle::Cross -{ nullptr, { 0, 0 } }, //PointerStyle::Move -{ nullptr, { 0, 0 } }, //PointerStyle::NSize -{ nullptr, { 0, 0 } }, //PointerStyle::SSize -{ nullptr, { 0, 0 } }, //PointerStyle::WSize -{ nullptr, { 0, 0 } }, //PointerStyle::ESize -{ "nwsesize", { 15, 15 } }, //PointerStyle::NWSize -{ "neswsize", { 15, 15 } }, //PointerStyle::NESize -{ "neswsize", { 15, 15 } }, //PointerStyle::SWSize -{ "nwsesize", { 15, 15 } }, //PointerStyle::SESize -{ nullptr, { 0, 0 } }, //PointerStyle::WindowNSize -{ nullptr, { 0, 0 } }, //PointerStyle::WindowSSize -{ nullptr, { 0, 0 } }, //PointerStyle::WindowWSize -{ nullptr, { 0, 0 } }, //PointerStyle::WindowESize -{ "nwsesize", { 15, 15 } }, //PointerStyle::WindowNWSize -{ "neswsize", { 15, 15 } }, //PointerStyle::WindowNESize -{ "neswsize", { 15, 15 } }, //PointerStyle::WindowSWSize -{ "nwsesize", { 15, 15 } }, //PointerStyle::WindowSESize -{ nullptr, { 0, 0 } }, //PointerStyle::HSplit -{ nullptr, { 0, 0 } }, //PointerStyle::VSplit -{ nullptr, { 0, 0 } }, //PointerStyle::HSizeBar -{ nullptr, { 0, 0 } }, //PointerStyle::VSizeBar -{ nullptr, { 0, 0 } }, //PointerStyle::Hand -{ nullptr, { 0, 0 } }, //PointerStyle::RefHand -{ "pen", { 3, 27 } }, //PointerStyle::Pen -{ "magnify", { 12, 13 } }, //PointerStyle::Magnify -{ "fill", { 10, 22 } }, //PointerStyle::Fill -{ "rotate", { 15, 15 } }, //PointerStyle::Rotate -{ "hshear", { 15, 15 } }, //PointerStyle::HShear -{ "vshear", { 15, 15 } }, //PointerStyle::VShear -{ "mirror", { 14, 12 } }, //PointerStyle::Mirror -{ "crook", { 15, 14 } }, //PointerStyle::Crook -{ "crop", { 9, 9 } }, //PointerStyle::Crop -{ "movept", { 0, 0 } }, //PointerStyle::MovePoint -{ "movebw", { 0, 0 } }, //PointerStyle::MoveBezierWeight -{ "movedata", { 0, 0 } }, //PointerStyle::MoveData -{ "copydata", { 0, 0 } }, //PointerStyle::CopyData -{ "linkdata", { 0, 0 } }, //PointerStyle::LinkData -{ "movedlnk", { 0, 0 } }, //PointerStyle::MoveDataLink -{ "copydlnk", { 0, 0 } }, //PointerStyle::CopyDataLink -{ "movef", { 8, 8 } }, //PointerStyle::MoveFile -{ "copyf", { 8, 8 } }, //PointerStyle::CopyFile -{ "linkf", { 8, 8 } }, //PointerStyle::LinkFile -{ "moveflnk", { 8, 8 } }, //PointerStyle::MoveFileLink -{ "copyflnk", { 8, 8 } }, //PointerStyle::CopyFileLink -{ "movef2", { 7, 8 } }, //PointerStyle::MoveFiles -{ "copyf2", { 7, 8 } }, //PointerStyle::CopyFiles -{ "notallow", { 15, 15 } }, //PointerStyle::NotAllowed -{ "dline", { 8, 8 } }, //PointerStyle::DrawLine -{ "drect", { 8, 8 } }, //PointerStyle::DrawRect -{ "dpolygon", { 8, 8 } }, //PointerStyle::DrawPolygon -{ "dbezier", { 8, 8 } }, //PointerStyle::DrawBezier -{ "darc", { 8, 8 } }, //PointerStyle::DrawArc -{ "dpie", { 8, 8 } }, //PointerStyle::DrawPie -{ "dcirccut", { 8, 8 } }, //PointerStyle::DrawCircleCut -{ "dellipse", { 8, 8 } }, //PointerStyle::DrawEllipse -{ "dfree", { 8, 8 } }, //PointerStyle::DrawFreehand -{ "dconnect", { 8, 8 } }, //PointerStyle::DrawConnect -{ "dtext", { 8, 8 } }, //PointerStyle::DrawText -{ "dcapt", { 8, 8 } }, //PointerStyle::DrawCaption -{ "chart", { 15, 16 } }, //PointerStyle::Chart -{ "detectiv", { 12, 13 } }, //PointerStyle::Detective -{ "pivotcol", { 7, 5 } }, //PointerStyle::PivotCol -{ "pivotrow", { 8, 7 } }, //PointerStyle::PivotRow -{ "pivotfld", { 8, 7 } }, //PointerStyle::PivotField -{ "chain", { 0, 2 } }, //PointerStyle::Chain -{ "chainnot", { 2, 2 } }, //PointerStyle::ChainNotAllowed -{ "asn", { 16, 12 } }, //PointerStyle::AutoScrollN -{ "ass", { 15, 19 } }, //PointerStyle::AutoScrollS -{ "asw", { 12, 15 } }, //PointerStyle::AutoScrollW -{ "ase", { 19, 16 } }, //PointerStyle::AutoScrollE -{ "asnw", { 10, 10 } }, //PointerStyle::AutoScrollNW -{ "asne", { 21, 10 } }, //PointerStyle::AutoScrollNE -{ "assw", { 21, 21 } }, //PointerStyle::AutoScrollSW -{ "asse", { 21, 21 } }, //PointerStyle::AutoScrollSE -{ "asns", { 15, 15 } }, //PointerStyle::AutoScrollNS -{ "aswe", { 15, 15 } }, //PointerStyle::AutoScrollWE -{ "asnswe", { 15, 15 } }, //PointerStyle::AutoScrollNSWE -{ "vtext", { 15, 15 } }, //PointerStyle::TextVertical -{ "pivotdel", { 18, 15 } }, //PointerStyle::PivotDelete -{ "tblsels", { 15, 30 } }, //PointerStyle::TabSelectS -{ "tblsele", { 30, 16 } }, //PointerStyle::TabSelectE -{ "tblselse", { 30, 30 } }, //PointerStyle::TabSelectSE -{ "tblselw", { 1, 16 } }, //PointerStyle::TabSelectW -{ "tblselsw", { 1, 30 } }, //PointerStyle::TabSelectSW -{ "wshide", { 16, 16 } }, //PointerStyle::HideWhitespace -{ "wsshow", { 16, 16 } } //PointerStyle::ShowWhitespace -}; + OUString sIconTheme = Application::GetSettings().GetStyleSettings().DetermineIconTheme(); + OUString sUILang = Application::GetSettings().GetUILanguageTag().getBcp47(); + auto xMemStm = ImageTree::get().getImageStream(rIconName, sIconTheme, sUILang); + if (!xMemStm) + return nullptr; + + auto data = xMemStm->GetData(); + auto length = xMemStm->TellEnd(); + NSData * byteData = [NSData dataWithBytes:data length:length]; + NSBitmapImageRep * imageRep = [NSBitmapImageRep imageRepWithData:byteData]; + NSSize imageSize = NSMakeSize(CGImageGetWidth([imageRep CGImage]), CGImageGetHeight([imageRep CGImage])); + + NSImage * image = [[NSImage alloc] initWithSize:imageSize]; + [image addRepresentation:imageRep]; + return image; +} + +#define MAKE_CURSOR( vcl_name, name, name2 ) \ + case vcl_name: \ + aHotSpot = NSPoint{name##curs_x_hot, name##curs_y_hot}; \ + aIconName = name2; \ + break NSCursor* SalData::getCursor( PointerStyle i_eStyle ) { NSCursor* pCurs = maCursors[ i_eStyle ]; - if( pCurs == INVALID_CURSOR_PTR ) + if( pCurs != INVALID_CURSOR_PTR ) + return pCurs; + + NSPoint aHotSpot; + OUString aIconName; + + switch( i_eStyle ) { - pCurs = nil; - if( aCursorTab[ i_eStyle ].pBaseName ) - { - NSPoint aHotSpot = aCursorTab[ i_eStyle ].aHotSpot; - CFStringRef pCursorName = - CFStringCreateWithCStringNoCopy( - kCFAllocatorDefault, - aCursorTab[ i_eStyle ].pBaseName, - kCFStringEncodingASCII, - kCFAllocatorNull ); - CFBundleRef hMain = CFBundleGetMainBundle(); - CFURLRef hURL = CFBundleCopyResourceURL( hMain, pCursorName, CFSTR("png"), CFSTR("cursors") ); - if( hURL ) - { - pCurs = [[NSCursor alloc] initWithImage: [[NSImage alloc] initWithContentsOfURL: const_cast(reinterpret_cast(hURL))] hotSpot: aHotSpot]; - CFRelease( hURL ); - } - CFRelease( pCursorName ); + // TODO + MAKE_CURSOR( PointerStyle::Wait, wait_, RID_CURSOR_WAIT ); + MAKE_CURSOR( PointerStyle::NWSize, nwsize_, RID_CURSOR_NWSIZE ); + MAKE_CURSOR( PointerStyle::NESize, nesize_, RID_CURSOR_NESIZE ); + MAKE_CURSOR( PointerStyle::SWSize, swsize_, RID_CURSOR_SWSIZE ); + MAKE_CURSOR( PointerStyle::SESize, sesize_, RID_CURSOR_SESIZE ); + MAKE_CURSOR( PointerStyle::WindowNWSize, window_nwsize_, RID_CURSOR_WINDOW_NWSIZE ); + MAKE_CURSOR( PointerStyle::WindowNESize, window_nesize_, RID_CURSOR_WINDOW_NESIZE ); + MAKE_CURSOR( PointerStyle::WindowSWSize, window_swsize_, RID_CURSOR_WINDOW_SWSIZE ); + MAKE_CURSOR( PointerStyle::WindowSESize, window_sesize_, RID_CURSOR_WINDOW_SESIZE ); + + MAKE_CURSOR( PointerStyle::Help, help_, RID_CURSOR_HELP ); + MAKE_CURSOR( PointerStyle::Pen, pen_, RID_CURSOR_PEN ); + MAKE_CURSOR( PointerStyle::Null, null, RID_CURSOR_NULL ); + MAKE_CURSOR( PointerStyle::Magnify, magnify_, RID_CURSOR_MAGNIFY ); + MAKE_CURSOR( PointerStyle::Fill, fill_, RID_CURSOR_FILL ); + MAKE_CURSOR( PointerStyle::MoveData, movedata_, RID_CURSOR_MOVE_DATA ); + MAKE_CURSOR( PointerStyle::CopyData, copydata_, RID_CURSOR_COPY_DATA ); + MAKE_CURSOR( PointerStyle::MoveFile, movefile_, RID_CURSOR_MOVE_FILE ); + MAKE_CURSOR( PointerStyle::CopyFile, copyfile_, RID_CURSOR_COPY_FILE ); + MAKE_CURSOR( PointerStyle::MoveFiles, movefiles_, RID_CURSOR_MOVE_FILES ); + MAKE_CURSOR( PointerStyle::CopyFiles, copyfiles_, RID_CURSOR_COPY_FILES ); + MAKE_CURSOR( PointerStyle::NotAllowed, nodrop_, RID_CURSOR_NOT_ALLOWED ); + MAKE_CURSOR( PointerStyle::Rotate, rotate_, RID_CURSOR_ROTATE ); + MAKE_CURSOR( PointerStyle::HShear, hshear_, RID_CURSOR_H_SHEAR ); + MAKE_CURSOR( PointerStyle::VShear, vshear_, RID_CURSOR_V_SHEAR ); + MAKE_CURSOR( PointerStyle::DrawLine, drawline_, RID_CURSOR_DRAW_LINE ); + MAKE_CURSOR( PointerStyle::DrawRect, drawrect_, RID_CURSOR_DRAW_RECT ); + MAKE_CURSOR( PointerStyle::DrawPolygon, drawpolygon_, RID_CURSOR_DRAW_POLYGON ); + MAKE_CURSOR( PointerStyle::DrawBezier, drawbezier_, RID_CURSOR_DRAW_BEZIER ); + MAKE_CURSOR( PointerStyle::DrawArc, drawarc_, RID_CURSOR_DRAW_ARC ); + MAKE_CURSOR( PointerStyle::DrawPie, drawpie_, RID_CURSOR_DRAW_PIE ); + MAKE_CURSOR( PointerStyle::DrawCircleCut, drawcirclecut_, RID_CURSOR_DRAW_CIRCLE_CUT ); + MAKE_CURSOR( PointerStyle::DrawEllipse, drawellipse_, RID_CURSOR_DRAW_ELLIPSE ); + MAKE_CURSOR( PointerStyle::DrawConnect, drawconnect_, RID_CURSOR_DRAW_CONNECT ); + MAKE_CURSOR( PointerStyle::DrawText, drawtext_, RID_CURSOR_DRAW_TEXT ); + MAKE_CURSOR( PointerStyle::Mirror, mirror_, RID_CURSOR_MIRROR ); + MAKE_CURSOR( PointerStyle::Crook, crook_, RID_CURSOR_CROOK ); + MAKE_CURSOR( PointerStyle::Crop, crop_, RID_CURSOR_CROP ); + MAKE_CURSOR( PointerStyle::MovePoint, movepoint_, RID_CURSOR_MOVE_POINT ); + MAKE_CURSOR( PointerStyle::MoveBezierWeight, movebezierweight_, RID_CURSOR_MOVE_BEZIER_WEIGHT ); + MAKE_CURSOR( PointerStyle::DrawFreehand, drawfreehand_, RID_CURSOR_DRAW_FREEHAND ); + MAKE_CURSOR( PointerStyle::DrawCaption, drawcaption_, RID_CURSOR_DRAW_CAPTION ); + MAKE_CURSOR( PointerStyle::LinkData, linkdata_, RID_CURSOR_LINK_DATA ); + MAKE_CURSOR( PointerStyle::MoveDataLink, movedlnk_, RID_CURSOR_MOVE_DATA_LINK ); + MAKE_CURSOR( PointerStyle::CopyDataLink, copydlnk_, RID_CURSOR_COPY_DATA_LINK ); + MAKE_CURSOR( PointerStyle::LinkFile, linkfile_, RID_CURSOR_LINK_FILE ); + MAKE_CURSOR( PointerStyle::MoveFileLink, moveflnk_, RID_CURSOR_MOVE_FILE_LINK ); + MAKE_CURSOR( PointerStyle::CopyFileLink, copyflnk_, RID_CURSOR_COPY_FILE_LINK ); + MAKE_CURSOR( PointerStyle::Chart, chart_, RID_CURSOR_CHART ); + MAKE_CURSOR( PointerStyle::Detective, detective_, RID_CURSOR_DETECTIVE ); + MAKE_CURSOR( PointerStyle::PivotCol, pivotcol_, RID_CURSOR_PIVOT_COLUMN ); + MAKE_CURSOR( PointerStyle::PivotRow, pivotrow_, RID_CURSOR_PIVOT_ROW ); + MAKE_CURSOR( PointerStyle::PivotField, pivotfld_, RID_CURSOR_PIVOT_FIELD ); + MAKE_CURSOR( PointerStyle::PivotDelete, pivotdel_, RID_CURSOR_PIVOT_DELETE ); + MAKE_CURSOR( PointerStyle::Chain, chain_, RID_CURSOR_CHAIN ); + MAKE_CURSOR( PointerStyle::ChainNotAllowed, chainnot_, RID_CURSOR_CHAIN_NOT_ALLOWED ); + MAKE_CURSOR( PointerStyle::AutoScrollN, asn_, RID_CURSOR_AUTOSCROLL_N ); + MAKE_CURSOR( PointerStyle::AutoScrollS, ass_, RID_CURSOR_AUTOSCROLL_S ); + MAKE_CURSOR( PointerStyle::AutoScrollW, asw_, RID_CURSOR_AUTOSCROLL_W ); + MAKE_CURSOR( PointerStyle::AutoScrollE, ase_, RID_CURSOR_AUTOSCROLL_E ); + MAKE_CURSOR( PointerStyle::AutoScrollNW, asnw_, RID_CURSOR_AUTOSCROLL_NW ); + MAKE_CURSOR( PointerStyle::AutoScrollNE, asne_, RID_CURSOR_AUTOSCROLL_NE ); + MAKE_CURSOR( PointerStyle::AutoScrollSW, assw_, RID_CURSOR_AUTOSCROLL_SW ); + MAKE_CURSOR( PointerStyle::AutoScrollSE, asse_, RID_CURSOR_AUTOSCROLL_SE ); + MAKE_CURSOR( PointerStyle::AutoScrollNS, asns_, RID_CURSOR_AUTOSCROLL_NS ); + MAKE_CURSOR( PointerStyle::AutoScrollWE, aswe_, RID_CURSOR_AUTOSCROLL_WE ); + MAKE_CURSOR( PointerStyle::AutoScrollNSWE, asnswe_, RID_CURSOR_AUTOSCROLL_NSWE ); + MAKE_CURSOR( PointerStyle::TextVertical, vertcurs_, RID_CURSOR_TEXT_VERTICAL ); + + // #i32329# + MAKE_CURSOR( PointerStyle::TabSelectS, tblsels_, RID_CURSOR_TAB_SELECT_S ); + MAKE_CURSOR( PointerStyle::TabSelectE, tblsele_, RID_CURSOR_TAB_SELECT_E ); + MAKE_CURSOR( PointerStyle::TabSelectSE, tblselse_, RID_CURSOR_TAB_SELECT_SE ); + MAKE_CURSOR( PointerStyle::TabSelectW, tblselw_, RID_CURSOR_TAB_SELECT_W ); + MAKE_CURSOR( PointerStyle::TabSelectSW, tblselsw_, RID_CURSOR_TAB_SELECT_SW ); + + MAKE_CURSOR( PointerStyle::HideWhitespace, hidewhitespace_, RID_CURSOR_HIDE_WHITESPACE ); + MAKE_CURSOR( PointerStyle::ShowWhitespace, showwhitespace_, RID_CURSOR_SHOW_WHITESPACE ); + + default: + SAL_WARN( "vcl", "pointer style " << static_cast(i_eStyle) << "not implemented" ); + assert( false && "pointer style not implemented" ); + break; + } + + NSImage* theImage = load_icon_by_name(aIconName); + assert ([theImage size].width == 128 || [theImage size].width == 32); + if ([theImage size].width == 128) + { + // If we have a 128x128 image, generate scaled versions of it. + // This will result in macOS picking a reasonably sized image for different screen dpi. + NSSize cursorSize = NSMakeSize(32,32); + NSImage *multiResImage = [[NSImage alloc] initWithSize:cursorSize]; + for (int scale = 1; scale <= 4; scale++) { + NSAffineTransform *xform = [[NSAffineTransform alloc] init]; + [xform scaleBy:scale]; + id hints = @{ NSImageHintCTM: xform }; + CGImageRef rasterCGImage = [theImage CGImageForProposedRect:NULL context:nil hints:hints]; + NSBitmapImageRep *rep = [[NSBitmapImageRep alloc] initWithCGImage:rasterCGImage]; + [rep setSize:cursorSize]; + [multiResImage addRepresentation:rep]; } - maCursors[ i_eStyle ] = pCurs; + pCurs = [[NSCursor alloc] initWithImage: multiResImage hotSpot: aHotSpot]; } + else + pCurs = [[NSCursor alloc] initWithImage: theImage hotSpot: aHotSpot]; + + maCursors[ i_eStyle ] = pCurs; return pCurs; } diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx index 0ab8d9160dcf..a9ebc417f15b 100644 --- a/vcl/osx/salframe.cxx +++ b/vcl/osx/salframe.cxx @@ -925,7 +925,7 @@ NSCursor* AquaSalFrame::getCurrentCursor() pCursor = GetSalData()->getCursor( mePointerStyle ); if( pCursor == nil ) { - OSL_FAIL( "unmapped cursor" ); + assert( false && "unmapped cursor" ); pCursor = [NSCursor arrowCursor]; } break; diff --git a/vcl/unx/gtk3/gtk3gtkdata.cxx b/vcl/unx/gtk3/gtk3gtkdata.cxx index 3c010c274cb0..f15f099ab646 100644 --- a/vcl/unx/gtk3/gtk3gtkdata.cxx +++ b/vcl/unx/gtk3/gtk3gtkdata.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -57,136 +58,6 @@ #include -#define nodrop_curs_x_hot 9 -#define nodrop_curs_y_hot 9 -#define magnify_curs_x_hot 12 -#define magnify_curs_y_hot 13 -#define rotate_curs_x_hot 15 -#define rotate_curs_y_hot 15 -#define hshear_curs_x_hot 15 -#define hshear_curs_y_hot 15 -#define vshear_curs_x_hot 15 -#define vshear_curs_y_hot 15 -#define drawline_curs_x_hot 7 -#define drawline_curs_y_hot 7 -#define drawrect_curs_x_hot 7 -#define drawrect_curs_y_hot 7 -#define drawpolygon_curs_x_hot 7 -#define drawpolygon_curs_y_hot 7 -#define drawbezier_curs_x_hot 7 -#define drawbezier_curs_y_hot 7 -#define drawarc_curs_x_hot 7 -#define drawarc_curs_y_hot 7 -#define drawpie_curs_x_hot 7 -#define drawpie_curs_y_hot 7 -#define drawcirclecut_curs_x_hot 7 -#define drawcirclecut_curs_y_hot 7 -#define drawellipse_curs_x_hot 7 -#define drawellipse_curs_y_hot 7 -#define drawconnect_curs_x_hot 7 -#define drawconnect_curs_y_hot 7 -#define drawtext_curs_x_hot 8 -#define drawtext_curs_y_hot 8 -#define mirror_curs_x_hot 14 -#define mirror_curs_y_hot 12 -#define crook_curs_x_hot 15 -#define crook_curs_y_hot 14 -#define crop_curs_x_hot 9 -#define crop_curs_y_hot 9 -#define movepoint_curs_x_hot 0 -#define movepoint_curs_y_hot 0 -#define movebezierweight_curs_x_hot 0 -#define movebezierweight_curs_y_hot 0 -#define drawfreehand_curs_x_hot 8 -#define drawfreehand_curs_y_hot 8 -#define drawcaption_curs_x_hot 8 -#define drawcaption_curs_y_hot 8 -#define movedata_curs_x_hot 1 -#define movedata_curs_y_hot 1 -#define copydata_curs_x_hot 1 -#define copydata_curs_y_hot 1 -#define linkdata_curs_x_hot 1 -#define linkdata_curs_y_hot 1 -#define movedlnk_curs_x_hot 1 -#define movedlnk_curs_y_hot 1 -#define copydlnk_curs_x_hot 1 -#define copydlnk_curs_y_hot 1 -#define movefile_curs_x_hot 9 -#define movefile_curs_y_hot 9 -#define copyfile_curs_x_hot 9 -#define copyfile_curs_y_hot 9 -#define linkfile_curs_x_hot 9 -#define linkfile_curs_y_hot 9 -#define moveflnk_curs_x_hot 9 -#define moveflnk_curs_y_hot 9 -#define copyflnk_curs_x_hot 9 -#define copyflnk_curs_y_hot 9 -#define movefiles_curs_x_hot 8 -#define movefiles_curs_y_hot 9 -#define copyfiles_curs_x_hot 8 -#define copyfiles_curs_y_hot 9 - -#define chart_curs_x_hot 15 -#define chart_curs_y_hot 16 -#define detective_curs_x_hot 12 -#define detective_curs_y_hot 13 -#define pivotcol_curs_x_hot 7 -#define pivotcol_curs_y_hot 5 -#define pivotfld_curs_x_hot 8 -#define pivotfld_curs_y_hot 7 -#define pivotrow_curs_x_hot 8 -#define pivotrow_curs_y_hot 7 -#define pivotdel_curs_x_hot 9 -#define pivotdel_curs_y_hot 8 - -#define chain_curs_x_hot 0 -#define chain_curs_y_hot 2 -#define chainnot_curs_x_hot 2 -#define chainnot_curs_y_hot 2 - -#define ase_curs_x_hot 19 -#define ase_curs_y_hot 16 -#define asn_curs_x_hot 16 -#define asn_curs_y_hot 12 -#define asne_curs_x_hot 21 -#define asne_curs_y_hot 10 -#define asns_curs_x_hot 15 -#define asns_curs_y_hot 15 -#define asnswe_curs_x_hot 15 -#define asnswe_curs_y_hot 15 -#define asnw_curs_x_hot 10 -#define asnw_curs_y_hot 10 -#define ass_curs_x_hot 15 -#define ass_curs_y_hot 19 -#define asse_curs_x_hot 21 -#define asse_curs_y_hot 21 -#define assw_curs_x_hot 10 -#define assw_curs_y_hot 21 -#define asw_curs_x_hot 12 -#define asw_curs_y_hot 15 -#define aswe_curs_x_hot 15 -#define aswe_curs_y_hot 15 -#define nullcurs_x_hot 2 -#define nullcurs_y_hot 2 - -#define fill_curs_x_hot 10 -#define fill_curs_y_hot 22 -#define vertcurs_curs_x_hot 8 -#define vertcurs_curs_y_hot 8 -#define tblsele_curs_x_hot 14 -#define tblsele_curs_y_hot 8 -#define tblsels_curs_x_hot 7 -#define tblsels_curs_y_hot 14 -#define tblselse_curs_x_hot 14 -#define tblselse_curs_y_hot 14 -#define tblselw_curs_x_hot 1 -#define tblselw_curs_y_hot 8 -#define tblselsw_curs_x_hot 1 -#define tblselsw_curs_y_hot 14 -#define hidewhitespace_curs_x_hot 0 -#define hidewhitespace_curs_y_hot 10 -#define showwhitespace_curs_x_hot 0 -#define showwhitespace_curs_y_hot 10 using namespace vcl_sal; -- cgit v1.2.3