1 | /* Gnome panel: sliding widget |
---|
2 | * (C) 1999 the Free Software Foundation |
---|
3 | * |
---|
4 | * Authors: Jacob Berkman |
---|
5 | * George Lebl |
---|
6 | */ |
---|
7 | |
---|
8 | #ifndef SLIDING_WIDGET_H |
---|
9 | #define SLIDING_WIDGET_H |
---|
10 | |
---|
11 | #include "border-widget.h" |
---|
12 | |
---|
13 | G_BEGIN_DECLS |
---|
14 | |
---|
15 | #define SLIDING_TYPE_POS (sliding_pos_get_type ()) |
---|
16 | #define SLIDING_POS(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SLIDING_TYPE_POS, SlidingPos)) |
---|
17 | #define SLIDING_POS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SLIDING_TYPE_POS, SlidingPosClass)) |
---|
18 | #define SLIDING_IS_POS(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), SLIDING_TYPE_POS)) |
---|
19 | #define SLIDING_IS_POS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SLIDING_TYPE_POS)) |
---|
20 | |
---|
21 | #define SLIDING_TYPE_WIDGET (BORDER_TYPE_WIDGET) |
---|
22 | #define SLIDING_WIDGET(object) (BORDER_WIDGET(object)) |
---|
23 | #define SLIDING_WIDGET_CLASS(klass) (BORDER_WIDGET_CLASS(klass)) |
---|
24 | #define SLIDING_IS_WIDGET(object) (BORDER_IS_WIDGET(object) && SLIDING_IS_POS(BASEP_WIDGET(object)->pos)) |
---|
25 | /* this is not reliable */ |
---|
26 | #define SLIDING_IS_WIDGET_CLASS(klass) (BORDER_IS_WIDGET_CLASS(klass)) |
---|
27 | |
---|
28 | typedef BorderWidget SlidingWidget; |
---|
29 | typedef BorderWidgetClass SlidingWidgetClass; |
---|
30 | |
---|
31 | typedef struct _SlidingPos SlidingPos; |
---|
32 | typedef struct _SlidingPosClass SlidingPosClass; |
---|
33 | |
---|
34 | typedef enum { |
---|
35 | SLIDING_ANCHOR_LEFT, |
---|
36 | SLIDING_ANCHOR_RIGHT |
---|
37 | } SlidingAnchor; |
---|
38 | |
---|
39 | struct _SlidingPos { |
---|
40 | BorderPos pos; |
---|
41 | |
---|
42 | SlidingAnchor anchor; |
---|
43 | gint16 offset; |
---|
44 | }; |
---|
45 | |
---|
46 | struct _SlidingPosClass { |
---|
47 | BorderPosClass parent_class; |
---|
48 | |
---|
49 | /* signal */ |
---|
50 | void (*anchor_change) (SlidingPos *sliding); |
---|
51 | void (*offset_change) (SlidingPos *sliding); |
---|
52 | }; |
---|
53 | |
---|
54 | GType sliding_pos_get_type (void) G_GNUC_CONST; |
---|
55 | |
---|
56 | GtkWidget *sliding_widget_new (const char *panel_id, |
---|
57 | int screen, |
---|
58 | int monitor, |
---|
59 | SlidingAnchor anchor, |
---|
60 | gint16 offset, |
---|
61 | BorderEdge edge, |
---|
62 | BasePMode mode, |
---|
63 | BasePState state, |
---|
64 | int sz, |
---|
65 | gboolean hidebuttons_enabled, |
---|
66 | gboolean hidebutton_pixmaps_enabled, |
---|
67 | PanelBackgroundType back_type, |
---|
68 | const char *back_pixmap, |
---|
69 | gboolean fit_pixmap_bg, |
---|
70 | gboolean stretch_pixmap_bg, |
---|
71 | gboolean rotate_pixmap_bg, |
---|
72 | PanelColor *back_color); |
---|
73 | |
---|
74 | void sliding_widget_change_params (SlidingWidget *slidingw, |
---|
75 | int screen, |
---|
76 | int monitor, |
---|
77 | SlidingAnchor anchor, |
---|
78 | gint16 offset, |
---|
79 | BorderEdge edge, |
---|
80 | int sz, |
---|
81 | BasePMode mode, |
---|
82 | BasePState state, |
---|
83 | gboolean hidebuttons_enabled, |
---|
84 | gboolean hidebutton_pixmaps_enabled, |
---|
85 | PanelBackgroundType back_type, |
---|
86 | char *pixmap_name, |
---|
87 | gboolean fit_pixmap_bg, |
---|
88 | gboolean stretch_pixmap_bg, |
---|
89 | gboolean rotate_pixmap_bg, |
---|
90 | PanelColor *back_color); |
---|
91 | |
---|
92 | void sliding_widget_change_anchor (SlidingWidget *sliding, |
---|
93 | SlidingAnchor anchor); |
---|
94 | |
---|
95 | void sliding_widget_change_offset (SlidingWidget *sliding, |
---|
96 | gint16 offset); |
---|
97 | |
---|
98 | void sliding_widget_change_anchor_offset_edge (SlidingWidget *sliding, |
---|
99 | SlidingAnchor anchor, |
---|
100 | gint16 offset, |
---|
101 | BorderEdge edge); |
---|
102 | G_END_DECLS |
---|
103 | |
---|
104 | #endif |
---|