5 #include "render/render.h"
10 #define POPUP_WIDTH 320
11 #define POPUP_HEIGHT 48
13 typedef struct _ObPopup ObPopup
;
14 typedef struct _ObIconPopup ObIconPopup
;
15 typedef struct _ObPagerPopup ObPagerPopup
;
34 void (*draw_icon
)(gint x
, gint y
, gint w
, gint h
, gpointer data
);
35 gpointer draw_icon_data
;
53 RrAppearance
*hilight
;
54 RrAppearance
*unhilight
;
57 ObPopup
*popup_new(gboolean hasicon
);
58 void popup_free(ObPopup
*self
);
60 /*! Position the popup. The gravity rules are not the same X uses for windows,
61 instead of the position being the top-left of the window, the gravity
62 specifies which corner of the popup will be placed at the given coords.
63 Static and Forget gravity are equivilent to NorthWest.
65 void popup_position(ObPopup
*self
, gint gravity
, gint x
, gint y
);
66 /*! Set the sizes for the popup. When set to 0, the size will be based on
68 void popup_size(ObPopup
*self
, gint w
, gint h
);
69 void popup_size_to_string(ObPopup
*self
, gchar
*text
);
71 void popup_set_text_align(ObPopup
*self
, RrJustify align
);
73 void popup_show(ObPopup
*self
, gchar
*text
);
74 void popup_hide(ObPopup
*self
);
76 RrAppearance
*popup_icon_appearance(ObPopup
*self
);
79 ObIconPopup
*icon_popup_new();
80 void icon_popup_free(ObIconPopup
*self
);
82 void icon_popup_show(ObIconPopup
*self
,
83 gchar
*text
, struct _ObClientIcon
*icon
);
84 #define icon_popup_hide(p) popup_hide((p)->popup)
85 #define icon_popup_position(p, g, x, y) popup_position((p)->popup,(g),(x),(y))
86 #define icon_popup_size(p, w, h) popup_size((p)->popup,(w),(h))
87 #define icon_popup_size_to_string(p, s) popup_size_to_string((p)->popup,(s))
88 #define icon_popup_set_text_align(p, j) popup_set_text_align((p)->popup,(j))
90 ObPagerPopup
*pager_popup_new();
91 void pager_popup_free(ObPagerPopup
*self
);
93 void pager_popup_show(ObPagerPopup
*self
, gchar
*text
, guint desk
);
94 #define pager_popup_hide(p) popup_hide((p)->popup)
95 #define pager_popup_position(p, g, x, y) popup_position((p)->popup,(g),(x),(y))
96 #define pager_popup_size(p, w, h) popup_size((p)->popup,(w),(h))
97 #define pager_popup_size_to_string(p, s) popup_size_to_string((p)->popup,(s))
98 #define pager_popup_set_text_align(p, j) popup_set_text_align((p)->popup,(j))