[maemo-developers] how to use gtk Resource Files .rc file in maemo (hildon framework)
From: Minti Maemo minti.maemo at yahoo.comDate: Tue Oct 30 17:37:35 EET 2007
- Previous message: Help with with playing video files on Nokia 770
- Next message: how to use gtk Resource Files .rc file in maemo (hildon framework)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20071030/cdace7e6/attachment.htm
- Previous message: Help with with playing video files on Nokia 770
- Next message: how to use gtk Resource Files .rc file in maemo (hildon framework)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
