GDK boolean fixes




Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtk+/ChangeLog,v
retrieving revision 1.1061.2.212
diff -u -u -r1.1061.2.212 ChangeLog
--- ChangeLog	2000/01/25 15:18:16	1.1061.2.212
+++ ChangeLog	2000/01/25 17:04:00
@@ -1,3 +1,40 @@
+2000-01-25  Havoc Pennington  <hp@pobox.com>
+	
+	* gdk/gdkwindow.c (gdk_window_set_back_pixmap): parent_relative
+	arg is boolean
+
+	* gdk/gdkselection.c (gdk_selection_owner_set): return boolean
+
+	* gdk/gdkrectangle.c (gdk_rectangle_intersect): return boolean
+
+	* gdk/gdkproperty.c (gdk_property_get): return boolean
+
+	* gdk/gdkinput.c (gdk_input_set_mode): return boolean
+
+	* gdk/gdkim.c (gdk_im_ready): return boolean
+
+	* gdk/gdkgc.c (gdk_gc_set_exposures): gboolean arg
+
+	* gdk/gdkfont.c (gdk_font_equal): return gboolean (mild
+	glib clash, should fix glib)
+
+	* gdk/gdkevents.c (gdk_set_show_events): take gboolean arg
+	(gdk_get_show_events): return gboolean
+
+	* gdk/gdkcolor.c (gdk_colormap_new): gboolean flag whether the
+	colormap is private
+	(gdk_colors_alloc): gboolean whether to be contiguous
+	(gdk_color_equal): return gboolean since we are a predicate
+	and not a qsort() (this looks semi-wrong due to glib breakage,
+	IMO glib should be fixed)
+	
+	* gdk/gdk.c (gdk_set_use_xshm): take gboolean arg
+	(gdk_get_use_xshm): return gboolean
+	(gdk_pointer_is_grabbed): return gboolean
+
+	* gdk/gdk.h: Change prototypes to match all the above changes,
+	and re-run egtk-format-protos as required.
+	
 Mon Jan 24 10:44:48 2000  Owen Taylor  <otaylor@redhat.com>
 
 	* gtk/gtkcalendar.c (gtk_calendar_main_button): Handle
Index: gdk/gdk.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/gdk.c,v
retrieving revision 1.107.2.6
diff -u -u -r1.107.2.6 gdk.c
--- gdk/gdk.c	2000/01/25 14:42:27	1.107.2.6
+++ gdk/gdk.c	2000/01/25 17:04:00
@@ -479,12 +479,12 @@
 }
 
 void
-gdk_set_use_xshm (gint use_xshm)
+gdk_set_use_xshm (gboolean use_xshm)
 {
   gdk_use_xshm = use_xshm;
 }
 
-gint
+gboolean
 gdk_get_use_xshm (void)
 {
   return gdk_use_xshm;
@@ -734,7 +734,7 @@
  *--------------------------------------------------------------
  */
 
-gint
+gboolean
 gdk_pointer_is_grabbed (void)
 {
   return gdk_xgrab_window != NULL;
Index: gdk/gdk.h
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/gdk.h,v
retrieving revision 1.65.2.3
diff -u -u -r1.65.2.3 gdk.h
--- gdk/gdk.h	2000/01/21 23:22:50	1.65.2.3
+++ gdk/gdk.h	2000/01/25 17:04:03
@@ -66,11 +66,11 @@
 					 gpointer        data,
 					 GDestroyNotify  notify);
 
-void	  gdk_set_show_events		(gint		 show_events);
-void	  gdk_set_use_xshm		(gint		 use_xshm);
+void	  gdk_set_show_events		(gboolean	 show_events);
+void	  gdk_set_use_xshm		(gboolean	 use_xshm);
 
-gint	  gdk_get_show_events		(void);
-gint	  gdk_get_use_xshm		(void);
+gboolean  gdk_get_show_events		(void);
+gboolean  gdk_get_use_xshm		(void);
 gchar*	  gdk_get_display		(void);
 
 guint32 gdk_time_get	  (void);
@@ -90,20 +90,19 @@
 			   gpointer	     data);
 void gdk_input_remove	  (gint		     tag);
 
-gint gdk_pointer_grab	(GdkWindow *	 window,
-			 gint		 owner_events,
-			 GdkEventMask	 event_mask,
-			 GdkWindow *	 confine_to,
-			 GdkCursor *	 cursor,
-			 guint32	 time);
-void gdk_pointer_ungrab (guint32	 time);
-
-gint gdk_keyboard_grab	 (GdkWindow *	  window,
-			  gint		  owner_events,
-			  guint32	  time);
-void gdk_keyboard_ungrab (guint32	  time);
+gint     gdk_pointer_grab       (GdkWindow    *window,
+                                 gint          owner_events,
+                                 GdkEventMask  event_mask,
+                                 GdkWindow    *confine_to,
+                                 GdkCursor    *cursor,
+                                 guint32       time);
+void     gdk_pointer_ungrab     (guint32       time);
+gint     gdk_keyboard_grab      (GdkWindow    *window,
+                                 gboolean      owner_events,
+                                 guint32       time);
+void     gdk_keyboard_ungrab    (guint32       time);
+gboolean gdk_pointer_is_grabbed (void);
 
-gint gdk_pointer_is_grabbed (void);
 
 gint gdk_screen_width  (void);
 gint gdk_screen_height (void);
@@ -328,7 +327,7 @@
 					  GdkColor	  *color);
 void	      gdk_window_set_back_pixmap (GdkWindow	  *window,
 					  GdkPixmap	  *pixmap,
-					  gint		   parent_relative);
+					  gboolean         parent_relative);
 void	      gdk_window_set_cursor	 (GdkWindow	  *window,
 					  GdkCursor	  *cursor);
 void	      gdk_window_set_colormap	 (GdkWindow	  *window,
@@ -444,7 +443,7 @@
 void   gdk_gc_set_subwindow	  (GdkGC	    *gc,
 				   GdkSubwindowMode  mode);
 void   gdk_gc_set_exposures	  (GdkGC	    *gc,
-				   gint		     exposures);
+				   gboolean          exposures);
 void   gdk_gc_set_line_attributes (GdkGC	    *gc,
 				   gint		     line_width,
 				   GdkLineStyle	     line_style,
@@ -530,7 +529,7 @@
 /* Color
  */
 GdkColormap* gdk_colormap_new	          (GdkVisual      *visual,
-					   gint		   allocate);
+					   gboolean        allocate);
 GdkColormap* gdk_colormap_ref	          (GdkColormap    *cmap);
 void	     gdk_colormap_unref	          (GdkColormap    *cmap);
 
@@ -563,7 +562,7 @@
 					   GdkColor       *color);
 guint        gdk_color_hash               (const GdkColor *colora,
 					   const GdkColor *colorb);
-gint         gdk_color_equal	          (const GdkColor *colora,
+gboolean     gdk_color_equal	          (const GdkColor *colora,
 					   const GdkColor *colorb);
 
 
@@ -572,7 +571,7 @@
 			   GdkColor	*colors,
 			   gint		 ncolors);
 gboolean gdk_colors_alloc (GdkColormap	*colormap,
-			   gint		 contiguous,
+			   gboolean      contiguous,
 			   gulong	*planes,
 			   gint		 nplanes,
 			   gulong	*pixels,
@@ -598,7 +597,7 @@
 GdkFont* gdk_font_ref	    (GdkFont        *font);
 void	 gdk_font_unref	    (GdkFont        *font);
 gint	 gdk_font_id	    (const GdkFont  *font);
-gint	 gdk_font_equal	    (const GdkFont  *fonta,
+gboolean gdk_font_equal	    (const GdkFont  *fonta,
 			     const GdkFont  *fontb);
 gint	 gdk_string_width   (GdkFont        *font,
 			     const gchar    *string);
@@ -749,7 +748,7 @@
 
 /* Selections
  */
-gint	   gdk_selection_owner_set (GdkWindow	 *owner,
+gboolean   gdk_selection_owner_set (GdkWindow	 *owner,
 				    GdkAtom	  selection,
 				    guint32	  time,
 				    gint	  send_event);
@@ -758,7 +757,7 @@
 				    GdkAtom	  selection,
 				    GdkAtom	  target,
 				    guint32	  time);
-gint	   gdk_selection_property_get (GdkWindow  *requestor,
+gboolean   gdk_selection_property_get (GdkWindow  *requestor,
 				       guchar	 **data,
 				       GdkAtom	  *prop_type,
 				       gint	  *prop_format);
@@ -768,89 +767,87 @@
 				      GdkAtom	    property,
 				      guint32	    time);
 
-gint	   gdk_text_property_to_text_list (GdkAtom encoding, gint format,
+gint       gdk_text_property_to_text_list (GdkAtom encoding, gint format,
 					   guchar *text, gint length,
 					   gchar ***list);
 void	   gdk_free_text_list		  (gchar **list);
-gint	   gdk_string_to_compound_text	  (const gchar *str,
+gint       gdk_string_to_compound_text	  (const gchar *str,
 					   GdkAtom *encoding, gint *format,
 					   guchar **ctext, gint *length);
 void	   gdk_free_compound_text	  (guchar *ctext);
 
 /* Properties
  */
-GdkAtom gdk_atom_intern	    (const gchar *atom_name,
-			     gint	  only_if_exists);
-gchar*	gdk_atom_name	    (GdkAtom atom);
-gint	gdk_property_get    (GdkWindow	 *window,
-			     GdkAtom	  property,
-			     GdkAtom	  type,
-			     gulong	  offset,
-			     gulong	  length,
-			     gint	  pdelete,
-			     GdkAtom	 *actual_property_type,
-			     gint	 *actual_format,
-			     gint	 *actual_length,
-			     guchar	**data);
-
-void	gdk_property_change (GdkWindow	 *window,
-			     GdkAtom	  property,
-			     GdkAtom	  type,
-			     gint	  format,
-			     GdkPropMode  mode,
-			     guchar	 *data,
-			     gint	  nelements);
-void	gdk_property_delete (GdkWindow	 *window,
-			     GdkAtom	  property);
+GdkAtom  gdk_atom_intern     (const gchar  *atom_name,
+                              gint          only_if_exists);
+gchar*   gdk_atom_name       (GdkAtom       atom);
+gboolean gdk_property_get    (GdkWindow    *window,
+                              GdkAtom       property,
+                              GdkAtom       type,
+                              gulong        offset,
+                              gulong        length,
+                              gint          pdelete,
+                              GdkAtom      *actual_property_type,
+                              gint         *actual_format,
+                              gint         *actual_length,
+                              guchar      **data);
+void     gdk_property_change (GdkWindow    *window,
+                              GdkAtom       property,
+                              GdkAtom       type,
+                              gint          format,
+                              GdkPropMode   mode,
+                              guchar       *data,
+                              gint          nelements);
+void     gdk_property_delete (GdkWindow    *window,
+                              GdkAtom       property);
 
 
+
 /* Rectangle utilities
  */
-gint gdk_rectangle_intersect (GdkRectangle *src1,
-			      GdkRectangle *src2,
-			      GdkRectangle *dest);
-void gdk_rectangle_union     (GdkRectangle *src1,
-			      GdkRectangle *src2,
-			      GdkRectangle *dest);
+gboolean gdk_rectangle_intersect (GdkRectangle *src1,
+                                  GdkRectangle *src2,
+                                  GdkRectangle *dest);
+void     gdk_rectangle_union     (GdkRectangle *src1,
+                                  GdkRectangle *src2,
+                                  GdkRectangle *dest);
 
 /* XInput support
  */
-
-void gdk_input_init			    (void);
-void gdk_input_exit			    (void);
-GList *gdk_input_list_devices		    (void);
-void gdk_input_set_extension_events	    (GdkWindow *window,
-					     gint mask,
-					     GdkExtensionMode mode);
-void gdk_input_set_source		    (guint32 deviceid,
-					     GdkInputSource source);
-gint gdk_input_set_mode			    (guint32 deviceid,
-					     GdkInputMode mode);
-void gdk_input_set_axes			    (guint32 deviceid,
-					     GdkAxisUse *axes);
-void gdk_input_set_key			    (guint32 deviceid,
-					     guint   index,
-					     guint   keyval,
-					     GdkModifierType modifiers);
-void gdk_input_window_get_pointer     (GdkWindow       *window,
-				       guint32	       deviceid,
-				       gdouble	       *x,
-				       gdouble	       *y,
-				       gdouble	       *pressure,
-				       gdouble	       *xtilt,
-				       gdouble	       *ytilt,
-				       GdkModifierType *mask);
-
-GdkTimeCoord *gdk_input_motion_events (GdkWindow *window,
-				       guint32 deviceid,
-				       guint32 start,
-				       guint32 stop,
-				       gint *nevents_return);
+void          gdk_input_init                 (void);
+void          gdk_input_exit                 (void);
+GList *       gdk_input_list_devices         (void);
+void          gdk_input_set_extension_events (GdkWindow        *window,
+                                              gint              mask,
+                                              GdkExtensionMode  mode);
+void          gdk_input_set_source           (guint32           deviceid,
+                                              GdkInputSource    source);
+gboolean      gdk_input_set_mode             (guint32           deviceid,
+                                              GdkInputMode      mode);
+void          gdk_input_set_axes             (guint32           deviceid,
+                                              GdkAxisUse       *axes);
+void          gdk_input_set_key              (guint32           deviceid,
+                                              guint             index,
+                                              guint             keyval,
+                                              GdkModifierType   modifiers);
+void          gdk_input_window_get_pointer   (GdkWindow        *window,
+                                              guint32           deviceid,
+                                              gdouble          *x,
+                                              gdouble          *y,
+                                              gdouble          *pressure,
+                                              gdouble          *xtilt,
+                                              gdouble          *ytilt,
+                                              GdkModifierType  *mask);
+GdkTimeCoord *gdk_input_motion_events        (GdkWindow        *window,
+                                              guint32           deviceid,
+                                              guint32           start,
+                                              guint32           stop,
+                                              gint             *nevents_return);
 
 /* International Input Method Support Functions
  */
 
-gint         gdk_im_ready	   (void);
+gboolean     gdk_im_ready	   (void);
 
 void         gdk_im_begin	   (GdkIC               *ic, 
 				    GdkWindow           *window);
Index: gdk/gdkcolor.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/gdkcolor.c,v
retrieving revision 1.15.2.3
diff -u -u -r1.15.2.3 gdkcolor.c
--- gdk/gdkcolor.c	1999/09/17 09:03:44	1.15.2.3
+++ gdk/gdkcolor.c	2000/01/25 17:04:05
@@ -46,7 +46,7 @@
 
 GdkColormap*
 gdk_colormap_new (GdkVisual *visual,
-		  gint       private_cmap)
+		  gboolean   private_cmap)
 {
   GdkColormap *colormap;
   GdkColormapPrivate *private;
@@ -404,7 +404,7 @@
 
 gboolean
 gdk_colors_alloc (GdkColormap   *colormap,
-		  gint           contiguous,
+		  gboolean       contiguous,
 		  gulong        *planes,
 		  gint           nplanes,
 		  gulong        *pixels,
@@ -1120,7 +1120,7 @@
 	  (colora->blue >> 6));
 }
 
-gint
+gboolean
 gdk_color_equal (const GdkColor *colora,
 		 const GdkColor *colorb)
 {
Index: gdk/gdkevents.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/gdkevents.c,v
retrieving revision 1.20.2.9
diff -u -u -r1.20.2.9 gdkevents.c
--- gdk/gdkevents.c	1999/09/23 19:48:16	1.20.2.9
+++ gdk/gdkevents.c	2000/01/25 17:04:09
@@ -832,7 +832,7 @@
  */
 
 void
-gdk_set_show_events (gint show_events)
+gdk_set_show_events (gboolean show_events)
 {
   if (show_events)
     gdk_debug_flags |= GDK_DEBUG_EVENTS;
@@ -840,7 +840,7 @@
     gdk_debug_flags &= ~GDK_DEBUG_EVENTS;
 }
 
-gint
+gboolean
 gdk_get_show_events (void)
 {
   return gdk_debug_flags & GDK_DEBUG_EVENTS;
Index: gdk/gdkfont.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/gdkfont.c,v
retrieving revision 1.15.2.6
diff -u -u -r1.15.2.6 gdkfont.c
--- gdk/gdkfont.c	2000/01/21 23:22:50	1.15.2.6
+++ gdk/gdkfont.c	2000/01/25 17:04:10
@@ -259,7 +259,7 @@
     }
 }
 
-gint
+gboolean
 gdk_font_equal (const GdkFont *fonta,
                 const GdkFont *fontb)
 {
@@ -288,7 +288,7 @@
     }
   else
     /* fontset != font */
-    return 0;
+    return FALSE;
 }
 
 gint
Index: gdk/gdkgc.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/gdkgc.c,v
retrieving revision 1.17.2.2
diff -u -u -r1.17.2.2 gdkgc.c
--- gdk/gdkgc.c	2000/01/21 23:22:50	1.17.2.2
+++ gdk/gdkgc.c	2000/01/25 17:04:11
@@ -739,8 +739,8 @@
 }
 
 void
-gdk_gc_set_exposures (GdkGC *gc,
-		      gint   exposures)
+gdk_gc_set_exposures (GdkGC     *gc,
+		      gboolean   exposures)
 {
   GdkGCPrivate *private;
 
Index: gdk/gdkim.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/Attic/gdkim.c,v
retrieving revision 1.14.2.5
diff -u -u -r1.14.2.5 gdkim.c
--- gdk/gdkim.c	1999/11/08 20:16:41	1.14.2.5
+++ gdk/gdkim.c	2000/01/25 17:04:16
@@ -442,7 +442,7 @@
     }
 }
 
-gint 
+gboolean
 gdk_im_ready (void)
 {
   return (xim_im != NULL);
Index: gdk/gdkinput.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/Attic/gdkinput.c,v
retrieving revision 1.9
diff -u -u -r1.9 gdkinput.c
--- gdk/gdkinput.c	1999/02/24 07:33:01	1.9
+++ gdk/gdkinput.c	2000/01/25 17:04:17
@@ -92,7 +92,7 @@
   gdkdev->info.source = source;
 }
 
-gint
+gboolean
 gdk_input_set_mode (guint32 deviceid, GdkInputMode mode)
 {
   if (deviceid == GDK_CORE_POINTER)
Index: gdk/gdkproperty.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/Attic/gdkproperty.c,v
retrieving revision 1.10.2.4
diff -u -u -r1.10.2.4 gdkproperty.c
--- gdk/gdkproperty.c	1999/09/02 23:02:14	1.10.2.4
+++ gdk/gdkproperty.c	2000/01/25 17:04:17
@@ -87,7 +87,7 @@
     }
 }
 
-gint
+gboolean
 gdk_property_get (GdkWindow   *window,
 		  GdkAtom      property,
 		  GdkAtom      type,
Index: gdk/gdkrectangle.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/gdkrectangle.c,v
retrieving revision 1.5
diff -u -u -r1.5 gdkrectangle.c
--- gdk/gdkrectangle.c	1999/02/24 07:33:11	1.5
+++ gdk/gdkrectangle.c	2000/01/25 17:04:17
@@ -43,7 +43,7 @@
   dest->height = MAX (src1->y + src1->height, src2->y + src2->height) - dest->y;
 }
 
-gint
+gboolean
 gdk_rectangle_intersect (GdkRectangle *src1,
 			 GdkRectangle *src2,
 			 GdkRectangle *dest)
Index: gdk/gdkselection.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/Attic/gdkselection.c,v
retrieving revision 1.6.2.4
diff -u -u -r1.6.2.4 gdkselection.c
--- gdk/gdkselection.c	2000/01/21 23:22:50	1.6.2.4
+++ gdk/gdkselection.c	2000/01/25 17:04:17
@@ -32,7 +32,7 @@
 #include "gdkx.h"
 
 
-gint
+gboolean
 gdk_selection_owner_set (GdkWindow *owner,
 			 GdkAtom    selection,
 			 guint32    time,
Index: gdk/gdkwindow.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/gdkwindow.c,v
retrieving revision 1.80.2.8
diff -u -u -r1.80.2.8 gdkwindow.c
--- gdk/gdkwindow.c	2000/01/21 23:22:50	1.80.2.8
+++ gdk/gdkwindow.c	2000/01/25 17:04:22
@@ -1240,7 +1240,7 @@
 void
 gdk_window_set_back_pixmap (GdkWindow *window,
 			    GdkPixmap *pixmap,
-			    gint       parent_relative)
+			    gboolean   parent_relative)
 {
   GdkWindowPrivate *window_private;
   GdkPixmapPrivate *pixmap_private;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]