[Spice-commits] Makefile.am vdagent/display_configuration.cpp vdagent/display_configuration.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 6 12:30:51 UTC 2019


 Makefile.am                       |    1 
 vdagent/display_configuration.cpp |  135 --------------------------------------
 vdagent/display_configuration.h   |    6 -
 3 files changed, 1 insertion(+), 141 deletions(-)

New commits:
commit 7a7c3b22e2e14d5804be113312c414a17b425a01
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Mon Nov 4 12:51:31 2019 +0000

    display_configuration: Define WINVER to avoid some declaration
    
    Some declarations are available in MingW only defining a more recent
    version of WINVER. Set WINVER to 0x0601 (Windows 7) to enable these
    definitions.
    This allows to clean some files.
    The definition were already available in Fedora 22.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/Makefile.am b/Makefile.am
index 80e82c6..9b779a7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,6 +8,7 @@ AM_CPPFLAGS = 				\
 	-DUNICODE 			\
 	-D_UNICODE			\
 	-DOLDMSVCRT			\
+	-DWINVER=0x0601			\
 	-I$(top_srcdir)/common		\
 	-I$(top_srcdir)/spice-protocol	\
 	$(NULL)
diff --git a/vdagent/display_configuration.cpp b/vdagent/display_configuration.cpp
index 4994917..a2d7e98 100644
--- a/vdagent/display_configuration.cpp
+++ b/vdagent/display_configuration.cpp
@@ -20,141 +20,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <spice/macros.h>
 
 /* The following definitions and structures are taken
-from the wine project repository and can be found
-under: "wine/include/wingdi.h" */
-
-#define QDC_ALL_PATHS                          0x00000001
-
-#define SDC_USE_SUPPLIED_DISPLAY_CONFIG        0x00000020
-#define SDC_APPLY                              0x00000080
-#define SDC_SAVE_TO_DATABASE                   0x00000200
-#define SDC_FORCE_MODE_ENUMERATION             0x00001000
-
-#define DISPLAYCONFIG_PATH_ACTIVE              0x00000001
-#define DISPLAYCONFIG_PATH_MODE_IDX_INVALID    0xffffffff
-
-enum DISPLAYCONFIG_DEVICE_INFO_TYPE {
-    DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME = 1
-};
-
-enum DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY {};
-
-enum DISPLAYCONFIG_ROTATION {};
-
-enum DISPLAYCONFIG_SCANLINE_ORDERING {};
-
-enum DISPLAYCONFIG_SCALING {};
-
-enum DISPLAYCONFIG_PIXELFORMAT {};
-
-enum DISPLAYCONFIG_MODE_INFO_TYPE {};
-
-struct DISPLAYCONFIG_DEVICE_INFO_HEADER {
-    DISPLAYCONFIG_DEVICE_INFO_TYPE type;
-    UINT32                         size;
-    LUID                           adapterId;
-    UINT32                         id;
-};
-
-struct DISPLAYCONFIG_SOURCE_DEVICE_NAME {
-    DISPLAYCONFIG_DEVICE_INFO_HEADER          header;
-    WCHAR                                     viewGdiDeviceName[CCHDEVICENAME];
-};
-
-struct DISPLAYCONFIG_DESKTOP_IMAGE_INFO {
-    POINTL PathSourceSize;
-    RECTL DesktopImageRegion;
-    RECTL DesktopImageClip;
-};
-
-struct DISPLAYCONFIG_RATIONAL {
-    UINT32    Numerator;
-    UINT32    Denominator;
-};
-
-struct DISPLAYCONFIG_2DREGION {
-    UINT32 cx;
-    UINT32 cy;
-};
-
-struct DISPLAYCONFIG_VIDEO_SIGNAL_INFO {
-    UINT64 pixelRate;
-    DISPLAYCONFIG_RATIONAL hSyncFreq;
-    DISPLAYCONFIG_RATIONAL vSyncFreq;
-    DISPLAYCONFIG_2DREGION activeSize;
-    DISPLAYCONFIG_2DREGION totalSize;
-    union {
-        struct {
-            UINT32 videoStandard :16;
-            UINT32 vSyncFreqDivider :6;
-            UINT32 reserved :10;
-        } AdditionalSignalInfo;
-        UINT32 videoStandard;
-    } DUMMYUNIONNAME;
-    DISPLAYCONFIG_SCANLINE_ORDERING scanLineOrdering;
-};
-
-struct DISPLAYCONFIG_TARGET_MODE {
-    DISPLAYCONFIG_VIDEO_SIGNAL_INFO targetVideoSignalInfo;
-};
-
-struct DISPLAYCONFIG_SOURCE_MODE {
-    UINT32 width;
-    UINT32 height;
-    DISPLAYCONFIG_PIXELFORMAT pixelFormat;
-    POINTL position;
-};
-
-struct DISPLAYCONFIG_MODE_INFO {
-    DISPLAYCONFIG_MODE_INFO_TYPE infoType;
-    UINT32 id;
-    LUID adapterId;
-    union {
-        DISPLAYCONFIG_TARGET_MODE targetMode;
-        DISPLAYCONFIG_SOURCE_MODE sourceMode;
-        DISPLAYCONFIG_DESKTOP_IMAGE_INFO desktopImageInfo;
-    } DUMMYUNIONNAME;
-};
-
-struct DISPLAYCONFIG_PATH_SOURCE_INFO {
-    LUID adapterId;
-    UINT32 id;
-    union {
-        UINT32 modeInfoIdx;
-        struct {
-            UINT32 cloneGroupId :16;
-            UINT32 sourceModeInfoIdx :16;
-        } DUMMYSTRUCTNAME;
-    } DUMMYUNIONNAME;
-    UINT32 statusFlags;
-};
-
-struct DISPLAYCONFIG_PATH_TARGET_INFO {
-    LUID adapterId;
-    UINT32 id;
-    union {
-        UINT32 modeInfoIdx;
-        struct {
-            UINT32 desktopModeInfoIdx :16;
-            UINT32 targetModeInfoIdx :16;
-        } DUMMYSTRUCTNAME;
-    } DUMMYUNIONNAME;
-    DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY outputTechnology;
-    DISPLAYCONFIG_ROTATION rotation;
-    DISPLAYCONFIG_SCALING scaling;
-    DISPLAYCONFIG_RATIONAL refreshRate;
-    DISPLAYCONFIG_SCANLINE_ORDERING scanLineOrdering;
-    BOOL targetAvailable;
-    UINT32 statusFlags;
-};
-
-struct DISPLAYCONFIG_PATH_INFO {
-    DISPLAYCONFIG_PATH_SOURCE_INFO sourceInfo;
-    DISPLAYCONFIG_PATH_TARGET_INFO targetInfo;
-    UINT32 flags;
-};
-
-/* The following definitions and structures are taken
  * from here https://github.com/notr1ch/DWMCapture/blob/master/DWMCaptureSource.cpp */
 
 enum D3DKMT_ESCAPETYPE {
diff --git a/vdagent/display_configuration.h b/vdagent/display_configuration.h
index bdf89dc..4c1ab23 100644
--- a/vdagent/display_configuration.h
+++ b/vdagent/display_configuration.h
@@ -32,12 +32,6 @@ enum PATH_STATE {
     PATH_CURRENT,
 };
 
-enum DISPLAYCONFIG_TOPOLOGY_ID {};
-
-struct DISPLAYCONFIG_DEVICE_INFO_HEADER;
-struct DISPLAYCONFIG_MODE_INFO;
-struct DISPLAYCONFIG_PATH_INFO;
-
 //Makes calls into the CCD API for getting/setting display settings on WDDM drivers
 //Use is exclusive to wddm display config class
 


More information about the Spice-commits mailing list