mirror of
https://github.com/brl/mutter.git
synced 2025-04-29 13:19:39 +00:00
x11: Clean up TexturePixmap header and private data structure
Align the header file and use bitfields instead of booleans.
This commit is contained in:
parent
0e80747a68
commit
8538e1bf58
@ -73,6 +73,7 @@ enum
|
|||||||
{
|
{
|
||||||
UPDATE_AREA,
|
UPDATE_AREA,
|
||||||
QUEUE_DAMAGE_REDRAW,
|
QUEUE_DAMAGE_REDRAW,
|
||||||
|
|
||||||
/* FIXME: Pixmap lost signal? */
|
/* FIXME: Pixmap lost signal? */
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
@ -100,23 +101,22 @@ struct _ClutterX11TexturePixmapPrivate
|
|||||||
guint pixmap_width, pixmap_height;
|
guint pixmap_width, pixmap_height;
|
||||||
guint depth;
|
guint depth;
|
||||||
|
|
||||||
gboolean automatic_updates;
|
|
||||||
Damage damage;
|
Damage damage;
|
||||||
|
|
||||||
/* FIXME: lots of gbooleans. coalesce into bitfields */
|
|
||||||
gboolean window_redirect_automatic;
|
|
||||||
gboolean window_mapped;
|
|
||||||
gboolean destroyed;
|
|
||||||
gboolean owns_pixmap;
|
|
||||||
gboolean override_redirect;
|
|
||||||
gint window_x, window_y;
|
gint window_x, window_y;
|
||||||
|
|
||||||
|
guint window_redirect_automatic : 1;
|
||||||
|
guint window_mapped : 1;
|
||||||
|
guint destroyed : 1;
|
||||||
|
guint owns_pixmap : 1;
|
||||||
|
guint override_redirect : 1;
|
||||||
|
guint automatic_updates : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int _damage_event_base = 0;
|
static int _damage_event_base = 0;
|
||||||
|
|
||||||
/* FIXME: Ultimatly with current cogl we should subclass clutter actor */
|
G_DEFINE_TYPE (ClutterX11TexturePixmap,
|
||||||
G_DEFINE_TYPE (ClutterX11TexturePixmap, \
|
clutter_x11_texture_pixmap,
|
||||||
clutter_x11_texture_pixmap, \
|
|
||||||
CLUTTER_TYPE_TEXTURE);
|
CLUTTER_TYPE_TEXTURE);
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -1161,6 +1161,7 @@ clutter_x11_texture_pixmap_set_automatic (ClutterX11TexturePixmap *texture,
|
|||||||
|
|
||||||
priv = texture->priv;
|
priv = texture->priv;
|
||||||
|
|
||||||
|
setting = !!setting;
|
||||||
if (setting == priv->automatic_updates)
|
if (setting == priv->automatic_updates)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1173,4 +1174,3 @@ clutter_x11_texture_pixmap_set_automatic (ClutterX11TexturePixmap *texture,
|
|||||||
|
|
||||||
priv->automatic_updates = setting;
|
priv->automatic_updates = setting;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
#include <clutter/clutter.h>
|
#include <clutter/clutter.h>
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
@ -44,6 +45,21 @@ typedef struct _ClutterX11TexturePixmap ClutterX11TexturePixmap;
|
|||||||
typedef struct _ClutterX11TexturePixmapClass ClutterX11TexturePixmapClass;
|
typedef struct _ClutterX11TexturePixmapClass ClutterX11TexturePixmapClass;
|
||||||
typedef struct _ClutterX11TexturePixmapPrivate ClutterX11TexturePixmapPrivate;
|
typedef struct _ClutterX11TexturePixmapPrivate ClutterX11TexturePixmapPrivate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClutterX11TexturePixmap:
|
||||||
|
*
|
||||||
|
* The #ClutterX11TexturePixmap structure contains only private data
|
||||||
|
*
|
||||||
|
* Since: 0.8
|
||||||
|
*/
|
||||||
|
struct _ClutterX11TexturePixmap
|
||||||
|
{
|
||||||
|
/*< private >*/
|
||||||
|
ClutterTexture parent;
|
||||||
|
|
||||||
|
ClutterX11TexturePixmapPrivate *priv;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClutterX11TexturePixmapClass:
|
* ClutterX11TexturePixmapClass:
|
||||||
* @update_area: virtual function for updating the area of the texture
|
* @update_area: virtual function for updating the area of the texture
|
||||||
@ -65,45 +81,27 @@ struct _ClutterX11TexturePixmapClass
|
|||||||
gint height);
|
gint height);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* ClutterX11TexturePixmap:
|
|
||||||
*
|
|
||||||
* The #ClutterX11TexturePixmap structure contains only private data
|
|
||||||
*
|
|
||||||
* Since: 0.8
|
|
||||||
*/
|
|
||||||
struct _ClutterX11TexturePixmap
|
|
||||||
{
|
|
||||||
/*< private >*/
|
|
||||||
ClutterTexture parent;
|
|
||||||
|
|
||||||
ClutterX11TexturePixmapPrivate *priv;
|
|
||||||
};
|
|
||||||
|
|
||||||
GType clutter_x11_texture_pixmap_get_type (void) G_GNUC_CONST;
|
GType clutter_x11_texture_pixmap_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
ClutterActor *clutter_x11_texture_pixmap_new (void);
|
ClutterActor *clutter_x11_texture_pixmap_new (void);
|
||||||
|
|
||||||
ClutterActor *clutter_x11_texture_pixmap_new_with_pixmap (Pixmap pixmap);
|
ClutterActor *clutter_x11_texture_pixmap_new_with_pixmap (Pixmap pixmap);
|
||||||
|
|
||||||
ClutterActor *clutter_x11_texture_pixmap_new_with_window (Window window);
|
ClutterActor *clutter_x11_texture_pixmap_new_with_window (Window window);
|
||||||
|
|
||||||
|
void clutter_x11_texture_pixmap_set_automatic (ClutterX11TexturePixmap *texture,
|
||||||
|
gboolean setting);
|
||||||
void clutter_x11_texture_pixmap_set_pixmap (ClutterX11TexturePixmap *texture,
|
void clutter_x11_texture_pixmap_set_pixmap (ClutterX11TexturePixmap *texture,
|
||||||
Pixmap pixmap);
|
Pixmap pixmap);
|
||||||
|
|
||||||
void clutter_x11_texture_pixmap_set_window (ClutterX11TexturePixmap *texture,
|
void clutter_x11_texture_pixmap_set_window (ClutterX11TexturePixmap *texture,
|
||||||
Window window,
|
Window window,
|
||||||
gboolean automatic);
|
gboolean automatic);
|
||||||
void clutter_x11_texture_pixmap_sync_window (ClutterX11TexturePixmap *texture);
|
|
||||||
|
|
||||||
|
void clutter_x11_texture_pixmap_sync_window (ClutterX11TexturePixmap *texture);
|
||||||
void clutter_x11_texture_pixmap_update_area (ClutterX11TexturePixmap *texture,
|
void clutter_x11_texture_pixmap_update_area (ClutterX11TexturePixmap *texture,
|
||||||
gint x,
|
gint x,
|
||||||
gint y,
|
gint y,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
|
|
||||||
void clutter_x11_texture_pixmap_set_automatic (ClutterX11TexturePixmap *texture,
|
|
||||||
gboolean setting);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user