diff console/libgnt/gntwm.h @ 14390:d4a26ada1971

[gaim-migrate @ 17096] Give a bit more control to the window-manager about the size/position of a window. Also, give the WM an opportunity to do its thing when the window changes something (eg. title, 'urgency'). committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 31 Aug 2006 06:39:20 +0000
parents 665b814f8fd7
children 553bbd68387e
line wrap: on
line diff
--- a/console/libgnt/gntwm.h	Thu Aug 31 05:58:32 2006 +0000
+++ b/console/libgnt/gntwm.h	Thu Aug 31 06:39:20 2006 +0000
@@ -6,6 +6,8 @@
 
 #include "gntwidget.h"
 
+/* XXX: It might be a good idea to move GntNode from gntmain.c to here. */
+
 typedef struct _GntWM GntWM;
 
 struct _GntWM
@@ -16,10 +18,24 @@
 	/* This is called when a window is being closed */
 	gboolean (*close_window)(GntWidget *win);
 
+	/* The WM may want to confirm a size for a window first */
+	gboolean (*window_resize_confirm)(GntWidget *win, int *w, int *h);
+
 	/* Can del_panel the old panel and return a new_panel.
 	 * Otherwise, this should at least do a replace_panel. */
 	PANEL *(*window_resized)(PANEL *pan, GntWidget *win);
 
+	/* The WM may want to confirm the position of a window */
+	gboolean (*window_move_confirm)(GntWidget *win, int *x, int *y);
+
+	void (*window_moved)(PANEL *pan, GntWidget *win);
+
+	/* This gets called when:
+	 * 	 - the title of the window changes
+	 * 	 - the 'urgency' of the window changes
+	 */
+	void (*window_update)(PANEL *pan, GntWidget *win);
+
 	/* This should usually return NULL if the keys were processed by the WM.
 	 * If not, the WM can simply return the original string, which will be
 	 * processed by the default WM. The custom WM can also return a different