mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 03:22:04 +00:00
2007-07-31 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-stage.[ch]: Fix clutter_stage_set_user_resizable() name, and add a getter for the property. * clutter/glx/clutter-stage-glx.c: Use the accessor, not g_object_get() to retrieve the value of the resizable property.
This commit is contained in:
parent
6145261040
commit
4170d7cc43
@ -1,3 +1,11 @@
|
|||||||
|
2007-07-31 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
|
* clutter/clutter-stage.[ch]: Fix clutter_stage_set_user_resizable()
|
||||||
|
name, and add a getter for the property.
|
||||||
|
|
||||||
|
* clutter/glx/clutter-stage-glx.c: Use the accessor, not
|
||||||
|
g_object_get() to retrieve the value of the resizable property.
|
||||||
|
|
||||||
2007-07-31 Emmanuele Bassi <ebassi@openedhand.com>
|
2007-07-31 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
* clutter/clutter-backend.[ch]: Add clutter_backend_set_resolution()
|
* clutter/clutter-backend.[ch]: Add clutter_backend_set_resolution()
|
||||||
|
@ -58,10 +58,10 @@ struct _ClutterStagePrivate
|
|||||||
ClutterColor color;
|
ClutterColor color;
|
||||||
ClutterPerspective perspective;
|
ClutterPerspective perspective;
|
||||||
|
|
||||||
guint is_fullscreen : 1;
|
guint is_fullscreen : 1;
|
||||||
guint is_offscreen : 1;
|
guint is_offscreen : 1;
|
||||||
guint is_cursor_visible : 1;
|
guint is_cursor_visible : 1;
|
||||||
guint is_user_resizeable : 1;
|
guint is_user_resizable : 1;
|
||||||
|
|
||||||
gchar *title;
|
gchar *title;
|
||||||
};
|
};
|
||||||
@ -160,7 +160,7 @@ clutter_stage_set_property (GObject *object,
|
|||||||
clutter_stage_set_title (stage, g_value_get_string (value));
|
clutter_stage_set_title (stage, g_value_get_string (value));
|
||||||
break;
|
break;
|
||||||
case PROP_USER_RESIZE:
|
case PROP_USER_RESIZE:
|
||||||
clutter_stage_set_user_resizeable (stage, g_value_get_boolean (value));
|
clutter_stage_set_user_resizable (stage, g_value_get_boolean (value));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
@ -205,7 +205,7 @@ clutter_stage_get_property (GObject *object,
|
|||||||
g_value_set_string (value, priv->title);
|
g_value_set_string (value, priv->title);
|
||||||
break;
|
break;
|
||||||
case PROP_USER_RESIZE:
|
case PROP_USER_RESIZE:
|
||||||
g_value_set_boolean (value, priv->is_user_resizeable);
|
g_value_set_boolean (value, priv->is_user_resizable);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
@ -256,8 +256,8 @@ clutter_stage_class_init (ClutterStageClass *klass)
|
|||||||
|
|
||||||
g_object_class_install_property
|
g_object_class_install_property
|
||||||
(gobject_class, PROP_USER_RESIZE,
|
(gobject_class, PROP_USER_RESIZE,
|
||||||
g_param_spec_boolean ("user-resizeable",
|
g_param_spec_boolean ("user-resizable",
|
||||||
"User Resizeable",
|
"User Resizable",
|
||||||
"Whether the stage is able to be resized via "
|
"Whether the stage is able to be resized via "
|
||||||
"user interaction",
|
"user interaction",
|
||||||
FALSE,
|
FALSE,
|
||||||
@ -438,10 +438,10 @@ clutter_stage_init (ClutterStage *self)
|
|||||||
|
|
||||||
self->priv = priv = CLUTTER_STAGE_GET_PRIVATE (self);
|
self->priv = priv = CLUTTER_STAGE_GET_PRIVATE (self);
|
||||||
|
|
||||||
priv->is_offscreen = FALSE;
|
priv->is_offscreen = FALSE;
|
||||||
priv->is_fullscreen = FALSE;
|
priv->is_fullscreen = FALSE;
|
||||||
priv->is_user_resizeable = FALSE;
|
priv->is_user_resizable = FALSE;
|
||||||
priv->is_cursor_visible = TRUE;
|
priv->is_cursor_visible = TRUE;
|
||||||
|
|
||||||
priv->color.red = 0xff;
|
priv->color.red = 0xff;
|
||||||
priv->color.green = 0xff;
|
priv->color.green = 0xff;
|
||||||
@ -703,15 +703,18 @@ clutter_stage_unfullscreen (ClutterStage *stage)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clutter_stage_set_user_resizeable:
|
* clutter_stage_set_user_resizable:
|
||||||
* @stage: a #ClutterStage
|
* @stage: a #ClutterStage
|
||||||
* @value: a boolean indicating if the stage should be user resizable.
|
* @resizable: whether if the stage should be user resizable.
|
||||||
*
|
*
|
||||||
* Sets if the stage is able to be resized by user interaction (i.e via
|
* Sets if the stage is able to be resized by user interaction (i.e via
|
||||||
* window manager controls)
|
* window manager controls)
|
||||||
|
*
|
||||||
|
* Since: 0.4
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clutter_stage_set_user_resizeable (ClutterStage *stage, gboolean value)
|
clutter_stage_set_user_resizable (ClutterStage *stage,
|
||||||
|
gboolean resizable)
|
||||||
{
|
{
|
||||||
ClutterStagePrivate *priv;
|
ClutterStagePrivate *priv;
|
||||||
|
|
||||||
@ -720,17 +723,35 @@ clutter_stage_set_user_resizeable (ClutterStage *stage, gboolean value)
|
|||||||
priv = stage->priv;
|
priv = stage->priv;
|
||||||
|
|
||||||
if (clutter_feature_available (CLUTTER_FEATURE_STAGE_USER_RESIZE)
|
if (clutter_feature_available (CLUTTER_FEATURE_STAGE_USER_RESIZE)
|
||||||
&& priv->is_user_resizeable != value
|
&& priv->is_user_resizable != resizable
|
||||||
&& CLUTTER_STAGE_GET_CLASS (stage)->set_user_resize)
|
&& CLUTTER_STAGE_GET_CLASS (stage)->set_user_resize)
|
||||||
{
|
{
|
||||||
priv->is_user_resizeable = value;
|
priv->is_user_resizable = resizable;
|
||||||
|
|
||||||
CLUTTER_STAGE_GET_CLASS (stage)->set_user_resize (stage, value);
|
CLUTTER_STAGE_GET_CLASS (stage)->set_user_resize (stage, resizable);
|
||||||
|
|
||||||
g_object_notify (G_OBJECT (stage), "user-resizeable");
|
g_object_notify (G_OBJECT (stage), "user-resizable");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_stage_get_user_resizable:
|
||||||
|
* @stage: a #ClutterStage
|
||||||
|
*
|
||||||
|
* Retrieves the value set with clutter_stage_set_user_resizable().
|
||||||
|
*
|
||||||
|
* Return value: %TRUE is the stage is resizable by the user.
|
||||||
|
*
|
||||||
|
* Since: 0.4
|
||||||
|
*/
|
||||||
|
gboolean
|
||||||
|
clutter_stage_get_user_resizable (ClutterStage *stage)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (CLUTTER_IS_STAGE (stage), FALSE);
|
||||||
|
|
||||||
|
return stage->priv->is_user_resizable;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clutter_stage_show_cursor:
|
* clutter_stage_show_cursor:
|
||||||
* @stage: a #ClutterStage
|
* @stage: a #ClutterStage
|
||||||
|
@ -171,12 +171,12 @@ GdkPixbuf * clutter_stage_snapshot (ClutterStage *stage,
|
|||||||
gboolean clutter_stage_event (ClutterStage *stage,
|
gboolean clutter_stage_event (ClutterStage *stage,
|
||||||
ClutterEvent *event);
|
ClutterEvent *event);
|
||||||
|
|
||||||
void clutter_stage_set_title (ClutterStage *stage,
|
void clutter_stage_set_title (ClutterStage *stage,
|
||||||
const gchar *title);
|
const gchar *title);
|
||||||
G_CONST_RETURN gchar *clutter_stage_get_title (ClutterStage *stage);
|
G_CONST_RETURN gchar *clutter_stage_get_title (ClutterStage *stage);
|
||||||
|
void clutter_stage_set_user_resizable (ClutterStage *stage,
|
||||||
void clutter_stage_set_user_resizeable (ClutterStage *stage,
|
gboolean resizable);
|
||||||
gboolean value);
|
gboolean clutter_stage_get_user_resizable (ClutterStage *stage);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ fix_window_size (ClutterStageGLX *stage_glx)
|
|||||||
{
|
{
|
||||||
gboolean resize;
|
gboolean resize;
|
||||||
|
|
||||||
g_object_get (stage_glx, "user-resizeable", &resize, NULL);
|
resize = clutter_stage_get_user_resizable (CLUTTER_STAGE (stage_glx));
|
||||||
|
|
||||||
if (stage_glx->xwin != None && stage_glx->is_foreign_xwin == FALSE)
|
if (stage_glx->xwin != None && stage_glx->is_foreign_xwin == FALSE)
|
||||||
{
|
{
|
||||||
|
@ -429,7 +429,8 @@ clutter_stage_get_perspective
|
|||||||
clutter_stage_get_perspectivex
|
clutter_stage_get_perspectivex
|
||||||
clutter_stage_set_title
|
clutter_stage_set_title
|
||||||
clutter_stage_get_title
|
clutter_stage_get_title
|
||||||
clutter_stage_set_user_resizeable
|
clutter_stage_set_user_resizable
|
||||||
|
clutter_stage_get_user_resizable
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
CLUTTER_STAGE
|
CLUTTER_STAGE
|
||||||
CLUTTER_IS_STAGE
|
CLUTTER_IS_STAGE
|
||||||
|
Loading…
Reference in New Issue
Block a user