Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

mlview-app-context.h

Go to the documentation of this file.
00001 /*This file is part of GNU MlView
00002  *
00003  *GNU MlView is free software; you can redistribute it and/or modify it under the terms of 
00004  *the GNU General Public License as published by the Free Software Foundation; either version 2, 
00005  *or (at your option) any later version.
00006  *
00007  *GNU MlView is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
00008  *without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00009  *See the GNU General Public License for more details.
00010  *
00011  *You should have received a copy of the GNU General Public License along with MlView; 
00012  *see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00013  *
00014  *
00015  *Copyright 2001-2002 Dodji Seketeli
00016  */
00017 
00018 #ifndef __MLVIEW_APP_CONTEXT_H__
00019 #define __MLVIEW_APP_CONTEXT_H__
00020 
00021 #ifdef __cplusplus
00022 extern "C"{
00023 #endif /*__cplusplus*/
00024 
00025 #include <gnome.h>
00026 #include <libxml/parser.h>
00027 #include <libxml/catalog.h>
00028 
00029 #include "mlview-file-selection.h"
00030 
00031 
00038 #define MLVIEW_TYPE_APP_CONTEXT (mlview_app_context_get_type())
00039 #define MLVIEW_APP_CONTEXT(object) (GTK_CHECK_CAST((object), MLVIEW_TYPE_APP_CONTEXT,MlViewAppContext))
00040 #define MLVIEW_APP_CONTEXT_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), MLVIEW_TYPE_APP_CONTEXT,MlViewContextClass))
00041 #define MLVIEW_IS_APP_CONTEXT(object) (GTK_CHECK_TYPE((object), MLVIEW_TYPE_APP_CONTEXT))
00042 #define MLVIEW_IS_APP_CONTEXT_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), MLVIEW_TYPE_APP_CONTEXT))
00043 
00044         typedef struct _MlViewAppContext MlViewAppContext ;
00045         typedef struct _MlViewAppContextClass MlViewAppContextClass ;
00046         typedef struct _MlVAppContextPrivate MlVAppContextPrivate ;
00047         
00053         struct _MlViewAppContext {
00058                 GtkObject object ;
00059 
00063                 MlVAppContextPrivate *private;          
00064         } ;
00065 
00070         struct _MlViewAppContextClass{
00075                 GtkObjectClass parent_class ;
00076         } ;
00077 
00078         guint mlview_app_context_get_type ( void) ;
00079 
00080         gint *
00081         mlview_app_context_get_last_id_ptr (MlViewAppContext *a_app_context) ;
00082         
00083         gint
00084         mlview_app_context_get_last_id (MlViewAppContext *a_app_context) ;
00085         
00086         void
00087         mlview_app_context_set_last_id (MlViewAppContext *a_app_context,
00088                                         gint a_new_id) ;
00089 
00090         void mlview_app_context_set_element (MlViewAppContext * a_context,
00091                                              gchar *a_element_name, 
00092                                              gpointer a_context_element) ;
00093 
00094         gpointer mlview_app_context_get_element (MlViewAppContext * a_context,
00095                                                  gchar * a_element_name) ;
00096 
00097         MlViewAppContext * mlview_app_context_get_instance ( void ) ;
00098 
00099         /*display a message in the app bar*/
00100         void  mlview_app_context_sbar_push_message ( MlViewAppContext * a_context,
00101                                                     gchar * a_msg_format,... ) ;
00102         void mlview_app_context_sbar_pop_message ( MlViewAppContext * a_context ) ;
00103         void mlview_app_context_sbar_set_default_message (MlViewAppContext * a_context, 
00104                                                          gchar *a_msg_format, ...) ;
00105         
00106         void mlview_app_context_message (MlViewAppContext * a_context,
00107                                          gchar *a_msg_format, ...) ;
00108 
00109         void mlview_app_context_error (MlViewAppContext * a_context,
00110                                        gchar *a_msg_format, ...) ;
00111 
00112         void mlview_app_context_warning (MlViewAppContext *a_context,
00113                                          gchar * a_msg_format, ...) ;
00114         void mlview_app_context_bufferize_error (MlViewAppContext * a_context,
00115                                                  gchar * a_msg_format, 
00116                                                  ...) ;
00117         void mlview_app_context_display_buffered_error (MlViewAppContext * a_context) ;
00118 
00119         gboolean mlview_app_context_error_buffer_is_empty (MlViewAppContext *a_context) ;
00120         void mlview_app_context_set_error_dialog_title (MlViewAppContext * a_context,
00121                                                         gchar * a_title) ;
00122         gchar * mlview_app_context_get_error_dialog_title ( MlViewAppContext * a_context ) ;
00123         
00124         void mlview_app_context_set_settings_hash_table (MlViewAppContext *a_context,
00125                                                          GHashTable *a_settings) ;
00126 
00127         GHashTable * mlview_app_context_get_settings_hash_table (MlViewAppContext *a_context) ;
00128 
00129         gboolean mlview_app_context_settings_exist (MlViewAppContext * a_app_context) ;
00130 
00131         gchar * mlview_app_context_get_settings_value (MlViewAppContext *a_app_context,
00132                                                        const gchar * a_key) ;
00133 
00134         void  mlview_app_context_set_settings_value (MlViewAppContext * a_app_context,
00135                                                        const gchar * a_key, const gchar *a_value) ;
00136 
00137         MlViewFileSelection * mlview_app_context_get_file_selector (MlViewAppContext *a_app_context,
00138                                                                     const gchar * a_title) ;
00139 
00140         void mlview_app_context_set_window_icon (MlViewAppContext *a_app_context,
00141                                                  GtkWidget * a_widget) ;
00142 
00143         void mlview_app_context_set_window_transient_for_app (MlViewAppContext *a_app_context,
00144                                                               GtkWindow *a_window) ;
00145 
00146         gint mlview_app_context_get_xpm (MlViewAppContext *a_app_context, gchar * a_xpm_name,
00147                                          GdkPixmap **a_pixmap, GdkBitmap **a_bitmap) ;
00148 
00149         void mlview_app_context_set_xml_catalog (MlViewAppContext *a_app_context,
00150                                                  xmlCatalog * a_xml_catalog)  ;
00151         xmlCatalog * mlview_app_context_get_xml_catalog (MlViewAppContext *a_app_context) ;
00152 
00153 #ifdef __cplusplus
00154 }
00155 #endif /*__cplusplus*/
00156 #endif /*__MLVIEW-APP-CONTEXT_H__*/

Generated on Sat Jul 6 09:57:31 2002 for Gnome-MlView by doxygen1.2.16