From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [PATCH v3 6/7] ui/gtk: move struct GtkDisplayState to ui/gtk.h
Date: Fri, 26 Mar 2021 10:24:47 +0100 [thread overview]
Message-ID: <20210326092448.367016-7-kraxel@redhat.com> (raw)
In-Reply-To: <20210326092448.367016-1-kraxel@redhat.com>
Want place gtk clipboard code in a separate C file, which in turn
requires GtkDisplayState being in a header file. So move it. No
functional change.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
include/ui/gtk.h | 57 ++++++++++++++++++++++++++++++++++++++++++++++++
ui/gtk.c | 55 ----------------------------------------------
2 files changed, 57 insertions(+), 55 deletions(-)
diff --git a/include/ui/gtk.h b/include/ui/gtk.h
index 5ae0ad60a600..6e751794043f 100644
--- a/include/ui/gtk.h
+++ b/include/ui/gtk.h
@@ -18,12 +18,15 @@
#include <gdk/gdkwayland.h>
#endif
+#include "ui/console.h"
#include "ui/kbd-state.h"
#if defined(CONFIG_OPENGL)
#include "ui/egl-helpers.h"
#include "ui/egl-context.h"
#endif
+#define MAX_VCS 10
+
typedef struct GtkDisplayState GtkDisplayState;
typedef struct VirtualGfxConsole {
@@ -83,6 +86,60 @@ typedef struct VirtualConsole {
};
} VirtualConsole;
+struct GtkDisplayState {
+ GtkWidget *window;
+
+ GtkWidget *menu_bar;
+
+ GtkAccelGroup *accel_group;
+
+ GtkWidget *machine_menu_item;
+ GtkWidget *machine_menu;
+ GtkWidget *pause_item;
+ GtkWidget *reset_item;
+ GtkWidget *powerdown_item;
+ GtkWidget *quit_item;
+
+ GtkWidget *view_menu_item;
+ GtkWidget *view_menu;
+ GtkWidget *full_screen_item;
+ GtkWidget *copy_item;
+ GtkWidget *zoom_in_item;
+ GtkWidget *zoom_out_item;
+ GtkWidget *zoom_fixed_item;
+ GtkWidget *zoom_fit_item;
+ GtkWidget *grab_item;
+ GtkWidget *grab_on_hover_item;
+
+ int nb_vcs;
+ VirtualConsole vc[MAX_VCS];
+
+ GtkWidget *show_tabs_item;
+ GtkWidget *untabify_item;
+ GtkWidget *show_menubar_item;
+
+ GtkWidget *vbox;
+ GtkWidget *notebook;
+ int button_mask;
+ gboolean last_set;
+ int last_x;
+ int last_y;
+ int grab_x_root;
+ int grab_y_root;
+ VirtualConsole *kbd_owner;
+ VirtualConsole *ptr_owner;
+
+ gboolean full_screen;
+
+ GdkCursor *null_cursor;
+ Notifier mouse_mode_notifier;
+ gboolean free_scale;
+
+ bool external_pause_update;
+
+ DisplayOptions *opts;
+};
+
extern bool gtk_use_gl_area;
/* ui/gtk.c */
diff --git a/ui/gtk.c b/ui/gtk.c
index 1ea12535284a..7da288a25156 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -60,7 +60,6 @@
#include "chardev/char.h"
#include "qom/object.h"
-#define MAX_VCS 10
#define VC_WINDOW_X_MIN 320
#define VC_WINDOW_Y_MIN 240
#define VC_TERM_X_MIN 80
@@ -119,60 +118,6 @@
static const guint16 *keycode_map;
static size_t keycode_maplen;
-struct GtkDisplayState {
- GtkWidget *window;
-
- GtkWidget *menu_bar;
-
- GtkAccelGroup *accel_group;
-
- GtkWidget *machine_menu_item;
- GtkWidget *machine_menu;
- GtkWidget *pause_item;
- GtkWidget *reset_item;
- GtkWidget *powerdown_item;
- GtkWidget *quit_item;
-
- GtkWidget *view_menu_item;
- GtkWidget *view_menu;
- GtkWidget *full_screen_item;
- GtkWidget *copy_item;
- GtkWidget *zoom_in_item;
- GtkWidget *zoom_out_item;
- GtkWidget *zoom_fixed_item;
- GtkWidget *zoom_fit_item;
- GtkWidget *grab_item;
- GtkWidget *grab_on_hover_item;
-
- int nb_vcs;
- VirtualConsole vc[MAX_VCS];
-
- GtkWidget *show_tabs_item;
- GtkWidget *untabify_item;
- GtkWidget *show_menubar_item;
-
- GtkWidget *vbox;
- GtkWidget *notebook;
- int button_mask;
- gboolean last_set;
- int last_x;
- int last_y;
- int grab_x_root;
- int grab_y_root;
- VirtualConsole *kbd_owner;
- VirtualConsole *ptr_owner;
-
- gboolean full_screen;
-
- GdkCursor *null_cursor;
- Notifier mouse_mode_notifier;
- gboolean free_scale;
-
- bool external_pause_update;
-
- DisplayOptions *opts;
-};
-
struct VCChardev {
Chardev parent;
VirtualConsole *console;
--
2.30.2
next prev parent reply other threads:[~2021-03-26 9:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-26 9:24 [PATCH v3 0/7] ui: add vdagent implementation and clipboard support Gerd Hoffmann
2021-03-26 9:24 ` [PATCH v3 1/7] ui: add clipboard infrastructure Gerd Hoffmann
2021-03-26 9:24 ` [PATCH v3 2/7] ui/vdagent: core infrastructure Gerd Hoffmann
2021-03-26 14:56 ` Markus Armbruster
2021-03-26 15:18 ` Eric Blake
2021-03-26 9:24 ` [PATCH v3 3/7] ui/vdagent: add mouse support Gerd Hoffmann
2021-03-26 14:59 ` Markus Armbruster
2021-03-26 9:24 ` [PATCH v3 4/7] ui/vdagent: add clipboard support Gerd Hoffmann
2021-03-26 9:24 ` [PATCH v3 5/7] ui/vnc: " Gerd Hoffmann
2021-03-26 9:24 ` Gerd Hoffmann [this message]
2021-03-26 9:24 ` [PATCH v3 7/7] ui/gtk: add " Gerd Hoffmann
2021-03-26 9:39 ` [PATCH v3 0/7] ui: add vdagent implementation and " no-reply
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=20210326092448.367016-7-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=armbru@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).