Back to index

im-sdk  12.3.91
palette_aux.h
Go to the documentation of this file.
00001 #ifndef _PALETTE_AUX_H_
00002 #define _PALETTE_AUX_H_
00003 
00004 #include <gdk/gdk.h>
00005 #include <gtk/gtk.h>
00006 
00007 #ifdef HAVE_CONFIG_H
00008 #include "config.h"
00009 #endif
00010 
00011 #include "vkb_aux.h"
00012 #include "property_window.h"
00013 
00014 enum {
00015     BUTTON_ID_DRAG = 0,
00016     BUTTON_ID_IME,
00017     BUTTON_ID_QJBJ,
00018     BUTTON_ID_PUNCT,
00019     BUTTON_ID_VKB,
00020     BUTTON_ID_UTILITY,
00021     BUTTONS_NUM
00022 };
00023 
00024 enum {
00025     PIXMAP_ID_DEFAULT_IME = 0,
00026     PIXMAP_ID_DRAGAREA_VERTICAL,
00027     PIXMAP_ID_DRAGAREA_HORIZONTAL,
00028     PIXMAP_ID_HALFWIDTH,
00029     PIXMAP_ID_FULLWIDTH,
00030     PIXMAP_ID_ENPUNCT,
00031     PIXMAP_ID_CNPUNCT,
00032     PIXMAP_ID_VKB,
00033     PIXMAP_ID_UTILITY,
00034     PIXMAPS_NUM
00035 };
00036 
00037 enum {
00038     SHOW_STYLE_HORIZONTAL = 0,
00039     SHOW_STYLE_VERTICAL
00040 };
00041 
00042 enum {
00043     IME_DRAW_ICON_ONLY,
00044     IME_DRAW_TEXT_ONLY,
00045     IME_DRAW_BOTH_ICON_TEXT,
00046 };
00047 
00048 #define DATA_PALETTE_AUX_WINDOW_INFO      "palette_window_info"
00049 
00050 typedef struct _palette_button_t {
00051     int button_id;
00052 
00053     int x;
00054     int y;
00055     int width;
00056     int height;
00057 
00058     gboolean enabled;
00059     gboolean activated;
00060     gboolean pressed;
00061     gboolean focused;
00062 
00063     gpointer data;
00064 } palette_button_t;
00065 
00066 typedef struct _palette_window_t {
00067     GtkWidget *window;
00068     GtkWidget *drawing_area;
00069     GdkPixmap *pixmap;
00070 
00071     PangoContext *context;
00072     PangoLayout *pango_layout;
00073     PangoFontDescription *font_desc;
00074 
00075     GdkPixbuf *pixbufs[PIXMAPS_NUM];
00076 
00077     GtkTooltips *tooltips;
00078     GdkCursor   *moving_cursor;
00079     GdkCursor   *normal_cursor;
00080 
00081     GtkWidget *ime_list_menu;
00082     ime_module_t *current_ime;
00083     int ime_draw_style;
00084 
00085     GtkWidget *vkb_list_menu;
00086     int vkb_layout_list_inited;
00087     vkb_layout_t *vkb_layout_pc_keyboard;
00088     vkb_layout_t **vkb_layout_list;
00089     vkb_layout_t *current_vkb_layout;
00090 
00091     vkb_window_t *vkb_window;
00092     gboolean     vkb_show_status;
00093     
00094     property_data_t   *property_data;
00095     property_window_t *property_window;
00096 
00097     GtkWidget *utility_list_menu;
00098     GtkWidget *utility_menuitem_show_vertical;
00099 
00100     GtkWidget *about_dialog;
00101 
00102     palette_button_t buttons[BUTTONS_NUM];
00103     palette_button_t *pressed_button;
00104     palette_button_t *focused_button;
00105 
00106     gint show_style;
00107 
00108     gint show_status;
00109     gint qjbj_status;
00110     gint punct_status;
00111 
00112     gboolean menu_popuped;
00113 
00114     gint width;
00115     gint height;
00116 
00117     gint pos_x;
00118     gint pos_y;
00119 
00120     gboolean draging;
00121     gboolean draw_draging_frame;
00122     gint drag_x_start;
00123     gint drag_y_start;
00124     gint drag_x_save;
00125     gint drag_y_save;
00126 } palette_window_t;
00127 
00128 typedef struct _palette_session_t {
00129     int pos_x;
00130     int pos_y;
00131     int show_status;
00132     int qjbj_status;
00133     int punct_status;
00134     char *ime_uuid;
00135 } palette_session_t;
00136 
00137 #endif                      /* _PALETTE_AUX_H_ */