forked from AuroraMiddleware/gtk
allow positioning bubbles
This commit is contained in:
parent
3ad71f80c0
commit
bbca88c99c
@ -1,3 +1,12 @@
|
||||
2006-05-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtk.symbols:
|
||||
* gtk/gtkstatusicon.h:
|
||||
* gtk/gtkstatusicon.c (gtk_status_icon_get_geometry):
|
||||
New function that can be used to e.g. position
|
||||
notification bubbles wrt to the status icon.
|
||||
(#341450, Christian Persch, Havoc Pennington)
|
||||
|
||||
2006-05-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Make GTK+ work as an untrusted X client. (#136571,
|
||||
|
@ -1,3 +1,12 @@
|
||||
2006-05-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtk.symbols:
|
||||
* gtk/gtkstatusicon.h:
|
||||
* gtk/gtkstatusicon.c (gtk_status_icon_get_geometry):
|
||||
New function that can be used to e.g. position
|
||||
notification bubbles wrt to the status icon.
|
||||
(#341450, Christian Persch, Havoc Pennington)
|
||||
|
||||
2006-05-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Make GTK+ work as an untrusted X client. (#136571,
|
||||
|
@ -1,3 +1,7 @@
|
||||
2006-05-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtk-sections.txt: Updates
|
||||
|
||||
2006-05-23 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtk-sections.txt: Additions
|
||||
|
@ -3242,6 +3242,8 @@ gtk_status_icon_set_blinking
|
||||
gtk_status_icon_get_blinking
|
||||
gtk_status_icon_is_embedded
|
||||
gtk_status_icon_position_menu
|
||||
gtk_status_icon_get_geometry
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_STATUS_ICON
|
||||
GTK_STATUS_ICON
|
||||
|
@ -1065,6 +1065,7 @@ gtk_status_icon_set_blinking
|
||||
gtk_status_icon_get_blinking
|
||||
gtk_status_icon_is_embedded
|
||||
gtk_status_icon_position_menu
|
||||
gtk_status_icon_get_geometry
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -1631,5 +1631,60 @@ gtk_status_icon_position_menu (GtkMenu *menu,
|
||||
#endif /* GDK_WINDOWING_X11 */
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_status_icon_get_geometry:
|
||||
* @status_icon: a #GtkStatusIcon
|
||||
* @screen: return location for the screen
|
||||
* @area: return location for the area occupied by the status icon
|
||||
* @orientation: return location for the orientation of the panel
|
||||
* in which the status icon is embedded. A panel at the top or
|
||||
* bottom of the screen is horizontal, a panel at the left or
|
||||
* right is vertical.
|
||||
*
|
||||
* Obtains information about the location of the status icon
|
||||
* on screen. This information can be used to e.g. position
|
||||
* popups like notification bubbles.
|
||||
* See gtk_status_icon_position_menu() for a more convenient
|
||||
* alternative for positioning menus.
|
||||
*
|
||||
* Note that some platforms do not allow GTK+ to provide
|
||||
* this information.
|
||||
*
|
||||
* Return value: %TRUE if the location information has
|
||||
* been filled in
|
||||
*
|
||||
* Since: 2.10
|
||||
*/
|
||||
gboolean
|
||||
gtk_status_icon_get_geometry (GtkStatusIcon *status_icon,
|
||||
GdkScreen **screen,
|
||||
GdkRectangle *area,
|
||||
GtkOrientation *orientation)
|
||||
{
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
GtkWidget *widget;
|
||||
GtkStatusIconPrivate *priv;
|
||||
gint x, y;
|
||||
|
||||
g_return_if_fail (GTK_IS_STATUS_ICON (status_icon));
|
||||
|
||||
priv = status_icon->priv;
|
||||
widget = priv->tray_icon;
|
||||
|
||||
*screen = gtk_widget_get_screen (widget);
|
||||
gdk_window_get_origin (widget->window, &x, &y);
|
||||
area->x = x;
|
||||
area->y = y;
|
||||
area->width = widget->allocation.width;
|
||||
area->height = widget->allocation.height;
|
||||
*orientation = _gtk_tray_icon_get_orientation (GTK_TRAY_ICON (widget));
|
||||
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif /* GDK_WINDOWING_X11 */
|
||||
}
|
||||
|
||||
|
||||
#define __GTK_STATUS_ICON_C__
|
||||
#include "gtkaliasdef.c"
|
||||
|
@ -109,6 +109,10 @@ void gtk_status_icon_position_menu (GtkMenu *me
|
||||
gint *y,
|
||||
gboolean *push_in,
|
||||
gpointer user_data);
|
||||
gboolean gtk_status_icon_get_geometry (GtkStatusIcon *status_icon,
|
||||
GdkScreen **screen,
|
||||
GdkRectangle *area,
|
||||
GtkOrientation *orientation);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user