mirror of
https://github.com/brl/mutter.git
synced 2025-06-28 16:03:04 +00:00
backends/cursor: Move out Xcursor functionality into own type
Introduce a new type MetaCursorSpriteXcursor that is a MetaCursorSprite implementation backed by Xcursor images. A plain MetaCursorSprite can still be created "bare bone", but must be manually provided with a texture. These usages will eventually be wrapped into new MetaCursorSprite types while turning MetaCursorSprite into an abstract type. https://gitlab.gnome.org/GNOME/mutter/issues/77
This commit is contained in:
40
src/backends/meta-cursor-sprite-xcursor.h
Normal file
40
src/backends/meta-cursor-sprite-xcursor.h
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright 2013, 2018 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef META_CURSOR_SPRITE_XCURSOR_H
|
||||
#define META_CURSOR_SPRITE_XCURSOR_H
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "backends/meta-cursor.h"
|
||||
|
||||
#define META_TYPE_CURSOR_SPRITE_XCURSOR meta_cursor_sprite_xcursor_get_type ()
|
||||
G_DECLARE_FINAL_TYPE (MetaCursorSpriteXcursor, meta_cursor_sprite_xcursor,
|
||||
META, CURSOR_SPRITE_XCURSOR, MetaCursorSprite)
|
||||
|
||||
MetaCursorSpriteXcursor * meta_cursor_sprite_xcursor_new (MetaCursor cursor);
|
||||
|
||||
void meta_cursor_sprite_xcursor_set_theme_scale (MetaCursorSpriteXcursor *sprite_xcursor,
|
||||
int scale);
|
||||
|
||||
MetaCursor meta_cursor_sprite_xcursor_get_cursor (MetaCursorSpriteXcursor *sprite_xcusror);
|
||||
|
||||
Cursor meta_create_x_cursor (Display *xdisplay,
|
||||
MetaCursor cursor);
|
||||
|
||||
#endif /* META_CURSOR_SPRITE_XCURSOR_H */
|
Reference in New Issue
Block a user