Commit Graph

57 Commits

Author SHA1 Message Date
Vadim Zeitlin
24b5e256df Add wxDisplay::GetDepth() and use it for wxDisplayDepth()
Allow getting the depth of any display, not just the primary one, even
though this is not implemented for Unix ports currently.

Mostly do this for consistency with the other display-related functions.
2018-10-07 00:30:12 +02:00
Vadim Zeitlin
e0ba727dec Extract X11 functions used by wxGTK in a separate header
This makes src/unix/displayx11.cpp almost readable as it's not littered
by "#ifndef __WXGTK20__" checks everywhere any more -- instead this file
is just not compiled as part of wxGTK2 at all any longer (it is still
included in wxGTK1 as well as wxX11 itself and wxMotif).

wxGTK code also can just include the new wx/unix/private/displayx11.h
instead of having to declare all the X11 functions it uses manually.

There should be no changes in behaviour, this is just a clean up.
2018-10-04 17:07:11 +02:00
Vadim Zeitlin
9cc1424b84 Return empty string from wxDisplayImpl::GetName() by default
Simplify the code by not making this function pure virtual as all the
ports except MSW had to override it just to return an empty string.

Instead, just return empty string by default as it's not critical to
force the derived classes to override this function.
2018-10-04 16:37:12 +02:00
Vadim Zeitlin
f704c40207 Don't use wxDisplayFactorySingleX11 in wxGTK if wxUSE_DISPLAY==0
wxDisplay::CreateFactory() shouldn't be defined in this file when
building wxGTK, whether wxUSE_DISPLAY==1 or 0.
2018-10-04 16:31:55 +02:00
Vadim Zeitlin
c2162792cf Implement wxDisplaySize() and wxClientDisplayRect() via wxDisplay
Instead of forwarding to these functions from wxDisplay implementation
in wxUSE_DISPLAY==0 case, make the functions themselves wrappers around
wxDisplay, which may, or not, depending on the platform, have a simpler
implementation in wxUSE_DISPLAY==0 case, but is always available in any
case.

As part of this change, only use src/osx/core/display.cpp in macOS
builds, not iOS ones and update the Xcode project accordingly too.

This cuts down on code duplication, especially in wxGTK, and facilitates
further additions to wxDisplay API.
2018-09-30 23:07:45 +02:00
Vadim Zeitlin
141d7b826d Fix weird indentation in X11 display code
No real changes.
2018-09-30 00:38:26 +02:00
Vadim Zeitlin
bac28b95cd Move wx/display_impl.h to wx/private/display.h
This shows more clearly that this header is private to wxWidgets and
can't be included by user code.

No real changes.
2018-09-30 00:38:26 +02:00
Vadim Zeitlin
4c09d12a91 Don't crash in wxDisplay::GetCurrentMode() if there is no support
Display sample crashed on startup if XFree86-VidModeExtension extension was
not available.

Add missing error checking to avoid this.
2016-05-19 23:52:27 +02:00
Vadim Zeitlin
e212ac8591 Don't export private wxDisplayImplX11 class.
This class is only used internally and doesn't need to be exported. In
addition to being unnecessary, this also resulted in ABI compatibility check
errors after changes to this class in 3.0 branch, so avoid such problems in
the future.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-02 23:49:20 +00:00
Paul Cornett
0e212a65eb Add a separate GTK-specific wxDisplay implementation.
This separates the GTK implementation from Unix/X11, except for the wxVideoMode
stuff, and _NET_WORKAREA when GTK < 3.4. wxDisplay and wxClientDisplayRect()
should now work as well as they can with Wayland.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76365 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-17 17:36:10 +00:00
Paul Cornett
dc9ace761f fix wxClientDisplayRect() when wxUSE_DISPLAY==0
GDK_WINDOWING_X11 was not getting defined, causing hard coded size to be used


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-15 15:46:47 +00:00
Paul Cornett
8b4ae731d3 use wxOVERRIDE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 00:02:23 +00:00
Paul Cornett
70bb02115f Simplify mode matching test, and add actual mode (not function parameter) to modes list, in GetModes()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75197 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-15 17:28:42 +00:00
Paul Cornett
24321b7b18 Introduce variables for the display and screen in the video mode functions.
This cleans up the code somewhat, and prepares for some upcoming changes.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75187 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-15 06:16:59 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Vadim Zeitlin
dee05929ba Ensure that client display rectangle is always less than its total area.
Under Unix we could return client display rectangle that was bigger than the
entire display size as it corresponded to the total screen size when
_NET_WORKAREA was not supported or was not correctly implemented by the WM.

Fix this by explicitly intersecting the client rect with the total one.

Closes #14419.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-28 00:44:09 +00:00
Vadim Zeitlin
a73251a80d Allow building wxGTK3 with Broadway backend.
Use GDK_WINDOWING_BROADWAY to fix compilation with it.

Closes #14469.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72075 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-13 18:22:22 +00:00
Paul Cornett
f84bc35707 compile fix for GTK2 systems which have X11/extensions/xf86vmode.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64388 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-23 16:31:33 +00:00
Vadim Zeitlin
bfd62c8c2a Use GTK+ functions for wxDisplay implementation.
There is no need to use Xinerama for what GDK can do itself (see #11053).

Also don't check for Xinerama in configure when using wxGTK2.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-22 15:48:59 +00:00
Julian Smart
426d19f139 Applied patch #9058 (add Hildon 2.0 support)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 12:36:34 +00:00
Vadim Zeitlin
9a83f86094 Globally replace _T() with wxT().
Standardize on using a single macro across all wxWidgets sources and solve the name clash with Sun CC standard headers (see #10660).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-23 20:30:22 +00:00
Vadim Zeitlin
c0c133e13b add wx-prefixed and semicolon-requiring versions of DECLARE_NO_{COPY,ASSIGN}_CLASS macros
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-08 11:45:59 +00:00
Vadim Zeitlin
5c33522fca replace wx_{const,static,reinterpret}_cast with their standard C++ equivalents
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-02 02:39:52 +00:00
Robert Roebling
69fb24ce03 Fix compilo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-06 20:31:25 +00:00
Paul Cornett
562e60a0f2 non-pch build fix for wxUSE_DISPLAY==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-22 02:52:10 +00:00
Paul Cornett
64bd3204f1 build fix for wxUSE_DISPLAY==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-13 02:21:59 +00:00
Vadim Zeitlin
66d0513058 X11 implementation of wxClientDisplayRect() doesn't work with Hildon, provide a stub for the latter
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-11 12:55:27 +00:00
Vadim Zeitlin
f2633e547c replaced FIXME comment left in the last commit with an explanation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-07 00:16:40 +00:00
Vadim Zeitlin
676c8c1d39 implement wxGetCientDisplayRect() correctly for X11-based ports
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-06 22:27:15 +00:00
Paul Cornett
4e675101a7 use unsigned for display count
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-02 05:38:05 +00:00
Vadim Zeitlin
d5a20ebb32 only return matching modes from GetModes()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-09 17:34:32 +00:00
Włodzimierz Skiba
e4db172a3b Include wx/log.h according to precompiled headers of wx/wx.h (with other minor cleaning).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-26 08:21:31 +00:00
Włodzimierz Skiba
88a7a4e10e Include wx/intl.h according to precompiled headers of wx/wx.h (with other minor cleaning).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-25 14:38:19 +00:00
Włodzimierz Skiba
ad9835c97c Include wx/dynarray.h according to precompiled headers of wx/wx.h (with other minor cleaning).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-19 14:18:39 +00:00
Vadim Zeitlin
1003169e21 added wxDisplayFactoryX11 ctor body
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38132 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-03-16 04:32:42 +00:00
Vadim Zeitlin
0d5b6a403e linking fixes after last checkin
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38131 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-03-16 04:32:02 +00:00
Vadim Zeitlin
547308b8e6 compilation fixes after last checkin
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38130 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-03-16 04:30:53 +00:00
Vadim Zeitlin
ef1717a963 wxDisplay cleanup/rewrite:
- wxDisplay is now a concrete class and uses a pImpl-based design
- got rid of four duplicate but subtly different versions of trivial
  single display-only wxDisplay implementation (but 2 versions of Mac
  Classic and Mac CoreGraphics implementations each still remain...)
- assorted code simplifications and memory leaks fixes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-03-16 04:23:07 +00:00
Jouk Jansen
088af5898e Committing in .
Update of OpenVMS compile support

 Modified Files:
 	wxWidgets/setup.h_vms wxWidgets/src/common/descrip.mms
 	wxWidgets/src/generic/descrip.mms
 	wxWidgets/src/gtk/descrip.mms wxWidgets/src/unix/descrip.mms
 	wxWidgets/src/unix/displayx11.cpp
 ----------------------------------------------------------------------


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-02-20 13:47:08 +00:00
Mart Raudsepp
8907154c1a Nuke #pragma implementation/interface's
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-23 12:56:45 +00:00
Vadim Zeitlin
a90bf70914 tided up the code a little (replaces part of patch 966312)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-07-25 11:00:14 +00:00
Julian Smart
655719367a Use old licence name
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 20:53:33 +00:00
Julian Smart
77ffb5937e Name and version changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 14:56:36 +00:00
Ryan Norton
816e36172a Reversed,...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-12-20 13:52:02 +00:00
Ryan Norton
6f070389aa Comment....
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24936 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-12-20 13:47:25 +00:00
Ryan Norton
5294e30a38 Added an assert...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-12-20 13:39:40 +00:00
Ryan Norton
e5804ce70a Uncommented Brian Vitors stuff...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24858 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-12-15 00:05:04 +00:00
Václav Slavík
505c8ccdb3 added checks for Xxf86vmode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-12-14 22:46:22 +00:00
Václav Slavík
428b6942f2 fixed compilation errors, made messages more human-oriented
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-12-14 11:53:15 +00:00
Ryan Norton
f2ebd959e6 Brian Victor's Patch & Cleanups
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-12-13 09:25:29 +00:00