From a8b4bdcf9dd4ce2195a7daa4b4d641750986406e Mon Sep 17 00:00:00 2001 From: Michael Prager Date: Sat, 23 Jan 2010 15:58:02 +0100 Subject: [PATCH] added first implementation of ComingNext Skin Fetcher app --- ComingNext_SkinFetcher/.cproject | 150 ++++++ ComingNext_SkinFetcher/.project | 19 + .../ComingNext_SkinFetcherContainer.uidesign | 245 +++++++++ ComingNext_SkinFetcher/application.uidesign | 108 ++++ .../data/ComingNext_SkinFetcher.l01 | 14 + .../data/ComingNext_SkinFetcher.loc | 11 + .../data/ComingNext_SkinFetcher.rss | 92 ++++ .../data/ComingNext_SkinFetcherContainer.l01 | 21 + .../data/ComingNext_SkinFetcherContainer.loc | 11 + .../data/ComingNext_SkinFetcherContainer.rssi | 174 +++++++ .../data/ComingNext_SkinFetcher_reg.loc | 11 + .../data/ComingNext_SkinFetcher_reg.rss | 21 + ComingNext_SkinFetcher/gfx/list_icon.bmp | Bin 0 -> 2356 bytes ComingNext_SkinFetcher/gfx/list_icon_mask.bmp | Bin 0 -> 294 bytes ComingNext_SkinFetcher/gfx/mark_icon.bmp | Bin 0 -> 2134 bytes ComingNext_SkinFetcher/gfx/mark_icon_mask.bmp | Bin 0 -> 166 bytes .../gfx/qgn_menu_ComingNext_SkinFetcher.svg | 46 ++ ComingNext_SkinFetcher/gfx/svg2s60.pl | 106 ++++ ComingNext_SkinFetcher/group/ABLD.BAT | 15 + .../group/ComingNext_SkinFetcher.mmp | 43 ++ .../group/Icons_aif_scalable_dc.mk | 73 +++ ComingNext_SkinFetcher/group/bld.inf | 12 + .../inc/ComingNext_SkinFetcher.hrh | 12 + .../inc/ComingNext_SkinFetcher.pan | 17 + .../inc/ComingNext_SkinFetcherAppUi.h | 63 +++ .../inc/ComingNext_SkinFetcherApplication.h | 35 ++ .../inc/ComingNext_SkinFetcherContainer.h | 100 ++++ .../inc/ComingNext_SkinFetcherContainer.hrh | 12 + .../inc/ComingNext_SkinFetcherContainerView.h | 114 +++++ .../inc/ComingNext_SkinFetcherDocument.h | 36 ++ ComingNext_SkinFetcher/inc/SkinFetcher.h | 61 +++ .../sis/ComingNext_SkinFetcher.pkg | 36 ++ .../sis/backup_registration.xml | 5 + .../src/ComingNext_SkinFetcherAppUi.cpp | 143 ++++++ .../src/ComingNext_SkinFetcherApplication.cpp | 77 +++ .../src/ComingNext_SkinFetcherContainer.cpp | 238 +++++++++ .../ComingNext_SkinFetcherContainerView.cpp | 471 ++++++++++++++++++ .../src/ComingNext_SkinFetcherDocument.cpp | 60 +++ ComingNext_SkinFetcher/src/SkinFetcher.cpp | 123 +++++ 39 files changed, 2775 insertions(+) create mode 100644 ComingNext_SkinFetcher/.cproject create mode 100644 ComingNext_SkinFetcher/.project create mode 100644 ComingNext_SkinFetcher/ComingNext_SkinFetcherContainer.uidesign create mode 100644 ComingNext_SkinFetcher/application.uidesign create mode 100644 ComingNext_SkinFetcher/data/ComingNext_SkinFetcher.l01 create mode 100644 ComingNext_SkinFetcher/data/ComingNext_SkinFetcher.loc create mode 100644 ComingNext_SkinFetcher/data/ComingNext_SkinFetcher.rss create mode 100644 ComingNext_SkinFetcher/data/ComingNext_SkinFetcherContainer.l01 create mode 100644 ComingNext_SkinFetcher/data/ComingNext_SkinFetcherContainer.loc create mode 100644 ComingNext_SkinFetcher/data/ComingNext_SkinFetcherContainer.rssi create mode 100644 ComingNext_SkinFetcher/data/ComingNext_SkinFetcher_reg.loc create mode 100644 ComingNext_SkinFetcher/data/ComingNext_SkinFetcher_reg.rss create mode 100644 ComingNext_SkinFetcher/gfx/list_icon.bmp create mode 100644 ComingNext_SkinFetcher/gfx/list_icon_mask.bmp create mode 100644 ComingNext_SkinFetcher/gfx/mark_icon.bmp create mode 100644 ComingNext_SkinFetcher/gfx/mark_icon_mask.bmp create mode 100644 ComingNext_SkinFetcher/gfx/qgn_menu_ComingNext_SkinFetcher.svg create mode 100644 ComingNext_SkinFetcher/gfx/svg2s60.pl create mode 100644 ComingNext_SkinFetcher/group/ABLD.BAT create mode 100644 ComingNext_SkinFetcher/group/ComingNext_SkinFetcher.mmp create mode 100644 ComingNext_SkinFetcher/group/Icons_aif_scalable_dc.mk create mode 100644 ComingNext_SkinFetcher/group/bld.inf create mode 100644 ComingNext_SkinFetcher/inc/ComingNext_SkinFetcher.hrh create mode 100644 ComingNext_SkinFetcher/inc/ComingNext_SkinFetcher.pan create mode 100644 ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherAppUi.h create mode 100644 ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherApplication.h create mode 100644 ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherContainer.h create mode 100644 ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherContainer.hrh create mode 100644 ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherContainerView.h create mode 100644 ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherDocument.h create mode 100644 ComingNext_SkinFetcher/inc/SkinFetcher.h create mode 100644 ComingNext_SkinFetcher/sis/ComingNext_SkinFetcher.pkg create mode 100644 ComingNext_SkinFetcher/sis/backup_registration.xml create mode 100644 ComingNext_SkinFetcher/src/ComingNext_SkinFetcherAppUi.cpp create mode 100644 ComingNext_SkinFetcher/src/ComingNext_SkinFetcherApplication.cpp create mode 100644 ComingNext_SkinFetcher/src/ComingNext_SkinFetcherContainer.cpp create mode 100644 ComingNext_SkinFetcher/src/ComingNext_SkinFetcherContainerView.cpp create mode 100644 ComingNext_SkinFetcher/src/ComingNext_SkinFetcherDocument.cpp create mode 100644 ComingNext_SkinFetcher/src/SkinFetcher.cpp diff --git a/ComingNext_SkinFetcher/.cproject b/ComingNext_SkinFetcher/.cproject new file mode 100644 index 0000000..12e0efb --- /dev/null +++ b/ComingNext_SkinFetcher/.cproject @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ComingNext_SkinFetcher/.project b/ComingNext_SkinFetcher/.project new file mode 100644 index 0000000..a294043 --- /dev/null +++ b/ComingNext_SkinFetcher/.project @@ -0,0 +1,19 @@ + + + ComingNext_SkinFetcher + + + + + + com.nokia.carbide.cdt.builder.carbideCPPBuilder + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + com.nokia.carbide.cdt.builder.carbideCPPBuilderNature + + diff --git a/ComingNext_SkinFetcher/ComingNext_SkinFetcherContainer.uidesign b/ComingNext_SkinFetcher/ComingNext_SkinFetcherContainer.uidesign new file mode 100644 index 0000000..4da434e --- /dev/null +++ b/ComingNext_SkinFetcher/ComingNext_SkinFetcherContainer.uidesign @@ -0,0 +1,245 @@ + + + + + + + + + + + + + + + + + + + + + + data + com.nokia.series60 + 5.0.0 + com.nokia.sdt.component.symbian.Symbian-Provider + inc + src + com.nokia.sdt.sourcegen.Symbian-Provider + group + + CComingNext_SkinFetcherContainerView + + 10 + 10 + + ComingNext_SkinFetcherContainerView + + 360 + 640 + + + + 30 + + statusPane + + 306 + 95 + + + + title + STR_ComingNext_SkinFetcherContainerView_4 + + 222 + 55 + + + \resource\apps\ComingNext_SkinFetcher_aif.mif + EMbmComingnext_skinfetcher_aifQgn_menu_comingnext_skinfetcher + EMbmComingnext_skinfetcher_aifQgn_menu_comingnext_skinfetcher_mask + + + + + + 584 + + + STR_ComingNext_SkinFetcherContainerView_1 + STR_ComingNext_SkinFetcherContainerView_2 + STR_ComingNext_SkinFetcherContainerView_3 + UNIQUE + CUSTOM + + controlPane + + 360 + 56 + + + + + + + 99 + + CComingNext_SkinFetcherContainer + ComingNext_SkinFetcherContainer + + 360 + 485 + + + + 19 + 19 + + standard.AnnotationFont + label1 + STR_ComingNext_SkinFetcherContainerView_24 + + 323 + 312 + + + + + + + 298 + + listQuery1 + STR_ComingNext_SkinFetcherContainerView_8 + + 360 + 342 + + + + listboxItem1 + STR_ComingNext_SkinFetcherContainerView_10 + + 324 + 47 + + + + + 47 + + listboxItem2 + STR_ComingNext_SkinFetcherContainerView_12 + + 324 + 47 + + + + + 94 + + listboxItem3 + STR_ComingNext_SkinFetcherContainerView_14 + + 324 + 47 + + + + + 141 + + listboxItem4 + STR_ComingNext_SkinFetcherContainerView_16 + + 324 + 47 + + + + + 188 + + listboxItem5 + STR_ComingNext_SkinFetcherContainerView_18 + + 324 + 47 + + + + + + 12 + 435 + + note1 + STR_ComingNext_SkinFetcherContainerView_20 + + 339 + 142 + + + + + + Generate + Exit + + ComingNext Skin Fetcher + widget position on HS + Position 1 + Position 2 + Position 3 + Position 4 + Position 5 + background images generated + Press \"Generate\" and select the\nposition of the ComingNext\nwidget on your homescreen.\n\nThis app will generate two images:\nC:\\Data\\background_portrait.png\nand\nC:\\Data\\background_landscape.png\nwhich can be used by the widget. + + + + + + r_coming_next_skin_fetcher_container_control_pane_2 + r_coming_next_skin_fetcher_container_listbox_item3 + r_coming_next_skin_fetcher_container_title_resource_2 + r_coming_next_skin_fetcher_container_listbox_item4 + r_coming_next_skin_fetcher_container_listbox_item1 + r_coming_next_skin_fetcher_container_label1 + r_coming_next_skin_fetcher_container_note1 + r_coming_next_skin_fetcher_container_list_query1 + r_coming_next_skin_fetcher_container_listbox_item5 + r_coming_next_skin_fetcher_container_status_pane_2 + r_coming_next_skin_fetcher_container_coming_next_skin_fetcher_container_view_2 + r_coming_next_skin_fetcher_container_listbox_item2 + + + EAknCtTitlePane + EEikLabelFontAnnotation + EComingNext_SkinFetcherContainerViewId + EAknSoftkeyEmpty + EEikLabelAlignHCenter + EComingNext_SkinFetcherContainerViewControlPaneLeftId + EAknSoftkeyExit + EEikStatusPaneUidTitle + EAknCtSinglePopupMenuListBox + + + + + src/comingnext_skinfetchercontainerview.cpp + inc/comingnext_skinfetchercontainer.h + src/comingnext_skinfetchercontainer.cpp + inc/comingnext_skinfetchercontainerview.h + data/comingnext_skinfetcher.rss + data/comingnext_skinfetchercontainer.rssi + inc/comingnext_skinfetcher.hrh + inc/comingnext_skinfetchercontainer.hrh + data/comingnext_skinfetcher.loc + data/comingnext_skinfetcher.l01 + data/comingnext_skinfetchercontainer.loc + data/comingnext_skinfetchercontainer.l01 + + diff --git a/ComingNext_SkinFetcher/application.uidesign b/ComingNext_SkinFetcher/application.uidesign new file mode 100644 index 0000000..5702086 --- /dev/null +++ b/ComingNext_SkinFetcher/application.uidesign @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + data + com.nokia.series60 + 5.0.0 + com.nokia.sdt.component.symbian.Symbian-Provider + inc + ComingNext_SkinFetcherAppUi + src + ComingNext_SkinFetcher + group + + CComingNext_SkinFetcherApplication + ComingNext_SkinFetcher + ComingNext_SkinFetcherApplication + 0xE4914444 + + CComingNext_SkinFetcherDocument + ComingNext_SkinFetcherDocument + + aknViewReference1 + CComingNext_SkinFetcherAppUi + + 10 + 10 + + ComingNext_SkinFetcherAppUi + + 360 + 640 + + + + 30 + + statusPane + + 306 + 95 + + + STR_ComingNext_SkinFetcherApplication_5 + + STR_ComingNext_SkinFetcherApplication_4 + caption + + 222 + 55 + + + + + + 584 + + + STR_ComingNext_SkinFetcherApplication_1 + STR_ComingNext_SkinFetcherApplication_2 + STR_ComingNext_SkinFetcherApplication_3 + R_AVKON_SOFTKEYS_EMPTY + EAknSoftkeyEmpty + EAknSoftkeyEmpty + + controlPane + + 360 + 56 + + + + ComingNext_SkinFetcherContainer.uidesign + + ComingNext_SkinFetcherContainer + aknViewReference1 + + + + + + + + + + ComingNext_SkinFetcher + ComingNext_SkinFetcher + + + + + diff --git a/ComingNext_SkinFetcher/data/ComingNext_SkinFetcher.l01 b/ComingNext_SkinFetcher/data/ComingNext_SkinFetcher.l01 new file mode 100644 index 0000000..5c6f831 --- /dev/null +++ b/ComingNext_SkinFetcher/data/ComingNext_SkinFetcher.l01 @@ -0,0 +1,14 @@ +/* +======================================================================== + Name : ComingNext_SkinFetcher.l01 + Author : Michael Prager + Copyright : Licensed under GPLv3 + Description : +======================================================================== +*/ +// localized strings for language: UK English (01) +#define STR_ComingNext_SkinFetcherApplication_2 "Test" +#define STR_ComingNext_SkinFetcherApplication_3 "" +#define STR_ComingNext_SkinFetcherApplication_4 "CN Skin Fetcher" +#define STR_ComingNext_SkinFetcherApplication_5 "CN Skin Fetcher" +#define STR_ComingNext_SkinFetcherApplication_1 "Test" diff --git a/ComingNext_SkinFetcher/data/ComingNext_SkinFetcher.loc b/ComingNext_SkinFetcher/data/ComingNext_SkinFetcher.loc new file mode 100644 index 0000000..c16a7af --- /dev/null +++ b/ComingNext_SkinFetcher/data/ComingNext_SkinFetcher.loc @@ -0,0 +1,11 @@ +/* +======================================================================== + Name : ComingNext_SkinFetcher.loc + Author : Michael Prager + Copyright : Licensed under GPLv3 + Description : +======================================================================== +*/ +#ifdef LANGUAGE_01 +#include "ComingNext_SkinFetcher.l01" +#endif diff --git a/ComingNext_SkinFetcher/data/ComingNext_SkinFetcher.rss b/ComingNext_SkinFetcher/data/ComingNext_SkinFetcher.rss new file mode 100644 index 0000000..acef170 --- /dev/null +++ b/ComingNext_SkinFetcher/data/ComingNext_SkinFetcher.rss @@ -0,0 +1,92 @@ +/* +======================================================================== + Name : ComingNext_SkinFetcher.rss + Author : Michael Prager + Copyright : Licensed under GPLv3 + Description : +======================================================================== +*/ +NAME COMI + +#include +#include +#include +#include +#include "ComingNext_SkinFetcher.hrh" +#include "ComingNext_SkinFetcher.loc" + +RESOURCE RSS_SIGNATURE + { + } +RESOURCE TBUF + { + buf = "ComingNext_SkinFetcher"; + } +RESOURCE EIK_APP_INFO r_application_coming_next_skin_fetcher_app_ui + { + cba = r_application_control_pane_2; + status_pane = r_application_status_pane; + } +RESOURCE STATUS_PANE_APP_MODEL r_application_status_pane + { + } +RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info + { + short_caption = STR_ComingNext_SkinFetcherApplication_5; + caption_and_icon = CAPTION_AND_ICON_INFO + { + caption = STR_ComingNext_SkinFetcherApplication_4; + number_of_icons = 1; + icon_file = "\\resource\\apps\\ComingNext_SkinFetcher_aif.mif"; + }; + } +RESOURCE TBUF r_application_akn_view_reference1 + { + } + + +RESOURCE CBA r_application_control_pane + { + buttons = + { + CBA_BUTTON + { + id = EAknSoftkeyEmpty; + txt = STR_ComingNext_SkinFetcherApplication_1; + }, + CBA_BUTTON + { + id = EAknSoftkeyEmpty; + txt = STR_ComingNext_SkinFetcherApplication_2; + }, + CBA_BUTTON + { + id = EAknSoftkeyEmpty; + txt = STR_ComingNext_SkinFetcherApplication_3; + } + }; + } + +RESOURCE CBA r_application_control_pane_2 + { + buttons = + { + CBA_BUTTON + { + id = EAknSoftkeyEmpty; + txt = STR_ComingNext_SkinFetcherApplication_1; + }, + CBA_BUTTON + { + id = EAknSoftkeyEmpty; + txt = STR_ComingNext_SkinFetcherApplication_2; + }, + CBA_BUTTON + { + id = EAknSoftkeyEmpty; + txt = STR_ComingNext_SkinFetcherApplication_3; + } + }; + } + +#include "ComingNext_SkinFetcherContainer.rssi" diff --git a/ComingNext_SkinFetcher/data/ComingNext_SkinFetcherContainer.l01 b/ComingNext_SkinFetcher/data/ComingNext_SkinFetcherContainer.l01 new file mode 100644 index 0000000..6c2dc1b --- /dev/null +++ b/ComingNext_SkinFetcher/data/ComingNext_SkinFetcherContainer.l01 @@ -0,0 +1,21 @@ +/* +======================================================================== + Name : ComingNext_SkinFetcherContainer.l01 + Author : Michael Prager + Copyright : Licensed under GPLv3 + Description : +======================================================================== +*/ +// localized strings for language: UK English (01) +#define STR_ComingNext_SkinFetcherContainerView_1 "Generate" +#define STR_ComingNext_SkinFetcherContainerView_2 "Exit" +#define STR_ComingNext_SkinFetcherContainerView_3 "" +#define STR_ComingNext_SkinFetcherContainerView_4 "ComingNext Skin Fetcher" +#define STR_ComingNext_SkinFetcherContainerView_10 "Position 1" +#define STR_ComingNext_SkinFetcherContainerView_12 "Position 2" +#define STR_ComingNext_SkinFetcherContainerView_14 "Position 3" +#define STR_ComingNext_SkinFetcherContainerView_16 "Position 4" +#define STR_ComingNext_SkinFetcherContainerView_18 "Position 5" +#define STR_ComingNext_SkinFetcherContainerView_20 "background images generated" +#define STR_ComingNext_SkinFetcherContainerView_8 "widget position on HS" +#define STR_ComingNext_SkinFetcherContainerView_24 "Press \"Generate\" and select the\nposition of the ComingNext\nwidget on your homescreen.\n\nThis app will generate two images:\nC:\\Data\\background_portrait.png\nand\nC:\\Data\\background_landscape.png\nwhich can be used by the widget." diff --git a/ComingNext_SkinFetcher/data/ComingNext_SkinFetcherContainer.loc b/ComingNext_SkinFetcher/data/ComingNext_SkinFetcherContainer.loc new file mode 100644 index 0000000..cb5650c --- /dev/null +++ b/ComingNext_SkinFetcher/data/ComingNext_SkinFetcherContainer.loc @@ -0,0 +1,11 @@ +/* +======================================================================== + Name : ComingNext_SkinFetcherContainer.loc + Author : Michael Prager + Copyright : Licensed under GPLv3 + Description : +======================================================================== +*/ +#ifdef LANGUAGE_01 +#include "ComingNext_SkinFetcherContainer.l01" +#endif diff --git a/ComingNext_SkinFetcher/data/ComingNext_SkinFetcherContainer.rssi b/ComingNext_SkinFetcher/data/ComingNext_SkinFetcherContainer.rssi new file mode 100644 index 0000000..c56a9f1 --- /dev/null +++ b/ComingNext_SkinFetcher/data/ComingNext_SkinFetcherContainer.rssi @@ -0,0 +1,174 @@ +/* +======================================================================== + Name : ComingNext_SkinFetcherContainer.rssi + Author : Michael Prager + Copyright : Licensed under GPLv3 + Description : +======================================================================== +*/ +#include "ComingNext_SkinFetcherContainer.hrh" +#include "ComingNext_SkinFetcherContainer.loc" + +RESOURCE AVKON_VIEW r_coming_next_skin_fetcher_container_coming_next_skin_fetcher_container_view + { + cba = r_coming_next_skin_fetcher_container_control_pane; + toolbar = 0; + } +RESOURCE STATUS_PANE_APP_MODEL r_coming_next_skin_fetcher_container_status_pane + { + panes = + { + SPANE_PANE + { + id = EEikStatusPaneUidTitle; + type = EAknCtTitlePane; + resource = r_coming_next_skin_fetcher_container_title_resource; + } + }; + } +RESOURCE TITLE_PANE r_coming_next_skin_fetcher_container_title_resource + { + txt = STR_ComingNext_SkinFetcherContainerView_4; + } +RESOURCE CBA r_coming_next_skin_fetcher_container_control_pane + { + buttons = + { + CBA_BUTTON + { + id = EAknSoftkeyOptions; + txt = STR_ComingNext_SkinFetcherContainerView_1; + }, + CBA_BUTTON + { + id = EAknSoftkeyExit; + txt = STR_ComingNext_SkinFetcherContainerView_2; + }, + CBA_BUTTON + { + id = EAknSoftkeyEmpty; + txt = STR_ComingNext_SkinFetcherContainerView_3; + } + }; + } +RESOURCE AVKON_VIEW r_coming_next_skin_fetcher_container_coming_next_skin_fetcher_container_view_2 + { + cba = r_coming_next_skin_fetcher_container_control_pane_2; + toolbar = 0; + } +RESOURCE CBA r_coming_next_skin_fetcher_container_control_pane_2 + { + buttons = + { + CBA_BUTTON + { + id = EComingNext_SkinFetcherContainerViewControlPaneLeftId; + txt = STR_ComingNext_SkinFetcherContainerView_1; + }, + CBA_BUTTON + { + id = EAknSoftkeyExit; + txt = STR_ComingNext_SkinFetcherContainerView_2; + }, + CBA_BUTTON + { + id = EAknSoftkeyEmpty; + txt = STR_ComingNext_SkinFetcherContainerView_3; + } + }; + } +RESOURCE STATUS_PANE_APP_MODEL r_coming_next_skin_fetcher_container_status_pane_2 + { + panes = + { + SPANE_PANE + { + id = EEikStatusPaneUidTitle; + type = EAknCtTitlePane; + resource = r_coming_next_skin_fetcher_container_title_resource_2; + } + }; + } +RESOURCE TITLE_PANE r_coming_next_skin_fetcher_container_title_resource_2 + { + txt = STR_ComingNext_SkinFetcherContainerView_4; + } +RESOURCE AVKON_LIST_QUERY r_coming_next_skin_fetcher_container_list_query1 + { + flags = EGeneralQueryFlags; + softkeys = R_AVKON_SOFTKEYS_OK_CANCEL; + items = + { + AVKON_LIST_QUERY_DLG_LINE + { + control = AVKON_LIST_QUERY_CONTROL + { + listtype = EAknCtSinglePopupMenuListBox; + heading = STR_ComingNext_SkinFetcherContainerView_8; + listbox = AVKON_LIST_QUERY_LIST + { + }; + }; + } + }; + } +RESOURCE ARRAY r_coming_next_skin_fetcher_container_listbox_item1 + { + items = + { + LBUF + { + txt = STR_ComingNext_SkinFetcherContainerView_10; + } + }; + } +RESOURCE ARRAY r_coming_next_skin_fetcher_container_listbox_item2 + { + items = + { + LBUF + { + txt = STR_ComingNext_SkinFetcherContainerView_12; + } + }; + } +RESOURCE ARRAY r_coming_next_skin_fetcher_container_listbox_item3 + { + items = + { + LBUF + { + txt = STR_ComingNext_SkinFetcherContainerView_14; + } + }; + } +RESOURCE ARRAY r_coming_next_skin_fetcher_container_listbox_item4 + { + items = + { + LBUF + { + txt = STR_ComingNext_SkinFetcherContainerView_16; + } + }; + } +RESOURCE ARRAY r_coming_next_skin_fetcher_container_listbox_item5 + { + items = + { + LBUF + { + txt = STR_ComingNext_SkinFetcherContainerView_18; + } + }; + } +RESOURCE TBUF r_coming_next_skin_fetcher_container_note1 + { + buf = STR_ComingNext_SkinFetcherContainerView_20; + } +RESOURCE LABEL r_coming_next_skin_fetcher_container_label1 + { + txt = STR_ComingNext_SkinFetcherContainerView_24; + horiz_align = EEikLabelAlignHCenter; + standard_font = EEikLabelFontAnnotation; + } diff --git a/ComingNext_SkinFetcher/data/ComingNext_SkinFetcher_reg.loc b/ComingNext_SkinFetcher/data/ComingNext_SkinFetcher_reg.loc new file mode 100644 index 0000000..401af00 --- /dev/null +++ b/ComingNext_SkinFetcher/data/ComingNext_SkinFetcher_reg.loc @@ -0,0 +1,11 @@ +// LOCALISATION STRINGS + +// Caption string for app. +#define qtn_caption_string "ComingNext_SkinFetcher" + +// Short caption string for app. +#define qtn_short_caption_string "HW" + +#define qtn_loc_resource_file_1 "\\resource\\apps\\ComingNext_SkinFetcher" + +// End of File diff --git a/ComingNext_SkinFetcher/data/ComingNext_SkinFetcher_reg.rss b/ComingNext_SkinFetcher/data/ComingNext_SkinFetcher_reg.rss new file mode 100644 index 0000000..c59d2d3 --- /dev/null +++ b/ComingNext_SkinFetcher/data/ComingNext_SkinFetcher_reg.rss @@ -0,0 +1,21 @@ + +#include +#include +#include +#include +#include "ComingNext_SkinFetcher_reg.loc" +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0xE4914444 + +RESOURCE APP_REGISTRATION_INFO + { + app_file="ComingNext_SkinFetcher"; + localisable_resource_file = qtn_loc_resource_file_1; + localisable_resource_id = R_LOCALISABLE_APP_INFO; + + embeddability=KAppNotEmbeddable; + newfile=KAppDoesNotSupportNewFile; + } + diff --git a/ComingNext_SkinFetcher/gfx/list_icon.bmp b/ComingNext_SkinFetcher/gfx/list_icon.bmp new file mode 100644 index 0000000000000000000000000000000000000000..a874feae5f6163dbe894f76a33385a1013769855 GIT binary patch literal 2356 zcmdVay=@yo5XJEoWCAuAopUFO45uTw07I!mx`b^(EwF`cL8(KvaQQ`SK`oqrvm`Bk z39=ms@E-o;@!i{*x4Q>^`+obO^zrpwDWBba!6#gm_g&AAkIOB4VV>tQqM;&CFpqRJ zR0J5y+~{bi2$)>vN=HLQK*2Hx9Ss!$O-f!P8Y%)BYdvZ+Dmj`yvW{fVk&cFn06`u) z8Y%)z^3c&x5in66IvOehis?*uHBQNp`)Q9prJf;G*kqHFolkWihvt==xC@2cqk9OC!xCn zCdgx_&`=RjL>@XCDgp}2Lq|hJKr?yhXs8GXpcEYq6#*ae(EF~?edpzYJlY^%%X|g% zbz_!?j(k1xRmfvkAdfPSEsrRVBe&iUy5;2-=62=Q>Tak0}`hG}VBHlKQ@v!DN;x0GLtTT@;D literal 0 HcmV?d00001 diff --git a/ComingNext_SkinFetcher/gfx/list_icon_mask.bmp b/ComingNext_SkinFetcher/gfx/list_icon_mask.bmp new file mode 100644 index 0000000000000000000000000000000000000000..e3205279c97d21b361cc68513951ce70c32ca98b GIT binary patch literal 294 zcmZ?rRbylT13Mt80mNEBEDOYpKnMaafLMqdf|-D95C(z&|Nn#V|NjTTY&4o3!vDt% zq5m*qr~fg?gY_R^;0MzU4D3*vp&n#z0|SFSl$IxoE`X~4!2!|#18QyoDt({;VlPhj HqxuT~e!P80 literal 0 HcmV?d00001 diff --git a/ComingNext_SkinFetcher/gfx/mark_icon.bmp b/ComingNext_SkinFetcher/gfx/mark_icon.bmp new file mode 100644 index 0000000000000000000000000000000000000000..35571e2c2435a88a5754c6cd976af0716980b09f GIT binary patch literal 2134 zcmdUsOAf*?3`EP0BOq2RIROV?&zAe&1V;I|!?8|)z}`tOx642d7RR@;eEw( zF3({)rT(SNQ&C>8-hr=Yndd#P-8`>^D&!d~ix5~OyTGs^24=8s@YrH{4YKmEWOf6HFoOv(BnbCl z((%>NJkWBh;M55xZh zKLq|C_+U_f;6a7`fdfD64;=g>f8g;S{sZ6t@gMmAkNv>^{~*i^#EnpV07!%ILm++* J#6a_qFaUP-Rw4iZ literal 0 HcmV?d00001 diff --git a/ComingNext_SkinFetcher/gfx/qgn_menu_ComingNext_SkinFetcher.svg b/ComingNext_SkinFetcher/gfx/qgn_menu_ComingNext_SkinFetcher.svg new file mode 100644 index 0000000..c2b614e --- /dev/null +++ b/ComingNext_SkinFetcher/gfx/qgn_menu_ComingNext_SkinFetcher.svg @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ComingNext_SkinFetcher/gfx/svg2s60.pl b/ComingNext_SkinFetcher/gfx/svg2s60.pl new file mode 100644 index 0000000..eb85aa4 --- /dev/null +++ b/ComingNext_SkinFetcher/gfx/svg2s60.pl @@ -0,0 +1,106 @@ +### +# SVG2S60 - Cleans Inkscape SVG files for use with svg2svgt in the S60 SDK +# Copyright (C) 2007 Ian Dunbar +# Modified by Brian Smith and Michael Prager +# +# 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; either version 2 of the License, or +# (at your option) any later version. +# +# 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., 675 Mass Ave, Cambridge, MA 02139, USA. +### + +### +# +# SVG2S60 - Cleans Inkscape SVG files for use with svg2svgt in the S60 SDK +# +# Usage: svg2s60.pl in.svg > out.svg +# +# Description: This script just splits the style tags used by Inkscape, but not +# properly supported by svg2svgt into it's seperate components. This helps to +# solve color mapping issues in svg2svgt for files that have been edited by +# Inkscape. +# +### + +### +# Changelog: +# v1.0 by Ian Dunbar +# - initial release +# v1.1 by Brian Smith +# - update to work with the latest inkscape version 0.47 +# v1.2 by Michael Prager +# - fix moveto commands with implicit lineto commands in paths +# - fix gradients that use xlink:href references +### + +my $inputfile = ""; +while (<>) { + $inputfile .= $_; +} + +sub fixPathData { + my $output = shift; + # do some cleanup to make regex easier, add spacing between numbers and commands and replace , with space + $output =~ s/(\d)-/$1 -/g; + $output =~ s/(\d)([a-df-zA-DF-Z])/$1 $2/g; + $output =~ s/([a-df-zA-DF-Z])(-?\d)/$1 $2/g; + $output =~ s/([a-df-zA-DF-Z])([a-df-zA-DF-Z])/$1 $2/g; + $output =~ s/,/ /g; + # fix moveto commands that have more than two coordinates. Interpret additionl coordinates as lineto commands as defined in the SVG DTD + $output =~ s/^m\s+([-0-9e\.]+)\s+([-0-9e\.]+)\s+([-0-9e\.]+)\s+([-0-9e\.]+)\s*/M $1 $2 l $3 $4 /g; + $output =~ s/m\s+([-0-9e\.]+)\s+([-0-9e\.]+)\s+([-0-9e\.]+)\s+([-0-9e\.]+)\s*/m $1 $2 l $3 $4 /g; + $output =~ s/M\s+([-0-9e\.]+)\s+([-0-9e\.]+)\s+([-0-9e\.]+)\s+([-0-9e\.]+)\s*/M $1 $2 L $3 $4 /g; + return $output; +} + +sub fixGradient { + my $output = shift; + $output =~ s/^#//; + # dereference linked gradients + if ($inputfile =~ /<(linearGradient|radialGradient)([^<>]*?)id=\"$output\"([^<>]*?)>(.*?)<\/\1>/i) { + $output = $4; + } + else { + $output = ""; + } + return $output; +} + +# remove linebreaks & whitespaces, makes parsing easier +$inputfile =~ s/\n/ /g; +$inputfile =~ s/ +/ /g; + +# remove style attribute used by Inkscape, use normal attributes instead +while($inputfile =~ /\s+style=\"(.*?)\"/g) { + my $input = $1; + my $output = ""; + my @styles = split /;/,$input; + foreach $style (@styles) { + $style =~ s/(.*):(.*)/$1=\"$2\" /; + if ($style !~ /^-/) { # don't allow attributes that start with "-" + $output .= $style; + } + } + $inputfile =~ s/\s+style=\"\Q$input\E\"/ $output/g; +} + +# fix moveto command in paths if implicit lineto commands are used +$inputfile =~ s/]*?)\s+d=\"(.*?)\"/']*?)\s*xlink:href="(.*?)"([^<>]*?)\/>/"<$1$2 $4>".fixGradient($3)."<\/$1>"/ieg; + +# restore "human readable" file layout +$inputfile =~ s/<(.*?)>/<$1>\n/g; +$inputfile =~ s/\n +/\n/g; + +print $inputfile; diff --git a/ComingNext_SkinFetcher/group/ABLD.BAT b/ComingNext_SkinFetcher/group/ABLD.BAT new file mode 100644 index 0000000..e69625c --- /dev/null +++ b/ComingNext_SkinFetcher/group/ABLD.BAT @@ -0,0 +1,15 @@ +@ECHO OFF + +REM Bldmake-generated batch file - ABLD.BAT +REM ** DO NOT EDIT ** + +perl -S ABLD.PL "\S60\Symbian\Carbide\workspace\ComingNext_SkinFetcher\group\\" %1 %2 %3 %4 %5 %6 %7 %8 %9 +if errorlevel==1 goto CheckPerl +goto End + +:CheckPerl +perl -v >NUL +if errorlevel==1 echo Is Perl, version 5.003_07 or later, installed? +goto End + +:End diff --git a/ComingNext_SkinFetcher/group/ComingNext_SkinFetcher.mmp b/ComingNext_SkinFetcher/group/ComingNext_SkinFetcher.mmp new file mode 100644 index 0000000..0326c1e --- /dev/null +++ b/ComingNext_SkinFetcher/group/ComingNext_SkinFetcher.mmp @@ -0,0 +1,43 @@ + +TARGET ComingNext_SkinFetcher.exe +UID 0x100039CE 0xE4914444 +VENDORID 0 +TARGETTYPE exe +EPOCSTACKSIZE 0x5000 + +SYSTEMINCLUDE \epoc32\include \epoc32\include\variant \epoc32\include\ecom +USERINCLUDE ..\inc ..\data + +SOURCEPATH ..\data +START RESOURCE ComingNext_SkinFetcher.rss +HEADER +TARGETPATH resource\apps +END //RESOURCE + +START RESOURCE ComingNext_SkinFetcher_reg.rss +TARGETPATH \private\10003a3f\apps +END //RESOURCE + +LIBRARY euser.lib apparc.lib cone.lib eikcore.lib avkon.lib +LIBRARY commonengine.lib efsrv.lib estor.lib eikcoctl.lib eikdlg.lib +LIBRARY eikctl.lib bafl.lib fbscli.lib aknnotify.lib aknicon.lib +LIBRARY etext.lib gdi.lib egul.lib insock.lib +LIBRARY ecom.lib InetProtUtil.lib http.lib esock.lib +LIBRARY aknskins.lib aknskinsrv.lib aknswallpaperutils.lib bitgdi.lib imageconversion.lib ws32.lib + +LANG 01 + +START BITMAP ComingNext_SkinFetcher.mbm +HEADER +TARGETPATH \resource\apps +SOURCEPATH ..\gfx +SOURCE c12,1 list_icon.bmp list_icon_mask.bmp +END + +SOURCEPATH ..\src + +#ifdef ENABLE_ABIV2_MODE +DEBUGGABLE_UDEBONLY +#endif + +SOURCE ComingNext_SkinFetcherContainerView.cpp ComingNext_SkinFetcherContainer.cpp ComingNext_SkinFetcherAppUi.cpp ComingNext_SkinFetcherApplication.cpp ComingNext_SkinFetcherDocument.cpp SkinFetcher.cpp diff --git a/ComingNext_SkinFetcher/group/Icons_aif_scalable_dc.mk b/ComingNext_SkinFetcher/group/Icons_aif_scalable_dc.mk new file mode 100644 index 0000000..93b540c --- /dev/null +++ b/ComingNext_SkinFetcher/group/Icons_aif_scalable_dc.mk @@ -0,0 +1,73 @@ +# ============================================================================ +# Name : Icons_aif_scalable_dc.mk +# Part of : ComingNext_SkinFetcher +# +# Description: +# +# ============================================================================ + + +ifeq (WINS,$(findstring WINS, $(PLATFORM))) +ZDIR=$(EPOCROOT)epoc32\release\$(PLATFORM)\$(CFG)\Z +else +ZDIR=$(EPOCROOT)epoc32\data\z +endif + + +# ---------------------------------------------------------------------------- +# TODO: Configure these +# ---------------------------------------------------------------------------- + +TARGETDIR=$(ZDIR)\resource\apps +ICONTARGETFILENAME=$(TARGETDIR)\ComingNext_SkinFetcher_aif.mif +HEADERDIR=$(EPOCROOT)epoc32\include +HEADERFILENAME=$(HEADERDIR)\ComingNext_SkinFetcher_aif.mbg + +ICONDIR=..\gfx + +do_nothing : + @rem do_nothing + +MAKMAKE : do_nothing + +BLD : do_nothing + +CLEAN : do_nothing + +LIB : do_nothing + +CLEANLIB : do_nothing + +# ---------------------------------------------------------------------------- +# TODO: Configure these. +# +# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by +# MifConv if the mask detph is defined. +# +# NOTE 2: Usually, source paths should not be included in the bitmap +# definitions. MifConv searches for the icons in all icon directories in a +# predefined order, which is currently \s60\icons, \s60\bitmaps2. +# The directory \s60\icons is included in the search only if the feature flag +# __SCALABLE_ICONS is defined. +# ---------------------------------------------------------------------------- +# NOTE: if you have JUSTINTIME enabled for your S60 3rd FP1 or newer SDK +# and this command crashes, consider adding "/X" to the command line. +# See +# ---------------------------------------------------------------------------- + +RESOURCE : $(ICONTARGETFILENAME) + +$(ICONTARGETFILENAME) : $(ICONDIR)\qgn_menu_ComingNext_SkinFetcher.svg + mifconv $(ICONTARGETFILENAME) \ + /H$(HEADERFILENAME) \ + /c32,8 $(ICONDIR)\qgn_menu_ComingNext_SkinFetcher.svg + +FREEZE : do_nothing + +SAVESPACE : do_nothing + +RELEASABLES : + @echo $(ICONTARGETFILENAME) + +FINAL : do_nothing + diff --git a/ComingNext_SkinFetcher/group/bld.inf b/ComingNext_SkinFetcher/group/bld.inf new file mode 100644 index 0000000..71808a3 --- /dev/null +++ b/ComingNext_SkinFetcher/group/bld.inf @@ -0,0 +1,12 @@ + +PRJ_PLATFORMS +WINSCW ARMV5 GCCE + +PRJ_EXPORTS + +PRJ_MMPFILES + +gnumakefile icons_aif_scalable_dc.mk + + +ComingNext_SkinFetcher.mmp diff --git a/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcher.hrh b/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcher.hrh new file mode 100644 index 0000000..7fad31a --- /dev/null +++ b/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcher.hrh @@ -0,0 +1,12 @@ +/* + ======================================================================== + Name : ComingNext_SkinFetcher.hrh + Author : Michael Prager + Copyright : Licensed under GPLv3 + Description : + ======================================================================== + */ +enum TComingNext_SkinFetcherViewUids +{ + EComingNext_SkinFetcherContainerViewId = 1 +}; diff --git a/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcher.pan b/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcher.pan new file mode 100644 index 0000000..a76c1ce --- /dev/null +++ b/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcher.pan @@ -0,0 +1,17 @@ +#ifndef COMINGNEXT_SKINFETCHER_PAN_H +#define COMINGNEXT_SKINFETCHER_PAN_H + +/** ComingNext_SkinFetcher application panic codes */ +enum TComingNext_SkinFetcherPanics +{ + EComingNext_SkinFetcherUi = 1 +// add further panics here +}; + +inline void Panic(TComingNext_SkinFetcherPanics aReason) +{ + _LIT(applicationName, "ComingNext_SkinFetcher"); + User::Panic(applicationName, aReason); +} + +#endif // COMINGNEXT_SKINFETCHER_PAN_H diff --git a/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherAppUi.h b/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherAppUi.h new file mode 100644 index 0000000..9181dc1 --- /dev/null +++ b/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherAppUi.h @@ -0,0 +1,63 @@ +/* + ======================================================================== + Name : ComingNext_SkinFetcherAppUi.h + Author : Michael Prager + Copyright : Licensed under GPLv3 + Description : + ======================================================================== + */ +#ifndef COMINGNEXT_SKINFETCHERAPPUI_H +#define COMINGNEXT_SKINFETCHERAPPUI_H + +// [[[ begin generated region: do not modify [Generated Includes] +#include +// ]]] end generated region [Generated Includes] + +// [[[ begin generated region: do not modify [Generated Forward Declarations] +class CComingNext_SkinFetcherContainerView; +// ]]] end generated region [Generated Forward Declarations] + +/** + * @class CComingNext_SkinFetcherAppUi ComingNext_SkinFetcherAppUi.h + * @brief The AppUi class handles application-wide aspects of the user interface, including + * view management and the default menu, control pane, and status pane. + */ +class CComingNext_SkinFetcherAppUi: public CAknViewAppUi +{ +public: + // constructor and destructor + CComingNext_SkinFetcherAppUi(); + virtual ~CComingNext_SkinFetcherAppUi(); + void ConstructL(); + +public: + // from CCoeAppUi + TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); + + // from CEikAppUi + void HandleCommandL(TInt aCommand); + void HandleResourceChangeL(TInt aType); + + // from CAknAppUi + void HandleViewDeactivation(const TVwsViewId& aViewIdToBeDeactivated, + const TVwsViewId& aNewlyActivatedViewId); + +private: + void InitializeContainersL(); + // [[[ begin generated region: do not modify [Generated Methods] +public: + // ]]] end generated region [Generated Methods] + + // [[[ begin generated region: do not modify [Generated Instance Variables] +private: + CComingNext_SkinFetcherContainerView* iComingNext_SkinFetcherContainerView; + // ]]] end generated region [Generated Instance Variables] + + + // [[[ begin [User Handlers] +protected: + // ]]] end [User Handlers] + +}; + +#endif // COMINGNEXT_SKINFETCHERAPPUI_H diff --git a/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherApplication.h b/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherApplication.h new file mode 100644 index 0000000..717c962 --- /dev/null +++ b/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherApplication.h @@ -0,0 +1,35 @@ +/* + ======================================================================== + Name : ComingNext_SkinFetcherApplication.h + Author : Michael Prager + Copyright : Licensed under GPLv3 + Description : + ======================================================================== + */ +#ifndef COMINGNEXT_SKINFETCHERAPPLICATION_H +#define COMINGNEXT_SKINFETCHERAPPLICATION_H + +// [[[ begin generated region: do not modify [Generated Includes] +#include +// ]]] end generated region [Generated Includes] + +// [[[ begin generated region: do not modify [Generated Constants] +const TUid KUidComingNext_SkinFetcherApplication = { 0xE4914444 }; +// ]]] end generated region [Generated Constants] + +/** + * + * @class CComingNext_SkinFetcherApplication ComingNext_SkinFetcherApplication.h + * @brief A CAknApplication-derived class is required by the S60 application + * framework. It is subclassed to create the application's document + * object. + */ +class CComingNext_SkinFetcherApplication: public CAknApplication +{ +private: + TUid AppDllUid() const; + CApaDocument* CreateDocumentL(); + +}; + +#endif // COMINGNEXT_SKINFETCHERAPPLICATION_H diff --git a/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherContainer.h b/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherContainer.h new file mode 100644 index 0000000..c419208 --- /dev/null +++ b/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherContainer.h @@ -0,0 +1,100 @@ +/* + ======================================================================== + Name : ComingNext_SkinFetcherContainer.h + Author : Michael Prager + Copyright : Licensed under GPLv3 + Description : + ======================================================================== + */ +#ifndef COMINGNEXT_SKINFETCHERCONTAINER_H +#define COMINGNEXT_SKINFETCHERCONTAINER_H + +// [[[ begin generated region: do not modify [Generated Includes] +#include +// ]]] end generated region [Generated Includes] + + +// [[[ begin [Event Handler Includes] +// ]]] end [Event Handler Includes] + +// [[[ begin generated region: do not modify [Generated Forward Declarations] +class MEikCommandObserver; +class CEikLabel; +// ]]] end generated region [Generated Forward Declarations] + +/** + * Container class for ComingNext_SkinFetcherContainer + * + * @class CComingNext_SkinFetcherContainer ComingNext_SkinFetcherContainer.h + */ +class CComingNext_SkinFetcherContainer: public CCoeControl +{ +public: + // constructors and destructor + CComingNext_SkinFetcherContainer(); + static CComingNext_SkinFetcherContainer* NewL(const TRect& aRect, + const CCoeControl* aParent, MEikCommandObserver* aCommandObserver); + static CComingNext_SkinFetcherContainer* NewLC(const TRect& aRect, + const CCoeControl* aParent, MEikCommandObserver* aCommandObserver); + void ConstructL(const TRect& aRect, const CCoeControl* aParent, + MEikCommandObserver* aCommandObserver); + virtual ~CComingNext_SkinFetcherContainer(); + +public: + // from base class CCoeControl + TInt CountComponentControls() const; + CCoeControl* ComponentControl(TInt aIndex) const; + TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); + void HandleResourceChange(TInt aType); + +protected: + // from base class CCoeControl + void SizeChanged(); + +private: + // from base class CCoeControl + void Draw(const TRect& aRect) const; + +private: + void InitializeControlsL(); + void LayoutControls(); + CCoeControl* iFocusControl; + MEikCommandObserver* iCommandObserver; + // [[[ begin generated region: do not modify [Generated Methods] +public: + // ]]] end generated region [Generated Methods] + + // [[[ begin generated region: do not modify [Generated Type Declarations] +public: + // ]]] end generated region [Generated Type Declarations] + + // [[[ begin generated region: do not modify [Generated Instance Variables] +private: + CEikLabel* iLabel1; + // ]]] end generated region [Generated Instance Variables] + + + // [[[ begin [Overridden Methods] +protected: + // ]]] end [Overridden Methods] + + + // [[[ begin [User Handlers] +protected: + // ]]] end [User Handlers] + +public: + enum TControls + { + // [[[ begin generated region: do not modify [Generated Contents] + ELabel1, + + // ]]] end generated region [Generated Contents] + + // add any user-defined entries here... + + ELastControl + }; +}; + +#endif // COMINGNEXT_SKINFETCHERCONTAINER_H diff --git a/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherContainer.hrh b/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherContainer.hrh new file mode 100644 index 0000000..7f8806f --- /dev/null +++ b/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherContainer.hrh @@ -0,0 +1,12 @@ +/* +======================================================================== + Name : ComingNext_SkinFetcherContainer.hrh + Author : Michael Prager + Copyright : Licensed under GPLv3 + Description : +======================================================================== +*/ +enum TComingNext_SkinFetcherContainerViewCommands + { + EComingNext_SkinFetcherContainerViewControlPaneLeftId = 0x6000 + }; diff --git a/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherContainerView.h b/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherContainerView.h new file mode 100644 index 0000000..6801899 --- /dev/null +++ b/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherContainerView.h @@ -0,0 +1,114 @@ +/* + ======================================================================== + Name : ComingNext_SkinFetcherContainerView.h + Author : Michael Prager + Copyright : Licensed under GPLv3 + Description : + ======================================================================== + */ +#ifndef COMINGNEXT_SKINFETCHERCONTAINERVIEW_H +#define COMINGNEXT_SKINFETCHERCONTAINERVIEW_H + +// [[[ begin generated region: do not modify [Generated Includes] +#include +// ]]] end generated region [Generated Includes] + + +// [[[ begin [Event Handler Includes] +// ]]] end [Event Handler Includes] + +// [[[ begin generated region: do not modify [Generated Constants] +// ]]] end generated region [Generated Constants] + +// [[[ begin generated region: do not modify [Generated Forward Declarations] +class CComingNext_SkinFetcherContainer; +// ]]] end generated region [Generated Forward Declarations] + +/** + * Avkon view class for ComingNext_SkinFetcherContainerView. It is register with the view server + * by the AppUi. It owns the container control. + * @class CComingNext_SkinFetcherContainerView ComingNext_SkinFetcherContainerView.h + */ + +class CComingNext_SkinFetcherContainerView: public CAknView +{ + + // [[[ begin [Public Section] +public: + // constructors and destructor + CComingNext_SkinFetcherContainerView(); + static CComingNext_SkinFetcherContainerView* NewL(); + static CComingNext_SkinFetcherContainerView* NewLC(); + void ConstructL(); + virtual ~CComingNext_SkinFetcherContainerView(); + + // from base class CAknView + TUid Id() const; + void HandleCommandL(TInt aCommand); + + // [[[ begin generated region: do not modify [Generated Methods] + CComingNext_SkinFetcherContainer* CreateContainerL(); + static void CreateListQuery1ItemL( + TDes& aBuffer, + + const TDesC& aMainText ); + static void CreateListQuery1ResourceArrayItemL( + TDes& aBuffer, + TInt aResourceId ); + static CDesCArray* InitializeListQuery1LC(); + static CArrayPtr< CGulIcon >* SetupListQuery1IconsLC(); + static TInt RunListQuery1L( + const TDesC* aOverrideText = NULL, + CDesCArray* aOverrideItemArray = NULL, + CArrayPtr< CGulIcon >* aOverrideIconArray = NULL ); + static void RunNote1L( const TDesC* aOverrideText = NULL ); + // ]]] end generated region [Generated Methods] + + // ]]] end [Public Section] + + + // [[[ begin [Protected Section] +protected: + // from base class CAknView + void DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId, + const TDesC8& aCustomMessage); + void DoDeactivate(); + void HandleStatusPaneSizeChange(); + + // [[[ begin generated region: do not modify [Overridden Methods] + // ]]] end generated region [Overridden Methods] + + + // [[[ begin [User Handlers] + TBool HandleControlPaneLeftSoftKeyPressedL( TInt aCommand ); + TBool HandleControlPaneRightSoftKeyPressedL( TInt aCommand ); + // ]]] end [User Handlers] + + // ]]] end [Protected Section] + + + // [[[ begin [Private Section] +private: + void SetupStatusPaneL(); + void CleanupStatusPane(); + + // [[[ begin generated region: do not modify [Generated Instance Variables] + CComingNext_SkinFetcherContainer* iComingNext_SkinFetcherContainer; + // ]]] end generated region [Generated Instance Variables] + + // [[[ begin generated region: do not modify [Generated Methods] + // ]]] end generated region [Generated Methods] + + // ]]] end [Private Section] + + enum TListQuery1Images + { + // [[[ begin generated region: do not modify [Generated Enums] + EListQuery1FirstUserImageIndex + + // ]]] end generated region [Generated Enums] + + }; +}; + +#endif // COMINGNEXT_SKINFETCHERCONTAINERVIEW_H diff --git a/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherDocument.h b/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherDocument.h new file mode 100644 index 0000000..82df349 --- /dev/null +++ b/ComingNext_SkinFetcher/inc/ComingNext_SkinFetcherDocument.h @@ -0,0 +1,36 @@ +/* + ======================================================================== + Name : ComingNext_SkinFetcherDocument.h + Author : Michael Prager + Copyright : Licensed under GPLv3 + Description : + ======================================================================== + */ +#ifndef COMINGNEXT_SKINFETCHERDOCUMENT_H +#define COMINGNEXT_SKINFETCHERDOCUMENT_H + +#include + +class CEikAppUi; + +/** + * @class CComingNext_SkinFetcherDocument ComingNext_SkinFetcherDocument.h + * @brief A CAknDocument-derived class is required by the S60 application + * framework. It is responsible for creating the AppUi object. + */ +class CComingNext_SkinFetcherDocument: public CAknDocument +{ +public: + // constructor + static CComingNext_SkinFetcherDocument* NewL(CEikApplication& aApp); + +private: + // constructors + CComingNext_SkinFetcherDocument(CEikApplication& aApp); + void ConstructL(); + +public: + // from base class CEikDocument + CEikAppUi* CreateAppUiL(); +}; +#endif // COMINGNEXT_SKINFETCHERDOCUMENT_H diff --git a/ComingNext_SkinFetcher/inc/SkinFetcher.h b/ComingNext_SkinFetcher/inc/SkinFetcher.h new file mode 100644 index 0000000..b96809e --- /dev/null +++ b/ComingNext_SkinFetcher/inc/SkinFetcher.h @@ -0,0 +1,61 @@ +/* + ============================================================================ + Name : SkinFetcher.h + Author : Michael Prager + Version : 1.0 + Copyright : Licensed under GPLv3 + Description : CSkinFetcher declaration + ============================================================================ + */ + +#ifndef SKINFETCHER_H +#define SKINFETCHER_H + +// INCLUDES +#include +#include +#include + +// CLASS DECLARATION + +/** + * CSkinFetcher + * + */ +class CSkinFetcher : public CBase + { +public: + // Constructors and destructor + + /** + * Destructor. + */ + ~CSkinFetcher(); + + /** + * Two-phased constructor. + */ + static CSkinFetcher* NewL(); + + /** + * Two-phased constructor. + */ + static CSkinFetcher* NewLC(); + + static void GenerateBackgroundImage(TInt aPosition, CAknAppUiBase::TAppUiOrientation aOrientation); + +private: + + /** + * Constructor for performing 1st stage construction + */ + CSkinFetcher(); + + /** + * EPOC default constructor for performing 2nd stage construction + */ + void ConstructL(); + + }; + +#endif // SKINFETCHER_H diff --git a/ComingNext_SkinFetcher/sis/ComingNext_SkinFetcher.pkg b/ComingNext_SkinFetcher/sis/ComingNext_SkinFetcher.pkg new file mode 100644 index 0000000..7d07e19 --- /dev/null +++ b/ComingNext_SkinFetcher/sis/ComingNext_SkinFetcher.pkg @@ -0,0 +1,36 @@ +; ComingNext_SkinFetcher.pkg +; This is an auto-generated PKG file by Carbide. +; This file uses variables specific to Carbide builds that will not work +; on command-line builds. If you want to use this generated PKG file from the +; command-line tools you will need to modify the variables with the appropriate +; values: $(EPOCROOT), $(PLATFORM), $(TARGET) +; Also, the resource file entries should be changed to match the language +; used in the build. For example, if building for LANGUAGE_01, change the file +; extensions .rsc to .r01. +; +;Language - standard language definitions +&EN + +; standard SIS file header +#{"ComingNext Skin Fetcher"},(0xE4914444),1,0,0 + +;Localised Vendor name +%{"Michael Prager"} + +;Unique Vendor name +:"Michael Prager" + +;Supports S60 release 5.0 +[0x1028315F], 0, 0, 0, {"Series60ProductID"} + +;Files to install +;You should change the source paths to match that of your environment +; +"$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\ComingNext_SkinFetcher.exe" -"!:\sys\bin\ComingNext_SkinFetcher.exe" +"$(EPOCROOT)Epoc32\data\z\resource\apps\ComingNext_SkinFetcher.r01" -"!:\resource\apps\ComingNext_SkinFetcher.r01" +"$(EPOCROOT)Epoc32\data\z\private\10003a3f\apps\ComingNext_SkinFetcher_reg.r01" -"!:\private\10003a3f\import\apps\ComingNext_SkinFetcher_reg.r01" +"$(EPOCROOT)epoc32\data\z\resource\apps\ComingNext_SkinFetcher_aif.mif" -"!:\resource\apps\ComingNext_SkinFetcher_aif.mif" +"$(EPOCROOT)epoc32\data\z\resource\apps\ComingNext_SkinFetcher.mbm" -"!:\resource\apps\ComingNext_SkinFetcher.mbm" +; Add any installation notes if applicable +;"ComingNext_SkinFetcher.txt" -"!:\private\0xE4914444\ComingNext_SkinFetcher.txt" + diff --git a/ComingNext_SkinFetcher/sis/backup_registration.xml b/ComingNext_SkinFetcher/sis/backup_registration.xml new file mode 100644 index 0000000..9da7a0e --- /dev/null +++ b/ComingNext_SkinFetcher/sis/backup_registration.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/ComingNext_SkinFetcher/src/ComingNext_SkinFetcherAppUi.cpp b/ComingNext_SkinFetcher/src/ComingNext_SkinFetcherAppUi.cpp new file mode 100644 index 0000000..ec6cd8a --- /dev/null +++ b/ComingNext_SkinFetcher/src/ComingNext_SkinFetcherAppUi.cpp @@ -0,0 +1,143 @@ +/* + ======================================================================== + Name : ComingNext_SkinFetcherAppUi.cpp + Author : Michael Prager + Copyright : Licensed under GPLv3 + Description : + ======================================================================== + */ +// [[[ begin generated region: do not modify [Generated System Includes] +#include +#include +#include +#include +// ]]] end generated region [Generated System Includes] + +// [[[ begin generated region: do not modify [Generated User Includes] +#include "ComingNext_SkinFetcherAppUi.h" +#include "ComingNext_SkinFetcher.hrh" +#include "ComingNext_SkinFetcherContainerView.h" +// ]]] end generated region [Generated User Includes] + +// [[[ begin generated region: do not modify [Generated Constants] +// ]]] end generated region [Generated Constants] + +/** + * Construct the CComingNext_SkinFetcherAppUi instance + */ +CComingNext_SkinFetcherAppUi::CComingNext_SkinFetcherAppUi() +{ + // [[[ begin generated region: do not modify [Generated Contents] + // ]]] end generated region [Generated Contents] + +} + +/** + * The appui's destructor removes the container from the control + * stack and destroys it. + */ +CComingNext_SkinFetcherAppUi::~CComingNext_SkinFetcherAppUi() +{ + // [[[ begin generated region: do not modify [Generated Contents] + // ]]] end generated region [Generated Contents] + +} + +// [[[ begin generated function: do not modify +void CComingNext_SkinFetcherAppUi::InitializeContainersL() +{ + iComingNext_SkinFetcherContainerView + = CComingNext_SkinFetcherContainerView::NewL(); + AddViewL(iComingNext_SkinFetcherContainerView); + SetDefaultViewL(*iComingNext_SkinFetcherContainerView); +} +// ]]] end generated function + +/** + * Handle a command for this appui (override) + * @param aCommand command id to be handled + */ +void CComingNext_SkinFetcherAppUi::HandleCommandL(TInt aCommand) +{ + // [[[ begin generated region: do not modify [Generated Code] + TBool commandHandled = EFalse; + switch (aCommand) + { // code to dispatch to the AppUi's menu and CBA commands is generated here + + case EAknSoftkeyOk: + break; + + case EAknSoftkeyExit: + break; + default: + break; + } + + if (!commandHandled) + { + if (aCommand == EAknSoftkeyExit || aCommand == EEikCmdExit) + { + Exit(); + } + } + // ]]] end generated region [Generated Code] + +} + +/** + * Override of the HandleResourceChangeL virtual function + */ +void CComingNext_SkinFetcherAppUi::HandleResourceChangeL(TInt aType) +{ + CAknViewAppUi::HandleResourceChangeL(aType); + // [[[ begin generated region: do not modify [Generated Code] + // ]]] end generated region [Generated Code] + +} + +/** + * Override of the HandleKeyEventL virtual function + * @return EKeyWasConsumed if event was handled, EKeyWasNotConsumed if not + * @param aKeyEvent + * @param aType + */ +TKeyResponse CComingNext_SkinFetcherAppUi::HandleKeyEventL( + const TKeyEvent& aKeyEvent, TEventCode aType) +{ + // The inherited HandleKeyEventL is private and cannot be called + // [[[ begin generated region: do not modify [Generated Contents] + // ]]] end generated region [Generated Contents] + + return EKeyWasNotConsumed; +} + +/** + * Override of the HandleViewDeactivation virtual function + * + * @param aViewIdToBeDeactivated + * @param aNewlyActivatedViewId + */ +void CComingNext_SkinFetcherAppUi::HandleViewDeactivation( + const TVwsViewId& aViewIdToBeDeactivated, + const TVwsViewId& aNewlyActivatedViewId) +{ + CAknViewAppUi::HandleViewDeactivation(aViewIdToBeDeactivated, + aNewlyActivatedViewId); + // [[[ begin generated region: do not modify [Generated Contents] + // ]]] end generated region [Generated Contents] + +} + +/** + * @brief Completes the second phase of Symbian object construction. + * Put initialization code that could leave here. + */ +void CComingNext_SkinFetcherAppUi::ConstructL() +{ + // [[[ begin generated region: do not modify [Generated Contents] + + BaseConstructL(EAknEnableSkin | EAknEnableMSK); + InitializeContainersL(); + // ]]] end generated region [Generated Contents] + +} diff --git a/ComingNext_SkinFetcher/src/ComingNext_SkinFetcherApplication.cpp b/ComingNext_SkinFetcher/src/ComingNext_SkinFetcherApplication.cpp new file mode 100644 index 0000000..5f269a8 --- /dev/null +++ b/ComingNext_SkinFetcher/src/ComingNext_SkinFetcherApplication.cpp @@ -0,0 +1,77 @@ +/* + ======================================================================== + Name : ComingNext_SkinFetcherApplication.cpp + Author : Michael Prager + Copyright : Licensed under GPLv3 + Description : + ======================================================================== + */ +// [[[ begin generated region: do not modify [Generated System Includes] +// ]]] end generated region [Generated System Includes] + +// [[[ begin generated region: do not modify [Generated Includes] +#include "ComingNext_SkinFetcherApplication.h" +#include "ComingNext_SkinFetcherDocument.h" +#ifdef EKA2 +#include +#endif +// ]]] end generated region [Generated Includes] + +/** + * @brief Returns the application's UID (override from CApaApplication::AppDllUid()) + * @return UID for this application (KUidComingNext_SkinFetcherApplication) + */ +TUid CComingNext_SkinFetcherApplication::AppDllUid() const +{ + return KUidComingNext_SkinFetcherApplication; +} + +/** + * @brief Creates the application's document (override from CApaApplication::CreateDocumentL()) + * @return Pointer to the created document object (CComingNext_SkinFetcherDocument) + */ +CApaDocument* CComingNext_SkinFetcherApplication::CreateDocumentL() +{ + return CComingNext_SkinFetcherDocument::NewL(*this); +} + +#ifdef EKA2 + +/** + * @brief Called by the application framework to construct the application object + * @return The application (CComingNext_SkinFetcherApplication) + */ +LOCAL_C CApaApplication* NewApplication() +{ + return new CComingNext_SkinFetcherApplication; +} + +/** + * @brief This standard export is the entry point for all Series 60 applications + * @return error code + */ +GLDEF_C TInt E32Main() +{ + return EikStart::RunApplication(NewApplication); +} + +#else // Series 60 2.x main DLL program code +/** + * @brief This standard export constructs the application object. + * @return The application (CComingNext_SkinFetcherApplication) + */ +EXPORT_C CApaApplication* NewApplication() +{ + return new CComingNext_SkinFetcherApplication; +} + +/** + * @brief This standard export is the entry point for all Series 60 applications + * @return error code + */ +GLDEF_C TInt E32Dll(TDllReason /*reason*/) +{ + return KErrNone; +} + +#endif // EKA2 diff --git a/ComingNext_SkinFetcher/src/ComingNext_SkinFetcherContainer.cpp b/ComingNext_SkinFetcher/src/ComingNext_SkinFetcherContainer.cpp new file mode 100644 index 0000000..0fb341c --- /dev/null +++ b/ComingNext_SkinFetcher/src/ComingNext_SkinFetcherContainer.cpp @@ -0,0 +1,238 @@ +/* + ======================================================================== + Name : ComingNext_SkinFetcherContainer.cpp + Author : Michael Prager + Copyright : Licensed under GPLv3 + Description : + ======================================================================== + */ +// [[[ begin generated region: do not modify [Generated System Includes] +#include +#include +#include +#include +#include +#include +#include +// ]]] end generated region [Generated System Includes] + +// [[[ begin generated region: do not modify [Generated User Includes] +#include "ComingNext_SkinFetcherContainer.h" +#include "ComingNext_SkinFetcherContainerView.h" +#include "ComingNext_SkinFetcher.hrh" +#include "ComingNext_SkinFetcherContainer.hrh" +// ]]] end generated region [Generated User Includes] + +// [[[ begin generated region: do not modify [Generated Constants] +// ]]] end generated region [Generated Constants] + +/** + * First phase of Symbian two-phase construction. Should not + * contain any code that could leave. + */ +CComingNext_SkinFetcherContainer::CComingNext_SkinFetcherContainer() +{ + // [[[ begin generated region: do not modify [Generated Contents] + iLabel1 = NULL; + // ]]] end generated region [Generated Contents] + +} +/** + * Destroy child controls. + */ +CComingNext_SkinFetcherContainer::~CComingNext_SkinFetcherContainer() +{ + // [[[ begin generated region: do not modify [Generated Contents] + delete iLabel1; + iLabel1 = NULL; + // ]]] end generated region [Generated Contents] + +} + +/** + * Construct the control (first phase). + * Creates an instance and initializes it. + * Instance is not left on cleanup stack. + * @param aRect bounding rectangle + * @param aParent owning parent, or NULL + * @param aCommandObserver command observer + * @return initialized instance of CComingNext_SkinFetcherContainer + */ +CComingNext_SkinFetcherContainer* CComingNext_SkinFetcherContainer::NewL( + const TRect& aRect, const CCoeControl* aParent, + MEikCommandObserver* aCommandObserver) +{ + CComingNext_SkinFetcherContainer* self = + CComingNext_SkinFetcherContainer::NewLC(aRect, aParent, + aCommandObserver); + CleanupStack::Pop(self); + return self; +} + +/** + * Construct the control (first phase). + * Creates an instance and initializes it. + * Instance is left on cleanup stack. + * @param aRect The rectangle for this window + * @param aParent owning parent, or NULL + * @param aCommandObserver command observer + * @return new instance of CComingNext_SkinFetcherContainer + */ +CComingNext_SkinFetcherContainer* CComingNext_SkinFetcherContainer::NewLC( + const TRect& aRect, const CCoeControl* aParent, + MEikCommandObserver* aCommandObserver) +{ + CComingNext_SkinFetcherContainer* self = + new (ELeave) CComingNext_SkinFetcherContainer(); + CleanupStack::PushL(self); + self->ConstructL(aRect, aParent, aCommandObserver); + return self; +} + +/** + * Construct the control (second phase). + * Creates a window to contain the controls and activates it. + * @param aRect bounding rectangle + * @param aCommandObserver command observer + * @param aParent owning parent, or NULL + */ +void CComingNext_SkinFetcherContainer::ConstructL(const TRect& aRect, + const CCoeControl* aParent, MEikCommandObserver* aCommandObserver) +{ + if (aParent == NULL) + { + CreateWindowL(); + } + else + { + SetContainerWindowL(*aParent); + } + iFocusControl = NULL; + iCommandObserver = aCommandObserver; + InitializeControlsL(); + SetRect(aRect); + ActivateL(); + // [[[ begin generated region: do not modify [Post-ActivateL initializations] + // ]]] end generated region [Post-ActivateL initializations] + +} + +/** + * Return the number of controls in the container (override) + * @return count + */ +TInt CComingNext_SkinFetcherContainer::CountComponentControls() const +{ + return (int) ELastControl; +} + +/** + * Get the control with the given index (override) + * @param aIndex Control index [0...n) (limited by #CountComponentControls) + * @return Pointer to control + */ +CCoeControl* CComingNext_SkinFetcherContainer::ComponentControl(TInt aIndex) const +{ + // [[[ begin generated region: do not modify [Generated Contents] + switch ( aIndex ) + { + case ELabel1: + return iLabel1; + } + // ]]] end generated region [Generated Contents] + + // handle any user controls here... + + return NULL; +} + +/** + * Handle resizing of the container. This implementation will lay out + * full-sized controls like list boxes for any screen size, and will layout + * labels, editors, etc. to the size they were given in the UI designer. + * This code will need to be modified to adjust arbitrary controls to + * any screen size. + */ +void CComingNext_SkinFetcherContainer::SizeChanged() +{ + CCoeControl::SizeChanged(); + LayoutControls(); + // [[[ begin generated region: do not modify [Generated Contents] + + // ]]] end generated region [Generated Contents] + +} + +// [[[ begin generated function: do not modify +/** + * Layout components as specified in the UI Designer + */ +void CComingNext_SkinFetcherContainer::LayoutControls() + { + iLabel1->SetExtent( TPoint( 19, 19 ), TSize( 323, 312 ) ); + } +// ]]] end generated function + +/** + * Handle key events. + */ +TKeyResponse CComingNext_SkinFetcherContainer::OfferKeyEventL( + const TKeyEvent& aKeyEvent, TEventCode aType) +{ + // [[[ begin generated region: do not modify [Generated Contents] + + // ]]] end generated region [Generated Contents] + + if (iFocusControl != NULL + && iFocusControl->OfferKeyEventL(aKeyEvent, aType) + == EKeyWasConsumed) + { + return EKeyWasConsumed; + } + return CCoeControl::OfferKeyEventL(aKeyEvent, aType); +} + +// [[[ begin generated function: do not modify +/** + * Initialize each control upon creation. + */ +void CComingNext_SkinFetcherContainer::InitializeControlsL() + { + iLabel1 = new ( ELeave ) CEikLabel; + iLabel1->SetContainerWindowL( *this ); + { + TResourceReader reader; + iEikonEnv->CreateResourceReaderLC( reader, R_COMING_NEXT_SKIN_FETCHER_CONTAINER_LABEL1 ); + iLabel1->ConstructFromResourceL( reader ); + CleanupStack::PopAndDestroy(); // reader internal state + } + + } +// ]]] end generated function + +/** + * Handle global resource changes, such as scalable UI or skin events (override) + */ +void CComingNext_SkinFetcherContainer::HandleResourceChange(TInt aType) +{ + CCoeControl::HandleResourceChange(aType); + SetRect(iAvkonViewAppUi->View(TUid::Uid( + EComingNext_SkinFetcherContainerViewId))->ClientRect()); + // [[[ begin generated region: do not modify [Generated Contents] + // ]]] end generated region [Generated Contents] + +} + +/** + * Draw container contents. + */ +void CComingNext_SkinFetcherContainer::Draw(const TRect& aRect) const +{ + // [[[ begin generated region: do not modify [Generated Contents] + CWindowGc& gc = SystemGc(); + gc.Clear( aRect ); + + // ]]] end generated region [Generated Contents] + +} + diff --git a/ComingNext_SkinFetcher/src/ComingNext_SkinFetcherContainerView.cpp b/ComingNext_SkinFetcher/src/ComingNext_SkinFetcherContainerView.cpp new file mode 100644 index 0000000..8c2a671 --- /dev/null +++ b/ComingNext_SkinFetcher/src/ComingNext_SkinFetcherContainerView.cpp @@ -0,0 +1,471 @@ +/* + ======================================================================== + Name : ComingNext_SkinFetcherContainerView.cpp + Author : Michael Prager + Copyright : Licensed under GPLv3 + Description : + ======================================================================== + */ +// [[[ begin generated region: do not modify [Generated System Includes] +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +// ]]] end generated region [Generated System Includes] + +// [[[ begin generated region: do not modify [Generated User Includes] + +#include "ComingNext_SkinFetcher.hrh" +#include "ComingNext_SkinFetcherContainerView.h" +#include "ComingNext_SkinFetcherContainer.hrh" +#include "ComingNext_SkinFetcherContainer.h" +// ]]] end generated region [Generated User Includes] + +// [[[ begin generated region: do not modify [Generated Constants] +// ]]] end generated region [Generated Constants] + +#include "SkinFetcher.h" + +/** + * First phase of Symbian two-phase construction. Should not contain any + * code that could leave. + */ +CComingNext_SkinFetcherContainerView::CComingNext_SkinFetcherContainerView() +{ + // [[[ begin generated region: do not modify [Generated Contents] + iComingNext_SkinFetcherContainer = NULL; + // ]]] end generated region [Generated Contents] + +} + +/** + * The view's destructor removes the container from the control + * stack and destroys it. + */ +CComingNext_SkinFetcherContainerView::~CComingNext_SkinFetcherContainerView() +{ + // [[[ begin generated region: do not modify [Generated Contents] + delete iComingNext_SkinFetcherContainer; + iComingNext_SkinFetcherContainer = NULL; + // ]]] end generated region [Generated Contents] + +} + +/** + * Symbian two-phase constructor. + * This creates an instance then calls the second-phase constructor + * without leaving the instance on the cleanup stack. + * @return new instance of CComingNext_SkinFetcherContainerView + */ +CComingNext_SkinFetcherContainerView* CComingNext_SkinFetcherContainerView::NewL() +{ + CComingNext_SkinFetcherContainerView* self = + CComingNext_SkinFetcherContainerView::NewLC(); + CleanupStack::Pop(self); + return self; +} + +/** + * Symbian two-phase constructor. + * This creates an instance, pushes it on the cleanup stack, + * then calls the second-phase constructor. + * @return new instance of CComingNext_SkinFetcherContainerView + */ +CComingNext_SkinFetcherContainerView* CComingNext_SkinFetcherContainerView::NewLC() +{ + CComingNext_SkinFetcherContainerView* self = + new (ELeave) CComingNext_SkinFetcherContainerView(); + CleanupStack::PushL(self); + self->ConstructL(); + return self; +} + +/** + * Second-phase constructor for view. + * Initialize contents from resource. + */ +void CComingNext_SkinFetcherContainerView::ConstructL() +{ + // [[[ begin generated region: do not modify [Generated Code] + BaseConstructL( R_COMING_NEXT_SKIN_FETCHER_CONTAINER_COMING_NEXT_SKIN_FETCHER_CONTAINER_VIEW_2 ); + + // ]]] end generated region [Generated Code] + + // add your own initialization code here + +} + +/** + * @return The UID for this view + */ +TUid CComingNext_SkinFetcherContainerView::Id() const +{ + return TUid::Uid(EComingNext_SkinFetcherContainerViewId); +} + +/** + * Handle a command for this view (override) + * @param aCommand command id to be handled + */ +void CComingNext_SkinFetcherContainerView::HandleCommandL(TInt aCommand) +{ + // [[[ begin generated region: do not modify [Generated Code] + TBool commandHandled = EFalse; + switch ( aCommand ) + { // code to dispatch to the AknView's menu and CBA commands is generated here + + case EComingNext_SkinFetcherContainerViewControlPaneLeftId: + commandHandled = HandleControlPaneLeftSoftKeyPressedL( aCommand ); + break; + + case EAknSoftkeyExit: + commandHandled = HandleControlPaneRightSoftKeyPressedL( aCommand ); + break; + default: + break; + } + + + if ( !commandHandled ) + { + + if ( aCommand == EAknSoftkeyExit ) + { + AppUi()->HandleCommandL( EEikCmdExit ); + } + + } + // ]]] end generated region [Generated Code] + +} + +/** + * Handles user actions during activation of the view, + * such as initializing the content. + */ +void CComingNext_SkinFetcherContainerView::DoActivateL( + const TVwsViewId& /*aPrevViewId*/, TUid /*aCustomMessageId*/, + const TDesC8& /*aCustomMessage*/) +{ + // [[[ begin generated region: do not modify [Generated Contents] + SetupStatusPaneL(); + + + + + if ( iComingNext_SkinFetcherContainer == NULL ) + { + iComingNext_SkinFetcherContainer = CreateContainerL(); + iComingNext_SkinFetcherContainer->SetMopParent( this ); + AppUi()->AddToStackL( *this, iComingNext_SkinFetcherContainer ); + } + // ]]] end generated region [Generated Contents] + +} + +/** + */ +void CComingNext_SkinFetcherContainerView::DoDeactivate() +{ + // [[[ begin generated region: do not modify [Generated Contents] + CleanupStatusPane(); + + if ( iComingNext_SkinFetcherContainer != NULL ) + { + AppUi()->RemoveFromViewStack( *this, iComingNext_SkinFetcherContainer ); + delete iComingNext_SkinFetcherContainer; + iComingNext_SkinFetcherContainer = NULL; + } + // ]]] end generated region [Generated Contents] + +} + +/** + * Handle status pane size change for this view (override) + */ +void CComingNext_SkinFetcherContainerView::HandleStatusPaneSizeChange() +{ + CAknView::HandleStatusPaneSizeChange(); + + // this may fail, but we're not able to propagate exceptions here + TVwsViewId view; + AppUi()->GetActiveViewId(view); + if (view.iViewUid == Id()) + { + TInt result; + TRAP( result, SetupStatusPaneL() ); + } + + // [[[ begin generated region: do not modify [Generated Code] + // ]]] end generated region [Generated Code] + +} + +// [[[ begin generated function: do not modify +void CComingNext_SkinFetcherContainerView::SetupStatusPaneL() + { + // reset the context pane + TUid contextPaneUid = TUid::Uid( EEikStatusPaneUidContext ); + CEikStatusPaneBase::TPaneCapabilities subPaneContext = + StatusPane()->PaneCapabilities( contextPaneUid ); + if ( subPaneContext.IsPresent() && subPaneContext.IsAppOwned() ) + { + CAknContextPane* context = static_cast< CAknContextPane* > ( + StatusPane()->ControlL( contextPaneUid ) ); + context->SetPictureToDefaultL(); + } + + // setup the title pane + TUid titlePaneUid = TUid::Uid( EEikStatusPaneUidTitle ); + CEikStatusPaneBase::TPaneCapabilities subPaneTitle = + StatusPane()->PaneCapabilities( titlePaneUid ); + if ( subPaneTitle.IsPresent() && subPaneTitle.IsAppOwned() ) + { + CAknTitlePane* title = static_cast< CAknTitlePane* >( + StatusPane()->ControlL( titlePaneUid ) ); + TResourceReader reader; + iEikonEnv->CreateResourceReaderLC( reader, R_COMING_NEXT_SKIN_FETCHER_CONTAINER_TITLE_RESOURCE_2 ); + title->SetFromResourceL( reader ); + CleanupStack::PopAndDestroy(); // reader internal state + } + + } + +// ]]] end generated function + +// [[[ begin generated function: do not modify +void CComingNext_SkinFetcherContainerView::CleanupStatusPane() + { + } + +// ]]] end generated function + +/** + * Creates the top-level container for the view. You may modify this method's + * contents and the CComingNext_SkinFetcherContainer::NewL() signature as needed to initialize the + * container, but the signature for this method is fixed. + * @return new initialized instance of CComingNext_SkinFetcherContainer + */ +CComingNext_SkinFetcherContainer* CComingNext_SkinFetcherContainerView::CreateContainerL() +{ + return CComingNext_SkinFetcherContainer::NewL(ClientRect(), NULL, this); +} + +/** + * Handle the leftSoftKeyPressed event. + * @return ETrue if the command was handled, EFalse if not + */ +TBool CComingNext_SkinFetcherContainerView::HandleControlPaneLeftSoftKeyPressedL( + TInt aCommand) +{ + TInt pos = RunListQuery1L(NULL, NULL, NULL); + if (pos != -1) + { + CSkinFetcher::GenerateBackgroundImage(pos, + CAknViewAppUi::EAppUiOrientationPortrait); + CSkinFetcher::GenerateBackgroundImage(pos, + CAknViewAppUi::EAppUiOrientationLandscape); + RunNote1L(); + } + return ETrue; +} + +/** + * Handle the rightSoftKeyPressed event. + * @return ETrue if the command was handled, EFalse if not + */ +TBool CComingNext_SkinFetcherContainerView::HandleControlPaneRightSoftKeyPressedL( + TInt aCommand) +{ + iAvkonAppUi->Exit(); + return ETrue; +} + +// [[[ begin generated function: do not modify +/** + * Create a list box item with the given column values. + */ +void CComingNext_SkinFetcherContainerView::CreateListQuery1ItemL( + TDes& aBuffer, + + const TDesC& aMainText ) + { + _LIT ( KStringHeader, "%S" ); + + aBuffer.Format( KStringHeader(), &aMainText ); + } +// ]]] end generated function + +// [[[ begin generated function: do not modify +/** + * Add an item to the list by reading the text items from resource + * and setting a single image property (if available) from an index + * in the list box's icon array. + * @param aResourceId id of an ARRAY resource containing the textual + * items in the columns + * + */ +void CComingNext_SkinFetcherContainerView::CreateListQuery1ResourceArrayItemL( + TDes& aBuffer, + TInt aResourceId ) + { + CDesCArray* array = CCoeEnv::Static()->ReadDesCArrayResourceL( aResourceId ); + CleanupStack::PushL( array ); + CreateListQuery1ItemL( aBuffer, ( *array ) [ 0 ] ); + CleanupStack::PopAndDestroy( array ); + } +// ]]] end generated function + +// [[[ begin generated function: do not modify +/** + * Initialize contents of the popup item list. This constructs the array + * and pushes it on the cleanup stack. + * @return item array, never null + */ +CDesCArray* CComingNext_SkinFetcherContainerView::InitializeListQuery1LC() + { + const int KNumItems = 5; + CDesCArray* itemArray = new ( ELeave ) CDesCArrayFlat( KNumItems ? KNumItems : 1 ); + CleanupStack::PushL( itemArray ); + + // This is intended to be large enough, but if you get + // a USER 11 panic, consider reducing string sizes. + TBuf< 512 > des; + CreateListQuery1ResourceArrayItemL( + des, R_COMING_NEXT_SKIN_FETCHER_CONTAINER_LISTBOX_ITEM1 ); + itemArray->AppendL( des ); + CreateListQuery1ResourceArrayItemL( + des, R_COMING_NEXT_SKIN_FETCHER_CONTAINER_LISTBOX_ITEM2 ); + itemArray->AppendL( des ); + CreateListQuery1ResourceArrayItemL( + des, R_COMING_NEXT_SKIN_FETCHER_CONTAINER_LISTBOX_ITEM3 ); + itemArray->AppendL( des ); + CreateListQuery1ResourceArrayItemL( + des, R_COMING_NEXT_SKIN_FETCHER_CONTAINER_LISTBOX_ITEM4 ); + itemArray->AppendL( des ); + CreateListQuery1ResourceArrayItemL( + des, R_COMING_NEXT_SKIN_FETCHER_CONTAINER_LISTBOX_ITEM5 ); + itemArray->AppendL( des ); + return itemArray; + } +// ]]] end generated function + +// [[[ begin generated function: do not modify +/** + * Set up the list query's icon array. If any icons are used, allocates an + * icon array, and places it on the cleanup stack. + * @return icon array, or NULL + */ +CArrayPtr< CGulIcon >* CComingNext_SkinFetcherContainerView::SetupListQuery1IconsLC() + { + CArrayPtr< CGulIcon >* icons = NULL; + return icons; + } + +// ]]] end generated function + +// [[[ begin generated function: do not modify +/** + * Show the popup list query dialog for listQuery1. + *

+ * You may override the designer-specified items or icons, though generally + * both should be overridden together. + * @param aOverrideText optional override text + * @param aOverrideItemArray if not NULL, the array of formatted list items to display (passes ownership) + * @param aOverrideIconArray if not NULL, the array of icons to display (passes ownership) + * @return selected index (>=0) or -1 for Cancel + */ +TInt CComingNext_SkinFetcherContainerView::RunListQuery1L( + const TDesC* aOverrideText, + CDesCArray* aOverrideItemArray, + CArrayPtr< CGulIcon >* aOverrideIconArray ) + { + TInt index = 0; + CAknListQueryDialog* queryDialog = NULL; + queryDialog = new ( ELeave ) CAknListQueryDialog( &index ); + CleanupStack::PushL( queryDialog ); + + queryDialog->PrepareLC( R_COMING_NEXT_SKIN_FETCHER_CONTAINER_LIST_QUERY1 ); + if ( aOverrideText != NULL ) + { + queryDialog->SetHeaderTextL( *aOverrideText ); + } + + // initialize list items + CDesCArray* itemArray = NULL; + + if ( aOverrideItemArray != NULL ) + { + CleanupStack::PushL( aOverrideItemArray ); + itemArray = aOverrideItemArray; + } + else + { + itemArray = InitializeListQuery1LC(); + } + + queryDialog->SetItemTextArray( itemArray ); + queryDialog->SetOwnershipType( ELbmOwnsItemArray ); + CleanupStack::Pop( itemArray ); + + // initialize list icons + CArrayPtr< CGulIcon >* iconArray = NULL; + + if ( aOverrideIconArray != NULL ) + { + CleanupStack::PushL( aOverrideIconArray ); + iconArray = aOverrideIconArray; + } + else + { + iconArray = SetupListQuery1IconsLC(); + } + + if ( iconArray != NULL ) + { + queryDialog->SetIconArrayL( iconArray ); // passes ownership + CleanupStack::Pop( iconArray ); + } + + // run dialog + TInt result = queryDialog->RunLD(); + + // clean up + CleanupStack::Pop( queryDialog ); + + return result == 0 ? -1 : index; + } + +// ]]] end generated function + +// [[[ begin generated function: do not modify +/** + * Show the popup note for note1 + * @param aOverrideText optional override text + */ +void CComingNext_SkinFetcherContainerView::RunNote1L( const TDesC* aOverrideText ) + { + CAknConfirmationNote* note = new ( ELeave ) CAknConfirmationNote(); + if ( aOverrideText == NULL ) + { + HBufC* noteText = StringLoader::LoadLC( R_COMING_NEXT_SKIN_FETCHER_CONTAINER_NOTE1 ); + note->ExecuteLD( *noteText ); + CleanupStack::PopAndDestroy( noteText ); + } + else + { + note->ExecuteLD( *aOverrideText ); + } + } +// ]]] end generated function + diff --git a/ComingNext_SkinFetcher/src/ComingNext_SkinFetcherDocument.cpp b/ComingNext_SkinFetcher/src/ComingNext_SkinFetcherDocument.cpp new file mode 100644 index 0000000..44aebf5 --- /dev/null +++ b/ComingNext_SkinFetcher/src/ComingNext_SkinFetcherDocument.cpp @@ -0,0 +1,60 @@ +/* + ======================================================================== + Name : ComingNext_SkinFetcherDocument.cpp + Author : Michael Prager + Copyright : Licensed under GPLv3 + Description : + ======================================================================== + */ +// [[[ begin generated region: do not modify [Generated User Includes] +#include "ComingNext_SkinFetcherDocument.h" +#include "ComingNext_SkinFetcherAppUi.h" +// ]]] end generated region [Generated User Includes] + +/** + * @brief Constructs the document class for the application. + * @param anApplication the application instance + */ +CComingNext_SkinFetcherDocument::CComingNext_SkinFetcherDocument( + CEikApplication& anApplication) : + CAknDocument(anApplication) +{ +} + +/** + * @brief Completes the second phase of Symbian object construction. + * Put initialization code that could leave here. + */ +void CComingNext_SkinFetcherDocument::ConstructL() +{ +} + +/** + * Symbian OS two-phase constructor. + * + * Creates an instance of CComingNext_SkinFetcherDocument, constructs it, and + * returns it. + * + * @param aApp the application instance + * @return the new CComingNext_SkinFetcherDocument + */ +CComingNext_SkinFetcherDocument* CComingNext_SkinFetcherDocument::NewL( + CEikApplication& aApp) +{ + CComingNext_SkinFetcherDocument* self = + new (ELeave) CComingNext_SkinFetcherDocument(aApp); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(self); + return self; +} + +/** + * @brief Creates the application UI object for this document. + * @return the new instance + */ +CEikAppUi* CComingNext_SkinFetcherDocument::CreateAppUiL() +{ + return new (ELeave) CComingNext_SkinFetcherAppUi; +} + diff --git a/ComingNext_SkinFetcher/src/SkinFetcher.cpp b/ComingNext_SkinFetcher/src/SkinFetcher.cpp new file mode 100644 index 0000000..30304ce --- /dev/null +++ b/ComingNext_SkinFetcher/src/SkinFetcher.cpp @@ -0,0 +1,123 @@ +/* + ============================================================================ + Name : SkinFetcher.cpp + Author : Michael Prager + Version : 1.0 + Copyright : Licensed under GPLv3 + Description : CSkinFetcher implementation + ============================================================================ + */ + +#include +#include +#include +#include +#include +#include "SkinFetcher.h" + +CSkinFetcher::CSkinFetcher() +{ + // No implementation required +} + +CSkinFetcher::~CSkinFetcher() +{ +} + +CSkinFetcher* CSkinFetcher::NewLC() +{ + CSkinFetcher* self = new (ELeave) CSkinFetcher(); + CleanupStack::PushL(self); + self->ConstructL(); + return self; +} + +CSkinFetcher* CSkinFetcher::NewL() +{ + CSkinFetcher* self = CSkinFetcher::NewLC(); + CleanupStack::Pop(); // self; + return self; +} + +void CSkinFetcher::ConstructL() +{ + +} + +void CSkinFetcher::GenerateBackgroundImage(TInt aPosition, + CAknAppUiBase::TAppUiOrientation aOrientation) +{ + CAknAppUiBase::TAppUiOrientation oldOrientation = + iAvkonAppUi->Orientation(); + iAvkonAppUi->SetOrientationL(aOrientation); + + TSize screenSize; + if (aOrientation == CAknViewAppUi::EAppUiOrientationPortrait) + screenSize = TSize(360, 640); + else + screenSize = TSize(640, 360); + TSize outputSize = TSize(312, 82); + + // draw homescreen graphics into offscreen buffer + CFbsBitmap* offScreenBitmap = new (ELeave) CFbsBitmap(); + CleanupStack::PushL(offScreenBitmap); + User::LeaveIfError(offScreenBitmap->Create(outputSize, EColor16MA)); + CFbsBitmapDevice* bitmapDevice = CFbsBitmapDevice::NewL(offScreenBitmap); + CleanupStack::PushL(bitmapDevice); + CFbsBitGc* bitGc = 0; + User::LeaveIfError(bitmapDevice->CreateContext(bitGc)); + CleanupStack::PushL(bitGc); +#define COUNT 5 + TRect outer[COUNT]; + if (aOrientation == CAknViewAppUi::EAppUiOrientationPortrait) + { + for (int i = 0; i < COUNT; i++) + outer[i] = TRect(22, 136 + i * 86, 334, 136 + i * 86 + 82); + } + else + { + /* width: 312 + * height: 82 + * spacing x: 4 + * spacing y: 5 + * slot1: 322, 50, 634, 132 + * slot2: 5, 136, 317, 218 + */ + for (int i = 0; i < COUNT; i++) + if ((i + 1) % 2 == 0) + outer[i] = TRect(5, 50 + (i + 1) / 2 * 86, 317, 50 + (i + 1) + / 2 * 86 + 82); + else + outer[i] = TRect(322, 50 + (i + 1) / 2 * 86, 634, 50 + (i + 1) + / 2 * 86 + 82); + } + + MAknsSkinInstance* skin = AknsUtils::SkinInstance(); + CAknsBasicBackgroundControlContext* context = + CAknsBasicBackgroundControlContext::NewL(KAknsIIDWallpaper, TRect( + 0, 0, screenSize.iWidth, screenSize.iHeight), EFalse); + CleanupStack::PushL(context); + AknsDrawUtils::DrawBackground(skin, context, NULL, *bitGc, TPoint(0, 0), + outer[aPosition], KAknsDrawParamDefault); + TRect innerBox = TRect(outputSize); + innerBox.Shrink(5, 5); + AknsDrawUtils::DrawFrame(skin, *bitGc, TRect(outputSize), innerBox, + KAknsIIDQgnHomeBgWidget, KAknsIIDQgnHomeBgWidgetCenter); + + // save buffer into png + TFileName filename; + if (aOrientation == CAknViewAppUi::EAppUiOrientationPortrait) + filename.Copy(_L("c:\\data\\background_portrait.png")); + else + filename.Copy(_L("c:\\data\\background_landscape.png")); + CImageEncoder* iImageEncoder = CImageEncoder::FileNewL( + CEikonEnv::Static()->FsSession(), filename, _L8("image/png"),CImageEncoder::EOptionAlwaysThread); + CleanupStack::PushL(iImageEncoder); + TRequestStatus iStatus = KErrNone; + iImageEncoder->Convert(&iStatus, *offScreenBitmap); + User::WaitForRequest(iStatus); + + CleanupStack::PopAndDestroy(5); + iAvkonAppUi->SetOrientationL(oldOrientation); +} + -- 2.39.2