[maemo-commits] [maemo-commits] r9027 - in projects/haf/branches/maemo-af-desktop/hildon-desktop: . libhildonwm test
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Jan 10 16:04:33 EET 2007
- Previous message: [maemo-commits] r9026 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk
- Next message: [maemo-commits] r9028 - in projects/haf/branches/maemo-af-desktop/hildon-desktop: . src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: moimart
Date: 2007-01-10 16:04:31 +0200 (Wed, 10 Jan 2007)
New Revision: 9027
Added:
projects/haf/branches/maemo-af-desktop/hildon-desktop/test/test7.c
Modified:
projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-entry-info.h
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window-view.h
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window.h
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.h
Log:
* test/test7.c:
- Added test for closing applications nicely.
* libhildonwm/hd-wm-watched-window.h:
* libhildonwm/hd-wm-watched-window-view.h:
* libhildonwm/hd-entry-info.h :
- Fixed headers
* libhildonwm/hd-wm.[ch]:
- Added method for closing nicely applications.
* ChangeLog updated.
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog 2007-01-10 13:10:43 UTC (rev 9026)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog 2007-01-10 14:04:31 UTC (rev 9027)
@@ -1,3 +1,14 @@
+2007-01-10 Moises Martinez <moises.martinez at nokia.com>
+
+ * test/test7.c:
+ - Added test for closing applications nicely.
+ * libhildonwm/hd-wm-watched-window.h:
+ * libhildonwm/hd-wm-watched-window-view.h:
+ * libhildonwm/hd-entry-info.h :
+ - Fixed headers
+ * libhildonwm/hd-wm.[ch]:
+ - Added method for closing nicely applications.
+
2007-01-10 Johan Bilien <johan.bilien at nokia.com>
* libhildondesktop/hildon-home-applet.c: Fixed allocation in layout
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-entry-info.h
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-entry-info.h 2007-01-10 13:10:43 UTC (rev 9026)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-entry-info.h 2007-01-10 14:04:31 UTC (rev 9027)
@@ -27,7 +27,7 @@
#include <glib-object.h>
#include <gdk/gdkpixbuf.h>
-#include "hd-wm-types.h"
+#include <libhildonwm/hd-wm-types.h>
G_BEGIN_DECLS
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window-view.h
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window-view.h 2007-01-10 13:10:43 UTC (rev 9026)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window-view.h 2007-01-10 14:04:31 UTC (rev 9027)
@@ -28,7 +28,7 @@
#ifndef __HD_WM_WATCHED_WINDOW_VIEW_H__
#define __HD_WM_WATCHED_WINDOW_VIEW_H__
-#include "hd-wm.h"
+#include <libhildonwm/hd-wm.h>
HDWMWatchedWindowView*
hd_wm_watched_window_view_new (HDWMWatchedWindow *win,
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window.h
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window.h 2007-01-10 13:10:43 UTC (rev 9026)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window.h 2007-01-10 14:04:31 UTC (rev 9027)
@@ -30,9 +30,9 @@
#ifndef HAVE_HD_WM_WATCHED_WINDOW_H
#define HAVE_HD_WM_WATCHED_WINDOW_H
-#include "hd-wm.h"
-#include "hd-wm-util.h"
-#include "hd-wm-types.h"
+#include <libhildonwm/hd-wm.h>
+#include <libhildonwm/hd-wm-util.h>
+#include <libhildonwm/hd-wm-types.h>
/* For watched_window_sync(), should go in enum */
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c 2007-01-10 13:10:43 UTC (rev 9026)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c 2007-01-10 14:04:31 UTC (rev 9027)
@@ -1638,6 +1638,22 @@
}
void
+hd_wm_close_application (HDWM *hdwm, HDEntryInfo *entry_info)
+{
+ HDWMWatchedWindow *appwindow;
+
+ if (!entry_info)/* || entry_info->type != HD_ENTRY_WATCHED_WINDOW)*/
+ {
+ g_warning ("%s: Tried to close not an application",__FILE__);
+ return;
+ }
+
+ appwindow = hd_entry_info_get_window (entry_info);
+
+ hd_wm_watched_window_close (appwindow);
+}
+
+void
hd_wm_add_applications (HDWM *hdwm, HDEntryInfo *entry_info)
{
HDWMWatchableApp *app;
@@ -2624,12 +2640,6 @@
hdwmpriv->bg_kill_situation = b;
}
-HDAppSwitcher *
-hd_wm_get_app_switcher(void)
-{
- return NULL;
-}
-
gint
hd_wm_get_timer_id(void)
{
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.h
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.h 2007-01-10 13:10:43 UTC (rev 9026)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.h 2007-01-10 14:04:31 UTC (rev 9027)
@@ -244,6 +244,9 @@
hd_wm_get_applications (HDWM *hdwm);
void
+hd_wm_close_application (HDWM *hdwm, HDEntryInfo *entry_info);
+
+void
hd_wm_add_applications (HDWM *hdwm, HDEntryInfo *entry_info);
gboolean
@@ -279,9 +282,6 @@
extern inline void
hd_wm_set_bg_kill_situation(gboolean b);
-extern inline HDAppSwitcher *
-hd_wm_get_app_switcher(void);
-
extern inline gint
hd_wm_get_timer_id(void);
Added: projects/haf/branches/maemo-af-desktop/hildon-desktop/test/test7.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/test/test7.c 2007-01-10 13:10:43 UTC (rev 9026)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/test/test7.c 2007-01-10 14:04:31 UTC (rev 9027)
@@ -0,0 +1,40 @@
+#include <libhildonwm/hd-wm.h>
+
+gboolean
+button_press (gpointer data)
+{
+ HDWM *hdwm = (HDWM *)data;
+ GList *l = NULL;
+ GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_widget_show (GTK_WIDGET (window));
+
+ l = hd_wm_get_applications (hdwm);
+
+ g_debug ("%s: Reached %p",__FILE__,l);
+
+ for (l = hd_wm_get_applications (hdwm); l ; l = g_list_next (l))
+ {
+ g_debug ("%s: e: %p",__FILE__,l->data);
+ hd_wm_close_application (hdwm,(HDEntryInfo *)l->data);
+ }
+
+ return TRUE;
+}
+
+int
+main (int argc, char **argv)
+{
+ HDWM *hdwm;
+ GList *l = NULL;
+ gint i;
+
+ gtk_init (&argc,&argv);
+
+ hdwm = hd_wm_get_singleton ();
+
+ i = g_timeout_add (2000,(GSourceFunc)button_press,(gpointer)hdwm);
+
+ gtk_main ();
+
+ return 0;
+}
- Previous message: [maemo-commits] r9026 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk
- Next message: [maemo-commits] r9028 - in projects/haf/branches/maemo-af-desktop/hildon-desktop: . src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
