1 | #ifndef EXTERN_H |
---|
2 | #define EXTERN_H |
---|
3 | |
---|
4 | #include <glib.h> |
---|
5 | #include "panel.h" |
---|
6 | #include "panel-widget.h" |
---|
7 | #include "gnome-panel.h" |
---|
8 | |
---|
9 | #include <libgnorba/gnorba.h> |
---|
10 | |
---|
11 | BEGIN_GNOME_DECLS |
---|
12 | |
---|
13 | typedef struct _Extern Extern; |
---|
14 | struct _Extern { |
---|
15 | POA_GNOME_PanelSpot servant; |
---|
16 | GNOME_PanelSpot pspot; |
---|
17 | GNOME_Applet applet; |
---|
18 | |
---|
19 | int refcount; /* primitive refcounting */ |
---|
20 | |
---|
21 | gboolean didnt_want_save; /* normally FALSE, if an app returned TRUE |
---|
22 | from save session it's set to TRUE, |
---|
23 | in which case we won't warn about it |
---|
24 | croaking and wanting a reload, because |
---|
25 | it wouldn't work anyway. */ |
---|
26 | |
---|
27 | gboolean clean_remove; /* normally FALSE, if TRUE, the user or the |
---|
28 | applet requested to be killed, thus the |
---|
29 | panel should not ask about putting the |
---|
30 | applet back as if it may have crashed, |
---|
31 | this is why it is important that applets |
---|
32 | use the _remove method (unregister_us |
---|
33 | corba call), so that this gets set, when |
---|
34 | they want to leave cleanly */ |
---|
35 | |
---|
36 | char *goad_id; |
---|
37 | char *cfg; |
---|
38 | GtkWidget *ebox; |
---|
39 | gboolean started; |
---|
40 | gboolean exactpos; |
---|
41 | gboolean send_position; |
---|
42 | gboolean send_draw; |
---|
43 | PanelOrientation orient; /* current orient, if it doesn't change, |
---|
44 | don't send any orient change */ |
---|
45 | |
---|
46 | int send_draw_timeout; |
---|
47 | int send_draw_idle; |
---|
48 | gboolean send_draw_queued; |
---|
49 | |
---|
50 | AppletInfo *info; |
---|
51 | }; |
---|
52 | |
---|
53 | Extern *extern_ref (Extern *ext); |
---|
54 | void extern_unref (Extern *ext); |
---|
55 | void extern_clean (Extern *ext); |
---|
56 | |
---|
57 | void extern_before_remove (Extern *ext); |
---|
58 | |
---|
59 | void load_extern_applet (const char *goad_id, |
---|
60 | const char *cfgpath, |
---|
61 | PanelWidget *panel, |
---|
62 | int pos, |
---|
63 | gboolean exactpos, |
---|
64 | gboolean queue); |
---|
65 | void load_queued_externs (void); |
---|
66 | |
---|
67 | void panel_corba_clean_up (void); |
---|
68 | gint panel_corba_gtk_init (CORBA_ORB panel_orb); |
---|
69 | |
---|
70 | /* to be called when we want to send a draw signal to an applet */ |
---|
71 | void extern_send_draw (Extern *ext); |
---|
72 | |
---|
73 | void save_applet (AppletInfo *info, |
---|
74 | gboolean ret); |
---|
75 | |
---|
76 | void extern_save_last_position (Extern *ext, gboolean sync); |
---|
77 | |
---|
78 | END_GNOME_DECLS |
---|
79 | |
---|
80 | |
---|
81 | |
---|
82 | #endif |
---|