summaryrefslogtreecommitdiff
path: root/gdk/gdk.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 /gdk/gdk.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 'gdk/gdk.h')
-rw-r--r--gdk/gdk.h65
1 files changed, 47 insertions, 18 deletions
diff --git a/gdk/gdk.h b/gdk/gdk.h
index 3132700240..cf4babbcb7 100644
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -307,6 +307,11 @@ void gdk_window_set_functions (GdkWindow *window,
GdkWMFunction functions);
GList * gdk_window_get_toplevels (void);
+void gdk_drawable_set_data (GdkDrawable *drawable,
+ const gchar *key,
+ gpointer data,
+ GDestroyNotify destroy_func);
+
/* Cursors
*/
@@ -455,6 +460,22 @@ gint gdk_colormap_get_system_size (void);
void gdk_colormap_change (GdkColormap *colormap,
gint ncolors);
+
+
+gint gdk_colormap_alloc_colors (GdkColormap *colormap,
+ GdkColor *colors,
+ gint ncolors,
+ gboolean writeable,
+ gboolean best_match,
+ gboolean *success);
+gboolean gdk_colormap_alloc_color (GdkColormap *colormap,
+ GdkColor *color,
+ gboolean writeable,
+ gboolean best_match);
+void gdk_colormap_free_colors (GdkColormap *colormap,
+ GdkColor *colors,
+ gint ncolors);
+
void gdk_colors_store (GdkColormap *colormap,
GdkColor *colors,
gint ncolors);
@@ -482,8 +503,10 @@ gint gdk_color_alloc (GdkColormap *colormap,
GdkColor *color);
gint gdk_color_change (GdkColormap *colormap,
GdkColor *color);
-gint gdk_color_equal (GdkColor *colora,
- GdkColor *colorb);
+guint gdk_color_hash (const GdkColor *colora,
+ const GdkColor *colorb);
+gint gdk_color_equal (const GdkColor *colora,
+ const GdkColor *colorb);
/* Fonts
@@ -722,22 +745,27 @@ GdkTimeCoord *gdk_input_motion_events (GdkWindow *window,
/* International Input Method Support Functions
*/
-gint gdk_im_ready (void);
-
-void gdk_im_begin (GdkIC ic, GdkWindow* window);
-void gdk_im_end (void);
-GdkIMStyle gdk_im_decide_style (GdkIMStyle supported_style);
-GdkIMStyle gdk_im_set_best_style (GdkIMStyle best_allowed_style);
-GdkIC gdk_ic_new (GdkWindow* client_window,
- GdkWindow* focus_window,
- GdkIMStyle style, ...);
-void gdk_ic_destroy (GdkIC ic);
-GdkIMStyle gdk_ic_get_style (GdkIC ic);
-void gdk_ic_set_values (GdkIC ic, ...);
-void gdk_ic_get_values (GdkIC ic, ...);
-void gdk_ic_set_attr (GdkIC ic, const char *target, ...);
-void gdk_ic_get_attr (GdkIC ic, const char *target, ...);
-GdkEventMask gdk_ic_get_events (GdkIC ic);
+gint gdk_im_ready (void);
+
+void gdk_im_begin (GdkIC ic,
+ GdkWindow* window);
+void gdk_im_end (void);
+GdkIMStyle gdk_im_decide_style (GdkIMStyle supported_style);
+GdkIMStyle gdk_im_set_best_style (GdkIMStyle best_allowed_style);
+GdkIC gdk_ic_new (GdkWindow* client_window,
+ GdkWindow* focus_window,
+ GdkIMStyle style, ...);
+void gdk_ic_destroy (GdkIC ic);
+GdkIMStyle gdk_ic_get_style (GdkIC ic);
+void gdk_ic_set_values (GdkIC ic,
+ ...);
+void gdk_ic_get_values (GdkIC ic,
+ ...);
+void gdk_ic_set_attr (GdkIC ic,
+ const char *target, ...);
+void gdk_ic_get_attr (GdkIC ic,
+ const char *target, ...);
+GdkEventMask gdk_ic_get_events (GdkIC ic);
/* Color Context */
@@ -857,6 +885,7 @@ guint gdk_keyval_to_lower (guint keyval);
gboolean gdk_keyval_is_upper (guint keyval);
gboolean gdk_keyval_is_lower (guint keyval);
+
#include <gdk/gdkrgb.h>
#ifdef __cplusplus