summaryrefslogtreecommitdiff
path: root/src/ui/fixedtip.h
diff options
context:
space:
mode:
authorThomas Thurman <tthurman@gnome.org>2008-04-29 02:54:56 +0000
committerThomas James Alexander Thurman <tthurman@src.gnome.org>2008-04-29 02:54:56 +0000
commiteacd44278733eea025109ee0fe1420e450bda882 (patch)
tree3065b7944a820f9b2a46bd76b85e76a8dfc6a921 /src/ui/fixedtip.h
parentb8a9ed1d3a5dcb143b444572796a55f41df1afd9 (diff)
downloadmetacity-eacd44278733eea025109ee0fe1420e450bda882.tar.gz
documentation
2008-04-29 Thomas Thurman <tthurman@gnome.org> * src/ui/fixedtip.[ch]: documentation svn path=/trunk/; revision=3697
Diffstat (limited to 'src/ui/fixedtip.h')
-rw-r--r--src/ui/fixedtip.h37
1 files changed, 35 insertions, 2 deletions
diff --git a/src/ui/fixedtip.h b/src/ui/fixedtip.h
index 3b3e6fff..c196389d 100644
--- a/src/ui/fixedtip.h
+++ b/src/ui/fixedtip.h
@@ -1,7 +1,5 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
-/* Metacity fixed tooltip routine */
-
/*
* Copyright (C) 2001 Havoc Pennington
*
@@ -21,15 +19,50 @@
* 02111-1307, USA.
*/
+/**
+ * \file fixedtip.h Metacity fixed tooltip routine
+ *
+ * Sometimes we want to display a small floating rectangle with helpful
+ * text near the pointer. For example, if the user holds the mouse over
+ * the maximise button, we can display a tooltip saying "Maximize".
+ * The text is localised, of course.
+ *
+ * This file contains the functions to create and delete these tooltips.
+ *
+ * \todo Since we now consider MetaDisplay a singleton, there can be
+ * only one tooltip per display; this might quite simply live in
+ * display.c. Alternatively, it could move to frames.c, which
+ * is the only place this business is called anyway.
+ *
+ * \todo Apparently some UI needs changing (check bugzilla)
+ */
+
#ifndef META_FIXED_TIP_H
#define META_FIXED_TIP_H
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
+/**
+ * Displays a tooltip. There can be only one across the entire system.
+ * This function behaves identically whether or not a tooltip is already
+ * displayed, but if it is the window will be reused rather than destroyed
+ * and recreated.
+ *
+ * \param xdisplay An X display.
+ * \param screen_number The number of the screen.
+ * \param root_x The X coordinate where the tooltip should appear
+ * \param root_y The Y coordinate where the tooltip should appear
+ * \param markup_text Text to display in the tooltip; can contain markup
+ */
void meta_fixed_tip_show (Display *xdisplay, int screen_number,
int root_x, int root_y,
const char *markup_text);
+
+/**
+ * Removes the tooltip that was created by meta_fixed_tip_show(). If there
+ * is no tooltip currently visible, this is a no-op.
+ */
void meta_fixed_tip_hide (void);