[mutter] Make work_area calculation funcs public and introspectible



commit d8058138ab4075d6879607705035f6727a8a393d
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sun Jan 27 23:08:17 2013 -0500

    Make work_area calculation funcs public and introspectible
    
    https://bugzilla.gnome.org/show_bug.cgi?id=692679

 src/core/window-private.h    |    8 --------
 src/core/window.c            |   23 +++++++++++++++++++++++
 src/core/workspace-private.h |    8 --------
 src/core/workspace.c         |    9 +++++++++
 src/meta/window.h            |    8 ++++++++
 src/meta/workspace.h         |    3 +++
 6 files changed, 43 insertions(+), 16 deletions(-)
---
diff --git a/src/core/window-private.h b/src/core/window-private.h
index f4f94b8..becfef5 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -607,14 +607,6 @@ void meta_window_handle_mouse_grab_op_event (MetaWindow *window,
 
 GList* meta_window_get_workspaces (MetaWindow *window);
 
-void meta_window_get_work_area_current_monitor (MetaWindow    *window,
-                                                MetaRectangle *area);
-void meta_window_get_work_area_for_monitor     (MetaWindow    *window,
-                                                int            which_monitor,
-                                                MetaRectangle *area);
-void meta_window_get_work_area_all_monitors    (MetaWindow    *window,
-                                                MetaRectangle *area);
-
 void meta_window_get_current_tile_area         (MetaWindow    *window,
                                                 MetaRectangle *tile_area);
 
diff --git a/src/core/window.c b/src/core/window.c
index 9820d8d..e5023e4 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -9482,6 +9482,13 @@ get_work_area_monitor (MetaWindow    *window,
               area->x, area->y, area->width, area->height);
 }
 
+/**
+ * meta_window_get_work_area_current_monitor:
+ * @window: a #MetaWindow
+ * @area: (out): a location to store the work area
+ *
+ * Get the work area for the monitor @window is currently on.
+ */
 void
 meta_window_get_work_area_current_monitor (MetaWindow    *window,
                                            MetaRectangle *area)
@@ -9495,6 +9502,15 @@ meta_window_get_work_area_current_monitor (MetaWindow    *window,
                                          area);
 }
 
+/**
+ * meta_window_get_work_area_for_monitor:
+ * @window: a #MetaWindow
+ * @which_monitor: a moniotr to get the work area for
+ * @area: (out): a location to store the work area
+ *
+ * Get the work area for @window, given the monitor index
+ * @which_monitor.
+ */
 void
 meta_window_get_work_area_for_monitor (MetaWindow    *window,
                                        int            which_monitor,
@@ -9507,6 +9523,13 @@ meta_window_get_work_area_for_monitor (MetaWindow    *window,
                          which_monitor);
 }
 
+/**
+ * meta_window_get_work_area_all_monitors:
+ * @window: a #MetaWindow
+ * @area: (out): a location to store the work area
+ *
+ * Get the work area for all monitors for @window.
+ */
 void
 meta_window_get_work_area_all_monitors (MetaWindow    *window,
                                         MetaRectangle *area)
diff --git a/src/core/workspace-private.h b/src/core/workspace-private.h
index 78c900b..4e94fa0 100644
--- a/src/core/workspace-private.h
+++ b/src/core/workspace-private.h
@@ -86,10 +86,6 @@ void           meta_workspace_relocate_windows (MetaWorkspace *workspace,
 
 void meta_workspace_invalidate_work_area (MetaWorkspace *workspace);
 
-
-void meta_workspace_get_work_area_for_monitor   (MetaWorkspace *workspace,
-                                                 int            which_monitor,
-                                                 MetaRectangle *area);
 GList* meta_workspace_get_onscreen_region       (MetaWorkspace *workspace);
 GList* meta_workspace_get_onmonitor_region      (MetaWorkspace *workspace,
                                                  int            which_monitor);
@@ -101,7 +97,3 @@ void meta_workspace_focus_default_window (MetaWorkspace *workspace,
 const char* meta_workspace_get_name (MetaWorkspace *workspace);
 
 #endif
-
-
-
-
diff --git a/src/core/workspace.c b/src/core/workspace.c
index 62a04d2..0e2d1bb 100644
--- a/src/core/workspace.c
+++ b/src/core/workspace.c
@@ -1043,6 +1043,15 @@ meta_workspace_set_builtin_struts (MetaWorkspace *workspace,
   meta_workspace_invalidate_work_area (workspace);
 }
 
+/**
+ * meta_workspace_get_work_area_for_monitor:
+ * @workspace: a #MetaWorkspace
+ * @which_monitor: a monitor index
+ * @area: (out): location to store the work area
+ *
+ * Stores the work area for @which_monitor on @workspace
+ * in @area.
+ */
 void
 meta_workspace_get_work_area_for_monitor (MetaWorkspace *workspace,
                                           int            which_monitor,
diff --git a/src/meta/window.h b/src/meta/window.h
index d968ecc..87368c0 100644
--- a/src/meta/window.h
+++ b/src/meta/window.h
@@ -197,6 +197,14 @@ void        meta_window_focus              (MetaWindow  *window,
 void        meta_window_check_alive        (MetaWindow  *window,
                                             guint32      timestamp);
 
+void meta_window_get_work_area_current_monitor (MetaWindow    *window,
+                                                MetaRectangle *area);
+void meta_window_get_work_area_for_monitor     (MetaWindow    *window,
+                                                int            which_monitor,
+                                                MetaRectangle *area);
+void meta_window_get_work_area_all_monitors    (MetaWindow    *window,
+                                                MetaRectangle *area);
+
 void meta_window_begin_grab_op (MetaWindow *window,
                                 MetaGrabOp  op,
                                 gboolean    frame_action,
diff --git a/src/meta/workspace.h b/src/meta/workspace.h
index 5dac43e..66efe0f 100644
--- a/src/meta/workspace.h
+++ b/src/meta/workspace.h
@@ -52,6 +52,9 @@ GType meta_workspace_get_type (void);
 int  meta_workspace_index (MetaWorkspace *workspace);
 MetaScreen *meta_workspace_get_screen (MetaWorkspace *workspace);
 GList* meta_workspace_list_windows (MetaWorkspace *workspace);
+void meta_workspace_get_work_area_for_monitor (MetaWorkspace *workspace,
+                                               int            which_monitor,
+                                               MetaRectangle *area);
 void meta_workspace_get_work_area_all_monitors (MetaWorkspace *workspace,
                                                 MetaRectangle *area);
 void meta_workspace_activate (MetaWorkspace *workspace, guint32 timestamp);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]