nautilus-view-frame.h 3.54 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */

/*
 *  Nautilus
 *
 *  Copyright (C) 1999 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.
Elliot Lee's avatar
Elliot Lee committed
12
 *
13
14
15
16
 *  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.
Elliot Lee's avatar
Elliot Lee committed
17
 *
18
19
20
21
22
 *  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>
Elliot Lee's avatar
Elliot Lee committed
23
24
 *
 */
25
26
27
28
/* ntl-view.h: Interface of the object representing a data
   view. NautilusContentView and NautilusMetaView derive from this
   class. */

Elliot Lee's avatar
Elliot Lee committed
29
30
31
32
33
34
#ifndef __NAUTILUS_VIEW_H__
#define __NAUTILUS_VIEW_H__

#include <gtk/gtkwidget.h>
#include <gtk/gtkbin.h>
#include "ntl-types.h"
35
#include <bonobo/gnome-bonobo.h>
Elliot Lee's avatar
Elliot Lee committed
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

#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
{
52
  GtkBinClass parent_spot;
Elliot Lee's avatar
Elliot Lee committed
53

54
  void (*notify_location_change)	(NautilusView *view,
Elliot Lee's avatar
Elliot Lee committed
55
56
57
					 Nautilus_NavigationInfo *nav_context);
  void (*notify_selection_change)	(NautilusView *view,
					 Nautilus_SelectionInfo *nav_context);
58
59
60
  void (*load_state) (NautilusView *view, const char *config_path);
  void (*save_state) (NautilusView *view, const char *config_path);
  void (*show_properties) (NautilusView *view);
Elliot Lee's avatar
Elliot Lee committed
61

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

  GtkBinClass *parent_class;
Elliot Lee's avatar
Elliot Lee committed
65
  guint view_signals[6];
66
  guint num_construct_args;
Elliot Lee's avatar
Elliot Lee committed
67
68

  gpointer servant_init_func, servant_destroy_func, vepv;
Elliot Lee's avatar
Elliot Lee committed
69
70
};

71
72
73
74
75
76
77
78
struct _NautilusView
{
  GtkBin parent;

  GtkWidget *main_window;

  char *iid;
  GtkWidget *client;
Elliot Lee's avatar
Elliot Lee committed
79
80
81
  CORBA_Object view_client;

  GnomeObject *view_frame;
82
83
84
85

  guint construct_arg_count;
};

Elliot Lee's avatar
Elliot Lee committed
86
87
GtkType nautilus_view_get_type                (void);
void    nautilus_view_request_location_change (NautilusView              *view,
Elliot Lee's avatar
Elliot Lee committed
88
89
90
					       Nautilus_NavigationRequestInfo *loc);
void    nautilus_view_request_selection_change (NautilusView              *view,
						Nautilus_SelectionRequestInfo *loc);
Elliot Lee's avatar
Elliot Lee committed
91
92
void    nautilus_view_request_status_change    (NautilusView              *view,
                                                Nautilus_StatusRequestInfo *loc);
93
94
void    nautilus_view_load_client              (NautilusView              *view,
                                                const char *               iid);
95
96
const char *nautilus_view_get_iid(NautilusView *view);
CORBA_Object nautilus_view_get_client_objref(NautilusView *view);
97
98
99

/* This is a "protected" operation */
void    nautilus_view_construct_arg_set(NautilusView *view);
Elliot Lee's avatar
Elliot Lee committed
100
101
102
103
104
105
106

#ifdef __cplusplus
}
#endif /* __cplusplus */


#endif /* __NAUTILUS_VIEW_H__ */