Upgraded the Win32 backend to work with the multi-stage

subclassing code.

	* clutter/win32/clutter-stage-win32.h: 
	* clutter/win32/clutter-stage-win32.c: Now inherits from
	ClutterGroup and implements ClutterStageWindow instead of
	inheriting directly from ClutterStage.

	* clutter/win32/clutter-event-win32.c (message_translate): Now
	takes an extra parameter to return whether DefWindowProc should be
	called. This is needed to prevent the default WM_CLOSE handler
	from destroying the window.

	* clutter/win32/clutter-backend-win32.c
	(clutter_backend_win32_dispose): Destroy all of the stages using
	g_slist_foreach as per bug #871. Now also destroys the GL context.
	(clutter_backend_win32_get_features): Added assertions to ensure
	there is a valid GL context.
	(clutter_backend_win32_ensure_context): Accepts NULL stage. Gets
	implementation pointer from the stage.
This commit is contained in:
Neil Roberts
2008-04-13 08:43:32 +00:00
parent bf48bd1f55
commit 0b8a500fca
5 changed files with 250 additions and 75 deletions

View File

@ -22,7 +22,7 @@
#ifndef __CLUTTER_STAGE_WIN32_H__
#define __CLUTTER_STAGE_WIN32_H__
#include <glib-object.h>
#include <clutter/clutter-group.h>
#include <clutter/clutter-stage.h>
#include <windows.h>
@ -42,7 +42,7 @@ typedef struct _ClutterStageWin32Class ClutterStageWin32Class;
struct _ClutterStageWin32
{
ClutterStage parent_instance;
ClutterGroup parent_instance;
HWND hwnd;
HDC client_dc;
@ -55,11 +55,13 @@ struct _ClutterStageWin32
ClutterBackendWin32 *backend;
ClutterStageState state;
ClutterStage *wrapper;
};
struct _ClutterStageWin32Class
{
ClutterStageClass parent_class;
ClutterGroupClass parent_class;
};
GType clutter_stage_win32_get_type (void) G_GNUC_CONST;