Main Page | Compound List | File List | Compound Members | File Members

librccui.h

Go to the documentation of this file.
00001 #ifndef _LIBRCC_UI_H
00002 #define _LIBRCC_UI_H
00003 
00004 #include <librcc.h>
00005 
00006 #ifdef __cplusplus
00007 extern "C" {
00008 #endif
00009 
00010 typedef struct rcc_ui_context_t *rcc_ui_context;
00011 
00012 /*******************************************************************************
00013 ************************************ Names *************************************
00014 *******************************************************************************/
00015 
00016 struct rcc_name_t {
00017     const char *sn;
00018     const char *name;
00019 };
00020 typedef struct rcc_name_t rcc_name;
00021 
00022 typedef const char *rcc_option_value_name;
00023 typedef rcc_option_value_name *rcc_option_value_names;
00024 
00025 struct rcc_option_name_t {
00026     rcc_option option;
00027     const char *name;
00028     rcc_option_value_names value_names;
00029 };
00030 typedef struct rcc_option_name_t rcc_option_name;
00031 
00032 int rccUiSetLanguageNames(rcc_ui_context ctx, rcc_name *names);
00033 int rccUiSetCharsetNames(rcc_ui_context ctx, rcc_name *names);
00034 int rccUiSetEngineNames(rcc_ui_context ctx, rcc_name *names);
00035 
00036 int rccUiSetOptionNames(rcc_ui_context ctx, rcc_option_name *names);
00037 int rccUiSetClassNames(rcc_ui_context ctx);
00038 
00039 /* page & boxes */
00040 typedef const char *rcc_ui_box_name;
00041 struct rcc_ui_language_frame_name_t {
00042     const char *title;
00043     rcc_ui_box_name language;
00044 };
00045 typedef struct rcc_ui_language_frame_name_t rcc_ui_language_frame_name;
00046 struct rcc_ui_charset_frame_name_t {
00047     const char *title;
00048 };
00049 typedef struct rcc_ui_charset_frame_name_t rcc_ui_charset_frame_name;
00050 struct rcc_ui_engine_frame_name_t {
00051     const char *title;
00052     rcc_ui_box_name engine;
00053 };
00054 typedef struct rcc_ui_engine_frame_name_t rcc_ui_engine_frame_name;
00055 struct rcc_ui_page_name_t {
00056     const char *title;
00057     rcc_ui_language_frame_name language;
00058     rcc_ui_charset_frame_name charset;
00059     rcc_ui_engine_frame_name engine;
00060 };
00061 typedef struct rcc_ui_page_name_t rcc_ui_page_name;
00062 
00063 rcc_ui_page_name *rccUiGetDefaultPageName();
00064 
00065 const char *rccUiGetLanguageName(rcc_ui_context ctx, rcc_language_id language_id);
00066 const char *rccUiGetClassName(rcc_ui_context ctx, rcc_class_id class_id);
00067 const char *rccUiGetCharsetName(rcc_ui_context ctx, rcc_language_id language_id, rcc_class_id class_id, rcc_charset_id charset_id);
00068 const char *rccUiGetEngineName(rcc_ui_context ctx, rcc_language_id language_id, rcc_engine_id engine_id);
00069 const char *rccUiGetOptionName(rcc_ui_context ctx, rcc_option option);
00070 const char *rccUiGetOptionValueName(rcc_ui_context ctx, rcc_option option, rcc_option_value value);
00071 
00072 /*******************************************************************************
00073 ************************************ API ***************************************
00074 *******************************************************************************/
00075 
00076 typedef void *rcc_ui_widget;
00077 typedef void *rcc_ui_box;
00078 typedef void *rcc_ui_frame;
00079 typedef void *rcc_ui_page;
00080 
00084 int rccUiInit();
00090 void rccUiFree();
00091 
00099 rcc_ui_context rccUiCreateContext(rcc_context rccctx);
00105 void rccUiFreeContext(rcc_ui_context ctx);
00106 
00107 int rccUiHideOption(rcc_ui_context ctx, rcc_option option);
00108 int rccUiUnHideOption(rcc_ui_context ctx, rcc_option option);
00109 
00115 int rccUiRestoreLanguage(rcc_ui_context ctx);
00121 int rccUiRestore(rcc_ui_context ctx);
00127 int rccUiUpdate(rcc_ui_context ctx);
00128 
00129 rcc_ui_widget rccUiGetLanguageMenu(rcc_ui_context ctx);
00130 rcc_ui_widget rccUiGetCharsetMenu(rcc_ui_context ctx, rcc_class_id id);
00131 rcc_ui_widget rccUiGetEngineMenu(rcc_ui_context ctx);
00132 rcc_ui_widget rccUiGetOptionMenu(rcc_ui_context ctx, rcc_option option);
00133 
00134 rcc_ui_box rccUiGetLanguageBox(rcc_ui_context ctx, const char *title);
00135 rcc_ui_box rccUiGetCharsetBox(rcc_ui_context ctx, rcc_class_id id, const char *title);
00136 rcc_ui_box rccUiGetEngineBox(rcc_ui_context ctx, const char *title);
00137 rcc_ui_box rccUiGetOptionBox(rcc_ui_context ctx, rcc_option option, const char *title);
00138 
00139 rcc_ui_frame rccUiGetLanguageFrame(rcc_ui_context ctx, rcc_ui_language_frame_name *name);
00140 rcc_ui_frame rccUiGetCharsetsFrame(rcc_ui_context ctx, rcc_ui_charset_frame_name *name);
00141 rcc_ui_frame rccUiGetEngineFrame(rcc_ui_context ctx, rcc_ui_engine_frame_name *name);
00142 
00151 rcc_ui_page rccUiGetPage(rcc_ui_context ctx, rcc_ui_page_name *name);
00152 
00153 #ifdef __cplusplus
00154 }
00155 #endif
00156 
00157 #endif /* _LIBRCC_UI_H */

Generated on Thu Aug 11 01:55:29 2005 for LibRCC by doxygen 1.3.3