00001 #ifndef __FILEVIEW_H__ 00002 #define __FILEVIEW_H__ 00003 00004 /** 00005 * File Name : fileview.h 00006 * 00007 * Description: Content browser screens to display files 00008 * for both portrait and landscape mode 00009 */ 00010 00011 /* 00012 * This file is part of ctb. 00013 * 00014 * ctb is free software: you can redistribute it and/or modify 00015 * it under the terms of the GNU General Public License as published by 00016 * the Free Software Foundation, either version 2 of the License, or 00017 * (at your option) any later version. 00018 * 00019 * ctb is distributed in the hope that it will be useful, 00020 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00022 * GNU General Public License for more details. 00023 * 00024 * You should have received a copy of the GNU General Public License 00025 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00026 */ 00027 00028 /** 00029 * Copyright (C) 2008 iRex Technologies B.V. 00030 * All rights reserved. 00031 */ 00032 00033 00034 //---------------------------------------------------------------------------- 00035 // Include Files 00036 //---------------------------------------------------------------------------- 00037 00038 #include <gtk/gtk.h> 00039 00040 #include "filemodel.h" 00041 00042 G_BEGIN_DECLS 00043 00044 00045 //---------------------------------------------------------------------------- 00046 // Macro Definitions 00047 //---------------------------------------------------------------------------- 00048 00049 00050 //---------------------------------------------------------------------------- 00051 // Forward Declarations 00052 //---------------------------------------------------------------------------- 00053 00054 00055 //---------------------------------------------------------------------------- 00056 // Type Declarations 00057 //---------------------------------------------------------------------------- 00058 00059 // the different views of content browser 00060 // note: corresponds to gtk_notebook page as used in fileview.c 00061 typedef enum 00062 { 00063 CTB_ICONVIEW = 0, 00064 CTB_LISTVIEW, 00065 CTB_CONTENTVIEW, 00066 CTB_AUTOSELECT, 00067 N_CTB_VIEWS 00068 } ctb_viewtypes_t; 00069 00070 00071 /**--------------------------------------------------------------------------- 00072 * 00073 * Name : fileview_init 00074 * 00075 * @brief Initialisation 00076 * 00077 * @param -- 00078 * 00079 * @return -- 00080 * 00081 *--------------------------------------------------------------------------*/ 00082 void fileview_init(); 00083 00084 00085 /**--------------------------------------------------------------------------- 00086 * 00087 * Name : fileview_update_screen_texts 00088 * 00089 * @brief Update screen texts, using current language setting 00090 * 00091 * @param -- 00092 * 00093 * @return -- 00094 * 00095 *--------------------------------------------------------------------------*/ 00096 void fileview_update_screen_texts(); 00097 00098 00099 void fileview_create(); 00100 00101 00102 /**--------------------------------------------------------------------------- 00103 * 00104 * Name : fileview_set_view_type 00105 * 00106 * @brief Select which view to use for displaying the files 00107 * 00108 * @param [in] view - requested view type 00109 * 00110 * @return -- 00111 * 00112 *--------------------------------------------------------------------------*/ 00113 void fileview_set_view_type (const ctb_viewtypes_t view, gboolean do_cursor); 00114 00115 void fileview_save_view_type(); 00116 00117 00118 /**--------------------------------------------------------------------------- 00119 * 00120 * Name : fileview_set_sort_order 00121 * 00122 * @brief Set sorting order for items in view 00123 * 00124 * @param [in] sort_order - requested sorting order 00125 * 00126 * @return -- 00127 * 00128 *--------------------------------------------------------------------------*/ 00129 void fileview_set_sort_order (const ctb_sort_order_t sort_order); 00130 00131 00132 void fileview_dir_up(); 00133 00134 void fileview_dir_down(const gchar *dir, const char* cursorname); 00135 00136 /**--------------------------------------------------------------------------- 00137 * 00138 * Name : fileview_show_desktop 00139 * 00140 * @brief Show content of the desktop 00141 * 00142 * @param -- 00143 * 00144 * @return -- 00145 * 00146 *--------------------------------------------------------------------------*/ 00147 void fileview_show_desktop(); 00148 00149 00150 // take control of GUI display update system 00151 void fileview_stop_update_display(); 00152 00153 /**--------------------------------------------------------------------------- 00154 * 00155 * Name : fileview_media_mounted 00156 * 00157 * @brief Notification that a storage device has been mounted 00158 * 00159 * @param -- 00160 * 00161 * @return -- 00162 * 00163 *--------------------------------------------------------------------------*/ 00164 void fileview_media_mounted (const gchar *mountpoint); 00165 00166 00167 /**--------------------------------------------------------------------------- 00168 * 00169 * Name : fileview_media_unmounted 00170 * 00171 * @brief Notification that the storage device will be (has been) unmounted 00172 * 00173 * @param -- 00174 * 00175 * @return -- 00176 * 00177 *--------------------------------------------------------------------------*/ 00178 void fileview_media_unmounted (); 00179 00180 00181 /**--------------------------------------------------------------------------- 00182 * 00183 * Name : fileview_refresh 00184 * 00185 * @brief Refresh the current screen data, keep cursor at same item if possible 00186 * 00187 * @param -- 00188 * 00189 * @return -- 00190 * 00191 *--------------------------------------------------------------------------*/ 00192 void fileview_refresh(gboolean force_reload); 00193 00194 void fileview_show_search_dialog(); 00195 00196 void fileview_show_prev_page(); 00197 00198 void fileview_show_next_page(); 00199 00200 00201 void fileview_toggle_delete_mode(); 00202 00203 00204 /**--------------------------------------------------------------------------- 00205 * 00206 * Name : fileview_create_shortcut 00207 * 00208 * @brief Create desktop shortcut(s) for the currently selected item(s) 00209 * 00210 * @param -- 00211 * 00212 * @return -- 00213 * 00214 *--------------------------------------------------------------------------*/ 00215 void fileview_create_shortcut(); 00216 00217 00218 /**--------------------------------------------------------------------------- 00219 * 00220 * Name : fileview_grab_focus 00221 * 00222 * @brief Grab focus for current view 00223 * 00224 * @param -- 00225 * 00226 * @return -- 00227 * 00228 *--------------------------------------------------------------------------*/ 00229 void fileview_grab_focus( void ); 00230 00231 void show_error_dialog(const gchar *msg); 00232 00233 int fileview_get_xid(); 00234 00235 void fileview_set_on_top(gboolean ontop); 00236 00237 // popupmenu menubar += 10 pixels 00238 void fileview_move_up(guint delta); 00239 void fileview_move_undo(); 00240 00241 G_END_DECLS 00242 00243 #endif 00244