[g-a-devel] [PATCH] gnome-mag minor modifications



Hi,

I make some minor modifications in the gnome-mag source tree. If there
are objections related to it, please comment.

Thanks,
-- 
Carlos Eduardo Rodrigues Diógenes
? autom4te.cache
? compile
? depcomp
? stamp-h1
? cursors/Makefile
? cursors/Makefile.in
? cursors/1_32/Makefile
? cursors/1_32/Makefile.in
? docs/Makefile
? docs/Makefile.in
? docs/reference/Makefile
? docs/reference/Makefile.in
? po/stamp-it
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-mag/ChangeLog,v
retrieving revision 1.167
diff -u -p -r1.167 ChangeLog
--- ChangeLog	24 Mar 2006 14:16:57 -0000	1.167
+++ ChangeLog	14 Apr 2006 23:00:32 -0000
@@ -1,3 +1,17 @@
+2006-04-14  Carlos Eduardo Rodrigues Diógenes <cerdiogenes yahoo com br>
+
+	* docs/reference/Doxyfile: Tweak some variables to generate a better
+	documenation.
+
+	* idl/GNOME_Magnifier.idl: Documented the enum AlignPolicy.
+
+	* magnifier/zoom-region.c: Removed unused functions: _get_x_cursors,
+	zoom_region_clip_to_exposed_bounds, zoom_region_clip_to_viewport,
+	zoom_region_source_root and exit_report
+
+	* magnifier/magnifier.c: Removed unused functions:
+	magnifier_expose_filter
+
 2006-03-24  Tommi Vainikainen  <thv iki fi>
 
 	* configure.in (ALL_LINGUAS): Added Dzongkha (dz).
Index: docs/reference/Doxyfile
===================================================================
RCS file: /cvs/gnome/gnome-mag/docs/reference/Doxyfile,v
retrieving revision 1.1
diff -u -p -r1.1 Doxyfile
--- docs/reference/Doxyfile	27 Oct 2005 14:28:10 -0000	1.1
+++ docs/reference/Doxyfile	14 Apr 2006 23:00:33 -0000
@@ -23,7 +23,7 @@ PROJECT_NAME           = gnome-mag
 # This could be handy for archiving the generated documentation or 
 # if some version control system is used.
 
-PROJECT_NUMBER         = 1.0
+PROJECT_NUMBER         = 
 
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
 # base path where the generated documentation will be put. 
@@ -93,7 +93,7 @@ ABBREVIATE_BRIEF       = 
 # Doxygen will generate a detailed section even if there is only a brief 
 # description.
 
-ALWAYS_DETAILED_SEC    = NO
+ALWAYS_DETAILED_SEC    = YES
 
 # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
 # inherited members of a class in the documentation of that class as if those 
@@ -106,7 +106,7 @@ INLINE_INHERITED_MEMB  = NO
 # path before files name in the file list and in the header files. If set 
 # to NO the shortest path that makes the file name unique will be used.
 
-FULL_PATH_NAMES        = YES
+FULL_PATH_NAMES        = NO
 
 # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
 # can be used to strip a user-defined part of the path. Stripping is 
@@ -138,7 +138,7 @@ SHORT_NAMES            = NO
 # comments will behave just like the Qt-style comments (thus requiring an 
 # explicit @brief command for a brief description.
 
-JAVADOC_AUTOBRIEF      = NO
+JAVADOC_AUTOBRIEF      = YES
 
 # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
 # treat a multi-line C++ special comment block (i.e. a block of //! or /// 
@@ -223,7 +223,7 @@ EXTRACT_PRIVATE        = NO
 # If the EXTRACT_STATIC tag is set to YES all static members of a file 
 # will be included in the documentation.
 
-EXTRACT_STATIC         = NO
+EXTRACT_STATIC         = YES
 
 # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
 # defined locally in source files will be included in the documentation. 
@@ -304,7 +304,7 @@ INLINE_INFO            = YES
 # alphabetically by member name. If set to NO the members will appear in 
 # declaration order.
 
-SORT_MEMBER_DOCS       = YES
+SORT_MEMBER_DOCS       = NO
 
 # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
 # brief documentation of file, namespace and class members alphabetically 
@@ -418,7 +418,7 @@ WARN_IF_DOC_ERROR      = YES
 # wrong or incomplete parameter documentation, but not about the absence of 
 # documentation.
 
-WARN_NO_PARAMDOC       = NO
+WARN_NO_PARAMDOC       = YES
 
 # The WARN_FORMAT tag determines the format of the warning messages that 
 # doxygen can produce. The string should contain the $file, $line, and $text 
@@ -433,7 +433,7 @@ WARN_FORMAT            = "$file:$line: $
 # and error messages should be written. If left blank the output is written 
 # to stderr.
 
-WARN_LOGFILE           = 
+WARN_LOGFILE           = doxygen-warnings.log
 
 #---------------------------------------------------------------------------
 # configuration options related to the input files
@@ -539,7 +539,7 @@ FILTER_SOURCE_FILES    = NO
 # Note: To get rid of all source code in the generated output, make sure also 
 # VERBATIM_HEADERS is set to NO.
 
-SOURCE_BROWSER         = NO
+SOURCE_BROWSER         = YES
 
 # Setting the INLINE_SOURCES tag to YES will include the body 
 # of functions and classes directly in the documentation.
@@ -688,7 +688,7 @@ DISABLE_INDEX          = NO
 # This tag can be used to set the number of enum values (range [1..20]) 
 # that doxygen will group on one line in the generated HTML documentation.
 
-ENUM_VALUES_PER_LINE   = 4
+ENUM_VALUES_PER_LINE   = 1
 
 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
 # generated containing a tree-like index structure (just like the one that 
@@ -859,7 +859,7 @@ MAN_LINKS              = NO
 # generate an XML file that captures the structure of 
 # the code including all documentation.
 
-GENERATE_XML           = YES
+GENERATE_XML           = NO
 
 # The XML_OUTPUT tag is used to specify where the XML pages will be put. 
 # If a relative path is entered the value of OUTPUT_DIRECTORY will be 
Index: idl/GNOME_Magnifier.idl
===================================================================
RCS file: /cvs/gnome/gnome-mag/idl/GNOME_Magnifier.idl,v
retrieving revision 1.8
diff -u -p -r1.8 GNOME_Magnifier.idl
--- idl/GNOME_Magnifier.idl	19 Jan 2006 13:14:33 -0000	1.8
+++ idl/GNOME_Magnifier.idl	14 Apr 2006 23:00:33 -0000
@@ -39,6 +39,15 @@ module GNOME {
 
     interface ZoomRegion : Bonobo::Unknown {
 
+	    /**
+	     * Enum of the possible align policies.
+	     * These represents the possible align policies in the magnifier.
+	     * The default is ALIGN_CENTER, i.e., the pointer will always stay
+	     * in the center of the magnified area. ALIGN_MIN defines that the
+	     * pointer will be in the left superior corner of the magnified
+	     * area and ALIGN_MAX defines that the pointer will be in the right
+	     * inferior corner of the magnified area.
+	     */
     enum AlignPolicy {
 	    ALIGN_CENTER,
 	    ALIGN_MIN,
@@ -69,8 +78,8 @@ module GNOME {
     /**
      * Get the current x and y magnification ratios.
      * (Convenience method for getting mag-factor-x and mag-factor-y properties).
-     * @param magX: the magnification factor in the x direction for the specified region. 
-     * @param magY: the magnification factor in the x direction for the specified region. 
+     * @param magX the magnification factor in the x direction for the specified region. 
+     * @param magY the magnification factor in the x direction for the specified region. 
      **/
     void getMagFactor (out float magX, out float magY);
 
@@ -85,7 +94,7 @@ module GNOME {
 
     /**
      * Set the region of interest for the magnifier.
-     * @param bounds: the ROI bounding box
+     * @param bounds the ROI bounding box
      **/
     oneway void setROI (in RectBounds bounds);
 
@@ -93,7 +102,7 @@ module GNOME {
      * Mark the zoom region or a sub-region 'dirty' and in need of updating.
      * @note This region will be clipped to the area currently visible in 
      * the target region.
-     * @param dirtyRegion: the bounding box of the dirty region.
+     * @param dirtyRegion the bounding box of the dirty region.
      **/
     void markDirty (in RectBounds dirtyRegion);
 
@@ -106,7 +115,7 @@ module GNOME {
     /**
      * Move and resize the specified zoom region on the target display.
      * (Convenience method for setting "viewport" property).
-     * @param bounds: the bounding box, in target display coordinates, of the ZoomRegion's
+     * @param bounds the bounding box, in target display coordinates, of the ZoomRegion's
      *          display viewport.
      **/
     void moveResize (in RectBounds bounds);
@@ -147,9 +156,9 @@ module GNOME {
      * Create a new zoom region for the magnifier.
      * The new region is initially 'unmanaged'; that is, it is not associated with
      * a particular sub-region of the "source" display.
-     * @param zx: the scale factor in the x direction for the new zoom region
-     * @param zy: the scale factor in the y direction for the new zoom region
-     * @param ROI: the initial ROI of the zoom region.  RectBounds of negative width/height
+     * @param zx the scale factor in the x direction for the new zoom region
+     * @param zy the scale factor in the y direction for the new zoom region
+     * @param ROI the initial ROI of the zoom region.  RectBounds of negative width/height
      *          indicates that the zoom region has no initial ROI.
      * @param viewport: the initial bounds of the ZoomRegion's viewport, in 
      *          the target display coordinate system.
Index: magnifier/magnifier.c
===================================================================
RCS file: /cvs/gnome/gnome-mag/magnifier/magnifier.c,v
retrieving revision 1.65
diff -u -p -r1.65 magnifier.c
--- magnifier/magnifier.c	14 Feb 2006 14:05:04 -0000	1.65
+++ magnifier/magnifier.c	14 Apr 2006 23:00:34 -0000
@@ -526,26 +526,6 @@ magnifier_notify_damage (Magnifier *magn
 	magnifier_zoom_regions_mark_dirty (magnifier, rect_bounds);
 }
 
-GdkFilterReturn
-magnifier_expose_filter (GdkXEvent *xevent, GdkEvent *event, gpointer data)
-{
-	Magnifier *magnifier = data;
-
-	if (event->any.type == GDK_EXPOSE) 
-	{
-		GNOME_Magnifier_RectBounds rect_bounds;
-		GdkRectangle rect;
-		gdk_region_get_clipbox (event->expose.region, &rect);
-		rect_bounds.x1 = rect.x;
-		rect_bounds.y1 = rect.y;
-		rect_bounds.x2 = rect.x + rect.width;
-		rect_bounds.y2 = rect.y + rect.height;
-		magnifier_zoom_regions_mark_dirty (magnifier, rect_bounds);
-
-		return GDK_FILTER_TRANSLATE;
-	}
-	return GDK_FILTER_CONTINUE;
-}
 static void
 magnifier_set_extension_listeners (Magnifier *magnifier, GdkWindow *root)
 {
Index: magnifier/zoom-region.c
===================================================================
RCS file: /cvs/gnome/gnome-mag/magnifier/zoom-region.c,v
retrieving revision 1.59
diff -u -p -r1.59 zoom-region.c
--- magnifier/zoom-region.c	14 Feb 2006 14:05:04 -0000	1.59
+++ magnifier/zoom-region.c	14 Apr 2006 23:00:35 -0000
@@ -183,29 +183,6 @@ _debug_announce_rect (char *msg, GdkRect
 		 msg, rect.x, rect.y, rect.x + rect.width, rect.y + rect.height);
 }
 
-#ifdef TEST_XTST_CURSOR
-static Cursor *
-_get_x_cursors (Display *display)
-{
-	int n_x_font_cursors = XC_num_glyphs; 
-	int dummy;
-	if (!XTestQueryExtension (display, &dummy, &dummy,&dummy, &dummy))
-		fprintf (stderr, "WARNING: XTEST extension not available!\n");
-	if (x_cursors == NULL && display) {
-		int i;
-		x_cursors = g_new0 (Cursor, XC_num_glyphs);
-		for (i = 2; i < n_x_font_cursors; i += 2)
-		{
-			if (i == 30)
-				x_cursors[i] = XCreateFontCursor (display, XC_xterm);
-			else
-				x_cursors[i] = XCreateFontCursor (display, i);
-		}
-	}
-	return x_cursors;
-}
-#endif
-
 static gboolean
 _diff_pixbufs (const GdkPixbuf *a, const GdkPixbuf *b)
 {
@@ -577,22 +554,6 @@ zoom_region_clip_to_exposed_target (Zoom
 	return _rectangle_clip_to_bounds (area, &onscreen_target);
 }
 
-#ifdef NEEDED
-static GdkRectangle
-zoom_region_clip_to_exposed_bounds (ZoomRegion *zoom_region,
-				    GdkRectangle area)
-{
-	return _rectangle_clip_to_bounds (area, &zoom_region->priv->exposed_bounds);
-}
-
-static GdkRectangle
-zoom_region_clip_to_viewport (ZoomRegion *zoom_region,
-			      GdkRectangle area)
-{
-	return _rectangle_clip_to_bounds (area, &zoom_region->priv->exposed_viewport);
-}
-#endif
-
 static GdkRectangle
 zoom_region_clip_to_scaled_pixmap (ZoomRegion *zoom_region,
 				   GdkRectangle area)
@@ -1425,20 +1386,6 @@ zoom_region_set_cursor_pos (ZoomRegion *
 	}
 }
 
-#ifdef TEST_XTST_CURSOR
-static GdkWindow *
-zoom_region_source_root (ZoomRegion *zoom_region)
-{
-	GdkScreen *source_screen = NULL;
-	if (zoom_region->priv->source_drawable)
-		source_screen =
-			gdk_drawable_get_screen (zoom_region->priv->source_drawable);
-	if (source_screen)
-		return gdk_screen_get_root_window (source_screen);
-	else return NULL;
-}
-#endif
-
 static gboolean
 zoom_region_update_pointer (ZoomRegion *zoom_region, gboolean draw_cursor)
 {
@@ -2023,57 +1970,6 @@ zoom_region_time_frame(ZoomRegion *zoom_
 	    	fprintf(stderr, "\n### Updates finished, starting panning test\n");
 		reset_timing_stats();
 		reset_timing = FALSE;
-	}
-}
-
-void
-exit_report(ZoomRegion *zoom_region)
-{
-	float frame_avg;
-	float x_scroll_incr, y_scroll_incr;
-	int width, height, x, y;
-
-	if (timing_test) {
-		width = (zoom_region->priv->exposed_viewport.x2 -
-			zoom_region->priv->exposed_viewport.x1) / zoom_region->xscale;
-		height = (zoom_region->priv->exposed_viewport.y2 -
-			zoom_region->priv->exposed_viewport.y1) / zoom_region->yscale;
-
-		frame_avg = mag_timing.frame_total / mag_timing.num_frame_samples;
-
-		x_scroll_incr = (float)mag_timing.dx_total / (float)mag_timing.num_line_samples;
-		y_scroll_incr = (float)mag_timing.dy_total / (float)mag_timing.num_line_samples;
-
-		gdk_drawable_get_size (GDK_DRAWABLE (zoom_region->priv->w->window),
-			&x, &y);
-
-		fprintf(stderr, "\nFinal Report:\n\n");
-
-		fprintf(stderr, "  Frames Processed         = %ld\n", 
-			mag_timing.num_frame_samples + 1);
-		fprintf(stderr, "  Width/Height/Depth       = %d/%d/%d\n", x, y,
-			gdk_drawable_get_depth (zoom_region->priv->w->window));
-		fprintf(stderr, "  Zoom Factor (x/y)        = %f/%f\n", zoom_region->xscale,
-			zoom_region->yscale);
-		fprintf(stderr, "  Pan Latency              = (avg. %f) (max. %f) seconds\n",
-			(mag_timing.idle_total / mag_timing.num_idle_samples), timing_idle_max);
-		fprintf(stderr, "  Total Frame Duration     = (avg. %f) (max. %f) (tot. %f) seconds\n",
-			frame_avg, timing_frame_max, mag_timing.frame_total);
-		fprintf(stderr, "  Frame Rate               = (avg. %f) (max. %f) frames/second\n",
-			1.0 / (mag_timing.frame_total / mag_timing.num_frame_samples), cps_max);
-		fprintf(stderr, "  Scroll Delta (x)         = (avg. %f) (tot. %d) lines\n",
-			x_scroll_incr, mag_timing.dx_total);
-		fprintf(stderr, "  Scroll Delta (y)         = (avg. %f) (tot. %d) lines\n",
-			y_scroll_incr, mag_timing.dy_total);
-		fprintf(stderr, "  Scroll Rate (x)          = (avg. %f) lines/second\n",
-			x_scroll_incr / frame_avg);
-		fprintf(stderr, "  Scroll Rate (y)          = (avg. %f) lines/second\n",
-			y_scroll_incr / frame_avg);
-
-		fprintf(stderr, "  Net Render Rate          = (avg. %f) (max. %f) Mpex/second\n\n",
-			(height * width *
-			((float)mag_timing.num_frame_samples / (float)mag_timing.frame_total)) / 1000000.0,
-			nrr_max / 1000000.0);
 	}
 }
 


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