2008-05-18 20:00:09 -04:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (C) 2008 Iain Holmes
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
* 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef META_WINDOW_H
|
|
|
|
#define META_WINDOW_H
|
|
|
|
|
2008-11-07 04:57:00 -05:00
|
|
|
#include <glib-object.h>
|
2008-05-18 20:00:09 -04:00
|
|
|
#include <X11/Xlib.h>
|
|
|
|
|
|
|
|
#include "boxes.h"
|
|
|
|
#include "types.h"
|
|
|
|
|
2008-08-18 10:42:38 -04:00
|
|
|
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,
|
2008-11-23 14:28:40 -05:00
|
|
|
|
|
|
|
/* override redirect window types: */
|
|
|
|
META_WINDOW_DROPDOWN_MENU,
|
|
|
|
META_WINDOW_POPUP_MENU,
|
|
|
|
META_WINDOW_TOOLTIP,
|
|
|
|
META_WINDOW_NOTIFICATION,
|
|
|
|
META_WINDOW_COMBO,
|
|
|
|
META_WINDOW_DND,
|
|
|
|
META_WINDOW_OVERRIDE_OTHER
|
2008-08-18 10:42:38 -04:00
|
|
|
} MetaWindowType;
|
|
|
|
|
2008-09-18 11:09:11 -04:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
META_MAXIMIZE_HORIZONTAL = 1 << 0,
|
|
|
|
META_MAXIMIZE_VERTICAL = 1 << 1
|
|
|
|
} MetaMaximizeFlags;
|
|
|
|
|
2008-11-07 04:57:00 -05:00
|
|
|
#define META_TYPE_WINDOW (meta_window_get_type ())
|
|
|
|
#define META_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_WINDOW, MetaWindow))
|
|
|
|
#define META_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_WINDOW, MetaWindowClass))
|
2009-06-10 00:43:43 -04:00
|
|
|
#define META_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_WINDOW))
|
2008-11-07 04:57:00 -05:00
|
|
|
#define META_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_WINDOW))
|
|
|
|
#define META_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_WINDOW, MetaWindowClass))
|
|
|
|
|
|
|
|
typedef struct _MetaWindowClass MetaWindowClass;
|
|
|
|
|
|
|
|
GType meta_window_get_type (void);
|
|
|
|
|
2008-05-18 20:00:09 -04:00
|
|
|
MetaFrame *meta_window_get_frame (MetaWindow *window);
|
|
|
|
gboolean meta_window_has_focus (MetaWindow *window);
|
|
|
|
gboolean meta_window_is_shaded (MetaWindow *window);
|
2009-08-14 05:42:56 -04:00
|
|
|
gboolean meta_window_is_override_redirect (MetaWindow *window);
|
2009-08-28 12:39:55 -04:00
|
|
|
gboolean meta_window_is_skip_taskbar (MetaWindow *window);
|
2008-05-18 20:00:09 -04:00
|
|
|
MetaRectangle *meta_window_get_rect (MetaWindow *window);
|
2009-03-17 04:35:17 -04:00
|
|
|
void meta_window_get_outer_rect (const MetaWindow *window, MetaRectangle *rect);
|
2008-05-18 20:00:09 -04:00
|
|
|
MetaScreen *meta_window_get_screen (MetaWindow *window);
|
|
|
|
MetaDisplay *meta_window_get_display (MetaWindow *window);
|
|
|
|
Window meta_window_get_xwindow (MetaWindow *window);
|
2008-11-07 04:57:00 -05:00
|
|
|
MetaWindowType meta_window_get_window_type (MetaWindow *window);
|
|
|
|
Atom meta_window_get_window_type_atom (MetaWindow *window);
|
2008-09-18 11:09:11 -04:00
|
|
|
MetaWorkspace *meta_window_get_workspace (MetaWindow *window);
|
|
|
|
gboolean meta_window_is_on_all_workspaces (MetaWindow *window);
|
2008-10-24 05:07:24 -04:00
|
|
|
gboolean meta_window_is_hidden (MetaWindow *window);
|
|
|
|
void meta_window_activate (MetaWindow *window,guint32 current_time);
|
|
|
|
void meta_window_activate_with_workspace (MetaWindow *window,
|
|
|
|
guint32 current_time,
|
|
|
|
MetaWorkspace *workspace);
|
2008-10-30 04:30:42 -04:00
|
|
|
const char * meta_window_get_description (MetaWindow *window);
|
2009-05-29 13:26:18 -04:00
|
|
|
const char * meta_window_get_wm_class (MetaWindow *window);
|
2008-11-03 09:45:28 -05:00
|
|
|
/* Return whether the window would be showing if we were on its workspace */
|
|
|
|
gboolean meta_window_showing_on_its_workspace (MetaWindow *window);
|
|
|
|
|
2008-11-19 07:30:45 -05:00
|
|
|
const char* meta_window_get_startup_id (MetaWindow *window);
|
2008-11-20 04:14:58 -05:00
|
|
|
void meta_window_change_workspace_by_index (MetaWindow *window,
|
|
|
|
gint space_index,
|
2008-11-25 10:34:07 -05:00
|
|
|
gboolean append,
|
|
|
|
guint32 timestamp);
|
2009-02-02 15:16:05 -05:00
|
|
|
GObject *meta_window_get_compositor_private (MetaWindow *window);
|
|
|
|
void meta_window_set_compositor_private (MetaWindow *window, GObject *priv);
|
2008-11-23 14:28:40 -05:00
|
|
|
void meta_window_configure_notify (MetaWindow *window, XConfigureEvent *event);
|
2009-01-12 07:30:31 -05:00
|
|
|
const char *meta_window_get_role (MetaWindow *window);
|
2009-03-12 17:07:27 -04:00
|
|
|
MetaStackLayer meta_window_get_layer (MetaWindow *window);
|
2009-03-19 12:01:32 -04:00
|
|
|
MetaWindow* meta_window_find_root_ancestor (MetaWindow *window);
|
2009-08-04 03:32:36 -04:00
|
|
|
gboolean meta_window_is_ancestor_of_transient (MetaWindow *window,
|
|
|
|
MetaWindow *transient);
|
2009-08-14 06:18:28 -04:00
|
|
|
gboolean meta_window_is_mapped (MetaWindow *window);
|
|
|
|
gboolean meta_window_toplevel_is_mapped (MetaWindow *window);
|
2009-03-31 17:29:48 -04:00
|
|
|
gboolean meta_window_get_icon_geometry (MetaWindow *window,
|
|
|
|
MetaRectangle *rect);
|
2009-04-27 08:21:39 -04:00
|
|
|
void meta_window_maximize (MetaWindow *window,
|
|
|
|
MetaMaximizeFlags directions);
|
|
|
|
void meta_window_unmaximize (MetaWindow *window,
|
|
|
|
MetaMaximizeFlags directions);
|
2009-06-10 00:14:19 -04:00
|
|
|
void meta_window_minimize (MetaWindow *window);
|
|
|
|
void meta_window_unminimize (MetaWindow *window);
|
2009-06-09 23:02:14 -04:00
|
|
|
const char *meta_window_get_title (MetaWindow *window);
|
2009-06-09 23:28:21 -04:00
|
|
|
MetaWindow *meta_window_get_transient_for (MetaWindow *window);
|
2009-06-18 05:08:34 -04:00
|
|
|
void meta_window_delete (MetaWindow *window,
|
|
|
|
guint32 timestamp);
|
2009-09-18 20:50:11 -04:00
|
|
|
guint meta_window_get_stable_sequence (MetaWindow *window);
|
2009-08-30 20:04:48 -04:00
|
|
|
guint32 meta_window_get_user_time (MetaWindow *window);
|
2009-07-31 13:52:25 -04:00
|
|
|
int meta_window_get_pid (MetaWindow *window);
|
|
|
|
const char *meta_window_get_client_machine (MetaWindow *window);
|
2009-08-06 13:11:11 -04:00
|
|
|
gboolean meta_window_is_modal (MetaWindow *window);
|
2008-05-18 20:00:09 -04:00
|
|
|
#endif
|