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 | BEGIN_GNOME_DECLS |
---|
14 | |
---|
15 | #define TYPE_SLIDING_POS (sliding_pos_get_type ()) |
---|
16 | #define SLIDING_POS(o) (GTK_CHECK_CAST ((o), TYPE_SLIDING_POS, SlidingPos)) |
---|
17 | #define SLIDING_POS_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), TYPE_SLIDING_POS, SlidingPosClass)) |
---|
18 | #define IS_SLIDING_POS(o) (GTK_CHECK_TYPE ((o), TYPE_SLIDING_POS)) |
---|
19 | #define IS_SLIDING_POS_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), TYPE_SLIDING_POS)) |
---|
20 | |
---|
21 | #define TYPE_SLIDING_WIDGET (TYPE_BORDER_WIDGET) |
---|
22 | #define SLIDING_WIDGET(o) (BORDER_WIDGET(o)) |
---|
23 | #define SLIDING_WIDGET_CLASS(k) (BORDER_WIDGET_CLASS(k)) |
---|
24 | #define IS_SLIDING_WIDGET(o) (IS_BORDER_WIDGET(o) && IS_SLIDING_POS(BASEP_WIDGET(o)->pos)) |
---|
25 | /* this is not reliable */ |
---|
26 | #define IS_SLIDING_WIDGET_CLASS(k) (IS_BORDER_WIDGET_CLASS(k)) |
---|
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 | SlidingAnchor anchor); |
---|
52 | |
---|
53 | void (*offset_change) (SlidingPos *sliding, |
---|
54 | gint16 offset); |
---|
55 | }; |
---|
56 | |
---|
57 | GtkType sliding_pos_get_type (void) G_GNUC_CONST; |
---|
58 | GtkWidget *sliding_widget_new (int screen, |
---|
59 | SlidingAnchor anchor, |
---|
60 | gint16 offset, |
---|
61 | BorderEdge edge, |
---|
62 | BasePMode mode, |
---|
63 | BasePState state, |
---|
64 | BasePLevel level, |
---|
65 | gboolean avoid_on_maximize, |
---|
66 | int sz, |
---|
67 | gboolean hidebuttons_enabled, |
---|
68 | gboolean hidebutton_pixmaps_enabled, |
---|
69 | PanelBackType back_type, |
---|
70 | char *back_pixmap, |
---|
71 | gboolean fit_pixmap_bg, |
---|
72 | gboolean strech_pixmap_bg, |
---|
73 | gboolean rotate_pixmap_bg, |
---|
74 | GdkColor *back_color); |
---|
75 | |
---|
76 | void sliding_widget_change_params (SlidingWidget *slidingw, |
---|
77 | int screen, |
---|
78 | SlidingAnchor anchor, |
---|
79 | gint16 offset, |
---|
80 | BorderEdge edge, |
---|
81 | int sz, |
---|
82 | BasePMode mode, |
---|
83 | BasePState state, |
---|
84 | BasePLevel level, |
---|
85 | gboolean avoid_on_maximize, |
---|
86 | gboolean hidebuttons_enabled, |
---|
87 | gboolean hidebutton_pixmaps_enabled, |
---|
88 | PanelBackType back_type, |
---|
89 | char *pixmap_name, |
---|
90 | gboolean fit_pixmap_bg, |
---|
91 | gboolean strech_pixmap_bg, |
---|
92 | gboolean rotate_pixmap_bg, |
---|
93 | GdkColor *back_color); |
---|
94 | |
---|
95 | void sliding_widget_change_anchor (SlidingWidget *sliding, |
---|
96 | SlidingAnchor anchor); |
---|
97 | |
---|
98 | void sliding_widget_change_offset (SlidingWidget *sliding, |
---|
99 | gint16 offset); |
---|
100 | |
---|
101 | void sliding_widget_change_anchor_offset_edge (SlidingWidget *sliding, |
---|
102 | SlidingAnchor anchor, |
---|
103 | gint16 offset, |
---|
104 | BorderEdge edge); |
---|
105 | END_GNOME_DECLS |
---|
106 | |
---|
107 | #endif |
---|