| 1 |
/* Clutter. |
| 2 |
* An OpenGL based 'interactive canvas' library. |
| 3 |
* Authored By Matthew Allum <[email protected]> |
| 4 |
* Copyright (C) 2006-2007 OpenedHand |
| 5 |
* |
| 6 |
* This library is free software; you can redistribute it and/or |
| 7 |
* modify it under the terms of the GNU Lesser General Public |
| 8 |
* License as published by the Free Software Foundation; either |
| 9 |
* version 2 of the License, or (at your option) any later version. |
| 10 |
* |
| 11 |
* This library is distributed in the hope that it will be useful, |
| 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 |
* Lesser General Public License for more details. |
| 15 |
* |
| 16 |
* You should have received a copy of the GNU Lesser General Public |
| 17 |
* License along with this library. If not, see <http://www.gnu.org/licenses/>. |
| 18 |
* |
| 19 |
* |
| 20 |
*/ |
| 21 |
|
| 22 |
#ifndef __CLUTTER_STAGE_WIN32_H__ |
| 23 |
#define __CLUTTER_STAGE_WIN32_H__ |
| 24 |
|
| 25 |
#include <clutter/clutter-group.h> |
| 26 |
#include <clutter/clutter-stage.h> |
| 27 |
#include <windows.h> |
| 28 |
|
| 29 |
#include "clutter-backend-win32.h" |
| 30 |
|
| 31 |
G_BEGIN_DECLS |
| 32 |
|
| 33 |
#define CLUTTER_TYPE_STAGE_WIN32 (clutter_stage_win32_get_type ()) |
| 34 |
#define CLUTTER_STAGE_WIN32(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_STAGE_WIN32, ClutterStageWin32)) |
| 35 |
#define CLUTTER_IS_STAGE_WIN32(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_STAGE_WIN32)) |
| 36 |
#define CLUTTER_STAGE_WIN32_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_STAGE_WIN32, ClutterStageWin32Class)) |
| 37 |
#define CLUTTER_IS_STAGE_WIN32_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_STAGE_WIN32)) |
| 38 |
#define CLUTTER_STAGE_WIN32_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_STAGE_WIN32, ClutterStageWin32Class)) |
| 39 |
|
| 40 |
typedef struct _ClutterStageWin32 ClutterStageWin32; |
| 41 |
typedef struct _ClutterStageWin32Class ClutterStageWin32Class; |
| 42 |
|
| 43 |
struct _ClutterStageWin32 |
| 44 |
{ |
| 45 |
ClutterGroup parent_instance; |
| 46 |
|
| 47 |
CoglOnscreen *onscreen; |
| 48 |
|
| 49 |
HWND hwnd; |
| 50 |
gint win_width; |
| 51 |
gint win_height; |
| 52 |
gint scroll_pos; |
| 53 |
RECT fullscreen_rect; |
| 54 |
wchar_t *wtitle; |
| 55 |
|
| 56 |
ClutterBackendWin32 *backend; |
| 57 |
|
| 58 |
ClutterStage *wrapper; |
| 59 |
|
| 60 |
guint is_foreign_win : 1; |
| 61 |
guint tracking_mouse : 1; |
| 62 |
guint is_cursor_visible : 1; |
| 63 |
guint accept_focus : 1; |
| 64 |
}; |
| 65 |
|
| 66 |
struct _ClutterStageWin32Class |
| 67 |
{ |
| 68 |
ClutterGroupClass parent_class; |
| 69 |
}; |
| 70 |
|
| 71 |
GType clutter_stage_win32_get_type (void) G_GNUC_CONST; |
| 72 |
|
| 73 |
void clutter_stage_win32_map (ClutterStageWin32 *stage_win32); |
| 74 |
void clutter_stage_win32_unmap (ClutterStageWin32 *stage_win32); |
| 75 |
|
| 76 |
/* Defined in clutter-event-win32.c */ |
| 77 |
LRESULT CALLBACK _clutter_stage_win32_window_proc (HWND hwnd, |
| 78 |
UINT msg, |
| 79 |
WPARAM wparam, |
| 80 |
LPARAM lparam); |
| 81 |
|
| 82 |
void _clutter_stage_win32_get_min_max_info (ClutterStageWin32 *stage_win32, |
| 83 |
MINMAXINFO *min_max_info); |
| 84 |
|
| 85 |
void _clutter_stage_win32_update_cursor (ClutterStageWin32 *stage_win32); |
| 86 |
|
| 87 |
G_END_DECLS |
| 88 |
|
| 89 |
#endif /* __CLUTTER_STAGE_H__ */ |