1 | /* Gnome panel: floating (as in movement, not speech) widget |
---|
2 | * (C) 1999 the Free Software Foundation |
---|
3 | * |
---|
4 | * Authors: Jacob Berkman |
---|
5 | */ |
---|
6 | |
---|
7 | #ifndef FLOATING_WIDGET_H |
---|
8 | #define FLOATING_WIDGET_H |
---|
9 | |
---|
10 | #include "basep-widget.h" |
---|
11 | |
---|
12 | BEGIN_GNOME_DECLS |
---|
13 | |
---|
14 | #define TYPE_FLOATING_POS (floating_pos_get_type ()) |
---|
15 | #define FLOATING_POS(o) (GTK_CHECK_CAST ((o), TYPE_FLOATING_POS, FloatingPos)) |
---|
16 | #define FLOATING_POS_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), TYPE_FLOATING_POS, FloatingPosClass)) |
---|
17 | #define IS_FLOATING_POS(o) (GTK_CHECK_TYPE ((o), TYPE_FLOATING_POS)) |
---|
18 | #define IS_FLOATING_POS_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), TYPE_FLOATING_POS)) |
---|
19 | |
---|
20 | #define TYPE_FLOATING_WIDGET (TYPE_BASEP_WIDGET) |
---|
21 | #define FLOATING_WIDGET(o) (BASEP_WIDGET(o)) |
---|
22 | #define FLOATING_WIDGET_CLASS(k) (BASEP_WIDGET_CLASS(k)) |
---|
23 | #define IS_FLOATING_WIDGET(o) (IS_BASEP_WIDGET(o) && IS_FLOATING_POS(BASEP_WIDGET(o)->pos)) |
---|
24 | /* this is not reliable */ |
---|
25 | #define IS_FLOATING_WIDGET_CLASS(k) (IS_BASEP_WIDGET_CLASS(k)) |
---|
26 | |
---|
27 | typedef BasePWidget FloatingWidget; |
---|
28 | typedef BasePWidgetClass FloatingWidgetClass; |
---|
29 | |
---|
30 | typedef struct _FloatingPos FloatingPos; |
---|
31 | typedef struct _FloatingPosClass FloatingPosClass; |
---|
32 | |
---|
33 | struct _FloatingPos { |
---|
34 | BasePPos pos; |
---|
35 | |
---|
36 | gint16 x, y; |
---|
37 | }; |
---|
38 | |
---|
39 | struct _FloatingPosClass { |
---|
40 | BasePPosClass parent_class; |
---|
41 | |
---|
42 | /* signal */ |
---|
43 | void (*coords_change) (FloatingPos *pos, |
---|
44 | gint x, gint y); |
---|
45 | }; |
---|
46 | |
---|
47 | GtkType floating_pos_get_type (void) G_GNUC_CONST; |
---|
48 | GtkWidget *floating_widget_new (int screen, |
---|
49 | gint16 x, |
---|
50 | gint16 y, |
---|
51 | PanelOrientation orient, |
---|
52 | BasePMode mode, |
---|
53 | BasePState state, |
---|
54 | BasePLevel level, |
---|
55 | gboolean avoid_on_maximize, |
---|
56 | int sz, |
---|
57 | gboolean hidebuttons_enabled, |
---|
58 | gboolean hidebutton_pixmap_enabled, |
---|
59 | PanelBackType back_type, |
---|
60 | char *back_pixmap, |
---|
61 | gboolean fit_pixmap_bg, |
---|
62 | gboolean strech_pixmap_bg, |
---|
63 | gboolean rotate_pixmap_bg, |
---|
64 | GdkColor *back_color); |
---|
65 | |
---|
66 | void floating_widget_change_params (FloatingWidget *floating, |
---|
67 | int screen, |
---|
68 | gint16 x, |
---|
69 | gint16 y, |
---|
70 | PanelOrientation orient, |
---|
71 | BasePMode mode, |
---|
72 | BasePState state, |
---|
73 | BasePLevel level, |
---|
74 | gboolean avoid_on_maximize, |
---|
75 | int sz, |
---|
76 | gboolean hidebuttons_enabled, |
---|
77 | gboolean hidebutton_pixmap_enabled, |
---|
78 | PanelBackType back_type, |
---|
79 | char *back_pixmap, |
---|
80 | gboolean fit_pixmap_bg, |
---|
81 | gboolean strech_pixmap_bg, |
---|
82 | gboolean rotate_pixmap_bg, |
---|
83 | GdkColor *back_color); |
---|
84 | |
---|
85 | void floating_widget_change_coords (FloatingWidget *floating, |
---|
86 | gint16 x, gint16 y); |
---|
87 | |
---|
88 | void floating_widget_change_orient (FloatingWidget *floating, |
---|
89 | PanelOrientation orient); |
---|
90 | |
---|
91 | END_GNOME_DECLS |
---|
92 | |
---|
93 | #endif |
---|