hildon-navigator-main.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of maemo-af-desktop
00003  *
00004  * Copyright (C) 2005 Nokia Corporation.
00005  *
00006  * Contact: Karoliina Salminen <karoliina.t.salminen@nokia.com>
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation; either version 2.1 of
00011  * the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00021  * 02110-1301 USA
00022  *
00023  */
00024 
00031 #ifndef HILDON_NAVIGATOR_MAIN_H
00032 #define HILDON_NAVIGATOR_MAIN_H
00033 
00034 G_BEGIN_DECLS
00035 
00036 /* Plugin names */
00037 #define LIBTN_MAIL_PLUGIN        "libtn_mail_plugin.so"
00038 #define LIBTN_BOOKMARK_PLUGIN    "libtn_bookmark_plugin.so"
00039 
00040 /* Max. amount of plugin symbols */
00041 #define MAX_SYMBOLS 4
00042 
00043 /* Hardcoded pixel values */
00044 #define HILDON_NAVIGATOR_WIDTH 80
00045 #define BUTTON_HEIGHT 90
00046 
00047 /* Type definitions for the plugin API */
00048 typedef void *(*PluginCreateFn)(void);
00049 typedef void (*PluginDestroyFn)(void *data);
00050 typedef GtkWidget *(*PluginGetButtonFn)(void *data);
00051 typedef void (*PluginInitializeMenuFn)(void *data);
00052 
00053 G_END_DECLS
00054 
00055 
00056 typedef struct
00057 {
00058     GtkWidget *main_window;
00059     
00060     GtkBox *box;
00061     GtkWidget *app_switcher_button;
00062     GtkWidget *others_menu_button;
00063     
00064     void *mail_data;
00065     void *bookmark_data;
00066     void *dlhandle_bookmark;
00067     void *dlhandle_mail;
00068     
00069     PluginCreateFn create;
00070     PluginDestroyFn destroy;
00071     PluginGetButtonFn navigator_button;
00072     PluginInitializeMenuFn initialize_menu;
00073 
00074     ApplicationSwitcher_t *app_switcher;
00075     OthersMenu_t *others_menu;
00076 
00077     void *app_switcher_dnotify_cb;
00078 
00079     GList *plugins;
00080 } Navigator;
00081 
00082 /* The plugin structure */
00083 typedef struct
00084 {
00085     gchar *name;
00086     gchar *library;
00087     gint position;
00088     gboolean mandatory;
00089     
00090     void *handle;
00091     void *data;
00092     GtkWidget *button;
00093     
00094     FILE *watch;
00095     gint actions;
00096     
00097 } NavigatorPlugin;
00098 
00099 /*Symbols */
00100 enum {
00101    CREATE_SYMBOL = 0,
00102    DESTROY_SYMBOL,
00103    GET_BUTTON_SYMBOL,
00104    INITIALIZE_MENU_SYMBOL
00105 };
00106 
00107 /* Configuration options
00108  */
00109 
00110 /* When CONFIG_DO_BGKILL is TRUE, applications are killed when they
00111    are in the background and we are in the 'bgkill' situation.
00112 */
00113 extern gboolean config_do_bgkill;
00114 
00115 /* When CONFIG_LOWMEM_DIM is TRUE, all buttons that can start new
00116    applications are dimmed when we are in the 'lowmem' situation.
00117 */
00118 extern gboolean config_lowmem_dim;
00119 
00120 /* When CONFIG_LOWMEM_NOTIFY_ENTER is TRUE, notify this information to the
00121  * user upon entering the 'lowmem' situation.
00122  */
00123 extern gboolean config_lowmem_notify_enter;
00124 
00125 /* When CONFIG_LOWMEM_NOTIFY_LEAVE is TRUE, notify this information to the
00126  * user upon leaving the 'lowmem' situation.
00127  */
00128 extern gboolean config_lowmem_notify_leave;
00129 
00130 /* When CONFIG_LOWMEM_PAVLOV_DIALOG is TRUE, display a dialog instead of
00131    an infoprint upon entering the 'lowmem' situation.
00132 */
00133 extern gboolean config_lowmem_pavlov_dialog;
00134 
00135 #endif /* HILDON_NAVIGATOR_MAIN_H */
00136 
00137  

Generated on Fri Jun 9 16:23:07 2006 for maemo-af-desktop-documentation by  doxygen 1.4.6