2008-10-23 Alejandro Pinheiro <apinheiro@igalia.com>
authorAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 23 Oct 2008 12:09:35 +0000 (12:09 +0000)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 23 Oct 2008 12:09:35 +0000 (12:09 +0000)
* debian/control: Added new package libhildon1-examples, in order to pack
the current hildon examples as documentation
* debian/rules: Not to compress .c files, modify some includes on the
examples (as normally are compiled locally, but when installed it will
require to include the installed libhildon1 library), and rename
Makefile.static
* examples/Makefile.am: Added examplesdir and examples_DATA, in order to
install all the example files on the new example package
* examples/Makefile.static: Added static makefile that can be used to
compile the examples, once installed the new example package
* examples: Most of the examples were modified in order to grant that
all use only '#include "hildon.h"', in order to be easy to prepare
it on the example package

26 files changed:
ChangeLog
debian/control
debian/libhildon1-examples.install [new file with mode: 0644]
debian/rules
examples/Makefile.am
examples/Makefile.static [new file with mode: 0644]
examples/hildon-app-menu-example.c
examples/hildon-bread-crumb-trail-example.c
examples/hildon-button-example.c
examples/hildon-check-button-example.c
examples/hildon-date-button-example.c
examples/hildon-edit-toolbar-example.c
examples/hildon-entry-example.c
examples/hildon-pannable-area-example-2.c
examples/hildon-pannable-area-example-3.c
examples/hildon-pannable-area-example-4.c
examples/hildon-pannable-area-example.c
examples/hildon-pannable-area-touch-grid-example.c
examples/hildon-pannable-area-touch-list-example.c
examples/hildon-picker-button-example.c
examples/hildon-picker-button-multicolumn-example.c
examples/hildon-text-view-example.c
examples/hildon-time-button-example.c
examples/hildon-touch-selector-entry-example.c
examples/hildon-touch-selector-example.c
examples/hildon-touch-selector-multi-cells-example.c

index ae51000..c964b50 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2008-10-23  Alejandro Pinheiro  <apinheiro@igalia.com>
+
+       * debian/control: Added new package libhildon1-examples, in order to pack
+       the current hildon examples as documentation
+       * debian/rules: Not to compress .c files, modify some includes on the
+       examples (as normally are compiled locally, but when installed it will
+       require to include the installed libhildon1 library), and rename
+       Makefile.static
+       * examples/Makefile.am: Added examplesdir and examples_DATA, in order to
+       install all the example files on the new example package
+       * examples/Makefile.static: Added static makefile that can be used to
+       compile the examples, once installed the new example package
+       * examples: Most of the examples were modified in order to grant that
+       all use only '#include "hildon.h"', in order to be easy to prepare
+       it on the example package
+
 2008-10-23  Alberto Garcia  <agarcia@igalia.com>
 
        * debian/control
index 0dfce7e..29065cf 100644 (file)
@@ -23,7 +23,14 @@ Architecture: any
 Depends: libhildon1 (= ${binary:Version})
 Description: Debug symbols for hildon libraries
 
+Package: libhildon1-examples
+Section: doc
+Architecture: all
+Depends: libhildon1 (= ${binary:Version})
+Description: Examples source file for hildon libraries
+
 Package: libhildon1-doc
 Section: doc
 Architecture: all
 Description: Hildon libraries documentation
+
diff --git a/debian/libhildon1-examples.install b/debian/libhildon1-examples.install
new file mode 100644 (file)
index 0000000..dbbcdb4
--- /dev/null
@@ -0,0 +1,2 @@
+debian/tmp/usr/share/doc/libhildon1/examples
+
index a21ac86..a351d61 100755 (executable)
@@ -6,6 +6,7 @@ include /usr/share/cdbs/1/rules/utils.mk
 
 DEB_CONFIGURE_SCRIPT_ENV += LDFLAGS="-Wl,-O1 -Wl,--as-needed" PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig
 DEB_CONFIGURE_EXTRA_FLAGS := --enable-gtk-doc
+DEB_COMPRESS_EXCLUDE := .c
 
 SOURCE_DIR=$(CURDIR)
 
@@ -13,3 +14,7 @@ config.status: $(SOURCE_DIR)/configure
 
 $(SOURCE_DIR)/configure:
        AUTOGEN_SUBDIR_MODE=1 NOCONFIGURE=yes $(SOURCE_DIR)/autogen.sh
+
+common-binary-indep::
+       sed -i 's_"hildon.h"_<hildon/hildon.h>_' $(DEB_DESTDIR)/usr/share/doc/libhildon1/examples/*.c
+       mv $(DEB_DESTDIR)/usr/share/doc/libhildon1/examples/Makefile.static $(DEB_DESTDIR)/usr/share/doc/libhildon1/examples/Makefile
index 06f84da..98420ae 100644 (file)
@@ -363,3 +363,66 @@ hildon_touch_selector_entry_example_CFLAGS = $(HILDON_OBJ_CFLAGS)
 hildon_touch_selector_entry_example_SOURCES    = hildon-touch-selector-entry-example.c
 
 endif
+
+examplesdir                             = $(datadir)/doc/libhildon1/examples
+examples_DATA                          = Makefile.static                               \
+                                         hildon-window-example.c                       \
+                                         hildon-banner-example.c                       \
+                                         hildon-banner-long-example.c                  \
+                                         hildon-caption-example.c                      \
+                                         hildon-weekday-picker-example.c               \
+                                         hildon-sort-dialog-example.c                  \
+                                         hildon-controlbar-example.c                   \
+                                         hildon-note-example.c                         \
+                                         hildon-time-picker-example.c                  \
+                                         hildon-color-chooser-example.c                \
+                                         hildon-color-button-example.c                 \
+                                         hildon-login-dialog-example.c                 \
+                                         hildon-time-editor-example.c                  \
+                                         hildon-icon-sizes-example.c                   \
+                                         hildon-insensitive-example.c                  \
+                                         hildon-get-password-dialog-example.c          \
+                                         hildon-set-password-dialog-example.c          \
+                                         hildon-window-menu-example.c                  \
+                                         hildon-window-cmn-menu-example.c              \
+                                         hildon-vvolumebar-example.c                   \
+                                         hildon-toolbar-example.c                      \
+                                         hildon-code-dialog-example.c                  \
+                                         hildon-hvolumebar-example.c                   \
+                                         hildon-hvolumebar-insensitive-example.c       \
+                                         hildon-hvolumebar-insensitive-map-example.c   \
+                                         hildon-lookup-example.c                       \
+                                         hildon-number-editor-example.c                \
+                                         hildon-scrolled-window-example.c              \
+                                         hildon-color-pop-example.c                    \
+                                         hildon-thumb-scrollbar-example.c              \
+                                         hildon-date-editor-example.c                  \
+                                         hildon-bread-crumb-trail-example.c            \
+                                         hildon-finger-example.c                       \
+                                         hildon-seekbar-example.c                      \
+                                         hildon-find-toolbar-example.c                 \
+                                         hildon-edit-toolbar-example.c                 \
+                                         hildon-wizard-dialog-example.c                \
+                                         hildon-hvolumebar-timer-example.c             \
+                                         hildon-toolbar-seekbar-example.c              \
+                                         hildon-pannable-area-example.c                \
+                                         hildon-pannable-area-example-2.c              \
+                                         hildon-pannable-area-example-3.c              \
+                                         hildon-pannable-area-example-4.c              \
+                                         hildon-pannable-area-touch-list-example.c     \
+                                         hildon-pannable-area-touch-grid-example.c     \
+                                         hildon-logical-color-example.c                \
+                                         hildon-app-menu-example.c                     \
+                                         hildon-stackable-window-example.c             \
+                                         hildon-entry-example.c                        \
+                                         hildon-text-view-example.c                    \
+                                         hildon-button-example.c                       \
+                                         hildon-dialog-example.c                       \
+                                         hildon-date-button-example.c                  \
+                                         hildon-picker-button-example.c                \
+                                         hildon-picker-button-multicolumn-example.c    \
+                                         hildon-time-button-example.c                  \
+                                         hildon-check-button-example.c                 \
+                                         hildon-touch-selector-example.c               \
+                                         hildon-touch-selector-multi-cells-example.c   \
+                                         hildon-touch-selector-entry-example.c
diff --git a/examples/Makefile.static b/examples/Makefile.static
new file mode 100644 (file)
index 0000000..bfb5092
--- /dev/null
@@ -0,0 +1,16 @@
+CC=gcc
+CFLAGS=-O0 -g -Wall -I/usr/include -I/usr/X11R6/include `pkg-config --cflags glib-2.0 gconf-2.0 gthread-2.0 hildon-1`
+LDFLAGS=-pthread -L/usr/X11R6/lib -lm `pkg-config --libs glib-2.0 gthread-2.0 hildon-1`
+
+EXAMPLES = $(patsubst %.c,%,$(wildcard *.c))
+
+all: $(EXAMPLES)
+
+
+%:%.c
+       gcc $(LDFLAGS) $(CFLAGS) -o $@ $<
+
+
+clean:
+       rm -f *example
+
index 5ac07de..57b0923 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include                                        <gtk/gtk.h>
-#include                                        <hildon.h>
+#include                                        "hildon.h"
 
 static void
 menu_button_clicked                             (GtkButton *button,
index a6345c4..b7483ed 100644 (file)
  *
  */
 
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
+#include                                        <sys/types.h>
+#include                                        <sys/stat.h>
+#include                                        <unistd.h>
 
-#include "hildon.h"
+#include                                        "hildon.h"
 
 GtkWidget *treeview;
 gchar *current_root;
index ea9a394..740b1a8 100644 (file)
@@ -23,8 +23,7 @@
  */
 
 #include                                        <gtk/gtk.h>
-#include                                        <hildon-button.h>
-#include                                        <hildon-stackable-window.h>
+#include                                        "hildon.h"
 
 static GtkWidget *horizontal_layout;
 static GtkWidget *images;
index 5bff1a0..e0a1013 100644 (file)
@@ -20,7 +20,7 @@
  *
  */
 
-#include                                        <hildon-check-button.h>
+#include                                        "hildon.h"
 
 static void
 button_toggled_cb                               (HildonCheckButton *button,
index 32815ed..18b508d 100644 (file)
@@ -1,11 +1,28 @@
-#include <glib.h>
-#include <gtk/gtk.h>
-
-#include "hildon-program.h"
-#include "hildon-stackable-window.h"
-
-#include "hildon-picker-button.h"
-#include "hildon-date-button.h"
+/*
+ * This file is a part of hildon examples
+ *
+ * Copyright (C) 2005, 2008 Nokia Corporation, all rights reserved.
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+#include                                        <glib.h>
+#include                                        <gtk/gtk.h>
+#include                                        "hildon.h"
 
 static void
 on_picker_value_changed (HildonPickerButton * button, gpointer data)
index 58e6886..920fdeb 100644 (file)
@@ -20,8 +20,8 @@
  *
  */
 
-#include <gtk/gtk.h>
-#include <hildon.h>
+#include                                        <gtk/gtk.h>
+#include                                        "hildon.h"
 
 typedef enum
 {
index 80205bb..13549f0 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 #include                                        <gtk/gtk.h>
-#include                                        <hildon.h>
+#include                                        "hildon.h"
 
 HildonEntry *mainentry;
 
index 496994a..4e6723a 100644 (file)
  *
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <glib.h>
-#include <gtk/gtk.h>
-#include <string.h>
-#include "hildon.h"
+#include                                        <stdio.h>
+#include                                        <stdlib.h>
+#include                                        <glib.h>
+#include                                        <gtk/gtk.h>
+#include                                        <string.h>
+#include                                        "hildon.h"
 
 enum { PIXBUF_COLUMN, TEXT_COLUMN, N_COLUMNS };
 
index cf2158b..2b64980 100644 (file)
  *
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <glib.h>
-#include <gtk/gtk.h>
-#include "hildon.h"
+#include                                        <stdio.h>
+#include                                        <stdlib.h>
+#include                                        <glib.h>
+#include                                        <gtk/gtk.h>
+#include                                        "hildon.h"
 
 GtkWidget *btn;
 
index 756309c..75fc852 100644 (file)
  *
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <glib.h>
-#include <gtk/gtk.h>
-#include "hildon.h"
+#include                                        <stdio.h>
+#include                                        <stdlib.h>
+#include                                        <glib.h>
+#include                                        <gtk/gtk.h>
+#include                                        "hildon.h"
 
 enum { TEXT_COLUMN, OPTIONAL_COLUMN, N_COLUMNS };
 
index fe3150e..008a740 100644 (file)
  *
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <glib.h>
-#include <gtk/gtk.h>
-#include "hildon.h"
+#include                                        <stdio.h>
+#include                                        <stdlib.h>
+#include                                        <glib.h>
+#include                                        <gtk/gtk.h>
+#include                                        "hildon.h"
 
 enum { TEXT_COLUMN, N_COLUMNS };
 
index 4568db5..7acacfc 100644 (file)
@@ -24,8 +24,8 @@
  *
  */
 
-#include <gtk/gtk.h>
-#include <hildon.h>
+#include                                        <gtk/gtk.h>
+#include                                        "hildon.h"
 
 enum
 {
index 901cab1..89c314d 100644 (file)
@@ -24,8 +24,8 @@
  *
  */
 
-#include <gtk/gtk.h>
-#include <hildon.h>
+#include                                        <gtk/gtk.h>
+#include                                        "hildon.h"
 
 enum
 {
index 616e28e..7f99d2a 100644 (file)
  *
  */
 
-#include <glib.h>
-#include <gtk/gtk.h>
-
-#include "hildon-program.h"
-#include "hildon-stackable-window.h"
-
-#include "hildon-picker-button.h"
-#include "hildon-touch-selector.h"
+#include                                        <glib.h>
+#include                                        <gtk/gtk.h>
+#include                                        "hildon.h"
 
 static void
 on_picker_value_changed (HildonPickerButton * button, gpointer data)
index 4fa2d33..bdc87eb 100644 (file)
  *
  */
 
-#include <glib.h>
-#include <gtk/gtk.h>
-
-#include "hildon-program.h"
-#include "hildon-stackable-window.h"
-
-#include "hildon-picker-button.h"
+#include                                        <glib.h>
+#include                                        <gtk/gtk.h>
+#include                                        "hildon.h"
 
 static GtkWidget *
 create_touch_selector (void)
index 2bf7e1d..9b81bc6 100644 (file)
@@ -20,7 +20,7 @@
  *
  */
 
-#include                                        <hildon.h>
+#include                                        "hildon.h"
 
 HildonTextView *textview;
 GtkTextBuffer *buffer;
index d5a4cb7..10d4bfe 100644 (file)
@@ -1,11 +1,6 @@
-#include <glib.h>
-#include <gtk/gtk.h>
-
-#include "hildon-program.h"
-#include "hildon-stackable-window.h"
-
-#include "hildon-picker-button.h"
-#include "hildon-time-button.h"
+#include                                        <glib.h>
+#include                                        <gtk/gtk.h>
+#include                                        "hildon.h"
 
 static void
 on_picker_value_changed (HildonPickerButton * button, gpointer data)
index fd71ad6..06619e6 100644 (file)
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <glib.h>
-#include <gtk/gtk.h>
+#include                                        <glib.h>
+#include                                        <gtk/gtk.h>
 
-#include "hildon.h"
+#include                                        "hildon.h"
 
 static const gchar* artists [] = {
   "AC/DC",
index a1be5cd..54e1f51 100644 (file)
  *
  */
 
-#include <glib.h>
-#include <gtk/gtk.h>
-
-#include "hildon-program.h"
-#include "hildon-stackable-window.h"
-
-#include "hildon-touch-selector.h"
-#include "hildon-picker-dialog.h"
-#include "hildon-picker-button.h"
+#include                                        <glib.h>
+#include                                        <gtk/gtk.h>
+#include                                        "hildon.h"
 
 static GtkWidget *create_selector ();
 static GtkWidget *get_visible_content (GtkWidget * window);
index 30fa2fe..341a2e7 100644 (file)
  *
  */
 
-#include <glib.h>
-#include <gtk/gtk.h>
-
-#include "hildon-program.h"
-#include "hildon-stackable-window.h"
-
-#include "hildon-touch-selector.h"
-#include "hildon-picker-dialog.h"
-#include "hildon-picker-button.h"
+#include                                        <glib.h>
+#include                                        <gtk/gtk.h>
+#include                                        "hildon.h"
 
 static GtkWidget *create_selector ();
 static GtkWidget *get_visible_content (GtkWidget * window);