mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 03:22:04 +00:00
2007-07-25 Matthew Allum <mallum@openedhand.com>
* Makefile.am: * HACKING: Add with initial notes on coding bits and bobs. * clutter/clutter-behaviour-scale.c: Doc fixes. * clutter/clutter-event.c: (clutter_event_put): Doc fixes. * clutter/glx/clutter-stage-glx.c: Disable wm user resizing of stage (At least for now) Doc fixes.
This commit is contained in:
parent
5b92cc21cb
commit
73ff6900d0
16
ChangeLog
16
ChangeLog
@ -1,3 +1,19 @@
|
||||
2007-07-25 Matthew Allum <mallum@openedhand.com>
|
||||
|
||||
* Makefile.am:
|
||||
* HACKING:
|
||||
Add with initial notes on coding bits and bobs.
|
||||
|
||||
* clutter/clutter-behaviour-scale.c:
|
||||
Doc fixes.
|
||||
|
||||
* clutter/clutter-event.c: (clutter_event_put):
|
||||
Doc fixes.
|
||||
|
||||
* clutter/glx/clutter-stage-glx.c:
|
||||
Disable wm user resizing of stage (At least for now)
|
||||
Doc fixes.
|
||||
|
||||
2007-07-25 Tomas Frydrych <tf@openedhand.com>
|
||||
|
||||
* clutter/clutter-fixed.c:
|
||||
|
15
HACKING
Normal file
15
HACKING
Normal file
@ -0,0 +1,15 @@
|
||||
General notes and rules on clutter core hacking;
|
||||
|
||||
- GNU style indentation, please wrap at 80 chars.
|
||||
|
||||
- All public functions with float parameters should also provide a fixed
|
||||
point version.
|
||||
|
||||
- Propertys should always be float (never fixed).
|
||||
|
||||
- API funcs should always use g_return_*
|
||||
|
||||
- Really try to avoid if possible additions to clutter-private.h
|
||||
|
||||
- Dont add direct GL calls but wrap with cogl (also adding GL ES Version)
|
||||
|
@ -18,7 +18,7 @@ uninstall-local:
|
||||
rm -f $(DESTDIR)$(pkgconfigdir)/clutter-@CLUTTER_MAJORMINOR@.pc
|
||||
|
||||
|
||||
EXTRA_DIST = clutter.pc.in
|
||||
EXTRA_DIST = clutter.pc.in HACKING
|
||||
|
||||
CLEANFILES = $(pcfiles)
|
||||
|
||||
|
@ -232,7 +232,7 @@ clutter_behaviour_scale_init (ClutterBehaviourScale *self)
|
||||
* @alpha: a #ClutterAlpha
|
||||
* @scale_begin: initial scale factor
|
||||
* @scale_end: final scale factor
|
||||
* @gravity: FIXME: Not currently implemented
|
||||
* @gravity: a #ClutterGravity for the scale.
|
||||
*
|
||||
* Creates a new #ClutterBehaviourScale instance.
|
||||
*
|
||||
@ -259,7 +259,7 @@ clutter_behaviour_scale_new (ClutterAlpha *alpha,
|
||||
* @alpha: a #ClutterAlpha
|
||||
* @scale_begin: initial scale factor
|
||||
* @scale_end: final scale factor
|
||||
* @gravity: FIXME: Not currently implemented
|
||||
* @gravity: a #ClutterGravity for the scale.
|
||||
*
|
||||
* A fixed point implementation of clutter_behaviour_scale_new()
|
||||
*
|
||||
|
@ -374,13 +374,14 @@ clutter_event_free (ClutterEvent *event)
|
||||
/**
|
||||
* clutter_event_get:
|
||||
*
|
||||
* FIXME
|
||||
* Pops an event off the event queue. Applications should not need to call
|
||||
* this.
|
||||
*
|
||||
* Return value: FIXME
|
||||
* Return value: A #ClutterEvent or NULL if queue empty
|
||||
*
|
||||
* Since: 0.4
|
||||
*/
|
||||
ClutterEvent *
|
||||
ClutterEvent*
|
||||
clutter_event_get (void)
|
||||
{
|
||||
ClutterMainContext *context = clutter_context_get_default ();
|
||||
@ -391,9 +392,10 @@ clutter_event_get (void)
|
||||
/**
|
||||
* clutter_event_peek:
|
||||
*
|
||||
* FIXME
|
||||
* Returns a pointer to the first event from the event queue but
|
||||
* does not remove it.
|
||||
*
|
||||
* Return value: FIXME
|
||||
* Return value: A #ClutterEvent or NULL if queue empty.
|
||||
*
|
||||
* Since: 0.4
|
||||
*/
|
||||
@ -414,7 +416,7 @@ clutter_event_peek (void)
|
||||
* clutter_event_put:
|
||||
* @event: a #ClutterEvent
|
||||
*
|
||||
* FIXME
|
||||
* Puts a copy of the event on the back on the event queue.
|
||||
*
|
||||
* Since: 0.4
|
||||
*/
|
||||
@ -429,6 +431,16 @@ clutter_event_put (ClutterEvent *event)
|
||||
g_queue_push_head (context->events_queue, clutter_event_copy (event));
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_events_pending:
|
||||
* @event: a #ClutterEvent
|
||||
*
|
||||
* Checks if events are pending in the event queue.
|
||||
*
|
||||
* Return value: TRUE if there are pending events, FALSE otherwise.
|
||||
*
|
||||
* Since: 0.4
|
||||
*/
|
||||
gboolean
|
||||
clutter_events_pending (void)
|
||||
{
|
||||
|
@ -50,6 +50,28 @@
|
||||
|
||||
G_DEFINE_TYPE (ClutterStageGLX, clutter_stage_glx, CLUTTER_TYPE_STAGE);
|
||||
|
||||
static void
|
||||
fix_window_size (ClutterStageGLX *stage_glx)
|
||||
{
|
||||
/* Dont allow window to be user resize-able.
|
||||
* FIXME: This needs to be bound to a boolean prop.
|
||||
*/
|
||||
if (stage_glx->xwin != None && stage_glx->is_foreign_xwin == FALSE)
|
||||
{
|
||||
XSizeHints *size_hints;
|
||||
|
||||
size_hints = XAllocSizeHints();
|
||||
|
||||
size_hints->max_width = size_hints->min_width = stage_glx->xwin_width;
|
||||
size_hints->max_height = size_hints->min_height = stage_glx->xwin_height;
|
||||
size_hints->flags = PMinSize|PMaxSize;
|
||||
|
||||
XSetWMNormalHints (stage_glx->xdpy, stage_glx->xwin, size_hints);
|
||||
|
||||
XFree(size_hints);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_stage_glx_show (ClutterActor *actor)
|
||||
{
|
||||
@ -215,6 +237,9 @@ clutter_stage_glx_realize (ClutterActor *actor)
|
||||
ButtonPressMask | ButtonReleaseMask |
|
||||
PropertyChangeMask);
|
||||
|
||||
/* no user resize.. */
|
||||
fix_window_size (stage_glx);
|
||||
|
||||
set_wm_protocols (stage_glx->xdpy, stage_glx->xwin);
|
||||
|
||||
if (stage_glx->gl_context)
|
||||
@ -370,11 +395,15 @@ clutter_stage_glx_request_coords (ClutterActor *self,
|
||||
stage_glx->xwin_height = new_height;
|
||||
|
||||
if (stage_glx->xwin != None)
|
||||
{
|
||||
XResizeWindow (stage_glx->xdpy,
|
||||
stage_glx->xwin,
|
||||
stage_glx->xwin_width,
|
||||
stage_glx->xwin_height);
|
||||
|
||||
fix_window_size (stage_glx);
|
||||
}
|
||||
|
||||
if (stage_glx->xpixmap != None)
|
||||
{
|
||||
/* Need to recreate to resize */
|
||||
@ -390,6 +419,8 @@ clutter_stage_glx_request_coords (ClutterActor *self,
|
||||
stage_glx->xwin,
|
||||
CLUTTER_UNITS_TO_INT (box->x1),
|
||||
CLUTTER_UNITS_TO_INT (box->y1));
|
||||
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
@ -645,9 +676,9 @@ clutter_stage_glx_init (ClutterStageGLX *stage)
|
||||
* clutter_glx_get_stage_window:
|
||||
* @stage: a #ClutterStage
|
||||
*
|
||||
* FIXME
|
||||
* Gets the stages X Window.
|
||||
*
|
||||
* Return value: FIXME
|
||||
* Return value: An XID for the stage window.
|
||||
*
|
||||
* Since: 0.4
|
||||
*/
|
||||
@ -663,9 +694,9 @@ clutter_glx_get_stage_window (ClutterStage *stage)
|
||||
* clutter_glx_get_stage_visual:
|
||||
* @stage: a #ClutterStage
|
||||
*
|
||||
* FIXME
|
||||
* Returns the stage XVisualInfo
|
||||
*
|
||||
* Return value: FIXME
|
||||
* Return value: The XVisualInfo for the stage.
|
||||
*
|
||||
* Since: 0.4
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user