]> Dogcows Code - chaz/openbox/blobdiff - openbox/popup.h
fixes for resizing to strings.
[chaz/openbox] / openbox / popup.h
index 1ffcc61f8a3b0c5dfcaaaf37f91b640caddc6e78..4b07bd9d7920066ee114eaa62eae1250c4ace679 100644 (file)
@@ -1,7 +1,7 @@
-/* -*- indent-tabs-mode: t; tab-width: 4; c-basic-offset: 4; -*-
+/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
 
    popup.h for the Openbox window manager
-   Copyright (c) 2003        Ben Jansens
+   Copyright (c) 2003-2007   Dana Jansens
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -47,7 +47,9 @@ struct _ObPopup
     gint y;
     gint w;
     gint h;
+    gint maxw;
     gboolean mapped;
+    gboolean delay_mapped;
  
     void (*draw_icon)(gint x, gint y, gint w, gint h, gpointer data);
     gpointer draw_icon_data;
@@ -83,12 +85,16 @@ void popup_free(ObPopup *self);
 void popup_position(ObPopup *self, gint gravity, gint x, gint y);
 /*! Set the sizes for the popup. When set to 0, the size will be based on
   the text size. */
-void popup_size(ObPopup *self, gint w, gint h);
-void popup_size_to_string(ObPopup *self, gchar *text);
+void popup_width(ObPopup *self, gint w);
+void popup_height(ObPopup *self, gint w);
+void popup_width_to_string(ObPopup *self, gchar *text, gint max);
+void popup_height_to_string(ObPopup *self, gchar *text);
+void popup_width_to_strings(ObPopup *self, gchar **strings, gint num,gint max);
 
 void popup_set_text_align(ObPopup *self, RrJustify align);
 
-void popup_show(ObPopup *self, gchar *text);
+#define popup_show(s, t) popup_delay_show((s),0,(t))
+void popup_delay_show(ObPopup *self, gulong usec, gchar *text);
 void popup_hide(ObPopup *self);
 
 RrAppearance *popup_icon_appearance(ObPopup *self);
@@ -97,22 +103,33 @@ RrAppearance *popup_icon_appearance(ObPopup *self);
 ObIconPopup *icon_popup_new();
 void icon_popup_free(ObIconPopup *self);
 
-void icon_popup_show(ObIconPopup *self,
-                     gchar *text, struct _ObClientIcon *icon);
+#define icon_popup_show(s, t, i) icon_popup_delay_show((s),0,(t),(i))
+void icon_popup_delay_show(ObIconPopup *self, gulong usec,
+                           gchar *text, const struct _ObClientIcon *icon);
 #define icon_popup_hide(p) popup_hide((p)->popup)
 #define icon_popup_position(p, g, x, y) popup_position((p)->popup,(g),(x),(y))
-#define icon_popup_size(p, w, h) popup_size((p)->popup,(w),(h))
-#define icon_popup_size_to_string(p, s) popup_size_to_string((p)->popup,(s))
+#define icon_popup_width(p, w) popup_width((p)->popup,(w))
+#define icon_popup_height(p, h) popup_height((p)->popup,(h))
+#define icon_popup_width_to_string(p, s, n, m) \
+    popup_width_to_string((p)->popup,(s),(n),(m))
+#define icon_popup_width_to_strings(p, s, n, m) \
+    popup_width_to_strings((p)->popup,(s),(n),(m))
 #define icon_popup_set_text_align(p, j) popup_set_text_align((p)->popup,(j))
 
 ObPagerPopup *pager_popup_new();
 void pager_popup_free(ObPagerPopup *self);
 
-void pager_popup_show(ObPagerPopup *self, gchar *text, guint desk);
+#define pager_popup_show(s, t, d) pager_popup_delay_show((s),0,(t),(d))
+void pager_popup_delay_show(ObPagerPopup *self, gulong usec,
+                            gchar *text, guint desk);
 #define pager_popup_hide(p) popup_hide((p)->popup)
 #define pager_popup_position(p, g, x, y) popup_position((p)->popup,(g),(x),(y))
-#define pager_popup_size(p, w, h) popup_size((p)->popup,(w),(h))
-#define pager_popup_size_to_string(p, s) popup_size_to_string((p)->popup,(s))
+#define pager_popup_width(p, w) popup_width((p)->popup,(w))
+#define pager_popup_height(p, h) popup_height((p)->popup,(h))
+#define pager_popup_width_to_string(p, s, n, m) \
+    popup_width_to_string((p)->popup,(s),(n),(m))
+#define pager_popup_width_to_strings(p, s, n, m) \
+    popup_width_to_strings((p)->popup,(s),(n),(m))
 #define pager_popup_set_text_align(p, j) popup_set_text_align((p)->popup,(j))
 
 #endif
This page took 0.021253 seconds and 4 git commands to generate.