From e6e6aecb93f2d89e02819c5dc91d39c06ecfe930 Mon Sep 17 00:00:00 2001 From: Tomas Frydrych Date: Mon, 18 Aug 2008 15:42:38 +0100 Subject: [PATCH] Exposed MetaWindowType so it can be used by compositor backends. meta_window_get_type: meta_window_get_type_atom: Accessors for window type/type atom. --- src/core/window-private.h | 13 ------------- src/core/window.c | 12 ++++++++++++ src/include/window.h | 15 +++++++++++++++ 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/src/core/window-private.h b/src/core/window-private.h index bfe950a8a..946db5b5c 100644 --- a/src/core/window-private.h +++ b/src/core/window-private.h @@ -42,19 +42,6 @@ typedef struct _MetaWindowQueue MetaWindowQueue; typedef gboolean (*MetaWindowForeachFunc) (MetaWindow *window, void *data); -typedef enum -{ - META_WINDOW_NORMAL, - META_WINDOW_DESKTOP, - META_WINDOW_DOCK, - META_WINDOW_DIALOG, - META_WINDOW_MODAL_DIALOG, - META_WINDOW_TOOLBAR, - META_WINDOW_MENU, - META_WINDOW_UTILITY, - META_WINDOW_SPLASHSCREEN -} MetaWindowType; - typedef enum { META_MAXIMIZE_HORIZONTAL = 1 << 0, diff --git a/src/core/window.c b/src/core/window.c index b9fb10607..70d0a9237 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -8156,3 +8156,15 @@ meta_window_get_xwindow (MetaWindow *window) { return window->xwindow; } + +MetaWindowType +meta_window_get_type (MetaWindow *window) +{ + return window->type; +} + +Atom +meta_window_get_type_atom (MetaWindow *window) +{ + return window->type_atom; +} diff --git a/src/include/window.h b/src/include/window.h index 8a3386602..7a880df4d 100644 --- a/src/include/window.h +++ b/src/include/window.h @@ -28,6 +28,19 @@ #include "boxes.h" #include "types.h" +typedef enum +{ + META_WINDOW_NORMAL, + META_WINDOW_DESKTOP, + META_WINDOW_DOCK, + META_WINDOW_DIALOG, + META_WINDOW_MODAL_DIALOG, + META_WINDOW_TOOLBAR, + META_WINDOW_MENU, + META_WINDOW_UTILITY, + META_WINDOW_SPLASHSCREEN, +} MetaWindowType; + MetaFrame *meta_window_get_frame (MetaWindow *window); gboolean meta_window_has_focus (MetaWindow *window); gboolean meta_window_is_shaded (MetaWindow *window); @@ -35,5 +48,7 @@ MetaRectangle *meta_window_get_rect (MetaWindow *window); MetaScreen *meta_window_get_screen (MetaWindow *window); MetaDisplay *meta_window_get_display (MetaWindow *window); Window meta_window_get_xwindow (MetaWindow *window); +MetaWindowType meta_window_get_type (MetaWindow *window); +Atom meta_window_get_type_atom (MetaWindow *window); #endif