mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 03:22:04 +00:00
2007-06-19 Matthew Allum <mallum@openedhand.com>
* TODO: Sync up a little. * clutter/clutter-main.c: Set a default window title based on g_prgname(). * clutter/clutter-stage.c: * clutter/clutter-stage.h: * clutter/egl/clutter-stage-egl.c: * clutter/glx/clutter-stage-glx.c: * clutter/sdl/clutter-stage-sdl.c: Alter draw_to_pixbuf to return a pixbuf * configure.ac: Only full in gdk-pixbuf-xlib as a GLX backend dep. * tests/test-entry.c: Fix a couple of warnings.
This commit is contained in:
parent
fd0aa08be9
commit
e7332a3778
20
ChangeLog
20
ChangeLog
@ -1,3 +1,23 @@
|
|||||||
|
2007-06-19 Matthew Allum <mallum@openedhand.com>
|
||||||
|
|
||||||
|
* TODO:
|
||||||
|
Sync up a little.
|
||||||
|
* clutter/clutter-main.c:
|
||||||
|
Set a default window title based on g_prgname().
|
||||||
|
|
||||||
|
* clutter/clutter-stage.c:
|
||||||
|
* clutter/clutter-stage.h:
|
||||||
|
* clutter/egl/clutter-stage-egl.c:
|
||||||
|
* clutter/glx/clutter-stage-glx.c:
|
||||||
|
* clutter/sdl/clutter-stage-sdl.c:
|
||||||
|
Alter draw_to_pixbuf to return a pixbuf
|
||||||
|
|
||||||
|
* configure.ac:
|
||||||
|
Only full in gdk-pixbuf-xlib as a GLX backend dep.
|
||||||
|
|
||||||
|
* tests/test-entry.c:
|
||||||
|
Fix a couple of warnings.
|
||||||
|
|
||||||
2007-06-19 Emmanuele Bassi <ebassi@openedhand.com>
|
2007-06-19 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
* Makefile.am: Add README.in to the EXTRA_DIST.
|
* Makefile.am: Add README.in to the EXTRA_DIST.
|
||||||
|
20
TODO
20
TODO
@ -9,23 +9,23 @@ Last updated 31/05/2007
|
|||||||
|
|
||||||
Definetly:
|
Definetly:
|
||||||
|
|
||||||
- YUV texture data, premulled alpha texture data. (ma)
|
- YUV texture data [DONE] premulled alpha texture data. (ma)
|
||||||
- Basic layout code. (eb)
|
- Basic layout code. [DONE] (eb)
|
||||||
- Basic text entry (np)
|
- Basic text entry [DONE] (np)
|
||||||
- Perspective setup (ma)
|
- Perspective setup [DONE] (ma)
|
||||||
- API doc fixups (all)
|
- API doc fixups (all)
|
||||||
- main loop scheduling - paints vs timelimes vs events (ma, eb)
|
- main loop scheduling - paints vs timelimes vs events [DONE] ((ma, eb)
|
||||||
- ClutterProxyTexture (ma)
|
- ClutterProxyTexture (ma)
|
||||||
- event queue fixups (eb)
|
- event queue fixups [DONE} (eb)
|
||||||
- clutter_actor_get_vertices (tf)
|
- clutter_actor_get_vertices [Partly DONE?] (tf)
|
||||||
- fix up event queue (eb)
|
- fix up event queue [DONE] (eb)
|
||||||
|
|
||||||
Maybe:
|
Maybe:
|
||||||
|
|
||||||
- SDL event fixups
|
- SDL event fixups [DONE - roughly]
|
||||||
- Application developers manual
|
- Application developers manual
|
||||||
- Lookat type functionality.
|
- Lookat type functionality.
|
||||||
|
- Mipmaps for pango renderer to improving text scaling quality
|
||||||
|
|
||||||
0.6
|
0.6
|
||||||
===
|
===
|
||||||
|
@ -598,6 +598,9 @@ clutter_init_with_args (int *argc,
|
|||||||
if (clutter_is_initialized)
|
if (clutter_is_initialized)
|
||||||
return CLUTTER_INIT_SUCCESS;
|
return CLUTTER_INIT_SUCCESS;
|
||||||
|
|
||||||
|
if (*argc > 0)
|
||||||
|
g_set_prgname (*argv[0]);
|
||||||
|
|
||||||
clutter_base_init ();
|
clutter_base_init ();
|
||||||
|
|
||||||
group = clutter_get_option_group ();
|
group = clutter_get_option_group ();
|
||||||
@ -630,6 +633,9 @@ clutter_init_with_args (int *argc,
|
|||||||
|
|
||||||
_clutter_feature_init ();
|
_clutter_feature_init ();
|
||||||
|
|
||||||
|
clutter_stage_set_title (CLUTTER_STAGE(clutter_stage_get_default()),
|
||||||
|
g_get_prgname ());
|
||||||
|
|
||||||
return CLUTTER_INIT_SUCCESS;
|
return CLUTTER_INIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -688,6 +694,9 @@ clutter_init (int *argc,
|
|||||||
if (clutter_is_initialized)
|
if (clutter_is_initialized)
|
||||||
return CLUTTER_INIT_SUCCESS;
|
return CLUTTER_INIT_SUCCESS;
|
||||||
|
|
||||||
|
if (*argc > 0)
|
||||||
|
g_set_prgname (*argv[0]);
|
||||||
|
|
||||||
clutter_base_init ();
|
clutter_base_init ();
|
||||||
|
|
||||||
/* parse_args will trigger backend creation and things like
|
/* parse_args will trigger backend creation and things like
|
||||||
@ -720,6 +729,9 @@ clutter_init (int *argc,
|
|||||||
/* finally features - will call to backend and cogl */
|
/* finally features - will call to backend and cogl */
|
||||||
_clutter_feature_init ();
|
_clutter_feature_init ();
|
||||||
|
|
||||||
|
clutter_stage_set_title (CLUTTER_STAGE(clutter_stage_get_default()),
|
||||||
|
g_get_prgname());
|
||||||
|
|
||||||
return CLUTTER_INIT_SUCCESS;
|
return CLUTTER_INIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -742,13 +742,7 @@ clutter_stage_snapshot (ClutterStage *stage,
|
|||||||
|
|
||||||
klass = CLUTTER_STAGE_GET_CLASS (stage);
|
klass = CLUTTER_STAGE_GET_CLASS (stage);
|
||||||
if (klass->draw_to_pixbuf)
|
if (klass->draw_to_pixbuf)
|
||||||
{
|
return klass->draw_to_pixbuf (stage, x, y, width, height);
|
||||||
GdkPixbuf *retval = NULL;
|
|
||||||
|
|
||||||
klass->draw_to_pixbuf (stage, retval, x, y, width, height);
|
|
||||||
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -84,8 +84,7 @@ struct _ClutterStageClass
|
|||||||
gboolean visible);
|
gboolean visible);
|
||||||
void (* set_offscreen) (ClutterStage *stage,
|
void (* set_offscreen) (ClutterStage *stage,
|
||||||
gboolean offscreen);
|
gboolean offscreen);
|
||||||
void (* draw_to_pixbuf) (ClutterStage *stage,
|
GdkPixbuf* (* draw_to_pixbuf) (ClutterStage *stage,
|
||||||
GdkPixbuf *dest,
|
|
||||||
gint x,
|
gint x,
|
||||||
gint y,
|
gint y,
|
||||||
gint width,
|
gint width,
|
||||||
|
@ -323,9 +323,8 @@ clutter_stage_egl_set_offscreen (ClutterStage *stage,
|
|||||||
G_OBJECT_TYPE_NAME (stage));
|
G_OBJECT_TYPE_NAME (stage));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static GdkPixbuf*
|
||||||
clutter_stage_egl_draw_to_pixbuf (ClutterStage *stage,
|
clutter_stage_egl_draw_to_pixbuf (ClutterStage *stage,
|
||||||
GdkPixbuf *dest,
|
|
||||||
gint x,
|
gint x,
|
||||||
gint y,
|
gint y,
|
||||||
gint width,
|
gint width,
|
||||||
@ -333,6 +332,7 @@ clutter_stage_egl_draw_to_pixbuf (ClutterStage *stage,
|
|||||||
{
|
{
|
||||||
g_warning ("Stage of type `%s' do not support ClutterStage::draw_to_pixbuf",
|
g_warning ("Stage of type `%s' do not support ClutterStage::draw_to_pixbuf",
|
||||||
G_OBJECT_TYPE_NAME (stage));
|
G_OBJECT_TYPE_NAME (stage));
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -488,9 +488,8 @@ snapshot_pixbuf_free (guchar *pixels,
|
|||||||
g_free (pixels);
|
g_free (pixels);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static GdkPixbuf*
|
||||||
clutter_stage_glx_draw_to_pixbuf (ClutterStage *stage,
|
clutter_stage_glx_draw_to_pixbuf (ClutterStage *stage,
|
||||||
GdkPixbuf *dest,
|
|
||||||
gint x,
|
gint x,
|
||||||
gint y,
|
gint y,
|
||||||
gint width,
|
gint width,
|
||||||
@ -517,7 +516,7 @@ clutter_stage_glx_draw_to_pixbuf (ClutterStage *stage,
|
|||||||
{
|
{
|
||||||
gdk_pixbuf_xlib_init (stage_glx->xdpy, stage_glx->xscreen);
|
gdk_pixbuf_xlib_init (stage_glx->xdpy, stage_glx->xscreen);
|
||||||
|
|
||||||
dest = gdk_pixbuf_xlib_get_from_drawable (NULL,
|
pixb = gdk_pixbuf_xlib_get_from_drawable (NULL,
|
||||||
(Drawable) stage_glx->xpixmap,
|
(Drawable) stage_glx->xpixmap,
|
||||||
DefaultColormap (stage_glx->xdpy,
|
DefaultColormap (stage_glx->xdpy,
|
||||||
stage_glx->xscreen),
|
stage_glx->xscreen),
|
||||||
@ -528,26 +527,33 @@ clutter_stage_glx_draw_to_pixbuf (ClutterStage *stage,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
data = g_malloc0 (sizeof (guchar) * width * height * 4);
|
GdkPixbuf *tmp = NULL;
|
||||||
|
gint stride;
|
||||||
|
|
||||||
|
stride = ((width * 4 + 3) &~ 3);
|
||||||
|
|
||||||
|
data = g_malloc0 (sizeof (guchar) * stride * height);
|
||||||
|
|
||||||
glReadPixels (x,
|
glReadPixels (x,
|
||||||
clutter_actor_get_height (actor) - y - height,
|
clutter_actor_get_height (actor) - y - height,
|
||||||
width,
|
width,
|
||||||
height, GL_RGBA, GL_UNSIGNED_BYTE, data);
|
height, GL_RGBA, GL_UNSIGNED_BYTE, data);
|
||||||
|
|
||||||
pixb = gdk_pixbuf_new_from_data (data,
|
tmp = gdk_pixbuf_new_from_data (data,
|
||||||
GDK_COLORSPACE_RGB,
|
GDK_COLORSPACE_RGB,
|
||||||
TRUE,
|
TRUE,
|
||||||
8,
|
8,
|
||||||
width, height,
|
width, height,
|
||||||
width * 4,
|
stride,
|
||||||
snapshot_pixbuf_free,
|
snapshot_pixbuf_free,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
dest = gdk_pixbuf_flip (pixb, TRUE);
|
pixb = gdk_pixbuf_flip (tmp, TRUE);
|
||||||
|
|
||||||
g_object_unref (pixb);
|
g_object_unref (tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return pixb;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -159,7 +159,7 @@ clutter_stage_sdl_set_offscreen (ClutterStage *stage,
|
|||||||
G_OBJECT_TYPE_NAME (stage));
|
G_OBJECT_TYPE_NAME (stage));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static GdkPixbuf*
|
||||||
clutter_stage_sdl_draw_to_pixbuf (ClutterStage *stage,
|
clutter_stage_sdl_draw_to_pixbuf (ClutterStage *stage,
|
||||||
GdkPixbuf *dest,
|
GdkPixbuf *dest,
|
||||||
gint x,
|
gint x,
|
||||||
@ -169,6 +169,7 @@ clutter_stage_sdl_draw_to_pixbuf (ClutterStage *stage,
|
|||||||
{
|
{
|
||||||
g_warning ("Stage of type `%s' do not support ClutterStage::draw_to_pixbuf",
|
g_warning ("Stage of type `%s' do not support ClutterStage::draw_to_pixbuf",
|
||||||
G_OBJECT_TYPE_NAME (stage));
|
G_OBJECT_TYPE_NAME (stage));
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
10
configure.ac
10
configure.ac
@ -111,6 +111,8 @@ AC_ARG_WITH([flavour],
|
|||||||
[Select the Clutter backend]),
|
[Select the Clutter backend]),
|
||||||
clutterbackend=$with_flavour)
|
clutterbackend=$with_flavour)
|
||||||
|
|
||||||
|
BACKEND_PC_FILES=""
|
||||||
|
|
||||||
case $clutterbackend in
|
case $clutterbackend in
|
||||||
|
|
||||||
sdl)
|
sdl)
|
||||||
@ -181,6 +183,9 @@ case $clutterbackend in
|
|||||||
AC_MSG_ERROR([GLX not found and GLX backend requested]);
|
AC_MSG_ERROR([GLX not found and GLX backend requested]);
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# xlib pixbuf needed for exporting the stage
|
||||||
|
BACKEND_PC_FILES="gdk-pixbuf-xlib-2.0"
|
||||||
|
|
||||||
GLX_LIBS="$X11_LIBS -lGL"
|
GLX_LIBS="$X11_LIBS -lGL"
|
||||||
GLX_CFLAGS="$X11_CFLAGS"
|
GLX_CFLAGS="$X11_CFLAGS"
|
||||||
;;
|
;;
|
||||||
@ -198,10 +203,9 @@ case $clutterbackend in
|
|||||||
if test "x$HAVE_OGLES" = "xno"; then
|
if test "x$HAVE_OGLES" = "xno"; then
|
||||||
AC_MSG_ERROR([libvincent (ogles) not found and egl backend requested.]);
|
AC_MSG_ERROR([libvincent (ogles) not found and egl backend requested.]);
|
||||||
fi
|
fi
|
||||||
|
|
||||||
EGL_LIBS="$EGL_LIBS $X11_LIBS"
|
EGL_LIBS="$EGL_LIBS $X11_LIBS"
|
||||||
EGL_CFLAGS="$EGL_CFLAGS $X11_CFLAGS"
|
EGL_CFLAGS="$EGL_CFLAGS $X11_CFLAGS"
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*) AC_MSG_ERROR([Invalid backend for Clutter: use glx or egl])
|
*) AC_MSG_ERROR([Invalid backend for Clutter: use glx or egl])
|
||||||
@ -218,7 +222,7 @@ AC_SUBST([clutterbackendlib])
|
|||||||
|
|
||||||
dnl ========================================================================
|
dnl ========================================================================
|
||||||
|
|
||||||
pkg_modules="pangoft2 glib-2.0 >= 2.10 gobject-2.0 gthread-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0"
|
pkg_modules="pangoft2 glib-2.0 >= 2.10 gobject-2.0 gthread-2.0 gdk-pixbuf-2.0 $BACKEND_PC_FILES"
|
||||||
PKG_CHECK_MODULES(CLUTTER_DEPS, [$pkg_modules])
|
PKG_CHECK_MODULES(CLUTTER_DEPS, [$pkg_modules])
|
||||||
|
|
||||||
dnl ========================================================================
|
dnl ========================================================================
|
||||||
|
@ -40,7 +40,7 @@ main (int argc, char *argv[])
|
|||||||
|
|
||||||
clutter_actor_set_size (stage, 800, 600);
|
clutter_actor_set_size (stage, 800, 600);
|
||||||
clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
|
clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
|
||||||
clutter_stage_set_title (stage, "ClutterEntry Test");
|
clutter_stage_set_title (CLUTTER_STAGE (stage), "ClutterEntry Test");
|
||||||
|
|
||||||
entry = clutter_entry_new_with_text ("Sans 14",
|
entry = clutter_entry_new_with_text ("Sans 14",
|
||||||
"Type something, be sure to use the "
|
"Type something, be sure to use the "
|
||||||
@ -53,7 +53,7 @@ main (int argc, char *argv[])
|
|||||||
/*clutter_entry_set_max_length (CLUTTER_ENTRY (entry), 50);*/
|
/*clutter_entry_set_max_length (CLUTTER_ENTRY (entry), 50);*/
|
||||||
|
|
||||||
clutter_group_add (CLUTTER_GROUP (stage), entry);
|
clutter_group_add (CLUTTER_GROUP (stage), entry);
|
||||||
clutter_actor_show_all (CLUTTER_GROUP (stage));
|
clutter_actor_show_all (stage);
|
||||||
|
|
||||||
g_signal_connect (stage, "key-release-event",
|
g_signal_connect (stage, "key-release-event",
|
||||||
G_CALLBACK (on_key_release_cb), (gpointer)entry);
|
G_CALLBACK (on_key_release_cb), (gpointer)entry);
|
||||||
|
Loading…
Reference in New Issue
Block a user