[maemo-commits] [maemo-commits] r18054 - projects/haf/trunk/maemo-launcher/client

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Apr 14 13:19:07 EEST 2009
Author: makarhun
Date: 2009-04-14 13:19:07 +0300 (Tue, 14 Apr 2009)
New Revision: 18054

Added:
   projects/haf/trunk/maemo-launcher/client/app-console.c
   projects/haf/trunk/maemo-launcher/client/app-hildon.c
   projects/haf/trunk/maemo-launcher/client/app.Version
Modified:
   projects/haf/trunk/maemo-launcher/client/Makefile.am
Log:
0.34 update

Modified: projects/haf/trunk/maemo-launcher/client/Makefile.am
===================================================================
--- projects/haf/trunk/maemo-launcher/client/Makefile.am	2009-04-14 10:08:31 UTC (rev 18053)
+++ projects/haf/trunk/maemo-launcher/client/Makefile.am	2009-04-14 10:19:07 UTC (rev 18054)
@@ -1,19 +1,24 @@
 ## Process this file with automake to produce Makefile.in
-#
-# $Id$
-#
 
-bin_PROGRAMS = maemo-client
+version_script = app.Version
 
-sources = client.c
-version_script = client.Version
-
 EXTRA_DIST = $(version_script)
 
-maemo_client_SOURCES = $(sources)
-maemo_client_CPPFLAGS = $(CLIENT_CFLAGS) $(PIC)
-maemo_client_LDFLAGS = \
-	-rdynamic -Wl,--version-script=$(version_script) \
+bin_PROGRAMS = app-console
+
+app_console_CPPFLAGS = $(PIC)
+app_console_LDFLAGS = \
+	-rdynamic -Wl,--version-script=$(srcdir)/$(version_script) \
 	-shared $(PIC)
-maemo_client_LDADD = $(CLIENT_LIBS)
 
+if BUILD_APP_HILDON
+bin_PROGRAMS += app-hildon
+
+app_hildon_SOURCES = app-hildon.c
+app_hildon_CPPFLAGS = $(APP_HILDON_CFLAGS) $(PIC)
+app_hildon_LDFLAGS = \
+	-rdynamic -Wl,--version-script=$(srcdir)/$(version_script) \
+	-shared $(PIC)
+app_hildon_LDADD = $(APP_HILDON_LIBS)
+endif
+

Added: projects/haf/trunk/maemo-launcher/client/app-console.c
===================================================================
--- projects/haf/trunk/maemo-launcher/client/app-console.c	2009-04-14 10:08:31 UTC (rev 18053)
+++ projects/haf/trunk/maemo-launcher/client/app-console.c	2009-04-14 10:19:07 UTC (rev 18054)
@@ -0,0 +1,35 @@
+/*
+ * Copyright © 2009 Nokia Corporation
+ *
+ * Author: Guillem Jover <guillem.jover at nokia.com>
+ *
+ * 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; version 2 of the License.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ *
+ */
+
+#include <stdio.h>
+#include <unistd.h>
+
+int
+main(int argc, char *argv[])
+{
+  puts("console app startup");
+
+  sleep(2);
+
+  puts("console app shutdown");
+
+  return 0;
+}
+

Added: projects/haf/trunk/maemo-launcher/client/app-hildon.c
===================================================================
--- projects/haf/trunk/maemo-launcher/client/app-hildon.c	2009-04-14 10:08:31 UTC (rev 18053)
+++ projects/haf/trunk/maemo-launcher/client/app-hildon.c	2009-04-14 10:19:07 UTC (rev 18054)
@@ -0,0 +1,70 @@
+/*
+ * Copyright © 2005, 2007, 2008, 2009 Nokia Corporation
+ *
+ * Author: Guillem Jover <guillem.jover at nokia.com>
+ *
+ * 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; version 2 of the License.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ *
+ */
+
+#include <gtk/gtk.h>
+#include <hildon/hildon-program.h>
+#include <hildon/hildon-window.h>
+
+void
+cleanup(void)
+{
+  g_print("called at exit time...\n");
+}
+
+int
+main(int argc, char *argv[])
+{
+  GTimer *timer;
+  HildonProgram *program;
+  HildonWindow *window;
+  int r;
+
+  timer = g_timer_new();
+
+  gtk_init(&argc, &argv);
+
+  g_print("gtk_init() took %f seconds\n", g_timer_elapsed(timer, NULL));
+
+  program = hildon_program_get_instance();
+  g_set_application_name("app-hildon");
+
+  window = HILDON_WINDOW(hildon_window_new());
+  hildon_program_add_window(program, window);
+
+  g_signal_connect(G_OBJECT(window), "destroy",
+                   G_CALLBACK(gtk_main_quit), NULL);
+
+  g_print("creating widgets took %f seconds\n", g_timer_elapsed(timer, NULL));
+
+  gtk_widget_show_all(GTK_WIDGET(window));
+  g_print("showing widgets took %f seconds\n", g_timer_elapsed(timer, NULL));
+
+  g_timer_destroy(timer);
+
+  g_print("installing exit function...\n");
+  r = atexit(cleanup);
+  if (r)
+    g_print("error while setting exit function (%d)\n", r);
+
+  gtk_main();
+
+  return 0;
+}
+

Added: projects/haf/trunk/maemo-launcher/client/app.Version
===================================================================
--- projects/haf/trunk/maemo-launcher/client/app.Version	2009-04-14 10:08:31 UTC (rev 18053)
+++ projects/haf/trunk/maemo-launcher/client/app.Version	2009-04-14 10:19:07 UTC (rev 18054)
@@ -0,0 +1,6 @@
+{
+  global:
+    main;
+  local:
+    *;
+};


More information about the maemo-commits mailing list