"Fossies" - the Fresh Open Source Software Archive

Member "xarchive-0.2.8-6/src/widgets_gtk.h" (23 Feb 2006, 6018 Bytes) of package /linux/privat/old/xarchive-0.2.8-6.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "widgets_gtk.h" see the Fossies "Dox" file reference documentation.

    1 #ifndef XARCHIVE_SRC_WIDGETS_GTK
    2 #define XARCHIVE_SRC_WIDGETS_GTK 1
    3 
    4 #include"common.h"
    5 #include<gtk/gtk.h>
    6 #include<gdk/gdk.h>
    7 #include<glib/gstdio.h>
    8 #include<string.h>
    9 #include<sys/wait.h>
   10 #include<signal.h>
   11 #include<unistd.h>
   12 #include"icons/xarchive.xpm"
   13 
   14 #define TEMP_NAME "xarchiveXXXXXX"
   15 
   16 /* LOCAL DATA TYPES AND STRUCTURES */
   17 typedef struct sel_data
   18 {
   19   GtkTreeSelection *sel;
   20   gchar *dname;
   21   gboolean dirs;
   22 } SelectionData;
   23 
   24 typedef struct wrapper_data
   25 {
   26   gchar *dir;
   27   gint index;
   28   gchar **argv;
   29 } WrapperData;
   30 
   31 /* GLOBAL VARIABLES */
   32 GtkUIManager *UIMANAGER;
   33 GtkNotebook *NOTEBOOK;
   34 GtkWidget *EMPTY;
   35 GtkWidget *MAIN_WINDOW;
   36 
   37 /* EXTERNAL FUNCTIONS */
   38 /* from my_strescape */
   39 extern char * 
   40 my_strescape(char *string);
   41 
   42 /* from main.c */
   43 int 
   44 wrapper_cmd(gint ar_func, gchar **argv, gchar *dest); 
   45 
   46 gchar *
   47 get_wrapper(gchar *filename);
   48 
   49 gchar *
   50 wrapper_info(void);
   51 
   52 /* from myfc.c */
   53 void 
   54 myfc_add_foreach_func(gchar *fpath, GtkListStore *myfc_ls);
   55 
   56 GtkListStore *
   57 make_myfc_ls(void);
   58 
   59 GtkDialog *
   60 make_myfc(gchar *archive, GtkListStore *fclist);
   61 
   62 /* LOCAL FUNCTIONS */
   63 /********************************/
   64 /* treeview and model functions */
   65 /********************************/
   66 void 
   67 render_cols(GtkTreeView *view, gchar *title, gint mcol);
   68 
   69 GtkListStore *
   70 make_liststore(void);
   71 
   72 GtkWidget *
   73 make_tree(GtkListStore *liststore);
   74 
   75 GtkTreeView *
   76 get_current_tree(void);
   77 
   78 gchar *
   79 get_current_archive(void);
   80 
   81 void 
   82 add_row(GtkListStore *liststore, gchar **ent);
   83 
   84 void 
   85 reload_current_tree(GtkTreeView *treeview);
   86 
   87 gboolean
   88 treeview_button_press(GtkWidget  *container,
   89              GdkEventButton *event,
   90              GtkUIManager *uimanager);
   91 
   92 /**********************/
   93 /* notebook functions */
   94 /**********************/
   95 void 
   96 make_notebook_widgets(GtkWidget *container);
   97 
   98 void 
   99 add_page(gchar *archive);
  100 
  101 /************************************/
  102 /* empty page and message functions */
  103 /************************************/
  104 void
  105 setup_opening_progress_bar(GtkWidget *pbwin, GtkWidget *pbar, gboolean *stopit);
  106 void
  107 wait_with_progress_bar(GPid pid, gint *wrapper_status, gint ar_func);
  108 
  109 GtkWidget *
  110 make_info_widget(gchar *msg);
  111 
  112 void 
  113 make_empty_page(GtkWidget *container);
  114 
  115 gboolean 
  116 message(GtkWidget *parentwin, gint type, gchar *text);
  117 
  118 /*********************/
  119 /* foreach functions */
  120 /*********************/
  121 void 
  122 selected_foreach_func(GtkTreeModel *model,
  123                        GtkTreePath *path,
  124                        GtkTreeIter *iter,
  125                        WrapperData *wrapper);
  126 
  127 gboolean 
  128 sel_subdir_foreach_func(GtkTreeModel *model,
  129                                  GtkTreePath *path,
  130                                  GtkTreeIter *iter,
  131                                  SelectionData *seld);
  132 
  133 gboolean 
  134 unsel_subdir_foreach_func(GtkTreeModel *model,
  135                                  GtkTreePath *path,
  136                                  GtkTreeIter *iter,
  137                                  SelectionData *seld);
  138 
  139 gboolean
  140 test_selection_func(GtkTreeSelection *selection,
  141                     GtkTreeModel *model,
  142                     GtkTreePath *path,
  143                     gboolean path_currently_selected,
  144                     gpointer data);
  145 
  146 gboolean 
  147 add_foreach_func(GtkTreeModel *model, GtkTreePath *path, 
  148                   GtkTreeIter *iter, WrapperData *wrapper);
  149 
  150 gboolean 
  151 file_filter_func(const GtkFileFilterInfo *filter_info, gpointer data);
  152 
  153 /*******************/
  154 /* chooser widgets */
  155 /*******************/
  156 gchar *
  157 askfor_existing_archive(void);
  158 
  159 gchar *
  160 askfor_new_archive(gchar *name);
  161 
  162 gboolean
  163 multi_file_chooser(gchar *archive, GtkListStore *filelist);
  164 
  165 gchar *
  166 askfor_extract_dir(void);
  167 
  168 /******************************************/
  169 /* openwith and default handler functions */
  170 /******************************************/
  171 GtkListStore *
  172 get_openwith_cmdlist(gchar *cmdlist_path);
  173 
  174 void
  175 add_to_cmdlist(GtkListStore *cmdlist, gchar *command, gchar *cmdlist_path);
  176 
  177 void
  178 get_lastdir(void);
  179 
  180 void
  181 get_default_handler(void);
  182 
  183 void
  184 set_default_handler(gchar *command);
  185 
  186 void
  187 open_one_file(WrapperData *wrapper, gchar *command);
  188 
  189 void 
  190 default_handler_foreach_func(GtkTreeModel *model,
  191                              GtkTreePath  *path,
  192                              GtkTreeIter  *iter,
  193                              WrapperData  *wrapper);
  194 gchar *
  195 askfor_openwith_command(gchar *fname);
  196 
  197 void 
  198 openwith_foreach_func(GtkTreeModel *model, GtkTreePath  *path,
  199                       GtkTreeIter  *iter, WrapperData  *wrapper);
  200 
  201 /**********************/
  202 /* callback functions */
  203 /**********************/
  204 void
  205 dummy_cb(GtkWidget *widget, gpointer data);
  206 
  207 void 
  208 open_cb(GtkWidget *widget, gpointer data);
  209 
  210 void 
  211 new_cb(GtkWidget *widget, gpointer data);
  212 
  213 void 
  214 close_cb(GtkWidget *widget, gpointer data);
  215 
  216 void 
  217 close_button_cb(GtkWidget *widget, gpointer data);
  218 
  219 void 
  220 extract_cb(GtkWidget *widget, gpointer data);
  221 
  222 void
  223 openwith_cb(GtkWidget *widget, gpointer data);
  224 
  225 void
  226 double_click_cb(void);
  227 
  228 void
  229 open_selected_files(gboolean use_default_handler);
  230 
  231 void 
  232 add_cb(GtkWidget *widget, gpointer data);
  233 
  234 void 
  235 remove_cb(GtkWidget *widget, gpointer data);
  236 
  237 void 
  238 select_all_cb(GtkWidget *widget, gpointer data);
  239 
  240 void 
  241 unselect_all_cb(GtkWidget *widget, gpointer data);
  242 
  243 void 
  244 wrapper_info_cb(GtkWidget *widget, gpointer data);
  245 
  246 void
  247 read_help_cb(GtkWidget *widget, gpointer data);
  248 
  249 static gboolean
  250 open_cancel_cb(GtkWidget *widget, gpointer data);
  251 
  252 static gboolean
  253 process_cancel_cb(GtkWidget *widget, gpointer data);
  254 
  255 /************************/
  256 /* ui manager functions */
  257 /************************/
  258 GtkUIManager * 
  259 make_ui_widgets(GtkWidget *window, GtkWidget *container);
  260 
  261 void 
  262 add_ui_widget(GtkUIManager *uimanager, 
  263                    GtkWidget *widget, 
  264                    GtkContainer *container);
  265 
  266 /******************************/
  267 /* passed aurgument functions */
  268 /******************************/
  269 gint
  270 ask_create_or_add(gchar *msg);
  271 
  272 void
  273 process_passed_arguments(ParsedArgs *pargs);
  274 
  275 /*****************/
  276 /* main function */
  277 /*****************/
  278 int 
  279 make_widgets(ParsedArgs *pargs);
  280 
  281 #endif