00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __MLVIEW_APP_CONTEXT_H__
00019 #define __MLVIEW_APP_CONTEXT_H__
00020
00021 #ifdef __cplusplus
00022 extern "C"{
00023 #endif
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
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
00156 #endif