forked from AuroraMiddleware/gtk
Replace "gfloat" with "float"
This commit is contained in:
parent
d375dce9f5
commit
556997f9df
@ -255,7 +255,6 @@ static const char *types[] =
|
||||
" int ",
|
||||
" char ",
|
||||
"char ",
|
||||
"gfloat",
|
||||
"float",
|
||||
"double",
|
||||
"gint8",
|
||||
|
@ -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);
|
||||
```
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -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*)
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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 ();
|
||||
|
@ -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[] =
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user