File: bonobo-control-frame.h

package info (click to toggle)
bonobo 1.0.22-2.2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 13,412 kB
  • ctags: 5,445
  • sloc: ansic: 51,714; sh: 7,733; makefile: 1,425; yacc: 318; xml: 266; sed: 16
file content (113 lines) | stat: -rw-r--r-- 5,008 bytes parent folder | download | duplicates (2)
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
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/**
 * Bonobo control frame object.
 *
 * Authors:
 *   Nat Friedman    (nat@helixcode.com)
 *   Miguel de Icaza (miguel@kernel.org)
 *
 * Copyright 1999, 2000 Helix Code, Inc.
 */
#ifndef _BONOBO_CONTROL_FRAME_H_
#define _BONOBO_CONTROL_FRAME_H_

#include <libgnome/gnome-defs.h>
#include <gtk/gtkobject.h>
#include <gtk/gtkwidget.h>
#include <bonobo/bonobo-xobject.h>
#include <bonobo/bonobo-wrapper.h>
#include <bonobo/bonobo-property-bag-client.h>

BEGIN_GNOME_DECLS
 
#define BONOBO_CONTROL_FRAME_TYPE        (bonobo_control_frame_get_type ())
#define BONOBO_CONTROL_FRAME(o)          (GTK_CHECK_CAST ((o), BONOBO_CONTROL_FRAME_TYPE, BonoboControlFrame))
#define BONOBO_CONTROL_FRAME_CLASS(k)    (GTK_CHECK_CLASS_CAST((k), BONOBO_CONTROL_FRAME_TYPE, BonoboControlFrameClass))
#define BONOBO_IS_CONTROL_FRAME(o)       (GTK_CHECK_TYPE ((o), BONOBO_CONTROL_FRAME_TYPE))
#define BONOBO_IS_CONTROL_FRAME_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), BONOBO_CONTROL_FRAME_TYPE))

typedef struct _BonoboControlFramePrivate BonoboControlFramePrivate;

typedef struct {
	BonoboXObject base;
	BonoboControlFramePrivate *priv;
} BonoboControlFrame;

typedef struct {
	BonoboXObjectClass parent_class;

	POA_Bonobo_ControlFrame__epv epv;

	/* Signals. */
	void (*activated)           (BonoboControlFrame *control_frame, gboolean state);
	void (*activate_uri)        (BonoboControlFrame *control_frame, const char *uri, gboolean relative);

} BonoboControlFrameClass;


BonoboControlFrame           *bonobo_control_frame_new                       (Bonobo_UIContainer   ui_container);

GtkWidget                    *bonobo_control_frame_get_widget                (BonoboControlFrame  *frame);

/* This is only allowed when the Control is deactivated */
void                          bonobo_control_frame_set_ui_container          (BonoboControlFrame  *control_frame,
									      Bonobo_UIContainer   uic);

/* Activating remote controls */
void                          bonobo_control_frame_control_activate          (BonoboControlFrame  *control_frame);
void                          bonobo_control_frame_control_deactivate        (BonoboControlFrame  *control_frame);
void                          bonobo_control_frame_set_autoactivate          (BonoboControlFrame  *control_frame,
									      gboolean             autoactivate);
gboolean                      bonobo_control_frame_get_autoactivate          (BonoboControlFrame  *control_frame);

/* Remote properties */
Bonobo_PropertyBag            bonobo_control_frame_get_control_property_bag  (BonoboControlFrame  *control_frame,
									      CORBA_Environment   *ev);

/* Ambient properties */
void                          bonobo_control_frame_set_propbag               (BonoboControlFrame  *control_frame,
									      BonoboPropertyBag   *propbag);
BonoboPropertyBag            *bonobo_control_frame_get_propbag               (BonoboControlFrame  *control_frame);

/* Widget state proxying */
void                          bonobo_control_frame_control_set_state         (BonoboControlFrame  *control_frame,
									      GtkStateType         state);
void                          bonobo_control_frame_set_autostate             (BonoboControlFrame  *control_frame,
									      gboolean             autostate);
gboolean                      bonobo_control_frame_get_autostate             (BonoboControlFrame  *control_frame);


/* Connecting to the remote control */
void                          bonobo_control_frame_bind_to_control           (BonoboControlFrame  *control_frame,
									      Bonobo_Control       control);

Bonobo_Control                bonobo_control_frame_get_control               (BonoboControlFrame  *control_frame);

Bonobo_UIContainer            bonobo_control_frame_get_ui_container          (BonoboControlFrame  *control_frame);


/* Object construction stuff */
GtkType                       bonobo_control_frame_get_type                  (void);
BonoboControlFrame           *bonobo_control_frame_construct                 (BonoboControlFrame  *control_frame,
									      Bonobo_UIContainer   ui_container);

/*
 * A BonoboControlFrame acts as a proxy for the remote BonoboControl object to
 * which it is bound.  These functions act as wrappers which a
 * container can use to communicate with the BonoboControl associated with
 * a given BonoboControlFrame.
 */
void  bonobo_control_frame_size_request (BonoboControlFrame *control_frame,
					 int                *desired_width,
					 int                *desired_height);

/* You almost certainly don't want these methods */
void  bonobo_control_frame_sync_realize   (BonoboControlFrame *frame);
void  bonobo_control_frame_sync_unrealize (BonoboControlFrame *frame);

/* Or this.  It exists just so that BonoboSocket can use it. */
gboolean bonobo_control_frame_focus_child (BonoboControlFrame *frame, GtkDirectionType direction);
    
END_GNOME_DECLS

#endif /* _BONOBO_CONTROL_FRAME_H_ */