Main Page | Directories | File List | File Members

hildon-status-bar-lib.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of maemo-af-desktop
00003  *
00004  * Copyright (C) 2005-2006 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  * version 2.1 as published by the Free Software Foundation.
00011  *
00012  * This library is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00020  * 02110-1301 USA
00021  *
00022  */
00023 
00024 
00031 #ifndef HILDON_STATUR_BAR_LIB_FUNCTIONS_H
00032 #define HILDON_STATUR_BAR_LIB_FUNCTIONS_H
00033 
00034 #include <glib.h>
00035 #include <gtk/gtkdialog.h>
00036 
00037 G_BEGIN_DECLS
00038 
00039 #define HILDON_STATUS_BAR_MAX_NOTE_TYPE      3  /* highest system note type */
00040 #define HILDON_STATUS_BAR_MAX_NO_OF_DIALOGS 30  /* maximum number of dialogs */
00041 
00042 typedef struct system_dialog_st SystemDialog;
00043 
00044 typedef void (*dialog_closed_cb)( gint type, gpointer data );
00045 
00046 struct system_dialog_st
00047 {
00048     gint             type;      /* type of the dialog, -1 for plugins */
00049     gchar            *icon;     /* icon to be shown */
00050     gchar            *msg;      /* msg to be shown */
00051     gchar            *button;   /* text to be shown in the button */
00052     gint             int_type;  /* first parameter to cb */
00053     dialog_closed_cb cb;        /* callback */
00054     gpointer         data;      /* second parameter to cb */
00055     gboolean         occupied;  /* is this slot free */
00056     gboolean         save_result;  /* should the response be saved */
00057     gboolean         result_ready;  /* is the response ready */
00058     gboolean         do_not_show;  /* true, if dialog should not be showed
00059                                       ('closed' before it was shown) */
00060     gboolean         is_showing;  /* is the dialog showing now */
00061     gint             result;    /* response to the dialog */
00062     GtkWidget        *widget;   /* the dialog widget (for closing it) */
00063 };
00064 
00065 
00090 void hildon_status_bar_lib_prepare_dialog( gint type,
00091                                            const gchar *icon, 
00092                                            const gchar *msg,
00093                                            gint int_type, 
00094                                            dialog_closed_cb cb,
00095                                            gpointer data );
00118 void hildon_status_bar_lib_queue_dialog( const gchar *icon,
00119                                          const gchar *msg,
00120                                          gint int_type,
00121                                          dialog_closed_cb cb,
00122                                          gpointer data );
00123 
00146 gint hildon_status_bar_lib_open_closeable_dialog( gint type,
00147                                                   const gchar *msg,
00148                                                   const gchar *btext,
00149                                                   gboolean save_result );
00150 
00164 void hildon_status_bar_lib_close_closeable_dialog( gint id );
00165 
00180 gint hildon_status_bar_lib_get_dialog_response( gint id );
00181 
00182 G_END_DECLS
00183 
00184 #endif /* HILDON_STATUR_BAR_LIB_FUNCTIONS_H */

Generated on Thu Dec 21 11:26:52 2006 for maemo-af-desktop-documentation by  doxygen 1.4.2