Commit ad0d377a authored by Cosimo Cecchi's avatar Cosimo Cecchi

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.
parent 4c031a47
......@@ -171,14 +171,8 @@ libnautilus_private_la_SOURCES = \
nautilus-vfs-directory.h \
nautilus-vfs-file.c \
nautilus-vfs-file.h \
nautilus-view-factory.c \
nautilus-view-factory.h \
nautilus-view.c \
nautilus-view.h \
nautilus-window-info.c \
nautilus-window-info.h \
nautilus-window-slot-info.c \
nautilus-window-slot-info.h \
$(NULL)
nodist_libnautilus_private_la_SOURCES =\
......
......@@ -29,8 +29,6 @@
#include "nautilus-program-choosing.h"
#include "nautilus-link.h"
#include "nautilus-window-slot-info.h"
#include "nautilus-window-info.h"
#include "nautilus-view.h"
#include <eel/eel-glib-extensions.h>
#include <eel/eel-gtk-extensions.h>
......
......@@ -28,7 +28,6 @@
#define NAUTILUS_DND_H
#include <gtk/gtk.h>
#include <libnautilus-private/nautilus-window-slot-info.h>
/* Drag & Drop target names. */
#define NAUTILUS_ICON_DND_GNOME_ICON_LIST_TYPE "x-special/gnome-icon-list"
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
nautilus-window-info.c: Interface for nautilus window
Copyright (C) 2004 Red Hat Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Author: Alexander Larsson <alexl@redhat.com>
*/
#include <config.h>
#include "nautilus-window-info.h"
enum {
LOADING_URI,
SELECTION_CHANGED,
TITLE_CHANGED,
HIDDEN_FILES_MODE_CHANGED,
LAST_SIGNAL
};
static guint nautilus_window_info_signals[LAST_SIGNAL] = { 0 };
static void
nautilus_window_info_base_init (gpointer g_class)
{
static gboolean initialized = FALSE;
if (! initialized) {
nautilus_window_info_signals[LOADING_URI] =
g_signal_new ("loading_uri",
NAUTILUS_TYPE_WINDOW_INFO,
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (NautilusWindowInfoIface, loading_uri),
NULL, NULL,
g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE, 1,
G_TYPE_STRING);
nautilus_window_info_signals[SELECTION_CHANGED] =
g_signal_new ("selection_changed",
NAUTILUS_TYPE_WINDOW_INFO,
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (NautilusWindowInfoIface, selection_changed),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
nautilus_window_info_signals[TITLE_CHANGED] =
g_signal_new ("title_changed",
NAUTILUS_TYPE_WINDOW_INFO,
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (NautilusWindowInfoIface, title_changed),
NULL, NULL,
g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE, 1,
G_TYPE_STRING);
nautilus_window_info_signals[HIDDEN_FILES_MODE_CHANGED] =
g_signal_new ("hidden_files_mode_changed",
NAUTILUS_TYPE_WINDOW_INFO,
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (NautilusWindowInfoIface, hidden_files_mode_changed),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
initialized = TRUE;
}
}
GType
nautilus_window_info_get_type (void)
{
static GType type = 0;
if (!type) {
const GTypeInfo info = {
sizeof (NautilusWindowInfoIface),
nautilus_window_info_base_init,
NULL,
NULL,
NULL,
NULL,
0,
0,
NULL
};
type = g_type_register_static (G_TYPE_INTERFACE,
"NautilusWindowInfo",
&info, 0);
g_type_interface_add_prerequisite (type, G_TYPE_OBJECT);
}
return type;
}
void
nautilus_window_info_report_load_underway (NautilusWindowInfo *window,
NautilusView *view)
{
g_return_if_fail (NAUTILUS_IS_WINDOW_INFO (window));
g_return_if_fail (NAUTILUS_IS_VIEW (view));
(* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->report_load_underway) (window,
view);
}
void
nautilus_window_info_report_load_complete (NautilusWindowInfo *window,
NautilusView *view)
{
g_return_if_fail (NAUTILUS_IS_WINDOW_INFO (window));
g_return_if_fail (NAUTILUS_IS_VIEW (view));
(* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->report_load_complete) (window,
view);
}
void
nautilus_window_info_report_view_failed (NautilusWindowInfo *window,
NautilusView *view)
{
g_return_if_fail (NAUTILUS_IS_WINDOW_INFO (window));
g_return_if_fail (NAUTILUS_IS_VIEW (view));
(* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->report_view_failed) (window,
view);
}
void
nautilus_window_info_report_selection_changed (NautilusWindowInfo *window)
{
g_return_if_fail (NAUTILUS_IS_WINDOW_INFO (window));
(* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->report_selection_changed) (window);
}
void
nautilus_window_info_view_visible (NautilusWindowInfo *window,
NautilusView *view)
{
g_return_if_fail (NAUTILUS_IS_WINDOW_INFO (window));
(* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->view_visible) (window, view);
}
void
nautilus_window_info_close (NautilusWindowInfo *window)
{
g_return_if_fail (NAUTILUS_IS_WINDOW_INFO (window));
(* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->close_window) (window);
}
void
nautilus_window_info_push_status (NautilusWindowInfo *window,
const char *status)
{
g_return_if_fail (NAUTILUS_IS_WINDOW_INFO (window));
(* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->push_status) (window,
status);
}
NautilusWindowType
nautilus_window_info_get_window_type (NautilusWindowInfo *window)
{
g_return_val_if_fail (NAUTILUS_IS_WINDOW_INFO (window), NAUTILUS_WINDOW_SPATIAL);
return (* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->get_window_type) (window);
}
char *
nautilus_window_info_get_title (NautilusWindowInfo *window)
{
g_return_val_if_fail (NAUTILUS_IS_WINDOW_INFO (window), NULL);
return (* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->get_title) (window);
}
GList *
nautilus_window_info_get_history (NautilusWindowInfo *window)
{
g_return_val_if_fail (NAUTILUS_IS_WINDOW_INFO (window), NULL);
return (* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->get_history) (window);
}
char *
nautilus_window_info_get_current_location (NautilusWindowInfo *window)
{
g_return_val_if_fail (NAUTILUS_IS_WINDOW_INFO (window), NULL);
return (* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->get_current_location) (window);
}
int
nautilus_window_info_get_selection_count (NautilusWindowInfo *window)
{
g_return_val_if_fail (NAUTILUS_IS_WINDOW_INFO (window), 0);
return (* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->get_selection_count) (window);
}
GList *
nautilus_window_info_get_selection (NautilusWindowInfo *window)
{
g_return_val_if_fail (NAUTILUS_IS_WINDOW_INFO (window), NULL);
return (* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->get_selection) (window);
}
NautilusWindowShowHiddenFilesMode
nautilus_window_info_get_hidden_files_mode (NautilusWindowInfo *window)
{
g_return_val_if_fail (NAUTILUS_IS_WINDOW_INFO (window), NAUTILUS_WINDOW_SHOW_HIDDEN_FILES_DEFAULT);
return (* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->get_hidden_files_mode) (window);
}
void
nautilus_window_info_set_hidden_files_mode (NautilusWindowInfo *window,
NautilusWindowShowHiddenFilesMode mode)
{
g_return_if_fail (NAUTILUS_IS_WINDOW_INFO (window));
(* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->set_hidden_files_mode) (window,
mode);
}
GtkUIManager *
nautilus_window_info_get_ui_manager (NautilusWindowInfo *window)
{
g_return_val_if_fail (NAUTILUS_IS_WINDOW_INFO (window), NULL);
return (* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->get_ui_manager) (window);
}
NautilusWindowSlotInfo *
nautilus_window_info_get_active_slot (NautilusWindowInfo *window)
{
g_return_val_if_fail (NAUTILUS_IS_WINDOW_INFO (window), NULL);
return (* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->get_active_slot) (window);
}
NautilusWindowSlotInfo *
nautilus_window_info_get_extra_slot (NautilusWindowInfo *window)
{
g_return_val_if_fail (NAUTILUS_IS_WINDOW_INFO (window), NULL);
return (* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->get_extra_slot) (window);
}
gboolean
nautilus_window_info_get_initiated_unmount (NautilusWindowInfo *window)
{
g_return_val_if_fail (NAUTILUS_IS_WINDOW_INFO (window), FALSE);
return (* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->get_initiated_unmount) (window);
}
void
nautilus_window_info_set_initiated_unmount (NautilusWindowInfo *window, gboolean initiated_unmount)
{
g_return_if_fail (NAUTILUS_IS_WINDOW_INFO (window));
(* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->set_initiated_unmount) (window,
initiated_unmount);
}
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
nautilus-window-info.h: Interface for nautilus windows
Copyright (C) 2004 Red Hat Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Author: Alexander Larsson <alexl@redhat.com>
*/
#ifndef NAUTILUS_WINDOW_INFO_H
#define NAUTILUS_WINDOW_INFO_H
#include <glib-object.h>
#include <libnautilus-private/nautilus-view.h>
#include <gtk/gtk.h>
G_BEGIN_DECLS
typedef enum
{
NAUTILUS_WINDOW_SHOW_HIDDEN_FILES_DEFAULT,
NAUTILUS_WINDOW_SHOW_HIDDEN_FILES_ENABLE,
NAUTILUS_WINDOW_SHOW_HIDDEN_FILES_DISABLE
} NautilusWindowShowHiddenFilesMode;
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;
#define NAUTILUS_TYPE_WINDOW_INFO (nautilus_window_info_get_type ())
#define NAUTILUS_WINDOW_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_WINDOW_INFO, NautilusWindowInfo))
#define NAUTILUS_IS_WINDOW_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_WINDOW_INFO))
#define NAUTILUS_WINDOW_INFO_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), NAUTILUS_TYPE_WINDOW_INFO, NautilusWindowInfoIface))
#ifndef NAUTILUS_WINDOW_DEFINED
#define NAUTILUS_WINDOW_DEFINED
/* Using NautilusWindow for the vtable to make implementing this in
* NautilusWindow easier */
typedef struct NautilusWindow NautilusWindow;
#endif
#ifndef NAUTILUS_WINDOW_SLOT_DEFINED
#define NAUTILUS_WINDOW_SLOT_DEFINED
typedef struct NautilusWindowSlot NautilusWindowSlot;
#endif
typedef NautilusWindowSlot NautilusWindowSlotInfo;
typedef NautilusWindow NautilusWindowInfo;
typedef struct _NautilusWindowInfoIface NautilusWindowInfoIface;
typedef void (* NautilusWindowGoToCallback) (NautilusWindow *window,
GError *error,
gpointer user_data);
struct _NautilusWindowInfoIface
{
GTypeInterface g_iface;
/* signals: */
void (* loading_uri) (NautilusWindowInfo *window,
const char *uri);
/* Emitted when the view in the window changes the selection */
void (* selection_changed) (NautilusWindowInfo *window);
void (* title_changed) (NautilusWindowInfo *window,
const char *title);
void (* hidden_files_mode_changed)(NautilusWindowInfo *window);
/* VTable: */
/* A view calls this once after a load_location, once it starts loading the
* directory. Might be called directly, or later on the mainloop.
* This can also be called at any other time if the view needs to
* re-load the location. But the view needs to call load_complete first if
* its currently loading. */
void (* report_load_underway) (NautilusWindowInfo *window,
NautilusView *view);
/* A view calls this once after reporting load_underway, when the location
has been fully loaded, or when the load was stopped
(by an error or by the user). */
void (* report_load_complete) (NautilusWindowInfo *window,
NautilusView *view);
/* This can be called at any time when there has been a catastrophic failure of
the view. It will result in the view being removed. */
void (* report_view_failed) (NautilusWindowInfo *window,
NautilusView *view);
void (* report_selection_changed) (NautilusWindowInfo *window);
/* Returns the number of selected items in the view */
int (* get_selection_count) (NautilusWindowInfo *window);
/* Returns a list of uris for th selected items in the view, caller frees it */
GList *(* get_selection) (NautilusWindowInfo *window);
char * (* get_current_location) (NautilusWindowInfo *window);
void (* push_status) (NautilusWindowInfo *window,
const char *status);
char * (* get_title) (NautilusWindowInfo *window);
GList *(* get_history) (NautilusWindowInfo *window);
NautilusWindowType
(* get_window_type) (NautilusWindowInfo *window);
NautilusWindowShowHiddenFilesMode
(* get_hidden_files_mode) (NautilusWindowInfo *window);
void (* set_hidden_files_mode) (NautilusWindowInfo *window,
NautilusWindowShowHiddenFilesMode mode);
NautilusWindowSlotInfo * (* get_active_slot) (NautilusWindowInfo *window);
NautilusWindowSlotInfo * (* get_extra_slot) (NautilusWindowInfo *window);
gboolean (* get_initiated_unmount) (NautilusWindowInfo *window);
void (* set_initiated_unmount) (NautilusWindowInfo *window,
gboolean initiated_unmount);
void (* view_visible) (NautilusWindowInfo *window,
NautilusView *view);
void (* close_window) (NautilusWindowInfo *window);
GtkUIManager * (* get_ui_manager) (NautilusWindowInfo *window);
};
GType nautilus_window_info_get_type (void);
void nautilus_window_info_report_load_underway (NautilusWindowInfo *window,
NautilusView *view);
void nautilus_window_info_report_load_complete (NautilusWindowInfo *window,
NautilusView *view);
void nautilus_window_info_report_view_failed (NautilusWindowInfo *window,
NautilusView *view);
void nautilus_window_info_report_selection_changed (NautilusWindowInfo *window);
NautilusWindowSlotInfo * nautilus_window_info_get_active_slot (NautilusWindowInfo *window);
NautilusWindowSlotInfo * nautilus_window_info_get_extra_slot (NautilusWindowInfo *window);
void nautilus_window_info_view_visible (NautilusWindowInfo *window,
NautilusView *view);
void nautilus_window_info_close (NautilusWindowInfo *window);
void nautilus_window_info_push_status (NautilusWindowInfo *window,
const char *status);
NautilusWindowType nautilus_window_info_get_window_type (NautilusWindowInfo *window);
char * nautilus_window_info_get_title (NautilusWindowInfo *window);
GList * nautilus_window_info_get_history (NautilusWindowInfo *window);
char * nautilus_window_info_get_current_location (NautilusWindowInfo *window);
int nautilus_window_info_get_selection_count (NautilusWindowInfo *window);
GList * nautilus_window_info_get_selection (NautilusWindowInfo *window);
NautilusWindowShowHiddenFilesMode nautilus_window_info_get_hidden_files_mode (NautilusWindowInfo *window);
void nautilus_window_info_set_hidden_files_mode (NautilusWindowInfo *window,
NautilusWindowShowHiddenFilesMode mode);
gboolean nautilus_window_info_get_initiated_unmount (NautilusWindowInfo *window);
void nautilus_window_info_set_initiated_unmount (NautilusWindowInfo *window,
gboolean initiated_unmount);
GtkUIManager * nautilus_window_info_get_ui_manager (NautilusWindowInfo *window);
G_END_DECLS
#endif /* NAUTILUS_WINDOW_INFO_H */
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
nautilus-window-slot-info.c: Interface for nautilus window slots
Copyright (C) 2008 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Author: Christian Neumair <cneumair@gnome.org>
*/
#include "nautilus-window-slot-info.h"
enum {
ACTIVE,
INACTIVE,
LAST_SIGNAL
};
static guint nautilus_window_slot_info_signals[LAST_SIGNAL] = { 0 };
static void
nautilus_window_slot_info_base_init (gpointer g_class)
{
static gboolean initialized = FALSE;
if (!initialized) {
nautilus_window_slot_info_signals[ACTIVE] =
g_signal_new ("active",
NAUTILUS_TYPE_WINDOW_SLOT_INFO,
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (NautilusWindowSlotInfoIface, active),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
nautilus_window_slot_info_signals[INACTIVE] =
g_signal_new ("inactive",
NAUTILUS_TYPE_WINDOW_SLOT_INFO,
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (NautilusWindowSlotInfoIface, inactive),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
initialized = TRUE;
}
}
GType
nautilus_window_slot_info_get_type (void)
{
static GType type = 0;
if (!type) {
const GTypeInfo info = {
sizeof (NautilusWindowSlotInfoIface),
nautilus_window_slot_info_base_init,
NULL,
NULL,
NULL,
NULL,
0,
0,
NULL
};
type = g_type_register_static (G_TYPE_INTERFACE,
"NautilusWindowSlotInfo",
&info, 0);
g_type_interface_add_prerequisite (type, G_TYPE_OBJECT);
}
return type;
}
void
nautilus_window_slot_info_set_status (NautilusWindowSlotInfo *slot,
const char *status)
{
g_assert (NAUTILUS_IS_WINDOW_SLOT_INFO (slot));
(* NAUTILUS_WINDOW_SLOT_INFO_GET_IFACE (slot)->set_status) (slot,
status);
}
void
nautilus_window_slot_info_make_hosting_pane_active (NautilusWindowSlotInfo *slot)
{
g_assert (NAUTILUS_IS_WINDOW_SLOT_INFO (slot));
(* NAUTILUS_WINDOW_SLOT_INFO_GET_IFACE (slot)->make_hosting_pane_active) (slot);
}
void
nautilus_window_slot_info_open_location_full (NautilusWindowSlotInfo *slot,
GFile *location,
NautilusWindowOpenMode mode,
NautilusWindowOpenFlags flags,
GList *selection,
NautilusWindowGoToCallback callback,
gpointer user_data)
{
g_assert (NAUTILUS_IS_WINDOW_SLOT_INFO (slot));
(* NAUTILUS_WINDOW_SLOT_INFO_GET_IFACE (slot)->open_location) (slot,
location,
mode,
flags,
selection,
callback,
user_data);
}
char *
nautilus_window_slot_info_get_title (NautilusWindowSlotInfo *slot)
{
g_assert (NAUTILUS_IS_WINDOW_SLOT_INFO (slot));
return (* NAUTILUS_WINDOW_SLOT_INFO_GET_IFACE (slot)->get_title) (slot);
}
char *
nautilus_window_slot_info_get_current_location (NautilusWindowSlotInfo *slot)
{
g_assert (NAUTILUS_IS_WINDOW_SLOT_INFO (slot));
return (* NAUTILUS_WINDOW_SLOT_INFO_GET_IFACE (slot)->get_current_location) (slot);
}
NautilusView *
nautilus_window_slot_info_get_current_view (NautilusWindowSlotInfo *slot)
{
g_assert (NAUTILUS_IS_WINDOW_SLOT_INFO (slot));
return (* NAUTILUS_WINDOW_SLOT_INFO_GET_IFACE (slot)->get_current_view) (slot);
}
NautilusWindowInfo *
nautilus_window_slot_info_get_window (NautilusWindowSlotInfo *slot)
{
g_assert (NAUTILUS_IS_WINDOW_SLOT_INFO (slot));
return (* NAUTILUS_WINDOW_SLOT_INFO_GET_IFACE (slot)->get_window) (slot);
}
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
nautilus-window-slot-info.h: Interface for nautilus window slots
Copyright (C) 2008 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Author: Christian Neumair <cneumair@gnome.org>
*/
#ifndef NAUTILUS_WINDOW_SLOT_INFO_H
#define NAUTILUS_WINDOW_SLOT_INFO_H
#include "nautilus-window-info.h"
#include "nautilus-view.h"
#define NAUTILUS_TYPE_WINDOW_SLOT_INFO (nautilus_window_slot_info_get_type ())
#define NAUTILUS_WINDOW_SLOT_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_WINDOW_SLOT_INFO, NautilusWindowSlotInfo))
#define NAUTILUS_IS_WINDOW_SLOT_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_WINDOW_SLOT_INFO))
#define NAUTILUS_WINDOW_SLOT_INFO_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), NAUTILUS_TYPE_WINDOW_SLOT_INFO, NautilusWindowSlotInfoIface))
typedef struct _NautilusWindowSlotInfoIface NautilusWindowSlotInfoIface;
struct _NautilusWindowSlotInfoIface
{
GTypeInterface g_iface;
/* signals */
/* emitted right after this slot becomes active.