All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Thomas Huth <thuth@redhat.com>,
	qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Xiao Guangrong" <xiaoguangrong.eric@gmail.com>,
	qemu-block@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
	"Laszlo Ersek" <lersek@redhat.com>,
	qemu-arm@nongnu.org, "Gerd Hoffmann" <kraxel@redhat.com>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [Qemu-arm] [RFC PATCH 15/15] ui/console: Add "ui/pixelformat.h" to declare PixelFormat
Date: Fri, 11 Jan 2019 15:08:57 +0100	[thread overview]
Message-ID: <20190111140857.4211-16-philmd@redhat.com> (raw)
In-Reply-To: <20190111140857.4211-1-philmd@redhat.com>

PixelFormat is used by "ui/console.h" and by "ui/qemu-pixman.h".

Create the new header "ui/pixelformat.h" to declare this structure,
and remove the forward declaration from "qemu/typedefs.h".

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
RFC because "ui/console.h" has on license, so I added a default one.
---
 include/qemu/typedefs.h  |  1 -
 include/ui/console.h     | 11 +----------
 include/ui/pixelformat.h | 31 +++++++++++++++++++++++++++++++
 include/ui/qemu-pixman.h |  2 ++
 4 files changed, 34 insertions(+), 11 deletions(-)
 create mode 100644 include/ui/pixelformat.h

diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
index af0dc6e065..b0f33aa065 100644
--- a/include/qemu/typedefs.h
+++ b/include/qemu/typedefs.h
@@ -67,7 +67,6 @@ typedef struct PCIExpressHost PCIExpressHost;
 typedef struct PCIHostDeviceAddress PCIHostDeviceAddress;
 typedef struct PCIHostState PCIHostState;
 typedef struct PCMachineState PCMachineState;
-typedef struct PixelFormat PixelFormat;
 typedef struct PostcopyDiscardState PostcopyDiscardState;
 typedef struct Property Property;
 typedef struct PropertyInfo PropertyInfo;
diff --git a/include/ui/console.h b/include/ui/console.h
index aa9f975544..4fa2fa5c47 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -2,6 +2,7 @@
 #define CONSOLE_H
 
 #include "ui/qemu-pixman.h"
+#include "ui/pixelformat.h"
 #include "qom/object.h"
 #include "qemu/notify.h"
 #include "qemu/error-report.h"
@@ -121,16 +122,6 @@ struct QemuConsoleClass {
 
 #define QEMU_ALLOCATED_FLAG     0x01
 
-struct PixelFormat {
-    uint8_t bits_per_pixel;
-    uint8_t bytes_per_pixel;
-    uint8_t depth; /* color depth in bits */
-    uint32_t rmask, gmask, bmask, amask;
-    uint8_t rshift, gshift, bshift, ashift;
-    uint8_t rmax, gmax, bmax, amax;
-    uint8_t rbits, gbits, bbits, abits;
-};
-
 typedef struct DisplaySurface {
     pixman_format_code_t format;
     pixman_image_t *image;
diff --git a/include/ui/pixelformat.h b/include/ui/pixelformat.h
new file mode 100644
index 0000000000..585097531f
--- /dev/null
+++ b/include/ui/pixelformat.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2019 Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef QEMU_PIXELFORMAT_H
+#define QEMU_PIXELFORMAT_H
+
+typedef struct PixelFormat {
+    uint8_t bits_per_pixel;
+    uint8_t bytes_per_pixel;
+    uint8_t depth; /* color depth in bits */
+    uint32_t rmask, gmask, bmask, amask;
+    uint8_t rshift, gshift, bshift, ashift;
+    uint8_t rmax, gmax, bmax, amax;
+    uint8_t rbits, gbits, bbits, abits;
+} PixelFormat;
+
+#endif
diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h
index b7c82d17fc..999a4aa770 100644
--- a/include/ui/qemu-pixman.h
+++ b/include/ui/qemu-pixman.h
@@ -16,6 +16,8 @@
 #pragma GCC diagnostic pop
 #endif
 
+#include "ui/pixelformat.h"
+
 /*
  * pixman image formats are defined to be native endian,
  * that means host byte order on qemu.  So we go define
-- 
2.17.2


WARNING: multiple messages have this Message-ID (diff)
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Thomas Huth <thuth@redhat.com>,
	qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	qemu-block@nongnu.org, "Gerd Hoffmann" <kraxel@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Xiao Guangrong" <xiaoguangrong.eric@gmail.com>,
	qemu-arm@nongnu.org, "Laszlo Ersek" <lersek@redhat.com>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Igor Mammedov" <imammedo@redhat.com>
Subject: [Qemu-devel] [RFC PATCH 15/15] ui/console: Add "ui/pixelformat.h" to declare PixelFormat
Date: Fri, 11 Jan 2019 15:08:57 +0100	[thread overview]
Message-ID: <20190111140857.4211-16-philmd@redhat.com> (raw)
In-Reply-To: <20190111140857.4211-1-philmd@redhat.com>

PixelFormat is used by "ui/console.h" and by "ui/qemu-pixman.h".

Create the new header "ui/pixelformat.h" to declare this structure,
and remove the forward declaration from "qemu/typedefs.h".

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
RFC because "ui/console.h" has on license, so I added a default one.
---
 include/qemu/typedefs.h  |  1 -
 include/ui/console.h     | 11 +----------
 include/ui/pixelformat.h | 31 +++++++++++++++++++++++++++++++
 include/ui/qemu-pixman.h |  2 ++
 4 files changed, 34 insertions(+), 11 deletions(-)
 create mode 100644 include/ui/pixelformat.h

diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
index af0dc6e065..b0f33aa065 100644
--- a/include/qemu/typedefs.h
+++ b/include/qemu/typedefs.h
@@ -67,7 +67,6 @@ typedef struct PCIExpressHost PCIExpressHost;
 typedef struct PCIHostDeviceAddress PCIHostDeviceAddress;
 typedef struct PCIHostState PCIHostState;
 typedef struct PCMachineState PCMachineState;
-typedef struct PixelFormat PixelFormat;
 typedef struct PostcopyDiscardState PostcopyDiscardState;
 typedef struct Property Property;
 typedef struct PropertyInfo PropertyInfo;
diff --git a/include/ui/console.h b/include/ui/console.h
index aa9f975544..4fa2fa5c47 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -2,6 +2,7 @@
 #define CONSOLE_H
 
 #include "ui/qemu-pixman.h"
+#include "ui/pixelformat.h"
 #include "qom/object.h"
 #include "qemu/notify.h"
 #include "qemu/error-report.h"
@@ -121,16 +122,6 @@ struct QemuConsoleClass {
 
 #define QEMU_ALLOCATED_FLAG     0x01
 
-struct PixelFormat {
-    uint8_t bits_per_pixel;
-    uint8_t bytes_per_pixel;
-    uint8_t depth; /* color depth in bits */
-    uint32_t rmask, gmask, bmask, amask;
-    uint8_t rshift, gshift, bshift, ashift;
-    uint8_t rmax, gmax, bmax, amax;
-    uint8_t rbits, gbits, bbits, abits;
-};
-
 typedef struct DisplaySurface {
     pixman_format_code_t format;
     pixman_image_t *image;
diff --git a/include/ui/pixelformat.h b/include/ui/pixelformat.h
new file mode 100644
index 0000000000..585097531f
--- /dev/null
+++ b/include/ui/pixelformat.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2019 Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef QEMU_PIXELFORMAT_H
+#define QEMU_PIXELFORMAT_H
+
+typedef struct PixelFormat {
+    uint8_t bits_per_pixel;
+    uint8_t bytes_per_pixel;
+    uint8_t depth; /* color depth in bits */
+    uint32_t rmask, gmask, bmask, amask;
+    uint8_t rshift, gshift, bshift, ashift;
+    uint8_t rmax, gmax, bmax, amax;
+    uint8_t rbits, gbits, bbits, abits;
+} PixelFormat;
+
+#endif
diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h
index b7c82d17fc..999a4aa770 100644
--- a/include/ui/qemu-pixman.h
+++ b/include/ui/qemu-pixman.h
@@ -16,6 +16,8 @@
 #pragma GCC diagnostic pop
 #endif
 
+#include "ui/pixelformat.h"
+
 /*
  * pixman image formats are defined to be native endian,
  * that means host byte order on qemu.  So we go define
-- 
2.17.2

  parent reply	other threads:[~2019-01-11 14:21 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-11 14:08 [Qemu-devel] [PATCH RESEND 00/15] typedefs: Remove scarcely used declarations Philippe Mathieu-Daudé
2019-01-11 14:08 ` Philippe Mathieu-Daudé
2019-01-11 14:08 ` [Qemu-devel] [PATCH 01/15] hw/input/ps2: Remove PS2State from "qemu/typedefs.h" Philippe Mathieu-Daudé
2019-01-11 14:08   ` Philippe Mathieu-Daudé
2019-01-11 14:08 ` [Qemu-devel] [PATCH 02/15] hw/pcmcia: Remove PCMCIACardState " Philippe Mathieu-Daudé
2019-01-11 14:08   ` Philippe Mathieu-Daudé
2019-01-14  8:39   ` [Qemu-arm] " Thomas Huth
2019-01-14  8:39     ` [Qemu-devel] " Thomas Huth
2019-01-11 14:08 ` [Qemu-arm] [PATCH 03/15] hw/ssi: Remove SSIBus " Philippe Mathieu-Daudé
2019-01-11 14:08   ` [Qemu-devel] " Philippe Mathieu-Daudé
2019-01-14  8:44   ` [Qemu-arm] " Thomas Huth
2019-01-14  8:44     ` [Qemu-devel] " Thomas Huth
2019-01-15 12:28   ` [Qemu-arm] " Markus Armbruster
2019-01-15 12:28     ` Markus Armbruster
2019-01-15 12:56     ` Thomas Huth
2019-01-15 12:56       ` Thomas Huth
2019-01-15 18:02       ` [Qemu-arm] " Paolo Bonzini
2019-01-15 18:02         ` Paolo Bonzini
2019-01-16  8:33         ` [Qemu-arm] " Markus Armbruster
2019-01-16  8:33           ` Markus Armbruster
2019-01-16 10:03           ` [Qemu-arm] " Paolo Bonzini
2019-01-16 10:03             ` Paolo Bonzini
2019-01-16 11:34             ` [Qemu-arm] " Gerd Hoffmann
2019-01-16 11:34               ` Gerd Hoffmann
2019-01-16 11:49               ` [Qemu-arm] " Paolo Bonzini
2019-01-16 11:49                 ` Paolo Bonzini
2019-01-16 14:48                 ` [Qemu-arm] " Michael S. Tsirkin
2019-01-16 14:48                   ` Michael S. Tsirkin
2019-01-17  9:01                   ` Markus Armbruster
2019-01-17  9:01                     ` Markus Armbruster
2019-01-17  9:03             ` Markus Armbruster
2019-01-17  9:03               ` Markus Armbruster
2019-01-15 17:57     ` Paolo Bonzini
2019-01-15 17:57       ` Paolo Bonzini
2019-01-16  8:32       ` [Qemu-arm] " Markus Armbruster
2019-01-16  8:32         ` Markus Armbruster
2019-01-11 14:08 ` [Qemu-arm] [PATCH 04/15] hw/ide/ahci: Remove AllwinnerAHCIState " Philippe Mathieu-Daudé
2019-01-11 14:08   ` [Qemu-devel] " Philippe Mathieu-Daudé
2019-01-14  8:45   ` [Qemu-arm] " Thomas Huth
2019-01-14  8:45     ` [Qemu-devel] " Thomas Huth
2019-01-11 14:08 ` [Qemu-arm] [PATCH 05/15] hw/nvram/fw_cfg: Remove various typedefs " Philippe Mathieu-Daudé
2019-01-11 14:08   ` [Qemu-devel] " Philippe Mathieu-Daudé
2019-01-11 16:26   ` [Qemu-arm] " Laszlo Ersek
2019-01-11 16:26     ` [Qemu-devel] " Laszlo Ersek
2019-01-14 10:26     ` [Qemu-arm] " Philippe Mathieu-Daudé
2019-01-14 10:26       ` [Qemu-devel] " Philippe Mathieu-Daudé
2019-01-11 14:08 ` [Qemu-arm] [PATCH 06/15] hw/i2c/smbus: Remove SMBusDevice " Philippe Mathieu-Daudé
2019-01-11 14:08   ` [Qemu-devel] " Philippe Mathieu-Daudé
2019-01-11 14:08 ` [Qemu-arm] [PATCH 07/15] hw/bt: Remove HCIInfo " Philippe Mathieu-Daudé
2019-01-11 14:08   ` [Qemu-devel] " Philippe Mathieu-Daudé
2019-01-11 14:08 ` [Qemu-devel] [PATCH 08/15] hw/char/serial: Remove SerialState " Philippe Mathieu-Daudé
2019-01-11 14:08   ` Philippe Mathieu-Daudé
2019-01-11 14:08 ` [Qemu-devel] [PATCH 09/15] hw/i386: Remove PCMachineClass " Philippe Mathieu-Daudé
2019-01-11 14:08   ` Philippe Mathieu-Daudé
2019-01-11 14:08 ` [Qemu-arm] [PATCH 10/15] range: Remove Range " Philippe Mathieu-Daudé
2019-01-11 14:08   ` [Qemu-devel] " Philippe Mathieu-Daudé
2019-01-14  8:56   ` [Qemu-arm] " Thomas Huth
2019-01-14  8:56     ` [Qemu-devel] " Thomas Huth
2019-01-14 10:30     ` [Qemu-arm] " Philippe Mathieu-Daudé
2019-01-14 10:30       ` [Qemu-devel] " Philippe Mathieu-Daudé
2019-01-11 14:08 ` [Qemu-devel] [PATCH 11/15] audio: Remove AudioState " Philippe Mathieu-Daudé
2019-01-11 14:08   ` Philippe Mathieu-Daudé
2019-01-11 14:08 ` [Qemu-devel] [PATCH 12/15] ui/console: Remove MouseTransformInfo from qemu/typedefs.h Philippe Mathieu-Daudé
2019-01-11 14:08   ` Philippe Mathieu-Daudé
2019-01-14  8:59   ` [Qemu-arm] " Thomas Huth
2019-01-14  8:59     ` [Qemu-devel] " Thomas Huth
2019-01-14 12:59     ` Philippe Mathieu-Daudé
2019-01-14 12:59       ` Philippe Mathieu-Daudé
2019-01-11 14:08 ` [Qemu-devel] [PATCH 13/15] ui/console: Remove QemuDmaBuf from "qemu/typedefs.h" Philippe Mathieu-Daudé
2019-01-11 14:08   ` Philippe Mathieu-Daudé
2019-01-11 14:08 ` [Qemu-arm] [PATCH 14/15] ui/console: Remove DisplayState/DisplaySurface " Philippe Mathieu-Daudé
2019-01-11 14:08   ` [Qemu-devel] " Philippe Mathieu-Daudé
2019-01-11 14:08 ` Philippe Mathieu-Daudé [this message]
2019-01-11 14:08   ` [Qemu-devel] [RFC PATCH 15/15] ui/console: Add "ui/pixelformat.h" to declare PixelFormat Philippe Mathieu-Daudé
2019-01-11 17:32   ` [Qemu-arm] " Paolo Bonzini
2019-01-11 17:32     ` [Qemu-devel] " Paolo Bonzini
2019-01-14 10:24     ` [Qemu-arm] " Philippe Mathieu-Daudé
2019-01-14 10:24       ` [Qemu-devel] " Philippe Mathieu-Daudé
2019-01-14 12:35       ` [Qemu-arm] " Gerd Hoffmann
2019-01-14 12:35         ` [Qemu-devel] " Gerd Hoffmann
2019-01-14 12:41         ` [Qemu-arm] " Philippe Mathieu-Daudé
2019-01-14 12:41           ` [Qemu-devel] " Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190111140857.4211-16-philmd@redhat.com \
    --to=philmd@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=lersek@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=xiaoguangrong.eric@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.