Replace "gdouble" with "double"

This commit is contained in:
Benjamin Otte 2020-07-24 22:32:16 +02:00
parent 556997f9df
commit 3078b180fe
234 changed files with 1763 additions and 1765 deletions

View File

@ -12,7 +12,7 @@ static GtkWidget *progress_bar = NULL;
static gboolean static gboolean
apply_changes_gradually (gpointer data) apply_changes_gradually (gpointer data)
{ {
gdouble fraction; double fraction;
/* Work, work, work... */ /* Work, work, work... */
fraction = gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (progress_bar)); fraction = gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (progress_bar));

View File

@ -64,8 +64,8 @@ scribble_draw (GtkDrawingArea *da,
/* Draw a rectangle on the screen */ /* Draw a rectangle on the screen */
static void static void
draw_brush (GtkWidget *widget, draw_brush (GtkWidget *widget,
gdouble x, double x,
gdouble y) double y)
{ {
GdkRectangle update_rect; GdkRectangle update_rect;
cairo_t *cr; cairo_t *cr;

View File

@ -728,7 +728,7 @@ static void
entry_activated (GtkEntry *entry, entry_activated (GtkEntry *entry,
GtkAdjustment *adjustment) GtkAdjustment *adjustment)
{ {
gdouble value; double value;
char *err = NULL; char *err = NULL;
value = g_strtod (gtk_editable_get_text (GTK_EDITABLE (entry)), &err); value = g_strtod (gtk_editable_get_text (GTK_EDITABLE (entry)), &err);
@ -939,7 +939,7 @@ instance_changed (GtkComboBox *combo)
{ {
Axis *axis; Axis *axis;
Axis akey; Axis akey;
gdouble value; double value;
value = coords[ai[i].axis_index]; value = coords[ai[i].axis_index];

View File

@ -39,7 +39,7 @@ val_to_xy (GtkFontPlane *plane,
int *x, int *x,
int *y) int *y)
{ {
gdouble u, v; double u, v;
int width, height; int width, height;
width = gtk_widget_get_allocated_width (GTK_WIDGET (plane)); width = gtk_widget_get_allocated_width (GTK_WIDGET (plane));
@ -129,7 +129,7 @@ update_value (GtkFontPlane *plane,
int y) int y)
{ {
GtkWidget *widget = GTK_WIDGET (plane); GtkWidget *widget = GTK_WIDGET (plane);
gdouble u, v; double u, v;
u = CLAMP (x * (1.0 / gtk_widget_get_allocated_width (widget)), 0, 1); u = CLAMP (x * (1.0 / gtk_widget_get_allocated_width (widget)), 0, 1);
v = CLAMP (1 - y * (1.0 / gtk_widget_get_allocated_height (widget)), 0, 1); v = CLAMP (1 - y * (1.0 / gtk_widget_get_allocated_height (widget)), 0, 1);
@ -142,8 +142,8 @@ update_value (GtkFontPlane *plane,
static void static void
plane_drag_gesture_begin (GtkGestureDrag *gesture, plane_drag_gesture_begin (GtkGestureDrag *gesture,
gdouble start_x, double start_x,
gdouble start_y, double start_y,
GtkFontPlane *plane) GtkFontPlane *plane)
{ {
guint button; guint button;
@ -164,11 +164,11 @@ plane_drag_gesture_begin (GtkGestureDrag *gesture,
static void static void
plane_drag_gesture_update (GtkGestureDrag *gesture, plane_drag_gesture_update (GtkGestureDrag *gesture,
gdouble offset_x, double offset_x,
gdouble offset_y, double offset_y,
GtkFontPlane *plane) GtkFontPlane *plane)
{ {
gdouble start_x, start_y; double start_x, start_y;
gtk_gesture_drag_get_start_point (GTK_GESTURE_DRAG (gesture), gtk_gesture_drag_get_start_point (GTK_GESTURE_DRAG (gesture),
&start_x, &start_y); &start_x, &start_y);
@ -177,8 +177,8 @@ plane_drag_gesture_update (GtkGestureDrag *gesture,
static void static void
plane_drag_gesture_end (GtkGestureDrag *gesture, plane_drag_gesture_end (GtkGestureDrag *gesture,
gdouble offset_x, double offset_x,
gdouble offset_y, double offset_y,
GtkFontPlane *plane) GtkFontPlane *plane)
{ {
set_cross_cursor (GTK_WIDGET (plane), FALSE); set_cross_cursor (GTK_WIDGET (plane), FALSE);

View File

@ -9,8 +9,8 @@
static GtkGesture *rotate = NULL; static GtkGesture *rotate = NULL;
static GtkGesture *zoom = NULL; static GtkGesture *zoom = NULL;
static gdouble swipe_x = 0; static double swipe_x = 0;
static gdouble swipe_y = 0; static double swipe_y = 0;
static gboolean long_pressed = FALSE; static gboolean long_pressed = FALSE;
static gboolean static gboolean
@ -26,8 +26,8 @@ touchpad_swipe_gesture_begin (GtkGesture *gesture,
static void static void
swipe_gesture_swept (GtkGestureSwipe *gesture, swipe_gesture_swept (GtkGestureSwipe *gesture,
gdouble velocity_x, double velocity_x,
gdouble velocity_y, double velocity_y,
GtkWidget *widget) GtkWidget *widget)
{ {
swipe_x = velocity_x / 10; swipe_x = velocity_x / 10;
@ -37,8 +37,8 @@ swipe_gesture_swept (GtkGestureSwipe *gesture,
static void static void
long_press_gesture_pressed (GtkGestureLongPress *gesture, long_press_gesture_pressed (GtkGestureLongPress *gesture,
gdouble x, double x,
gdouble y, double y,
GtkWidget *widget) GtkWidget *widget)
{ {
long_pressed = TRUE; long_pressed = TRUE;
@ -56,8 +56,8 @@ long_press_gesture_end (GtkGesture *gesture,
static void static void
rotation_angle_changed (GtkGestureRotate *gesture, rotation_angle_changed (GtkGestureRotate *gesture,
gdouble angle, double angle,
gdouble delta, double delta,
GtkWidget *widget) GtkWidget *widget)
{ {
gtk_widget_queue_draw (widget); gtk_widget_queue_draw (widget);
@ -65,7 +65,7 @@ rotation_angle_changed (GtkGestureRotate *gesture,
static void static void
zoom_scale_changed (GtkGestureZoom *gesture, zoom_scale_changed (GtkGestureZoom *gesture,
gdouble scale, double scale,
GtkWidget *widget) GtkWidget *widget)
{ {
gtk_widget_queue_draw (widget); gtk_widget_queue_draw (widget);
@ -93,8 +93,8 @@ drawing_area_draw (GtkDrawingArea *area,
{ {
cairo_pattern_t *pat; cairo_pattern_t *pat;
cairo_matrix_t matrix; cairo_matrix_t matrix;
gdouble angle, scale; double angle, scale;
gdouble x_center, y_center; double x_center, y_center;
gtk_gesture_get_bounding_box_center (GTK_GESTURE (zoom), &x_center, &y_center); gtk_gesture_get_bounding_box_center (GTK_GESTURE (zoom), &x_center, &y_center);

View File

@ -140,8 +140,8 @@ static void set_cursor_if_appropriate (GtkTextView *text_view,
static void static void
released_cb (GtkGestureClick *gesture, released_cb (GtkGestureClick *gesture,
guint n_press, guint n_press,
gdouble x, double x,
gdouble y, double y,
GtkWidget *text_view) GtkWidget *text_view)
{ {
GtkTextIter start, end, iter; GtkTextIter start, end, iter;
@ -168,8 +168,8 @@ released_cb (GtkGestureClick *gesture,
static void static void
motion_cb (GtkEventControllerMotion *controller, motion_cb (GtkEventControllerMotion *controller,
gdouble x, double x,
gdouble y, double y,
GtkTextView *text_view) GtkTextView *text_view)
{ {
set_cursor_if_appropriate (text_view, x, y); set_cursor_if_appropriate (text_view, x, y);

View File

@ -89,14 +89,14 @@ static GParamSpec *color_properties[N_COLOR_PROPS] = { NULL, };
static void static void
rgb_to_hsv (GdkRGBA *rgba, rgb_to_hsv (GdkRGBA *rgba,
gdouble *h_out, double *h_out,
gdouble *s_out, double *s_out,
gdouble *v_out) double *v_out)
{ {
gdouble red, green, blue; double red, green, blue;
gdouble h, s, v; double h, s, v;
gdouble min, max; double min, max;
gdouble delta; double delta;
red = rgba->red; red = rgba->red;
green = rgba->green; green = rgba->green;

View File

@ -270,8 +270,6 @@ static const char *types[] =
"gshort", "gshort",
"gushort", "gushort",
"gulong", "gulong",
"gdouble",
"gldouble",
"gpointer", "gpointer",
"NULL", "NULL",
"GList", "GList",

View File

@ -20,7 +20,7 @@ typedef struct
cairo_t *cr; cairo_t *cr;
GdkRGBA draw_color; GdkRGBA draw_color;
GtkPadController *pad_controller; GtkPadController *pad_controller;
gdouble brush_size; double brush_size;
} DrawingArea; } DrawingArea;
typedef struct typedef struct
@ -166,7 +166,7 @@ on_pad_knob_change (GSimpleAction *action,
GVariant *parameter, GVariant *parameter,
DrawingArea *area) DrawingArea *area)
{ {
gdouble value = g_variant_get_double (parameter); double value = g_variant_get_double (parameter);
area->brush_size = value; area->brush_size = value;
} }
@ -255,9 +255,9 @@ drawing_area_class_init (DrawingAreaClass *klass)
static void static void
drawing_area_apply_stroke (DrawingArea *area, drawing_area_apply_stroke (DrawingArea *area,
GdkDeviceTool *tool, GdkDeviceTool *tool,
gdouble x, double x,
gdouble y, double y,
gdouble pressure) double pressure)
{ {
if (gdk_device_tool_get_tool_type (tool) == GDK_DEVICE_TOOL_TYPE_ERASER) if (gdk_device_tool_get_tool_type (tool) == GDK_DEVICE_TOOL_TYPE_ERASER)
{ {
@ -281,8 +281,8 @@ drawing_area_apply_stroke (DrawingArea *area,
static void static void
stylus_gesture_down (GtkGestureStylus *gesture, stylus_gesture_down (GtkGestureStylus *gesture,
gdouble x, double x,
gdouble y, double y,
DrawingArea *area) DrawingArea *area)
{ {
cairo_new_path (area->cr); cairo_new_path (area->cr);
@ -290,13 +290,13 @@ stylus_gesture_down (GtkGestureStylus *gesture,
static void static void
stylus_gesture_motion (GtkGestureStylus *gesture, stylus_gesture_motion (GtkGestureStylus *gesture,
gdouble x, double x,
gdouble y, double y,
DrawingArea *area) DrawingArea *area)
{ {
GdkTimeCoord *backlog; GdkTimeCoord *backlog;
GdkDeviceTool *tool; GdkDeviceTool *tool;
gdouble pressure; double pressure;
guint n_items; guint n_items;
tool = gtk_gesture_stylus_get_device_tool (gesture); tool = gtk_gesture_stylus_get_device_tool (gesture);

View File

@ -15,7 +15,7 @@
typedef struct typedef struct
{ {
char *resourcename; char *resourcename;
gdouble font_size; double font_size;
int lines_per_page; int lines_per_page;
char **lines; char **lines;
@ -62,7 +62,7 @@ draw_page (GtkPrintOperation *operation,
cairo_t *cr; cairo_t *cr;
PangoLayout *layout; PangoLayout *layout;
int text_width, text_height; int text_width, text_height;
gdouble width; double width;
int line, i; int line, i;
PangoFontDescription *desc; PangoFontDescription *desc;
char *page_str; char *page_str;

View File

@ -13,11 +13,11 @@
int int
spinbutton_hex_spin_input (GtkSpinButton *spin_button, spinbutton_hex_spin_input (GtkSpinButton *spin_button,
gdouble *new_val) double *new_val)
{ {
const char *buf; const char *buf;
char *err; char *err;
gdouble res; double res;
buf = gtk_editable_get_text (GTK_EDITABLE (spin_button)); buf = gtk_editable_get_text (GTK_EDITABLE (spin_button));
res = strtol (buf, &err, 16); res = strtol (buf, &err, 16);
@ -33,7 +33,7 @@ spinbutton_hex_spin_output (GtkSpinButton *spin_button)
{ {
GtkAdjustment *adjustment; GtkAdjustment *adjustment;
char *buf; char *buf;
gdouble val; double val;
adjustment = gtk_spin_button_get_adjustment (spin_button); adjustment = gtk_spin_button_get_adjustment (spin_button);
val = gtk_adjustment_get_value (adjustment); val = gtk_adjustment_get_value (adjustment);
@ -50,7 +50,7 @@ spinbutton_hex_spin_output (GtkSpinButton *spin_button)
int int
spinbutton_time_spin_input (GtkSpinButton *spin_button, spinbutton_time_spin_input (GtkSpinButton *spin_button,
gdouble *new_val) double *new_val)
{ {
const char *text; const char *text;
char **str; char **str;
@ -92,8 +92,8 @@ spinbutton_time_spin_output (GtkSpinButton *spin_button)
{ {
GtkAdjustment *adjustment; GtkAdjustment *adjustment;
char *buf; char *buf;
gdouble hours; double hours;
gdouble minutes; double minutes;
adjustment = gtk_spin_button_get_adjustment (spin_button); adjustment = gtk_spin_button_get_adjustment (spin_button);
hours = gtk_adjustment_get_value (adjustment) / 60.0; hours = gtk_adjustment_get_value (adjustment) / 60.0;
@ -123,7 +123,7 @@ static const char *month[12] = {
int int
spinbutton_month_spin_input (GtkSpinButton *spin_button, spinbutton_month_spin_input (GtkSpinButton *spin_button,
gdouble *new_val) double *new_val)
{ {
int i; int i;
char *tmp1, *tmp2; char *tmp1, *tmp2;
@ -145,7 +145,7 @@ spinbutton_month_spin_input (GtkSpinButton *spin_button,
*new_val = 0.0; *new_val = 0.0;
return GTK_INPUT_ERROR; return GTK_INPUT_ERROR;
} }
*new_val = (gdouble) i; *new_val = (double) i;
return TRUE; return TRUE;
} }
@ -154,7 +154,7 @@ int
spinbutton_month_spin_output (GtkSpinButton *spin_button) spinbutton_month_spin_output (GtkSpinButton *spin_button)
{ {
GtkAdjustment *adjustment; GtkAdjustment *adjustment;
gdouble value; double value;
int i; int i;
adjustment = gtk_spin_button_get_adjustment (spin_button); adjustment = gtk_spin_button_get_adjustment (spin_button);

View File

@ -482,7 +482,7 @@ pulse_it (GtkWidget *widget)
static void static void
update_pulse_time (GtkAdjustment *adjustment, GtkWidget *widget) update_pulse_time (GtkAdjustment *adjustment, GtkWidget *widget)
{ {
gdouble value; double value;
guint pulse_id; guint pulse_id;
value = gtk_adjustment_get_value (adjustment); value = gtk_adjustment_get_value (adjustment);
@ -537,11 +537,11 @@ on_entry_icon_release (GtkEntry *entry,
static void static void
on_scale_button_value_changed (GtkScaleButton *button, on_scale_button_value_changed (GtkScaleButton *button,
gdouble value, double value,
gpointer user_data) gpointer user_data)
{ {
GtkAdjustment *adjustment; GtkAdjustment *adjustment;
gdouble val; double val;
char *str; char *str;
adjustment = gtk_scale_button_get_adjustment (button); adjustment = gtk_scale_button_get_adjustment (button);

View File

@ -426,8 +426,8 @@ draw_cb (GtkDrawingArea *drawing_area,
/* Draw a rectangle on the surface at the given position */ /* Draw a rectangle on the surface at the given position */
static void static void
draw_brush (GtkWidget *widget, draw_brush (GtkWidget *widget,
gdouble x, double x,
gdouble y) double y)
{ {
cairo_t *cr; cairo_t *cr;

View File

@ -59,8 +59,8 @@ draw_cb (GtkDrawingArea *drawing_area,
/* Draw a rectangle on the surface at the given position */ /* Draw a rectangle on the surface at the given position */
static void static void
draw_brush (GtkWidget *widget, draw_brush (GtkWidget *widget,
gdouble x, double x,
gdouble y) double y)
{ {
cairo_t *cr; cairo_t *cr;

View File

@ -25,7 +25,7 @@
static void gdk_broadway_device_get_state (GdkDevice *device, static void gdk_broadway_device_get_state (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
gdouble *axes, double *axes,
GdkModifierType *mask); GdkModifierType *mask);
static void gdk_broadway_device_set_surface_cursor (GdkDevice *device, static void gdk_broadway_device_set_surface_cursor (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
@ -46,8 +46,8 @@ static GdkGrabStatus gdk_broadway_device_grab (GdkDevice *device,
static void gdk_broadway_device_ungrab (GdkDevice *device, static void gdk_broadway_device_ungrab (GdkDevice *device,
guint32 time_); guint32 time_);
static GdkSurface * gdk_broadway_device_surface_at_position (GdkDevice *device, static GdkSurface * gdk_broadway_device_surface_at_position (GdkDevice *device,
gdouble *win_x, double *win_x,
gdouble *win_y, double *win_y,
GdkModifierType *mask); GdkModifierType *mask);
@ -80,10 +80,10 @@ gdk_broadway_device_init (GdkBroadwayDevice *device_core)
static void static void
gdk_broadway_device_get_state (GdkDevice *device, gdk_broadway_device_get_state (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
gdouble *axes, double *axes,
GdkModifierType *mask) GdkModifierType *mask)
{ {
gdouble x, y; double x, y;
gdk_surface_get_device_position (surface, device, &x, &y, mask); gdk_surface_get_device_position (surface, device, &x, &y, mask);
@ -271,8 +271,8 @@ gdk_broadway_device_ungrab (GdkDevice *device,
static GdkSurface * static GdkSurface *
gdk_broadway_device_surface_at_position (GdkDevice *device, gdk_broadway_device_surface_at_position (GdkDevice *device,
gdouble *win_x, double *win_x,
gdouble *win_y, double *win_y,
GdkModifierType *mask) GdkModifierType *mask)
{ {
GdkSurface *surface = NULL; GdkSurface *surface = NULL;

View File

@ -736,8 +736,8 @@ gdk_broadway_surface_get_root_coords (GdkSurface *surface,
static gboolean static gboolean
gdk_broadway_surface_get_device_state (GdkSurface *surface, gdk_broadway_surface_get_device_state (GdkSurface *surface,
GdkDevice *device, GdkDevice *device,
gdouble *x, double *x,
gdouble *y, double *y,
GdkModifierType *mask) GdkModifierType *mask)
{ {
GdkSurface *child; GdkSurface *child;

View File

@ -213,8 +213,8 @@ gdk_cairo_surface_paint_pixbuf (cairo_surface_t *surface,
void void
gdk_cairo_set_source_pixbuf (cairo_t *cr, gdk_cairo_set_source_pixbuf (cairo_t *cr,
const GdkPixbuf *pixbuf, const GdkPixbuf *pixbuf,
gdouble pixbuf_x, double pixbuf_x,
gdouble pixbuf_y) double pixbuf_y)
{ {
cairo_format_t format; cairo_format_t format;
cairo_surface_t *surface; cairo_surface_t *surface;

View File

@ -35,8 +35,8 @@ void gdk_cairo_set_source_rgba (cairo_t *cr,
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
void gdk_cairo_set_source_pixbuf (cairo_t *cr, void gdk_cairo_set_source_pixbuf (cairo_t *cr,
const GdkPixbuf *pixbuf, const GdkPixbuf *pixbuf,
gdouble pixbuf_x, double pixbuf_x,
gdouble pixbuf_y); double pixbuf_y);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
void gdk_cairo_rectangle (cairo_t *cr, void gdk_cairo_rectangle (cairo_t *cr,

View File

@ -52,11 +52,11 @@ typedef struct _GdkAxisInfo GdkAxisInfo;
struct _GdkAxisInfo struct _GdkAxisInfo
{ {
GdkAxisUse use; GdkAxisUse use;
gdouble min_axis; double min_axis;
gdouble max_axis; double max_axis;
gdouble min_value; double min_value;
gdouble max_value; double max_value;
gdouble resolution; double resolution;
}; };
enum { enum {
@ -550,7 +550,7 @@ gdk_device_get_property (GObject *object,
void void
gdk_device_get_state (GdkDevice *device, gdk_device_get_state (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
gdouble *axes, double *axes,
GdkModifierType *mask) GdkModifierType *mask)
{ {
g_return_if_fail (GDK_IS_DEVICE (device)); g_return_if_fail (GDK_IS_DEVICE (device));
@ -608,7 +608,7 @@ gdk_device_get_surface_at_position (GdkDevice *device,
double *win_x, double *win_x,
double *win_y) double *win_y)
{ {
gdouble tmp_x, tmp_y; double tmp_x, tmp_y;
GdkSurface *surface; GdkSurface *surface;
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL); g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
@ -873,9 +873,9 @@ gdk_device_get_n_axes (GdkDevice *device)
**/ **/
gboolean gboolean
gdk_device_get_axis (GdkDevice *device, gdk_device_get_axis (GdkDevice *device,
gdouble *axes, double *axes,
GdkAxisUse use, GdkAxisUse use,
gdouble *value) double *value)
{ {
int i; int i;
@ -994,9 +994,9 @@ _gdk_device_reset_axes (GdkDevice *device)
guint guint
_gdk_device_add_axis (GdkDevice *device, _gdk_device_add_axis (GdkDevice *device,
GdkAxisUse use, GdkAxisUse use,
gdouble min_value, double min_value,
gdouble max_value, double max_value,
gdouble resolution) double resolution)
{ {
GdkAxisInfo axis_info; GdkAxisInfo axis_info;
guint pos; guint pos;
@ -1039,9 +1039,9 @@ void
_gdk_device_get_axis_info (GdkDevice *device, _gdk_device_get_axis_info (GdkDevice *device,
guint index_, guint index_,
GdkAxisUse *use, GdkAxisUse *use,
gdouble *min_value, double *min_value,
gdouble *max_value, double *max_value,
gdouble *resolution) double *resolution)
{ {
GdkAxisInfo *info; GdkAxisInfo *info;
@ -1078,17 +1078,17 @@ gboolean
_gdk_device_translate_surface_coord (GdkDevice *device, _gdk_device_translate_surface_coord (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
guint index_, guint index_,
gdouble value, double value,
gdouble *axis_value) double *axis_value)
{ {
GdkAxisInfo axis_info; GdkAxisInfo axis_info;
GdkAxisInfo *axis_info_x, *axis_info_y; GdkAxisInfo *axis_info_x, *axis_info_y;
gdouble device_width, device_height; double device_width, device_height;
gdouble x_offset, y_offset; double x_offset, y_offset;
gdouble x_scale, y_scale; double x_scale, y_scale;
gdouble x_min, y_min; double x_min, y_min;
gdouble x_resolution, y_resolution; double x_resolution, y_resolution;
gdouble device_aspect; double device_aspect;
int surface_width, surface_height; int surface_width, surface_height;
if (index_ >= device->axes->len) if (index_ >= device->axes->len)
@ -1179,16 +1179,16 @@ _gdk_device_translate_surface_coord (GdkDevice *device,
gboolean gboolean
_gdk_device_translate_screen_coord (GdkDevice *device, _gdk_device_translate_screen_coord (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
gdouble surface_root_x, double surface_root_x,
gdouble surface_root_y, double surface_root_y,
gdouble screen_width, double screen_width,
gdouble screen_height, double screen_height,
guint index_, guint index_,
gdouble value, double value,
gdouble *axis_value) double *axis_value)
{ {
GdkAxisInfo axis_info; GdkAxisInfo axis_info;
gdouble axis_width, scale, offset; double axis_width, scale, offset;
if (index_ >= device->axes->len) if (index_ >= device->axes->len)
return FALSE; return FALSE;
@ -1229,11 +1229,11 @@ _gdk_device_translate_screen_coord (GdkDevice *device,
gboolean gboolean
_gdk_device_translate_axis (GdkDevice *device, _gdk_device_translate_axis (GdkDevice *device,
guint index_, guint index_,
gdouble value, double value,
gdouble *axis_value) double *axis_value)
{ {
GdkAxisInfo axis_info; GdkAxisInfo axis_info;
gdouble axis_width, out; double axis_width, out;
if (index_ >= device->axes->len) if (index_ >= device->axes->len)
return FALSE; return FALSE;
@ -1258,8 +1258,8 @@ void
_gdk_device_query_state (GdkDevice *device, _gdk_device_query_state (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
GdkSurface **child_surface, GdkSurface **child_surface,
gdouble *win_x, double *win_x,
gdouble *win_y, double *win_y,
GdkModifierType *mask) GdkModifierType *mask)
{ {
GDK_DEVICE_GET_CLASS (device)->query_state (device, GDK_DEVICE_GET_CLASS (device)->query_state (device,
@ -1272,8 +1272,8 @@ _gdk_device_query_state (GdkDevice *device,
GdkSurface * GdkSurface *
_gdk_device_surface_at_position (GdkDevice *device, _gdk_device_surface_at_position (GdkDevice *device,
gdouble *win_x, double *win_x,
gdouble *win_y, double *win_y,
GdkModifierType *mask) GdkModifierType *mask)
{ {
return GDK_DEVICE_GET_CLASS (device)->surface_at_position (device, return GDK_DEVICE_GET_CLASS (device)->surface_at_position (device,

View File

@ -116,7 +116,7 @@ GdkAxisUse gdk_device_get_axis_use (GdkDevice *device,
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
void gdk_device_get_state (GdkDevice *device, void gdk_device_get_state (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
gdouble *axes, double *axes,
GdkModifierType *mask); GdkModifierType *mask);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
GdkSurface * gdk_device_get_surface_at_position (GdkDevice *device, GdkSurface * gdk_device_get_surface_at_position (GdkDevice *device,
@ -127,9 +127,9 @@ GDK_AVAILABLE_IN_ALL
int gdk_device_get_n_axes (GdkDevice *device); int gdk_device_get_n_axes (GdkDevice *device);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
gboolean gdk_device_get_axis (GdkDevice *device, gboolean gdk_device_get_axis (GdkDevice *device,
gdouble *axes, double *axes,
GdkAxisUse use, GdkAxisUse use,
gdouble *value); double *value);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
GdkDisplay * gdk_device_get_display (GdkDevice *device); GdkDisplay * gdk_device_get_display (GdkDevice *device);

View File

@ -63,7 +63,7 @@ struct _GdkDeviceClass
void (* get_state) (GdkDevice *device, void (* get_state) (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
gdouble *axes, double *axes,
GdkModifierType *mask); GdkModifierType *mask);
void (* set_surface_cursor)(GdkDevice *device, void (* set_surface_cursor)(GdkDevice *device,
@ -73,8 +73,8 @@ struct _GdkDeviceClass
void (* query_state) (GdkDevice *device, void (* query_state) (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
GdkSurface **child_surface, GdkSurface **child_surface,
gdouble *win_x, double *win_x,
gdouble *win_y, double *win_y,
GdkModifierType *mask); GdkModifierType *mask);
GdkGrabStatus (* grab) (GdkDevice *device, GdkGrabStatus (* grab) (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
@ -98,36 +98,36 @@ void _gdk_device_set_associated_device (GdkDevice *device,
void _gdk_device_reset_axes (GdkDevice *device); void _gdk_device_reset_axes (GdkDevice *device);
guint _gdk_device_add_axis (GdkDevice *device, guint _gdk_device_add_axis (GdkDevice *device,
GdkAxisUse use, GdkAxisUse use,
gdouble min_value, double min_value,
gdouble max_value, double max_value,
gdouble resolution); double resolution);
void _gdk_device_get_axis_info (GdkDevice *device, void _gdk_device_get_axis_info (GdkDevice *device,
guint index, guint index,
GdkAxisUse *use, GdkAxisUse *use,
gdouble *min_value, double *min_value,
gdouble *max_value, double *max_value,
gdouble *resolution); double *resolution);
gboolean _gdk_device_translate_surface_coord (GdkDevice *device, gboolean _gdk_device_translate_surface_coord (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
guint index, guint index,
gdouble value, double value,
gdouble *axis_value); double *axis_value);
gboolean _gdk_device_translate_screen_coord (GdkDevice *device, gboolean _gdk_device_translate_screen_coord (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
gdouble surface_root_x, double surface_root_x,
gdouble surface_root_y, double surface_root_y,
gdouble screen_width, double screen_width,
gdouble screen_height, double screen_height,
guint index, guint index,
gdouble value, double value,
gdouble *axis_value); double *axis_value);
gboolean _gdk_device_translate_axis (GdkDevice *device, gboolean _gdk_device_translate_axis (GdkDevice *device,
guint index, guint index,
gdouble value, double value,
gdouble *axis_value); double *axis_value);
GdkTimeCoord ** _gdk_device_allocate_history (GdkDevice *device, GdkTimeCoord ** _gdk_device_allocate_history (GdkDevice *device,
int n_events); int n_events);
@ -140,12 +140,12 @@ void _gdk_device_remove_physical_device (GdkDevice *device,
void _gdk_device_query_state (GdkDevice *device, void _gdk_device_query_state (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
GdkSurface **child_surface, GdkSurface **child_surface,
gdouble *win_x, double *win_x,
gdouble *win_y, double *win_y,
GdkModifierType *mask); GdkModifierType *mask);
GdkSurface * _gdk_device_surface_at_position (GdkDevice *device, GdkSurface * _gdk_device_surface_at_position (GdkDevice *device,
gdouble *win_x, double *win_x,
gdouble *win_y, double *win_y,
GdkModifierType *mask); GdkModifierType *mask);
void gdk_device_set_seat (GdkDevice *device, void gdk_device_set_seat (GdkDevice *device,

View File

@ -584,7 +584,7 @@ get_current_toplevel (GdkDisplay *display,
GdkModifierType *state_out) GdkModifierType *state_out)
{ {
GdkSurface *pointer_surface; GdkSurface *pointer_surface;
gdouble x, y; double x, y;
GdkModifierType state; GdkModifierType state;
pointer_surface = _gdk_device_surface_at_position (device, &x, &y, &state); pointer_surface = _gdk_device_surface_at_position (device, &x, &y, &state);

View File

@ -62,7 +62,7 @@ typedef struct
typedef struct typedef struct
{ {
GdkSurface *surface_under_pointer; /* surface that last got a normal enter event */ GdkSurface *surface_under_pointer; /* surface that last got a normal enter event */
gdouble toplevel_x, toplevel_y; double toplevel_x, toplevel_y;
guint32 state; guint32 state;
guint32 button; guint32 button;
GdkDevice *last_physical_device; GdkDevice *last_physical_device;

View File

@ -993,12 +993,12 @@ gdk_event_triggers_context_menu (GdkEvent *event)
static gboolean static gboolean
gdk_events_get_axis_distances (GdkEvent *event1, gdk_events_get_axis_distances (GdkEvent *event1,
GdkEvent *event2, GdkEvent *event2,
gdouble *x_distance, double *x_distance,
gdouble *y_distance, double *y_distance,
gdouble *distance) double *distance)
{ {
gdouble x1, x2, y1, y2; double x1, x2, y1, y2;
gdouble xd, yd; double xd, yd;
if (!gdk_event_get_position (event1, &x1, &y1) || if (!gdk_event_get_position (event1, &x1, &y1) ||
!gdk_event_get_position (event2, &x2, &y2)) !gdk_event_get_position (event2, &x2, &y2))
@ -1033,7 +1033,7 @@ gdk_events_get_axis_distances (GdkEvent *event1,
gboolean gboolean
gdk_events_get_distance (GdkEvent *event1, gdk_events_get_distance (GdkEvent *event1,
GdkEvent *event2, GdkEvent *event2,
gdouble *distance) double *distance)
{ {
return gdk_events_get_axis_distances (event1, event2, return gdk_events_get_axis_distances (event1, event2,
NULL, NULL, NULL, NULL,
@ -1056,9 +1056,9 @@ gdk_events_get_distance (GdkEvent *event1,
gboolean gboolean
gdk_events_get_angle (GdkEvent *event1, gdk_events_get_angle (GdkEvent *event1,
GdkEvent *event2, GdkEvent *event2,
gdouble *angle) double *angle)
{ {
gdouble x_distance, y_distance, distance; double x_distance, y_distance, distance;
if (!gdk_events_get_axis_distances (event1, event2, if (!gdk_events_get_axis_distances (event1, event2,
&x_distance, &y_distance, &x_distance, &y_distance,
@ -1097,10 +1097,10 @@ gdk_events_get_angle (GdkEvent *event1,
gboolean gboolean
gdk_events_get_center (GdkEvent *event1, gdk_events_get_center (GdkEvent *event1,
GdkEvent *event2, GdkEvent *event2,
gdouble *x, double *x,
gdouble *y) double *y)
{ {
gdouble x1, x2, y1, y2; double x1, x2, y1, y2;
if (!gdk_event_get_position (event1, &x1, &y1) || if (!gdk_event_get_position (event1, &x1, &y1) ||
!gdk_event_get_position (event2, &x2, &y2)) !gdk_event_get_position (event2, &x2, &y2))

View File

@ -188,8 +188,8 @@ void _gdk_synthesize_crossing_events (GdkDisplay *display,
GdkDevice *device, GdkDevice *device,
GdkDevice *source_device, GdkDevice *source_device,
GdkCrossingMode mode, GdkCrossingMode mode,
gdouble toplevel_x, double toplevel_x,
gdouble toplevel_y, double toplevel_y,
GdkModifierType mask, GdkModifierType mask,
guint32 time_, guint32 time_,
GdkEvent *event_in_queue, GdkEvent *event_in_queue,
@ -331,8 +331,8 @@ struct _GdkGeometry
int base_height; int base_height;
int width_inc; int width_inc;
int height_inc; int height_inc;
gdouble min_aspect; double min_aspect;
gdouble max_aspect; double max_aspect;
GdkGravity win_gravity; GdkGravity win_gravity;
}; };

View File

@ -132,7 +132,7 @@ gdk_rgba_is_opaque (const GdkRGBA *rgba)
static gboolean static gboolean
parse_rgb_value (const char *str, parse_rgb_value (const char *str,
char **endp, char **endp,
gdouble *number) double *number)
{ {
const char *p; const char *p;
@ -186,7 +186,7 @@ gdk_rgba_parse (GdkRGBA *rgba,
const char *spec) const char *spec)
{ {
gboolean has_alpha; gboolean has_alpha;
gdouble r, g, b, a; double r, g, b, a;
char *str = (char *) spec; char *str = (char *) spec;
char *p; char *p;

View File

@ -1705,7 +1705,7 @@ gdk_surface_get_device_position (GdkSurface *surface,
double *y, double *y,
GdkModifierType *mask) GdkModifierType *mask)
{ {
gdouble tmp_x, tmp_y; double tmp_x, tmp_y;
GdkModifierType tmp_mask; GdkModifierType tmp_mask;
g_return_if_fail (GDK_IS_SURFACE (surface)); g_return_if_fail (GDK_IS_SURFACE (surface));

View File

@ -125,8 +125,8 @@ struct _GdkSurfaceClass
int *root_y); int *root_y);
gboolean (* get_device_state) (GdkSurface *surface, gboolean (* get_device_state) (GdkSurface *surface,
GdkDevice *device, GdkDevice *device,
gdouble *x, double *x,
gdouble *y, double *y,
GdkModifierType *mask); GdkModifierType *mask);
void (* set_input_region) (GdkSurface *surface, void (* set_input_region) (GdkSurface *surface,

View File

@ -65,8 +65,8 @@ gdk_macos_device_set_surface_cursor (GdkDevice *device,
static GdkSurface * static GdkSurface *
gdk_macos_device_surface_at_position (GdkDevice *device, gdk_macos_device_surface_at_position (GdkDevice *device,
gdouble *win_x, double *win_x,
gdouble *win_y, double *win_y,
GdkModifierType *state) GdkModifierType *state)
{ {
GdkMacosDisplay *display; GdkMacosDisplay *display;
@ -129,10 +129,10 @@ gdk_macos_device_ungrab (GdkDevice *device,
static void static void
gdk_macos_device_get_state (GdkDevice *device, gdk_macos_device_get_state (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
gdouble *axes, double *axes,
GdkModifierType *mask) GdkModifierType *mask)
{ {
gdouble x_pos, y_pos; double x_pos, y_pos;
g_assert (GDK_IS_MACOS_DEVICE (device)); g_assert (GDK_IS_MACOS_DEVICE (device));
g_assert (GDK_IS_MACOS_SURFACE (surface)); g_assert (GDK_IS_MACOS_SURFACE (surface));
@ -150,8 +150,8 @@ static void
gdk_macos_device_query_state (GdkDevice *device, gdk_macos_device_query_state (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
GdkSurface **child_surface, GdkSurface **child_surface,
gdouble *win_x, double *win_x,
gdouble *win_y, double *win_y,
GdkModifierType *mask) GdkModifierType *mask)
{ {
GdkDisplay *display; GdkDisplay *display;

View File

@ -433,7 +433,7 @@ fill_pinch_event (GdkMacosDisplay *display,
} last_state = FP_STATE_IDLE; } last_state = FP_STATE_IDLE;
GdkSeat *seat; GdkSeat *seat;
GdkTouchpadGesturePhase phase; GdkTouchpadGesturePhase phase;
gdouble angle_delta = 0.0; double angle_delta = 0.0;
g_assert (GDK_IS_MACOS_DISPLAY (display)); g_assert (GDK_IS_MACOS_DISPLAY (display));
g_assert (GDK_IS_MACOS_SURFACE (surface)); g_assert (GDK_IS_MACOS_SURFACE (surface));
@ -590,8 +590,8 @@ fill_scroll_event (GdkMacosDisplay *self,
GdkDevice *pointer; GdkDevice *pointer;
GdkEvent *ret = NULL; GdkEvent *ret = NULL;
GdkSeat *seat; GdkSeat *seat;
gdouble dx; double dx;
gdouble dy; double dy;
g_assert (GDK_IS_MACOS_SURFACE (surface)); g_assert (GDK_IS_MACOS_SURFACE (surface));
g_assert (nsevent != NULL); g_assert (nsevent != NULL);
@ -606,8 +606,8 @@ fill_scroll_event (GdkMacosDisplay *self,
if ([nsevent hasPreciseScrollingDeltas]) if ([nsevent hasPreciseScrollingDeltas])
{ {
gdouble sx; double sx;
gdouble sy; double sy;
/* /*
* TODO: We probably need another event type for the * TODO: We probably need another event type for the

View File

@ -305,8 +305,8 @@ gdk_drag_get_current_actions (GdkModifierType state,
static void static void
gdk_drag_update (GdkDrag *drag, gdk_drag_update (GdkDrag *drag,
gdouble x_root, double x_root,
gdouble y_root, double y_root,
GdkModifierType mods, GdkModifierType mods,
guint32 evtime) guint32 evtime)
{ {

View File

@ -230,8 +230,8 @@ gdk_macos_surface_get_root_coords (GdkSurface *surface,
static gboolean static gboolean
gdk_macos_surface_get_device_state (GdkSurface *surface, gdk_macos_surface_get_device_state (GdkSurface *surface,
GdkDevice *device, GdkDevice *device,
gdouble *x, double *x,
gdouble *y, double *y,
GdkModifierType *mask) GdkModifierType *mask)
{ {
GdkDisplay *display; GdkDisplay *display;

View File

@ -73,8 +73,8 @@ typedef struct _GdkWaylandTabletPadData GdkWaylandTabletPadData;
struct _GdkWaylandTouchData struct _GdkWaylandTouchData
{ {
uint32_t id; uint32_t id;
gdouble x; double x;
gdouble y; double y;
GdkSurface *surface; GdkSurface *surface;
uint32_t touch_down_serial; uint32_t touch_down_serial;
guint initial_touch : 1; guint initial_touch : 1;
@ -85,7 +85,7 @@ struct _GdkWaylandPointerFrameData
GdkEvent *event; GdkEvent *event;
/* Specific to the scroll event */ /* Specific to the scroll event */
gdouble delta_x, delta_y; double delta_x, delta_y;
int32_t discrete_x, discrete_y; int32_t discrete_x, discrete_y;
gint8 is_scroll_stop; gint8 is_scroll_stop;
enum wl_pointer_axis_source source; enum wl_pointer_axis_source source;
@ -147,7 +147,7 @@ struct _GdkWaylandTabletPadGroupData
struct { struct {
guint source; guint source;
gboolean is_stop; gboolean is_stop;
gdouble value; double value;
} axis_tmp_info; } axis_tmp_info;
}; };
@ -186,7 +186,7 @@ struct _GdkWaylandTabletData
GdkWaylandTabletToolData *current_tool; GdkWaylandTabletToolData *current_tool;
int axis_indices[GDK_AXIS_LAST]; int axis_indices[GDK_AXIS_LAST];
gdouble *axes; double *axes;
}; };
struct _GdkWaylandSeat struct _GdkWaylandSeat
@ -253,7 +253,7 @@ struct _GdkWaylandSeat
/* Some tracking on gesture events */ /* Some tracking on gesture events */
guint gesture_n_fingers; guint gesture_n_fingers;
gdouble gesture_scale; double gesture_scale;
GdkCursor *grab_cursor; GdkCursor *grab_cursor;
}; };
@ -310,10 +310,10 @@ static void deliver_key_event (GdkWaylandSeat *seat,
static void static void
gdk_wayland_device_get_state (GdkDevice *device, gdk_wayland_device_get_state (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
gdouble *axes, double *axes,
GdkModifierType *mask) GdkModifierType *mask)
{ {
gdouble x, y; double x, y;
gdk_surface_get_device_position (surface, device, &x, &y, mask); gdk_surface_get_device_position (surface, device, &x, &y, mask);
@ -538,8 +538,8 @@ static void
gdk_wayland_device_query_state (GdkDevice *device, gdk_wayland_device_query_state (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
GdkSurface **child_surface, GdkSurface **child_surface,
gdouble *win_x, double *win_x,
gdouble *win_y, double *win_y,
GdkModifierType *mask) GdkModifierType *mask)
{ {
GdkWaylandPointerData *pointer; GdkWaylandPointerData *pointer;
@ -788,8 +788,8 @@ gdk_wayland_device_ungrab (GdkDevice *device,
static GdkSurface * static GdkSurface *
gdk_wayland_device_surface_at_position (GdkDevice *device, gdk_wayland_device_surface_at_position (GdkDevice *device,
gdouble *win_x, double *win_x,
gdouble *win_y, double *win_y,
GdkModifierType *mask) GdkModifierType *mask)
{ {
GdkWaylandPointerData *pointer; GdkWaylandPointerData *pointer;
@ -1357,8 +1357,8 @@ flush_discrete_scroll_event (GdkWaylandSeat *seat,
static void static void
flush_smooth_scroll_event (GdkWaylandSeat *seat, flush_smooth_scroll_event (GdkWaylandSeat *seat,
gdouble delta_x, double delta_x,
gdouble delta_y, double delta_y,
gboolean is_stop) gboolean is_stop)
{ {
GdkEvent *event; GdkEvent *event;
@ -2543,8 +2543,8 @@ emit_gesture_swipe_event (GdkWaylandSeat *seat,
GdkTouchpadGesturePhase phase, GdkTouchpadGesturePhase phase,
guint32 _time, guint32 _time,
guint32 n_fingers, guint32 n_fingers,
gdouble dx, double dx,
gdouble dy) double dy)
{ {
GdkEvent *event; GdkEvent *event;
@ -2638,10 +2638,10 @@ emit_gesture_pinch_event (GdkWaylandSeat *seat,
GdkTouchpadGesturePhase phase, GdkTouchpadGesturePhase phase,
guint32 _time, guint32 _time,
guint n_fingers, guint n_fingers,
gdouble dx, double dx,
gdouble dy, double dy,
gdouble scale, double scale,
gdouble angle_delta) double angle_delta)
{ {
GdkEvent *event; GdkEvent *event;
@ -3393,7 +3393,7 @@ gdk_wayland_device_tablet_clone_tool_axes (GdkWaylandTabletData *tablet,
g_free (tablet->axes); g_free (tablet->axes);
tablet->axes = tablet->axes =
g_new0 (gdouble, gdk_device_get_n_axes (tablet->stylus_device)); g_new0 (double, gdk_device_get_n_axes (tablet->stylus_device));
g_object_thaw_notify (G_OBJECT (tablet->stylus_device)); g_object_thaw_notify (G_OBJECT (tablet->stylus_device));
} }
@ -3402,7 +3402,7 @@ static void
gdk_wayland_mimic_device_axes (GdkDevice *logical, gdk_wayland_mimic_device_axes (GdkDevice *logical,
GdkDevice *physical) GdkDevice *physical)
{ {
gdouble axis_min, axis_max, axis_resolution; double axis_min, axis_max, axis_resolution;
GdkAxisUse axis_use; GdkAxisUse axis_use;
int axis_count; int axis_count;
int i; int i;
@ -3510,7 +3510,7 @@ static double *
tablet_copy_axes (GdkWaylandTabletData *tablet) tablet_copy_axes (GdkWaylandTabletData *tablet)
{ {
return g_memdup (tablet->axes, return g_memdup (tablet->axes,
sizeof (gdouble) * gdk_device_get_n_axes (tablet->stylus_device)); sizeof (double) * gdk_device_get_n_axes (tablet->stylus_device));
} }
static void static void
@ -3917,7 +3917,7 @@ tablet_pad_strip_handle_position (void *data,
g_message ("tablet pad strip handle position, strip = %p position = %d", g_message ("tablet pad strip handle position, strip = %p position = %d",
wp_tablet_pad_strip, position)); wp_tablet_pad_strip, position));
group->axis_tmp_info.value = (gdouble) position / 65535; group->axis_tmp_info.value = (double) position / 65535;
} }
static void static void

View File

@ -1445,11 +1445,11 @@ get_order (const char *s)
return 0; return 0;
} }
static gdouble static double
get_dpi_from_gsettings (GdkWaylandDisplay *display_wayland) get_dpi_from_gsettings (GdkWaylandDisplay *display_wayland)
{ {
GSettings *settings; GSettings *settings;
gdouble factor; double factor;
settings = g_hash_table_lookup (display_wayland->settings, settings = g_hash_table_lookup (display_wayland->settings,
"org.gnome.desktop.interface"); "org.gnome.desktop.interface");

View File

@ -3105,8 +3105,8 @@ gdk_wayland_surface_get_root_coords (GdkSurface *surface,
static gboolean static gboolean
gdk_wayland_surface_get_device_state (GdkSurface *surface, gdk_wayland_surface_get_device_state (GdkSurface *surface,
GdkDevice *device, GdkDevice *device,
gdouble *x, double *x,
gdouble *y, double *y,
GdkModifierType *mask) GdkModifierType *mask)
{ {
gboolean return_val; gboolean return_val;

View File

@ -2477,7 +2477,7 @@ transmute_cf_dib_to_image_bmp (const guchar *data,
{ {
if (p[3] != 0) if (p[3] != 0)
{ {
gdouble inverse_alpha = 255./p[3]; double inverse_alpha = 255./p[3];
p[0] = p[0] * inverse_alpha + 0.5; p[0] = p[0] * inverse_alpha + 0.5;
p[1] = p[1] * inverse_alpha + 0.5; p[1] = p[1] * inverse_alpha + 0.5;

View File

@ -1003,8 +1003,8 @@ _gdk_win32_display_update_cursors (GdkWin32Display *display)
GdkPixbuf * GdkPixbuf *
gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon, gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon,
gdouble *x_hot, double *x_hot,
gdouble *y_hot) double *y_hot)
{ {
GdkPixbuf *pixbuf = NULL; GdkPixbuf *pixbuf = NULL;
ICONINFO ii; ICONINFO ii;

View File

@ -37,7 +37,7 @@ _gdk_device_virtual_set_active (GdkDevice *device,
GdkDeviceVirtual *virtual = GDK_DEVICE_VIRTUAL (device); GdkDeviceVirtual *virtual = GDK_DEVICE_VIRTUAL (device);
int n_axes, i; int n_axes, i;
GdkAxisUse use; GdkAxisUse use;
gdouble min_value, max_value, resolution; double min_value, max_value, resolution;
if (virtual->active_device == new_active) if (virtual->active_device == new_active)
return; return;
@ -62,7 +62,7 @@ _gdk_device_virtual_set_active (GdkDevice *device,
static void static void
gdk_device_virtual_get_state (GdkDevice *device, gdk_device_virtual_get_state (GdkDevice *device,
GdkSurface *window, GdkSurface *window,
gdouble *axes, double *axes,
GdkModifierType *mask) GdkModifierType *mask)
{ {
GdkDeviceVirtual *virtual = GDK_DEVICE_VIRTUAL (device); GdkDeviceVirtual *virtual = GDK_DEVICE_VIRTUAL (device);
@ -100,8 +100,8 @@ static void
gdk_device_virtual_query_state (GdkDevice *device, gdk_device_virtual_query_state (GdkDevice *device,
GdkSurface *window, GdkSurface *window,
GdkSurface **child_window, GdkSurface **child_window,
gdouble *win_x, double *win_x,
gdouble *win_y, double *win_y,
GdkModifierType *mask) GdkModifierType *mask)
{ {
GdkDeviceVirtual *virtual = GDK_DEVICE_VIRTUAL (device); GdkDeviceVirtual *virtual = GDK_DEVICE_VIRTUAL (device);

View File

@ -32,7 +32,7 @@ G_DEFINE_TYPE (GdkDeviceWin32, gdk_device_win32, GDK_TYPE_DEVICE)
static void static void
gdk_device_win32_get_state (GdkDevice *device, gdk_device_win32_get_state (GdkDevice *device,
GdkSurface *window, GdkSurface *window,
gdouble *axes, double *axes,
GdkModifierType *mask) GdkModifierType *mask)
{ {
double x, y; double x, y;
@ -166,8 +166,8 @@ screen_to_client (HWND hwnd, POINT screen_pt, POINT *client_pt)
GdkSurface * GdkSurface *
_gdk_device_win32_surface_at_position (GdkDevice *device, _gdk_device_win32_surface_at_position (GdkDevice *device,
gdouble *win_x, double *win_x,
gdouble *win_y, double *win_y,
GdkModifierType *mask) GdkModifierType *mask)
{ {
GdkSurface *window = NULL; GdkSurface *window = NULL;

View File

@ -45,8 +45,8 @@ struct _GdkDeviceWin32Class
GType gdk_device_win32_get_type (void) G_GNUC_CONST; GType gdk_device_win32_get_type (void) G_GNUC_CONST;
GdkSurface *_gdk_device_win32_surface_at_position (GdkDevice *device, GdkSurface *_gdk_device_win32_surface_at_position (GdkDevice *device,
gdouble *win_x, double *win_x,
gdouble *win_y, double *win_y,
GdkModifierType *mask); GdkModifierType *mask);
G_END_DECLS G_END_DECLS

View File

@ -57,7 +57,7 @@ get_current_mask (void)
static void static void
gdk_device_wintab_get_state (GdkDevice *device, gdk_device_wintab_get_state (GdkDevice *device,
GdkSurface *window, GdkSurface *window,
gdouble *axes, double *axes,
GdkModifierType *mask) GdkModifierType *mask)
{ {
GdkDeviceWintab *device_wintab; GdkDeviceWintab *device_wintab;
@ -177,8 +177,8 @@ gdk_device_wintab_ungrab (GdkDevice *device,
static GdkSurface * static GdkSurface *
gdk_device_wintab_surface_at_position (GdkDevice *device, gdk_device_wintab_surface_at_position (GdkDevice *device,
gdouble *win_x, double *win_x,
gdouble *win_y, double *win_y,
GdkModifierType *mask) GdkModifierType *mask)
{ {
return NULL; return NULL;
@ -187,14 +187,14 @@ gdk_device_wintab_surface_at_position (GdkDevice *device,
void void
_gdk_device_wintab_translate_axes (GdkDeviceWintab *device_wintab, _gdk_device_wintab_translate_axes (GdkDeviceWintab *device_wintab,
GdkSurface *window, GdkSurface *window,
gdouble *axes, double *axes,
gdouble *x, double *x,
gdouble *y) double *y)
{ {
GdkDevice *device; GdkDevice *device;
GdkSurface *impl_surface; GdkSurface *impl_surface;
int root_x, root_y; int root_x, root_y;
gdouble temp_x, temp_y; double temp_x, temp_y;
int i; int i;
device = GDK_DEVICE (device_wintab); device = GDK_DEVICE (device_wintab);

View File

@ -62,9 +62,9 @@ GType gdk_device_wintab_get_type (void) G_GNUC_CONST;
void _gdk_device_wintab_translate_axes (GdkDeviceWintab *device, void _gdk_device_wintab_translate_axes (GdkDeviceWintab *device,
GdkSurface *window, GdkSurface *window,
gdouble *axes, double *axes,
gdouble *x, double *x,
gdouble *y); double *y);
G_END_DECLS G_END_DECLS

View File

@ -1044,7 +1044,7 @@ gdk_input_other_event (GdkDisplay *display,
if (event_type == GDK_BUTTON_PRESS || if (event_type == GDK_BUTTON_PRESS ||
event_type == GDK_BUTTON_RELEASE) event_type == GDK_BUTTON_RELEASE)
{ {
axes = g_new (gdouble, num_axes); axes = g_new (double, num_axes);
_gdk_device_wintab_translate_axes (source_device, _gdk_device_wintab_translate_axes (source_device,
window, window,
@ -1080,7 +1080,7 @@ gdk_input_other_event (GdkDisplay *display,
} }
else else
{ {
axes = g_new (gdouble, num_axes); axes = g_new (double, num_axes);
_gdk_device_wintab_translate_axes (source_device, _gdk_device_wintab_translate_axes (source_device,
window, window,
axes, axes,

View File

@ -2307,8 +2307,8 @@ gdk_win32_drag_drop_performed (GdkDrag *drag,
static void static void
gdk_local_drag_update (GdkDrag *drag, gdk_local_drag_update (GdkDrag *drag,
gdouble x_root, double x_root,
gdouble y_root, double y_root,
DWORD grfKeyState, DWORD grfKeyState,
guint32 evtime) guint32 evtime)
{ {

View File

@ -2755,9 +2755,9 @@ gdk_event_translate (MSG *msg,
delta_x = delta_y = 0.0; delta_x = delta_y = 0.0;
if (msg->message == WM_MOUSEWHEEL) if (msg->message == WM_MOUSEWHEEL)
delta_y = (double) GET_WHEEL_DELTA_WPARAM (msg->wParam) / (gdouble) WHEEL_DELTA; delta_y = (double) GET_WHEEL_DELTA_WPARAM (msg->wParam) / (double) WHEEL_DELTA;
else if (msg->message == WM_MOUSEHWHEEL) else if (msg->message == WM_MOUSEHWHEEL)
delta_x = (double) GET_WHEEL_DELTA_WPARAM (msg->wParam) / (gdouble) WHEEL_DELTA; delta_x = (double) GET_WHEEL_DELTA_WPARAM (msg->wParam) / (double) WHEEL_DELTA;
/* Positive delta scrolls up, not down, /* Positive delta scrolls up, not down,
see API documentation for WM_MOUSEWHEEL message. see API documentation for WM_MOUSEWHEEL message.
*/ */
@ -3291,7 +3291,7 @@ gdk_event_translate (MSG *msg,
RECT decorated_rect; RECT decorated_rect;
RECT undecorated_drag; RECT undecorated_drag;
int decoration_width, decoration_height; int decoration_width, decoration_height;
gdouble drag_aspect; double drag_aspect;
int drag_width, drag_height, new_width, new_height; int drag_width, drag_height, new_width, new_height;
GetClientRect (GDK_SURFACE_HWND (window), &rect); GetClientRect (GDK_SURFACE_HWND (window), &rect);
@ -3313,7 +3313,7 @@ gdk_event_translate (MSG *msg,
drag_width = undecorated_drag.right - undecorated_drag.left; drag_width = undecorated_drag.right - undecorated_drag.left;
drag_height = undecorated_drag.bottom - undecorated_drag.top; drag_height = undecorated_drag.bottom - undecorated_drag.top;
drag_aspect = (gdouble) drag_width / drag_height; drag_aspect = (double) drag_width / drag_height;
GDK_NOTE (EVENTS, g_print (" (ASPECT:%g--%g curr: %g)", GDK_NOTE (EVENTS, g_print (" (ASPECT:%g--%g curr: %g)",
impl->hints.min_aspect, impl->hints.max_aspect, drag_aspect)); impl->hints.min_aspect, impl->hints.max_aspect, drag_aspect));

View File

@ -249,8 +249,8 @@ gdk_win32_impl_frame_clock_after_paint (GdkFrameClock *clock,
if (SUCCEEDED (hr)) if (SUCCEEDED (hr))
{ {
timings->refresh_interval = timing_info.qpcRefreshPeriod * (gdouble)G_USEC_PER_SEC / tick_frequency.QuadPart; timings->refresh_interval = timing_info.qpcRefreshPeriod * (double)G_USEC_PER_SEC / tick_frequency.QuadPart;
timings->presentation_time = timing_info.qpcCompose * (gdouble)G_USEC_PER_SEC / tick_frequency.QuadPart; timings->presentation_time = timing_info.qpcCompose * (double)G_USEC_PER_SEC / tick_frequency.QuadPart;
} }
} }
@ -1804,8 +1804,8 @@ gdk_win32_surface_get_root_coords (GdkSurface *window,
static gboolean static gboolean
gdk_surface_win32_get_device_state (GdkSurface *window, gdk_surface_win32_get_device_state (GdkSurface *window,
GdkDevice *device, GdkDevice *device,
gdouble *x, double *x,
gdouble *y, double *y,
GdkModifierType *mask) GdkModifierType *mask)
{ {
GdkSurface *child; GdkSurface *child;
@ -2249,9 +2249,9 @@ unsnap (GdkSurface *window,
/* If the window fits into new work area without resizing it, /* If the window fits into new work area without resizing it,
* place it into new work area without resizing it. * place it into new work area without resizing it.
*/ */
gdouble left, right, up, down, hratio, vratio; double left, right, up, down, hratio, vratio;
gdouble hscale, vscale; double hscale, vscale;
gdouble new_left, new_up; double new_left, new_up;
left = impl->snap_stash->x; left = impl->snap_stash->x;
right = 1.0 - (impl->snap_stash->x + impl->snap_stash->width); right = 1.0 - (impl->snap_stash->x + impl->snap_stash->width);
@ -2265,7 +2265,7 @@ unsnap (GdkSurface *window,
hscale = hratio / (1.0 + hratio); hscale = hratio / (1.0 + hratio);
} }
new_left = (gdouble) (rect.width - impl->snap_stash_int->width) * hscale; new_left = (double) (rect.width - impl->snap_stash_int->width) * hscale;
vscale = 1.0; vscale = 1.0;
@ -2275,7 +2275,7 @@ unsnap (GdkSurface *window,
vscale = vratio / (1.0 + vratio); vscale = vratio / (1.0 + vratio);
} }
new_up = (gdouble) (rect.height - impl->snap_stash_int->height) * vscale; new_up = (double) (rect.height - impl->snap_stash_int->height) * vscale;
rect.x = round (rect.x + new_left); rect.x = round (rect.x + new_left);
rect.y = round (rect.y + new_up); rect.y = round (rect.y + new_up);
@ -2360,10 +2360,10 @@ stash_window (GdkSurface *window,
wwidth = (hmonitor_info.rcWork.right - hmonitor_info.rcWork.left) / impl->surface_scale; wwidth = (hmonitor_info.rcWork.right - hmonitor_info.rcWork.left) / impl->surface_scale;
wheight = (hmonitor_info.rcWork.bottom - hmonitor_info.rcWork.top) / impl->surface_scale; wheight = (hmonitor_info.rcWork.bottom - hmonitor_info.rcWork.top) / impl->surface_scale;
impl->snap_stash->x = (gdouble) (x) / (gdouble) (wwidth); impl->snap_stash->x = (double) (x) / (double) (wwidth);
impl->snap_stash->y = (gdouble) (y) / (gdouble) (wheight); impl->snap_stash->y = (double) (y) / (double) (wheight);
impl->snap_stash->width = (gdouble) width / (gdouble) (wwidth); impl->snap_stash->width = (double) width / (double) (wwidth);
impl->snap_stash->height = (gdouble) height / (gdouble) (wheight); impl->snap_stash->height = (double) height / (double) (wheight);
impl->snap_stash_int->x = x; impl->snap_stash_int->x = x;
impl->snap_stash_int->y = y; impl->snap_stash_int->y = y;
@ -2730,7 +2730,7 @@ static void
adjust_indicator_rectangle (GdkRectangle *rect, adjust_indicator_rectangle (GdkRectangle *rect,
gboolean inward) gboolean inward)
{ {
gdouble inverter; double inverter;
const int gap = AEROSNAP_INDICATOR_EDGE_GAP; const int gap = AEROSNAP_INDICATOR_EDGE_GAP;
#if defined(MORE_AEROSNAP_DEBUGGING) #if defined(MORE_AEROSNAP_DEBUGGING)
GdkRectangle cache = *rect; GdkRectangle cache = *rect;
@ -2759,12 +2759,12 @@ rounded_rectangle (cairo_t *cr,
int y, int y,
int width, int width,
int height, int height,
gdouble radius, double radius,
gdouble line_width, double line_width,
GdkRGBA *fill, GdkRGBA *fill,
GdkRGBA *outline) GdkRGBA *outline)
{ {
gdouble degrees = M_PI / 180.0; double degrees = M_PI / 180.0;
if (fill == NULL && outline == NULL) if (fill == NULL && outline == NULL)
return; return;
@ -2798,8 +2798,8 @@ rounded_rectangle (cairo_t *cr,
} }
/* Translates linear animation scale into some kind of curve */ /* Translates linear animation scale into some kind of curve */
static gdouble static double
curve (gdouble val) curve (double val)
{ {
/* TODO: try different curves. For now it's just linear */ /* TODO: try different curves. For now it's just linear */
return val; return val;
@ -2814,10 +2814,10 @@ draw_indicator (GdkW32DragMoveResizeContext *context,
GdkRGBA fill = {0, 0, 1.0, 0.8}; GdkRGBA fill = {0, 0, 1.0, 0.8};
GdkRectangle current_rect; GdkRectangle current_rect;
gint64 current_time = g_get_monotonic_time (); gint64 current_time = g_get_monotonic_time ();
gdouble animation_progress; double animation_progress;
gboolean last_draw; gboolean last_draw;
gdouble line_width; double line_width;
gdouble corner_radius; double corner_radius;
gint64 animation_duration; gint64 animation_duration;
GdkWin32Surface *impl = GDK_WIN32_SURFACE (context->window); GdkWin32Surface *impl = GDK_WIN32_SURFACE (context->window);
@ -2836,7 +2836,7 @@ draw_indicator (GdkW32DragMoveResizeContext *context,
if (timestamp != 0) if (timestamp != 0)
current_time = timestamp; current_time = timestamp;
animation_progress = (gdouble) (current_time - context->indicator_start_time) / animation_duration; animation_progress = (double) (current_time - context->indicator_start_time) / animation_duration;
if (animation_progress > 1.0) if (animation_progress > 1.0)
animation_progress = 1.0; animation_progress = 1.0;
@ -2919,7 +2919,7 @@ redraw_indicator (gpointer user_data)
HDC hdc; HDC hdc;
POINT source_point = { 0, 0 }; POINT source_point = { 0, 0 };
gboolean last_draw; gboolean last_draw;
gdouble indicator_opacity; double indicator_opacity;
GdkWin32Surface *impl; GdkWin32Surface *impl;
gboolean do_source_remove = FALSE; gboolean do_source_remove = FALSE;

View File

@ -79,10 +79,10 @@ typedef enum _GdkWin32AeroSnapState GdkWin32AeroSnapState;
struct _GdkRectangleDouble struct _GdkRectangleDouble
{ {
gdouble x; double x;
gdouble y; double y;
gdouble width; double width;
gdouble height; double height;
}; };
typedef struct _GdkRectangleDouble GdkRectangleDouble; typedef struct _GdkRectangleDouble GdkRectangleDouble;
@ -311,7 +311,7 @@ struct _GdkWin32Surface
* we remember the opacity value here and apply it * we remember the opacity value here and apply it
* during UpdateLayredWindow() call, for layered windows. * during UpdateLayredWindow() call, for layered windows.
*/ */
gdouble layered_opacity; double layered_opacity;
HDC hdc; HDC hdc;
int hdc_count; int hdc_count;

View File

@ -90,8 +90,8 @@ GdkSurface * gdk_win32_surface_lookup_for_display (GdkDisplay *display,
/* For internal GTK use only */ /* For internal GTK use only */
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
GdkPixbuf *gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon, GdkPixbuf *gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon,
gdouble *x_hot, double *x_hot,
gdouble *y_hot); double *y_hot);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
HICON gdk_win32_pixbuf_to_hicon_libgtk_only (GdkPixbuf *pixbuf); HICON gdk_win32_pixbuf_to_hicon_libgtk_only (GdkPixbuf *pixbuf);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL

View File

@ -39,8 +39,8 @@ struct _ScrollValuator
guint n_valuator : 4; guint n_valuator : 4;
guint direction : 4; guint direction : 4;
guint last_value_valid : 1; guint last_value_valid : 1;
gdouble last_value; double last_value;
gdouble increment; double increment;
}; };
struct _GdkX11DeviceXI2 struct _GdkX11DeviceXI2
@ -49,7 +49,7 @@ struct _GdkX11DeviceXI2
int device_id; int device_id;
GArray *scroll_valuators; GArray *scroll_valuators;
gdouble *last_axes; double *last_axes;
}; };
struct _GdkX11DeviceXI2Class struct _GdkX11DeviceXI2Class
@ -72,7 +72,7 @@ static void gdk_x11_device_xi2_set_property (GObject *object,
static void gdk_x11_device_xi2_get_state (GdkDevice *device, static void gdk_x11_device_xi2_get_state (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
gdouble *axes, double *axes,
GdkModifierType *mask); GdkModifierType *mask);
static void gdk_x11_device_xi2_set_surface_cursor (GdkDevice *device, static void gdk_x11_device_xi2_set_surface_cursor (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
@ -80,8 +80,8 @@ static void gdk_x11_device_xi2_set_surface_cursor (GdkDevice *device,
static void gdk_x11_device_xi2_query_state (GdkDevice *device, static void gdk_x11_device_xi2_query_state (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
GdkSurface **child_surface, GdkSurface **child_surface,
gdouble *win_x, double *win_x,
gdouble *win_y, double *win_y,
GdkModifierType *mask); GdkModifierType *mask);
static GdkGrabStatus gdk_x11_device_xi2_grab (GdkDevice *device, static GdkGrabStatus gdk_x11_device_xi2_grab (GdkDevice *device,
@ -95,8 +95,8 @@ static void gdk_x11_device_xi2_ungrab (GdkDevice *device,
guint32 time_); guint32 time_);
static GdkSurface * gdk_x11_device_xi2_surface_at_position (GdkDevice *device, static GdkSurface * gdk_x11_device_xi2_surface_at_position (GdkDevice *device,
gdouble *win_x, double *win_x,
gdouble *win_y, double *win_y,
GdkModifierType *mask); GdkModifierType *mask);
@ -190,7 +190,7 @@ gdk_x11_device_xi2_set_property (GObject *object,
static void static void
gdk_x11_device_xi2_get_state (GdkDevice *device, gdk_x11_device_xi2_get_state (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
gdouble *axes, double *axes,
GdkModifierType *mask) GdkModifierType *mask)
{ {
GdkX11DeviceXI2 *device_xi2 = GDK_X11_DEVICE_XI2 (device); GdkX11DeviceXI2 *device_xi2 = GDK_X11_DEVICE_XI2 (device);
@ -214,7 +214,7 @@ gdk_x11_device_xi2_get_state (GdkDevice *device,
{ {
XIAnyClassInfo *class_info = info->classes[i]; XIAnyClassInfo *class_info = info->classes[i];
GdkAxisUse use; GdkAxisUse use;
gdouble value; double value;
if (class_info->type != XIValuatorClass) if (class_info->type != XIValuatorClass)
continue; continue;
@ -285,15 +285,15 @@ static void
gdk_x11_device_xi2_query_state (GdkDevice *device, gdk_x11_device_xi2_query_state (GdkDevice *device,
GdkSurface *surface, GdkSurface *surface,
GdkSurface **child_surface, GdkSurface **child_surface,
gdouble *win_x, double *win_x,
gdouble *win_y, double *win_y,
GdkModifierType *mask) GdkModifierType *mask)
{ {
GdkX11DeviceXI2 *device_xi2 = GDK_X11_DEVICE_XI2 (device); GdkX11DeviceXI2 *device_xi2 = GDK_X11_DEVICE_XI2 (device);
GdkDisplay *display; GdkDisplay *display;
GdkX11Screen *default_screen; GdkX11Screen *default_screen;
Window xroot_window, xchild_window, xwindow; Window xroot_window, xchild_window, xwindow;
gdouble xroot_x, xroot_y, xwin_x, xwin_y; double xroot_x, xroot_y, xwin_x, xwin_y;
XIButtonState button_state; XIButtonState button_state;
XIModifierState mod_state; XIModifierState mod_state;
XIGroupState group_state; XIGroupState group_state;
@ -447,8 +447,8 @@ gdk_x11_device_xi2_ungrab (GdkDevice *device,
static GdkSurface * static GdkSurface *
gdk_x11_device_xi2_surface_at_position (GdkDevice *device, gdk_x11_device_xi2_surface_at_position (GdkDevice *device,
gdouble *win_x, double *win_x,
gdouble *win_y, double *win_y,
GdkModifierType *mask) GdkModifierType *mask)
{ {
GdkX11Surface *impl; GdkX11Surface *impl;
@ -458,7 +458,7 @@ gdk_x11_device_xi2_surface_at_position (GdkDevice *device,
Display *xdisplay; Display *xdisplay;
GdkSurface *surface; GdkSurface *surface;
Window xwindow, root, child, last = None; Window xwindow, root, child, last = None;
gdouble xroot_x, xroot_y, xwin_x, xwin_y; double xroot_x, xroot_y, xwin_x, xwin_y;
XIButtonState button_state = { 0 }; XIButtonState button_state = { 0 };
XIModifierState mod_state; XIModifierState mod_state;
XIGroupState group_state; XIGroupState group_state;
@ -744,7 +744,7 @@ void
_gdk_x11_device_xi2_add_scroll_valuator (GdkX11DeviceXI2 *device, _gdk_x11_device_xi2_add_scroll_valuator (GdkX11DeviceXI2 *device,
guint n_valuator, guint n_valuator,
GdkScrollDirection direction, GdkScrollDirection direction,
gdouble increment) double increment)
{ {
ScrollValuator scroll; ScrollValuator scroll;
@ -762,9 +762,9 @@ _gdk_x11_device_xi2_add_scroll_valuator (GdkX11DeviceXI2 *device,
gboolean gboolean
_gdk_x11_device_xi2_get_scroll_delta (GdkX11DeviceXI2 *device, _gdk_x11_device_xi2_get_scroll_delta (GdkX11DeviceXI2 *device,
guint n_valuator, guint n_valuator,
gdouble valuator_value, double valuator_value,
GdkScrollDirection *direction_ret, GdkScrollDirection *direction_ret,
gdouble *delta_ret) double *delta_ret)
{ {
guint i; guint i;
@ -835,7 +835,7 @@ _gdk_x11_device_xi2_get_id (GdkX11DeviceXI2 *device)
return device->device_id; return device->device_id;
} }
gdouble double
gdk_x11_device_xi2_get_last_axis_value (GdkX11DeviceXI2 *device, gdk_x11_device_xi2_get_last_axis_value (GdkX11DeviceXI2 *device,
int n_axis) int n_axis)
{ {
@ -850,13 +850,13 @@ gdk_x11_device_xi2_get_last_axis_value (GdkX11DeviceXI2 *device,
void void
gdk_x11_device_xi2_store_axes (GdkX11DeviceXI2 *device, gdk_x11_device_xi2_store_axes (GdkX11DeviceXI2 *device,
gdouble *axes, double *axes,
int n_axes) int n_axes)
{ {
g_free (device->last_axes); g_free (device->last_axes);
if (axes && n_axes) if (axes && n_axes)
device->last_axes = g_memdup (axes, sizeof (gdouble) * n_axes); device->last_axes = g_memdup (axes, sizeof (double) * n_axes);
else else
device->last_axes = NULL; device->last_axes = NULL;
} }

View File

@ -204,9 +204,9 @@ static void
translate_valuator_class (GdkDisplay *display, translate_valuator_class (GdkDisplay *display,
GdkDevice *device, GdkDevice *device,
Atom valuator_label, Atom valuator_label,
gdouble min, double min,
gdouble max, double max,
gdouble resolution) double resolution)
{ {
static gboolean initialized = FALSE; static gboolean initialized = FALSE;
static Atom label_atoms [GDK_AXIS_LAST] = { 0 }; static Atom label_atoms [GDK_AXIS_LAST] = { 0 };
@ -1187,25 +1187,25 @@ set_user_time (GdkEvent *event)
gdk_x11_surface_set_user_time (surface, time); gdk_x11_surface_set_user_time (surface, time);
} }
static gdouble * static double *
translate_axes (GdkDevice *device, translate_axes (GdkDevice *device,
gdouble x, double x,
gdouble y, double y,
GdkSurface *surface, GdkSurface *surface,
XIValuatorState *valuators) XIValuatorState *valuators)
{ {
guint n_axes, i; guint n_axes, i;
gdouble *axes; double *axes;
gdouble *vals; double *vals;
n_axes = gdk_device_get_n_axes (device); n_axes = gdk_device_get_n_axes (device);
axes = g_new0 (gdouble, n_axes); axes = g_new0 (double, n_axes);
vals = valuators->values; vals = valuators->values;
for (i = 0; i < MIN (valuators->mask_len * 8, n_axes); i++) for (i = 0; i < MIN (valuators->mask_len * 8, n_axes); i++)
{ {
GdkAxisUse use; GdkAxisUse use;
gdouble val; double val;
if (!XIMaskIsSet (valuators->mask, i)) if (!XIMaskIsSet (valuators->mask, i))
{ {
@ -1313,13 +1313,13 @@ get_event_surface (GdkEventTranslator *translator,
static gboolean static gboolean
scroll_valuators_changed (GdkX11DeviceXI2 *device, scroll_valuators_changed (GdkX11DeviceXI2 *device,
XIValuatorState *valuators, XIValuatorState *valuators,
gdouble *dx, double *dx,
gdouble *dy) double *dy)
{ {
gboolean has_scroll_valuators = FALSE; gboolean has_scroll_valuators = FALSE;
GdkScrollDirection direction; GdkScrollDirection direction;
guint n_axes, i, n_val; guint n_axes, i, n_val;
gdouble *vals; double *vals;
n_axes = gdk_device_get_n_axes (GDK_DEVICE (device)); n_axes = gdk_device_get_n_axes (GDK_DEVICE (device));
vals = valuators->values; vals = valuators->values;
@ -1328,7 +1328,7 @@ scroll_valuators_changed (GdkX11DeviceXI2 *device,
for (i = 0; i < MIN (valuators->mask_len * 8, n_axes); i++) for (i = 0; i < MIN (valuators->mask_len * 8, n_axes); i++)
{ {
gdouble delta; double delta;
if (!XIMaskIsSet (valuators->mask, i)) if (!XIMaskIsSet (valuators->mask, i))
continue; continue;
@ -1704,7 +1704,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
case XI_Motion: case XI_Motion:
{ {
XIDeviceEvent *xev = (XIDeviceEvent *) ev; XIDeviceEvent *xev = (XIDeviceEvent *) ev;
gdouble delta_x, delta_y; double delta_x, delta_y;
double x, y; double x, y;
double *axes; double *axes;

View File

@ -2163,8 +2163,8 @@ gdk_drag_get_current_actions (GdkModifierType state,
static void static void
gdk_drag_update (GdkDrag *drag, gdk_drag_update (GdkDrag *drag,
gdouble x_root, double x_root,
gdouble y_root, double y_root,
GdkModifierType mods, GdkModifierType mods,
guint32 evtime) guint32 evtime)
{ {

View File

@ -130,7 +130,7 @@ create_synth_crossing_event (GdkEventType evtype,
GdkEvent *real_event) GdkEvent *real_event)
{ {
GdkEvent *event; GdkEvent *event;
gdouble x, y; double x, y;
g_assert (evtype == GDK_ENTER_NOTIFY || evtype == GDK_LEAVE_NOTIFY); g_assert (evtype == GDK_ENTER_NOTIFY || evtype == GDK_LEAVE_NOTIFY);

View File

@ -152,19 +152,19 @@ GdkDevice * _gdk_x11_device_manager_xi2_lookup (GdkX11DeviceManagerXI2 *devic
void _gdk_x11_device_xi2_add_scroll_valuator (GdkX11DeviceXI2 *device, void _gdk_x11_device_xi2_add_scroll_valuator (GdkX11DeviceXI2 *device,
guint n_valuator, guint n_valuator,
GdkScrollDirection direction, GdkScrollDirection direction,
gdouble increment); double increment);
gboolean _gdk_x11_device_xi2_get_scroll_delta (GdkX11DeviceXI2 *device, gboolean _gdk_x11_device_xi2_get_scroll_delta (GdkX11DeviceXI2 *device,
guint n_valuator, guint n_valuator,
gdouble valuator_value, double valuator_value,
GdkScrollDirection *direction_ret, GdkScrollDirection *direction_ret,
gdouble *delta_ret); double *delta_ret);
void _gdk_device_xi2_reset_scroll_valuators (GdkX11DeviceXI2 *device); void _gdk_device_xi2_reset_scroll_valuators (GdkX11DeviceXI2 *device);
gdouble gdk_x11_device_xi2_get_last_axis_value (GdkX11DeviceXI2 *device, double gdk_x11_device_xi2_get_last_axis_value (GdkX11DeviceXI2 *device,
int n_axis); int n_axis);
void gdk_x11_device_xi2_store_axes (GdkX11DeviceXI2 *device, void gdk_x11_device_xi2_store_axes (GdkX11DeviceXI2 *device,
gdouble *axes, double *axes,
int n_axes); int n_axes);
gboolean _gdk_x11_display_supports_cursor_alpha (GdkDisplay *display); gboolean _gdk_x11_display_supports_cursor_alpha (GdkDisplay *display);

View File

@ -2292,8 +2292,8 @@ gdk_surface_get_geometry_hints (GdkSurface *surface,
{ {
*geom_mask |= GDK_HINT_ASPECT; *geom_mask |= GDK_HINT_ASPECT;
geometry->min_aspect = (gdouble) size_hints->min_aspect.x / (gdouble) size_hints->min_aspect.y; geometry->min_aspect = (double) size_hints->min_aspect.x / (double) size_hints->min_aspect.y;
geometry->max_aspect = (gdouble) size_hints->max_aspect.x / (gdouble) size_hints->max_aspect.y; geometry->max_aspect = (double) size_hints->max_aspect.x / (double) size_hints->max_aspect.y;
} }
if (size_hints->flags & PWinGravity) if (size_hints->flags & PWinGravity)
@ -2711,8 +2711,8 @@ gdk_x11_surface_get_frame_extents (GdkSurface *surface,
static gboolean static gboolean
gdk_x11_surface_get_device_state (GdkSurface *surface, gdk_x11_surface_get_device_state (GdkSurface *surface,
GdkDevice *device, GdkDevice *device,
gdouble *x, double *x,
gdouble *y, double *y,
GdkModifierType *mask) GdkModifierType *mask)
{ {
GdkSurface *child; GdkSurface *child;
@ -3841,8 +3841,8 @@ get_move_resize_data (GdkDisplay *display,
static void static void
check_maximize (MoveResizeData *mv_resize, check_maximize (MoveResizeData *mv_resize,
gdouble x_root, double x_root,
gdouble y_root) double y_root)
{ {
GdkSurfaceState state; GdkSurfaceState state;
int y; int y;
@ -3863,8 +3863,8 @@ check_maximize (MoveResizeData *mv_resize,
static void static void
check_unmaximize (MoveResizeData *mv_resize, check_unmaximize (MoveResizeData *mv_resize,
gdouble x_root, double x_root,
gdouble y_root) double y_root)
{ {
GdkSurfaceState state; GdkSurfaceState state;
int dx, dy; int dx, dy;

View File

@ -109,7 +109,7 @@ get_boolean_default (GdkX11Screen *x11_screen,
static gboolean static gboolean
get_double_default (GdkX11Screen *x11_screen, get_double_default (GdkX11Screen *x11_screen,
const char *option, const char *option,
gdouble *value) double *value)
{ {
Display *dpy = GDK_SCREEN_XDISPLAY (x11_screen); Display *dpy = GDK_SCREEN_XDISPLAY (x11_screen);
char *v, *e; char *v, *e;

View File

@ -306,8 +306,8 @@ gsk_cairo_blur_start_drawing (cairo_t *cr,
double clip_x1, clip_x2, clip_y1, clip_y2, clip_width, clip_height; double clip_x1, clip_x2, clip_y1, clip_y2, clip_width, clip_height;
cairo_surface_t *surface; cairo_surface_t *surface;
cairo_t *blur_cr; cairo_t *blur_cr;
gdouble clip_radius; double clip_radius;
gdouble x_scale, y_scale; double x_scale, y_scale;
gboolean blur_x = (blur_flags & GSK_BLUR_X) != 0; gboolean blur_x = (blur_flags & GSK_BLUR_X) != 0;
gboolean blur_y = (blur_flags & GSK_BLUR_Y) != 0; gboolean blur_y = (blur_flags & GSK_BLUR_Y) != 0;
@ -377,7 +377,7 @@ gsk_cairo_blur_finish_drawing (cairo_t *cr,
{ {
cairo_t *original_cr; cairo_t *original_cr;
cairo_surface_t *surface; cairo_surface_t *surface;
gdouble x_scale; double x_scale;
if (!needs_blur (radius, blur_flags)) if (!needs_blur (radius, blur_flags))
return cr; return cr;

View File

@ -985,7 +985,7 @@ draw_shadow_side (cairo_t *cr,
cairo_rectangle_int_t *drawn_rect) cairo_rectangle_int_t *drawn_rect)
{ {
GskBlurFlags blur_flags = GSK_BLUR_REPEAT; GskBlurFlags blur_flags = GSK_BLUR_REPEAT;
gdouble clip_radius; double clip_radius;
int x1, x2, y1, y2; int x1, x2, y1, y2;
clip_radius = gsk_cairo_blur_compute_pixels (radius); clip_radius = gsk_cairo_blur_compute_pixels (radius);

View File

@ -124,7 +124,7 @@ gtk_level_bar_accessible_set_current_value (AtkValue *obj,
static void static void
gtk_level_bar_accessible_get_value_and_text (AtkValue *obj, gtk_level_bar_accessible_get_value_and_text (AtkValue *obj,
gdouble *value, double *value,
char **text) char **text)
{ {
GtkWidget *widget; GtkWidget *widget;
@ -153,7 +153,7 @@ gtk_level_bar_accessible_get_range (AtkValue *obj)
static void static void
gtk_level_bar_accessible_set_value (AtkValue *obj, gtk_level_bar_accessible_set_value (AtkValue *obj,
const gdouble value) const double value)
{ {
GtkWidget *widget; GtkWidget *widget;
GtkLevelBar *level_bar; GtkLevelBar *level_bar;

View File

@ -143,7 +143,7 @@ gtk_paned_accessible_set_current_value (AtkValue *obj,
static void static void
gtk_paned_accessible_get_value_and_text (AtkValue *obj, gtk_paned_accessible_get_value_and_text (AtkValue *obj,
gdouble *value, double *value,
char **text) char **text)
{ {
GtkWidget *widget; GtkWidget *widget;
@ -175,7 +175,7 @@ gtk_paned_accessible_get_range (AtkValue *obj)
static void static void
gtk_paned_accessible_set_value (AtkValue *obj, gtk_paned_accessible_set_value (AtkValue *obj,
const gdouble value) const double value)
{ {
GtkWidget *widget; GtkWidget *widget;
GtkPaned *paned; GtkPaned *paned;

View File

@ -78,7 +78,7 @@ gtk_progress_bar_accessible_get_minimum_value (AtkValue *obj,
static void static void
gtk_progress_bar_accessible_get_value_and_text (AtkValue *obj, gtk_progress_bar_accessible_get_value_and_text (AtkValue *obj,
gdouble *value, double *value,
char **text) char **text)
{ {
GtkWidget *widget; GtkWidget *widget;

View File

@ -152,7 +152,7 @@ gtk_range_accessible_get_maximum_value (AtkValue *obj,
{ {
GtkWidget *widget; GtkWidget *widget;
GtkAdjustment *adjustment; GtkAdjustment *adjustment;
gdouble max; double max;
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
adjustment = gtk_range_get_adjustment (GTK_RANGE (widget)); adjustment = gtk_range_get_adjustment (GTK_RANGE (widget));
@ -223,7 +223,7 @@ gtk_range_accessible_set_current_value (AtkValue *obj,
static void static void
gtk_range_accessible_get_value_and_text (AtkValue *obj, gtk_range_accessible_get_value_and_text (AtkValue *obj,
gdouble *value, double *value,
char **text) char **text)
{ {
GtkWidget *widget; GtkWidget *widget;
@ -243,7 +243,7 @@ gtk_range_accessible_get_range (AtkValue *obj)
{ {
GtkWidget *widget; GtkWidget *widget;
GtkAdjustment *adjustment; GtkAdjustment *adjustment;
gdouble min, max; double min, max;
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
adjustment = gtk_range_get_adjustment (GTK_RANGE (widget)); adjustment = gtk_range_get_adjustment (GTK_RANGE (widget));
@ -262,7 +262,7 @@ gtk_range_accessible_get_range (AtkValue *obj)
static void static void
gtk_range_accessible_set_value (AtkValue *obj, gtk_range_accessible_set_value (AtkValue *obj,
const gdouble value) const double value)
{ {
GtkWidget *widget; GtkWidget *widget;
GtkAdjustment *adjustment; GtkAdjustment *adjustment;
@ -275,7 +275,7 @@ gtk_range_accessible_set_value (AtkValue *obj,
gtk_adjustment_set_value (adjustment, value); gtk_adjustment_set_value (adjustment, value);
} }
static gdouble static double
gtk_range_accessible_get_increment (AtkValue *obj) gtk_range_accessible_get_increment (AtkValue *obj)
{ {
GtkWidget *widget; GtkWidget *widget;

View File

@ -300,7 +300,7 @@ gtk_scale_button_accessible_set_current_value (AtkValue *obj,
static void static void
gtk_scale_button_accessible_get_value_and_text (AtkValue *obj, gtk_scale_button_accessible_get_value_and_text (AtkValue *obj,
gdouble *value, double *value,
char **text) char **text)
{ {
GtkWidget *widget; GtkWidget *widget;
@ -333,7 +333,7 @@ gtk_scale_button_accessible_get_range (AtkValue *obj)
static void static void
gtk_scale_button_accessible_set_value (AtkValue *obj, gtk_scale_button_accessible_set_value (AtkValue *obj,
const gdouble value) const double value)
{ {
GtkWidget *widget; GtkWidget *widget;
GtkAdjustment *adjustment; GtkAdjustment *adjustment;
@ -346,7 +346,7 @@ gtk_scale_button_accessible_set_value (AtkValue *obj,
gtk_adjustment_set_value (adjustment, value); gtk_adjustment_set_value (adjustment, value);
} }
static gdouble static double
gtk_scale_button_accessible_get_increment (AtkValue *obj) gtk_scale_button_accessible_get_increment (AtkValue *obj)
{ {
GtkWidget *widget; GtkWidget *widget;

View File

@ -201,7 +201,7 @@ gtk_spin_button_accessible_set_current_value (AtkValue *obj,
static void static void
gtk_spin_button_accessible_get_value_and_text (AtkValue *obj, gtk_spin_button_accessible_get_value_and_text (AtkValue *obj,
gdouble *value, double *value,
char **text) char **text)
{ {
GtkWidget *widget; GtkWidget *widget;
@ -234,7 +234,7 @@ gtk_spin_button_accessible_get_range (AtkValue *obj)
static void static void
gtk_spin_button_accessible_set_value (AtkValue *obj, gtk_spin_button_accessible_set_value (AtkValue *obj,
const gdouble value) const double value)
{ {
GtkWidget *widget; GtkWidget *widget;
GtkAdjustment *adjustment; GtkAdjustment *adjustment;
@ -247,7 +247,7 @@ gtk_spin_button_accessible_set_value (AtkValue *obj,
gtk_adjustment_set_value (adjustment, value); gtk_adjustment_set_value (adjustment, value);
} }
static gdouble static double
gtk_spin_button_accessible_get_increment (AtkValue *obj) gtk_spin_button_accessible_get_increment (AtkValue *obj)
{ {
GtkWidget *widget; GtkWidget *widget;

View File

@ -377,7 +377,7 @@ create_pango_layout (GtkTextCellAccessible *text)
gboolean foreground_set, strikethrough_set, strikethrough; gboolean foreground_set, strikethrough_set, strikethrough;
gboolean scale_set, underline_set, rise_set; gboolean scale_set, underline_set, rise_set;
char *renderer_text; char *renderer_text;
gdouble scale; double scale;
int rise; int rise;
GtkRendererCellAccessible *gail_renderer; GtkRendererCellAccessible *gail_renderer;
GtkCellRendererText *gtk_renderer; GtkCellRendererText *gtk_renderer;

View File

@ -557,7 +557,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text,
GtkTextIter iter; GtkTextIter iter;
AtkAttributeSet *attrib_set = NULL; AtkAttributeSet *attrib_set = NULL;
GSList *tags, *temp_tags; GSList *tags, *temp_tags;
gdouble scale = 1; double scale = 1;
gboolean val_set = FALSE; gboolean val_set = FALSE;
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
@ -788,7 +788,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text,
g_object_get (tag, "scale-set", &scale_set, NULL); g_object_get (tag, "scale-set", &scale_set, NULL);
if (scale_set) if (scale_set)
{ {
gdouble font_scale; double font_scale;
g_object_get (tag, "scale", &font_scale, NULL); g_object_get (tag, "scale", &font_scale, NULL);
val_set = TRUE; val_set = TRUE;
scale *= font_scale; scale *= font_scale;

View File

@ -71,12 +71,12 @@ find_name (const char *name)
static gboolean static gboolean
parse_media_size (const char *size, parse_media_size (const char *size,
gdouble *width_mm, double *width_mm,
gdouble *height_mm) double *height_mm)
{ {
const char *p; const char *p;
char *e; char *e;
gdouble short_dim, long_dim; double short_dim, long_dim;
p = size; p = size;
@ -114,7 +114,7 @@ int
main (int argc, char *argv[]) main (int argc, char *argv[])
{ {
int i, j, offset; int i, j, offset;
gdouble width, height; double width, height;
names = (NameInfo *) malloc (sizeof (NameInfo) * (4 + n_infos + 2 * n_extra)); names = (NameInfo *) malloc (sizeof (NameInfo) * (4 + n_infos + 2 * n_extra));
n_names = 0; n_names = 0;

View File

@ -71,7 +71,7 @@ g_settings_set_mapping_int (const GValue *value,
variant = g_variant_new_handle ((guint) l); variant = g_variant_new_handle ((guint) l);
} }
else if (g_variant_type_equal (expected_type, G_VARIANT_TYPE_DOUBLE)) else if (g_variant_type_equal (expected_type, G_VARIANT_TYPE_DOUBLE))
variant = g_variant_new_double ((gdouble) l); variant = g_variant_new_double ((double) l);
return variant; return variant;
} }
@ -81,7 +81,7 @@ g_settings_set_mapping_float (const GValue *value,
const GVariantType *expected_type) const GVariantType *expected_type)
{ {
GVariant *variant = NULL; GVariant *variant = NULL;
gdouble d; double d;
gint64 l; gint64 l;
if (G_VALUE_HOLDS_DOUBLE (value)) if (G_VALUE_HOLDS_DOUBLE (value))
@ -126,7 +126,7 @@ g_settings_set_mapping_float (const GValue *value,
variant = g_variant_new_handle ((guint) l); variant = g_variant_new_handle ((guint) l);
} }
else if (g_variant_type_equal (expected_type, G_VARIANT_TYPE_DOUBLE)) else if (g_variant_type_equal (expected_type, G_VARIANT_TYPE_DOUBLE))
variant = g_variant_new_double ((gdouble) d); variant = g_variant_new_double ((double) d);
return variant; return variant;
} }
@ -180,7 +180,7 @@ g_settings_set_mapping_unsigned_int (const GValue *value,
variant = g_variant_new_handle ((guint) u); variant = g_variant_new_handle ((guint) u);
} }
else if (g_variant_type_equal (expected_type, G_VARIANT_TYPE_DOUBLE)) else if (g_variant_type_equal (expected_type, G_VARIANT_TYPE_DOUBLE))
variant = g_variant_new_double ((gdouble) u); variant = g_variant_new_double ((double) u);
return variant; return variant;
} }
@ -237,7 +237,7 @@ g_settings_get_mapping_float (GValue *value,
GVariant *variant) GVariant *variant)
{ {
const GVariantType *type; const GVariantType *type;
gdouble d; double d;
gint64 l; gint64 l;
type = g_variant_get_type (variant); type = g_variant_get_type (variant);

View File

@ -140,7 +140,7 @@ gsk_pango_renderer_draw_trapezoid (PangoRenderer *renderer,
{ {
GskPangoRenderer *crenderer = (GskPangoRenderer *) (renderer); GskPangoRenderer *crenderer = (GskPangoRenderer *) (renderer);
cairo_t *cr; cairo_t *cr;
gdouble x, y; double x, y;
cr = gtk_snapshot_append_cairo (crenderer->snapshot, &crenderer->bounds); cr = gtk_snapshot_append_cairo (crenderer->snapshot, &crenderer->bounds);

View File

@ -46,15 +46,15 @@
struct _GtkAdjustmentPrivate { struct _GtkAdjustmentPrivate {
gdouble lower; double lower;
gdouble upper; double upper;
gdouble value; double value;
gdouble step_increment; double step_increment;
gdouble page_increment; double page_increment;
gdouble page_size; double page_size;
gdouble source; double source;
gdouble target; double target;
guint duration; guint duration;
gint64 start_time; gint64 start_time;
@ -294,7 +294,7 @@ gtk_adjustment_set_property (GObject *object,
GParamSpec *pspec) GParamSpec *pspec)
{ {
GtkAdjustment *adjustment = GTK_ADJUSTMENT (object); GtkAdjustment *adjustment = GTK_ADJUSTMENT (object);
gdouble double_value = g_value_get_double (value); double double_value = g_value_get_double (value);
switch (prop_id) switch (prop_id)
{ {
@ -373,12 +373,12 @@ gtk_adjustment_dispatch_properties_changed (GObject *object,
* Returns: a new #GtkAdjustment * Returns: a new #GtkAdjustment
*/ */
GtkAdjustment * GtkAdjustment *
gtk_adjustment_new (gdouble value, gtk_adjustment_new (double value,
gdouble lower, double lower,
gdouble upper, double upper,
gdouble step_increment, double step_increment,
gdouble page_increment, double page_increment,
gdouble page_size) double page_size)
{ {
return g_object_new (GTK_TYPE_ADJUSTMENT, return g_object_new (GTK_TYPE_ADJUSTMENT,
"lower", lower, "lower", lower,
@ -399,7 +399,7 @@ gtk_adjustment_new (gdouble value,
* *
* Returns: The current value of the adjustment * Returns: The current value of the adjustment
**/ **/
gdouble double
gtk_adjustment_get_value (GtkAdjustment *adjustment) gtk_adjustment_get_value (GtkAdjustment *adjustment)
{ {
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
@ -408,7 +408,7 @@ gtk_adjustment_get_value (GtkAdjustment *adjustment)
return priv->value; return priv->value;
} }
gdouble double
gtk_adjustment_get_target_value (GtkAdjustment *adjustment) gtk_adjustment_get_target_value (GtkAdjustment *adjustment)
{ {
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
@ -423,7 +423,7 @@ gtk_adjustment_get_target_value (GtkAdjustment *adjustment)
static void static void
adjustment_set_value (GtkAdjustment *adjustment, adjustment_set_value (GtkAdjustment *adjustment,
gdouble value) double value)
{ {
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
@ -466,10 +466,10 @@ gtk_adjustment_end_updating (GtkAdjustment *adjustment)
/* From clutter-easing.c, based on Robert Penner's /* From clutter-easing.c, based on Robert Penner's
* infamous easing equations, MIT license. * infamous easing equations, MIT license.
*/ */
static gdouble static double
ease_out_cubic (gdouble t) ease_out_cubic (double t)
{ {
gdouble p = t - 1; double p = t - 1;
return p * p * p + 1; return p * p * p + 1;
} }
@ -485,9 +485,9 @@ gtk_adjustment_on_frame_clock_update (GdkFrameClock *clock,
if (now < priv->end_time) if (now < priv->end_time)
{ {
gdouble t; double t;
t = (now - priv->start_time) / (gdouble) (priv->end_time - priv->start_time); t = (now - priv->start_time) / (double) (priv->end_time - priv->start_time);
t = ease_out_cubic (t); t = ease_out_cubic (t);
adjustment_set_value (adjustment, priv->source + t * (priv->target - priv->source)); adjustment_set_value (adjustment, priv->source + t * (priv->target - priv->source));
} }
@ -500,7 +500,7 @@ gtk_adjustment_on_frame_clock_update (GdkFrameClock *clock,
static void static void
gtk_adjustment_set_value_internal (GtkAdjustment *adjustment, gtk_adjustment_set_value_internal (GtkAdjustment *adjustment,
gdouble value, double value,
gboolean animate) gboolean animate)
{ {
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
@ -543,7 +543,7 @@ gtk_adjustment_set_value_internal (GtkAdjustment *adjustment,
*/ */
void void
gtk_adjustment_set_value (GtkAdjustment *adjustment, gtk_adjustment_set_value (GtkAdjustment *adjustment,
gdouble value) double value)
{ {
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment)); g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
@ -552,7 +552,7 @@ gtk_adjustment_set_value (GtkAdjustment *adjustment,
void void
gtk_adjustment_animate_to_value (GtkAdjustment *adjustment, gtk_adjustment_animate_to_value (GtkAdjustment *adjustment,
gdouble value) double value)
{ {
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment)); g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
@ -567,7 +567,7 @@ gtk_adjustment_animate_to_value (GtkAdjustment *adjustment,
* *
* Returns: The current minimum value of the adjustment * Returns: The current minimum value of the adjustment
**/ **/
gdouble double
gtk_adjustment_get_lower (GtkAdjustment *adjustment) gtk_adjustment_get_lower (GtkAdjustment *adjustment)
{ {
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
@ -598,7 +598,7 @@ gtk_adjustment_get_lower (GtkAdjustment *adjustment)
**/ **/
void void
gtk_adjustment_set_lower (GtkAdjustment *adjustment, gtk_adjustment_set_lower (GtkAdjustment *adjustment,
gdouble lower) double lower)
{ {
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
@ -619,7 +619,7 @@ gtk_adjustment_set_lower (GtkAdjustment *adjustment,
* *
* Returns: The current maximum value of the adjustment * Returns: The current maximum value of the adjustment
**/ **/
gdouble double
gtk_adjustment_get_upper (GtkAdjustment *adjustment) gtk_adjustment_get_upper (GtkAdjustment *adjustment)
{ {
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
@ -645,7 +645,7 @@ gtk_adjustment_get_upper (GtkAdjustment *adjustment)
**/ **/
void void
gtk_adjustment_set_upper (GtkAdjustment *adjustment, gtk_adjustment_set_upper (GtkAdjustment *adjustment,
gdouble upper) double upper)
{ {
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
@ -666,7 +666,7 @@ gtk_adjustment_set_upper (GtkAdjustment *adjustment,
* *
* Returns: The current step increment of the adjustment. * Returns: The current step increment of the adjustment.
**/ **/
gdouble double
gtk_adjustment_get_step_increment (GtkAdjustment *adjustment) gtk_adjustment_get_step_increment (GtkAdjustment *adjustment)
{ {
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
@ -689,7 +689,7 @@ gtk_adjustment_get_step_increment (GtkAdjustment *adjustment)
**/ **/
void void
gtk_adjustment_set_step_increment (GtkAdjustment *adjustment, gtk_adjustment_set_step_increment (GtkAdjustment *adjustment,
gdouble step_increment) double step_increment)
{ {
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
@ -710,7 +710,7 @@ gtk_adjustment_set_step_increment (GtkAdjustment *adjustment,
* *
* Returns: The current page increment of the adjustment * Returns: The current page increment of the adjustment
**/ **/
gdouble double
gtk_adjustment_get_page_increment (GtkAdjustment *adjustment) gtk_adjustment_get_page_increment (GtkAdjustment *adjustment)
{ {
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
@ -733,7 +733,7 @@ gtk_adjustment_get_page_increment (GtkAdjustment *adjustment)
**/ **/
void void
gtk_adjustment_set_page_increment (GtkAdjustment *adjustment, gtk_adjustment_set_page_increment (GtkAdjustment *adjustment,
gdouble page_increment) double page_increment)
{ {
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
@ -754,7 +754,7 @@ gtk_adjustment_set_page_increment (GtkAdjustment *adjustment,
* *
* Returns: The current page size of the adjustment * Returns: The current page size of the adjustment
**/ **/
gdouble double
gtk_adjustment_get_page_size (GtkAdjustment *adjustment) gtk_adjustment_get_page_size (GtkAdjustment *adjustment)
{ {
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
@ -777,7 +777,7 @@ gtk_adjustment_get_page_size (GtkAdjustment *adjustment)
**/ **/
void void
gtk_adjustment_set_page_size (GtkAdjustment *adjustment, gtk_adjustment_set_page_size (GtkAdjustment *adjustment,
gdouble page_size) double page_size)
{ {
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
@ -809,12 +809,12 @@ gtk_adjustment_set_page_size (GtkAdjustment *adjustment,
**/ **/
void void
gtk_adjustment_configure (GtkAdjustment *adjustment, gtk_adjustment_configure (GtkAdjustment *adjustment,
gdouble value, double value,
gdouble lower, double lower,
gdouble upper, double upper,
gdouble step_increment, double step_increment,
gdouble page_increment, double page_increment,
gdouble page_size) double page_size)
{ {
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
gboolean value_changed = FALSE; gboolean value_changed = FALSE;
@ -867,8 +867,8 @@ gtk_adjustment_configure (GtkAdjustment *adjustment,
*/ */
void void
gtk_adjustment_clamp_page (GtkAdjustment *adjustment, gtk_adjustment_clamp_page (GtkAdjustment *adjustment,
gdouble lower, double lower,
gdouble upper) double upper)
{ {
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
gboolean need_emission; gboolean need_emission;
@ -903,11 +903,11 @@ gtk_adjustment_clamp_page (GtkAdjustment *adjustment,
* *
* Returns: the minimum increment of @adjustment * Returns: the minimum increment of @adjustment
*/ */
gdouble double
gtk_adjustment_get_minimum_increment (GtkAdjustment *adjustment) gtk_adjustment_get_minimum_increment (GtkAdjustment *adjustment)
{ {
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
gdouble minimum_increment; double minimum_increment;
g_return_val_if_fail (GTK_IS_ADJUSTMENT (adjustment), 0); g_return_val_if_fail (GTK_IS_ADJUSTMENT (adjustment), 0);

View File

@ -73,59 +73,59 @@ struct _GtkAdjustmentClass
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
GType gtk_adjustment_get_type (void) G_GNUC_CONST; GType gtk_adjustment_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
GtkAdjustment* gtk_adjustment_new (gdouble value, GtkAdjustment* gtk_adjustment_new (double value,
gdouble lower, double lower,
gdouble upper, double upper,
gdouble step_increment, double step_increment,
gdouble page_increment, double page_increment,
gdouble page_size); double page_size);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
void gtk_adjustment_clamp_page (GtkAdjustment *adjustment, void gtk_adjustment_clamp_page (GtkAdjustment *adjustment,
gdouble lower, double lower,
gdouble upper); double upper);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
gdouble gtk_adjustment_get_value (GtkAdjustment *adjustment); double gtk_adjustment_get_value (GtkAdjustment *adjustment);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
void gtk_adjustment_set_value (GtkAdjustment *adjustment, void gtk_adjustment_set_value (GtkAdjustment *adjustment,
gdouble value); double value);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
gdouble gtk_adjustment_get_lower (GtkAdjustment *adjustment); double gtk_adjustment_get_lower (GtkAdjustment *adjustment);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
void gtk_adjustment_set_lower (GtkAdjustment *adjustment, void gtk_adjustment_set_lower (GtkAdjustment *adjustment,
gdouble lower); double lower);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
gdouble gtk_adjustment_get_upper (GtkAdjustment *adjustment); double gtk_adjustment_get_upper (GtkAdjustment *adjustment);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
void gtk_adjustment_set_upper (GtkAdjustment *adjustment, void gtk_adjustment_set_upper (GtkAdjustment *adjustment,
gdouble upper); double upper);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
gdouble gtk_adjustment_get_step_increment (GtkAdjustment *adjustment); double gtk_adjustment_get_step_increment (GtkAdjustment *adjustment);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
void gtk_adjustment_set_step_increment (GtkAdjustment *adjustment, void gtk_adjustment_set_step_increment (GtkAdjustment *adjustment,
gdouble step_increment); double step_increment);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
gdouble gtk_adjustment_get_page_increment (GtkAdjustment *adjustment); double gtk_adjustment_get_page_increment (GtkAdjustment *adjustment);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
void gtk_adjustment_set_page_increment (GtkAdjustment *adjustment, void gtk_adjustment_set_page_increment (GtkAdjustment *adjustment,
gdouble page_increment); double page_increment);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
gdouble gtk_adjustment_get_page_size (GtkAdjustment *adjustment); double gtk_adjustment_get_page_size (GtkAdjustment *adjustment);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
void gtk_adjustment_set_page_size (GtkAdjustment *adjustment, void gtk_adjustment_set_page_size (GtkAdjustment *adjustment,
gdouble page_size); double page_size);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
void gtk_adjustment_configure (GtkAdjustment *adjustment, void gtk_adjustment_configure (GtkAdjustment *adjustment,
gdouble value, double value,
gdouble lower, double lower,
gdouble upper, double upper,
gdouble step_increment, double step_increment,
gdouble page_increment, double page_increment,
gdouble page_size); double page_size);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
gdouble gtk_adjustment_get_minimum_increment (GtkAdjustment *adjustment); double gtk_adjustment_get_minimum_increment (GtkAdjustment *adjustment);
G_END_DECLS G_END_DECLS

View File

@ -29,8 +29,8 @@ void gtk_adjustment_enable_animation (GtkAdjustment *adjustment,
guint duration); guint duration);
guint gtk_adjustment_get_animation_duration (GtkAdjustment *adjustment); guint gtk_adjustment_get_animation_duration (GtkAdjustment *adjustment);
void gtk_adjustment_animate_to_value (GtkAdjustment *adjustment, void gtk_adjustment_animate_to_value (GtkAdjustment *adjustment,
gdouble value); double value);
gdouble gtk_adjustment_get_target_value (GtkAdjustment *adjustment); double gtk_adjustment_get_target_value (GtkAdjustment *adjustment);
gboolean gtk_adjustment_is_animating (GtkAdjustment *adjustment); gboolean gtk_adjustment_is_animating (GtkAdjustment *adjustment);

View File

@ -2132,7 +2132,7 @@ gtk_builder_value_from_string_type (GtkBuilder *builder,
case G_TYPE_FLOAT: case G_TYPE_FLOAT:
case G_TYPE_DOUBLE: case G_TYPE_DOUBLE:
{ {
gdouble d; double d;
char *endptr = NULL; char *endptr = NULL;
errno = 0; errno = 0;
d = g_ascii_strtod (string, &endptr); d = g_ascii_strtod (string, &endptr);

View File

@ -310,8 +310,8 @@ gtk_button_class_init (GtkButtonClass *klass)
static void static void
click_pressed_cb (GtkGestureClick *gesture, click_pressed_cb (GtkGestureClick *gesture,
guint n_press, guint n_press,
gdouble x, double x,
gdouble y, double y,
GtkWidget *widget) GtkWidget *widget)
{ {
GtkButton *button = GTK_BUTTON (widget); GtkButton *button = GTK_BUTTON (widget);
@ -353,8 +353,8 @@ touch_release_in_button (GtkGestureClick *gesture,
static void static void
click_released_cb (GtkGestureClick *gesture, click_released_cb (GtkGestureClick *gesture,
guint n_press, guint n_press,
gdouble x, double x,
gdouble y, double y,
GtkWidget *widget) GtkWidget *widget)
{ {
GtkButton *button = GTK_BUTTON (widget); GtkButton *button = GTK_BUTTON (widget);

View File

@ -270,8 +270,8 @@ static void calendar_invalidate_day_num (GtkCalendar *widget,
int day); int day);
static gboolean gtk_calendar_scroll_controller_scroll (GtkEventControllerScroll *scroll, static gboolean gtk_calendar_scroll_controller_scroll (GtkEventControllerScroll *scroll,
gdouble dx, double dx,
gdouble dy, double dy,
GtkWidget *widget); GtkWidget *widget);
static void calendar_set_month_prev (GtkCalendar *calendar); static void calendar_set_month_prev (GtkCalendar *calendar);
@ -1139,8 +1139,8 @@ gtk_calendar_button_press (GtkGestureClick *gesture,
static gboolean static gboolean
gtk_calendar_scroll_controller_scroll (GtkEventControllerScroll *scroll, gtk_calendar_scroll_controller_scroll (GtkEventControllerScroll *scroll,
gdouble dx, double dx,
gdouble dy, double dy,
GtkWidget *widget) GtkWidget *widget)
{ {
GtkCalendar *calendar = GTK_CALENDAR (widget); GtkCalendar *calendar = GTK_CALENDAR (widget);

View File

@ -68,7 +68,7 @@ struct _GtkCellRendererSpinPrivate
{ {
GtkWidget *spin; GtkWidget *spin;
GtkAdjustment *adjustment; GtkAdjustment *adjustment;
gdouble climb_rate; double climb_rate;
guint digits; guint digits;
}; };

View File

@ -288,7 +288,7 @@ gtk_cell_renderer_spinner_get_size (GtkCellRenderer *cellr,
{ {
GtkCellRendererSpinner *cell = GTK_CELL_RENDERER_SPINNER (cellr); GtkCellRendererSpinner *cell = GTK_CELL_RENDERER_SPINNER (cellr);
GtkCellRendererSpinnerPrivate *priv = gtk_cell_renderer_spinner_get_instance_private (cell); GtkCellRendererSpinnerPrivate *priv = gtk_cell_renderer_spinner_get_instance_private (cell);
gdouble align; double align;
int w, h; int w, h;
int xpad, ypad; int xpad, ypad;
float xalign, yalign; float xalign, yalign;
@ -346,9 +346,9 @@ gtk_paint_spinner (GtkStyleContext *context,
{ {
GdkRGBA color; GdkRGBA color;
guint num_steps; guint num_steps;
gdouble dx, dy; double dx, dy;
gdouble radius; double radius;
gdouble half; double half;
int i; int i;
guint real_step; guint real_step;
@ -375,7 +375,7 @@ gtk_paint_spinner (GtkStyleContext *context,
int inset = 0.7 * radius; int inset = 0.7 * radius;
/* transparency is a function of time and initial value */ /* transparency is a function of time and initial value */
gdouble t = (gdouble) ((i + num_steps - real_step) double t = (double) ((i + num_steps - real_step)
% num_steps) / num_steps; % num_steps) / num_steps;
cairo_save (cr); cairo_save (cr);

View File

@ -181,7 +181,7 @@ struct _GtkCellRendererTextPrivate
char *text; char *text;
char *placeholder_text; char *placeholder_text;
gdouble font_scale; double font_scale;
int rise; int rise;
int fixed_height_rows; int fixed_height_rows;

View File

@ -266,7 +266,7 @@ update_from_editor (GtkColorEditor *editor,
/* UI construction {{{1 */ /* UI construction {{{1 */
static guint static guint
scale_round (gdouble value, gdouble scale) scale_round (double value, double scale)
{ {
value = floor (value * scale + 0.5); value = floor (value * scale + 0.5);
value = MAX (value, 0); value = MAX (value, 0);

View File

@ -95,7 +95,7 @@ G_DEFINE_TYPE_WITH_CODE (GtkColorEditor, gtk_color_editor, GTK_TYPE_BOX,
gtk_color_editor_iface_init)) gtk_color_editor_iface_init))
static guint static guint
scale_round (gdouble value, gdouble scale) scale_round (double value, double scale)
{ {
value = floor (value * scale + 0.5); value = floor (value * scale + 0.5);
value = MAX (value, 0); value = MAX (value, 0);
@ -161,7 +161,7 @@ static void
hsv_changed (GtkColorEditor *editor) hsv_changed (GtkColorEditor *editor)
{ {
GdkRGBA color; GdkRGBA color;
gdouble h, s, v, a; double h, s, v, a;
h = gtk_adjustment_get_value (editor->h_adj); h = gtk_adjustment_get_value (editor->h_adj);
s = gtk_adjustment_get_value (editor->s_adj); s = gtk_adjustment_get_value (editor->s_adj);
@ -333,7 +333,7 @@ static void
value_changed (GtkAdjustment *a, value_changed (GtkAdjustment *a,
GtkAdjustment *as) GtkAdjustment *as)
{ {
gdouble scale; double scale;
scale = gtk_adjustment_get_upper (as) / gtk_adjustment_get_upper (a); scale = gtk_adjustment_get_upper (as) / gtk_adjustment_get_upper (a);
g_signal_handlers_block_by_func (as, value_changed, a); g_signal_handlers_block_by_func (as, value_changed, a);
@ -343,7 +343,7 @@ value_changed (GtkAdjustment *a,
static GtkAdjustment * static GtkAdjustment *
scaled_adjustment (GtkAdjustment *a, scaled_adjustment (GtkAdjustment *a,
gdouble scale) double scale)
{ {
GtkAdjustment *as; GtkAdjustment *as;

View File

@ -56,7 +56,7 @@ sv_to_xy (GtkColorPlane *plane,
int *x, int *x,
int *y) int *y)
{ {
gdouble s, v; double s, v;
int width, height; int width, height;
width = gtk_widget_get_width (GTK_WIDGET (plane)); width = gtk_widget_get_width (GTK_WIDGET (plane));
@ -124,7 +124,7 @@ create_texture (GtkColorPlane *plane)
guint32 *data, *p; guint32 *data, *p;
float h, s, v; float h, s, v;
float r, g, b; float r, g, b;
gdouble sf, vf; double sf, vf;
int x, y; int x, y;
if (!gtk_widget_get_realized (widget)) if (!gtk_widget_get_realized (widget))
@ -234,7 +234,7 @@ update_color (GtkColorPlane *plane,
int y) int y)
{ {
GtkWidget *widget = GTK_WIDGET (plane); GtkWidget *widget = GTK_WIDGET (plane);
gdouble s, v; double s, v;
s = CLAMP (1 - y * (1.0 / gtk_widget_get_height (widget)), 0, 1); s = CLAMP (1 - y * (1.0 / gtk_widget_get_height (widget)), 0, 1);
v = CLAMP (x * (1.0 / gtk_widget_get_width (widget)), 0, 1); v = CLAMP (x * (1.0 / gtk_widget_get_width (widget)), 0, 1);
@ -246,8 +246,8 @@ update_color (GtkColorPlane *plane,
static void static void
hold_action (GtkGestureLongPress *gesture, hold_action (GtkGestureLongPress *gesture,
gdouble x, double x,
gdouble y, double y,
GtkWidget *plane) GtkWidget *plane)
{ {
gtk_widget_activate_action (plane, gtk_widget_activate_action (plane,
@ -257,10 +257,10 @@ hold_action (GtkGestureLongPress *gesture,
static void static void
sv_move (GtkColorPlane *plane, sv_move (GtkColorPlane *plane,
gdouble ds, double ds,
gdouble dv) double dv)
{ {
gdouble s, v; double s, v;
s = gtk_adjustment_get_value (plane->priv->s_adj); s = gtk_adjustment_get_value (plane->priv->s_adj);
v = gtk_adjustment_get_value (plane->priv->v_adj); v = gtk_adjustment_get_value (plane->priv->v_adj);
@ -319,7 +319,7 @@ key_controller_key_pressed (GtkEventControllerKey *controller,
GtkWidget *widget) GtkWidget *widget)
{ {
GtkColorPlane *plane = GTK_COLOR_PLANE (widget); GtkColorPlane *plane = GTK_COLOR_PLANE (widget);
gdouble step; double step;
if ((state & GDK_ALT_MASK) != 0) if ((state & GDK_ALT_MASK) != 0)
step = 0.1; step = 0.1;
@ -346,8 +346,8 @@ key_controller_key_pressed (GtkEventControllerKey *controller,
static void static void
plane_drag_gesture_begin (GtkGestureDrag *gesture, plane_drag_gesture_begin (GtkGestureDrag *gesture,
gdouble start_x, double start_x,
gdouble start_y, double start_y,
GtkWidget *plane) GtkWidget *plane)
{ {
guint button; guint button;
@ -375,11 +375,11 @@ plane_drag_gesture_begin (GtkGestureDrag *gesture,
static void static void
plane_drag_gesture_update (GtkGestureDrag *gesture, plane_drag_gesture_update (GtkGestureDrag *gesture,
gdouble offset_x, double offset_x,
gdouble offset_y, double offset_y,
GtkColorPlane *plane) GtkColorPlane *plane)
{ {
gdouble start_x, start_y; double start_x, start_y;
gtk_gesture_drag_get_start_point (GTK_GESTURE_DRAG (gesture), gtk_gesture_drag_get_start_point (GTK_GESTURE_DRAG (gesture),
&start_x, &start_y); &start_x, &start_y);
@ -388,8 +388,8 @@ plane_drag_gesture_update (GtkGestureDrag *gesture,
static void static void
plane_drag_gesture_end (GtkGestureDrag *gesture, plane_drag_gesture_end (GtkGestureDrag *gesture,
gdouble offset_x, double offset_x,
gdouble offset_y, double offset_y,
GtkColorPlane *plane) GtkColorPlane *plane)
{ {
set_cross_cursor (GTK_WIDGET (plane), FALSE); set_cross_cursor (GTK_WIDGET (plane), FALSE);

View File

@ -50,8 +50,8 @@ enum
}; };
static void hold_action (GtkGestureLongPress *gesture, static void hold_action (GtkGestureLongPress *gesture,
gdouble x, double x,
gdouble y, double y,
GtkWidget *scale); GtkWidget *scale);
static void click_action (GtkGestureClick *gesture, static void click_action (GtkGestureClick *gesture,
@ -87,9 +87,9 @@ gtk_color_scale_snapshot_trough (GtkColorScale *scale,
int stride; int stride;
GBytes *bytes; GBytes *bytes;
guchar *data, *p; guchar *data, *p;
gdouble h; double h;
float r, g, b; float r, g, b;
gdouble f; double f;
int hue_x, hue_y; int hue_x, hue_y;
stride = width * 3; stride = width * 3;
@ -260,8 +260,8 @@ scale_set_property (GObject *object,
static void static void
hold_action (GtkGestureLongPress *gesture, hold_action (GtkGestureLongPress *gesture,
gdouble x, double x,
gdouble y, double y,
GtkWidget *scale) GtkWidget *scale)
{ {
gtk_widget_activate_action (scale, gtk_widget_activate_action (scale,

View File

@ -59,7 +59,7 @@ struct _GtkColorSwatch
GtkWidget parent_instance; GtkWidget parent_instance;
GdkRGBA color; GdkRGBA color;
gdouble radius[4]; double radius[4];
char *icon; char *icon;
guint has_color : 1; guint has_color : 1;
guint use_alpha : 1; guint use_alpha : 1;
@ -270,8 +270,8 @@ swatch_primary_action (GtkColorSwatch *swatch)
static void static void
hold_action (GtkGestureLongPress *gesture, hold_action (GtkGestureLongPress *gesture,
gdouble x, double x,
gdouble y, double y,
GtkColorSwatch *swatch) GtkColorSwatch *swatch)
{ {
do_popup (swatch); do_popup (swatch);
@ -281,8 +281,8 @@ hold_action (GtkGestureLongPress *gesture,
static void static void
tap_action (GtkGestureClick *gesture, tap_action (GtkGestureClick *gesture,
int n_press, int n_press,
gdouble x, double x,
gdouble y, double y,
GtkColorSwatch *swatch) GtkColorSwatch *swatch)
{ {
guint button; guint button;

View File

@ -36,10 +36,10 @@ void gtk_color_swatch_set_rgba (GtkColorSwatch *swatch,
gboolean gtk_color_swatch_get_rgba (GtkColorSwatch *swatch, gboolean gtk_color_swatch_get_rgba (GtkColorSwatch *swatch,
GdkRGBA *color); GdkRGBA *color);
void gtk_color_swatch_set_hsva (GtkColorSwatch *swatch, void gtk_color_swatch_set_hsva (GtkColorSwatch *swatch,
gdouble h, double h,
gdouble s, double s,
gdouble v, double v,
gdouble a); double a);
void gtk_color_swatch_set_can_drop (GtkColorSwatch *swatch, void gtk_color_swatch_set_can_drop (GtkColorSwatch *swatch,
gboolean can_drop); gboolean can_drop);
void gtk_color_swatch_set_icon (GtkColorSwatch *swatch, void gtk_color_swatch_set_icon (GtkColorSwatch *swatch,

View File

@ -235,8 +235,8 @@ static void gtk_combo_box_real_popup (GtkComboBox *combo_box)
static gboolean gtk_combo_box_real_popdown (GtkComboBox *combo_box); static gboolean gtk_combo_box_real_popdown (GtkComboBox *combo_box);
static gboolean gtk_combo_box_scroll_controller_scroll (GtkEventControllerScroll *scroll, static gboolean gtk_combo_box_scroll_controller_scroll (GtkEventControllerScroll *scroll,
gdouble dx, double dx,
gdouble dy, double dy,
GtkComboBox *combo_box); GtkComboBox *combo_box);
/* listening to the model */ /* listening to the model */
@ -522,7 +522,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
* { * {
* GtkTreeIter iter; * GtkTreeIter iter;
* GtkTreeModel model; * GtkTreeModel model;
* gdouble value; * double value;
* *
* model = gtk_combo_box_get_model (combo); * model = gtk_combo_box_get_model (combo);
* *
@ -1664,8 +1664,8 @@ tree_first (GtkComboBox *combo,
static gboolean static gboolean
gtk_combo_box_scroll_controller_scroll (GtkEventControllerScroll *scroll, gtk_combo_box_scroll_controller_scroll (GtkEventControllerScroll *scroll,
gdouble dx, double dx,
gdouble dy, double dy,
GtkComboBox *combo_box) GtkComboBox *combo_box)
{ {
GtkComboBoxPrivate *priv = gtk_combo_box_get_instance_private (combo_box); GtkComboBoxPrivate *priv = gtk_combo_box_get_instance_private (combo_box);

View File

@ -311,8 +311,8 @@ gtk_css_boxes_get_outline_rect (GtkCssBoxes *boxes)
static inline void static inline void
gtk_css_boxes_clamp_border_radius (GskRoundedRect *box) gtk_css_boxes_clamp_border_radius (GskRoundedRect *box)
{ {
gdouble factor = 1.0; double factor = 1.0;
gdouble corners; double corners;
corners = box->corner[GSK_CORNER_TOP_LEFT].width + box->corner[GSK_CORNER_TOP_RIGHT].width; corners = box->corner[GSK_CORNER_TOP_LEFT].width + box->corner[GSK_CORNER_TOP_RIGHT].width;
if (corners != 0) if (corners != 0)

View File

@ -49,14 +49,14 @@ struct _GtkCssValue
struct struct
{ {
GtkCssValue *color; GtkCssValue *color;
gdouble factor; double factor;
} shade, alpha; } shade, alpha;
struct struct
{ {
GtkCssValue *color1; GtkCssValue *color1;
GtkCssValue *color2; GtkCssValue *color2;
gdouble factor; double factor;
} mix; } mix;
} sym_col; } sym_col;
}; };
@ -537,7 +537,7 @@ _gtk_css_color_value_new_name (const char *name)
GtkCssValue * GtkCssValue *
_gtk_css_color_value_new_shade (GtkCssValue *color, _gtk_css_color_value_new_shade (GtkCssValue *color,
gdouble factor) double factor)
{ {
GtkCssValue *value; GtkCssValue *value;
@ -562,7 +562,7 @@ _gtk_css_color_value_new_shade (GtkCssValue *color,
GtkCssValue * GtkCssValue *
_gtk_css_color_value_new_alpha (GtkCssValue *color, _gtk_css_color_value_new_alpha (GtkCssValue *color,
gdouble factor) double factor)
{ {
GtkCssValue *value; GtkCssValue *value;
@ -588,7 +588,7 @@ _gtk_css_color_value_new_alpha (GtkCssValue *color,
GtkCssValue * GtkCssValue *
_gtk_css_color_value_new_mix (GtkCssValue *color1, _gtk_css_color_value_new_mix (GtkCssValue *color1,
GtkCssValue *color2, GtkCssValue *color2,
gdouble factor) double factor)
{ {
GtkCssValue *value; GtkCssValue *value;

View File

@ -29,12 +29,12 @@ GtkCssValue * gtk_css_color_value_new_white (void) G_GNUC_PURE;
GtkCssValue * _gtk_css_color_value_new_literal (const GdkRGBA *color) G_GNUC_PURE; GtkCssValue * _gtk_css_color_value_new_literal (const GdkRGBA *color) G_GNUC_PURE;
GtkCssValue * _gtk_css_color_value_new_name (const char *name) G_GNUC_PURE; GtkCssValue * _gtk_css_color_value_new_name (const char *name) G_GNUC_PURE;
GtkCssValue * _gtk_css_color_value_new_shade (GtkCssValue *color, GtkCssValue * _gtk_css_color_value_new_shade (GtkCssValue *color,
gdouble factor) G_GNUC_PURE; double factor) G_GNUC_PURE;
GtkCssValue * _gtk_css_color_value_new_alpha (GtkCssValue *color, GtkCssValue * _gtk_css_color_value_new_alpha (GtkCssValue *color,
gdouble factor) G_GNUC_PURE; double factor) G_GNUC_PURE;
GtkCssValue * _gtk_css_color_value_new_mix (GtkCssValue *color1, GtkCssValue * _gtk_css_color_value_new_mix (GtkCssValue *color1,
GtkCssValue *color2, GtkCssValue *color2,
gdouble factor) G_GNUC_PURE; double factor) G_GNUC_PURE;
GtkCssValue * _gtk_css_color_value_new_current_color (void) G_GNUC_PURE; GtkCssValue * _gtk_css_color_value_new_current_color (void) G_GNUC_PURE;
gboolean gtk_css_color_value_can_parse (GtkCssParser *parser); gboolean gtk_css_color_value_can_parse (GtkCssParser *parser);

View File

@ -490,7 +490,7 @@ unit_widget_get (GtkWidget *unit_widget)
static void static void
unit_widget_set (GtkWidget *unit_widget, unit_widget_set (GtkWidget *unit_widget,
gdouble value) double value)
{ {
UnitWidget *data; UnitWidget *data;

View File

@ -86,8 +86,8 @@ struct _GtkDragSource
int hot_x; int hot_x;
int hot_y; int hot_y;
gdouble start_x; double start_x;
gdouble start_y; double start_y;
GdkDrag *drag; GdkDrag *drag;
}; };

View File

@ -1504,8 +1504,8 @@ get_icon_position_from_controller (GtkEntry *entry,
static void static void
icon_pressed_cb (GtkGestureClick *gesture, icon_pressed_cb (GtkGestureClick *gesture,
int n_press, int n_press,
gdouble x, double x,
gdouble y, double y,
GtkEntry *entry) GtkEntry *entry)
{ {
GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry);
@ -1524,8 +1524,8 @@ icon_pressed_cb (GtkGestureClick *gesture,
static void static void
icon_released_cb (GtkGestureClick *gesture, icon_released_cb (GtkGestureClick *gesture,
int n_press, int n_press,
gdouble x, double x,
gdouble y, double y,
GtkEntry *entry) GtkEntry *entry)
{ {
GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry);
@ -1541,12 +1541,12 @@ icon_released_cb (GtkGestureClick *gesture,
static void static void
icon_drag_update_cb (GtkGestureDrag *gesture, icon_drag_update_cb (GtkGestureDrag *gesture,
gdouble x, double x,
gdouble y, double y,
GtkEntry *entry) GtkEntry *entry)
{ {
GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry);
gdouble start_x, start_y; double start_x, start_y;
GtkEntryIconPosition pos; GtkEntryIconPosition pos;
EntryIconInfo *icon_info; EntryIconInfo *icon_info;
@ -3254,10 +3254,10 @@ gtk_entry_ensure_progress_widget (GtkEntry *entry)
*/ */
void void
gtk_entry_set_progress_fraction (GtkEntry *entry, gtk_entry_set_progress_fraction (GtkEntry *entry,
gdouble fraction) double fraction)
{ {
GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry);
gdouble old_fraction; double old_fraction;
g_return_if_fail (GTK_IS_ENTRY (entry)); g_return_if_fail (GTK_IS_ENTRY (entry));
@ -3283,7 +3283,7 @@ gtk_entry_set_progress_fraction (GtkEntry *entry,
* *
* Returns: a fraction from 0.0 to 1.0 * Returns: a fraction from 0.0 to 1.0
*/ */
gdouble double
gtk_entry_get_progress_fraction (GtkEntry *entry) gtk_entry_get_progress_fraction (GtkEntry *entry)
{ {
GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry);
@ -3306,7 +3306,7 @@ gtk_entry_get_progress_fraction (GtkEntry *entry)
*/ */
void void
gtk_entry_set_progress_pulse_step (GtkEntry *entry, gtk_entry_set_progress_pulse_step (GtkEntry *entry,
gdouble fraction) double fraction)
{ {
GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry);
@ -3331,7 +3331,7 @@ gtk_entry_set_progress_pulse_step (GtkEntry *entry,
* *
* Returns: a fraction from 0.0 to 1.0 * Returns: a fraction from 0.0 to 1.0
*/ */
gdouble double
gtk_entry_get_progress_pulse_step (GtkEntry *entry) gtk_entry_get_progress_pulse_step (GtkEntry *entry)
{ {
GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry);

View File

@ -167,15 +167,15 @@ GtkEntryCompletion *gtk_entry_get_completion (GtkEntry *entry);
*/ */
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
void gtk_entry_set_progress_fraction (GtkEntry *entry, void gtk_entry_set_progress_fraction (GtkEntry *entry,
gdouble fraction); double fraction);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
gdouble gtk_entry_get_progress_fraction (GtkEntry *entry); double gtk_entry_get_progress_fraction (GtkEntry *entry);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
void gtk_entry_set_progress_pulse_step (GtkEntry *entry, void gtk_entry_set_progress_pulse_step (GtkEntry *entry,
gdouble fraction); double fraction);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
gdouble gtk_entry_get_progress_pulse_step (GtkEntry *entry); double gtk_entry_get_progress_pulse_step (GtkEntry *entry);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
void gtk_entry_progress_pulse (GtkEntry *entry); void gtk_entry_progress_pulse (GtkEntry *entry);

View File

@ -70,8 +70,8 @@
typedef struct typedef struct
{ {
gdouble dx; double dx;
gdouble dy; double dy;
guint32 evtime; guint32 evtime;
} ScrollHistoryElem; } ScrollHistoryElem;
@ -82,8 +82,8 @@ struct _GtkEventControllerScroll
GArray *scroll_history; GArray *scroll_history;
/* For discrete event coalescing */ /* For discrete event coalescing */
gdouble cur_dx; double cur_dx;
gdouble cur_dy; double cur_dy;
guint active : 1; guint active : 1;
}; };
@ -115,8 +115,8 @@ G_DEFINE_TYPE (GtkEventControllerScroll, gtk_event_controller_scroll,
static void static void
scroll_history_push (GtkEventControllerScroll *scroll, scroll_history_push (GtkEventControllerScroll *scroll,
gdouble delta_x, double delta_x,
gdouble delta_y, double delta_y,
guint32 evtime) guint32 evtime)
{ {
ScrollHistoryElem new_item; ScrollHistoryElem new_item;
@ -153,10 +153,10 @@ scroll_history_reset (GtkEventControllerScroll *scroll)
static void static void
scroll_history_finish (GtkEventControllerScroll *scroll, scroll_history_finish (GtkEventControllerScroll *scroll,
gdouble *velocity_x, double *velocity_x,
gdouble *velocity_y) double *velocity_y)
{ {
gdouble accum_dx = 0, accum_dy = 0; double accum_dx = 0, accum_dy = 0;
guint32 first = 0, last = 0; guint32 first = 0, last = 0;
guint i; guint i;
@ -244,7 +244,7 @@ gtk_event_controller_scroll_handle_event (GtkEventController *controller,
{ {
GtkEventControllerScroll *scroll = GTK_EVENT_CONTROLLER_SCROLL (controller); GtkEventControllerScroll *scroll = GTK_EVENT_CONTROLLER_SCROLL (controller);
GdkScrollDirection direction = GDK_SCROLL_SMOOTH; GdkScrollDirection direction = GDK_SCROLL_SMOOTH;
gdouble dx = 0, dy = 0; double dx = 0, dy = 0;
gboolean handled = GDK_EVENT_PROPAGATE; gboolean handled = GDK_EVENT_PROPAGATE;
if (gdk_event_get_event_type (event) != GDK_SCROLL) if (gdk_event_get_event_type (event) != GDK_SCROLL)
@ -342,7 +342,7 @@ gtk_event_controller_scroll_handle_event (GtkEventController *controller,
if (scroll->flags & GTK_EVENT_CONTROLLER_SCROLL_KINETIC) if (scroll->flags & GTK_EVENT_CONTROLLER_SCROLL_KINETIC)
{ {
gdouble vel_x, vel_y; double vel_x, vel_y;
scroll_history_finish (scroll, &vel_x, &vel_y); scroll_history_finish (scroll, &vel_x, &vel_y);
g_signal_emit (controller, signals[DECELERATE], 0, vel_x, vel_y); g_signal_emit (controller, signals[DECELERATE], 0, vel_x, vel_y);

View File

@ -212,8 +212,8 @@ static void gtk_expander_measure (GtkWidget *widget,
/* Gestures */ /* Gestures */
static void gesture_click_released_cb (GtkGestureClick *gesture, static void gesture_click_released_cb (GtkGestureClick *gesture,
int n_press, int n_press,
gdouble x, double x,
gdouble y, double y,
GtkExpander *expander); GtkExpander *expander);
G_DEFINE_TYPE_WITH_CODE (GtkExpander, gtk_expander, GTK_TYPE_WIDGET, G_DEFINE_TYPE_WITH_CODE (GtkExpander, gtk_expander, GTK_TYPE_WIDGET,
@ -566,8 +566,8 @@ gtk_expander_size_allocate (GtkWidget *widget,
static void static void
gesture_click_released_cb (GtkGestureClick *gesture, gesture_click_released_cb (GtkGestureClick *gesture,
int n_press, int n_press,
gdouble x, double x,
gdouble y, double y,
GtkExpander *expander) GtkExpander *expander)
{ {
gtk_widget_activate (GTK_WIDGET (expander)); gtk_widget_activate (GTK_WIDGET (expander));

View File

@ -1914,8 +1914,8 @@ file_list_update_popover (GtkFileChooserWidget *impl)
static void static void
file_list_show_popover (GtkFileChooserWidget *impl, file_list_show_popover (GtkFileChooserWidget *impl,
gdouble x, double x,
gdouble y) double y)
{ {
GdkRectangle rect; GdkRectangle rect;
GtkTreeSelection *selection; GtkTreeSelection *selection;
@ -2062,8 +2062,8 @@ click_cb (GtkGesture *gesture,
static void static void
long_press_cb (GtkGesture *gesture, long_press_cb (GtkGesture *gesture,
gdouble x, double x,
gdouble y, double y,
GtkFileChooserWidget *impl) GtkFileChooserWidget *impl)
{ {
file_list_show_popover (impl, x, y); file_list_show_popover (impl, x, y);

View File

@ -2600,9 +2600,9 @@ autoscroll_cb (GtkWidget *widget,
GtkFlowBox *box = GTK_FLOW_BOX (data); GtkFlowBox *box = GTK_FLOW_BOX (data);
GtkFlowBoxPrivate *priv = BOX_PRIV (box); GtkFlowBoxPrivate *priv = BOX_PRIV (box);
GtkAdjustment *adjustment; GtkAdjustment *adjustment;
gdouble factor; double factor;
gdouble increment; double increment;
gdouble value; double value;
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL) if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
adjustment = priv->vadjustment; adjustment = priv->vadjustment;
@ -2649,7 +2649,7 @@ autoscroll_cb (GtkWidget *widget,
if (priv->rubberband_select) if (priv->rubberband_select)
{ {
GdkEventSequence *sequence; GdkEventSequence *sequence;
gdouble x, y; double x, y;
GtkFlowBoxChild *child; GtkFlowBoxChild *child;
sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (priv->drag_gesture)); sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (priv->drag_gesture));
@ -2744,12 +2744,12 @@ update_autoscroll_mode (GtkFlowBox *box,
static void static void
gtk_flow_box_drag_gesture_update (GtkGestureDrag *gesture, gtk_flow_box_drag_gesture_update (GtkGestureDrag *gesture,
gdouble offset_x, double offset_x,
gdouble offset_y, double offset_y,
GtkFlowBox *box) GtkFlowBox *box)
{ {
GtkFlowBoxPrivate *priv = BOX_PRIV (box); GtkFlowBoxPrivate *priv = BOX_PRIV (box);
gdouble start_x, start_y; double start_x, start_y;
GtkFlowBoxChild *child; GtkFlowBoxChild *child;
GtkCssNode *widget_node; GtkCssNode *widget_node;
@ -2796,8 +2796,8 @@ gtk_flow_box_drag_gesture_update (GtkGestureDrag *gesture,
static void static void
gtk_flow_box_click_gesture_pressed (GtkGestureClick *gesture, gtk_flow_box_click_gesture_pressed (GtkGestureClick *gesture,
guint n_press, guint n_press,
gdouble x, double x,
gdouble y, double y,
GtkFlowBox *box) GtkFlowBox *box)
{ {
GtkFlowBoxPrivate *priv = BOX_PRIV (box); GtkFlowBoxPrivate *priv = BOX_PRIV (box);
@ -2825,8 +2825,8 @@ gtk_flow_box_click_gesture_pressed (GtkGestureClick *gesture,
static void static void
gtk_flow_box_click_unpaired_release (GtkGestureClick *gesture, gtk_flow_box_click_unpaired_release (GtkGestureClick *gesture,
gdouble x, double x,
gdouble y, double y,
guint button, guint button,
GdkEventSequence *sequence, GdkEventSequence *sequence,
GtkFlowBox *box) GtkFlowBox *box)
@ -2846,8 +2846,8 @@ gtk_flow_box_click_unpaired_release (GtkGestureClick *gesture,
static void static void
gtk_flow_box_click_gesture_released (GtkGestureClick *gesture, gtk_flow_box_click_gesture_released (GtkGestureClick *gesture,
guint n_press, guint n_press,
gdouble x, double x,
gdouble y, double y,
GtkFlowBox *box) GtkFlowBox *box)
{ {
GtkFlowBoxPrivate *priv = BOX_PRIV (box); GtkFlowBoxPrivate *priv = BOX_PRIV (box);
@ -2902,8 +2902,8 @@ gtk_flow_box_click_gesture_stopped (GtkGestureClick *gesture,
static void static void
gtk_flow_box_drag_gesture_begin (GtkGestureDrag *gesture, gtk_flow_box_drag_gesture_begin (GtkGestureDrag *gesture,
gdouble start_x, double start_x,
gdouble start_y, double start_y,
GtkWidget *widget) GtkWidget *widget)
{ {
GtkFlowBoxPrivate *priv = BOX_PRIV (widget); GtkFlowBoxPrivate *priv = BOX_PRIV (widget);
@ -2943,8 +2943,8 @@ gtk_flow_box_stop_rubberband (GtkFlowBox *box)
static void static void
gtk_flow_box_drag_gesture_end (GtkGestureDrag *gesture, gtk_flow_box_drag_gesture_end (GtkGestureDrag *gesture,
gdouble offset_x, double offset_x,
gdouble offset_y, double offset_y,
GtkFlowBox *box) GtkFlowBox *box)
{ {
GtkFlowBoxPrivate *priv = BOX_PRIV (box); GtkFlowBoxPrivate *priv = BOX_PRIV (box);

View File

@ -293,7 +293,7 @@ size_change_cb (GtkAdjustment *adjustment,
{ {
GtkFontChooserWidget *fontchooser = user_data; GtkFontChooserWidget *fontchooser = user_data;
PangoFontDescription *font_desc; PangoFontDescription *font_desc;
gdouble size = gtk_adjustment_get_value (adjustment); double size = gtk_adjustment_get_value (adjustment);
font_desc = pango_font_description_new (); font_desc = pango_font_description_new ();
if (pango_font_description_get_size_is_absolute (fontchooser->font_desc)) if (pango_font_description_get_size_is_absolute (fontchooser->font_desc))
@ -310,7 +310,7 @@ output_cb (GtkSpinButton *spin,
{ {
GtkAdjustment *adjustment; GtkAdjustment *adjustment;
char *text; char *text;
gdouble value; double value;
adjustment = gtk_spin_button_get_adjustment (spin); adjustment = gtk_spin_button_get_adjustment (spin);
value = gtk_adjustment_get_value (adjustment); value = gtk_adjustment_get_value (adjustment);
@ -328,7 +328,7 @@ gtk_font_chooser_widget_update_marks (GtkFontChooserWidget *self)
const int *sizes; const int *sizes;
int *font_sizes; int *font_sizes;
int i, n_sizes; int i, n_sizes;
gdouble value, spin_value; double value, spin_value;
gpointer item; gpointer item;
item = gtk_single_selection_get_selected_item (self->selection); item = gtk_single_selection_get_selected_item (self->selection);
@ -376,11 +376,11 @@ gtk_font_chooser_widget_update_marks (GtkFontChooserWidget *self)
spin_value = gtk_adjustment_get_value (spin_adj); spin_value = gtk_adjustment_get_value (spin_adj);
if (spin_value < sizes[0]) if (spin_value < sizes[0])
value = (gdouble) sizes[0]; value = (double) sizes[0];
else if (spin_value > sizes[n_sizes - 1]) else if (spin_value > sizes[n_sizes - 1])
value = (gdouble)sizes[n_sizes - 1]; value = (double)sizes[n_sizes - 1];
else else
value = (gdouble)spin_value; value = (double)spin_value;
/* ensure clamping doesn't callback into font resizing code */ /* ensure clamping doesn't callback into font resizing code */
g_signal_handlers_block_by_func (adj, size_change_cb, self); g_signal_handlers_block_by_func (adj, size_change_cb, self);
@ -812,9 +812,9 @@ gtk_font_chooser_widget_init (GtkFontChooserWidget *self)
/* Set the upper values of the spin/scale with G_MAXINT / PANGO_SCALE */ /* Set the upper values of the spin/scale with G_MAXINT / PANGO_SCALE */
gtk_spin_button_set_range (GTK_SPIN_BUTTON (self->size_spin), gtk_spin_button_set_range (GTK_SPIN_BUTTON (self->size_spin),
1.0, (gdouble)(G_MAXINT / PANGO_SCALE)); 1.0, (double)(G_MAXINT / PANGO_SCALE));
gtk_adjustment_set_upper (gtk_range_get_adjustment (GTK_RANGE (self->size_slider)), gtk_adjustment_set_upper (gtk_range_get_adjustment (GTK_RANGE (self->size_slider)),
(gdouble)(G_MAXINT / PANGO_SCALE)); (double)(G_MAXINT / PANGO_SCALE));
self->tweak_action = G_ACTION (g_simple_action_new_stateful ("tweak", NULL, g_variant_new_boolean (FALSE))); self->tweak_action = G_ACTION (g_simple_action_new_stateful ("tweak", NULL, g_variant_new_boolean (FALSE)));
g_signal_connect (self->tweak_action, "change-state", G_CALLBACK (change_tweak), self); g_signal_connect (self->tweak_action, "change-state", G_CALLBACK (change_tweak), self);

View File

@ -146,12 +146,12 @@ struct _PointData
{ {
GdkEvent *event; GdkEvent *event;
GtkWidget *target; GtkWidget *target;
gdouble widget_x; double widget_x;
gdouble widget_y; double widget_y;
/* Acummulators for touchpad events */ /* Acummulators for touchpad events */
gdouble accum_dx; double accum_dx;
gdouble accum_dy; double accum_dy;
guint press_handled : 1; guint press_handled : 1;
guint state : 2; guint state : 2;
@ -1209,8 +1209,8 @@ gtk_gesture_get_last_target (GtkGesture *gesture,
gboolean gboolean
gtk_gesture_get_point (GtkGesture *gesture, gtk_gesture_get_point (GtkGesture *gesture,
GdkEventSequence *sequence, GdkEventSequence *sequence,
gdouble *x, double *x,
gdouble *y) double *y)
{ {
GtkGesturePrivate *priv; GtkGesturePrivate *priv;
PointData *data; PointData *data;
@ -1276,7 +1276,7 @@ gtk_gesture_get_bounding_box (GtkGesture *gesture,
GdkRectangle *rect) GdkRectangle *rect)
{ {
GtkGesturePrivate *priv; GtkGesturePrivate *priv;
gdouble x1, y1, x2, y2; double x1, y1, x2, y2;
GHashTableIter iter; GHashTableIter iter;
guint n_points = 0; guint n_points = 0;
PointData *data; PointData *data;
@ -1336,8 +1336,8 @@ gtk_gesture_get_bounding_box (GtkGesture *gesture,
**/ **/
gboolean gboolean
gtk_gesture_get_bounding_box_center (GtkGesture *gesture, gtk_gesture_get_bounding_box_center (GtkGesture *gesture,
gdouble *x, double *x,
gdouble *y) double *y)
{ {
GdkEvent *last_event; GdkEvent *last_event;
GdkRectangle rect; GdkRectangle rect;

View File

@ -73,16 +73,16 @@ GdkEvent *
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
gboolean gtk_gesture_get_point (GtkGesture *gesture, gboolean gtk_gesture_get_point (GtkGesture *gesture,
GdkEventSequence *sequence, GdkEventSequence *sequence,
gdouble *x, double *x,
gdouble *y); double *y);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
gboolean gtk_gesture_get_bounding_box (GtkGesture *gesture, gboolean gtk_gesture_get_bounding_box (GtkGesture *gesture,
GdkRectangle *rect); GdkRectangle *rect);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
gboolean gtk_gesture_get_bounding_box_center gboolean gtk_gesture_get_bounding_box_center
(GtkGesture *gesture, (GtkGesture *gesture,
gdouble *x, double *x,
gdouble *y); double *y);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
gboolean gtk_gesture_is_active (GtkGesture *gesture); gboolean gtk_gesture_is_active (GtkGesture *gesture);

View File

@ -47,8 +47,8 @@ typedef struct _GtkGestureClickPrivate GtkGestureClickPrivate;
struct _GtkGestureClickPrivate struct _GtkGestureClickPrivate
{ {
GdkDevice *current_device; GdkDevice *current_device;
gdouble initial_press_x; double initial_press_x;
gdouble initial_press_y; double initial_press_y;
guint double_click_timeout_id; guint double_click_timeout_id;
guint n_presses; guint n_presses;
guint n_release; guint n_release;
@ -193,7 +193,7 @@ gtk_gesture_click_begin (GtkGesture *gesture,
GdkEvent *event; GdkEvent *event;
GdkEventType event_type; GdkEventType event_type;
GdkDevice *device; GdkDevice *device;
gdouble x, y; double x, y;
if (!gtk_gesture_handles_sequence (gesture, sequence)) if (!gtk_gesture_handles_sequence (gesture, sequence))
return; return;
@ -250,7 +250,7 @@ gtk_gesture_click_update (GtkGesture *gesture,
{ {
GtkGestureClick *click; GtkGestureClick *click;
GdkEventSequence *current; GdkEventSequence *current;
gdouble x, y; double x, y;
click = GTK_GESTURE_CLICK (gesture); click = GTK_GESTURE_CLICK (gesture);
current = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture)); current = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
@ -267,7 +267,7 @@ gtk_gesture_click_end (GtkGesture *gesture,
GtkGestureClick *click; GtkGestureClick *click;
GtkGestureClickPrivate *priv; GtkGestureClickPrivate *priv;
GdkEventSequence *current; GdkEventSequence *current;
gdouble x, y; double x, y;
gboolean interpreted; gboolean interpreted;
GtkEventSequenceState state; GtkEventSequenceState state;

View File

@ -33,12 +33,12 @@ struct _GtkGestureClickClass
void (* pressed) (GtkGestureClick *gesture, void (* pressed) (GtkGestureClick *gesture,
int n_press, int n_press,
gdouble x, double x,
gdouble y); double y);
void (* released) (GtkGestureClick *gesture, void (* released) (GtkGestureClick *gesture,
int n_press, int n_press,
gdouble x, double x,
gdouble y); double y);
void (* stopped) (GtkGestureClick *gesture); void (* stopped) (GtkGestureClick *gesture);
/*<private>*/ /*<private>*/

Some files were not shown because too many files have changed in this diff Show More