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  * 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 
00025 
00032 #ifndef HILDON_STATUR_BAR_LIB_FUNCTIONS_H
00033 #define HILDON_STATUR_BAR_LIB_FUNCTIONS_H
00034 
00035 #include <glib.h>
00036 #include <gtk/gtkdialog.h>
00037 
00038 G_BEGIN_DECLS
00039 
00040 #define HILDON_STATUS_BAR_MAX_NOTE_TYPE      3  /* highest system note type */
00041 #define HILDON_STATUS_BAR_MAX_NO_OF_DIALOGS 30  /* maximum number of dialogs */
00042 
00043 typedef struct system_dialog_st SystemDialog;
00044 
00045 typedef void (*dialog_closed_cb)( gint type, gpointer data );
00046 
00047 struct system_dialog_st
00048 {
00049     gint             type;      /* type of the dialog, -1 for plugins */
00050     gchar            *icon;     /* icon to be shown */
00051     gchar            *msg;      /* msg to be shown */
00052     gchar            *button;   /* text to be shown in the button */
00053     gint             int_type;  /* first parameter to cb */
00054     dialog_closed_cb cb;        /* callback */
00055     gpointer         data;      /* second parameter to cb */
00056     gboolean         occupied;  /* is this slot free */
00057     gboolean         save_result;  /* should the response be saved */
00058     gboolean         result_ready;  /* is the response ready */
00059     gboolean         do_not_show;  /* true, if dialog should not be showed
00060                                       ('closed' before it was shown) */
00061     gboolean         is_showing;  /* is the dialog showing now */
00062     gint             result;    /* response to the dialog */
00063     GtkWidget        *widget;   /* the dialog widget (for closing it) */
00064 };
00065 
00066 
00091 void hildon_status_bar_lib_prepare_dialog( gint type,
00092                                            const gchar *icon, 
00093                                            const gchar *msg,
00094                                            gint int_type, 
00095                                            dialog_closed_cb cb,
00096                                            gpointer data );
00119 void hildon_status_bar_lib_queue_dialog( const gchar *icon,
00120                                          const gchar *msg,
00121                                          gint int_type,
00122                                          dialog_closed_cb cb,
00123                                          gpointer data );
00124 
00147 gint hildon_status_bar_lib_open_closeable_dialog( gint type,
00148                                                   const gchar *msg,
00149                                                   const gchar *btext,
00150                                                   gboolean save_result );
00151 
00165 void hildon_status_bar_lib_close_closeable_dialog( gint id );
00166 
00181 gint hildon_status_bar_lib_get_dialog_response( gint id );
00182 
00183 G_END_DECLS
00184 
00185 #endif /* HILDON_STATUR_BAR_LIB_FUNCTIONS_H */

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