2008-12-09 Claudio Saavedra <csaavedra@igalia.com>
[hildon] / src / hildon-main.c
1 /*
2  * This file is part of the hildon library
3  *
4  * Copyright (C) 2008 Nokia Corporation, all rights reserved.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public License
8  * as published by the Free Software Foundation; version 2.1 of
9  * the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19  * 02110-1301 USA
20  *
21  */
22
23 /**
24  * SECTION:hildon-main
25  * @Short_Description: Library initialization.
26  *
27  */
28
29
30 #include <gtk/gtk.h>
31 #include "hildon-main.h"
32
33 /**
34  * hildon_init:
35  * @void:
36  *
37  * Initializes the hildon library. Call this function after calling gtk_init()
38  * and before using any hildon or GTK+ functions in your program.
39  *
40  **/
41 void
42 hildon_init (void)
43 {
44   /* Register icon sizes */
45   gtk_icon_size_register ("hildon-xsmall", 16, 16);
46   gtk_icon_size_register ("hildon-small", 24, 24);
47   gtk_icon_size_register ("hildon-stylus", 32, 32);
48   gtk_icon_size_register ("hildon-finger", 48, 48);
49   gtk_icon_size_register ("hildon-thumb", 64, 64);
50   gtk_icon_size_register ("hildon-large", 96, 96);
51   gtk_icon_size_register ("hildon-xlarge", 128, 128);
52 }
53
54 /**
55  * hildon_gtk_init:
56  * @argc: Address of the <parameter>argc</parameter>
57  * parameter of your main() function. Changed if any arguments were
58  * handled.
59  * @argv: Address of the <parameter>argv</parameter>
60  * parameter of main().  Any parameters understood by gtk_init()
61  * are stripped before return.
62  *
63  * Convenience function to initialize the GTK+ and hildon
64  * libraries. Use this function to replace a call to gtk_init() and also
65  * initialize the hildon library. See hildon_init() and gtk_init() for details.
66  *
67  **/
68 void
69 hildon_gtk_init (int *argc, char ***argv)
70 {
71   gtk_init (argc, argv);
72   hildon_init ();
73 }