mirror of
https://github.com/brl/mutter.git
synced 2024-12-03 05:10:40 -05:00
5e67e35ec5
As with the backend commit, this means all objects can reach the MetaContext by walking up the chain, thus can e.g. get the backend from the context, instead of the global singleton. This also is a squashed commit containing: compositor: Get backend via the context The MetaCompositor instance is owned by MetaDisplay, which is owned by MetaContext. Get the backend via that chain of ownership. dnd: Don't get backend from singleton window-actor: Don't get backend from singleton dnd: Don't get Wayland compositor via singleton background: Don't get the monitor manager from the singleton plugins: Don't get backend from singleton This applies to MetaPlugin, it's manager class, and the default plugin. feedback-actor: Pass a compositor pointer when constructing This allows getting to the display. later: Keep a pointer to the manager object This allows using the non-singleton API in idle callbacks. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2718>
73 lines
2.6 KiB
C
73 lines
2.6 KiB
C
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
/*
|
|
* meta-feedback-actor-private.h: Actor for painting user interaction feedback
|
|
*
|
|
* Copyright 2014 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 of the
|
|
* License, 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/>.
|
|
*
|
|
* Author: Carlos Garnacho <carlosg@gnome.org>
|
|
*/
|
|
|
|
#ifndef META_FEEDBACK_ACTOR_PRIVATE_H
|
|
#define META_FEEDBACK_ACTOR_PRIVATE_H
|
|
|
|
#include "clutter/clutter.h"
|
|
#include "meta/types.h"
|
|
|
|
/**
|
|
* MetaFeedbackActor:
|
|
*
|
|
* This class handles the rendering of user interaction feedback
|
|
*/
|
|
|
|
#define META_TYPE_FEEDBACK_ACTOR (meta_feedback_actor_get_type ())
|
|
G_DECLARE_DERIVABLE_TYPE (MetaFeedbackActor,
|
|
meta_feedback_actor,
|
|
META, FEEDBACK_ACTOR,
|
|
ClutterActor)
|
|
|
|
|
|
struct _MetaFeedbackActorClass
|
|
{
|
|
/*< private >*/
|
|
ClutterActorClass parent_class;
|
|
};
|
|
|
|
|
|
ClutterActor * meta_feedback_actor_new (MetaCompositor *compositor,
|
|
float anchor_x,
|
|
float anchor_y);
|
|
|
|
void meta_feedback_actor_set_anchor (MetaFeedbackActor *actor,
|
|
float anchor_x,
|
|
float anchor_y);
|
|
void meta_feedback_actor_get_anchor (MetaFeedbackActor *actor,
|
|
float *anchor_x,
|
|
float *anchor_y);
|
|
|
|
void meta_feedback_actor_set_position (MetaFeedbackActor *self,
|
|
float x,
|
|
float y);
|
|
|
|
void meta_feedback_actor_update (MetaFeedbackActor *self,
|
|
const ClutterEvent *event);
|
|
|
|
void meta_feedback_actor_set_geometry_scale (MetaFeedbackActor *self,
|
|
int geometry_scale);
|
|
|
|
int meta_feedback_actor_get_geometry_scale (MetaFeedbackActor *self);
|
|
|
|
#endif /* META_FEEDBACK_ACTOR_PRIVATE_H */
|