summaryrefslogtreecommitdiff
path: root/gtk/gtkmenu.h
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>1998-08-25 00:06:38 +0000
committerOwen Taylor <otaylor@src.gnome.org>1998-08-25 00:06:38 +0000
commitcaf8ebc6f141697ae7a8a89ddce6afc295c69588 (patch)
tree7a5490219e90c7d42bda5f5f8c965e85fb5b98d3 /gtk/gtkmenu.h
parentb93d68929025fd54f10c9dcdfaa95b023406d057 (diff)
downloadgtk+-caf8ebc6f141697ae7a8a89ddce6afc295c69588.tar.gz
Reference count the fonts used in the text widget.
Mon Aug 24 18:37:15 1998 Owen Taylor <otaylor@redhat.com> * gtk/gtktext.c: Reference count the fonts used in the text widget. * gdk/gdk.h gdk/gdkcolor.c: Rename the color allocation freeing functions to be more consistent, and more convenient; leave the old names in for backwards compatibility. * gdk/gdkcolor.c gdk/gdkprivate.h: Reference count the allocations in pseudo-color colormaps to greatly reduce calls to XAllocColor. Keep a per-colormap hashtable to speed up finding if there is an already-allocated matching color. * gdk/gdkcolor.c: Don't just match read the system colormap when the colormap is created, but synchronize our copy with the system colormap periodically. * gdk/gdk.c gdk/gdktypes.h gtk/gtkentry.c gtk/gtktext.c: Change XIM constants names to match GDK conventions * gtk/testinput.c: Allow the drawing area to get the focus. * gtk/testgtk.c: Change around the Text test to demonstrates multiple fonts, use more colors. * gtk/gtkwidget.c: Improve gtk_widget_get_colormap()/visual() so they work after a widget is unrealized. * gtk/gtktext.[ch]: Remove the requirement that the text widget be realized before adding text (!) Allocate colors ourself, instead of requiring the caller allocate them. Allow changing styles to work properly by keeping track of the values for a certain property are default or set explicitely. * gtk/gtkmenu.h: Added some comments. * gtk/gtkentry.c: Changes to match XIM constants. * gtk/gdk.h gdk/gdkwindow.c: Add gdk_drawable_set_data(), for adding keyed data to drawables. (Uses g_dataset internally) * gdk/gdkpixmap.c: Keep track of the colors we allocate, when creating an XPM - store them as user data for the GdkPixmap, so we don't leak colors when we create pixmaps from XPM's. Allocate memory for color information in large blocks instead of as many little pieces.
Diffstat (limited to 'gtk/gtkmenu.h')
-rw-r--r--gtk/gtkmenu.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/gtk/gtkmenu.h b/gtk/gtkmenu.h
index 8600627dd0..856eb27887 100644
--- a/gtk/gtkmenu.h
+++ b/gtk/gtkmenu.h
@@ -73,6 +73,8 @@ struct _GtkMenuClass
GtkType gtk_menu_get_type (void);
GtkWidget* gtk_menu_new (void);
+
+/* Wrappers for the Menu Shell operations */
void gtk_menu_append (GtkMenu *menu,
GtkWidget *child);
void gtk_menu_prepend (GtkMenu *menu,
@@ -80,6 +82,8 @@ void gtk_menu_prepend (GtkMenu *menu,
void gtk_menu_insert (GtkMenu *menu,
GtkWidget *child,
gint position);
+
+/* Display the menu onscreen */
void gtk_menu_popup (GtkMenu *menu,
GtkWidget *parent_menu_shell,
GtkWidget *parent_menu_item,
@@ -87,17 +91,39 @@ void gtk_menu_popup (GtkMenu *menu,
gpointer data,
guint button,
guint32 activate_time);
+
+/* Position the menu according to it's position function. Called
+ * from gtkmenuitem.c when a menu-item changes its allocation
+ */
void gtk_menu_reposition (GtkMenu *menu);
+
void gtk_menu_popdown (GtkMenu *menu);
+
+/* Keep track of the last menu item selected. (For the purposes
+ * of the option menu
+ */
GtkWidget* gtk_menu_get_active (GtkMenu *menu);
void gtk_menu_set_active (GtkMenu *menu,
guint index);
+
void gtk_menu_set_accel_group (GtkMenu *menu,
GtkAccelGroup *accel_group);
+
+/* A reference count is kept for a widget when it is attached to
+ * a particular widget. This is typically a menu item; it may also
+ * be a widget with a popup menu - for instance, the Notebook widget.
+ */
void gtk_menu_attach_to_widget (GtkMenu *menu,
GtkWidget *attach_widget,
GtkMenuDetachFunc detacher);
+void gtk_menu_detach (GtkMenu *menu);
+
+/* This should be dumped in favor of data set when the menu is popped
+ * up - that is currently in the ItemFactory code, but should be
+ * in the Menu code.
+ */
GtkWidget* gtk_menu_get_attach_widget (GtkMenu *menu);
+
void gtk_menu_detach (GtkMenu *menu);
void gtk_menu_set_tearoff_state (GtkMenu *menu,
gboolean torn_off);