Commit 3078b180 authored by Benjamin Otte's avatar Benjamin Otte
Browse files

Replace "gdouble" with "double"

parent 556997f9
Pipeline #198833 passed with stages
in 65 minutes and 1 second
......@@ -12,7 +12,7 @@ static GtkWidget *progress_bar = NULL;
static gboolean
apply_changes_gradually (gpointer data)
{
gdouble fraction;
double fraction;
/* Work, work, work... */
fraction = gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (progress_bar));
......
......@@ -64,8 +64,8 @@ scribble_draw (GtkDrawingArea *da,
/* Draw a rectangle on the screen */
static void
draw_brush (GtkWidget *widget,
gdouble x,
gdouble y)
double x,
double y)
{
GdkRectangle update_rect;
cairo_t *cr;
......
......@@ -728,7 +728,7 @@ static void
entry_activated (GtkEntry *entry,
GtkAdjustment *adjustment)
{
gdouble value;
double value;
char *err = NULL;
value = g_strtod (gtk_editable_get_text (GTK_EDITABLE (entry)), &err);
......@@ -939,7 +939,7 @@ instance_changed (GtkComboBox *combo)
{
Axis *axis;
Axis akey;
gdouble value;
double value;
value = coords[ai[i].axis_index];
......
......@@ -39,7 +39,7 @@ val_to_xy (GtkFontPlane *plane,
int *x,
int *y)
{
gdouble u, v;
double u, v;
int width, height;
width = gtk_widget_get_allocated_width (GTK_WIDGET (plane));
......@@ -129,7 +129,7 @@ update_value (GtkFontPlane *plane,
int y)
{
GtkWidget *widget = GTK_WIDGET (plane);
gdouble u, v;
double u, v;
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);
......@@ -142,8 +142,8 @@ update_value (GtkFontPlane *plane,
static void
plane_drag_gesture_begin (GtkGestureDrag *gesture,
gdouble start_x,
gdouble start_y,
double start_x,
double start_y,
GtkFontPlane *plane)
{
guint button;
......@@ -164,11 +164,11 @@ plane_drag_gesture_begin (GtkGestureDrag *gesture,
static void
plane_drag_gesture_update (GtkGestureDrag *gesture,
gdouble offset_x,
gdouble offset_y,
double offset_x,
double offset_y,
GtkFontPlane *plane)
{
gdouble start_x, start_y;
double start_x, start_y;
gtk_gesture_drag_get_start_point (GTK_GESTURE_DRAG (gesture),
&start_x, &start_y);
......@@ -177,8 +177,8 @@ plane_drag_gesture_update (GtkGestureDrag *gesture,
static void
plane_drag_gesture_end (GtkGestureDrag *gesture,
gdouble offset_x,
gdouble offset_y,
double offset_x,
double offset_y,
GtkFontPlane *plane)
{
set_cross_cursor (GTK_WIDGET (plane), FALSE);
......
......@@ -9,8 +9,8 @@
static GtkGesture *rotate = NULL;
static GtkGesture *zoom = NULL;
static gdouble swipe_x = 0;
static gdouble swipe_y = 0;
static double swipe_x = 0;
static double swipe_y = 0;
static gboolean long_pressed = FALSE;
static gboolean
......@@ -26,8 +26,8 @@ touchpad_swipe_gesture_begin (GtkGesture *gesture,
static void
swipe_gesture_swept (GtkGestureSwipe *gesture,
gdouble velocity_x,
gdouble velocity_y,
double velocity_x,
double velocity_y,
GtkWidget *widget)
{
swipe_x = velocity_x / 10;
......@@ -37,8 +37,8 @@ swipe_gesture_swept (GtkGestureSwipe *gesture,
static void
long_press_gesture_pressed (GtkGestureLongPress *gesture,
gdouble x,
gdouble y,
double x,
double y,
GtkWidget *widget)
{
long_pressed = TRUE;
......@@ -56,8 +56,8 @@ long_press_gesture_end (GtkGesture *gesture,
static void
rotation_angle_changed (GtkGestureRotate *gesture,
gdouble angle,
gdouble delta,
double angle,
double delta,
GtkWidget *widget)
{
gtk_widget_queue_draw (widget);
......@@ -65,7 +65,7 @@ rotation_angle_changed (GtkGestureRotate *gesture,
static void
zoom_scale_changed (GtkGestureZoom *gesture,
gdouble scale,
double scale,
GtkWidget *widget)
{
gtk_widget_queue_draw (widget);
......@@ -93,8 +93,8 @@ drawing_area_draw (GtkDrawingArea *area,
{
cairo_pattern_t *pat;
cairo_matrix_t matrix;
gdouble angle, scale;
gdouble x_center, y_center;
double angle, scale;
double x_center, y_center;
gtk_gesture_get_bounding_box_center (GTK_GESTURE (zoom), &x_center, &y_center);
......
......@@ -140,8 +140,8 @@ static void set_cursor_if_appropriate (GtkTextView *text_view,
static void
released_cb (GtkGestureClick *gesture,
guint n_press,
gdouble x,
gdouble y,
double x,
double y,
GtkWidget *text_view)
{
GtkTextIter start, end, iter;
......@@ -168,8 +168,8 @@ released_cb (GtkGestureClick *gesture,
static void
motion_cb (GtkEventControllerMotion *controller,
gdouble x,
gdouble y,
double x,
double y,
GtkTextView *text_view)
{
set_cursor_if_appropriate (text_view, x, y);
......
......@@ -89,14 +89,14 @@ static GParamSpec *color_properties[N_COLOR_PROPS] = { NULL, };
static void
rgb_to_hsv (GdkRGBA *rgba,
gdouble *h_out,
gdouble *s_out,
gdouble *v_out)
double *h_out,
double *s_out,
double *v_out)
{
gdouble red, green, blue;
gdouble h, s, v;
gdouble min, max;
gdouble delta;
double red, green, blue;
double h, s, v;
double min, max;
double delta;
red = rgba->red;
green = rgba->green;
......
......@@ -270,8 +270,6 @@ static const char *types[] =
"gshort",
"gushort",
"gulong",
"gdouble",
"gldouble",
"gpointer",
"NULL",
"GList",
......
......@@ -20,7 +20,7 @@ typedef struct
cairo_t *cr;
GdkRGBA draw_color;
GtkPadController *pad_controller;
gdouble brush_size;
double brush_size;
} DrawingArea;
typedef struct
......@@ -166,7 +166,7 @@ on_pad_knob_change (GSimpleAction *action,
GVariant *parameter,
DrawingArea *area)
{
gdouble value = g_variant_get_double (parameter);
double value = g_variant_get_double (parameter);
area->brush_size = value;
}
......@@ -255,9 +255,9 @@ drawing_area_class_init (DrawingAreaClass *klass)
static void
drawing_area_apply_stroke (DrawingArea *area,
GdkDeviceTool *tool,
gdouble x,
gdouble y,
gdouble pressure)
double x,
double y,
double pressure)
{
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
stylus_gesture_down (GtkGestureStylus *gesture,
gdouble x,
gdouble y,
double x,
double y,
DrawingArea *area)
{
cairo_new_path (area->cr);
......@@ -290,13 +290,13 @@ stylus_gesture_down (GtkGestureStylus *gesture,
static void
stylus_gesture_motion (GtkGestureStylus *gesture,
gdouble x,
gdouble y,
double x,
double y,
DrawingArea *area)
{
GdkTimeCoord *backlog;
GdkDeviceTool *tool;
gdouble pressure;
double pressure;
guint n_items;
tool = gtk_gesture_stylus_get_device_tool (gesture);
......
......@@ -15,7 +15,7 @@
typedef struct
{
char *resourcename;
gdouble font_size;
double font_size;
int lines_per_page;
char **lines;
......@@ -62,7 +62,7 @@ draw_page (GtkPrintOperation *operation,
cairo_t *cr;
PangoLayout *layout;
int text_width, text_height;
gdouble width;
double width;
int line, i;
PangoFontDescription *desc;
char *page_str;
......
......@@ -13,11 +13,11 @@
int
spinbutton_hex_spin_input (GtkSpinButton *spin_button,
gdouble *new_val)
double *new_val)
{
const char *buf;
char *err;
gdouble res;
double res;
buf = gtk_editable_get_text (GTK_EDITABLE (spin_button));
res = strtol (buf, &err, 16);
......@@ -33,7 +33,7 @@ spinbutton_hex_spin_output (GtkSpinButton *spin_button)
{
GtkAdjustment *adjustment;
char *buf;
gdouble val;
double val;
adjustment = gtk_spin_button_get_adjustment (spin_button);
val = gtk_adjustment_get_value (adjustment);
......@@ -50,7 +50,7 @@ spinbutton_hex_spin_output (GtkSpinButton *spin_button)
int
spinbutton_time_spin_input (GtkSpinButton *spin_button,
gdouble *new_val)
double *new_val)
{
const char *text;
char **str;
......@@ -92,8 +92,8 @@ spinbutton_time_spin_output (GtkSpinButton *spin_button)
{
GtkAdjustment *adjustment;
char *buf;
gdouble hours;
gdouble minutes;
double hours;
double minutes;
adjustment = gtk_spin_button_get_adjustment (spin_button);
hours = gtk_adjustment_get_value (adjustment) / 60.0;
......@@ -123,7 +123,7 @@ static const char *month[12] = {
int
spinbutton_month_spin_input (GtkSpinButton *spin_button,
gdouble *new_val)
double *new_val)
{
int i;
char *tmp1, *tmp2;
......@@ -145,7 +145,7 @@ spinbutton_month_spin_input (GtkSpinButton *spin_button,
*new_val = 0.0;
return GTK_INPUT_ERROR;
}
*new_val = (gdouble) i;
*new_val = (double) i;
return TRUE;
}
......@@ -154,7 +154,7 @@ int
spinbutton_month_spin_output (GtkSpinButton *spin_button)
{
GtkAdjustment *adjustment;
gdouble value;
double value;
int i;
adjustment = gtk_spin_button_get_adjustment (spin_button);
......
......@@ -482,7 +482,7 @@ pulse_it (GtkWidget *widget)
static void
update_pulse_time (GtkAdjustment *adjustment, GtkWidget *widget)
{
gdouble value;
double value;
guint pulse_id;
value = gtk_adjustment_get_value (adjustment);
......@@ -537,11 +537,11 @@ on_entry_icon_release (GtkEntry *entry,
static void
on_scale_button_value_changed (GtkScaleButton *button,
gdouble value,
double value,
gpointer user_data)
{
GtkAdjustment *adjustment;
gdouble val;
double val;
char *str;
adjustment = gtk_scale_button_get_adjustment (button);
......
......@@ -426,8 +426,8 @@ draw_cb (GtkDrawingArea *drawing_area,
/* Draw a rectangle on the surface at the given position */
static void
draw_brush (GtkWidget *widget,
gdouble x,
gdouble y)
double x,
double y)
{
cairo_t *cr;
......
......@@ -59,8 +59,8 @@ draw_cb (GtkDrawingArea *drawing_area,
/* Draw a rectangle on the surface at the given position */
static void
draw_brush (GtkWidget *widget,
gdouble x,
gdouble y)
double x,
double y)
{
cairo_t *cr;
......
......@@ -24,8 +24,8 @@
#include "gdkprivate-broadway.h"
static void gdk_broadway_device_get_state (GdkDevice *device,
GdkSurface *surface,
gdouble *axes,
GdkSurface *surface,
double *axes,
GdkModifierType *mask);
static void gdk_broadway_device_set_surface_cursor (GdkDevice *device,
GdkSurface *surface,
......@@ -46,8 +46,8 @@ static GdkGrabStatus gdk_broadway_device_grab (GdkDevice *device,
static void gdk_broadway_device_ungrab (GdkDevice *device,
guint32 time_);
static GdkSurface * gdk_broadway_device_surface_at_position (GdkDevice *device,
gdouble *win_x,
gdouble *win_y,
double *win_x,
double *win_y,
GdkModifierType *mask);
......@@ -79,11 +79,11 @@ gdk_broadway_device_init (GdkBroadwayDevice *device_core)
static void
gdk_broadway_device_get_state (GdkDevice *device,
GdkSurface *surface,
gdouble *axes,
GdkSurface *surface,
double *axes,
GdkModifierType *mask)
{
gdouble x, y;
double x, y;
gdk_surface_get_device_position (surface, device, &x, &y, mask);
......@@ -271,8 +271,8 @@ gdk_broadway_device_ungrab (GdkDevice *device,
static GdkSurface *
gdk_broadway_device_surface_at_position (GdkDevice *device,
gdouble *win_x,
gdouble *win_y,
double *win_x,
double *win_y,
GdkModifierType *mask)
{
GdkSurface *surface = NULL;
......
......@@ -736,8 +736,8 @@ gdk_broadway_surface_get_root_coords (GdkSurface *surface,
static gboolean
gdk_broadway_surface_get_device_state (GdkSurface *surface,
GdkDevice *device,
gdouble *x,
gdouble *y,
double *x,
double *y,
GdkModifierType *mask)
{
GdkSurface *child;
......
......@@ -213,8 +213,8 @@ gdk_cairo_surface_paint_pixbuf (cairo_surface_t *surface,
void
gdk_cairo_set_source_pixbuf (cairo_t *cr,
const GdkPixbuf *pixbuf,
gdouble pixbuf_x,
gdouble pixbuf_y)
double pixbuf_x,
double pixbuf_y)
{
cairo_format_t format;
cairo_surface_t *surface;
......
......@@ -35,8 +35,8 @@ void gdk_cairo_set_source_rgba (cairo_t *cr,
GDK_AVAILABLE_IN_ALL
void gdk_cairo_set_source_pixbuf (cairo_t *cr,
const GdkPixbuf *pixbuf,
gdouble pixbuf_x,
gdouble pixbuf_y);
double pixbuf_x,
double pixbuf_y);
GDK_AVAILABLE_IN_ALL
void gdk_cairo_rectangle (cairo_t *cr,
......
......@@ -52,11 +52,11 @@ typedef struct _GdkAxisInfo GdkAxisInfo;
struct _GdkAxisInfo
{
GdkAxisUse use;
gdouble min_axis;
gdouble max_axis;
gdouble min_value;
gdouble max_value;
gdouble resolution;
double min_axis;
double max_axis;
double min_value;
double max_value;
double resolution;
};
enum {
......@@ -550,7 +550,7 @@ gdk_device_get_property (GObject *object,
void
gdk_device_get_state (GdkDevice *device,
GdkSurface *surface,
gdouble *axes,
double *axes,
GdkModifierType *mask)
{
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_y)
{
gdouble tmp_x, tmp_y;
double tmp_x, tmp_y;
GdkSurface *surface;
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
......@@ -873,9 +873,9 @@ gdk_device_get_n_axes (GdkDevice *device)
**/
gboolean
gdk_device_get_axis (GdkDevice *device,
gdouble *axes,
double *axes,
GdkAxisUse use,
gdouble *value)
double *value)
{
int i;
......@@ -994,9 +994,9 @@ _gdk_device_reset_axes (GdkDevice *device)
guint
_gdk_device_add_axis (GdkDevice *device,
GdkAxisUse use,
gdouble min_value,
gdouble max_value,
gdouble resolution)
double min_value,
double max_value,
double resolution)
{
GdkAxisInfo axis_info;
guint pos;
......@@ -1039,9 +1039,9 @@ void
_gdk_device_get_axis_info (GdkDevice *device,
guint index_,
GdkAxisUse *use,
gdouble *min_value,
gdouble *max_value,
gdouble *resolution)
double *min_value,
double *max_value,
double *resolution)
{
GdkAxisInfo *info;
......@@ -1078,17 +1078,17 @@ gboolean
_gdk_device_translate_surface_coord (GdkDevice *device,
GdkSurface *surface,
guint index_,
gdouble value,
gdouble *axis_value)
double value,
double *axis_value)
{
GdkAxisInfo axis_info;
GdkAxisInfo *axis_info_x, *axis_info_y;
gdouble device_width, device_height;
gdouble x_offset, y_offset;
gdouble x_scale, y_scale;
gdouble x_min, y_min;
gdouble x_resolution, y_resolution;
gdouble device_aspect;
double device_width, device_height;
double x_offset, y_offset;
double x_scale, y_scale;
double x_min, y_min;
double x_resolution, y_resolution;
double device_aspect;
int surface_width, surface_height;
if (index_ >= device->axes->len)
......@@ -1179,16 +1179,16 @@ _gdk_device_translate_surface_coord (GdkDevice *device,
gboolean
_gdk_device_translate_screen_coord (GdkDevice *device,
GdkSurface *surface,
gdouble surface_root_x,
gdouble surface_root_y,
gdouble screen_width,
gdouble screen_height,
double surface_root_x,
double surface_root_y,
double screen_width,
double screen_height,
guint index_,
gdouble value,
gdouble *axis_value)
double value,
double *axis_value)
{
GdkAxisInfo axis_info;
gdouble axis_width, scale, offset;
double axis_width, scale, offset;
if (index_ >= device->axes->len)
return FALSE;
......@@ -1229,11 +1229,11 @@ _gdk_device_translate_screen_coord (GdkDevice *device,
gboolean
_gdk_device_translate_axis (GdkDevice *device,
guint index_,
gdouble value,
gdouble *axis_value)
double value,
double *axis_value)
{
GdkAxisInfo axis_info;
gdouble axis_width, out;
double axis_width, out;
if (index_ >= device->axes->len)
return FALSE;
......@@ -1258,8 +1258,8 @@ void
_gdk_device_query_state (GdkDevice *device,
GdkSurface *surface,
GdkSurface **child_surface,
gdouble *win_x,
gdouble *win_y,
double *win_x,
double *win_y,
GdkModifierType *mask)