wayland/output: Move struct to C file

Avoids leaking implementation details outside.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1712>
This commit is contained in:
Jonas Ådahl 2021-02-05 16:47:33 +01:00 committed by Marge Bot
parent 2b59b85d85
commit fcbeae5f60
3 changed files with 20 additions and 20 deletions

View File

@ -48,6 +48,24 @@ enum
static guint signals[LAST_SIGNAL]; static guint signals[LAST_SIGNAL];
struct _MetaWaylandOutput
{
GObject parent;
struct wl_global *global;
MetaLogicalMonitor *logical_monitor;
uint32_t mode_flags;
float refresh_rate;
int scale;
int mode_width;
int mode_height;
GList *resources;
GList *xdg_output_resources;
uint64_t winsys_id;
};
G_DEFINE_TYPE (MetaWaylandOutput, meta_wayland_output, G_TYPE_OBJECT) G_DEFINE_TYPE (MetaWaylandOutput, meta_wayland_output, G_TYPE_OBJECT)
static void static void

View File

@ -32,24 +32,6 @@
G_DECLARE_FINAL_TYPE (MetaWaylandOutput, meta_wayland_output, G_DECLARE_FINAL_TYPE (MetaWaylandOutput, meta_wayland_output,
META, WAYLAND_OUTPUT, GObject) META, WAYLAND_OUTPUT, GObject)
struct _MetaWaylandOutput
{
GObject parent;
struct wl_global *global;
MetaLogicalMonitor *logical_monitor;
guint mode_flags;
float refresh_rate;
gint scale;
int mode_width;
int mode_height;
GList *resources;
GList *xdg_output_resources;
uint64_t winsys_id;
};
const GList * meta_wayland_output_get_resources (MetaWaylandOutput *wayland_output); const GList * meta_wayland_output_get_resources (MetaWaylandOutput *wayland_output);
MetaLogicalMonitor * meta_wayland_output_get_logical_monitor (MetaWaylandOutput *wayland_output); MetaLogicalMonitor * meta_wayland_output_get_logical_monitor (MetaWaylandOutput *wayland_output);

View File

@ -310,7 +310,7 @@ meta_wayland_presentation_feedback_present (MetaWaylandPresentationFeedback *fee
uint32_t refresh_interval_ns; uint32_t refresh_interval_ns;
uint32_t seq_hi, seq_lo; uint32_t seq_hi, seq_lo;
uint32_t flags; uint32_t flags;
GList *l; const GList *l;
if (output == NULL) if (output == NULL)
{ {
@ -343,7 +343,7 @@ meta_wayland_presentation_feedback_present (MetaWaylandPresentationFeedback *fee
if (frame_info->flags & CLUTTER_FRAME_INFO_FLAG_VSYNC) if (frame_info->flags & CLUTTER_FRAME_INFO_FLAG_VSYNC)
flags |= WP_PRESENTATION_FEEDBACK_KIND_VSYNC; flags |= WP_PRESENTATION_FEEDBACK_KIND_VSYNC;
for (l = output->resources; l; l = l->next) for (l = meta_wayland_output_get_resources (output); l; l = l->next)
{ {
struct wl_resource *output_resource = l->data; struct wl_resource *output_resource = l->data;