diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2010-12-21 18:17:52 +0100 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2011-01-11 11:43:18 +0100 |
commit | ad0d377ac236392a9ccaeae789e07e1af4a796e5 (patch) | |
tree | b5441f47c0ef9f5afb34ab753806592c2e74b97b /src/nautilus-window.h | |
parent | 4c031a4794126af08cea1774dd7ec3904d0ad25e (diff) | |
download | nautilus-ad0d377ac236392a9ccaeae789e07e1af4a796e5.tar.gz |
Rework architecture of NautilusWindow/NautilusWindowSlotInfo
In the past, nautilus was designed keeping in mind the concept that it
might not just be a file browser, but a sort of platform to embed
various kind of views in it.
- libnautilus-private: general lowlevel items, such as the icon
container, NautilusFile, I/O and so on
- src: general widgets and UI items
- src/file-manager: file manager views, agnostic of what's in src/,
for the sake of being pluggable enough
This is really not applicable anymore, as nautilus won't go in any
direction other than being a file manager; at the same time, this
complicates code and architecture quite a lot.
In this commit, as a first step towards a more clean codebase, we remove
the NautilusWindowInfo and NautilusWindowSlotInfo interfaces, using
NautilusWindow and NautilusWindowSlot directly.
Note that there should be no actual code changes, only moving of pieces
around.
Diffstat (limited to 'src/nautilus-window.h')
-rw-r--r-- | src/nautilus-window.h | 74 |
1 files changed, 59 insertions, 15 deletions
diff --git a/src/nautilus-window.h b/src/nautilus-window.h index 278aa64d7..33bca793d 100644 --- a/src/nautilus-window.h +++ b/src/nautilus-window.h @@ -32,9 +32,8 @@ #include <gtk/gtk.h> #include <eel/eel-glib-extensions.h> #include <libnautilus-private/nautilus-bookmark.h> -#include <libnautilus-private/nautilus-window-info.h> #include <libnautilus-private/nautilus-search-directory.h> -#include "nautilus-application.h" +#include <libnautilus-private/nautilus-view.h> #define NAUTILUS_TYPE_WINDOW nautilus_window_get_type() #define NAUTILUS_WINDOW(obj) \ @@ -48,33 +47,57 @@ #define NAUTILUS_WINDOW_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), NAUTILUS_TYPE_WINDOW, NautilusWindowClass)) -#ifndef NAUTILUS_WINDOW_DEFINED -#define NAUTILUS_WINDOW_DEFINED -typedef struct NautilusWindow NautilusWindow; -#endif +typedef enum { + NAUTILUS_WINDOW_SHOW_HIDDEN_FILES_DEFAULT, + NAUTILUS_WINDOW_SHOW_HIDDEN_FILES_ENABLE, + NAUTILUS_WINDOW_SHOW_HIDDEN_FILES_DISABLE +} NautilusWindowShowHiddenFilesMode; -#ifndef NAUTILUS_WINDOW_SLOT_DEFINED -#define NAUTILUS_WINDOW_SLOT_DEFINED -typedef struct NautilusWindowSlot NautilusWindowSlot; -#endif +typedef enum { + NAUTILUS_WINDOW_OPEN_ACCORDING_TO_MODE, + NAUTILUS_WINDOW_OPEN_IN_SPATIAL, + NAUTILUS_WINDOW_OPEN_IN_NAVIGATION +} NautilusWindowOpenMode; + +typedef enum { + /* used in spatial mode */ + NAUTILUS_WINDOW_OPEN_FLAG_CLOSE_BEHIND = 1<<0, + /* used in navigation mode */ + NAUTILUS_WINDOW_OPEN_FLAG_NEW_WINDOW = 1<<1, + NAUTILUS_WINDOW_OPEN_FLAG_NEW_TAB = 1<<2 +} NautilusWindowOpenFlags; + +typedef enum { + NAUTILUS_WINDOW_SPATIAL, + NAUTILUS_WINDOW_NAVIGATION, + NAUTILUS_WINDOW_DESKTOP +} NautilusWindowType; + +typedef struct NautilusWindow NautilusWindow; +typedef struct NautilusWindowSlot NautilusWindowSlot; typedef struct _NautilusWindowPane NautilusWindowPane; typedef struct NautilusWindowSlotClass NautilusWindowSlotClass; -typedef enum NautilusWindowOpenSlotFlags NautilusWindowOpenSlotFlags; GType nautilus_window_slot_get_type (void); +#include "nautilus-application.h" + typedef enum { NAUTILUS_WINDOW_NOT_SHOWN, NAUTILUS_WINDOW_POSITION_SET, NAUTILUS_WINDOW_SHOULD_SHOW } NautilusWindowShowState; -enum NautilusWindowOpenSlotFlags { +typedef enum { NAUTILUS_WINDOW_OPEN_SLOT_NONE = 0, NAUTILUS_WINDOW_OPEN_SLOT_APPEND = 1 -}; +} NautilusWindowOpenSlotFlags; + +typedef void (* NautilusWindowGoToCallback) (NautilusWindow *window, + GError *error, + gpointer user_data); typedef struct NautilusWindowDetails NautilusWindowDetails; @@ -116,8 +139,6 @@ struct NautilusWindow { GtkWindow parent_object; NautilusWindowDetails *details; - - NautilusApplication *application; }; GType nautilus_window_get_type (void); @@ -157,4 +178,27 @@ void nautilus_window_allow_stop (NautilusWindow *window gboolean allow); GtkUIManager * nautilus_window_get_ui_manager (NautilusWindow *window); + +void nautilus_window_report_selection_changed (NautilusWindow *window); +void nautilus_window_report_load_complete (NautilusWindow *window, + NautilusView *view); + +NautilusWindowSlot * nautilus_window_get_extra_slot (NautilusWindow *window); +NautilusWindowShowHiddenFilesMode + nautilus_window_get_hidden_files_mode (NautilusWindow *window); +void nautilus_window_set_hidden_files_mode (NautilusWindow *window, + NautilusWindowShowHiddenFilesMode mode); +NautilusWindowType nautilus_window_get_window_type (NautilusWindow *window); +void nautilus_window_report_load_underway (NautilusWindow *window, + NautilusView *view); +void nautilus_window_view_visible (NautilusWindow *window, + NautilusView *view); +void nautilus_window_set_initiated_unmount (NautilusWindow *window, + gboolean initiated_unmount); +NautilusWindowSlot * nautilus_window_get_active_slot (NautilusWindow *window); +void nautilus_window_push_status (NautilusWindow *window, + const char *text); +int nautilus_window_get_selection_count (NautilusWindow *window); +GList * nautilus_window_get_selection (NautilusWindow *window); + #endif |