[maemo-developers] how to use gtk Resource Files .rc file in maemo (hildon framework)
From: Renato Araujo renatox at gmail.comDate: Wed Oct 31 01:31:01 EET 2007
- Previous message: how to use gtk Resource Files .rc file in maemo (hildon framework)
- Next message: Debian toolkit mismatch
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, I'm using personalized rc files in my application[1], and works fine, You can see the code and rc files on svn[2]. Verify mtv-theme.c[3] and gtkrc[4]. Try change your rc file to something like this (I do not know if "xpm" is supported, I use "png"): ------------------------------------------------------------------------------------------ style "window" { engine "sapwood" { image { function = BOX file = "../common/images/bg.xmp" } } } class "GtkWindow" style "window" ---------------------------------------------------------------------------------------------- "sapwood" is the default engine used on maemo platform, it is more faster then pixmap engine. [1]https://garage.maemo.org/projects/mtv/ [2]https://garage.maemo.org/svn/mtv/trunk/mtv/ [3]https://garage.maemo.org/svn/mtv/trunk/mtv/src/mtv-theme.c [4]https://garage.maemo.org/svn/mtv/trunk/mtv/data/themes/indt/gtkrc BR Renato Araujo Filho On 10/30/07, Minti Maemo <minti.maemo at yahoo.com> wrote: > > hi, > i want to use gtk resource file (e.g. MyResource.rc ) to change > background colour / to put background image on widget > i am able to do same thing in simple gtk application . the same > application is not able to load resource file on maemo platform .Is there > any difference to load / write the resouce for maemo application (in hildon > framework)? > > MyResource.rc > ------------------------------------------------------- > pixmap_path "../common/images/" > > style "window" > { > bg_pixmap[NORMAL] = "bg.xpm" > } > widget_class "GtkWindow" style "window" > > --------------------------------------------------------- > > App.c /* Gtk App */ > ---------------------------------------------------------- > int main(int argc ,char* argv[]) > { > GtkWidget *window; > gtk_init(&argc,&argv); > > window = gtk_window_new(GTK_WINDOW_TOPLEVEL); > gtk_widget_set_name (window, "window"); > > gtk_rc_parse ("MyResource.rc"); > gtk_widget_show(window); > gtk_main(); > > return 0; > } > ------------------------------------------------------------ > > App.c /*maemo App in Hildon */ > ------------------------------------------------------------- > int main( int argc, char* argv[] ) > { > > HildonProgram* program; > GtkWidget* window; > > gtk_init( &argc, &argv ); > > program = HILDON_PROGRAM( hildon_program_get_instance() ); > g_set_application_name( "My App" ); > > window = hildon_window_new(); > gtk_widget_set_name (window ,"window"); > gtk_rc_parse ("MyResource.rc"); > > hildon_program_add_window( program, HILDON_WINDOW(window)); > > gtk_widget_show(window); > gtk_main(); > > return 0; > } > > > ------------------------------------------------------------- > Thx > minti > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > _______________________________________________ > maemo-developers mailing list > maemo-developers at maemo.org > https://lists.maemo.org/mailman/listinfo/maemo-developers > > -- Renato Araujo Oliveira Filho Instituto Nokia de Tecnologia - INdT -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20071030/b3ae04e8/attachment.htm
- Previous message: how to use gtk Resource Files .rc file in maemo (hildon framework)
- Next message: Debian toolkit mismatch
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]