aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Piñeiro <apinheiro@igalia.com>2008-10-23 12:09:35 +0000
committerAlejandro Piñeiro <apinheiro@igalia.com>2008-10-23 12:09:35 +0000
commitcd3d22e6cde6c7f09d93b54623a36b5d9b97a065 (patch)
treed22eb88b5192f539a9a4888eb89006c65978b82a
parentd65d6e2bbb7e43c175cdf18d5d4d665ab226eac1 (diff)
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
-rw-r--r--ChangeLog16
-rw-r--r--debian/control7
-rw-r--r--debian/libhildon1-examples.install2
-rwxr-xr-xdebian/rules5
-rw-r--r--examples/Makefile.am63
-rw-r--r--examples/Makefile.static16
-rw-r--r--examples/hildon-app-menu-example.c2
-rw-r--r--examples/hildon-bread-crumb-trail-example.c8
-rw-r--r--examples/hildon-button-example.c3
-rw-r--r--examples/hildon-check-button-example.c2
-rw-r--r--examples/hildon-date-button-example.c33
-rw-r--r--examples/hildon-edit-toolbar-example.c4
-rw-r--r--examples/hildon-entry-example.c2
-rw-r--r--examples/hildon-pannable-area-example-2.c12
-rw-r--r--examples/hildon-pannable-area-example-3.c10
-rw-r--r--examples/hildon-pannable-area-example-4.c10
-rw-r--r--examples/hildon-pannable-area-example.c10
-rw-r--r--examples/hildon-pannable-area-touch-grid-example.c4
-rw-r--r--examples/hildon-pannable-area-touch-list-example.c4
-rw-r--r--examples/hildon-picker-button-example.c11
-rw-r--r--examples/hildon-picker-button-multicolumn-example.c10
-rw-r--r--examples/hildon-text-view-example.c2
-rw-r--r--examples/hildon-time-button-example.c11
-rw-r--r--examples/hildon-touch-selector-entry-example.c6
-rw-r--r--examples/hildon-touch-selector-example.c12
-rw-r--r--examples/hildon-touch-selector-multi-cells-example.c12
26 files changed, 188 insertions, 89 deletions
diff --git a/ChangeLog b/ChangeLog
index ae51000..c964b50 100644
--- 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
diff --git a/debian/control b/debian/control
index 0dfce7e..29065cf 100644
--- a/debian/control
+++ b/debian/control
@@ -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
index 0000000..dbbcdb4
--- /dev/null
+++ b/debian/libhildon1-examples.install
@@ -0,0 +1,2 @@
+debian/tmp/usr/share/doc/libhildon1/examples
+
diff --git a/debian/rules b/debian/rules
index a21ac86..a351d61 100755
--- a/debian/rules
+++ b/debian/rules
@@ -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
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 06f84da..98420ae 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -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
index 0000000..bfb5092
--- /dev/null
+++ b/examples/Makefile.static
@@ -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
+
diff --git a/examples/hildon-app-menu-example.c b/examples/hildon-app-menu-example.c
index 5ac07de..57b0923 100644
--- a/examples/hildon-app-menu-example.c
+++ b/examples/hildon-app-menu-example.c
@@ -23,7 +23,7 @@
*/
#include <gtk/gtk.h>
-#include <hildon.h>
+#include "hildon.h"
static void
menu_button_clicked (GtkButton *button,
diff --git a/examples/hildon-bread-crumb-trail-example.c b/examples/hildon-bread-crumb-trail-example.c
index a6345c4..b7483ed 100644
--- a/examples/hildon-bread-crumb-trail-example.c
+++ b/examples/hildon-bread-crumb-trail-example.c
@@ -23,11 +23,11 @@
*
*/
-#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;
diff --git a/examples/hildon-button-example.c b/examples/hildon-button-example.c
index ea9a394..740b1a8 100644
--- a/examples/hildon-button-example.c
+++ b/examples/hildon-button-example.c
@@ -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;
diff --git a/examples/hildon-check-button-example.c b/examples/hildon-check-button-example.c
index 5bff1a0..e0a1013 100644
--- a/examples/hildon-check-button-example.c
+++ b/examples/hildon-check-button-example.c
@@ -20,7 +20,7 @@
*
*/
-#include <hildon-check-button.h>
+#include "hildon.h"
static void
button_toggled_cb (HildonCheckButton *button,
diff --git a/examples/hildon-date-button-example.c b/examples/hildon-date-button-example.c
index 32815ed..18b508d 100644
--- a/examples/hildon-date-button-example.c
+++ b/examples/hildon-date-button-example.c
@@ -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)
diff --git a/examples/hildon-edit-toolbar-example.c b/examples/hildon-edit-toolbar-example.c
index 58e6886..920fdeb 100644
--- a/examples/hildon-edit-toolbar-example.c
+++ b/examples/hildon-edit-toolbar-example.c
@@ -20,8 +20,8 @@
*
*/
-#include <gtk/gtk.h>
-#include <hildon.h>
+#include <gtk/gtk.h>
+#include "hildon.h"
typedef enum
{
diff --git a/examples/hildon-entry-example.c b/examples/hildon-entry-example.c
index 80205bb..13549f0 100644
--- a/examples/hildon-entry-example.c
+++ b/examples/hildon-entry-example.c
@@ -21,7 +21,7 @@
*/
#include <gtk/gtk.h>
-#include <hildon.h>
+#include "hildon.h"
HildonEntry *mainentry;
diff --git a/examples/hildon-pannable-area-example-2.c b/examples/hildon-pannable-area-example-2.c
index 496994a..4e6723a 100644
--- a/examples/hildon-pannable-area-example-2.c
+++ b/examples/hildon-pannable-area-example-2.c
@@ -23,12 +23,12 @@
*
*/
-#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 };
diff --git a/examples/hildon-pannable-area-example-3.c b/examples/hildon-pannable-area-example-3.c
index cf2158b..2b64980 100644
--- a/examples/hildon-pannable-area-example-3.c
+++ b/examples/hildon-pannable-area-example-3.c
@@ -23,11 +23,11 @@
*
*/
-#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;
diff --git a/examples/hildon-pannable-area-example-4.c b/examples/hildon-pannable-area-example-4.c
index 756309c..75fc852 100644
--- a/examples/hildon-pannable-area-example-4.c
+++ b/examples/hildon-pannable-area-example-4.c
@@ -22,11 +22,11 @@
*
*/
-#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 };
diff --git a/examples/hildon-pannable-area-example.c b/examples/hildon-pannable-area-example.c
index fe3150e..008a740 100644
--- a/examples/hildon-pannable-area-example.c
+++ b/examples/hildon-pannable-area-example.c
@@ -22,11 +22,11 @@
*
*/
-#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 };
diff --git a/examples/hildon-pannable-area-touch-grid-example.c b/examples/hildon-pannable-area-touch-grid-example.c
index 4568db5..7acacfc 100644
--- a/examples/hildon-pannable-area-touch-grid-example.c
+++ b/examples/hildon-pannable-area-touch-grid-example.c
@@ -24,8 +24,8 @@
*
*/
-#include <gtk/gtk.h>
-#include <hildon.h>
+#include <gtk/gtk.h>
+#include "hildon.h"
enum
{
diff --git a/examples/hildon-pannable-area-touch-list-example.c b/examples/hildon-pannable-area-touch-list-example.c
index 901cab1..89c314d 100644
--- a/examples/hildon-pannable-area-touch-list-example.c
+++ b/examples/hildon-pannable-area-touch-list-example.c
@@ -24,8 +24,8 @@
*
*/
-#include <gtk/gtk.h>
-#include <hildon.h>
+#include <gtk/gtk.h>
+#include "hildon.h"
enum
{
diff --git a/examples/hildon-picker-button-example.c b/examples/hildon-picker-button-example.c
index 616e28e..7f99d2a 100644
--- a/examples/hildon-picker-button-example.c
+++ b/examples/hildon-picker-button-example.c
@@ -14,14 +14,9 @@
*
*/
-#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)
diff --git a/examples/hildon-picker-button-multicolumn-example.c b/examples/hildon-picker-button-multicolumn-example.c
index 4fa2d33..bdc87eb 100644
--- a/examples/hildon-picker-button-multicolumn-example.c
+++ b/examples/hildon-picker-button-multicolumn-example.c
@@ -14,13 +14,9 @@
*
*/
-#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)
diff --git a/examples/hildon-text-view-example.c b/examples/hildon-text-view-example.c
index 2bf7e1d..9b81bc6 100644
--- a/examples/hildon-text-view-example.c
+++ b/examples/hildon-text-view-example.c
@@ -20,7 +20,7 @@
*
*/
-#include <hildon.h>
+#include "hildon.h"
HildonTextView *textview;
GtkTextBuffer *buffer;
diff --git a/examples/hildon-time-button-example.c b/examples/hildon-time-button-example.c
index d5a4cb7..10d4bfe 100644
--- a/examples/hildon-time-button-example.c
+++ b/examples/hildon-time-button-example.c
@@ -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)
diff --git a/examples/hildon-touch-selector-entry-example.c b/examples/hildon-touch-selector-entry-example.c
index fd71ad6..06619e6 100644
--- a/examples/hildon-touch-selector-entry-example.c
+++ b/examples/hildon-touch-selector-entry-example.c
@@ -18,10 +18,10 @@
* 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",
diff --git a/examples/hildon-touch-selector-example.c b/examples/hildon-touch-selector-example.c
index a1be5cd..54e1f51 100644
--- a/examples/hildon-touch-selector-example.c
+++ b/examples/hildon-touch-selector-example.c
@@ -21,15 +21,9 @@
*
*/
-#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);
diff --git a/examples/hildon-touch-selector-multi-cells-example.c b/examples/hildon-touch-selector-multi-cells-example.c
index 30fa2fe..341a2e7 100644
--- a/examples/hildon-touch-selector-multi-cells-example.c
+++ b/examples/hildon-touch-selector-multi-cells-example.c
@@ -21,15 +21,9 @@
*
*/
-#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);