summaryrefslogtreecommitdiff
path: root/include/vcl/sysdata.hxx
AgeCommit message (Collapse)Author
2020-11-02Better types for SystemGraphicsData::hDrawable, cairo::X11SysData::hDrawableStephan Bergmann
Both apparently only hold X11 Drawable values. But include/vcl/sysdata.hxx does not include the X11 include files that would define Drawable, so use sal_uIntPtr there, which is also used for other similar SystemEnvData and SystemParentData aWindow members there. Change-Id: Ia136ad1937e2009eb409c3ef8cc41dc81bd338a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105156 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-23Change SystemParentData::aWindow to sal_uIntPtrStephan Bergmann
...with similar reasoning as in 5d422c0348efd1df6b3d44dd6efcf5c5490fc321 "Revert 'sal_uIntPtr->unsigned long in SystemEnvData'": Prior to 3aef606f2758172a27718a06fea0ff9080e4d80f "use tools::Long in vcl" this was long, but besides X11 window resource IDs (for whose appropriate type see the commit message of 5d422c0348efd1df6b3d44dd6efcf5c5490fc321), at least vcl/unx/gtk3/gtk3gtkframe.cxx uses it in combination with GdkNativeWindow (e.g., GtkSalFrame::m_aForeignParentWindow and GtkSalFrame::findTopLevelSystemWindow), which itself is a typedef for sal_uIntPtr (vcl/inc/unx/gtk/gtkframe.hxx). Change-Id: I6d26ca7056da413d948215682425ee1ddb622326 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104695 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2020-10-22Revert "sal_uIntPtr->unsigned long in SystemEnvData"Stephan Bergmann
This reverts commit c0f1d211eff5f89f5c9298743f6e7d91d187b799, which states that it changed the type of UNX-only SystemEnvData::aWindow from sal_uIntPtr to unsigned long "to match the type used by X11". (And while resource IDs used for windows etc. are apparently 32-bit in the X11 protocol, see e.g. <https://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.html>, Xlib and the underlying /usr/include/X11/Xdefs.h indeed appear to be somewhat confused whether the typedef for XID should be unsigned long (presumably stemming from times when long was universally 32-bit) or CARD32, see e.g. <https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/blob/master/include/X11/ Xdefs.h>.) But at least for GTK3/Wayland, the sal_uIntPtr values returned by GtkSalFrame::GetNativeWindowHandle (in vcl/unx/gtk3/gtk3gtkframe.cxx, and which are stored in SystemEnvData::aWindow in GtkSalFrame::InitCommon, vcl/unx/gtk3/gtk3gtkframe.cxx, and GtkSalObjectBase::Init, vcl/unx/gtk3/gtk3gtkobject.cxx) as > return reinterpret_cast<sal_uIntPtr>(gdk_wayland_window_get_wl_surface(pWindow)); are struct wl_surface* values, so sal_uIntPtr looks like the overall more appropriate type after all. (The part of c0f1d211eff5f89f5c9298743f6e7d91d187b799 that dropped the somewhat needless C-style-cast converting aWindow from sal_uIntPtr to sal_IntPtr in SystemChildWindow::GetParentWindowHandle, vcl/source/window/syschild.cxx, has not been reverted, though.) Change-Id: I8fea062126eacd2d6dc44dab14d5240c4b9946e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104639 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-19use tools::Long in vclNoel
Change-Id: Ice1055021e8568634e9a66ba89d3bb4ef4e731df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104522 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-03tdf#42949 Fix IWYU warnings in include/[t-x]*/*hxxGabor Kelemen
Recheck after 7-0 branchoff Also drop the now unused file include/vcl/field.hxx Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I9e54c82f50d1e02a0f99858939cac999fc66f7de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99261 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-05-24GetSysFontData is newly unusedCaolán McNamara
and thus SystemFontData Change-Id: I563a6b7c251194cd73c6b0026d4ae8485a057b28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94740 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-24GetSysTextLayoutData is newly unusedCaolán McNamara
and thus SystemTextLayoutData and SystemGlyphData Change-Id: Ib22e4b4f98b9da0337f31645bd26e41475f6d830 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94739 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-24inline some use-once typedefsNoel Grandin
Change-Id: Idddba2f3fd05265b08dbc88edb6152d34a166052 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-23Related tdf#126459: fix crash in presenter console using gen vclplugKatarina Behrens
A slide with video is needed to reproduce Regression from commit ac87cfdf263d2abd97b32857534d0f749b7c4479, 'toolkit' and 'platform' bits were never set (bc irrelevant) in gen vclplug but now if not set, values mapping to 0 (Gtk3, Wayland) will be used and things go down the drain in avmedia/gstplayer then Just between us girls, nobody in their right mind would use gen vclplug for presentation, but crash is not nice so let's fix this Change-Id: If318ab93897f9f4854f7316e630c35aaec2480fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87185 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-19get native gtk widgets in sidebars workingCaolán McNamara
Change-Id: If65aef1249f54a87d7854c3fa2db4319a24a5a05 Reviewed-on: https://gerrit.libreoffice.org/85326 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-06Replace SystemEnvData pToolkit/pPlatformName strings with enumsStephan Bergmann
(and streamline those data members' names) Change-Id: Ifdd596c7a54dd507045d412c30b463468c2f798b Reviewed-on: https://gerrit.libreoffice.org/80313 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-06SystemEnvData::nSize is no longer read and can be removedStephan Bergmann
...since 5926b22b5dc33490d23d594b129eb8a70b94ffb0 "The SystemEnvData passed into the canvas factories appears to be unused". (And the user-provided SvpSalObject ctor can be removed, at which point the use in SvpSalInstance::CreateObject should be written without "()" to avoid loplugin:subtlezeroinit. Change-Id: I4392fa2d697b29c814d7b577a7b1f8c984c05e70 Reviewed-on: https://gerrit.libreoffice.org/80298 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-04tdf#127529 vertical text not drawn in slideshow canvasCaolán McNamara
because the canvas text drawing impl falls back to using an OutputDevice view of the canvas to use the vcl text drawing apis to achieve vertical text To get an OutputDevice view of the canvas there is a specific VirtualDevice ctor available to create a VirtualDevice that, unlike the normal case, doesn't have its own specific backing buffer, but instead draws to the underlying target provided via the SystemGraphicsData arg The svp/gtk impl missed that understanding and provided an ordinary VirtualDevice with its own backing buffer, not a VirtualDevice that would draw to the expected target surface of the canvas. So the vertical text was drawn to a different surface than the intended one, and was just discarded. The cairo use in the canvas long precedes the use of cairo in vcl itself. Seeing as text is now rendered with cairo in all cases where the canvas uses cairo its probably now pointless for canvas to have its own text rendering path. Change-Id: Ie3b0a43ca2b746cbfe25e2d0415315b3d5403cd2 Reviewed-on: https://gerrit.libreoffice.org/80162 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-29Fix typosAndrea Gelmini
Change-Id: Ic2fb0772648b3f93c2fdfa4d2f663b6ede2ead51 Reviewed-on: https://gerrit.libreoffice.org/76507 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-27tdf#125271 under wayland without gtksink, try waylandsinkCaolán McNamara
and if there is no videosink then give up Change-Id: I6b60e7be1e77dbf5c4c277ccf47a4d121f3cd6a5 Reviewed-on: https://gerrit.libreoffice.org/72871 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-10tdf#42949 Fix IWYU warnings in include/vcl/s*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ie87d27dd2c385a63349e0b322fd067ba03d2d152 Reviewed-on: https://gerrit.libreoffice.org/64479 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-01-11[API CHANGE] migrate PackageKit usage to Modify2Caolán McNamara
xid dropped in favour of application_id Change-Id: Id1eb43aa9c8dfb4eac82f99eff0f84c5320e0da0 Reviewed-on: https://gerrit.libreoffice.org/47661 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-21set dbus id for existing DbusSessionHelper usersCaolán McNamara
Change-Id: I64329e21ae79b6607856de9781bee0274b9cb136 Reviewed-on: https://gerrit.libreoffice.org/46854 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-14sal_uIntPtr->unsigned long in SystemEnvDataNoel Grandin
to match the type used by X11 Change-Id: I5fe043e33602be21c84b81780c89df751c3bc96c Reviewed-on: https://gerrit.libreoffice.org/46393 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-06convert various vcl system fields from unsigned long -> sal_uInt32Noel Grandin
Change-Id: Iaa08ecb3a9a17f384267f2b685a4b672277db1ca Reviewed-on: https://gerrit.libreoffice.org/44317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-02remove some castingCaolán McNamara
Change-Id: Idf6c82b0c609d8680e2017602bfe9a93acb093b9 Reviewed-on: https://gerrit.libreoffice.org/41807 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-18coverity#1412875 Uninitialized pointer fieldCaolán McNamara
Change-Id: Ib9e40cdec5c8b87eaccf4ce941c0c8641b28e5c7
2017-06-17loplugin:unusedfields in vcl part1Noel Grandin
Change-Id: I67d176003f39992cd0ff9271a7d6ce26d2cb6619 Reviewed-on: https://gerrit.libreoffice.org/38828 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-15clang-cl loplugin: vclStephan Bergmann
Change-Id: I40f8a6fef9d66b28a1d72551a6873b041b38b09e Reviewed-on: https://gerrit.libreoffice.org/29841 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-09-15vcl: consistently use sal_IntPtr to marshal drag source / drop targetMichael Stahl
This may be either an X11 Window or a GtkSalFrame*. Change-Id: Ib963cfb329bb711cfaab47f2748da139117cdbae
2016-02-17use consistent #define checks for the Windows platformNoel Grandin
stage 2 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro In this stage we focus on replacing usage of the WIN macro Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84 Reviewed-on: https://gerrit.libreoffice.org/22393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-16gtk3+wayland: play video via gtksink gstreamer elementCaolán McNamara
Change-Id: Ib371fa06eda73962cbe94739e69a68b46c26e4bf
2015-11-25loplugin:unusedfields in include/vclNoel Grandin
and fixed bug in sepia filter, where it was using the wrong member of the union to get the percentage Change-Id: I56b76496a3ac711adec12dd8c08b28d69644d66f
2015-11-18SystemMenuData::nSize is never readStephan Bergmann
...and of little use if all users of SystemMenuData agree on the definition in vcl/sysdata.hxx Change-Id: Id102a30074b611e3ad37ce69ce27c929f4505495 Reviewed-on: https://gerrit.libreoffice.org/20044 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2015-11-10loplugin:nullptr (automatic rewrite; Mac-specific code)Stephan Bergmann
Change-Id: I90a955eb3e485723bb81e7164edcf60f7b0e94c7
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I05e89f9896170d4df3d1377549ea074f06b884a0
2015-06-11Cleanup crossplatform cairoMox Soini
Mac / Win cairo is not built / used, this cairo code can be removed to reduce code bloat. 4th Revised version with Android fixes Change-Id: I6e56850f535ca13b77839b7d67e227c5f39d388e Reviewed-on: https://gerrit.libreoffice.org/16218 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-06-05Revert "Cleanup crossplatform cairo"Jan Holesovsky
Unfortunately this breaks Android and iOS. This reverts commit e4d55e8045c99af65a2cae57b26ec076825c9673.
2015-06-05Revert "vcl: fix Android build"Jan Holesovsky
"Cleanup crossplatform cairo" breaks Android and iOS. This reverts commit e152b756b3558a3619e5bedb6b258cc7f0879e90.
2015-06-05vcl: fix Android buildMiklos Vajna
Change-Id: I31724cd56516e6112b66159f722188b228e2eab5
2015-06-04Cleanup crossplatform cairoMox Soini
Mac / Win cairo is not built / used, this cairo code can be removed to reduce code bloat. Change-Id: I758d674291e25e0722f5c66a0096295e903786b1 Reviewed-on: https://gerrit.libreoffice.org/16049 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-05-07XTiledRenderable: use HWND instead of HDCLászló Németh
Cherry-picked from e1fb63bb8ed7a9bd4dbe19be0d0da7245c4a2fb2 Change-Id: I2959ea8b1213d6dade1c2567365f177bf542e075
2015-03-23Avoid KeyFuncType::DELETE shadowed by a macro on WindowsStephan Bergmann
...required to remove the WIN_* defines from postwin.h, so that the latter can be included multiple times; the WIN_* defines appeared to be unused except for one use of WND_FindWindow anyway Change-Id: I2080225c74c196fbc1b7d4f20b636b44e1e12150
2014-11-18bin confusing commentDouglas Mencken
Change-Id: Idedad17ed2c89613a3f5caeea39f5c47c9856114 Reviewed-on: https://gerrit.libreoffice.org/12516 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-09-02support legacy and core context on OSXMarkus Mohrhard
Change-Id: Ib8cadb3f182ce49c0ca8b6ccaa95960eb8e5f9ae
2014-09-02use SystemWindowData to request a NSOpenGLWindowMarkus Mohrhard
Change-Id: Ief50a2fc533846cd61be66b1ea166a992942083b
2014-02-27coverity#1187868 Uninitialized pointer fieldCaolán McNamara
Change-Id: I6fa813b983d217eb8ce028f9ae13a0cc764e29da
2014-01-30Globally disable MSVC warning 4201 (nonstandard extension nameless struct)Stephan Bergmann
...it is caused by some external code (newly so by glm included in chart2) and does not really add value. (Incidentally, all relevent compilers, Clang, GCC, and MSVC uniformly support this language extension anyway.) Change-Id: I5b4c11b5cea0267bf39ac95e9021a5761a4d7b91
2013-12-12Add CGContext field to SystemGraphicsData for iOS, tooTor Lillqvist
2013-12-12CosmeticsTor Lillqvist
2013-12-05Resolves: #i123795# variable names should not confuse vcl...Herbert Dürr
Window and cocoa NSWindow types VCL's Window type and Cocoa's NSWindow type are quite different. Naming variables as if they were the same introduces gratuitous complexity especially when debugging stacks where both types are used. The names of NSView type variables have been adjusted too. (cherry picked from commit 5e6120c21a979c05bc6b9297035e31a47b98b785) Conflicts: vcl/aqua/source/app/vclnsapp.mm vcl/aqua/source/gdi/salgdi.cxx vcl/aqua/source/gdi/salgdiutils.cxx vcl/aqua/source/window/salframe.cxx vcl/aqua/source/window/salobj.cxx vcl/inc/vcl/sysdata.hxx vcl/source/window/syschild.cxx vcl/source/window/window.cxx Change-Id: Ic4143dfddfa9502a529c871ac4ce0bea413b6ce9
2013-12-04Bin ATSUI codeTor Lillqvist
TDF has been shipping a CoreText-using LO since 4.1 and the sky hasn't fallen. Getting rid of the ATSUI code will make other needed refactoring easier. Change-Id: I494096c3988ea26fa2b336621857d32b64b040f0
2013-10-23fixincludeguards.sh: include/vclThomas Arnhold
Change-Id: Iaea4396f60aeade5303bf83a4504ad62f161b83c
2013-09-04Remove unnecessary SystemChildData -> SystemEnvData defineStephan Bergmann
Change-Id: Ifd6763617b9aef45c7301085033b6bbaf9d52e02
2013-06-18Reduce #ifdef #else a bitKhaled Hosny
Change-Id: I888681b01e82b72ce1ed9836ddf541c543747971