summaryrefslogtreecommitdiff
path: root/src/nautilus-view-frame.h
blob: a59a95c15716e05b10f37c110e2479e840be9fd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */

/*
 *  Nautilus
 *
 *  Copyright (C) 1999, 2000 Red Hat, Inc.
 *
 *  This library 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 library 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 library; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 *  Author: Elliot Lee <sopwith@redhat.com>
 *
 */
/* ntl-view.h: Interface of the object representing a data
   view. NautilusContentView and NautilusMetaView derive from this
   class. */

#ifndef __NAUTILUS_VIEW_H__
#define __NAUTILUS_VIEW_H__

#include <gtk/gtkwidget.h>
#include <gtk/gtkbin.h>
#include "ntl-types.h"
#include <bonobo/gnome-bonobo.h>

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#define NAUTILUS_TYPE_VIEW			(nautilus_view_get_type ())
#define NAUTILUS_VIEW(obj)			(GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_VIEW, NautilusView))
#define NAUTILUS_VIEW_CLASS(klass)		(GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_VIEW, NautilusViewClass))
#define NAUTILUS_IS_VIEW(obj)			(GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_VIEW))
#define NAUTILUS_IS_VIEW_CLASS(klass)		(GTK_CHECK_CLASS_TYPE ((obj), NAUTILUS_TYPE_VIEW))

typedef struct _NautilusView       NautilusView;
typedef struct _NautilusViewClass  NautilusViewClass;

struct _NautilusViewClass
{
  GtkBinClass parent_spot;

  /* These signals correspond to the Natuilus:ViewFrame CORBA interface. They
     are requests that the underlying view may make of the framework. */

  void (*request_location_change)	(NautilusView *view,
					 Nautilus_NavigationRequestInfo *navinfo);
  void (*request_selection_change)      (NautilusView *view,
				         Nautilus_SelectionRequestInfo *selinfo);
  void (*request_status_change)         (NautilusView *view,
                                         Nautilus_StatusRequestInfo *loc);
  void (*request_progress_change)       (NautilusView *view,
                                         Nautilus_ProgressRequestInfo *loc);

  /* Not a signal. Work-around for Gtk+'s lack of a 'constructed' operation */
  void (*view_constructed) (NautilusView *view);

  GtkBinClass *parent_class;
  guint num_construct_args;

  gpointer servant_init_func, servant_destroy_func, vepv;
};

typedef struct _NautilusViewComponentType NautilusViewComponentType;

struct _NautilusView
{
  GtkBin parent;

  GtkWidget *main_window;

  char *iid;

  GnomeObjectClient *client_object;
  GtkWidget *client_widget;

  GnomeObject *view_frame;

  guint construct_arg_count;

  NautilusViewComponentType *component_class;
  gpointer component_data;

  guint timer_id;
};

GtkType nautilus_view_get_type                  (void);
gboolean nautilus_view_load_client              (NautilusView              *view,
                                                 const char *               iid);
const char *nautilus_view_get_iid               (NautilusView *view);
CORBA_Object nautilus_view_get_client_objref    (NautilusView *view);
GnomeObject *nautilus_view_get_control_frame    (NautilusView *view);
CORBA_Object nautilus_view_get_objref           (NautilusView *view);

/* These functions correspond to methods of the Nautilus:View CORBAinterface */

void nautilus_view_notify_location_change       (NautilusView *view,
					         Nautilus_NavigationInfo *nav_context);
void nautilus_view_notify_selection_change      (NautilusView *view,
					         Nautilus_SelectionInfo *sel_context);
void nautilus_view_load_state                   (NautilusView *view, 
                                                 const char *config_path);
void nautilus_view_save_state                   (NautilusView *view, 
                                                 const char *config_path);
void nautilus_view_show_properties              (NautilusView *view);
void nautilus_view_stop_location_change         (NautilusView *view);
void nautilus_view_set_active_errors            (NautilusView *view, gboolean enabled);

/* This is a "protected" operation */
void    nautilus_view_construct_arg_set(NautilusView *view);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* __NAUTILUS_VIEW_H__ */