~canonical-dx-team/ubuntu/maverick/gtk+2.0/menuproxy

« back to all changes in this revision

Viewing changes to gdk/linux-fb/mifpoly.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2007-05-04 12:24:25 UTC
  • mfrom: (1.1.21 upstream)
  • Revision ID: james.westby@ubuntu.com-20070504122425-0m8midgzrp40y8w2
Tags: 2.10.12-1ubuntu1
* Sync with Debian
* New upstream version:
  Fixed bugs:
  - 379414 file chooser warnings when changing path in the entry
  - 418585 GtkFileChooserDefault sizing code is not DPI independent
  - 419568 Crash in search if start with special letter
  - 435062 build dies with icon cache validation
  - 379399 Segfault to call gtk_print_operation_run twice.
  - 387889 cups backend has problems when there are too many printers
  - 418531 invalid read to gtkicontheme.c gtk_icon_theme_lookup_icon...
  - 423916 crash in color scheme code
  - 424042 Segmentation fault while quickly pressing Alt+arrows
  - 415260 Protect against negative indices when setting values in G...
  - 419171 XGetVisualInfo() may not set nxvisuals
  - 128852 Gdk cursors don't look good on win32
  - 344657 Ctrl-H doesn't toggle "Show Hidden Files" setting
  - 345345 PrintOperation::paginate is not emitted for class handler
  - 347567 GtkPrintOperation::end-print is not emitted if it's cance...
  - 369112 gtk_ui_manager_add_ui should accept unnamed separator
  - 392015 Selected menu item invisible on Windows Vista
  - 399253 MS-Windows Theme Bottom Tab placement rendering glitches
  - 399425 gtk_input_dialog_fill_axes() adds child to gtkscrolledwin...
  - 403251 [patch] little memory leak in GtkPrintJob
  - 403267 [patch] memory leak in GtkPageSetupUnixDialog
  - 403470 MS-Windows Theme tab placement other than on top leaks a ...
  - 404506 Windows system fonts that have multi-byte font names cann...
  - 405089 Incorrect window placement for GtkEventBox private window
  - 405515 Minor leak in gtkfilesystemmodel.c
  - 405539 gdk_pixbuf_save() for PNG saver can return FALSE without ...
  - 415681 gdk_window_clear_area includes an extra line and column o...
  - 418219 GtkRecentChooser should apply filter before sorting and c...
  - 418403 Scroll to printer after selecting it from settings
  - 421985 _gtk_print_operation_platform_backend_launch_preview
  - 421990 gtk_print_job_get_surface
  - 421993 gtk_print_operation_init
  - 423064 Conditional jump or move depends on uninitialised value(s...
  - 423722 Fix printing header in gtk-demo
  - 424168 gtk_print_operation_run on async preview
  - 425655 Don't install gtk+-unix-print-2.0.pc on non-UNIX platforms
  - 425786 GDK segfaults if XineramaQueryScreens fails
  - 428665 Lpr Backend gets stuck in infinite loop during gtk_enumer...
  - 429902 GtkPrintOperation leaks cairo contextes
  - 431997 First delay of GdkPixbufAnimationIter is wrong
  - 433242 Inconsistent scroll arrow position calculations
  - 433972 Placing gtk.Expander inside a gtk.TextView() changes gtk....
  - 434261 _gtk_toolbar_elide_underscores incorrectly handles some s...
  - 383354 ctrl-L should make 'Location' entry disappear
  - 418673 gtk_recent_manager_add_item
  - 429732 gtk_accel_group_finalize accesses invalid memory
  - 435028 WM_CLIENT_LEADER is wrong on the leader_window
  - 431067 Background of the header window is not updated
  - 338843 add recent files support inside the ui manager
  - 148535 add drop shadow to menus, tooltips, etc. under Windows XP
* debian/control.in:
  - Conflicts on ubuntulooks (<= 0.9.11-1)
* debian/patches/15_default-fallback-icon-theme.patch:
  - patch from Debian, fallback on gnome icon theme

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $TOG: mifpoly.h /main/10 1998/02/09 14:47:09 kaleb $ */
 
2
/***********************************************************
 
3
 
 
4
Copyright 1987, 1998  The Open Group
 
5
 
 
6
All Rights Reserved.
 
7
 
 
8
The above copyright notice and this permission notice shall be included in
 
9
all copies or substantial portions of the Software.
 
10
 
 
11
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
12
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
13
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
 
14
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
 
15
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 
16
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
17
 
 
18
Except as contained in this notice, the name of The Open Group shall not be
 
19
used in advertising or otherwise to promote the sale, use or other dealings
 
20
in this Software without prior written authorization from The Open Group.
 
21
 
 
22
 
 
23
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
 
24
 
 
25
                        All Rights Reserved
 
26
 
 
27
Permission to use, copy, modify, and distribute this software and its 
 
28
documentation for any purpose and without fee is hereby granted, 
 
29
provided that the above copyright notice appear in all copies and that
 
30
both that copyright notice and this permission notice appear in 
 
31
supporting documentation, and that the name of Digital not be
 
32
used in advertising or publicity pertaining to distribution of the
 
33
software without specific, written prior permission.  
 
34
 
 
35
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
 
36
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
 
37
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
 
38
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
 
39
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
 
40
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 
41
SOFTWARE.
 
42
 
 
43
******************************************************************/
 
44
 
 
45
#ifndef MIFPOLY_H
 
46
#define MIFPOLY_H 1
 
47
 
 
48
#define EPSILON 0.000001
 
49
#define ISEQUAL(a,b) (fabs((a) - (b)) <= EPSILON)
 
50
#define UNEQUAL(a,b) (fabs((a) - (b)) > EPSILON)
 
51
#define WITHINHALF(a, b) (((a) - (b) > 0.0) ? (a) - (b) < 0.5 : \
 
52
                                             (b) - (a) <= 0.5)
 
53
#define ROUNDTOINT(x)   ((int) (((x) > 0.0) ? ((x) + 0.5) : ((x) - 0.5)))
 
54
#define ISZERO(x)       (fabs((x)) <= EPSILON)
 
55
#define PTISEQUAL(a,b) (ISEQUAL(a.x,b.x) && ISEQUAL(a.y,b.y))
 
56
#define PTUNEQUAL(a,b) (UNEQUAL(a.x,b.x) || UNEQUAL(a.y,b.y))
 
57
#define PtEqual(a, b) (((a).x == (b).x) && ((a).y == (b).y))
 
58
 
 
59
#define NotEnd          0
 
60
#define FirstEnd        1
 
61
#define SecondEnd       2
 
62
 
 
63
#define SQSECANT 108.856472512142 /* 1/sin^2(11/2) - for 11o miter cutoff */
 
64
#define D2SECANT 5.21671526231167 /* 1/2*sin(11/2) - max extension per width */
 
65
 
 
66
#ifndef ICIEL
 
67
#ifdef NOINLINEICEIL
 
68
#define ICEIL(x) ((int)ceil(x))
 
69
#else
 
70
#ifdef __GNUC__
 
71
#define ICEIL ICIEL
 
72
static __inline int ICEIL(double x)
 
73
{
 
74
    int _cTmp = x;
 
75
    return ((x == _cTmp) || (x < 0.0)) ? _cTmp : _cTmp+1;
 
76
}
 
77
#else
 
78
#define ICEIL(x) ((((x) == (_cTmp = (x))) || ((x) < 0.0)) ? _cTmp : _cTmp+1)
 
79
#define ICEILTEMPDECL static int _cTmp;
 
80
#endif
 
81
#endif
 
82
#endif
 
83
 
 
84
/* Point with sub-pixel positioning.  In this case we use doubles, but
 
85
 * see mifpolycon.c for other suggestions 
 
86
 */
 
87
typedef struct _SppPoint {
 
88
        double  x, y;
 
89
} SppPointRec, *SppPointPtr;
 
90
 
 
91
typedef struct _SppArc {
 
92
        double  x, y, width, height;
 
93
        double  angle1, angle2;
 
94
} SppArcRec, *SppArcPtr;
 
95
 
 
96
/* mifpolycon.c */
 
97
 
 
98
extern void miFillSppPoly(
 
99
    GdkDrawable* dst,
 
100
    GdkGC* pgc,
 
101
    int count,
 
102
    SppPointPtr ptsIn,
 
103
    int xTrans,
 
104
    int yTrans,
 
105
    double xFtrans,
 
106
    double yFtrans
 
107
);
 
108
 
 
109
#endif /* MIFPOLY_H */