diff --git a/demos/gtk-demo/main.c b/demos/gtk-demo/main.c index e8aa1ab93a..889b539dc1 100644 --- a/demos/gtk-demo/main.c +++ b/demos/gtk-demo/main.c @@ -255,7 +255,6 @@ static const char *types[] = " int ", " char ", "char ", - "gfloat", "float", "double", "gint8", diff --git a/docs/CODING-STYLE.md b/docs/CODING-STYLE.md index e0f3ca13ca..8c0368e1f0 100644 --- a/docs/CODING-STYLE.md +++ b/docs/CODING-STYLE.md @@ -484,8 +484,8 @@ It is also possible to align the columns to the next tab: ```c void gtk_type_set_prop (GtkType *type, - gfloat value); - gfloat gtk_type_get_prop (GtkType *type); + float value); + float gtk_type_get_prop (GtkType *type); int gtk_type_update_foobar (GtkType *type); ``` diff --git a/gtk/a11y/gtktextcellaccessible.c b/gtk/a11y/gtktextcellaccessible.c index 7c51cb6480..369da981b9 100644 --- a/gtk/a11y/gtktextcellaccessible.c +++ b/gtk/a11y/gtktextcellaccessible.c @@ -495,7 +495,7 @@ gtk_text_cell_accessible_get_character_extents (AtkText *text, PangoRectangle char_rect; GtkTextCellAccessible *text_cell = GTK_TEXT_CELL_ACCESSIBLE (text); char *renderer_text; - gfloat xalign, yalign; + float xalign, yalign; int x_offset, y_offset, index; int xpad, ypad; @@ -573,7 +573,7 @@ gtk_text_cell_accessible_get_offset_at_point (AtkText *text, GdkRectangle rendered_rect; GtkTextCellAccessible *text_cell = GTK_TEXT_CELL_ACCESSIBLE (text); char *renderer_text; - gfloat xalign, yalign; + float xalign, yalign; int x_offset, y_offset, index; int xpad, ypad; int x_temp, y_temp; diff --git a/gtk/gtkcellrenderer.c b/gtk/gtkcellrenderer.c index ae7bdf863d..3df11d2bdd 100644 --- a/gtk/gtkcellrenderer.c +++ b/gtk/gtkcellrenderer.c @@ -118,8 +118,8 @@ static void gtk_cell_renderer_real_get_aligned_area (GtkCellRendere struct _GtkCellRendererPrivate { - gfloat xalign; - gfloat yalign; + float xalign; + float yalign; int width; int height; @@ -931,8 +931,8 @@ gtk_cell_renderer_get_fixed_size (GtkCellRenderer *cell, **/ void gtk_cell_renderer_set_alignment (GtkCellRenderer *cell, - gfloat xalign, - gfloat yalign) + float xalign, + float yalign) { GtkCellRendererPrivate *priv; @@ -972,8 +972,8 @@ gtk_cell_renderer_set_alignment (GtkCellRenderer *cell, **/ void gtk_cell_renderer_get_alignment (GtkCellRenderer *cell, - gfloat *xalign, - gfloat *yalign) + float *xalign, + float *yalign) { GtkCellRendererPrivate *priv; diff --git a/gtk/gtkcellrenderer.h b/gtk/gtkcellrenderer.h index cc30e5fac7..4be9b35552 100644 --- a/gtk/gtkcellrenderer.h +++ b/gtk/gtkcellrenderer.h @@ -252,12 +252,12 @@ void gtk_cell_renderer_get_fixed_size (GtkCellRenderer *cell, GDK_AVAILABLE_IN_ALL void gtk_cell_renderer_set_alignment (GtkCellRenderer *cell, - gfloat xalign, - gfloat yalign); + float xalign, + float yalign); GDK_AVAILABLE_IN_ALL void gtk_cell_renderer_get_alignment (GtkCellRenderer *cell, - gfloat *xalign, - gfloat *yalign); + float *xalign, + float *yalign); GDK_AVAILABLE_IN_ALL void gtk_cell_renderer_set_padding (GtkCellRenderer *cell, diff --git a/gtk/gtkcellrendererpixbuf.c b/gtk/gtkcellrendererpixbuf.c index 8616478b0a..81d1da83df 100644 --- a/gtk/gtkcellrendererpixbuf.c +++ b/gtk/gtkcellrendererpixbuf.c @@ -464,7 +464,7 @@ gtk_cell_renderer_pixbuf_get_size (GtkCellRenderer *cell, if (cell_area && pixbuf_width > 0 && pixbuf_height > 0) { - gfloat xalign, yalign; + float xalign, yalign; gtk_cell_renderer_get_alignment (cell, &xalign, &yalign); if (x_offset) diff --git a/gtk/gtkcellrendererprogress.c b/gtk/gtkcellrendererprogress.c index 5f7ab16e56..eef3edc585 100644 --- a/gtk/gtkcellrendererprogress.c +++ b/gtk/gtkcellrendererprogress.c @@ -80,8 +80,8 @@ struct _GtkCellRendererProgressPrivate int min_w; int pulse; int offset; - gfloat text_xalign; - gfloat text_yalign; + float text_xalign; + float text_yalign; GtkOrientation orientation; gboolean inverted; }; @@ -642,7 +642,7 @@ gtk_cell_renderer_progress_snapshot (GtkCellRenderer *cell, if (priv->label) { - gfloat text_xalign; + float text_xalign; layout = gtk_widget_create_pango_layout (widget, priv->label); pango_layout_get_pixel_extents (layout, NULL, &logical_rect); diff --git a/gtk/gtkcellrendererspinner.c b/gtk/gtkcellrendererspinner.c index 20c211a8ad..eefb1f7093 100644 --- a/gtk/gtkcellrendererspinner.c +++ b/gtk/gtkcellrendererspinner.c @@ -291,7 +291,7 @@ gtk_cell_renderer_spinner_get_size (GtkCellRenderer *cellr, gdouble align; int w, h; int xpad, ypad; - gfloat xalign, yalign; + float xalign, yalign; gboolean rtl; rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL; diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c index 45bf9fb4a6..5f1a2af590 100644 --- a/gtk/gtkcellrenderertext.c +++ b/gtk/gtkcellrenderertext.c @@ -1812,7 +1812,7 @@ gtk_cell_renderer_text_start_editing (GtkCellRenderer *cell, { GtkCellRendererText *celltext = GTK_CELL_RENDERER_TEXT (cell); GtkCellRendererTextPrivate *priv = gtk_cell_renderer_text_get_instance_private (celltext); - gfloat xalign, yalign; + float xalign, yalign; /* If the cell isn't editable we return NULL. */ if (!priv->editable) diff --git a/gtk/gtkcellrenderertoggle.c b/gtk/gtkcellrenderertoggle.c index 472d1c33cc..50de7e4309 100644 --- a/gtk/gtkcellrenderertoggle.c +++ b/gtk/gtkcellrenderertoggle.c @@ -383,7 +383,7 @@ gtk_cell_renderer_toggle_get_size (GtkCellRenderer *cell, if (cell_area) { - gfloat xalign, yalign; + float xalign, yalign; gtk_cell_renderer_get_alignment (cell, &xalign, &yalign); diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 2fdb9483e1..2f228182dd 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -2341,7 +2341,8 @@ gtk_entry_get_has_frame (GtkEntry *entry) * text is shorter than the width of the entry. **/ void -gtk_entry_set_alignment (GtkEntry *entry, gfloat xalign) +gtk_entry_set_alignment (GtkEntry *entry, + float xalign) { GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); @@ -2358,7 +2359,7 @@ gtk_entry_set_alignment (GtkEntry *entry, gfloat xalign) * * Returns: the alignment **/ -gfloat +float gtk_entry_get_alignment (GtkEntry *entry) { GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); diff --git a/gtk/gtkentry.h b/gtk/gtkentry.h index dfcbce68f7..66f8c67f00 100644 --- a/gtk/gtkentry.h +++ b/gtk/gtkentry.h @@ -153,9 +153,9 @@ gboolean gtk_entry_get_activates_default (GtkEntry *entry); GDK_AVAILABLE_IN_ALL void gtk_entry_set_alignment (GtkEntry *entry, - gfloat xalign); + float xalign); GDK_AVAILABLE_IN_ALL -gfloat gtk_entry_get_alignment (GtkEntry *entry); +float gtk_entry_get_alignment (GtkEntry *entry); GDK_AVAILABLE_IN_ALL void gtk_entry_set_completion (GtkEntry *entry, diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c index 5b5246b522..efa8ddcec1 100644 --- a/gtk/gtkframe.c +++ b/gtk/gtkframe.c @@ -87,7 +87,7 @@ typedef struct GtkWidget *child; guint has_frame : 1; - gfloat label_xalign; + float label_xalign; } GtkFramePrivate; enum { @@ -443,7 +443,7 @@ gtk_frame_get_label_widget (GtkFrame *frame) **/ void gtk_frame_set_label_align (GtkFrame *frame, - gfloat xalign) + float xalign) { GtkFramePrivate *priv = gtk_frame_get_instance_private (frame); @@ -465,7 +465,7 @@ gtk_frame_set_label_align (GtkFrame *frame, * Retrieves the X alignment of the frame’s label. See * gtk_frame_set_label_align(). **/ -gfloat +float gtk_frame_get_label_align (GtkFrame *frame) { GtkFramePrivate *priv = gtk_frame_get_instance_private (frame); diff --git a/gtk/gtkframe.h b/gtk/gtkframe.h index 08523a2d33..0e76858c8e 100644 --- a/gtk/gtkframe.h +++ b/gtk/gtkframe.h @@ -89,9 +89,9 @@ GDK_AVAILABLE_IN_ALL GtkWidget *gtk_frame_get_label_widget (GtkFrame *frame); GDK_AVAILABLE_IN_ALL void gtk_frame_set_label_align (GtkFrame *frame, - gfloat xalign); + float xalign); GDK_AVAILABLE_IN_ALL -gfloat gtk_frame_get_label_align (GtkFrame *frame); +float gtk_frame_get_label_align (GtkFrame *frame); GDK_AVAILABLE_IN_ALL void gtk_frame_set_child (GtkFrame *frame, diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index 279629a8d7..58993600c9 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -3914,8 +3914,8 @@ void gtk_icon_view_scroll_to_path (GtkIconView *icon_view, GtkTreePath *path, gboolean use_align, - gfloat row_align, - gfloat col_align) + float row_align, + float col_align) { GtkIconViewItem *item = NULL; GtkWidget *widget; @@ -3953,7 +3953,7 @@ gtk_icon_view_scroll_to_path (GtkIconView *icon_view, { int width, height; int x, y; - gfloat offset; + float offset; GdkRectangle item_area = { item->cell_area.x - icon_view->priv->item_padding, diff --git a/gtk/gtkiconview.h b/gtk/gtkiconview.h index 3125d12ea0..5b559035db 100644 --- a/gtk/gtkiconview.h +++ b/gtk/gtkiconview.h @@ -207,8 +207,8 @@ GDK_AVAILABLE_IN_ALL void gtk_icon_view_scroll_to_path (GtkIconView *icon_view, GtkTreePath *path, gboolean use_align, - gfloat row_align, - gfloat col_align); + float row_align, + float col_align); /* Drag-and-Drop support */ GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkiconviewprivate.h b/gtk/gtkiconviewprivate.h index f059b4223e..ef785bad04 100644 --- a/gtk/gtkiconviewprivate.h +++ b/gtk/gtkiconviewprivate.h @@ -151,8 +151,8 @@ struct _GtkIconViewPrivate /* scroll to */ GtkTreeRowReference *scroll_to_path; - gfloat scroll_to_row_align; - gfloat scroll_to_col_align; + float scroll_to_row_align; + float scroll_to_col_align; guint scroll_to_use_align : 1; guint source_set : 1; diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index b07134b1a2..2d353ee681 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -267,8 +267,8 @@ struct _GtkLabel char *label; char *text; - gfloat xalign; - gfloat yalign; + float xalign; + float yalign; guint mnemonics_visible : 1; guint jtype : 2; @@ -3180,7 +3180,7 @@ get_layout_location (GtkLabel *self, GtkWidget *widget = GTK_WIDGET (self); int req_width, x, y; int req_height; - gfloat xalign, yalign; + float xalign, yalign; PangoRectangle logical; int baseline, layout_baseline, baseline_offset; int label_width, label_height; @@ -5816,7 +5816,7 @@ _gtk_label_get_link_focused (GtkLabel *self, */ void gtk_label_set_xalign (GtkLabel *self, - gfloat xalign) + float xalign) { g_return_if_fail (GTK_IS_LABEL (self)); @@ -5839,7 +5839,7 @@ gtk_label_set_xalign (GtkLabel *self, * * Returns: the xalign property */ -gfloat +float gtk_label_get_xalign (GtkLabel *self) { g_return_val_if_fail (GTK_IS_LABEL (self), 0.5); @@ -5856,7 +5856,7 @@ gtk_label_get_xalign (GtkLabel *self) */ void gtk_label_set_yalign (GtkLabel *self, - gfloat yalign) + float yalign) { g_return_if_fail (GTK_IS_LABEL (self)); @@ -5879,7 +5879,7 @@ gtk_label_set_yalign (GtkLabel *self, * * Returns: the yalign property */ -gfloat +float gtk_label_get_yalign (GtkLabel *self) { g_return_val_if_fail (GTK_IS_LABEL (self), 0.5); diff --git a/gtk/gtklabel.h b/gtk/gtklabel.h index 2547fd511b..36441a5fe9 100644 --- a/gtk/gtklabel.h +++ b/gtk/gtklabel.h @@ -154,17 +154,17 @@ const char *gtk_label_get_current_uri (GtkLabel *self); GDK_AVAILABLE_IN_ALL void gtk_label_set_xalign (GtkLabel *self, - gfloat xalign); + float xalign); GDK_AVAILABLE_IN_ALL -gfloat gtk_label_get_xalign (GtkLabel *self); +float gtk_label_get_xalign (GtkLabel *self); GDK_AVAILABLE_IN_ALL void gtk_label_set_yalign (GtkLabel *self, - gfloat yalign); + float yalign); GDK_AVAILABLE_IN_ALL -gfloat gtk_label_get_yalign (GtkLabel *self); +float gtk_label_get_yalign (GtkLabel *self); GDK_AVAILABLE_IN_ALL void gtk_label_set_extra_menu (GtkLabel *self, diff --git a/gtk/gtkmarshalers.list b/gtk/gtkmarshalers.list index 3fe5fc51da..7334e54a71 100644 --- a/gtk/gtkmarshalers.list +++ b/gtk/gtkmarshalers.list @@ -12,7 +12,7 @@ # ULONG for unsigned long integer types (gulong) # ENUM for enumeration types (int) # FLAGS for flag enumeration types (guint) -# FLOAT for single-precision float types (gfloat) +# FLOAT for single-precision float types (float) # DOUBLE for double-precision float types (gdouble) # STRING for string types (char *) # BOXED for boxed (anonymous but reference counted) types (GBoxed*) diff --git a/gtk/gtktreedatalist.c b/gtk/gtktreedatalist.c index 4d42ba1859..078847239b 100644 --- a/gtk/gtktreedatalist.c +++ b/gtk/gtktreedatalist.c @@ -159,7 +159,7 @@ _gtk_tree_data_list_node_to_value (GtkTreeDataList *list, g_value_set_flags (value, list->data.v_uint); break; case G_TYPE_FLOAT: - g_value_set_float (value, (gfloat) list->data.v_float); + g_value_set_float (value, (float) list->data.v_float); break; case G_TYPE_DOUBLE: g_value_set_double (value, (gdouble) list->data.v_double); diff --git a/gtk/gtktreedatalist.h b/gtk/gtktreedatalist.h index 2d88496a66..9207bce14a 100644 --- a/gtk/gtktreedatalist.h +++ b/gtk/gtktreedatalist.h @@ -35,7 +35,7 @@ struct _GtkTreeDataList gulong v_ulong; gint64 v_int64; guint64 v_uint64; - gfloat v_float; + float v_float; gdouble v_double; gpointer v_pointer; } data; diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 2479829305..8b20bedd91 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -436,8 +436,8 @@ typedef struct /* Scroll-to functionality when unrealized */ GtkTreeRowReference *scroll_to_path; GtkTreeViewColumn *scroll_to_column; - gfloat scroll_to_row_align; - gfloat scroll_to_col_align; + float scroll_to_row_align; + float scroll_to_col_align; /* Interactive search */ int selected_iter; @@ -11218,8 +11218,8 @@ gtk_tree_view_scroll_to_cell (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gboolean use_align, - gfloat row_align, - gfloat col_align) + float row_align, + float col_align) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); diff --git a/gtk/gtktreeview.h b/gtk/gtktreeview.h index e5ed5c72db..c323c7d957 100644 --- a/gtk/gtktreeview.h +++ b/gtk/gtktreeview.h @@ -280,8 +280,8 @@ void gtk_tree_view_scroll_to_cell (GtkTreeView GtkTreePath *path, GtkTreeViewColumn *column, gboolean use_align, - gfloat row_align, - gfloat col_align); + float row_align, + float col_align); GDK_AVAILABLE_IN_ALL void gtk_tree_view_row_activated (GtkTreeView *tree_view, GtkTreePath *path, diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index 2fbbe738c2..ad81ebb946 100644 --- a/gtk/gtktreeviewcolumn.c +++ b/gtk/gtktreeviewcolumn.c @@ -161,7 +161,7 @@ struct _GtkTreeViewColumnPrivate GtkWidget *arrow; GtkWidget *frame; gulong property_changed_signal; - gfloat xalign; + float xalign; /* Sizing fields */ /* see gtk+/doc/tree-column-sizing.txt for more information on them */ @@ -2457,7 +2457,7 @@ gtk_tree_view_column_get_widget (GtkTreeViewColumn *tree_column) **/ void gtk_tree_view_column_set_alignment (GtkTreeViewColumn *tree_column, - gfloat xalign) + float xalign) { GtkTreeViewColumnPrivate *priv; @@ -2484,7 +2484,7 @@ gtk_tree_view_column_set_alignment (GtkTreeViewColumn *tree_column, * * Returns: The current alignent of @tree_column. **/ -gfloat +float gtk_tree_view_column_get_alignment (GtkTreeViewColumn *tree_column) { g_return_val_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column), 0.5); diff --git a/gtk/gtktreeviewcolumn.h b/gtk/gtktreeviewcolumn.h index 24610307a0..6cbe42dbe1 100644 --- a/gtk/gtktreeviewcolumn.h +++ b/gtk/gtktreeviewcolumn.h @@ -182,9 +182,9 @@ GDK_AVAILABLE_IN_ALL GtkWidget *gtk_tree_view_column_get_widget (GtkTreeViewColumn *tree_column); GDK_AVAILABLE_IN_ALL void gtk_tree_view_column_set_alignment (GtkTreeViewColumn *tree_column, - gfloat xalign); + float xalign); GDK_AVAILABLE_IN_ALL -gfloat gtk_tree_view_column_get_alignment (GtkTreeViewColumn *tree_column); +float gtk_tree_view_column_get_alignment (GtkTreeViewColumn *tree_column); GDK_AVAILABLE_IN_ALL void gtk_tree_view_column_set_reorderable (GtkTreeViewColumn *tree_column, gboolean reorderable); diff --git a/tests/testframe.c b/tests/testframe.c index 36464daab2..5a47758242 100644 --- a/tests/testframe.c +++ b/tests/testframe.c @@ -60,7 +60,7 @@ int main (int argc, char **argv) GtkBox *vbox; GtkFrame *frame; GtkGrid *grid; - gfloat xalign; + float xalign; gboolean done = FALSE; gtk_init (); diff --git a/tests/testtooltips.c b/tests/testtooltips.c index 6f6b951d24..3c5d87c376 100644 --- a/tests/testtooltips.c +++ b/tests/testtooltips.c @@ -181,9 +181,9 @@ static struct Rectangle { int x; int y; - gfloat r; - gfloat g; - gfloat b; + float r; + float g; + float b; const char *tooltip; } rectangles[] = diff --git a/testsuite/gtk/notify.c b/testsuite/gtk/notify.c index 905f0c002d..a707fbc984 100644 --- a/testsuite/gtk/notify.c +++ b/testsuite/gtk/notify.c @@ -313,8 +313,8 @@ check_property (GObject *instance, GParamSpec *pspec) guint i; NotifyData data; gulong id; - gfloat value; - gfloat new_value; + float value; + float new_value; int current_count; data.name = pspec->name;